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 | /-! # Calculus -/ |
| 4 | |
| 5 | namespace OAI.RepresentationTheory.Theta.Kernel.Calculus |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | open scoped BigOperators |
| 10 | |
| 11 | abbrev Covector2 := Fin 2 → ℂ |
| 12 | abbrev TensorCoordinates := (Fin 2 × Fin 2) → (Fin 2 × Fin 2) → ℂ |
| 13 | |
| 14 | def doubleAlt (h : TensorCoordinates) : ℂ := |
| 15 | (h (0, 0) (1, 1) - h (1, 0) (0, 1) |
| 16 | - h (0, 1) (1, 0) + h (1, 1) (0, 0)) / 2 |
| 17 | |
| 18 | def wedgeCoefficient (a b : Covector2) : ℂ := |
| 19 | a 0 * b 1 - a 1 * b 0 |
| 20 | |
| 21 | lemma exists_wedge_ne_zero {I₁ I₂ : Type*} |
| 22 | (f : I₁ → Covector2) (g : I₂ → Covector2) |
| 23 | (hf : Submodule.span ℂ (Set.range f) = ⊤) |
| 24 | (hg : Submodule.span ℂ (Set.range g) = ⊤) : |
| 25 | ∃ i j, wedgeCoefficient (f i) (g j) ≠ 0 := by |
| 26 | classical |
| 27 | by_contra! h |
| 28 | have hleft : ∀ a ∈ Submodule.span ℂ (Set.range f), |
| 29 | ∀ j, wedgeCoefficient a (g j) = 0 := by |
| 30 | intro a ha |
| 31 | induction ha using Submodule.span_induction with |
| 32 | | mem x hx => obtain ⟨i, rfl⟩ := hx; exact h i |
| 33 | | zero => intro j; simp [wedgeCoefficient] |
| 34 | | add x y _ _ hx hy => |
| 35 | intro j |
| 36 | dsimp [wedgeCoefficient] at * |
| 37 | linear_combination hx j + hy j |
| 38 | | smul c x _ hx => |
| 39 | intro j |
| 40 | dsimp [wedgeCoefficient] at * |
| 41 | linear_combination c * hx j |
| 42 | have hall : ∀ a b : Covector2, wedgeCoefficient a b = 0 := by |
| 43 | intro a b |
| 44 | have hb : b ∈ Submodule.span ℂ (Set.range g) := by rw [hg]; trivial |
| 45 | induction hb using Submodule.span_induction with |
| 46 | | mem x hx => |
| 47 | obtain ⟨j, rfl⟩ := hx |
| 48 | exact hleft a (by rw [hf]; trivial) j |
| 49 | | zero => simp [wedgeCoefficient] |
| 50 | | add x y _ _ hx hy => |
| 51 | dsimp [wedgeCoefficient] at * |
| 52 | linear_combination hx + hy |
| 53 | | smul c x _ hx => |
| 54 | dsimp [wedgeCoefficient] at * |
| 55 | linear_combination c * hx |
| 56 | have := hall ![1, 0] ![0, 1] |
| 57 | norm_num [wedgeCoefficient] at this |
| 58 | |
| 59 | variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] |
| 60 | |
| 61 | lemma hessian_apply_eq (f : E → ℂ) (hf : ContDiff ℂ 2 f) (x v w : E) : |
| 62 | iteratedFDeriv ℂ 2 f x ![v, w] = |
| 63 | fderiv ℂ (fun y => fderiv ℂ f y w) x v := by |
| 64 | rw [iteratedFDeriv_two_apply] |
| 65 | have hd : DifferentiableAt ℂ (fderiv ℂ f) x := |
| 66 | (hf.fderiv_right (m := 1) (by norm_num)).differentiable (by norm_num) x |
| 67 | rw [fderiv_clm_apply hd (differentiableAt_const w)] |
| 68 | simp |
| 69 | |
| 70 | lemma hessian_mul (f g : E → ℂ) |
| 71 | (hf : ContDiff ℂ 2 f) (hg : ContDiff ℂ 2 g) (x v w : E) : |
| 72 | iteratedFDeriv ℂ 2 (fun y => f y * g y) x ![v, w] = |
| 73 | iteratedFDeriv ℂ 2 f x ![v, w] * g x + |
| 74 | fderiv ℂ f x w * fderiv ℂ g x v + |
| 75 | fderiv ℂ f x v * fderiv ℂ g x w + |
| 76 | f x * iteratedFDeriv ℂ 2 g x ![v, w] := by |
| 77 | have hf' := hf.differentiable (by norm_num) |
| 78 | have hg' := hg.differentiable (by norm_num) |
| 79 | have hdf : Differentiable ℂ (fun y => fderiv ℂ f y w) := |
| 80 | ((hf.fderiv_right (m := 1) (by norm_num)).differentiable (by norm_num)).clm_apply |
| 81 | (differentiable_const w) |
| 82 | have hdg : Differentiable ℂ (fun y => fderiv ℂ g y w) := |
| 83 | ((hg.fderiv_right (m := 1) (by norm_num)).differentiable (by norm_num)).clm_apply |
| 84 | (differentiable_const w) |
| 85 | rw [hessian_apply_eq _ (hf.mul hg)] |
| 86 | have heq : (fun y => fderiv ℂ (fun z => f z * g z) y w) = |
| 87 | (fun y => fderiv ℂ f y w * g y + f y * fderiv ℂ g y w) := by |
| 88 | funext y |
| 89 | rw [fderiv_fun_mul (hf' y) (hg' y)] |
| 90 | simp [mul_comm, add_comm] |
| 91 | rw [heq] |
| 92 | have hd := ((hdf x).hasFDerivAt.fun_mul (hg' x).hasFDerivAt).fun_add |
| 93 | ((hf' x).hasFDerivAt.fun_mul (hdg x).hasFDerivAt) |
| 94 | rw [hd.fderiv] |
| 95 | rw [hessian_apply_eq f hf, hessian_apply_eq g hg] |
| 96 | simp only [_root_.add_apply, _root_.smul_apply, smul_eq_mul] |
| 97 | ring |
| 98 | |
| 99 | lemma mixed_hessian |
| 100 | {F G : Type*} [NormedAddCommGroup F] [NormedSpace ℂ F] |
| 101 | [NormedAddCommGroup G] [NormedSpace ℂ G] |
| 102 | (L : E →L[ℂ] F) (R : E →L[ℂ] G) |
| 103 | (f : F → ℂ) (g : G → ℂ) |
| 104 | (hf : ContDiff ℂ 2 f) (hg : ContDiff ℂ 2 g) |
| 105 | (v w : E) (hL : L w = 0) (hR : R v = 0) : |
| 106 | iteratedFDeriv ℂ 2 (fun y => f (L y) * g (R y)) 0 ![v, w] = |
| 107 | fderiv ℂ f 0 (L v) * fderiv ℂ g 0 (R w) := by |
| 108 | have hfL : ContDiff ℂ 2 (f ∘ L) := hf.comp L.contDiff |
| 109 | have hgR : ContDiff ℂ 2 (g ∘ R) := hg.comp R.contDiff |
| 110 | have hLf : iteratedFDeriv ℂ 2 (f ∘ L) 0 ![v, w] = 0 := by |
| 111 | rw [L.iteratedFDeriv_comp_right hf 0 le_rfl, |
| 112 | ContinuousMultilinearMap.compContinuousLinearMap_apply] |
| 113 | apply ContinuousMultilinearMap.map_coord_zero _ 1 |
| 114 | simpa using hL |
| 115 | have hRg : iteratedFDeriv ℂ 2 (g ∘ R) 0 ![v, w] = 0 := by |
| 116 | rw [R.iteratedFDeriv_comp_right hg 0 le_rfl, |
| 117 | ContinuousMultilinearMap.compContinuousLinearMap_apply] |
| 118 | apply ContinuousMultilinearMap.map_coord_zero _ 0 |
| 119 | simpa using hR |
| 120 | have hdL : fderiv ℂ (f ∘ L) 0 = (fderiv ℂ f 0).comp L := by |
| 121 | simpa using (hf.differentiable (by norm_num) (L 0)).hasFDerivAt.comp |
| 122 | 0 L.hasFDerivAt |>.fderiv |
| 123 | have hdR : fderiv ℂ (g ∘ R) 0 = (fderiv ℂ g 0).comp R := by |
| 124 | simpa using (hg.differentiable (by norm_num) (R 0)).hasFDerivAt.comp |
| 125 | 0 R.hasFDerivAt |>.fderiv |
| 126 | have h := hessian_mul (f ∘ L) (g ∘ R) hfL hgR 0 v w |
| 127 | simpa [hLf, hRg, hdL, hdR, hL, hR] using h |
| 128 | |
| 129 | end |
| 130 | |
| 131 | end OAI.RepresentationTheory.Theta.Kernel.Calculus |