Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import OAI.AlgebraicGeometry.SheafCohomology.Projective.EventualPolynomialIdentity |
| 2 | import Mathlib.Analysis.Polynomial.Basic |
| 3 | import Mathlib.Analysis.Normed.Group.Rat |
| 4 | |
| 5 | /-! # Polynomial Growth Degree -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.SheafCohomology.Projective.PolynomialGrowthDegree.Dimension |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! Leading coefficients from eventual inequalities of section dimensions. -/ |
| 12 | |
| 13 | open Filter _root_.Polynomial |
| 14 | |
| 15 | theorem polynomial_leadingCoeff_nonneg_of_eventually_nat_eval_nonneg |
| 16 | (P : Polynomial ℚ) (b : ℕ) (h : ∀ n : ℕ, b ≤ n → 0 ≤ P.eval (n : ℚ)) : |
| 17 | 0 ≤ P.leadingCoeff := by |
| 18 | by_cases hd : P.degree ≤ 0 |
| 19 | · have he : P = Polynomial.C P.leadingCoeff := by |
| 20 | simpa only [← Polynomial.coeff_natDegree, |
| 21 | Polynomial.natDegree_eq_zero_iff_degree_le_zero.mpr hd] using |
| 22 | Polynomial.eq_C_of_degree_le_zero hd |
| 23 | have hb := h b le_rfl |
| 24 | rw [he, Polynomial.eval_C] at hb |
| 25 | exact hb |
| 26 | · by_contra hc |
| 27 | have ht := (P.tendsto_atBot_of_leadingCoeff_nonpos (lt_of_not_ge hd) |
| 28 | (le_of_lt (lt_of_not_ge hc))).comp |
| 29 | (tendsto_natCast_atTop_atTop (R := ℚ)) |
| 30 | obtain ⟨n, hn, hneg⟩ := ((eventually_ge_atTop b).and |
| 31 | (ht.eventually_lt_atBot 0)).exists |
| 32 | exact (h n hn).not_gt hneg |
| 33 | |
| 34 | theorem polynomial_coeff_nonneg_of_eventually_nat_eval_nonneg |
| 35 | (P : Polynomial ℚ) (d : ℕ) (hd : P.natDegree ≤ d) |
| 36 | (b : ℕ) (h : ∀ n : ℕ, b ≤ n → 0 ≤ P.eval (n : ℚ)) : |
| 37 | 0 ≤ P.coeff d := by |
| 38 | rcases lt_or_eq_of_le hd with hd | hd |
| 39 | · rw [Polynomial.coeff_eq_zero_of_natDegree_lt hd] |
| 40 | · rw [← hd, Polynomial.coeff_natDegree] |
| 41 | exact polynomial_leadingCoeff_nonneg_of_eventually_nat_eval_nonneg P b h |
| 42 | |
| 43 | theorem polynomial_coeff_le_of_eventually_nat_eval_le |
| 44 | (P Q : Polynomial ℚ) (d : ℕ) (hP : P.natDegree ≤ d) (hQ : Q.natDegree ≤ d) |
| 45 | (b : ℕ) (h : ∀ n : ℕ, b ≤ n → P.eval (n : ℚ) ≤ Q.eval (n : ℚ)) : |
| 46 | P.coeff d ≤ Q.coeff d := by |
| 47 | have hc := polynomial_coeff_nonneg_of_eventually_nat_eval_nonneg (Q - P) d |
| 48 | (by simpa only [max_self] using Polynomial.natDegree_sub_le_of_le hQ hP) b |
| 49 | (fun n hn => by simpa only [Polynomial.eval_sub, sub_nonneg] using h n hn) |
| 50 | simpa only [Polynomial.coeff_sub, sub_nonneg] using hc |
| 51 | |
| 52 | theorem polynomial_leadingCoeff_le_of_eventually_nat_eval_le |
| 53 | (P Q : Polynomial ℚ) (hd : P.natDegree = Q.natDegree) |
| 54 | (b : ℕ) (h : ∀ n : ℕ, b ≤ n → P.eval (n : ℚ) ≤ Q.eval (n : ℚ)) : |
| 55 | P.leadingCoeff ≤ Q.leadingCoeff := by |
| 56 | have hc := polynomial_coeff_le_of_eventually_nat_eval_le P Q P.natDegree |
| 57 | le_rfl hd.symm.le b h |
| 58 | rw [Polynomial.coeff_natDegree, hd, Polynomial.coeff_natDegree] at hc |
| 59 | exact hc |
| 60 | |
| 61 | theorem polynomial_leadingCoeff_comp_mul (P : Polynomial ℚ) (a : ℚ) (ha : a ≠ 0) : |
| 62 | (P.comp (Polynomial.X * Polynomial.C a)).leadingCoeff = |
| 63 | P.leadingCoeff * a ^ P.natDegree := by |
| 64 | have hd : (Polynomial.X * Polynomial.C a).natDegree = 1 := by |
| 65 | rw [Polynomial.natDegree_mul_C ha, Polynomial.natDegree_X] |
| 66 | rw [Polynomial.leadingCoeff_comp (by omega : |
| 67 | (Polynomial.X * Polynomial.C a).natDegree ≠ 0)] |
| 68 | simp only [Polynomial.leadingCoeff_mul, Polynomial.leadingCoeff_X, |
| 69 | Polynomial.leadingCoeff_C, one_mul] |
| 70 | |
| 71 | theorem polynomial_leadingCoeff_comp_add (P : Polynomial ℚ) (a : ℚ) : |
| 72 | (P.comp (Polynomial.X + Polynomial.C a)).leadingCoeff = P.leadingCoeff := by |
| 73 | rw [Polynomial.leadingCoeff_comp (by simp)] |
| 74 | simp only [Polynomial.leadingCoeff_X_add_C, one_pow, mul_one] |
| 75 | |
| 76 | end |
| 77 | |
| 78 | /-! Two-sided polynomial growth determines the degree of an eventual polynomial. -/ |
| 79 | |
| 80 | open _root_.Polynomial |
| 81 | |
| 82 | theorem polynomial_natDegree_le_of_eventually_nat_eval_le |
| 83 | (P Q : Polynomial ℚ) (hP : 0 < P.leadingCoeff) (b : ℕ) |
| 84 | (h : ∀ n : ℕ, b ≤ n → P.eval (n : ℚ) ≤ Q.eval (n : ℚ)) : |
| 85 | P.natDegree ≤ Q.natDegree := by |
| 86 | by_contra hd |
| 87 | have hlt : Q.natDegree < P.natDegree := Nat.lt_of_not_ge hd |
| 88 | have hc := polynomial_coeff_le_of_eventually_nat_eval_le P Q P.natDegree le_rfl hlt.le b h |
| 89 | rw [Polynomial.coeff_natDegree, Polynomial.coeff_eq_zero_of_natDegree_lt hlt] at hc |
| 90 | exact hP.not_ge hc |
| 91 | |
| 92 | theorem polynomial_natDegree_eq_of_power_growth |
| 93 | (P : Polynomial ℚ) (hP : 0 < P.leadingCoeff) |
| 94 | (g b c₁ c₂ D : ℕ) (hc₁ : 0 < c₁) (hc₂ : 0 < c₂) |
| 95 | (hlo : ∀ n : ℕ, b ≤ n → ((n : ℚ) + 1) ^ g ≤ P.eval ((n : ℚ) * c₁)) |
| 96 | (hhi : ∀ n : ℕ, b ≤ n → P.eval (n : ℚ) ≤ (D : ℚ) * ((n : ℚ) * c₂ + 1) ^ g) : |
| 97 | P.natDegree = g := by |
| 98 | have hc₁' : (c₁ : ℚ) ≠ 0 := by exact_mod_cast hc₁.ne' |
| 99 | have hc₂' : (c₂ : ℚ) ≠ 0 := by exact_mod_cast hc₂.ne' |
| 100 | let L : Polynomial ℚ := (Polynomial.X + Polynomial.C 1) ^ g |
| 101 | let Q : Polynomial ℚ := P.comp (Polynomial.X * Polynomial.C (c₁ : ℚ)) |
| 102 | let T : Polynomial ℚ := Polynomial.X * Polynomial.C (c₂ : ℚ) + Polynomial.C 1 |
| 103 | let U : Polynomial ℚ := Polynomial.C (D : ℚ) * T ^ g |
| 104 | have hLd : L.natDegree = g := by |
| 105 | rw [Polynomial.natDegree_pow', Polynomial.natDegree_X_add_C, Nat.mul_one] |
| 106 | simp only [Polynomial.leadingCoeff_X_add_C, one_pow, ne_eq, one_ne_zero, not_false_eq_true] |
| 107 | have hLc : 0 < L.leadingCoeff := by |
| 108 | rw [Polynomial.leadingCoeff_pow_X_add_C] |
| 109 | exact zero_lt_one |
| 110 | have hQd : Q.natDegree = P.natDegree := by |
| 111 | rw [Polynomial.natDegree_comp, Polynomial.natDegree_mul_C hc₁', Polynomial.natDegree_X, Nat.mul_one] |
| 112 | have hTd : T.natDegree ≤ 1 := by |
| 113 | apply Polynomial.natDegree_add_le_of_degree_le |
| 114 | · rw [Polynomial.natDegree_mul_C hc₂', Polynomial.natDegree_X] |
| 115 | · simp only [Polynomial.natDegree_C, zero_le] |
| 116 | have hUd : U.natDegree ≤ g := |
| 117 | (Polynomial.natDegree_C_mul_le (D : ℚ) (T ^ g)).trans |
| 118 | (by simpa only [Nat.mul_one] using Polynomial.natDegree_pow_le_of_le g hTd) |
| 119 | have hlow := polynomial_natDegree_le_of_eventually_nat_eval_le L Q hLc b (fun n hn => by |
| 120 | simpa only [L, Q, Polynomial.eval_pow, Polynomial.eval_add, Polynomial.eval_X, |
| 121 | Polynomial.eval_C, Polynomial.eval_comp, Polynomial.eval_mul] using hlo n hn) |
| 122 | have hhigh := polynomial_natDegree_le_of_eventually_nat_eval_le P U hP b (fun n hn => by |
| 123 | simpa only [U, T, Polynomial.eval_mul, Polynomial.eval_pow, Polynomial.eval_add, |
| 124 | Polynomial.eval_X, Polynomial.eval_C] using hhi n hn) |
| 125 | rw [hLd, hQd] at hlow |
| 126 | exact le_antisymm (hhigh.trans hUd) hlow |
| 127 | |
| 128 | end OAI.AlgebraicGeometry.SheafCohomology.Projective.PolynomialGrowthDegree.Dimension |