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.FiniteQuadraticOf |
| 2 | import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic |
| 3 | |
| 4 | /-! # Finite Quadratic Odd -/ |
| 5 | |
| 6 | namespace OAI.RepresentationTheory.Weil.Local |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Odd-characteristic quadratic Gauss sums. -/ |
| 11 | |
| 12 | open scoped Classical |
| 13 | |
| 14 | def FiniteQuadraticOdd.Construction.complexQuadraticChar (F : Type*) [Field F] [Fintype F] : MulChar F ℂ := |
| 15 | (quadraticChar F).ringHomComp (Int.castRingHom ℂ) |
| 16 | |
| 17 | theorem FiniteQuadraticOdd.Construction.sum_square_eq_gaussSum |
| 18 | {F : Type*} [Field F] [Fintype F] |
| 19 | (hF : ringChar F ≠ 2) (ψ : AddChar F ℂ) (hψ : ψ ≠ 1) : |
| 20 | (∑ x, ψ (x ^ 2)) = gaussSum (FiniteQuadraticOdd.Construction.complexQuadraticChar F) ψ := by |
| 21 | have hcard (y : F) : ((Finset.univ.filter (fun x : F => x ^ 2 = y)).card : ℂ) = |
| 22 | FiniteQuadraticOdd.Construction.complexQuadraticChar F y + 1 := by |
| 23 | have h := quadraticChar_card_sqrts hF y |
| 24 | have hs : {x : F | x ^ 2 = y}.toFinset = Finset.univ.filter (fun x : F => x ^ 2 = y) := by |
| 25 | ext x |
| 26 | simp |
| 27 | rw [hs] at h |
| 28 | change _ = (quadraticChar F y : ℂ) + 1 |
| 29 | exact_mod_cast h |
| 30 | calc |
| 31 | _ = ∑ y, ((Finset.univ.filter (fun x : F => x ^ 2 = y)).card : ℂ) * ψ y := by |
| 32 | simpa only [Finset.sum_const, nsmul_eq_mul] using |
| 33 | (Finset.sum_fiberwise' Finset.univ (fun x : F => x ^ 2) (fun y => ψ y)).symm |
| 34 | _ = ∑ y, FiniteQuadraticOdd.Construction.complexQuadraticChar F y * ψ y + ∑ y, ψ y := by |
| 35 | simp only [hcard, add_mul, one_mul, Finset.sum_add_distrib] |
| 36 | _ = _ := by rw [AddChar.sum_eq_zero_of_ne_one hψ, add_zero]; rfl |
| 37 | |
| 38 | theorem FiniteQuadraticOdd.Construction.phase_sum_square_fourth |
| 39 | {F : Type*} [Field F] [Fintype F] |
| 40 | (hF : ringChar F ≠ 2) (ψ : AddChar F ℂ) : |
| 41 | FunctionsMetaplectic.Construction.phase (∑ x, ψ (x ^ 2)) ^ 4 = 1 := by |
| 42 | by_cases hψ : ψ = 1 |
| 43 | · simp [hψ, FunctionsMetaplectic.Construction.phase, Fintype.card_ne_zero] |
| 44 | · rw [FiniteQuadraticOdd.Construction.sum_square_eq_gaussSum hF ψ hψ] |
| 45 | have hχ : FiniteQuadraticOdd.Construction.complexQuadraticChar F ≠ 1 := by |
| 46 | exact (MulChar.ringHomComp_ne_one_iff (f := Int.castRingHom ℂ) Int.cast_injective).mpr |
| 47 | (quadraticChar_ne_one hF) |
| 48 | have hquad : (FiniteQuadraticOdd.Construction.complexQuadraticChar F).IsQuadratic := |
| 49 | (quadraticChar_isQuadratic F).comp (Int.castRingHom ℂ) |
| 50 | have hs := gaussSum_sq hχ hquad (AddChar.IsPrimitive.of_ne_one hψ) |
| 51 | have hsign : FiniteQuadraticOdd.Construction.complexQuadraticChar F (-1) ^ 2 = 1 := by |
| 52 | change (quadraticChar F (-1) : ℂ) ^ 2 = 1 |
| 53 | exact_mod_cast (quadraticChar_sq_one (F := F) (neg_ne_zero.mpr one_ne_zero)) |
| 54 | have hfour : gaussSum (FiniteQuadraticOdd.Construction.complexQuadraticChar F) ψ ^ 4 = (Fintype.card F : ℂ) ^ 2 := by |
| 55 | rw [show (4 : ℕ) = 2 * 2 from rfl, pow_mul, hs, mul_pow, hsign, one_mul] |
| 56 | apply FiniteQuadraticOf.Construction.phase_pow_of_positive_power _ 4 ((Fintype.card F : ℝ) ^ 2) |
| 57 | (sq_pos_of_pos (Nat.cast_pos.mpr Fintype.card_pos)) |
| 58 | exact_mod_cast hfour |
| 59 | |
| 60 | theorem FiniteQuadratic.Construction.QuadraticCharacter.polar_half {A : Type*} [AddCommGroup A] (q : FiniteQuadratic.Construction.QuadraticCharacter A) |
| 61 | (y : A) : q (2 • y) = q.polar (2 • y) y := by |
| 62 | rw [q.map_nsmul, q.polar.map_nsmul_eq_pow, AddChar.pow_apply, q.polar_self] |
| 63 | norm_num |
| 64 | ring |
| 65 | |
| 66 | theorem FiniteQuadratic.Construction.QuadraticCharacter.polar_zmod {p : ℕ} [NeZero p] (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod p)) (x y : ZMod p) : |
| 67 | q.polar x y = q.polar 1 (x * y) := by |
| 68 | have hx : x.val • (1 : ZMod p) = x := by simp [nsmul_eq_mul] |
| 69 | calc |
| 70 | _ = q.polar (x.val • (1 : ZMod p)) y := by rw [hx] |
| 71 | _ = q.polar 1 (x.val • y) := by |
| 72 | rw [q.polar.map_nsmul_eq_pow, AddChar.pow_apply, (q.polar 1).map_nsmul_eq_pow] |
| 73 | _ = _ := by congr 1; simp [nsmul_eq_mul] |
| 74 | |
| 75 | theorem FiniteQuadratic.Construction.QuadraticCharacter.zmod_as_square_character (p : ℕ) [Fact p.Prime] (hp : p ≠ 2) |
| 76 | (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod p)) : ∃ ψ : AddChar (ZMod p) ℂ, ∀ x, q x = ψ (x ^ 2) := by |
| 77 | let ψ := (q.polar 1).mulShift ((2 : ZMod p)⁻¹) |
| 78 | have h2 : (2 : ZMod p) ≠ 0 := Ring.two_ne_zero (by rwa [ZMod.ringChar_zmod_n]) |
| 79 | refine ⟨ψ, fun x => ?_⟩ |
| 80 | have hx : 2 • (x / 2) = x := by |
| 81 | rw [two_nsmul] |
| 82 | field_simp |
| 83 | ring |
| 84 | have h := q.polar_half (x / 2) |
| 85 | rw [hx, q.polar_zmod] at h |
| 86 | rw [h] |
| 87 | change q.polar 1 (x * (x / 2)) = q.polar 1 ((2 : ZMod p)⁻¹ * x ^ 2) |
| 88 | congr 1 |
| 89 | ring |
| 90 | |
| 91 | theorem FiniteQuadratic.Construction.QuadraticCharacter.phase_gauss_zmod_odd (p : ℕ) [Fact p.Prime] (hp : p ≠ 2) |
| 92 | (q : FiniteQuadratic.Construction.QuadraticCharacter (ZMod p)) : FunctionsMetaplectic.Construction.phase q.gauss ^ 4 = 1 := by |
| 93 | obtain ⟨ψ, hψ⟩ := q.zmod_as_square_character p hp |
| 94 | simp only [FiniteQuadratic.Construction.QuadraticCharacter.gauss, hψ] |
| 95 | exact FiniteQuadraticOdd.Construction.phase_sum_square_fourth (by rwa [ZMod.ringChar_zmod_n]) ψ |
| 96 | |
| 97 | end |
| 98 | |
| 99 | end OAI.RepresentationTheory.Weil.Local |