This module contains some basic definitions and results from domain theory, intended to be used as
the underlying construction of the partial_fixpoint
feature. It is not meant to be used as a
general purpose library for domain theory, but can be of interest to users who want to extend
the partial_fixpoint
machinery (e.g. mark more functions as monotone or register more monads).
This follows the corresponding Isabelle development, as also described in Alexander Krauss: Recursive Definitions of Monadic Functions.
A partial order is a reflexive, transitive and antisymmetric relation.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
- rel : α → α → Prop
A “less-or-equal-to” or “approximates” relation.
This is intended to be used in the construction of
partial_fixpoint
, and not meant to be used otherwise. - rel_refl {x : α} : rel x x
The “less-or-equal-to” or “approximates” relation is reflexive.
The “less-or-equal-to” or “approximates” relation is transitive.
The “less-or-equal-to” or “approximates” relation is antisymmetric.
Instances
A “less-or-equal-to” or “approximates” relation.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
A chain is a totally ordered set (representing a set as a predicate).
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
A chain-complete partial order (CCPO) is a partial order where every chain has a least upper bound.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used
otherwise.
- csup : (α → Prop) → α
The least upper bound of a chain.
This is intended to be used in the construction of
partial_fixpoint
, and not meant to be used otherwise. - csup_spec {x : α} {c : α → Prop} (hc : chain c) : PartialOrder.rel (csup c) x ↔ ∀ (y : α), c y → PartialOrder.rel y x
Instances
The bottom element is the least upper bound of the empty chain.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
A complete lattice is a partial order where every subset has a least upper bound.
- sup : (α → Prop) → α
The least upper bound of an arbitrary subset in the complete_lattice.
- sup_spec {x : α} {c : α → Prop} : PartialOrder.rel (sup c) x ↔ ∀ (y : α), c y → PartialOrder.rel y x
Instances
A function is monotone if it maps related elements to related elements.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
A predicate is admissible if it can be transferred from the elements of a chain to the chains least upper bound. Such predicates can be used in fixpoint induction.
This definition implies P ⊥
. Sometimes (e.g. in Isabelle) the empty chain is excluded
from this definition, and P ⊥
is a separate condition of the induction predicate.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Park induction principle for least fixpoint.
In general, this construction does not require monotonicity of f
.
Monotonicity is required to show that lfp f
is indeed a fixpoint of f
.
Park induction for least fixpoint of a monotone function f
.
Takes an explicit witness of f
being monotone.
The transfinite iteration of a function f
is a set that is ⊥
and is closed under application
of f
and csup
.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
- step {α : Sort u} [CCPO α] {f : α → α} {x : α} : iterates f x → iterates f (f x)
- sup {α : Sort u} [CCPO α] {f : α → α} {c : α → Prop} (hc : chain c) (hi : ∀ (x : α), c x → iterates f x) : iterates f (CCPO.csup c)
Instances For
The least fixpoint of a monotone function is the least upper bound of its transfinite iteration.
The monotone f
assumption is not strictly necessarily for the definition, but without this the
definition is not very meaningful and it simplifies applying theorems like fix_eq
if every use of
fix
already has the monotonicty requirement.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
The main fixpoint theorem for fixedpoints of monotone functions in chain-complete partial orders.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
The fixpoint induction theme: An admissible predicate holds for a least fixpoint if it is preserved by the fixpoint's function.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Equations
Instances For
Equations
Equations
Instances For
Equations
Instances For
Equations
Equations
Instances For
Equations
Instances For
Equations
FlatOrder b
wraps the type α
with the flat partial order generated by ∀ x, b ⊑ x
.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
Equations
Instances For
Equations
Equations
The class MonoBind m
indicates that every m α
has a PartialOrder
, and that the bind operation
on m
is monotone in both arguments with regard to that order.
This is intended to be used in the construction of partial_fixpoint
, and not meant to be used otherwise.
- bind_mono_left {α b : Type u} {a₁ a₂ : m α} {f : α → m b} (h : PartialOrder.rel a₁ a₂) : PartialOrder.rel (a₁ >>= f) (a₂ >>= f)
- bind_mono_right {α b : Type u} {a : m α} {f₁ f₂ : α → m b} (h : ∀ (x : α), PartialOrder.rel (f₁ x) (f₂ x)) : PartialOrder.rel (a >>= f₁) (a >>= f₂)