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.AlgebraicGeometry.Morphisms.Separated |
| 2 | import Mathlib.CategoryTheory.Subfunctor.Basic |
| 3 | |
| 4 | /-! # Equation Loci -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.EquationLoci |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! |
| 11 | Closed loci of finite systems of actual morphism equations into separated |
| 12 | schemes, together with the representing natural equivalence. |
| 13 | -/ |
| 14 | |
| 15 | open _root_.CategoryTheory _root_.CategoryTheory.Limits _root_.AlgebraicGeometry |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | variable {S : Scheme.{u}} (M : Over S) |
| 20 | |
| 21 | /-- One actual pair of comparison morphisms into a separated S-scheme. -/ |
| 22 | structure MorphismEquation where |
| 23 | target : Over S |
| 24 | separated : IsSeparated target.hom |
| 25 | lhs : M ⟶ target |
| 26 | rhs : M ⟶ target |
| 27 | |
| 28 | variable {M} |
| 29 | |
| 30 | /-- Satisfaction of all equations after pullback along a parameter point. -/ |
| 31 | def Satisfies (equations : List (MorphismEquation M)) |
| 32 | {T : Over S} (x : T ⟶ M) : Prop := |
| 33 | ∀ e ∈ equations, x ≫ e.lhs = x ≫ e.rhs |
| 34 | |
| 35 | /-- The solution condition is compatible with arbitrary changes of parameters. -/ |
| 36 | def equationSubfunctor (equations : List (MorphismEquation M)) : |
| 37 | Subfunctor (yoneda.obj M) where |
| 38 | obj T := {x | Satisfies equations x} |
| 39 | map a x hx := by |
| 40 | intro e he |
| 41 | change (a.unop ≫ x) ≫ e.lhs = (a.unop ≫ x) ≫ e.rhs |
| 42 | rw [Category.assoc, Category.assoc, hx e he] |
| 43 | |
| 44 | /-- A finite system of actual morphism equations is represented by a closed |
| 45 | subscheme. The comparison morphisms themselves are data, not assumed loci. -/ |
| 46 | theorem finite_equations_closed_locus |
| 47 | (equations : List (MorphismEquation M)) : |
| 48 | ∃ (Z : Over S) (j : Z ⟶ M), IsClosedImmersion j.left ∧ |
| 49 | ∀ (T : Over S) (x : T ⟶ M), |
| 50 | Satisfies equations x ↔ ∃! y : T ⟶ Z, y ≫ j = x := by |
| 51 | induction equations with |
| 52 | | nil => |
| 53 | refine ⟨M, 𝟙 M, ?_, ?_⟩ |
| 54 | · change IsClosedImmersion (𝟙 M.left) |
| 55 | infer_instance |
| 56 | intro T x |
| 57 | constructor |
| 58 | · intro _ |
| 59 | exact ⟨x, Category.comp_id x, fun y hy => (Category.comp_id y).symm.trans hy⟩ |
| 60 | · intro _ e he |
| 61 | cases he |
| 62 | | cons e equations ih => |
| 63 | obtain ⟨Z, j, hj, hZ⟩ := ih |
| 64 | let := hj |
| 65 | have : Mono j := Over.mono_of_mono_left j |
| 66 | let := e.separated |
| 67 | let f : Z ⟶ e.target := j ≫ e.lhs |
| 68 | let g : Z ⟶ e.target := j ≫ e.rhs |
| 69 | let k : equalizer f g ⟶ Z := equalizer.ι f g |
| 70 | have hk : IsClosedImmersion k.left := inferInstance |
| 71 | let := hk |
| 72 | refine ⟨equalizer f g, k ≫ j, ?_, ?_⟩ |
| 73 | · change IsClosedImmersion (k.left ≫ j.left) |
| 74 | infer_instance |
| 75 | · intro T x |
| 76 | constructor |
| 77 | · intro hx |
| 78 | have hxTail : Satisfies equations x := |
| 79 | fun d hd => hx d (List.mem_cons_of_mem e hd) |
| 80 | obtain ⟨y, hy, _⟩ := (hZ T x).mp hxTail |
| 81 | have hyEq : y ≫ f = y ≫ g := by |
| 82 | change y ≫ (j ≫ e.lhs) = y ≫ (j ≫ e.rhs) |
| 83 | rw [← Category.assoc, ← Category.assoc, hy] |
| 84 | exact hx e (List.mem_cons_self) |
| 85 | refine ⟨equalizer.lift y hyEq, ?_, ?_⟩ |
| 86 | · change equalizer.lift y hyEq ≫ equalizer.ι f g ≫ j = x |
| 87 | rw [equalizer.lift_ι_assoc, hy] |
| 88 | · intro z hz |
| 89 | apply (cancel_mono (k ≫ j)).mp |
| 90 | exact hz.trans (by |
| 91 | change x = equalizer.lift y hyEq ≫ equalizer.ι f g ≫ j |
| 92 | rw [equalizer.lift_ι_assoc, hy]) |
| 93 | · rintro ⟨y, hy, _⟩ |
| 94 | have hyTail : Satisfies equations x := by |
| 95 | apply (hZ T x).mpr |
| 96 | refine ⟨y ≫ k, ?_, ?_⟩ |
| 97 | · exact (Category.assoc _ _ _).trans hy |
| 98 | · intro z hz |
| 99 | apply (cancel_mono j).mp |
| 100 | exact hz.trans ((Category.assoc _ _ _).trans hy).symm |
| 101 | intro d hd |
| 102 | rcases List.mem_cons.mp hd with hd | hd |
| 103 | · subst d |
| 104 | rw [← hy] |
| 105 | change (y ≫ (equalizer.ι f g ≫ j)) ≫ e.lhs = |
| 106 | (y ≫ (equalizer.ι f g ≫ j)) ≫ e.rhs |
| 107 | simp only [Category.assoc] |
| 108 | exact congrArg (fun h => y ≫ h) (equalizer.condition f g) |
| 109 | · exact hyTail d hd |
| 110 | |
| 111 | /-- The finite-equation construction represents the whole solution functor, |
| 112 | with its inclusion into the parameter functor. -/ |
| 113 | theorem finite_equations_representable |
| 114 | (equations : List (MorphismEquation M)) : |
| 115 | ∃ (Z : Over S) (j : Z ⟶ M), IsClosedImmersion j.left ∧ |
| 116 | ∃ e : yoneda.obj Z ≅ (equationSubfunctor equations).toFunctor, |
| 117 | e.hom ≫ (equationSubfunctor equations).ι = yoneda.map j := by |
| 118 | obtain ⟨Z, j, hj, hZ⟩ := finite_equations_closed_locus equations |
| 119 | let := hj |
| 120 | have : Mono j := Over.mono_of_mono_left j |
| 121 | let t : yoneda.obj Z ⟶ (equationSubfunctor equations).toFunctor := |
| 122 | { app := fun T => ↾fun y => |
| 123 | ⟨y ≫ j, (hZ T.unop (y ≫ j)).mpr |
| 124 | ⟨y, rfl, fun z hz => (cancel_mono j).mp hz⟩⟩ |
| 125 | naturality := by |
| 126 | intro T U a |
| 127 | ext y |
| 128 | apply Subtype.ext |
| 129 | exact Category.assoc _ _ _ } |
| 130 | have : IsIso t := by |
| 131 | apply (NatTrans.isIso_iff_isIso_app t).mpr |
| 132 | intro T |
| 133 | apply (isIso_iff_bijective (t.app T)).mpr |
| 134 | constructor |
| 135 | · intro y z h |
| 136 | apply (cancel_mono j).mp |
| 137 | exact congrArg Subtype.val h |
| 138 | · intro x |
| 139 | obtain ⟨y, hy, _⟩ := (hZ T.unop x.val).mp x.property |
| 140 | exact ⟨y, Subtype.ext hy⟩ |
| 141 | refine ⟨Z, j, hj, asIso t, ?_⟩ |
| 142 | rfl |
| 143 | |
| 144 | end |
| 145 | |
| 146 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.EquationLoci |