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.HilbertConstruction.Open.ParameterPoints |
| 2 | import Mathlib.RingTheory.Spectrum.Prime.FreeLocus |
| 3 | import Mathlib.AlgebraicGeometry.ResidueField |
| 4 | import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure |
| 5 | |
| 6 | /-! # Flat Module Rank Open -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.FlatModuleRankOpen |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! The geometric rank of a finitely presented flat module is represented |
| 13 | by its actual clopen rank locus on every test scheme. No reducedness or |
| 14 | finiteness condition is imposed on the tests. -/ |
| 15 | |
| 16 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 17 | open scoped TensorProduct |
| 18 | |
| 19 | variable {R : Type} [CommRing R] (V : Type) [AddCommGroup V] [Module R V] |
| 20 | [Module.Flat R V] [Module.FinitePresentation R V] |
| 21 | |
| 22 | def flatModuleRankOpen (r : ℕ) : (Spec (.of R)).Opens := |
| 23 | ⟨{p | Module.rankAtStalk (R := R) V p = r}, |
| 24 | (Module.isLocallyConstant_rankAtStalk (R := R) (M := V)).isOpen_fiber r⟩ |
| 25 | |
| 26 | theorem flatModuleRankOpen_isClosed (r : ℕ) : |
| 27 | IsClosed (flatModuleRankOpen (R := R) V r : Set (Spec (.of R))) := |
| 28 | (Module.isLocallyConstant_rankAtStalk (R := R) (M := V)).isClopen_fiber r |>.1 |
| 29 | |
| 30 | theorem flatModule_field_fiber_rank {k : Type} [Field k] (f : Spec (.of k) ⟶ Spec (.of R)) : |
| 31 | letI : Algebra R k := (Spec.preimage f).hom.toAlgebra |
| 32 | Module.finrank k (k ⊗[R] V) = |
| 33 | Module.rankAtStalk (R := R) V (f (IsLocalRing.closedPoint k)) := by |
| 34 | let φ := (Spec.preimage f).hom |
| 35 | let : Algebra R k := φ.toAlgebra |
| 36 | have h := Module.rankAtStalk_baseChange (R := R) (M := V) (S := k) (IsLocalRing.closedPoint k) |
| 37 | rw [Module.rankAtStalk_eq_finrank_of_free] at h |
| 38 | have he : Spec.map (CommRingCat.ofHom φ) = f := Spec.map_preimage f |
| 39 | exact h.trans (congrArg (Module.rankAtStalk (R := R) V) |
| 40 | (congrArg (fun q : Spec (.of k) ⟶ Spec (.of R) => q (IsLocalRing.closedPoint k)) he)) |
| 41 | |
| 42 | theorem flatModuleRankOpen_classifies (r : ℕ) {T : Scheme.{0}} (f : T ⟶ Spec (.of R)) : |
| 43 | (∀ (k : Type) [Field k] [IsAlgClosed k] (p : Spec (.of k) ⟶ T), |
| 44 | letI : Algebra R k := (Spec.preimage (p ≫ f)).hom.toAlgebra |
| 45 | Module.finrank k (k ⊗[R] V) = r) ↔ |
| 46 | ∃! q : T ⟶ (flatModuleRankOpen (R := R) V r).toScheme, |
| 47 | q ≫ (flatModuleRankOpen (R := R) V r).ι = f := by |
| 48 | let U := flatModuleRankOpen (R := R) V r |
| 49 | constructor |
| 50 | · intro h |
| 51 | have hrange : Set.range f ⊆ Set.range U.ι := by |
| 52 | rw [Scheme.Opens.range_ι] |
| 53 | rintro _ ⟨t, rfl⟩ |
| 54 | let k := AlgebraicClosure (T.residueField t) |
| 55 | let p : Spec (.of k) ⟶ T := |
| 56 | Spec.map (CommRingCat.ofHom (algebraMap (T.residueField t) k)) ≫ T.fromSpecResidueField t |
| 57 | have hp : p (IsLocalRing.closedPoint k) = t := T.fromSpecResidueField_apply t _ |
| 58 | have hr := (flatModule_field_fiber_rank V (p ≫ f)).symm.trans (h k p) |
| 59 | change Module.rankAtStalk (R := R) V (f t) = r |
| 60 | change Module.rankAtStalk (R := R) V (f (p (IsLocalRing.closedPoint k))) = r at hr |
| 61 | rw [hp] at hr |
| 62 | exact hr |
| 63 | let q := IsOpenImmersion.lift U.ι f hrange |
| 64 | have hq : q ≫ U.ι = f := IsOpenImmersion.lift_fac U.ι f hrange |
| 65 | exact ⟨q, hq, fun v hv => (cancel_mono U.ι).mp (hv.trans hq.symm)⟩ |
| 66 | · rintro ⟨q, hq, _⟩ k _ _ p |
| 67 | apply (flatModule_field_fiber_rank V (p ≫ f)).trans |
| 68 | have he : f (p (IsLocalRing.closedPoint k)) = (q (p (IsLocalRing.closedPoint k))).val := |
| 69 | (congrArg (fun m : T ⟶ Spec (.of R) => m (p (IsLocalRing.closedPoint k))) hq).symm |
| 70 | change Module.rankAtStalk (R := R) V (f (p (IsLocalRing.closedPoint k))) = r |
| 71 | rw [he] |
| 72 | exact (q (p (IsLocalRing.closedPoint k))).property |
| 73 | |
| 74 | end |
| 75 | |
| 76 | end OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.FlatModuleRankOpen |