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

Information

namelist-length-thm
version1.33
descriptionProperties of the list length function
authorJoe Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2012-02-10
requiresbool
natural
list-def
list-thm
list-dest
list-length-def
showData.Bool
Data.List
Number.Natural

Files

Theorems

l. length l = 0 l = []

l. ¬(l = []) length (tail l) = length l - 1

l n. length l = suc n h t. l = h :: t length t = n

Input Type Operators

Input Constants

Assumptions

¬

¬

length [] = 0

p. p

(¬) = λp. p

t. (x. t) t

t. (x. t) t

t. (λx. t x) = 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

n. ¬(suc n = 0)

t. ( t) ¬t

t. t ¬t

() = λp q. p q p

t. (t ) (t )

n. suc n - 1 = n

h t. ¬(h :: t = [])

h t. tail (h :: t) = t

h t. length (h :: t) = suc (length t)

() = λp q. (λf. f p q) = λf. f

p. ¬(x. p x) x. ¬p x

() = λp. q. (x. p x q) q

m n. suc m = suc n m = n

() = λp q. r. (p r) (q r) r

p q. p (x. q x) x. p q x

p q. p (x. q x) x. p q x

t1 t2 t3. (t1 t2) t3 t1 t2 t3

P. P [] (a0 a1. P a1 P (a0 :: a1)) x. P x

h1 h2 t1 t2. h1 :: t1 = h2 :: t2 h1 = h2 t1 = t2