The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Control.LawfulFix

31 declarations. Mathlib docs · Source

def LawfulFix.ctorIdx E1 #

{α : Type u_3} → {inst : OmegaCompletePartialOrder α} → LawfulFix α → ℕ

class LawfulFix E1 #

(α : Type u_3) → [OmegaCompletePartialOrder α] → 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).

instance LawfulFix.toFix E0 #

{α : Type u_3} → {inst : OmegaCompletePartialOrder α} → [self : LawfulFix α] → Fix α

ctor LawfulFix.mk E0 #

{α : Type u_3} →
  [inst : OmegaCompletePartialOrder α] →
    [toFix : Fix α] →
      (∀ {f : α → α}, OmegaCompletePartialOrder.ωScottContinuous f → Fix.fix f = f (Fix.fix f)) → LawfulFix α

theorem LawfulFix.fix_eq E0 #

∀ {α : Type u_3} {inst : OmegaCompletePartialOrder α} [self : LawfulFix α] {f : α → α},
  OmegaCompletePartialOrder.ωScottContinuous f → Fix.fix f = f (Fix.fix f)

theorem Part.Fix.approx_mono' E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) {i : ℕ},
  Part.Fix.approx (⇑f) i ≤ Part.Fix.approx (⇑f) i.succ

theorem Part.Fix.approx_mono E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) ⦃i j : ℕ⦄,
  i ≤ j → Part.Fix.approx (⇑f) i ≤ Part.Fix.approx (⇑f) j

theorem Part.Fix.mem_iff E0 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (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 E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) (i : ℕ),
  Part.Fix.approx (⇑f) i ≤ Part.fix ⇑f

theorem Part.Fix.exists_fix_le_approx E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) (x : α),
  ∃ i, Part.fix (⇑f) x ≤ Part.Fix.approx (⇑f) i x

def Part.Fix.approxChain E1 #

{α : Type u_1} →
  {β : α → Type u_2} →
    (((a : α) → Part (β a)) →o (a : α) → Part (β a)) → OmegaCompletePartialOrder.Chain ((a : α) → Part (β a))

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

theorem Part.Fix.le_f_of_mem_approx E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) {x : (a : α) → Part (β a)},
  x ∈ Part.Fix.approxChain f → x ≤ f x

theorem Part.Fix.approx_mem_approxChain E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) {i : ℕ},
  Part.Fix.approx (⇑f) i ∈ Part.Fix.approxChain f

theorem Part.fix_eq_ωSup E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)),
  Part.fix ⇑f = OmegaCompletePartialOrder.ωSup (Part.Fix.approxChain f)

theorem Part.fix_le E1 #

∀ {α : Type u_1} {β : α → Type u_2} (f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)) {X : (a : α) → Part (β a)},
  f X ≤ X → Part.fix ⇑f ≤ X

theorem Part.fix_eq_ωSup_of_ωScottContinuous E1 #

∀ {α : Type u_1} {β : α → Type u_2} {g : ((a : α) → Part (β a)) → (a : α) → Part (β a)}
  (hc : OmegaCompletePartialOrder.ωScottContinuous g),
  Part.fix g = OmegaCompletePartialOrder.ωSup (Part.Fix.approxChain { toFun := g, monotone' := ⋯ })

theorem Part.fix_eq_of_ωScottContinuous E1 #

∀ {α : Type u_1} {β : α → Type u_2} {g : ((a : α) → Part (β a)) → (a : α) → Part (β a)},
  OmegaCompletePartialOrder.ωScottContinuous g → Part.fix g = g (Part.fix g)

def Part.toUnitMono E1 #

{α : Type u_1} → (Part α →o Part α) → (Unit → Part α) →o Unit → Part α

toUnit as a monotone function

theorem Part.toUnitMono_coe E0 #

∀ {α : Type u_1} (f : Part α →o Part α) (x : Unit → Part α) (u : Unit), (Part.toUnitMono f) x u = f (x u)

theorem Part.ωScottContinuous_toUnitMono E1 #

∀ {α : Type u_1} (f : Part α → Part α) (hc : OmegaCompletePartialOrder.ωScottContinuous f),
  OmegaCompletePartialOrder.ωScottContinuous ⇑(Part.toUnitMono { toFun := f, monotone' := ⋯ })

instance Part.lawfulFix E0 #

{α : Type u_1} → LawfulFix (Part α)

instance Pi.lawfulFix E0 #

{α : Type u_1} → {β : Type u_3} → LawfulFix (α → Part β)

def Pi.monotoneCurry E1 #

(α : Type u_1) →
  (β : α → Type u_2) →
    (γ : (a : α) → β a → Type u_3) →
      [inst : (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.

theorem Pi.monotoneCurry_coe E0 #

∀ (α : Type u_1) (β : α → Type u_2) (γ : (a : α) → β a → Type u_3) [inst : (x : α) → (y : β x) → Preorder (γ x y)]
  (f : (x : (a : α) × β a) → γ x.fst x.snd) (x : α) (y : β x), (Pi.monotoneCurry α β γ) f x y = Sigma.curry f x y

def Pi.monotoneUncurry E1 #

(α : Type u_1) →
  (β : α → Type u_2) →
    (γ : (a : α) → β a → Type u_3) →
      [inst : (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.

theorem Pi.monotoneUncurry_coe E0 #

∀ (α : Type u_1) (β : α → Type u_2) (γ : (a : α) → β a → Type u_3) [inst : (x : α) → (y : β x) → Preorder (γ x y)]
  (f : (x : α) → (y : β x) → γ x y) (x : Sigma β), (Pi.monotoneUncurry α β γ) f x = Sigma.uncurry f x

theorem Pi.ωScottContinuous_curry E1 #

∀ (α : Type u_1) (β : α → Type u_2) (γ : (a : α) → β a → Type u_3)
  [inst : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)],
  OmegaCompletePartialOrder.ωScottContinuous ⇑(Pi.monotoneCurry α β γ)

theorem Pi.ωScottContinuous_uncurry E1 #

∀ (α : Type u_1) (β : α → Type u_2) (γ : (a : α) → β a → Type u_3)
  [inst : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)],
  OmegaCompletePartialOrder.ωScottContinuous ⇑(Pi.monotoneUncurry α β γ)

instance Pi.hasFix E0 #

{α : Type u_1} →
  {β : α → Type u_2} →
    {γ : (a : α) → β a → Type u_3} → [Fix ((x : Sigma β) → γ x.fst x.snd)] → Fix ((x : α) → (y : β x) → γ x y)

theorem Pi.uncurry_curry_ωScottContinuous E1 #

∀ {α : Type u_1} {β : α → Type u_2} {γ : (a : α) → β a → Type u_3}
  [inst : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)]
  {f : ((a : α) → (b : β a) → γ a b) → (a : α) → (b : β a) → γ a b} (hc : OmegaCompletePartialOrder.ωScottContinuous f),
  OmegaCompletePartialOrder.ωScottContinuous
    ⇑((Pi.monotoneUncurry α β γ).comp ({ toFun := f, monotone' := ⋯ }.comp (Pi.monotoneCurry α β γ)))

instance Pi.lawfulFix' E0 #

{α : Type u_1} →
  {β : α → Type u_2} →
    {γ : (a : α) → β a → Type u_3} →
      [inst : (x : α) → (y : β x) → OmegaCompletePartialOrder (γ x y)] →
        [LawfulFix ((x : Sigma β) → γ x.fst x.snd)] → LawfulFix ((x : α) → (y : β x) → γ x y)