name | list-reverse |
version | 1.0 |
description | Definitions and theorems about the list reverse function |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
show | Data.Bool Data.List |
⊦ ∀l. reverse (reverse l) = l
⊦ ∀l m. reverse (l @ m) = reverse m @ reverse l
⊦ reverse [] = [] ∧ ∀l x. reverse (x :: l) = reverse l @ x :: []
⊦ T
⊦ (∃) = λP. P ((select) P)
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λP. P = λx. T
⊦ ∀x. x = x ⇔ T
⊦ ∀l. l @ [] = l
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀l m n. l @ m @ n = (l @ m) @ n
⊦ ∀P. P [] ∧ (∀a0 a1. P a1 ⇒ P (a0 :: a1)) ⇒ ∀x. P x
⊦ ∀NIL' CONS'.
∃fn. fn [] = NIL' ∧ ∀a0 a1. fn (a0 :: a1) = CONS' a0 a1 (fn a1)
⊦ (∀l. [] @ l = l) ∧ ∀h t l. (h :: t) @ l = h :: t @ l