0 | module Control.Category.Records.MonFunctor
2 | import Control.Category
3 | import Control.Category.Records.Category
4 | import Control.Category.Records.Monoidal
5 | import Control.Category.Records.Functor
8 | %prefix_record_projections off
14 | record LaxMonFunctorR (cat,cat' : MonoidalR) where
15 | constructor MkLaxMonFunctorR
16 | fun : cat.obj -> cat'.obj
17 | {auto impl : LaxMonFunctor
18 | cat.hom cat.tensor cat.unit
19 | cat'.hom cat'.tensor cat'.unit fun}
22 | public export %inline
23 | LaxMonEndofunctorR : (cat : MonoidalR) -> Type
24 | LaxMonEndofunctorR cat = LaxMonFunctorR cat cat
26 | namespace LaxMonFunctorR
28 | public export %inline
29 | (.functorR) : (rec : LaxMonFunctorR cat cat') -> FunctorR cat.categoryR cat'.categoryR
30 | (.functorR) {cat=MkMonoidalR{},cat'=MkMonoidalR{}} (MkLaxMonFunctorR {} {fun}) = MkFunctorR fun
33 | public export %inline
34 | (.map) : (rec : LaxMonFunctorR cat cat') -> {a,b : _} ->
35 | cat.hom a b -> cat'.hom (rec.fun a) (rec.fun b)
36 | (.map) {cat=MkMonoidalR{},cat'=MkMonoidalR{}} (MkLaxMonFunctorR {}) = map
40 | public export %inline
41 | (.laxMonFunctorR) : (rec : LaxMonFunctorR cat cat') -> LaxMonFunctorR cat cat'
42 | (.laxMonFunctorR) = id
45 | public export %inline
46 | (.fjoin) : (rec : LaxMonFunctorR cat cat') -> {a,b : _} ->
47 | cat'.hom (cat'.tensor (rec.fun a) (rec.fun b)) (rec.fun (cat.tensor a b))
48 | (.fjoin) rec = fjoin @{rec.impl}
51 | public export %inline
52 | (.funit) : (rec : LaxMonFunctorR cat cat') -> cat'.hom cat'.unit (rec.fun cat.unit)
53 | (.funit) rec = funit @{rec.impl}
60 | record MonFunctorR (cat,cat' : MonoidalR) where
61 | constructor MkMonFunctorR
62 | fun : cat.obj -> cat'.obj
63 | {auto impl : MonFunctor
64 | cat.hom cat.tensor cat.unit
65 | cat'.hom cat'.tensor cat'.unit fun}
68 | public export %inline
69 | MonEndofunctorR : (cat : MonoidalR) -> Type
70 | MonEndofunctorR cat = MonFunctorR cat cat
72 | namespace MonFunctorR
74 | public export %inline
75 | (.functorR) : (rec : MonFunctorR cat cat') -> FunctorR cat.categoryR cat'.categoryR
76 | (.functorR) {cat=MkMonoidalR{},cat'=MkMonoidalR{}} (MkMonFunctorR {} {fun}) = MkFunctorR fun
79 | public export %inline
80 | (.map) : (rec : MonFunctorR cat cat') -> {a,b : _} ->
81 | cat.hom a b -> cat'.hom (rec.fun a) (rec.fun b)
82 | (.map) {cat=MkMonoidalR{},cat'=MkMonoidalR{}} rec@(MkMonFunctorR {}) = map
86 | public export %inline
87 | (.laxMonFunctorR) : (rec : MonFunctorR cat cat') -> LaxMonFunctorR cat cat'
88 | (.laxMonFunctorR) {cat=MkMonoidalR{},cat'=MkMonoidalR{}} (MkMonFunctorR {} {fun}) = MkLaxMonFunctorR fun
91 | public export %inline
92 | (.fjoin) : (rec : MonFunctorR cat cat') -> {a,b : _} ->
93 | cat'.hom (cat'.tensor (rec.fun a) (rec.fun b)) (rec.fun (cat.tensor a b))
94 | (.fjoin) {cat=MkMonoidalR {} {hom=cat,tensor=ten},cat'=MkMonoidalR {} {hom=cat',tensor=ten'}}
95 | rec@(MkMonFunctorR {}) = fjoin {cat,ten,cat',ten'}
98 | public export %inline
99 | (.funit) : (rec : MonFunctorR cat cat') -> cat'.hom cat'.unit (rec.fun cat.unit)
100 | (.funit) {cat=MkMonoidalR {} {hom=cat,tensor=ten},cat'=MkMonoidalR {} {hom=cat',tensor=ten'}}
101 | rec@(MkMonFunctorR {}) = funit {cat,ten,cat',ten'}
105 | public export %inline
106 | (.monFunctorR) : (rec : MonFunctorR cat cat') -> MonFunctorR cat cat'
107 | (.monFunctorR) = id
110 | public export %inline
111 | (.fjoin') : (rec : MonFunctorR cat cat') -> {a,b : _} ->
112 | cat'.hom (rec.fun (cat.tensor a b)) (cat'.tensor (rec.fun a) (rec.fun b))
113 | (.fjoin') rec = fjoin' @{rec.impl}
116 | public export %inline
117 | (.funit') : (rec : MonFunctorR cat cat') -> cat'.hom (rec.fun cat.unit) cat'.unit
118 | (.funit') rec = funit' @{rec.impl}
126 | record StrongFunctorR (cat : MonoidalR) where
127 | constructor MkStrongFunctorR
128 | fun : cat.obj -> cat.obj
129 | {auto impl : StrongFunctor cat.hom cat.tensor fun}
131 | namespace StrongFunctorR
133 | public export %inline
134 | (.functorR) : (rec : StrongFunctorR cat) -> EndofunctorR cat.categoryR
135 | (.functorR) {cat=MkMonoidalR{}} (MkStrongFunctorR {} {fun}) = MkFunctorR fun
138 | public export %inline
139 | (.map) : (rec : StrongFunctorR cat) -> {a,b : _} ->
140 | cat.hom a b -> cat.hom (rec.fun a) (rec.fun b)
141 | (.map) {cat=MkMonoidalR{}} rec@(MkStrongFunctorR {}) = map
144 | public export %inline
145 | (.strongl) : (rec : StrongFunctorR cat) -> {a,b : _} ->
146 | cat.hom (cat.tensor a (rec.fun b)) (rec.fun (cat.tensor a b))
147 | (.strongl) rec = strongl @{rec.impl}
150 | public export %inline
151 | (.strongr) : (rec : StrongFunctorR cat) -> {a,b : _} ->
152 | cat.hom (cat.tensor (rec.fun a) b) (rec.fun (cat.tensor a b))
153 | (.strongr) rec = strongr @{rec.impl}
162 | record CostrongFunctorR (cat : MonoidalR) where
163 | constructor MkCostrongFunctorR
164 | fun : cat.obj -> cat.obj
165 | {auto impl : CostrongFunctor cat.hom cat.tensor fun}
167 | namespace CostrongFunctorR
169 | public export %inline
170 | (.functorR) : (rec : CostrongFunctorR cat) -> EndofunctorR cat.categoryR
171 | (.functorR) {cat=MkMonoidalR{}} (MkCostrongFunctorR {} {fun}) = MkFunctorR fun
174 | public export %inline
175 | (.map) : (rec : CostrongFunctorR cat) -> {a,b : _} ->
176 | cat.hom a b -> cat.hom (rec.fun a) (rec.fun b)
177 | (.map) {cat=MkMonoidalR{}} rec@(MkCostrongFunctorR {}) = map
180 | public export %inline
181 | (.costrongl) : (rec : CostrongFunctorR cat) -> {a,b : _} ->
182 | cat.hom (rec.fun (cat.tensor a b)) (cat.tensor a (rec.fun b))
183 | (.costrongl) rec = costrongl @{rec.impl}
186 | public export %inline
187 | (.costrongr) : (rec : CostrongFunctorR cat) -> {a,b : _} ->
188 | cat.hom (rec.fun (cat.tensor a b)) (cat.tensor (rec.fun a) b)
189 | (.costrongr) rec = costrongr @{rec.impl}