File: Mathlib/CategoryTheory/Quotient.lean

full_name: HomRel
code: /-- A `HomRel` on `C` consists of a relation on every hom-set. -/
def HomRel (C) [Quiver C] 
goal: Sort (max (u_1 + 1) u_2)

full_name: instInhabitedHomRel
code: instance (C) [Quiver C] : Inhabited (HomRel C) 
goal: Inhabited (HomRel C)

full_name: CategoryTheory.Congruence
code: /-- A `HomRel` is a congruence when it's an equivalence on every hom-set, and it can be composed
from left and right. -/
class Congruence : Prop where
  /-- `r` is an equivalence on every hom-set. -/
  equivalence : ∀ {X Y}, _root_.Equivalence (@r X Y)
  /-- Precomposition with an arrow respects `r`. -/
  compLeft : ∀ {X Y Z} (f : X ⟶ Y) {g g' : Y ⟶ Z}, r g g' → r (f ≫ g) (f ≫ g')
  /-- Postcomposition with an arrow respects `r`. -/
  compRight : ∀ {X Y Z} {f f' : X ⟶ Y} (g : Y ⟶ Z), r f f' → r (f ≫ g) (f' ≫ g)
goal: Prop

full_name: CategoryTheory.Congruence.equivalence
code: /-- A `HomRel` is a congruence when it's an equivalence on every hom-set, and it can be composed
from left and right. -/
class Congruence : Prop where
  /-- `r` is an equivalence on every hom-set. -/
  equivalence : ∀ {X Y}, _root_.Equivalence (@r X Y)
  /-- Precomposition with an arrow respects `r`. -/
  compLeft : ∀ {X Y Z} (f : X ⟶ Y) {g g' : Y ⟶ Z}, r g g' → r (f ≫ g) (f ≫ g')
  /-- Postcomposition with an arrow respects `r`. -/
  compRight : ∀ {X Y Z} {f f' : X ⟶ Y} (g : Y ⟶ Z), r f f' → r (f ≫ g) (f' ≫ g)
goal: Equivalence r

full_name: CategoryTheory.Congruence.compRight
code: /-- A `HomRel` is a congruence when it's an equivalence on every hom-set, and it can be composed
from left and right. -/
class Congruence : Prop where
  /-- `r` is an equivalence on every hom-set. -/
  equivalence : ∀ {X Y}, _root_.Equivalence (@r X Y)
  /-- Precomposition with an arrow respects `r`. -/
  compLeft : ∀ {X Y Z} (f : X ⟶ Y) {g g' : Y ⟶ Z}, r g g' → r (f ≫ g) (f ≫ g')
  /-- Postcomposition with an arrow respects `r`. -/
  compRight : ∀ {X Y Z} {f f' : X ⟶ Y} (g : Y ⟶ Z), r f f' → r (f ≫ g) (f' ≫ g)
goal: r f f' → r (CategoryTheory.CategoryStruct.comp f g) (CategoryTheory.CategoryStruct.comp f' g)

full_name: CategoryTheory.Congruence.compLeft
code: /-- A `HomRel` is a congruence when it's an equivalence on every hom-set, and it can be composed
from left and right. -/
class Congruence : Prop where
  /-- `r` is an equivalence on every hom-set. -/
  equivalence : ∀ {X Y}, _root_.Equivalence (@r X Y)
  /-- Precomposition with an arrow respects `r`. -/
  compLeft : ∀ {X Y Z} (f : X ⟶ Y) {g g' : Y ⟶ Z}, r g g' → r (f ≫ g) (f ≫ g')
  /-- Postcomposition with an arrow respects `r`. -/
  compRight : ∀ {X Y Z} {f f' : X ⟶ Y} (g : Y ⟶ Z), r f f' → r (f ≫ g) (f' ≫ g)
goal: r g g' → r (CategoryTheory.CategoryStruct.comp f g) (CategoryTheory.CategoryStruct.comp f g')

full_name: CategoryTheory.Quotient
code: /-- A type synonym for `C`, thought of as the objects of the quotient category. -/
@[ext]
structure Quotient (r : HomRel C) where
  /-- The object of `C`. -/
  as : C
goal: Type u_1

full_name: CategoryTheory.Quotient.as
code: /-- A type synonym for `C`, thought of as the objects of the quotient category. -/
@[ext]
structure Quotient (r : HomRel C) where
  /-- The object of `C`. -/
  as : C
goal: C

full_name: CategoryTheory.instInhabitedQuotient
code: instance [Inhabited C] : Inhabited (Quotient r) 
goal: Inhabited (CategoryTheory.Quotient r)

full_name: CategoryTheory.Quotient.CompClosure
code: /-- Generates the closure of a family of relations w.r.t. composition from left and right. -/
inductive CompClosure (r : HomRel C) ⦃s t : C⦄ : (s ⟶ t) → (s ⟶ t) → Prop
  | intro {a b : C} (f : s ⟶ a) (m₁ m₂ : a ⟶ b) (g : b ⟶ t) (h : r m₁ m₂) :
    CompClosure r (f ≫ m₁ ≫ g) (f ≫ m₂ ≫ g)
goal: (s ⟶ t) → (s ⟶ t) → Prop

full_name: CategoryTheory.Quotient.CompClosure.intro
code: /-- Generates the closure of a family of relations w.r.t. composition from left and right. -/
inductive CompClosure (r : HomRel C) ⦃s t : C⦄ : (s ⟶ t) → (s ⟶ t) → Prop
  | intro {a b : C} (f : s ⟶ a) (m₁ m₂ : a ⟶ b) (g : b ⟶ t) (h : r m₁ m₂) :
    CompClosure r (f ≫ m₁ ≫ g) (f ≫ m₂ ≫ g)
goal: CategoryTheory.Quotient.CompClosure r (CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp m₁ g))
  (CategoryTheory.CategoryStruct.comp f (CategoryTheory.CategoryStruct.comp m₂ g))

full_name: CategoryTheory.Quotient.CompClosure.of
code: theorem CompClosure.of {a b : C} (m₁ m₂ : a ⟶ b) (h : r m₁ m₂) : CompClosure r m₁ m₂ 
goal: CategoryTheory.Quotient.CompClosure r m₁ m₂

full_name: CategoryTheory.Quotient.comp_left
code: theorem comp_left {a b c : C} (f : a ⟶ b) :
    ∀ (g₁ g₂ : b ⟶ c) (_ : CompClosure r g₁ g₂), CompClosure r (f ≫ g₁) (f ≫ g₂)
  
goal: CategoryTheory.Quotient.CompClosure r g₁ g₂ →
  CategoryTheory.Quotient.CompClosure r (CategoryTheory.CategoryStruct.comp f g₁)
    (CategoryTheory.CategoryStruct.comp f g₂)

full_name: CategoryTheory.Quotient.comp_right
code: theorem comp_right {a b c : C} (g : b ⟶ c) :
    ∀ (f₁ f₂ : a ⟶ b) (_ : CompClosure r f₁ f₂), CompClosure r (f₁ ≫ g) (f₂ ≫ g)
  
goal: CategoryTheory.Quotient.CompClosure r f₁ f₂ →
  CategoryTheory.Quotient.CompClosure r (CategoryTheory.CategoryStruct.comp f₁ g)
    (CategoryTheory.CategoryStruct.comp f₂ g)

full_name: CategoryTheory.Quotient.Hom
code: /-- Hom-sets of the quotient category. -/
def Hom (s t : Quotient r) 
goal: Type u_2

full_name: CategoryTheory.Quotient.instInhabitedHom
code: instance (a : Quotient r) : Inhabited (Hom r a a) 
goal: Inhabited (CategoryTheory.Quotient.Hom r a a)

full_name: CategoryTheory.Quotient.comp
code: /-- Composition in the quotient category. -/
def comp ⦃a b c : Quotient r⦄ : Hom r a b → Hom r b c → Hom r a c 
goal: CategoryTheory.Quotient.Hom r a b → CategoryTheory.Quotient.Hom r b c → CategoryTheory.Quotient.Hom r a c

full_name: CategoryTheory.Quotient.comp_mk
code: @[simp]
theorem comp_mk {a b c : Quotient r} (f : a.as ⟶ b.as) (g : b.as ⟶ c.as) :
    comp r (Quot.mk _ f) (Quot.mk _ g) = Quot.mk _ (f ≫ g) 
goal: CategoryTheory.Quotient.comp r (Quot.mk (CategoryTheory.Quotient.CompClosure r) f)
    (Quot.mk (CategoryTheory.Quotient.CompClosure r) g) =
  Quot.mk (CategoryTheory.Quotient.CompClosure r) (CategoryTheory.CategoryStruct.comp f g)

full_name: CategoryTheory.Quotient.category
code: instance category : Category (Quotient r) 
goal: CategoryTheory.Category.{u_2, u_1} (CategoryTheory.Quotient r)

full_name: CategoryTheory.Quotient.functor
code: /-- The functor from a category to its quotient. -/
def functor : C ⥤ Quotient r 
goal: CategoryTheory.Functor C (CategoryTheory.Quotient r)

full_name: CategoryTheory.Quotient.full_functor
code: instance full_functor : (functor r).Full 
goal: (CategoryTheory.Quotient.functor r).Full

full_name: CategoryTheory.Quotient.essSurj_functor
code: instance essSurj_functor : (functor r).EssSurj 
goal: (CategoryTheory.Quotient.functor r).EssSurj

full_name: CategoryTheory.Quotient.induction
code: protected theorem induction {P : ∀ {a b : Quotient r}, (a ⟶ b) → Prop}
    (h : ∀ {x y : C} (f : x ⟶ y), P ((functor r).map f)) :
    ∀ {a b : Quotient r} (f : a ⟶ b), P f 
goal: P f

full_name: CategoryTheory.Quotient.sound
code: protected theorem sound {a b : C} {f₁ f₂ : a ⟶ b} (h : r f₁ f₂) :
    (functor r).map f₁ = (functor r).map f₂ 
goal: (CategoryTheory.Quotient.functor r).map f₁ = (CategoryTheory.Quotient.functor r).map f₂

full_name: CategoryTheory.Quotient.compClosure_iff_self
code: lemma compClosure_iff_self [h : Congruence r] {X Y : C} (f g : X ⟶ Y) :
    CompClosure r f g ↔ r f g 
goal: CategoryTheory.Quotient.CompClosure r f g ↔ r f g

full_name: CategoryTheory.Quotient.compClosure_eq_self
code: @[simp]
theorem compClosure_eq_self [h : Congruence r] :
    CompClosure r = r 
goal: CategoryTheory.Quotient.CompClosure r = r

full_name: CategoryTheory.Quotient.functor_map_eq_iff
code: theorem functor_map_eq_iff [h : Congruence r] {X Y : C} (f f' : X ⟶ Y) :
    (functor r).map f = (functor r).map f' ↔ r f f' 
goal: (CategoryTheory.Quotient.functor r).map f = (CategoryTheory.Quotient.functor r).map f' ↔ r f f'

full_name: CategoryTheory.Quotient.lift
code: /-- The induced functor on the quotient category. -/
def lift (H : ∀ (x y : C) (f₁ f₂ : x ⟶ y), r f₁ f₂ → F.map f₁ = F.map f₂) : Quotient r ⥤ D 
goal: CategoryTheory.Functor (CategoryTheory.Quotient r) D

full_name: CategoryTheory.Quotient.lift_spec
code: theorem lift_spec : functor r ⋙ lift r F H = F 
goal: (CategoryTheory.Quotient.functor r).comp (CategoryTheory.Quotient.lift r F H) = F

full_name: CategoryTheory.Quotient.lift_unique
code: theorem lift_unique (Φ : Quotient r ⥤ D) (hΦ : functor r ⋙ Φ = F) : Φ = lift r F H 
goal: Φ = CategoryTheory.Quotient.lift r F H

full_name: CategoryTheory.Quotient.lift_unique'
code: lemma lift_unique' (F₁ F₂ : Quotient r ⥤ D) (h : functor r ⋙ F₁ = functor r ⋙ F₂) :
    F₁ = F₂ 
goal: F₁ = F₂

full_name: CategoryTheory.Quotient.lift.isLift
code: /-- The original functor factors through the induced functor. -/
def lift.isLift : functor r ⋙ lift r F H ≅ F 
goal: (CategoryTheory.Quotient.functor r).comp (CategoryTheory.Quotient.lift r F H) ≅ F

full_name: CategoryTheory.Quotient.lift.isLift_hom
code: @[simp]
theorem lift.isLift_hom (X : C) : (lift.isLift r F H).hom.app X = 𝟙 (F.obj X) 
goal: (CategoryTheory.Quotient.lift.isLift r F H).hom.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Quotient.lift.isLift_inv
code: @[simp]
theorem lift.isLift_inv (X : C) : (lift.isLift r F H).inv.app X = 𝟙 (F.obj X) 
goal: (CategoryTheory.Quotient.lift.isLift r F H).inv.app X = CategoryTheory.CategoryStruct.id (F.obj X)

full_name: CategoryTheory.Quotient.lift_obj_functor_obj
code: theorem lift_obj_functor_obj (X : C) :
    (lift r F H).obj ((functor r).obj X) = F.obj X 
goal: (CategoryTheory.Quotient.lift r F H).obj ((CategoryTheory.Quotient.functor r).obj X) = F.obj X

full_name: CategoryTheory.Quotient.lift_map_functor_map
code: theorem lift_map_functor_map {X Y : C} (f : X ⟶ Y) :
    (lift r F H).map ((functor r).map f) = F.map f 
goal: (CategoryTheory.Quotient.lift r F H).map ((CategoryTheory.Quotient.functor r).map f) = F.map f

full_name: CategoryTheory.Quotient.natTrans_ext
code: lemma natTrans_ext {F G : Quotient r ⥤ D} (τ₁ τ₂ : F ⟶ G)
    (h : whiskerLeft (Quotient.functor r) τ₁ = whiskerLeft (Quotient.functor r) τ₂) : τ₁ = τ₂ 
goal: τ₁ = τ₂

full_name: CategoryTheory.Quotient.natTransLift
code: /-- In order to define a natural transformation `F ⟶ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
def natTransLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ⟶ Quotient.functor r ⋙ G) :
    F ⟶ G 
goal: F ⟶ G

full_name: CategoryTheory.Quotient.natTransLift_app
code: @[simp]
lemma natTransLift_app (F G : Quotient r ⥤ D)
    (τ : Quotient.functor r ⋙ F ⟶ Quotient.functor r ⋙ G) (X : C) :
  (natTransLift r τ).app ((Quotient.functor r).obj X) = τ.app X 
goal: (CategoryTheory.Quotient.natTransLift r τ).app ((CategoryTheory.Quotient.functor r).obj X) = τ.app X

full_name: CategoryTheory.Quotient.comp_natTransLift
code: @[reassoc]
lemma comp_natTransLift {F G H : Quotient r ⥤ D}
    (τ : Quotient.functor r ⋙ F ⟶ Quotient.functor r ⋙ G)
    (τ' : Quotient.functor r ⋙ G ⟶ Quotient.functor r ⋙ H) :
    natTransLift r τ ≫ natTransLift r τ' =  natTransLift r (τ ≫ τ') 
goal: CategoryTheory.CategoryStruct.comp (CategoryTheory.Quotient.natTransLift r τ)
    (CategoryTheory.Quotient.natTransLift r τ') =
  CategoryTheory.Quotient.natTransLift r (CategoryTheory.CategoryStruct.comp τ τ')

full_name: CategoryTheory.Quotient.natTransLift_id
code: @[simp]
lemma natTransLift_id (F : Quotient r ⥤ D) :
    natTransLift r (𝟙 (Quotient.functor r ⋙ F)) = 𝟙 _ 
goal: CategoryTheory.Quotient.natTransLift r (CategoryTheory.CategoryStruct.id ((CategoryTheory.Quotient.functor r).comp F)) =
  CategoryTheory.CategoryStruct.id F

full_name: CategoryTheory.Quotient.natIsoLift
code: /-- In order to define a natural isomorphism `F ≅ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
@[simps]
def natIsoLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ≅ Quotient.functor r ⋙ G) :
    F ≅ G 
goal: F ≅ G

full_name: CategoryTheory.Quotient.natIsoLift_hom
code: /-- In order to define a natural isomorphism `F ≅ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
@[simps]
def natIsoLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ≅ Quotient.functor r ⋙ G) :
    F ≅ G 
goal: (CategoryTheory.Quotient.natIsoLift r τ).hom = CategoryTheory.Quotient.natTransLift r τ.hom

full_name: CategoryTheory.Quotient.natIsoLift_inv
code: /-- In order to define a natural isomorphism `F ≅ G` with `F G : Quotient r ⥤ D`, it suffices
to do so after precomposing with `Quotient.functor r`. -/
@[simps]
def natIsoLift {F G : Quotient r ⥤ D} (τ : Quotient.functor r ⋙ F ≅ Quotient.functor r ⋙ G) :
    F ≅ G 
goal: (CategoryTheory.Quotient.natIsoLift r τ).inv = CategoryTheory.Quotient.natTransLift r τ.inv

full_name: CategoryTheory.Quotient.full_whiskeringLeft_functor
code: instance full_whiskeringLeft_functor :
    ((whiskeringLeft C _ D).obj (functor r)).Full 
goal: ((CategoryTheory.whiskeringLeft C (CategoryTheory.Quotient r) D).obj (CategoryTheory.Quotient.functor r)).Full

full_name: CategoryTheory.Quotient.faithful_whiskeringLeft_functor
code: instance faithful_whiskeringLeft_functor :
    ((whiskeringLeft C _ D).obj (functor r)).Faithful 
goal: ((CategoryTheory.whiskeringLeft C (CategoryTheory.Quotient r) D).obj (CategoryTheory.Quotient.functor r)).Faithful