Package list-replicate-thm: list-replicate-thm

Information

namelist-replicate-thm
version1.0
descriptionlist-replicate-thm
authorJoe Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2011-03-15
showData.Bool

Files

Theorems

n x. Data.List.length (Data.List.replicate n x) = n

n x i.
    Number.Natural.< i n Data.List.nth i (Data.List.replicate n x) = x

Input Type Operators

Input Constants

Assumptions

T

t. (x. t) t

() = λP. P = λx. T

x. x = x T

() = λp q. p q p

m. m = Number.Numeral.zero n. m = Number.Natural.suc n

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

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

m n.
    Number.Natural.< (Number.Natural.suc m) (Number.Natural.suc n)
    Number.Natural.< m n

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

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

P.
    P Number.Numeral.zero (n. P n P (Number.Natural.suc n)) n. P n

(x. Data.List.replicate Number.Numeral.zero x = Data.List.[])
  n x.
    Data.List.replicate (Number.Natural.suc n) x =
    Data.List.:: x (Data.List.replicate n x)

(m. Number.Natural.< m Number.Numeral.zero F)
  m n.
    Number.Natural.< m (Number.Natural.suc n)
    m = n Number.Natural.< m n

(h t. Data.List.nth Number.Numeral.zero (Data.List.:: h t) = h)
  h t n.
    Data.List.nth (Number.Natural.suc n) (Data.List.:: h t) =
    Data.List.nth n t

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