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

Information

nameset-fold-def
version1.47
descriptionDefinition of a fold operation on finite sets
authorJoe Leslie-Hurd <joe@gilith.com>
licenseHOLLight
provenanceHOL Light theory extracted on 2012-12-02
requiresbool
natural
set-finite
set-thm
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)

External Type Operators

External Constants

Assumptions

finite

¬

t. t t

p. p

x. ¬(x )

t. t ¬t

(¬) = λp. p

() = λ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 t

t. t

t. t t

t. t

t. t t

t. t

t. t

t. t t

n. ¬(suc n = 0)

t. ( t) ¬t

t. (t ) ¬t

t. t ¬t

() = λp q. p q p

t. (t ) (t )

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

() = λ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