File: Mathlib/CategoryTheory/Abelian/ProjectiveResolution.lean

full_name: CategoryTheory.ProjectiveResolution.liftFZero
code: /-- Auxiliary construction for `lift`. -/
def liftFZero {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y) (Q : ProjectiveResolution Z) :
    P.complex.X 0 ⟶ Q.complex.X 0 
goal: P.complex.X 0 ⟶ Q.complex.X 0

full_name: CategoryTheory.ProjectiveResolution.exact₀
code: lemma exact₀ {Z : C} (P : ProjectiveResolution Z) :
    (ShortComplex.mk _ _ P.complex_d_comp_π_f_zero).Exact 
goal: (CategoryTheory.ShortComplex.mk (P.complex.d 1 0) (P.π.f 0) ⋯).Exact

full_name: CategoryTheory.ProjectiveResolution.liftFOne
code: /-- Auxiliary construction for `lift`. -/
def liftFOne {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y) (Q : ProjectiveResolution Z) :
    P.complex.X 1 ⟶ Q.complex.X 1 
goal: P.complex.X 1 ⟶ Q.complex.X 1

full_name: CategoryTheory.ProjectiveResolution.liftFOne_zero_comm
code: @[simp]
theorem liftFOne_zero_comm {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y)
    (Q : ProjectiveResolution Z) :
    liftFOne f P Q ≫ Q.complex.d 1 0 = P.complex.d 1 0 ≫ liftFZero f P Q 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.liftFOne f P Q) (Q.complex.d 1 0) =
  CategoryTheory.CategoryStruct.comp (P.complex.d 1 0) (CategoryTheory.ProjectiveResolution.liftFZero f P Q)

full_name: CategoryTheory.ProjectiveResolution.liftFSucc
code: /-- Auxiliary construction for `lift`. -/
def liftFSucc {Y Z : C} (P : ProjectiveResolution Y) (Q : ProjectiveResolution Z) (n : ℕ)
    (g : P.complex.X n ⟶ Q.complex.X n) (g' : P.complex.X (n + 1) ⟶ Q.complex.X (n + 1))
    (w : g' ≫ Q.complex.d (n + 1) n = P.complex.d (n + 1) n ≫ g) :
    Σ'g'' : P.complex.X (n + 2) ⟶ Q.complex.X (n + 2),
      g'' ≫ Q.complex.d (n + 2) (n + 1) = P.complex.d (n + 2) (n + 1) ≫ g' 
goal: (g'' : P.complex.X (n + 2) ⟶ Q.complex.X (n + 2)) ×'
  CategoryTheory.CategoryStruct.comp g'' (Q.complex.d (n + 2) (n + 1)) =
    CategoryTheory.CategoryStruct.comp (P.complex.d (n + 2) (n + 1)) g'

full_name: CategoryTheory.ProjectiveResolution.lift
code: /-- A morphism in `C` lift to a chain map between projective resolutions. -/
def lift {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y) (Q : ProjectiveResolution Z) :
    P.complex ⟶ Q.complex 
goal: P.complex ⟶ Q.complex

full_name: CategoryTheory.ProjectiveResolution.lift_commutes
code: /-- The resolution maps intertwine the lift of a morphism and that morphism. -/
@[reassoc (attr := simp)]
theorem lift_commutes {Y Z : C} (f : Y ⟶ Z) (P : ProjectiveResolution Y)
    (Q : ProjectiveResolution Z) : lift f P Q ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.lift f P Q) Q.π =
  CategoryTheory.CategoryStruct.comp P.π ((ChainComplex.single₀ C).map f)

full_name: CategoryTheory.ProjectiveResolution.lift_commutes_zero
code: @[reassoc (attr := simp)]
lemma lift_commutes_zero {Y Z : C} (f : Y ⟶ Z)
    (P : ProjectiveResolution Y) (Q : ProjectiveResolution Z) :
    (lift f P Q).f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f 
goal: CategoryTheory.CategoryStruct.comp ((CategoryTheory.ProjectiveResolution.lift f P Q).f 0) (Q.π.f 0) =
  CategoryTheory.CategoryStruct.comp (P.π.f 0) f

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZeroZero
code: /-- An auxiliary definition for `liftHomotopyZero`. -/
def liftHomotopyZeroZero {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (comm : f ≫ Q.π = 0) : P.complex.X 0 ⟶ Q.complex.X 1 
goal: P.complex.X 0 ⟶ Q.complex.X 1

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZeroZero_comp
code: @[reassoc (attr := simp)]
lemma liftHomotopyZeroZero_comp {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (comm : f ≫ Q.π = 0) :
    liftHomotopyZeroZero f comm ≫ Q.complex.d 1 0 = f.f 0 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.liftHomotopyZeroZero f comm) (Q.complex.d 1 0) =
  f.f 0

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZeroOne
code: /-- An auxiliary definition for `liftHomotopyZero`. -/
def liftHomotopyZeroOne {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (comm : f ≫ Q.π = 0) :
    P.complex.X 1 ⟶ Q.complex.X 2 
goal: P.complex.X 1 ⟶ Q.complex.X 2

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZeroOne_comp
code: @[reassoc (attr := simp)]
lemma liftHomotopyZeroOne_comp {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (comm : f ≫ Q.π = 0) :
    liftHomotopyZeroOne f comm ≫ Q.complex.d 2 1 =
      f.f 1 - P.complex.d 1 0 ≫ liftHomotopyZeroZero f comm 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.liftHomotopyZeroOne f comm) (Q.complex.d 2 1) =
  f.f 1 -
    CategoryTheory.CategoryStruct.comp (P.complex.d 1 0)
      (CategoryTheory.ProjectiveResolution.liftHomotopyZeroZero f comm)

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZeroSucc
code: /-- An auxiliary definition for `liftHomotopyZero`. -/
def liftHomotopyZeroSucc {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (n : ℕ) (g : P.complex.X n ⟶ Q.complex.X (n + 1))
    (g' : P.complex.X (n + 1) ⟶ Q.complex.X (n + 2))
    (w : f.f (n + 1) = P.complex.d (n + 1) n ≫ g + g' ≫ Q.complex.d (n + 2) (n + 1)) :
    P.complex.X (n + 2) ⟶ Q.complex.X (n + 3) 
goal: P.complex.X (n + 2) ⟶ Q.complex.X (n + 3)

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZeroSucc_comp
code: @[reassoc (attr := simp)]
lemma liftHomotopyZeroSucc_comp {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (n : ℕ) (g : P.complex.X n ⟶ Q.complex.X (n + 1))
    (g' : P.complex.X (n + 1) ⟶ Q.complex.X (n + 2))
    (w : f.f (n + 1) = P.complex.d (n + 1) n ≫ g + g' ≫ Q.complex.d (n + 2) (n + 1)) :
    liftHomotopyZeroSucc f n g g' w ≫ Q.complex.d (n + 3) (n + 2) =
      f.f (n + 2) - P.complex.d _ _ ≫ g' 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.liftHomotopyZeroSucc f n g g' w)
    (Q.complex.d (n + 3) (n + 2)) =
  f.f (n + 2) - CategoryTheory.CategoryStruct.comp (P.complex.d (n + 2) (n + 1)) g'

full_name: CategoryTheory.ProjectiveResolution.liftHomotopyZero
code: /-- Any lift of the zero morphism is homotopic to zero. -/
def liftHomotopyZero {Y Z : C} {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (f : P.complex ⟶ Q.complex) (comm : f ≫ Q.π = 0) : Homotopy f 0 
goal: Homotopy f 0

full_name: CategoryTheory.ProjectiveResolution.liftHomotopy
code: /-- Two lifts of the same morphism are homotopic. -/
def liftHomotopy {Y Z : C} (f : Y ⟶ Z) {P : ProjectiveResolution Y} {Q : ProjectiveResolution Z}
    (g h : P.complex ⟶ Q.complex) (g_comm : g ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f)
    (h_comm : h ≫ Q.π = P.π ≫ (ChainComplex.single₀ C).map f) : Homotopy g h 
goal: Homotopy g h

full_name: CategoryTheory.ProjectiveResolution.liftIdHomotopy
code: /-- The lift of the identity morphism is homotopic to the identity chain map. -/
def liftIdHomotopy (X : C) (P : ProjectiveResolution X) :
    Homotopy (lift (𝟙 X) P P) (𝟙 P.complex) 
goal: Homotopy (CategoryTheory.ProjectiveResolution.lift (CategoryTheory.CategoryStruct.id X) P P)
  (CategoryTheory.CategoryStruct.id P.complex)

full_name: CategoryTheory.ProjectiveResolution.liftCompHomotopy
code: /-- The lift of a composition is homotopic to the composition of the lifts. -/
def liftCompHomotopy {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) (P : ProjectiveResolution X)
    (Q : ProjectiveResolution Y) (R : ProjectiveResolution Z) :
    Homotopy (lift (f ≫ g) P R) (lift f P Q ≫ lift g Q R) 
goal: Homotopy (CategoryTheory.ProjectiveResolution.lift (CategoryTheory.CategoryStruct.comp f g) P R)
  (CategoryTheory.CategoryStruct.comp (CategoryTheory.ProjectiveResolution.lift f P Q)
    (CategoryTheory.ProjectiveResolution.lift g Q R))

full_name: CategoryTheory.ProjectiveResolution.homotopyEquiv
code: /-- Any two projective resolutions are homotopy equivalent. -/
def homotopyEquiv {X : C} (P Q : ProjectiveResolution X) :
    HomotopyEquiv P.complex Q.complex 
goal: HomotopyEquiv P.complex Q.complex

full_name: CategoryTheory.ProjectiveResolution.homotopyEquiv_hom_π
code: @[reassoc (attr := simp)]
theorem homotopyEquiv_hom_π {X : C} (P Q : ProjectiveResolution X) :
    (homotopyEquiv P Q).hom ≫ Q.π = P.π 
goal: CategoryTheory.CategoryStruct.comp (P.homotopyEquiv Q).hom Q.π = P.π

full_name: CategoryTheory.ProjectiveResolution.homotopyEquiv_inv_π
code: @[reassoc (attr := simp)]
theorem homotopyEquiv_inv_π {X : C} (P Q : ProjectiveResolution X) :
    (homotopyEquiv P Q).inv ≫ P.π = Q.π 
goal: CategoryTheory.CategoryStruct.comp (P.homotopyEquiv Q).inv P.π = Q.π

full_name: CategoryTheory.projectiveResolution
code: /-- An arbitrarily chosen projective resolution of an object. -/
abbrev projectiveResolution (Z : C) [HasZeroObject C]
    [HasZeroMorphisms C] [HasProjectiveResolution Z] :
    ProjectiveResolution Z 
goal: CategoryTheory.ProjectiveResolution Z

full_name: CategoryTheory.projectiveResolutions
code: /-- Taking projective resolutions is functorial,
if considered with target the homotopy category
(`ℕ`-indexed chain complexes and chain maps up to homotopy).
-/
def projectiveResolutions : C ⥤ HomotopyCategory C (ComplexShape.down ℕ) 
goal: CategoryTheory.Functor C (HomotopyCategory C (ComplexShape.down ℕ))

full_name: CategoryTheory.ProjectiveResolution.iso
code: /-- If `P : ProjectiveResolution X`, then the chosen `(projectiveResolutions C).obj X`
is isomorphic (in the homotopy category) to `P.complex`. -/
def ProjectiveResolution.iso {X : C} (P : ProjectiveResolution X) :
    (projectiveResolutions C).obj X ≅
      (HomotopyCategory.quotient _ _).obj P.complex 
goal: (CategoryTheory.projectiveResolutions C).obj X ≅ (HomotopyCategory.quotient C (ComplexShape.down ℕ)).obj P.complex

full_name: CategoryTheory.ProjectiveResolution.iso_inv_naturality
code: @[reassoc]
lemma ProjectiveResolution.iso_inv_naturality {X Y : C} (f : X ⟶ Y)
    (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f) :
    P.iso.inv ≫ (projectiveResolutions C).map f =
      (HomotopyCategory.quotient _ _).map φ ≫ Q.iso.inv 
goal: CategoryTheory.CategoryStruct.comp P.iso.inv ((CategoryTheory.projectiveResolutions C).map f) =
  CategoryTheory.CategoryStruct.comp ((HomotopyCategory.quotient C (ComplexShape.down ℕ)).map φ) Q.iso.inv

full_name: CategoryTheory.ProjectiveResolution.iso_hom_naturality
code: @[reassoc]
lemma ProjectiveResolution.iso_hom_naturality {X Y : C} (f : X ⟶ Y)
    (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f) :
    (projectiveResolutions C).map f ≫ Q.iso.hom =
      P.iso.hom ≫ (HomotopyCategory.quotient _ _).map φ 
goal: CategoryTheory.CategoryStruct.comp ((CategoryTheory.projectiveResolutions C).map f) Q.iso.hom =
  CategoryTheory.CategoryStruct.comp P.iso.hom ((HomotopyCategory.quotient C (ComplexShape.down ℕ)).map φ)

full_name: CategoryTheory.exact_d_f
code: theorem exact_d_f {X Y : C} (f : X ⟶ Y) :
    (ShortComplex.mk (d f) f (by simp)).Exact 
goal: (CategoryTheory.ShortComplex.mk (CategoryTheory.Projective.d f) f ⋯).Exact

full_name: CategoryTheory.ProjectiveResolution.ofComplex
code: /-- Auxiliary definition for `ProjectiveResolution.of`. -/
def ofComplex : ChainComplex C ℕ 
goal: ChainComplex C ℕ

full_name: CategoryTheory.ProjectiveResolution.ofComplex_d_1_0
code: lemma ofComplex_d_1_0 :
    (ofComplex Z).d 1 0 = d (Projective.π Z) 
goal: (CategoryTheory.ProjectiveResolution.ofComplex Z).d 1 0 = CategoryTheory.Projective.d (CategoryTheory.Projective.π Z)

full_name: CategoryTheory.ProjectiveResolution.ofComplex_exactAt_succ
code: lemma ofComplex_exactAt_succ (n : ℕ) :
    (ofComplex Z).ExactAt (n + 1) 
goal: HomologicalComplex.ExactAt (CategoryTheory.ProjectiveResolution.ofComplex Z) (n + 1)

full_name: CategoryTheory.ProjectiveResolution.instProjectiveXNatOfComplex
code: instance (n : ℕ) : Projective ((ofComplex Z).X n) 
goal: CategoryTheory.Projective ((CategoryTheory.ProjectiveResolution.ofComplex Z).X n)

full_name: CategoryTheory.ProjectiveResolution.of_def
code: /-- In any abelian category with enough projectives,
`ProjectiveResolution.of Z` constructs an projective resolution of the object `Z`.
-/
irreducible_def of : ProjectiveResolution Z 
goal: CategoryTheory.ProjectiveResolution.of Z =
  CategoryTheory.ProjectiveResolution.mk (CategoryTheory.ProjectiveResolution.ofComplex Z) ⋯
    (((CategoryTheory.ProjectiveResolution.ofComplex Z).toSingle₀Equiv Z).symm ⟨CategoryTheory.Projective.π Z, ⋯⟩) ⋯

full_name: CategoryTheory.ProjectiveResolution.wrapped._@.Mathlib.CategoryTheory.Abelian.ProjectiveResolution._hyg.2718
code: /-- In any abelian category with enough projectives,
`ProjectiveResolution.of Z` constructs an projective resolution of the object `Z`.
-/
irreducible_def of : ProjectiveResolution Z 
goal: Subtype (Eq @CategoryTheory.ProjectiveResolution.definition✝)

full_name: CategoryTheory.ProjectiveResolution.definition._@.Mathlib.CategoryTheory.Abelian.ProjectiveResolution._hyg.2718
code: /-- In any abelian category with enough projectives,
`ProjectiveResolution.of Z` constructs an projective resolution of the object `Z`.
-/
irreducible_def of : ProjectiveResolution Z 
goal: CategoryTheory.ProjectiveResolution Z

full_name: CategoryTheory.ProjectiveResolution.of
code: /-- In any abelian category with enough projectives,
`ProjectiveResolution.of Z` constructs an projective resolution of the object `Z`.
-/
irreducible_def of : ProjectiveResolution Z 
goal: CategoryTheory.ProjectiveResolution Z

full_name: CategoryTheory.ProjectiveResolution.instHasProjectiveResolution
code: instance (priority := 100) (Z : C) : HasProjectiveResolution Z 
goal: CategoryTheory.HasProjectiveResolution Z

full_name: CategoryTheory.ProjectiveResolution.instHasProjectiveResolutions
code: instance (priority := 100) : HasProjectiveResolutions C 
goal: CategoryTheory.HasProjectiveResolutions C