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.PELModuli.IntegralModel.PolynomialEtaleCoordinates |
| 2 | import OAI.AlgebraicGeometry.PELModuli.IntegralModel.DifferentialBasisNeighborhood |
| 3 | import OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.OverPullbackCartesianMap |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.Etale |
| 5 | import Mathlib.AlgebraicGeometry.Morphisms.UniversallyOpen |
| 6 | import Mathlib.RingTheory.Localization.BaseChange |
| 7 | import Mathlib.RingTheory.Smooth.Fiber |
| 8 | |
| 9 | /-! # Etale Smooth -/ |
| 10 | |
| 11 | namespace OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.EtaleSmooth.EtaleSmoothLocus |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | /-! Smoothness descends through an étale source neighborhood. -/ |
| 16 | |
| 17 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry TensorProduct KaehlerDifferential _root_.Module |
| 18 | |
| 19 | /-- Flatness over the original base descends through a faithfully flat extension. -/ |
| 20 | theorem flat_of_faithfullyFlat_tower |
| 21 | (R A B : Type*) [CommRing R] [CommRing A] [CommRing B] |
| 22 | [Algebra R A] [Algebra R B] [Algebra A B] [IsScalarTower R A B] |
| 23 | [Module.FaithfullyFlat A B] [Module.Flat R B] : Module.Flat R A := by |
| 24 | rw [Module.Flat.iff_lTensor_preserves_injective_linearMap] |
| 25 | intro M N _ _ _ _ f hf |
| 26 | change Function.Injective (f.baseChange A) |
| 27 | rw [← Module.FaithfullyFlat.lTensor_injective_iff_injective A B] |
| 28 | intro x y h |
| 29 | apply (AlgebraTensorModule.cancelBaseChange R A B B M).injective |
| 30 | apply Module.Flat.lTensor_preserves_injective_linearMap (M := B) f hf |
| 31 | have hc := AlgebraTensorModule.lTensor_comp_cancelBaseChange R A B (M := B) f |
| 32 | have hcx := DFunLike.congr_fun hc x |
| 33 | have hcy := DFunLike.congr_fun hc y |
| 34 | exact hcx.trans ((congrArg (AlgebraTensorModule.cancelBaseChange R A B B N) h).trans |
| 35 | hcy.symm) |
| 36 | |
| 37 | theorem smooth_of_differential_coordinates_and_etale_cover |
| 38 | (R A B : Type*) [CommRing R] [IsNoetherianRing R] [CommRing A] [CommRing B] |
| 39 | [Algebra R A] [Algebra R B] [Algebra A B] [IsScalarTower R A B] |
| 40 | [Algebra.FiniteType R A] [Module.FaithfullyFlat A B] |
| 41 | [Algebra.Etale A B] [Algebra.Smooth R B] |
| 42 | {ι : Type} [Finite ι] (a : ι → A) (b : Basis ι A Ω[A⁄R]) |
| 43 | (hb : ∀ i, b i = D R A (a i)) : Algebra.Smooth R A := by |
| 44 | let P := MvPolynomial ι R |
| 45 | let φ : P →ₐ[R] A := MvPolynomial.aeval a |
| 46 | let : Algebra P A := φ.toRingHom.toAlgebra |
| 47 | let : Algebra P B := (IsScalarTower.toAlgHom R A B |>.comp φ).toRingHom.toAlgebra |
| 48 | have : IsScalarTower R P A := IsScalarTower.of_algebraMap_eq fun r => (φ.commutes r).symm |
| 49 | have : IsScalarTower P A B := IsScalarTower.of_algebraMap_eq fun _ => rfl |
| 50 | have : IsScalarTower R P B := IsScalarTower.to₁₂₄ R P A B |
| 51 | let c := (b.baseChange B).map (tensorKaehlerEquivOfFormallyEtale R A B) |
| 52 | have hc (i : ι) : c i = D R B (algebraMap P B (MvPolynomial.X i)) := by |
| 53 | simp only [c, Basis.map_apply, Basis.baseChange_apply, |
| 54 | tensorKaehlerEquivOfFormallyEtale_apply, mapBaseChange_tmul, one_smul, hb, map_D] |
| 55 | congr 1 |
| 56 | change algebraMap A B (a i) = algebraMap A B (MvPolynomial.aeval a (MvPolynomial.X i)) |
| 57 | rw [MvPolynomial.aeval_X] |
| 58 | have : Algebra.FormallyEtale P B := |
| 59 | PELModuli.IntegralModel.PolynomialEtaleCoordinates.polynomial_coordinates_formallyEtale R B ι c hc |
| 60 | have : Algebra.FiniteType P A := Algebra.FiniteType.of_restrictScalars_finiteType R P A |
| 61 | have : Algebra.FiniteType P B := Algebra.FiniteType.of_restrictScalars_finiteType R P B |
| 62 | have : Algebra.FinitePresentation P A := Algebra.FinitePresentation.of_finiteType.mp inferInstance |
| 63 | have : Algebra.FinitePresentation P B := Algebra.FinitePresentation.of_finiteType.mp inferInstance |
| 64 | have : Algebra.Etale P B := ⟨inferInstance, inferInstance⟩ |
| 65 | have : Algebra.FormallyUnramified P A := by |
| 66 | constructor |
| 67 | have : Subsingleton (B ⊗[A] Ω[A⁄P]) := |
| 68 | (tensorKaehlerEquivOfFormallyEtale P A B).subsingleton |
| 69 | exact Module.FaithfullyFlat.lTensor_reflects_triviality A B _ |
| 70 | have : Module.Flat P A := flat_of_faithfullyFlat_tower P A B |
| 71 | have : Algebra.Etale P A := Algebra.Etale.of_formallyUnramified_of_flat |
| 72 | have : Algebra.Smooth R P := ⟨inferInstance, inferInstance⟩ |
| 73 | exact Algebra.Smooth.comp R P A |
| 74 | |
| 75 | /-- Smoothness of a finite-type algebra over a noetherian ring descends |
| 76 | through an arbitrary faithfully flat étale algebra. -/ |
| 77 | theorem smooth_algebra_of_etale_cover |
| 78 | (R A B : Type) [CommRing R] [IsNoetherianRing R] [CommRing A] [CommRing B] |
| 79 | [Algebra R A] [Algebra R B] [Algebra A B] [IsScalarTower R A B] |
| 80 | [Algebra.FiniteType R A] [Module.FaithfullyFlat A B] |
| 81 | [Algebra.Etale A B] [Algebra.Smooth R B] : Algebra.Smooth R A := by |
| 82 | have : Algebra.FinitePresentation R A := Algebra.FinitePresentation.of_finiteType.mp inferInstance |
| 83 | have : Module.Flat A Ω[A⁄R] := PELModuli.IntegralModel.SmoothEtaleDifferentials.differentials_flat_of_faithfully_flat_etale_cover R A B |
| 84 | refine ⟨Algebra.smoothLocus_eq_univ_iff.mp (Set.eq_univ_iff_forall.mpr fun p => ?_), inferInstance⟩ |
| 85 | obtain ⟨g, hg, ι, hι, a, b, hb⟩ := PELModuli.IntegralModel.DifferentialBasisNeighborhood.exists_differential_basis_neighborhood R A p.asIdeal |
| 86 | have : Finite ι := hι |
| 87 | let Ag := Localization.Away g |
| 88 | let Bg := Ag ⊗[A] B |
| 89 | let : Algebra B Bg := Algebra.TensorProduct.rightAlgebra |
| 90 | have : IsScalarTower R B Bg := IsScalarTower.to₁₃₄ R A B Bg |
| 91 | have : IsLocalization.Away (algebraMap A B g) Bg := inferInstance |
| 92 | have : Algebra.Smooth B Bg := Algebra.Smooth.of_isLocalization_Away (algebraMap A B g) |
| 93 | have : Algebra.Smooth R Bg := Algebra.Smooth.comp R B Bg |
| 94 | have hs : Algebra.Smooth R Ag := |
| 95 | smooth_of_differential_coordinates_and_etale_cover R Ag Bg |
| 96 | (fun i => algebraMap A Ag (a i)) b hb |
| 97 | exact Algebra.basicOpen_subset_smoothLocus_iff_smooth.mpr hs hg |
| 98 | |
| 99 | theorem smooth_of_etale_cover_affine |
| 100 | {X Y S : Scheme.{0}} [IsAffine X] [IsAffine Y] [IsAffine S] |
| 101 | [IsLocallyNoetherian S] (q : X ⟶ Y) (f : Y ⟶ S) |
| 102 | [Etale q] [Surjective q] [LocallyOfFiniteType f] [Smooth (q ≫ f)] : Smooth f := by |
| 103 | let R := Γ(S, ⊤) |
| 104 | let A := Γ(Y, ⊤) |
| 105 | let B := Γ(X, ⊤) |
| 106 | let : Algebra R A := f.appTop.hom.toAlgebra |
| 107 | let : Algebra A B := q.appTop.hom.toAlgebra |
| 108 | let : Algebra R B := (q.appTop.hom.comp f.appTop.hom).toAlgebra |
| 109 | have : IsScalarTower R A B := IsScalarTower.of_algebraMap_eq fun _ => rfl |
| 110 | have : Module.FaithfullyFlat A B := |
| 111 | (Flat.flat_and_surjective_iff_faithfullyFlat_of_isAffine q).mp ⟨inferInstance, inferInstance⟩ |
| 112 | have : Algebra.Etale A B := HasRingHomProperty.appTop (P := @Etale) q inferInstance |
| 113 | have : Algebra.FiniteType R A := |
| 114 | HasRingHomProperty.appTop (P := @LocallyOfFiniteType) f inferInstance |
| 115 | have : IsNoetherianRing R := IsLocallyNoetherian.component_noetherian ⟨⊤, isAffineOpen_top S⟩ |
| 116 | have : Algebra.Smooth R B := HasRingHomProperty.appTop (P := @Smooth) (q ≫ f) inferInstance |
| 117 | have h : f.appTop.hom.Smooth := smooth_algebra_of_etale_cover R A B |
| 118 | have : Smooth (Spec.map f.appTop) := (HasRingHomProperty.Spec_iff (P := @Smooth)).mpr h |
| 119 | have heq : f = Y.isoSpec.hom ≫ Spec.map f.appTop ≫ S.isoSpec.inv := by |
| 120 | rw [← Category.assoc, Scheme.isoSpec_hom_naturality, Category.assoc, |
| 121 | Iso.hom_inv_id, Category.comp_id] |
| 122 | rw [heq] |
| 123 | infer_instance |
| 124 | |
| 125 | theorem image_mem_smoothLocus_affine |
| 126 | {X Y S : Scheme.{0}} [IsAffine X] [IsAffine Y] [IsAffine S] |
| 127 | [IsLocallyNoetherian S] (q : X ⟶ Y) (f : Y ⟶ S) |
| 128 | [Etale q] [LocallyOfFiniteType f] [Smooth (q ≫ f)] (x : X) : |
| 129 | q x ∈ f.smoothLocus := by |
| 130 | obtain ⟨_, ⟨V, hV, rfl⟩, hxV, hVr⟩ := |
| 131 | Y.isBasis_affineOpens.exists_subset_of_mem_open |
| 132 | (Set.mem_range_self x) q.isOpenMap.isOpen_range |
| 133 | change Y.Opens at V |
| 134 | have : IsAffine V := hV |
| 135 | have : IsAffine (q ⁻¹ᵁ V).toScheme := hV.preimage q |
| 136 | have : Surjective (q ∣_ V) := by |
| 137 | constructor |
| 138 | intro y |
| 139 | obtain ⟨z, hz⟩ := hVr y.property |
| 140 | refine ⟨⟨z, ?_⟩, ?_⟩ |
| 141 | · change q z ∈ V |
| 142 | simpa only [hz] using y.property |
| 143 | · apply Subtype.ext |
| 144 | simpa only [← Scheme.Hom.resLE_eq_morphismRestrict, |
| 145 | Scheme.Hom.coe_resLE_apply] using hz |
| 146 | have : Smooth ((q ∣_ V) ≫ V.ι ≫ f) := by |
| 147 | rw [← Category.assoc, morphismRestrict_ι, Category.assoc] |
| 148 | infer_instance |
| 149 | have : Smooth (V.ι ≫ f) := smooth_of_etale_cover_affine (q ∣_ V) (V.ι ≫ f) |
| 150 | have h : (⟨q x, hxV⟩ : V) ∈ (V.ι ≫ f).smoothLocus := by |
| 151 | rw [Scheme.Hom.smoothLocus_eq_top] |
| 152 | trivial |
| 153 | rwa [← Scheme.Hom.preimage_smoothLocus_eq V.ι f] at h |
| 154 | |
| 155 | /-- A smooth étale source neighborhood maps into the target's actual smooth locus. -/ |
| 156 | theorem image_mem_smoothLocus |
| 157 | {X Y S : Scheme.{0}} [IsAffine S] [IsLocallyNoetherian S] |
| 158 | (q : X ⟶ Y) (f : Y ⟶ S) [Etale q] [LocallyOfFiniteType f] |
| 159 | [Smooth (q ≫ f)] (x : X) : q x ∈ f.smoothLocus := by |
| 160 | obtain ⟨_, ⟨V, hV, rfl⟩, hxV, _⟩ := |
| 161 | Y.isBasis_affineOpens.exists_subset_of_mem_open (Set.mem_univ (q x)) isOpen_univ |
| 162 | change Y.Opens at V |
| 163 | obtain ⟨_, ⟨W, hW, rfl⟩, hxW, hWV⟩ := |
| 164 | X.isBasis_affineOpens.exists_subset_of_mem_open hxV (q ⁻¹ᵁ V).isOpen |
| 165 | change X.Opens at W |
| 166 | change W ≤ q ⁻¹ᵁ V at hWV |
| 167 | have : IsAffine V := hV |
| 168 | have : IsAffine W := hW |
| 169 | have : Smooth (q.resLE V W hWV ≫ V.ι ≫ f) := by |
| 170 | rw [← Category.assoc, Scheme.Hom.resLE_comp_ι, Category.assoc] |
| 171 | infer_instance |
| 172 | have h := image_mem_smoothLocus_affine (q.resLE V W hWV) (V.ι ≫ f) ⟨x, hxW⟩ |
| 173 | rw [← Scheme.Hom.preimage_smoothLocus_eq V.ι f] at h |
| 174 | change (q.resLE V W hWV ⟨x, hxW⟩).val ∈ f.smoothLocus at h |
| 175 | simpa only [Scheme.Hom.coe_resLE_apply] using h |
| 176 | |
| 177 | theorem smooth_on_smoothLocus |
| 178 | {X S : Scheme.{0}} (f : X ⟶ S) [LocallyOfFinitePresentation f] : |
| 179 | Smooth (f.smoothLocus.ι ≫ f) := by |
| 180 | apply Scheme.Hom.smoothLocus_eq_top_iff.mp |
| 181 | rw [← Scheme.Hom.preimage_smoothLocus_eq] |
| 182 | exact top_le_iff.mp fun x _ => x.property |
| 183 | |
| 184 | /-- Étale maps pull back the smooth locus exactly. Both sides use the formal |
| 185 | smoothness of the actual morphisms on local rings, including nilpotents. -/ |
| 186 | theorem preimage_smoothLocus_eq |
| 187 | {X Y S : Scheme.{0}} [IsAffine S] [IsLocallyNoetherian S] |
| 188 | (q : X ⟶ Y) (f : Y ⟶ S) [Etale q] [LocallyOfFiniteType f] : |
| 189 | q ⁻¹ᵁ f.smoothLocus = (q ≫ f).smoothLocus := by |
| 190 | ext x |
| 191 | constructor |
| 192 | · intro hx |
| 193 | change (f.stalkMap (q x)).hom.FormallySmooth at hx |
| 194 | have hq : (q.stalkMap x).hom.FormallySmooth := by |
| 195 | have h : x ∈ q.smoothLocus := by |
| 196 | rw [Scheme.Hom.smoothLocus_eq_top] |
| 197 | trivial |
| 198 | exact h |
| 199 | change (((q ≫ f).stalkMap x : |
| 200 | S.presheaf.stalk (f (q x)) ⟶ X.presheaf.stalk x)).hom.FormallySmooth |
| 201 | rw [Scheme.Hom.stalkMap_comp] |
| 202 | exact hx.comp hq |
| 203 | · intro hx |
| 204 | let U := (q ≫ f).smoothLocus |
| 205 | have : Smooth (U.ι ≫ (q ≫ f)) := smooth_on_smoothLocus (q ≫ f) |
| 206 | have : Smooth ((U.ι ≫ q) ≫ f) := by |
| 207 | simpa only [Category.assoc] using (inferInstance : Smooth (U.ι ≫ (q ≫ f))) |
| 208 | exact image_mem_smoothLocus (U.ι ≫ q) f ⟨x, hx⟩ |
| 209 | |
| 210 | /-- The two images of a point in an étale span are simultaneously smooth. -/ |
| 211 | theorem mem_smoothLocus_iff_of_etale_span |
| 212 | {S : Scheme.{0}} [IsAffine S] [IsLocallyNoetherian S] |
| 213 | {U X : Over S} (p q : U ⟶ X) [Etale p.left] [Etale q.left] |
| 214 | [LocallyOfFiniteType X.hom] (u : U.left) : |
| 215 | p.left u ∈ X.hom.smoothLocus ↔ q.left u ∈ X.hom.smoothLocus := by |
| 216 | change u ∈ p.left ⁻¹ᵁ X.hom.smoothLocus ↔ u ∈ q.left ⁻¹ᵁ X.hom.smoothLocus |
| 217 | rw [EtaleSmoothLocus.preimage_smoothLocus_eq p.left X.hom, EtaleSmoothLocus.preimage_smoothLocus_eq q.left X.hom] |
| 218 | simp only [p.w, q.w] |
| 219 | |
| 220 | instance locallyOfFiniteType_overPullback |
| 221 | {S T : Scheme.{0}} (b : T ⟶ S) (X : Over S) [LocallyOfFiniteType X.hom] : |
| 222 | LocallyOfFiniteType ((Over.pullback b).obj X).hom := |
| 223 | inferInstanceAs (LocallyOfFiniteType (pullback.snd X.hom b)) |
| 224 | |
| 225 | /-- A point with specified base map gives its original point in the native base change. -/ |
| 226 | def baseChangePoint {S T : Scheme.{0}} (b : T ⟶ S) {X : Over S} |
| 227 | (x : Over.mk b ⟶ X) : Over.mk (𝟙 T) ⟶ (Over.pullback b).obj X := |
| 228 | Over.homMk (pullback.lift x.left (𝟙 T) (x.w.trans (Category.id_comp b).symm)) |
| 229 | (pullback.lift_snd _ _ _) |
| 230 | |
| 231 | theorem baseChangePoint_comp {S T : Scheme.{0}} (b : T ⟶ S) |
| 232 | {U X : Over S} (u : Over.mk b ⟶ U) (p : U ⟶ X) : |
| 233 | baseChangePoint b (u ≫ p) = baseChangePoint b u ≫ (Over.pullback b).map p := by |
| 234 | apply Over.OverMorphism.ext |
| 235 | change pullback.lift (u.left ≫ p.left) (𝟙 T) _ = |
| 236 | pullback.lift u.left (𝟙 T) _ ≫ |
| 237 | pullback.lift (pullback.fst U.hom b ≫ p.left) (pullback.snd U.hom b) _ |
| 238 | apply pullback.hom_ext <;> |
| 239 | simp only [Category.assoc, pullback.lift_fst, pullback.lift_snd, |
| 240 | pullback.lift_fst_assoc] |
| 241 | |
| 242 | /-- Étale-span invariance after arbitrary base change to an affine noetherian base, |
| 243 | with the two original point maps retained by the pullback universal property. -/ |
| 244 | theorem baseChangePoint_mem_smoothLocus_iff_of_etale_span |
| 245 | {S T : Scheme.{0}} [IsAffine T] [IsLocallyNoetherian T] (b : T ⟶ S) |
| 246 | {U X : Over S} (p q : U ⟶ X) [Etale p.left] [Etale q.left] |
| 247 | [LocallyOfFiniteType X.hom] (u : Over.mk b ⟶ U) (t : T) : |
| 248 | (baseChangePoint b (u ≫ p)).left t ∈ ((Over.pullback b).obj X).hom.smoothLocus ↔ |
| 249 | (baseChangePoint b (u ≫ q)).left t ∈ ((Over.pullback b).obj X).hom.smoothLocus := by |
| 250 | have : Etale ((Over.pullback b).map p).left := |
| 251 | MorphismProperty.of_isPullback (OverPullbackCartesianMap.overPullback_map_isPullback b p).flip inferInstance |
| 252 | have : Etale ((Over.pullback b).map q).left := |
| 253 | MorphismProperty.of_isPullback (OverPullbackCartesianMap.overPullback_map_isPullback b q).flip inferInstance |
| 254 | rw [baseChangePoint_comp b u p, baseChangePoint_comp b u q] |
| 255 | exact mem_smoothLocus_iff_of_etale_span ((Over.pullback b).map p) |
| 256 | ((Over.pullback b).map q) ((baseChangePoint b u).left t) |
| 257 | |
| 258 | end |
| 259 | |
| 260 | end OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.EtaleSmooth.EtaleSmoothLocus |