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 Mathlib.GroupTheory.QuotientGroup.Basic |
| 2 | import Mathlib.Algebra.Order.Archimedean.Basic |
| 3 | import Mathlib.Tactic |
| 4 | |
| 5 | /-! # Nonnegative Quadratic Mk -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.FormalGeometry.Completion.NonnegativeQuadraticMk.Construction |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! The zero set of a nonnegative rational quadratic function is a saturated |
| 12 | subgroup, and translation by that subgroup preserves the function. -/ |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | structure NonnegativeQuadratic (G : Type u) [AddCommGroup G] where |
| 17 | value : G → ℚ |
| 18 | zero : value 0 = 0 |
| 19 | nonneg : ∀ x, 0 ≤ value x |
| 20 | parallelogram : ∀ x y, value (x + y) + value (x - y) = 2 * (value x + value y) |
| 21 | |
| 22 | namespace NonnegativeQuadratic |
| 23 | |
| 24 | variable {G : Type u} [AddCommGroup G] (q : NonnegativeQuadratic G) |
| 25 | |
| 26 | theorem neg (x : G) : q.value (-x) = q.value x := by |
| 27 | have h := q.parallelogram 0 x |
| 28 | rw [zero_add, zero_sub, q.zero] at h |
| 29 | linarith |
| 30 | |
| 31 | def zeroKernel : AddSubgroup G where |
| 32 | carrier := {x | q.value x = 0} |
| 33 | zero_mem' := q.zero |
| 34 | add_mem' := by |
| 35 | intro x y hx hy |
| 36 | have h := q.parallelogram x y |
| 37 | have hp := q.nonneg (x + y) |
| 38 | have hm := q.nonneg (x - y) |
| 39 | change q.value x = 0 at hx |
| 40 | change q.value y = 0 at hy |
| 41 | change q.value (x + y) = 0 |
| 42 | linarith |
| 43 | neg_mem' := by |
| 44 | intro x hx |
| 45 | exact (q.neg x).trans hx |
| 46 | |
| 47 | theorem nsmul (n : ℕ) (x : G) : q.value (n • x) = (n : ℚ) ^ 2 * q.value x := by |
| 48 | induction n using Nat.twoStepInduction with |
| 49 | | zero => simp [q.zero] |
| 50 | | one => simp |
| 51 | | more n hn hn1 => |
| 52 | have hp := q.parallelogram ((n + 1) • x) x |
| 53 | have hadd : (n + 1) • x + x = (n + 2) • x := by simp [add_nsmul, two_nsmul, add_assoc] |
| 54 | have hsub : (n + 1) • x - x = n • x := by simp [add_nsmul] |
| 55 | rw [hadd, hsub, hn, hn1] at hp |
| 56 | push_cast at hp ⊢ |
| 57 | nlinarith |
| 58 | |
| 59 | theorem nsmul_mem_zeroKernel_iff (n : ℕ) (hn : 0 < n) (x : G) : |
| 60 | n • x ∈ q.zeroKernel ↔ x ∈ q.zeroKernel := by |
| 61 | change q.value (n • x) = 0 ↔ q.value x = 0 |
| 62 | rw [q.nsmul, mul_eq_zero] |
| 63 | have h : (n : ℚ) ^ 2 ≠ 0 := pow_ne_zero _ (Nat.cast_ne_zero.mpr hn.ne') |
| 64 | exact or_iff_right h |
| 65 | |
| 66 | theorem translate_nsmul_of_zero (x y : G) (hy : q.value y = 0) (n : ℕ) : |
| 67 | q.value (x + n • y) = q.value x + (n : ℚ) * (q.value (x + y) - q.value x) := by |
| 68 | induction n using Nat.twoStepInduction with |
| 69 | | zero => simp |
| 70 | | one => simp |
| 71 | | more n hn hn1 => |
| 72 | have hp := q.parallelogram (x + (n + 1) • y) y |
| 73 | have hadd : (x + (n + 1) • y) + y = x + (n + 2) • y := by |
| 74 | simp [add_nsmul, two_nsmul, add_assoc] |
| 75 | have hsub : (x + (n + 1) • y) - y = x + n • y := by |
| 76 | simp only [add_nsmul, one_nsmul] |
| 77 | abel |
| 78 | rw [hadd, hsub, hn, hn1, hy] at hp |
| 79 | push_cast at hp ⊢ |
| 80 | linarith |
| 81 | |
| 82 | private theorem slope_nonneg (a b : ℚ) (h : ∀ n : ℕ, 0 ≤ a + n * b) : 0 ≤ b := by |
| 83 | by_contra hb |
| 84 | have hneg : 0 < -b := neg_pos.mpr (lt_of_not_ge hb) |
| 85 | obtain ⟨n, hn⟩ := exists_nat_gt (a / (-b)) |
| 86 | have hn' : a < (n : ℚ) * (-b) := (div_lt_iff₀ hneg).mp hn |
| 87 | have hh := h n |
| 88 | nlinarith |
| 89 | |
| 90 | theorem translate_of_zero (x y : G) (hy : q.value y = 0) : q.value (x + y) = q.value x := by |
| 91 | have hp : 0 ≤ q.value (x + y) - q.value x := |
| 92 | slope_nonneg _ _ (fun n => (q.translate_nsmul_of_zero x y hy n) ▸ q.nonneg (x + n • y)) |
| 93 | have hny : q.value (-y) = 0 := (q.neg y).trans hy |
| 94 | have hm : 0 ≤ q.value (x - y) - q.value x := by |
| 95 | have h := slope_nonneg (q.value x) (q.value (x + -y) - q.value x) |
| 96 | (fun n => (q.translate_nsmul_of_zero x (-y) hny n) ▸ q.nonneg (x + n • (-y))) |
| 97 | simpa only [sub_eq_add_neg] using h |
| 98 | have h := q.parallelogram x y |
| 99 | rw [hy] at h |
| 100 | linarith |
| 101 | |
| 102 | def quotientValue : G ⧸ q.zeroKernel → ℚ := |
| 103 | Quotient.lift q.value (by |
| 104 | intro x y h |
| 105 | have hy : q.value (-x + y) = 0 := QuotientAddGroup.leftRel_apply.mp h |
| 106 | have hh := q.translate_of_zero x (-x + y) hy |
| 107 | simpa only [add_neg_cancel_left] using hh.symm) |
| 108 | |
| 109 | theorem quotientValue_mk (x : G) : q.quotientValue (QuotientAddGroup.mk x) = q.value x := rfl |
| 110 | |
| 111 | end NonnegativeQuadratic |
| 112 | |
| 113 | end |
| 114 | |
| 115 | end OAI.AlgebraicGeometry.FormalGeometry.Completion.NonnegativeQuadraticMk.Construction |