name | list-zipwith |
version | 1.0 |
description | Definitions and theorems about the list zipWith function |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
show | Data.Bool Data.List |
⊦ ∀f l1 l2 n. length l1 = n ∧ length l2 = n ⇒ length (zipWith f l1 l2) = n
⊦ (∀f. zipWith f [] [] = []) ∧
∀f h1 h2 t1 t2.
zipWith f (h1 :: t1) (h2 :: t2) = f h1 h2 :: zipWith f t1 t2
⊦ T
⊦ F ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ F
⊦ (∃) = λP. P ((select) P)
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λP. P = λx. T
⊦ ∀x. x = x ⇔ T
⊦ ∀n. ¬(Number.Natural.suc n = Number.Numeral.zero)
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀h t. tail (h :: t) = t
⊦ ∀t h. head (h :: t) = h
⊦ ∀m. m = Number.Numeral.zero ∨ ∃n. m = Number.Natural.suc n
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀m n. Number.Natural.suc m = Number.Natural.suc n ⇔ m = n
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ length [] = Number.Numeral.zero ∧
∀h t. length (h :: t) = Number.Natural.suc (length t)
⊦ ∀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)
⊦ ∀t. (T ∧ t ⇔ t) ∧ (t ∧ T ⇔ t) ∧ (F ∧ t ⇔ F) ∧ (t ∧ F ⇔ F) ∧ (t ∧ t ⇔ t)
⊦ ∀t. (T ⇒ t ⇔ t) ∧ (t ⇒ T ⇔ T) ∧ (F ⇒ t ⇔ T) ∧ (t ⇒ t ⇔ T) ∧ (t ⇒ F ⇔ ¬t)