Package sum-thm: Properties of sum types
Information
name | sum-thm |
version | 1.3 |
description | Properties of sum types |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2015-04-21 |
checksum | b7518ab1d3476e2eb3d7af688d6961a0a467e9a4 |
requires | bool natural sum-def |
show | Data.Bool Data.Sum Number.Natural |
Files
- Package tarball sum-thm-1.3.tgz
- Theory source file sum-thm.thy (included in the package tarball)
Theorems
⊦ ∀x. case left right x = x
⊦ ∀a b. ¬(left a = right b)
⊦ ∀a b. left a = left b ⇔ a = b
⊦ ∀a b. right a = right b ⇔ a = b
⊦ ∀x. (∃a. x = left a) ∨ ∃b. x = right b
⊦ ∀f g x. isLeft x ⇒ case f g x = f (destLeft x)
⊦ ∀f g x. isRight x ⇒ case f g x = g (destRight x)
External Type Operators
- →
- bool
- Data
- Sum
- +
- Sum
- Number
- Natural
- natural
- Natural
External Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- ⊥
- ⊤
- Sum
- case
- destLeft
- destRight
- isLeft
- isRight
- left
- right
- Bool
- Number
- Natural
- +
- <
- ≤
- bit0
- bit1
- suc
- zero
- Natural
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ bit0 0 = 0
⊦ ∀a. isLeft (left a)
⊦ ∀b. isRight (right b)
⊦ ⊥ ⇔ ∀p. p
⊦ ∀a. ¬isRight (left a)
⊦ ∀b. ¬isLeft (right b)
⊦ (¬) = λp. p ⇒ ⊥
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀a. destLeft (left a) = a
⊦ ∀b. destRight (right b) = b
⊦ ∀t. ¬¬t ⇔ t
⊦ ∀t. ⊥ ∧ t ⇔ ⊥
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. ⊥ ⇒ t ⇔ ⊤
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀n. 0 + n = n
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀t. (t ⇔ ⊥) ⇔ ¬t
⊦ ∀t. t ⇒ ⊥ ⇔ ¬t
⊦ ∀n. bit1 n = suc (bit0 n)
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀n. bit0 (suc n) = suc (suc (bit0 n))
⊦ ∀m n. m + n = n + m
⊦ ∀m n. ¬(m ≤ n) ⇔ n < m
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀p. ¬(∃x. p x) ⇔ ∀x. ¬p x
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀m n. m + suc n = suc (m + n)
⊦ ∀m n. suc m + n = suc (m + n)
⊦ ∀f g a. case f g (left a) = f a
⊦ ∀f g b. case f g (right b) = g b
⊦ ∀t1 t2. ¬(t1 ∧ t2) ⇔ ¬t1 ∨ ¬t2
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀m n. m ≤ n ∧ n ≤ m ⇔ m = n
⊦ ∀m n. m < n ⇔ ∃d. n = m + suc d
⊦ ∀p. (∀a. p (left a)) ∧ (∀b. p (right b)) ⇒ ∀x. p x
⊦ ∀p. p 0 ∧ (∀n. p n ⇒ p (suc n)) ⇒ ∀n. p n
⊦ ∀f g. ∃fn. (∀a. fn (left a) = f a) ∧ ∀b. fn (right b) = g b