File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,32 @@ open Quiver
99open DeductiveSystem
1010open Category
1111
12+ /--
13+ The opposite of a category C, written C^{op} is a category with
14+ the same objects and every arrow reversed:
15+ Ob(C^op) = C
16+ C^op(c₁, c₂) = Hom(c₂, c₁)
17+ -/
18+ structure Opposite (C : Type u) : Type u where
19+ obj : C
20+
21+ instance (C : Type u) [Quiver C] : Quiver (Opposite C) where
22+ Hom c₁ c₂ := Hom c₂.obj c₁.obj
23+
24+ instance (C : Type u) [DeductiveSystem C] : DeductiveSystem (Opposite C) where
25+ id C := id C.obj
26+ comp f g := comp g f
27+
28+ instance (C : Type u) [Category C] : Category (Opposite C) where
29+ id_comp _f := by
30+ apply comp_id
31+
32+ comp_id _f := by
33+ apply id_comp
34+
35+ assoc f g h := by
36+ simp [DeductiveSystem.comp]
37+
1238/--
1339The product of two categories is a product category where:
1440 Ob(C × D) = C₀ × D₀
You can’t perform that action at this time.
0 commit comments