mapId : (xs : Vect n a) -> map id xs = xs
`map` functoriality: identity preservation
Visibility: exportindexMapWithPos : (f : (Fin n -> a -> b)) -> (xs : Vect n a) -> (i : Fin n) -> index i (mapWithPos f xs) = f i (index i xs)
`mapWtihPos f` represents post-composition the tabulated function `f`
Visibility: exportmapTabulate : (f : (a -> b)) -> (g : (Fin n -> a)) -> tabulate (f . g) = map f (tabulate g)
`tabulate : (Fin n ->) -> Vect n` is a natural transformation
Visibility: exporttabulateConstantly : (x : a) -> tabulate (const x) = replicate len x
Tabulating with the constant function is replication
Visibility: exportmapRestrictedExtensional : (f : (a -> b)) -> (g : (a -> b)) -> (xs : Vect n a) -> ((i : Fin n) -> f (index i xs) = g (index i xs)) -> map f xs = map g xs
It's enough that two functions agree on the elements of a vector for the maps to agree
Visibility: exportmapExtensional : (f : (a -> b)) -> (g : (a -> b)) -> ((x : a) -> f x = g x) -> (xs : Vect n a) -> map f xs = map g xs
function extensionality is a congruence wrt map
Visibility: exportmapFusion : (f : (b -> c)) -> (g : (a -> b)) -> (xs : Vect n a) -> map f (map g xs) = map (f . g) xs
map-fusion property for vectors up to function extensionality
Visibility: exportmapWithElemExtensional : (xs : Vect n a) -> (f : ((x : a) -> (0 _ : Elem x xs) -> b)) -> (g : ((x : a) -> (0 _ : Elem x xs) -> b)) -> ((x : a) -> (0 pos : Elem x xs) -> f x pos = g x pos) -> mapWithElem xs f = mapWithElem xs g
function extensionality is a congruence wrt mapWithElem
Visibility: export