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 | /-! # Permutation Polynomial -/ |
| 4 | |
| 5 | namespace OAI |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | namespace NumberTheory.PadicHodge.IntegralComparison.PermutationPolynomial.Characteristic |
| 10 | |
| 11 | /-! The characteristic polynomial and trace of the actual permutation action on functions. -/ |
| 12 | |
| 13 | variable {ι : Type*} [Fintype ι] [DecidableEq ι] (σ : Equiv.Perm ι) |
| 14 | |
| 15 | def matrix : Matrix ι ι ℤ := fun i j => if σ i = j then 1 else 0 |
| 16 | |
| 17 | def polynomial : Polynomial ℤ := (matrix σ).charpoly |
| 18 | |
| 19 | theorem monic : (polynomial σ).Monic := Matrix.charpoly_monic _ |
| 20 | |
| 21 | variable (K : Type*) [Field K] |
| 22 | |
| 23 | def action : Module.End K (ι → K) where |
| 24 | toFun f := f ∘ σ |
| 25 | map_add' _ _ := rfl |
| 26 | map_smul' _ _ := rfl |
| 27 | |
| 28 | omit [Fintype ι] [DecidableEq ι] in |
| 29 | theorem action_apply (f : ι → K) (i : ι) : action σ K f i = f (σ i) := rfl |
| 30 | |
| 31 | theorem toMatrix : LinearMap.toMatrix (Pi.basisFun K ι) (Pi.basisFun K ι) (action σ K) = |
| 32 | (matrix σ).map (Int.castRingHom K) := by |
| 33 | ext i j |
| 34 | simp [action, matrix, Pi.single_apply, eq_comm] |
| 35 | |
| 36 | theorem charpoly : (action σ K).charpoly = (polynomial σ).map (Int.castRingHom K) := by |
| 37 | calc |
| 38 | (action σ K).charpoly = (LinearMap.toMatrix (Pi.basisFun K ι) |
| 39 | (Pi.basisFun K ι) (action σ K)).charpoly := |
| 40 | (LinearMap.charpoly_toMatrix (action σ K) (Pi.basisFun K ι)).symm |
| 41 | _ = (polynomial σ).map (Int.castRingHom K) := by |
| 42 | rw [Characteristic.toMatrix, Matrix.charpoly_map] |
| 43 | rfl |
| 44 | |
| 45 | theorem trace : LinearMap.trace K (ι → K) (action σ K) = |
| 46 | ((Finset.univ.filter (fun i => σ i = i)).card : K) := by |
| 47 | rw [LinearMap.trace_eq_matrix_trace K (Pi.basisFun K ι), Characteristic.toMatrix] |
| 48 | simp [Matrix.trace, Matrix.diag, matrix] |
| 49 | |
| 50 | omit [Fintype ι] [DecidableEq ι] in |
| 51 | theorem action_pow (n : ℕ) : action σ K ^ n = action (σ ^ n) K := by |
| 52 | induction n with |
| 53 | | zero => rfl |
| 54 | | succ n ih => |
| 55 | rw [pow_succ, ih] |
| 56 | apply LinearMap.ext |
| 57 | intro f |
| 58 | funext i |
| 59 | change f (σ ((σ ^ n) i)) = f ((σ ^ (n + 1)) i) |
| 60 | rw [pow_succ', Equiv.Perm.mul_apply] |
| 61 | |
| 62 | theorem trace_pow (n : ℕ) : LinearMap.trace K (ι → K) (action σ K ^ n) = |
| 63 | ((Finset.univ.filter (fun i => (σ ^ n) i = i)).card : K) := by |
| 64 | rw [action_pow, Characteristic.trace] |
| 65 | |
| 66 | end NumberTheory.PadicHodge.IntegralComparison.PermutationPolynomial.Characteristic |
| 67 | |
| 68 | namespace NumberTheory.PadicHodge.IntegralComparison.PermutationPolynomial.Ring |
| 69 | |
| 70 | /-! The same integral permutation polynomial computes the action over any commutative ring. -/ |
| 71 | |
| 72 | variable {ι : Type*} (σ : Equiv.Perm ι) (R : Type*) [CommRing R] |
| 73 | |
| 74 | def action : Module.End R (ι → R) where |
| 75 | toFun f := f ∘ σ |
| 76 | map_add' _ _ := rfl |
| 77 | map_smul' _ _ := rfl |
| 78 | |
| 79 | theorem action_apply (f : ι → R) (i : ι) : action σ R f i = f (σ i) := rfl |
| 80 | |
| 81 | variable [Fintype ι] [DecidableEq ι] |
| 82 | |
| 83 | theorem toMatrix : LinearMap.toMatrix (Pi.basisFun R ι) (Pi.basisFun R ι) (action σ R) = |
| 84 | (Characteristic.matrix σ).map (Int.castRingHom R) := by |
| 85 | ext i j |
| 86 | simp [action, Characteristic.matrix, Pi.single_apply, eq_comm] |
| 87 | |
| 88 | theorem charpoly : (action σ R).charpoly = |
| 89 | (Characteristic.polynomial σ).map (Int.castRingHom R) := by |
| 90 | rw [← LinearMap.charpoly_toMatrix (action σ R) (Pi.basisFun R ι), Ring.toMatrix, Matrix.charpoly_map] |
| 91 | rfl |
| 92 | |
| 93 | end NumberTheory.PadicHodge.IntegralComparison.PermutationPolynomial.Ring |
| 94 | |
| 95 | namespace NumberTheory.PadicHodge.IntegralComparison.PermutationPolynomial.Equivalence |
| 96 | |
| 97 | /-! Equivariant bijections preserve the actual integral permutation polynomial. -/ |
| 98 | |
| 99 | variable {ι κ : Type*} (σ : Equiv.Perm ι) (τ : Equiv.Perm κ) (e : ι ≃ κ) |
| 100 | (h : ∀ i, e (σ i) = τ (e i)) |
| 101 | |
| 102 | include h in |
| 103 | theorem conjugate : (LinearEquiv.funCongrLeft ℤ ℤ e).conj |
| 104 | (Ring.action τ ℤ) = Ring.action σ ℤ := by |
| 105 | apply LinearMap.ext |
| 106 | intro f |
| 107 | funext i |
| 108 | change f (e.symm (τ (e i))) = f (σ i) |
| 109 | rw [← h, e.symm_apply_apply] |
| 110 | |
| 111 | variable [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] |
| 112 | |
| 113 | include h in |
| 114 | theorem polynomial : Characteristic.polynomial σ = |
| 115 | Characteristic.polynomial τ := by |
| 116 | have hσ : (Ring.action σ ℤ).charpoly = |
| 117 | Characteristic.polynomial σ := by |
| 118 | simpa using Ring.charpoly σ ℤ |
| 119 | have hτ : (Ring.action τ ℤ).charpoly = |
| 120 | Characteristic.polynomial τ := by |
| 121 | simpa using Ring.charpoly τ ℤ |
| 122 | exact hσ.symm.trans ((congrArg (fun F : Module.End ℤ (ι → ℤ) => F.charpoly) |
| 123 | (conjugate σ τ e h).symm).trans |
| 124 | (((LinearEquiv.funCongrLeft ℤ ℤ e).charpoly_conj (Ring.action τ ℤ)).trans hτ)) |
| 125 | |
| 126 | end NumberTheory.PadicHodge.IntegralComparison.PermutationPolynomial.Equivalence |
| 127 | |
| 128 | end |
| 129 | |
| 130 | end OAI |