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.FundamentalClass.DuffyDerivative |
| 2 | import Mathlib.MeasureTheory.Function.Jacobian |
| 3 | import Mathlib.MeasureTheory.Constructions.Pi |
| 4 | |
| 5 | /-! # Integration Duffy Orientation -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicTopology.FundamentalClass.IntegrationDuffyOrientation.Construction.Duffy |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | section |
| 12 | |
| 13 | /-! Integration: the omitted-barycentric-coordinate change contributes precisely |
| 14 | the sign used by the existing signed Duffy simplex integral. -/ |
| 15 | |
| 16 | open Set _root_.MeasureTheory |
| 17 | open scoped ContDiff |
| 18 | |
| 19 | abbrev realSnoc {d : ℕ} (v : Fin d → ℝ) (a : ℝ) : Fin (d + 1) → ℝ := |
| 20 | Fin.snoc v a |
| 21 | |
| 22 | def tailConstant (d : ℕ) : Fin d → ℝ := |
| 23 | Fin.tail (Pi.single (Fin.last d) (1 : ℝ) : Fin (d + 1) → ℝ) |
| 24 | |
| 25 | def tailLinear (d : ℕ) : (Fin d → ℝ) →ₗ[ℝ] (Fin d → ℝ) where |
| 26 | toFun v := Fin.tail (realSnoc v (-∑ i, v i)) |
| 27 | map_add' v w := by |
| 28 | have h : realSnoc (v + w) (-∑ i, (v + w) i) = |
| 29 | realSnoc v (-∑ i, v i) + realSnoc w (-∑ i, w i) := by |
| 30 | ext j |
| 31 | refine Fin.lastCases ?_ (fun k => ?_) j <;> simp [Finset.sum_add_distrib, add_comm] |
| 32 | exact congrArg Fin.tail h |
| 33 | map_smul' c v := by |
| 34 | have h : realSnoc (c • v) (-∑ i, (c • v) i) = c • realSnoc v (-∑ i, v i) := by |
| 35 | ext j |
| 36 | refine Fin.lastCases ?_ (fun k => ?_) j <;> |
| 37 | simp [Finset.mul_sum, mul_neg, smul_eq_mul] |
| 38 | exact congrArg Fin.tail h |
| 39 | |
| 40 | theorem tailLinear_castSucc (d : ℕ) (v : Fin (d + 1) → ℝ) (i : Fin d) : |
| 41 | tailLinear (d + 1) v i.castSucc = v i.succ := by |
| 42 | change realSnoc v (-∑ k, v k) i.succ.castSucc = v i.succ |
| 43 | simp only [realSnoc, Fin.snoc_castSucc] |
| 44 | |
| 45 | theorem tailLinear_last (d : ℕ) (v : Fin (d + 1) → ℝ) : |
| 46 | tailLinear (d + 1) v (Fin.last d) = -∑ k, v k := by |
| 47 | change realSnoc v (-∑ k, v k) (Fin.last (d + 1)) = _ |
| 48 | simp only [realSnoc, Fin.snoc_last] |
| 49 | |
| 50 | def tailMatrix (d : ℕ) : Matrix (Fin d) (Fin d) ℝ := |
| 51 | LinearMap.toMatrix (Pi.basisFun ℝ (Fin d)) (Pi.basisFun ℝ (Fin d)) (tailLinear d) |
| 52 | |
| 53 | theorem tailMatrix_apply (d : ℕ) (i j : Fin d) : |
| 54 | tailMatrix d i j = tailLinear d (Pi.single j 1) i := by simp [tailMatrix] |
| 55 | |
| 56 | theorem tailMatrix_castSucc (d : ℕ) (i : Fin d) (j : Fin (d + 1)) : |
| 57 | tailMatrix (d + 1) i.castSucc j = if j = i.succ then 1 else 0 := by |
| 58 | rw [tailMatrix_apply, tailLinear_castSucc] |
| 59 | classical |
| 60 | simp only [Pi.single_apply] |
| 61 | split_ifs <;> simp_all |
| 62 | |
| 63 | theorem tailMatrix_last (d : ℕ) (j : Fin (d + 1)) : |
| 64 | tailMatrix (d + 1) (Fin.last d) j = -1 := by |
| 65 | rw [tailMatrix_apply, tailLinear_last] |
| 66 | simp |
| 67 | |
| 68 | theorem tailLinear_det (d : ℕ) : (tailLinear d).det = (-1 : ℝ) ^ d := by |
| 69 | rw [← LinearMap.det_toMatrix (Pi.basisFun ℝ (Fin d))] |
| 70 | change (tailMatrix d).det = _ |
| 71 | cases d with |
| 72 | | zero => simp |
| 73 | | succ d => |
| 74 | rw [Matrix.det_succ_column_zero, Finset.sum_eq_single (Fin.last d)] |
| 75 | · have hm : (tailMatrix (d + 1)).submatrix (Fin.last d).succAbove Fin.succ = 1 := by |
| 76 | ext i j |
| 77 | simp [Matrix.submatrix_apply, tailMatrix_castSucc, Matrix.one_apply, eq_comm] |
| 78 | rw [tailMatrix_last, hm, Matrix.det_one, mul_one] |
| 79 | simp [pow_succ] |
| 80 | · intro i _ hi |
| 81 | obtain ⟨j, rfl⟩ := Fin.eq_castSucc_of_ne_last hi |
| 82 | rw [tailMatrix_castSucc] |
| 83 | simp [Ne.symm (Fin.succ_ne_zero j)] |
| 84 | · simp |
| 85 | |
| 86 | def tailAffine (d : ℕ) (x : Fin d → ℝ) : Fin d → ℝ := |
| 87 | tailLinear d x + tailConstant d |
| 88 | |
| 89 | theorem tailAffine_eq (d : ℕ) (x : Fin d → ℝ) : |
| 90 | tailAffine d x = Fin.tail (realSnoc x (1 - ∑ i, x i)) := by |
| 91 | have h : realSnoc x (-∑ i, x i) + (Pi.single (Fin.last d) (1 : ℝ) : Fin (d + 1) → ℝ) = |
| 92 | realSnoc x (1 - ∑ i, x i) := by |
| 93 | ext j |
| 94 | refine Fin.lastCases ?_ (fun k => ?_) j |
| 95 | · simp [sub_eq_add_neg, add_comm] |
| 96 | · simp |
| 97 | exact congrArg Fin.tail h |
| 98 | |
| 99 | theorem tailAffine_hasFDerivAt (d : ℕ) (x : Fin d → ℝ) : |
| 100 | HasFDerivAt (tailAffine d) (tailLinear d).toContinuousLinearMap x := |
| 101 | (tailLinear d).toContinuousLinearMap.hasFDerivAt.add_const _ |
| 102 | |
| 103 | theorem tailAffine_injective (d : ℕ) : Function.Injective (tailAffine d) := by |
| 104 | intro x y h |
| 105 | have hlin : tailLinear d x = tailLinear d y := add_right_cancel (show tailLinear d x + tailConstant d = tailLinear d y + tailConstant d from h) |
| 106 | have hn : (tailLinear d).det ≠ 0 := by |
| 107 | rw [tailLinear_det] |
| 108 | exact pow_ne_zero _ (by norm_num) |
| 109 | have hk : (tailLinear d).ker = ⊥ := |
| 110 | not_ne_iff.mp (mt LinearMap.det_eq_zero_iff_ker_ne_bot.mpr hn) |
| 111 | exact (LinearMap.ker_eq_bot.mp hk) hlin |
| 112 | |
| 113 | def tail (d : ℕ) (t : Fin d → ℝ) : Fin d → ℝ := |
| 114 | Fin.tail (DeRham.Comparison.DuffyCoordinates.Duffy.coordinates d t) |
| 115 | |
| 116 | theorem coordinates_eq_snoc (d : ℕ) (t : Fin d → ℝ) : |
| 117 | DeRham.Comparison.DuffyCoordinates.Duffy.coordinates d t = realSnoc (DuffyDomain.IntegrationConstruction.Duffy.front d t) (1 - ∑ i, DuffyDomain.IntegrationConstruction.Duffy.front d t i) := by |
| 118 | ext j |
| 119 | refine Fin.lastCases ?_ (fun i => ?_) j |
| 120 | · simp only [realSnoc, Fin.snoc_last] |
| 121 | have h := DeRham.Comparison.DuffyCoordinates.Duffy.sum_coordinates d t |
| 122 | rw [Fin.sum_univ_castSucc] at h |
| 123 | change (∑ i, DuffyDomain.IntegrationConstruction.Duffy.front d t i) + DeRham.Comparison.DuffyCoordinates.Duffy.coordinates d t (Fin.last d) = 1 at h |
| 124 | linarith |
| 125 | · simp only [realSnoc, Fin.snoc_castSucc] |
| 126 | rfl |
| 127 | |
| 128 | theorem tail_eq_comp (d : ℕ) : Duffy.tail d = tailAffine d ∘ DuffyDomain.IntegrationConstruction.Duffy.front d := by |
| 129 | funext t |
| 130 | rw [Function.comp_apply, tailAffine_eq, Duffy.tail, coordinates_eq_snoc] |
| 131 | |
| 132 | theorem tail_hasFDerivAt (d : ℕ) (t : Fin d → ℝ) : |
| 133 | HasFDerivAt (Duffy.tail d) |
| 134 | ((tailLinear d).toContinuousLinearMap.comp (fderiv ℝ (DuffyDomain.IntegrationConstruction.Duffy.front d) t)) t := by |
| 135 | rw [tail_eq_comp] |
| 136 | exact (tailAffine_hasFDerivAt d _).comp t |
| 137 | ((DuffyDomain.IntegrationConstruction.Duffy.front_contDiff d).differentiable (by simp)).differentiableAt.hasFDerivAt |
| 138 | |
| 139 | theorem fderiv_tail_det (d : ℕ) (t : Fin d → ℝ) : |
| 140 | (fderiv ℝ (Duffy.tail d) t).toLinearMap.det = |
| 141 | (-1 : ℝ) ^ d * (fderiv ℝ (DuffyDomain.IntegrationConstruction.Duffy.front d) t).toLinearMap.det := by |
| 142 | rw [(tail_hasFDerivAt d t).fderiv] |
| 143 | change ((tailLinear d).comp (fderiv ℝ (DuffyDomain.IntegrationConstruction.Duffy.front d) t).toLinearMap).det = _ |
| 144 | rw [LinearMap.det_comp, tailLinear_det] |
| 145 | |
| 146 | end |
| 147 | |
| 148 | section |
| 149 | |
| 150 | open Set |
| 151 | |
| 152 | theorem coordinates_pos (d : ℕ) (t : Fin d → ℝ) (ht : t ∈ DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d) |
| 153 | (j : Fin (d + 1)) : 0 < DeRham.Comparison.DuffyCoordinates.Duffy.coordinates d t j := by |
| 154 | rw [coordinates_eq_snoc] |
| 155 | refine Fin.lastCases ?_ (fun i => ?_) j |
| 156 | · simpa only [realSnoc, Fin.snoc_last] using |
| 157 | sub_pos.mpr (DuffyDomain.IntegrationConstruction.Duffy.front_mem_simplexInterior d t ht).2 |
| 158 | · simpa only [realSnoc, Fin.snoc_castSucc] using |
| 159 | (DuffyDomain.IntegrationConstruction.Duffy.front_mem_simplexInterior d t ht).1 i |
| 160 | |
| 161 | theorem coordinates_surjective_on_interior (d : ℕ) (z : Fin (d + 1) → ℝ) |
| 162 | (hz : ∀ j, 0 < z j) (hs : ∑ j, z j = 1) : |
| 163 | ∃ t ∈ DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d, DeRham.Comparison.DuffyCoordinates.Duffy.coordinates d t = z := by |
| 164 | let x : Fin d → ℝ := fun i => z i.castSucc |
| 165 | have hs' : (∑ i, x i) + z (Fin.last d) = 1 := by |
| 166 | simpa only [x, Fin.sum_univ_castSucc] using hs |
| 167 | have hx : x ∈ DuffyDomain.IntegrationConstruction.Duffy.simplexInterior d := |
| 168 | ⟨fun i => hz i.castSucc, by linarith [hz (Fin.last d)]⟩ |
| 169 | refine ⟨DuffyDomain.IntegrationConstruction.Duffy.inverse d x, DuffyDomain.IntegrationConstruction.Duffy.inverse_mem_cubeInterior d x hx, ?_⟩ |
| 170 | rw [coordinates_eq_snoc, DuffyDomain.IntegrationConstruction.Duffy.front_inverse d x hx] |
| 171 | ext j |
| 172 | refine Fin.lastCases ?_ (fun i => ?_) j |
| 173 | · simp only [realSnoc, Fin.snoc_last] |
| 174 | linarith |
| 175 | · simp only [realSnoc, Fin.snoc_castSucc] |
| 176 | rfl |
| 177 | |
| 178 | theorem tail_image (d : ℕ) : Duffy.tail d '' DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d = DuffyDomain.IntegrationConstruction.Duffy.simplexInterior d := by |
| 179 | apply Set.Subset.antisymm |
| 180 | · rintro _ ⟨t, ht, rfl⟩ |
| 181 | constructor |
| 182 | · intro j |
| 183 | exact coordinates_pos d t ht j.succ |
| 184 | · have hs := DeRham.Comparison.DuffyCoordinates.Duffy.sum_coordinates d t |
| 185 | rw [Fin.sum_univ_succ] at hs |
| 186 | have hp := coordinates_pos d t ht 0 |
| 187 | change ∑ j : Fin d, DeRham.Comparison.DuffyCoordinates.Duffy.coordinates d t j.succ < 1 |
| 188 | linarith |
| 189 | · intro x hx |
| 190 | let z : Fin (d + 1) → ℝ := Fin.cons (1 - ∑ i, x i) x |
| 191 | have hz : ∀ j, 0 < z j := by |
| 192 | intro j |
| 193 | refine Fin.cases ?_ (fun i => ?_) j |
| 194 | · exact sub_pos.mpr hx.2 |
| 195 | · exact hx.1 i |
| 196 | have hs : ∑ j, z j = 1 := by |
| 197 | rw [Fin.sum_univ_succ] |
| 198 | simp only [z, Fin.cons_zero, Fin.cons_succ] |
| 199 | ring |
| 200 | obtain ⟨t, ht, heq⟩ := coordinates_surjective_on_interior d z hz hs |
| 201 | refine ⟨t, ht, ?_⟩ |
| 202 | rw [Duffy.tail, heq] |
| 203 | exact Fin.tail_cons _ _ |
| 204 | |
| 205 | end |
| 206 | |
| 207 | /-! The signed Duffy integral is the ordinary Lebesgue integral on the |
| 208 | interior of the standard affine simplex. -/ |
| 209 | |
| 210 | open Set _root_.MeasureTheory |
| 211 | |
| 212 | set_option backward.isDefEq.respectTransparency false |
| 213 | |
| 214 | theorem cubeInterior_isOpen (d : ℕ) : IsOpen (DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d) := by |
| 215 | change IsOpen {t : Fin d → ℝ | ∀ i, 0 < t i ∧ t i < 1} |
| 216 | simp only [ofPred_forall] |
| 217 | exact isOpen_iInter_of_finite fun i => |
| 218 | (isOpen_lt continuous_const (continuous_apply i)).inter |
| 219 | (isOpen_lt (continuous_apply i) continuous_const) |
| 220 | |
| 221 | theorem cubeInterior_ae_eq_Icc (d : ℕ) : |
| 222 | DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d =ᵐ[volume] Icc (0 : Fin d → ℝ) 1 := by |
| 223 | have h := Measure.univ_pi_Ioo_ae_eq_Icc |
| 224 | (μ := fun _ : Fin d => (volume : Measure ℝ)) |
| 225 | (f := (0 : Fin d → ℝ)) (g := 1) |
| 226 | have heq : (univ.pi fun _ : Fin d => Ioo (0 : ℝ) 1) = DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d := by |
| 227 | ext t |
| 228 | simp [DuffyDomain.IntegrationConstruction.Duffy.cubeInterior] |
| 229 | simpa only [heq, Pi.zero_apply, Pi.one_apply, MeasureTheory.volume_pi] using h |
| 230 | |
| 231 | theorem tail_injOn (d : ℕ) : Set.InjOn (Duffy.tail d) (DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d) := by |
| 232 | rw [tail_eq_comp] |
| 233 | exact (tailAffine_injective d).injOn.comp (DuffyDomain.IntegrationConstruction.Duffy.front_injOn d) (mapsTo_image _ _) |
| 234 | |
| 235 | theorem signed_tail_det (d : ℕ) (t : Fin d → ℝ) (ht : t ∈ DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d) : |
| 236 | (-1 : ℝ) ^ d * (fderiv ℝ (Duffy.tail d) t).toLinearMap.det = |
| 237 | |(fderiv ℝ (Duffy.tail d) t).toLinearMap.det| := by |
| 238 | have hsign : (-1 : ℝ) ^ d * (-1 : ℝ) ^ d = 1 := by |
| 239 | rw [← mul_pow] |
| 240 | norm_num |
| 241 | rw [fderiv_tail_det, abs_mul, abs_pow] |
| 242 | simp only [abs_neg, abs_one, one_pow, one_mul, ← mul_assoc, hsign, |
| 243 | abs_of_pos (DuffyDerivative.IntegrationConstruction.Duffy.fderiv_front_det_pos d t ht)] |
| 244 | |
| 245 | theorem signed_integral_tail (d : ℕ) (g : (Fin d → ℝ) → ℂ) : |
| 246 | (-1 : ℝ) ^ d • |
| 247 | (∫ t in Icc (0 : Fin d → ℝ) 1, |
| 248 | (fderiv ℝ (Duffy.tail d) t).toLinearMap.det • g (Duffy.tail d t)) = |
| 249 | ∫ x in Duffy.tail d '' DuffyDomain.IntegrationConstruction.Duffy.cubeInterior d, g x := by |
| 250 | rw [← setIntegral_congr_set (cubeInterior_ae_eq_Icc d)] |
| 251 | rw [integral_image_eq_integral_abs_det_fderiv_smul volume |
| 252 | (cubeInterior_isOpen d).measurableSet |
| 253 | (fun t _ => (tail_hasFDerivAt d t).hasFDerivWithinAt) (tail_injOn d) g] |
| 254 | rw [← integral_smul] |
| 255 | apply setIntegral_congr_fun (cubeInterior_isOpen d).measurableSet |
| 256 | intro t ht |
| 257 | dsimp only |
| 258 | rw [smul_smul, signed_tail_det d t ht] |
| 259 | rw [(tail_hasFDerivAt d t).fderiv] |
| 260 | |
| 261 | theorem signed_integral_simplex (d : ℕ) (g : (Fin d → ℝ) → ℂ) : |
| 262 | (-1 : ℝ) ^ d • |
| 263 | (∫ t in Icc (0 : Fin d → ℝ) 1, |
| 264 | (fderiv ℝ (Duffy.tail d) t).toLinearMap.det • g (Duffy.tail d t)) = |
| 265 | ∫ x in DuffyDomain.IntegrationConstruction.Duffy.simplexInterior d, g x := by |
| 266 | rw [signed_integral_tail, tail_image] |
| 267 | |
| 268 | end |
| 269 | |
| 270 | end OAI.AlgebraicTopology.FundamentalClass.IntegrationDuffyOrientation.Construction.Duffy |