Package list-filter: Definitions and theorems about the list filter function

Information

namelist-filter
version1.0
description Definitions and theorems about the list filter function
authorJoe Hurd <joe@gilith.com>
licenseMIT
showData.Bool
Data.List
Function

Files

Defined Constant

Theorems

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 o f) l)

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

Input Type Operators

Input Constants

Assumptions

T

F p. p

(¬) = λp. p F

() = λP. P ((select) P)

t. (x. t) t

() = λP. P = λx. T

x. x = x T

() = λp q. p q p

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

() = λP. q. (x. P x q) q

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

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

P. P [] (a0 a1. P a1 P (a0 :: a1)) x. P 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)

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

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