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.
arrow in the category of TypeVec
Instances For
arrow in the category of TypeVec
Instances For
Extensionality for arrows
identity of arrow composition
Instances For
arrow composition in the category of TypeVec
Instances For
arrow composition in the category of TypeVec
Instances For
Support for extending a TypeVec by one element.
Instances For
Support for extending a TypeVec by one element.
Instances For
retain only a n-length prefix of the argument
Instances For
take the last value of a (n+1)-length vector
Instances For
cases on (n+1)-length vectors
Instances For
append an arrow and a function for arbitrary source and target type vectors
Instances For
append an arrow and a function as well as their respective source and target types / typevecs
Instances For
append an arrow and a function as well as their respective source and target types / typevecs
Instances For
split off the prefix of an arrow
Instances For
split off the last function of an arrow
Instances For
arrow in the category of 0-length vectors
Instances For
turn an equality into an arrow
Instances For
turn an equality into an arrow, with reverse direction
Instances For
decompose a vector into its prefix appended with its last element
Instances For
stitch two bits of a vector back together
Instances For
cases distinction for 0-length type vector
Instances For
cases distinction for (n+1)-length type vector
Instances For
cases distinction for an arrow in the category of 0-length type vectors
Instances For
cases distinction for an arrow in the category of (n+1)-length type vectors
Instances For
specialized cases distinction for an arrow in the category of 0-length type vectors
Instances For
specialized cases distinction for an arrow in the category of (n+1)-length type vectors
Instances For
PredLast α p x predicates p of the last element of x : α.append1 β.
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.
Instances For
repeat n t is a n-length type vector that contains n occurrences of t
Instances For
prod α β is the pointwise product of the components of α and β
Instances For
prod α β is the pointwise product of the components of α and β
Instances For
vector of equality on a product of vectors
Instances For
predicate on a type vector to constrain only the last object
Instances For
predicate on the product of two type vectors to constrain only their last object
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
Instances For
arrow to remove one element of a repeat vector
Instances For
projection for a repeat vector
Instances For
left projection of a prod vector
Instances For
right projection of a prod vector
Instances For
introduce a product where both components are the same
Instances For
constructor for prod
Instances For
given a predicate vector p over vector α, Subtype_ p is the type of vectors
that contain an α that satisfies p
Instances For
projection on Subtype_
Instances For
arrow that rearranges the type of Subtype_ to turn a subtype of vector into
a vector of subtypes
Instances For
arrow that rearranges the type of Subtype_ to turn a vector of subtypes
into a subtype of vector
Instances For
similar to toSubtype adapted to relations (i.e. predicate on product)
Instances For
similar to of_subtype adapted to relations (i.e. predicate on product)