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.RepresentationTheory.Weil.Local.FiniteQuadraticCyclic |
| 2 | import Mathlib.Data.Nat.Factorization.Basic |
| 3 | |
| 4 | /-! # Finite Quadratic Dyadic -/ |
| 5 | |
| 6 | namespace OAI.RepresentationTheory.Weil.Local |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | section |
| 11 | |
| 12 | /-! Small dyadic pieces and the two-primary part of a pairing witness. -/ |
| 13 | |
| 14 | open scoped Classical |
| 15 | |
| 16 | variable {A : Type*} [AddCommGroup A] |
| 17 | |
| 18 | theorem FiniteQuadratic.Construction.QuadraticCharacter.nondegenerate_zmod_two (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod 2)) (hq : q 1 ^ 2 ≠ 1) : |
| 19 | q.Nondegenerate := by |
| 20 | intro x hx |
| 21 | have ht := DFunLike.congr_fun hx 1 |
| 22 | fin_cases x |
| 23 | · rfl |
| 24 | · change q.polar 1 1 = 1 at ht |
| 25 | exact False.elim (hq ((q.polar_self 1).symm.trans ht)) |
| 26 | |
| 27 | theorem FiniteQuadratic.Construction.QuadraticCharacter.nondegenerate_zmod_four (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod 4)) (hq : q 1 ^ 4 = -1) : |
| 28 | q.Nondegenerate := by |
| 29 | intro x hx |
| 30 | have ht := DFunLike.congr_fun hx 1 |
| 31 | change q.polar x 1 = 1 at ht |
| 32 | have hpow (m : ℕ) : q.polar (m • (1 : ZMod 4)) 1 = (q 1 ^ 2) ^ m := by |
| 33 | rw [q.polar.map_nsmul_eq_pow, AddChar.pow_apply, q.polar_self] |
| 34 | fin_cases x |
| 35 | · rfl |
| 36 | · change q.polar 1 1 = 1 at ht |
| 37 | have hs : q 1 ^ 2 = 1 := (q.polar_self 1).symm.trans ht |
| 38 | have h := congrArg (fun z : ℂ => z ^ 2) hs |
| 39 | rw [← pow_mul] at h |
| 40 | norm_num [hq] at h |
| 41 | · have hs : q 1 ^ 4 = 1 := by |
| 42 | calc |
| 43 | _ = q.polar (2 • (1 : ZMod 4)) 1 := by rw [hpow, ← pow_mul] |
| 44 | _ = 1 := ht |
| 45 | rw [hq] at hs |
| 46 | norm_num at hs |
| 47 | · have hs : q 1 ^ 6 = 1 := by |
| 48 | calc |
| 49 | _ = q.polar (3 • (1 : ZMod 4)) 1 := by rw [hpow, ← pow_mul] |
| 50 | _ = 1 := ht |
| 51 | have h := congrArg (fun z : ℂ => z ^ 2) hs |
| 52 | have he : q 1 ^ 12 = -1 := by |
| 53 | rw [show (12 : ℕ) = 4 * 3 from rfl, pow_mul, hq] |
| 54 | norm_num |
| 55 | rw [← pow_mul, he] at h |
| 56 | norm_num at h |
| 57 | |
| 58 | theorem FiniteQuadratic.Construction.QuadraticCharacter.radical_value_eq_one [Fintype A] (q : FiniteQuadratic.Construction.QuadraticCharacter A) (hq : q.gauss ≠ 0) |
| 59 | {x : A} (hx : q.polar x = 1) : q x = 1 := by |
| 60 | have hshift := Equiv.sum_comp (Equiv.addLeft x) q |
| 61 | change (∑ y, q (x + y)) = q.gauss at hshift |
| 62 | simp only [q.map_add, hx, AddChar.one_apply, mul_one, ← Finset.mul_sum] at hshift |
| 63 | exact mul_right_cancel₀ hq (hshift.trans (one_mul q.gauss).symm) |
| 64 | |
| 65 | theorem FiniteQuadratic.Construction.QuadraticCharacter.pairing_witness [Fintype A] (q : FiniteQuadratic.Construction.QuadraticCharacter A) (hq : q.gauss ≠ 0) |
| 66 | {x : A} (hx : q x ≠ 1) : ∃ y, q.polar x y ≠ 1 := by |
| 67 | by_contra h |
| 68 | push Not at h |
| 69 | exact hx (q.radical_value_eq_one hq (by ext y; exact h y)) |
| 70 | |
| 71 | theorem FiniteQuadratic.Construction.QuadraticCharacter.two_primary_pairing_witness [Fintype A] (q : FiniteQuadratic.Construction.QuadraticCharacter A) |
| 72 | {x y : A} (hx : 2 • x = 0) (hy : q.polar x y ≠ 1) : |
| 73 | ∃ z : A, ∃ r : ℕ, addOrderOf z = 2 ^ r ∧ q.polar x z = -1 := by |
| 74 | have hb : q.polar x y = -1 := by |
| 75 | have hs : q.polar x y ^ 2 = 1 := by |
| 76 | rw [← AddChar.pow_apply, ← q.polar.map_nsmul_eq_pow, hx] |
| 77 | simp |
| 78 | exact (sq_eq_one_iff.mp hs).resolve_left hy |
| 79 | obtain ⟨r, m, hm, hn⟩ := Nat.exists_eq_two_pow_mul_odd (ne_of_gt (addOrderOf_pos y)) |
| 80 | refine ⟨m • y, r, ?_, ?_⟩ |
| 81 | · rw [addOrderOf_nsmul, hn, Nat.gcd_eq_right (by simp), Nat.mul_div_cancel] |
| 82 | exact hm.pos |
| 83 | · rw [(q.polar x).map_nsmul_eq_pow, hb, hm.neg_one_pow] |
| 84 | |
| 85 | theorem FiniteQuadratic.Construction.QuadraticCharacter.value_pow_twice_order (q : FiniteQuadratic.Construction.QuadraticCharacter A) (x : A) : |
| 86 | q x ^ (2 * addOrderOf x) = 1 := by |
| 87 | have h : q.polar (addOrderOf x • x) x = 1 := by simp |
| 88 | rw [q.polar.map_nsmul_eq_pow, AddChar.pow_apply, q.polar_self, ← pow_mul] at h |
| 89 | exact h |
| 90 | |
| 91 | theorem FiniteQuadratic.Construction.QuadraticCharacter.isotropic_of_large_two_power (q : FiniteQuadratic.Construction.QuadraticCharacter A) {x : A} {r : ℕ} |
| 92 | (hx : addOrderOf x = 2 ^ r) (hr : 3 ≤ r) : ∃ z : A, z ≠ 0 ∧ q z = 1 := by |
| 93 | obtain ⟨s, rfl⟩ := Nat.exists_eq_add_of_le hr |
| 94 | have horder : addOrderOf x = 8 * 2 ^ s := by simpa only [pow_add, Nat.reducePow] using hx |
| 95 | refine ⟨(4 * 2 ^ s) • x, ?_, ?_⟩ |
| 96 | · intro hz |
| 97 | have hd := addOrderOf_dvd_iff_nsmul_eq_zero.mpr hz |
| 98 | rw [horder] at hd |
| 99 | have hh := Nat.le_of_dvd (by positivity : 0 < 4 * 2 ^ s) hd |
| 100 | have hp : 0 < 2 ^ s := by positivity |
| 101 | omega |
| 102 | · rw [q.map_nsmul] |
| 103 | have he : (4 * 2 ^ s) ^ 2 = (2 * addOrderOf x) * 2 ^ s := by rw [horder]; ring |
| 104 | rw [he, pow_mul, q.value_pow_twice_order, one_pow] |
| 105 | |
| 106 | end |
| 107 | |
| 108 | /-! The anisotropic four-element quadratic plane. -/ |
| 109 | |
| 110 | open scoped Classical |
| 111 | |
| 112 | theorem FiniteQuadratic.Construction.QuadraticCharacter.plane_gauss (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod 2 × ZMod 2)) |
| 113 | (h10 : q (1, 0) = -1) (h01 : q (0, 1) = -1) (h11 : q (1, 1) = -1) : |
| 114 | q.gauss = -2 := by |
| 115 | have hu : (Finset.univ : Finset (ZMod 2)) = {0, 1} := by decide |
| 116 | rw [FiniteQuadratic.Construction.QuadraticCharacter.gauss, Fintype.sum_prod_type, hu] |
| 117 | simp only [Finset.sum_insert (by decide : (0 : ZMod 2) ∉ {(1 : ZMod 2)}), Finset.sum_singleton] |
| 118 | have h00 : q (0, 0) = 1 := q.map_zero |
| 119 | rw [h00, h10, h01, h11] |
| 120 | norm_num |
| 121 | |
| 122 | theorem FiniteQuadratic.Construction.QuadraticCharacter.plane_nondegenerate (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod 2 × ZMod 2)) |
| 123 | (h10 : q (1, 0) = -1) (h01 : q (0, 1) = -1) (h11 : q (1, 1) = -1) : |
| 124 | q.Nondegenerate := by |
| 125 | have hb : q.polar (1, 0) (0, 1) = -1 := by |
| 126 | have h := q.map_add (1, 0) (0, 1) |
| 127 | change q (1, 1) = _ at h |
| 128 | rw [h11, h10, h01] at h |
| 129 | simpa using h.symm |
| 130 | have hd1 : q.polar (1, 0) (1, 0) = 1 := by rw [q.polar_self, h10]; norm_num |
| 131 | intro ⟨i, j⟩ h |
| 132 | have ha := DFunLike.congr_fun h (1, 0) |
| 133 | have hc := DFunLike.congr_fun h (0, 1) |
| 134 | fin_cases i <;> fin_cases j |
| 135 | · rfl |
| 136 | · change q.polar (0, 1) (1, 0) = 1 at ha |
| 137 | rw [q.polar_symmetric, hb] at ha |
| 138 | norm_num at ha |
| 139 | · change q.polar (1, 0) (0, 1) = 1 at hc |
| 140 | rw [hb] at hc |
| 141 | norm_num at hc |
| 142 | · change q.polar ((1, 0) + (0, 1)) (1, 0) = 1 at ha |
| 143 | rw [q.polar.map_add_eq_mul, AddChar.mul_apply, hd1, |
| 144 | q.polar_symmetric (0, 1), hb] at ha |
| 145 | norm_num at ha |
| 146 | |
| 147 | variable {A B : Type*} [AddCommGroup A] [AddCommGroup B] |
| 148 | |
| 149 | def FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom (x : A) (hx : 2 • x = 0) : ZMod 2 →+ A := |
| 150 | ZMod.lift 2 ⟨zmultiplesHom A x, by simpa only [zmultiplesHom_apply, natCast_zsmul] using hx⟩ |
| 151 | |
| 152 | theorem FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom_one (x : A) (hx : 2 • x = 0) : FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom x hx 1 = x := by |
| 153 | simpa only [FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom, Int.cast_one, zmultiplesHom_apply, one_zsmul] using! |
| 154 | (ZMod.lift_coe 2 ⟨zmultiplesHom A x, by |
| 155 | simpa only [zmultiplesHom_apply, natCast_zsmul] using hx⟩ 1) |
| 156 | |
| 157 | def FiniteQuadratic.Construction.QuadraticCharacter.planeHom (x y : A) (hx : 2 • x = 0) (hy : 2 • y = 0) : ZMod 2 × ZMod 2 →+ A := |
| 158 | ((FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom x hx).comp (AddMonoidHom.fst _ _)) + |
| 159 | ((FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom y hy).comp (AddMonoidHom.snd _ _)) |
| 160 | |
| 161 | theorem FiniteQuadratic.Construction.QuadraticCharacter.planeHom_values (x y : A) (hx : 2 • x = 0) (hy : 2 • y = 0) : |
| 162 | FiniteQuadratic.Construction.QuadraticCharacter.planeHom x y hx hy (1, 0) = x ∧ FiniteQuadratic.Construction.QuadraticCharacter.planeHom x y hx hy (0, 1) = y ∧ |
| 163 | FiniteQuadratic.Construction.QuadraticCharacter.planeHom x y hx hy (1, 1) = x + y := by |
| 164 | simp [FiniteQuadratic.Construction.QuadraticCharacter.planeHom, FiniteQuadratic.Construction.QuadraticCharacter.cyclicTwoHom_one] |
| 165 | |
| 166 | theorem FiniteQuadratic.Construction.QuadraticCharacter.injective_of_pullback_nondegenerate (q : FiniteQuadratic.Construction.QuadraticCharacter B) (f : A →+ B) |
| 167 | (h : (q.pullback f).Nondegenerate) : Function.Injective f := by |
| 168 | intro x y hxy |
| 169 | apply sub_eq_zero.mp |
| 170 | apply h |
| 171 | ext z |
| 172 | change q.polar (f (x - y)) (f z) = 1 |
| 173 | rw [map_sub, hxy, sub_self, q.polar.map_zero_eq_one, AddChar.one_apply] |
| 174 | |
| 175 | def FiniteQuadratic.Construction.QuadraticCharacter.rangeEquiv (f : A →+ B) (hf : Function.Injective f) : A ≃+ f.range := |
| 176 | AddEquiv.ofBijective f.rangeRestrict ⟨fun _ _ h => hf (congrArg Subtype.val h), by |
| 177 | rintro ⟨y, x, rfl⟩ |
| 178 | exact ⟨x, rfl⟩⟩ |
| 179 | |
| 180 | theorem FiniteQuadratic.Construction.QuadraticCharacter.anisotropic_plane_subgroup (q : FiniteQuadratic.Construction.QuadraticCharacter A) {x y : A} |
| 181 | (hx : 2 • x = 0) (hy : 2 • y = 0) (hqx : q x = -1) (hqy : q y = -1) |
| 182 | (hb : q.polar x y = -1) : |
| 183 | ∃ H : AddSubgroup A, Nontrivial H ∧ (q.restrict H).Nondegenerate ∧ |
| 184 | ∀ [Fintype H], FunctionsMetaplectic.Construction.phase (q.restrict H).gauss ^ 8 = 1 := by |
| 185 | let f := FiniteQuadratic.Construction.QuadraticCharacter.planeHom x y hx hy |
| 186 | let p := q.pullback f |
| 187 | have hv := FiniteQuadratic.Construction.QuadraticCharacter.planeHom_values x y hx hy |
| 188 | have h10 : p (1, 0) = -1 := by change q (f (1, 0)) = -1; rw [hv.1, hqx] |
| 189 | have h01 : p (0, 1) = -1 := by change q (f (0, 1)) = -1; rw [hv.2.1, hqy] |
| 190 | have h11 : p (1, 1) = -1 := by |
| 191 | change q (f (1, 1)) = -1 |
| 192 | rw [hv.2.2, q.map_add, hqx, hqy, hb] |
| 193 | norm_num |
| 194 | have hp := p.plane_nondegenerate h10 h01 h11 |
| 195 | have hf := q.injective_of_pullback_nondegenerate f hp |
| 196 | let e := FiniteQuadratic.Construction.QuadraticCharacter.rangeEquiv f hf |
| 197 | have he : (q.restrict f.range).pullback e.toAddMonoidHom = p := rfl |
| 198 | refine ⟨f.range, e.injective.nontrivial, ?_, ?_⟩ |
| 199 | · exact ((q.restrict f.range).nondegenerate_pullback e).mp (by rwa [he]) |
| 200 | · intro _ |
| 201 | rw [← (q.restrict f.range).gauss_pullback e, he, p.plane_gauss h10 h01 h11] |
| 202 | norm_num [FunctionsMetaplectic.Construction.phase] |
| 203 | |
| 204 | end |
| 205 | |
| 206 | end OAI.RepresentationTheory.Weil.Local |