Package list-length-thm: list-length-thm

Information

namelist-length-thm
version1.12
descriptionlist-length-thm
authorJoe Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2011-09-21
showData.Bool

Files

Theorems

l. Data.List.length l = 0 l = Data.List.[]

l.
    ¬(l = Data.List.[])
    Data.List.length (Data.List.tail l) =
    Number.Natural.- (Data.List.length l) 1

l n.
    Data.List.length l = Number.Natural.suc n
    h t. l = Data.List.:: h t Data.List.length t = n

Input Type Operators

Input Constants

Assumptions

T

F p. p

(¬) = λp. p F

t. (x. t) t

t. (x. t) t

t. (λx. t x) = t

() = λp. p = λx. T

x. x = x T

n. ¬(Number.Natural.suc n = 0)

() = λp q. p q p

t. (t T) (t F)

n. Number.Natural.- (Number.Natural.suc n) 1 = n

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

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

(¬T F) (¬F T)

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

P. ¬(x. P x) x. ¬P x

() = λP. q. (x. P x q) q

m n. Number.Natural.suc m = Number.Natural.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

Data.List.length Data.List.[] = 0
  h t.
    Data.List.length (Data.List.:: h t) =
    Number.Natural.suc (Data.List.length t)

(t. ¬¬t t) (¬T F) (¬F T)

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

h1 h2 t1 t2. Data.List.:: h1 t1 = Data.List.:: h2 t2 h1 = h2 t1 = t2

t. ((T t) t) ((t T) t) ((F t) ¬t) ((t F) ¬t)

t. (T t t) (t T t) (F t F) (t F F) (t t t)

t. (T t T) (t T T) (F t t) (t F t) (t t t)

t. (T t t) (t T T) (F t T) (t t T) (t F ¬t)