name | list-append |
version | 1.11 |
description | Definitions and theorems about the list append function |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
show | Data.Bool Data.List |
⊦ ∀l. l @ [] = l
⊦ ∀l m. null (l @ m) ⇔ null l ∧ null m
⊦ ∀l m. length (l @ m) = Number.Natural.+ (length l) (length m)
⊦ ∀l1 l2. toSet (l1 @ l2) = Set.∪ (toSet l1) (toSet l2)
⊦ ∀l m n. l @ m @ n = (l @ m) @ n
⊦ ∀l m. head (l @ m) = if l = [] then head m else head l
⊦ ∀l m. l @ m = [] ⇔ l = [] ∧ m = []
⊦ (∀l. [] @ l = l) ∧ ∀l h t. (h :: t) @ l = h :: t @ l
⊦ T
⊦ F ⇔ ∀p. p
⊦ (~) = λp. p ⇒ F
⊦ (∃) = λP. P ((select) P)
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. T
⊦ ∀x. x = x ⇔ T
⊦ ∀l. null l ⇔ l = []
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀h t. ¬(h :: t = [])
⊦ ∀h t. head (h :: t) = h
⊦ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀x s. Set.∪ (Set.insert x Set.∅) s = Set.insert x s
⊦ (∀s. Set.∪ Set.∅ s = s) ∧ ∀s. Set.∪ s Set.∅ = s
⊦ ∀P. (∀x y. P x y) ⇔ ∀y x. P x y
⊦ ∀s t u. Set.∪ (Set.∪ s t) u = Set.∪ s (Set.∪ t u)
⊦ ∀t1 t2. (if T then t1 else t2) = t1 ∧ (if F then t1 else t2) = t2
⊦ length [] = 0 ∧ ∀h t. length (h :: t) = Number.Natural.suc (length t)
⊦ toSet [] = Set.∅ ∧ ∀h t. toSet (h :: t) = Set.insert h (toSet 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) ⇔ ¬t) ∧ ((t ⇔ F) ⇔ ¬t)
⊦ ∀t. (T ∧ t ⇔ t) ∧ (t ∧ T ⇔ t) ∧ (F ∧ t ⇔ F) ∧ (t ∧ F ⇔ F) ∧ (t ∧ t ⇔ t)
⊦ (∀n. Number.Natural.+ 0 n = n) ∧ (∀m. Number.Natural.+ m 0 = m) ∧
(∀m n.
Number.Natural.+ (Number.Natural.suc m) n =
Number.Natural.suc (Number.Natural.+ m n)) ∧
∀m n.
Number.Natural.+ m (Number.Natural.suc n) =
Number.Natural.suc (Number.Natural.+ m n)