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.RingTheory.Trace.Defs |
| 2 | import Mathlib.RingTheory.Derivation.Basic |
| 3 | |
| 4 | /-! # Free Trace Derivation -/ |
| 5 | |
| 6 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.Finite.FreeTraceDerivation |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Finite free algebra trace commutes with compatible derivations. |
| 11 | The proof differentiates multiplication matrices and cancels the trace |
| 12 | of the change-of-frame commutator. -/ |
| 13 | |
| 14 | universe u v w z |
| 15 | |
| 16 | variable {R : Type u} {A : Type v} {B : Type w} {ι : Type z} |
| 17 | [CommRing R] [CommRing A] [CommRing B] |
| 18 | [Algebra R A] [Algebra R B] [Algebra A B] |
| 19 | [Fintype ι] (b : Module.Basis ι A B) |
| 20 | (D : Derivation R A A) (E : Derivation R B B) |
| 21 | (h : ∀ a : A, E (algebraMap A B a) = algebraMap A B (D a)) |
| 22 | |
| 23 | include h in |
| 24 | theorem derivation_smul (a : A) (x : B) : |
| 25 | E (a • x) = D a • x + a • E x := by |
| 26 | simp only [Algebra.smul_def, E.leibniz, h, Algebra.algebraMap_self_apply] |
| 27 | ring |
| 28 | |
| 29 | include h in |
| 30 | theorem coordinate_derivation (x : B) (i : ι) : |
| 31 | b.repr (E x) i = D (b.repr x i) + |
| 32 | ∑ j, b.repr x j * b.repr (E (b j)) i := by |
| 33 | classical |
| 34 | calc |
| 35 | b.repr (E x) i = b.coord i (E (∑ j, b.repr x j • b j)) := |
| 36 | congrArg (fun y => b.repr (E y) i) (b.sum_repr x).symm |
| 37 | _ = ∑ j, (D (b.repr x j) * b.repr (b j) i + |
| 38 | b.repr x j * b.repr (E (b j)) i) := by |
| 39 | simp only [map_sum, derivation_smul D E h, map_add, map_smul, |
| 40 | smul_eq_mul, Module.Basis.coord_apply] |
| 41 | _ = D (b.repr x i) + ∑ j, b.repr x j * b.repr (E (b j)) i := by |
| 42 | rw [Finset.sum_add_distrib] |
| 43 | simp only [Module.Basis.repr_self_apply, mul_ite, mul_one, mul_zero, |
| 44 | Finset.sum_ite_eq', Finset.mem_univ, ite_true] |
| 45 | |
| 46 | theorem coordinate_mul (x y : B) (i : ι) : |
| 47 | b.repr (x * y) i = ∑ j, b.repr y j * b.repr (x * b j) i := by |
| 48 | calc |
| 49 | b.repr (x * y) i = b.coord i (x * ∑ j, b.repr y j • b j) := |
| 50 | congrArg (fun z => b.repr (x * z) i) (b.sum_repr y).symm |
| 51 | _ = ∑ j, b.repr y j * b.repr (x * b j) i := by |
| 52 | simp only [Finset.mul_sum, mul_smul_comm, map_sum, map_smul, |
| 53 | smul_eq_mul, Module.Basis.coord_apply] |
| 54 | |
| 55 | theorem trace_eq_sum (x : B) : |
| 56 | Algebra.trace A B x = ∑ i, b.repr (x * b i) i := by |
| 57 | classical |
| 58 | rw [Algebra.trace_eq_matrix_trace b] |
| 59 | simp only [Matrix.trace, Matrix.diag_apply, Algebra.leftMulMatrix_eq_repr_mul] |
| 60 | |
| 61 | include b h in |
| 62 | theorem trace_derivation (x : B) : |
| 63 | Algebra.trace A B (E x) = D (Algebra.trace A B x) := by |
| 64 | classical |
| 65 | have hi (i : ι) : b.repr (x * E (b i)) i + b.repr (E x * b i) i = |
| 66 | D (b.repr (x * b i) i) + |
| 67 | ∑ j, b.repr (x * b i) j * b.repr (E (b j)) i := by |
| 68 | have he := coordinate_derivation b D E h (x * b i) i |
| 69 | rw [E.leibniz] at he |
| 70 | simpa only [smul_eq_mul, map_add, Finsupp.add_apply, mul_comm (b i) (E x)] using he |
| 71 | have hs := congrArg (fun z : ι → A => ∑ i, z i) (funext hi) |
| 72 | simp only [Finset.sum_add_distrib] at hs |
| 73 | have hc : (∑ i, b.repr (x * E (b i)) i) = |
| 74 | ∑ i, ∑ j, b.repr (x * b i) j * b.repr (E (b j)) i := by |
| 75 | calc |
| 76 | (∑ i, b.repr (x * E (b i)) i) = |
| 77 | ∑ i, ∑ j, b.repr (E (b i)) j * b.repr (x * b j) i := |
| 78 | Finset.sum_congr rfl (fun i _ => coordinate_mul b x (E (b i)) i) |
| 79 | _ = ∑ i, ∑ j, b.repr (x * b i) j * b.repr (E (b j)) i := by |
| 80 | rw [Finset.sum_comm] |
| 81 | apply Finset.sum_congr rfl |
| 82 | intro i _ |
| 83 | apply Finset.sum_congr rfl |
| 84 | intro j _ |
| 85 | exact mul_comm _ _ |
| 86 | rw [hc] at hs |
| 87 | have ht : (∑ i, b.repr (E x * b i) i) = ∑ i, D (b.repr (x * b i) i) := by |
| 88 | exact add_left_cancel (hs.trans (add_comm _ _)) |
| 89 | simpa only [trace_eq_sum b, map_sum] using ht |
| 90 | |
| 91 | end |
| 92 | |
| 93 | end OAI.NumberTheory.PadicHodge.IntegralComparison.Finite.FreeTraceDerivation |