Exercises part 4
-
Implement
plusSuccRightSuccyourself. -
Proof that
minus n nequals zero for all natural numbersn. -
Proof that
minus n 0equals n for all natural numbersn -
Proof that
n * 1 = nand1 * n = nfor all natural numbersn. -
Proof that addition of natural numbers is commutative.
-
Implement a tail-recursive version of
mapfor vectors. -
Proof the following proposition:
mapAppend : (f : a -> b) -> (xs : List a) -> (ys : List a) -> map f (xs ++ ys) = map f xs ++ map f ys -
Use the proof from exercise 7 to implement again a function for zipping two
Tables, this time using a rewrite rule plusData.HList.(++)instead of custom functionappRows.