Documentation

DerivedAlgGeo.Algebra.Homology.HomotopyCategory.DGEnhancement.ShiftComparison

The model shift is Mathlib's shift #

Cdg.isShiftBy K n exhibits K⟦n⟧ as a shift of K in the dg sense: the witness is the canonical closed cochain Cdg.shiftCocycle K n of degree -n, and nothing about HasShift (CochainComplex A ℤ) ℤ enters that statement. This file proves that the dg notion really does restrict to the categorical one, in the three forms dg-enhancements-e7 needs before Functor.CommShift can be built for the seam:

The last two are exactly the two coherence identities a CommShift structure asks for, transcribed into the dg model. That they hold on the nose, with no sign, is because Cochain.rightShift carries none: the Koszul sign of the shift lives on Cochain.leftShift, which shifts the source of a cochain, and shiftCocycle shifts the target.

Why the work is done on CochainComplex A ℤ and transferred afterwards #

Cdg A is a type synonym for CochainComplex A ℤ and Cdg.of is the identity, so of A (shiftObj K a) and (of A K)⟦a⟧ are the same term -- but only after unfolding two definitions, which rw will not do while it builds a motive. A component computation phrased on Cdg therefore produces goals that are ill-typed at instances transparency and no rewrite fires.

rightShift_id_zero and rightShift_id_comp are consequently stated on plain cochain complexes, where every object is one opaque term, and the Cdg-level statements are read off them by term elaboration, which crosses the synonym where tactic matching does not.

Everything is XIsoOfEq, and that is the point #

Each identity is, degreewise, an equality between composites of identity-like maps between components indexed by integers that omega proves equal. There is no homological content here; the content is that the two indexings agree, which is what makes the seam's shift comparison exist at all.

On plain cochain complexes #

The degree-zero canonical cochain is shiftFunctorZero. Stated on a plain cochain complex; Cdg.shiftCocycle_zero is the same statement read on C^dg.

The canonical cochains compose, up to shiftFunctorAdd. Stated on a plain cochain complex; Cdg.comp_shiftCocycle is the same statement read on C^dg.

The type ascription on the second factor of the right-hand side is load-bearing: without it that composite's target elaborates as (shiftFunctor a ⋙ shiftFunctor b).obj K while the left-hand side's is (shiftFunctor b).obj ((shiftFunctor a).obj K), and the two -- definitionally equal -- forms block every rewrite.

Right composition with the canonical shift cochain is Cochain.rightShift.

On C^dg #

theorem CategoryTheory.Cdg.shiftCocycle_v {A : Type u} [Category.{v, u} A] [Preadditive A] (K : Cdg A) (n p q : ℤ) (hpq : p + -n = q) :
(↑(K.shiftCocycle n)).v p q hpq = eqToHom ⋯

The canonical shift cochain, degreewise: the identity-like map from K in degree p to K⟦n⟧ in degree q, where q + n = p.

The dg shift acts on morphisms as ⟦n⟧'. mapShift is built from IsShiftBy.inv, which is Classical.choice; IsShiftBy.mapShift_unique reduces the identification to the naturality square of shiftCocycle, and that is degreewise an equality of two identity maps.

The degree-zero witness is shiftFunctorZero.

The witnesses compose, up to shiftFunctorAdd. Composing the witness for a with the witness for b on K⟦a⟧ is the witness for a + b, followed by Mathlib's comparison K⟦a + b⟧ ≅ (K⟦a⟧)⟦b⟧.