Package list-filter-thm: Properties of the list filter function

Information

namelist-filter-thm
version1.32
descriptionProperties of the list filter function
authorJoe Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2012-02-07
requiresbool
function
natural
set
list-def
list-length
list-set
list-append
list-map
list-quant
list-filter-def
showData.Bool
Data.List
Function
Number.Natural
Set

Files

Theorems

p l. length (filter p l) length l

p l. toSet (filter p l) toSet l

P l1 l2. filter P (l1 @ l2) = filter P l1 @ filter P l2

P f l. filter P (map f l) = map f (filter (P f) l)

p q l. all p (filter q l) all (λx. q x p x) l

p q l. exists p (filter q l) exists (λx. q x p x) l

Input Type Operators

Input Constants

Assumptions

¬

n. n n

s. s s

p. all p []

p. p

n. n suc n

p. ¬exists p []

(¬) = λp. p

t. (x. t) t

() = λp. p = λx.

t. ( t) t

t. t

t. t t

t. t

t. t t

t. t t

l. [] @ l = l

f. map f [] = []

P. filter P [] = []

t. ( t) ¬t

s t. s s t

s t. s t s

() = λp q. p q p

t1 t2. (if then t1 else t2) = t2

t1 t2. (if then t1 else t2) = t1

h t. length (h :: t) = suc (length t)

() = λp q. (λf. f p q) = λf. f

() = λp. q. (x. p x q) q

h t. toSet (h :: t) = insert h (toSet t)

x s. insert x s = insert x s

m n. suc m suc n m n

f g x. (f g) x = f (g x)

m n p. m n n p m p

l h t. (h :: t) @ l = h :: t @ l

s t u. s t t u s u

f h t. map f (h :: t) = f h :: map f t

p h t. all p (h :: t) p h all p t

p h t. exists p (h :: t) p h exists p t

s t u. s t u s u t u

P. P [] (a0 a1. P a1 P (a0 :: a1)) x. P x

P h t. filter P (h :: t) = if P h then h :: filter P t else filter P t

p c x y. p (if c then x else y) (c p x) (¬c p y)