File: Mathlib/Algebra/Homology/DerivedCategory/Ext.lean

full_name: CategoryTheory.HasExt
code: /-- The property that morphisms between single complexes in arbitrary degrees are `w`-small
in the derived category. -/
abbrev HasExt : Prop 
goal: Prop

full_name: CategoryTheory.hasExt_iff
code: lemma hasExt_iff [HasDerivedCategory.{w'} C] :
    HasExt.{w} C ↔ ∀ (X Y : C) (n : ℤ), Small.{w}
      ((DerivedCategory.singleFunctor C 0).obj X ⟶
        (((DerivedCategory.singleFunctor C 0).obj Y)⟦n⟧)) 
goal: CategoryTheory.HasExt C ↔
  ∀ (X Y : C) (n : ℤ),
    Small.{w, w'}
      ((DerivedCategory.singleFunctor C 0).obj X ⟶
        (CategoryTheory.shiftFunctor (DerivedCategory C) n).obj ((DerivedCategory.singleFunctor C 0).obj Y))

full_name: CategoryTheory.hasExt_of_hasDerivedCategory
code: lemma hasExt_of_hasDerivedCategory [HasDerivedCategory.{w} C] : HasExt.{w} C 
goal: CategoryTheory.HasExt C

full_name: CategoryTheory.Abelian.Ext
code: /-- A Ext-group in an abelian category `C`, defined as a `Type w` when `[HasExt.{w} C]`. -/
def Ext (X Y : C) (n : ℕ) : Type w 
goal: Type w

full_name: CategoryTheory.Abelian.Ext.comp
code: /-- The composition of `Ext`. -/
noncomputable def comp {a b : ℕ} (α : Ext X Y a) (β : Ext Y Z b) {c : ℕ} (h : a + b = c) :
    Ext X Z c 
goal: CategoryTheory.Abelian.Ext X Z c

full_name: CategoryTheory.Abelian.Ext.comp_assoc
code: lemma comp_assoc {a₁ a₂ a₃ a₁₂ a₂₃ a : ℕ} (α : Ext X Y a₁) (β : Ext Y Z a₂) (γ : Ext Z T a₃)
    (h₁₂ : a₁ + a₂ = a₁₂) (h₂₃ : a₂ + a₃ = a₂₃) (h : a₁ + a₂ + a₃ = a) :
    (α.comp β h₁₂).comp γ (show a₁₂ + a₃ = a by omega) =
      α.comp (β.comp γ h₂₃) (by omega) 
goal: (α.comp β h₁₂).comp γ ⋯ = α.comp (β.comp γ h₂₃) ⋯

full_name: CategoryTheory.Abelian.Ext.homEquiv
code: /-- When an instance of `[HasDerivedCategory.{w'} C]` is available, this is the bijection
between `Ext.{w} X Y n` and a type of morphisms in the derived category. -/
noncomputable def homEquiv {n : ℕ} :
    Ext.{w} X Y n ≃ ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X)
      ((DerivedCategory.singleFunctor C 0).obj Y) (n : ℤ) 
goal: CategoryTheory.Abelian.Ext X Y n ≃
  CategoryTheory.ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X) ((DerivedCategory.singleFunctor C 0).obj Y) ↑n

full_name: CategoryTheory.Abelian.Ext.hom
code: /-- The morphism in the derived category which corresponds to an element in `Ext X Y a`. -/
noncomputable abbrev hom {a : ℕ} (α : Ext X Y a) :
    ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X)
      ((DerivedCategory.singleFunctor C 0).obj Y) (a : ℤ) 
goal: CategoryTheory.ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X) ((DerivedCategory.singleFunctor C 0).obj Y) ↑a

full_name: CategoryTheory.Abelian.Ext.comp_hom
code: @[simp]
lemma comp_hom {a b : ℕ} (α : Ext X Y a) (β : Ext Y Z b) {c : ℕ} (h : a + b = c) :
    (α.comp β h).hom = α.hom.comp β.hom (by omega) 
goal: (α.comp β h).hom = α.hom.comp β.hom ⋯

full_name: CategoryTheory.Abelian.Ext.ext
code: @[ext]
lemma ext {n : ℕ} {α β : Ext X Y n} (h : α.hom = β.hom) : α = β 
goal: α = β

full_name: CategoryTheory.Abelian.Ext.ext_iff
code: protected lemma ext_iff {n : ℕ} {α β : Ext X Y n} : α = β ↔ α.hom = β.hom 
goal: α = β ↔ α.hom = β.hom

full_name: CategoryTheory.Abelian.Ext.mk₀
code: /-- The canonical map `(X ⟶ Y) → Ext X Y 0`. -/
noncomputable def mk₀ (f : X ⟶ Y) : Ext X Y 0 
goal: CategoryTheory.Abelian.Ext X Y 0

full_name: CategoryTheory.Abelian.Ext.mk₀_hom
code: @[simp]
lemma mk₀_hom [HasDerivedCategory.{w'} C] (f : X ⟶ Y) :
    (mk₀ f).hom = ShiftedHom.mk₀ _ (by simp) ((DerivedCategory.singleFunctor C 0).map f) 
goal: (CategoryTheory.Abelian.Ext.mk₀ f).hom = CategoryTheory.ShiftedHom.mk₀ ↑0 ⋯ ((DerivedCategory.singleFunctor C 0).map f)

full_name: CategoryTheory.Abelian.Ext.mk₀_comp_mk₀
code: @[simp 1100]
lemma mk₀_comp_mk₀ (f : X ⟶ Y) (g : Y ⟶ Z) :
    (mk₀ f).comp (mk₀ g) (zero_add 0) = mk₀ (f ≫ g) 
goal: (CategoryTheory.Abelian.Ext.mk₀ f).comp (CategoryTheory.Abelian.Ext.mk₀ g) ⋯ =
  CategoryTheory.Abelian.Ext.mk₀ (CategoryTheory.CategoryStruct.comp f g)

full_name: CategoryTheory.Abelian.Ext.mk₀_comp_mk₀_assoc
code: @[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) 
goal: (CategoryTheory.Abelian.Ext.mk₀ f).comp ((CategoryTheory.Abelian.Ext.mk₀ g).comp α ⋯) ⋯ =
  (CategoryTheory.Abelian.Ext.mk₀ (CategoryTheory.CategoryStruct.comp f g)).comp α ⋯

full_name: CategoryTheory.Abelian.Ext.instAddCommGroup
code: noncomputable instance : AddCommGroup (Ext X Y n) 
goal: AddCommGroup (CategoryTheory.Abelian.Ext X Y n)

full_name: CategoryTheory.Abelian.Ext.hom'
code: /-- 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 : ℤ) 
goal: CategoryTheory.ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X) ((DerivedCategory.singleFunctor C 0).obj Y) ↑n

full_name: _private.Mathlib.Algebra.Homology.DerivedCategory.Ext.0.CategoryTheory.Abelian.Ext.add_hom'
code: private lemma add_hom' (α β : Ext X Y n) : (α + β).hom' = α.hom' + β.hom' 
goal: (α + β).hom' = α.hom' + β.hom'

full_name: _private.Mathlib.Algebra.Homology.DerivedCategory.Ext.0.CategoryTheory.Abelian.Ext.neg_hom'
code: private lemma neg_hom' (α : Ext X Y n) : (-α).hom' = -α.hom' 
goal: (-α).hom' = -α.hom'

full_name: _private.Mathlib.Algebra.Homology.DerivedCategory.Ext.0.CategoryTheory.Abelian.Ext.zero_hom'
code: private lemma zero_hom' : (0 : Ext X Y n).hom' = 0 
goal: CategoryTheory.Abelian.Ext.hom' 0 = 0

full_name: CategoryTheory.Abelian.Ext.add_comp
code: @[simp]
lemma add_comp (α₁ α₂ : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    (α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h 
goal: (α₁ + α₂).comp β h = α₁.comp β h + α₂.comp β h

full_name: CategoryTheory.Abelian.Ext.comp_add
code: @[simp]
lemma comp_add (α : Ext X Y n) {m : ℕ} (β₁ β₂ : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h 
goal: α.comp (β₁ + β₂) h = α.comp β₁ h + α.comp β₂ h

full_name: CategoryTheory.Abelian.Ext.neg_comp
code: @[simp]
lemma neg_comp (α : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    (-α).comp β h = -α.comp β h 
goal: (-α).comp β h = -α.comp β h

full_name: CategoryTheory.Abelian.Ext.comp_neg
code: @[simp]
lemma comp_neg (α : Ext X Y n) {m : ℕ} (β : Ext Y Z m) {p : ℕ} (h : n + m = p) :
    α.comp (-β) h = -α.comp β h 
goal: α.comp (-β) h = -α.comp β h

full_name: CategoryTheory.Abelian.Ext.zero_comp
code: @[simp]
lemma zero_comp {m : ℕ} (β : Ext Y Z m) (p : ℕ) (h : n + m = p) :
    (0 : Ext X Y n).comp β h = 0 
goal: CategoryTheory.Abelian.Ext.comp 0 β h = 0

full_name: CategoryTheory.Abelian.Ext.comp_zero
code: @[simp]
lemma comp_zero (α : Ext X Y n) (Z : C) (m : ℕ) (p : ℕ) (h : n + m = p) :
    α.comp (0 : Ext Y Z m) h = 0 
goal: α.comp 0 h = 0

full_name: CategoryTheory.Abelian.Ext.mk₀_id_comp
code: @[simp]
lemma mk₀_id_comp (α : Ext X Y n) :
    (mk₀ (𝟙 X)).comp α (zero_add n) = α 
goal: (CategoryTheory.Abelian.Ext.mk₀ (CategoryTheory.CategoryStruct.id X)).comp α ⋯ = α

full_name: CategoryTheory.Abelian.Ext.comp_mk₀_id
code: @[simp]
lemma comp_mk₀_id (α : Ext X Y n) :
    α.comp (mk₀ (𝟙 Y)) (add_zero n) = α 
goal: α.comp (CategoryTheory.Abelian.Ext.mk₀ (CategoryTheory.CategoryStruct.id Y)) ⋯ = α

full_name: CategoryTheory.Abelian.Ext.mk₀_zero
code: @[simp]
lemma mk₀_zero : mk₀ (0 : X ⟶ Y) = 0 
goal: CategoryTheory.Abelian.Ext.mk₀ 0 = 0

full_name: CategoryTheory.Abelian.Ext.zero_hom
code: @[simp]
lemma zero_hom : (0 : Ext X Y n).hom = 0 
goal: CategoryTheory.Abelian.Ext.hom 0 = 0

full_name: CategoryTheory.Abelian.Ext.biprod_ext
code: 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)) :
    α = β 
goal: α = β

full_name: CategoryTheory.Abelian.Ext.add_hom
code: @[simp]
lemma add_hom (α β : Ext X Y n) : (α + β).hom = α.hom + β.hom 
goal: (α + β).hom = α.hom + β.hom

full_name: CategoryTheory.Abelian.Ext.neg_hom
code: lemma neg_hom (α : Ext X Y n) : (-α).hom = -α.hom 
goal: (-α).hom = -α.hom

full_name: CategoryTheory.Abelian.Ext.homAddEquiv
code: /-- 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 : ℤ) 
goal: CategoryTheory.Abelian.Ext X Y n ≃+
  CategoryTheory.ShiftedHom ((DerivedCategory.singleFunctor C 0).obj X) ((DerivedCategory.singleFunctor C 0).obj Y) ↑n

full_name: CategoryTheory.Abelian.Ext.homAddEquiv_apply
code: @[simp]
lemma homAddEquiv_apply (α : Ext X Y n) : homAddEquiv α = α.hom 
goal: CategoryTheory.Abelian.Ext.homAddEquiv α = α.hom

full_name: CategoryTheory.Abelian.Ext.bilinearComp
code: /-- The composition of `Ext`, as a bilinear map. -/
@[simps!]
noncomputable def bilinearComp (a b c : ℕ) (h : a + b = c) :
    Ext X Y a →+ Ext Y Z b →+ Ext X Z c 
goal: CategoryTheory.Abelian.Ext X Y a →+ CategoryTheory.Abelian.Ext Y Z b →+ CategoryTheory.Abelian.Ext X Z c

full_name: CategoryTheory.Abelian.Ext.bilinearComp_apply_apply
code: /-- The composition of `Ext`, as a bilinear map. -/
@[simps!]
noncomputable def bilinearComp (a b c : ℕ) (h : a + b = c) :
    Ext X Y a →+ Ext Y Z b →+ Ext X Z c 
goal: ((CategoryTheory.Abelian.Ext.bilinearComp X Y Z a b c h) α) β = α.comp β h

full_name: CategoryTheory.Abelian.Ext.postcomp
code: /-- The postcomposition `Ext X Y a →+ Ext X Z b` with `β : Ext Y Z n` when `a + n = b`. -/
noncomputable abbrev postcomp (β : Ext Y Z n) (X : C) {a b : ℕ} (h : a + n = b) :
    Ext X Y a →+ Ext X Z b 
goal: CategoryTheory.Abelian.Ext X Y a →+ CategoryTheory.Abelian.Ext X Z b

full_name: CategoryTheory.Abelian.Ext.precomp
code: /-- The precomposition `Ext Y Z a →+ Ext X Z b` with `α : Ext X Y n` when `n + a = b`. -/
noncomputable abbrev precomp (α : Ext X Y n) (Z : C) {a b : ℕ} (h : n + a = b) :
    Ext Y Z a →+ Ext X Z b 
goal: CategoryTheory.Abelian.Ext Y Z a →+ CategoryTheory.Abelian.Ext X Z b

full_name: CategoryTheory.Abelian.extFunctorObj_map
code: /-- Auxiliary definition for `extFunctor`. -/
@[simps]
noncomputable def extFunctorObj (X : C) (n : ℕ) : C ⥤ AddCommGrp.{w} 
goal: ∀ {X_1 Y : C} (f : X_1 ⟶ Y),
  (CategoryTheory.Abelian.extFunctorObj X n).map f = AddCommGrp.ofHom ((CategoryTheory.Abelian.Ext.mk₀ f).postcomp X ⋯)

full_name: CategoryTheory.Abelian.extFunctorObj_obj
code: /-- Auxiliary definition for `extFunctor`. -/
@[simps]
noncomputable def extFunctorObj (X : C) (n : ℕ) : C ⥤ AddCommGrp.{w} 
goal: (CategoryTheory.Abelian.extFunctorObj X n).obj Y = AddCommGrp.of (CategoryTheory.Abelian.Ext X Y n)

full_name: CategoryTheory.Abelian.extFunctorObj
code: /-- Auxiliary definition for `extFunctor`. -/
@[simps]
noncomputable def extFunctorObj (X : C) (n : ℕ) : C ⥤ AddCommGrp.{w} 
goal: CategoryTheory.Functor C AddCommGrp

full_name: CategoryTheory.Abelian.extFunctor_obj
code: /-- The functor `Cᵒᵖ ⥤ C ⥤ AddCommGrp` which sends `X : C` and `Y : C`
to `Ext X Y n`. -/
@[simps]
noncomputable def extFunctor (n : ℕ) : Cᵒᵖ ⥤ C ⥤ AddCommGrp.{w} 
goal: (CategoryTheory.Abelian.extFunctor n).obj X = CategoryTheory.Abelian.extFunctorObj (Opposite.unop X) n

full_name: CategoryTheory.Abelian.extFunctor
code: /-- The functor `Cᵒᵖ ⥤ C ⥤ AddCommGrp` which sends `X : C` and `Y : C`
to `Ext X Y n`. -/
@[simps]
noncomputable def extFunctor (n : ℕ) : Cᵒᵖ ⥤ C ⥤ AddCommGrp.{w} 
goal: CategoryTheory.Functor Cᵒᵖ (CategoryTheory.Functor C AddCommGrp)

full_name: CategoryTheory.Abelian.extFunctor_map_app
code: /-- The functor `Cᵒᵖ ⥤ C ⥤ AddCommGrp` which sends `X : C` and `Y : C`
to `Ext X Y n`. -/
@[simps]
noncomputable def extFunctor (n : ℕ) : Cᵒᵖ ⥤ C ⥤ AddCommGrp.{w} 
goal: ((CategoryTheory.Abelian.extFunctor n).map f).app Y =
  AddCommGrp.ofHom (AddMonoidHom.mk' (fun α => (CategoryTheory.Abelian.Ext.mk₀ f.unop).comp α ⋯) ⋯)