Package list-last-thm: Properties of the last list function
Information
name | list-last-thm |
version | 1.33 |
description | Properties of the last list function |
author | Joe Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2012-02-07 |
requires | bool set list-def list-thm list-set list-append list-last-def |
show | Data.Bool Data.List Set |
Files
- Package tarball list-last-thm-1.33.tgz
- Theory file list-last-thm.thy (included in the package tarball)
Theorems
⊦ ∀h. last (h :: []) = h
⊦ ∀l. ¬(l = []) ⇒ last l ∈ toSet l
⊦ ∀h k t. last (h :: k :: t) = last (k :: t)
⊦ ∀p q. last (p @ q) = if q = [] then last p else last q
Input Type Operators
- →
- bool
- Data
- List
- list
- List
- Set
- set
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∨
- ¬
- cond
- ⊥
- ⊤
- List
- ::
- @
- []
- last
- toSet
- Bool
- Set
- insert
- ∈
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ ∀t. t ⇒ t
⊦ ⊥ ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ ⊥
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. ¬¬t ⇔ t
⊦ ∀t. (⊤ ⇔ t) ⇔ t
⊦ ∀t. ⊥ ∧ t ⇔ ⊥
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. t ∧ ⊤ ⇔ t
⊦ ∀t. ⊥ ⇒ t ⇔ ⊤
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀t. t ∨ ⊤ ⇔ ⊤
⊦ ∀l. [] @ l = l
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀t. t ⇒ ⊥ ⇔ ¬t
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀t1 t2. (if ⊥ then t1 else t2) = t2
⊦ ∀t1 t2. (if ⊤ then t1 else t2) = t1
⊦ ∀h t. ¬(h :: t = [])
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀h t. toSet (h :: t) = insert h (toSet t)
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀h t. last (h :: t) = if t = [] then h else last t
⊦ ∀l h t. (h :: t) @ l = h :: t @ l
⊦ ∀l m. l @ m = [] ⇔ l = [] ∧ m = []
⊦ ∀x y s. x ∈ insert y s ⇔ x = y ∨ x ∈ s
⊦ ∀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)