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.Algebra.DualNumber |
| 2 | import Mathlib.RingTheory.TensorProduct.Maps |
| 3 | |
| 4 | /-! # Number Coefficients -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.Dual.NumberCoefficients |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! The two coefficients on an actual scalar-extended affine dual-number |
| 11 | chart, with functoriality under the original algebra maps. -/ |
| 12 | |
| 13 | open scoped TensorProduct |
| 14 | |
| 15 | variable {k R S : Type*} [CommRing k] [CommRing R] [CommRing S] |
| 16 | |
| 17 | instance dualNumberScalarTower (K A : Type*) [CommRing K] [CommRing A] [Algebra K A] : |
| 18 | IsScalarTower K (DualNumber A) (DualNumber A) := by |
| 19 | constructor |
| 20 | intro r x y |
| 21 | apply TrivSqZeroExt.ext |
| 22 | · change (r • x.fst) * y.fst = r • (x.fst * y.fst) |
| 23 | simp [Algebra.smul_def, mul_assoc] |
| 24 | · change (r • x.fst) * y.snd + (r • x.snd) * y.fst = |
| 25 | r • (x.fst * y.snd + x.snd * y.fst) |
| 26 | simp [Algebra.smul_def, mul_add, mul_assoc] |
| 27 | |
| 28 | instance dualNumberSMulCommClass (K A : Type*) [CommRing K] [CommRing A] [Algebra K A] : |
| 29 | SMulCommClass K (DualNumber A) (DualNumber A) := by |
| 30 | constructor |
| 31 | intro r x y |
| 32 | apply TrivSqZeroExt.ext |
| 33 | · change r • (x.fst * y.fst) = x.fst * (r • y.fst) |
| 34 | simp [Algebra.smul_def, mul_left_comm] |
| 35 | · change r • (x.fst * y.snd + x.snd * y.fst) = |
| 36 | x.fst * (r • y.snd) + x.snd * (r • y.fst) |
| 37 | simp only [Algebra.smul_def] |
| 38 | ring |
| 39 | |
| 40 | def dualNumberRingMap (f : R →+* S) : DualNumber R →+* DualNumber S where |
| 41 | toFun x := (f x.fst, f x.snd) |
| 42 | map_zero' := by apply TrivSqZeroExt.ext <;> exact map_zero f |
| 43 | map_one' := by |
| 44 | apply TrivSqZeroExt.ext |
| 45 | · exact map_one f |
| 46 | · exact map_zero f |
| 47 | map_add' x y := by apply TrivSqZeroExt.ext <;> exact map_add f _ _ |
| 48 | map_mul' x y := by |
| 49 | apply TrivSqZeroExt.ext |
| 50 | · exact map_mul f _ _ |
| 51 | · change f (x.fst * y.snd + x.snd * y.fst) = _ |
| 52 | rw [map_add, map_mul, map_mul] |
| 53 | rfl |
| 54 | |
| 55 | def dualNumberAlgMap [Algebra k R] [Algebra k S] (f : R →ₐ[k] S) : |
| 56 | DualNumber R →ₐ[k] DualNumber S where |
| 57 | toRingHom := dualNumberRingMap f.toRingHom |
| 58 | commutes' c := by |
| 59 | apply TrivSqZeroExt.ext |
| 60 | · exact f.commutes c |
| 61 | · exact map_zero f |
| 62 | |
| 63 | variable [Algebra k R] |
| 64 | |
| 65 | def dualTensorCoefficients (k R : Type*) [CommRing k] [CommRing R] [Algebra k R] : |
| 66 | (DualNumber k ⊗[k] R) →ₐ[k] DualNumber R := |
| 67 | Algebra.TensorProduct.lift (dualNumberAlgMap (Algebra.ofId k R)) |
| 68 | (TrivSqZeroExt.inlAlgHom k R R) (fun _ _ => Commute.all _ _) |
| 69 | |
| 70 | theorem dualTensorCoefficients_tmul (c : DualNumber k) (a : R) : |
| 71 | dualTensorCoefficients k R (c ⊗ₜ[k] a) = (show DualNumber R from (c.fst • a, c.snd • a)) := by |
| 72 | rw [dualTensorCoefficients, Algebra.TensorProduct.lift_tmul] |
| 73 | apply TrivSqZeroExt.ext |
| 74 | · exact (Algebra.smul_def c.fst a).symm |
| 75 | · change algebraMap k R c.fst * 0 + algebraMap k R c.snd * a = c.snd • a |
| 76 | rw [mul_zero, zero_add, Algebra.smul_def] |
| 77 | |
| 78 | def dualTensorFromCoefficients (k R : Type*) [CommRing k] [CommRing R] [Algebra k R] : |
| 79 | DualNumber R →ₐ[k] (DualNumber k ⊗[k] R) := |
| 80 | DualNumber.lift (R := k) (A := R) (B := DualNumber k ⊗[k] R) |
| 81 | ⟨((Algebra.TensorProduct.includeRight : R →ₐ[k] DualNumber k ⊗[k] R), |
| 82 | (Algebra.TensorProduct.includeLeft : DualNumber k →ₐ[k] DualNumber k ⊗[k] R) DualNumber.eps), |
| 83 | (by rw [← map_mul, DualNumber.eps_mul_eps, map_zero]), fun a => by |
| 84 | exact Commute.all |
| 85 | ((Algebra.TensorProduct.includeLeft : DualNumber k →ₐ[k] DualNumber k ⊗[k] R) DualNumber.eps) |
| 86 | ((Algebra.TensorProduct.includeRight : R →ₐ[k] DualNumber k ⊗[k] R) a)⟩ |
| 87 | |
| 88 | theorem dualTensorFromCoefficients_apply (a : DualNumber R) : |
| 89 | dualTensorFromCoefficients k R a = (1 : DualNumber k) ⊗ₜ[k] a.fst + |
| 90 | (DualNumber.eps : DualNumber k) ⊗ₜ[k] a.snd := by |
| 91 | rw [dualTensorFromCoefficients, DualNumber.lift_apply_apply] |
| 92 | change (1 : DualNumber k) ⊗ₜ[k] a.fst + |
| 93 | ((1 : DualNumber k) ⊗ₜ[k] a.snd) * ((DualNumber.eps : DualNumber k) ⊗ₜ[k] 1) = _ |
| 94 | rw [Algebra.TensorProduct.tmul_mul_tmul, one_mul, mul_one] |
| 95 | |
| 96 | theorem dualTensorCoefficients_rightInverse (a : DualNumber R) : |
| 97 | dualTensorCoefficients k R (dualTensorFromCoefficients k R a) = a := by |
| 98 | rw [dualTensorFromCoefficients_apply, map_add, dualTensorCoefficients_tmul, |
| 99 | dualTensorCoefficients_tmul] |
| 100 | apply TrivSqZeroExt.ext |
| 101 | · change (1 : k) • a.fst + (0 : k) • a.snd = a.fst |
| 102 | rw [one_smul, zero_smul, add_zero] |
| 103 | · change (0 : k) • a.fst + (1 : k) • a.snd = a.snd |
| 104 | rw [zero_smul, one_smul, zero_add] |
| 105 | |
| 106 | theorem dualTensorCoefficients_leftInverse (u : DualNumber k ⊗[k] R) : |
| 107 | dualTensorFromCoefficients k R (dualTensorCoefficients k R u) = u := by |
| 108 | induction u using TensorProduct.inductionOn with |
| 109 | | add u v hu hv => rw [map_add, map_add, hu, hv] |
| 110 | | tmul c a => |
| 111 | rw [dualTensorCoefficients_tmul, dualTensorFromCoefficients_apply] |
| 112 | change (1 : DualNumber k) ⊗ₜ[k] (c.fst • a) + |
| 113 | (DualNumber.eps : DualNumber k) ⊗ₜ[k] (c.snd • a) = c ⊗ₜ[k] a |
| 114 | rw [TensorProduct.tmul_smul, TensorProduct.tmul_smul, |
| 115 | TensorProduct.smul_tmul', TensorProduct.smul_tmul', ← TensorProduct.add_tmul] |
| 116 | congr 1 |
| 117 | apply TrivSqZeroExt.ext <;> simp |
| 118 | |
| 119 | def dualTensorCoefficientEquiv (k R : Type*) [CommRing k] [CommRing R] [Algebra k R] : |
| 120 | (DualNumber k ⊗[k] R) ≃ₐ[k] DualNumber R := |
| 121 | AlgEquiv.ofAlgHom (dualTensorCoefficients k R) (dualTensorFromCoefficients k R) |
| 122 | (AlgHom.ext dualTensorCoefficients_rightInverse) (AlgHom.ext dualTensorCoefficients_leftInverse) |
| 123 | |
| 124 | theorem dualTensorCoefficients_natural [Algebra k S] (f : R →ₐ[k] S) |
| 125 | (u : DualNumber k ⊗[k] R) : |
| 126 | dualTensorCoefficients k S (Algebra.TensorProduct.map (AlgHom.id k (DualNumber k)) f u) = |
| 127 | dualNumberAlgMap f (dualTensorCoefficients k R u) := by |
| 128 | induction u using TensorProduct.inductionOn with |
| 129 | | add u v hu hv => rw [map_add, map_add, map_add, map_add, hu, hv] |
| 130 | | tmul c a => |
| 131 | rw [Algebra.TensorProduct.map_tmul, AlgHom.id_apply, dualTensorCoefficients_tmul, |
| 132 | dualTensorCoefficients_tmul] |
| 133 | apply TrivSqZeroExt.ext <;> exact (map_smul f _ _).symm |
| 134 | |
| 135 | end |
| 136 | |
| 137 | end OAI.AlgebraicGeometry.AbelianModuli.ReferenceFamily.Dual.NumberCoefficients |