Download lean/OAI/NumberTheory/Jacobsthal/Estimates/DivisibleInflection.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 6.26 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/NumberTheory/Jacobsthal/Estimates/DivisibleInflection.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/NumberTheory/Jacobsthal/Estimates/DivisibleInflection.lean
-
curl -L -o DivisibleInflection.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/NumberTheory/Jacobsthal/Estimates/DivisibleInflection.lean
6.26 kB
Lean 4 · 17
declarations statementsfull
noncomputable def swapVars (R : Type*) [CommSemiring R] : MV R ≃ₐ[R] MV R := body · 1 line
MvPolynomial.renameEquiv R (Equiv.swap (0 : Fin 2) 1)theorem swap_twice (R : Type*) [CommSemiring R] (Q : MV R) :
swapVars R (swapVars R Q) = Q := by proof · 1 line
simpa [swapVars] using (MvPolynomial.renameEquiv R (Equiv.swap (0 : Fin 2) 1)).apply_symm_apply Qtheorem nestedX_swap (R : Type*) [CommSemiring R] (Q : MV R) :
nestedX R (swapVars R Q) = nestedY R Q := rfl theorem nestedY_swap (R : Type*) [CommSemiring R] (Q : MV R) :
nestedY R (swapVars R Q) = nestedX R Q := by proof · 2 lines
change nestedX R (swapVars R (swapVars R Q)) = _
rw [swap_twice]theorem partial_zero_swap (R : Type*) [CommSemiring R] (Q : MV R) :
MvPolynomial.pderiv 0 (swapVars R Q) = swapVars R (MvPolynomial.pderiv 1 Q) := by proof · 2 lines
apply (nestedX R).injective
rw [nestedX_partial_zero,nestedX_swap,nestedX_swap,nestedY_partial_one]theorem partial_one_swap (R : Type*) [CommSemiring R] (Q : MV R) :
MvPolynomial.pderiv 1 (swapVars R Q) = swapVars R (MvPolynomial.pderiv 0 Q) := by proof · 2 lines
apply (nestedY R).injective
rw [nestedY_partial_one,nestedY_swap,nestedY_swap,nestedX_partial_zero]theorem eval_swap (R : Type*) [CommSemiring R] (Q : MV R) (x y : R) :
MvPolynomial.eval ![x,y] (swapVars R Q) = MvPolynomial.eval ![y,x] Q := by proof · 3 lines
have h1 := eval_nestedX R (swapVars R Q) x y
rw [nestedX_swap] at h1
exact h1.symm.trans (eval_nestedY R Q y x)theorem peval_swap (Q : MV ℝ) (x y : ℝ) : peval (swapVars ℝ Q) x y = peval Q y x := by proof · 1 line
rw [peval_eq_eval_pair,peval_eq_eval_pair,eval_swap]
theorem complexify_swap (Q : MV ℝ) : complexify (swapVars ℝ Q) = swapVars ℂ (complexify Q) := by proof · 1 line
simp only [complexify,swapVars,MvPolynomial.renameEquiv_apply,MvPolynomial.map_rename]theorem mixed_partials_complex (Q : MV ℂ) :
MvPolynomial.pderiv 1 (MvPolynomial.pderiv 0 Q) =
MvPolynomial.pderiv 0 (MvPolynomial.pderiv 1 Q) := by proof · 3 lines
classical
ext m
simp [MvPolynomial.coeff_pderiv,add_assoc,add_left_comm,add_comm,mul_left_comm,mul_comm]theorem inflection_swap (Q : MV ℂ) : inflection (swapVars ℂ Q) = swapVars ℂ (inflection Q) := by proof · 5 lines
unfold inflection
simp only [partial_zero_swap,partial_one_swap,mixed_partials_complex,map_add,map_mul,map_pow]
have hC : swapVars ℂ (MvPolynomial.C (-2 : ℂ)) = MvPolynomial.C (-2 : ℂ) := by simp [swapVars]
rw [hC]
ringtheorem complex_divisibility_swap (Q : MV ℝ)
(hdiv : complexify Q ∣ inflection (complexify Q)) :
complexify (swapVars ℝ Q) ∣ inflection (complexify (swapVars ℝ Q)) := by proof · 2 lines
rw [complexify_swap,inflection_swap]
exact map_dvd (swapVars ℂ).toRingHom hdivtheorem no_regular_y_point (Q : MV ℝ) (hQ : Irreducible (complexify Q))
(hdeg : 1 < Q.totalDegree) (hdiv : complexify Q ∣ inflection (complexify Q))
(x y : ℝ) (hzero : peval Q x y = 0) (hy : peval (partialY Q) x y ≠ 0) : False := by proof · 11 lines
obtain ⟨a,b,f,hax,hxb,hfx,hf,hcurve,hfy⟩ := exists_local_real_graph Q x y hzero hy
have hsecond := zero_second_derivative_on_divisible_graph Q f a b hdiv hf hcurve hfy
obtain ⟨A,B,haffine⟩ := affine_of_second_derivative_zero f a b x ⟨hax,hxb⟩ hf hsecond
have hdegC : 1 < (complexify Q).totalDegree := by rwa [complexify_totalDegree]
apply no_affine_interval (complexify Q) hQ hdegC (A : ℂ) (B : ℂ) a b (hax.trans hxb)
intro t ht
have hz := hcurve t ht
rw [haffine t ht] at hz
have hc := complexify_eval Q t (A*t+B)
rw [← peval_eq_eval_pair,hz] at hc
simpa only [Complex.ofReal_mul,Complex.ofReal_add,Complex.ofReal_zero] using hctheorem no_regular_x_point (Q : MV ℝ) (hQ : Irreducible (complexify Q))
(hdeg : 1 < Q.totalDegree) (hdiv : complexify Q ∣ inflection (complexify Q))
(x y : ℝ) (hzero : peval Q x y = 0) (hx : peval (partialX Q) x y ≠ 0) : False := by proof · 11 lines
have hirr : Irreducible (complexify (swapVars ℝ Q)) := by
rw [complexify_swap]
exact (MulEquiv.irreducible_iff (swapVars ℂ).toMulEquiv).mpr hQ
have hd : 1 < (swapVars ℝ Q).totalDegree := by
simpa only [swapVars,MvPolynomial.totalDegree_renameEquiv] using hdeg
have hz : peval (swapVars ℝ Q) y x = 0 := by rw [peval_swap]; exact hzero
have hpart : peval (partialY (swapVars ℝ Q)) y x ≠ 0 := by
change peval (MvPolynomial.pderiv 1 (swapVars ℝ Q)) y x ≠ 0
rw [partial_one_swap,peval_swap]
exact hx
exact no_regular_y_point (swapVars ℝ Q) hirr hd (complex_divisibility_swap Q hdiv) y x hz hparttheorem no_real_regular_point_of_divisible_inflection (Q : MV ℝ)
(hQ : Irreducible (complexify Q)) (hdeg : 1 < Q.totalDegree)
(hdiv : complexify Q ∣ inflection (complexify Q)) (x y : ℝ)
(hzero : peval Q x y = 0)
(hregular : peval (partialX Q) x y ≠ 0 ∨ peval (partialY Q) x y ≠ 0) : False := by proof · 3 lines
rcases hregular with hx | hy
· exact no_regular_x_point Q hQ hdeg hdiv x y hzero hx
· exact no_regular_y_point Q hQ hdeg hdiv x y hzero hytheorem divisible_inflection_gradient_zero (Q : MV ℝ)
(hQ : Irreducible (complexify Q)) (hdeg : 1 < Q.totalDegree)
(hdiv : complexify Q ∣ inflection (complexify Q)) (x y : ℝ)
(hzero : peval Q x y = 0) :
peval (partialX Q) x y = 0 ∧ peval (partialY Q) x y = 0 := by proof · 5 lines
constructor
· by_contra hx
exact no_regular_x_point Q hQ hdeg hdiv x y hzero hx
· by_contra hy
exact no_regular_y_point Q hQ hdeg hdiv x y hzero hytheorem real_divisible_inflection_gradient_zero (Q : MV ℝ)
(hQ : Irreducible (complexify Q)) (hdeg : 1 < Q.totalDegree)
(hdiv : Q ∣ inflectionPolynomial Q) (x y : ℝ) (hzero : peval Q x y = 0) :
peval (partialX Q) x y = 0 ∧ peval (partialY Q) x y = 0 := proof · 1 line
divisible_inflection_gradient_zero Q hQ hdeg (real_divisibility_to_complex Q hdiv) x y hzeroOutline
- def
swapVars15 - theorem
swap_twice18 - theorem
nestedX_swap22 - theorem
nestedY_swap25 - theorem
partial_zero_swap30 - theorem
partial_one_swap35 - theorem
eval_swap40 - theorem
peval_swap46 - theorem
complexify_swap49 - theorem
mixed_partials_complex52 - theorem
inflection_swap59 - theorem
complex_divisibility_swap66 - theorem
no_regular_y_point82 - theorem
no_regular_x_point97 - theorem
no_real_regular_point_of_divisible_inflection112 - theorem
divisible_inflection_gradient_zero121 - theorem
real_divisible_inflection_gradient_zero132