Package list-nub-thm: Properties of the list nub function
Information
name | list-nub-thm |
version | 1.51 |
description | Properties of the list nub function |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2012-08-06 |
requires | bool list-def list-length list-nub-def list-reverse list-set natural set |
show | Data.Bool Data.List Number.Natural Set |
Files
- Package tarball list-nub-thm-1.51.tgz
- Theory file list-nub-thm.thy (included in the package tarball)
Theorems
⊦ ∀l. nub (nub l) = nub l
⊦ ∀l. nubReverse (nubReverse l) = nubReverse l
⊦ ∀l. toSet (nub l) = toSet l
⊦ ∀l. toSet (nubReverse l) = toSet l
⊦ ∀l. length (nub l) ≤ length l
⊦ ∀l. length (nubReverse l) ≤ length l
⊦ ∀l x. member x (nub l) ⇔ member x l
⊦ ∀l x. member x (nubReverse l) ⇔ member x l
Input Type Operators
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
- Set
- set
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∨
- ¬
- cond
- ⊥
- ⊤
- List
- ::
- []
- length
- member
- nub
- nubReverse
- reverse
- toSet
- Bool
- Number
- Natural
- ≤
- suc
- zero
- Natural
- Set
- ∈
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ length [] = 0
⊦ nubReverse [] = []
⊦ ∀n. n ≤ n
⊦ ⊥ ⇔ ∀p. p
⊦ ∀x. ¬member x []
⊦ ∀t. t ∨ ¬t
⊦ (¬) = λp. p ⇒ ⊥
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. (t ⇔ ⊤) ⇔ t
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀t. t ∨ ⊤ ⇔ ⊤
⊦ ∀l. reverse (reverse l) = l
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀l. length (reverse l) = length l
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀l. nub l = reverse (nubReverse (reverse l))
⊦ ∀t1 t2. (if ⊥ then t1 else t2) = t2
⊦ ∀t1 t2. (if ⊤ then t1 else t2) = t1
⊦ ∀x y. x = y ⇔ y = x
⊦ ∀h t. length (h :: t) = suc (length t)
⊦ ∀l x. member x l ⇔ x ∈ toSet l
⊦ ∀l x. member x (reverse l) ⇔ member x l
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀m n. suc m ≤ suc n ⇔ m ≤ n
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀s t. (∀x. x ∈ s ⇔ x ∈ t) ⇔ s = t
⊦ ∀m n. m ≤ suc n ⇔ m = suc n ∨ m ≤ n
⊦ ∀x h t. member x (h :: t) ⇔ x = h ∨ member x t
⊦ ∀h t.
nubReverse (h :: t) =
if member h t then nubReverse t else h :: nubReverse t
⊦ ∀p. p [] ∧ (∀h t. p t ⇒ p (h :: t)) ⇒ ∀l. p l