Package list-zipwith-thm: Properties of the list zipWith function
Information
name | list-zipwith-thm |
version | 1.24 |
description | Properties of the list zipWith function |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2011-11-27 |
requires | bool natural list-def list-length list-zipwith-def |
show | Data.Bool Data.List Number.Natural |
Files
- Package tarball list-zipwith-thm-1.24.tgz
- Theory file list-zipwith-thm.thy (included in the package tarball)
Theorem
⊦ ∀f l1 l2 n. length l1 = n ∧ length l2 = n ⇒ length (zipWith f l1 l2) = n
Input Type Operators
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ¬
- F
- T
- List
- ::
- []
- length
- zipWith
- Bool
- Number
- Natural
- suc
- zero
- Natural
Assumptions
⊦ T
⊦ length [] = 0
⊦ F ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ F
⊦ (∀) = λp. p = λx. T
⊦ ∀t. F ∧ t ⇔ F
⊦ ∀t. T ∧ t ⇔ t
⊦ ∀t. t ∧ F ⇔ F
⊦ ∀t. F ⇒ 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 T T
⊦ ∀m n. suc m = suc n ⇔ m = n
⊦ ∀P. P 0 ∧ (∀n. P n ⇒ P (suc n)) ⇒ ∀n. P n
⊦ ∀P. P [] ∧ (∀a0 a1. P a1 ⇒ P (a0 :: a1)) ⇒ ∀x. P x
⊦ ∀f h1 h2 t1 t2.
length t1 = length t2 ⇒
zipWith f (h1 :: t1) (h2 :: t2) = f h1 h2 :: zipWith f t1 t2