mathlib documentation

control.lawful_fix

Lawful fixed point operators #

This module defines the laws required of a has_fix instance, using the theory of omega complete partial orders (ωCPO). Proofs of the lawfulness of all has_fix instances in control.fix are provided.

Main definition #

@[class]
structure lawful_fix (α : Type u_3) [omega_complete_partial_order α] :
Type u_3

Intuitively, a fixed point operator fix is lawful if it satisfies fix f = f (fix f) for all f, but this is inconsistent / uninteresting in most cases due to the existence of "exotic" functions f, such as the function that is defined iff its argument is not, familiar from the halting problem. Instead, this requirement is limited to only functions that are continuous in the sense of ω-complete partial orders, which excludes the example because it is not monotone (making the input argument less defined can make f more defined).

Instances
theorem part.fix.approx_mono' {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) {i : } :
theorem part.fix.approx_mono {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) ⦃i j : (hij : i j) :
theorem part.fix.mem_iff {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) (a : α) (b : β a) :
b part.fix f a ∃ (i : ), b part.fix.approx f i a
theorem part.fix.approx_le_fix {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) (i : ) :
theorem part.fix.exists_fix_le_approx {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) (x : α) :
∃ (i : ), part.fix f x part.fix.approx f i x
def part.fix.approx_chain {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) :

The series of approximations of fix f (see approx) as a chain

Equations
theorem part.fix.le_f_of_mem_approx {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) {x : Π (a : α), part (β a)} (hx : x part.fix.approx_chain f) :
x f x
theorem part.fix.approx_mem_approx_chain {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) {i : } :
theorem part.fix_eq_ωSup {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) :
theorem part.fix_le {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)) {X : Π (a : α), part (β a)} (hX : f X X) :
theorem part.fix_eq {α : Type u_1} {β : α → Type u_2} {f : (Π (a : α), part (β a)) →ₘ Π (a : α), part (β a)} (hc : omega_complete_partial_order.continuous f) :
def part.to_unit_mono {α : Type u_1} (f : part α →ₘ part α) :
(unitpart α) →ₘ unitpart α

to_unit as a monotone function

Equations
@[simp]
theorem part.to_unit_mono_coe {α : Type u_1} (f : part α →ₘ part α) (x : unitpart α) (u : unit) :
(part.to_unit_mono f) x u = f (x u)
@[instance]
def part.lawful_fix {α : Type u_1} :
Equations
@[instance]
def pi.lawful_fix {α : Type u_1} {β : Type u_2} :
lawful_fix (α → part β)
Equations
@[simp]
theorem pi.monotone_curry_coe (α : Type u_1) (β : α → Type u_2) (γ : Π (a : α), β aType u_3) [Π (x : α) (y : β x), preorder (γ x y)] (f : Π (x : Σ (a : α), β a), γ x.fst x.snd) (x : α) (y : β x) :
(pi.monotone_curry α β γ) f x y = sigma.curry f x y
def pi.monotone_curry (α : Type u_1) (β : α → Type u_2) (γ : Π (a : α), β aType u_3) [Π (x : α) (y : β x), preorder (γ x y)] :
(Π (x : Σ (a : α), β a), γ x.fst x.snd) →ₘ Π (a : α) (b : β a), γ a b

sigma.curry as a monotone function.

Equations
@[simp]
theorem pi.monotone_uncurry_coe (α : Type u_1) (β : α → Type u_2) (γ : Π (a : α), β aType u_3) [Π (x : α) (y : β x), preorder (γ x y)] (f : Π (x : α) (y : (λ (a : α), β a) x), (λ (a : α) (b : β a), γ a b) x y) (x : Σ (a : α), β a) :
def pi.monotone_uncurry (α : Type u_1) (β : α → Type u_2) (γ : Π (a : α), β aType u_3) [Π (x : α) (y : β x), preorder (γ x y)] :
(Π (a : α) (b : β a), γ a b) →ₘ Π (x : Σ (a : α), β a), γ x.fst x.snd

sigma.uncurry as a monotone function.

Equations
theorem pi.continuous_curry (α : Type u_1) (β : α → Type u_2) (γ : Π (a : α), β aType u_3) [Π (x : α) (y : β x), omega_complete_partial_order (γ x y)] :
theorem pi.continuous_uncurry (α : Type u_1) (β : α → Type u_2) (γ : Π (a : α), β aType u_3) [Π (x : α) (y : β x), omega_complete_partial_order (γ x y)] :
@[instance]
def pi.has_fix {α : Type u_1} {β : α → Type u_2} {γ : Π (a : α), β aType u_3} [has_fix (Π (x : sigma β), γ x.fst x.snd)] :
has_fix (Π (x : α) (y : β x), γ x y)
Equations
theorem pi.uncurry_curry_continuous {α : Type u_1} {β : α → Type u_2} {γ : Π (a : α), β aType u_3} [Π (x : α) (y : β x), omega_complete_partial_order (γ x y)] {f : (Π (x : α) (y : β x), γ x y) →ₘ Π (x : α) (y : β x), γ x y} (hc : omega_complete_partial_order.continuous f) :
@[instance]
def pi.pi.lawful_fix' {α : Type u_1} {β : α → Type u_2} {γ : Π (a : α), β aType u_3} [Π (x : α) (y : β x), omega_complete_partial_order (γ x y)] [lawful_fix (Π (x : sigma β), γ x.fst x.snd)] :
lawful_fix (Π (x : α) (y : β x), γ x y)
Equations