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 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.OneSidedTor |
| 3 | |
| 4 | /-! # External Tensor Rank One -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExternalTensorRankOne |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! The external tensor product of the rank-one module with N is the |
| 11 | native extension of N along the second product factor. -/ |
| 12 | |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | set_option backward.isDefEq.respectTransparency.types false |
| 15 | |
| 16 | open _root_.CategoryTheory |
| 17 | open scoped TensorProduct |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | variable (K R S : Type u) [Field K] [CommRing R] [CommRing S] |
| 22 | [Algebra K R] [Algebra K S] |
| 23 | |
| 24 | attribute [local instance] Algebra.TensorProduct.rightAlgebra |
| 25 | ExternalTensorFunctor.scalar ExternalTensorFunctor.tower ExternalTensor.module |
| 26 | |
| 27 | variable (N : ModuleCat.{u} S) |
| 28 | |
| 29 | abbrev target : ModuleCat.{u} (R ⊗[K] S) := ExternalTensor.obj K R S R N |
| 30 | |
| 31 | local instance : Module S (target K R S N) := Module.restrictScalars S (R ⊗[K] S) (target K R S N) |
| 32 | local instance : IsScalarTower S (R ⊗[K] S) (target K R S N) := |
| 33 | IsScalarTower.restrictScalars S (R ⊗[K] S) (target K R S N) |
| 34 | |
| 35 | def unitLinear : N →ₗ[S] target K R S N where |
| 36 | toFun n := (1 : R) ⊗ₜ[K] n |
| 37 | map_add' := TensorProduct.tmul_add 1 |
| 38 | map_smul' := by |
| 39 | intro s n |
| 40 | change (1 : R) ⊗ₜ[K] (s • n) = ((1 : R) ⊗ₜ[K] s) • ((1 : R) ⊗ₜ[K] n : target K R S N) |
| 41 | rw [ExternalTensor.smul_tmul] |
| 42 | rw [one_smul] |
| 43 | |
| 44 | def forward : (R ⊗[K] S) ⊗[S] N →ₗ[R ⊗[K] S] target K R S N := |
| 45 | LinearMap.liftBaseChange (R ⊗[K] S) (unitLinear K R S N) |
| 46 | |
| 47 | theorem forward_tmul (r : R) (s : S) (n : N) : |
| 48 | forward K R S N ((r ⊗ₜ[K] s) ⊗ₜ[S] n) = r ⊗ₜ[K] (s • n) := by |
| 49 | change (r * 1) ⊗ₜ[K] (s • n) = r ⊗ₜ[K] (s • n) |
| 50 | rw [mul_one] |
| 51 | |
| 52 | def inverseK : R ⊗[K] N →ₗ[K] (R ⊗[K] S) ⊗[S] N := |
| 53 | TensorProduct.lift |
| 54 | { toFun := fun r => |
| 55 | { toFun := fun n => (r ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n |
| 56 | map_add' := by intro n n'; rw [TensorProduct.tmul_add] |
| 57 | map_smul' := by |
| 58 | intro k n |
| 59 | rw [TensorProduct.tmul_smul] |
| 60 | rfl } |
| 61 | map_add' := by |
| 62 | intro r r' |
| 63 | apply LinearMap.ext |
| 64 | intro n |
| 65 | change ((r + r') ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n = |
| 66 | (r ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n + (r' ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n |
| 67 | rw [TensorProduct.add_tmul, TensorProduct.add_tmul] |
| 68 | map_smul' := by |
| 69 | intro k r |
| 70 | apply LinearMap.ext |
| 71 | intro n |
| 72 | change ((k • r) ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n = k • ((r ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n) |
| 73 | rw [TensorProduct.smul_tmul', TensorProduct.smul_tmul'] } |
| 74 | |
| 75 | theorem inverseK_tmul (r : R) (n : N) : |
| 76 | inverseK K R S N (r ⊗ₜ[K] n) = (r ⊗ₜ[K] (1 : S)) ⊗ₜ[S] n := rfl |
| 77 | |
| 78 | theorem left_inverse : Function.LeftInverse (inverseK K R S N) (forward K R S N) := by |
| 79 | intro x |
| 80 | induction x using TensorProduct.inductionOn with |
| 81 | | tmul a n => |
| 82 | induction a using TensorProduct.inductionOn with |
| 83 | | tmul r s => |
| 84 | rw [forward_tmul, inverseK_tmul, TensorProduct.tmul_smul, TensorProduct.smul_tmul'] |
| 85 | change (((1 : R) ⊗ₜ[K] s) * (r ⊗ₜ[K] (1 : S))) ⊗ₜ[S] n = (r ⊗ₜ[K] s) ⊗ₜ[S] n |
| 86 | rw [Algebra.TensorProduct.tmul_mul_tmul, one_mul, mul_one] |
| 87 | | add a b ha hb => simp only [TensorProduct.add_tmul, map_add, ha, hb] |
| 88 | | add x y hx hy => simp only [map_add, hx, hy] |
| 89 | |
| 90 | theorem right_inverse : Function.RightInverse (inverseK K R S N) (forward K R S N) := by |
| 91 | intro x |
| 92 | induction x using TensorProduct.inductionOn with |
| 93 | | tmul r n => rw [inverseK_tmul, forward_tmul, one_smul] |
| 94 | | add x y hx hy => simp only [map_add, hx, hy] |
| 95 | |
| 96 | def equiv : (R ⊗[K] S) ⊗[S] N ≃ₗ[R ⊗[K] S] target K R S N := |
| 97 | LinearEquiv.ofBijective (forward K R S N) |
| 98 | ⟨(left_inverse K R S N).injective, (right_inverse K R S N).surjective⟩ |
| 99 | |
| 100 | end |
| 101 | |
| 102 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExternalTensorRankOne |