Package function: Function operators and combinators
Information
name | function |
version | 1.41 |
description | Function operators and combinators |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
requires | bool |
show | Data.Bool Function |
Files
- Package tarball function-1.41.tgz
- Theory file function.thy (included in the package tarball)
Defined Constants
- Function
- id
- injective
- ∘
- surjective
- C
- K
- S
- W
Theorems
⊦ id = λx. x
⊦ K = λx y. x
⊦ ∀x. id x = x
⊦ W = λf x. f x x
⊦ ∀x. S K x = id
⊦ ∀f. f ∘ id = f
⊦ ∀f. id ∘ f = f
⊦ ∀f. C (C f) = f
⊦ (∘) = λf g x. f (g x)
⊦ C = λf x y. f y x
⊦ S = λf g x. f x (g x)
⊦ ∀x y. K x y = x
⊦ ∀f x. W f x = f x x
⊦ ∀f. surjective f ⇔ ∀y. ∃x. y = f x
⊦ ∀f g x. (f ∘ g) x = f (g x)
⊦ ∀f x y. C f x y = f y x
⊦ ∀f g x. S f g x = f x (g x)
⊦ ∀f g h. f ∘ (g ∘ h) = f ∘ g ∘ h
⊦ ∀f g h. f ∘ g ∘ h = f ∘ (g ∘ h)
⊦ ∀f. injective f ⇔ ∀x1 x2. f x1 = f x2 ⇒ x1 = x2
⊦ ∀f g. (∀x. ∃y. g y = f x) ⇔ ∃h. f = g ∘ h
⊦ ∀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
⊦ ∀f g. (∀x y. g x = g y ⇒ f x = f y) ⇔ ∃h. f = h ∘ g
⊦ ∀p f g. (∀x. p x ⇒ ∃y. g y = f x) ⇔ ∃h. ∀x. p x ⇒ f x = g (h x)
⊦ ∀p f g.
(∀x y. p x ∧ p y ∧ g x = g y ⇒ f x = f y) ⇔ ∃h. ∀x. p x ⇒ f x = h (g x)
Input Type Operators
- →
- bool
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- ⊥
- ⊤
- Bool
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ ∀t. t ⇒ t
⊦ (∃) = λp. p ((select) p)
⊦ ∀t. (∀x. t) ⇔ 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
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀f y. (let x ← y in f x) = f y
⊦ ∀x y. x = y ⇔ y = x
⊦ ∀x y. x = y ⇒ y = x
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀p. ¬(∀x. p x) ⇔ ∃x. ¬p x
⊦ ∀p. ¬(∃x. p x) ⇔ ∀x. ¬p x
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀f g. (∀x. f x = g x) ⇔ f = g
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀p q. p ⇒ (∃x. q x) ⇔ ∃x. p ⇒ q x
⊦ ∀p. (∀x. ∃y. p x y) ⇔ ∃y. ∀x. p x (y x)