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.ArithmeticGeometry.OrdinaryLocus.Openness.SmoothRegular |
| 2 | import Mathlib.RingTheory.Etale.Kaehler |
| 3 | import Mathlib.RingTheory.Spectrum.Prime.FreeLocus |
| 4 | import Mathlib.RingTheory.Etale.Field |
| 5 | import Mathlib.RingTheory.Kaehler.TensorProduct |
| 6 | import Mathlib.RingTheory.Jacobson.Ring |
| 7 | |
| 8 | /-! # Cotangent Dimension -/ |
| 9 | |
| 10 | namespace OAI.ArithmeticGeometry.OrdinaryLocus.Openness.CotangentDimension.Construction |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | /-! Cotangent spaces and ranks of differentials in the Openness dimension argument. -/ |
| 15 | |
| 16 | open IsLocalRing KaehlerDifferential |
| 17 | open scoped TensorProduct |
| 18 | |
| 19 | /-- At a point with formally etale residue field, the cotangent space of a |
| 20 | formally smooth algebra is the residue fiber of its differentials. -/ |
| 21 | def cotangentSpaceEquivTensorKaehler |
| 22 | (K B : Type*) [CommRing K] [CommRing B] [Algebra K B] [IsLocalRing B] |
| 23 | [Algebra.FormallySmooth K B] [Algebra.FormallyEtale K (ResidueField B)] : |
| 24 | CotangentSpace B ≃ₗ[ResidueField B] ResidueField B ⊗[B] Ω[B⁄K] := by |
| 25 | have hsurj : Function.Surjective (algebraMap B (ResidueField B)) := residue_surjective |
| 26 | have hinj : Function.Injective (kerCotangentToTensor K B (ResidueField B)) := |
| 27 | (Algebra.FormallySmooth.kerCotangentToTensor_injective_iff hsurj).mpr inferInstance |
| 28 | have honto : Function.Surjective (kerCotangentToTensor K B (ResidueField B)) := by |
| 29 | rw [← LinearMap.range_eq_top, range_kerCotangentToTensor K B (ResidueField B) hsurj] |
| 30 | rw [Subsingleton.elim (mapBaseChange K B (ResidueField B)) 0, LinearMap.ker_zero] |
| 31 | rfl |
| 32 | let e : CotangentSpace B ≃ₗ[B] ResidueField B ⊗[B] Ω[B⁄K] := |
| 33 | Ideal.Cotangent.equivOfEq _ _ (by rw [ResidueField.algebraMap_eq, ker_residue]) ≪≫ₗ |
| 34 | LinearEquiv.ofBijective (kerCotangentToTensor K B (ResidueField B)) ⟨hinj, honto⟩ |
| 35 | exact e.extendScalarsOfSurjective hsurj |
| 36 | |
| 37 | /-- A regular local smooth algebra with etale residue field has dimension |
| 38 | equal to the rank of the fiber of its differentials. -/ |
| 39 | theorem ringKrullDim_eq_finrank_tensorKaehler |
| 40 | (K B : Type*) [CommRing K] [CommRing B] [Algebra K B] |
| 41 | [IsRegularLocalRing B] [Algebra.FormallySmooth K B] |
| 42 | [Algebra.FormallyEtale K (ResidueField B)] : |
| 43 | ringKrullDim B = (Module.finrank (ResidueField B) |
| 44 | (ResidueField B ⊗[B] Ω[B⁄K]) : WithBot ℕ∞) := by |
| 45 | rw [← (IsRegularLocalRing.iff_finrank_cotangentSpace B).mp inferInstance, |
| 46 | (cotangentSpaceEquivTensorKaehler K B).finrank_eq] |
| 47 | |
| 48 | /-- At a prime with etale residue field, a smooth algebra over a regular |
| 49 | ring has local dimension equal to the rank of its differentials. -/ |
| 50 | theorem ringKrullDim_localization_eq_rankAtStalk_kaehler |
| 51 | (K B : Type*) [CommRing K] [CommRing B] [Algebra K B] |
| 52 | [IsRegularRing K] [Algebra.Smooth K B] |
| 53 | (p : Ideal B) [hp : p.IsPrime] |
| 54 | [Algebra.FormallyEtale K (ResidueField (Localization.AtPrime p))] : |
| 55 | ringKrullDim (Localization.AtPrime p) = |
| 56 | (Module.rankAtStalk Ω[B⁄K] ⟨p, hp⟩ : WithBot ℕ∞) := by |
| 57 | have : IsRegularRing B := SmoothRegular.Construction.isRegularRing_of_smooth K B |
| 58 | let Bp := Localization.AtPrime p |
| 59 | have : Module.Free Bp Ω[Bp⁄K] := Module.free_of_flat_of_isLocalRing |
| 60 | rw [ringKrullDim_eq_finrank_tensorKaehler K Bp, Module.finrank_baseChange] |
| 61 | rw [Module.rankAtStalk_eq_finrank_tensorProduct] |
| 62 | exact congrArg (fun n : ℕ => (n : WithBot ℕ∞)) |
| 63 | (tensorKaehlerEquivOfFormallyEtale K B Bp).finrank_eq.symm |
| 64 | |
| 65 | /-- Over a perfect field this dimension formula applies at every closed point. -/ |
| 66 | theorem ringKrullDim_localization_maximal_eq_rankAtStalk_kaehler |
| 67 | (K B : Type*) [Field K] [PerfectField K] [CommRing B] [Algebra K B] |
| 68 | [Algebra.Smooth K B] (p : Ideal B) [hp : p.IsMaximal] : |
| 69 | ringKrullDim (Localization.AtPrime p) = |
| 70 | (Module.rankAtStalk Ω[B⁄K] ⟨p, hp.isPrime⟩ : WithBot ℕ∞) := by |
| 71 | have : Algebra.FiniteType K p.ResidueField := |
| 72 | (inferInstance : Algebra.FiniteType K B).trans |
| 73 | (inferInstance : Algebra.FiniteType B p.ResidueField) |
| 74 | have : Module.Finite K p.ResidueField := |
| 75 | finite_of_finite_type_of_isJacobsonRing K p.ResidueField |
| 76 | have : Algebra.FormallyEtale K p.ResidueField := |
| 77 | Algebra.FormallyEtale.of_isSeparable K p.ResidueField |
| 78 | exact ringKrullDim_localization_eq_rankAtStalk_kaehler K B p |
| 79 | |
| 80 | /-- Differential rank in a smooth family is locally constant. -/ |
| 81 | theorem isLocallyConstant_rankAtStalk_kaehler |
| 82 | (R B : Type*) [CommRing R] [CommRing B] [Algebra R B] [Algebra.Smooth R B] : |
| 83 | IsLocallyConstant (Module.rankAtStalk (R := B) Ω[B⁄R]) := |
| 84 | Module.isLocallyConstant_rankAtStalk |
| 85 | |
| 86 | /-- Formation of differential rank commutes with arbitrary base change. -/ |
| 87 | theorem rankAtStalk_kaehler_baseChange |
| 88 | (R S B C : Type*) [CommRing R] [CommRing S] [CommRing B] [CommRing C] |
| 89 | [Algebra R S] [Algebra R B] [Algebra R C] [Algebra S C] [Algebra B C] |
| 90 | [IsScalarTower R S C] [IsScalarTower R B C] |
| 91 | [Algebra.IsPushout R S B C] [Algebra.Smooth R B] (p : PrimeSpectrum C) : |
| 92 | Module.rankAtStalk Ω[C⁄S] p = |
| 93 | Module.rankAtStalk Ω[B⁄R] (p.comap (algebraMap B C)) := by |
| 94 | rw [← Module.rankAtStalk_eq_of_equiv (tensorKaehlerEquiv R S B C)] |
| 95 | exact Module.rankAtStalk_baseChange p |
| 96 | |
| 97 | end |
| 98 | |
| 99 | end OAI.ArithmeticGeometry.OrdinaryLocus.Openness.CotangentDimension.Construction |