Package list-nub-def: Definition of the list nub function

Information

namelist-nub-def
version1.29
descriptionDefinition of the list nub function
authorJoe Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2012-01-28
requiresbool
list-def
showData.Bool
Data.List

Files

Defined Constants

Theorems

nubReverse [] = []

l. nub l = reverse (nubReverse (reverse l))

h t.
    nubReverse (h :: t) =
    if member h t then nubReverse t else h :: nubReverse t

Input Type Operators

Input Constants

Assumptions

T

() = λp. p ((select) p)

() = λp. p = λx. T

() = λp q. p q p

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

p. (x. y. p x y) y. x. p x (y x)

NIL' CONS'.
    fn. fn [] = NIL' a0 a1. fn (a0 :: a1) = CONS' a0 a1 (fn a1)