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.CycleClass.Thom.ProperImage.FunctionFields |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.Etale |
| 3 | import Mathlib.RingTheory.Etale.Locus |
| 4 | import Mathlib.RingTheory.Etale.Field |
| 5 | |
| 6 | /-! # Etale Locus -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.CycleClass.Thom.ProperImage.EtaleLocus.Constructions.Construction |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | open _root_.CategoryTheory _root_.AlgebraicGeometry _root_.TopologicalSpace |
| 13 | |
| 14 | universe u |
| 15 | |
| 16 | theorem formallyEtale_respectsIso : RingHom.RespectsIso @RingHom.FormallyEtale := by |
| 17 | have hc : RingHom.StableUnderComposition @RingHom.FormallyEtale := |
| 18 | fun _ _ _ _ _ _ _ _ hf hg => hf.comp hg |
| 19 | apply hc.respectsIso |
| 20 | intro R S _ _ e |
| 21 | let := e.toRingHom.toAlgebra |
| 22 | let : Algebra.Etale R S := RingHom.Etale.of_bijective e.bijective |
| 23 | exact inferInstanceAs (Algebra.FormallyEtale R S) |
| 24 | |
| 25 | theorem formallyEtale_stalkMap_iff {X Y : Scheme.{u}} {f : X ⟶ Y} {x : X} |
| 26 | (U : Y.Opens) (hU : IsAffineOpen U) (V : X.Opens) (hV : IsAffineOpen V) |
| 27 | (hVU : V ≤ f ⁻¹ᵁ U) (hx : x ∈ V) : |
| 28 | letI := (f.appLE U V hVU).hom.toAlgebra |
| 29 | (f.stalkMap x).hom.FormallyEtale ↔ |
| 30 | hV.primeIdealOf ⟨x, hx⟩ ∈ Algebra.etaleLocus Γ(Y, U) Γ(X, V) := by |
| 31 | let := (f.appLE U V hVU).hom.toAlgebra |
| 32 | let p := (hU.primeIdealOf ⟨f x, hVU hx⟩).asIdeal |
| 33 | let q := (hV.primeIdealOf ⟨x, hx⟩).asIdeal |
| 34 | have : q.LiesOver p := |
| 35 | ⟨congr($(IsAffineOpen.comap_primeIdealOf_appLE U hU V hV hVU hx).1).symm⟩ |
| 36 | let := Localization.AtPrime.algebraOfLiesOver p q |
| 37 | trans Algebra.FormallyEtale (Localization.AtPrime p) (Localization.AtPrime q) |
| 38 | · rw [← RingHom.formallyEtale_algebraMap] |
| 39 | exact formallyEtale_respectsIso.arrow_mk_iso_iff |
| 40 | (IsAffineOpen.arrowStalkMapIso f U hU V hV hVU hx) |
| 41 | · exact Algebra.FormallyEtale.iff_restrictScalars.symm |
| 42 | |
| 43 | /-- Formal etaleness at a stalk spreads to a genuine affine etale |
| 44 | neighborhood for a morphism locally of finite presentation. -/ |
| 45 | theorem exists_etale_of_formallyEtale_stalk {X Y : Scheme.{u}} |
| 46 | (f : X ⟶ Y) [LocallyOfFinitePresentation f] |
| 47 | (x : X) (H : (f.stalkMap x).hom.FormallyEtale) : |
| 48 | ∃ (U : Y.Opens) (_ : IsAffineOpen U) (V : X.Opens) (_ : IsAffineOpen V) |
| 49 | (hVU : V ≤ f ⁻¹ᵁ U), x ∈ V ∧ (f.appLE U V hVU).hom.Etale := by |
| 50 | obtain ⟨_, ⟨U, hU, rfl⟩, hxU, -⟩ := |
| 51 | Y.isBasis_affineOpens.exists_subset_of_mem_open (Set.mem_univ (f x)) isOpen_univ |
| 52 | obtain ⟨_, ⟨V, hV, rfl⟩, hxV, hVU⟩ := |
| 53 | X.isBasis_affineOpens.exists_subset_of_mem_open hxU (U.2.preimage f.continuous) |
| 54 | have := f.finitePresentation_appLE hU hV hVU |
| 55 | algebraize [(f.appLE U V hVU).hom] |
| 56 | have : Algebra.IsEtaleAt Γ(Y, U) (hV.primeIdealOf ⟨x, hxV⟩).asIdeal := |
| 57 | (formallyEtale_stalkMap_iff U hU V hV hVU hxV).mp H |
| 58 | obtain ⟨r, hrx, hr⟩ := Algebra.exists_etale_of_isEtaleAt (R := Γ(Y, U)) |
| 59 | (hV.primeIdealOf ⟨x, hxV⟩).asIdeal |
| 60 | refine ⟨_, hU, _, hV.basicOpen r, (X.basicOpen_le r).trans hVU, ?_, ?_⟩ |
| 61 | · have hm : hV.primeIdealOf ⟨x, hxV⟩ ∈ hV.fromSpec ⁻¹ᵁ X.basicOpen r := by |
| 62 | rw [hV.fromSpec_preimage_basicOpen] |
| 63 | exact hrx |
| 64 | change hV.fromSpec (hV.primeIdealOf ⟨x, hxV⟩) ∈ X.basicOpen r at hm |
| 65 | simpa only [hV.fromSpec_primeIdealOf] using hm |
| 66 | · have := hV.isLocalization_basicOpen r |
| 67 | rw [← RingHom.etale_algebraMap] at hr |
| 68 | convert! |
| 69 | RingHom.Etale.propertyIsLocal.respectsIso.1 _ |
| 70 | (IsLocalization.algEquiv (.powers r) _ Γ(X, X.basicOpen r)).toRingEquiv hr |
| 71 | ext |
| 72 | dsimp |
| 73 | simp only [IsScalarTower.algebraMap_apply Γ(Y, U) Γ(X, V) (Localization _)] |
| 74 | rw [AlgEquiv.commutes] |
| 75 | exact congrArg (fun k : Γ(Y, U) ⟶ Γ(X, X.basicOpen r) => k _) |
| 76 | (f.appLE_map hVU (homOfLE (X.basicOpen_le r)).op).symm |
| 77 | |
| 78 | theorem exists_etale_neighborhood {X Y : Scheme.{u}} |
| 79 | (f : X ⟶ Y) [LocallyOfFinitePresentation f] |
| 80 | (x : X) (H : (f.stalkMap x).hom.FormallyEtale) : |
| 81 | ∃ (U : Y.Opens) (V : X.Opens) (hVU : V ≤ f ⁻¹ᵁ U), |
| 82 | x ∈ V ∧ Etale (f.resLE U V hVU) := by |
| 83 | obtain ⟨U, hU, V, hV, hVU, hxV, he⟩ := exists_etale_of_formallyEtale_stalk f x H |
| 84 | refine ⟨U, V, hVU, hxV, ?_⟩ |
| 85 | let : IsAffine U := hU |
| 86 | let : IsAffine V := hV |
| 87 | rw [HasRingHomProperty.iff_of_isAffine (P := @Etale)] |
| 88 | exact (RingHom.Etale.respectsIso.arrow_mk_iso_iff |
| 89 | (arrowResLEAppIso f U V hVU)).mpr he |
| 90 | |
| 91 | end |
| 92 | |
| 93 | end OAI.AlgebraicGeometry.CycleClass.Thom.ProperImage.EtaleLocus.Constructions.Construction |