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.Finite.ConstantScheme |
| 2 | import Mathlib.RingTheory.TotallySplit |
| 3 | import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.Flat |
| 5 | |
| 6 | /-! # Etale Splitting At -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.EtaleSplittingAt.EtaleSplitting |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Finite etale algebras give constructed splitting covers of their |
| 13 | actual affine schemes. No global torsion trivialization is supplied. -/ |
| 14 | |
| 15 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 16 | open scoped TensorProduct |
| 17 | |
| 18 | variable (R B : Type) [CommRing R] [CommRing B] [Algebra R B] |
| 19 | |
| 20 | def affineOver : Over (Spec (.of R)) := |
| 21 | Over.mk (Spec.map (CommRingCat.ofHom (algebraMap R B))) |
| 22 | |
| 23 | def affineAlgIso {C : Type} [CommRing C] [Algebra R C] (e : B ≃ₐ[R] C) : |
| 24 | affineOver R C ≅ affineOver R B := |
| 25 | Over.isoMk (Scheme.Spec.mapIso e.toRingEquiv.toCommRingCatIso.op) (by |
| 26 | change Spec.map (CommRingCat.ofHom e.toRingHom) ≫ |
| 27 | Spec.map (CommRingCat.ofHom (algebraMap R B)) = |
| 28 | Spec.map (CommRingCat.ofHom (algebraMap R C)) |
| 29 | rw [← Spec.map_comp] |
| 30 | apply congrArg Spec.map |
| 31 | apply CommRingCat.hom_ext |
| 32 | exact RingHom.ext (fun r => e.commutes r)) |
| 33 | |
| 34 | def constantAffineIso (n : ℕ) : |
| 35 | HilbertConstruction.ConstantScheme.Iff.constantScheme (Spec (.of R)) (Fin n) ≅ affineOver R (Fin n → R) := by |
| 36 | let e : (∐ fun _ : Fin n => Spec (.of R)) ≅ Spec (.of (Fin n → R)) := |
| 37 | asIso (sigmaSpec (fun _ : Fin n => CommRingCat.of R)) |
| 38 | refine Over.isoMk e ?_ |
| 39 | apply Sigma.hom_ext |
| 40 | intro i |
| 41 | change Sigma.ι _ i ≫ sigmaSpec (fun _ : Fin n => CommRingCat.of R) ≫ |
| 42 | Spec.map (CommRingCat.ofHom (algebraMap R (Fin n → R))) = |
| 43 | Sigma.ι _ i ≫ Sigma.desc (fun _ : Fin n => 𝟙 (Spec (.of R))) |
| 44 | rw [ι_sigmaSpec_assoc, Sigma.ι_comp_desc, ← Spec.map_comp] |
| 45 | have h : CommRingCat.ofHom (algebraMap R (Fin n → R)) ≫ |
| 46 | CommRingCat.ofHom (Pi.evalRingHom (fun _ : Fin n => R) i) = 𝟙 _ := by |
| 47 | ext r |
| 48 | rfl |
| 49 | rw [h, Spec.map_id] |
| 50 | |
| 51 | variable (T : Type) [CommRing T] [Algebra R T] |
| 52 | |
| 53 | def affineBaseChangeIso : affineOver T (T ⊗[R] B) ≅ |
| 54 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R T)))).obj (affineOver R B) := |
| 55 | Over.isoMk ((pullbackSpecIso R T B).symm ≪≫ pullbackSymmetry _ _) (by |
| 56 | change ((pullbackSpecIso R T B).inv ≫ (pullbackSymmetry _ _).hom) ≫ |
| 57 | pullback.snd _ _ = _ |
| 58 | rw [Category.assoc, pullbackSymmetry_hom_comp_snd] |
| 59 | exact pullbackSpecIso_inv_fst' R T B) |
| 60 | |
| 61 | /-- A finite etale algebra of constant rank acquires a concrete constant |
| 62 | scheme presentation over a constructed finite etale surjective cover. -/ |
| 63 | theorem exists_affine_splitting_cover [Algebra.Etale R B] [Module.Finite R B] |
| 64 | {n : ℕ} (hn : Module.rankAtStalk (R := R) B = n) : |
| 65 | ∃ (T : Type) (_ : CommRing T) (_ : Algebra R T), |
| 66 | let u := Spec.map (CommRingCat.ofHom (algebraMap R T)) |
| 67 | IsFinite u ∧ Etale u ∧ Surjective u ∧ |
| 68 | ∃ r : ℕ, Nonempty |
| 69 | (HilbertConstruction.ConstantScheme.Iff.constantScheme (Spec (.of T)) (Fin r) ≅ (Over.pullback u).obj (affineOver R B)) := by |
| 70 | obtain ⟨T, _, _, hflat, hfinite, hetale, hsplit⟩ := |
| 71 | Algebra.IsFiniteSplit.exists_tensorProduct_of_etale hn |
| 72 | let u := Spec.map (CommRingCat.ofHom (algebraMap R T)) |
| 73 | have huFinite : IsFinite u := |
| 74 | (IsFinite.SpecMap_iff _).mpr (RingHom.finite_algebraMap.mpr hfinite) |
| 75 | have huEtale : Etale u := |
| 76 | (HasRingHomProperty.Spec_iff (P := @Etale)).mpr |
| 77 | (RingHom.etale_algebraMap.mpr hetale) |
| 78 | have huSurj : Surjective u := ⟨PrimeSpectrum.comap_surjective_of_faithfullyFlat⟩ |
| 79 | obtain ⟨r, ⟨e⟩⟩ := hsplit.nonempty_algEquiv_fun |
| 80 | exact ⟨T, inferInstance, inferInstance, huFinite, huEtale, huSurj, r, |
| 81 | ⟨constantAffineIso T r ≪≫ affineAlgIso T (T ⊗[R] B) e ≪≫ affineBaseChangeIso R B T⟩⟩ |
| 82 | |
| 83 | /-- No constant-rank hypothesis is needed locally: first restrict to a |
| 84 | principal open on which rank is constant, then construct the splitting |
| 85 | extension. The resulting etale neighborhood contains the specified point. -/ |
| 86 | theorem exists_etale_splitting_at [Algebra.Etale R B] [Module.Finite R B] |
| 87 | (p : PrimeSpectrum R) : |
| 88 | ∃ (T : Type) (_ : CommRing T) (_ : Algebra R T) (_ : Algebra.Etale R T), |
| 89 | p ∈ Set.range (PrimeSpectrum.comap (algebraMap R T)) ∧ |
| 90 | Algebra.IsFiniteSplit T (T ⊗[R] B) := by |
| 91 | have : Module.FinitePresentation R B := |
| 92 | Module.FinitePresentation.of_finite_of_finitePresentation R B |
| 93 | have hlc := Module.isLocallyConstant_rankAtStalk (R := R) (M := B) |
| 94 | obtain ⟨_, ⟨a, rfl⟩, hp, ha⟩ := PrimeSpectrum.isTopologicalBasis_basic_opens.isOpen_iff.mp |
| 95 | (hlc.isOpen_fiber (Module.rankAtStalk B p)) p rfl |
| 96 | let R' := Localization.Away a |
| 97 | have hrank : Module.rankAtStalk (R := R') (R' ⊗[R] B) = Module.rankAtStalk B p := by |
| 98 | funext q |
| 99 | rw [Module.rankAtStalk_baseChange] |
| 100 | apply ha |
| 101 | change PrimeSpectrum.comap (algebraMap R R') q ∈ (PrimeSpectrum.basicOpen a : Set _) |
| 102 | rw [← PrimeSpectrum.localization_away_comap_range R' a] |
| 103 | exact Set.mem_range_self q |
| 104 | obtain ⟨T, _, _, _, _, _, hsplit⟩ := |
| 105 | Algebra.IsFiniteSplit.exists_tensorProduct_of_etale hrank |
| 106 | let : Algebra R T := ((algebraMap R' T).comp (algebraMap R R')).toAlgebra |
| 107 | have : IsScalarTower R R' T := IsScalarTower.of_algebraMap_eq' rfl |
| 108 | have he : Algebra.Etale R T := Algebra.Etale.comp R R' T |
| 109 | have hsplit' : Algebra.IsFiniteSplit T (T ⊗[R] B) := |
| 110 | Algebra.IsFiniteSplit.of_algEquiv (Algebra.TensorProduct.cancelBaseChange R R' T T B) |
| 111 | obtain ⟨q, hq⟩ : p ∈ Set.range (PrimeSpectrum.comap (algebraMap R R')) := by |
| 112 | rw [PrimeSpectrum.localization_away_comap_range R' a] |
| 113 | exact hp |
| 114 | obtain ⟨t, ht⟩ := |
| 115 | (PrimeSpectrum.comap_surjective_of_faithfullyFlat (A := R') (B := T)) q |
| 116 | refine ⟨T, inferInstance, inferInstance, he, ⟨t, ?_⟩, hsplit'⟩ |
| 117 | change PrimeSpectrum.comap (algebraMap R R') (PrimeSpectrum.comap (algebraMap R' T) t) = p |
| 118 | rw [ht, hq] |
| 119 | |
| 120 | /-- Every point of an affine base has an actual etale neighborhood on |
| 121 | which the given finite etale scheme is a finite constant scheme. -/ |
| 122 | theorem exists_affine_scheme_splitting_at [Algebra.Etale R B] [Module.Finite R B] |
| 123 | (p : Spec (.of R)) : |
| 124 | ∃ (T : Type) (_ : CommRing T) (u : Spec (.of T) ⟶ Spec (.of R)), |
| 125 | Etale u ∧ p ∈ Set.range u ∧ ∃ r : ℕ, Nonempty |
| 126 | (HilbertConstruction.ConstantScheme.Iff.constantScheme (Spec (.of T)) (Fin r) ≅ (Over.pullback u).obj (affineOver R B)) := by |
| 127 | obtain ⟨T, _, _, he, hp, hs⟩ := exists_etale_splitting_at R B p |
| 128 | obtain ⟨r, ⟨e⟩⟩ := hs.nonempty_algEquiv_fun |
| 129 | refine ⟨T, inferInstance, Spec.map (CommRingCat.ofHom (algebraMap R T)), ?_, hp, r, |
| 130 | ⟨constantAffineIso T r ≪≫ affineAlgIso T (T ⊗[R] B) e ≪≫ affineBaseChangeIso R B T⟩⟩ |
| 131 | exact (HasRingHomProperty.Spec_iff (P := @Etale)).mpr |
| 132 | (RingHom.etale_algebraMap.mpr he) |
| 133 | |
| 134 | end |
| 135 | |
| 136 | end OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.EtaleSplittingAt.EtaleSplitting |