{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FunctionalDependencies #-}
module Proarrow.Category.Equipment where
import Data.Kind (Constraint)
import Prelude (($))
import Proarrow.Category.Bicategory
( Adjunction (..)
, Bicategory (..)
, Ob'
, Ob0'
, associator'
, associatorInv'
, leftUnitorInvWith
, leftUnitorWith
, rightUnitorInvWith
, rightUnitorWith
, (==)
, (||)
)
import Proarrow.Category.Bicategory.Strictified
( Fold
, Path (..)
, SPath (..)
, Strictified (Str)
, append
, asObj
, asSPath
, concatFold
, elimI
, elimO
, fold
, introI
, introO
, obj1
, singleton
, splitFold
, str
, unStr
, type (+++)
)
import Proarrow.Category.Instance.Product ((:**:) (..))
import Proarrow.Core (CAT, CategoryOf (..), Profunctor (..), Promonad (..), obj, src, tgt, (//), (\\), type (+->))
import Proarrow.Object (Obj)
infixl 6 |||
infixl 5 ===
type HasCompanions :: forall {c}. CAT c -> CAT c -> Constraint
class (Bicategory hk, Bicategory vk, forall (k :: c). (Ob0 vk k) => Ob0' hk k) => HasCompanions (hk :: CAT c) vk | hk -> vk where
type Companion hk (f :: vk j k) :: hk j k
mapCompanion :: forall {j} {k} (f :: vk j k) g. f ~> g -> Companion hk f ~> Companion hk g
compToId :: (Ob0 vk k) => Companion hk (I :: vk k k) ~> (I :: hk k k)
compFromId :: (Ob0 vk k) => (I :: hk k k) ~> Companion hk (I :: vk k k)
compToCompose
:: forall {j} {k} (f :: vk j k) g. Obj f -> Obj g -> Companion hk (f `O` g) ~> (Companion hk f `O` Companion hk g)
compFromCompose
:: forall {j} {k} (f :: vk j k) g. Obj f -> Obj g -> (Companion hk f `O` Companion hk g) ~> Companion hk (f `O` g)
class (Adjunction (Companion hk f) (Conjoint hk f)) => ComConAdjunction hk vk f
instance (Adjunction (Companion hk f) (Conjoint hk f)) => ComConAdjunction hk vk f
type Equipment :: forall {c}. CAT c -> CAT c -> Constraint
class (HasCompanions hk vk) => Equipment hk vk | hk -> vk where
{-# MINIMAL mapConjoint, (conjToId, conjFromId, conjToCompose, conjFromCompose | comConUnit, comConCounit) #-}
type Conjoint hk (f :: vk j k) :: hk k j
mapConjoint :: forall {j} {k} (f :: vk j k) g. f ~> g -> Conjoint hk g ~> Conjoint hk f
conjToId :: forall k. (Ob0 vk k) => Conjoint hk (I :: vk k k) ~> (I :: hk k k)
conjToId = Obj I -> O (Companion hk I) (Conjoint hk I) ~> I
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj I
forall (i :: c). Ob0 vk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj (O (Companion hk I) (Conjoint hk I) ~> I)
-> (Conjoint hk I ~> O (Companion hk I) (Conjoint hk I))
-> Conjoint hk I ~> I
forall (b :: hk k k) (c :: hk k k) (a :: hk k k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (I ~> Companion hk I)
-> (Conjoint hk I ~> Conjoint hk I)
-> Conjoint hk I ~> O (Companion hk I) (Conjoint hk I)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(I ~> c) -> (a ~> b) -> a ~> O c b
leftUnitorInvWith I ~> Companion hk I
forall (k :: c). Ob0 vk k => I ~> Companion hk I
forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
compFromId (Obj I -> Conjoint hk I ~> Conjoint hk I
forall {j :: c} {k :: c} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint Obj I
forall (i :: c). Ob0 vk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj)
conjFromId :: forall k. (Ob0 vk k) => (I :: hk k k) ~> Conjoint hk (I :: vk k k)
conjFromId = (Companion hk I ~> I)
-> (Conjoint hk I ~> Conjoint hk I)
-> O (Conjoint hk I) (Companion hk I) ~> Conjoint hk I
forall {s} {k :: s} (kk :: CAT s) (i :: s) (c :: kk i i)
(a :: kk i k) (b :: kk i k).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O a c ~> b
rightUnitorWith Companion hk I ~> I
forall (k :: c). Ob0 vk k => Companion hk I ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
compToId ((I ~> I) -> Conjoint hk I ~> Conjoint hk I
forall {j :: c} {k :: c} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint I ~> I
forall (i :: c). Ob0 vk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj) (O (Conjoint hk I) (Companion hk I) ~> Conjoint hk I)
-> (I ~> O (Conjoint hk I) (Companion hk I)) -> I ~> Conjoint hk I
forall (b :: hk k k) (c :: hk k k) (a :: hk k k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (I ~> I) -> I ~> O (Conjoint hk I) (Companion hk I)
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit I ~> I
forall (i :: c). Ob0 vk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj
conjToCompose
:: forall {j} {k} (f :: vk j k) g. Obj f -> Obj g -> Conjoint hk (f `O` g) ~> (Conjoint hk g `O` Conjoint hk f)
conjToCompose Obj f
f Obj g
g =
Strictified
((Conjoint hk (O f g) ::: Nil) +++ Nil)
(Nil +++ ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil)))
-> Fold ((Conjoint hk (O f g) ::: Nil) +++ Nil)
~> Fold
(Nil +++ ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil)))
forall {k1} {kk :: CAT k1} {j :: k1} {k2 :: k1}
(ps :: Path kk j k2) (qs :: Path kk j k2).
Strictified ps qs -> Fold ps ~> Fold qs
unStr
( let
fg :: O f g ~> O f g
fg = Obj f
f Obj f -> Obj g -> O f g ~> O f g
forall {i :: c} (j :: c) (k :: c) (a :: vk j k) (b :: vk j k)
(c :: vk i j) (d :: vk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj g
g
comFG :: (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
comFG = (Companion hk (O f g) ~> Companion hk (O f g))
-> (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk O f g ~> O f g
fg)
comF :: (Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF = (Companion hk f ~> Companion hk f)
-> (Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f)
comG :: (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG = (Companion hk g ~> Companion hk g)
-> (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj g
g)
conFG :: (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG = (Conjoint hk (O f g) ~> Conjoint hk (O f g))
-> (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk O f g ~> O f g
fg)
conF :: (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF = (Conjoint hk f ~> Conjoint hk f)
-> (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj f
f)
conG :: (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG = (Conjoint hk g ~> Conjoint hk g)
-> (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj g
g)
counitFG :: Strictified
((Conjoint hk (O f g) ::: Nil) +++ (Companion hk (O f g) ::: Nil))
Nil
counitFG = Obj
((Conjoint hk (O f g) ::: Nil) +++ (Companion hk (O f g) ::: Nil))
-> Obj Nil
-> (Fold
((Conjoint hk (O f g) ::: Nil) +++ (Companion hk (O f g) ::: Nil))
~> Fold Nil)
-> Strictified
((Conjoint hk (O f g) ::: Nil) +++ (Companion hk (O f g) ::: Nil))
Nil
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str ((Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
comFG ((Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil))
-> ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil))
-> O (Companion hk (O f g) ::: Nil) (Conjoint hk (O f g) ::: Nil)
~> O (Companion hk (O f g) ::: Nil) (Conjoint hk (O f g) ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG) Obj I
Obj Nil
forall (i :: c). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj ((O f g ~> O f g)
-> O (Companion hk (O f g)) (Conjoint hk (O f g)) ~> I
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit O f g ~> O f g
fg)
compFG :: Strictified
((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
(Companion hk (O f g) ::: Nil)
compFG = Obj ((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
-> ((Companion hk (O f g) ::: Nil)
~> (Companion hk (O f g) ::: Nil))
-> (Fold ((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
~> Fold (Companion hk (O f g) ::: Nil))
-> Strictified
((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
(Companion hk (O f g) ::: Nil)
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> O (Companion hk f ::: Nil) (Companion hk g ::: Nil)
~> O (Companion hk f ::: Nil) (Companion hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG) (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
comFG (Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
forall {j :: c} {j :: c} {k :: c} (f :: vk j k) (g :: vk j j).
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk j j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
compFromCompose Obj f
f Obj g
g)
unitF :: Strictified
Nil ((Companion hk f ::: Nil) +++ (Conjoint hk f ::: Nil))
unitF = Obj Nil
-> Obj ((Companion hk f ::: Nil) +++ (Conjoint hk f ::: Nil))
-> (Fold Nil
~> Fold ((Companion hk f ::: Nil) +++ (Conjoint hk f ::: Nil)))
-> Strictified
Nil ((Companion hk f ::: Nil) +++ (Conjoint hk f ::: Nil))
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str Obj I
Obj Nil
forall (i :: c). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj ((Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF ((Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil))
-> ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> O (Conjoint hk f ::: Nil) (Companion hk f ::: Nil)
~> O (Conjoint hk f ::: Nil) (Companion hk f ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF) (Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit Obj f
f)
unitG :: Strictified
Nil ((Companion hk g ::: Nil) +++ (Conjoint hk g ::: Nil))
unitG = Obj Nil
-> Obj ((Companion hk g ::: Nil) +++ (Conjoint hk g ::: Nil))
-> (Fold Nil
~> Fold ((Companion hk g ::: Nil) +++ (Conjoint hk g ::: Nil)))
-> Strictified
Nil ((Companion hk g ::: Nil) +++ (Conjoint hk g ::: Nil))
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str Obj I
Obj Nil
forall (i :: c). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj ((Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG ((Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil))
-> ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> O (Conjoint hk g ::: Nil) (Companion hk g ::: Nil)
~> O (Conjoint hk g ::: Nil) (Companion hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG) (Obj g -> I ~> O (Conjoint hk g) (Companion hk g)
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit Obj g
g)
in
(Nil ~> (Companion hk g ::: (Conjoint hk g ::: Nil))
Strictified
Nil ((Companion hk g ::: Nil) +++ (Conjoint hk g ::: Nil))
unitG (Nil ~> (Companion hk g ::: (Conjoint hk g ::: Nil)))
-> ((Companion hk g ::: (Conjoint hk g ::: Nil))
~> ((Companion hk g ::: Nil)
+++ ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil))))
-> Nil
~> ((Companion hk g ::: Nil)
+++ ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil)))
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG ((Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil))
-> (Nil ~> (Companion hk f ::: (Conjoint hk f ::: Nil)))
-> O (Conjoint hk g ::: Nil) Nil
~> O (Conjoint hk g ::: Nil)
(Companion hk f ::: (Conjoint hk f ::: Nil))
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| Nil ~> (Companion hk f ::: (Conjoint hk f ::: Nil))
Strictified
Nil ((Companion hk f ::: Nil) +++ (Conjoint hk f ::: Nil))
unitF ((Nil +++ (Conjoint hk g ::: Nil))
~> ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil)))
-> ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> O (Nil +++ (Conjoint hk g ::: Nil)) (Companion hk g ::: Nil)
~> O ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil))
(Companion hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG) (Nil
~> ((Companion hk g ::: Nil)
+++ ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil))))
-> ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil))
-> O Nil (Conjoint hk (O f g) ::: Nil)
~> O ((Companion hk g ::: Nil)
+++ ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil)))
(Conjoint hk (O f g) ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG
(((Conjoint hk (O f g) ::: Nil) +++ Nil)
~> ((Conjoint hk (O f g) ::: Nil)
+++ ((Companion hk g ::: Nil)
+++ ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil)))))
-> (((Conjoint hk (O f g) ::: Nil)
+++ ((Companion hk g ::: Nil)
+++ ((Companion hk f ::: (Conjoint hk f ::: Nil))
+++ (Conjoint hk g ::: Nil))))
~> (Nil +++ ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil))))
-> ((Conjoint hk (O f g) ::: Nil) +++ Nil)
~> (Nil +++ ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil)))
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG ((Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil))
-> ((Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil))
-> O (Conjoint hk g ::: Nil) (Conjoint hk f ::: Nil)
~> O (Conjoint hk g ::: Nil) (Conjoint hk f ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF (((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil))
~> ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil)))
-> (((Conjoint hk (O f g) ::: Nil)
+++ (Companion hk g ::: (Companion hk f ::: Nil)))
~> Nil)
-> O ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil))
((Conjoint hk (O f g) ::: Nil)
+++ (Companion hk g ::: (Companion hk f ::: Nil)))
~> O ((Conjoint hk f ::: Nil) +++ (Conjoint hk g ::: Nil)) Nil
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| ((Companion hk g ::: (Companion hk f ::: Nil))
~> (Companion hk (O f g) ::: Nil)
Strictified
((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
(Companion hk (O f g) ::: Nil)
compFG ((Companion hk g ::: (Companion hk f ::: Nil))
~> (Companion hk (O f g) ::: Nil))
-> ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil))
-> O (Companion hk g ::: (Companion hk f ::: Nil))
(Conjoint hk (O f g) ::: Nil)
~> O (Companion hk (O f g) ::: Nil) (Conjoint hk (O f g) ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG (((Conjoint hk (O f g) ::: Nil)
+++ (Companion hk g ::: (Companion hk f ::: Nil)))
~> ((Conjoint hk (O f g) ::: Nil)
+++ (Companion hk (O f g) ::: Nil)))
-> (((Conjoint hk (O f g) ::: Nil)
+++ (Companion hk (O f g) ::: Nil))
~> Nil)
-> ((Conjoint hk (O f g) ::: Nil)
+++ (Companion hk g ::: (Companion hk f ::: Nil)))
~> Nil
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== ((Conjoint hk (O f g) ::: Nil) +++ (Companion hk (O f g) ::: Nil))
~> Nil
Strictified
((Conjoint hk (O f g) ::: Nil) +++ (Companion hk (O f g) ::: Nil))
Nil
counitFG)
)
((Ob0 vk j, Ob0 vk k, Ob f, Ob f) =>
Conjoint hk (O f g) ~> O (Conjoint hk g) (Conjoint hk f))
-> Obj f
-> Conjoint hk (O f g) ~> O (Conjoint hk g) (Conjoint hk f)
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
((Ob0 vk k, Ob0 vk j, Ob g, Ob g) =>
Conjoint hk (O f g) ~> O (Conjoint hk g) (Conjoint hk f))
-> Obj g
-> Conjoint hk (O f g) ~> O (Conjoint hk g) (Conjoint hk f)
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj g
g
conjFromCompose
:: forall {j} {k} (f :: vk j k) g. Obj f -> Obj g -> (Conjoint hk g `O` Conjoint hk f) ~> Conjoint hk (f `O` g)
conjFromCompose Obj f
f Obj g
g =
Strictified
((Conjoint hk f ::: Nil) +++ ((Conjoint hk g ::: Nil) +++ Nil))
(Nil +++ (Conjoint hk (O f g) ::: Nil))
-> Fold
((Conjoint hk f ::: Nil) +++ ((Conjoint hk g ::: Nil) +++ Nil))
~> Fold (Nil +++ (Conjoint hk (O f g) ::: Nil))
forall {k1} {kk :: CAT k1} {j :: k1} {k2 :: k1}
(ps :: Path kk j k2) (qs :: Path kk j k2).
Strictified ps qs -> Fold ps ~> Fold qs
unStr
( let
fg :: O f g ~> O f g
fg = Obj f
f Obj f -> Obj g -> O f g ~> O f g
forall {i :: c} (j :: c) (k :: c) (a :: vk j k) (b :: vk j k)
(c :: vk i j) (d :: vk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj g
g
comFG :: (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
comFG = (Companion hk (O f g) ~> Companion hk (O f g))
-> (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk O f g ~> O f g
fg)
comF :: (Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF = (Companion hk f ~> Companion hk f)
-> (Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f)
comG :: (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG = (Companion hk g ~> Companion hk g)
-> (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj g
g)
conFG :: (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG = (Conjoint hk (O f g) ~> Conjoint hk (O f g))
-> (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk O f g ~> O f g
fg)
conF :: (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF = (Conjoint hk f ~> Conjoint hk f)
-> (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj f
f)
conG :: (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG = (Conjoint hk g ~> Conjoint hk g)
-> (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj g
g)
counitF :: Strictified
((Conjoint hk f ::: Nil) +++ (Companion hk f ::: Nil)) Nil
counitF = Obj ((Conjoint hk f ::: Nil) +++ (Companion hk f ::: Nil))
-> Obj Nil
-> (Fold ((Conjoint hk f ::: Nil) +++ (Companion hk f ::: Nil))
~> Fold Nil)
-> Strictified
((Conjoint hk f ::: Nil) +++ (Companion hk f ::: Nil)) Nil
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> ((Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil))
-> O (Companion hk f ::: Nil) (Conjoint hk f ::: Nil)
~> O (Companion hk f ::: Nil) (Conjoint hk f ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF) Obj I
Obj Nil
forall (i :: c). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj (Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj f
f)
counitG :: Strictified
((Conjoint hk g ::: Nil) +++ (Companion hk g ::: Nil)) Nil
counitG = Obj ((Conjoint hk g ::: Nil) +++ (Companion hk g ::: Nil))
-> Obj Nil
-> (Fold ((Conjoint hk g ::: Nil) +++ (Companion hk g ::: Nil))
~> Fold Nil)
-> Strictified
((Conjoint hk g ::: Nil) +++ (Companion hk g ::: Nil)) Nil
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> ((Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil))
-> O (Companion hk g ::: Nil) (Conjoint hk g ::: Nil)
~> O (Companion hk g ::: Nil) (Conjoint hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG) Obj I
Obj Nil
forall (i :: c). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj (Obj g -> O (Companion hk g) (Conjoint hk g) ~> I
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj g
g)
compFG :: Strictified
(Companion hk (O f g) ::: Nil)
((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
compFG = ((Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil))
-> Obj ((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
-> (Fold (Companion hk (O f g) ::: Nil)
~> Fold ((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil)))
-> Strictified
(Companion hk (O f g) ::: Nil)
((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
comFG ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> O (Companion hk f ::: Nil) (Companion hk g ::: Nil)
~> O (Companion hk f ::: Nil) (Companion hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
comG) (Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
forall {i :: c} {j :: c} {k :: c} (f :: vk j k) (g :: vk i j).
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
forall {c} (hk :: CAT c) (vk :: CAT c) {i :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk i j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
compToCompose Obj f
f Obj g
g)
unitFG :: Strictified
Nil
((Companion hk (O f g) ::: Nil) +++ (Conjoint hk (O f g) ::: Nil))
unitFG = Obj Nil
-> Obj
((Companion hk (O f g) ::: Nil) +++ (Conjoint hk (O f g) ::: Nil))
-> (Fold Nil
~> Fold
((Companion hk (O f g) ::: Nil) +++ (Conjoint hk (O f g) ::: Nil)))
-> Strictified
Nil
((Companion hk (O f g) ::: Nil) +++ (Conjoint hk (O f g) ::: Nil))
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str Obj I
Obj Nil
forall (i :: c). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil))
-> ((Companion hk (O f g) ::: Nil)
~> (Companion hk (O f g) ::: Nil))
-> O (Conjoint hk (O f g) ::: Nil) (Companion hk (O f g) ::: Nil)
~> O (Conjoint hk (O f g) ::: Nil) (Companion hk (O f g) ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk (O f g) ::: Nil) ~> (Companion hk (O f g) ::: Nil)
comFG) ((O f g ~> O f g)
-> I ~> O (Conjoint hk (O f g)) (Companion hk (O f g))
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit O f g ~> O f g
fg)
in
(Nil ~> (Companion hk (O f g) ::: (Conjoint hk (O f g) ::: Nil))
Strictified
Nil
((Companion hk (O f g) ::: Nil) +++ (Conjoint hk (O f g) ::: Nil))
unitFG (Nil ~> (Companion hk (O f g) ::: (Conjoint hk (O f g) ::: Nil)))
-> ((Companion hk (O f g) ::: (Conjoint hk (O f g) ::: Nil))
~> ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil)))
-> Nil
~> ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil))
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil))
-> ((Companion hk (O f g) ::: Nil)
~> (Companion hk g ::: (Companion hk f ::: Nil)))
-> O (Conjoint hk (O f g) ::: Nil) (Companion hk (O f g) ::: Nil)
~> O (Conjoint hk (O f g) ::: Nil)
(Companion hk g ::: (Companion hk f ::: Nil))
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk (O f g) ::: Nil)
~> (Companion hk g ::: (Companion hk f ::: Nil))
Strictified
(Companion hk (O f g) ::: Nil)
((Companion hk g ::: Nil) +++ (Companion hk f ::: Nil))
compFG) (Nil
~> ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil)))
-> ((Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil))
-> O Nil (Conjoint hk g ::: Nil)
~> O ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil))
(Conjoint hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk g ::: Nil) ~> (Conjoint hk g ::: Nil)
conG (((Conjoint hk g ::: Nil) +++ Nil)
~> ((Conjoint hk g ::: Nil)
+++ ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil))))
-> ((Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil))
-> O ((Conjoint hk g ::: Nil) +++ Nil) (Conjoint hk f ::: Nil)
~> O ((Conjoint hk g ::: Nil)
+++ ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil)))
(Conjoint hk f ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF
(((Conjoint hk f ::: Nil) +++ ((Conjoint hk g ::: Nil) +++ Nil))
~> ((Conjoint hk f ::: Nil)
+++ ((Conjoint hk g ::: Nil)
+++ ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil)))))
-> (((Conjoint hk f ::: Nil)
+++ ((Conjoint hk g ::: Nil)
+++ ((Companion hk g ::: (Companion hk f ::: Nil))
+++ (Conjoint hk (O f g) ::: Nil))))
~> (Nil +++ (Conjoint hk (O f g) ::: Nil)))
-> ((Conjoint hk f ::: Nil) +++ ((Conjoint hk g ::: Nil) +++ Nil))
~> (Nil +++ (Conjoint hk (O f g) ::: Nil))
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== (Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil)
conFG ((Conjoint hk (O f g) ::: Nil) ~> (Conjoint hk (O f g) ::: Nil))
-> (((Conjoint hk f ::: Nil)
+++ ((Conjoint hk g ::: (Companion hk g ::: Nil))
+++ (Companion hk f ::: Nil)))
~> Nil)
-> O (Conjoint hk (O f g) ::: Nil)
((Conjoint hk f ::: Nil)
+++ ((Conjoint hk g ::: (Companion hk g ::: Nil))
+++ (Companion hk f ::: Nil)))
~> O (Conjoint hk (O f g) ::: Nil) Nil
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
comF ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> ((Conjoint hk g ::: (Companion hk g ::: Nil)) ~> Nil)
-> O (Companion hk f ::: Nil)
(Conjoint hk g ::: (Companion hk g ::: Nil))
~> O (Companion hk f ::: Nil) Nil
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk g ::: (Companion hk g ::: Nil)) ~> Nil
Strictified
((Conjoint hk g ::: Nil) +++ (Companion hk g ::: Nil)) Nil
counitG (((Conjoint hk g ::: (Companion hk g ::: Nil))
+++ (Companion hk f ::: Nil))
~> (Nil +++ (Companion hk f ::: Nil)))
-> ((Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil))
-> O ((Conjoint hk g ::: (Companion hk g ::: Nil))
+++ (Companion hk f ::: Nil))
(Conjoint hk f ::: Nil)
~> O (Nil +++ (Companion hk f ::: Nil)) (Conjoint hk f ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Conjoint hk f ::: Nil) ~> (Conjoint hk f ::: Nil)
conF (((Conjoint hk f ::: Nil)
+++ ((Conjoint hk g ::: (Companion hk g ::: Nil))
+++ (Companion hk f ::: Nil)))
~> ((Conjoint hk f ::: Nil)
+++ (Nil +++ (Companion hk f ::: Nil))))
-> (((Conjoint hk f ::: Nil)
+++ (Nil +++ (Companion hk f ::: Nil)))
~> Nil)
-> ((Conjoint hk f ::: Nil)
+++ ((Conjoint hk g ::: (Companion hk g ::: Nil))
+++ (Companion hk f ::: Nil)))
~> Nil
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== ((Conjoint hk f ::: Nil) +++ (Nil +++ (Companion hk f ::: Nil)))
~> Nil
Strictified
((Conjoint hk f ::: Nil) +++ (Companion hk f ::: Nil)) Nil
counitF)
)
((Ob0 vk j, Ob0 vk k, Ob f, Ob f) =>
O (Conjoint hk g) (Conjoint hk f) ~> Conjoint hk (O f g))
-> Obj f
-> O (Conjoint hk g) (Conjoint hk f) ~> Conjoint hk (O f g)
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
((Ob0 vk j, Ob0 vk j, Ob g, Ob g) =>
O (Conjoint hk g) (Conjoint hk f) ~> Conjoint hk (O f g))
-> Obj g
-> O (Conjoint hk g) (Conjoint hk f) ~> Conjoint hk (O f g)
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj g
g
comConUnit :: forall {j} {k} (f :: vk j k). Obj f -> I ~> Conjoint hk f `O` Companion hk f
default comConUnit
:: forall {j} {k} (f :: vk j k). (((Ob f) => ComConAdjunction hk vk f)) => Obj f -> I ~> Conjoint hk f `O` Companion hk f
comConUnit Obj f
f = forall (l :: hk j k) (r :: hk k j). Adjunction l r => I ~> O r l
forall {k} {kk :: k -> k -> Type} {c :: k} {d :: k} (l :: kk c d)
(r :: kk d c).
Adjunction l r =>
I ~> O r l
unit @(Companion hk f) @(Conjoint hk f) ((Ob0 vk j, Ob0 vk k, Ob f, Ob f) =>
I ~> O (Conjoint hk f) (Companion hk f))
-> Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
comConCounit :: forall {j} {k} (f :: vk j k). Obj f -> Companion hk f `O` Conjoint hk f ~> I
default comConCounit
:: forall {j} {k} (f :: vk j k). ((Ob f) => ComConAdjunction hk vk f) => Obj f -> Companion hk f `O` Conjoint hk f ~> I
comConCounit Obj f
f = forall (l :: hk j k) (r :: hk k j). Adjunction l r => O l r ~> I
forall {k} {kk :: k -> k -> Type} {c :: k} {d :: k} (l :: kk c d)
(r :: kk d c).
Adjunction l r =>
O l r ~> I
counit @(Companion hk f) @(Conjoint hk f) ((Ob0 vk j, Ob0 vk k, Ob f, Ob f) =>
O (Companion hk f) (Conjoint hk f) ~> I)
-> Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
type Cart (p :: hk h j) (f :: vk h i) (g :: vk j k) = Companion hk g `O` p `O` Conjoint hk f
type SQ' (hk :: CAT c) (vk :: CAT c) h i j k = (hk k i, vk j k) +-> (hk j h, vk h i)
type SQ (hk :: CAT c) (vk :: CAT c) = forall {h} {i} {j} {k}. SQ' hk vk h i j k
type Sq :: forall {c} {hk :: CAT c} {vk :: CAT c}. SQ hk vk
data Sq pf qg where
Sq
:: forall {hk} {vk} {h} {i} {j} {k} (p :: hk j h) (q :: hk k i) (f :: vk h i) (g :: vk j k)
. (Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g)
=> Companion hk f `O` p ~> q `O` Companion hk g
-> Sq '(p, f) '(q, g)
instance (HasCompanions hk vk, Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k) => Profunctor (Sq :: SQ' hk vk h i j k) where
dimap :: forall (c :: (hk j h, vk h i)) (a :: (hk j h, vk h i))
(b :: (hk k i, vk j k)) (d :: (hk k i, vk j k)).
(c ~> a) -> (b ~> d) -> Sq a b -> Sq c d
dimap (a1 ~> b1
p :**: a2 ~> b2
f) (a1 ~> b1
q :**: a2 ~> b2
g) (Sq O (Companion hk f) p ~> O q (Companion hk g)
sq) = (O (Companion hk a2) a1 ~> O b1 (Companion hk b2))
-> Sq '(a1, a2) '(b1, b2)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq ((a2 ~> b2) -> Companion hk a2 ~> Companion hk b2
forall {j :: c} {k :: c} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion a2 ~> b2
f (Companion hk a2 ~> Companion hk b2)
-> (a1 ~> b1) -> O (Companion hk a2) a1 ~> O (Companion hk b2) b1
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| a1 ~> b1
p (O (Companion hk a2) a1 ~> O (Companion hk b2) b1)
-> (O (Companion hk b2) b1 ~> O a1 (Companion hk a2))
-> O (Companion hk a2) a1 ~> O a1 (Companion hk a2)
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== O (Companion hk b2) b1 ~> O a1 (Companion hk a2)
O (Companion hk f) p ~> O q (Companion hk g)
sq (O (Companion hk a2) a1 ~> O a1 (Companion hk a2))
-> (O a1 (Companion hk a2) ~> O b1 (Companion hk b2))
-> O (Companion hk a2) a1 ~> O b1 (Companion hk b2)
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== a1 ~> b1
q (a1 ~> b1)
-> (Companion hk a2 ~> Companion hk b2)
-> O a1 (Companion hk a2) ~> O b1 (Companion hk b2)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (a2 ~> b2) -> Companion hk a2 ~> Companion hk b2
forall {j :: c} {k :: c} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion a2 ~> b2
g) ((Ob0 hk j, Ob0 hk h, Ob a1, Ob b1) => Sq c d)
-> (a1 ~> b1) -> Sq c d
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a1 ~> b1
p ((Ob0 hk k, Ob0 hk i, Ob a1, Ob b1) => Sq c d)
-> (a1 ~> b1) -> Sq c d
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a1 ~> b1
q ((Ob0 vk h, Ob0 vk i, Ob a2, Ob b2) => Sq c d)
-> (a2 ~> b2) -> Sq c d
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a2 ~> b2
f ((Ob0 vk j, Ob0 vk k, Ob a2, Ob b2) => Sq c d)
-> (a2 ~> b2) -> Sq c d
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a2 ~> b2
g
(Ob a, Ob b) => r
r \\ :: forall (a :: (hk j h, vk h i)) (b :: (hk k i, vk j k)) r.
((Ob a, Ob b) => r) -> Sq a b -> r
\\ Sq O (Companion hk f) p ~> O q (Companion hk g)
sq = r
(Ob (O (Companion hk f) p), Ob (O q (Companion hk g))) => r
(Ob a, Ob b) => r
r ((Ob (O (Companion hk f) p), Ob (O q (Companion hk g))) => r)
-> (O (Companion hk f) p ~> O q (Companion hk g)) -> r
forall (a :: hk j i) (b :: hk j i) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ O (Companion hk f) p ~> O q (Companion hk g)
sq
object :: (HasCompanions hk vk, Ob0 vk k) => Sq '(I :: hk k k, I :: vk k k) '(I, I)
object :: forall {s} (hk :: CAT s) (vk :: CAT s) (k :: s).
(HasCompanions hk vk, Ob0 vk k) =>
Sq '(I, I) '(I, I)
object = (I ~> I) -> Sq '(I, I) '(I, I)
forall {s} {hk :: s -> s -> Type} {vk :: s -> s -> Type} {j :: s}
{k :: s} (p :: hk j k) (q :: hk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(p ~> q) -> Sq '(p, I) '(q, I)
hArr I ~> I
forall (i :: s). Ob0 hk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj
hArr
:: forall {hk} {vk} {j} {k} (p :: hk j k) q
. (HasCompanions hk vk, Ob0 vk j, Ob0 vk k)
=> p ~> q
-> Sq '(p, I :: vk k k) '(q, I :: vk j j)
hArr :: forall {s} {hk :: s -> s -> Type} {vk :: s -> s -> Type} {j :: s}
{k :: s} (p :: hk j k) (q :: hk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(p ~> q) -> Sq '(p, I) '(q, I)
hArr p ~> q
n =
(O (Companion hk I) p ~> O q (Companion hk I))
-> Sq '(p, I) '(q, I)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq ((I ~> Companion hk I) -> (q ~> q) -> q ~> O q (Companion hk I)
forall {s} {k :: s} (kk :: CAT s) (i :: s) (c :: kk i i)
(a :: kk i k) (b :: kk i k).
Bicategory kk =>
(I ~> c) -> (a ~> b) -> a ~> O b c
rightUnitorInvWith (forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
forall (hk :: CAT s) (vk :: CAT s) (k :: s).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
compFromId @hk @vk) ((p ~> q) -> q ~> q
forall {k1} {k2} (a :: k2) (b :: k1) (p :: PRO k2 k1).
Profunctor p =>
p a b -> Obj b
tgt p ~> q
n) (q ~> O q (Companion hk I))
-> (O (Companion hk I) p ~> q)
-> O (Companion hk I) p ~> O q (Companion hk I)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. p ~> q
n (p ~> q)
-> (O (Companion hk I) p ~> p) -> O (Companion hk I) p ~> q
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Companion hk I ~> I) -> (p ~> p) -> O (Companion hk I) p ~> p
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O c a ~> b
leftUnitorWith (forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
forall (hk :: CAT s) (vk :: CAT s) (k :: s).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
compToId @hk @vk) ((p ~> q) -> p ~> p
forall {k1} {k2} (a :: k2) (b :: k1) (p :: PRO k2 k1).
Profunctor p =>
p a b -> Obj a
src p ~> q
n))
((Ob p, Ob q) => Sq '(p, I) '(q, I))
-> (p ~> q) -> Sq '(p, I) '(q, I)
forall (a :: hk j k) (b :: hk j k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ p ~> q
n
((Ob I, Ob I) => Sq '(p, I) '(q, I))
-> (I ~> I) -> Sq '(p, I) '(q, I)
forall (a :: vk j j) (b :: vk j j) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @vk @j
((Ob I, Ob I) => Sq '(p, I) '(q, I))
-> (I ~> I) -> Sq '(p, I) '(q, I)
forall (a :: vk k k) (b :: vk k k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @vk @k
hId :: (HasCompanions hk vk, Ob0 vk j, Ob0 vk k, Ob (p :: hk k j)) => Sq '(p, I :: vk j j) '(p, I :: vk k k)
hId :: forall {s} (hk :: CAT s) (vk :: CAT s) (j :: s) (k :: s)
(p :: hk k j).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k, Ob p) =>
Sq '(p, I) '(p, I)
hId = (p ~> p) -> Sq '(p, I) '(p, I)
forall {s} {hk :: s -> s -> Type} {vk :: s -> s -> Type} {j :: s}
{k :: s} (p :: hk j k) (q :: hk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(p ~> q) -> Sq '(p, I) '(q, I)
hArr p ~> p
forall (a :: hk k j). Ob a => a ~> a
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
id
compId
:: forall {hk} {vk} {j} {k} f
. (HasCompanions hk vk, Ob0 vk j, Ob0 vk k, Ob (f :: vk j k))
=> Sq '(Companion hk f, I :: vk k k) '(Companion hk f, I :: vk j j)
compId :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k, Ob f) =>
Sq '(Companion hk f, I) '(Companion hk f, I)
compId = (Companion hk f ~> Companion hk f)
-> Sq '(Companion hk f, I) '(Companion hk f, I)
forall {s} {hk :: s -> s -> Type} {vk :: s -> s -> Type} {j :: s}
{k :: s} (p :: hk j k) (q :: hk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(p ~> q) -> Sq '(p, I) '(q, I)
hArr (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk (forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f))
conjId
:: forall {hk} {vk} {j} {k} f
. (Equipment hk vk, Ob0 vk j, Ob0 vk k, Ob (f :: vk j k))
=> Sq '(Conjoint hk f, I :: vk j j) '(Conjoint hk f, I :: vk k k)
conjId :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k).
(Equipment hk vk, Ob0 vk j, Ob0 vk k, Ob f) =>
Sq '(Conjoint hk f, I) '(Conjoint hk f, I)
conjId = (Conjoint hk f ~> Conjoint hk f)
-> Sq '(Conjoint hk f, I) '(Conjoint hk f, I)
forall {s} {hk :: s -> s -> Type} {vk :: s -> s -> Type} {j :: s}
{k :: s} (p :: hk j k) (q :: hk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(p ~> q) -> Sq '(p, I) '(q, I)
hArr (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk (forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f))
vArr
:: forall {hk} {vk} {j} {k} (f :: vk j k) g
. (HasCompanions hk vk, Ob0 vk j, Ob0 vk k)
=> f ~> g
-> Sq '(I :: hk j j, f) '(I :: hk k k, g)
vArr :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k) (g :: vk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(f ~> g) -> Sq '(I, f) '(I, g)
vArr f ~> g
n =
let n' :: Companion hk f ~> Companion hk g
n' = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk @vk f ~> g
n
in (O (Companion hk f) I ~> O I (Companion hk g))
-> Sq '(I, f) '(I, g)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq (Companion hk g ~> O I (Companion hk g)
forall {i :: s} {j :: s} (a :: hk i j).
(Ob0 hk i, Ob0 hk j, Ob a) =>
a ~> O I a
forall {s} (kk :: CAT s) {i :: s} {j :: s} (a :: kk i j).
(Bicategory kk, Ob0 kk i, Ob0 kk j, Ob a) =>
a ~> O I a
leftUnitorInv (Companion hk g ~> O I (Companion hk g))
-> (O (Companion hk f) I ~> Companion hk g)
-> O (Companion hk f) I ~> O I (Companion hk g)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. Companion hk f ~> Companion hk g
n' (Companion hk f ~> Companion hk g)
-> (O (Companion hk f) I ~> Companion hk f)
-> O (Companion hk f) I ~> Companion hk g
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. O (Companion hk f) I ~> Companion hk f
forall {i :: s} {j :: s} (a :: hk i j).
(Ob0 hk i, Ob0 hk j, Ob a) =>
O a I ~> a
forall {s} (kk :: CAT s) {i :: s} {j :: s} (a :: kk i j).
(Bicategory kk, Ob0 kk i, Ob0 kk j, Ob a) =>
O a I ~> a
rightUnitor) ((Ob f, Ob g) => Sq '(I, f) '(I, g))
-> (f ~> g) -> Sq '(I, f) '(I, g)
forall (a :: vk j k) (b :: vk j k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ f ~> g
n ((Ob (Companion hk f), Ob (Companion hk g)) => Sq '(I, f) '(I, g))
-> (Companion hk f ~> Companion hk g) -> Sq '(I, f) '(I, g)
forall (a :: hk j k) (b :: hk j k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ Companion hk f ~> Companion hk g
n' ((Ob I, Ob I) => Sq '(I, f) '(I, g))
-> (I ~> I) -> Sq '(I, f) '(I, g)
forall (a :: hk j j) (b :: hk j j) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @hk @j ((Ob I, Ob I) => Sq '(I, f) '(I, g))
-> (I ~> I) -> Sq '(I, f) '(I, g)
forall (a :: hk k k) (b :: hk k k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @hk @k
vId
:: forall {hk} {vk} {j} {k} (f :: vk j k)
. (HasCompanions hk vk, Ob0 vk j, Ob0 vk k, Ob (f :: vk j k))
=> Sq '(I :: hk j j, f) '(I :: hk k k, f)
vId :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k, Ob f) =>
Sq '(I, f) '(I, f)
vId = (f ~> f) -> Sq '(I, f) '(I, f)
forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k) (g :: vk j k).
(HasCompanions hk vk, Ob0 vk j, Ob0 vk k) =>
(f ~> g) -> Sq '(I, f) '(I, g)
vArr f ~> f
forall (a :: vk j k). Ob a => a ~> a
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
id
(|||)
:: forall {hk} {vk} {h} {l} {m} (p :: hk m l) q r (d :: vk l h) e f g
. (HasCompanions hk vk)
=> Sq '(p, d) '(q, e)
-> Sq '(q, f) '(r, g)
-> Sq '(p, f `O` d) '(r, g `O` e)
Sq O (Companion hk f) p ~> O q (Companion hk g)
sqL ||| :: forall {c} {j :: c} {k :: c} {i :: c} {hk :: c -> c -> Type}
{vk :: c -> c -> Type} {h :: c} {l :: c} {m :: c} (p :: hk m l)
(q :: hk j h) (r :: hk k i) (d :: vk l h) (e :: vk m j)
(f :: vk h i) (g :: vk j k).
HasCompanions hk vk =>
Sq '(p, d) '(q, e)
-> Sq '(q, f) '(r, g) -> Sq '(p, O f d) '(r, O g e)
||| Sq O (Companion hk f) p ~> O q (Companion hk g)
sqR =
( let d :: Obj d
d = forall (a :: vk l h). (CategoryOf (vk l h), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @d
e :: Obj e
e = forall (a :: vk m j). (CategoryOf (vk m j), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @e
f :: Obj f
f = forall (a :: vk h i). (CategoryOf (vk h i), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f
g :: Obj g
g = forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @g
dc :: Companion hk d ~> Companion hk d
dc = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj d
d
ec :: Companion hk e ~> Companion hk e
ec = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj e
e
fc :: Companion hk f ~> Companion hk f
fc = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f
gc :: Companion hk g ~> Companion hk g
gc = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj g
g
in (Obj g
g Obj g -> Obj e -> O g e ~> O g e
forall {i :: c} (j :: c) (k :: c) (a :: vk j k) (b :: vk j k)
(c :: vk i j) (d :: vk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj e
e) (O g e ~> O g e)
-> ((Ob (O g e), Ob (O g e)) => Sq '(p, O f d) '(r, O g e))
-> Sq '(p, O f d) '(r, O g e)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// (Obj f
f Obj f -> Obj d -> O f d ~> O f d
forall {i :: c} (j :: c) (k :: c) (a :: vk j k) (b :: vk j k)
(c :: vk i j) (d :: vk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj d
d) (O f d ~> O f d)
-> ((Ob (O f d), Ob (O f d)) => Sq '(p, O f d) '(r, O g e))
-> Sq '(p, O f d) '(r, O g e)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk d ~> Companion hk d
dc (Companion hk d ~> Companion hk d)
-> ((Ob (Companion hk d), Ob (Companion hk d)) =>
Sq '(p, O f d) '(r, O g e))
-> Sq '(p, O f d) '(r, O g e)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk e ~> Companion hk e
ec (Companion hk e ~> Companion hk e)
-> ((Ob (Companion hk e), Ob (Companion hk e)) =>
Sq '(p, O f d) '(r, O g e))
-> Sq '(p, O f d) '(r, O g e)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk f ~> Companion hk f
fc (Companion hk f ~> Companion hk f)
-> ((Ob (Companion hk f), Ob (Companion hk f)) =>
Sq '(p, O f d) '(r, O g e))
-> Sq '(p, O f d) '(r, O g e)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk g ~> Companion hk g
gc (Companion hk g ~> Companion hk g)
-> ((Ob (Companion hk g), Ob (Companion hk g)) =>
Sq '(p, O f d) '(r, O g e))
-> Sq '(p, O f d) '(r, O g e)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// (O (Companion hk (O f d)) p ~> O r (Companion hk (O g e)))
-> Sq '(p, O f d) '(r, O g e)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq ((O (Companion hk (O f d)) p ~> O r (Companion hk (O g e)))
-> Sq '(p, O f d) '(r, O g e))
-> (O (Companion hk (O f d)) p ~> O r (Companion hk (O g e)))
-> Sq '(p, O f d) '(r, O g e)
forall a b. (a -> b) -> a -> b
$
(forall (a :: hk k i). (CategoryOf (hk k i), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @r Obj r
-> (O (Companion hk g) (Companion hk e) ~> Companion hk (O g e))
-> O r (O (Companion hk g) (Companion hk e))
~> O r (Companion hk (O g e))
forall {i :: c} (j :: c) (k :: c) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj g
-> Obj e
-> O (Companion hk g) (Companion hk e) ~> Companion hk (O g e)
forall {j :: c} {j :: c} {k :: c} (f :: vk j k) (g :: vk j j).
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk j j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
compFromCompose Obj g
g Obj e
e)
(O r (O (Companion hk g) (Companion hk e))
~> O r (Companion hk (O g e)))
-> (O (Companion hk (O f d)) p
~> O r (O (Companion hk g) (Companion hk e)))
-> O (Companion hk (O f d)) p ~> O r (Companion hk (O g e))
forall (b :: hk m i) (c :: hk m i) (a :: hk m i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {s} (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O (O a b) c ~> O a (O b c)
forall (kk :: CAT c) {h :: c} {i :: c} {j :: c} {k :: c}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O (O a b) c ~> O a (O b c)
associator @_ @r @(Companion hk g) @(Companion hk e)
(O (O r (Companion hk g)) (Companion hk e)
~> O r (O (Companion hk g) (Companion hk e)))
-> (O (Companion hk (O f d)) p
~> O (O r (Companion hk g)) (Companion hk e))
-> O (Companion hk (O f d)) p
~> O r (O (Companion hk g) (Companion hk e))
forall (b :: hk m i) (c :: hk m i) (a :: hk m i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (O (Companion hk f) q ~> O r (Companion hk g)
O (Companion hk f) p ~> O q (Companion hk g)
sqR (O (Companion hk f) q ~> O r (Companion hk g))
-> (Companion hk e ~> Companion hk e)
-> O (O (Companion hk f) q) (Companion hk e)
~> O (O r (Companion hk g)) (Companion hk e)
forall {i :: c} (j :: c) (k :: c) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` forall (a :: hk m j). (CategoryOf (hk m j), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @(Companion hk e))
(O (O (Companion hk f) q) (Companion hk e)
~> O (O r (Companion hk g)) (Companion hk e))
-> (O (Companion hk (O f d)) p
~> O (O (Companion hk f) q) (Companion hk e))
-> O (Companion hk (O f d)) p
~> O (O r (Companion hk g)) (Companion hk e)
forall (b :: hk m i) (c :: hk m i) (a :: hk m i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {s} (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O a (O b c) ~> O (O a b) c
forall (kk :: CAT c) {h :: c} {i :: c} {j :: c} {k :: c}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O a (O b c) ~> O (O a b) c
associatorInv @_ @(Companion hk f) @q @(Companion hk e)
(O (Companion hk f) (O q (Companion hk e))
~> O (O (Companion hk f) q) (Companion hk e))
-> (O (Companion hk (O f d)) p
~> O (Companion hk f) (O q (Companion hk e)))
-> O (Companion hk (O f d)) p
~> O (O (Companion hk f) q) (Companion hk e)
forall (b :: hk m i) (c :: hk m i) (a :: hk m i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (forall (a :: hk h i). (CategoryOf (hk h i), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @(Companion hk f) (Companion hk f ~> Companion hk f)
-> (O (Companion hk d) p ~> O q (Companion hk e))
-> O (Companion hk f) (O (Companion hk d) p)
~> O (Companion hk f) (O q (Companion hk e))
forall {i :: c} (j :: c) (k :: c) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` O (Companion hk d) p ~> O q (Companion hk e)
O (Companion hk f) p ~> O q (Companion hk g)
sqL)
(O (Companion hk f) (O (Companion hk d) p)
~> O (Companion hk f) (O q (Companion hk e)))
-> (O (Companion hk (O f d)) p
~> O (Companion hk f) (O (Companion hk d) p))
-> O (Companion hk (O f d)) p
~> O (Companion hk f) (O q (Companion hk e))
forall (b :: hk m i) (c :: hk m i) (a :: hk m i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {s} (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O (O a b) c ~> O a (O b c)
forall (kk :: CAT c) {h :: c} {i :: c} {j :: c} {k :: c}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O (O a b) c ~> O a (O b c)
associator @_ @(Companion hk f) @(Companion hk d) @p
(O (O (Companion hk f) (Companion hk d)) p
~> O (Companion hk f) (O (Companion hk d) p))
-> (O (Companion hk (O f d)) p
~> O (O (Companion hk f) (Companion hk d)) p)
-> O (Companion hk (O f d)) p
~> O (Companion hk f) (O (Companion hk d) p)
forall (b :: hk m i) (c :: hk m i) (a :: hk m i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Obj f
-> Obj d
-> Companion hk (O f d) ~> O (Companion hk f) (Companion hk d)
forall {i :: c} {j :: c} {k :: c} (f :: vk j k) (g :: vk i j).
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
forall {c} (hk :: CAT c) (vk :: CAT c) {i :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk i j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
compToCompose Obj f
f Obj d
d (Companion hk (O f d) ~> O (Companion hk f) (Companion hk d))
-> (p ~> p)
-> O (Companion hk (O f d)) p
~> O (O (Companion hk f) (Companion hk d)) p
forall {i :: c} (j :: c) (k :: c) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` forall (a :: hk m l). (CategoryOf (hk m l), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @p)
)
((Ob0 hk m, Ob0 hk h, Ob (O (Companion hk d) p),
Ob (O q (Companion hk e))) =>
Sq '(p, O f d) '(r, O g e))
-> (O (Companion hk d) p ~> O q (Companion hk e))
-> Sq '(p, O f d) '(r, O g e)
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Companion hk d) p ~> O q (Companion hk e)
O (Companion hk f) p ~> O q (Companion hk g)
sqL
((Ob0 hk j, Ob0 hk i, Ob (O (Companion hk f) q),
Ob (O r (Companion hk g))) =>
Sq '(p, O f d) '(r, O g e))
-> (O (Companion hk f) q ~> O r (Companion hk g))
-> Sq '(p, O f d) '(r, O g e)
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Companion hk f) q ~> O r (Companion hk g)
O (Companion hk f) p ~> O q (Companion hk g)
sqR
(===)
:: forall {hk} {vk} {h} {i} {j} {l} (p :: hk l j) q r s (e :: vk h i) f g
. (HasCompanions hk vk)
=> Sq '(r, e) '(s, f)
-> Sq '(p, f) '(q, g)
-> Sq '(r `O` p, e) '(s `O` q, g)
Sq O (Companion hk f) p ~> O q (Companion hk g)
sqL === :: forall {s} {k :: s} {j :: s} {hk :: s -> s -> Type}
{vk :: s -> s -> Type} {h :: s} {i :: s} {j :: s} {l :: s}
(p :: hk l j) (q :: hk k j) (r :: hk j h) (s :: hk j i)
(e :: vk h i) (f :: vk j j) (g :: vk l k).
HasCompanions hk vk =>
Sq '(r, e) '(s, f)
-> Sq '(p, f) '(q, g) -> Sq '(O r p, e) '(O s q, g)
=== Sq O (Companion hk f) p ~> O q (Companion hk g)
sqR =
( let p :: Obj p
p = forall (a :: hk l j). (CategoryOf (hk l j), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @p
q :: Obj q
q = forall (a :: hk k j). (CategoryOf (hk k j), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @q
r :: Obj r
r = forall (a :: hk j h). (CategoryOf (hk j h), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @r
s :: Obj s
s = forall (a :: hk j i). (CategoryOf (hk j i), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @s
ec :: Companion hk e ~> Companion hk e
ec = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk (forall (a :: vk h i). (CategoryOf (vk h i), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @e)
fc :: Companion hk f ~> Companion hk f
fc = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk (forall (a :: vk j j). (CategoryOf (vk j j), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f)
gc :: Companion hk g ~> Companion hk g
gc = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk (forall (a :: vk l k). (CategoryOf (vk l k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @g)
in (Obj r
r Obj r -> Obj p -> O r p ~> O r p
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj p
p) (O r p ~> O r p)
-> ((Ob (O r p), Ob (O r p)) => Sq '(O r p, e) '(O s q, g))
-> Sq '(O r p, e) '(O s q, g)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// (Obj s
s Obj s -> Obj q -> O s q ~> O s q
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj q
q) (O s q ~> O s q)
-> ((Ob (O s q), Ob (O s q)) => Sq '(O r p, e) '(O s q, g))
-> Sq '(O r p, e) '(O s q, g)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk e ~> Companion hk e
ec (Companion hk e ~> Companion hk e)
-> ((Ob (Companion hk e), Ob (Companion hk e)) =>
Sq '(O r p, e) '(O s q, g))
-> Sq '(O r p, e) '(O s q, g)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk f ~> Companion hk f
fc (Companion hk f ~> Companion hk f)
-> ((Ob (Companion hk f), Ob (Companion hk f)) =>
Sq '(O r p, e) '(O s q, g))
-> Sq '(O r p, e) '(O s q, g)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// Companion hk g ~> Companion hk g
gc (Companion hk g ~> Companion hk g)
-> ((Ob (Companion hk g), Ob (Companion hk g)) =>
Sq '(O r p, e) '(O s q, g))
-> Sq '(O r p, e) '(O s q, g)
forall {k1} {k2} (p :: PRO k1 k2) (a :: k1) (b :: k2) r.
Profunctor p =>
p a b -> ((Ob a, Ob b) => r) -> r
// (O (Companion hk e) (O r p) ~> O (O s q) (Companion hk g))
-> Sq '(O r p, e) '(O s q, g)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq ((O (Companion hk e) (O r p) ~> O (O s q) (Companion hk g))
-> Sq '(O r p, e) '(O s q, g))
-> (O (Companion hk e) (O r p) ~> O (O s q) (Companion hk g))
-> Sq '(O r p, e) '(O s q, g)
forall a b. (a -> b) -> a -> b
$
forall {s} (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O a (O b c) ~> O (O a b) c
forall (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O a (O b c) ~> O (O a b) c
associatorInv @_ @s @q @(Companion hk g)
(O s (O q (Companion hk g)) ~> O (O s q) (Companion hk g))
-> (O (Companion hk e) (O r p) ~> O s (O q (Companion hk g)))
-> O (Companion hk e) (O r p) ~> O (O s q) (Companion hk g)
forall (b :: hk l i) (c :: hk l i) (a :: hk l i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Obj s
s Obj s
-> (O (Companion hk f) p ~> O q (Companion hk g))
-> O s (O (Companion hk f) p) ~> O s (O q (Companion hk g))
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` O (Companion hk f) p ~> O q (Companion hk g)
O (Companion hk f) p ~> O q (Companion hk g)
sqR)
(O s (O (Companion hk f) p) ~> O s (O q (Companion hk g)))
-> (O (Companion hk e) (O r p) ~> O s (O (Companion hk f) p))
-> O (Companion hk e) (O r p) ~> O s (O q (Companion hk g))
forall (b :: hk l i) (c :: hk l i) (a :: hk l i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {s} (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O (O a b) c ~> O a (O b c)
forall (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O (O a b) c ~> O a (O b c)
associator @_ @s @(Companion hk f) @p
(O (O s (Companion hk f)) p ~> O s (O (Companion hk f) p))
-> (O (Companion hk e) (O r p) ~> O (O s (Companion hk f)) p)
-> O (Companion hk e) (O r p) ~> O s (O (Companion hk f) p)
forall (b :: hk l i) (c :: hk l i) (a :: hk l i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (O (Companion hk e) r ~> O s (Companion hk f)
O (Companion hk f) p ~> O q (Companion hk g)
sqL (O (Companion hk e) r ~> O s (Companion hk f))
-> Obj p
-> O (O (Companion hk e) r) p ~> O (O s (Companion hk f)) p
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj p
p)
(O (O (Companion hk e) r) p ~> O (O s (Companion hk f)) p)
-> (O (Companion hk e) (O r p) ~> O (O (Companion hk e) r) p)
-> O (Companion hk e) (O r p) ~> O (O s (Companion hk f)) p
forall (b :: hk l i) (c :: hk l i) (a :: hk l i).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {s} (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O a (O b c) ~> O (O a b) c
forall (kk :: CAT s) {h :: s} {i :: s} {j :: s} {k :: s}
(a :: kk j k) (b :: kk i j) (c :: kk h i).
(Bicategory kk, Ob0 kk h, Ob0 kk i, Ob0 kk j, Ob0 kk k, Ob a, Ob b,
Ob c) =>
O a (O b c) ~> O (O a b) c
associatorInv @_ @(Companion hk e) @r @p
)
((Ob0 hk j, Ob0 hk i, Ob (O (Companion hk e) r),
Ob (O s (Companion hk f))) =>
Sq '(O r p, e) '(O s q, g))
-> (O (Companion hk e) r ~> O s (Companion hk f))
-> Sq '(O r p, e) '(O s q, g)
forall (i :: s) (j :: s) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Companion hk e) r ~> O s (Companion hk f)
O (Companion hk f) p ~> O q (Companion hk g)
sqL
((Ob0 hk l, Ob0 hk j, Ob (O (Companion hk f) p),
Ob (O q (Companion hk g))) =>
Sq '(O r p, e) '(O s q, g))
-> (O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(O r p, e) '(O s q, g)
forall (i :: s) (j :: s) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Companion hk f) p ~> O q (Companion hk g)
O (Companion hk f) p ~> O q (Companion hk g)
sqR
toRight
:: forall {hk} {vk} {j} {k} f
. (HasCompanions hk vk, Ob' (f :: vk j k))
=> Sq '(I :: hk j j, f) '(Companion hk f, I :: vk j j)
toRight :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k).
(HasCompanions hk vk, Ob' f) =>
Sq '(I, f) '(Companion hk f, I)
toRight = let comp :: Companion hk f ~> Companion hk f
comp = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk @vk (forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f) in (O (Companion hk f) I ~> O (Companion hk f) (Companion hk I))
-> Sq '(I, f) '(Companion hk f, I)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq (Companion hk f ~> Companion hk f
comp (Companion hk f ~> Companion hk f)
-> (I ~> Companion hk I)
-> O (Companion hk f) I ~> O (Companion hk f) (Companion hk I)
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` I ~> Companion hk I
forall (k :: s). Ob0 vk k => I ~> Companion hk I
forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
compFromId) ((Ob (Companion hk f), Ob (Companion hk f)) =>
Sq '(I, f) '(Companion hk f, I))
-> (Companion hk f ~> Companion hk f)
-> Sq '(I, f) '(Companion hk f, I)
forall (a :: hk j k) (b :: hk j k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ Companion hk f ~> Companion hk f
comp ((Ob I, Ob I) => Sq '(I, f) '(Companion hk f, I))
-> (I ~> I) -> Sq '(I, f) '(Companion hk f, I)
forall (a :: hk j j) (b :: hk j j) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @hk @j ((Ob I, Ob I) => Sq '(I, f) '(Companion hk f, I))
-> (I ~> I) -> Sq '(I, f) '(Companion hk f, I)
forall (a :: vk j j) (b :: vk j j) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @vk @j
fromLeft
:: forall {hk} {vk} {j} {k} f
. (HasCompanions hk vk, Ob' (f :: vk j k))
=> Sq '(Companion hk f, I :: vk k k) '(I :: hk k k, f)
fromLeft :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k).
(HasCompanions hk vk, Ob' f) =>
Sq '(Companion hk f, I) '(I, f)
fromLeft = let comp :: Companion hk f ~> Companion hk f
comp = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk @vk (forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f) in (O (Companion hk I) (Companion hk f) ~> O I (Companion hk f))
-> Sq '(Companion hk f, I) '(I, f)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq (Companion hk I ~> I
forall (k :: s). Ob0 vk k => Companion hk I ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
compToId (Companion hk I ~> I)
-> (Companion hk f ~> Companion hk f)
-> O (Companion hk I) (Companion hk f) ~> O I (Companion hk f)
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Companion hk f ~> Companion hk f
comp) ((Ob (Companion hk f), Ob (Companion hk f)) =>
Sq '(Companion hk f, I) '(I, f))
-> (Companion hk f ~> Companion hk f)
-> Sq '(Companion hk f, I) '(I, f)
forall (a :: hk j k) (b :: hk j k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ Companion hk f ~> Companion hk f
comp ((Ob I, Ob I) => Sq '(Companion hk f, I) '(I, f))
-> (I ~> I) -> Sq '(Companion hk f, I) '(I, f)
forall (a :: hk k k) (b :: hk k k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @hk @k ((Ob I, Ob I) => Sq '(Companion hk f, I) '(I, f))
-> (I ~> I) -> Sq '(Companion hk f, I) '(I, f)
forall (a :: vk k k) (b :: vk k k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @vk @k
fromRight
:: forall {hk} {vk} {j} {k} (f :: vk j k)
. (Equipment hk vk, Ob0 vk j, Ob0 vk k, Ob f)
=> Sq '(I :: hk j j, I :: vk j j) '(Conjoint hk f, f)
fromRight :: forall {c} {hk :: CAT c} {vk :: CAT c} {j :: c} {k :: c}
(f :: vk j k).
(Equipment hk vk, Ob0 vk j, Ob0 vk k, Ob f) =>
Sq '(I, I) '(Conjoint hk f, f)
fromRight =
let f :: Obj f
f = forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f
in (O (Companion hk I) I ~> O (Conjoint hk f) (Companion hk f))
-> Sq '(I, I) '(Conjoint hk f, f)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit @hk @vk Obj f
f (I ~> O (Conjoint hk f) (Companion hk f))
-> (O (Companion hk I) I ~> I)
-> O (Companion hk I) I ~> O (Conjoint hk f) (Companion hk f)
forall (b :: hk j j) (c :: hk j j) (a :: hk j j).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Companion hk I ~> I) -> (I ~> I) -> O (Companion hk I) I ~> I
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O c a ~> b
leftUnitorWith (forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
forall (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
compToId @hk @vk) I ~> I
forall (i :: c). Ob0 hk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj)
((Ob0 hk k, Ob0 hk j, Ob (Conjoint hk f), Ob (Conjoint hk f)) =>
Sq '(I, I) '(Conjoint hk f, f))
-> (Conjoint hk f ~> Conjoint hk f)
-> Sq '(I, I) '(Conjoint hk f, f)
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk @vk Obj f
f
((Ob I, Ob I) => Sq '(I, I) '(Conjoint hk f, f))
-> (I ~> I) -> Sq '(I, I) '(Conjoint hk f, f)
forall (a :: hk j j) (b :: hk j j) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT c) (i :: c). (Bicategory kk, Ob0 kk i) => Obj I
iObj @hk @j
((Ob I, Ob I) => Sq '(I, I) '(Conjoint hk f, f))
-> (I ~> I) -> Sq '(I, I) '(Conjoint hk f, f)
forall (a :: vk j j) (b :: vk j j) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT c) (i :: c). (Bicategory kk, Ob0 kk i) => Obj I
iObj @vk @j
toLeft
:: forall {hk} {vk} {j} {k} (f :: vk j k)
. (Equipment hk vk, Ob0 vk j, Ob0 vk k, Ob (f :: vk j k))
=> Sq '(Conjoint hk f, f) '(I :: hk k k, I :: vk k k)
toLeft :: forall {s} {hk :: CAT s} {vk :: CAT s} {j :: s} {k :: s}
(f :: vk j k).
(Equipment hk vk, Ob0 vk j, Ob0 vk k, Ob f) =>
Sq '(Conjoint hk f, f) '(I, I)
toLeft =
let f :: Obj f
f = forall (a :: vk j k). (CategoryOf (vk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @f
in (O (Companion hk f) (Conjoint hk f) ~> O I (Companion hk I))
-> Sq '(Conjoint hk f, f) '(I, I)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq ((I ~> Companion hk I) -> (I ~> I) -> I ~> O I (Companion hk I)
forall {s} {k :: s} (kk :: CAT s) (i :: s) (c :: kk i i)
(a :: kk i k) (b :: kk i k).
Bicategory kk =>
(I ~> c) -> (a ~> b) -> a ~> O b c
rightUnitorInvWith (forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
forall (hk :: CAT s) (vk :: CAT s) (k :: s).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
compFromId @hk @vk) I ~> I
forall (i :: s). Ob0 hk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj (I ~> O I (Companion hk I))
-> (O (Companion hk f) (Conjoint hk f) ~> I)
-> O (Companion hk f) (Conjoint hk f) ~> O I (Companion hk I)
forall (b :: hk k k) (c :: hk k k) (a :: hk k k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit @hk @vk Obj f
f)
((Ob0 hk k, Ob0 hk j, Ob (Conjoint hk f), Ob (Conjoint hk f)) =>
Sq '(Conjoint hk f, f) '(I, I))
-> (Conjoint hk f ~> Conjoint hk f)
-> Sq '(Conjoint hk f, f) '(I, I)
forall (i :: s) (j :: s) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk @vk Obj f
f
((Ob I, Ob I) => Sq '(Conjoint hk f, f) '(I, I))
-> (I ~> I) -> Sq '(Conjoint hk f, f) '(I, I)
forall (a :: hk k k) (b :: hk k k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @hk @k
((Ob I, Ob I) => Sq '(Conjoint hk f, f) '(I, I))
-> (I ~> I) -> Sq '(Conjoint hk f, f) '(I, I)
forall (a :: vk k k) (b :: vk k k) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
forall (kk :: CAT s) (i :: s). (Bicategory kk, Ob0 kk i) => Obj I
iObj @vk @k
flipCompanion
:: forall {j} {k} hk vk (f :: vk j k) p q
. (Equipment hk vk, Ob p)
=> Obj f
-> Companion hk f `O` p ~> q
-> p ~> Conjoint hk f `O` q
flipCompanion :: forall {s} {i :: s} {j :: s} {k :: s} (hk :: CAT s) (vk :: CAT s)
(f :: vk j k) (p :: hk i j) (q :: hk i k).
(Equipment hk vk, Ob p) =>
Obj f -> (O (Companion hk f) p ~> q) -> p ~> O (Conjoint hk f) q
flipCompanion Obj f
f O (Companion hk f) p ~> q
n =
let comF :: Companion hk f ~> Companion hk f
comF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f; conF :: Conjoint hk f ~> Conjoint hk f
conF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj f
f
in ((Conjoint hk f ~> Conjoint hk f
conF (Conjoint hk f ~> Conjoint hk f)
-> (O (Companion hk f) p ~> q)
-> O (Conjoint hk f) (O (Companion hk f) p) ~> O (Conjoint hk f) q
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` O (Companion hk f) p ~> q
n) (O (Conjoint hk f) (O (Companion hk f) p) ~> O (Conjoint hk f) q)
-> (p ~> O (Conjoint hk f) (O (Companion hk f) p))
-> p ~> O (Conjoint hk f) q
forall (b :: hk i j) (c :: hk i j) (a :: hk i j).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Conjoint hk f ~> Conjoint hk f)
-> (Companion hk f ~> Companion hk f)
-> Obj p
-> O (O (Conjoint hk f) (Companion hk f)) p
~> O (Conjoint hk f) (O (Companion hk f) p)
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O (O a b) c ~> O a (O b c)
associator' Conjoint hk f ~> Conjoint hk f
conF Companion hk f ~> Companion hk f
comF (forall (a :: hk i j). (CategoryOf (hk i j), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @p) (O (O (Conjoint hk f) (Companion hk f)) p
~> O (Conjoint hk f) (O (Companion hk f) p))
-> (p ~> O (O (Conjoint hk f) (Companion hk f)) p)
-> p ~> O (Conjoint hk f) (O (Companion hk f) p)
forall (b :: hk i j) (c :: hk i j) (a :: hk i j).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (I ~> O (Conjoint hk f) (Companion hk f))
-> Obj p -> p ~> O (O (Conjoint hk f) (Companion hk f)) p
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(I ~> c) -> (a ~> b) -> a ~> O c b
leftUnitorInvWith (Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {j :: s} {k :: s} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit Obj f
f) Obj p
forall (a :: hk i j). Ob a => a ~> a
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
id) ((Ob0 hk i, Ob0 hk k, Ob (O (Companion hk f) p), Ob q) =>
p ~> O (Conjoint hk f) q)
-> (O (Companion hk f) p ~> q) -> p ~> O (Conjoint hk f) q
forall (i :: s) (j :: s) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Companion hk f) p ~> q
n ((Ob0 vk j, Ob0 vk k, Ob f, Ob f) => p ~> O (Conjoint hk f) q)
-> Obj f -> p ~> O (Conjoint hk f) q
forall (i :: s) (j :: s) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
flipCompanionInv
:: forall {j} {k} hk vk (f :: vk j k) p q
. (Equipment hk vk, Ob q)
=> Obj f
-> p ~> Conjoint hk f `O` q
-> Companion hk f `O` p ~> q
flipCompanionInv :: forall {s} {i :: s} {j :: s} {k :: s} (hk :: CAT s) (vk :: CAT s)
(f :: vk j k) (p :: hk i j) (q :: hk i k).
(Equipment hk vk, Ob q) =>
Obj f -> (p ~> O (Conjoint hk f) q) -> O (Companion hk f) p ~> q
flipCompanionInv Obj f
f p ~> O (Conjoint hk f) q
n =
let comF :: Companion hk f ~> Companion hk f
comF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f; conF :: Conjoint hk f ~> Conjoint hk f
conF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT s) (vk :: CAT s) {j :: s} {k :: s} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj f
f
in ((O (Companion hk f) (Conjoint hk f) ~> I)
-> (q ~> q) -> O (O (Companion hk f) (Conjoint hk f)) q ~> q
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O c a ~> b
leftUnitorWith (Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {j :: s} {k :: s} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj f
f) q ~> q
forall (a :: hk i k). Ob a => a ~> a
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
id (O (O (Companion hk f) (Conjoint hk f)) q ~> q)
-> (O (Companion hk f) p
~> O (O (Companion hk f) (Conjoint hk f)) q)
-> O (Companion hk f) p ~> q
forall (b :: hk i k) (c :: hk i k) (a :: hk i k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Companion hk f ~> Companion hk f)
-> (Conjoint hk f ~> Conjoint hk f)
-> (q ~> q)
-> O (Companion hk f) (O (Conjoint hk f) q)
~> O (O (Companion hk f) (Conjoint hk f)) q
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O a (O b c) ~> O (O a b) c
associatorInv' Companion hk f ~> Companion hk f
comF Conjoint hk f ~> Conjoint hk f
conF (forall (a :: hk i k). (CategoryOf (hk i k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @q) (O (Companion hk f) (O (Conjoint hk f) q)
~> O (O (Companion hk f) (Conjoint hk f)) q)
-> (O (Companion hk f) p
~> O (Companion hk f) (O (Conjoint hk f) q))
-> O (Companion hk f) p ~> O (O (Companion hk f) (Conjoint hk f)) q
forall (b :: hk i k) (c :: hk i k) (a :: hk i k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Companion hk f ~> Companion hk f
comF (Companion hk f ~> Companion hk f)
-> (p ~> O (Conjoint hk f) q)
-> O (Companion hk f) p ~> O (Companion hk f) (O (Conjoint hk f) q)
forall {i :: s} (j :: s) (k :: s) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` p ~> O (Conjoint hk f) q
n)) ((Ob0 hk i, Ob0 hk j, Ob p, Ob (O (Conjoint hk f) q)) =>
O (Companion hk f) p ~> q)
-> (p ~> O (Conjoint hk f) q) -> O (Companion hk f) p ~> q
forall (i :: s) (j :: s) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ p ~> O (Conjoint hk f) q
n ((Ob0 vk j, Ob0 vk k, Ob f, Ob f) => O (Companion hk f) p ~> q)
-> Obj f -> O (Companion hk f) p ~> q
forall (i :: s) (j :: s) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
flipConjoint
:: forall {j} {k} hk vk (f :: vk j k) p q
. (Equipment hk vk, Ob p)
=> Obj f
-> p `O` Conjoint hk f ~> q
-> p ~> q `O` Companion hk f
flipConjoint :: forall {c} {k :: c} {j :: c} {k :: c} (hk :: CAT c) (vk :: CAT c)
(f :: vk j k) (p :: hk j k) (q :: hk k k).
(Equipment hk vk, Ob p) =>
Obj f -> (O p (Conjoint hk f) ~> q) -> p ~> O q (Companion hk f)
flipConjoint Obj f
f O p (Conjoint hk f) ~> q
n =
let comF :: Companion hk f ~> Companion hk f
comF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f; conF :: Conjoint hk f ~> Conjoint hk f
conF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj f
f
in ((O p (Conjoint hk f) ~> q
n (O p (Conjoint hk f) ~> q)
-> (Companion hk f ~> Companion hk f)
-> O (O p (Conjoint hk f)) (Companion hk f) ~> O q (Companion hk f)
forall {i :: c} (j :: c) (k :: c) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Companion hk f ~> Companion hk f
comF) (O (O p (Conjoint hk f)) (Companion hk f) ~> O q (Companion hk f))
-> (p ~> O (O p (Conjoint hk f)) (Companion hk f))
-> p ~> O q (Companion hk f)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. Obj p
-> (Conjoint hk f ~> Conjoint hk f)
-> (Companion hk f ~> Companion hk f)
-> O p (O (Conjoint hk f) (Companion hk f))
~> O (O p (Conjoint hk f)) (Companion hk f)
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O a (O b c) ~> O (O a b) c
associatorInv' (forall (a :: hk j k). (CategoryOf (hk j k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @p) Conjoint hk f ~> Conjoint hk f
conF Companion hk f ~> Companion hk f
comF (O p (O (Conjoint hk f) (Companion hk f))
~> O (O p (Conjoint hk f)) (Companion hk f))
-> (p ~> O p (O (Conjoint hk f) (Companion hk f)))
-> p ~> O (O p (Conjoint hk f)) (Companion hk f)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (I ~> O (Conjoint hk f) (Companion hk f))
-> Obj p -> p ~> O p (O (Conjoint hk f) (Companion hk f))
forall {s} {k :: s} (kk :: CAT s) (i :: s) (c :: kk i i)
(a :: kk i k) (b :: kk i k).
Bicategory kk =>
(I ~> c) -> (a ~> b) -> a ~> O b c
rightUnitorInvWith (Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit Obj f
f) Obj p
forall (a :: hk j k). Ob a => a ~> a
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
id) ((Ob0 hk k, Ob0 hk k, Ob (O p (Conjoint hk f)), Ob q) =>
p ~> O q (Companion hk f))
-> (O p (Conjoint hk f) ~> q) -> p ~> O q (Companion hk f)
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O p (Conjoint hk f) ~> q
n ((Ob0 vk j, Ob0 vk k, Ob f, Ob f) => p ~> O q (Companion hk f))
-> Obj f -> p ~> O q (Companion hk f)
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
flipConjointInv
:: forall {j} {k} hk vk (f :: vk j k) p q
. (Equipment hk vk, Ob q)
=> Obj f
-> p ~> q `O` Companion hk f
-> p `O` Conjoint hk f ~> q
flipConjointInv :: forall {c} {k :: c} {j :: c} {k :: c} (hk :: CAT c) (vk :: CAT c)
(f :: vk j k) (p :: hk j k) (q :: hk k k).
(Equipment hk vk, Ob q) =>
Obj f -> (p ~> O q (Companion hk f)) -> O p (Conjoint hk f) ~> q
flipConjointInv Obj f
f p ~> O q (Companion hk f)
n =
let comF :: Companion hk f ~> Companion hk f
comF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj f
f; conF :: Conjoint hk f ~> Conjoint hk f
conF = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj f
f
in ((O (Companion hk f) (Conjoint hk f) ~> I)
-> (q ~> q) -> O q (O (Companion hk f) (Conjoint hk f)) ~> q
forall {s} {k :: s} (kk :: CAT s) (i :: s) (c :: kk i i)
(a :: kk i k) (b :: kk i k).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O a c ~> b
rightUnitorWith (Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {j :: c} {k :: c} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj f
f) q ~> q
forall (a :: hk k k). Ob a => a ~> a
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
id (O q (O (Companion hk f) (Conjoint hk f)) ~> q)
-> (O p (Conjoint hk f)
~> O q (O (Companion hk f) (Conjoint hk f)))
-> O p (Conjoint hk f) ~> q
forall (b :: hk k k) (c :: hk k k) (a :: hk k k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (q ~> q)
-> (Companion hk f ~> Companion hk f)
-> (Conjoint hk f ~> Conjoint hk f)
-> O (O q (Companion hk f)) (Conjoint hk f)
~> O q (O (Companion hk f) (Conjoint hk f))
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O (O a b) c ~> O a (O b c)
associator' (forall (a :: hk k k). (CategoryOf (hk k k), Ob a) => Obj a
forall {k} (a :: k). (CategoryOf k, Ob a) => Obj a
obj @q) Companion hk f ~> Companion hk f
comF Conjoint hk f ~> Conjoint hk f
conF (O (O q (Companion hk f)) (Conjoint hk f)
~> O q (O (Companion hk f) (Conjoint hk f)))
-> (O p (Conjoint hk f)
~> O (O q (Companion hk f)) (Conjoint hk f))
-> O p (Conjoint hk f) ~> O q (O (Companion hk f) (Conjoint hk f))
forall (b :: hk k k) (c :: hk k k) (a :: hk k k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (p ~> O q (Companion hk f)
n (p ~> O q (Companion hk f))
-> (Conjoint hk f ~> Conjoint hk f)
-> O p (Conjoint hk f) ~> O (O q (Companion hk f)) (Conjoint hk f)
forall {i :: c} (j :: c) (k :: c) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Conjoint hk f ~> Conjoint hk f
conF)) ((Ob0 hk j, Ob0 hk k, Ob p, Ob (O q (Companion hk f))) =>
O p (Conjoint hk f) ~> q)
-> (p ~> O q (Companion hk f)) -> O p (Conjoint hk f) ~> q
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ p ~> O q (Companion hk f)
n ((Ob0 vk j, Ob0 vk k, Ob f, Ob f) => O p (Conjoint hk f) ~> q)
-> Obj f -> O p (Conjoint hk f) ~> q
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Obj f
f
type RetroSq :: forall {c} {hk :: CAT c} {vk :: CAT c} {h} {i} {j} {k}. (hk j h, vk h i) +-> (hk k i, vk j k)
data RetroSq pf qg where
RetroSq
:: forall {hk} {vk} {h} {i} {j} {k} (p :: hk j h) (q :: hk k i) (f :: vk h i) (g :: vk j k)
. (Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g)
=> (q `O` Companion hk g) ~> Companion hk f `O` p
-> RetroSq '(q, g) '(p, f)
instance
(HasCompanions hk vk, Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k)
=> Profunctor (RetroSq :: (hk j h, vk h i) +-> (hk k i, vk j k))
where
dimap :: forall (c :: (hk k i, vk j k)) (a :: (hk k i, vk j k))
(b :: (hk j h, vk h i)) (d :: (hk j h, vk h i)).
(c ~> a) -> (b ~> d) -> RetroSq a b -> RetroSq c d
dimap (a1 ~> b1
q :**: a2 ~> b2
f) (a1 ~> b1
p :**: a2 ~> b2
g) (RetroSq O q (Companion hk g) ~> O (Companion hk f) p
sq) = (O a1 (Companion hk a2) ~> O (Companion hk b2) b1)
-> RetroSq '(a1, a2) '(b1, b2)
forall {s} {hk :: s -> s -> Type} {vk :: s -> s -> Type} {h :: s}
{i :: s} {j :: s} {k :: s} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O q (Companion hk g) ~> O (Companion hk f) p)
-> RetroSq '(q, g) '(p, f)
RetroSq (a1 ~> b1
q (a1 ~> b1)
-> (Companion hk a2 ~> Companion hk b2)
-> O a1 (Companion hk a2) ~> O b1 (Companion hk b2)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (a2 ~> b2) -> Companion hk a2 ~> Companion hk b2
forall {j :: c} {k :: c} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion a2 ~> b2
f (O a1 (Companion hk a2) ~> O b1 (Companion hk b2))
-> (O b1 (Companion hk b2) ~> O (Companion hk a2) a1)
-> O a1 (Companion hk a2) ~> O (Companion hk a2) a1
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== O b1 (Companion hk b2) ~> O (Companion hk a2) a1
O q (Companion hk g) ~> O (Companion hk f) p
sq (O a1 (Companion hk a2) ~> O (Companion hk a2) a1)
-> (O (Companion hk a2) a1 ~> O (Companion hk b2) b1)
-> O a1 (Companion hk a2) ~> O (Companion hk b2) b1
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== (a2 ~> b2) -> Companion hk a2 ~> Companion hk b2
forall {j :: c} {k :: c} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion a2 ~> b2
g (Companion hk a2 ~> Companion hk b2)
-> (a1 ~> b1) -> O (Companion hk a2) a1 ~> O (Companion hk b2) b1
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| a1 ~> b1
p) ((Ob0 hk j, Ob0 hk h, Ob a1, Ob b1) => RetroSq c d)
-> (a1 ~> b1) -> RetroSq c d
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a1 ~> b1
p ((Ob0 hk k, Ob0 hk i, Ob a1, Ob b1) => RetroSq c d)
-> (a1 ~> b1) -> RetroSq c d
forall (i :: c) (j :: c) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a1 ~> b1
q ((Ob0 vk j, Ob0 vk k, Ob a2, Ob b2) => RetroSq c d)
-> (a2 ~> b2) -> RetroSq c d
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a2 ~> b2
f ((Ob0 vk h, Ob0 vk i, Ob a2, Ob b2) => RetroSq c d)
-> (a2 ~> b2) -> RetroSq c d
forall (i :: c) (j :: c) (ps :: vk i j) (qs :: vk i j) r.
((Ob0 vk i, Ob0 vk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ a2 ~> b2
g
(Ob a, Ob b) => r
r \\ :: forall (a :: (hk k i, vk j k)) (b :: (hk j h, vk h i)) r.
((Ob a, Ob b) => r) -> RetroSq a b -> r
\\ RetroSq O q (Companion hk g) ~> O (Companion hk f) p
sq = r
(Ob (O q (Companion hk g)), Ob (O (Companion hk f) p)) => r
(Ob a, Ob b) => r
r ((Ob (O q (Companion hk g)), Ob (O (Companion hk f) p)) => r)
-> (O q (Companion hk g) ~> O (Companion hk f) p) -> r
forall (a :: hk j i) (b :: hk j i) r.
((Ob a, Ob b) => r) -> (a ~> b) -> r
forall {j} {k} (p :: PRO j k) (a :: j) (b :: k) r.
Profunctor p =>
((Ob a, Ob b) => r) -> p a b -> r
\\ O q (Companion hk g) ~> O (Companion hk f) p
sq
companionFold
:: forall {hk} {vk} {j} {k} (fs :: Path vk j k)
. (HasCompanions hk vk)
=> SPath fs
-> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold :: forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold SPath fs
SNil = Companion hk I ~> I
Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
forall (k :: k). Ob0 vk k => Companion hk I ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
Companion hk I ~> I
compToId
companionFold (SCons Obj p
f SPath ps1
SNil) = (p ~> p) -> Companion hk p ~> Companion hk p
forall {j :: k} {k :: k} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion p ~> p
Obj p
f
companionFold (SCons Obj p
f fs :: SPath ps1
fs@SCons{}) = let cfs :: O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
cfs = SPath ps1
-> Companion hk (Fold ps1) ~> Fold (Companion (Path hk) ps1)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold SPath ps1
fs (Companion hk (Fold (p ::: ps1))
~> Fold (Companion hk p ::: Companion (Path hk) ps1))
-> (Companion hk p ~> Companion hk p)
-> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
forall {i :: k} (j :: k) (k :: k) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj p
f in (O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
cfs (O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p))
-> (Companion hk (O (Fold (p ::: ps1)) p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p))
-> Companion hk (O (Fold (p ::: ps1)) p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. Obj (Fold (p ::: ps1))
-> Obj p
-> Companion hk (O (Fold (p ::: ps1)) p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
forall {i :: k} {j :: k} {k :: k} (f :: vk j k) (g :: vk i j).
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
forall {c} (hk :: CAT c) (vk :: CAT c) {i :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk i j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
compToCompose (SPath ps1 -> Fold ps1 ~> Fold ps1
forall {k} {kk :: CAT k} {i :: k} {j :: k} (as :: Path kk i j).
Bicategory kk =>
SPath as -> Fold as ~> Fold as
fold SPath ps1
fs) Obj p
f) ((Ob0 hk j, Ob0 hk k,
Ob (O (Companion hk (Fold (p ::: ps1))) (Companion hk p)),
Ob
(O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p))) =>
Companion hk (O (Fold (p ::: ps1)) p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p))
-> (O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p))
-> Companion hk (O (Fold (p ::: ps1)) p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
cfs
foldCompanion
:: forall {hk} {vk} {j} {k} (fs :: Path vk j k)
. (HasCompanions hk vk)
=> SPath fs
-> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion :: forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion SPath fs
SNil = I ~> Companion hk I
Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
forall (k :: k). Ob0 vk k => I ~> Companion hk I
forall {c} (hk :: CAT c) (vk :: CAT c) (k :: c).
(HasCompanions hk vk, Ob0 vk k) =>
I ~> Companion hk I
compFromId
foldCompanion (SCons Obj p
f SPath ps1
SNil) = (p ~> p) -> Companion hk p ~> Companion hk p
forall {j :: k} {k :: k} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion p ~> p
Obj p
f
foldCompanion (SCons Obj p
f fs :: SPath ps1
fs@SCons{}) = let cfs :: O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
cfs = SPath ps1
-> Fold (Companion (Path hk) ps1) ~> Companion hk (Fold ps1)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion SPath ps1
fs (Fold (Companion hk p ::: Companion (Path hk) ps1)
~> Companion hk (Fold (p ::: ps1)))
-> (Companion hk p ~> Companion hk p)
-> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
forall {i :: k} (j :: k) (k :: k) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj p
f in (Obj (Fold (p ::: ps1))
-> Obj p
-> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> Companion hk (O (Fold (p ::: ps1)) p)
forall {j :: k} {j :: k} {k :: k} (f :: vk j k) (g :: vk j j).
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk j j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
compFromCompose (SPath ps1 -> Fold ps1 ~> Fold ps1
forall {k} {kk :: CAT k} {i :: k} {j :: k} (as :: Path kk i j).
Bicategory kk =>
SPath as -> Fold as ~> Fold as
fold SPath ps1
fs) Obj p
f (O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
~> Companion hk (O (Fold (p ::: ps1)) p))
-> (O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p))
-> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> Companion hk (O (Fold (p ::: ps1)) p)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
cfs) ((Ob0 hk j, Ob0 hk k,
Ob
(O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)),
Ob (O (Companion hk (Fold (p ::: ps1))) (Companion hk p))) =>
O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> Companion hk (O (Fold (p ::: ps1)) p))
-> (O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p))
-> O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> Companion hk (O (Fold (p ::: ps1)) p)
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O (Fold (Companion hk p ::: Companion (Path hk) ps1))
(Companion hk p)
~> O (Companion hk (Fold (p ::: ps1))) (Companion hk p)
cfs
mapCompanionSPath
:: forall hk {vk} {j} {k} (fs :: Path vk j k)
. (HasCompanions hk vk)
=> SPath fs
-> SPath (Companion (Path hk) fs)
mapCompanionSPath :: forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath fs
SNil = SPath Nil
SPath (Companion (Path hk) fs)
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil
mapCompanionSPath (SCons Obj p
f SPath ps1
fs) = Obj (Companion hk p)
-> SPath (Companion (Path hk) ps1)
-> SPath (Companion hk p ::: Companion (Path hk) ps1)
forall {k} {kk :: CAT k} {j :: k} {j1 :: k} {k1 :: k}
(p :: kk j j1) (ps1 :: Path kk j1 k1).
Ob0 kk j =>
Obj p -> SPath ps1 -> SPath (p ::: ps1)
SCons (Obj p -> Obj (Companion hk p)
forall {j :: k} {k :: k} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion Obj p
f) (SPath ps1 -> SPath (Companion (Path hk) ps1)
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath ps1
fs)
instance (HasCompanions hk vk) => HasCompanions (Path hk) (Path vk) where
type Companion (Path hk) Nil = Nil
type Companion (Path hk) (p ::: ps) = Companion hk p ::: Companion (Path hk) ps
mapCompanion :: forall {j :: k} {k :: k} (f :: Path vk j k) (g :: Path vk j k).
(f ~> g) -> Companion (Path hk) f ~> Companion (Path hk) g
mapCompanion (Str SPath f
fs SPath g
gs Fold f ~> Fold g
n) =
SPath (Companion (Path hk) f)
-> SPath (Companion (Path hk) g)
-> (Fold (Companion (Path hk) f) ~> Fold (Companion (Path hk) g))
-> Strictified (Companion (Path hk) f) (Companion (Path hk) g)
forall {k} {kk :: CAT k} {j :: k} {k1 :: k} (ps :: Path kk j k1)
(qs :: Path kk j k1).
(Ob0 kk j, Ob0 kk k1) =>
SPath ps -> SPath qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
Str (forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
forall (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath @hk SPath f
fs) (forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
forall (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath @hk SPath g
gs) ((Fold (Companion (Path hk) f) ~> Fold (Companion (Path hk) g))
-> Strictified (Companion (Path hk) f) (Companion (Path hk) g))
-> (Fold (Companion (Path hk) f) ~> Fold (Companion (Path hk) g))
-> Strictified (Companion (Path hk) f) (Companion (Path hk) g)
forall a b. (a -> b) -> a -> b
$ SPath g -> Companion hk (Fold g) ~> Fold (Companion (Path hk) g)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold SPath g
gs (Companion hk (Fold g) ~> Fold (Companion (Path hk) g))
-> (Fold (Companion (Path hk) f) ~> Companion hk (Fold g))
-> Fold (Companion (Path hk) f) ~> Fold (Companion (Path hk) g)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk @vk Fold f ~> Fold g
n (Companion hk (Fold f) ~> Companion hk (Fold g))
-> (Fold (Companion (Path hk) f) ~> Companion hk (Fold f))
-> Fold (Companion (Path hk) f) ~> Companion hk (Fold g)
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. SPath f -> Fold (Companion (Path hk) f) ~> Companion hk (Fold f)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion SPath f
fs
compToId :: forall (k :: k). Ob0 (Path vk) k => Companion (Path hk) I ~> I
compToId = SPath Nil
-> SPath Nil -> (Fold Nil ~> Fold Nil) -> Strictified Nil Nil
forall {k} {kk :: CAT k} {j :: k} {k1 :: k} (ps :: Path kk j k1)
(qs :: Path kk j k1).
(Ob0 kk j, Ob0 kk k1) =>
SPath ps -> SPath qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
Str SPath Nil
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil SPath Nil
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil Obj I
Fold Nil ~> Fold Nil
forall (i :: k). Ob0 hk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj
compFromId :: forall (k :: k). Ob0 (Path vk) k => I ~> Companion (Path hk) I
compFromId = SPath Nil
-> SPath Nil -> (Fold Nil ~> Fold Nil) -> Strictified Nil Nil
forall {k} {kk :: CAT k} {j :: k} {k1 :: k} (ps :: Path kk j k1)
(qs :: Path kk j k1).
(Ob0 kk j, Ob0 kk k1) =>
SPath ps -> SPath qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
Str SPath Nil
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil SPath Nil
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil Obj I
Fold Nil ~> Fold Nil
forall (i :: k). Ob0 hk i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj
compToCompose :: forall {i :: k} {j :: k} {k :: k} (f :: Path vk j k)
(g :: Path vk i j).
Obj f
-> Obj g
-> Companion (Path hk) (O f g)
~> O (Companion (Path hk) f) (Companion (Path hk) g)
compToCompose (Str SPath f
fs SPath f
_ Fold f ~> Fold f
f) (Str SPath g
gs SPath g
_ Fold g ~> Fold g
g) =
let cfs :: SPath (Companion (Path hk) f)
cfs = SPath f -> SPath (Companion (Path hk) f)
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath f
fs
cgs :: SPath (Companion (Path hk) g)
cgs = SPath g -> SPath (Companion (Path hk) g)
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath g
gs
fgs :: SPath (g +++ f)
fgs = SPath g -> SPath f -> SPath (g +++ f)
forall {k1} {kk :: CAT k1} {j :: k1} {b :: k1} {k2 :: k1}
(ps :: Path kk j b) (qs :: Path kk b k2).
SPath ps -> SPath qs -> SPath (ps +++ qs)
append SPath g
gs SPath f
fs
in SPath (Companion (Path hk) (g +++ f))
-> SPath (Companion (Path hk) g +++ Companion (Path hk) f)
-> (Fold (Companion (Path hk) (g +++ f))
~> Fold (Companion (Path hk) g +++ Companion (Path hk) f))
-> Strictified
(Companion (Path hk) (g +++ f))
(Companion (Path hk) g +++ Companion (Path hk) f)
forall {k} {kk :: CAT k} {j :: k} {k1 :: k} (ps :: Path kk j k1)
(qs :: Path kk j k1).
(Ob0 kk j, Ob0 kk k1) =>
SPath ps -> SPath qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
Str (SPath (g +++ f) -> SPath (Companion (Path hk) (g +++ f))
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath (g +++ f)
fgs) (SPath (Companion (Path hk) g)
cgs SPath (Companion (Path hk) g)
-> SPath (Companion (Path hk) f)
-> SPath (Companion (Path hk) g +++ Companion (Path hk) f)
forall {k1} {kk :: CAT k1} {j :: k1} {b :: k1} {k2 :: k1}
(ps :: Path kk j b) (qs :: Path kk b k2).
SPath ps -> SPath qs -> SPath (ps +++ qs)
`append` SPath (Companion (Path hk) f)
cfs) ((Fold (Companion (Path hk) (g +++ f))
~> Fold (Companion (Path hk) g +++ Companion (Path hk) f))
-> Strictified
(Companion (Path hk) (g +++ f))
(Companion (Path hk) g +++ Companion (Path hk) f))
-> (Fold (Companion (Path hk) (g +++ f))
~> Fold (Companion (Path hk) g +++ Companion (Path hk) f))
-> Strictified
(Companion (Path hk) (g +++ f))
(Companion (Path hk) g +++ Companion (Path hk) f)
forall a b. (a -> b) -> a -> b
$
SPath (Companion (Path hk) g)
-> SPath (Companion (Path hk) f)
-> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
~> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
forall {k1} {kk :: CAT k1} {i :: k1} {j :: k1} {k2 :: k1}
(as :: Path kk i j) (bs :: Path kk j k2).
Bicategory kk =>
SPath as -> SPath bs -> O (Fold bs) (Fold as) ~> Fold (as +++ bs)
concatFold SPath (Companion (Path hk) g)
cgs SPath (Companion (Path hk) f)
cfs
(O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
~> Fold (Companion (Path hk) g +++ Companion (Path hk) f))
-> (Fold (Companion (Path hk) (g +++ f))
~> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g)))
-> Fold (Companion (Path hk) (g +++ f))
~> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
forall (b :: hk i k) (c :: hk i k) (a :: hk i k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (SPath f -> Companion hk (Fold f) ~> Fold (Companion (Path hk) f)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold SPath f
fs (Companion hk (Fold f) ~> Fold (Companion (Path hk) f))
-> (Companion hk (Fold g) ~> Fold (Companion (Path hk) g))
-> O (Companion hk (Fold f)) (Companion hk (Fold g))
~> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
forall {i :: k} (j :: k) (k :: k) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` SPath g -> Companion hk (Fold g) ~> Fold (Companion (Path hk) g)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold SPath g
gs)
(O (Companion hk (Fold f)) (Companion hk (Fold g))
~> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g)))
-> (Fold (Companion (Path hk) (g +++ f))
~> O (Companion hk (Fold f)) (Companion hk (Fold g)))
-> Fold (Companion (Path hk) (g +++ f))
~> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
forall (b :: hk i k) (c :: hk i k) (a :: hk i k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Fold f ~> Fold f)
-> (Fold g ~> Fold g)
-> Companion hk (O (Fold f) (Fold g))
~> O (Companion hk (Fold f)) (Companion hk (Fold g))
forall {i :: k} {j :: k} {k :: k} (f :: vk j k) (g :: vk i j).
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
forall {c} (hk :: CAT c) (vk :: CAT c) {i :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk i j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> Companion hk (O f g) ~> O (Companion hk f) (Companion hk g)
compToCompose Fold f ~> Fold f
f Fold g ~> Fold g
g
(Companion hk (O (Fold f) (Fold g))
~> O (Companion hk (Fold f)) (Companion hk (Fold g)))
-> (Fold (Companion (Path hk) (g +++ f))
~> Companion hk (O (Fold f) (Fold g)))
-> Fold (Companion (Path hk) (g +++ f))
~> O (Companion hk (Fold f)) (Companion hk (Fold g))
forall (b :: hk i k) (c :: hk i k) (a :: hk i k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Fold (g +++ f) ~> O (Fold f) (Fold g))
-> Companion hk (Fold (g +++ f))
~> Companion hk (O (Fold f) (Fold g))
forall {j :: k} {k :: k} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion (SPath g -> SPath f -> Fold (g +++ f) ~> O (Fold f) (Fold g)
forall {k1} {kk :: CAT k1} {i :: k1} {j :: k1} {k2 :: k1}
(as :: Path kk i j) (bs :: Path kk j k2).
Bicategory kk =>
SPath as -> SPath bs -> Fold (as +++ bs) ~> O (Fold bs) (Fold as)
splitFold SPath g
gs SPath f
fs)
(Companion hk (Fold (g +++ f))
~> Companion hk (O (Fold f) (Fold g)))
-> (Fold (Companion (Path hk) (g +++ f))
~> Companion hk (Fold (g +++ f)))
-> Fold (Companion (Path hk) (g +++ f))
~> Companion hk (O (Fold f) (Fold g))
forall (b :: hk i k) (c :: hk i k) (a :: hk i k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. SPath (g +++ f)
-> Fold (Companion (Path hk) (g +++ f))
~> Companion hk (Fold (g +++ f))
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion SPath (g +++ f)
fgs
compFromCompose :: forall {j :: k} {j :: k} {k :: k} (f :: Path vk j k)
(g :: Path vk j j).
Obj f
-> Obj g
-> O (Companion (Path hk) f) (Companion (Path hk) g)
~> Companion (Path hk) (O f g)
compFromCompose (Str SPath f
fs SPath f
_ Fold f ~> Fold f
f) (Str SPath g
gs SPath g
_ Fold g ~> Fold g
g) =
let cfs :: SPath (Companion (Path hk) f)
cfs = SPath f -> SPath (Companion (Path hk) f)
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath f
fs
cgs :: SPath (Companion (Path hk) g)
cgs = SPath g -> SPath (Companion (Path hk) g)
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath g
gs
fgs :: SPath (g +++ f)
fgs = SPath g -> SPath f -> SPath (g +++ f)
forall {k1} {kk :: CAT k1} {j :: k1} {b :: k1} {k2 :: k1}
(ps :: Path kk j b) (qs :: Path kk b k2).
SPath ps -> SPath qs -> SPath (ps +++ qs)
append SPath g
gs SPath f
fs
in SPath (Companion (Path hk) g +++ Companion (Path hk) f)
-> SPath (Companion (Path hk) (g +++ f))
-> (Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Fold (Companion (Path hk) (g +++ f)))
-> Strictified
(Companion (Path hk) g +++ Companion (Path hk) f)
(Companion (Path hk) (g +++ f))
forall {k} {kk :: CAT k} {j :: k} {k1 :: k} (ps :: Path kk j k1)
(qs :: Path kk j k1).
(Ob0 kk j, Ob0 kk k1) =>
SPath ps -> SPath qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
Str (SPath (Companion (Path hk) g)
cgs SPath (Companion (Path hk) g)
-> SPath (Companion (Path hk) f)
-> SPath (Companion (Path hk) g +++ Companion (Path hk) f)
forall {k1} {kk :: CAT k1} {j :: k1} {b :: k1} {k2 :: k1}
(ps :: Path kk j b) (qs :: Path kk b k2).
SPath ps -> SPath qs -> SPath (ps +++ qs)
`append` SPath (Companion (Path hk) f)
cfs) (SPath (g +++ f) -> SPath (Companion (Path hk) (g +++ f))
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> SPath (Companion (Path hk) fs)
mapCompanionSPath SPath (g +++ f)
fgs) ((Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Fold (Companion (Path hk) (g +++ f)))
-> Strictified
(Companion (Path hk) g +++ Companion (Path hk) f)
(Companion (Path hk) (g +++ f)))
-> (Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Fold (Companion (Path hk) (g +++ f)))
-> Strictified
(Companion (Path hk) g +++ Companion (Path hk) f)
(Companion (Path hk) (g +++ f))
forall a b. (a -> b) -> a -> b
$
SPath (g +++ f)
-> Companion hk (Fold (g +++ f))
~> Fold (Companion (Path hk) (g +++ f))
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Companion hk (Fold fs) ~> Fold (Companion (Path hk) fs)
companionFold SPath (g +++ f)
fgs
(Companion hk (Fold (g +++ f))
~> Fold (Companion (Path hk) (g +++ f)))
-> (Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Companion hk (Fold (g +++ f)))
-> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Fold (Companion (Path hk) (g +++ f))
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (O (Fold f) (Fold g) ~> Fold (g +++ f))
-> Companion hk (O (Fold f) (Fold g))
~> Companion hk (Fold (g +++ f))
forall {j :: k} {k :: k} (f :: vk j k) (g :: vk j k).
(f ~> g) -> Companion hk f ~> Companion hk g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion (SPath g -> SPath f -> O (Fold f) (Fold g) ~> Fold (g +++ f)
forall {k1} {kk :: CAT k1} {i :: k1} {j :: k1} {k2 :: k1}
(as :: Path kk i j) (bs :: Path kk j k2).
Bicategory kk =>
SPath as -> SPath bs -> O (Fold bs) (Fold as) ~> Fold (as +++ bs)
concatFold SPath g
gs SPath f
fs)
(Companion hk (O (Fold f) (Fold g))
~> Companion hk (Fold (g +++ f)))
-> (Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Companion hk (O (Fold f) (Fold g)))
-> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Companion hk (Fold (g +++ f))
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (Fold f ~> Fold f)
-> (Fold g ~> Fold g)
-> O (Companion hk (Fold f)) (Companion hk (Fold g))
~> Companion hk (O (Fold f) (Fold g))
forall {j :: k} {j :: k} {k :: k} (f :: vk j k) (g :: vk j j).
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {j :: c} {k :: c}
(f :: vk j k) (g :: vk j j).
HasCompanions hk vk =>
Obj f
-> Obj g
-> O (Companion hk f) (Companion hk g) ~> Companion hk (O f g)
compFromCompose Fold f ~> Fold f
f Fold g ~> Fold g
g
(O (Companion hk (Fold f)) (Companion hk (Fold g))
~> Companion hk (O (Fold f) (Fold g)))
-> (Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> O (Companion hk (Fold f)) (Companion hk (Fold g)))
-> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> Companion hk (O (Fold f) (Fold g))
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. (SPath f -> Fold (Companion (Path hk) f) ~> Companion hk (Fold f)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion SPath f
fs (Fold (Companion (Path hk) f) ~> Companion hk (Fold f))
-> (Fold (Companion (Path hk) g) ~> Companion hk (Fold g))
-> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
~> O (Companion hk (Fold f)) (Companion hk (Fold g))
forall {i :: k} (j :: k) (k :: k) (a :: hk j k) (b :: hk j k)
(c :: hk i j) (d :: hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` SPath g -> Fold (Companion (Path hk) g) ~> Companion hk (Fold g)
forall {k} {hk :: CAT k} {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
HasCompanions hk vk =>
SPath fs -> Fold (Companion (Path hk) fs) ~> Companion hk (Fold fs)
foldCompanion SPath g
gs)
(O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
~> O (Companion hk (Fold f)) (Companion hk (Fold g)))
-> (Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g)))
-> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> O (Companion hk (Fold f)) (Companion hk (Fold g))
forall (b :: hk j k) (c :: hk j k) (a :: hk j k).
(b ~> c) -> (a ~> b) -> a ~> c
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
. SPath (Companion (Path hk) g)
-> SPath (Companion (Path hk) f)
-> Fold (Companion (Path hk) g +++ Companion (Path hk) f)
~> O (Fold (Companion (Path hk) f)) (Fold (Companion (Path hk) g))
forall {k1} {kk :: CAT k1} {i :: k1} {j :: k1} {k2 :: k1}
(as :: Path kk i j) (bs :: Path kk j k2).
Bicategory kk =>
SPath as -> SPath bs -> Fold (as +++ bs) ~> O (Fold bs) (Fold as)
splitFold SPath (Companion (Path hk) g)
cgs SPath (Companion (Path hk) f)
cfs
mapConjointSPath
:: forall hk {vk} {j} {k} (fs :: Path vk j k)
. (Equipment hk vk)
=> SPath fs
-> SPath (Conjoint (Path hk) fs)
mapConjointSPath :: forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
Equipment hk vk =>
SPath fs -> SPath (Conjoint (Path hk) fs)
mapConjointSPath SPath fs
SNil = SPath (Conjoint (Path hk) fs)
SPath Nil
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil
mapConjointSPath (SCons Obj p
f SPath ps1
fs) = let fc :: Conjoint hk p ~> Conjoint hk p
fc = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj p
f in SPath ps1 -> SPath (Conjoint (Path hk) ps1)
forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
Equipment hk vk =>
SPath fs -> SPath (Conjoint (Path hk) fs)
mapConjointSPath SPath ps1
fs SPath (Conjoint (Path hk) ps1)
-> SPath (Conjoint hk p ::: Nil)
-> SPath (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
forall {k1} {kk :: CAT k1} {j :: k1} {b :: k1} {k2 :: k1}
(ps :: Path kk j b) (qs :: Path kk b k2).
SPath ps -> SPath qs -> SPath (ps +++ qs)
`append` (Conjoint hk p ~> Conjoint hk p)
-> SPath Nil -> SPath (Conjoint hk p ::: Nil)
forall {k} {kk :: CAT k} {j :: k} {j1 :: k} {k1 :: k}
(p :: kk j j1) (ps1 :: Path kk j1 k1).
Ob0 kk j =>
Obj p -> SPath ps1 -> SPath (p ::: ps1)
SCons Conjoint hk p ~> Conjoint hk p
fc SPath Nil
forall {k} (kk :: CAT k) (j :: k). Ob0 kk j => SPath Nil
SNil ((Ob0 hk j1, Ob0 hk j, Ob (Conjoint hk p), Ob (Conjoint hk p)) =>
SPath (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))
-> (Conjoint hk p ~> Conjoint hk p)
-> SPath (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Conjoint hk p ~> Conjoint hk p
fc
instance (Equipment hk vk) => Equipment (Path hk) (Path vk) where
type Conjoint (Path hk) Nil = Nil
type Conjoint (Path hk) (p ::: ps) = Conjoint (Path hk) ps +++ (Conjoint hk p ::: Nil)
mapConjoint :: forall {j :: k} {k :: k} (f :: Path vk j k) (g :: Path vk j k).
(f ~> g) -> Conjoint (Path hk) g ~> Conjoint (Path hk) f
mapConjoint n :: f ~> g
n@(Str SPath f
fsp SPath g
gsp Fold f ~> Fold g
_) =
let fs :: Obj f
fs = Strictified f g -> Obj f
forall {k1} {k2} (a :: k2) (b :: k1) (p :: PRO k2 k1).
Profunctor p =>
p a b -> Obj a
src f ~> g
Strictified f g
n
gs :: Obj g
gs = Strictified f g -> Obj g
forall {k1} {k2} (a :: k2) (b :: k1) (p :: PRO k2 k1).
Profunctor p =>
p a b -> Obj b
tgt f ~> g
Strictified f g
n
cfs :: Obj (Conjoint (Path hk) f)
cfs = SPath (Conjoint (Path hk) f) -> Obj (Conjoint (Path hk) f)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (ps :: Path kk i j).
Bicategory kk =>
SPath ps -> Obj ps
asObj (forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
Equipment hk vk =>
SPath fs -> SPath (Conjoint (Path hk) fs)
forall (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
Equipment hk vk =>
SPath fs -> SPath (Conjoint (Path hk) fs)
mapConjointSPath @hk SPath f
fsp)
cgs :: Obj (Conjoint (Path hk) g)
cgs = SPath (Conjoint (Path hk) g) -> Obj (Conjoint (Path hk) g)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (ps :: Path kk i j).
Bicategory kk =>
SPath ps -> Obj ps
asObj (forall {k} (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
Equipment hk vk =>
SPath fs -> SPath (Conjoint (Path hk) fs)
forall (hk :: CAT k) {vk :: CAT k} {j :: k} {k :: k}
(fs :: Path vk j k).
Equipment hk vk =>
SPath fs -> SPath (Conjoint (Path hk) fs)
mapConjointSPath @hk SPath g
gsp)
compN :: Companion (Path hk) f ~> Companion (Path hk) g
compN = (f ~> g) -> Companion (Path hk) f ~> Companion (Path hk) g
forall {j :: k} {k :: k} (f :: Path vk j k) (g :: Path vk j k).
(f ~> g) -> Companion (Path hk) f ~> Companion (Path hk) g
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion f ~> g
n
in ((Conjoint (Path hk) g +++ Companion (Path hk) g) ~> I)
-> Obj (Conjoint (Path hk) f)
-> O (Conjoint (Path hk) f)
(Conjoint (Path hk) g +++ Companion (Path hk) g)
~> Conjoint (Path hk) f
forall {s} {k :: s} (kk :: CAT s) (i :: s) (c :: kk i i)
(a :: kk i k) (b :: kk i k).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O a c ~> b
rightUnitorWith (forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit @(Path hk) Obj g
gs) Obj (Conjoint (Path hk) f)
cfs
Strictified
((Conjoint (Path hk) g +++ Companion (Path hk) g)
+++ Conjoint (Path hk) f)
(Conjoint (Path hk) f)
-> Strictified
(Conjoint (Path hk) g)
((Conjoint (Path hk) g +++ Companion (Path hk) g)
+++ Conjoint (Path hk) f)
-> Strictified (Conjoint (Path hk) g) (Conjoint (Path hk) f)
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk k j) (c :: Path hk k j) (a :: Path hk k j).
Strictified b c -> Strictified a b -> Strictified a c
. Obj (Conjoint (Path hk) f)
-> Obj (Companion (Path hk) g)
-> Obj (Conjoint (Path hk) g)
-> O (O (Conjoint (Path hk) f) (Companion (Path hk) g))
(Conjoint (Path hk) g)
~> O (Conjoint (Path hk) f)
(O (Companion (Path hk) g) (Conjoint (Path hk) g))
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O (O a b) c ~> O a (O b c)
associator' Obj (Conjoint (Path hk) f)
cfs (Strictified (Companion (Path hk) f) (Companion (Path hk) g)
-> Obj (Companion (Path hk) g)
forall {k1} {k2} (a :: k2) (b :: k1) (p :: PRO k2 k1).
Profunctor p =>
p a b -> Obj b
tgt Companion (Path hk) f ~> Companion (Path hk) g
Strictified (Companion (Path hk) f) (Companion (Path hk) g)
compN) Obj (Conjoint (Path hk) g)
cgs
Strictified
(Conjoint (Path hk) g
+++ (Companion (Path hk) g +++ Conjoint (Path hk) f))
((Conjoint (Path hk) g +++ Companion (Path hk) g)
+++ Conjoint (Path hk) f)
-> Strictified
(Conjoint (Path hk) g)
(Conjoint (Path hk) g
+++ (Companion (Path hk) g +++ Conjoint (Path hk) f))
-> Strictified
(Conjoint (Path hk) g)
((Conjoint (Path hk) g +++ Companion (Path hk) g)
+++ Conjoint (Path hk) f)
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk k j) (c :: Path hk k j) (a :: Path hk k j).
Strictified b c -> Strictified a b -> Strictified a c
. ((Obj (Conjoint (Path hk) f)
cfs Obj (Conjoint (Path hk) f)
-> (Companion (Path hk) f ~> Companion (Path hk) g)
-> O (Conjoint (Path hk) f) (Companion (Path hk) f)
~> O (Conjoint (Path hk) f) (Companion (Path hk) g)
forall {i :: k} (j :: k) (k :: k) (a :: Path hk j k)
(b :: Path hk j k) (c :: Path hk i j) (d :: Path hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Companion (Path hk) f ~> Companion (Path hk) g
compN) ((Companion (Path hk) f +++ Conjoint (Path hk) f)
~> (Companion (Path hk) g +++ Conjoint (Path hk) f))
-> Obj (Conjoint (Path hk) g)
-> O (Companion (Path hk) f +++ Conjoint (Path hk) f)
(Conjoint (Path hk) g)
~> O (Companion (Path hk) g +++ Conjoint (Path hk) f)
(Conjoint (Path hk) g)
forall {i :: k} (j :: k) (k :: k) (a :: Path hk j k)
(b :: Path hk j k) (c :: Path hk i j) (d :: Path hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Obj (Conjoint (Path hk) g)
cgs)
Strictified
(Conjoint (Path hk) g
+++ (Companion (Path hk) f +++ Conjoint (Path hk) f))
(Conjoint (Path hk) g
+++ (Companion (Path hk) g +++ Conjoint (Path hk) f))
-> Strictified
(Conjoint (Path hk) g)
(Conjoint (Path hk) g
+++ (Companion (Path hk) f +++ Conjoint (Path hk) f))
-> Strictified
(Conjoint (Path hk) g)
(Conjoint (Path hk) g
+++ (Companion (Path hk) g +++ Conjoint (Path hk) f))
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk k j) (c :: Path hk k j) (a :: Path hk k j).
Strictified b c -> Strictified a b -> Strictified a c
. (I ~> (Companion (Path hk) f +++ Conjoint (Path hk) f))
-> Obj (Conjoint (Path hk) g)
-> Conjoint (Path hk) g
~> O (Companion (Path hk) f +++ Conjoint (Path hk) f)
(Conjoint (Path hk) g)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(I ~> c) -> (a ~> b) -> a ~> O c b
leftUnitorInvWith (Obj f -> I ~> O (Conjoint (Path hk) f) (Companion (Path hk) f)
forall {j :: k} {k :: k} (f :: Path vk j k).
Obj f -> I ~> O (Conjoint (Path hk) f) (Companion (Path hk) f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit Obj f
fs) Obj (Conjoint (Path hk) g)
cgs
comConUnit :: forall {j :: k} {k :: k} (f :: Path vk j k).
Obj f -> I ~> O (Conjoint (Path hk) f) (Companion (Path hk) f)
comConUnit Obj f
fs' = case Obj f -> SPath f
forall {k} (kk :: CAT k) (i :: k) (j :: k) (ps :: Path kk i j).
Bicategory kk =>
Obj ps -> SPath ps
asSPath Obj f
fs' of
SPath f
SNil -> I ~> O (Conjoint (Path hk) f) (Companion (Path hk) f)
Strictified Nil Nil
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
forall (a :: Path hk j j). Ob a => Strictified a a
id
SCons Obj p
f SPath ps1
sfs ->
let fs :: Obj ps1
fs = SPath ps1 -> Obj ps1
forall {k} (kk :: CAT k) (i :: k) (j :: k) (ps :: Path kk i j).
Bicategory kk =>
SPath ps -> Obj ps
asObj SPath ps1
sfs
ls :: Companion (Path hk) ps1 ~> Companion (Path hk) ps1
ls = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @(Path hk) Obj ps1
fs
l :: Companion hk p ~> Companion hk p
l = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj p
f
rs :: Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @(Path hk) Obj ps1
fs
r :: Conjoint hk p ~> Conjoint hk p
r = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj p
f
r' :: (Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
r' = (Conjoint hk p ~> Conjoint hk p)
-> (Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton Conjoint hk p ~> Conjoint hk p
r
in ( ((((Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil))
-> (Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1)
-> (Companion (Path hk) ps1 ~> Companion (Path hk) ps1)
-> O (Conjoint hk p ::: Nil)
(O (Conjoint (Path hk) ps1) (Companion (Path hk) ps1))
~> O (O (Conjoint hk p ::: Nil) (Conjoint (Path hk) ps1))
(Companion (Path hk) ps1)
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O a (O b c) ~> O (O a b) c
associatorInv' (Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
r' Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs Companion (Path hk) ps1 ~> Companion (Path hk) ps1
ls Strictified
((Companion (Path hk) ps1 +++ Conjoint (Path hk) ps1)
+++ (Conjoint hk p ::: Nil))
(Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))
-> Strictified
(Nil +++ (Conjoint hk p ::: Nil))
((Companion (Path hk) ps1 +++ Conjoint (Path hk) ps1)
+++ (Conjoint hk p ::: Nil))
-> Strictified
(Nil +++ (Conjoint hk p ::: Nil))
(Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk j1 j) (c :: Path hk j1 j) (a :: Path hk j1 j).
Strictified b c -> Strictified a b -> Strictified a c
. ((Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
r' ((Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil))
-> (Nil ~> (Companion (Path hk) ps1 +++ Conjoint (Path hk) ps1))
-> O (Conjoint hk p ::: Nil) Nil
~> O (Conjoint hk p ::: Nil)
(Companion (Path hk) ps1 +++ Conjoint (Path hk) ps1)
forall {i :: k} (j :: k) (k :: k) (a :: Path hk j k)
(b :: Path hk j k) (c :: Path hk i j) (d :: Path hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit @(Path hk) Obj ps1
fs)) ((Nil +++ (Conjoint hk p ::: Nil))
~> (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))))
-> ((Companion hk p ::: Nil) ~> (Companion hk p ::: Nil))
-> O (Nil +++ (Conjoint hk p ::: Nil)) (Companion hk p ::: Nil)
~> O (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))
(Companion hk p ::: Nil)
forall {i :: k} (j :: k) (k :: k) (a :: Path hk j k)
(b :: Path hk j k) (c :: Path hk i j) (d :: Path hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` (Companion hk p ~> Companion hk p)
-> (Companion hk p ::: Nil) ~> (Companion hk p ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton Companion hk p ~> Companion hk p
l)
Strictified
((Companion hk p ::: Nil) +++ (Nil +++ (Conjoint hk p ::: Nil)))
(Companion hk p
::: (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))))
-> Strictified
Nil
((Companion hk p ::: Nil) +++ (Nil +++ (Conjoint hk p ::: Nil)))
-> Strictified
Nil
(Companion hk p
::: (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))))
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk j j) (c :: Path hk j j) (a :: Path hk j j).
Strictified b c -> Strictified a b -> Strictified a c
. (O (Conjoint hk p) (Companion hk p) ::: Nil)
~> (Companion hk p ::: (Conjoint hk p ::: Nil))
Strictified
(O (Conjoint hk p) (Companion hk p) ::: Nil)
((Companion hk p ::: Nil) +++ (Nil +++ (Conjoint hk p ::: Nil)))
forall {k1} {kk :: k1 -> k1 -> Type} {i :: k1} {j :: k1} {k2 :: k1}
(p :: kk i j) (q :: kk j k2).
(Ob0 kk i, Ob0 kk j, Ob0 kk k2, Bicategory kk, Ob p, Ob q) =>
(O q p ::: Nil) ~> (p ::: (q ::: Nil))
elimO
Strictified
(O (Conjoint hk p) (Companion hk p) ::: Nil)
((Companion hk p ::: Nil) +++ (Nil +++ (Conjoint hk p ::: Nil)))
-> Strictified Nil (O (Conjoint hk p) (Companion hk p) ::: Nil)
-> Strictified
Nil
((Companion hk p ::: Nil) +++ (Nil +++ (Conjoint hk p ::: Nil)))
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk j j) (c :: Path hk j j) (a :: Path hk j j).
Strictified b c -> Strictified a b -> Strictified a c
. (I ~> O (Conjoint hk p) (Companion hk p))
-> (I ::: Nil) ~> (O (Conjoint hk p) (Companion hk p) ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (Obj p -> I ~> O (Conjoint hk p) (Companion hk p)
forall {j :: k} {k :: k} (f :: vk j k).
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> I ~> O (Conjoint hk f) (Companion hk f)
comConUnit Obj p
f)
Strictified
(I ::: Nil) (O (Conjoint hk p) (Companion hk p) ::: Nil)
-> Strictified Nil (I ::: Nil)
-> Strictified Nil (O (Conjoint hk p) (Companion hk p) ::: Nil)
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk j j) (c :: Path hk j j) (a :: Path hk j j).
Strictified b c -> Strictified a b -> Strictified a c
. Nil ~> (I ::: Nil)
Strictified Nil (I ::: Nil)
forall {k} {kk :: CAT k} {j :: k}.
(Ob0 kk j, Bicategory kk) =>
Nil ~> (I ::: Nil)
introI
)
((Ob0 hk j, Ob0 hk j1, Ob (Companion hk p), Ob (Companion hk p)) =>
Strictified
Nil
(Companion hk p
::: (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))))
-> (Companion hk p ~> Companion hk p)
-> Strictified
Nil
(Companion hk p
::: (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))))
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Companion hk p ~> Companion hk p
l
((Ob0 hk j1, Ob0 hk j, Ob (Conjoint hk p), Ob (Conjoint hk p)) =>
Strictified
Nil
(Companion hk p
::: (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))))
-> (Conjoint hk p ~> Conjoint hk p)
-> Strictified
Nil
(Companion hk p
::: (Companion (Path hk) ps1
+++ (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))))
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Conjoint hk p ~> Conjoint hk p
r
comConCounit :: forall {j :: k} {k :: k} (f :: Path vk j k).
Obj f -> O (Companion (Path hk) f) (Conjoint (Path hk) f) ~> I
comConCounit Obj f
fs' = case Obj f -> SPath f
forall {k} (kk :: CAT k) (i :: k) (j :: k) (ps :: Path kk i j).
Bicategory kk =>
Obj ps -> SPath ps
asSPath Obj f
fs' of
SPath f
SNil -> O (Companion (Path hk) f) (Conjoint (Path hk) f) ~> I
Strictified Nil Nil
forall {k} (p :: PRO k k) (a :: k). (Promonad p, Ob a) => p a a
forall (a :: Path hk j j). Ob a => Strictified a a
id
SCons @f Obj p
f SPath ps1
sfs ->
let fs :: Obj ps1
fs = SPath ps1 -> Obj ps1
forall {k} (kk :: CAT k) (i :: k) (j :: k) (ps :: Path kk i j).
Bicategory kk =>
SPath ps -> Obj ps
asObj SPath ps1
sfs
ls :: Companion (Path hk) ps1 ~> Companion (Path hk) ps1
ls = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @(Path hk) Obj ps1
fs
l :: Companion hk p ~> Companion hk p
l = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @hk Obj p
f
l' :: (Companion hk p ::: Nil) ~> (Companion hk p ::: Nil)
l' = (Companion hk p ~> Companion hk p)
-> (Companion hk p ::: Nil) ~> (Companion hk p ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton Companion hk p ~> Companion hk p
l
rs :: Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @(Path hk) Obj ps1
fs
r :: Conjoint hk p ~> Conjoint hk p
r = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
Equipment hk vk =>
(f ~> g) -> Conjoint hk g ~> Conjoint hk f
mapConjoint @hk Obj p
f
r' :: (Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
r' = (Conjoint hk p ~> Conjoint hk p)
-> (Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton Conjoint hk p ~> Conjoint hk p
r
in ( Obj ps1
-> O (Companion (Path hk) ps1) (Conjoint (Path hk) ps1) ~> I
forall {j :: k} {k :: k} (f :: Path vk j k).
Obj f -> O (Companion (Path hk) f) (Conjoint (Path hk) f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj ps1
fs
Strictified
(Conjoint (Path hk) ps1 +++ Companion (Path hk) ps1) Nil
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
(Conjoint (Path hk) ps1 +++ Companion (Path hk) ps1)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk k k) (c :: Path hk k k) (a :: Path hk k k).
Strictified b c -> Strictified a b -> Strictified a c
. ( Companion (Path hk) ps1 ~> Companion (Path hk) ps1
ls
(Companion (Path hk) ps1 ~> Companion (Path hk) ps1)
-> (((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Nil))
~> Conjoint (Path hk) ps1)
-> O (Companion (Path hk) ps1)
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Nil))
~> O (Companion (Path hk) ps1) (Conjoint (Path hk) ps1)
forall {i :: k} (j :: k) (k :: k) (a :: Path hk j k)
(b :: Path hk j k) (c :: Path hk i j) (d :: Path hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` ( ((Conjoint hk p ::: (Companion hk p ::: Nil)) ~> I)
-> (Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1)
-> O (Conjoint hk p ::: (Companion hk p ::: Nil))
(Conjoint (Path hk) ps1)
~> Conjoint (Path hk) ps1
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (c :: kk i2 i2)
(a :: kk i1 i2) (b :: kk i1 i2).
Bicategory kk =>
(c ~> I) -> (a ~> b) -> O c a ~> b
leftUnitorWith ((I ::: Nil) ~> Nil
Strictified (I ::: Nil) Nil
forall {s} {kk :: CAT s} {j :: s}.
(Ob0 kk j, Bicategory kk) =>
(I ::: Nil) ~> Nil
elimI Strictified (I ::: Nil) Nil
-> Strictified
(Conjoint hk p ::: (Companion hk p ::: Nil)) (I ::: Nil)
-> Strictified (Conjoint hk p ::: (Companion hk p ::: Nil)) Nil
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk j1 j1) (c :: Path hk j1 j1)
(a :: Path hk j1 j1).
Strictified b c -> Strictified a b -> Strictified a c
. (O (Companion hk p) (Conjoint hk p) ~> I)
-> (O (Companion hk p) (Conjoint hk p) ::: Nil) ~> (I ::: Nil)
forall {k} (kk :: CAT k) (i :: k) (j :: k) (p :: kk i j)
(q :: kk i j).
Bicategory kk =>
(p ~> q) -> (p ::: Nil) ~> (q ::: Nil)
singleton (Obj p -> O (Companion hk p) (Conjoint hk p) ~> I
forall {j :: k} {k :: k} (f :: vk j k).
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k).
Equipment hk vk =>
Obj f -> O (Companion hk f) (Conjoint hk f) ~> I
comConCounit Obj p
f) Strictified
(O (Companion hk p) (Conjoint hk p) ::: Nil) (I ::: Nil)
-> Strictified
(Conjoint hk p ::: (Companion hk p ::: Nil))
(O (Companion hk p) (Conjoint hk p) ::: Nil)
-> Strictified
(Conjoint hk p ::: (Companion hk p ::: Nil)) (I ::: Nil)
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk j1 j1) (c :: Path hk j1 j1)
(a :: Path hk j1 j1).
Strictified b c -> Strictified a b -> Strictified a c
. forall (p :: hk j1 j) (q :: hk j j1).
(Ob0 hk j1, Ob0 hk j, Ob0 hk j1, Bicategory hk, Ob p, Ob q) =>
(p ::: (q ::: Nil)) ~> (O q p ::: Nil)
forall {k1} {kk :: k1 -> k1 -> Type} {i :: k1} {j :: k1} {k2 :: k1}
(p :: kk i j) (q :: kk j k2).
(Ob0 kk i, Ob0 kk j, Ob0 kk k2, Bicategory kk, Ob p, Ob q) =>
(p ::: (q ::: Nil)) ~> (O q p ::: Nil)
introO @(Conjoint hk f) @(Companion hk f)) Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs
Strictified
(Conjoint (Path hk) ps1
+++ (Conjoint hk p ::: (Companion hk p ::: Nil)))
(Conjoint (Path hk) ps1)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Nil))
(Conjoint (Path hk) ps1
+++ (Conjoint hk p ::: (Companion hk p ::: Nil)))
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Nil))
(Conjoint (Path hk) ps1)
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk k j1) (c :: Path hk k j1) (a :: Path hk k j1).
Strictified b c -> Strictified a b -> Strictified a c
. ((Companion hk p ::: Nil) ~> (Companion hk p ::: Nil))
-> ((Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil))
-> (Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1)
-> O (Companion hk p ::: Nil)
(O (Conjoint hk p ::: Nil) (Conjoint (Path hk) ps1))
~> O (O (Companion hk p ::: Nil) (Conjoint hk p ::: Nil))
(Conjoint (Path hk) ps1)
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O a (O b c) ~> O (O a b) c
associatorInv' (Companion hk p ::: Nil) ~> (Companion hk p ::: Nil)
l' (Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
r' Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs
)
)
Strictified
(((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Nil))
+++ Companion (Path hk) ps1)
(Conjoint (Path hk) ps1 +++ Companion (Path hk) ps1)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
(((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Nil))
+++ Companion (Path hk) ps1)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
(Conjoint (Path hk) ps1 +++ Companion (Path hk) ps1)
forall {k} (p :: PRO k k) (b :: k) (c :: k) (a :: k).
Promonad p =>
p b c -> p a b -> p a c
forall (b :: Path hk k k) (c :: Path hk k k) (a :: Path hk k k).
Strictified b c -> Strictified a b -> Strictified a c
. (Companion (Path hk) ps1 ~> Companion (Path hk) ps1)
-> ((Companion hk p ::: Nil) ~> (Companion hk p ::: Nil))
-> Obj (Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
-> O (O (Companion (Path hk) ps1) (Companion hk p ::: Nil))
(Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
~> O (Companion (Path hk) ps1)
(O (Companion hk p ::: Nil)
(Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil)))
forall {s} {j1 :: s} {i1 :: s} (kk :: s -> s -> Type) {i2 :: s}
{j2 :: s} (a :: kk i2 j2) (b :: kk j1 i2) (c :: kk i1 j1).
Bicategory kk =>
Obj a -> Obj b -> Obj c -> O (O a b) c ~> O a (O b c)
associator' Companion (Path hk) ps1 ~> Companion (Path hk) ps1
ls (Companion hk p ::: Nil) ~> (Companion hk p ::: Nil)
l' ((Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil)
r' ((Conjoint hk p ::: Nil) ~> (Conjoint hk p ::: Nil))
-> (Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1)
-> O (Conjoint hk p ::: Nil) (Conjoint (Path hk) ps1)
~> O (Conjoint hk p ::: Nil) (Conjoint (Path hk) ps1)
forall {i :: k} (j :: k) (k :: k) (a :: Path hk j k)
(b :: Path hk j k) (c :: Path hk i j) (d :: Path hk i j).
(a ~> b) -> (c ~> d) -> O a c ~> O b d
forall {s} (kk :: CAT s) {i :: s} (j :: s) (k :: s) (a :: kk j k)
(b :: kk j k) (c :: kk i j) (d :: kk i j).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
`o` Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs)
)
((Ob0 (Path hk) k, Ob0 (Path hk) j1, Ob (Conjoint (Path hk) ps1),
Ob (Conjoint (Path hk) ps1)) =>
Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil)
-> (Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil
forall (i :: k) (j :: k) (ps :: Path hk i j) (qs :: Path hk i j) r.
((Ob0 (Path hk) i, Ob0 (Path hk) j, Ob ps, Ob qs) => r)
-> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Conjoint (Path hk) ps1 ~> Conjoint (Path hk) ps1
rs
((Ob0 hk j, Ob0 hk j1, Ob (Companion hk p), Ob (Companion hk p)) =>
Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil)
-> (Companion hk p ~> Companion hk p)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Companion hk p ~> Companion hk p
l
((Ob0 hk j1, Ob0 hk j, Ob (Conjoint hk p), Ob (Conjoint hk p)) =>
Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil)
-> (Conjoint hk p ~> Conjoint hk p)
-> Strictified
((Conjoint (Path hk) ps1 +++ (Conjoint hk p ::: Nil))
+++ (Companion hk p ::: Companion (Path hk) ps1))
Nil
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ Conjoint hk p ~> Conjoint hk p
r
adjVK
:: forall hk vk i j k f g v w x y
. (Adjunction x v, Adjunction y w, HasCompanions hk vk, Ob v, Ob w)
=> RetroSq '(y :: hk i k, g) '(x, f :: vk j k)
-> Sq '(v, g) '(w, f)
adjVK :: forall {k} {h :: k} (hk :: CAT k) (vk :: CAT k) (i :: k) (j :: k)
(k :: k) (f :: vk j k) (g :: vk h i) (v :: hk j h) (w :: hk k i)
(x :: hk h j) (y :: hk i k).
(Adjunction x v, Adjunction y w, HasCompanions hk vk, Ob v,
Ob w) =>
RetroSq '(y, g) '(x, f) -> Sq '(v, g) '(w, f)
adjVK (RetroSq O q (Companion hk g) ~> O (Companion hk f) p
sq) =
let cf :: Companion (Path hk) (f ::: Nil) ~> Companion (Path hk) (f ::: Nil)
cf = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @(Path hk) (forall (p :: vk j k).
(Bicategory vk, Ob p, Ob0 vk j, Ob0 vk k) =>
Obj (p ::: Nil)
forall {k} {kk :: CAT k} {i :: k} {j :: k} (p :: kk i j).
(Bicategory kk, Ob p, Ob0 kk i, Ob0 kk j) =>
Obj (p ::: Nil)
obj1 @f)
cg :: Companion (Path hk) (g ::: Nil) ~> Companion (Path hk) (g ::: Nil)
cg = forall {c} (hk :: CAT c) (vk :: CAT c) {j :: c} {k :: c}
(f :: vk j k) (g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
forall (hk :: CAT k) (vk :: CAT k) {j :: k} {k :: k} (f :: vk j k)
(g :: vk j k).
HasCompanions hk vk =>
(f ~> g) -> Companion hk f ~> Companion hk g
mapCompanion @(Path hk) (forall (p :: vk h i).
(Bicategory vk, Ob p, Ob0 vk h, Ob0 vk i) =>
Obj (p ::: Nil)
forall {k} {kk :: CAT k} {i :: k} {j :: k} (p :: kk i j).
(Bicategory kk, Ob p, Ob0 kk i, Ob0 kk j) =>
Obj (p ::: Nil)
obj1 @g)
v :: Obj (v ::: Nil)
v = forall (p :: hk j h).
(Bicategory hk, Ob p, Ob0 hk j, Ob0 hk h) =>
Obj (p ::: Nil)
forall {k} {kk :: CAT k} {i :: k} {j :: k} (p :: kk i j).
(Bicategory kk, Ob p, Ob0 kk i, Ob0 kk j) =>
Obj (p ::: Nil)
obj1 @v
w :: Obj (w ::: Nil)
w = forall (p :: hk k i).
(Bicategory hk, Ob p, Ob0 hk k, Ob0 hk i) =>
Obj (p ::: Nil)
forall {k} {kk :: CAT k} {i :: k} {j :: k} (p :: kk i j).
(Bicategory kk, Ob p, Ob0 kk i, Ob0 kk j) =>
Obj (p ::: Nil)
obj1 @w
x :: Obj (x ::: Nil)
x = forall (p :: hk h j).
(Bicategory hk, Ob p, Ob0 hk h, Ob0 hk j) =>
Obj (p ::: Nil)
forall {k} {kk :: CAT k} {i :: k} {j :: k} (p :: kk i j).
(Bicategory kk, Ob p, Ob0 kk i, Ob0 kk j) =>
Obj (p ::: Nil)
obj1 @x
y :: Obj (y ::: Nil)
y = forall (p :: hk i k).
(Bicategory hk, Ob p, Ob0 hk i, Ob0 hk k) =>
Obj (p ::: Nil)
forall {k} {kk :: CAT k} {i :: k} {j :: k} (p :: kk i j).
(Bicategory kk, Ob p, Ob0 kk i, Ob0 kk j) =>
Obj (p ::: Nil)
obj1 @y
counit' :: Strictified ((v ::: Nil) +++ (x ::: Nil)) Nil
counit' = Obj ((v ::: Nil) +++ (x ::: Nil))
-> Obj Nil
-> (Fold ((v ::: Nil) +++ (x ::: Nil)) ~> Fold Nil)
-> Strictified ((v ::: Nil) +++ (x ::: Nil)) Nil
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str (Obj (x ::: Nil)
x Obj (x ::: Nil)
-> Obj (v ::: Nil)
-> O (x ::: Nil) (v ::: Nil) ~> O (x ::: Nil) (v ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| Obj (v ::: Nil)
v) Obj I
Obj Nil
forall (i :: k). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj (forall (l :: hk h j) (r :: hk j h). Adjunction l r => O l r ~> I
forall {k} {kk :: k -> k -> Type} {c :: k} {d :: k} (l :: kk c d)
(r :: kk d c).
Adjunction l r =>
O l r ~> I
counit @x @v)
unit' :: Strictified Nil ((y ::: Nil) +++ (w ::: Nil))
unit' = Obj Nil
-> Obj ((y ::: Nil) +++ (w ::: Nil))
-> (Fold Nil ~> Fold ((y ::: Nil) +++ (w ::: Nil)))
-> Strictified Nil ((y ::: Nil) +++ (w ::: Nil))
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str Obj I
Obj Nil
forall (i :: k). Ob0 (Path hk) i => Obj I
forall {s} (kk :: CAT s) (i :: s).
(Bicategory kk, Ob0 kk i) =>
Obj I
iObj (Obj (w ::: Nil)
w Obj (w ::: Nil)
-> Obj (y ::: Nil)
-> O (w ::: Nil) (y ::: Nil) ~> O (w ::: Nil) (y ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| Obj (y ::: Nil)
y) (forall (l :: hk i k) (r :: hk k i). Adjunction l r => I ~> O r l
forall {k} {kk :: k -> k -> Type} {c :: k} {d :: k} (l :: kk c d)
(r :: kk d c).
Adjunction l r =>
I ~> O r l
unit @y @w)
sq' :: Strictified
((Companion hk g ::: Nil) +++ (y ::: Nil))
((x ::: Nil) +++ (Companion hk f ::: Nil))
sq' = Obj ((Companion hk g ::: Nil) +++ (y ::: Nil))
-> Obj ((x ::: Nil) +++ (Companion hk f ::: Nil))
-> (Fold ((Companion hk g ::: Nil) +++ (y ::: Nil))
~> Fold ((x ::: Nil) +++ (Companion hk f ::: Nil)))
-> Strictified
((Companion hk g ::: Nil) +++ (y ::: Nil))
((x ::: Nil) +++ (Companion hk f ::: Nil))
forall {k1} (kk :: CAT k1) (j :: k1) (k2 :: k1)
(ps :: Path kk j k2) (qs :: Path kk j k2).
Bicategory kk =>
Obj ps -> Obj qs -> (Fold ps ~> Fold qs) -> Strictified ps qs
str (Obj (y ::: Nil)
y Obj (y ::: Nil)
-> ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> O (y ::: Nil) (Companion hk g ::: Nil)
~> O (y ::: Nil) (Companion hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
Companion (Path hk) (g ::: Nil) ~> Companion (Path hk) (g ::: Nil)
cg) ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
Companion (Path hk) (f ::: Nil) ~> Companion (Path hk) (f ::: Nil)
cf ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> Obj (x ::: Nil)
-> O (Companion hk f ::: Nil) (x ::: Nil)
~> O (Companion hk f ::: Nil) (x ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| Obj (x ::: Nil)
x) O q (Companion hk g) ~> O (Companion hk f) p
Fold ((Companion hk g ::: Nil) +++ (y ::: Nil))
~> Fold ((x ::: Nil) +++ (Companion hk f ::: Nil))
sq
in (O (Companion hk g) v ~> O w (Companion hk f))
-> Sq '(v, g) '(w, f)
forall {c} {hk :: c -> c -> Type} {vk :: c -> c -> Type} {h :: c}
{i :: c} {j :: c} {k :: c} (p :: hk j h) (q :: hk k i)
(f :: vk h i) (g :: vk j k).
(Ob0 vk h, Ob0 vk i, Ob0 vk j, Ob0 vk k, Ob p, Ob q, Ob f, Ob g) =>
(O (Companion hk f) p ~> O q (Companion hk g))
-> Sq '(p, f) '(q, g)
Sq
( Strictified
((v ::: Nil) +++ ((Companion hk g ::: Nil) +++ Nil))
(Nil +++ ((Companion hk f ::: Nil) +++ (w ::: Nil)))
-> Fold ((v ::: Nil) +++ ((Companion hk g ::: Nil) +++ Nil))
~> Fold (Nil +++ ((Companion hk f ::: Nil) +++ (w ::: Nil)))
forall {k1} {kk :: CAT k1} {j :: k1} {k2 :: k1}
(ps :: Path kk j k2) (qs :: Path kk j k2).
Strictified ps qs -> Fold ps ~> Fold qs
unStr
( Nil ~> (y ::: (w ::: Nil))
Strictified Nil ((y ::: Nil) +++ (w ::: Nil))
unit' (Nil ~> (y ::: (w ::: Nil)))
-> ((Companion hk g ::: Nil) ~> (Companion hk g ::: Nil))
-> O Nil (Companion hk g ::: Nil)
~> O (y ::: (w ::: Nil)) (Companion hk g ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: Nil) ~> (Companion hk g ::: Nil)
Companion (Path hk) (g ::: Nil) ~> Companion (Path hk) (g ::: Nil)
cg (((Companion hk g ::: Nil) +++ Nil)
~> ((Companion hk g ::: Nil) +++ (y ::: (w ::: Nil))))
-> Obj (v ::: Nil)
-> O ((Companion hk g ::: Nil) +++ Nil) (v ::: Nil)
~> O ((Companion hk g ::: Nil) +++ (y ::: (w ::: Nil))) (v ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| Obj (v ::: Nil)
v
(((v ::: Nil) +++ ((Companion hk g ::: Nil) +++ Nil))
~> ((v ::: Nil)
+++ ((Companion hk g ::: Nil) +++ (y ::: (w ::: Nil)))))
-> (((v ::: Nil)
+++ ((Companion hk g ::: Nil) +++ (y ::: (w ::: Nil))))
~> ((v ::: Nil)
+++ ((x ::: (Companion hk f ::: Nil)) +++ (w ::: Nil))))
-> ((v ::: Nil) +++ ((Companion hk g ::: Nil) +++ Nil))
~> ((v ::: Nil)
+++ ((x ::: (Companion hk f ::: Nil)) +++ (w ::: Nil)))
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== Obj (w ::: Nil)
w Obj (w ::: Nil)
-> ((Companion hk g ::: (y ::: Nil))
~> (x ::: (Companion hk f ::: Nil)))
-> O (w ::: Nil) (Companion hk g ::: (y ::: Nil))
~> O (w ::: Nil) (x ::: (Companion hk f ::: Nil))
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk g ::: (y ::: Nil))
~> (x ::: (Companion hk f ::: Nil))
Strictified
((Companion hk g ::: Nil) +++ (y ::: Nil))
((x ::: Nil) +++ (Companion hk f ::: Nil))
sq' (((Companion hk g ::: (y ::: Nil)) +++ (w ::: Nil))
~> ((x ::: (Companion hk f ::: Nil)) +++ (w ::: Nil)))
-> Obj (v ::: Nil)
-> O ((Companion hk g ::: (y ::: Nil)) +++ (w ::: Nil)) (v ::: Nil)
~> O ((x ::: (Companion hk f ::: Nil)) +++ (w ::: Nil)) (v ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| Obj (v ::: Nil)
v
(((v ::: Nil) +++ ((Companion hk g ::: Nil) +++ Nil))
~> ((v ::: Nil)
+++ ((x ::: (Companion hk f ::: Nil)) +++ (w ::: Nil))))
-> (((v ::: Nil)
+++ ((x ::: (Companion hk f ::: Nil)) +++ (w ::: Nil)))
~> (Nil +++ ((Companion hk f ::: Nil) +++ (w ::: Nil))))
-> ((v ::: Nil) +++ ((Companion hk g ::: Nil) +++ Nil))
~> (Nil +++ ((Companion hk f ::: Nil) +++ (w ::: Nil)))
forall k (a :: k) (b :: k) (c :: k).
CategoryOf k =>
(a ~> b) -> (b ~> c) -> a ~> c
== Obj (w ::: Nil)
w Obj (w ::: Nil)
-> ((Companion hk f ::: Nil) ~> (Companion hk f ::: Nil))
-> O (w ::: Nil) (Companion hk f ::: Nil)
~> O (w ::: Nil) (Companion hk f ::: Nil)
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (Companion hk f ::: Nil) ~> (Companion hk f ::: Nil)
Companion (Path hk) (f ::: Nil) ~> Companion (Path hk) (f ::: Nil)
cf (((Companion hk f ::: Nil) +++ (w ::: Nil))
~> ((Companion hk f ::: Nil) +++ (w ::: Nil)))
-> ((v ::: (x ::: Nil)) ~> Nil)
-> O ((Companion hk f ::: Nil) +++ (w ::: Nil)) (v ::: (x ::: Nil))
~> O ((Companion hk f ::: Nil) +++ (w ::: Nil)) Nil
forall {s} {i1 :: s} (kk :: CAT s) (i2 :: s) (j :: s)
(a :: kk i2 j) (b :: kk i2 j) (c :: kk i1 i2) (d :: kk i1 i2).
Bicategory kk =>
(a ~> b) -> (c ~> d) -> O a c ~> O b d
|| (v ::: (x ::: Nil)) ~> Nil
Strictified ((v ::: Nil) +++ (x ::: Nil)) Nil
counit'
)
)
((Ob0 hk h, Ob0 hk k, Ob (O y (Companion hk g)),
Ob (O (Companion hk f) x)) =>
Sq '(v, g) '(w, f))
-> (O y (Companion hk g) ~> O (Companion hk f) x)
-> Sq '(v, g) '(w, f)
forall (i :: k) (j :: k) (ps :: hk i j) (qs :: hk i j) r.
((Ob0 hk i, Ob0 hk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
forall {s} (kk :: CAT s) (i :: s) (j :: s) (ps :: kk i j)
(qs :: kk i j) r.
Bicategory kk =>
((Ob0 kk i, Ob0 kk j, Ob ps, Ob qs) => r) -> (ps ~> qs) -> r
\\\ O y (Companion hk g) ~> O (Companion hk f) x
O q (Companion hk g) ~> O (Companion hk f) p
sq