# mathlibdocumentation

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 lawful_fix
@[class]
structure lawful_fix (α : Type u_3)  :
Type u_3
• to_has_fix :
• fix_eq : ∀ {f : α →o α},

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 of this typeclass
Instances of other typeclasses for lawful_fix
• lawful_fix.has_sizeof_inst
theorem lawful_fix.fix_eq' {α : Type u_1} [lawful_fix α] {f : α → α}  :
= f (has_fix.fix f)
theorem part.fix.approx_mono' {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) {i : } :
theorem part.fix.approx_mono {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) ⦃i j : (hij : i j) :
theorem part.fix.mem_iff {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) (a : α) (b : β a) :
b a ∃ (i : ), b a
theorem part.fix.approx_le_fix {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) (i : ) :
theorem part.fix.exists_fix_le_approx {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) (x : α) :
∃ (i : ), x x
def part.fix.approx_chain {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (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)) →o Π (a : α), part (β a)) {x : Π (a : α), part (β a)} :
x f x
theorem part.fix.approx_mem_approx_chain {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) {i : } :
theorem part.fix_eq_ωSup {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) :
theorem part.fix_le {α : Type u_1} {β : α → Type u_2} (f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)) {X : Π (a : α), part (β a)} (hX : f X X) :
X
theorem part.fix_eq {α : Type u_1} {β : α → Type u_2} {f : (Π (a : α), part (β a)) →o Π (a : α), part (β a)}  :
def part.to_unit_mono {α : Type u_1} (f : part α →o part α) :
(unitpart α) →o unitpart α

to_unit as a monotone function

Equations
@[simp]
theorem part.to_unit_mono_coe {α : Type u_1} (f : part α →o part α) (x : unitpart α) (u : unit) :
x u = f (x u)
theorem part.to_unit_cont {α : Type u_1} (f : part α →o part α)  :
@[protected, instance]
def part.lawful_fix {α : Type u_1} :
Equations
@[protected, 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) :
γ) f x y = 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) →o Π (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) :
γ) f x =
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) →o Π (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)] :
@[protected, 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
• pi.has_fix = {fix := λ (f : (Π (x : α) (y : β x), γ x y)Π (x : α) (y : β x), γ x y),
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) →o Π (x : α) (y : β x), γ x y}  :
@[protected, 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