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