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.CycleClass.Thom.SemilocalPID |
| 2 | import OAI.AlgebraicGeometry.CycleClass.Thom.Normalization.Length |
| 3 | import Mathlib.RingTheory.Ideal.Norm.RelNorm |
| 4 | |
| 5 | /-! # Semilocal Length -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.CycleClass.Thom.SemilocalLength.Constructions |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! |
| 12 | # ThomClass: residue-weighted lengths over a possibly singular local base |
| 13 | |
| 14 | A finite Dedekind algebra over a local ring can have several branches. |
| 15 | The length of its quotient by a nonzero ideal is the sum of the residue |
| 16 | degrees of its prime factors, with repetition. The base need not be normal. |
| 17 | -/ |
| 18 | |
| 19 | open IsLocalRing UniqueFactorizationMonoid |
| 20 | open scoped Classical |
| 21 | |
| 22 | variable {R S : Type*} [CommRing R] [CommRing S] |
| 23 | [IsLocalRing R] [IsDedekindDomain S] [Algebra R S] [Module.Finite R S] |
| 24 | |
| 25 | theorem length_quotient_prime (P : Ideal S) (hP : Prime P) : |
| 26 | Module.length R (S ⧸ P) = (P.inertiaDeg R : ℕ∞) := by |
| 27 | let : P.IsMaximal := (Ideal.isPrime_of_prime hP).isMaximal hP.ne_zero |
| 28 | have hunder : P.under R = maximalIdeal R := eq_maximalIdeal inferInstance |
| 29 | let : P.LiesOver (maximalIdeal R) := |
| 30 | hunder ▸ inferInstanceAs (P.LiesOver (P.under R)) |
| 31 | let : Field (R ⧸ maximalIdeal R) := Ideal.Quotient.field _ |
| 32 | let : Module.Finite (R ⧸ maximalIdeal R) (S ⧸ P) := |
| 33 | Module.Finite.of_restrictScalars_finite R (R ⧸ maximalIdeal R) (S ⧸ P) |
| 34 | rw [Ideal.inertiaDeg_eq_of_isMaximal (maximalIdeal R) P, |
| 35 | Module.length_eq_of_surjective (R := R ⧸ maximalIdeal R) (S := R) |
| 36 | (M := S ⧸ P) Ideal.Quotient.mk_surjective, |
| 37 | Module.length_eq_finrank] |
| 38 | |
| 39 | theorem length_quotient_ideal_mul (I J : Ideal S) (hJ : J ≠ ⊥) : |
| 40 | Module.length R (S ⧸ I * J) = |
| 41 | Module.length R (S ⧸ I) + Module.length R (S ⧸ J) := by |
| 42 | let : IsPrincipalIdealRing S := SemilocalPID.Constructions.isPrincipalIdealRing R S |
| 43 | have hJn : Submodule.IsPrincipal.generator J ≠ 0 := |
| 44 | fun h => hJ ((Submodule.IsPrincipal.eq_bot_iff_generator_eq_zero J).mpr h) |
| 45 | have h := Normalization.Length.Constructions.length_quotient_mul (R := R) |
| 46 | (Submodule.IsPrincipal.generator I) (Submodule.IsPrincipal.generator J) hJn |
| 47 | rw [← Ideal.span_singleton_mul_span_singleton, |
| 48 | Ideal.span_singleton_generator, Ideal.span_singleton_generator] at h |
| 49 | exact h |
| 50 | |
| 51 | /-- Each prime factor contributes the degree of its actual residue field. |
| 52 | Repeated factors count the order of vanishing at that branch. -/ |
| 53 | theorem length_quotient_eq_sum (I : Ideal S) (hI : I ≠ ⊥) : |
| 54 | Module.length R (S ⧸ I) = |
| 55 | (((normalizedFactors I).map (fun P => P.inertiaDeg R)).sum : ℕ) := by |
| 56 | have hprod : ∀ l : Multiset (Ideal S), (∀ P ∈ l, Prime P) → |
| 57 | Module.length R (S ⧸ l.prod) = |
| 58 | ((l.map (fun P => P.inertiaDeg R)).sum : ℕ) := by |
| 59 | intro l |
| 60 | induction l using Multiset.induction_on with |
| 61 | | empty => |
| 62 | intro _ |
| 63 | simp only [Multiset.prod_zero, Multiset.map_zero, Multiset.sum_zero, |
| 64 | Nat.cast_zero] |
| 65 | have htop : (1 : Ideal S) = ⊤ := Ideal.one_eq_top |
| 66 | exact (show Module.length R (S ⧸ (1 : Ideal S)) = 0 from by |
| 67 | rw [htop] |
| 68 | exact Module.length_eq_zero) |
| 69 | | @cons P l ih => |
| 70 | intro h |
| 71 | have hlnz : l.prod ≠ (0 : Ideal S) := |
| 72 | Multiset.prod_ne_zero (fun h0 => (h 0 (Multiset.mem_cons_of_mem h0)).ne_zero rfl) |
| 73 | rw [Multiset.prod_cons, length_quotient_ideal_mul P l.prod hlnz, |
| 74 | length_quotient_prime P (h P (Multiset.mem_cons_self P l)), |
| 75 | ih (fun Q hQ => h Q (Multiset.mem_cons_of_mem hQ)), |
| 76 | Multiset.map_cons, Multiset.sum_cons, Nat.cast_add] |
| 77 | have hfactor : (normalizedFactors I).prod = I := by |
| 78 | simpa only [normalize_eq] using prod_normalizedFactors_eq hI |
| 79 | have h := hprod (normalizedFactors I) prime_of_normalized_factor |
| 80 | rw [hfactor] at h |
| 81 | exact h |
| 82 | |
| 83 | end |
| 84 | |
| 85 | end OAI.AlgebraicGeometry.CycleClass.Thom.SemilocalLength.Constructions |