Code to prove correctness of the leftpad program
-
Naturals (for measuring the length of lists)
- Addition
- Subtraction
-
Booleans (for equality- two terms of the same type are either equal or not)
- Logical AND
-
Equality typeclass (our leftpad will be polymorphic so the generic parameter must be an instance of the equality typeclass to be comparable)
-
List (duh)
- isPrefixOf
- isSuffixOf
- length
- repeat
- toString