Package list-last: The last list function
Information
name | list-last |
version | 1.38 |
description | The last list function |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
requires | bool list-def list-dest |
show | Data.Bool Data.List |
Files
- Package tarball list-last-1.38.tgz
- Theory file list-last.thy (included in the package tarball)
Defined Constant
- Data
- List
- last
- List
Theorems
⊦ ∀x. last (x :: []) = x
⊦ ∀h t. last (h :: t) = if null t then h else last t
⊦ ∀x1 x2 l. last (x1 :: x2 :: l) = last (x2 :: l)
Input Type Operators
- →
- bool
- Data
- List
- list
- List
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ¬
- cond
- ⊥
- ⊤
- List
- ::
- []
- null
- Bool
Assumptions
⊦ ⊤
⊦ null []
⊦ ⊥ ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ ⊥
⊦ (∃) = λp. p ((select) p)
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀h t. ¬null (h :: t)
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t1 t2. (if ⊥ then t1 else t2) = t2
⊦ ∀t1 t2. (if ⊤ then t1 else t2) = t1
⊦ (∧) = λ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)
⊦ ∀b f. ∃fn. fn [] = b ∧ ∀h t. fn (h :: t) = f h t (fn t)