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

Information

namelist-replicate-thm
version1.30
descriptionProperties of the list replicate function
authorJoe Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2012-01-28
requiresbool
natural
set
list-length
list-set
list-nth
list-replicate-def
showData.Bool
Data.List
Number.Natural
Set

Files

Theorems

n x. length (replicate n x) = n

n x i. i < n nth i (replicate n x) = x

n x. toSet (replicate n x) = if n = 0 then else insert x

Input Type Operators

Input Constants

Assumptions

T

length [] = 0

toSet [] =

F p. p

(¬) = λp. p F

t. (x. t) t

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

x. replicate 0 x = []

t. F t T

t. T t t

t. t T T

n. ¬(suc n = 0)

m. m < 0 F

() = λp q. p q p

t1 t2. (if F then t1 else t2) = t2

t1 t2. (if T then t1 else t2) = t1

h t. nth 0 (h :: t) = h

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

m. m = 0 n. m = suc n

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

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

h t. toSet (h :: t) = insert h (toSet t)

x s. insert x (insert x s) = insert x s

m n. suc m < suc n m < n

x n. replicate (suc n) x = x :: replicate n x

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

P. P 0 (n. P n P (suc n)) n. P n

h t n. n < length t nth (suc n) (h :: t) = nth n t

p c x y. p (if c then x else y) (c p x) (¬c p y)