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 Mathlib |
| 2 | |
| 3 | /-! # Finite Flat Retract -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.PELModuli.CMPoints.FiniteFlatRetract |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | section |
| 10 | |
| 11 | /-! The coordinate algebra of a scheme retract of a finite locally free |
| 12 | scheme is finite projective. This is the algebraic flatness step for the |
| 13 | actual projector blocks. -/ |
| 14 | |
| 15 | theorem finite_projective_algebra_retract |
| 16 | {R A B : Type*} [CommRing R] [CommRing A] [CommRing B] |
| 17 | [Algebra R A] [Algebra R B] [Module.Finite R A] [Module.Projective R A] |
| 18 | (i : B →ₐ[R] A) (r : A →ₐ[R] B) (h : r.comp i = AlgHom.id R B) : |
| 19 | Module.Finite R B ∧ Module.Projective R B := by |
| 20 | have hlinear : r.toLinearMap.comp i.toLinearMap = LinearMap.id := |
| 21 | congrArg AlgHom.toLinearMap h |
| 22 | have hsurj : Function.Surjective r := by |
| 23 | intro b |
| 24 | exact ⟨i b, AlgHom.congr_fun h b⟩ |
| 25 | exact ⟨Module.Finite.of_surjective r.toLinearMap hsurj, |
| 26 | Module.Projective.of_split i.toLinearMap r.toLinearMap hlinear⟩ |
| 27 | |
| 28 | theorem finite_flat_algebra_retract |
| 29 | {R A B : Type*} [CommRing R] [CommRing A] [CommRing B] |
| 30 | [Algebra R A] [Algebra R B] |
| 31 | [Module.Finite R A] [Module.Flat R A] [Algebra.FinitePresentation R A] |
| 32 | (i : B →ₐ[R] A) (r : A →ₐ[R] B) (h : r.comp i = AlgHom.id R B) : |
| 33 | Module.Finite R B ∧ Module.Flat R B ∧ Algebra.FinitePresentation R B := by |
| 34 | let : Module.FinitePresentation R A := Module.FinitePresentation.of_finite_of_finitePresentation R A |
| 35 | let : Module.Projective R A := Module.Flat.projective_of_finitePresentation |
| 36 | obtain ⟨hf, hp⟩ := finite_projective_algebra_retract i r h |
| 37 | let : Module.Finite R B := hf |
| 38 | let : Module.Projective R B := hp |
| 39 | let : Module.FinitePresentation R B := Module.finitePresentation_of_projective R B |
| 40 | exact ⟨hf, inferInstance, inferInstance⟩ |
| 41 | |
| 42 | end |
| 43 | |
| 44 | /-! Finite affine scheme retracts preserve flatness and finite |
| 45 | presentation. Applied to the coefficient projector this supplies the |
| 46 | relative flatness of a block from that of the ambient torsion. -/ |
| 47 | |
| 48 | open _root_.CategoryTheory _root_.AlgebraicGeometry Opposite |
| 49 | |
| 50 | theorem finite_flat_scheme_retract |
| 51 | (R : CommRingCat) (G B : Over (Spec R)) |
| 52 | [IsFinite G.hom] [Flat G.hom] [LocallyOfFinitePresentation G.hom] |
| 53 | [IsFinite B.hom] (i : B ⟶ G) (r : G ⟶ B) (h : i ≫ r = 𝟙 B) : |
| 54 | Flat B.hom ∧ LocallyOfFinitePresentation B.hom := by |
| 55 | let : IsAffine G.left := isAffine_of_isAffineHom G.hom |
| 56 | let : IsAffine B.left := isAffine_of_isAffineHom B.hom |
| 57 | obtain ⟨AG, ⟨eG⟩⟩ := (essImage_algSpec (R := R) (G := G)).mpr inferInstance |
| 58 | obtain ⟨AB, ⟨eB⟩⟩ := (essImage_algSpec (R := R) (G := B)).mpr inferInstance |
| 59 | have : IsIso eG.hom.left := inferInstanceAs |
| 60 | (IsIso (((Over.forget (Spec R)).mapIso eG).hom)) |
| 61 | have : IsIso eB.inv.left := inferInstanceAs |
| 62 | (IsIso (((Over.forget (Spec R)).mapIso eB).inv)) |
| 63 | have hAG : IsFinite ((algSpec R).obj AG).hom ∧ Flat ((algSpec R).obj AG).hom ∧ |
| 64 | LocallyOfFinitePresentation ((algSpec R).obj AG).hom := by |
| 65 | rw [← eG.hom.w] |
| 66 | exact ⟨inferInstance, inferInstance, inferInstance⟩ |
| 67 | let : Module.Finite R AG.unop := RingHom.finite_algebraMap.mp |
| 68 | ((IsFinite.SpecMap_iff _).mp hAG.1) |
| 69 | let : Module.Flat R AG.unop := RingHom.flat_algebraMap_iff.mp |
| 70 | ((Flat.SpecMap_iff).mp hAG.2.1) |
| 71 | let : Algebra.FinitePresentation R AG.unop := RingHom.finitePresentation_algebraMap.mp |
| 72 | ((LocallyOfFinitePresentation.SpecMap_iff _).mp hAG.2.2) |
| 73 | let i' : (algSpec R).obj AB ⟶ (algSpec R).obj AG := eB.hom ≫ i ≫ eG.inv |
| 74 | let r' : (algSpec R).obj AG ⟶ (algSpec R).obj AB := eG.hom ≫ r ≫ eB.inv |
| 75 | have h' : i' ≫ r' = 𝟙 _ := by |
| 76 | dsimp only [i', r'] |
| 77 | simp only [Category.assoc, Iso.inv_hom_id_assoc] |
| 78 | rw [← Category.assoc i r, h, Category.id_comp, Iso.hom_inv_id] |
| 79 | let ia : AG.unop ⟶ AB.unop := ((algSpec.fullyFaithful (R := R)).preimage i').unop |
| 80 | let ra : AB.unop ⟶ AG.unop := ((algSpec.fullyFaithful (R := R)).preimage r').unop |
| 81 | have ha : ra ≫ ia = 𝟙 AB.unop := by |
| 82 | have he : (algSpec.fullyFaithful (R := R)).preimage i' ≫ |
| 83 | (algSpec.fullyFaithful (R := R)).preimage r' = 𝟙 AB := by |
| 84 | apply (algSpec R).map_injective |
| 85 | rw [CategoryTheory.Functor.map_comp, CategoryTheory.Functor.map_id, |
| 86 | (algSpec.fullyFaithful (R := R)).map_preimage, |
| 87 | (algSpec.fullyFaithful (R := R)).map_preimage] |
| 88 | exact h' |
| 89 | exact congrArg Quiver.Hom.unop he |
| 90 | have halg : ia.hom.comp ra.hom = AlgHom.id R AB.unop := |
| 91 | congrArg CommAlgCat.Hom.hom ha |
| 92 | obtain ⟨hf, hflat, hfp⟩ := finite_flat_algebra_retract ra.hom ia.hom halg |
| 93 | let : Module.Finite R AB.unop := hf |
| 94 | let : Module.Flat R AB.unop := hflat |
| 95 | let : Algebra.FinitePresentation R AB.unop := hfp |
| 96 | have : Flat ((algSpec R).obj AB).hom := by |
| 97 | change Flat (Spec.map (CommRingCat.ofHom (algebraMap R AB.unop))) |
| 98 | exact (Flat.SpecMap_iff).mpr (RingHom.flat_algebraMap_iff.mpr hflat) |
| 99 | have : LocallyOfFinitePresentation ((algSpec R).obj AB).hom := by |
| 100 | change LocallyOfFinitePresentation (Spec.map (CommRingCat.ofHom (algebraMap R AB.unop))) |
| 101 | exact (LocallyOfFinitePresentation.SpecMap_iff _).mpr |
| 102 | (RingHom.finitePresentation_algebraMap.mpr hfp) |
| 103 | rw [← eB.inv.w] |
| 104 | exact ⟨inferInstance, inferInstance⟩ |
| 105 | |
| 106 | /-- The affine retraction argument applies over an arbitrary base by its |
| 107 | actual affine open cover and canonical pullback maps. -/ |
| 108 | theorem finite_flat_scheme_retract_general |
| 109 | {S : Scheme} (G B : Over S) |
| 110 | [IsFinite G.hom] [Flat G.hom] [LocallyOfFinitePresentation G.hom] |
| 111 | [IsFinite B.hom] (i : B ⟶ G) (r : G ⟶ B) (h : i ≫ r = 𝟙 B) : |
| 112 | Flat B.hom ∧ LocallyOfFinitePresentation B.hom := by |
| 113 | let : IsZariskiLocalAtTarget (@Flat) := |
| 114 | @HasRingHomProperty.instIsZariskiLocalAtTarget _ _ Flat.instHasRingHomPropertyFlat |
| 115 | let : IsZariskiLocalAtTarget (@LocallyOfFinitePresentation) := |
| 116 | @HasRingHomProperty.instIsZariskiLocalAtTarget _ _ |
| 117 | instHasRingHomPropertyLocallyOfFinitePresentationFinitePresentation |
| 118 | let U := S.affineOpenCover |
| 119 | have hlocal (a : U.I₀) : |
| 120 | Flat ((Over.pullback (U.f a)).obj B).hom ∧ |
| 121 | LocallyOfFinitePresentation ((Over.pullback (U.f a)).obj B).hom := by |
| 122 | let F := Over.pullback (U.f a) |
| 123 | have : IsFinite (F.obj G).hom := inferInstanceAs |
| 124 | (IsFinite (Limits.pullback.snd G.hom (U.f a))) |
| 125 | have : Flat (F.obj G).hom := inferInstanceAs (Flat (Limits.pullback.snd G.hom (U.f a))) |
| 126 | have : LocallyOfFinitePresentation (F.obj G).hom := inferInstanceAs |
| 127 | (LocallyOfFinitePresentation (Limits.pullback.snd G.hom (U.f a))) |
| 128 | have : IsFinite (F.obj B).hom := inferInstanceAs |
| 129 | (IsFinite (Limits.pullback.snd B.hom (U.f a))) |
| 130 | exact finite_flat_scheme_retract (U.X a) (F.obj G) (F.obj B) (F.map i) (F.map r) |
| 131 | (by rw [← CategoryTheory.Functor.map_comp, h, CategoryTheory.Functor.map_id]) |
| 132 | exact ⟨IsZariskiLocalAtTarget.of_openCover (P := @Flat) U.openCover (fun a => (hlocal a).1), |
| 133 | IsZariskiLocalAtTarget.of_openCover (P := @LocallyOfFinitePresentation) U.openCover |
| 134 | (fun a => (hlocal a).2)⟩ |
| 135 | |
| 136 | end |
| 137 | |
| 138 | end OAI.AlgebraicGeometry.PELModuli.CMPoints.FiniteFlatRetract |