Package sum-thm: Properties of sum types

Information

namesum-thm
version1.3
descriptionProperties of sum types
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2015-04-21
checksumb7518ab1d3476e2eb3d7af688d6961a0a467e9a4
requiresbool
natural
sum-def
showData.Bool
Data.Sum
Number.Natural

Files

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

External Constants

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