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.
The opposite category.
Equations
- One or more equations did not get rendered due to their size.
The functor from the double-opposite of a category to the underlying category.
Equations
- CategoryTheory.unopUnop C = { obj := fun (X : Cᵒᵖᵒᵖ) => Opposite.unop (Opposite.unop X), map := fun {X Y : Cᵒᵖᵒᵖ} (f : X ⟶ Y) => f.unop.unop, map_id := ⋯, map_comp := ⋯ }
Instances For
The functor from a category to its double-opposite.
Equations
- CategoryTheory.opOp C = { obj := fun (X : C) => Opposite.op (Opposite.op X), map := fun {X Y : C} (f : X ⟶ Y) => f.op.op, map_id := ⋯, map_comp := ⋯ }
Instances For
The double opposite category is equivalent to the original.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If f is an isomorphism, so is f.op
If f.op is an isomorphism f must be too.
(This cannot be an instance as it would immediately loop!)
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
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
The isomorphism between F.op.unop and F.
Equations
- F.opUnopIso = CategoryTheory.NatIso.ofComponents (fun (x : C) => CategoryTheory.Iso.refl (F.op.unop.obj x)) ⋯
Instances For
The isomorphism between F.unop.op and F.
Equations
- F.unopOpIso = CategoryTheory.NatIso.ofComponents (fun (x : Cᵒᵖ) => CategoryTheory.Iso.refl (F.unop.op.obj x)) ⋯
Instances For
Taking the opposite of a functor is functorial.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Take the "unopposite" of a functor is functorial.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compatibility of Functor.op with respect to functor composition.
Equations
- F.opComp G = CategoryTheory.Iso.refl (F.comp G).op
Instances For
Compatibility of Functor.unop with respect to functor composition.
Equations
- F.unopComp G = CategoryTheory.Iso.refl (F.comp G).unop
Instances For
Functor.op transforms identity functors to identity functors.
Instances For
Functor.unop transforms identity functors to identity functors.
Equations
Instances For
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
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
The opposite of a fully faithful functor is fully faithful.
Equations
Instances For
If F is faithful then the right_op of F is also faithful.
If F is faithful then the left_op of F is also faithful.
The opposite of a fully faithful functor is fully faithful.
Equations
Instances For
The opposite of a fully faithful functor is fully faithful.
Equations
Instances For
Compatibility of Functor.rightOp with respect to functor composition.
Equations
- F.rightOpComp G = CategoryTheory.Iso.refl (F.comp G).rightOp
Instances For
Compatibility of Functor.leftOp with respect to functor composition.
Equations
- F.leftOpComp G = CategoryTheory.Iso.refl (F.comp G).leftOp
Instances For
Functor.rightOp sends identity functors to the canonical isomorphism opOp.
Equations
Instances For
Functor.leftOp sends identity functors to the canonical isomorphism unopUnop.
Equations
Instances For
The isomorphism between F.leftOp.rightOp and F.
Equations
- F.leftOpRightOpIso = CategoryTheory.NatIso.ofComponents (fun (x : C) => CategoryTheory.Iso.refl (F.leftOp.rightOp.obj x)) ⋯
Instances For
The isomorphism between F.rightOp.leftOp and F.
Equations
- F.rightOpLeftOpIso = CategoryTheory.NatIso.ofComponents (fun (x : Cᵒᵖ) => CategoryTheory.Iso.refl (F.rightOp.leftOp.obj x)) ⋯
Instances For
Whenever possible, it is advisable to use the isomorphism rightOpLeftOpIso
instead of this equality of functors.
The opposite of a natural transformation.
Equations
- CategoryTheory.NatTrans.op α = { app := fun (X : Cᵒᵖ) => (α.app (Opposite.unop X)).op, naturality := ⋯ }
Instances For
The "unopposite" of a natural transformation.
Equations
- CategoryTheory.NatTrans.unop α = { app := fun (X : C) => (α.app (Opposite.op X)).unop, naturality := ⋯ }
Instances For
Given a natural transformation α : F.op ⟶ G.op,
we can take the "unopposite" of each component obtaining a natural transformation G ⟶ F.
Equations
- CategoryTheory.NatTrans.removeOp α = { app := fun (X : C) => (α.app (Opposite.op X)).unop, naturality := ⋯ }
Instances For
Given a natural transformation α : F.unop ⟶ G.unop, we can take the opposite of each
component obtaining a natural transformation G ⟶ F.
Equations
- CategoryTheory.NatTrans.removeUnop α = { app := fun (X : Cᵒᵖ) => (α.app (Opposite.unop X)).op, naturality := ⋯ }
Instances For
Given a natural transformation α : F ⟶ G, for F G : C ⥤ Dᵒᵖ,
taking unop of each component gives a natural transformation G.leftOp ⟶ F.leftOp.
Equations
- CategoryTheory.NatTrans.leftOp α = { app := fun (X : Cᵒᵖ) => (α.app (Opposite.unop X)).unop, naturality := ⋯ }
Instances For
Given a natural transformation α : F.leftOp ⟶ G.leftOp, for F G : C ⥤ Dᵒᵖ,
taking op of each component gives a natural transformation G ⟶ F.
Equations
- CategoryTheory.NatTrans.removeLeftOp α = { app := fun (X : C) => (α.app (Opposite.op X)).op, naturality := ⋯ }
Instances For
Given a natural transformation α : F ⟶ G, for F G : Cᵒᵖ ⥤ D,
taking op of each component gives a natural transformation G.rightOp ⟶ F.rightOp.
Equations
- CategoryTheory.NatTrans.rightOp α = { app := fun (x : C) => (α.app (Opposite.op x)).op, naturality := ⋯ }
Instances For
Given a natural transformation α : F.rightOp ⟶ G.rightOp, for F G : Cᵒᵖ ⥤ D,
taking unop of each component gives a natural transformation G ⟶ F.
Equations
- CategoryTheory.NatTrans.removeRightOp α = { app := fun (X : Cᵒᵖ) => (α.app (Opposite.unop X)).unop, naturality := ⋯ }
Instances For
The opposite isomorphism.
Instances For
The isomorphism obtained from an isomorphism in the opposite category.
Instances For
The natural isomorphism between opposite functors G.op ≅ F.op induced by a natural
isomorphism between the original functors F ≅ G.
Equations
- CategoryTheory.NatIso.op α = { hom := CategoryTheory.NatTrans.op α.hom, inv := CategoryTheory.NatTrans.op α.inv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
The natural isomorphism between functors G ≅ F induced by a natural isomorphism
between the opposite functors F.op ≅ G.op.
Equations
- CategoryTheory.NatIso.removeOp α = { hom := CategoryTheory.NatTrans.removeOp α.hom, inv := CategoryTheory.NatTrans.removeOp α.inv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
The natural isomorphism between functors G.unop ≅ F.unop induced by a natural isomorphism
between the original functors F ≅ G.
Equations
- CategoryTheory.NatIso.unop α = { hom := CategoryTheory.NatTrans.unop α.hom, inv := CategoryTheory.NatTrans.unop α.inv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
An equivalence between categories gives an equivalence between the opposite categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An equivalence between opposite categories gives an equivalence between the original categories.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An equivalence between C and Dᵒᵖ gives an equivalence between Cᵒᵖ and D.
Equations
- e.leftOp = e.op.trans (CategoryTheory.opOpEquivalence D)
Instances For
An equivalence between Cᵒᵖ and D gives an equivalence between C and Dᵒᵖ.
Instances For
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 opEquiv' (A : C) (B : Cᵒᵖ) : (Opposite.op A ⟶ B) ≃ (B.unop ⟶ A) :=
opEquiv _ _
def opEquiv'' (A : Cᵒᵖ) (B : C) : (A ⟶ Opposite.op B) ≃ (B ⟶ A.unop) :=
opEquiv _ _
def opEquiv''' (A B : C) : (Opposite.op A ⟶ Opposite.op B) ≃ (B ⟶ A) :=
opEquiv _ _
Equations
- CategoryTheory.opEquiv A B = { toFun := fun (f : A ⟶ B) => f.unop, invFun := fun (g : Opposite.unop B ⟶ Opposite.unop A) => g.op, left_inv := ⋯, right_inv := ⋯ }
Instances For
Equations
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:
(Opposite.op A ≅ B) ≃ (B.unop ≅ A)(A ≅ Opposite.op B) ≃ (B ≅ A.unop)(Opposite.op A ≅ Opposite.op B) ≃ (B ≅ A)
Equations
- CategoryTheory.isoOpEquiv A B = { toFun := fun (f : A ≅ B) => f.unop, invFun := fun (g : Opposite.unop B ≅ Opposite.unop A) => g.op, left_inv := ⋯, right_inv := ⋯ }
Instances For
The equivalence of functor categories induced by op and unop.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The equivalence of functor categories induced by leftOp and rightOp.
Equations
- One or more equations did not get rendered due to their size.