import Mathlib import Definitions.Def_CerednikDrinfeld_SpecialFormalModule import Definitions.Def_CerednikDrinfeld_GradedCartierModuleData set_option autoImplicit false noncomputable section namespace CerednikDrinfeld namespace GradedCartierModuleData variable {p : β„•} [Fact p.Prime] {B : Type} [CommRing B] {j : Zp2 p β†’+* B} variable (D : GradedCartierModuleData p B j) local notation "π•Ž" => WittVector p B local notation "Οƒ" => (WittVector.frobenius : WittVector p B β†’+* WittVector p B) def Sigma (D : GradedCartierModuleData p B j) : Type := D.M instance : AddCommGroup D.Sigma := inferInstanceAs (AddCommGroup D.M) instance : Module (WittVector p B) D.Sigma := (Module.compHom D.M (WittVector.frobenius : WittVector p B β†’+* WittVector p B) :) def toSigma : D.M ≃+ D.Sigma := AddEquiv.refl _ def ofSigma : D.Sigma ≃+ D.M := AddEquiv.refl _ @[simp] theorem ofSigma_toSigma (m : D.M) : D.ofSigma (D.toSigma m) = m := rfl @[simp] theorem toSigma_ofSigma (m : D.Sigma) : D.toSigma (D.ofSigma m) = m := rfl theorem smul_toSigma (w : WittVector p B) (m : D.M) : w β€’ D.toSigma m = D.toSigma (WittVector.frobenius w β€’ m) := rfl theorem ofSigma_smul (w : WittVector p B) (m : D.Sigma) : D.ofSigma (w β€’ m) = WittVector.frobenius w β€’ D.ofSigma m := rfl def nRelMap : D.Sigma β†’β‚—[WittVector p B] D.M Γ— D.Sigma where toFun m := (D.verschiebung (D.ofSigma m), D.toSigma (-D.varpi (D.ofSigma m))) map_add' m m' := by simp only [map_add, map_neg, neg_add, Prod.mk_add_mk] map_smul' w m := by show (D.verschiebung (D.ofSigma (w β€’ m)), D.toSigma (-D.varpi (D.ofSigma (w β€’ m)))) = w β€’ (D.verschiebung (D.ofSigma m), D.toSigma (-D.varpi (D.ofSigma m))) rw [Prod.smul_mk, ofSigma_smul, D.varpi_smul, D.smul_verschiebung, smul_toSigma, smul_neg] @[simp] theorem nRelMap_apply (m : D.Sigma) : D.nRelMap m = (D.verschiebung (D.ofSigma m), D.toSigma (-D.varpi (D.ofSigma m))) := rfl def nRel : Submodule (WittVector p B) (D.M Γ— D.Sigma) := LinearMap.range D.nRelMap abbrev NMod : Type := (D.M Γ— D.Sigma) β§Έ D.nRel def nMk : D.M Γ— D.M β†’+ D.NMod := (D.nRel.mkQ.toAddMonoidHom).comp (AddMonoidHom.prodMap (AddMonoidHom.id D.M) D.toSigma.toAddMonoidHom) theorem nMk_apply (m m' : D.M) : D.nMk (m, m') = D.nRel.mkQ (m, D.toSigma m') := rfl theorem nMk_surjective : Function.Surjective D.nMk := by intro z obtain ⟨⟨m, m'⟩, rfl⟩ := D.nRel.mkQ_surjective z exact ⟨(m, D.ofSigma m'), rfl⟩ theorem nMk_verschiebung_neg_varpi (m : D.M) : D.nMk (D.verschiebung m, -D.varpi m) = 0 := by rw [nMk_apply, Submodule.mkQ_apply, Submodule.Quotient.mk_eq_zero] exact ⟨D.toSigma m, rfl⟩ theorem smul_nMk (w : WittVector p B) (m m' : D.M) : w β€’ D.nMk (m, m') = D.nMk (w β€’ m, WittVector.frobenius w β€’ m') := rfl def lambda : D.NMod β†’β‚—[WittVector p B] D.M := D.nRel.liftQ { toFun := fun x => D.varpi x.1 + D.verschiebung (D.ofSigma x.2) map_add' := fun x y => by simp only [Prod.fst_add, Prod.snd_add, map_add]; abel map_smul' := fun w x => by simp only [Prod.smul_fst, Prod.smul_snd, map_smul, ofSigma_smul, RingHom.id_apply, smul_add, D.smul_verschiebung] } (by rintro x ⟨m, rfl⟩ show D.varpi (D.verschiebung (D.ofSigma m)) + D.verschiebung (D.ofSigma (D.toSigma (-D.varpi (D.ofSigma m)))) = 0 rw [ofSigma_toSigma, map_neg, D.varpi_verschiebung, add_neg_cancel]) @[simp] theorem lambda_nMk (m m' : D.M) : D.lambda (D.nMk (m, m')) = D.varpi m + D.verschiebung m' := rfl def vRange : Submodule (WittVector p B) D.M where carrier := Set.range D.verschiebung zero_mem' := ⟨0, map_zero _⟩ add_mem' := by rintro _ _ ⟨x, rfl⟩ ⟨y, rfl⟩ exact ⟨x + y, map_add _ _ _⟩ smul_mem' := by rintro w _ ⟨x, rfl⟩ exact ⟨WittVector.frobenius w β€’ x, (D.smul_verschiebung w x).symm⟩ theorem mem_vRange_iff (x : D.M) : x ∈ D.vRange ↔ βˆƒ y, D.verschiebung y = x := Iff.rfl abbrev LieQuot : Type := D.M β§Έ D.vRange def toLieQuot : D.NMod β†’β‚—[WittVector p B] D.LieQuot := D.nRel.liftQ (D.vRange.mkQ.comp (LinearMap.fst _ _ _)) (by rintro x ⟨m, rfl⟩ show D.vRange.mkQ (D.verschiebung (D.ofSigma m)) = 0 rw [Submodule.mkQ_apply, Submodule.Quotient.mk_eq_zero] exact ⟨D.ofSigma m, rfl⟩) def inrSigma : D.Sigma β†’β‚—[WittVector p B] D.NMod := D.nRel.mkQ.comp (LinearMap.inr _ _ _) def nVarpi : D.NMod β†’β‚—[WittVector p B] D.NMod := D.nRel.mapQ D.nRel (LinearMap.prodMap D.varpi { toFun := fun m => D.toSigma (D.varpi (D.ofSigma m)) map_add' := fun x y => by simp only [map_add] map_smul' := fun w m => by rw [ofSigma_smul, map_smul, RingHom.id_apply, smul_toSigma] }) (by rintro x ⟨m, rfl⟩ refine ⟨D.toSigma (D.varpi (D.ofSigma m)), ?_⟩ show (D.verschiebung (D.ofSigma (D.toSigma (D.varpi (D.ofSigma m)))), D.toSigma (-D.varpi (D.ofSigma (D.toSigma (D.varpi (D.ofSigma m)))))) = (D.varpi (D.verschiebung (D.ofSigma m)), D.toSigma (D.varpi (D.ofSigma (D.toSigma (-D.varpi (D.ofSigma m)))))) simp only [ofSigma_toSigma, D.varpi_verschiebung, map_neg]) def nPiece (i : Fin 2) : AddSubgroup D.NMod := (((D.piece i).toAddSubgroup).prod ((D.piece i).toAddSubgroup)).map D.nMk def nMap {B' : Type} [CommRing B'] {j' : Zp2 p β†’+* B'} (D' : GradedCartierModuleData p B' j') (f : D.M β†’+ D'.M) (hV : βˆ€ x, f (D.verschiebung x) = D'.verschiebung (f x)) (hPi : βˆ€ x, f (D.varpi x) = D'.varpi (f x)) : D.NMod β†’+ D'.NMod := QuotientAddGroup.map D.nRel.toAddSubgroup D'.nRel.toAddSubgroup (AddMonoidHom.prodMap f (D'.toSigma.toAddMonoidHom.comp (f.comp D.ofSigma.toAddMonoidHom))) (by rintro x ⟨m, rfl⟩ refine ⟨D'.toSigma (f (D.ofSigma m)), ?_⟩ show (D'.verschiebung (D'.ofSigma (D'.toSigma (f (D.ofSigma m)))), D'.toSigma (-D'.varpi (D'.ofSigma (D'.toSigma (f (D.ofSigma m)))))) = (f (D.verschiebung (D.ofSigma m)), D'.toSigma (f (D.ofSigma (D.toSigma (-D.varpi (D.ofSigma m)))))) simp only [ofSigma_toSigma, hV, map_neg, hPi]) theorem nMap_nMk {B' : Type} [CommRing B'] {j' : Zp2 p β†’+* B'} (D' : GradedCartierModuleData p B' j') (f : D.M β†’+ D'.M) (hV : βˆ€ x, f (D.verschiebung x) = D'.verschiebung (f x)) (hPi : βˆ€ x, f (D.varpi x) = D'.varpi (f x)) (m m' : D.M) : D.nMap D' f hV hPi (D.nMk (m, m')) = D'.nMk (f m, f m') := rfl def IsBaseChangeAlong' {B' : Type} [CommRing B'] {j' : Zp2 p β†’+* B'} (Ο† : B β†’+* B') (D : GradedCartierModuleData p B j) (D' : GradedCartierModuleData p B' j') (f : D.M β†’+ D'.M) : Prop := (βˆ€ (w : WittVector p B) (x : D.M), f (w β€’ x) = WittVector.map Ο† w β€’ f x) ∧ (βˆ€ x, f (D.frobenius x) = D'.frobenius (f x)) ∧ (βˆ€ x, f (D.verschiebung x) = D'.verschiebung (f x)) ∧ (βˆ€ x, f (D.varpi x) = D'.varpi (f x)) ∧ (βˆ€ (i : Fin 2) (x : D.M), x ∈ D.piece i β†’ f x ∈ D'.piece i) ∧ (βˆƒ Ξ³ : Fin 2 β†’ D.M, D.IsHomogeneousVBasis Ξ³ ∧ D'.IsHomogeneousVBasis (fun i => f (Ξ³ i))) structure IsCartierLMap (L : D.M β†’+ D.NMod) : Prop where map_smul : βˆ€ (w : WittVector p B) (x : D.M), L (w β€’ x) = WittVector.frobenius w β€’ L x map_verschiebung : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0) lambda_comp : βˆ€ x : D.M, D.lambda (L x) = D.frobenius x structure IsCanonicalLMap (L : D.M β†’+ D.NMod) : Prop where isCartierLMap : D.IsCartierLMap L exists_lift : βˆƒ (S : Type) (_ : CommRing S) (jS : Zp2 p β†’+* S) (Ο† : S β†’+* B) (_ : Function.Surjective Ο†) (_ : βˆ€ s : S, (p : S) * s = 0 β†’ s = 0) (Dl : GradedCartierModuleData p S jS) (_ : Dl.IsSpecialCartierModule) (f : Dl.M β†’+ D.M) (hf : IsBaseChangeAlong' Ο† Dl D f) (Ll : Dl.M β†’+ Dl.NMod) (_ : Dl.IsCartierLMap Ll), βˆ€ x : Dl.M, L (f x) = Dl.nMap D f hf.2.2.1 hf.2.2.2.1 (Ll x) def cartierL (h : βˆƒ L : D.M β†’+ D.NMod, D.IsCanonicalLMap L) : D.M β†’+ D.NMod := h.choose theorem cartierL_spec (h : βˆƒ L : D.M β†’+ D.NMod, D.IsCanonicalLMap L) : D.IsCanonicalLMap (D.cartierL h) := h.choose_spec def phi (L : D.M β†’+ D.NMod) (hL : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0)) : D.NMod β†’+ D.NMod := QuotientAddGroup.lift D.nRel.toAddSubgroup (AddMonoidHom.coprod L (D.nMk.comp ((AddMonoidHom.inl D.M D.M).comp D.ofSigma.toAddMonoidHom))) (by rintro x ⟨m, rfl⟩ show L (D.verschiebung (D.ofSigma m)) + D.nMk (D.ofSigma (D.toSigma (-D.varpi (D.ofSigma m))), 0) = 0 rw [hL, ofSigma_toSigma, ← map_add, Prod.mk_add_mk, add_neg_cancel, add_zero] exact map_zero D.nMk) theorem phi_nMk (L : D.M β†’+ D.NMod) (hL : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0)) (x x' : D.M) : D.phi L hL (D.nMk (x, x')) = L x + D.nMk (x', 0) := rfl def eta (L : D.M β†’+ D.NMod) (hL : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0)) : AddSubgroup D.NMod := (D.phi L hL - AddMonoidHom.id D.NMod).ker theorem mem_eta_iff (L : D.M β†’+ D.NMod) (hL : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0)) (z : D.NMod) : z ∈ D.eta L hL ↔ D.phi L hL z = z := by rw [eta, AddMonoidHom.mem_ker, AddMonoidHom.sub_apply, sub_eq_zero] rfl def etaPiece (L : D.M β†’+ D.NMod) (hL : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0)) (i : Fin 2) : AddSubgroup D.NMod := D.eta L hL βŠ“ D.nPiece i def u (L : D.M β†’+ D.NMod) (hL : βˆ€ x : D.M, L (D.verschiebung x) = D.nMk (D.varpi x, 0)) : D.eta L hL β†’+ D.LieQuot := D.toLieQuot.toAddMonoidHom.comp (D.eta L hL).subtype end GradedCartierModuleData end CerednikDrinfeld end