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.AbelianModuli.ReferenceFamily.Hermitian.Reflection |
| 2 | import Mathlib |
| 3 | |
| 4 | /-! # Quadratic Cancellation Eq -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.QuadraticCancellationEq.QuadraticCancellation |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Cancellation of a nonzero one-dimensional quadratic summand over the |
| 11 | rationals. Reflections align the distinguished vectors before restricting |
| 12 | the given isometry to their orthogonal complements. -/ |
| 13 | |
| 14 | open QuadraticMap |
| 15 | |
| 16 | variable {V W : Type*} [AddCommGroup V] [Module ℚ V] |
| 17 | [AddCommGroup W] [Module ℚ W] |
| 18 | |
| 19 | private def reflection (Q : QuadraticForm ℚ V) (v : V) (hv : Q v ≠ 0) : |
| 20 | Q.IsometryEquiv Q where |
| 21 | toLinearEquiv := Hermitian.Reflection.hermitianReflection (RingHom.id ℚ) (Q.associated) v |
| 22 | (by simpa only [associated_eq_self_apply] using hv) |
| 23 | map_app' x := by |
| 24 | change Q (Hermitian.Reflection.hermitianReflection (RingHom.id ℚ) (Q.associated) v |
| 25 | (by simpa only [associated_eq_self_apply] using hv) x) = Q x |
| 26 | have h := Hermitian.Reflection.hermitianReflection_preserves (RingHom.id ℚ) (Q.associated) |
| 27 | (fun x y => QuadraticMap.associated_isSymm ℚ Q x y) v |
| 28 | (by simpa only [associated_eq_self_apply] using hv) x x |
| 29 | simpa only [associated_eq_self_apply] using h |
| 30 | |
| 31 | private theorem reflection_sub (Q : QuadraticForm ℚ V) (x y : V) |
| 32 | (hxy : Q x = Q y) (hv : Q (x - y) ≠ 0) : |
| 33 | reflection Q (x - y) hv x = y := by |
| 34 | have hnorm : Q.associated (x - y) (x - y) = |
| 35 | 2 * (Q.associated x x - Q.associated x y) := by |
| 36 | simp only [map_sub, LinearMap.sub_apply] |
| 37 | rw [QuadraticMap.associated_isSymm ℚ Q y x, associated_eq_self_apply, |
| 38 | associated_eq_self_apply, ← hxy] |
| 39 | ring |
| 40 | have hd : Q.associated (x - y) (x - y) ≠ 0 := by |
| 41 | simpa only [associated_eq_self_apply] using hv |
| 42 | have hc : 2 * (Q.associated x (x - y) / |
| 43 | Q.associated (x - y) (x - y)) = 1 := by |
| 44 | rw [map_sub, ← mul_div_assoc] |
| 45 | exact (div_eq_one_iff_eq hd).2 hnorm.symm |
| 46 | change x - (2 * (Q.associated x (x - y) / |
| 47 | Q.associated (x - y) (x - y))) • (x - y) = y |
| 48 | rw [hc, one_smul] |
| 49 | abel |
| 50 | |
| 51 | theorem exists_isometry_map (Q : QuadraticForm ℚ V) (x y : V) |
| 52 | (hxy : Q x = Q y) (hx : Q x ≠ 0) : |
| 53 | ∃ e : Q.IsometryEquiv Q, e x = y := by |
| 54 | by_cases hv : Q (x - y) ≠ 0 |
| 55 | · exact ⟨reflection Q (x - y) hv, reflection_sub Q x y hxy hv⟩ |
| 56 | have hz : Q (x - y) = 0 := not_ne_iff.mp hv |
| 57 | have hp : Q (x - -y) ≠ 0 := by |
| 58 | intro hn |
| 59 | have hm : Q (x - y) + Q (x + y) = 4 * Q x := by |
| 60 | rw [← associated_eq_self_apply ℚ Q (x - y), |
| 61 | ← associated_eq_self_apply ℚ Q (x + y)] |
| 62 | simp only [map_sub, map_add, LinearMap.sub_apply, LinearMap.add_apply] |
| 63 | rw [associated_eq_self_apply, associated_eq_self_apply, ← hxy] |
| 64 | ring |
| 65 | have hn' : Q (x + y) = 0 := by simpa only [sub_neg_eq_add] using hn |
| 66 | rw [hz, hn'] at hm |
| 67 | exact hx (by linarith) |
| 68 | let e : Q.IsometryEquiv Q := reflection Q (x - -y) hp |
| 69 | let neg : Q.IsometryEquiv Q := |
| 70 | { toLinearEquiv := LinearEquiv.neg ℚ |
| 71 | map_app' := Q.map_neg } |
| 72 | refine ⟨e.trans neg, ?_⟩ |
| 73 | have he : e x = -y := reflection_sub Q x (-y) (by simpa using hxy) hp |
| 74 | change -(e x) = y |
| 75 | rw [he, neg_neg] |
| 76 | |
| 77 | /-- A scalar quadratic form, with its coefficient kept explicit. -/ |
| 78 | def scalar (c : ℚ) : QuadraticForm ℚ ℚ := c • QuadraticMap.sq |
| 79 | |
| 80 | @[simp] theorem scalar_apply (c x : ℚ) : scalar c x = c * x ^ 2 := by |
| 81 | simp [scalar, QuadraticMap.sq_apply, pow_two] |
| 82 | |
| 83 | private theorem fst_eq_zero (Q : QuadraticForm ℚ V) (R : QuadraticForm ℚ W) |
| 84 | (c : ℚ) (hc : c ≠ 0) |
| 85 | (e : ((scalar c).prod Q).IsometryEquiv ((scalar c).prod R)) |
| 86 | (he : e (1, 0) = (1, 0)) (x : V) : (e (0, x)).1 = 0 := by |
| 87 | have h0 := e.map_app (0, x) |
| 88 | have h1 := e.map_app ((1, 0) + (0, x)) |
| 89 | rw [map_add, he] at h1 |
| 90 | simp only [prod_apply, scalar_apply, zero_add, map_zero, add_zero, one_pow, |
| 91 | mul_one, Prod.fst_add, Prod.snd_add] at h0 h1 |
| 92 | have hz : c * (e (0, x)).1 = 0 := by nlinarith [h0, h1] |
| 93 | exact (mul_eq_zero.mp hz).resolve_left hc |
| 94 | |
| 95 | theorem cancel_scalar (Q : QuadraticForm ℚ V) (R : QuadraticForm ℚ W) |
| 96 | (c : ℚ) (hc : c ≠ 0) |
| 97 | (h : ((scalar c).prod Q).Equivalent ((scalar c).prod R)) : Q.Equivalent R := by |
| 98 | obtain ⟨e⟩ := h |
| 99 | obtain ⟨r, hr⟩ := exists_isometry_map ((scalar c).prod R) (e (1, 0)) (1, 0) |
| 100 | (by rw [e.map_app]; simp) (by rw [e.map_app]; simpa using hc) |
| 101 | let f := e.trans r |
| 102 | have hf : f (1, 0) = (1, 0) := hr |
| 103 | have hfi : f.symm (1, 0) = (1, 0) := by |
| 104 | rw [← hf, f.symm_apply_apply] |
| 105 | have hf0 := fst_eq_zero Q R c hc f hf |
| 106 | have hfi0 := fst_eq_zero R Q c hc f.symm hfi |
| 107 | refine ⟨{ |
| 108 | toFun := fun x => (f (0, x)).2 |
| 109 | invFun := fun y => (f.symm (0, y)).2 |
| 110 | left_inv := by |
| 111 | intro x |
| 112 | have hpair : (0, (f (0, x)).2) = f (0, x) := by |
| 113 | ext |
| 114 | · exact (hf0 x).symm |
| 115 | · rfl |
| 116 | change (f.symm (0, (f (0, x)).2)).2 = x |
| 117 | rw [hpair, f.symm_apply_apply] |
| 118 | right_inv := by |
| 119 | intro y |
| 120 | have hpair : (0, (f.symm (0, y)).2) = f.symm (0, y) := by |
| 121 | ext |
| 122 | · exact (hfi0 y).symm |
| 123 | · rfl |
| 124 | change (f (0, (f.symm (0, y)).2)).2 = y |
| 125 | rw [hpair, f.apply_symm_apply] |
| 126 | map_add' := by |
| 127 | intro x y |
| 128 | have hpair : ((0 : ℚ), x + y) = (0, x) + (0, y) := by simp |
| 129 | rw [hpair, map_add] |
| 130 | rfl |
| 131 | map_smul' := by |
| 132 | intro a x |
| 133 | have hpair : ((0 : ℚ), a • x) = a • (0, x) := by simp |
| 134 | rw [hpair, map_smul] |
| 135 | rfl |
| 136 | map_app' := by |
| 137 | intro x |
| 138 | have h := f.map_app (0, x) |
| 139 | simpa only [prod_apply, hf0 x, scalar_apply, |
| 140 | zero_pow (by decide : 2 ≠ 0), mul_zero, zero_add] using h }⟩ |
| 141 | |
| 142 | end |
| 143 | |
| 144 | end OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.QuadraticCancellationEq.QuadraticCancellation |