Package list-last-thm: Properties of the last list function

Information

namelist-last-thm
version1.41
descriptionProperties of the last list function
authorJoe Leslie-Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory exported on 2017-02-14
checksum045e3bbf0e42a3327e0e4b40b48bfb1463e2ee6a
requiresbool
list-append
list-def
list-dest
list-last-def
showData.Bool
Data.List

Files

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

External Constants

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