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.
n-tuples of types, as a category
Equations
Instances For
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
PredLast α p x predicates p of the last element of x : α.append1 β.
Equations
Instances For
RelLast α r x y says that p the last elements of x y : α.append1 β are related by r and
all the other elements are equal.
Equations
Instances For
vector of equality on a product of vectors
Equations
Instances For
predicate on a type vector to constrain only the last object
Equations
Instances For
predicate on the product of two type vectors to constrain only their last object
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
projection for a repeat vector
Equations
Instances For
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_