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.FormalGeometry.Completion.NonnegativeQuadraticBilinear |
| 2 | import OAI.AlgebraicGeometry.FormalGeometry.Completion.RationalizationDetection |
| 3 | import Mathlib.LinearAlgebra.BilinearForm.TensorProduct |
| 4 | import Mathlib.LinearAlgebra.QuadraticForm.TensorProduct |
| 5 | |
| 6 | /-! # Rational Quadratic Form -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.FormalGeometry.Completion |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! The rational quadratic form on the rationalization of an abelian group, |
| 13 | with positivity obtained by clearing denominators. -/ |
| 14 | |
| 15 | open scoped TensorProduct |
| 16 | |
| 17 | universe u |
| 18 | variable {G : Type u} [AddCommGroup G] (q : NonnegativeQuadraticMk.Construction.NonnegativeQuadratic G) |
| 19 | |
| 20 | def NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalBilinear : LinearMap.BilinForm ℚ (TensorProduct ℤ ℚ G) := |
| 21 | (LinearMap.BilinMap.baseChange ℚ q.bilinear).compr₂ |
| 22 | (IsLocalization.moduleLid (nonZeroDivisors ℤ) ℚ ℚ).toLinearMap |
| 23 | |
| 24 | theorem NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalBilinear_tmul (r s : ℚ) (x y : G) : |
| 25 | q.rationalBilinear (r ⊗ₜ[ℤ] x) (s ⊗ₜ[ℤ] y) = (r * s) * q.bilinear x y := rfl |
| 26 | |
| 27 | def NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm : QuadraticForm ℚ (TensorProduct ℤ ℚ G) := |
| 28 | (1 / 2 : ℚ) • q.rationalBilinear.toQuadraticMap |
| 29 | |
| 30 | theorem NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_one_tmul (x : G) : |
| 31 | q.rationalQuadraticForm ((1 : ℚ) ⊗ₜ[ℤ] x) = q.value x := by |
| 32 | change (1 / 2 : ℚ) * q.rationalBilinear (1 ⊗ₜ[ℤ] x) (1 ⊗ₜ[ℤ] x) = _ |
| 33 | rw [NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalBilinear_tmul, NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.bilinear_self] |
| 34 | ring |
| 35 | |
| 36 | theorem NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_nonneg (x : TensorProduct ℤ ℚ G) : 0 ≤ q.rationalQuadraticForm x := by |
| 37 | obtain ⟨n, g, hn, hg⟩ := RationalizationDetection.Construction.rationalization_exists_integer_multiple x |
| 38 | have hnq : (n : ℚ) ≠ 0 := by exact_mod_cast hn |
| 39 | have hh : q.rationalQuadraticForm ((n : ℚ) • x) = q.value g := by |
| 40 | change q.rationalQuadraticForm (n • x) = q.value g |
| 41 | rw [hg, NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_one_tmul] |
| 42 | rw [QuadraticMap.map_smul, smul_eq_mul] at hh |
| 43 | have hnpos : 0 < (n : ℚ) * n := mul_self_pos.mpr hnq |
| 44 | exact (mul_nonneg_iff_of_pos_left hnpos).mp (hh.symm ▸ q.nonneg g) |
| 45 | |
| 46 | theorem NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_posDef (hzero : ∀ g, q.value g = 0 → g = 0) : |
| 47 | q.rationalQuadraticForm.PosDef := by |
| 48 | apply QuadraticMap.posDef_of_nonneg q.rationalQuadraticForm_nonneg |
| 49 | intro x hx |
| 50 | obtain ⟨n, g, hn, hg⟩ := RationalizationDetection.Construction.rationalization_exists_integer_multiple x |
| 51 | have hh : q.value g = 0 := by |
| 52 | rw [← NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_one_tmul, ← hg] |
| 53 | change q.rationalQuadraticForm ((n : ℚ) • x) = 0 |
| 54 | rw [QuadraticMap.map_smul, hx, smul_zero] |
| 55 | rw [hzero g hh, TensorProduct.tmul_zero] at hg |
| 56 | have hnq : (n : ℚ) ≠ 0 := by exact_mod_cast hn |
| 57 | change (n : ℚ) • x = 0 at hg |
| 58 | have h := congrArg (fun y : TensorProduct ℤ ℚ G => (n : ℚ)⁻¹ • y) hg |
| 59 | simpa only [smul_smul, inv_mul_cancel₀ hnq, one_smul, smul_zero] using h |
| 60 | |
| 61 | theorem NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_similitude (f : G →+ G) (c : ℚ) |
| 62 | (hf : ∀ g, q.value (f g) = c * q.value g) (x : TensorProduct ℤ ℚ G) : |
| 63 | q.rationalQuadraticForm (f.toIntLinearMap.baseChange ℚ x) = c * q.rationalQuadraticForm x := by |
| 64 | have h : q.rationalQuadraticForm.comp (f.toIntLinearMap.baseChange ℚ) = c • q.rationalQuadraticForm := by |
| 65 | apply _root_.baseChange_ext |
| 66 | intro g |
| 67 | change q.rationalQuadraticForm ((1 : ℚ) ⊗ₜ[ℤ] f g) = c * q.rationalQuadraticForm (1 ⊗ₜ[ℤ] g) |
| 68 | rw [NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_one_tmul, NonnegativeQuadraticMk.Construction.NonnegativeQuadratic.rationalQuadraticForm_one_tmul, hf] |
| 69 | exact QuadraticMap.congr_fun h x |
| 70 | |
| 71 | end |
| 72 | |
| 73 | end OAI.AlgebraicGeometry.FormalGeometry.Completion |