File: Mathlib/CategoryTheory/Shift/ShiftedHom.lean

full_name: CategoryTheory.ShiftedHom
code: /-- In a category `C` equipped with a shift by an additive monoid,
this is the type of morphisms `X ⟶ (Y⟦n⟧)` for `m : M`.  -/
def ShiftedHom (X Y : C) (m : M) : Type _ 
goal: Type u_5

full_name: CategoryTheory.instAddCommGroupShiftedHomOfPreadditive
code: instance [Preadditive C] (X Y : C) (n : M) : AddCommGroup (ShiftedHom X Y n) 
goal: AddCommGroup (CategoryTheory.ShiftedHom X Y n)

full_name: CategoryTheory.ShiftedHom.comp
code: /-- The composition of `f : X ⟶ Y⟦a⟧` and `g : Y ⟶ Z⟦b⟧`, as a morphism `X ⟶ Z⟦c⟧`
when `b + a = c`. -/
noncomputable def comp {a b c : M} (f : ShiftedHom X Y a) (g : ShiftedHom Y Z b) (h : b + a = c) :
    ShiftedHom X Z c 
goal: CategoryTheory.ShiftedHom X Z c

full_name: CategoryTheory.ShiftedHom.comp_assoc
code: lemma comp_assoc {a₁ a₂ a₃ a₁₂ a₂₃ a : M}
    (α : ShiftedHom X Y a₁) (β : ShiftedHom Y Z a₂) (γ : ShiftedHom Z T a₃)
    (h₁₂ : a₂ + a₁ = a₁₂) (h₂₃ : a₃ + a₂ = a₂₃) (h : a₃ + a₂ + a₁ = a) :
    (α.comp β h₁₂).comp γ (show a₃ + a₁₂ = a by rw [← h₁₂, ← add_assoc, h]) =
      α.comp (β.comp γ h₂₃) (by rw [← h₂₃, h]) 
goal: (α.comp β h₁₂).comp γ ⋯ = α.comp (β.comp γ h₂₃) ⋯

full_name: CategoryTheory.ShiftedHom.mk₀
code: /-- The element of `ShiftedHom X Y m₀` (when `m₀ = 0`) attached to a morphism `X ⟶ Y`. -/
noncomputable def mk₀ (m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) : ShiftedHom X Y m₀ 
goal: CategoryTheory.ShiftedHom X Y m₀

full_name: CategoryTheory.ShiftedHom.homEquiv
code: /-- The bijection `(X ⟶ Y) ≃ ShiftedHom X Y m₀` when `m₀ = 0`. -/
@[simps apply]
noncomputable def homEquiv (m₀ : M) (hm₀ : m₀ = 0) : (X ⟶ Y) ≃ ShiftedHom X Y m₀ 
goal: (X ⟶ Y) ≃ CategoryTheory.ShiftedHom X Y m₀

full_name: CategoryTheory.ShiftedHom.homEquiv_apply
code: /-- The bijection `(X ⟶ Y) ≃ ShiftedHom X Y m₀` when `m₀ = 0`. -/
@[simps apply]
noncomputable def homEquiv (m₀ : M) (hm₀ : m₀ = 0) : (X ⟶ Y) ≃ ShiftedHom X Y m₀ 
goal: (CategoryTheory.ShiftedHom.homEquiv m₀ hm₀) f = CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ f

full_name: CategoryTheory.ShiftedHom.mk₀_comp
code: lemma mk₀_comp (m₀ : M) (hm₀ : m₀ = 0) (f : X ⟶ Y) {a : M} (g : ShiftedHom Y Z a) :
    (mk₀ m₀ hm₀ f).comp g (by rw [hm₀, add_zero]) = f ≫ g 
goal: (CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ f).comp g ⋯ = CategoryTheory.CategoryStruct.comp f g

full_name: CategoryTheory.ShiftedHom.mk₀_id_comp
code: @[simp]
lemma mk₀_id_comp (m₀ : M) (hm₀ : m₀ = 0) {a : M} (f : ShiftedHom X Y a) :
    (mk₀ m₀ hm₀ (𝟙 X)).comp f (by rw [hm₀, add_zero]) = f 
goal: (CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ (CategoryTheory.CategoryStruct.id X)).comp f ⋯ = f

full_name: CategoryTheory.ShiftedHom.comp_mk₀
code: lemma comp_mk₀ {a : M} (f : ShiftedHom X Y a) (m₀ : M) (hm₀ : m₀ = 0) (g : Y ⟶ Z) :
    f.comp (mk₀ m₀ hm₀ g) (by rw [hm₀, zero_add]) = f ≫ g⟦a⟧' 
goal: f.comp (CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ g) ⋯ =
  CategoryTheory.CategoryStruct.comp f ((CategoryTheory.shiftFunctor C a).map g)

full_name: CategoryTheory.ShiftedHom.comp_mk₀_id
code: @[simp]
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 
goal: f.comp (CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ (CategoryTheory.CategoryStruct.id Y)) ⋯ = f

full_name: CategoryTheory.ShiftedHom.mk₀_comp_mk₀
code: @[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) 
goal: (CategoryTheory.ShiftedHom.mk₀ a ha f).comp (CategoryTheory.ShiftedHom.mk₀ b hb g) h =
  CategoryTheory.ShiftedHom.mk₀ c ⋯ (CategoryTheory.CategoryStruct.comp f g)

full_name: CategoryTheory.ShiftedHom.mk₀_comp_mk₀_assoc
code: @[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]) 
goal: (CategoryTheory.ShiftedHom.mk₀ a ha f).comp ((CategoryTheory.ShiftedHom.mk₀ a ha g).comp h ⋯) ⋯ =
  (CategoryTheory.ShiftedHom.mk₀ a ha (CategoryTheory.CategoryStruct.comp f g)).comp h ⋯

full_name: CategoryTheory.ShiftedHom.mk₀_zero
code: @[simp]
lemma mk₀_zero (m₀ : M) (hm₀ : m₀ = 0) : mk₀ m₀ hm₀ (0 : X ⟶ Y) = 0 
goal: CategoryTheory.ShiftedHom.mk₀ m₀ hm₀ 0 = 0

full_name: CategoryTheory.ShiftedHom.comp_add
code: @[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) :
    α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h 
goal: α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h

full_name: CategoryTheory.ShiftedHom.add_comp
code: @[simp]
lemma add_comp
    {a b c : M} (α₁ α₂ : ShiftedHom X Y a) (β : ShiftedHom Y Z b) (h : b + a = c) :
    (α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h 
goal: (α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h

full_name: CategoryTheory.ShiftedHom.comp_neg
code: @[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 
goal: α.comp (-β) h = -α.comp β h

full_name: CategoryTheory.ShiftedHom.neg_comp
code: @[simp]
lemma neg_comp
    {a b c : M} (α : ShiftedHom X Y a) (β : ShiftedHom Y Z b) (h : b + a = c) :
    (-α).comp β h = -α.comp β h 
goal: (-α).comp β h = -α.comp β h

full_name: CategoryTheory.ShiftedHom.comp_zero
code: @[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 
goal: β.comp 0 h = 0

full_name: CategoryTheory.ShiftedHom.zero_comp
code: @[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 
goal: CategoryTheory.ShiftedHom.comp 0 β h = 0

full_name: CategoryTheory.ShiftedHom.map
code: /-- The action on `ShiftedHom` of a functor which commutes with the shift. -/
def map {a : M} (f : ShiftedHom X Y a) (F : C ⥤ D) [F.CommShift M] :
    ShiftedHom (F.obj X) (F.obj Y) a 
goal: CategoryTheory.ShiftedHom (F.obj X) (F.obj Y) a

full_name: CategoryTheory.ShiftedHom.id_map
code: @[simp]
lemma id_map {a : M} (f : ShiftedHom X Y a) : f.map (𝟭 C) = f 
goal: f.map (CategoryTheory.Functor.id C) = f

full_name: CategoryTheory.ShiftedHom.comp_map
code: lemma comp_map {a : M} (f : ShiftedHom X Y a) (F : C ⥤ D) [F.CommShift M]
    (G : D ⥤ E) [G.CommShift M] : f.map (F ⋙ G) = (f.map F).map G 
goal: f.map (F.comp G) = (f.map F).map G

full_name: CategoryTheory.ShiftedHom.map_comp
code: lemma map_comp {a b c : M} (f : ShiftedHom X Y a) (g : ShiftedHom Y Z b)
    (h : b + a = c) (F : C ⥤ D) [F.CommShift M] :
    (f.comp g h).map F = (f.map F).comp (g.map F) h 
goal: (f.comp g h).map F = (f.map F).comp (g.map F) h