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 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | This file has been modified. |
| 5 | -/ |
| 6 | import Mathlib.Algebra.Homology.Embedding.Extend |
| 7 | import Mathlib.Algebra.Homology.Additive |
| 8 | |
| 9 | /-! # Map Extend -/ |
| 10 | |
| 11 | namespace OAI.Algebra.Homology.MapExtend.HomologicalComplex |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open _root_.HomologicalComplex |
| 16 | |
| 17 | /-! |
| 18 | # Applying an additive functor commutes with extension of a complex |
| 19 | |
| 20 | The comparison is the identity in retained degrees and the canonical isomorphism between |
| 21 | zero objects in newly inserted degrees. In particular it fixes the normalization when |
| 22 | regrading a chain complex by `n ↦ -n` before or after a sheaf functor. |
| 23 | -/ |
| 24 | |
| 25 | open _root_.CategoryTheory Limits |
| 26 | |
| 27 | section Single |
| 28 | |
| 29 | variable {C : Type*} [Category* C] [Preadditive C] [HasZeroObject C] |
| 30 | {I J : Type*} {c : ComplexShape I} {c' : ComplexShape J} |
| 31 | |
| 32 | /-- Extending a complex supported in one degree is natural in the object placed there. -/ |
| 33 | @[reassoc] |
| 34 | lemma extendSingleIso_hom_naturality |
| 35 | [DecidableEq I] [DecidableEq J] (e : c.Embedding c') {A B : C} (f : A ⟶ B) |
| 36 | (i : I) (j : J) (h : e.f i = j) : |
| 37 | extendMap ((single C c i).map f) e ≫ (extendSingleIso e B i j h).hom = |
| 38 | (extendSingleIso e A i j h).hom ≫ (single C c' j).map f := by |
| 39 | apply hom_ext |
| 40 | intro k |
| 41 | by_cases hk : k = j |
| 42 | · subst k |
| 43 | simp only [comp_f, extendMap_f _ e h, extendSingleIso_hom_f, single_map_f_self] |
| 44 | simp |
| 45 | · exact (isZero_single_obj_X c' j B k hk).eq_of_tgt _ _ |
| 46 | |
| 47 | end Single |
| 48 | |
| 49 | variable {C D : Type*} [Category* C] [Category* D] [Preadditive C] [Preadditive D] |
| 50 | [HasZeroObject C] [HasZeroObject D] (F : C ⥤ D) [F.Additive] |
| 51 | {I J : Type*} {c : ComplexShape I} {c' : ComplexShape J} |
| 52 | (K : HomologicalComplex C c) (e : c.Embedding c') |
| 53 | |
| 54 | /-- Degreewise comparison: identity on retained degrees, canonical zero-object comparison |
| 55 | on inserted degrees. -/ |
| 56 | def mapExtendCanonicalXIso (a : Option I) : |
| 57 | F.obj (extend.X K a) ≅ extend.X ((F.mapHomologicalComplex c).obj K) a := |
| 58 | match a with |
| 59 | | some _ => Iso.refl _ |
| 60 | | none => (F.map_isZero (Limits.isZero_zero C)).isoZero |
| 61 | |
| 62 | set_option backward.isDefEq.respectTransparency false in |
| 63 | set_option backward.defeqAttrib.useBackward true in |
| 64 | @[reassoc] |
| 65 | lemma mapExtendCanonicalXIso_hom_d (a b : Option I) : |
| 66 | (mapExtendCanonicalXIso F K a).hom ≫ extend.d ((F.mapHomologicalComplex c).obj K) a b = |
| 67 | F.map (extend.d K a b) ≫ (mapExtendCanonicalXIso F K b).hom := by |
| 68 | cases a <;> cases b <;> |
| 69 | simp [mapExtendCanonicalXIso, extend.d, Functor.mapHomologicalComplex_obj_d] |
| 70 | |
| 71 | /-- The canonical chain-complex comparison between functorial mapping and extension. -/ |
| 72 | def mapExtendCanonicalIso : |
| 73 | (F.mapHomologicalComplex c').obj (K.extend e) ≅ |
| 74 | ((F.mapHomologicalComplex c).obj K).extend e := |
| 75 | Hom.isoOfComponents (fun j => mapExtendCanonicalXIso F K (e.r j)) |
| 76 | (fun j k _ => mapExtendCanonicalXIso_hom_d F K (e.r j) (e.r k)) |
| 77 | |
| 78 | set_option backward.isDefEq.respectTransparency false in |
| 79 | set_option backward.defeqAttrib.useBackward true in |
| 80 | /-- In a degree coming from the original complex, the comparison is the identity through the |
| 81 | canonical extension identifications, including any grading transports. -/ |
| 82 | lemma mapExtendCanonicalIso_hom_f {i : I} {j : J} (h : e.f i = j) : |
| 83 | (mapExtendCanonicalIso F K e).hom.f j = |
| 84 | F.map (K.extendXIso e h).hom ≫ |
| 85 | (((F.mapHomologicalComplex c).obj K).extendXIso e h).inv := by |
| 86 | change (mapExtendCanonicalXIso F K (e.r j)).hom = |
| 87 | F.map (extend.XIso K (e.r_eq_some h)).hom ≫ |
| 88 | (extend.XIso ((F.mapHomologicalComplex c).obj K) (e.r_eq_some h)).inv |
| 89 | have H (a : Option I) (ha : a = some i) : |
| 90 | (mapExtendCanonicalXIso F K a).hom = F.map (extend.XIso K ha).hom ≫ |
| 91 | (extend.XIso ((F.mapHomologicalComplex c).obj K) ha).inv := by |
| 92 | subst a |
| 93 | simp [mapExtendCanonicalXIso, extend.XIso] |
| 94 | rfl |
| 95 | exact H _ _ |
| 96 | |
| 97 | set_option backward.isDefEq.respectTransparency false in |
| 98 | set_option backward.defeqAttrib.useBackward true in |
| 99 | /-- Naturality of the degreewise comparison in a chain map. -/ |
| 100 | lemma mapExtendCanonicalXIso_hom_mapX {L : HomologicalComplex C c} (f : K ⟶ L) (a : Option I) : |
| 101 | F.map (extend.mapX f a) ≫ (mapExtendCanonicalXIso F L a).hom = |
| 102 | (mapExtendCanonicalXIso F K a).hom ≫ extend.mapX ((F.mapHomologicalComplex c).map f) a := by |
| 103 | cases a <;> simp [mapExtendCanonicalXIso, extend.mapX] |
| 104 | |
| 105 | /-- Mapping and extension commute on chain maps, with the canonical normalization. -/ |
| 106 | @[reassoc] |
| 107 | lemma mapExtendCanonicalIso_naturality {L : HomologicalComplex C c} (f : K ⟶ L) : |
| 108 | (F.mapHomologicalComplex c').map (extendMap f e) ≫ (mapExtendCanonicalIso F L e).hom = |
| 109 | (mapExtendCanonicalIso F K e).hom ≫ extendMap ((F.mapHomologicalComplex c).map f) e := by |
| 110 | ext j |
| 111 | exact mapExtendCanonicalXIso_hom_mapX F K f (e.r j) |
| 112 | |
| 113 | set_option backward.isDefEq.respectTransparency false in |
| 114 | set_option backward.defeqAttrib.useBackward true in |
| 115 | /-- Compatibility with a natural transformation of additive coefficient functors. -/ |
| 116 | @[reassoc] |
| 117 | lemma mapExtendCanonicalIso_natTrans {G : C ⥤ D} [G.Additive] (a : F ⟶ G) : |
| 118 | (a.mapHomologicalComplex c').app (K.extend e) ≫ (mapExtendCanonicalIso G K e).hom = |
| 119 | (mapExtendCanonicalIso F K e).hom ≫ extendMap ((a.mapHomologicalComplex c).app K) e := by |
| 120 | ext j |
| 121 | change a.app (extend.X K (e.r j)) ≫ (mapExtendCanonicalXIso G K (e.r j)).hom = |
| 122 | (mapExtendCanonicalXIso F K (e.r j)).hom ≫ |
| 123 | extend.mapX ((a.mapHomologicalComplex c).app K) (e.r j) |
| 124 | cases hr : e.r j with |
| 125 | | none => exact (F.map_isZero (Limits.isZero_zero C)).eq_of_src _ _ |
| 126 | | some n => simp [mapExtendCanonicalXIso, extend.X, extend.mapX] |
| 127 | |
| 128 | /-- The comparison for the identity coefficient functor is the identity. -/ |
| 129 | @[simp] |
| 130 | lemma mapExtendCanonicalIso_id : (mapExtendCanonicalIso (𝟭 C) K e).hom = 𝟙 (K.extend e) := by |
| 131 | ext j |
| 132 | change (mapExtendCanonicalXIso (𝟭 C) K (e.r j)).hom = 𝟙 (extend.X K (e.r j)) |
| 133 | cases hr : e.r j with |
| 134 | | none => exact (Limits.isZero_zero C).eq_of_src _ _ |
| 135 | | some n => rfl |
| 136 | |
| 137 | end |
| 138 | |
| 139 | end OAI.Algebra.Homology.MapExtend.HomologicalComplex |