Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: the abelian group structure on Ext-groups in abelian categories #14496

Closed
wants to merge 101 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
dcad359
feat: small types of morphisms in the localized category
joelriou Jun 8, 2024
9d5cdc1
added compatibilities
joelriou Jun 8, 2024
08077d0
fixed imports
joelriou Jun 8, 2024
75e6713
Merge remote-tracking branch 'origin' into has-small-localized-hom
joelriou Jun 9, 2024
88d42d8
added note
joelriou Jun 9, 2024
aa484c1
feat: the mapping cone of a monomorphism, up to a quasi-isomorphism
joelriou Jun 9, 2024
467fa14
updated Mathlib.lean
joelriou Jun 9, 2024
b2f24ea
wip
joelriou Jun 9, 2024
18af13e
Update Mathlib/Algebra/Homology/Refinements.lean
joelriou Jun 9, 2024
fab421a
removed a sorry
joelriou Jun 9, 2024
3b5de64
removed a sorry
joelriou Jun 10, 2024
89fe3b0
removed sorries
joelriou Jun 10, 2024
a0d590b
added docstring
joelriou Jun 10, 2024
872879a
fixed def/lemma
joelriou Jun 10, 2024
16e77b9
s/refine'/refine/
joelriou Jun 10, 2024
683b743
feat: the distinguished triangle attached to a short exact sequence o…
joelriou Jun 11, 2024
b7d1af2
Merge remote-tracking branch 'origin' into dist-triangle-ses2
joelriou Jun 11, 2024
42f76c1
feat: more API for commutation of functors with shifts
joelriou Jun 12, 2024
495efc6
Merge remote-tracking branch 'origin/commshift-comp' into dist-triang…
joelriou Jun 12, 2024
127ca96
feat(Algebra/Homology) the single complex functor preserves (co)limits
joelriou Jun 16, 2024
cd70471
Merge remote-tracking branch 'origin' into single-triangle
joelriou Jun 16, 2024
d60e280
Merge remote-tracking branch 'origin/single-preserves-limits' into si…
joelriou Jun 16, 2024
365b9df
feat: the distinguished triangle attached to a short exact sequence
joelriou Jun 16, 2024
3d361e0
Merge remote-tracking branch 'origin' into has-small-localized-hom
joelriou Jun 18, 2024
285e3e7
added docstring
joelriou Jun 18, 2024
e119185
more API
joelriou Jun 18, 2024
7ebda0b
wip
joelriou Jun 18, 2024
40b7ed7
Merge remote-tracking branch 'origin/commshift-comp' into has-small-l…
joelriou Jun 18, 2024
bcdfe45
wip
joelriou Jun 18, 2024
95c8bdf
removed a sorry
joelriou Jun 18, 2024
586efe3
removed sorries
joelriou Jun 18, 2024
e89f5b5
fixed sorries
joelriou Jun 19, 2024
7ee3dfb
Update Mathlib/CategoryTheory/Localization/SmallHom.lean
joelriou Jun 19, 2024
9c91e8d
wip
joelriou Jun 19, 2024
83d8c13
feat: bijections between morphisms in two localized categories
joelriou Jun 19, 2024
212683a
merge with localization-homequiv
joelriou Jun 19, 2024
bc64e31
Merge branch 'localization-homequiv' into has-small-localized-hom
joelriou Jun 19, 2024
69e5969
whitespace
joelriou Jun 19, 2024
d409ef2
Merge branch 'localization-homequiv' into has-small-localized-hom
joelriou Jun 19, 2024
a8fcf79
Merge remote-tracking branch 'origin' into has-small-localized-shifte…
joelriou Jun 19, 2024
40d4490
cleaning up
joelriou Jun 19, 2024
b62b783
Merge remote-tracking branch 'origin/has-small-localized-shifted-hom'…
joelriou Jun 19, 2024
2d3bae9
feat: definition of Ext-groups
joelriou Jun 19, 2024
b9de9d8
wip
joelriou Jun 19, 2024
9217693
wip
joelriou Jun 20, 2024
8d7c85f
better docstring
joelriou Jun 20, 2024
e5c353b
Merge remote-tracking branch 'origin/dist-triangle-ses2' into small-e…
joelriou Jun 20, 2024
8f13fb1
added additive structure
joelriou Jun 20, 2024
ecf4779
added lemma about IsCompatibleWithShift
joelriou Jun 20, 2024
f24227d
Merge remote-tracking branch 'origin' into small-ext-derived-category
joelriou Jun 20, 2024
66d20aa
remove sorries
joelriou Jun 20, 2024
f92c48b
fixed sorries
joelriou Jun 20, 2024
6a6f77f
Merge remote-tracking branch 'origin' into localization-homequiv
joelriou Jun 20, 2024
b5a08f5
fixed long line
joelriou Jun 20, 2024
03a28f0
Update Mathlib/Algebra/Homology/Single.lean
joelriou Jun 22, 2024
4b47afd
Update Mathlib/CategoryTheory/Limits/Preserves/Shapes/Zero.lean
joelriou Jun 22, 2024
f9a0d7f
Update Mathlib/CategoryTheory/Limits/Preserves/Shapes/Zero.lean
joelriou Jun 22, 2024
e8998eb
golfing proofs
joelriou Jun 22, 2024
d45bcf7
fixing the build
joelriou Jun 22, 2024
1d71033
Merge remote-tracking branch 'origin' into localization-homequiv
joelriou Jun 23, 2024
bb61444
removed duplicate Iso.homEquiv
joelriou Jun 23, 2024
1141dfb
Merge remote-tracking branch 'origin/localization-homequiv' into has-…
joelriou Jun 23, 2024
2f8d8c8
fixing the build
joelriou Jun 23, 2024
05ba03d
Merge remote-tracking branch 'origin/has-small-localized-hom' into ha…
joelriou Jun 23, 2024
5b005a5
added preservesLimitsOfSize variants
joelriou Jun 24, 2024
7f136b5
added converse statements
joelriou Jun 24, 2024
2f5b840
fixing the build
joelriou Jun 24, 2024
2ad8c94
Merge remote-tracking branch 'origin/single-preserves-limits' into si…
joelriou Jun 24, 2024
d3dda4b
Merge remote-tracking branch 'origin' into has-small-localized-hom
joelriou Jun 24, 2024
ed23d53
Merge remote-tracking branch 'origin' into has-small-localized-hom
joelriou Jun 24, 2024
6e22694
Merge remote-tracking branch 'origin' into has-small-localized-hom
joelriou Jun 25, 2024
051d129
reverted unnecessary change
joelriou Jun 25, 2024
a109e48
Merge remote-tracking branch 'origin' into dist-triangle-ses2
joelriou Jun 25, 2024
ce64078
Merge remote-tracking branch 'origin/has-small-localized-hom' into ha…
joelriou Jun 25, 2024
aa05936
Merge remote-tracking branch 'origin' into has-small-localized-shifte…
joelriou Jun 25, 2024
87adace
Merge remote-tracking branch 'origin' into dist-triangle-ses2
joelriou Jun 29, 2024
f311b71
Merge remote-tracking branch 'origin' into has-small-localized-hom
joelriou Jun 29, 2024
f30af05
Merge remote-tracking branch 'origin' into has-small-localized-shifte…
joelriou Jun 29, 2024
600a8c9
Merge remote-tracking branch 'origin/has-small-localized-hom' into sm…
joelriou Jun 30, 2024
b4bdf07
Merge remote-tracking branch 'origin/has-small-localized-shifted-hom'…
joelriou Jun 30, 2024
d69ef8e
Merge remote-tracking branch 'origin/dist-triangle-ses2' into small-e…
joelriou Jun 30, 2024
bc508a5
removed duplicate lemmas
joelriou Jun 30, 2024
aa4a9df
Merge remote-tracking branch 'origin' into single-triangle
joelriou Jul 1, 2024
6fe2a03
Merge remote-tracking branch 'origin/single-triangle' into small-ext-…
joelriou Jul 1, 2024
3e944a4
fixing the build
joelriou Jul 1, 2024
ba7c74b
Merge remote-tracking branch 'origin' into small-ext-derived-category
joelriou Jul 4, 2024
dd53939
Merge remote-tracking branch 'origin' into small-ext-derived-category
joelriou Jul 5, 2024
a318961
fixing the build
joelriou Jul 5, 2024
35226d6
Merge remote-tracking branch 'origin' into small-ext-derived-category
joelriou Jul 5, 2024
a379d84
fixing the build
joelriou Jul 5, 2024
3c4c026
removed AddCommGroup instance
joelriou Jul 7, 2024
eb4bdbd
Merge remote-tracking branch 'origin' into small-ext-derived-category…
joelriou Jul 7, 2024
a7739c7
wip
joelriou Jul 7, 2024
d522cdc
wip
joelriou Jul 7, 2024
aafd4ca
wip
joelriou Jul 7, 2024
d3ae9b7
Merge remote-tracking branch 'origin' into small-ext-derived-category…
joelriou Jul 7, 2024
deefeb7
Update Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
joelriou Jul 7, 2024
c684ad6
added docstring
joelriou Jul 7, 2024
4894c9f
better docstring
joelriou Jul 7, 2024
69ce8aa
Update Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
joelriou Jul 8, 2024
ef3ae72
Merge remote-tracking branch 'origin' into small-ext-derived-category…
joelriou Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 173 additions & 2 deletions Mathlib/Algebra/Homology/DerivedCategory/Ext.lean
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Then, for `C := Sheaf X.etale AddCommGroupCat.{u}`, we will have
sheaves over `X` shall be in `Type u`.
## TODO
* construct the additive structure on `Ext`
* compute `Ext X Y 0`
* define the class in `Ext S.X₃ S.X₁ 1` of a short exact short complex `S`
* construct the long exact sequences of `Ext`.
Expand All @@ -48,7 +47,7 @@ namespace CategoryTheory

variable (C : Type u) [Category.{v} C] [Abelian C]

open Localization
open Localization Limits ZeroObject

/-- The property that morphisms between single complexes in arbitrary degrees are `w`-small
in the derived category. -/
Expand Down Expand Up @@ -130,6 +129,178 @@ lemma comp_hom {a b : ℕ} (α : Ext X Y a) (β : Ext Y Z b) {c : ℕ} (h : a +
lemma ext {n : ℕ} {α β : Ext X Y n} (h : α.hom = β.hom) : α = β :=
homEquiv.injective h

lemma ext_iff {n : ℕ} {α β : Ext X Y n} : α = β ↔ α.hom = β.hom :=
fun h ↦ by rw [h], ext⟩

end

/-- The canonical map `(X ⟶ Y) → Ext X Y 0`. -/
noncomputable def mk₀ (f : X ⟶ Y) : Ext X Y 0 := SmallShiftedHom.mk₀ _ _ (by simp)
((CochainComplex.singleFunctor C 0).map f)

@[simp]
lemma mk₀_hom [HasDerivedCategory.{w'} C] (f : X ⟶ Y) :
(mk₀ f).hom = ShiftedHom.mk₀ _ (by simp) ((DerivedCategory.singleFunctor C 0).map f) := by
apply SmallShiftedHom.equiv_mk₀

@[simp 1100]
lemma mk₀_comp_mk₀ (f : X ⟶ Y) (g : Y ⟶ Z) :
(mk₀ f).comp (mk₀ g) (zero_add 0) = mk₀ (f ≫ g) := by
letI := HasDerivedCategory.standard C; ext; simp

@[simp 1100]
lemma mk₀_comp_mk₀_assoc (f : X ⟶ Y) (g : Y ⟶ Z) {n : ℕ} (α : Ext Z T n) :
(mk₀ f).comp ((mk₀ g).comp α (zero_add n)) (zero_add n) =
(mk₀ (f ≫ g)).comp α (zero_add n) := by
rw [← mk₀_comp_mk₀, comp_assoc]
omega

variable {n : ℕ}

/-! The abelian group structure on `Ext X Y n` is defined by transporting the
abelian group structure on the constructed derived category
(given by `HasDerivedCategory.standard`). This constructed derived category
is used in order to obtain most of the compatibilities satisfied by
this abelian group structure. It is then shown that the bijection
`homEquiv` between `Ext X Y n` and Hom-types in the derived category
can be promoted to an additive equivalence for any `[HasDerivedCategory C]` instance. -/

noncomputable instance : AddCommGroup (Ext X Y n) :=
letI := HasDerivedCategory.standard C
homEquiv.addCommGroup

/-- The map from `Ext X Y n` to a `ShiftedHom` type in the *constructed* derived
category given by `HasDerivedCategory.standard`: this definition is introduced
only in order to prove properties of the abelian group structure on `Ext`-groups.
Do not use this definition: use the more general `hom` instead. -/
noncomputable abbrev hom' (α : Ext X Y n) :
letI := HasDerivedCategory.standard C
ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X)
((DerivedCategory.singleFunctor C 0).obj Y) (n : ℤ) :=
letI := HasDerivedCategory.standard C
α.hom

private lemma add_hom' (α β : Ext X Y n) : (α + β).hom' = α.hom' + β.hom' :=
letI := HasDerivedCategory.standard C
homEquiv.symm.injective (Equiv.symm_apply_apply _ _)

private lemma neg_hom' (α : Ext X Y n) : (-α).hom' = -α.hom' :=
letI := HasDerivedCategory.standard C
homEquiv.symm.injective (Equiv.symm_apply_apply _ _)

variable (X Y n) in
private lemma zero_hom' : (0 : Ext X Y n).hom' = 0 :=
letI := HasDerivedCategory.standard C
homEquiv.symm.injective (Equiv.symm_apply_apply _ _)

@[simp]
lemma add_comp (α₁ α₂ : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
(α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h := by
letI := HasDerivedCategory.standard C; ext; simp [add_hom']

@[simp]
lemma comp_add (α : Ext X Y n) {m : ℕ} (β₁ β₂ : Ext Y Z m) {p : ℕ} (h : n + m = p) :
α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h := by
letI := HasDerivedCategory.standard C; ext; simp [add_hom']

@[simp]
lemma neg_comp (α : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
(-α).comp β h = -α.comp β h := by
letI := HasDerivedCategory.standard C; ext; simp [neg_hom']

@[simp]
lemma comp_neg (α : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
α.comp (-β) h = -α.comp β h := by
letI := HasDerivedCategory.standard C; ext; simp [neg_hom']

variable (X n) in
@[simp]
lemma zero_comp {m : ℕ} (β : Ext Y Z m) (p : ℕ) (h : n + m = p) :
(0 : Ext X Y n).comp β h = 0 := by
letI := HasDerivedCategory.standard C; ext; simp [zero_hom']

@[simp]
lemma comp_zero (α : Ext X Y n) (Z : C) (m : ℕ) (p : ℕ) (h : n + m = p) :
α.comp (0 : Ext Y Z m) h = 0 := by
letI := HasDerivedCategory.standard C; ext; simp [zero_hom']

@[simp]
lemma mk₀_id_comp (α : Ext X Y n) :
(mk₀ (𝟙 X)).comp α (zero_add n) = α := by
letI := HasDerivedCategory.standard C; ext; simp

@[simp]
lemma comp_mk₀_id (α : Ext X Y n) :
α.comp (mk₀ (𝟙 Y)) (add_zero n) = α := by
letI := HasDerivedCategory.standard C; ext; simp

variable (X Y) in
@[simp]
lemma mk₀_zero : mk₀ (0 : X ⟶ Y) = 0 := by
letI := HasDerivedCategory.standard C; ext; simp [zero_hom']

section

variable [HasDerivedCategory.{w'} C]

variable (X Y n) in
@[simp]
lemma zero_hom : (0 : Ext X Y n).hom = 0 := by
let β : Ext 0 Y n := 0
have hβ : β.hom = 0 := by apply (Functor.map_isZero _ (isZero_zero C)).eq_of_src
have : (0 : Ext X Y n) = (0 : Ext X 0 0).comp β (zero_add n) := by simp [β]
rw [this, comp_hom, hβ, ShiftedHom.comp_zero]

attribute [local instance] preservesBinaryBiproductsOfPreservesBiproducts

lemma biprod_ext {X₁ X₂ : C} {α β : Ext (X₁ ⊞ X₂) Y n}
(h₁ : (mk₀ biprod.inl).comp α (zero_add n) = (mk₀ biprod.inl).comp β (zero_add n))
(h₂ : (mk₀ biprod.inr).comp α (zero_add n) = (mk₀ biprod.inr).comp β (zero_add n)) :
α = β := by
letI := HasDerivedCategory.standard C
rw [ext_iff] at h₁ h₂ ⊢
simp only [comp_hom, mk₀_hom, ShiftedHom.mk₀_comp] at h₁ h₂
apply BinaryCofan.IsColimit.hom_ext
(isBinaryBilimitOfPreserves (DerivedCategory.singleFunctor C 0)
(BinaryBiproduct.isBilimit X₁ X₂)).isColimit
all_goals assumption

@[simp]
lemma add_hom (α β : Ext X Y n) : (α + β).hom = α.hom + β.hom := by
let α' : Ext (X ⊞ X) Y n := (mk₀ biprod.fst).comp α (zero_add n)
let β' : Ext (X ⊞ X) Y n := (mk₀ biprod.snd).comp β (zero_add n)
have eq₁ : α + β = (mk₀ (biprod.lift (𝟙 X) (𝟙 X))).comp (α' + β') (zero_add n) := by
simp [α', β']
have eq₂ : α' + β' = homEquiv.symm (α'.hom + β'.hom) := by
apply biprod_ext
all_goals ext; simp [α', β', ← Functor.map_comp]
simp only [eq₁, eq₂, comp_hom, Equiv.apply_symm_apply, ShiftedHom.comp_add]
congr
· dsimp [α']
rw [comp_hom, mk₀_hom, mk₀_hom]
dsimp
rw [ShiftedHom.mk₀_comp_mk₀_assoc, ← Functor.map_comp,
biprod.lift_fst, Functor.map_id, ShiftedHom.mk₀_id_comp]
· dsimp [β']
rw [comp_hom, mk₀_hom, mk₀_hom]
dsimp
rw [ShiftedHom.mk₀_comp_mk₀_assoc, ← Functor.map_comp,
biprod.lift_snd, Functor.map_id, ShiftedHom.mk₀_id_comp]

lemma neg_hom (α : Ext X Y n) : (-α).hom = -α.hom := by
rw [← add_right_inj α.hom, ← add_hom, add_right_neg, add_right_neg, zero_hom]

/-- When an instance of `[HasDerivedCategory.{w'} C]` is available, this is the additive
bijection between `Ext.{w} X Y n` and a type of morphisms in the derived category. -/
noncomputable def homAddEquiv {n : ℕ} :
Ext.{w} X Y n ≃+ ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X)
((DerivedCategory.singleFunctor C 0).obj Y) (n : ℤ) where
toEquiv := homEquiv
map_add' := by simp

@[simp]
lemma homAddEquiv_apply (α : Ext X Y n) : homAddEquiv α = α.hom := rfl

end

end Ext
Expand Down
20 changes: 20 additions & 0 deletions Mathlib/CategoryTheory/Localization/SmallShiftedHom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ noncomputable def comp {a b c : M} [HasSmallLocalizedShiftedHom.{w} W M X Y]
SmallShiftedHom.{w} W X Z c :=
SmallHom.comp f (g.shift a c h)

variable (W) in
/-- The canonical map `(X ⟶ Y) → SmallShiftedHom.{w} W X Y m₀` when `m₀ = 0` and
`[HasSmallLocalizedShiftedHom.{w} W M X Y]` holds. -/
noncomputable def mk₀ [HasSmallLocalizedShiftedHom.{w} W M X Y]
(m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) :
SmallShiftedHom.{w} W X Y m₀ :=
SmallHom.mk W (f ≫ (shiftFunctorZero' C m₀ hm₀).inv.app Y)

end

section
Expand Down Expand Up @@ -176,6 +184,18 @@ lemma equiv_comp [HasSmallLocalizedShiftedHom.{w} W M X Y]
comp_id, Functor.map_comp]
rfl

@[simp]
lemma equiv_mk₀ [HasSmallLocalizedShiftedHom.{w} W M X Y]
(m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) :
equiv W L (SmallShiftedHom.mk₀ W m₀ hm₀ f) =
ShiftedHom.mk₀ m₀ hm₀ (L.map f) := by
subst hm₀
dsimp [equiv, mk₀]
erw [SmallHom.equiv_mk, Iso.homToEquiv_apply, Functor.map_comp]
dsimp [equiv, mk₀, ShiftedHom.mk₀, shiftFunctorZero']
simp only [comp_id, L.commShiftIso_zero, Functor.CommShift.isoZero_hom_app, assoc,
← Functor.map_comp_assoc, Iso.inv_hom_id_app, Functor.id_obj, Functor.map_id, id_comp]

end

lemma comp_assoc {X Y Z T : C} {a₁ a₂ a₃ a₁₂ a₂₃ a : M}
Expand Down
36 changes: 36 additions & 0 deletions Mathlib/CategoryTheory/Shift/ShiftedHom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,32 @@ lemma comp_mk₀_id {a : M} (f : ShiftedHom X Y a) (m₀ : M) (hm₀ : m₀ = 0)
f.comp (mk₀ m₀ hm₀ (𝟙 Y)) (by rw [hm₀, zero_add]) = f := by
simp [comp_mk₀]

@[simp 1100]
lemma mk₀_comp_mk₀ (f : X ⟶ Y) (g : Y ⟶ Z) {a b c : M} (h : b + a = c)
(ha : a = 0) (hb : b = 0) :
(mk₀ a ha f).comp (mk₀ b hb g) h = mk₀ c (by rw [← h, ha, hb, add_zero]) (f ≫ g) := by
subst ha hb
obtain rfl : c = 0 := by rw [← h, zero_add]
rw [mk₀_comp, mk₀, mk₀, assoc]

@[simp]
lemma mk₀_comp_mk₀_assoc (f : X ⟶ Y) (g : Y ⟶ Z) {a : M}
(ha : a = 0) {d : M} (h : ShiftedHom Z T d) :
(mk₀ a ha f).comp ((mk₀ a ha g).comp h
(show _ = d by rw [ha, add_zero])) (show _ = d by rw [ha, add_zero]) =
(mk₀ a ha (f ≫ g)).comp h (by rw [ha, add_zero]) := by
subst ha
rw [← comp_assoc, mk₀_comp_mk₀]
all_goals simp

section Preadditive

variable [Preadditive C]

variable (X Y) in
@[simp]
lemma mk₀_zero (m₀ : M) (hm₀ : m₀ = 0) : mk₀ m₀ hm₀ (0 : X ⟶ Y) = 0 := by simp [mk₀]

@[simp]
lemma comp_add [∀ (a : M), (shiftFunctor C a).Additive]
{a b c : M} (α : ShiftedHom X Y a) (β₁ β₂ : ShiftedHom Y Z b) (h : b + a = c) :
Expand All @@ -108,13 +130,27 @@ lemma add_comp
(α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h := by
rw [comp, comp, comp, Preadditive.add_comp]

@[simp]
lemma comp_neg [∀ (a : M), (shiftFunctor C a).Additive]
{a b c : M} (α : ShiftedHom X Y a) (β : ShiftedHom Y Z b) (h : b + a = c) :
α.comp (-β) h = -α.comp β h := by
rw [comp, comp, Functor.map_neg, Preadditive.neg_comp, Preadditive.comp_neg]

@[simp]
lemma neg_comp
{a b c : M} (α : ShiftedHom X Y a) (β : ShiftedHom Y Z b) (h : b + a = c) :
(-α).comp β h = -α.comp β h := by
rw [comp, comp, Preadditive.neg_comp]

variable (Z) in
@[simp]
lemma comp_zero [∀ (a : M), (shiftFunctor C a).PreservesZeroMorphisms]
{a : M} (β : ShiftedHom X Y a) {b c : M} (h : b + a = c) :
β.comp (0 : ShiftedHom Y Z b) h = 0 := by
rw [comp, Functor.map_zero, Limits.zero_comp, Limits.comp_zero]

variable (X) in
@[simp]
lemma zero_comp (a : M) {b c : M} (β : ShiftedHom Y Z b) (h : b + a = c) :
(0 : ShiftedHom X Y a).comp β h = 0 := by
rw [comp, Limits.zero_comp]
Expand Down
Loading