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.NumberTheory.NumberField.Basic |
| 2 | import Mathlib.RingTheory.Localization.Integer |
| 3 | import Mathlib.RingTheory.Localization.AsSubring |
| 4 | import Mathlib.RingTheory.Ideal.Quotient.HasFiniteQuotients.Basic |
| 5 | import Mathlib.RingTheory.Ideal.Quotient.HasFiniteQuotients.Norm |
| 6 | import Mathlib.RingTheory.Spectrum.Prime.Topology |
| 7 | import Mathlib.RingTheory.Smooth.NoetherianDescent |
| 8 | |
| 9 | /-! # Fg -/ |
| 10 | |
| 11 | namespace OAI.ArithmeticGeometry.Models.SpreadingOut.Fg.Construction |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | /-! |
| 16 | Arithmetic ingredients for SpreadingOut. These declarations use only proved mathlib |
| 17 | results and do not import the statement specification or any project stubs. |
| 18 | -/ |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | open TensorProduct |
| 23 | open scoped nonZeroDivisors |
| 24 | |
| 25 | /-- A finitely generated subalgebra of a fraction field is contained in the |
| 26 | subalgebra obtained by inverting one nonzero denominator. -/ |
| 27 | theorem fg_subalgebra_le_adjoin_inverse |
| 28 | {R K : Type*} [CommRing R] [IsDomain R] [Field K] |
| 29 | [Algebra R K] [IsFractionRing R K] |
| 30 | (A : Subalgebra R K) (hA : A.FG) : |
| 31 | ∃ d : R, d ≠ 0 ∧ |
| 32 | A ≤ Algebra.adjoin R ({(algebraMap R K d)⁻¹} : Set K) := by |
| 33 | classical |
| 34 | obtain ⟨s, hs⟩ := hA |
| 35 | obtain ⟨d, hd⟩ := |
| 36 | IsLocalization.exist_integer_multiples_of_finset (nonZeroDivisors R) s |
| 37 | have hd0 : (d : R) ≠ 0 := nonZeroDivisors.ne_zero d.property |
| 38 | have hdk : algebraMap R K (d : R) ≠ 0 := |
| 39 | by |
| 40 | intro h |
| 41 | apply hd0 |
| 42 | apply IsFractionRing.injective R K |
| 43 | exact h.trans (map_zero _).symm |
| 44 | refine ⟨d, hd0, ?_⟩ |
| 45 | rw [← hs, Algebra.adjoin_le_iff] |
| 46 | intro x hx |
| 47 | obtain ⟨a, ha⟩ := hd x hx |
| 48 | have heq : x = algebraMap R K a * (algebraMap R K (d : R))⁻¹ := by |
| 49 | rw [ha, Algebra.smul_def, mul_comm (algebraMap R K (d : R)) x, |
| 50 | mul_assoc, mul_inv_cancel₀ hdk, mul_one] |
| 51 | rw [heq] |
| 52 | exact Subalgebra.mul_mem _ (Subalgebra.algebraMap_mem _ a) |
| 53 | (Algebra.subset_adjoin (Set.mem_singleton _)) |
| 54 | |
| 55 | /-- Removing the primes containing a nonzero element removes finitely |
| 56 | many points from the prime spectrum of a ring with finite quotients. -/ |
| 57 | theorem finite_complement_basicOpen |
| 58 | {R : Type*} [CommRing R] [Ring.HasFiniteQuotients R] |
| 59 | (d : R) (hd : d ≠ 0) : |
| 60 | ((PrimeSpectrum.basicOpen d : Set (PrimeSpectrum R))ᶜ).Finite := by |
| 61 | apply (Ring.HasFiniteQuotients.finite_setOfPred_mem d hd).of_injOn |
| 62 | (f := PrimeSpectrum.asIdeal) |
| 63 | · intro p hp |
| 64 | simpa using hp |
| 65 | · intro p _ q _ h |
| 66 | exact PrimeSpectrum.ext h |
| 67 | |
| 68 | /-- A closed subset of an arithmetic spectrum that misses its generic point |
| 69 | consists of finitely many primes. -/ |
| 70 | theorem finite_closed_away_generic |
| 71 | {R : Type*} [CommRing R] [IsDomain R] [Ring.HasFiniteQuotients R] |
| 72 | (Z : Set (PrimeSpectrum R)) (hZ : IsClosed Z) (hη : ⊥ ∉ Z) : Z.Finite := by |
| 73 | classical |
| 74 | obtain ⟨s, rfl⟩ := (PrimeSpectrum.isClosed_iff_zeroLocus Z).mp hZ |
| 75 | obtain ⟨d, hd, hd0⟩ : ∃ d ∈ s, d ≠ 0 := by |
| 76 | by_contra! h |
| 77 | apply hη |
| 78 | intro x hx |
| 79 | exact h x hx |
| 80 | apply (finite_complement_basicOpen d hd0).subset |
| 81 | intro p hp |
| 82 | simpa using hp hd |
| 83 | |
| 84 | /-- A concrete localization subalgebra contains any prescribed finite |
| 85 | collection of coefficients. -/ |
| 86 | theorem fg_subalgebra_le_localization |
| 87 | {R K : Type*} [CommRing R] [IsDomain R] [Field K] |
| 88 | [Algebra R K] [IsFractionRing R K] |
| 89 | (A : Subalgebra R K) (hA : A.FG) : |
| 90 | ∃ (d : R) (_ : d ≠ 0) (hpow : Submonoid.powers d ≤ nonZeroDivisors R), |
| 91 | A ≤ Localization.subalgebra.ofField K (Submonoid.powers d) hpow := by |
| 92 | obtain ⟨d, hd, hle⟩ := fg_subalgebra_le_adjoin_inverse A hA |
| 93 | have hpow : Submonoid.powers d ≤ nonZeroDivisors R := by |
| 94 | rintro x ⟨n, rfl⟩ |
| 95 | exact pow_mem (mem_nonZeroDivisors_iff_ne_zero.mpr hd) n |
| 96 | refine ⟨d, hd, hpow, hle.trans ?_⟩ |
| 97 | apply Algebra.adjoin_le |
| 98 | rintro x (rfl : x = (algebraMap R K d)⁻¹) |
| 99 | change ∃ (a s : R) (_ : s ∈ Submonoid.powers d), |
| 100 | (algebraMap R K d)⁻¹ = algebraMap R K a * (algebraMap R K s)⁻¹ |
| 101 | exact ⟨1, d, Submonoid.mem_powers d, by simp⟩ |
| 102 | |
| 103 | /-- A smooth affine algebra over a fraction field spreads to a smooth |
| 104 | algebra over a localization at one nonzero denominator. -/ |
| 105 | theorem smooth_algebra_model_over_localization |
| 106 | {R K : Type u} [CommRing R] [IsDomain R] [Field K] |
| 107 | [Algebra R K] [IsFractionRing R K] |
| 108 | (B : Type u) [CommRing B] [Algebra K B] [Algebra.Smooth K B] : |
| 109 | ∃ (d : R) (_ : d ≠ 0) (hpow : Submonoid.powers d ≤ nonZeroDivisors R), |
| 110 | let R₀ := Localization.subalgebra.ofField K (Submonoid.powers d) hpow |
| 111 | ∃ (B₀ : Type u) (_ : CommRing B₀) (_ : Algebra R₀ B₀), |
| 112 | Algebra.Smooth R₀ B₀ ∧ Nonempty (B ≃ₐ[K] K ⊗[R₀] B₀) := by |
| 113 | obtain ⟨A, C, hC, hAC, hA, hSmooth, ⟨e⟩⟩ := |
| 114 | Algebra.Smooth.exists_subalgebra_fg R K B |
| 115 | let := hC |
| 116 | let := hAC |
| 117 | let := hSmooth |
| 118 | obtain ⟨d, hd, hpow, hle⟩ := fg_subalgebra_le_localization A hA |
| 119 | let R₀ := Localization.subalgebra.ofField K (Submonoid.powers d) hpow |
| 120 | let : Algebra A R₀ := (Subalgebra.inclusion hle).toAlgebra |
| 121 | let : IsScalarTower A R₀ K := IsScalarTower.of_algebraMap_eq' rfl |
| 122 | refine ⟨d, hd, hpow, R₀ ⊗[A] C, inferInstance, inferInstance, |
| 123 | inferInstance, ?_⟩ |
| 124 | exact ⟨e.trans (Algebra.TensorProduct.cancelBaseChange A R₀ K K C).symm⟩ |
| 125 | |
| 126 | end |
| 127 | |
| 128 | end OAI.ArithmeticGeometry.Models.SpreadingOut.Fg.Construction |