Package set-fold-def: Definition of a fold operation on finite sets

Information

nameset-fold-def
version1.30
descriptionDefinition of a fold operation on finite sets
authorJoe Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2011-12-18
requiresbool
natural
set-thm
set-finite
showData.Bool
Number.Natural
Set

Files

Defined Constant

Theorem

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 b (insert x s) =
      if x s then fold f b s else f x (fold f b s)

Input Type Operators

Input Constants

Assumptions

T

finite

¬F T

t. t t

F p. p

x. ¬(x )

t. t ¬t

(¬) = λp. p F

() = λp. p ((select) p)

t. (x. t) t

t. (λx. t x) = t

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

t. ¬¬t t

t. (T t) t

t. (t T) t

t. F t F

t. T t t

t. t F F

t. t T t

t. F t T

t. T t t

t. t T T

t. T t T

t. t F t

n. ¬(suc n = 0)

t. (F t) ¬t

t. (t F) ¬t

t. t F ¬t

() = λp q. p q p

t. (t T) (t F)

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

x y. x = y y = x

t1 t2. t1 t2 t2 t1

s x. finite (delete s x) finite s

s x. finite (insert x s) finite s

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

() = λp. q. (x. p x q) q

x s. x s insert x s = s

m n. suc m = suc n m = n

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

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

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

p q. (x. p x) q x. p x q

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

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

p. (x. y. p x y) y. x. p x (y x)

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

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

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

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

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

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

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