Shifted hom-complexes #
For a dg category C, each hom-complex dgHom X Y can be shifted by m : ℤ
using Mathlib's shift on CochainComplex. This file records what survives that
shift: the differential picks up (-1) ^ m, and composition still satisfies
Leibniz, associativity, and the unit laws — provided it picks up a Koszul sign.
This is the shift dg-enhancements-e2's summary claimed to deliver and did not;
dg-enhancements-e5 (#376) owns it, and the roadmap is corrected alongside.
The sign is derived, not chosen #
Mathlib's CochainComplex.shiftFunctor m sends K to the complex that is
K.X (i + m) in degree i, with differential m.negOnePow • K.d _ _
(shiftFunctor_obj_X', shiftFunctor_obj_d', both rfl at the pin). Take
f of shifted degree p in (dgHom X Y)⟦m⟧ and g of shifted degree q in
(dgHom Y Z)⟦n⟧, and ask for a composition ε • dgComp making the Leibniz
rule of DGCategory hold verbatim in the shifted complexes. Matching the two
terms separately forces
ε (p, q + 1) = (-1) ^ m * ε (p, q), from the term carryingδ g;ε (p + 1, q) = ε (p, q), from the term carryingδ f.
So ε cannot depend on p, and ε = (-1) ^ (q * m) is the solution. The sign
is the degree of the element that moves times the shift it moves past, which is
the Koszul rule — but it is written here as the conclusion of the two matching
conditions rather than as an appeal to that rule.
Associativity and the unit laws are then automatic rather than further
constraints; shiftComp_assoc and the two dgId lemmas below confirm this.
Raw degrees, not shifted ones #
Every degree argument below is the degree in the underlying hom-complex, and
the shift enters only through the sign. Writing shiftComp on shifted degrees
instead — with hom-types like (dgHom X Y).X (p + m) — costs a rewrite between
(q + 1) + n and (q + n) + 1 in the Leibniz proof, and rewriting an index of
HomologicalComplex.X breaks the motive. On raw degrees the statement has the
same shape as dgComp itself: three degrees and one equation. The shifted
degree is recovered as b - n, which is where the sign's b - n comes from.
The differential of the m-shifted hom-complex, at raw degrees.
Equations
- CategoryTheory.DGCategory.shiftD m a b = m.negOnePow • AddCommGrpCat.Hom.hom ((CategoryTheory.DGCategoryStruct.dgHom X Y).d a b)
Instances For
Composition of shifted hom-complexes: dgComp with the Koszul sign that the
two Leibniz matching conditions force. m and n are the shifts of the source
and middle hom-complexes; b - n is the degree of the second argument in the
shifted complex.
Equations
- CategoryTheory.DGCategory.shiftComp m n a b c h = ((b - n) * m).negOnePow • CategoryTheory.DGCategoryStruct.dgComp a b c h
Instances For
shiftD applied to an element, unfolded.
shiftComp applied to a pair of elements, unfolded.
The unshifted case is the original composition, on the nose.
The unshifted differential is the original differential.
The tie-back to Mathlib's shift #
shiftD and the shifted hom-types are not a private convention: they are what
CochainComplex.shiftFunctor already does, and both lemmas below are rfl.
Degree p of the m-shifted hom-complex is degree p + m of the original.
This is CochainComplex.shiftFunctor's own indexing, so the lemma is rfl.
shiftD is the differential of the shifted hom-complex, not a lookalike:
the lemma is rfl, so the (-1) ^ m in shiftD is Mathlib's sign rather than a
convention this file introduces.
The four laws #
The Leibniz rule survives the shift, in the same shape as the axiom: the
sign on the second term is the degree of the first argument's partner in the
shifted complex, b - n. This is the lemma the sign was solved for.
Associativity survives the shift with no further sign condition: the two
sides carry (b - n) * m + (d - l) * (m + n) and
(d - l) * n + (b + d - (n + l)) * m, which are equal as integers.
The identity is a left unit for the shifted composition. Its hom-complex is
unshifted, so the sign is ((b - n) * 0) and vanishes.
The identity is a right unit for the shifted composition. It sits in degree
0 of an unshifted complex, so the sign is ((0 - 0) * m) and vanishes.
The shifted differential still squares to zero: the two signs cancel. No
hypothesis relates a, b, c — off the diagonal d is zero by shape, so
the statement holds for every triple.