Package list-last-thm: list-last-thm
Information
name | list-last-thm |
version | 1.12 |
description | list-last-thm |
author | Joe Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2011-09-21 |
show | Data.Bool |
Files
- Package tarball list-last-thm-1.12.tgz
- Theory file list-last-thm.thy (included in the package tarball)
Theorems
⊦ ∀l. ¬(l = Data.List.[]) ⇒ Set.∈ (Data.List.last l) (Data.List.toSet l)
⊦ ∀p q.
Data.List.last (Data.List.@ p q) =
if q = Data.List.[] then Data.List.last p else Data.List.last q
⊦ (∀h. Data.List.last (Data.List.:: h Data.List.[]) = h) ∧
∀h k t.
Data.List.last (Data.List.:: h (Data.List.:: k t)) =
Data.List.last (Data.List.:: k t)
Input Type Operators
- →
- bool
- Data
- List
- Data.List.list
- List
- Set
- Set.set
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∨
- ¬
- cond
- F
- T
- List
- Data.List.::
- Data.List.@
- Data.List.[]
- Data.List.last
- Data.List.toSet
- Bool
- Set
- Set.∅
- Set.insert
- Set.∈
Assumptions
⊦ T
⊦ F ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ F
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. T
⊦ ∀x. x = x ⇔ T
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ T) ∨ (t ⇔ F)
⊦ ∀h t. ¬(Data.List.:: h t = Data.List.[])
⊦ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀h t.
Data.List.last (Data.List.:: h t) =
if t = Data.List.[] then h else Data.List.last t
⊦ ∀t1 t2. (if T then t1 else t2) = t1 ∧ (if F then t1 else t2) = t2
⊦ ∀l m.
Data.List.@ l m = Data.List.[] ⇔ l = Data.List.[] ∧ m = Data.List.[]
⊦ (∀t. ¬¬t ⇔ t) ∧ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ Data.List.toSet Data.List.[] = Set.∅ ∧
∀h t.
Data.List.toSet (Data.List.:: h t) = Set.insert h (Data.List.toSet t)
⊦ ∀x y s. Set.∈ x (Set.insert y s) ⇔ x = y ∨ Set.∈ x s
⊦ ∀P. P Data.List.[] ∧ (∀a0 a1. P a1 ⇒ P (Data.List.:: a0 a1)) ⇒ ∀x. P x
⊦ ∀P c x y. P (if c then x else y) ⇔ (c ⇒ P x) ∧ (¬c ⇒ P y)
⊦ (∀l. Data.List.@ Data.List.[] l = l) ∧
∀l h t.
Data.List.@ (Data.List.:: h t) l = Data.List.:: h (Data.List.@ t l)
⊦ ∀t. ((T ⇔ t) ⇔ t) ∧ ((t ⇔ T) ⇔ t) ∧ ((F ⇔ t) ⇔ ¬t) ∧ ((t ⇔ F) ⇔ ¬t)
⊦ ∀t. (T ∧ t ⇔ t) ∧ (t ∧ T ⇔ t) ∧ (F ∧ t ⇔ F) ∧ (t ∧ F ⇔ F) ∧ (t ∧ t ⇔ t)
⊦ ∀t. (T ∨ t ⇔ T) ∧ (t ∨ T ⇔ T) ∧ (F ∨ t ⇔ t) ∧ (t ∨ F ⇔ t) ∧ (t ∨ t ⇔ t)
⊦ ∀t. (T ⇒ t ⇔ t) ∧ (t ⇒ T ⇔ T) ∧ (F ⇒ t ⇔ T) ∧ (t ⇒ t ⇔ T) ∧ (t ⇒ F ⇔ ¬t)