Package base: The standard theory library

Information

namebase
version1.24
descriptionThe standard theory library
authorJoe Hurd <joe@gilith.com>
licenseMIT
show Data.Bool
Data.List
Data.Option
Data.Pair
Data.Sum
Data.Unit
Function
Number.Natural
Number.Real as Real
Relation
Set

Files

Defined Type Operators

Defined Constants

Theorems

T

wellFounded (<)

finite

finite universe

infinite universe

wellFounded (λx y. F)

id = λx. x

¬( = universe)

¬(universe = )

size = 0

bigIntersect = universe

bigUnion =

map id = id

x. x = x

x. x universe

v. v = ()

n. 0 n

n. n n

x. Real.≤ x x

l. finite (toSet l)

s. s

s. s universe

s. s s

m. wellFounded (measure m)

F p. p

fromPredicate (λx. F) =

l. all (λx. T) l

hasSize universe 2

1 = suc 0

x. ¬(x )

a. finite (insert a )

x. id x = x

t. t ¬t

n. ¬(n < n)

n. 0 < factorial n

n. 0 < suc n

n. n < suc n

n. n suc n

s. ¬(universe s)

s. ¬(s )

s. ¬(s s)

(~) = λp. p F

() = λP. P ((select) P)

a. x. x = a

a. ∃!x. x = a

t. (x. t) t

t. (x. t) t

t. (λx. t x) = t

f g. f = g

T (λp. p) = λp. p

() = λp. p = λx. T

a'. ¬(none = some a')

x. destLeft (left x) = x

x. x = x T

x. delete x =

x. insert x universe = universe

y. destRight (right y) = y

n. ¬(factorial n = 0)

n. ¬(suc n = 0)

n. n n * n

n. even n odd n

n. 1 factorial n

n. pre (suc n) = n

m. m * 0 = 0

m. m + 0 = m

m. m - 0 = m

n. n - n = 0

n. distance 0 n = n

n. distance n 0 = n

n. distance n n = 0

n. max 0 n = n

n. max n 0 = n

n. max n n = n

n. min 0 n = 0

n. min n 0 = 0

n. min n n = n

l. reverse (reverse l) = l

l. l @ [] = l

l. drop 0 l = l

l. take 0 l = []

s. - s =

s. s - = s

s. s - universe =

s. s - s =

s. image id s = s

s. s s = s

s. s s = s

e. fn. fn () = e

e. ∃!fn. fn () = e

l. map (λx. x) l = l

s. image (λx. x) s = s

universe = insert T (insert F )

2 = suc 1

t1 t2. (let xt2t1) = t1

x. hasSize (insert x ) 1

n. ¬(even n odd n)

n. even (2 * n)

n. bit0 n = n + n

n. bit1 n = suc (bit0 n)

n. ¬even n odd n

n. ¬odd n even n

n. n div 1 = n

n. exp n 1 = n

n. n mod 1 = 0

x. Real.+ 0 x = x

l. null l l = []

l. length (reverse l) = length l

l. nub (nub l) = nub l

l. nubReverse (nubReverse l) = nubReverse l

l. toSet (nub l) = toSet l

l. toSet (nubReverse l) = toSet l

l. toSet (reverse l) = toSet l

l. length (nub l) length l

l. length (nubReverse l) length l

l. size (toSet l) length l

l. drop (length l) l = []

l. take (length l) l = l

l. case.[].:: [] (::) l = l

x. case.none.some none some x = x

s. infinite s ¬finite s

s. bigIntersect (insert s ) = s

s. bigUnion (insert s ) = s

f. zipWith f [] [] = []

f. injective f ¬surjective f

x s. x insert x s

x s. delete s x s

x. (select y. y = x) = x

m n. m m + n

m n. m max m n

m n. n m + n

m n. n max m n

m n. min m n m

m n. min m n n

s t. disjoint s (t - s)

s t. disjoint (t - s) s

s t. s - t s

P. P () x. P x

() = λp q. p q p

x. size (insert x ) = 1

t. (t T) (t F)

n. odd (suc (2 * n))

n. bit1 n = suc (n + n)

m. suc m = m + 1

n. exp 1 n = 1

n. suc n - 1 = n

x. Real.+ (Real.~ x) x = 0

x. Real.* 1 x = x

l. nub l = reverse (nubReverse (reverse l))

s. finite s hasSize s (size s)

s. rest s = delete s (choice s)

s. infinite s ¬(s = )

s. s = disjoint s s

s. hasSize s 0 s =

s. universe s s = universe

s. s s =

s. disjoint s disjoint s

l. null (concat l) all null l

x. (fst x, snd x) = x

x y. fst (x, y) = x

x y. snd (x, y) = y

h t. ¬(h :: t = [])

h t. head (h :: t) = h

h t. tail (h :: t) = t

x s. ¬( = insert x s)

x s. ¬(insert x s = )

b t. (if b then t else t) = t

n x. length (replicate n x) = n

m n. length (interval m n) = n

p x. p x p ((select) p)

(¬T F) (¬F T)

n. 0 < n ¬(n = 0)

l. length l = 0 l = []

l. toSet l = l = []

s. finite s toSet (fromSet s) = s

f y. (let xyf x) = f y

p. x y. p = (x, y)

x y. x = y y = x

x y. x = y y = x

h t. nth 0 (h :: t) = h

t1 t2. t1 t2 t2 t1

t1 t2. t1 t2 t2 t1

a b. (a b) a b

n m. m > n n < m

n m. m n n m

m n. m * n = n * m

m n. m + n = n + m

m n. distance m n = distance n m

m n. max m n = max n m

m n. min m n = min n m

m n. m = n m n

m n. m < n m n

m n. m < n n m

m n. m n n < m

m n. m n n m

m n. distance m n m + n

m n. distance m (m + n) = n

m n. m + n - m = n

m n. m + n - n = m

m n. distance (m + n) m = n

m n. n * (m div n) m

x y. Real.> x y Real.< y x

x y. Real.≥ x y Real.≤ y x

x y. Real.* x y = Real.* y x

x y. Real.+ x y = Real.+ y x

x y. Real.≤ x y Real.≤ y x

l f. length (map f l) = length l

s x. finite s finite (delete s x)

s x. finite (delete s x) finite s

s x. finite (insert x s) finite s

s t. finite s finite (s - t)

s t. disjoint s t disjoint t s

s t. s t = t s

s t. s t = t s

s. (x. x s) s = universe

s. finite s a. ¬(a s)

f s. finite s finite (image f s)

p x. x fromPredicate p p x

p l. length (filter p l) length l

p l. toSet (filter p l) toSet l

<< x. wellFounded << ¬<< x x

= { x. x | F }

universe = { x. x | T }

n. exp n 2 = n * n

n. 2 * n = n + n

s. size s = fold (λx n. suc n) s 0

s. finite s length (fromSet s) = size s

s. ¬(s = ) choice s s

m. measure m = λx y. m x < m y

f g. (f o g) = λx. f (g x)

x l. member x l x toSet l

m n. ¬(m < n n < m)

m n. ¬(m < n n m)

m n. ¬(m n n < m)

m n. ¬(m < n) n m

m n. ¬(m n) n < m

m n. m < suc n m n

m n. suc m n m < n

m. m = 0 n. m = suc n

x y. Real.< x y ¬Real.≤ y x

x y. Real.- x y = Real.+ x (Real.~ y)

x y. Real./ x y = Real.* x (Real.inv y)

l x. member x (nub l) member x l

l x. member x (nubReverse l) member x l

l x. member x (reverse l) member x l

x. x = none a. x = some a

s n. hasSize s n size s = n

s. singleton s x. s = insert x

s. s universe x. ¬(x s)

s. (x. x s) ¬(s = )

P. (b. P b) P T P F

P. (b. P b) P T P F

P. P F P T x. P x

() = λp q. (λf. f p q) = λf. f T T

n. even n n mod 2 = 0

n. ¬(n = 0) 0 div n = 0

n. ¬(n = 0) 0 mod n = 0

l. ¬(l = []) last l toSet l

f. surjective f y. x. y = f x

P. (x. ¬P x) ¬x. P x

P. (x. ¬P x) ¬x. P x

P. ¬(x. P x) x. ¬P x

P. ¬(x. P x) x. ¬P x

() = λP. q. (x. P x q) q

(isNone none T) a. isNone (some a) F

(isSome none F) a. isSome (some a) T

x y. x insert y x = y

a a'. some a = some a' a = a'

x s. x s insert x s = s

x s. s - insert x = delete s x

x s. insert x (insert x s) = insert x s

x s. delete (delete s x) x = delete s x

x s. insert x s = insert x s

A B. (B A) ¬A ¬B

t1 t2. ¬(t1 t2) t1 ¬t2

t1 t2. ¬t1 ¬t2 t2 t1

m n. m < n m div n = 0

m n. m < n m mod n = m

m n. m n factorial m factorial n

m n. m + suc n = suc (m + n)

m n. m < m + n 0 < n

m n. n < m + n 0 < m

m n. suc m = suc n m = n

m n. Real.fromNatural m = Real.fromNatural n m = n

m n. suc m < suc n m < n

m n. suc m suc n m n

m n. Real.≤ (Real.fromNatural m) (Real.fromNatural n) m n

m n. m + n = m n = 0

m n. m + n = n m = 0

m n. distance m n = 0 m = n

s x. insert x s x s

s t. disjoint s t s t =

s t. s t s t = s

s t. s t s t = t

s t. s - t = s t

s t. s - t = s disjoint s t

s t. t (s - t) = t s

s t. s - t - t = s - t

s t. s - t t = s t

s t. finite t s t finite s

s u. bigIntersect (insert s u) = s bigIntersect u

s u. bigUnion (insert s u) = s bigUnion u

f l. toSet (map f l) = image f (toSet l)

f l. map f l = [] l = []

f s. image f s = s =

f g. f g bigIntersect g bigIntersect f

f g. f g bigUnion f bigUnion g

{ m. m | m < 0 } =

n. finite { m. m | m < n }

n. finite { m. m | m n }

n. odd n n mod 2 = 1

n. exp 0 n = if n = 0 then 1 else 0

n. ¬(n = 0) n div n = 1

x. Real.abs x = if Real.≤ 0 x then x else Real.~ x

s. finite s (size s = 0 s = )

f. (id o f) = f (f o id) = f

f g x. (f o g) x = f (g x)

x s. disjoint s (insert x ) ¬(x s)

x s. delete s x = s ¬(x s)

x s. disjoint (insert x ) s ¬(x s)

m n. max m n = if m n then n else m

m n. min m n = if m n then m else n

m n. even (m * n) even m even n

m n. even (m + n) even m even n

m n. odd (m * n) odd m odd n

m n. m * suc n = m + m * n

m n. ¬(n = 0) m mod n < n

m n. ¬(n = 0) m div n m

m n. ¬(n = 0) m mod n m

m n.
    Real.* (Real.fromNatural m) (Real.fromNatural n) =
    Real.fromNatural (m * n)

m n.
    Real.+ (Real.fromNatural m) (Real.fromNatural n) =
    Real.fromNatural (m + n)

n. even n m. n = 2 * m

m n. Real.max m n = if Real.≤ m n then n else m

m n. Real.min m n = if Real.≤ m n then m else n

l n. n < length l member (nth n l) l

l m. null (l @ m) null l null m

l m. length (l @ m) = length l + length m

l m. reverse (l @ m) = reverse m @ reverse l

l1 l2. toSet (l1 @ l2) = toSet l1 toSet l2

s t. finite (s t) finite s finite t

s t. finite s finite t finite (s t)

s t. infinite s finite t infinite (s - t)

s t. finite s finite t finite (s t)

s t. bigIntersect (insert s (insert t )) = s t

s t. bigUnion (insert s (insert t )) = s t

s t. finite s finite t finite (cross s t)

f x. image f (insert x ) = insert (f x)

f s. finite s size (image f s) size s

f s. image f (bigUnion s) = bigUnion (image (image f) s)

s t. bigIntersect (s t) = bigIntersect s bigIntersect t

s t. bigUnion (s t) = bigUnion s bigUnion t

<< m. wellFounded << wellFounded (λx x'. << (m x) (m x'))

P. (p. P p) p1 p2. P (p1, p2)

P. (p. P p) p1 p2. P (p1, p2)

P. (x y. P (x, y)) p. P p

finite x s. finite s finite (insert x s)

a b. f. f F = a f T = b

m n. m n d. n = m + d

A B. (n. A * n B) A = 0

n. ¬(n = 0) pre n = n - 1

n. hasSize { m. m | m < n } n

l. l = [] h t. l = h :: t

s t x. s t s insert x t

f g. f = g x. f x = g x

f g. (x. f x = g x) f = g

P a. (x. a = x P x) P a

P a. (x. x = a P x) P a

P a. (x. a = x P x) P a

P a. (x. x = a P x) P a

P l. ¬all P l exists (λx. ¬P x) l

P l. ¬exists P l all (λx. ¬P x) l

P. P none (a. P (some a)) x. P x

() = λp q. r. (p r) (q r) r

(even 0 T) n. even (suc n) ¬even n

(odd 0 F) n. odd (suc n) ¬odd n

x s. x s insert x (delete s x) = s

m n. m n m < n m = n

m n. n m n + (m - n) = m

m n. n m m - n + n = m

m n. m < n n < m m = n

m n. odd (m + n) ¬(odd m odd n)

m n. odd (exp m n) odd m n = 0

m n. m n n m m = n

n l. n length l length (take n l) = n

n. odd n m. n = suc (2 * m)

x y. Real.≤ x y Real.≤ y x x = y

l i. i < length l nth i l toSet l

s n. hasSize s n finite s size s = n

s t. s t t s s = t

s t. s (t - s) = t s t

s t. t - s s = t s t

s t. s t t s s = t

s t. bijections s t = injections s t surjections s t

s. finite s x. member x (fromSet s) x s

PAIR'. fn. a0 a1. fn (a0, a1) = PAIR' a0 a1

(null [] T) h t. null (h :: t) F

(s. s = ) s. s =

(s. universe s = s) s. s universe = s

(s. s = s) s. s = s

(s. universe s = universe) s. s universe = universe

P Q. (x. P Q) (x. P) x. Q

P Q. (x. P Q) (x. P) x. Q

P Q. (x. P Q) (x. P) x. Q

P Q. (x. P Q) (x. P) x. Q

P Q. (x. P) (x. Q) x. P Q

P Q. (x. P) (x. Q) x. P Q

m n. m < n d. n = m + suc d

n. size { m. m | m < n } = n

s. finite s a. x. x s x a

f s x. x s f x image f s

P l. (x. member x l P x) all P l

P l. (x. P x member x l) exists P l

<<. wellFounded << ¬s. n. << (s (suc n)) (s n)

P. (x y. P x y) y x. P x y

P. (x y. P x y) y x. P x y

bit0 0 = 0 n. bit0 (suc n) = suc (suc (bit0 n))

h t. last (h :: t) = if t = [] then h else last t

x s. delete (insert x s) x = s ¬(x s)

P Q. (x. P Q x) P x. Q x

P Q. (x. P Q x) P x. Q x

P Q. (x. P Q x) P x. Q x

P Q. (x. P Q x) P x. Q x

P Q. P (x. Q x) x. P Q x

P Q. P (x. Q x) x. P Q x

P Q. P (x. Q x) x. P Q x

P Q. P (x. Q x) x. P Q x

P Q. P (x. Q x) x. P Q x

P Q. P (x. Q x) x. P Q x

m n. m < n m n ¬(m = n)

m n. even (exp m n) even m ¬(n = 0)

m n. ¬(m = 0) m * n div m = n

m n. ¬(m = 0) m * n mod m = 0

s t. s t s t ¬(s = t)

s t. s t s t ¬(t s)

a b. a b finite b size a < size b

a b. a b finite b size a size b

P Q. (x. P x Q) (x. P x) Q

P Q. (x. P x Q) (x. P x) Q

P Q. (x. P x Q) (x. P x) Q

P Q. (x. P x Q) (x. P x) Q

P Q. (x. P x) Q x. P x Q

P Q. (x. P x) Q x. P x Q

P Q. (x. P x) Q x. P x Q

P Q. (x. P x) Q x. P x Q

P Q. (x. P x) Q x. P x Q

P Q. (x. P x) Q x. P x Q

P. (∃!x. P x) x. y. P y x = y

s. bigIntersect s = universe t. t s t = universe

s. bigUnion s = t. t s t =

x y z. x = y y = z x = z

x y s. insert x (insert y s) = insert y (insert x s)

x y s. delete (delete s x) y = delete (delete s y) x

x s t. s insert x t delete s x t

x s t. insert x s t = insert x (s t)

t1 t2 t3. t1 t2 t3 (t1 t2) t3

p q r. p q r p q r

t1 t2 t3. t1 t2 t3 (t1 t2) t3

p q r. p q r p q r

p q r. p q r q p r

n x i. i < n nth i (replicate n x) = x

x y n. x y exp x n exp y n

m n p. distance m p distance m n + distance n p

m n p. m * (n * p) = m * n * p

m n p. m + (n + p) = m + n + p

m n p. exp m (n * p) = exp (exp m n) p

m n p. m + n = m + p n = p

m n p. m + p = n + p m = n

m n p. m + n < m + p n < p

m n p. n + m < p + m n < p

m n p. m + n m + p n p

m n p. m + p n + p m n

m n p. distance (m + n) (m + p) = distance n p

p m n. distance (m + p) (n + p) = distance m n

m n p. (m * n + p) mod n = p mod n

m n p. m < n n < p m < p

m n p. m < n n p m < p

m n p. m n n < p m < p

m n p. m n n p m p

x y z. Real.≤ y z Real.≤ (Real.+ x y) (Real.+ x z)

x y z. Real.* x (Real.* y z) = Real.* (Real.* x y) z

x y z. Real.+ x (Real.+ y z) = Real.+ (Real.+ x y) z

x y z. Real.≤ x y Real.≤ y z Real.≤ x z

x. ¬(x = 0) Real.* (Real.inv x) x = 1

l m n. l @ m @ n = (l @ m) @ n

l. ¬(l = []) length (tail l) = length l - 1

s c. image (λx. c) s = if s = then else insert c

s t x. disjoint (delete s x) t disjoint (delete t x) s

s t x. s - insert x t = delete s x - t

s t x. delete s x t = delete (s t) x

s t u. s t u s - t u

s t u. s t u s - u t

t u s. s - t - u = s - (t u)

t u s. s - t - u = s - u - t

s t u. s t u = s (t u)

s t u. s t u = s (t u)

s t u. s t t u s u

s t u. s t t u s u

s t u. s t t u s u

s t u. s t t u s u

s t. s = t x. x s x t

s t. s t x. x s x t

s t. (x. x s x t) s = t

s. finite s finite { t. t | t s }

f s t. s t image f s image f t

f g l. map (g o f) l = map g (map f l)

P x. (y. P y y = x) (select) P = x

f g s. image (f o g) s = image f (image g s)

P f l. all P (map f l) all (P o f) l

P f l. exists P (map f l) exists (P o f) l

f g h. (f o (g o h)) = (f o g o h)

P. (x. y. P x y) y. x. P x (y x)

P. (x. ∃!y. P x y) ∃!f. x. P x (f x)

t1 t2. (if T then t1 else t2) = t1 (if F then t1 else t2) = t2

b f g. (λx. if b then f x else g x) = if b then f else g

n x. toSet (replicate n x) = if n = 0 then else insert x

m n. n < m m - suc n = pre (m - n)

m n. n < m suc (m - suc n) = m - n

m n. n m suc (m - n) = suc m - n

m n. n m (m - n = 0 m = n)

m n. n m pre (suc m - n) = m - n

m n. n m suc m - suc n = m - n

m n. 0 < m * n 0 < m 0 < n

m n. m * n = 0 m = 0 n = 0

m n. m + n = 0 m = 0 n = 0

l m. head (l @ m) = if l = [] then head m else head l

p q. last (p @ q) = if q = [] then last p else last q

l m. l @ m = [] l = [] m = []

s t. s t = s = t =

s t. cross s t = s = t =

s. finite s (finite (bigUnion s) t. t s finite t)

s. finite (bigUnion s) finite s t. t s finite t

P. (a. P (left a)) (a. P (right a)) x. P x

length [] = 0 h t. length (h :: t) = suc (length t)

n. hasSize { m. m | m n } (n + 1)

l. ¬(l = []) last l = nth (length l - 1) l

s t. disjoint s t ¬x. x s x t

s t. disjoint s (bigUnion t) x. x t disjoint s x

t f. t bigIntersect f s. s f t s

s. finite s toSet (fromSet s) = s length (fromSet s) = size s

f. injective f x1 x2. f x1 = f x2 x1 = x2

P l x. member x (filter P l) P x member x l

P. P 0 (n. P n P (suc n)) n. P n

s x. x bigIntersect s t. t s x t

s x. x bigUnion s t. t s x t

f t. bigUnion f t s. s f s t

P l. (x. all (P x) l) all (λs. x. P x s) l

P l. (x. exists (P x) l) exists (λs. x. P x s) l

factorial 0 = 1 n. factorial (suc n) = suc n * factorial n

(t. ¬¬t t) (¬T F) (¬F T)

x s. x rest s x s ¬(x = choice s)

NONE' SOME'. fn. fn none = NONE' a. fn (some a) = SOME' a

m n. distance m n = if m n then n - m else m - n

m n. n m (even (m - n) even m even n)

m n. ¬(n = 0) (m div n = 0 m < n)

m n. ¬(n = 0) m mod n mod n = m mod n

n x. 0 < exp x n ¬(x = 0) n = 0

m n. exp m n = 0 m = 0 ¬(n = 0)

n l. n length l length (drop n l) = length l - n

n l. n length l take n l @ drop n l = l

p x. x { y. y | p y } p x

concat [] = [] h t. concat (h :: t) = h @ concat t

toSet [] = h t. toSet (h :: t) = insert h (toSet t)

(s t. s s t) s t. s t s

(s t. s t s) s t. t s s

x y s. x insert y s x = y x s

x l1 l2. member x (l1 @ l2) member x l1 member x l2

x s t. insert x s t x t s t

b t1 t2. (if b then t1 else t2) (¬b t1) (b t2)

p q r. p (q r) p q p r

p q r. p q r (p q) (p r)

p q r. (p q) r p r q r

p q r. p q r (p r) (q r)

m n i. i < n nth i (interval m n) = m + i

m n p. m * (n + p) = m * n + m * p

m n p. m * distance n p = distance (m * n) (m * p)

m n p. exp m (n + p) = exp m n * exp m p

m n p. (m + n) * p = m * p + n * p

p m n. distance m n * p = distance (m * p) (n * p)

p m n. exp (m * n) p = exp m p * exp n p

n. size { m. m | m n } = n + 1

x y z. Real.* x (Real.+ y z) = Real.+ (Real.* x y) (Real.* x z)

s t x. x s t x s x t

s t x. x s t x s x t

s t u. s t - u s t disjoint s u

s t u. s t u s t s u

s t u. disjoint (s t) u disjoint s u disjoint t u

s t u. s t u s u t u

s t u. s (t u) = s t s u

s t u. s t u = (s t) (s u)

s t u. (s t) u = s u t u

s t u. s t u = (s u) (t u)

s t. ¬(s = t) x. x t ¬(x s)

f l1 l2. map f (l1 @ l2) = map f l1 @ map f l2

f s t. image f (s t) = image f s image f t

f. (y. x. f x = y) g. y. f (g y) = y

f. (m. l. map f l = m) y. x. f x = y

f. (t. s. image f s = t) y. x. f x = y

P l1 l2. all P (l1 @ l2) all P l1 all P l2

P l1 l2. filter P (l1 @ l2) = filter P l1 @ filter P l2

P f l. filter P (map f l) = map f (filter (P o f) l)

(∃!) = λP. () P x y. P x P y x = y

b f x y. f (if b then x else y) = if b then f x else f y

b f g x. (if b then f else g) x = if b then f x else g x

m n. n m (odd (m - n) ¬(odd m odd n))

x n. exp x n = 1 x = 1 n = 0

s P. { x. x | x s P x } s

f s. { x. f x | x s } = image f s

P. (∃!x. P x) x. P x y. P y y = x

P. (n. (m. m < n P m) P n) n. P n

x s t. s delete t x s t ¬(x s)

x s t. disjoint (insert x s) t ¬(x t) disjoint s t

x s. ¬(x s) t. s insert x t s t

l x. member x l i. i < length l x = nth i l

s x y. x delete s y x s ¬(x = y)

s x. x s t. s = insert x t ¬(x t)

s t x. x s - t x s ¬(x t)

s t. s t x. ¬(x s) insert x s t

s. s = x t. s = insert x t ¬(x t)

f s t. finite t s image f t size s size t

f g. (x. y. g y = f x) h. f = (g o h)

P Q. (x. P x Q x) (x. P x) x. Q x

P Q. (x. P x Q x) (x. P x) x. Q x

P Q. (x. P x Q x) (x. P x) x. Q x

P Q. (x. P x Q x) (x. P x) x. Q x

P Q. (x. P x) (x. Q x) x. P x Q x

P Q. (x. P x) (x. Q x) x. P x Q x

t. (λp. t p) = λ(x, y). t (x, y)

e f. fn. fn 0 = e n. fn (suc n) = f (fn n) n

e f. ∃!fn. fn 0 = e n. fn (suc n) = f (fn n) n

e f. fn. fn 0 = e n. fn (suc n) = f n (fn n)

A B C. (n. A * n B * n + C) A B

m n. ¬(n = 0) m div n * n + m mod n = m

m n. m * n = 1 m = 1 n = 1

x y. Real.≤ 0 x Real.≤ 0 y Real.≤ 0 (Real.* x y)

s t. finite s finite t size (s t) size s + size t

s t. finite t s t (size s = size t s = t)

a b. finite b a b size a = size b a = b

a b. finite b a b size b size a a = b

s t. finite s finite t size (cross s t) = size s * size t

P Q l. (x. P x Q x) all P l all Q l

P. (n. P n) n. P n m. m < n ¬P m

P. P [] (a0 a1. P a1 P (a0 :: a1)) x. P x

<< <<<. (x y. << x y <<< x y) wellFounded <<< wellFounded <<

reverse [] = [] x l. reverse (x :: l) = reverse l @ x :: []

h t n. n < length t nth (suc n) (h :: t) = nth n t

n h t. n length t drop (suc n) (h :: t) = drop n t

m n p. n m m + p - (n + p) = m - n

m n p. p n m + n - (m + p) = n - p

m n p. m * n = m * p m = 0 n = p

m n p. m * p = n * p m = n p = 0

x y n. exp x n = exp y n x = y n = 0

m n p. m * n m * p m = 0 n p

m n p. m * p n * p m n p = 0

x y n. exp x n exp y n x y n = 0

s n. finite s n size s t. t s hasSize t n

s n. (finite s n size s) t. t s hasSize t n

a. finite a a = x s. a = insert x s finite s

f l i. i < length l nth i (map f l) = f (nth i l)

P. (n. P n) P ((minimal) P) m. m < (minimal) P ¬P m

(n. 0 + n = n) m n. suc m + n = suc (m + n)

y s f. y image f s x. y = f x x s

s t. finite s t s size (s - t) = size s - size t

s P. finite s finite { x. x | x s P x }

f y l. member y (map f l) x. member x l y = f x

f g l. all (λx. f x = g x) l map f l = map g l

f. (y. x. f x = y) P. (x. P (f x)) y. P y

f. (y. x. f x = y) P. (x. P (f x)) y. P y

P Q l. all P l all Q l all (λx. P x Q x) l

P Q l. all (λx. P x Q x) l all P l all Q l

s. bigIntersect s = { x. x | u. u s x u }

s. bigUnion s = { x. x | u. u s x u }

cond = λt t1 t2. select x. ((t T) x = t1) ((t F) x = t2)

a b n. ¬(a = 0) (n b div a a * n b)

m n p. ¬(p = 0) m * (n div p) m * n div p

m n p. m * n < m * p ¬(m = 0) n < p

m n p. m * p < n * p m < n ¬(p = 0)

x y n. exp x n < exp y n x < y ¬(n = 0)

x y n. x < y ¬(n = 0) exp x n < exp y n

m n p. ¬(m = 0) n < p m * n < m * p

m n p. ¬(p = 0) m n m div p n div p

m n p. ¬(p = 0) p m n div m n div p

a b n. ¬(a = 0) b a * n b div a n

m n. ¬(n = 0) (m mod n = 0 q. m = q * n)

s t. s t s t a. a t ¬(a s)

INL' INR'. fn. (a. fn (left a) = INL' a) a. fn (right a) = INR' a

(x. replicate 0 x = []) x n. replicate (suc n) x = x :: replicate n x

(n. 0 * n = 0) m n. suc m * n = m * n + n

h1 h2 t1 t2. h1 :: t1 = h2 :: t2 h1 = h2 t1 = t2

x y a b. (x, y) = (a, b) x = a y = b

x y s t. (x, y) cross s t x s y t

x s. insert x s = { y. y | y = x y s }

A B C D. (A B) (C D) A C B D

A B C D. (A B) (C D) A C B D

A B C D. (B A) (C D) (A C) B D

m n p q. distance m p distance (m + n) (p + q) + distance n q

m n p q. m = n + q * p m mod p = n mod p

m n p q. m < n p < q m * p < n * q

m n p q. m < p n < q m + n < p + q

m n p q. m < p n q m + n < p + q

m n p q. m n p q m * p n * q

m n p q. m p n < q m + n < p + q

m n p q. m p n q m + n p + q

m n p q. distance (m + n) (p + q) distance m p + distance n q

m n p q. distance m n + distance n p q distance m p q

s t. s t = { x. x | x s x t }

s t. s t = { x. x | x s x t }

s t. finite s finite t size (s t) = size s + size (t - s)

s t m n. hasSize s m hasSize t n hasSize (cross s t) (m * n)

f s t. s image f t u. u t s = image f u

m a b. (y. measure m y a measure m y b) m a m b

s t. t bigUnion s = bigUnion { x. t x | x s }

s t. t bigIntersect s = bigIntersect { x. t x | x s }

s t. bigUnion s t = bigUnion { x. x t | x s }

s t. bigIntersect s t = bigIntersect { x. x t | x s }

P. P (a s. ¬(a s) P (insert a s)) s. P s

P. (x. ∃!y. P x y) f. x y. P x y f x = y

n h t. n length t take (suc n) (h :: t) = h :: take n t

m n p. n m (m - n) * p = m * p - n * p

m n p. p n m * (n - p) = m * n - m * p

m n p. distance m n p m n + p n m + p

n. (k m. odd m n = exp 2 k * m) ¬(n = 0)

(m. interval m 0 = [])
  m n. interval m (suc n) = m :: interval (suc m) n

(m. exp m 0 = 1) m n. exp m (suc n) = m * exp m n

x s. finite s size (delete s x) = if x s then size s - 1 else size s

l n. length l = suc n h t. l = h :: t length t = n

s x. delete s x = { y. y | y s ¬(y = x) }

s t. s - t = { x. x | x s ¬(x t) }

P c x y. P (if c then x else y) (c P x) (¬c P y)

t. { x y. x, y | x y t x } =

FINITE'.
    FINITE' (x s. FINITE' s FINITE' (insert x s))
    a. finite a FINITE' a

x y s.
    delete (insert x s) y =
    if x = y then delete s y else insert x (delete s y)

x s t. insert x s t = if x t then insert x (s t) else s t

x s t. insert x s t = if x t then s t else insert x (s t)

NIL' CONS'.
    fn. fn [] = NIL' a0 a1. fn (a0 :: a1) = CONS' a0 a1 (fn a1)

m n p. ¬(n = 0) m * (p mod n) mod n = m * p mod n

m n p. ¬(n = 0) m mod n * p mod n = m * p mod n

m n p. ¬(n = 0) exp (m mod n) p mod n = exp m p mod n

m n p. ¬(m * p = 0) m * n div (m * p) = n div p

m n p. ¬(n * p = 0) m div n div p = m div (n * p)

m n p. ¬(n * p = 0) m mod (n * p) mod n = m mod n

m n p. ¬(p = 0) m + p n m div p < n div p

m n. (q. m = n * q) if n = 0 then m = 0 else m mod n = 0

n l i. n length l i < n nth i (take n l) = nth i l

s t x. insert x s - t = if x t then s - t else insert x (s - t)

s. finite s size { t. t | t s } = exp 2 (size s)

f. (x y. f x = f y x = y) g. x. g (f x) = x

P. (∃!x. P x) (x. P x) x x'. P x P x' x = x'

<<. wellFounded << P. (x. (y. << y x P y) P x) x. P x

(m. m < 0 F) m n. m < suc n m = n m < n

(x. Real.exp x 0 = 1)
  x n. Real.exp x (suc n) = Real.* x (Real.exp x n)

(b f. case.none.some b f none = b)
  b f a. case.none.some b f (some a) = f a

m n q r. m = q * n + r r < n m div n = q

m n q r. m = q * n + r r < n m mod n = r

s n. hasSize s n hasSize { t. t | t s } (exp 2 n)

s t.
    finite s finite t (size (s t) = size s + size t disjoint s t)

s t. finite s finite t disjoint s t size (s t) = size s + size t

f s. (x y. f x = f y x = y) infinite s infinite (image f s)

f. (x y. f x = f y x = y) s. infinite (image f s) infinite s

P Q l. (x. member x l P x Q x) all P l all Q l

P Q l. (x. member x l P x Q x) exists P l exists Q l

f l1 l2 n. length l1 = n length l2 = n length (zipWith f l1 l2) = n

nubReverse [] = []
  h t.
    nubReverse (h :: t) =
    if member h t then nubReverse t else h :: nubReverse t

(l. [] @ l = l) l h t. (h :: t) @ l = h :: t @ l

a b n. ¬(a = 0) (b div a n b < a * (n + 1))

s x x'. (x s x' s) (x delete s x' x' delete s x)

s x x'. (x delete s x' x' delete s x) x s x' s

s n. hasSize s (suc n) ¬(s = ) a. a s hasSize (delete s a) n

f s. finite s finite { y. y | x. x s y = f x }

f s. image f s = { y. y | x. x s y = f x }

P f s. (y. y image f s P y) x. x s P (f x)

P f s. (y. y image f s P y) x. x s P (f x)

<<. wellFounded << P. (x. P x) x. P x y. << y x ¬P y

<<. wellFounded << P. (x. P x) x. P x y. << y x ¬P y

t1 t2. (¬(t1 t2) ¬t1 ¬t2) (¬(t1 t2) ¬t1 ¬t2)

s t. finite s finite t size (s t) = size s + size t - size (s t)

s t. finite s finite t size (s t) + size (s t) = size s + size t

s t.
    finite s finite t size (s t) < size s + size t ¬disjoint s t

P. (B. n. P n B) A B. n. n * P n A * n + B

(f. map f [] = []) f h t. map f (h :: t) = f h :: map f t

(f. image f = )
  f x s. image f (insert x s) = insert (f x) (image f s)

(P. all P [] T) P h t. all P (h :: t) P h all P t

(P. exists P [] F) P h t. exists P (h :: t) P h exists P t

(h. last (h :: []) = h) h k t. last (h :: k :: t) = last (k :: t)

b A B C D. (A B) (C D) (if b then A else C) if b then B else D

m n p. ¬(n = 0) m mod n * (p mod n) mod n = m * p mod n

a b n. ¬(n = 0) (a mod n + b mod n) mod n = (a + b) mod n

m n p. ¬(m * p = 0) m * n mod (m * p) = m * (n mod p)

m n p. ¬(n * p = 0) m div n mod p = m mod (n * p) div n

s t. cross s t = { x y. x, y | x s y t }

f g. (x y. g x = g y f x = f y) h. f = (h o g)

P f s. (t. t image f s P t) t. t s P (image f t)

f s. bigIntersect (image f s) = { y. y | x. x s y f x }

f s. bigUnion (image f s) = { y. y | x. x s y f x }

s t m n.
    hasSize s m hasSize t n disjoint s t hasSize (s t) (m + n)

s t m n. hasSize s m hasSize t n t s hasSize (s - t) (m - n)

P f. { x. f x | P x } = image f { x. x | P x }

size = 0
  x s.
    finite s size (insert x s) = if x s then size s else suc (size s)

(x. member x [] F) x h t. member x (h :: t) x = h member x t

x y s.
    insert x (insert y s) = insert y (insert x s)
    insert x (insert x s) = insert x s

n. { m. m | m < suc n } = insert n { m. m | m < n }

s t u. finite u disjoint s t s t = u size s + size t = size u

P a s. (x. x insert a s P x) P a x. x s P x

P a s. (x. x insert a s P x) P a x. x s P x

P s. (x. x bigUnion s P x) t x. t s x t P x

P s. (x. x bigUnion s P x) t x. t s x t P x

(m. m 0 m = 0) m n. m suc n m = suc n m n

P a b. (a, b) { x y. x, y | P x y } P a b

P. { p. p | P p } = { a b. a, b | P (a, b) }

(b f. case.[].:: b f [] = b) b f h t. case.[].:: b f (h :: t) = f h t

t. ((T t) t) ((t T) t) ((F t) ¬t) ((t F) ¬t)

l m.
    length l = length m (i. i < length l nth i l = nth i m) l = m

f s t.
    finite t t image f s s'. finite s' s' s t = image f s'

f s t.
    finite t t image f s s'. finite s' s' s t image f s'

(l. drop 0 l = l)
  n h t. n length t drop (suc n) (h :: t) = drop n t

n l i.
    n length l i < length l - n nth i (drop n l) = nth (n + i) l

n. (even n m. n = 2 * m) (¬even n m. n = suc (2 * m))

s t. finite s finite t finite { x y. x, y | x s y t }

f s a.
    (x. f x = f a x = a)
    image f (delete s a) = delete (image f s) (f a)

P x y. P (distance x y) d. (x = y + d P d) (y = x + d P d)

P. (x. P x) (M. x. P x x M) m. P m x. P x x m

f. (l m. map f l = map f m l = m) x y. f x = f y x = y

f. (s t. image f s = image f t s = t) x y. f x = f y x = y

m n q r. m = q * n + r r < n m div n = q m mod n = r

a b c d. ¬(b = 0) b * c < (a + 1) * d c div d a div b

(l. take 0 l = [])
  n h t. n length t take (suc n) (h :: t) = h :: take n t

(P. filter P [] = [])
  P h t. filter P (h :: t) = if P h then h :: filter P t else filter P t

P Q. (B. i. P i Q i + B) B N. i. N i P i Q i + B

P. (m n. P m n P n m) (m n. m n P m n) m n. P m n

P.
    P (x s. P s ¬(x s) finite s P (insert x s))
    s. finite s P s

t. (T t t) (t T t) (F t F) (t F F) (t t t)

t. (T t T) (t T T) (F t t) (t F t) (t t t)

f s t.
    (x y. f x = f y x = y) image f (s - t) = image f s - image f t

f s t.
    (x y. f x = f y x = y) image f (s t) = image f s image f t

P f s.
    (t. finite t t image f s P t)
    t. finite t t s P (image f t)

f h1 h2 t1 t2.
    length t1 = length t2
    zipWith f (h1 :: t1) (h2 :: t2) = f h1 h2 :: zipWith f t1 t2

(h t. nth 0 (h :: t) = h)
  h t n. n < length t nth (suc n) (h :: t) = nth n t

f s.
    (x y. x s y s f x = f y x = y)
    (finite (image f s) finite s)

f A. (x y. f x = f y x = y) finite A finite { x. x | f x A }

t. (T t t) (t T T) (F t T) (t t T) (t F ¬t)

x m n.
    exp x m = exp x n if x = 0 then m = 0 n = 0 else x = 1 m = n

x m n.
    exp x m exp x n if x = 0 then m = 0 n = 0 else x = 1 m n

m n p q r s.
    distance m n r distance p q s
    distance m p distance n q + (r + s)

s f. finite s image f s = s x y. x s y s f x = f y x = y

f s t. (y. y t x. f x = y) (x. f x t x s) image f s = t

(a. { x. x | x = a } = insert a ) a. { x. x | a = x } = insert a

k l m.
    k < length l + length m
    nth k (l @ m) = if k < length l then nth k l else nth (k - length l) m

f. (y. x. f x = y) P. image f { x. x | P (f x) } = { x. x | P x }

s t.
    finite s finite t
    size { x y. x, y | x s y t } = size s * size t

s n.
    hasSize s n
    f. (m. m < n f m s) x. x s ∃!m. m < n f m = x

f s.
    (x y. x s y s f x = f y x = y) finite s
    size (image f s) = size s

P.
    P (s. finite s ¬(s = ) x. x s (P (delete s x) P s))
    s. finite s P s

x m n. exp x m < exp x n 2 x m < n x = 0 ¬(m = 0) n = 0

f s n.
    (x y. x s y s f x = f y x = y)
    (hasSize (image f s) n hasSize s n)

f s n.
    (x y. x s y s f x = f y x = y) hasSize s n
    hasSize (image f s) n

R.
    (x y z. R x y R y z R x z)
    ((m n. m < n R m n) n. R n (suc n))

R.
    (x y z. R x y R y z R x z) (n. R n (suc n))
    m n. m < n R m n

H.
    (f g n. (m. m < n f m = g m) H f n = H g n) f. n. f n = H f n

(s. hasSize s 0 s = )
  s n. hasSize s (suc n) a t. hasSize t n ¬(a t) s = insert a t

a b c d. b * c < (a + 1) * d a * d < (c + 1) * b a div b = c div d

P.
    (m. P m m) (m n. P m n P n m) (m n. m < n P m n)
    m y. P m y

d t.
    { f. f | (x. x f x t) x. ¬(x ) f x = d } =
    insert (λx. d)

m n p.
    m * n = n * m m * n * p = m * (n * p) m * (n * p) = n * (m * p)

m n p.
    m + n = n + m m + n + p = m + (n + p) m + (n + p) = n + (m + p)

s t m n.
    hasSize s m hasSize t n
    hasSize { x y. x, y | x s y t } (m * n)

f s.
    (x y. x s y s f x = f y x = y) g. x. x s g (f x) = x

<< <<<.
    wellFounded << wellFounded <<<
    wellFounded (λ(x1, y1) (x2, y2). << x1 x2 <<< y1 y2)

a b n.
    ¬(n = 0)
    ((a + b) mod n = a mod n + b mod n (a + b) div n = a div n + b div n)

f u v.
    (t. t v s. s u image f s = t)
    y. y v x. x u f x = y

f t.
    finite t (y. y t finite { x. x | f x = y })
    finite { x. x | f x t }

f s t.
    finite s (x. x s finite (t x))
    finite { x y. f x y | x s y t x }

f s t.
    (y. y t x. x s f x = y)
    g. y. y t g y s f (g y) = y

(P. (x. x P x) T)
  P a s. (x. x insert a s P x) P a x. x s P x

(P. (x. x P x) F)
  P a s. (x. x insert a s P x) P a x. x s P x

f.
    (x y. f x = f y x = y) (y. x. f x = y)
    g. (y. f (g y) = y) x. g (f x) = x

f s t.
    finite s (x. x s f x t) (y. y t ∃!x. x s f x = y)
    size t = size s

P.
    (x. P x) (M. x. P x Real.≤ x M)
    M. (x. P x Real.≤ x M) M'. (x. P x Real.≤ x M') Real.≤ M M'

<<.
    wellFounded <<
    H.
      (f g x. (z. << z x f z = g z) H f x = H g x)
      f. x. f x = H f x

<<.
    wellFounded <<
    H.
      (f g x. (z. << z x f z = g z) H f x = H g x)
      ∃!f. x. f x = H f x

<<.
    (H.
       (f g x. (z. << z x f z = g z) H f x = H g x)
       f. x. f x = H f x) wellFounded <<

P A B.
    P 0 0 = 0 (m n. P m n A * (m + n) + B)
    B. m n. P m n B * (m + n)

(f. zipWith f [] [] = [])
  f h1 h2 t1 t2.
    length t1 = length t2
    zipWith f (h1 :: t1) (h2 :: t2) = f h1 h2 :: zipWith f t1 t2

d s t.
    finite s finite t
    finite { f. f | (x. x s f x t) x. ¬(x s) f x = d }

s t f.
    finite s size s = size t image f s = t
    x y. x s y s f x = f y x = y

s t.
    surjections s t =
    { f. f | (x. x s f x t) x. x t y. y s f y = x }

R S.
    wellFounded R wellFounded S
    wellFounded (λ(r1, s1) (r2, s2). R r1 r2 r1 = r2 S s1 s2)

<<.
    (x. ¬<< x x) (x y z. << x y << y z << x z)
    (x. finite { y. y | << y x }) wellFounded <<

R.
    (x. R x x) (x y z. R x y R y z R x z)
    ((m n. m n R m n) n. R n (suc n))

R.
    (x. R x x) (x y z. R x y R y z R x z) (n. R n (suc n))
    m n. m n R m n

(n. 0 + n = n) (m. m + 0 = m) (m n. suc m + n = suc (m + n))
  m n. m + suc n = suc (m + n)

s t.
    finite s finite t size s size t
    f. image f s t x y. x s y s f x = f y x = y

s t m n.
    hasSize s m (x. x s finite (t x) size (t x) n)
    size (bigUnion { x. t x | x s }) m * n

s t m n.
    hasSize s m (x. x s hasSize (t x) n)
    hasSize { x y. x, y | x s y t x } (m * n)

s.
    ¬(s = ) (m. x. x s Real.≤ x m)
    (x. x s Real.≤ x (Real.sup s))
    m. (x. x s Real.≤ x m) Real.≤ (Real.sup s) m

R S.
    wellFounded R (a. wellFounded (S a))
    wellFounded (λ(r1, s1) (r2, s2). R r1 r2 r1 = r2 S r1 s1 s2)

s t.
    injections s t =
    { f. f |
      (x. x s f x t) x y. x s y s f x = f y x = y }

f A s.
    (x y. x s y s f x = f y x = y) finite A
    finite { x. x | x s f x A }

d s t.
    finite s finite t
    size { f. f | (x. x s f x t) x. ¬(x s) f x = d } =
    exp (size t) (size s)

f s t.
    finite t (y. y t finite { x. x | x s f x = y })
    finite { x. x | x s f x t }

f u.
    (s t. s u t u image f s = image f t s = t)
    x y. x u y u f x = f y x = y

d s t m n.
    hasSize s m hasSize t n
    hasSize { f. f | (x. x s f x t) x. ¬(x s) f x = d }
      (exp n m)

s t f g n.
    (x. x s f x t g (f x) = x)
    (y. y t g y s f (g y) = y) hasSize s n hasSize t n

s t f g.
    (x. x s f x t g (f x) = x)
    (y. y t g y s f (g y) = y) n. hasSize s n hasSize t n

s f.
    finite s image f s s
    ((y. y s x. x s f x = y)
     x y. x s y s f x = f y x = y)

s t f g.
    (finite s finite t) (x. x s f x t g (f x) = x)
    (y. y t g y s f (g y) = y) size s = size t

s t.
    finite s finite t size s = size t
    f g.
      (x. x s f x t g (f x) = x)
      y. y t g y s f (g y) = y

s t a.
    { x y. x, y | x insert a s y t x } =
    image ((,) a) (t a) { x y. x, y | x s y t x }

s.
    { t. t | t s } =
    image (λp. { x. x | p x })
      { p. p | (x. x s p x universe) x. ¬(x s) (p x F) }

p q r.
    (p q q p) ((p q) r p q r) (p q r q p r)
    (p p p) (p p q p q)

p q r.
    (p q q p) ((p q) r p q r) (p q r q p r)
    (p p p) (p p q p q)

p q r.
    p q = q p p q r = p (q r) p (q r) = q (p r)
    p p = p p (p q) = p q

p q r.
    p q = q p p q r = p (q r) p (q r) = q (p r)
    p p = p p (p q) = p q

<<.
    wellFounded <<
    H S.
      (f g x.
         (z. << z x f z = g z S z (f z))
         H f x = H g x S x (H f x)) f. x. f x = H f x

<<.
    wellFounded <<
    H.
      (f g x. (z. << z x f z = g z) H f x = H g x)
      f g. (x. f x = H f x) (x. g x = H g x) f = g

<<.
    (H.
       (f g x. (z. << z x (f z g z)) (H f x H g x))
       f g. (x. f x H f x) (x. g x H g x) f = g)
    wellFounded <<

s t f.
    finite s finite t size s = size t image f s t
    ((y. y t x. x s f x = y)
     x y. x s y s f x = f y x = y)

s t m n.
    hasSize s m (x. x s hasSize (t x) n)
    (x y. x s y s ¬(x = y) disjoint (t x) (t y))
    hasSize (bigUnion { x. t x | x s }) (m * n)

f b.
    (x y s. ¬(x = y) f x (f y s) = f y (f x s))
    fold f b = b
    x s.
      finite s
      fold f (insert x s) b =
      if x s then fold f s b else f x (fold f s b)

(n. 0 * n = 0) (m. m * 0 = 0) (n. 1 * n = n) (m. m * 1 = m)
  (m n. suc m * n = m * n + n) m n. m * suc n = m + m * n

f b.
    (x y s. ¬(x = y) f x (f y s) = f y (f x s))
    fold f b = b
    x s.
      finite s
      fold f s b =
      if x s then f x (fold f (delete s x) b) else fold f (delete s x) b

s t.
    finite s finite t size s = size t
    f.
      (x. x s f x t) (y. y t x. x s f x = y)
      x y. x s y s f x = f y x = y

(n. ¬(n = 0) 0 < n) (n. ¬(n = 0) 1 n)
  (n. 0 < n ¬(n = 0)) (n. 0 < n 1 n) (n. 1 n 0 < n)
  n. 1 n ¬(n = 0)

s f g b.
    finite s (x. x s f x = g x)
    (x y s. ¬(x = y) f x (f y s) = f y (f x s))
    (x y s. ¬(x = y) g x (g y s) = g y (g x s))
    fold f s b = fold g s b

f s t.
    (x. x s f x t)
    ((x y. x s y s f x = f y x = y)
     (y. y t x. x s f x = y)
     g.
       (y. y t g y s) (y. y t f (g y) = y)
       x. x s g (f x) = x)

d a s t.
    { f. f |
      (x. x insert a s f x t) x. ¬(x insert a s) f x = d } =
    image (λ(b, g) x. if x = a then b else g x)
      (cross t { f. f | (x. x s f x t) x. ¬(x s) f x = d })

(P f Q. (z. z { x. f x | P x } Q z) x. P x Q (f x))
  (P f Q.
     (z. z { x y. f x y | P x y } Q z) x y. P x y Q (f x y))
  P f Q.
    (z. z { w x y. f w x y | P w x y } Q z)
    w x y. P w x y Q (f w x y)

(P f Q. (z. z { x. f x | P x } Q z) x. P x Q (f x))
  (P f Q.
     (z. z { x y. f x y | P x y } Q z) x y. P x y Q (f x y))
  P f Q.
    (z. z { w x y. f w x y | P w x y } Q z)
    w x y. P w x y Q (f w x y)

(P f. bigIntersect { x. f x | P x } = { a. a | x. P x a f x })
  (P f.
     bigIntersect { x y. f x y | P x y } =
     { a. a | x y. P x y a f x y })
  P f.
    bigIntersect { x y z. f x y z | P x y z } =
    { a. a | x y z. P x y z a f x y z }

(P f. bigUnion { x. f x | P x } = { a. a | x. P x a f x })
  (P f.
     bigUnion { x y. f x y | P x y } =
     { a. a | x y. P x y a f x y })
  P f.
    bigUnion { x y z. f x y z | P x y z } =
    { a. a | x y z. P x y z a f x y z }

Input Type Operators

Input Constants

Assumptions

let a d ← (λe. d e) = da = λb. (λc. c) = λc. c

let a d
      let e g
          (let hd g
           λi.
             (let jh
              λk. (λl. l j k) = λm. m ((λc. c) = λc. c) ((λc. c) = λc. c))
               i h) (d ((select) d)) ∈
      e = (λf. (λc. c) = λc. c) ∈
  a = λb. (λc. c) = λc. c

let a o
      (let h
           let p r
               let p s
                   (let fo r = o s
                    λg.
                      (let hf
                       λi.
                         (λj. j h i) =
                         λk. k ((λd. d) = λd. d) ((λd. d) = λd. d)) g f)
                     (r = s) ∈
               p = (λq. (λd. d) = λd. d) ∈
           p = (λq. (λd. d) = λd. d) ∈
       λi. (λj. j h i) = λk. k ((λd. d) = λd. d) ((λd. d) = λd. d))
        (let t
             let p u
                 let v yu = o y
                 let b w
                     (let f
                          let p x
                              (let fv x
                               λg.
                                 (let hf
                                  λi.
                                    (λj. j h i) =
                                    λk.
                                      k ((λd. d) = λd. d)
                                        ((λd. d) = λd. d)) g f) w
                          p = (λq. (λd. d) = λd. d) ∈
                      λg.
                        (let hf
                         λi.
                           (λj. j h i) =
                           λk. k ((λd. d) = λd. d) ((λd. d) = λd. d)) g
                        f) w
                 b = (λc. (λd. d) = λd. d) ∈
             p = (λq. (λd. d) = λd. d) ∈
         (let ft
          λg.
            (let hf
             λi. (λj. j h i) = λk. k ((λd. d) = λd. d) ((λd. d) = λd. d))
              g f) (let b ddb = λc. (λd. d) = λd. d)) ∈
  let b e
      (let f
           let l n
               (let fa n
                λg.
                  (let hf
                   λi.
                     (λj. j h i) =
                     λk. k ((λd. d) = λd. d) ((λd. d) = λd. d)) g f) e
           l = (λm. (λd. d) = λd. d) ∈
       λg.
         (let hf
          λi. (λj. j h i) = λk. k ((λd. d) = λd. d) ((λd. d) = λd. d)) g
         f) e
  b = λc. (λd. d) = λd. d