0 | module Data.Container.Base.Properties.Definitions
5 | import Data.Container.Base.Object.Definition
6 | import Data.Container.Base.Morphism.Definition
7 | import Data.Container.Base.Extension.Definition
24 | data InterfaceOnPositions : (c : Cont) -> (i : Type -> Type) -> Type where
26 | MkI : ((s : c.Shp) -> i (c.Pos s)) -> InterfaceOnPositions c i
33 | IsFinite : Cont -> Type
34 | IsFinite c = InterfaceOnPositions c Finite
38 | data IsNonDep : Cont -> Type where
39 | MkIsNonDep : (s, p : Type) -> IsNonDep ((_ : s) !> p)
44 | data IsConst : Cont -> Type where
45 | ItIsConst : (p : Type) -> IsConst ((_ : p) !> p)
49 | data IsFlat : Cont -> Type where
50 | ItIsFlat : (s : Type) -> IsFlat ((_ : s) !> Unit)
53 | data IsSharp : Cont -> Type where
54 | ItIsSharp : (s : Type) -> IsSharp ((_ : s) !> Void)
64 | NaperianCont : Type -> Cont
65 | NaperianCont pos = (_ : Unit) !> pos
72 | data IsNaperian : Cont -> Type where
73 | MkIsNaperian : (pos : Type) -> IsNaperian (NaperianCont pos)
76 | LogHelper : IsNaperian c => Type
77 | LogHelper @{MkIsNaperian pos} = pos
80 | Log : (0 c : Cont) -> IsNaperian c => Type
81 | Log _ @{MkIsNaperian pos} = pos
84 | naperianPosEq : IsNaperian c => {0 x, y : c.Shp} -> c.Pos x = c.Pos y
85 | naperianPosEq @{MkIsNaperian _} = Refl
91 | CubicalCont : Nat -> Cont
92 | CubicalCont n = (_ : Unit) !> Fin n
103 | data IsCubical : Cont -> Type where
104 | MkIsCubical : (n : Nat) -> IsCubical (CubicalCont n)
107 | dimHelper : IsCubical c -> Nat
108 | dimHelper (MkIsCubical n) = n
112 | dim : (0 c : Cont) -> IsCubical c => Nat
113 | dim _ @{ic} = dimHelper ic
117 | isCubicalContEq : IsCubical d -> d = ((_ : Unit) !> (Fin (dim {c=d})))
118 | isCubicalContEq (MkIsCubical n) = Refl
121 | namespace IsFoldable
126 | interface IsFoldable (0 c : Cont) where
127 | constructor MkIsFoldable
128 | mapToList : c =%> ((n : Nat) !> Fin n)
131 | namespace IsConcrete
135 | interface IsConcrete (0 c : Cont) where
136 | constructor MkIsConcrete
137 | concreteType : Type -> Type
138 | concreteFunctor : Functor concreteType
139 | fromConcreteTy : concreteType a -> Ext c a
140 | toConcreteTy : Ext c a -> concreteType a
142 | public export prefix 0 >#
, #>
145 | (>#) : IsConcrete c => concreteType {c=c} a -> Ext c a
146 | (>#) = fromConcreteTy
149 | (#>) : IsConcrete c => Ext c a -> concreteType {c=c} a
150 | (#>) = toConcreteTy