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.Crystalline.Cohomology.IntrinsicScalarExtension |
| 2 | import OAI.AlgebraicGeometry.Crystalline.Cohomology.Semilinear.TensorMap |
| 3 | |
| 4 | /-! # Scalar Extension Base -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.Crystalline.Cohomology.ScalarExtensionBase.ScalarExtensionTwist |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! # Scalar extension commutes with compatible coefficient automorphisms -/ |
| 11 | |
| 12 | open _root_.CategoryTheory |
| 13 | open scoped TensorProduct |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | variable (R S : Type u) [CommRing R] [CommRing S] [Algebra R S] |
| 18 | (e : R ≃+* R) (t : S ≃+* S) |
| 19 | (h : ∀ r, t (algebraMap R S r) = algebraMap R S (e r)) |
| 20 | |
| 21 | local notation "Q" => ModuleCat.restrictScalars e.toRingHom |
| 22 | local notation "T" => ModuleCat.restrictScalars t.toRingHom |
| 23 | local notation "P" => OAI.AlgebraicGeometry.Crystalline.Cohomology.IntrinsicScalarExtension.functor R S |
| 24 | |
| 25 | def tensor (M : ModuleCat.{u} R) (s : S) (x : M) : (P).obj M := s ⊗ₜ[R] x |
| 26 | |
| 27 | include h in |
| 28 | theorem inverse_base (r : R) : |
| 29 | t.symm (algebraMap R S r) = algebraMap R S (e.symm r) := by |
| 30 | apply t.injective |
| 31 | rw [t.apply_symm_apply, h, e.apply_symm_apply] |
| 32 | |
| 33 | def untwist (M : ModuleCat.{u} R) : (Q).obj M →ₛₗ[e.toRingHom] M where |
| 34 | toFun x := x |
| 35 | map_add' _ _ := rfl |
| 36 | map_smul' _ _ := rfl |
| 37 | |
| 38 | def retwist (M : ModuleCat.{u} R) : M →ₛₗ[e.symm.toRingHom] (Q).obj M where |
| 39 | toFun x := x |
| 40 | map_add' _ _ := rfl |
| 41 | map_smul' r x := by |
| 42 | change r • x = e (e.symm r) • x |
| 43 | rw [e.apply_symm_apply] |
| 44 | |
| 45 | def forward (M : ModuleCat.{u} R) : (P).obj ((Q).obj M) ⟶ (T).obj ((P).obj M) := |
| 46 | ModuleCat.ofHom (X := (P).obj ((Q).obj M)) (Y := (T).obj ((P).obj M)) { |
| 47 | toFun := Semilinear.TensorMap.SemilinearTensorMap.map e.toRingHom t.toRingHom h (untwist R e M) |
| 48 | map_add' := map_add _ |
| 49 | map_smul' s z := (Semilinear.TensorMap.SemilinearTensorMap.map e.toRingHom t.toRingHom h (untwist R e M)).map_smulₛₗ s z } |
| 50 | |
| 51 | def backward (M : ModuleCat.{u} R) : (P).obj M →ₛₗ[t.symm.toRingHom] (P).obj ((Q).obj M) := |
| 52 | Semilinear.TensorMap.SemilinearTensorMap.map e.symm.toRingHom t.symm.toRingHom (inverse_base R S e t h) (retwist R e M) |
| 53 | |
| 54 | theorem forward_tmul (M : ModuleCat.{u} R) (s : S) (x : (Q).obj M) : |
| 55 | (forward R S e t h M).hom (tensor R S ((Q).obj M) s x) = tensor R S M (t s) x := rfl |
| 56 | |
| 57 | theorem backward_tmul (M : ModuleCat.{u} R) (s : S) (x : M) : |
| 58 | backward R S e t h M (tensor R S M s x) = tensor R S ((Q).obj M) (t.symm s) x := rfl |
| 59 | |
| 60 | theorem left_inverse (M : ModuleCat.{u} R) : |
| 61 | Function.LeftInverse (backward R S e t h M) (forward R S e t h M) := by |
| 62 | intro z |
| 63 | change backward R S e t h M ((forward R S e t h M).hom z) = z |
| 64 | induction z using TensorProduct.inductionOn with |
| 65 | | add x y hx hy => |
| 66 | exact (congrArg (backward R S e t h M) ((forward R S e t h M).hom.map_add x y)).trans |
| 67 | (((backward R S e t h M).map_add _ _).trans (congrArg₂ (fun a b => a + b) hx hy)) |
| 68 | | tmul s x => |
| 69 | exact (congrArg (backward R S e t h M) (forward_tmul R S e t h M s x)).trans |
| 70 | ((backward_tmul R S e t h M (t s) x).trans |
| 71 | (congrArg (fun a => tensor R S ((Q).obj M) a x) (t.symm_apply_apply s))) |
| 72 | |
| 73 | theorem right_inverse (M : ModuleCat.{u} R) : |
| 74 | Function.RightInverse (backward R S e t h M) (forward R S e t h M) := by |
| 75 | intro z |
| 76 | change (forward R S e t h M).hom (backward R S e t h M z) = z |
| 77 | induction z using TensorProduct.inductionOn with |
| 78 | | add x y hx hy => |
| 79 | exact (congrArg (forward R S e t h M).hom ((backward R S e t h M).map_add x y)).trans |
| 80 | (((forward R S e t h M).hom.map_add _ _).trans (congrArg₂ (fun a b => a + b) hx hy)) |
| 81 | | tmul s x => |
| 82 | exact (congrArg (forward R S e t h M).hom (backward_tmul R S e t h M s x)).trans |
| 83 | ((forward_tmul R S e t h M (t.symm s) x).trans |
| 84 | (congrArg (fun a => tensor R S M a x) (t.apply_symm_apply s))) |
| 85 | |
| 86 | def componentIso (M : ModuleCat.{u} R) : (P).obj ((Q).obj M) ≅ (T).obj ((P).obj M) := |
| 87 | (LinearEquiv.ofBijective (forward R S e t h M).hom |
| 88 | ⟨(left_inverse R S e t h M).injective, (right_inverse R S e t h M).surjective⟩).toModuleIso |
| 89 | |
| 90 | theorem naturality {M N : ModuleCat.{u} R} (f : M ⟶ N) : |
| 91 | (P).map ((Q).map f) ≫ (componentIso R S e t h N).hom = |
| 92 | (componentIso R S e t h M).hom ≫ (T).map ((P).map f) := by |
| 93 | apply ModuleCat.hom_ext |
| 94 | apply LinearMap.ext |
| 95 | let a := ((P).map ((Q).map f) ≫ (componentIso R S e t h N).hom).hom |
| 96 | let b := ((componentIso R S e t h M).hom ≫ (T).map ((P).map f)).hom |
| 97 | intro z |
| 98 | change a z = b z |
| 99 | induction z using TensorProduct.inductionOn with |
| 100 | | add x y hx hy => |
| 101 | exact (a.map_add x y).trans ((congrArg₂ (fun c d => c + d) hx hy).trans (b.map_add x y).symm) |
| 102 | | tmul s x => rfl |
| 103 | |
| 104 | def iso : Q ⋙ P ≅ P ⋙ T := |
| 105 | NatIso.ofComponents (componentIso R S e t h) (fun f => naturality R S e t h f) |
| 106 | |
| 107 | end |
| 108 | |
| 109 | end OAI.AlgebraicGeometry.Crystalline.Cohomology.ScalarExtensionBase.ScalarExtensionTwist |