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.IntersectionTheory.ProjectionFormula.Relative.DivisorDimension |
| 2 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Divisor.ImageDimension |
| 3 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.CurveLocalRings |
| 4 | |
| 5 | /-! # Fiber Dimension -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Generic.FiberDimension |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! The points above the generic point in a relative curve have height |
| 12 | at most one. A divisor with nonzero pushforward degree lies above that |
| 13 | generic point. All comparisons use the actual affine chart maps. -/ |
| 14 | |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open _root_.CategoryTheory _root_.AlgebraicGeometry _root_.Order |
| 18 | |
| 19 | variable {K : Type} [Field K] {X Y : Scheme.{0}} [IsIntegral X] [IsIntegral Y] |
| 20 | (f : X ⟶ Y) (g : Y ⟶ Spec (.of K)) |
| 21 | [LocallyOfFiniteType g] [LocallyOfFiniteType (f ≫ g)] |
| 22 | (hdim : Foundations.Scheme.TranscendenceDimension.schemeTranscendenceDimension g + 1 = Foundations.Scheme.TranscendenceDimension.schemeTranscendenceDimension (f ≫ g)) |
| 23 | |
| 24 | include g hdim |
| 25 | |
| 26 | theorem coheight_le_one (x : X) (hx : f x = genericPoint Y) : coheight x ≤ 1 := by |
| 27 | obtain ⟨U, hU, hxU, _⟩ := exists_isAffineOpen_mem_and_subset (TopologicalSpace.Opens.mem_top (f x)) |
| 28 | obtain ⟨V, hV, hxV, hVU⟩ := exists_isAffineOpen_mem_and_subset (show x ∈ f ⁻¹ᵁ U from hxU) |
| 29 | have hle : V ≤ f ⁻¹ᵁ U := hVU |
| 30 | let x' : V := ⟨x, hxV⟩ |
| 31 | let y' : U := ⟨f x, hxU⟩ |
| 32 | let : Nonempty U := ⟨y'⟩ |
| 33 | let : Nonempty V := ⟨x'⟩ |
| 34 | let A := Γ(Y, U) |
| 35 | let B := Γ(X, V) |
| 36 | let := Foundations.Scheme.SpecScalarTransport.specSectionScalarAlgebra g U |
| 37 | let := Foundations.Scheme.SpecScalarTransport.specSectionScalarAlgebra (f ≫ g) V |
| 38 | let := Foundations.Scheme.AffineSectionFiniteType.specSectionScalarAlgebra_finiteType g U hU |
| 39 | let := Foundations.Scheme.AffineSectionFiniteType.specSectionScalarAlgebra_finiteType (f ≫ g) V hV |
| 40 | let : Algebra A B := (f.appLE U V hle).hom.toAlgebra |
| 41 | let : IsScalarTower K A B := by |
| 42 | apply IsScalarTower.of_algebraMap_eq' |
| 43 | have h := Scheme.Hom.appLE_comp_appLE f g ⊤ U V le_top hle |
| 44 | exact (congrArg (fun t : Γ(Spec (.of K), ⊤) ⟶ B => |
| 45 | t.hom.comp (Scheme.ΓSpecIso (.of K)).inv.hom) h).symm |
| 46 | let q : PrimeSpectrum B := hV.primeIdealOf x' |
| 47 | let i : Spec (.of B) ⟶ Spec (.of A) := Spec.map (CommRingCat.ofHom (algebraMap A B)) |
| 48 | have hc : i ≫ hU.fromSpec = hV.fromSpec ≫ f := hU.SpecMap_appLE_fromSpec f hV hle |
| 49 | have hqx : hV.fromSpec q = x := hV.fromSpec_primeIdealOf x' |
| 50 | have hiq : i q = genericPoint (Spec (.of A)) := by |
| 51 | apply hU.fromSpec.isOpenEmbedding.injective |
| 52 | exact (congrArg (fun t : Spec (.of B) ⟶ Y => t q) hc).trans |
| 53 | ((congrArg f hqx).trans (hx.trans (genericPoint_eq_of_isOpenImmersion hU.fromSpec).symm)) |
| 54 | have hq : q.asIdeal.under A = ⊥ := by |
| 55 | change (i q).asIdeal = ⊥ |
| 56 | rw [hiq, genericPoint_eq_bot_of_affine] |
| 57 | rfl |
| 58 | have hAB : (Algebra.trdeg K A).toNat + 1 = (Algebra.trdeg K B).toNat := by |
| 59 | rw [Foundations.Scheme.TranscendenceDimension.schemeTranscendenceDimension_eq_affineSections g U hU, |
| 60 | Foundations.Scheme.TranscendenceDimension.schemeTranscendenceDimension_eq_affineSections (f ≫ g) V hV] at hdim |
| 61 | exact hdim |
| 62 | have hh := Relative.DivisorDimension.height_le_one_over_bot K A B hAB q.asIdeal hq |
| 63 | rw [idealHeight_eq_coheight, ← coheight_eq_of_isOpenImmersion hV.fromSpec, |
| 64 | hV.fromSpec_primeIdealOf] at hh |
| 65 | exact hh |
| 66 | |
| 67 | theorem stalk_valuation (x : X) (hx : f x = genericPoint Y) |
| 68 | [IsIntegrallyClosed (X.presheaf.stalk x)] : ValuationRing (X.presheaf.stalk x) := by |
| 69 | let : IsLocallyNoetherian X := LocallyOfFiniteType.isLocallyNoetherian (f ≫ g) |
| 70 | let : Ring.KrullDimLE 1 (X.presheaf.stalk x) := krullDimLE_of_coheight_le (coheight_le_one f g hdim x hx) |
| 71 | exact CurveLocalRings.normal_local_valuation _ |
| 72 | |
| 73 | theorem image_eq_genericPoint (x : X) (hx : coheight x = 1) (hdeg : f.residueDegree x ≠ 0) : |
| 74 | f x = genericPoint Y := by |
| 75 | obtain ⟨U, hU, hxU, _⟩ := exists_isAffineOpen_mem_and_subset (TopologicalSpace.Opens.mem_top (f x)) |
| 76 | obtain ⟨V, hV, hxV, hVU⟩ := exists_isAffineOpen_mem_and_subset (show x ∈ f ⁻¹ᵁ U from hxU) |
| 77 | have hle : V ≤ f ⁻¹ᵁ U := hVU |
| 78 | let x' : V := ⟨x, hxV⟩ |
| 79 | let y' : U := ⟨f x, hxU⟩ |
| 80 | let : Nonempty U := ⟨y'⟩ |
| 81 | let : Nonempty V := ⟨x'⟩ |
| 82 | let A := Γ(Y, U) |
| 83 | let B := Γ(X, V) |
| 84 | let := Foundations.Scheme.SpecScalarTransport.specSectionScalarAlgebra g U |
| 85 | let := Foundations.Scheme.SpecScalarTransport.specSectionScalarAlgebra (f ≫ g) V |
| 86 | let := Foundations.Scheme.AffineSectionFiniteType.specSectionScalarAlgebra_finiteType g U hU |
| 87 | let := Foundations.Scheme.AffineSectionFiniteType.specSectionScalarAlgebra_finiteType (f ≫ g) V hV |
| 88 | let : Algebra A B := (f.appLE U V hle).hom.toAlgebra |
| 89 | let : IsScalarTower K A B := by |
| 90 | apply IsScalarTower.of_algebraMap_eq' |
| 91 | have h := Scheme.Hom.appLE_comp_appLE f g ⊤ U V le_top hle |
| 92 | exact (congrArg (fun t : Γ(Spec (.of K), ⊤) ⟶ B => |
| 93 | t.hom.comp (Scheme.ΓSpecIso (.of K)).inv.hom) h).symm |
| 94 | let q : PrimeSpectrum B := hV.primeIdealOf x' |
| 95 | let i : Spec (.of B) ⟶ Spec (.of A) := Spec.map (CommRingCat.ofHom (algebraMap A B)) |
| 96 | have hc : i ≫ hU.fromSpec = hV.fromSpec ≫ f := hU.SpecMap_appLE_fromSpec f hV hle |
| 97 | have hqx : hV.fromSpec q = x := hV.fromSpec_primeIdealOf x' |
| 98 | have hq : q.asIdeal.height = 1 := by |
| 99 | rw [idealHeight_eq_coheight, ← coheight_eq_of_isOpenImmersion hV.fromSpec, |
| 100 | hV.fromSpec_primeIdealOf] |
| 101 | exact hx |
| 102 | have hd : q.asIdeal.inertiaDeg A ≠ 0 := by |
| 103 | have ht := CyclePushforward.residueDegree_comp i hU.fromSpec q |
| 104 | rw [hc, CyclePushforward.residueDegree_comp, |
| 105 | Principal.ClosedSectionCycle.residueDegree_immersion hV.fromSpec q, |
| 106 | Principal.ClosedSectionCycle.residueDegree_immersion hU.fromSpec (i q), Nat.one_mul, Nat.mul_one] at ht |
| 107 | intro hz |
| 108 | apply hdeg |
| 109 | exact (congrArg f.residueDegree hqx).symm.trans (ht.trans |
| 110 | ((Affine.ResidueDegree.residueDegree_eq_inertiaDeg A B q).trans hz)) |
| 111 | have hAB : (Algebra.trdeg K A).toNat + 1 = (Algebra.trdeg K B).toNat := by |
| 112 | rw [Foundations.Scheme.TranscendenceDimension.schemeTranscendenceDimension_eq_affineSections g U hU, |
| 113 | Foundations.Scheme.TranscendenceDimension.schemeTranscendenceDimension_eq_affineSections (f ≫ g) V hV] at hdim |
| 114 | exact hdim |
| 115 | have hp := Relative.DivisorDimension.under_eq_bot_of_height_one_of_degree K A B hAB q.asIdeal hq hd |
| 116 | have hiq : i q = genericPoint (Spec (.of A)) := by |
| 117 | rw [genericPoint_eq_bot_of_affine] |
| 118 | exact PrimeSpectrum.ext hp |
| 119 | have hpoint := congrArg (fun t : Spec (.of B) ⟶ Y => t q) hc |
| 120 | change hU.fromSpec (i q) = f (hV.fromSpec q) at hpoint |
| 121 | exact (congrArg f hqx).symm.trans (hpoint.symm.trans |
| 122 | ((congrArg hU.fromSpec hiq).trans (genericPoint_eq_of_isOpenImmersion hU.fromSpec))) |
| 123 | |
| 124 | end |
| 125 | |
| 126 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Generic.FiberDimension |