Package option-map: The option map function
Information
name | option-map |
version | 1.7 |
description | The option map function |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | MIT |
requires | bool function option-def option-thm |
show | Data.Bool Data.Option Function |
Files
- Package tarball option-map-1.7.tgz
- Theory source file option-map.thy (included in the package tarball)
Defined Constant
- Data
- Option
- map
- Option
Theorems
⊦ map id = id
⊦ ∀f. map f none = none
⊦ ∀f a. map f (some a) = some (f a)
⊦ ∀f g. map f ∘ map g = map (f ∘ g)
⊦ ∀f g x. map (f ∘ g) x = map f (map g x)
External Type Operators
- →
- bool
- Data
- Option
- option
- Option
External Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- ⊥
- ⊤
- Option
- none
- some
- Bool
- Function
- id
- ∘
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ∀t. t ⇒ t
⊦ ∀x. id x = x
⊦ (∃) = λ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
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀x y. x = y ⇔ y = x
⊦ ∀x. x = none ∨ ∃a. x = some a
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀f g x. (f ∘ g) x = f (g x)
⊦ ∀f g. (∀x. f x = g x) ⇔ f = g
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀p. (∀x. ∃y. p x y) ⇔ ∃y. ∀x. p x (y x)
⊦ ∀b f. ∃fn. fn none = b ∧ ∀a. fn (some a) = f a