Tuples of types, and their categorical structure. #
Features #
TypeVec n
- n-tuples of typesα ⟹ β
- n-tuples of mapsf ⊚ g
- composition
Also, support functions for operating with n-tuples of types, such as:
append1 α β
- append typeβ
to n-tupleα
to obtain an (n+1)-tupledrop α
- drops the last element of an (n+1)-tuplelast α
- returns the last element of an (n+1)-tupleappendFun f g
- appends a function g to an n-tuple of functionsdropFun f
- drops the last function from an n+1-tuplelastFun f
- returns the last function of a tuple.
Since e.g. append1 α.drop α.last
is propositionally equal to α
but not definitionally equal
to it, we need support functions and lemmas to mediate between constructions.
Extensionality for arrows
Equations
identity of arrow composition
Equations
Instances For
arrow composition in the category of TypeVec
Equations
Instances For
retain only a n-length
prefix of the argument
Equations
Instances For
take the last value of a (n+1)-length
vector
Equations
Instances For
Equations
cases on (n+1)-length
vectors
Equations
Instances For
append an arrow and a function for arbitrary source and target type vectors
Equations
Instances For
append an arrow and a function as well as their respective source and target types / typevecs
Equations
Instances For
append an arrow and a function as well as their respective source and target types / typevecs
Equations
Instances For
split off the prefix of an arrow
Equations
Instances For
split off the last function of an arrow
Equations
Instances For
arrow in the category of 0-length
vectors
Equations
Instances For
turn an equality into an arrow
Equations
Instances For
turn an equality into an arrow, with reverse direction
Equations
Instances For
decompose a vector into its prefix appended with its last element
Equations
Instances For
stitch two bits of a vector back together
Equations
Instances For
cases distinction for 0-length type vector
Equations
Instances For
cases distinction for (n+1)-length type vector
Equations
Instances For
cases distinction for an arrow in the category of 0-length type vectors
Equations
Instances For
cases distinction for an arrow in the category of (n+1)-length type vectors
Equations
Instances For
specialized cases distinction for an arrow in the category of 0-length type vectors
Equations
Instances For
specialized cases distinction for an arrow in the category of (n+1)-length type vectors
Equations
Instances For
vector of equality on a product of vectors
Equations
Instances For
given F : TypeVec.{u} (n+1) → Type u
, curry F : Type u → TypeVec.{u} → Type u
,
i.e. its first argument can be fed in separately from the rest of the vector of arguments
Equations
Instances For
Equations
introduce a product where both components are the same
Equations
Instances For
given a predicate vector p
over vector α
, Subtype_ p
is the type of vectors
that contain an α
that satisfies p
Equations
Instances For
projection on Subtype_