mathlibdocumentation

category_theory.opposites

Opposite categories #

We provide a category instance on Cᵒᵖ. The morphisms X ⟶ Y are defined to be the morphisms unop Y ⟶ unop X in C.

Here Cᵒᵖ is an irreducible typeclass synonym for C (it is the same one used in the algebra library).

We also provide various mechanisms for constructing opposite morphisms, functors, and natural transformations.

Unfortunately, because we do not have a definitional equality op (op X) = X, there are quite a few variations that are needed in practice.

theorem quiver.hom.op_inj {C : Type u₁} [quiver C] {X Y : C} :
theorem quiver.hom.unop_inj {C : Type u₁} [quiver C] {X Y : Cᵒᵖ} :
@[simp]
theorem quiver.hom.unop_op {C : Type u₁} [quiver C] {X Y : C} (f : X Y) :
f.op.unop = f
@[simp]
theorem quiver.hom.op_unop {C : Type u₁} [quiver C] {X Y : Cᵒᵖ} (f : X Y) :
f.unop.op = f
@[protected, instance]
def category_theory.category.opposite {C : Type u₁}  :

The opposite category.

Equations
@[simp]
theorem category_theory.op_comp {C : Type u₁} {X Y Z : C} {f : X Y} {g : Y Z} :
(f g).op = g.op f.op
@[simp]
theorem category_theory.op_id {C : Type u₁} {X : C} :
@[simp]
theorem category_theory.unop_comp {C : Type u₁} {X Y Z : Cᵒᵖ} {f : X Y} {g : Y Z} :
(f g).unop = g.unop f.unop
@[simp]
theorem category_theory.unop_id {C : Type u₁} {X : Cᵒᵖ} :
@[simp]
theorem category_theory.unop_id_op {C : Type u₁} {X : C} :
@[simp]
theorem category_theory.op_id_unop {C : Type u₁} {X : Cᵒᵖ} :
def category_theory.op_op (C : Type u₁)  :

The functor from the double-opposite of a category to the underlying category.

Equations
@[simp]
theorem category_theory.op_op_obj (C : Type u₁) (X : Cᵒᵖᵒᵖ) :
@[simp]
theorem category_theory.op_op_map (C : Type u₁) (X Y : Cᵒᵖᵒᵖ) (f : X Y) :
f = f.unop.unop
@[simp]
theorem category_theory.unop_unop_obj (C : Type u₁) (X : C) :
@[simp]
theorem category_theory.unop_unop_map (C : Type u₁) (X Y : C) (f : X Y) :
= f.op.op
def category_theory.unop_unop (C : Type u₁)  :

The functor from a category to its double-opposite.

Equations
@[simp]
@[simp]
theorem category_theory.op_op_equivalence_functor (C : Type u₁)  :

The double opposite category is equivalent to the original.

Equations
@[simp]
theorem category_theory.op_op_equivalence_inverse (C : Type u₁)  :
@[simp]
theorem category_theory.op_op_equivalence_unit_iso (C : Type u₁)  :
@[protected, instance]
def category_theory.is_iso_op {C : Type u₁} {X Y : C} (f : X Y)  :

If f is an isomorphism, so is f.op

theorem category_theory.is_iso_of_op {C : Type u₁} {X Y : C} (f : X Y)  :

If f.op is an isomorphism f must be too. (This cannot be an instance as it would immediately loop!)

theorem category_theory.is_iso_op_iff {C : Type u₁} {X Y : C} (f : X Y) :
theorem category_theory.is_iso_unop_iff {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y) :
@[protected, instance]
def category_theory.is_iso_unop {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y)  :
@[simp]
theorem category_theory.op_inv {C : Type u₁} {X Y : C} (f : X Y)  :
@[simp]
theorem category_theory.unop_inv {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y)  :
@[simp]
theorem category_theory.functor.op_map {C : Type u₁} {D : Type u₂} (F : C D) (X Y : Cᵒᵖ) (f : X Y) :
F.op.map f = (F.map f.unop).op
@[protected]
def category_theory.functor.op {C : Type u₁} {D : Type u₂} (F : C D) :

The opposite of a functor, i.e. considering a functor F : C ⥤ D as a functor Cᵒᵖ ⥤ Dᵒᵖ. In informal mathematics no distinction is made between these.

Equations
Instances for category_theory.functor.op
@[simp]
theorem category_theory.functor.op_obj {C : Type u₁} {D : Type u₂} (F : C D) (X : Cᵒᵖ) :
@[protected]
def category_theory.functor.unop {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) :
C D

Given a functor F : Cᵒᵖ ⥤ Dᵒᵖ we can take the "unopposite" functor F : C ⥤ D. In informal mathematics no distinction is made between these.

Equations
Instances for category_theory.functor.unop
@[simp]
theorem category_theory.functor.unop_map {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) (X Y : C) (f : X Y) :
F.unop.map f = (F.map f.op).unop
@[simp]
theorem category_theory.functor.unop_obj {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) (X : C) :
@[simp]
theorem category_theory.functor.op_unop_iso_inv_app {C : Type u₁} {D : Type u₂} (F : C D) (X : C) :
def category_theory.functor.op_unop_iso {C : Type u₁} {D : Type u₂} (F : C D) :
F.op.unop F

The isomorphism between F.op.unop and F.

Equations
@[simp]
theorem category_theory.functor.op_unop_iso_hom_app {C : Type u₁} {D : Type u₂} (F : C D) (X : C) :
def category_theory.functor.unop_op_iso {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) :
F.unop.op F

The isomorphism between F.unop.op and F.

Equations
@[simp]
theorem category_theory.functor.unop_op_iso_hom_app {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) (X : Cᵒᵖ) :
@[simp]
theorem category_theory.functor.unop_op_iso_inv_app {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) (X : Cᵒᵖ) :
def category_theory.functor.op_hom (C : Type u₁) (D : Type u₂)  :

Taking the opposite of a functor is functorial.

Equations
@[simp]
theorem category_theory.functor.op_hom_map_app (C : Type u₁) (D : Type u₂) (F G : (C D)ᵒᵖ) (α : F G) (X : Cᵒᵖ) :
α).app X = (α.unop.app (opposite.unop X)).op
@[simp]
theorem category_theory.functor.op_hom_obj (C : Type u₁) (D : Type u₂) (F : (C D)ᵒᵖ) :
= .op
@[simp]
theorem category_theory.functor.op_inv_map (C : Type u₁) (D : Type u₂) (F G : Cᵒᵖ Dᵒᵖ) (α : F G) :
= quiver.hom.op {app := λ (X : C), (α.app (opposite.op X)).unop, naturality' := _}
@[simp]
theorem category_theory.functor.op_inv_obj (C : Type u₁) (D : Type u₂) (F : Cᵒᵖ Dᵒᵖ) :
def category_theory.functor.op_inv (C : Type u₁) (D : Type u₂)  :

Take the "unopposite" of a functor is functorial.

Equations
@[simp]
theorem category_theory.functor.left_op_map {C : Type u₁} {D : Type u₂} (F : C Dᵒᵖ) (X Y : Cᵒᵖ) (f : X Y) :
F.left_op.map f = (F.map f.unop).unop
@[protected]
def category_theory.functor.left_op {C : Type u₁} {D : Type u₂} (F : C Dᵒᵖ) :

Another variant of the opposite of functor, turning a functor C ⥤ Dᵒᵖ into a functor Cᵒᵖ ⥤ D. In informal mathematics no distinction is made.

Equations
Instances for category_theory.functor.left_op
@[simp]
theorem category_theory.functor.left_op_obj {C : Type u₁} {D : Type u₂} (F : C Dᵒᵖ) (X : Cᵒᵖ) :
@[protected]
def category_theory.functor.right_op {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ D) :

Another variant of the opposite of functor, turning a functor Cᵒᵖ ⥤ D into a functor C ⥤ Dᵒᵖ. In informal mathematics no distinction is made.

Equations
Instances for category_theory.functor.right_op
@[simp]
theorem category_theory.functor.right_op_map {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ D) (X Y : C) (f : X Y) :
F.right_op.map f = (F.map f.op).op
@[simp]
theorem category_theory.functor.right_op_obj {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ D) (X : C) :
@[protected, instance]
def category_theory.functor.op.category_theory.full {C : Type u₁} {D : Type u₂} {F : C D}  :
Equations
@[protected, instance]
def category_theory.functor.op.category_theory.faithful {C : Type u₁} {D : Type u₂} {F : C D}  :
@[protected, instance]
def category_theory.functor.right_op_faithful {C : Type u₁} {D : Type u₂} {F : Cᵒᵖ D}  :

If F is faithful then the right_op of F is also faithful.

@[protected, instance]
def category_theory.functor.left_op_faithful {C : Type u₁} {D : Type u₂} {F : C Dᵒᵖ}  :

If F is faithful then the left_op of F is also faithful.

@[simp]
theorem category_theory.functor.left_op_right_op_iso_inv_app {C : Type u₁} {D : Type u₂} (F : C Dᵒᵖ) (X : C) :
= 𝟙 (F.obj X)
def category_theory.functor.left_op_right_op_iso {C : Type u₁} {D : Type u₂} (F : C Dᵒᵖ) :

The isomorphism between F.left_op.right_op and F.

Equations
@[simp]
theorem category_theory.functor.left_op_right_op_iso_hom_app {C : Type u₁} {D : Type u₂} (F : C Dᵒᵖ) (X : C) :
= 𝟙 (F.obj X)
@[simp]
theorem category_theory.functor.right_op_left_op_iso_hom_app {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ D) (X : Cᵒᵖ) :
= 𝟙 (F.obj X)
@[simp]
theorem category_theory.functor.right_op_left_op_iso_inv_app {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ D) (X : Cᵒᵖ) :
= 𝟙 (F.obj X)
def category_theory.functor.right_op_left_op_iso {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ D) :

The isomorphism between F.right_op.left_op and F.

Equations
@[simp]
theorem category_theory.nat_trans.op_app {C : Type u₁} {D : Type u₂} {F G : C D} (α : F G) (X : Cᵒᵖ) :
= (α.app (opposite.unop X)).op
@[protected]
def category_theory.nat_trans.op {C : Type u₁} {D : Type u₂} {F G : C D} (α : F G) :
G.op F.op

The opposite of a natural transformation.

Equations
@[simp]
theorem category_theory.nat_trans.op_id {C : Type u₁} {D : Type u₂} (F : C D) :
@[protected]
def category_theory.nat_trans.unop {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F G) :

The "unopposite" of a natural transformation.

Equations
@[simp]
theorem category_theory.nat_trans.unop_app {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F G) (X : C) :
= (α.app (opposite.op X)).unop
@[simp]
theorem category_theory.nat_trans.unop_id {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) :
@[protected]
def category_theory.nat_trans.remove_op {C : Type u₁} {D : Type u₂} {F G : C D} (α : F.op G.op) :
G F

Given a natural transformation α : F.op ⟶ G.op, we can take the "unopposite" of each component obtaining a natural transformation G ⟶ F.

Equations
@[simp]
theorem category_theory.nat_trans.remove_op_app {C : Type u₁} {D : Type u₂} {F G : C D} (α : F.op G.op) (X : C) :
= (α.app (opposite.op X)).unop
@[simp]
theorem category_theory.nat_trans.remove_op_id {C : Type u₁} {D : Type u₂} (F : C D) :
@[simp]
theorem category_theory.nat_trans.remove_unop_app {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F.unop G.unop) (X : Cᵒᵖ) :
= (α.app (opposite.unop X)).op
@[protected]
def category_theory.nat_trans.remove_unop {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F.unop G.unop) :
G F

Given a natural transformation α : F.unop ⟶ G.unop, we can take the opposite of each component obtaining a natural transformation G ⟶ F.

Equations
@[simp]
theorem category_theory.nat_trans.remove_unop_id {C : Type u₁} {D : Type u₂} (F : Cᵒᵖ Dᵒᵖ) :
@[simp]
theorem category_theory.nat_trans.left_op_app {C : Type u₁} {D : Type u₂} {F G : C Dᵒᵖ} (α : F G) (X : Cᵒᵖ) :
@[protected]
def category_theory.nat_trans.left_op {C : Type u₁} {D : Type u₂} {F G : C Dᵒᵖ} (α : F G) :

Given a natural transformation α : F ⟶ G, for F G : C ⥤ Dᵒᵖ, taking unop of each component gives a natural transformation G.left_op ⟶ F.left_op.

Equations
@[simp]
theorem category_theory.nat_trans.left_op_id {C : Type u₁} {D : Type u₂} {F : C Dᵒᵖ} :
@[simp]
theorem category_theory.nat_trans.left_op_comp {C : Type u₁} {D : Type u₂} {F G H : C Dᵒᵖ} (α : F G) (β : G H) :
@[simp]
theorem category_theory.nat_trans.remove_left_op_app {C : Type u₁} {D : Type u₂} {F G : C Dᵒᵖ} (α : F.left_op G.left_op) (X : C) :
= (α.app (opposite.op X)).op
@[protected]
def category_theory.nat_trans.remove_left_op {C : Type u₁} {D : Type u₂} {F G : C Dᵒᵖ} (α : F.left_op G.left_op) :
G F

Given a natural transformation α : F.left_op ⟶ G.left_op, for F G : C ⥤ Dᵒᵖ, taking op of each component gives a natural transformation G ⟶ F.

Equations
@[simp]
theorem category_theory.nat_trans.remove_left_op_id {C : Type u₁} {D : Type u₂} {F : C Dᵒᵖ} :
@[simp]
theorem category_theory.nat_trans.right_op_app {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ D} (α : F G) (X : C) :
= (α.app (opposite.op X)).op
@[protected]
def category_theory.nat_trans.right_op {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ D} (α : F G) :

Given a natural transformation α : F ⟶ G, for F G : Cᵒᵖ ⥤ D, taking op of each component gives a natural transformation G.right_op ⟶ F.right_op.

Equations
@[simp]
theorem category_theory.nat_trans.right_op_id {C : Type u₁} {D : Type u₂} {F : Cᵒᵖ D} :
@[simp]
theorem category_theory.nat_trans.right_op_comp {C : Type u₁} {D : Type u₂} {F G H : Cᵒᵖ D} (α : F G) (β : G H) :
@[protected]
def category_theory.nat_trans.remove_right_op {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ D} (α : F.right_op G.right_op) :
G F

Given a natural transformation α : F.right_op ⟶ G.right_op, for F G : Cᵒᵖ ⥤ D, taking unop of each component gives a natural transformation G ⟶ F.

Equations
@[simp]
theorem category_theory.nat_trans.remove_right_op_app {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ D} (α : F.right_op G.right_op) (X : Cᵒᵖ) :
@[simp]
theorem category_theory.nat_trans.remove_right_op_id {C : Type u₁} {D : Type u₂} {F : Cᵒᵖ D} :
@[simp]
theorem category_theory.iso.op_hom {C : Type u₁} {X Y : C} (α : X Y) :
α.op.hom = α.hom.op
@[protected]
def category_theory.iso.op {C : Type u₁} {X Y : C} (α : X Y) :

The opposite isomorphism.

Equations
@[simp]
theorem category_theory.iso.op_inv {C : Type u₁} {X Y : C} (α : X Y) :
α.op.inv = α.inv.op
@[simp]
theorem category_theory.iso.unop_inv {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y) :
@[simp]
theorem category_theory.iso.unop_hom {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y) :
def category_theory.iso.unop {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y) :

The isomorphism obtained from an isomorphism in the opposite category.

Equations
@[simp]
theorem category_theory.iso.unop_op {C : Type u₁} {X Y : Cᵒᵖ} (f : X Y) :
f.unop.op = f
@[simp]
theorem category_theory.iso.op_unop {C : Type u₁} {X Y : C} (f : X Y) :
f.op.unop = f
@[simp]
theorem category_theory.nat_iso.op_inv {C : Type u₁} {D : Type u₂} {F G : C D} (α : F G) :
@[protected]
def category_theory.nat_iso.op {C : Type u₁} {D : Type u₂} {F G : C D} (α : F G) :
G.op F.op

The natural isomorphism between opposite functors G.op ≅ F.op induced by a natural isomorphism between the original functors F ≅ G.

Equations
@[simp]
theorem category_theory.nat_iso.op_hom {C : Type u₁} {D : Type u₂} {F G : C D} (α : F G) :
@[simp]
theorem category_theory.nat_iso.remove_op_inv {C : Type u₁} {D : Type u₂} {F G : C D} (α : F.op G.op) :
@[simp]
theorem category_theory.nat_iso.remove_op_hom {C : Type u₁} {D : Type u₂} {F G : C D} (α : F.op G.op) :
@[protected]
def category_theory.nat_iso.remove_op {C : Type u₁} {D : Type u₂} {F G : C D} (α : F.op G.op) :
G F

The natural isomorphism between functors G ≅ F induced by a natural isomorphism between the opposite functors F.op ≅ G.op.

Equations
@[simp]
theorem category_theory.nat_iso.unop_hom {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F G) :
@[simp]
theorem category_theory.nat_iso.unop_inv {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F G) :
@[protected]
def category_theory.nat_iso.unop {C : Type u₁} {D : Type u₂} {F G : Cᵒᵖ Dᵒᵖ} (α : F G) :

The natural isomorphism between functors G.unop ≅ F.unop induced by a natural isomorphism between the original functors F ≅ G.

Equations
@[simp]
theorem category_theory.equivalence.op_counit_iso {C : Type u₁} {D : Type u₂} (e : C D) :
@[simp]
theorem category_theory.equivalence.op_inverse {C : Type u₁} {D : Type u₂} (e : C D) :
@[simp]
theorem category_theory.equivalence.op_functor {C : Type u₁} {D : Type u₂} (e : C D) :
@[simp]
theorem category_theory.equivalence.op_unit_iso {C : Type u₁} {D : Type u₂} (e : C D) :
def category_theory.equivalence.op {C : Type u₁} {D : Type u₂} (e : C D) :

An equivalence between categories gives an equivalence between the opposite categories.

Equations
@[simp]
theorem category_theory.equivalence.unop_inverse {C : Type u₁} {D : Type u₂} (e : Cᵒᵖ Dᵒᵖ) :
@[simp]
theorem category_theory.equivalence.unop_functor {C : Type u₁} {D : Type u₂} (e : Cᵒᵖ Dᵒᵖ) :
def category_theory.equivalence.unop {C : Type u₁} {D : Type u₂} (e : Cᵒᵖ Dᵒᵖ) :
C D

An equivalence between opposite categories gives an equivalence between the original categories.

Equations
@[simp]
theorem category_theory.equivalence.unop_counit_iso {C : Type u₁} {D : Type u₂} (e : Cᵒᵖ Dᵒᵖ) :
@[simp]
theorem category_theory.equivalence.unop_unit_iso {C : Type u₁} {D : Type u₂} (e : Cᵒᵖ Dᵒᵖ) :
def category_theory.op_equiv {C : Type u₁} (A B : Cᵒᵖ) :
(A B)

The equivalence between arrows of the form A ⟶ B and B.unop ⟶ A.unop. Useful for building adjunctions. Note that this (definitionally) gives variants

def op_equiv' (A : C) (B : Cᵒᵖ) : (opposite.op A  B)  (B.unop  A) :=
op_equiv _ _

def op_equiv'' (A : Cᵒᵖ) (B : C) : (A  opposite.op B)  (B  A.unop) :=
op_equiv _ _

def op_equiv''' (A B : C) : (opposite.op A  opposite.op B)  (B  A) :=
op_equiv _ _
`
Equations
@[simp]
theorem category_theory.op_equiv_symm_apply {C : Type u₁} (A B : Cᵒᵖ) (g : ) :
B).symm) g = g.op
@[simp]
theorem category_theory.op_equiv_apply {C : Type u₁} (A B : Cᵒᵖ) (f : A B) :
f = f.unop
@[protected, instance]
def category_theory.subsingleton_of_unop {C : Type u₁} (A B : Cᵒᵖ) [subsingleton ] :
@[protected, instance]
def category_theory.decidable_eq_of_unop {C : Type u₁} (A B : Cᵒᵖ) [decidable_eq ] :
Equations
@[simp]
theorem category_theory.iso_op_equiv_symm_apply {C : Type u₁} (A B : Cᵒᵖ) (g : ) :
.symm) g = g.op
def category_theory.iso_op_equiv {C : Type u₁} (A B : Cᵒᵖ) :
(A B)

The equivalence between isomorphisms of the form A ≅ B and B.unop ≅ A.unop.

Note this is definitionally the same as the other three variants:

Equations
@[simp]
theorem category_theory.iso_op_equiv_apply {C : Type u₁} (A B : Cᵒᵖ) (f : A B) :
= f.unop
@[simp]
theorem category_theory.functor.op_unop_equiv_functor (C : Type u₁) (D : Type u₂)  :
def category_theory.functor.op_unop_equiv (C : Type u₁) (D : Type u₂)  :

The equivalence of functor categories induced by op and unop.

Equations
@[simp]
theorem category_theory.functor.op_unop_equiv_inverse (C : Type u₁) (D : Type u₂)  :
@[simp]
@[simp]
theorem category_theory.functor.op_unop_equiv_unit_iso (C : Type u₁) (D : Type u₂)  :
@[simp]
def category_theory.functor.left_op_right_op_equiv (C : Type u₁) (D : Type u₂)  :

The equivalence of functor categories induced by left_op and right_op.

Equations
@[simp]
theorem category_theory.functor.left_op_right_op_equiv_inverse_obj (C : Type u₁) (D : Type u₂) (F : C Dᵒᵖ) :
@[simp]
theorem category_theory.functor.left_op_right_op_equiv_functor_map (C : Type u₁) (D : Type u₂) (F G : (Cᵒᵖ D)ᵒᵖ) (η : F G) :
@[simp]
theorem category_theory.functor.left_op_right_op_equiv_counit_iso (C : Type u₁) (D : Type u₂)  :
@[simp]
theorem category_theory.functor.left_op_right_op_equiv_inverse_map (C : Type u₁) (D : Type u₂) (F G : C Dᵒᵖ) (η : F G) :
@[simp]
theorem category_theory.functor.left_op_right_op_equiv_functor_obj (C : Type u₁) (D : Type u₂) (F : (Cᵒᵖ D)ᵒᵖ) :