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