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.IntersectionTheory.ProjectionFormula.ExternalTensorFunctor |
| 2 | |
| 3 | /-! # Diagonal Tensor -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.DiagonalTensor |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! Restricting the external tensor product to the actual diagonal |
| 10 | recovers the ordinary tensor product over the original ring. -/ |
| 11 | |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | set_option backward.isDefEq.respectTransparency.types false |
| 14 | |
| 15 | open _root_.CategoryTheory |
| 16 | open scoped TensorProduct |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | variable (K R : Type u) [Field K] [CommRing R] [Algebra K R] |
| 21 | |
| 22 | abbrev Ring := R ⊗[K] R |
| 23 | |
| 24 | abbrev multiplication : Ring K R →+* R := (Algebra.TensorProduct.lmul' K (S := R)).toRingHom |
| 25 | |
| 26 | abbrev diagonalAlgebra : Algebra (Ring K R) R := (multiplication K R).toAlgebra |
| 27 | |
| 28 | attribute [local instance] diagonalAlgebra |
| 29 | ExternalTensorFunctor.scalar ExternalTensorFunctor.tower ExternalTensor.module |
| 30 | |
| 31 | variable (M N : ModuleCat.{u} R) |
| 32 | |
| 33 | def contraction : ExternalTensor.obj K R R M N ⟶ |
| 34 | (ModuleCat.restrictScalars (multiplication K R)).obj (.of R (M ⊗[R] N)) := by |
| 35 | let f : M ⊗[K] N →ₗ[K] M ⊗[R] N := |
| 36 | TensorProduct.lift ((TensorProduct.mk R M N).restrictScalars₁₂ K K) |
| 37 | exact ModuleCat.ofHom (Y := (ModuleCat.restrictScalars (multiplication K R)).obj (.of R (M ⊗[R] N))) |
| 38 | { f with |
| 39 | map_smul' := by |
| 40 | intro a x |
| 41 | change f (a • x) = (multiplication K R a) • f x |
| 42 | induction a using TensorProduct.inductionOn with |
| 43 | | tmul r s => |
| 44 | induction x using TensorProduct.inductionOn with |
| 45 | | tmul m n => |
| 46 | change (r • m) ⊗ₜ[R] (s • n) = (r * s) • (m ⊗ₜ[R] n) |
| 47 | exact TensorProduct.smul_tmul_smul r s m n |
| 48 | | add x y hx hy => simp only [smul_add, map_add, hx, hy] |
| 49 | | add a b ha hb => simp only [add_smul, map_add, ha, hb] } |
| 50 | |
| 51 | theorem contraction_tmul (m : M) (n : N) : |
| 52 | contraction K R M N (m ⊗ₜ[K] n) = m ⊗ₜ[R] n := rfl |
| 53 | |
| 54 | def extended : R ⊗[Ring K R] ExternalTensor.obj K R R M N →ₗ[R] M ⊗[R] N := by |
| 55 | let := Module.restrictScalars (Ring K R) R (M ⊗[R] N) |
| 56 | let := IsScalarTower.restrictScalars (Ring K R) R (M ⊗[R] N) |
| 57 | exact LinearMap.liftBaseChange R (contraction K R M N).hom |
| 58 | |
| 59 | theorem extended_tmul (r : R) (m : M) (n : N) : |
| 60 | extended K R M N (r ⊗ₜ[Ring K R] (m ⊗ₜ[K] n)) = r • (m ⊗ₜ[R] n) := rfl |
| 61 | |
| 62 | theorem left_balance (r : R) (m : M) (n : N) : |
| 63 | (1 : R) ⊗ₜ[Ring K R] ((r • m) ⊗ₜ[K] n : ExternalTensor.obj K R R M N) = |
| 64 | r • ((1 : R) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n : ExternalTensor.obj K R R M N)) := by |
| 65 | have h := TensorProduct.tmul_smul (R := Ring K R) (r ⊗ₜ[K] (1 : R)) (1 : R) |
| 66 | (m ⊗ₜ[K] n : ExternalTensor.obj K R R M N) |
| 67 | calc |
| 68 | _ = (r ⊗ₜ[K] (1 : R)) • ((1 : R) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n : ExternalTensor.obj K R R M N)) := by |
| 69 | simpa only [ExternalTensor.smul_tmul, one_smul] using h |
| 70 | _ = _ := by |
| 71 | simp only [TensorProduct.smul_tmul'] |
| 72 | change ((r * 1) * 1) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) = (r * 1) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) |
| 73 | simp only [mul_one] |
| 74 | |
| 75 | theorem right_balance (r : R) (m : M) (n : N) : |
| 76 | (1 : R) ⊗ₜ[Ring K R] (m ⊗ₜ[K] (r • n) : ExternalTensor.obj K R R M N) = |
| 77 | r • ((1 : R) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n : ExternalTensor.obj K R R M N)) := by |
| 78 | have h := TensorProduct.tmul_smul (R := Ring K R) ((1 : R) ⊗ₜ[K] r) (1 : R) |
| 79 | (m ⊗ₜ[K] n : ExternalTensor.obj K R R M N) |
| 80 | calc |
| 81 | _ = ((1 : R) ⊗ₜ[K] r) • ((1 : R) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n : ExternalTensor.obj K R R M N)) := by |
| 82 | simpa only [ExternalTensor.smul_tmul, one_smul] using h |
| 83 | _ = _ := by |
| 84 | simp only [TensorProduct.smul_tmul'] |
| 85 | change ((1 * r) * 1) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) = (r * 1) ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) |
| 86 | simp only [one_mul] |
| 87 | |
| 88 | def inverseBilinear : M →ₗ[R] N →ₗ[R] |
| 89 | R ⊗[Ring K R] ExternalTensor.obj K R R M N where |
| 90 | toFun m := |
| 91 | { toFun := fun n => 1 ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) |
| 92 | map_add' := by intro n n'; simp only [TensorProduct.tmul_add] |
| 93 | map_smul' := by intro r n; exact right_balance K R M N r m n } |
| 94 | map_add' := by |
| 95 | intro m m' |
| 96 | apply LinearMap.ext |
| 97 | intro n |
| 98 | change (1 : R) ⊗ₜ[Ring K R] ((m + m') ⊗ₜ[K] n) = |
| 99 | 1 ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) + 1 ⊗ₜ[Ring K R] (m' ⊗ₜ[K] n) |
| 100 | rw [TensorProduct.add_tmul, TensorProduct.tmul_add] |
| 101 | map_smul' := by intro r m; ext n; exact left_balance K R M N r m n |
| 102 | |
| 103 | def inverse : M ⊗[R] N →ₗ[R] R ⊗[Ring K R] ExternalTensor.obj K R R M N := |
| 104 | TensorProduct.lift (inverseBilinear K R M N) |
| 105 | |
| 106 | theorem inverse_tmul (m : M) (n : N) : |
| 107 | inverse K R M N (m ⊗ₜ[R] n) = 1 ⊗ₜ[Ring K R] (m ⊗ₜ[K] n) := rfl |
| 108 | |
| 109 | def equiv : R ⊗[Ring K R] ExternalTensor.obj K R R M N ≃ₗ[R] M ⊗[R] N := |
| 110 | { extended K R M N with |
| 111 | invFun := inverse K R M N |
| 112 | left_inv := by |
| 113 | intro x |
| 114 | change inverse K R M N (extended K R M N x) = x |
| 115 | induction x using TensorProduct.inductionOn with |
| 116 | | tmul r x => |
| 117 | induction x using TensorProduct.inductionOn with |
| 118 | | tmul m n => |
| 119 | rw [extended_tmul, map_smul, inverse_tmul, TensorProduct.smul_tmul'] |
| 120 | simp only [smul_eq_mul, mul_one] |
| 121 | | add x y hx hy => simp only [TensorProduct.tmul_add, map_add, hx, hy] |
| 122 | | add x y hx hy => simp only [map_add, hx, hy] |
| 123 | right_inv := by |
| 124 | intro x |
| 125 | change extended K R M N (inverse K R M N x) = x |
| 126 | induction x using TensorProduct.inductionOn with |
| 127 | | tmul m n => rw [inverse_tmul, extended_tmul, one_smul] |
| 128 | | add x y hx hy => simp only [map_add, hx, hy] } |
| 129 | |
| 130 | end |
| 131 | |
| 132 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.DiagonalTensor |