Package list-member: Definitions and theorems about the list member function
Information
name | list-member |
version | 1.15 |
description | Definitions and theorems about the list member function |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
show | Data.Bool Data.List Number.Natural |
Files
- Package tarball list-member-1.15.tgz
- Theory file list-member.thy (included in the package tarball)
Defined Constant
- Data
- List
- member
- List
Theorems
⊦ ∀x l. member x l ⇔ Set.∈ x (toSet l)
⊦ ∀l x. member x (reverse l) ⇔ member x l
⊦ ∀l n. n < length l ⇒ member (nth n l) l
⊦ ∀s. Set.finite s ⇒ ∀x. member x (fromSet s) ⇔ Set.∈ x s
⊦ ∀P l. (∀x. member x l ⇒ P x) ⇔ all P l
⊦ ∀P l. (∃x. P x ∧ member x l) ⇔ exists P l
⊦ ∀P l x. member x (filter P l) ⇔ P x ∧ member x l
⊦ ∀x l1 l2. member x (l1 @ l2) ⇔ member x l1 ∨ member x l2
⊦ ∀l x. member x l ⇔ ∃i. i < length l ∧ x = nth i l
⊦ ∀f y l. member y (map f l) ⇔ ∃x. member x l ∧ y = f x
⊦ ∀P Q l. (∀x. member x l ∧ P x ⇒ Q x) ∧ all P l ⇒ all Q l
⊦ ∀P Q l. (∀x. member x l ∧ P x ⇒ Q x) ∧ exists P l ⇒ exists Q l
⊦ (∀x. member x [] ⇔ F) ∧ ∀x h t. member x (h :: t) ⇔ x = h ∨ member x t
Input Type Operators
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
- Set
- Set.set
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- cond
- F
- T
- List
- ::
- @
- []
- all
- exists
- filter
- fromSet
- length
- map
- nth
- reverse
- toSet
- Bool
- Function
- Function.id
- Number
- Natural
- <
- suc
- zero
- Natural
- Set
- Set.∅
- Set.finite
- Set.insert
- Set.∈
Assumptions
⊦ T
⊦ F ⇔ ∀p. p
⊦ ∀x. ¬Set.∈ x Set.∅
⊦ ∀x. Function.id x = x
⊦ ∀n. 0 < suc n
⊦ (¬) = λp. p ⇒ F
⊦ (∃) = λP. P ((select) P)
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (∃x. t) ⇔ t
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λp. p = λx. T
⊦ ∀x. x = x ⇔ T
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ T) ∨ (t ⇔ F)
⊦ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ ∀s. Set.finite s ⇒ toSet (fromSet s) = s
⊦ ∀x y. x = y ⇒ y = x
⊦ ∀t1 t2. t1 ∨ t2 ⇔ t2 ∨ t1
⊦ ∀m. m = 0 ∨ ∃n. m = suc n
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ ∀P. ¬(∀x. P x) ⇔ ∃x. ¬P x
⊦ ∀P. ¬(∃x. P x) ⇔ ∀x. ¬P x
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀m n. suc m < suc n ⇔ m < n
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀P Q. P ∧ (∃x. Q x) ⇔ ∃x. P ∧ Q x
⊦ ∀P Q. P ∨ (∃x. Q x) ⇔ ∃x. P ∨ Q x
⊦ ∀P Q. (∃x. P x) ∧ Q ⇔ ∃x. P x ∧ Q
⊦ ∀P Q. (∃x. P x) ∨ Q ⇔ ∃x. P x ∨ Q
⊦ ∀t1 t2 t3. t1 ∨ t2 ∨ t3 ⇔ (t1 ∨ t2) ∨ t3
⊦ length [] = 0 ∧ ∀h t. length (h :: t) = suc (length t)
⊦ ∀P. P 0 ∧ (∀n. P n ⇒ P (suc n)) ⇒ ∀n. P n
⊦ (∀t. ¬¬t ⇔ t) ∧ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ toSet [] = Set.∅ ∧ ∀h t. toSet (h :: t) = Set.insert h (toSet t)
⊦ ∀x y s. Set.∈ x (Set.insert y s) ⇔ x = y ∨ Set.∈ x s
⊦ ∀P Q. (∃x. P x) ∨ (∃x. Q x) ⇔ ∃x. P x ∨ Q x
⊦ ∀P. P [] ∧ (∀a0 a1. P a1 ⇒ P (a0 :: a1)) ⇒ ∀x. P x
⊦ reverse [] = [] ∧ ∀x l. reverse (x :: l) = reverse l @ x :: []
⊦ ∀P c x y. P (if c then x else y) ⇔ (c ⇒ P x) ∧ (¬c ⇒ P y)
⊦ ∀NIL' CONS'.
∃fn. fn [] = NIL' ∧ ∀a0 a1. fn (a0 :: a1) = CONS' a0 a1 (fn a1)
⊦ (∀m. m < 0 ⇔ F) ∧ ∀m n. m < suc n ⇔ m = n ∨ m < n
⊦ (∀l. [] @ l = l) ∧ ∀l h t. (h :: t) @ l = h :: t @ l
⊦ (∀f. map f [] = []) ∧ ∀f h t. map f (h :: t) = f h :: map f t
⊦ (∀P. all P [] ⇔ T) ∧ ∀P h t. all P (h :: t) ⇔ P h ∧ all P t
⊦ (∀P. exists P [] ⇔ F) ∧ ∀P h t. exists P (h :: t) ⇔ P h ∨ exists P t
⊦ ∀t. ((T ⇔ t) ⇔ t) ∧ ((t ⇔ T) ⇔ t) ∧ ((F ⇔ t) ⇔ ¬t) ∧ ((t ⇔ F) ⇔ ¬t)
⊦ (∀P. filter P [] = []) ∧
∀P h t. filter P (h :: t) = if P h then h :: filter P t else filter P t
⊦ ∀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 ∨ F ⇔ t) ∧ (t ∨ t ⇔ t)
⊦ (∀h t. nth 0 (h :: t) = h) ∧
∀h t n. n < length t ⇒ nth (suc n) (h :: t) = nth n t
⊦ ∀t. (T ⇒ t ⇔ t) ∧ (t ⇒ T ⇔ T) ∧ (F ⇒ t ⇔ T) ∧ (t ⇒ t ⇔ T) ∧ (t ⇒ F ⇔ ¬t)
⊦ ∀p q r.
(p ∨ q ⇔ q ∨ p) ∧ ((p ∨ q) ∨ r ⇔ p ∨ q ∨ r) ∧ (p ∨ q ∨ r ⇔ q ∨ p ∨ r) ∧
(p ∨ p ⇔ p) ∧ (p ∨ p ∨ q ⇔ p ∨ q)