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.MixedTensor |
| 2 | import Mathlib.RingTheory.TensorProduct.Maps |
| 3 | |
| 4 | /-! # External Tensor -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExternalTensor |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! The external tensor product carries the action of the product |
| 11 | algebra: (r ⊗ s)(m ⊗ n) = rm ⊗ sn. The action is bundled so that the |
| 12 | two copies of a ring remain distinct even on a diagonal. -/ |
| 13 | |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | set_option backward.isDefEq.respectTransparency.types false |
| 16 | |
| 17 | open _root_.CategoryTheory |
| 18 | open scoped TensorProduct |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | variable (K R S : Type u) [CommRing K] [CommRing R] [CommRing S] |
| 23 | [Algebra K R] [Algebra K S] |
| 24 | (M N : Type u) [AddCommGroup M] [AddCommGroup N] |
| 25 | [mK : Module K M] [Module R M] [mTower : IsScalarTower K R M] |
| 26 | [Module K N] [Module S N] [IsScalarTower K S N] |
| 27 | |
| 28 | def action : R ⊗[K] S →ₐ[K] Module.End K (M ⊗[K] N) := |
| 29 | Algebra.TensorProduct.lift |
| 30 | ((Module.End.rTensorAlgHom K M N).comp (Algebra.lsmul K K M : R →ₐ[K] Module.End K M)) |
| 31 | ((Module.End.lTensorAlgHom K N M).comp (Algebra.lsmul K K N : S →ₐ[K] Module.End K N)) |
| 32 | (by intro r s; apply LinearMap.ext; intro x; induction x using TensorProduct.inductionOn with |
| 33 | | tmul m n => rfl |
| 34 | | add x y hx hy => simp only [map_add, hx, hy]) |
| 35 | |
| 36 | @[instance_reducible] |
| 37 | def module : Module (R ⊗[K] S) (M ⊗[K] N) := |
| 38 | Module.compHom (M ⊗[K] N) (action K R S M N).toRingHom |
| 39 | |
| 40 | attribute [local instance] module |
| 41 | |
| 42 | def obj : ModuleCat.{u} (R ⊗[K] S) := |
| 43 | .of (R ⊗[K] S) (M ⊗[K] N) |
| 44 | |
| 45 | theorem smul_tmul (r : R) (s : S) (m : M) (n : N) : |
| 46 | (r ⊗ₜ[K] s) • (m ⊗ₜ[K] n : obj K R S M N) = (r • m) ⊗ₜ[K] (s • n) := rfl |
| 47 | |
| 48 | theorem hom_ext {P : ModuleCat.{u} (R ⊗[K] S)} |
| 49 | {f g : obj K R S M N ⟶ P} |
| 50 | (h : ∀ m n, f (m ⊗ₜ[K] n) = g (m ⊗ₜ[K] n)) : f = g := by |
| 51 | apply ModuleCat.hom_ext |
| 52 | apply LinearMap.ext |
| 53 | intro x |
| 54 | induction x using TensorProduct.inductionOn with |
| 55 | | tmul m n => exact h m n |
| 56 | | add x y hx hy => simp only [map_add, hx, hy] |
| 57 | |
| 58 | variable {M N} |
| 59 | {M' N' : Type u} [AddCommGroup M'] [AddCommGroup N'] |
| 60 | [mK' : Module K M'] [Module R M'] [IsScalarTower K R M'] |
| 61 | [Module K N'] [Module S N'] [IsScalarTower K S N'] |
| 62 | |
| 63 | def map (f : M →ₗ[R] M') (g : N →ₗ[S] N') : |
| 64 | obj K R S M N ⟶ obj K R S M' N' := |
| 65 | ModuleCat.ofHom |
| 66 | { TensorProduct.map (f.restrictScalars K) (g.restrictScalars K) with |
| 67 | map_smul' := by |
| 68 | intro a x |
| 69 | change TensorProduct.map (f.restrictScalars K) (g.restrictScalars K) (a • x) = |
| 70 | a • TensorProduct.map (f.restrictScalars K) (g.restrictScalars K) x |
| 71 | induction a using TensorProduct.inductionOn with |
| 72 | | tmul r s => |
| 73 | induction x using TensorProduct.inductionOn with |
| 74 | | tmul m n => simp only [smul_tmul, TensorProduct.map_tmul, LinearMap.coe_restrictScalars, f.map_smul, g.map_smul] |
| 75 | | add x y hx hy => simp only [smul_add, map_add, hx, hy] |
| 76 | | add a b ha hb => simp only [add_smul, map_add, ha, hb] } |
| 77 | |
| 78 | theorem map_tmul (f : M →ₗ[R] M') (g : N →ₗ[S] N') (m : M) (n : N) : |
| 79 | ExternalTensor.map K R S f g (m ⊗ₜ[K] n) = f m ⊗ₜ[K] g n := rfl |
| 80 | |
| 81 | def congr (eM : M ≃ₗ[R] M') (eN : N ≃ₗ[S] N') : |
| 82 | obj K R S M N ≅ obj K R S M' N' where |
| 83 | hom := ExternalTensor.map K R S eM.toLinearMap eN.toLinearMap |
| 84 | inv := ExternalTensor.map K R S eM.symm.toLinearMap eN.symm.toLinearMap |
| 85 | hom_inv_id := by |
| 86 | apply ExternalTensor.hom_ext K R S M N |
| 87 | intro m n |
| 88 | change eM.symm (eM m) ⊗ₜ[K] eN.symm (eN n) = m ⊗ₜ[K] n |
| 89 | rw [eM.symm_apply_apply, eN.symm_apply_apply] |
| 90 | inv_hom_id := by |
| 91 | apply ExternalTensor.hom_ext K R S M' N' |
| 92 | intro m n |
| 93 | change eM (eM.symm m) ⊗ₜ[K] eN (eN.symm n) = m ⊗ₜ[K] n |
| 94 | rw [eM.apply_symm_apply, eN.apply_symm_apply] |
| 95 | |
| 96 | end |
| 97 | |
| 98 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExternalTensor |