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 | /-! # Hermitian Diagonal -/ |
| 4 | |
| 5 | namespace OAI.RepresentationTheory.Weil.UnitarySplitting.HermitianDiagonal.Construction |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! Orthogonal bases for Hermitian forms with a nontrivial field involution. |
| 10 | The proof works directly with semilinear forms, including indefinite forms. -/ |
| 11 | |
| 12 | open _root_.Module LinearMap |
| 13 | |
| 14 | variable {E V : Type} [Field E] [AddCommGroup V] [Module E V] |
| 15 | variable (σ : E →+* E) (B : V →ₛₗ[σ] V →ₗ[E] E) |
| 16 | |
| 17 | theorem semilinear_self_ne_zero (hne : ∃ a : E, σ a ≠ a) (hB : B ≠ 0) : |
| 18 | ∃ x, B x x ≠ 0 := by |
| 19 | by_contra! hz |
| 20 | apply hB |
| 21 | apply LinearMap.ext |
| 22 | intro x |
| 23 | apply LinearMap.ext |
| 24 | intro y |
| 25 | obtain ⟨a, ha⟩ := hne |
| 26 | have hxy : B x y + B y x = 0 := by |
| 27 | have hh := hz (x + y) |
| 28 | simpa only [map_add, LinearMap.add_apply, hz, zero_add, add_zero, add_comm] using hh |
| 29 | have haxy : a * B x y + σ a * B y x = 0 := by |
| 30 | have hh := hz (x + a • y) |
| 31 | simp only [map_add, LinearMap.add_apply, map_smulₛₗ, LinearMap.smul_apply, |
| 32 | RingHom.id_apply, smul_eq_mul, hz, mul_zero, zero_add, add_zero] at hh |
| 33 | simpa only [add_comm] using hh |
| 34 | change B x y = 0 |
| 35 | have hmul : (a - σ a) * B x y = 0 := by linear_combination haxy - σ a * hxy |
| 36 | exact (mul_eq_zero.mp hmul).resolve_left (sub_ne_zero.mpr ha.symm) |
| 37 | |
| 38 | theorem semilinear_orthogonal_singleton_ker (x : V) : |
| 39 | (E ∙ x).orthogonalBilin B = LinearMap.ker (B x) := by |
| 40 | ext y |
| 41 | simp only [Submodule.mem_orthogonalBilin, LinearMap.mem_ker] |
| 42 | constructor |
| 43 | · exact fun h => h x (Submodule.mem_span_singleton_self x) |
| 44 | · intro h z hz |
| 45 | obtain ⟨a, rfl⟩ := Submodule.mem_span_singleton.mp hz |
| 46 | rw [map_smulₛₗ₂, h, smul_zero] |
| 47 | |
| 48 | theorem semilinear_orthogonal_isCompl (x : V) (hx : B x x ≠ 0) : |
| 49 | IsCompl (E ∙ x) ((E ∙ x).orthogonalBilin B) where |
| 50 | disjoint := disjoint_iff.mpr (LinearMap.span_singleton_inf_orthogonal_eq_bot B x hx) |
| 51 | codisjoint := by |
| 52 | rw [codisjoint_iff, semilinear_orthogonal_singleton_ker] |
| 53 | exact (B x).span_singleton_sup_ker_eq_top hx |
| 54 | |
| 55 | theorem hermitian_orthogonal_basis [FiniteDimensional E V] |
| 56 | (hne : ∃ a : E, σ a ≠ a) (hsym : B.IsSymm) : |
| 57 | ∃ b : Basis (Fin (Module.finrank E V)) E V, B.IsOrthoᵢ b := by |
| 58 | suffices ∀ d, Module.finrank E V = d → ∃ b : Basis (Fin d) E V, B.IsOrthoᵢ b by exact this _ rfl |
| 59 | intro d hd |
| 60 | induction d generalizing V with |
| 61 | | zero => exact ⟨basisOfFinrankZero hd, fun _ _ _ => map_zero _⟩ |
| 62 | | succ d ih => |
| 63 | obtain rfl | hB := eq_or_ne B 0 |
| 64 | · let b := Module.finBasis E V |
| 65 | rw [hd] at b |
| 66 | exact ⟨b, fun _ _ _ => rfl⟩ |
| 67 | obtain ⟨x, hx⟩ := semilinear_self_ne_zero σ B hne hB |
| 68 | rw [← Submodule.finrank_add_eq_of_isCompl (semilinear_orthogonal_isCompl σ B x hx).symm, |
| 69 | finrank_span_singleton (ne_zero_of_map hx)] at hd |
| 70 | let W := (E ∙ x).orthogonalBilin B |
| 71 | let B' := B.domRestrict₁₂ W W |
| 72 | obtain ⟨b', hb'⟩ := ih B' (hsym.domRestrict W) (Nat.succ.inj hd) |
| 73 | let b := Basis.mkFinCons x b' |
| 74 | (by |
| 75 | rintro c y hy hc |
| 76 | rw [add_eq_zero_iff_neg_eq] at hc |
| 77 | rw [← hc, Submodule.neg_mem_iff] at hy |
| 78 | have hdis := (semilinear_orthogonal_isCompl σ B x hx).disjoint |
| 79 | rw [Submodule.disjoint_def] at hdis |
| 80 | have hz := hdis (c • x) (Submodule.smul_mem _ _ (Submodule.mem_span_singleton_self _)) hy |
| 81 | exact (smul_eq_zero.mp hz).resolve_right (fun hz => hx (hz.symm ▸ map_zero _))) |
| 82 | (by |
| 83 | intro y |
| 84 | refine ⟨-B x y / B x x, fun z hz => ?_⟩ |
| 85 | obtain ⟨a, rfl⟩ := Submodule.mem_span_singleton.mp hz |
| 86 | simp only [map_smulₛₗ₂, map_add, map_smul, smul_eq_mul] |
| 87 | field_simp |
| 88 | ring) |
| 89 | refine ⟨b, ?_⟩ |
| 90 | rw [Basis.coe_mkFinCons] |
| 91 | intro j i |
| 92 | refine Fin.cases ?_ (fun i => ?_) i <;> refine Fin.cases ?_ (fun j => ?_) j <;> intro hij <;> |
| 93 | simp only [Function.onFun, Fin.cons_zero, Fin.cons_succ, Function.comp_apply] |
| 94 | · exact (hij rfl).elim |
| 95 | · rw [← hsym.eq x (b' j), (b' j).property x (Submodule.mem_span_singleton_self x), map_zero] |
| 96 | · exact (b' i).property x (Submodule.mem_span_singleton_self x) |
| 97 | · exact hb' (ne_of_apply_ne _ hij) |
| 98 | |
| 99 | end |
| 100 | |
| 101 | end OAI.RepresentationTheory.Weil.UnitarySplitting.HermitianDiagonal.Construction |