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 |
| 2 | |
| 3 | /-! # Arithmetic -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.PELModuli.CMPoints.Arithmetic |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! |
| 12 | Arithmetic choices for CMPoints. The completion is an actual adic completion, |
| 13 | and the comparison with Q_q commutes with the embeddings in algebraic |
| 14 | closures. Integral embeddings are specified by a commuting square, not by |
| 15 | an ordinary-reduction condition. Existence remains a theorem conclusion. |
| 16 | -/ |
| 17 | |
| 18 | open scoped Classical |
| 19 | |
| 20 | open _root_.NumberField IsDedekindDomain |
| 21 | |
| 22 | def SplitsCompletelyAt (K : Type*) [Field K] [NumberField K] (q : ℕ) : Prop := |
| 23 | Nonempty ((RingOfIntegers K ⧸ |
| 24 | Ideal.span ({(q : RingOfIntegers K)} : Set (RingOfIntegers K))) ≃+* |
| 25 | (Fin (Module.finrank ℚ K) → ZMod q)) |
| 26 | |
| 27 | /-- CM conjugation, explicitly restricted to rational scalars. -/ |
| 28 | def rationalConjugation (E : Type*) [Field E] [NumberField E] [Algebra ℚ E] |
| 29 | [NumberField.IsCMField E] : Gal(E/ℚ) := |
| 30 | (NumberField.IsCMField.complexConj E).restrictScalars ℚ |
| 31 | |
| 32 | /-- A chosen embedding into Qqbar, with the chosen completion literally |
| 33 | identified with Q_q. None of the fields asserts ordinary reduction. -/ |
| 34 | structure QadicChoice (K : Type) [Field K] [NumberField K] |
| 35 | (κ : K →+* ℂ) (q : ℕ) [Fact q.Prime] where |
| 36 | complexClosure : AlgebraicClosure ℚ →+* ℂ |
| 37 | fieldInClosure : K →+* AlgebraicClosure ℚ |
| 38 | complex_compatibility : complexClosure.comp fieldInClosure = κ |
| 39 | iota : AlgebraicClosure ℚ →+* AlgebraicClosure (Padic q) |
| 40 | prime : HeightOneSpectrum (RingOfIntegers K) |
| 41 | liesOver : (q : RingOfIntegers K) ∈ prime.asIdeal |
| 42 | completion : prime.adicCompletion K ≃+* Padic q |
| 43 | completion_continuous : Continuous completion |
| 44 | completion_inverse_continuous : Continuous completion.symm |
| 45 | closure_compatibility : |
| 46 | iota.comp fieldInClosure = |
| 47 | (algebraMap (Padic q) (AlgebraicClosure (Padic q))).comp |
| 48 | (completion.toRingHom.comp (NumberField.FinitePlace.embedding prime)) |
| 49 | integralEmbedding : RingOfIntegers K →+* PadicInt q |
| 50 | integral_compatibility : |
| 51 | PadicInt.Coe.ringHom.comp integralEmbedding = |
| 52 | (completion.toRingHom.comp (NumberField.FinitePlace.embedding prime)).comp |
| 53 | (algebraMap (RingOfIntegers K) K) |
| 54 | |
| 55 | namespace QadicChoice |
| 56 | |
| 57 | variable {K : Type} [Field K] [NumberField K] {κ : K →+* ℂ} |
| 58 | {q : ℕ} [Fact q.Prime] (j : QadicChoice K κ q) |
| 59 | |
| 60 | def residue : RingOfIntegers K →+* ZMod q := |
| 61 | PadicInt.toZMod.comp j.integralEmbedding |
| 62 | |
| 63 | def localCharacter {E : Type} [Field E] [NumberField E] [Algebra ℚ E] (iota : E →+* K) |
| 64 | (τ : E ≃ₐ[ℚ] E) : RingOfIntegers E →+* PadicInt q := |
| 65 | j.integralEmbedding.comp |
| 66 | (NumberField.RingOfIntegers.mapRingHom (iota.comp τ.toRingHom)) |
| 67 | |
| 68 | def residueCharacter {E : Type} [Field E] [NumberField E] [Algebra ℚ E] (iota : E →+* K) |
| 69 | (τ : E ≃ₐ[ℚ] E) (n : ℕ) : RingOfIntegers E →+* ZMod (q ^ n) := |
| 70 | (PadicInt.toZModPow n).comp (j.localCharacter iota τ) |
| 71 | |
| 72 | theorem residueCharacter_compatible {E : Type} [Field E] [NumberField E] [Algebra ℚ E] |
| 73 | (iota : E →+* K) (τ : E ≃ₐ[ℚ] E) (m n : ℕ) (h : m ≤ n) : |
| 74 | (ZMod.castHom (pow_dvd_pow q h) (ZMod (q ^ m))).comp |
| 75 | (j.residueCharacter iota τ n) = j.residueCharacter iota τ m := by |
| 76 | rw [QadicChoice.residueCharacter, ← RingHom.comp_assoc, PadicInt.zmod_cast_comp_toZModPow m n h] |
| 77 | rfl |
| 78 | |
| 79 | /-- The actual prime of E determined by iota composed with τ. -/ |
| 80 | def place {E : Type} [Field E] [NumberField E] [Algebra ℚ E] (iota : E →+* K) |
| 81 | (τ : Gal(E/ℚ)) : HeightOneSpectrum (RingOfIntegers E) where |
| 82 | asIdeal := RingHom.ker (PadicInt.toZMod.comp (j.localCharacter iota τ)) |
| 83 | isPrime := RingHom.ker_isPrime _ |
| 84 | ne_bot := by |
| 85 | intro h |
| 86 | have hq : (q : RingOfIntegers E) ∈ |
| 87 | RingHom.ker (PadicInt.toZMod.comp (j.localCharacter iota τ)) := by |
| 88 | change (PadicInt.toZMod.comp (j.localCharacter iota τ)) q = 0 |
| 89 | simp |
| 90 | rw [h, Ideal.mem_bot] at hq |
| 91 | exact (Nat.cast_ne_zero.mpr (Fact.out : q.Prime).ne_zero) hq |
| 92 | |
| 93 | def residueCoordinates {E : Type} [Field E] [NumberField E] [Algebra ℚ E] |
| 94 | (iota : E →+* K) (n : ℕ) : RingOfIntegers E →+* (Gal(E/ℚ) → ZMod (q ^ n)) where |
| 95 | toFun a τ := j.residueCharacter iota τ n a |
| 96 | map_one' := by ext τ; exact map_one _ |
| 97 | map_mul' a b := by ext τ; exact map_mul _ a b |
| 98 | map_zero' := by ext τ; exact map_zero _ |
| 99 | map_add' a b := by ext τ; exact map_add _ a b |
| 100 | |
| 101 | /-- Literal splitting modulo every q-power, with the embedding labels fixed. |
| 102 | This is an arithmetic conclusion, never a hypothesis about ordinary fibers. -/ |
| 103 | def HasSplitCoordinates {E : Type} [Field E] [NumberField E] [Algebra ℚ E] |
| 104 | (iota : E →+* K) : Prop := |
| 105 | ∀ n : ℕ, Function.Surjective (j.residueCoordinates iota n) ∧ |
| 106 | RingHom.ker (j.residueCoordinates iota n) = |
| 107 | Ideal.span ({(q ^ n : RingOfIntegers E)} : Set (RingOfIntegers E)) |
| 108 | |
| 109 | def projector {E : Type} [Field E] [NumberField E] [Algebra ℚ E] |
| 110 | (iota : E →+* K) (hsplit : j.HasSplitCoordinates iota) |
| 111 | (n : ℕ) (τ : Gal(E/ℚ)) : RingOfIntegers E := |
| 112 | ((hsplit n).1 (Pi.single τ 1)).choose |
| 113 | |
| 114 | theorem projector_coordinates {E : Type} [Field E] [NumberField E] [Algebra ℚ E] |
| 115 | (iota : E →+* K) (hsplit : j.HasSplitCoordinates iota) |
| 116 | (n : ℕ) (τ : Gal(E/ℚ)) : |
| 117 | j.residueCoordinates iota n (j.projector iota hsplit n τ) = Pi.single τ 1 := |
| 118 | ((hsplit n).1 (Pi.single τ 1)).choose_spec |
| 119 | |
| 120 | end QadicChoice |
| 121 | |
| 122 | /-- The exact SplitPrimes input, as a named proposition rather than a theorem stub. -/ |
| 123 | def SplitPrimesInput : Prop := |
| 124 | ∀ (L : Type) [Field L] [NumberField L] [IsGalois ℚ L] |
| 125 | (excluded : Finset ℕ), |
| 126 | Set.Infinite {q : ℕ | q.Prime ∧ q ∉ excluded ∧ SplitsCompletelyAt L q} |
| 127 | |
| 128 | theorem exists_split_prime_above (hSplitPrimes : SplitPrimesInput) |
| 129 | (L : Type) [Field L] [NumberField L] [IsGalois ℚ L] |
| 130 | (excluded : Finset ℕ) (bound : ℕ) : |
| 131 | ∃ q : ℕ, q.Prime ∧ bound < q ∧ q ∉ excluded ∧ SplitsCompletelyAt L q := by |
| 132 | obtain ⟨q, hq, hbound⟩ := Set.infinite_iff_exists_gt.mp (hSplitPrimes L excluded) bound |
| 133 | exact ⟨q, hq.1, hbound, hq.2⟩ |
| 134 | |
| 135 | end |
| 136 | |
| 137 | /-! The exact kernel is forced by surjectivity and the actual cardinality |
| 138 | of the ring of integers modulo an integer. -/ |
| 139 | |
| 140 | open _root_.NumberField |
| 141 | |
| 142 | theorem coordinate_kernel_of_surjective |
| 143 | {E : Type} [Field E] [NumberField E] [Algebra ℚ E] [IsGalois ℚ E] |
| 144 | (m : ℕ) (hm : m ≠ 0) |
| 145 | (φ : RingOfIntegers E →+* (Gal(E/ℚ) → ZMod m)) |
| 146 | (hφ : Function.Surjective φ) : |
| 147 | RingHom.ker φ = Ideal.span ({(m : RingOfIntegers E)} : Set (RingOfIntegers E)) := by |
| 148 | let : NeZero m := ⟨hm⟩ |
| 149 | let I : Ideal (RingOfIntegers E) := Ideal.span {(m : RingOfIntegers E)} |
| 150 | have hI : I ≤ RingHom.ker φ := by |
| 151 | apply Ideal.span_le.mpr |
| 152 | intro x hx |
| 153 | obtain rfl := Set.mem_singleton_iff.mp hx |
| 154 | change φ (m : RingOfIntegers E) = 0 |
| 155 | ext τ |
| 156 | simp |
| 157 | let H (a : RingOfIntegers E) (ha : a ∈ I) : φ a = 0 := hI ha |
| 158 | let F := Ideal.Quotient.lift I φ H |
| 159 | have hcard : Nat.card (RingOfIntegers E ⧸ I) = m ^ Module.finrank ℚ E := by |
| 160 | have h := Ideal.absNorm_span_natCast (S := RingOfIntegers E) m |
| 161 | rw [RingOfIntegers.rank] at h |
| 162 | have hA : (inferInstance : Algebra ℚ E) = |
| 163 | (DivisionRing.toRatAlgebra : Algebra ℚ E) := Subsingleton.elim _ _ |
| 164 | have hdim := congrArg (fun A : Algebra ℚ E => |
| 165 | @Module.finrank ℚ E _ _ (@Algebra.toModule ℚ E _ _ A)) hA |
| 166 | rw [hdim] |
| 167 | exact h |
| 168 | let : Finite (RingOfIntegers E ⧸ I) := |
| 169 | Nat.finite_of_card_ne_zero (hcard ▸ pow_ne_zero _ hm) |
| 170 | have htarget : Nat.card (Gal(E/ℚ) → ZMod m) = m ^ Module.finrank ℚ E := by |
| 171 | rw [Nat.card_fun, Nat.card_eq_fintype_card (α := ZMod m), ZMod.card, |
| 172 | IsGalois.card_aut_eq_finrank] |
| 173 | have hsurj : Function.Surjective F := Ideal.Quotient.lift_surjective_of_surjective I H hφ |
| 174 | have hinj : Function.Injective F := |
| 175 | ((Nat.bijective_iff_surjective_and_card F).mpr |
| 176 | ⟨hsurj, hcard.trans htarget.symm⟩).1 |
| 177 | exact (Ideal.injective_lift_iff H).mp hinj |
| 178 | |
| 179 | end |
| 180 | |
| 181 | end OAI.AlgebraicGeometry.PELModuli.CMPoints.Arithmetic |