Package list-length-thm: Properties of the list length function
Information
name | list-length-thm |
version | 1.43 |
description | Properties of the list length function |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2015-02-08 |
checksum | 03ba104ff9b948a94dbdb2b93d17233aa2134df7 |
requires | bool list-def list-dest list-length-def list-thm natural |
show | Data.Bool Data.List Number.Natural |
Files
- Package tarball list-length-thm-1.43.tgz
- Theory source file list-length-thm.thy (included in the package tarball)
Theorems
⊦ ∀l. length l = 0 ⇔ null l
⊦ ∀l. length l = 0 ⇔ l = []
⊦ ∀l. ¬null l ⇒ length (tail l) = length l - 1
⊦ ∀l n. length l = suc n ⇔ ∃h t. l = h :: t ∧ length t = n
External Type Operators
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
External Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- ⊥
- ⊤
- List
- ::
- []
- length
- null
- tail
- Bool
- Number
- Natural
- -
- bit1
- suc
- zero
- Natural
Assumptions
⊦ ⊤
⊦ null []
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ length [] = 0
⊦ ⊥ ⇔ ∀p. p
⊦ ∀t. t ∨ ¬t
⊦ (¬) = λp. p ⇒ ⊥
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (∃x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀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
⊦ ∀l. null l ⇔ l = []
⊦ ∀h t. ¬null (h :: t)
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀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. p [] ∧ (∀h t. p t ⇒ p (h :: t)) ⇒ ∀l. p l
⊦ ∀h1 h2 t1 t2. h1 :: t1 = h2 :: t2 ⇔ h1 = h2 ∧ t1 = t2