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.GenericFlatness |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.Finite |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation |
| 4 | import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation |
| 5 | |
| 6 | /-! # Generic Flatness -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.FormalGeometry.Completion.Finite.GenericFlatness.Construction |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Actual nonempty flat opens for finite morphisms. |
| 13 | The local and scheme arguments are adapted from AffineFlatOpen, |
| 14 | AffineFiberFlatness, and SchemeGenericFlatness with explicit universes. |
| 15 | Only the standalone, audited generic-freeness module is imported. -/ |
| 16 | |
| 17 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 18 | open scoped TensorProduct |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | /-- A finite, locally finitely presented affine morphism gives a finitely |
| 23 | presented module on global sections. -/ |
| 24 | theorem finitePresentation_module_appTop |
| 25 | {X Y : Scheme.{u}} (f : X ⟶ Y) [IsAffine Y] |
| 26 | [IsFinite f] [LocallyOfFinitePresentation f] : |
| 27 | let : Algebra Γ(Y, ⊤) Γ(X, ⊤) := f.appTop.hom.toAlgebra |
| 28 | Module.FinitePresentation Γ(Y, ⊤) Γ(X, ⊤) := by |
| 29 | let : Algebra Γ(Y, ⊤) Γ(X, ⊤) := f.appTop.hom.toAlgebra |
| 30 | have : IsAffine X := isAffine_of_isAffineHom f |
| 31 | have : Module.Finite Γ(Y, ⊤) Γ(X, ⊤) := f.finite_appTop |
| 32 | have : Algebra.FinitePresentation Γ(Y, ⊤) Γ(X, ⊤) := f.finitePresentation_appTop |
| 33 | exact Module.FinitePresentation.of_finite_of_finitePresentation _ _ |
| 34 | |
| 35 | /-- A surjective affine morphism with finite-presentation algebra module over |
| 36 | a nonzero reduced base is flat on some nonempty source open. -/ |
| 37 | theorem exists_nonempty_flat_source_open_affine_of_reduced |
| 38 | (R B : Type u) [CommRing R] [_root_.IsReduced R] [Nontrivial R] |
| 39 | [CommRing B] [Algebra R B] |
| 40 | [Module.FinitePresentation R B] |
| 41 | [Surjective (Spec.map (CommRingCat.ofHom (algebraMap R B)))] : |
| 42 | ∃ U : (Spec (.of B)).Opens, (U : Set (Spec (.of B))).Nonempty ∧ |
| 43 | Flat (U.ι ≫ Spec.map (CommRingCat.ofHom (algebraMap R B))) := by |
| 44 | obtain ⟨r, hnontriv, hflat⟩ := ArithmeticGeometry.OrdinaryLocus.Openness.GenericFlatness.Construction.exists_nontrivial_flat_affine_baseChange_of_reduced R B |
| 45 | let Rr := Localization.Away r |
| 46 | let f := Spec.map (CommRingCat.ofHom (algebraMap R B)) |
| 47 | let i := Spec.map (CommRingCat.ofHom (algebraMap R Rr)) |
| 48 | let j := pullback.snd i f |
| 49 | have : IsOpenImmersion i := by |
| 50 | dsimp [i, Rr] |
| 51 | infer_instance |
| 52 | have : IsOpenImmersion j := by |
| 53 | dsimp [j] |
| 54 | infer_instance |
| 55 | have : Flat (Spec.map (CommRingCat.ofHom (algebraMap Rr (Rr ⊗[R] B)))) := hflat |
| 56 | have : Flat (pullback.fst i f) := by |
| 57 | rw [← pullbackSpecIso_hom_fst' R Rr B] |
| 58 | infer_instance |
| 59 | have : Flat (j ≫ f) := by |
| 60 | change Flat (pullback.snd i f ≫ f) |
| 61 | rw [← pullback.condition] |
| 62 | infer_instance |
| 63 | have : Nontrivial Rr := hnontriv |
| 64 | have : Surjective (pullback.fst i f) := by |
| 65 | dsimp [f] |
| 66 | infer_instance |
| 67 | have : Nonempty ↥(pullback i f) := |
| 68 | (pullback.fst i f).surjective.nonempty |
| 69 | refine ⟨j.opensRange, ?_, ?_⟩ |
| 70 | · obtain ⟨z⟩ := ‹Nonempty ↥(pullback i f)› |
| 71 | exact ⟨j z, ⟨z, rfl⟩⟩ |
| 72 | · rw [← j.isoOpensRange_inv_comp, Category.assoc] |
| 73 | infer_instance |
| 74 | |
| 75 | /-- Finite generic flatness on an arbitrary nonempty reduced affine target. -/ |
| 76 | theorem exists_nonempty_flat_source_open_of_isAffine |
| 77 | {X Y : Scheme.{u}} (f : X ⟶ Y) [IsAffine Y] [IsReduced Y] [Nonempty Y] |
| 78 | [IsFinite f] [LocallyOfFinitePresentation f] [Surjective f] : |
| 79 | ∃ U : X.Opens, (U : Set X).Nonempty ∧ Flat (U.ι ≫ f) := by |
| 80 | have : IsAffine X := isAffine_of_isAffineHom f |
| 81 | have : Nonempty (⊤ : Y.Opens) := ⟨⟨Classical.choice inferInstance, trivial⟩⟩ |
| 82 | have : Nontrivial Γ(Y, ⊤) := inferInstance |
| 83 | let : Algebra Γ(Y, ⊤) Γ(X, ⊤) := f.appTop.hom.toAlgebra |
| 84 | have : Module.FinitePresentation Γ(Y, ⊤) Γ(X, ⊤) := |
| 85 | finitePresentation_module_appTop f |
| 86 | have : Surjective (Spec.map f.appTop) := |
| 87 | (MorphismProperty.arrow_mk_iso_iff @Surjective (arrowIsoSpecΓOfIsAffine f)).mp |
| 88 | inferInstance |
| 89 | have : Surjective (Spec.map (CommRingCat.ofHom (algebraMap Γ(Y, ⊤) Γ(X, ⊤)))) := |
| 90 | inferInstanceAs (Surjective (Spec.map f.appTop)) |
| 91 | obtain ⟨V, hV, hfV⟩ := |
| 92 | exists_nonempty_flat_source_open_affine_of_reduced Γ(Y, ⊤) Γ(X, ⊤) |
| 93 | have : Flat (V.ι ≫ Spec.map f.appTop) := hfV |
| 94 | let j := V.ι ≫ X.isoSpec.inv |
| 95 | have : IsOpenImmersion j := by dsimp [j]; infer_instance |
| 96 | have : Flat (j ≫ f) := by |
| 97 | dsimp [j] |
| 98 | rw [Category.assoc, ← Scheme.isoSpec_inv_naturality, ← Category.assoc] |
| 99 | infer_instance |
| 100 | refine ⟨j.opensRange, ?_, ?_⟩ |
| 101 | · obtain ⟨z, hz⟩ := hV |
| 102 | exact ⟨j ⟨z, hz⟩, ⟨⟨z, hz⟩, rfl⟩⟩ |
| 103 | · rw [← j.isoOpensRange_inv_comp, Category.assoc] |
| 104 | infer_instance |
| 105 | |
| 106 | /-- A finite surjective morphism of finite presentation over a nonempty |
| 107 | reduced scheme is flat on a nonempty open subset of its source. -/ |
| 108 | theorem exists_nonempty_flat_source_open_of_reduced |
| 109 | {X Y : Scheme.{u}} (f : X ⟶ Y) [IsReduced Y] [Nonempty Y] |
| 110 | [IsFinite f] [LocallyOfFinitePresentation f] [Surjective f] : |
| 111 | ∃ U : X.Opens, (U : Set X).Nonempty ∧ Flat (U.ι ≫ f) := by |
| 112 | let y : Y := Classical.choice inferInstance |
| 113 | let i := Y.affineCover.idx y |
| 114 | let g := Y.affineCover.f i |
| 115 | have : Nonempty (Y.affineCover.X i) := by |
| 116 | obtain ⟨z, _⟩ := Y.affineCover.covers y |
| 117 | exact ⟨z⟩ |
| 118 | let f' := pullback.snd f g |
| 119 | have : IsReduced (Y.affineCover.X i) := inferInstance |
| 120 | obtain ⟨V, hV, hfV⟩ := exists_nonempty_flat_source_open_of_isAffine f' |
| 121 | let j := V.ι ≫ pullback.fst f g |
| 122 | have : IsOpenImmersion j := by dsimp [j, g]; infer_instance |
| 123 | have : Flat (V.ι ≫ f') := hfV |
| 124 | have : Flat (j ≫ f) := by |
| 125 | dsimp [j] |
| 126 | rw [Category.assoc, pullback.condition, ← Category.assoc] |
| 127 | change Flat ((V.ι ≫ f') ≫ g) |
| 128 | infer_instance |
| 129 | refine ⟨j.opensRange, ?_, ?_⟩ |
| 130 | · obtain ⟨z, hz⟩ := hV |
| 131 | exact ⟨j ⟨z, hz⟩, ⟨⟨z, hz⟩, rfl⟩⟩ |
| 132 | · rw [← j.isoOpensRange_inv_comp, Category.assoc] |
| 133 | infer_instance |
| 134 | |
| 135 | end |
| 136 | |
| 137 | end OAI.AlgebraicGeometry.FormalGeometry.Completion.Finite.GenericFlatness.Construction |