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.IntersectionTheory.ProjectionFormula.CokernelLength |
| 2 | import Mathlib.LinearAlgebra.Prod |
| 3 | |
| 4 | /-! # Short Complex Colength -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ShortComplexColength |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Colength comparison for a short complex and an auxiliary lift. |
| 11 | The comparison uses actual kernels and cokernels and works over any ring. -/ |
| 12 | |
| 13 | variable (R : Type*) [Ring R] |
| 14 | {A B C : Type*} [AddCommGroup A] [AddCommGroup B] [AddCommGroup C] |
| 15 | [Module R A] [Module R B] [Module R C] |
| 16 | |
| 17 | def toCycles (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) : |
| 18 | A →ₗ[R] g.ker := |
| 19 | f.codRestrict g.ker (fun a => by |
| 20 | change g (f a) = 0 |
| 21 | exact DFunLike.congr_fun h a) |
| 22 | |
| 23 | def homologyToCokernel (f : A →ₗ[R] B) (g : B →ₗ[R] C) |
| 24 | (h : g.comp f = 0) (t : C →ₗ[R] B) : |
| 25 | (g.ker ⧸ (toCycles R f g h).range) →ₗ[R] B ⧸ (f.coprod t).range := |
| 26 | (toCycles R f g h).range.mapQ (f.coprod t).range g.ker.subtype (by |
| 27 | rintro x ⟨a, rfl⟩ |
| 28 | exact ⟨(a, 0), by simp [toCycles]⟩) |
| 29 | |
| 30 | theorem homologyToCokernel_injective (f : A →ₗ[R] B) (g : B →ₗ[R] C) |
| 31 | (h : g.comp f = 0) (t : C →ₗ[R] B) (ht : Function.Injective (g.comp t)) : |
| 32 | Function.Injective (homologyToCokernel R f g h t) := by |
| 33 | let j := f.coprod t |
| 34 | let k := toCycles R f g h |
| 35 | rw [← LinearMap.ker_eq_bot] |
| 36 | apply le_antisymm _ bot_le |
| 37 | intro x hx |
| 38 | obtain ⟨b, rfl⟩ := k.range.mkQ_surjective x |
| 39 | have hb : (b : B) ∈ j.range := (Submodule.Quotient.mk_eq_zero _).mp hx |
| 40 | obtain ⟨⟨a, c⟩, hac⟩ := hb |
| 41 | have hc : c = 0 := by |
| 42 | apply ht |
| 43 | change g (t c) = g (t 0) |
| 44 | have he := congrArg g hac |
| 45 | change g (f a + t c) = g b at he |
| 46 | rw [map_add, show g (f a) = 0 from DFunLike.congr_fun h a, |
| 47 | zero_add, b.property] at he |
| 48 | simpa using he |
| 49 | have hb' : b ∈ k.range := by |
| 50 | refine ⟨a, Subtype.ext ?_⟩ |
| 51 | change f a = (b : B) |
| 52 | simpa [j, hc] using hac |
| 53 | exact (Submodule.Quotient.mk_eq_zero _).mpr hb' |
| 54 | |
| 55 | theorem length_comparison (f : A →ₗ[R] B) (g : B →ₗ[R] C) |
| 56 | (h : g.comp f = 0) (t : C →ₗ[R] B) (ht : Function.Injective (g.comp t)) : |
| 57 | Module.length R (B ⧸ (f.coprod t).range) + Module.length R (C ⧸ g.range) = |
| 58 | Module.length R (g.ker ⧸ (toCycles R f g h).range) + |
| 59 | Module.length R (C ⧸ (g.comp t).range) := by |
| 60 | let j := f.coprod t |
| 61 | let k := toCycles R f g h |
| 62 | let gt := g.rangeRestrict.comp t |
| 63 | let u := homologyToCokernel R f g h t |
| 64 | let v : (B ⧸ j.range) →ₗ[R] g.range ⧸ gt.range := |
| 65 | j.range.mapQ gt.range g.rangeRestrict (by |
| 66 | rintro b ⟨⟨a, c⟩, rfl⟩ |
| 67 | refine ⟨c, ?_⟩ |
| 68 | apply Subtype.ext |
| 69 | change g (t c) = g (f a + t c) |
| 70 | rw [map_add, show g (f a) = 0 from DFunLike.congr_fun h a, zero_add]) |
| 71 | have hu : Function.Injective u := homologyToCokernel_injective R f g h t ht |
| 72 | have hv : Function.Surjective v := by |
| 73 | intro x |
| 74 | obtain ⟨c, rfl⟩ := gt.range.mkQ_surjective x |
| 75 | obtain ⟨b, hb⟩ := g.surjective_rangeRestrict c |
| 76 | refine ⟨j.range.mkQ b, ?_⟩ |
| 77 | change gt.range.mkQ (g.rangeRestrict b) = _ |
| 78 | rw [hb] |
| 79 | have he : Function.Exact u v := by |
| 80 | rw [LinearMap.exact_iff] |
| 81 | ext x |
| 82 | obtain ⟨b, rfl⟩ := j.range.mkQ_surjective x |
| 83 | constructor |
| 84 | · intro hb |
| 85 | have hg : g.rangeRestrict b ∈ gt.range := (Submodule.Quotient.mk_eq_zero _).mp hb |
| 86 | obtain ⟨c, hc⟩ := hg |
| 87 | have hb' : b - t c ∈ g.ker := by |
| 88 | change g (b - t c) = 0 |
| 89 | rw [map_sub, sub_eq_zero] |
| 90 | exact (congrArg Subtype.val hc).symm |
| 91 | refine ⟨k.range.mkQ ⟨b - t c, hb'⟩, ?_⟩ |
| 92 | change j.range.mkQ (b - t c) = j.range.mkQ b |
| 93 | rw [map_sub, sub_eq_self] |
| 94 | exact (Submodule.Quotient.mk_eq_zero _).mpr ⟨(0, c), by simp [j]⟩ |
| 95 | · rintro ⟨y, hy⟩ |
| 96 | obtain ⟨a, rfl⟩ := k.range.mkQ_surjective y |
| 97 | rw [← hy] |
| 98 | change gt.range.mkQ (g.rangeRestrict a) = 0 |
| 99 | have ha : g.rangeRestrict a = 0 := Subtype.ext a.property |
| 100 | rw [ha, map_zero] |
| 101 | have hlen := Module.length_eq_add_of_exact u v hu hv he |
| 102 | have hcomp := CokernelLength.length_cokernel_comp gt g.range.subtype |
| 103 | g.range.subtype_injective |
| 104 | have hmap : g.range.subtype.comp gt = g.comp t := rfl |
| 105 | rw [hmap] at hcomp |
| 106 | change Module.length R (B ⧸ j.range) = |
| 107 | Module.length R (g.ker ⧸ k.range) + Module.length R (g.range ⧸ gt.range) at hlen |
| 108 | rw [hlen, hcomp, add_assoc, Submodule.range_subtype] |
| 109 | |
| 110 | end |
| 111 | |
| 112 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ShortComplexColength |