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

Information

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

Files

Theorems

l1 l2 n. length l1 = n length l2 = n length (zip l1 l2) = n

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

l1 l2 n i.
    length l1 = n length l2 = n i < n
    nth (zip l1 l2) i = (nth l1 i, nth l2 i)

f l1 l2 n i.
    length l1 = n length l2 = n i < n
    nth (zipWith f l1 l2) i = f (nth l1 i) (nth l2 i)

Input Type Operators

Input Constants

Assumptions

length [] = 0

p. p

m. ¬(m < 0)

n. 0 < suc n

(¬) = λp. p

() = λp. p = λx.

t. t

t. 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. nth (h :: t) 0 = h

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

l1 l2. zip l1 l2 = zipWith , l1 l2

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

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

m n. suc m = suc n m = n

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

h t n. n < length t nth (h :: t) (suc n) = nth t n

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