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.AbelianModuli.HilbertConstruction.Finite.AlgebraSurjectivityFieldDetection |
| 2 | import OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Affine.TensorIsoNaturality |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.Finite |
| 5 | |
| 6 | /-! # Closed Immersion Field Detection -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Finite.ClosedImmersionFieldDetection |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Closed immersion of a finite map between affine schemes over a spectrum |
| 13 | is detected by all field-valued base changes of that spectrum. -/ |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 16 | universe u |
| 17 | |
| 18 | theorem ringHom_surjective_of_SpecMap_closedImmersion {S T : CommRingCat.{u}} (φ : S ⟶ T) |
| 19 | [IsClosedImmersion (Spec.map φ)] : Function.Surjective φ := by |
| 20 | have h := (IsClosedImmersion.isAffine_surjective_of_isAffine (Spec.map φ)).2 |
| 21 | intro t |
| 22 | obtain ⟨z, hz⟩ := h ((Scheme.ΓSpecIso T).inv t) |
| 23 | refine ⟨(Scheme.ΓSpecIso S).hom z, ?_⟩ |
| 24 | have hn := ConcreteCategory.congr_hom (Scheme.ΓSpecIso_naturality φ) z |
| 25 | change (Scheme.ΓSpecIso T).hom ((Spec.map φ).appTop z) = φ ((Scheme.ΓSpecIso S).hom z) at hn |
| 26 | rw [hz] at hn |
| 27 | exact hn.symm.trans (ConcreteCategory.congr_hom (Scheme.ΓSpecIso T).inv_hom_id t) |
| 28 | |
| 29 | theorem finite_affine_overMap_closedImmersion_of_field_baseChanges |
| 30 | (R : Type u) [CommRing R] {X Y : Over (Spec (.of R))} |
| 31 | [IsAffine X.left] [IsAffine Y.left] (f : X ⟶ Y) [IsFinite f.left] |
| 32 | (h : ∀ (K : Type u) [Field K] [Algebra R K], |
| 33 | IsClosedImmersion (((Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map f).left)) : |
| 34 | IsClosedImmersion f.left := by |
| 35 | let S := Affine.OverChartPoints.affineOverAlgebra R Y |
| 36 | let T := Affine.OverChartPoints.affineOverAlgebra R X |
| 37 | let φ : S →ₐ[R] T := Affine.OverMorphisms.affineOverMap R f |
| 38 | let : Algebra S T := φ.toRingHom.toAlgebra |
| 39 | have : IsScalarTower R S T := IsScalarTower.of_algebraMap_eq (fun r => (φ.commutes r).symm) |
| 40 | have hφ : IsFinite (Spec.map (CommRingCat.ofHom φ.toRingHom)) := by |
| 41 | have : IsIso (Affine.OverChartPoints.affineOverIso R X).inv.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.OverChartPoints.affineOverIso R X).inv)) |
| 42 | have : IsIso (Affine.OverChartPoints.affineOverIso R Y).hom.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.OverChartPoints.affineOverIso R Y).hom)) |
| 43 | rw [Affine.OverMorphisms.affineOverMap_spec] |
| 44 | infer_instance |
| 45 | have : Module.Finite S T := (IsFinite.SpecMap_iff (CommRingCat.ofHom φ.toRingHom)).mp hφ |
| 46 | have hs : Function.Surjective φ := AlgebraSurjectivityFieldDetection.finiteAlgebraMap_surjective_of_field_baseChanges R S T (by |
| 47 | intro K _ _ |
| 48 | have : IsClosedImmersion (((Over.pullback |
| 49 | (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map f).left) := h K |
| 50 | have : IsIso (Affine.TensorOverIso.affineTensorOverIso R K X).hom.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.TensorOverIso.affineTensorOverIso R K X).hom)) |
| 51 | have : IsIso (Affine.TensorOverIso.affineTensorOverIso R K Y).hom.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.TensorOverIso.affineTensorOverIso R K Y).hom)) |
| 52 | have hn : (Affine.TensorOverIso.affineTensorOverMap R K f).left ≫ (Affine.TensorOverIso.affineTensorOverIso R K Y).hom.left = |
| 53 | (Affine.TensorOverIso.affineTensorOverIso R K X).hom.left ≫ ((Over.pullback |
| 54 | (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map f).left := |
| 55 | congrArg Over.Hom.left (Affine.TensorIsoNaturality.affineTensorOverIso_natural (R := K) f) |
| 56 | have ht : IsClosedImmersion |
| 57 | ((Affine.TensorOverIso.affineTensorOverMap R K f).left ≫ (Affine.TensorOverIso.affineTensorOverIso R K Y).hom.left) := by |
| 58 | rw [hn] |
| 59 | infer_instance |
| 60 | have : IsClosedImmersion (Affine.TensorOverIso.affineTensorOverMap R K f).left := |
| 61 | IsClosedImmersion.of_comp _ (Affine.TensorOverIso.affineTensorOverIso R K Y).hom.left |
| 62 | have : IsClosedImmersion (Spec.map (CommRingCat.ofHom |
| 63 | (Algebra.TensorProduct.map (AlgHom.id K K) φ).toRingHom)) := |
| 64 | inferInstanceAs (IsClosedImmersion (Affine.TensorOverIso.affineTensorOverMap R K f).left) |
| 65 | exact ringHom_surjective_of_SpecMap_closedImmersion |
| 66 | (CommRingCat.ofHom (Algebra.TensorProduct.map (AlgHom.id K K) φ).toRingHom)) |
| 67 | have : IsClosedImmersion (Spec.map (CommRingCat.ofHom φ.toRingHom)) := |
| 68 | IsClosedImmersion.spec_of_surjective _ hs |
| 69 | have : IsIso (Affine.OverChartPoints.affineOverIso R X).hom.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.OverChartPoints.affineOverIso R X).hom)) |
| 70 | have : IsIso (Affine.OverChartPoints.affineOverIso R X).inv.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.OverChartPoints.affineOverIso R X).inv)) |
| 71 | have : IsIso (Affine.OverChartPoints.affineOverIso R Y).hom.left := inferInstanceAs (IsIso ((Over.forget _).map (Affine.OverChartPoints.affineOverIso R Y).hom)) |
| 72 | have hc : IsClosedImmersion ((Affine.OverChartPoints.affineOverIso R X).inv.left ≫ f.left ≫ |
| 73 | (Affine.OverChartPoints.affineOverIso R Y).hom.left) := by |
| 74 | rw [← Affine.OverMorphisms.affineOverMap_spec] |
| 75 | change IsClosedImmersion (Spec.map (CommRingCat.ofHom φ.toRingHom)) |
| 76 | infer_instance |
| 77 | have : IsClosedImmersion (((Affine.OverChartPoints.affineOverIso R X).inv.left ≫ f.left) ≫ (Affine.OverChartPoints.affineOverIso R Y).hom.left) := by |
| 78 | simpa only [Category.assoc] using hc |
| 79 | have : IsClosedImmersion ((Affine.OverChartPoints.affineOverIso R X).inv.left ≫ f.left) := |
| 80 | IsClosedImmersion.of_comp _ (Affine.OverChartPoints.affineOverIso R Y).hom.left |
| 81 | have he : f.left = (Affine.OverChartPoints.affineOverIso R X).hom.left ≫ ((Affine.OverChartPoints.affineOverIso R X).inv.left ≫ f.left) := by |
| 82 | have hi : (Affine.OverChartPoints.affineOverIso R X).hom.left ≫ (Affine.OverChartPoints.affineOverIso R X).inv.left = 𝟙 X.left := |
| 83 | congrArg Over.Hom.left (Affine.OverChartPoints.affineOverIso R X).hom_inv_id |
| 84 | simp only [← Category.assoc, hi, Category.id_comp] |
| 85 | rw [he] |
| 86 | infer_instance |
| 87 | |
| 88 | end |
| 89 | |
| 90 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Finite.ClosedImmersionFieldDetection |