Package list-set-def: Definition of list to set conversions
Information
name | list-set-def |
version | 1.35 |
description | Definition of list to set conversions |
author | Joe Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2012-06-08 |
requires | bool list-def list-length set |
show | Data.Bool Data.List Number.Natural Set |
Files
- Package tarball list-set-def-1.35.tgz
- Theory file list-set-def.thy (included in the package tarball)
Defined Constants
- Data
- List
- all
- exists
- fromSet
- member
- toSet
- List
Theorems
⊦ toSet [] = ∅
⊦ ∀p. all p []
⊦ ∀x. ¬member x []
⊦ ∀p. ¬exists p []
⊦ ∀h t. toSet (h :: t) = insert h (toSet t)
⊦ ∀s. finite s ⇒ toSet (fromSet s) = s ∧ length (fromSet s) = size s
⊦ ∀p h t. all p (h :: t) ⇔ p h ∧ all p t
⊦ ∀p h t. exists p (h :: t) ⇔ p h ∨ exists p t
⊦ ∀x h t. member x (h :: t) ⇔ x = h ∨ member x t
Input Type Operators
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
- Set
- set
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- cond
- ⊥
- ⊤
- List
- ::
- []
- length
- Bool
- Number
- Natural
- suc
- zero
- Natural
- Set
- ∅
- finite
- insert
- ∈
- size
Assumptions
⊦ ⊤
⊦ length [] = 0
⊦ size ∅ = 0
⊦ ⊥ ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ ⊥
⊦ (∃) = λp. p ((select) p)
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. (t ⇔ ⊤) ⇔ t
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. (t ⇔ ⊥) ⇔ ¬t
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t1 t2. (if ⊥ then t1 else t2) = t2
⊦ ∀h t. length (h :: t) = suc (length t)
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀p. (∀x. ∃y. p x y) ⇔ ∃y. ∀x. p x (y x)
⊦ ∀x s.
finite s ⇒ size (insert x s) = if x ∈ s then size s else suc (size s)
⊦ ∀b f. ∃fn. fn [] = b ∧ ∀h t. fn (h :: t) = f h t (fn t)
⊦ ∀p.
p ∅ ∧ (∀x s. p s ∧ ¬(x ∈ s) ∧ finite s ⇒ p (insert x s)) ⇒
∀s. finite s ⇒ p s