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.RingTheory.Spectrum.Prime.FreeLocus |
| 2 | import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.Finite |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.Flat |
| 5 | import Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation |
| 6 | |
| 7 | /-! # Source Trivialization Top -/ |
| 8 | |
| 9 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.SourceTrivializationTop.Construction.SourceTrivialization |
| 10 | |
| 11 | /-! |
| 12 | # Local bases for the finite locally free subgroup |
| 13 | |
| 14 | The finite-free source assumption in the affine quotient construction is |
| 15 | available locally on the base of a finite, flat, finitely presented morphism. |
| 16 | We extract explicit principal-open denominators and finite bases. |
| 17 | -/ |
| 18 | |
| 19 | open _root_.Module _root_.AlgebraicGeometry |
| 20 | |
| 21 | universe u v |
| 22 | |
| 23 | /-- A finite flat finitely presented module has a finite basis on a principal |
| 24 | neighborhood of each prime. -/ |
| 25 | theorem exists_basis_away |
| 26 | {R : Type u} {M : Type v} [CommRing R] [AddCommGroup M] [Module R M] |
| 27 | [Module.Finite R M] [Module.Flat R M] [Module.FinitePresentation R M] |
| 28 | (p : PrimeSpectrum R) : |
| 29 | ∃ r ∉ p.asIdeal, ∃ n : ℕ, |
| 30 | Nonempty (Basis (Fin n) (Localization.Away r) (LocalizedModule.Away r M)) := by |
| 31 | let Rₚ := Localization.AtPrime p.asIdeal |
| 32 | let Mₚ := LocalizedModule.AtPrime p.asIdeal M |
| 33 | have : Module.Free Rₚ Mₚ := Module.free_of_flat_of_isLocalRing |
| 34 | have : Module.Finite Rₚ Mₚ := inferInstance |
| 35 | obtain ⟨r, hr, b, _⟩ := Module.FinitePresentation.exists_basis_localizedModule_powers |
| 36 | p.asIdeal.primeCompl (LocalizedModule.mkLinearMap p.asIdeal.primeCompl M) Rₚ |
| 37 | (Module.finBasis Rₚ Mₚ) |
| 38 | exact ⟨r, hr, Module.finrank Rₚ Mₚ, ⟨b⟩⟩ |
| 39 | |
| 40 | /-- The principal opens carrying finite bases cover the entire spectrum. -/ |
| 41 | theorem basis_denominators_span_top |
| 42 | {R : Type u} {M : Type v} [CommRing R] [AddCommGroup M] [Module R M] |
| 43 | [Module.Finite R M] [Module.Flat R M] [Module.FinitePresentation R M] : |
| 44 | Ideal.span {r : R | ∃ n : ℕ, |
| 45 | Nonempty (Basis (Fin n) (Localization.Away r) (LocalizedModule.Away r M))} = ⊤ := by |
| 46 | by_contra h |
| 47 | obtain ⟨P, hP, hle⟩ := Ideal.exists_le_maximal _ h |
| 48 | obtain ⟨r, hr, hb⟩ := exists_basis_away (M := M) ⟨P, hP.isPrime⟩ |
| 49 | exact hr (hle (Ideal.subset_span hb)) |
| 50 | |
| 51 | /-- A basis of the localized module gives a basis of any corresponding |
| 52 | localized algebra, using its actual ring of scalars. -/ |
| 53 | noncomputable def algebraBasis |
| 54 | {R A R₁ A₁ : Type*} [CommRing R] [CommRing A] [CommRing R₁] [CommRing A₁] |
| 55 | [Algebra R A] [Algebra R R₁] [Algebra A A₁] [Algebra R A₁] [Algebra R₁ A₁] |
| 56 | [IsScalarTower R A A₁] [IsScalarTower R R₁ A₁] |
| 57 | (r : R) [IsLocalization.Away r R₁] |
| 58 | [IsLocalization.Away (algebraMap R A r) A₁] |
| 59 | [Module R₁ (LocalizedModule.Away r A)] |
| 60 | [IsScalarTower R R₁ (LocalizedModule.Away r A)] |
| 61 | {ι : Type*} (b : Basis ι R₁ (LocalizedModule.Away r A)) : Basis ι R₁ A₁ := by |
| 62 | have : IsLocalization (Algebra.algebraMapSubmonoid A (Submonoid.powers r)) A₁ := by |
| 63 | rw [Algebra.algebraMapSubmonoid_powers] |
| 64 | infer_instance |
| 65 | let e := IsLocalizedModule.linearEquiv (Submonoid.powers r) |
| 66 | (LocalizedModule.mkLinearMap (Submonoid.powers r) A) |
| 67 | (IsScalarTower.toAlgHom R A A₁).toLinearMap |
| 68 | exact b.map (e.extendScalarsOfIsLocalization (Submonoid.powers r) R₁) |
| 69 | |
| 70 | /-- The hypotheses on the finite locally free subgroup give the needed local |
| 71 | bases of its affine coordinate algebra over every affine base. -/ |
| 72 | theorem affine_morphism_exists_basis_away |
| 73 | {X S : Scheme.{u}} [IsAffine S] (f : X ⟶ S) |
| 74 | [IsFinite f] [Flat f] [LocallyOfFinitePresentation f] |
| 75 | (p : PrimeSpectrum Γ(S, ⊤)) : |
| 76 | letI := f.appTop.hom.toAlgebra |
| 77 | ∃ r ∉ p.asIdeal, ∃ n : ℕ, |
| 78 | Nonempty (Basis (Fin n) (Localization.Away r) (LocalizedModule.Away r Γ(X, ⊤))) := by |
| 79 | let := f.appTop.hom.toAlgebra |
| 80 | have : IsAffine X := isAffine_of_isAffineHom f |
| 81 | have : Module.Finite Γ(S, ⊤) Γ(X, ⊤) := f.finite_appTop |
| 82 | have : Module.Flat Γ(S, ⊤) Γ(X, ⊤) := f.flat_appTop |
| 83 | have : Algebra.FinitePresentation Γ(S, ⊤) Γ(X, ⊤) := f.finitePresentation_appTop |
| 84 | have : Module.FinitePresentation Γ(S, ⊤) Γ(X, ⊤) := |
| 85 | Module.FinitePresentation.of_finite_of_finitePresentation Γ(S, ⊤) Γ(X, ⊤) |
| 86 | exact exists_basis_away p |
| 87 | |
| 88 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.SourceTrivializationTop.Construction.SourceTrivialization |