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.AlgebraicTopology.DeRham.Comparison.DoubleComplexQuasiIso |
| 2 | |
| 3 | /-! # Double Complex Relative Primitive -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicTopology.DeRham.Comparison.DoubleComplexRelativePrimitive.DoubleComplex |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! |
| 10 | # Relative primitives for actual quasi-isomorphisms of module complexes |
| 11 | |
| 12 | The inverse direction of the cycle-lifting criterion follows from the genuine |
| 13 | isomorphism on homology. A compatible pair consisting of a source cocycle and |
| 14 | a target primitive therefore admits a relative primitive. The natural-degree |
| 15 | endpoint is included with its zero incoming differential. |
| 16 | -/ |
| 17 | |
| 18 | open _root_.CategoryTheory |
| 19 | |
| 20 | universe u v |
| 21 | |
| 22 | variable {R : Type u} [Ring R] |
| 23 | |
| 24 | namespace RelativePrimitiveAux |
| 25 | |
| 26 | variable {S T : ShortComplex (ModuleCat.{v} R)} |
| 27 | |
| 28 | /-- The canonical class of a concrete kernel element in the native homology object. -/ |
| 29 | private def cycleClass (S : ShortComplex (ModuleCat.{v} R)) : |
| 30 | LinearMap.ker S.g.hom →ₗ[R] S.homology := |
| 31 | S.moduleCatHomologyIso.toLinearEquiv.symm.toLinearMap.comp |
| 32 | (LinearMap.range S.moduleCatToCycles).mkQ |
| 33 | |
| 34 | private theorem cycleClass_surjective (S : ShortComplex (ModuleCat.{v} R)) : |
| 35 | Function.Surjective (cycleClass S) := |
| 36 | S.moduleCatHomologyIso.toLinearEquiv.symm.surjective.comp |
| 37 | (LinearMap.range S.moduleCatToCycles).mkQ_surjective |
| 38 | |
| 39 | set_option backward.isDefEq.respectTransparency false in |
| 40 | private theorem cycleClass_eq_iff_exists (S : ShortComplex (ModuleCat.{v} R)) |
| 41 | (x y : LinearMap.ker S.g.hom) : |
| 42 | cycleClass S x = cycleClass S y ↔ |
| 43 | ∃ z : S.X₁, S.f z = (x : S.X₂) - (y : S.X₂) := by |
| 44 | change S.moduleCatHomologyIso.toLinearEquiv.symm |
| 45 | ((LinearMap.range S.moduleCatToCycles).mkQ x) = |
| 46 | S.moduleCatHomologyIso.toLinearEquiv.symm |
| 47 | ((LinearMap.range S.moduleCatToCycles).mkQ y) ↔ _ |
| 48 | rw [S.moduleCatHomologyIso.toLinearEquiv.symm.injective.eq_iff] |
| 49 | change (Submodule.Quotient.mk x : |
| 50 | LinearMap.ker S.g.hom ⧸ LinearMap.range S.moduleCatToCycles) = |
| 51 | Submodule.Quotient.mk y ↔ _ |
| 52 | rw [Submodule.Quotient.eq] |
| 53 | change (∃ z, S.moduleCatToCycles z = x - y) ↔ _ |
| 54 | constructor |
| 55 | · rintro ⟨z, hz⟩ |
| 56 | exact ⟨z, congrArg Subtype.val hz⟩ |
| 57 | · rintro ⟨z, hz⟩ |
| 58 | exact ⟨z, Subtype.ext hz⟩ |
| 59 | |
| 60 | private theorem cycleClass_eq_zero_iff_exists (S : ShortComplex (ModuleCat.{v} R)) |
| 61 | (x : LinearMap.ker S.g.hom) : |
| 62 | cycleClass S x = 0 ↔ ∃ z : S.X₁, S.f z = (x : S.X₂) := by |
| 63 | simpa using cycleClass_eq_iff_exists S x 0 |
| 64 | |
| 65 | private def cycleMap (φ : S ⟶ T) : |
| 66 | LinearMap.ker S.g.hom →ₗ[R] LinearMap.ker T.g.hom := |
| 67 | (φ.τ₂.hom.comp (LinearMap.ker S.g.hom).subtype).codRestrict _ fun x => by |
| 68 | change T.g (φ.τ₂ (x : S.X₂)) = 0 |
| 69 | have h := ConcreteCategory.congr_hom φ.comm₂₃ (x : S.X₂) |
| 70 | change T.g (φ.τ₂ (x : S.X₂)) = φ.τ₃ (S.g (x : S.X₂)) at h |
| 71 | exact h.trans (by rw [show S.g (x : S.X₂) = 0 from x.property, map_zero]) |
| 72 | |
| 73 | private theorem cycleClass_eq_homologyπ (S : ShortComplex (ModuleCat.{v} R)) |
| 74 | (x : LinearMap.ker S.g.hom) : |
| 75 | cycleClass S x = S.homologyπ (S.moduleCatCyclesIso.inv x) := by |
| 76 | exact (ConcreteCategory.congr_hom S.moduleCatCyclesIso_inv_π x).symm |
| 77 | |
| 78 | private theorem cycleMap_eq_cyclesMap (φ : S ⟶ T) |
| 79 | (x : LinearMap.ker S.g.hom) : |
| 80 | T.moduleCatCyclesIso.inv (cycleMap φ x) = |
| 81 | (ShortComplex.cyclesMap φ) (S.moduleCatCyclesIso.inv x) := by |
| 82 | apply (ModuleCat.mono_iff_injective T.iCycles).mp inferInstance |
| 83 | have hT := ConcreteCategory.congr_hom T.moduleCatCyclesIso_inv_iCycles (cycleMap φ x) |
| 84 | have hS := ConcreteCategory.congr_hom S.moduleCatCyclesIso_inv_iCycles x |
| 85 | have hφ := ConcreteCategory.congr_hom (ShortComplex.cyclesMap_i φ) |
| 86 | (S.moduleCatCyclesIso.inv x) |
| 87 | change T.iCycles (T.moduleCatCyclesIso.inv (cycleMap φ x)) = φ.τ₂ (x : S.X₂) at hT |
| 88 | change S.iCycles (S.moduleCatCyclesIso.inv x) = (x : S.X₂) at hS |
| 89 | change T.iCycles ((ShortComplex.cyclesMap φ) (S.moduleCatCyclesIso.inv x)) = |
| 90 | φ.τ₂ (S.iCycles (S.moduleCatCyclesIso.inv x)) at hφ |
| 91 | exact hT.trans (by rw [hS] at hφ; exact hφ.symm) |
| 92 | |
| 93 | private theorem cycleClass_naturality (φ : S ⟶ T) |
| 94 | (x : LinearMap.ker S.g.hom) : |
| 95 | (ShortComplex.homologyMap φ) (cycleClass S x) = cycleClass T (cycleMap φ x) := by |
| 96 | rw [cycleClass_eq_homologyπ, cycleClass_eq_homologyπ, cycleMap_eq_cyclesMap] |
| 97 | exact ConcreteCategory.congr_hom (ShortComplex.homologyπ_naturality φ) |
| 98 | (S.moduleCatCyclesIso.inv x) |
| 99 | |
| 100 | /-- A genuine homology isomorphism supplies a lift of each target cycle modulo |
| 101 | an actual boundary. -/ |
| 102 | theorem shortComplex_cycle_lift_of_quasiIso (φ : S ⟶ T) |
| 103 | (hφ : ShortComplex.QuasiIso φ) (y : T.X₂) (hy : T.g y = 0) : |
| 104 | ∃ x : S.X₂, S.g x = 0 ∧ ∃ z : T.X₁, T.f z = φ.τ₂ x - y := by |
| 105 | let : ShortComplex.QuasiIso φ := hφ |
| 106 | have hsurj := (ModuleCat.epi_iff_surjective (ShortComplex.homologyMap φ)).mp inferInstance |
| 107 | obtain ⟨a, ha⟩ := hsurj (cycleClass T ⟨y, hy⟩) |
| 108 | obtain ⟨x, rfl⟩ := cycleClass_surjective S a |
| 109 | refine ⟨x, x.property, ?_⟩ |
| 110 | exact (cycleClass_eq_iff_exists T (cycleMap φ x) ⟨y, hy⟩).mp |
| 111 | ((cycleClass_naturality φ x).symm.trans ha) |
| 112 | |
| 113 | /-- Injectivity of the actual homology isomorphism reflects boundaries. -/ |
| 114 | theorem shortComplex_boundary_reflection_of_quasiIso (φ : S ⟶ T) |
| 115 | (hφ : ShortComplex.QuasiIso φ) (x : S.X₂) (hx : S.g x = 0) |
| 116 | (hb : ∃ z : T.X₁, T.f z = φ.τ₂ x) : |
| 117 | ∃ z : S.X₁, S.f z = x := by |
| 118 | let : ShortComplex.QuasiIso φ := hφ |
| 119 | let x' : LinearMap.ker S.g.hom := ⟨x, hx⟩ |
| 120 | have hz : cycleClass T (cycleMap φ x') = 0 := |
| 121 | (cycleClass_eq_zero_iff_exists T (cycleMap φ x')).mpr hb |
| 122 | have hmap : (ShortComplex.homologyMap φ) (cycleClass S x') = 0 := |
| 123 | (cycleClass_naturality φ x').trans hz |
| 124 | have hinj := (ModuleCat.mono_iff_injective (ShortComplex.homologyMap φ)).mp inferInstance |
| 125 | have hs : cycleClass S x' = 0 := hinj (hmap.trans (map_zero _).symm) |
| 126 | exact (cycleClass_eq_zero_iff_exists S x').mp hs |
| 127 | |
| 128 | end RelativePrimitiveAux |
| 129 | |
| 130 | variable {C D : CochainComplex (ModuleCat.{v} R) ℕ} |
| 131 | |
| 132 | /-- A quasi-isomorphism of nonnegative cochain complexes lifts every target |
| 133 | cycle modulo a boundary, with the true zero-endpoint predecessor. -/ |
| 134 | theorem cycle_lift_of_quasiIso (f : C ⟶ D) (hf : QuasiIso f) |
| 135 | (n : ℕ) (y : D.X n) (hy : D.d n (n + 1) y = 0) : |
| 136 | ∃ x : C.X n, C.d n (n + 1) x = 0 ∧ |
| 137 | ∃ z : D.X n.pred, D.d n.pred n z = f.f n x - y := by |
| 138 | have hp : (ComplexShape.up ℕ).prev n = n.pred := by cases n <;> simp |
| 139 | have hφ := (quasiIsoAt_iff' f n.pred n (n + 1) hp (CochainComplex.next ℕ n)).mp |
| 140 | ((quasiIso_iff f).mp hf n) |
| 141 | exact RelativePrimitiveAux.shortComplex_cycle_lift_of_quasiIso |
| 142 | ((HomologicalComplex.shortComplexFunctor' (ModuleCat.{v} R) (ComplexShape.up ℕ) |
| 143 | n.pred n (n + 1)).map f) hφ y hy |
| 144 | |
| 145 | /-- A quasi-isomorphism reflects actual boundaries of source cocycles. -/ |
| 146 | theorem boundary_reflection_of_quasiIso (f : C ⟶ D) (hf : QuasiIso f) |
| 147 | (n : ℕ) (x : C.X n) (hx : C.d n (n + 1) x = 0) |
| 148 | (hb : ∃ z : D.X n.pred, D.d n.pred n z = f.f n x) : |
| 149 | ∃ z : C.X n.pred, C.d n.pred n z = x := by |
| 150 | have hp : (ComplexShape.up ℕ).prev n = n.pred := by cases n <;> simp |
| 151 | have hφ := (quasiIsoAt_iff' f n.pred n (n + 1) hp (CochainComplex.next ℕ n)).mp |
| 152 | ((quasiIso_iff f).mp hf n) |
| 153 | exact RelativePrimitiveAux.shortComplex_boundary_reflection_of_quasiIso |
| 154 | ((HomologicalComplex.shortComplexFunctor' (ModuleCat.{v} R) (ComplexShape.up ℕ) |
| 155 | n.pred n (n + 1)).map f) hφ x hx hb |
| 156 | |
| 157 | /-- A compatible source cocycle and target primitive admit a relative primitive. |
| 158 | The formula includes `n=0`, where the target's incoming differential is zero. -/ |
| 159 | theorem relative_primitive_succ (f : C ⟶ D) (hf : QuasiIso f) |
| 160 | (n : ℕ) (a : C.X (n + 1)) (b : D.X n) |
| 161 | (ha : C.d (n + 1) (n + 2) a = 0) |
| 162 | (hab : f.f (n + 1) a = D.d n (n + 1) b) : |
| 163 | ∃ c : C.X n, C.d n (n + 1) c = a ∧ |
| 164 | ∃ e : D.X n.pred, b = f.f n c - D.d n.pred n e := by |
| 165 | have hprimitive := boundary_reflection_of_quasiIso f hf (n + 1) a ha ⟨b, hab.symm⟩ |
| 166 | change ∃ c : C.X n, C.d n (n + 1) c = a at hprimitive |
| 167 | obtain ⟨c₀, hc₀⟩ := hprimitive |
| 168 | have hcomm := ConcreteCategory.congr_hom (f.comm n (n + 1)) c₀ |
| 169 | change D.d n (n + 1) (f.f n c₀) = f.f (n + 1) (C.d n (n + 1) c₀) at hcomm |
| 170 | have hr : D.d n (n + 1) (b - f.f n c₀) = 0 := by |
| 171 | rw [map_sub, hcomm, hc₀, ← hab, sub_self] |
| 172 | obtain ⟨z, hz, e, he⟩ := cycle_lift_of_quasiIso f hf n (b - f.f n c₀) hr |
| 173 | refine ⟨c₀ + z, ?_, e, ?_⟩ |
| 174 | · rw [map_add, hc₀, hz, add_zero] |
| 175 | · rw [map_add, he] |
| 176 | abel |
| 177 | |
| 178 | /-- In the lowest relative degree, there is no boundary correction in degree zero. -/ |
| 179 | theorem relative_primitive_zero (f : C ⟶ D) (hf : QuasiIso f) |
| 180 | (a : C.X 1) (b : D.X 0) (ha : C.d 1 2 a = 0) |
| 181 | (hab : f.f 1 a = D.d 0 1 b) : |
| 182 | ∃ c : C.X 0, C.d 0 1 c = a ∧ b = f.f 0 c := by |
| 183 | obtain ⟨c, hc, e, he⟩ := relative_primitive_succ f hf 0 a b ha hab |
| 184 | refine ⟨c, hc, ?_⟩ |
| 185 | have hshape : D.d 0 0 = 0 := D.shape 0 0 (by decide) |
| 186 | change b = f.f 0 c - D.d 0 0 e at he |
| 187 | rw [hshape] at he |
| 188 | change b = f.f 0 c - 0 at he |
| 189 | simpa only [sub_zero] using he |
| 190 | |
| 191 | /-- A source zero-cocycle killed by a quasi-isomorphism is zero, since there |
| 192 | is no nonzero incoming boundary in degree zero. -/ |
| 193 | theorem relative_cycle_zero (f : C ⟶ D) (hf : QuasiIso f) |
| 194 | (a : C.X 0) (ha : C.d 0 1 a = 0) (hfa : f.f 0 a = 0) : a = 0 := by |
| 195 | obtain ⟨c, hc⟩ := boundary_reflection_of_quasiIso f hf 0 a ha |
| 196 | ⟨0, by rw [map_zero, hfa]⟩ |
| 197 | have hshape : C.d 0 0 = 0 := C.shape 0 0 (by decide) |
| 198 | change C.d 0 0 c = a at hc |
| 199 | rw [hshape] at hc |
| 200 | exact hc.symm |
| 201 | |
| 202 | end |
| 203 | |
| 204 | end OAI.AlgebraicTopology.DeRham.Comparison.DoubleComplexRelativePrimitive.DoubleComplex |