Package list-zipwith: The list zipWith function

Information

namelist-zipwith
version1.29
descriptionThe list zipWith function
authorJoe Hurd <joe@gilith.com>
licenseMIT
requiresbool
natural
list-def
list-dest
list-length
showData.Bool
Data.List
Number.Natural

Files

Defined Constant

Theorems

f. zipWith f [] [] = []

f l1 l2 n. length l1 = n length l2 = n length (zipWith f l1 l2) = n

f h1 h2 t1 t2.
    length t1 = length t2
    zipWith f (h1 :: t1) (h2 :: t2) = f h1 h2 :: zipWith f t1 t2

Input Type Operators

Input Constants

Assumptions

T

length [] = 0

F p. p

(¬) = λp. p F

() = λp. p ((select) p)

t. (x. t) t

() = λp. p = λx. T

t. F t F

t. T t t

t. t F F

t. F t T

t. T t t

t. t T T

n. ¬(suc n = 0)

() = λp q. p q p

h t. head (h :: t) = h

h t. tail (h :: t) = t

h t. length (h :: t) = suc (length t)

() = λp q. (λf. f p q) = λf. f T T

() = λp. q. (x. p x q) q

m n. suc m = suc n m = n

p. (x. y. p x y) y. x. p x (y x)

P. P 0 (n. P n P (suc n)) n. P n

P. P [] (a0 a1. P a1 P (a0 :: a1)) x. P x

NIL' CONS'.
    fn. fn [] = NIL' a0 a1. fn (a0 :: a1) = CONS' a0 a1 (fn a1)