Package list-last-thm: Properties of the last list function
Information
name | list-last-thm |
version | 1.41 |
description | Properties of the last list function |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory exported on 2017-02-14 |
checksum | 045e3bbf0e42a3327e0e4b40b48bfb1463e2ee6a |
requires | bool list-append list-def list-dest list-last-def |
show | Data.Bool Data.List |
Files
- Package tarball list-last-thm-1.41.tgz
- Theory source file list-last-thm.thy (included in the package tarball)
Theorems
⊦ ∀x. last (x :: []) = x
⊦ ∀l1 l2. last (l1 @ l2) = if null l2 then last l1 else last l2
⊦ ∀x1 x2 l. last (x1 :: x2 :: l) = last (x2 :: l)
⊦ ∀h t l. last (l @ h :: t) = last (h :: t)
External Type Operators
- →
- bool
- Data
- List
- list
- List
External Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ¬
- cond
- ⊥
- ⊤
- List
- ::
- @
- []
- last
- null
- Bool
Assumptions
⊦ ⊤
⊦ null []
⊦ ⊥ ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ ⊥
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. t ∧ ⊥ ⇔ ⊥
⊦ ∀l. [] @ l = l
⊦ ∀l. l @ [] = l
⊦ ∀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 ⊤ ⊤
⊦ ∀l1 l2. null (l1 @ l2) ⇔ null l1 ∧ null l2
⊦ ∀h t. last (h :: t) = if null t then h else last t
⊦ ∀l h t. (h :: t) @ l = h :: t @ l
⊦ ∀p. p [] ∧ (∀h t. p t ⇒ p (h :: t)) ⇒ ∀l. p l