grh-compacta Lean artifact read back into mathematics

Lean source

Lib.PadicComparison.ToricTower.CrystallineLines

Lib/PadicComparison/ToricTower/CrystallineLines.lean · 184 lines · 9 declarations · read in Unit 61 · Kummer root towers and crystalline line cohomology

Its 9 declarations
Lib/PadicComparison/ToricTower/CrystallineLines.lean · all 184 lines
import Lib.PadicComparison.Crystalline.CrystallineEtale/-! Known result: Faltings' toric towers and their Koszul complexes. The proof here treats onevariable at a time and uses the discrete monoid generated by one automorphism in place of continuouscohomology of Z_p^d. Wang sequences therefore replace the Koszul complex. Source: P. Scholze, p-adicHodge theory for rigid-analytic varieties, Forum Math. Pi 1 (2013), Lemmas 4.5 and 5.5; Bhatt,Morrow, Scholze 2018, Lemma 7.3; Stacks project, tag 0EBS; G. Faltings, p-adic Hodge theory, J.Amer. Math. Soc. 1 (1988).Part of: Crystalline comparison: p-adic étale cohomology with good reduction is crystalline (knownresult; see Lib.PadicComparison.Crystalline.CrystallineClasses).This file: Periodic functions represent root systems of a unit; Kummer tower has Wang sequence.Poincaré lemma: gamma minus one on divided power envelopes of root systems. -/open Finset _root_.Nat AddConstMapClass AddMonoidAlgebra CategoryTheory CommAlgCat Envelope Equiv  Filter Fin Function IsScalarTower Multiplicative NNRat PreTilt Submonoid MonoidalCategory  ShortComplexopen scoped ModuleCat/-- The R-algebra of periodic sequences ℕ → R, defined as those having period n! for all largen. -/def periodicSeq R [CommRing R]    : Subalgebra R (ℕ → R) := by refine' {carrier := {f | ∀ᶠ n in atTop, Periodic f n !}, ..} <;>  first | exact (·.mp <| ·.mono (by aesop)) | simpvariable {p : ℕ} [ThePrime p] {R} [CommRing R] {D} [CommRing D] [IsDomain D]/-- The shift f ↦ (k ↦ f(k+1)) on periodic R-valued sequences, as an O^♭-algebra endomorphism. -/@[local simp] def periodicSeq.shift R [CommRing R] [Algebra OFlat R] :  periodicSeq R →ₐ[OFlat] periodicSeq R := by  refine' { toFun f := ⟨f.1 ∘ succ, f.2.mono (by grind [Periodic])⟩, .. } <;> aesopinstance {n} : NeZero n ! := ⟨by grind⟩lemma periodicSeq.mem_of_periodic {f} n (k : 0 < n) (h : Periodic f n) :  f ∈ periodicSeq R := .mono (by aesop) fun _ l ↦ Nat.div_mul_cancel (dvd_factorial k l) ▸ h.nsmul _/-- For an O^♭-algebra R of characteristic p, Λ its periodic sequences, γ the shift, M anO^♭-module: R ⊗ M → Λ ⊗ M is injective, its image contains all fixed points of γ ⊗ 1, and γ⊗ 1 − 1 is onto. -/lemma periodicSeq.koszulExact_shift {R} [CommRing R] [Algebra OFlat R] {M} :    KoszulExact ((moduleCoeff (tensorCoeff M)).map (ofHom (toAlgHom _ R _))) ((moduleCoeff  (tensorCoeff M)).map (ofHom (shift R))) := have s := (Splitting.map (S :=    .mk (↟(toAlgHom _ R _).toLinearMap) (↟(shift R).toLinearMap - 𝟙 _)) (by refine' ⟨↟⟨⟨(·.1 0), by    simp⟩, by simp⟩, ↟{ toFun f := ⟨(range · |>.sum f.1), f.2.exists.elim fun n h ↦ mem_of_periodic    _ pos' (by simpa [p_eq_zero_of_algebra_oFlat] using (map_add_nsmul (AddConstMap.mk (a := n !)    (range · |>.sum f.1) fun k ↦ by simp_rw [add_comm k, sum_range_add, add_comm, h _]; rfl) ·    p))⟩, .. }, _, _, _⟩ <;> intros <;> ext <;> simp [sum_range_succ, sum_range_sub, smul_sum,    ← sum_sub_distrib]) (tensorRight M ⋙ forget₂ .. ⋙ AddCommGrpCat.uliftFunctor)).shortExact  by simp [ShortComplex.map] at s     use s.ab_injective_f, ((ab_exact_iff _).1 s.1 · ∘ sub_eq_zero.2), s.ab_surjective_g/-- For a ring map ψ from the periodic R-valued sequences to a ring without zero divisors andfinitely many sequences w_i, there is one index k with ψ(w_i) = ψ(w_i(k)) for all i, w_i(k)read as a constant sequence. -/lemma periodicSeq.exists_eq_eval {ι} [Finite ι] (ψ : _ →+* D) (w : ι → periodicSeq R) : ∃ k, ∀ i,  ψ (w i) = ψ (algebraMap _ _ ((w i).1 k)) := (eventually_all.2 (w · |>.2)).exists.elim fun N h ↦ by  by_contra! E; choose f E using E  apply (range N !).prod_ne_zero_iff.2 fun k _ ↦ sub_ne_zero.2 (E k)  simp [← map_sub, ← map_prod]; convert ψ.map_zero; ext x  simp [prod_eq_zero (mem_range.2 (x.mod_lt pos')), (h _).map_mod_nat]/-- Let ζ, r, u be characters of ℚ≥0 in a domain E, ζ(a) of order den(a), u(1) = r(1) ≠ 0; Dwithout zero divisors, s: D → E any map. If s(f(x_a(k))) = ζ(a)^k r(a), then f: R → Dextends uniquely to φ on periodic sequences with s(φ(x_a)) = u(a). -/lemma periodicSeq.existsUnique_hom {E} [CommRing E] [IsDomain E] f (s : D → E) (ζ r u :  Multiplicative ℚ≥0 →* E) (x : _ → _) (hx : ∀ n k, s (f ((x n).1 k)) = (ζ ^ k * r) n) (h :  r (ofAdd 1) ≠ 0) (z : ∀ a, IsPrimitiveRoot (ζ a) a.toAdd.den) (hu : u (ofAdd 1) = r  (ofAdd 1)) : ∃! ϕ : periodicSeq R →+* D, ϕ.comp (algebraMap ..) = f ∧ ∀ n, s (ϕ (x n)) = u n := by  have e n : ofAdd 1 = ofAdd (n ! : ℚ≥0)⁻¹ ^ n ! := by bound  replace z {n} := by simpa [den_inv_of_ne_zero] using z (ofAdd (n !)⁻¹)  choose a b ha using fun n : ℕ ↦ by    simpa [e n, ← Polynomial.mem_nthRoots pos', z.nthRoots_eq rfl] using hu  choose N m using fun y : periodicSeq R ↦ y.2.exists.imp fun n i k H ↦ z.pow_inj (b n)    (mod_lt k pos') (pow_eq_pow_mod k z.1 ▸ mul_right_cancel₀ (by grind [ne_zero_pow])    ((ha _).trans (.symm H))) ▸ i.map_mod_nat k  have d {n} : ∀ᶠ m in _, ofAdd n ∈ (ζ ^ a m * r).eqLocusM u := .mono (mem_atTop n.den) fun m h ↦    powers_le.2 (ha m) ⟨n.num * (m ! / n.den), by simp [← ofAdd_nsmul, field, dvd_factorial, h]⟩  have hL {x} : _ =ᶠ[_] _ := d.mono (m x <| a ·)  refine' ⟨f.comp { toFun x := x.1 (a (N x)), .. }, ⟨rfl, fun _ ↦ eventually_const.1    ((hL.fun_comp (s ∘ f)).trans (d.mono (by solve_by_elim [Eq.trans])))⟩, by    rintro ψ ⟨rfl, H⟩; ext y    exact (exists_eq_eval ψ ![y, _]).elim fun k l ↦ m y k ((hx ..).symm.trans (l 1 ▸ H _)) ▸ l 0⟩  <;> intros <;> first | rfl | exact eventually_const.1 (hL.trans (hL.comp₂ _ hL).symm)/-- Let b ↦ b ⊗ M satisfy `IsAcyclicOnPerfect`, v be a unit of a p-adic test c. Root systems of v intests S under c have flat base change, and their homotopy quotient (`rootSystemsAt`) has thecohomology of Hom(c, S), coefficients S^♭ ⊗ M.Known result: Faltings' toric towers and their Koszul complexes. -/lemma PadicTest.isLine_rootSystems {M} (ac : IsAcyclicOnPerfect (moduleCoeff (tensorCoeff M))) c  (v : (algFunctor ⋙ underlyingSet) c) (h : IsUnit v.1) :  FP (freeAb (TimesBNat.incl _ ⋙ rootSystemsAt _ v)) ∧  IsLine (tilt ⋙ moduleCoeff (tensorCoeff M)) (Y := rootSystemsAt _ v) (fibreProd.snd ..) := by  choose σ H using untilt_surjective_of_isAIC (R := c.ProdRing) (p := p)  have ⟨s, e⟩ := exists_compatible_roots (S := c.ProdRing) h.unit  let r := (Units.coeHom _).comp (s.comp coeHom.toAddMonoidHom).toMultiplicativeLeft  cases (congr(⟨$e.1⟩) : ⟨r (ofAdd 1)⟩ = v)  have : PerfectRing (periodicSeq _) p := ⟨((piCongrRight fun _ ↦ (powMulEquiv c.TiltRing    p).1).subtypeEquiv (by simp [periodicSeq, powMulEquiv])).bijective⟩  let ζ := c.structureMap.1.comp (untilt.comp epsNonneg)  let x n : periodicSeq _ := ⟨fun k ↦ σ ((ζ ^ k * r) n), periodicSeq.mem_of_periodic _ n.den_pos    (by simp [pow_add, show ζ n ^    n.den = 1 by simpa using! congr(c.structureMap $((isPrimitiveRoot_untilt_epsPow ..).1))])⟩  let F {D} (ϕ : periodicSeq c.TiltRing →ₐ[_] TiltRing D) := tilt.preimage (X :=    c) (ofHom (ϕ.comp (toAlgHom ..)))  have U {D ϕ y} : tiltMap (@F D ϕ).1 y = ϕ (algebraMap _ _ y) :=    ConcreteCategory.congr_hom (tilt.map_preimage _) y  have Q {D ϕ w} t w' (h : ∀ k, (w.1 k).untilt = t * (w'.1 k).untilt := by simp [x, H, ↓map_mul, ζ,      _root_.pow_succ', mul_assoc]) : (ϕ w).untilt = (@F D ϕ).1 t * (ϕ w').untilt :=    funext fun j ↦ (periodicSeq.exists_eq_eval ((tiltMap (Pi.evalRingHom _ j)).comp ϕ.1) ![w,    w']).elim fun k l ↦ by simpa [← U, h] using congr(untilt $(l 0) = (F ϕ).1 t j * untilt $(l 1))  let t {D} (ϕ : _ →ₐ[_] TiltRing D) : _ →* _ := ⟨⟨untilt ∘ ϕ ∘ x, by simpa using Q 1 1⟩,    fun a b ↦ by simpa using Q 1 (_ * _)⟩  exact let e := by exact (NatIso.ofComponents (fun D ↦ toIso (.ofBijective (fun ϕ ↦ ⟨(⟨t ϕ.1.1⟩,      ⟨F ϕ.1.1⟩), congr(⟨$(by simpa using! Q _ 1)⟩)⟩) (.of_existsUnique _ fun ⟨⟨⟨u⟩, ⟨f⟩⟩, hu⟩ ↦ by      choose ϕ a W using fun j ↦ let g :=          (Pi.evalRingHom _ j).comp f.1; periodicSeq.existsUnique_hom          (tiltMap g) untilt (.comp g ζ) (g.1.comp r) ((Pi.evalMonoidHom _ j).comp u) x (by simp [x,          H]) (h.map g).ne_zero (fun _ ↦ (isPrimitiveRoot_untilt_epsPow ..).map_of_injective          (.of_ker (g.comp c.structureMap) fun _ e ↦ by simpa [IsCell.p_ne_zero] using fun h ↦          (e ▸ map_dvd _ (OC.exists_dvd_pow (s := p) Fact.out h).choose_spec :))) congr($hu.1 j)      let k {y} :=        D.tiltPiEquiv.symm_apply_eq.2 (funext (congr($(a · |>.1) y).trans (tiltMap_comp ..)))      use ⟨ofHom ⟨D.tiltPiEquiv.symm.toRingHom.comp (.pi ϕ), (k.trans <| (tilt.map f).1.2 ·)⟩⟩,        congr(⟨(⟨$(by ext n j; exact (untilt_tiltMap ..).symm.trans (congrFun (D.tiltPiEquiv.1.4        (ϕ · _)) j ▸ (a j).2 n))⟩, ⟨$(tilt.map_injective (by ext; exact k ▸ U))⟩), _⟩)      rintro ⟨⟨ψ⟩⟩ ⟨⟩; congr; ext      exact D.tiltPiEquiv.eq_symm_apply.2 (funext (congr($(W · ((tiltMap _).comp ψ.1) ⟨RingHom.ext        fun y ↦ .symm ((tiltMap_comp ..).trans (U ▸ rfl)), fun _ ↦ untilt_tiltMap ..⟩) _))))))      fun f ↦ by ext; exact congr(⟨(⟨$(MonoidHom.ext fun _ ↦ untilt_tiltMap f.1 _)⟩, ⟨$(.symm      (tilt.preimage_map f ▸ (tilt.preimage_comp _ (tilt.map f)).symm :))⟩), _⟩))    ⟨hasFlatBaseChange_of_iso_reprBy (homTiltIso.symm ≪≫ e), .of_acyclic e (ac _) _ _ (by    intros; apply tilt.map_preimage) ⟨by ext; exact congr(⟨(⟨$(MonoidHom.ext fun n ↦      Q (ζ n) _ (w := periodicSeq.shift _ _).trans congr($((F _).2 _) * _))⟩, _),      _⟩)⟩ periodicSeq.koszulExact_shift⟩attribute [local simp] Algebra.smul_def floor_add_natCast floor_le lt_floor_add_one mu  ocToAmaxModPd_untilt/-- On p-torsion-free p-complete A_max-algebras D over A, root systems in D/𝔡(D) (characters ofℚ≥0) of a unit y of A/𝔡(A) form a line for B_max ⊗ D: their homotopy quotient by the twistof `rootSystems` has the cohomology of h_A. -/lemma rootSystemsAreLines_crysTest {p} [ThePrime p] [h : CrysPeriodAlgebra] :  RootSystemsAreLines crysPeriodCoeff (pdReduction ocToAmaxModPd) := fun A ⟨y⟩ ↦ y.ind' fun t hy ↦  let z : A[ℚ≥0] := single 0 t - single 1 1  have o := (exists_preEnvelope_basis A (I := Set.Ico 0 1) z (.reindex (basis ..) ⟨fun c ↦    (⟨c - ⌊c⌋₊, by simp [tsub_lt_iff_left]⟩, ⌊c⌋₊), fun (a, n) ↦ a + n, by aesop_cat, by aesop_cat⟩)    (single · 1) (by simp) rfl).choose_spec.choose_spec  let E := Envelope _ {z}  let v := (algebraMap _ E).1.comp (AddMonoidAlgebra.of A _)  have hw := (Ideal.Quotient.eq.2 (by simpa [z] using! algebraMap_mem_pdIdeal _ {z} rfl)).symm  let x : (TimesBNat.incl _ ⋙ rootSystemsAt (pdReduction _) ⟨⟦t⟧⟩) E :=    ⟨(⟨(pdQuotientMk _).1.comp v⟩, ⟨⟨ofHom (Algebra.algHom ..)⟩⟩), congr(⟨$hw⟩)⟩  have hx B := Bijective.of_existsUnique (pointMap x B) fun ⟨(⟨w⟩, ⟨f⟩), hw⟩ ↦ by    obtain ⟨χ, rfl⟩ := B.2.monoidHom_lift_bijective.2 w    obtain ⟨g, c, H⟩ := existsUnique_lift _ {z} (liftNCAlgHom f.1.hom χ fun _ _ ↦ .all ..)      (by simpa [z] using! SModEq.sub_mem.1 congr($hw.1).symm)    obtain ⟨rfl, rfl⟩ : .comp g.1.1 v = χ ∧ x.1.2.1 ≫ g = f := by      constructor <;> ext <;> exact congr($c _).trans (by simp)    use ⟨g⟩, rfl, fun ⟨g⟩ e ↦ H g (c ▸ algHom_ext' (B.2.monoidHom_lift_bijective.1 congr($e.1.1.1))      congr($e.1.2.1.1.1)) ▸ rfl  ((hx E).2 _).elim fun ⟨γ⟩ hγ ↦ .of_acyclic (ψ := 𝟭 _) (F' := crysPeriodCoeff) (isoOfAppBijective _    hx) (IsCohomEquiv.of_isIso _).bij x.1.2.1 γ (by tauto) ⟨uliftCoyonedaEquiv.injective hγ⟩ (by  let e := (algebraMap _ Amax).1.comp ((WittVector.teichmuller p).comp epsNonneg)  have hv :=    @E.2.monoidHom_lift_bijective.1 (.comp γ.1.1 v) ((algebraMap _ E).1.comp e * v) (MonoidHom.ext    (congr($hγ.1.1.1 ·).trans (congrArg (pdQuotientMap _ · * _) (ocToAmaxModPd_untilt _))))  refine koszulExact_pd_line A E isBijOnCompletion_completion (congr(algebraMap _    _ $(o.1 · ·)).trans (map_mul ..)) (by simpa [z] using! congr(algebraMap _ _ $(o.2 ·)))    (E.2.isLocalHom_pdQuotientMk.1 _ (hw ▸ hy.map (pdQuotientMap _))) rfl h.3    h.4 ⟨γ.1.1, (congr($hγ.1.2.1.1.1 ·))⟩ (by simpa [← epsPow_one] using! congr($hv _))    fun a ha ↦ ⟨_ - 1, by simpa using! congr($hv _), ?_⟩  let x := e (.ofAdd a.1.den⁻¹)  have t := Nat.lt_of_le_of_ne a.1.den_pos (ha <| by simpa [← ·, NNRat.lt_def, num] using a.2.2)  have m := by simpa using isPrimitiveRoot_untilt_epsPow (.ofAdd a.1.den⁻¹)  have := mul_dvd_mul (h.2.2.trans (map_dvd _ (theta_eq_zero_iff_xi_dvd.1 ((theta.map_geom_sum    ..).trans (theta_teichmuller _ ▸ m.geom_sum_eq_zero t))))) ((h.isLocalHom_pdQuotientMk.1 (∑ i ∈    _, x ^ i) (by simpa using!    (m.geom_sum_isUnit t a.1.coprime_num_den).map ocToAmaxModPd)).mul_left_dvd.2 (refl (x - 1)))  simp [geom_sum_mul, e, x] at this  simpa [← map_pow, ← ofAdd_nsmul, ← cast_def, ← division_def])