Package list-reverse-thm: Properties of the list reverse function
Information
name | list-reverse-thm |
version | 1.12 |
description | Properties of the list reverse function |
author | Joe Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2012-02-07 |
requires | bool natural set list-def list-length list-set list-append list-map list-reverse-def |
show | Data.Bool Data.List Number.Natural Set |
Files
- Package tarball list-reverse-thm-1.12.tgz
- Theory file list-reverse-thm.thy (included in the package tarball)
Theorems
⊦ ∀l. reverse (reverse l) = l
⊦ ∀l. length (reverse l) = length l
⊦ ∀l. toSet (reverse l) = toSet l
⊦ ∀f l. reverse (map f l) = map f (reverse l)
⊦ ∀l m. reverse (l @ m) = reverse m @ reverse l
Input Type Operators
- →
- bool
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
- Set
- set
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ⊤
- List
- ::
- @
- []
- length
- map
- reverse
- toSet
- Bool
- Number
- Natural
- +
- suc
- zero
- Natural
- Set
- ∅
- insert
- ∪
Assumptions
⊦ ⊤
⊦ length [] = 0
⊦ reverse [] = []
⊦ toSet [] = ∅
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀m. m + 0 = m
⊦ ∀l. [] @ l = l
⊦ ∀l. l @ [] = l
⊦ ∀f. map f [] = []
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀s t. s ∪ t = t ∪ s
⊦ ∀h t. length (h :: t) = suc (length t)
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀h t. toSet (h :: t) = insert h (toSet t)
⊦ ∀x s. insert x ∅ ∪ s = insert x s
⊦ ∀m n. m + suc n = suc (m + n)
⊦ ∀l m. length (l @ m) = length l + length m
⊦ ∀l1 l2. toSet (l1 @ l2) = toSet l1 ∪ toSet l2
⊦ ∀x l. reverse (x :: l) = reverse l @ x :: []
⊦ ∀l h t. (h :: t) @ l = h :: t @ l
⊦ ∀l m n. l @ m @ n = (l @ m) @ n
⊦ ∀f h t. map f (h :: t) = f h :: map f t
⊦ ∀f l1 l2. map f (l1 @ l2) = map f l1 @ map f l2
⊦ ∀P. P [] ∧ (∀a0 a1. P a1 ⇒ P (a0 :: a1)) ⇒ ∀x. P x