Skip to content

Commit 7d12126

Browse files
authored
add binary products of dagger categories
1 parent bbaa94f commit 7d12126

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{-# OPTIONS --cubical --safe #-}
2+
3+
module Dagger.Instances.BinProduct where
4+
5+
open import Cubical.Foundations.Prelude
6+
open import Cubical.Data.Sigma
7+
8+
open import Cubical.Categories.Category
9+
open import Cubical.Categories.Functor
10+
open import Cubical.Categories.Constructions.BinProduct
11+
open import Cubical.Categories.Morphism
12+
13+
open import Cubical.Categories.Dagger.Base
14+
open import Cubical.Categories.Dagger.Properties
15+
open import Cubical.Categories.Dagger.Functor
16+
17+
private variable
18+
ℓ ℓ' ℓ'' ℓ''' : Level
19+
20+
open DaggerStr
21+
open IsDagger
22+
open DagCat
23+
24+
BinProdDaggerStr : {C : Category ℓ ℓ'} {D : Category ℓ'' ℓ'''} DaggerStr C DaggerStr D DaggerStr (C ×C D)
25+
BinProdDaggerStr dagC dagD ._† (f , g) = dagC ._† f , dagD ._† g
26+
BinProdDaggerStr dagC dagD .is-dag .†-invol (f , g) = ≡-× (dagC .†-invol f) (dagD .†-invol g)
27+
BinProdDaggerStr dagC dagD .is-dag .†-id = ≡-× (dagC .†-id) (dagD .†-id)
28+
BinProdDaggerStr dagC dagD .is-dag .†-seq (f , g) (f' , g') = ≡-× (dagC .†-seq f f') (dagD .†-seq g g')
29+
30+
DagBinProd _×D_ : DagCat ℓ ℓ' DagCat ℓ'' ℓ''' DagCat (ℓ-max ℓ ℓ'') (ℓ-max ℓ' ℓ''')
31+
DagBinProd C D .cat = C .cat ×C D .cat
32+
DagBinProd C D .dagstr = BinProdDaggerStr (C .dagstr) (D .dagstr)
33+
_×D_ = DagBinProd
34+
35+
module _ (C : DagCat ℓ ℓ') (D : DagCat ℓ'' ℓ''') where
36+
†Fst : DagFunctor (C ×D D) C
37+
†Fst .fst = Fst (C .cat) (D .cat)
38+
†Fst .snd .F-† (f , g) = refl
39+
40+
†Snd : DagFunctor (C ×D D) D
41+
†Snd .fst = Snd (C .cat) (D .cat)
42+
†Snd .snd .F-† (f , g) = refl
43+
44+
module _ where
45+
private variable
46+
B C D E : DagCat ℓ ℓ'
47+
48+
_,†F_ : DagFunctor C D DagFunctor C E DagFunctor C (D ×D E)
49+
(F ,†F G) .fst = F .fst ,F G .fst
50+
(F ,†F G) .snd .F-† f = ≡-× (F .snd .F-† f) (G .snd .F-† f)
51+
52+
_׆F_ : DagFunctor B D DagFunctor C E DagFunctor (B ×D C) (D ×D E)
53+
_׆F_ {B = B} {C = C} F G = (F ∘†F †Fst B C) ,†F (G ∘†F †Snd B C)
54+
55+
†Δ : DagFunctor C (C ×D C)
56+
†Δ = †Id ,†F †Id
57+
58+
module _ (C : DagCat ℓ ℓ') (D : DagCat ℓ'' ℓ''') where
59+
†Swap : DagFunctor (C ×D D) (D ×D C)
60+
†Swap = †Snd C D ,†F †Fst C D
61+
62+
†Linj : ob D DagFunctor C (C ×D D)
63+
†Linj d = †Id ,†F †Const d
64+
65+
†Rinj : ob C DagFunctor D (C ×D D)
66+
†Rinj c = †Const c ,†F †Id
67+
68+
open areInv
69+
70+
†CatIso× : {x y z w} †CatIso C x y †CatIso D z w †CatIso (C ×D D) (x , z) (y , w)
71+
†CatIso× (f , fiso) (g , giso) .fst = f , g
72+
†CatIso× (f , fiso) (g , giso) .snd .sec = ≡-× (fiso .sec) (giso .sec)
73+
†CatIso× (f , fiso) (g , giso) .snd .ret = ≡-× (fiso .ret) (giso .ret)

0 commit comments

Comments
 (0)