Package list-zip-thm: Properties of the list zip function

Information

namelist-zip-thm
version1.1
descriptionProperties of the list zip function
authorJoe Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2012-03-18
requiresbool
list-def
list-length
list-zip-def
natural
showData.Bool
Data.List
Number.Natural

Files

Theorem

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

Input Type Operators

Input Constants

Assumptions

length [] = 0

p. p

(¬) = λp. p

() = λp. p = λx.

t. t

t. t t

t. t

t. t

t. t t

n. ¬(suc n = 0)

f. zipWith f [] [] = []

() = λp q. p q p

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

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

m n. suc m = suc n m = n

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

p. p [] (h t. p t p (h :: t)) l. p l

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