Package list-replicate-thm: Properties of the list replicate function
Information
name | list-replicate-thm |
version | 1.25 |
description | Properties of the list replicate function |
author | Joe Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2011-11-27 |
requires | bool natural set list-length list-set list-nth list-replicate-def |
show | Data.Bool Data.List Number.Natural Set |
Files
- Package tarball list-replicate-thm-1.25.tgz
- Theory file list-replicate-thm.thy (included in the package tarball)
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
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
- Set
- set
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- cond
- F
- T
- List
- ::
- []
- length
- nth
- replicate
- toSet
- Bool
- Number
- Natural
- <
- suc
- zero
- Natural
- Set
- ∅
- insert
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)