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.Resolution.Blowups.Smooth.AffineCenterBlowup |
| 2 | |
| 3 | /-! # Center Pointed Frame -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.Resolution.Blowups.Smooth.CenterPointedFrame.Construction |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! Every point of a smooth closed center admits actual étale coordinates generating its ideal. -/ |
| 10 | |
| 11 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 12 | |
| 13 | universe u |
| 14 | |
| 15 | theorem free_conormal_center_pointed_open_frame |
| 16 | {k Q ι : Type u} [CommRing k] [CommRing Q] [Algebra k Q] |
| 17 | (P : Algebra.Extension.{u} k Q) [Algebra.Smooth k P.Ring] [Algebra.FormallySmooth k Q] |
| 18 | [Fintype ι] [DecidableEq ι] (b : Module.Basis ι Q P.Cotangent) (hfg : P.ker.FG) |
| 19 | (p : PrimeSpectrum P.Ring) (hIp : P.ker ≤ p.asIdeal) : |
| 20 | ∃ (S : CommRingCat.{u}) (_ : Algebra k S) (_ : Algebra.Smooth k S) |
| 21 | (f : P.Ring →ₐ[k] S), IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) ∧ |
| 22 | ∃ (q : PrimeSpectrum S), PrimeSpectrum.comap f.toRingHom q = p ∧ |
| 23 | ∃ (v : ι → S) (D : ι → Derivation k S S), |
| 24 | (∀ i j, D i (v j) = if i = j then 1 else 0) ∧ |
| 25 | P.ker.map f.toRingHom = Ideal.span (Set.range v) := by |
| 26 | classical |
| 27 | obtain ⟨g, E, hgen, hE⟩ := ConormalBasisDerivations.Construction.exists_conormal_basis_generators_and_derivations P b |
| 28 | let v : ι → P.Ring := fun i => (g i).val |
| 29 | let G := Ideal.span (Set.range v) |
| 30 | have hGI : G ≤ P.ker := Ideal.span_le.mpr (by rintro _ ⟨i, rfl⟩; exact (g i).property) |
| 31 | obtain ⟨r, hr, hlocal⟩ := ConormalBasisDerivations.Construction.exists_center_generator_principal_neighborhood P.ker G hfg hGI hgen.le |
| 32 | let a := (JacobianDerivationFrame.Construction.derivationJacobian E v).det |
| 33 | have hqa : algebraMap P.Ring Q a = 1 := by |
| 34 | have hm : (algebraMap P.Ring Q).mapMatrix (JacobianDerivationFrame.Construction.derivationJacobian E v) = 1 := by |
| 35 | ext i j |
| 36 | change algebraMap P.Ring Q (E i (g j).val) = (1 : Matrix ι ι Q) i j |
| 37 | rw [hE, Matrix.one_apply] |
| 38 | change algebraMap P.Ring Q (JacobianDerivationFrame.Construction.derivationJacobian E v).det = 1 |
| 39 | rw [RingHom.map_det, hm, Matrix.det_one] |
| 40 | have haI : a - 1 ∈ P.ker := RingHom.mem_ker.mpr (by rw [map_sub, hqa, map_one, sub_self]) |
| 41 | have hrp : r ∉ p.asIdeal := ConormalBasisDerivations.Construction.generator_neighborhood_avoids_center_prime P.ker p.asIdeal hIp r hr |
| 42 | have hap : a ∉ p.asIdeal := ConormalBasisDerivations.Construction.generator_neighborhood_avoids_center_prime P.ker p.asIdeal hIp a haI |
| 43 | let A := Localization.Away r |
| 44 | let : Algebra.Smooth P.Ring A := Algebra.Smooth.of_isLocalization_Away r |
| 45 | let : Algebra.Smooth k A := Algebra.Smooth.comp k P.Ring A |
| 46 | let : Algebra.Etale P.Ring A := Algebra.Etale.of_isLocalizationAway r |
| 47 | let fA : P.Ring →ₐ[k] A := IsScalarTower.toAlgHom k P.Ring A |
| 48 | obtain ⟨pA, hpA⟩ := Blowups.Etale.RefinementHelpers.Construction.exists_localization_away_prime r p hrp |
| 49 | let EA : ι → Derivation k A A := fun i => Blowups.Etale.Derivation.Construction.extendEtaleRingDerivation (S := A) (E i) |
| 50 | let vA : ι → A := fun i => fA (v i) |
| 51 | have hdet : (JacobianDerivationFrame.Construction.derivationJacobian EA vA).det = fA a := by |
| 52 | have hm : JacobianDerivationFrame.Construction.derivationJacobian EA vA = fA.toRingHom.mapMatrix (JacobianDerivationFrame.Construction.derivationJacobian E v) := by |
| 53 | ext i j |
| 54 | exact Blowups.Etale.Derivation.Construction.extendEtaleRingDerivation_algebraMap (E i) (v j) |
| 55 | rw [hm, ← RingHom.map_det] |
| 56 | rfl |
| 57 | have hdetp : (JacobianDerivationFrame.Construction.derivationJacobian EA vA).det ∉ pA.asIdeal := by |
| 58 | rw [hdet] |
| 59 | have he : pA.asIdeal.comap fA.toRingHom = p.asIdeal := congrArg PrimeSpectrum.asIdeal hpA |
| 60 | change a ∉ pA.asIdeal.comap fA.toRingHom |
| 61 | rwa [he] |
| 62 | let S := JacobianNeighborhood.Construction.derivationJacobianNeighborhood EA vA |
| 63 | let : Algebra.Smooth A S := Algebra.Smooth.of_isLocalization_Away (JacobianDerivationFrame.Construction.derivationJacobian EA vA).det |
| 64 | let : Algebra.Smooth k S := Algebra.Smooth.comp k A S |
| 65 | let fS : A →ₐ[k] S := IsScalarTower.toAlgHom k A S |
| 66 | let f : P.Ring →ₐ[k] S := fS.comp fA |
| 67 | obtain ⟨Q', hQ'⟩ := Blowups.Etale.RefinementHelpers.Construction.exists_localization_away_prime (JacobianDerivationFrame.Construction.derivationJacobian EA vA).det pA hdetp |
| 68 | let w : ι → S := fun i => algebraMap A S (vA i) |
| 69 | let F := JacobianDerivationFrame.Construction.normalizedJacobianFrame (JacobianNeighborhood.Construction.jacobianNeighborhoodDerivation EA vA) w |
| 70 | have hF : ∀ i j, F i (w j) = if i = j then 1 else 0 := |
| 71 | JacobianDerivationFrame.Construction.normalizedJacobianFrame_dual _ _ (JacobianNeighborhood.Construction.jacobianNeighborhood_jacobian_isUnit EA vA) |
| 72 | let : Algebra.Etale A S := Algebra.Etale.of_isLocalizationAway (JacobianDerivationFrame.Construction.derivationJacobian EA vA).det |
| 73 | let : Algebra.Etale P.Ring S := Algebra.Etale.comp P.Ring A S |
| 74 | refine ⟨.of S, inferInstance, inferInstance, f, |
| 75 | ?_, Q', ?_, w, F, hF, ?_⟩ |
| 76 | · let : IsOpenImmersion (Spec.map (CommRingCat.ofHom (algebraMap P.Ring A))) := |
| 77 | IsOpenImmersion.of_isLocalization r |
| 78 | let : IsOpenImmersion (Spec.map (CommRingCat.ofHom (algebraMap A S))) := |
| 79 | IsOpenImmersion.of_isLocalization (JacobianDerivationFrame.Construction.derivationJacobian EA vA).det |
| 80 | change IsOpenImmersion (Spec.map (CommRingCat.ofHom (algebraMap P.Ring A) ≫ |
| 81 | CommRingCat.ofHom (algebraMap A S))) |
| 82 | rw [Spec.map_comp] |
| 83 | infer_instance |
| 84 | · apply PrimeSpectrum.ext |
| 85 | change (Q'.asIdeal.comap (algebraMap A S)).comap (algebraMap P.Ring A) = p.asIdeal |
| 86 | have hQI : Q'.asIdeal.comap (algebraMap A S) = pA.asIdeal := congrArg PrimeSpectrum.asIdeal hQ' |
| 87 | rw [hQI] |
| 88 | exact congrArg PrimeSpectrum.asIdeal hpA |
| 89 | · change P.ker.map ((algebraMap A S).comp (algebraMap P.Ring A)) = _ |
| 90 | rw [← Ideal.map_map, hlocal, Ideal.map_map] |
| 91 | dsimp only [G] |
| 92 | rw [Ideal.map_span, ← Set.range_comp] |
| 93 | rfl |
| 94 | |
| 95 | theorem free_conormal_center_pointed_frame |
| 96 | {k Q ι : Type u} [CommRing k] [CommRing Q] [Algebra k Q] |
| 97 | (P : Algebra.Extension.{u} k Q) [Algebra.Smooth k P.Ring] [Algebra.FormallySmooth k Q] |
| 98 | [Fintype ι] [DecidableEq ι] (b : Module.Basis ι Q P.Cotangent) (hfg : P.ker.FG) |
| 99 | (p : PrimeSpectrum P.Ring) (hIp : P.ker ≤ p.asIdeal) : |
| 100 | ∃ (S : CommRingCat.{u}) (_ : Algebra k S) (_ : Algebra.Smooth k S) |
| 101 | (f : P.Ring →ₐ[k] S), f.toRingHom.Etale ∧ |
| 102 | ∃ (q : PrimeSpectrum S), PrimeSpectrum.comap f.toRingHom q = p ∧ |
| 103 | ∃ (v : ι → S) (D : ι → Derivation k S S), |
| 104 | (∀ i j, D i (v j) = if i = j then 1 else 0) ∧ |
| 105 | P.ker.map f.toRingHom = Ideal.span (Set.range v) := by |
| 106 | obtain ⟨S, hSk, hSs, f, hf, rest⟩ := free_conormal_center_pointed_open_frame P b hfg p hIp |
| 107 | let : IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) := hf |
| 108 | exact ⟨S, hSk, hSs, f, |
| 109 | (HasRingHomProperty.Spec_iff (P := @Etale) (φ := CommRingCat.ofHom f.toRingHom)).mp inferInstance, |
| 110 | rest⟩ |
| 111 | |
| 112 | theorem free_conormal_ideal_pointed_open_frame |
| 113 | {k R : Type u} [CommRing k] [CommRing R] [Algebra k R] [Algebra.Smooth k R] |
| 114 | [IsNoetherianRing R] (I : Ideal R) [Algebra.FormallySmooth k (R ⧸ I)] |
| 115 | [Module.Free (R ⧸ I) I.Cotangent] (p : PrimeSpectrum R) (hIp : I ≤ p.asIdeal) : |
| 116 | ∃ (S : CommRingCat.{u}) (_ : Algebra k S) (_ : Algebra.Smooth k S) |
| 117 | (f : R →ₐ[k] S), IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) ∧ |
| 118 | ∃ (q : PrimeSpectrum S), PrimeSpectrum.comap f.toRingHom q = p ∧ |
| 119 | ∃ (ι : Type u) (_ : Fintype ι) (_ : DecidableEq ι) |
| 120 | (v : ι → S) (D : ι → Derivation k S S), |
| 121 | (∀ i j, D i (v j) = if i = j then 1 else 0) ∧ |
| 122 | I.map f.toRingHom = Ideal.span (Set.range v) := by |
| 123 | classical |
| 124 | let P := Algebra.Extension.ofSurjective (Ideal.Quotient.mkₐ k I) Ideal.Quotient.mk_surjective |
| 125 | let : Algebra.Smooth k P.Ring := inferInstanceAs (Algebra.Smooth k R) |
| 126 | let e := Blowups.Quotient.ConormalProjective.Construction.quotientExtensionCotangentEquiv (k := k) I |
| 127 | let : Module.Free (R ⧸ I) P.Cotangent := Module.Free.of_equiv e.symm |
| 128 | let : Module.Finite (R ⧸ I) I.Cotangent := Blowups.Quotient.ConormalProjective.Construction.smooth_quotient_conormal_finite I |
| 129 | let : Module.Finite (R ⧸ I) P.Cotangent := Module.Finite.equiv e.symm |
| 130 | let ι := Module.Free.ChooseBasisIndex (R ⧸ I) P.Cotangent |
| 131 | let : Fintype ι := Fintype.ofFinite ι |
| 132 | have hfg : P.ker.FG := by |
| 133 | change (RingHom.ker (Ideal.Quotient.mk I)).FG |
| 134 | rw [Ideal.mk_ker] |
| 135 | exact Ideal.fg_of_isNoetherianRing I |
| 136 | have hp : P.ker ≤ p.asIdeal := by |
| 137 | change RingHom.ker (Ideal.Quotient.mk I) ≤ p.asIdeal |
| 138 | rwa [Ideal.mk_ker] |
| 139 | obtain ⟨S, hSk, hSs, f, hf, q, hq, v, D, hD, hI⟩ := |
| 140 | free_conormal_center_pointed_open_frame P (Module.Free.chooseBasis (R ⧸ I) P.Cotangent) hfg p hp |
| 141 | refine ⟨S, hSk, hSs, f, hf, q, hq, ι, inferInstance, inferInstance, v, D, hD, ?_⟩ |
| 142 | change (RingHom.ker (Ideal.Quotient.mk I)).map f.toRingHom = _ at hI |
| 143 | rwa [Ideal.mk_ker] at hI |
| 144 | |
| 145 | theorem free_conormal_ideal_pointed_frame |
| 146 | {k R : Type u} [CommRing k] [CommRing R] [Algebra k R] [Algebra.Smooth k R] |
| 147 | [IsNoetherianRing R] (I : Ideal R) [Algebra.FormallySmooth k (R ⧸ I)] |
| 148 | [Module.Free (R ⧸ I) I.Cotangent] (p : PrimeSpectrum R) (hIp : I ≤ p.asIdeal) : |
| 149 | ∃ (S : CommRingCat.{u}) (_ : Algebra k S) (_ : Algebra.Smooth k S) |
| 150 | (f : R →ₐ[k] S), f.toRingHom.Etale ∧ |
| 151 | ∃ (q : PrimeSpectrum S), PrimeSpectrum.comap f.toRingHom q = p ∧ |
| 152 | ∃ (ι : Type u) (_ : Fintype ι) (_ : DecidableEq ι) |
| 153 | (v : ι → S) (D : ι → Derivation k S S), |
| 154 | (∀ i j, D i (v j) = if i = j then 1 else 0) ∧ |
| 155 | I.map f.toRingHom = Ideal.span (Set.range v) := by |
| 156 | obtain ⟨S, hSk, hSs, f, hf, rest⟩ := free_conormal_ideal_pointed_open_frame (k := k) I p hIp |
| 157 | let : IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) := hf |
| 158 | exact ⟨S, hSk, hSs, f, |
| 159 | (HasRingHomProperty.Spec_iff (P := @Etale) (φ := CommRingCat.ofHom f.toRingHom)).mp inferInstance, |
| 160 | rest⟩ |
| 161 | |
| 162 | theorem smooth_center_pointed_open_frame |
| 163 | {k R : Type u} [CommRing k] [CommRing R] [Algebra k R] [Algebra.Smooth k R] |
| 164 | [IsNoetherianRing R] (I : Ideal R) [Algebra.Smooth k (R ⧸ I)] |
| 165 | (p : PrimeSpectrum R) (hIp : I ≤ p.asIdeal) : |
| 166 | ∃ (S : CommRingCat.{u}) (_ : Algebra k S) (_ : Algebra.Smooth k S) |
| 167 | (f : R →ₐ[k] S), IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) ∧ |
| 168 | ∃ (q : PrimeSpectrum S), PrimeSpectrum.comap f.toRingHom q = p ∧ |
| 169 | ∃ (ι : Type u) (_ : Fintype ι) (_ : DecidableEq ι) |
| 170 | (v : ι → S) (D : ι → Derivation k S S), |
| 171 | (∀ i j, D i (v j) = if i = j then 1 else 0) ∧ |
| 172 | I.map f.toRingHom = Ideal.span (Set.range v) := by |
| 173 | classical |
| 174 | obtain ⟨r, hr, hfree⟩ := ConormalLocalBasis.Construction.exists_smooth_center_conormal_free_neighborhood (k := k) I p.asIdeal hIp |
| 175 | let A := Localization.Away r |
| 176 | let : Algebra.Smooth R A := Algebra.Smooth.of_isLocalization_Away r |
| 177 | let : Algebra.Smooth k A := Algebra.Smooth.comp k R A |
| 178 | let : Algebra.Smooth k (A ⧸ I.map (algebraMap R A)) := ExtendedQuotient.Construction.smooth_extended_quotient I |
| 179 | let : Module.Free (A ⧸ I.map (algebraMap R A)) (I.map (algebraMap R A)).Cotangent := hfree |
| 180 | let fA : R →ₐ[k] A := IsScalarTower.toAlgHom k R A |
| 181 | obtain ⟨pA, hpA⟩ := Blowups.Etale.RefinementHelpers.Construction.exists_localization_away_prime r p hr |
| 182 | have hIpA : I.map (algebraMap R A) ≤ pA.asIdeal := by |
| 183 | rw [Ideal.map_le_iff_le_comap] |
| 184 | have he : pA.asIdeal.comap (algebraMap R A) = p.asIdeal := congrArg PrimeSpectrum.asIdeal hpA |
| 185 | rwa [he] |
| 186 | obtain ⟨S, hSk, hSs, fS, hfS, q, hq, ι, hι, hdec, v, D, hD, hI⟩ := |
| 187 | free_conormal_ideal_pointed_open_frame (k := k) (I.map (algebraMap R A)) pA hIpA |
| 188 | let f := fS.comp fA |
| 189 | let : IsOpenImmersion (Spec.map (CommRingCat.ofHom fA.toRingHom)) := IsOpenImmersion.of_isLocalization r |
| 190 | let : IsOpenImmersion (Spec.map (CommRingCat.ofHom fS.toRingHom)) := hfS |
| 191 | have hf : IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) := by |
| 192 | change IsOpenImmersion (Spec.map (CommRingCat.ofHom fA.toRingHom ≫ CommRingCat.ofHom fS.toRingHom)) |
| 193 | rw [Spec.map_comp] |
| 194 | infer_instance |
| 195 | refine ⟨S, hSk, hSs, f, hf, q, ?_, ι, hι, hdec, v, D, hD, ?_⟩ |
| 196 | · apply PrimeSpectrum.ext |
| 197 | change (q.asIdeal.comap fS.toRingHom).comap fA.toRingHom = p.asIdeal |
| 198 | have he : q.asIdeal.comap fS.toRingHom = pA.asIdeal := congrArg PrimeSpectrum.asIdeal hq |
| 199 | rw [he] |
| 200 | exact congrArg PrimeSpectrum.asIdeal hpA |
| 201 | · change I.map (fS.toRingHom.comp fA.toRingHom) = _ |
| 202 | rw [← Ideal.map_map] |
| 203 | exact hI |
| 204 | |
| 205 | theorem smooth_center_pointed_frame |
| 206 | {k R : Type u} [CommRing k] [CommRing R] [Algebra k R] [Algebra.Smooth k R] |
| 207 | [IsNoetherianRing R] (I : Ideal R) [Algebra.Smooth k (R ⧸ I)] |
| 208 | (p : PrimeSpectrum R) (hIp : I ≤ p.asIdeal) : |
| 209 | ∃ (S : CommRingCat.{u}) (_ : Algebra k S) (_ : Algebra.Smooth k S) |
| 210 | (f : R →ₐ[k] S), f.toRingHom.Etale ∧ |
| 211 | ∃ (q : PrimeSpectrum S), PrimeSpectrum.comap f.toRingHom q = p ∧ |
| 212 | ∃ (ι : Type u) (_ : Fintype ι) (_ : DecidableEq ι) |
| 213 | (v : ι → S) (D : ι → Derivation k S S), |
| 214 | (∀ i j, D i (v j) = if i = j then 1 else 0) ∧ |
| 215 | I.map f.toRingHom = Ideal.span (Set.range v) := by |
| 216 | obtain ⟨S, hSk, hSs, f, hf, rest⟩ := smooth_center_pointed_open_frame (k := k) I p hIp |
| 217 | let : IsOpenImmersion (Spec.map (CommRingCat.ofHom f.toRingHom)) := hf |
| 218 | exact ⟨S, hSk, hSs, f, |
| 219 | (HasRingHomProperty.Spec_iff (P := @Etale) (φ := CommRingCat.ofHom f.toRingHom)).mp inferInstance, |
| 220 | rest⟩ |
| 221 | |
| 222 | end |
| 223 | |
| 224 | end OAI.AlgebraicGeometry.Resolution.Blowups.Smooth.CenterPointedFrame.Construction |