doc-next-gen

Mathlib.Order.OmegaCompletePartialOrder

Module docstring

{"# Omega Complete Partial Orders

An omega-complete partial order is a partial order with a supremum operation on increasing sequences indexed by natural numbers (which we call ωSup). In this sense, it is strictly weaker than join complete semi-lattices as only ω-sized totally ordered sets have a supremum.

The concept of an omega-complete partial order (ωCPO) is useful for the formalization of the semantics of programming languages. Its notion of supremum helps define the meaning of recursive procedures.

Main definitions

  • class OmegaCompletePartialOrder
  • ite, map, bind, seq as continuous morphisms

Instances of OmegaCompletePartialOrder

  • Part
  • every CompleteLattice
  • pi-types
  • product types
  • OrderHom
  • ContinuousHom (with notation →𝒄)
    • an instance of OmegaCompletePartialOrder (α →𝒄 β)
  • ContinuousHom.ofFun
  • ContinuousHom.ofMono
  • continuous functions:
    • id
    • ite
    • const
    • Part.bind
    • Part.map
    • Part.seq

References

  • [Chain-complete posets and directed sets with applications][markowsky1976]
  • [Recursive definitions of partial functions and their computations][cadiou1972]
  • [Semantics of Programming Languages: Structures and Techniques][gunter1992] "}
OmegaCompletePartialOrder.Chain definition
(α : Type u) [Preorder α]
Full source
/-- A chain is a monotone sequence.

See the definition on page 114 of [gunter1992]. -/
def Chain (α : Type u) [Preorder α] :=
  ℕ →o α
Chain in a preorder
Informal description
A chain in a preorder $\alpha$ is a monotone sequence of elements in $\alpha$ indexed by natural numbers. That is, it is a function $f : \mathbb{N} \to \alpha$ such that for any $n \leq m$, we have $f(n) \leq f(m)$.
OmegaCompletePartialOrder.Chain.instFunLikeNat instance
: FunLike (Chain α) ℕ α
Full source
instance : FunLike (Chain α)  α := inferInstanceAs <| FunLike (ℕ →o α)  α
Function-Like Structure on Chains in Preorders
Informal description
For any preorder $\alpha$, the type of chains in $\alpha$ (monotone sequences indexed by natural numbers) can be treated as a function-like type, where each chain can be coerced to a function from $\mathbb{N}$ to $\alpha$.
OmegaCompletePartialOrder.Chain.instOrderHomClassNat instance
: OrderHomClass (Chain α) ℕ α
Full source
instance : OrderHomClass (Chain α)  α := inferInstanceAs <| OrderHomClass (ℕ →o α)  α
Chains as Order-Preserving Maps from Natural Numbers
Informal description
For any preorder $\alpha$, the type of chains in $\alpha$ (monotone sequences indexed by natural numbers) forms an instance of `OrderHomClass`, meaning that every chain preserves the order relation: if $n \leq m$ in $\mathbb{N}$, then $c(n) \leq c(m)$ in $\alpha$ for any chain $c$.
OmegaCompletePartialOrder.Chain.instInhabited instance
[Inhabited α] : Inhabited (Chain α)
Full source
instance [Inhabited α] : Inhabited (Chain α) :=
  ⟨⟨default, fun _ _ _ => le_rfl⟩⟩
Inhabited Chains in Inhabited Preorders
Informal description
For any preorder $\alpha$ with an inhabited instance, the type of chains in $\alpha$ is also inhabited.
OmegaCompletePartialOrder.Chain.instMembership instance
: Membership α (Chain α)
Full source
instance : Membership α (Chain α) :=
  ⟨fun (c : ℕ →o α) a => ∃ i, a = c i⟩
Membership Relation for Elements in a Chain
Informal description
For any preorder $\alpha$, we say an element $a \in \alpha$ belongs to a chain $c$ (denoted $a \in c$) if $a$ appears in the range of the chain $c$.
OmegaCompletePartialOrder.Chain.instLE instance
: LE (Chain α)
Full source
instance : LE (Chain α) where le x y := ∀ i, ∃ j, x i ≤ y j
Partial Order on Chains in a Preorder
Informal description
For any preorder $\alpha$, the type of chains in $\alpha$ (monotone sequences indexed by natural numbers) is equipped with a partial order structure, where for two chains $c_1$ and $c_2$, we say $c_1 \leq c_2$ if $c_1(n) \leq c_2(n)$ for all natural numbers $n$.
OmegaCompletePartialOrder.Chain.isChain_range theorem
: IsChain (· ≤ ·) (Set.range c)
Full source
lemma isChain_range : IsChain (· ≤ ·) (Set.range c) := Monotone.isChain_range (OrderHomClass.mono c)
Range of a Chain is a Chain
Informal description
For any chain $c$ in a preorder $\alpha$, the range of $c$ is a chain with respect to the non-strict order $\leq$ on $\alpha$. That is, for any two distinct elements $x, y$ in the range of $c$, either $x \leq y$ or $y \leq x$ holds.
OmegaCompletePartialOrder.Chain.directed theorem
: Directed (· ≤ ·) c
Full source
lemma directed : Directed (· ≤ ·) c := directedOn_range.2 c.isChain_range.directedOn
Directedness of Chains in Preorders
Informal description
For any chain $c$ in a preorder $\alpha$, the chain is directed with respect to the non-strict order $\leq$ on $\alpha$. That is, for any two elements $x, y$ in the chain, there exists an element $z$ in the chain such that $x \leq z$ and $y \leq z$.
OmegaCompletePartialOrder.Chain.map definition
: Chain β
Full source
/-- `map` function for `Chain` -/
-- Porting note: `simps` doesn't work with type synonyms
-- @[simps! -fullyApplied]
def map : Chain β :=
  f.comp c
Mapping a chain through an order homomorphism
Informal description
Given a chain `c` in a preorder `α` and an order homomorphism `f : α →o β`, the function `map` constructs a new chain in `β` by applying `f` to each element of `c`. Specifically, the new chain is the composition `f ∘ c`, ensuring that the order is preserved.
OmegaCompletePartialOrder.Chain.map_coe theorem
: ⇑(map c f) = f ∘ c
Full source
@[simp] theorem map_coe : ⇑(map c f) = f ∘ c := rfl
Function Representation of Mapped Chain: $\text{map}(c, f) = f \circ c$
Informal description
For a chain $c$ in a preorder $\alpha$ and an order homomorphism $f : \alpha \to_o \beta$, the function representation of the mapped chain $\text{map}(c, f)$ is equal to the composition $f \circ c$.
OmegaCompletePartialOrder.Chain.mem_map theorem
(x : α) : x ∈ c → f x ∈ Chain.map c f
Full source
theorem mem_map (x : α) : x ∈ cf x ∈ Chain.map c f :=
  fun ⟨i, h⟩ => ⟨i, h.symm ▸ rfl⟩
Image of Chain Element under Order Homomorphism Belongs to Mapped Chain
Informal description
For any element $x$ in a preorder $\alpha$, if $x$ belongs to a chain $c$ in $\alpha$, then the image $f(x)$ under an order homomorphism $f : \alpha \to_o \beta$ belongs to the mapped chain $\text{map}(c, f)$ in $\beta$.
OmegaCompletePartialOrder.Chain.exists_of_mem_map theorem
{b : β} : b ∈ c.map f → ∃ a, a ∈ c ∧ f a = b
Full source
theorem exists_of_mem_map {b : β} : b ∈ c.map f∃ a, a ∈ c ∧ f a = b :=
  fun ⟨i, h⟩ => ⟨c i, ⟨i, rfl⟩, h.symm⟩
Existence of Preimage in Chain Mapping: $b \in f(c) \implies \exists a \in c, f(a) = b$
Informal description
For any element $b$ in the codomain $\beta$ of an order homomorphism $f : \alpha \to_o \beta$, if $b$ belongs to the image of a chain $c$ under $f$, then there exists an element $a$ in the chain $c$ such that $f(a) = b$.
OmegaCompletePartialOrder.Chain.mem_map_iff theorem
{b : β} : b ∈ c.map f ↔ ∃ a, a ∈ c ∧ f a = b
Full source
@[simp]
theorem mem_map_iff {b : β} : b ∈ c.map fb ∈ c.map f ↔ ∃ a, a ∈ c ∧ f a = b :=
  ⟨exists_of_mem_map _, fun h => by
    rcases h with ⟨w, h, h'⟩
    subst b
    apply mem_map c _ h⟩
Characterization of Membership in Mapped Chain: $b \in f(c) \leftrightarrow \exists a \in c, f(a) = b$
Informal description
For any element $b$ in a preorder $\beta$, $b$ belongs to the image of a chain $c$ under an order homomorphism $f : \alpha \to_o \beta$ if and only if there exists an element $a$ in $c$ such that $f(a) = b$. In symbols: $b \in f(c) \leftrightarrow \exists a \in c, f(a) = b$.
OmegaCompletePartialOrder.Chain.map_id theorem
: c.map OrderHom.id = c
Full source
@[simp]
theorem map_id : c.map OrderHom.id = c :=
  OrderHom.comp_id _
Identity Mapping Preserves Chains
Informal description
For any chain $c$ in a preorder $\alpha$, the chain obtained by mapping $c$ through the identity order homomorphism $\operatorname{id} \colon \alpha \to_o \alpha$ is equal to $c$ itself. In symbols: $c \map \operatorname{id} = c$.
OmegaCompletePartialOrder.Chain.map_comp theorem
: (c.map f).map g = c.map (g.comp f)
Full source
theorem map_comp : (c.map f).map g = c.map (g.comp f) :=
  rfl
Composition of Chain Mappings via Order Homomorphisms
Informal description
Given a chain $c$ in a preorder $\alpha$ and order homomorphisms $f \colon \alpha \to_o \beta$ and $g \colon \beta \to_o \gamma$, the chain obtained by first mapping $c$ through $f$ and then mapping the result through $g$ is equal to the chain obtained by mapping $c$ through the composition $g \circ f$. In symbols: $(c \map f) \map g = c \map (g \circ f)$.
OmegaCompletePartialOrder.Chain.map_le_map theorem
{g : α →o β} (h : f ≤ g) : c.map f ≤ c.map g
Full source
@[mono]
theorem map_le_map {g : α →o β} (h : f ≤ g) : c.map f ≤ c.map g :=
  fun i => by simp only [map_coe, Function.comp_apply]; exists i; apply h
Monotonicity of Chain Mapping with Respect to Order Homomorphisms
Informal description
Let $\alpha$ and $\beta$ be preorders, and let $f, g \colon \alpha \to_o \beta$ be order homomorphisms such that $f \leq g$ pointwise (i.e., $f(x) \leq g(x)$ for all $x \in \alpha$). For any chain $c$ in $\alpha$, the mapped chain $c \circ f$ is pointwise less than or equal to the mapped chain $c \circ g$ in $\beta$.
OmegaCompletePartialOrder.Chain.zip definition
(c₀ : Chain α) (c₁ : Chain β) : Chain (α × β)
Full source
/-- `OmegaCompletePartialOrder.Chain.zip` pairs up the elements of two chains
that have the same index. -/
-- Porting note: `simps` doesn't work with type synonyms
-- @[simps!]
def zip (c₀ : Chain α) (c₁ : Chain β) : Chain (α × β) :=
  OrderHom.prod c₀ c₁
Pairing of chains in product preorder
Informal description
Given two chains (monotone sequences) \( c_0 \) in a preorder \( \alpha \) and \( c_1 \) in a preorder \( \beta \), the function `zip` pairs their elements at each index, producing a chain in the product preorder \( \alpha \times \beta \). That is, for each natural number \( n \), the \( n \)-th element of the resulting chain is the pair \( (c_0(n), c_1(n)) \).
OmegaCompletePartialOrder.Chain.zip_coe theorem
(c₀ : Chain α) (c₁ : Chain β) (n : ℕ) : c₀.zip c₁ n = (c₀ n, c₁ n)
Full source
@[simp] theorem zip_coe (c₀ : Chain α) (c₁ : Chain β) (n : ) : c₀.zip c₁ n = (c₀ n, c₁ n) := rfl
Element-wise Pairing of Zipped Chains: $(c₀.zip\, c₁)(n) = (c₀(n), c₁(n))$
Informal description
For any chains (monotone sequences) $c₀$ in a preorder $\alpha$ and $c₁$ in a preorder $\beta$, and for any natural number $n$, the $n$-th element of the zipped chain $c₀.zip\, c₁$ in the product preorder $\alpha \times \beta$ is equal to the pair $(c₀(n), c₁(n))$.
OmegaCompletePartialOrder.Chain.pair definition
(a b : α) (hab : a ≤ b) : Chain α
Full source
/-- An example of a `Chain` constructed from an ordered pair. -/
def pair (a b : α) (hab : a ≤ b) : Chain α where
  toFun
    | 0 => a
    | _ => b
  monotone' _ _ _ := by aesop
Chain from ordered pair
Informal description
Given two elements $a$ and $b$ in a preorder $\alpha$ with $a \leq b$, the function constructs a chain (monotone sequence) where the first element is $a$ and all subsequent elements are $b$.
OmegaCompletePartialOrder.Chain.pair_zero theorem
(a b : α) (hab) : pair a b hab 0 = a
Full source
@[simp] lemma pair_zero (a b : α) (hab) : pair a b hab 0 = a := rfl
Initial Element in Chain from Ordered Pair is $a$
Informal description
For any elements $a$ and $b$ in a preorder $\alpha$ with $a \leq b$, the first element (at index 0) of the chain constructed from the ordered pair $(a, b)$ is equal to $a$.
OmegaCompletePartialOrder.Chain.pair_succ theorem
(a b : α) (hab) (n : ℕ) : pair a b hab (n + 1) = b
Full source
@[simp] lemma pair_succ (a b : α) (hab) (n : ) : pair a b hab (n + 1) = b := rfl
Successor Element in Chain from Ordered Pair is $b$
Informal description
For any elements $a$ and $b$ in a preorder $\alpha$ with $a \leq b$, and for any natural number $n$, the $(n+1)$-th element of the chain constructed from the ordered pair $(a, b)$ is equal to $b$.
OmegaCompletePartialOrder.Chain.range_pair theorem
(a b : α) (hab) : Set.range (pair a b hab) = { a, b }
Full source
@[simp] lemma range_pair (a b : α) (hab) : Set.range (pair a b hab) = {a, b} := by
  ext; exact Nat.or_exists_add_one.symm.trans (by aesop)
Range of Chain from Ordered Pair Equals $\{a, b\}$
Informal description
For any elements $a$ and $b$ in a preorder $\alpha$ with $a \leq b$, the range of the chain constructed from the ordered pair $(a, b)$ is exactly the set $\{a, b\}$.
OmegaCompletePartialOrder.Chain.pair_zip_pair theorem
(a₁ a₂ : α) (b₁ b₂ : β) (ha hb) : (pair a₁ a₂ ha).zip (pair b₁ b₂ hb) = pair (a₁, b₁) (a₂, b₂) (Prod.le_def.2 ⟨ha, hb⟩)
Full source
@[simp] lemma pair_zip_pair (a₁ a₂ : α) (b₁ b₂ : β) (ha hb) :
    (pair a₁ a₂ ha).zip (pair b₁ b₂ hb) = pair (a₁, b₁) (a₂, b₂) (Prod.le_def.2 ⟨ha, hb⟩) := by
  unfold Chain; ext n : 2; cases n <;> rfl
Zipping Pair Chains Yields Product Pair Chain
Informal description
For any elements $a_1, a_2$ in a preorder $\alpha$ with $a_1 \leq a_2$, and any elements $b_1, b_2$ in a preorder $\beta$ with $b_1 \leq b_2$, the zip of the chains `pair a₁ a₂ ha` and `pair b₁ b₂ hb` is equal to the chain `pair (a₁, b₁) (a₂, b₂)` in the product preorder $\alpha \times \beta$, where the order relation is given by the product order $\langle ha, hb \rangle$.
OmegaCompletePartialOrder structure
(α : Type*) extends PartialOrder α
Full source
/-- An omega-complete partial order is a partial order with a supremum
operation on increasing sequences indexed by natural numbers (which we
call `ωSup`). In this sense, it is strictly weaker than join complete
semi-lattices as only ω-sized totally ordered sets have a supremum.

See the definition on page 114 of [gunter1992]. -/
class OmegaCompletePartialOrder (α : Type*) extends PartialOrder α where
  /-- The supremum of an increasing sequence -/
  ωSup : Chain α → α
  /-- `ωSup` is an upper bound of the increasing sequence -/
  le_ωSup : ∀ c : Chain α, ∀ i, c i ≤ ωSup c
  /-- `ωSup` is a lower bound of the set of upper bounds of the increasing sequence -/
  ωSup_le : ∀ (c : Chain α) (x), (∀ i, c i ≤ x) → ωSup c ≤ x
Omega-Complete Partial Order (ωCPO)
Informal description
An omega-complete partial order (ωCPO) is a structure consisting of a partial order $(α, \leq)$ equipped with a supremum operation $\omega\text{Sup}$ that computes the least upper bound for any increasing sequence indexed by natural numbers. This structure is strictly weaker than join-complete semilattices, as it only guarantees suprema for countably infinite (ω-sized) chains rather than all directed sets.
OmegaCompletePartialOrder.lift abbrev
[PartialOrder β] (f : β →o α) (ωSup₀ : Chain β → β) (h : ∀ x y, f x ≤ f y → x ≤ y) (h' : ∀ c, f (ωSup₀ c) = ωSup (c.map f)) : OmegaCompletePartialOrder β
Full source
/-- Transfer an `OmegaCompletePartialOrder` on `β` to an `OmegaCompletePartialOrder` on `α`
using a strictly monotone function `f : β →o α`, a definition of ωSup and a proof that `f` is
continuous with regard to the provided `ωSup` and the ωCPO on `α`. -/
protected abbrev lift [PartialOrder β] (f : β →o α) (ωSup₀ : Chain β → β)
    (h : ∀ x y, f x ≤ f y → x ≤ y) (h' : ∀ c, f (ωSup₀ c) = ωSup (c.map f)) :
    OmegaCompletePartialOrder β where
  ωSup := ωSup₀
  ωSup_le c x hx := h _ _ (by rw [h']; apply ωSup_le; intro i; apply f.monotone (hx i))
  le_ωSup c i := h _ _ (by rw [h']; apply le_ωSup (c.map f))
Lifting an $\omega$-Complete Partial Order Along a Strictly Monotone Continuous Function
Informal description
Given a partial order $\beta$ and a strictly monotone function $f : \beta \to_o \alpha$ (where $\alpha$ is an $\omega$-complete partial order), along with a function $\omega\text{Sup}_0$ that computes suprema of chains in $\beta$, if $f$ satisfies the following conditions: 1. (Strict monotonicity) For any $x, y \in \beta$, if $f(x) \leq f(y)$, then $x \leq y$. 2. (Continuity) For any chain $c$ in $\beta$, $f(\omega\text{Sup}_0(c)) = \omega\text{Sup}(f \circ c)$, then $\beta$ can be equipped with an $\omega$-complete partial order structure where the supremum operation is given by $\omega\text{Sup}_0$.
OmegaCompletePartialOrder.le_ωSup_of_le theorem
{c : Chain α} {x : α} (i : ℕ) (h : x ≤ c i) : x ≤ ωSup c
Full source
theorem le_ωSup_of_le {c : Chain α} {x : α} (i : ) (h : x ≤ c i) : x ≤ ωSup c :=
  le_trans h (le_ωSup c _)
Element Below Chain Member is Below Supremum in ωCPO
Informal description
Let $\alpha$ be an $\omega$-complete partial order, and let $c : \mathbb{N} \to \alpha$ be an increasing chain in $\alpha$. For any element $x \in \alpha$ and natural number $i$, if $x \leq c(i)$, then $x \leq \omega\text{Sup}(c)$, where $\omega\text{Sup}(c)$ is the supremum of the chain $c$.
OmegaCompletePartialOrder.ωSup_total theorem
{c : Chain α} {x : α} (h : ∀ i, c i ≤ x ∨ x ≤ c i) : ωSup c ≤ x ∨ x ≤ ωSup c
Full source
theorem ωSup_total {c : Chain α} {x : α} (h : ∀ i, c i ≤ x ∨ x ≤ c i) : ωSupωSup c ≤ x ∨ x ≤ ωSup c :=
  by_cases
    (fun (this : ∀ i, c i ≤ x) => Or.inl (ωSup_le _ _ this))
    (fun (this : ¬∀ i, c i ≤ x) =>
      have : ∃ i, ¬c i ≤ x := by simp only [not_forall] at this ⊢; assumption
      let ⟨i, hx⟩ := this
      have : x ≤ c i := (h i).resolve_left hx
      Or.inr <| le_ωSup_of_le _ this)
Totality Condition for Supremum in $\omega$-Complete Partial Orders: $\omega\text{Sup}(c) \leq x \lor x \leq \omega\text{Sup}(c)$
Informal description
Let $\alpha$ be an $\omega$-complete partial order, and let $c : \mathbb{N} \to \alpha$ be an increasing chain in $\alpha$. For any element $x \in \alpha$, if for every natural number $i$, either $c(i) \leq x$ or $x \leq c(i)$, then either the supremum $\omega\text{Sup}(c)$ is less than or equal to $x$, or $x$ is less than or equal to $\omega\text{Sup}(c)$.
OmegaCompletePartialOrder.ωSup_le_ωSup_of_le theorem
{c₀ c₁ : Chain α} (h : c₀ ≤ c₁) : ωSup c₀ ≤ ωSup c₁
Full source
@[mono]
theorem ωSup_le_ωSup_of_le {c₀ c₁ : Chain α} (h : c₀ ≤ c₁) : ωSup c₀ ≤ ωSup c₁ :=
  (ωSup_le _ _) fun i => by
    obtain ⟨_, h⟩ := h i
    exact le_trans h (le_ωSup _ _)
Monotonicity of Supremum in ωCPO with Respect to Chain Ordering
Informal description
Let $\alpha$ be an $\omega$-complete partial order, and let $c_0$ and $c_1$ be two increasing chains in $\alpha$ such that $c_0 \leq c_1$ (i.e., $c_0(n) \leq c_1(n)$ for all natural numbers $n$). Then the supremum of $c_0$ is less than or equal to the supremum of $c_1$, i.e., $\omega\text{Sup}(c_0) \leq \omega\text{Sup}(c_1)$.
OmegaCompletePartialOrder.ωSup_le_iff theorem
{c : Chain α} {x : α} : ωSup c ≤ x ↔ ∀ i, c i ≤ x
Full source
@[simp] theorem ωSup_le_iff {c : Chain α} {x : α} : ωSupωSup c ≤ x ↔ ∀ i, c i ≤ x := by
  constructor <;> intros
  · trans ωSup c
    · exact le_ωSup _ _
    · assumption
  exact ωSup_le _ _ ‹_›
Characterization of Supremum in Omega-Complete Partial Orders: $\omega\text{Sup}(c) \leq x \leftrightarrow \forall i, c(i) \leq x$
Informal description
For any chain $c$ in an omega-complete partial order $\alpha$ and any element $x \in \alpha$, the supremum $\omega\text{Sup}(c)$ is less than or equal to $x$ if and only if every element $c(i)$ in the chain is less than or equal to $x$.
OmegaCompletePartialOrder.isLUB_range_ωSup theorem
(c : Chain α) : IsLUB (Set.range c) (ωSup c)
Full source
lemma isLUB_range_ωSup (c : Chain α) : IsLUB (Set.range c) (ωSup c) := by
  constructor
  · simp only [upperBounds, Set.mem_range, forall_exists_index, forall_apply_eq_imp_iff,
      Set.mem_setOf_eq]
    exact fun a ↦ le_ωSup c a
  · simp only [lowerBounds, upperBounds, Set.mem_range, forall_exists_index,
      forall_apply_eq_imp_iff, Set.mem_setOf_eq]
    exact fun ⦃a⦄ a_1 ↦ ωSup_le c a a_1
$\omega\text{Sup}(c)$ is the least upper bound of the range of $c$ in an $\omega$-complete partial order
Informal description
For any chain $c$ in an $\omega$-complete partial order $\alpha$, the $\omega$-supremum $\omega\text{Sup}(c)$ is the least upper bound of the range of $c$. That is, $\omega\text{Sup}(c)$ is an upper bound for all elements in the range of $c$, and it is less than or equal to any other upper bound of this range.
OmegaCompletePartialOrder.ωSup_eq_of_isLUB theorem
{c : Chain α} {a : α} (h : IsLUB (Set.range c) a) : a = ωSup c
Full source
lemma ωSup_eq_of_isLUB {c : Chain α} {a : α} (h : IsLUB (Set.range c) a) : a = ωSup c := by
  rw [le_antisymm_iff]
  simp only [IsLUB, IsLeast, upperBounds, lowerBounds, Set.mem_range, forall_exists_index,
    forall_apply_eq_imp_iff, Set.mem_setOf_eq] at h
  constructor
  · apply h.2
    exact fun a ↦ le_ωSup c a
  · rw [ωSup_le_iff]
    apply h.1
Characterization of $\omega$-Supremum as Least Upper Bound in $\omega$-Complete Partial Orders
Informal description
Let $\alpha$ be an $\omega$-complete partial order, $c$ be a chain in $\alpha$, and $a$ be an element of $\alpha$. If $a$ is the least upper bound of the range of $c$, then $a$ equals the $\omega$-supremum of $c$, i.e., $a = \omega\text{Sup}(c)$.
OmegaCompletePartialOrder.subtype definition
{α : Type*} [OmegaCompletePartialOrder α] (p : α → Prop) (hp : ∀ c : Chain α, (∀ i ∈ c, p i) → p (ωSup c)) : OmegaCompletePartialOrder (Subtype p)
Full source
/-- A subset `p : α → Prop` of the type closed under `ωSup` induces an
`OmegaCompletePartialOrder` on the subtype `{a : α // p a}`. -/
def subtype {α : Type*} [OmegaCompletePartialOrder α] (p : α → Prop)
    (hp : ∀ c : Chain α, (∀ i ∈ c, p i) → p (ωSup c)) : OmegaCompletePartialOrder (Subtype p) :=
  OmegaCompletePartialOrder.lift (OrderHom.Subtype.val p)
    (fun c => ⟨ωSup _, hp (c.map (OrderHom.Subtype.val p)) fun _ ⟨n, q⟩ => q.symm ▸ (c n).2⟩)
    (fun _ _ h => h) (fun _ => rfl)
$\omega$-Complete Partial Order on a Closed Subtype
Informal description
Given an $\omega$-complete partial order $\alpha$ and a subset $p : \alpha \to \text{Prop}$ that is closed under $\omega\text{Sup}$ (i.e., for any chain $c$ in $\alpha$, if all elements of $c$ satisfy $p$, then $\omega\text{Sup}(c)$ also satisfies $p$), the subtype $\{a : \alpha \mid p a\}$ inherits an $\omega$-complete partial order structure from $\alpha$. The $\omega\text{Sup}$ operation on the subtype is defined by lifting the $\omega\text{Sup}$ operation from $\alpha$ and using the closure property of $p$.
OmegaCompletePartialOrder.ωScottContinuous definition
(f : α → β) : Prop
Full source
/-- A function `f` between `ω`-complete partial orders is `ωScottContinuous` if it is
Scott continuous over chains. -/
def ωScottContinuous (f : α → β) : Prop :=
    ScottContinuousOn (Set.range fun c : Chain α => Set.range c) f
\(\omega\)-Scott continuous function
Informal description
A function \( f \) between \(\omega\)-complete partial orders \((\alpha, \leq_\alpha)\) and \((\beta, \leq_\beta)\) is called \(\omega\)-Scott continuous if it preserves suprema of increasing chains. That is, for any increasing sequence \( c : \mathbb{N} \to \alpha \), the supremum of \( f \) applied to the chain \( c \) is equal to \( f \) applied to the supremum of \( c \): \[ f(\omega\text{Sup}\, c) = \omega\text{Sup}\, (f \circ c). \] This condition ensures that \( f \) respects the limit structure of \(\omega\)-chains in \(\alpha\) and \(\beta\).
OmegaCompletePartialOrder.ωScottContinuous.monotone theorem
(h : ωScottContinuous f) : Monotone f
Full source
lemma ωScottContinuous.monotone (h : ωScottContinuous f) : Monotone f :=
  ScottContinuousOn.monotone _ (fun a b hab => by
    use pair a b hab; exact range_pair a b hab) h
$\omega$-Scott continuous functions are monotone
Informal description
If a function $f$ between $\omega$-complete partial orders is $\omega$-Scott continuous, then $f$ is monotone. That is, for any $x, y$ in the domain, $x \leq y$ implies $f(x) \leq f(y)$.
OmegaCompletePartialOrder.ωScottContinuous.isLUB theorem
{c : Chain α} (hf : ωScottContinuous f) : IsLUB (Set.range (c.map ⟨f, hf.monotone⟩)) (f (ωSup c))
Full source
lemma ωScottContinuous.isLUB {c : Chain α} (hf : ωScottContinuous f) :
    IsLUB (Set.range (c.map ⟨f, hf.monotone⟩)) (f (ωSup c)) := by
  simpa [map_coe, OrderHom.coe_mk, Set.range_comp]
    using hf (by simp) (Set.range_nonempty _) (isChain_range c).directedOn (isLUB_range_ωSup c)
$\omega$-Scott Continuous Functions Preserve Suprema of Chains
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders, and let $f : \alpha \to \beta$ be an $\omega$-Scott continuous function. For any chain $c$ in $\alpha$, the image $f(\omega\text{Sup}\, c)$ is the least upper bound of the range of the mapped chain $f \circ c$ in $\beta$. That is, $f(\omega\text{Sup}\, c)$ is an upper bound for all elements in $\{f(c_n) \mid n \in \mathbb{N}\}$, and it is less than or equal to any other upper bound of this set.
OmegaCompletePartialOrder.ωScottContinuous.id theorem
: ωScottContinuous (id : α → α)
Full source
lemma ωScottContinuous.id : ωScottContinuous (id : α → α) := ScottContinuousOn.id
$\omega$-Scott Continuity of the Identity Function
Informal description
The identity function $\text{id} : \alpha \to \alpha$ on an $\omega$-complete partial order $\alpha$ is $\omega$-Scott continuous. That is, it preserves suprema of increasing chains: for any increasing sequence $c : \mathbb{N} \to \alpha$, we have \[ \text{id}(\omega\text{Sup}\, c) = \omega\text{Sup}\, (\text{id} \circ c). \]
OmegaCompletePartialOrder.ωScottContinuous.map_ωSup theorem
(hf : ωScottContinuous f) (c : Chain α) : f (ωSup c) = ωSup (c.map ⟨f, hf.monotone⟩)
Full source
lemma ωScottContinuous.map_ωSup (hf : ωScottContinuous f) (c : Chain α) :
    f (ωSup c) = ωSup (c.map ⟨f, hf.monotone⟩) := ωSup_eq_of_isLUB hf.isLUB
$\omega$-Scott Continuous Functions Preserve Suprema: $f(\omega\text{Sup}\, c) = \omega\text{Sup}\, (f \circ c)$
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders, and let $f : \alpha \to \beta$ be an $\omega$-Scott continuous function. For any chain $c$ in $\alpha$, the image of the supremum of $c$ under $f$ equals the supremum of the chain obtained by mapping $f$ over $c$. That is, \[ f(\omega\text{Sup}\, c) = \omega\text{Sup}\, (f \circ c). \]
OmegaCompletePartialOrder.ωScottContinuous_iff_monotone_map_ωSup theorem
: ωScottContinuous f ↔ ∃ hf : Monotone f, ∀ c : Chain α, f (ωSup c) = ωSup (c.map ⟨f, hf⟩)
Full source
/-- `ωScottContinuous f` asserts that `f` is both monotone and distributes over ωSup. -/
lemma ωScottContinuous_iff_monotone_map_ωSup :
    ωScottContinuousωScottContinuous f ↔ ∃ hf : Monotone f, ∀ c : Chain α, f (ωSup c) = ωSup (c.map ⟨f, hf⟩) := by
  refine ⟨fun hf ↦ ⟨hf.monotone, hf.map_ωSup⟩, ?_⟩
  intro hf _ ⟨c, hc⟩ _ _ _ hda
  convert isLUB_range_ωSup (c.map { toFun := f, monotone' := hf.1 })
  · rw [map_coe, OrderHom.coe_mk, ← hc, ← (Set.range_comp f ⇑c)]
  · rw [← hc] at hda
    rw [← hf.2 c, ωSup_eq_of_isLUB hda]
Characterization of $\omega$-Scott Continuous Functions via Monotonicity and Supremum Preservation
Informal description
A function $f$ between $\omega$-complete partial orders $\alpha$ and $\beta$ is $\omega$-Scott continuous if and only if it is monotone and for every chain $c$ in $\alpha$, the image of the supremum of $c$ under $f$ equals the supremum of the chain obtained by applying $f$ to each element of $c$. That is, \[ f(\omega\text{Sup}\, c) = \omega\text{Sup}\, (f \circ c). \]
OmegaCompletePartialOrder.ωScottContinuous_iff_map_ωSup_of_orderHom theorem
{f : α →o β} : ωScottContinuous f ↔ ∀ c : Chain α, f (ωSup c) = ωSup (c.map f)
Full source
lemma ωScottContinuous_iff_map_ωSup_of_orderHom {f : α →o β} :
    ωScottContinuousωScottContinuous f ↔ ∀ c : Chain α, f (ωSup c) = ωSup (c.map f) := by
  rw [ωScottContinuous_iff_monotone_map_ωSup]
  exact exists_prop_of_true f.monotone'
Characterization of $\omega$-Scott Continuity for Order Homomorphisms via Supremum Preservation
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders, and let $f : \alpha \to_o \beta$ be an order homomorphism. Then $f$ is $\omega$-Scott continuous if and only if for every chain $c$ in $\alpha$, the image of the supremum of $c$ under $f$ equals the supremum of the chain obtained by applying $f$ to each element of $c$. That is, \[ f(\omega\text{Sup}\, c) = \omega\text{Sup}\, (f \circ c). \]
OmegaCompletePartialOrder.ωScottContinuous.comp theorem
(hg : ωScottContinuous g) (hf : ωScottContinuous f) : ωScottContinuous (g.comp f)
Full source
lemma ωScottContinuous.comp (hg : ωScottContinuous g) (hf : ωScottContinuous f) :
    ωScottContinuous (g.comp f) :=
  ωScottContinuous.of_monotone_map_ωSup
    ⟨hg.monotone.comp hf.monotone, by simp [hf.map_ωSup, hg.map_ωSup, map_comp]⟩
Composition Preserves $\omega$-Scott Continuity: $g \circ f$ is $\omega$-Scott Continuous When $f$ and $g$ Are
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be $\omega$-complete partial orders. If $f : \alpha \to \beta$ and $g : \beta \to \gamma$ are $\omega$-Scott continuous functions, then their composition $g \circ f : \alpha \to \gamma$ is also $\omega$-Scott continuous.
OmegaCompletePartialOrder.ωScottContinuous.const theorem
{x : β} : ωScottContinuous (Function.const α x)
Full source
lemma ωScottContinuous.const {x : β} : ωScottContinuous (Function.const α x) := by
  simp [ωScottContinuous, ScottContinuousOn, Set.range_nonempty]
$\omega$-Scott Continuity of Constant Functions
Informal description
For any element $x$ in an $\omega$-complete partial order $\beta$, the constant function $f : \alpha \to \beta$ defined by $f(y) = x$ for all $y \in \alpha$ is $\omega$-Scott continuous.
Part.ωSup definition
(c : Chain (Part α)) : Part α
Full source
/-- The (noncomputable) `ωSup` definition for the `ω`-CPO structure on `Part α`. -/
protected noncomputable def ωSup (c : Chain (Part α)) : Part α :=
  if h : ∃ a, some a ∈ c then some (Classical.choose h) else none
Supremum of a chain in partial values
Informal description
The supremum operation `ωSup` for the ω-complete partial order structure on the type `Part α` of partial values. Given a chain `c` of partial values (a monotone sequence of elements in `Part α`), `ωSup c` returns: - `some a` if there exists a value `a` such that `some a` appears in the chain `c` - `none` otherwise
Part.ωSup_eq_some theorem
{c : Chain (Part α)} {a : α} (h : some a ∈ c) : Part.ωSup c = some a
Full source
theorem ωSup_eq_some {c : Chain (Part α)} {a : α} (h : somesome a ∈ c) : Part.ωSup c = some a :=
  have : ∃ a, some a ∈ c := ⟨a, h⟩
  have a' : somesome (Classical.choose this) ∈ c := Classical.choose_spec this
  calc
    Part.ωSup c = some (Classical.choose this) := dif_pos this
    _ = some a := congr_arg _ (eq_of_chain a' h)
Supremum of Chain Containing Some $a$ is Some $a$
Informal description
For any chain $c$ of partial values in $\text{Part } \alpha$ and any element $a \in \alpha$, if $\text{some } a$ appears in the chain $c$, then the supremum of the chain $\omega\text{Sup } c$ is equal to $\text{some } a$.
Part.ωSup_eq_none theorem
{c : Chain (Part α)} (h : ¬∃ a, some a ∈ c) : Part.ωSup c = none
Full source
theorem ωSup_eq_none {c : Chain (Part α)} (h : ¬∃ a, some a ∈ c) : Part.ωSup c = none :=
  dif_neg h
Supremum of a Chain of Partial Values is None When No Some Exists
Informal description
For any chain $c$ in the partial order of partial values of type $\alpha$, if there does not exist any element $a \in \alpha$ such that $\text{some } a$ appears in the chain $c$, then the supremum of the chain is $\text{none}$.
Part.mem_chain_of_mem_ωSup theorem
{c : Chain (Part α)} {a : α} (h : a ∈ Part.ωSup c) : some a ∈ c
Full source
theorem mem_chain_of_mem_ωSup {c : Chain (Part α)} {a : α} (h : a ∈ Part.ωSup c) : somesome a ∈ c := by
  simp only [Part.ωSup] at h; split_ifs at h with h_1
  · have h' := Classical.choose_spec h_1
    rw [← eq_some_iff] at h
    rw [← h]
    exact h'
  · rcases h with ⟨⟨⟩⟩
Membership in Supremum Implies Membership in Chain for Partial Values
Informal description
For any chain $c$ of partial values in a type $\alpha$ and any element $a \in \alpha$, if $a$ is in the supremum of the chain $c$ (i.e., $a \in \omega\text{Sup}\, c$), then the partial value $\text{some}\, a$ appears in the chain $c$.
Part.omegaCompletePartialOrder instance
: OmegaCompletePartialOrder (Part α)
Full source
noncomputable instance omegaCompletePartialOrder :
    OmegaCompletePartialOrder (Part α) where
  ωSup := Part.ωSup
  le_ωSup c i := by
    intro x hx
    rw [← eq_some_iff] at hx ⊢
    rw [ωSup_eq_some]
    rw [← hx]
    exact ⟨i, rfl⟩
  ωSup_le := by
    rintro c x hx a ha
    replace ha := mem_chain_of_mem_ωSup ha
    obtain ⟨i, ha⟩ := ha
    apply hx i
    rw [← ha]
    apply mem_some
Omega-Complete Partial Order Structure on Partial Values
Informal description
The type `Part α` of partial values forms an omega-complete partial order, where the supremum of an increasing sequence is defined to be `some a` if `some a` appears in the sequence, and `none` otherwise.
Part.mem_ωSup theorem
(x : α) (c : Chain (Part α)) : x ∈ ωSup c ↔ some x ∈ c
Full source
theorem mem_ωSup (x : α) (c : Chain (Part α)) : x ∈ ωSup cx ∈ ωSup c ↔ some x ∈ c := by
  simp only [ωSup, Part.ωSup]
  constructor
  · split_ifs with h
    swap
    · rintro ⟨⟨⟩⟩
    intro h'
    have hh := Classical.choose_spec h
    simp only [mem_some_iff] at h'
    subst x
    exact hh
  · intro h
    have h' : ∃ a : α, some a ∈ c := ⟨_, h⟩
    rw [dif_pos h']
    have hh := Classical.choose_spec h'
    rw [eq_of_chain hh h]
    simp
Characterization of Membership in $\omega$-Supremum for Partial Values
Informal description
For any element $x$ of type $\alpha$ and any chain $c$ of partial values in $\alpha$, $x$ belongs to the $\omega$-supremum of $c$ if and only if the partial value $\text{some } x$ appears in the chain $c$.
instOmegaCompletePartialOrderForall instance
[∀ a, OmegaCompletePartialOrder (β a)] : OmegaCompletePartialOrder (∀ a, β a)
Full source
instance [∀ a, OmegaCompletePartialOrder (β a)] :
    OmegaCompletePartialOrder (∀ a, β a) where
  ωSup c a := ωSup (c.map (Pi.evalOrderHom a))
  ωSup_le _ _ hf a :=
    ωSup_le _ _ <| by
      rintro i
      apply hf
  le_ωSup _ _ _ := le_ωSup_of_le _ <| le_rfl
Pointwise Omega-Complete Partial Order on Function Spaces
Informal description
For any family of types $(\beta_a)_{a \in \alpha}$ where each $\beta_a$ is equipped with an omega-complete partial order structure, the product type $\forall a, \beta_a$ (i.e., the space of all functions from $\alpha$ to $\bigcup_{a \in \alpha} \beta_a$) is also an omega-complete partial order. The order and supremum operations are defined pointwise.
OmegaCompletePartialOrder.ωScottContinuous.apply₂ theorem
(hf : ωScottContinuous f) (a : α) : ωScottContinuous (f · a)
Full source
lemma ωScottContinuous.apply₂ (hf : ωScottContinuous f) (a : α) : ωScottContinuous (f · a) :=
  ωScottContinuous.of_monotone_map_ωSup
    ⟨fun _ _ h ↦ hf.monotone h a, fun c ↦ congr_fun (hf.map_ωSup c) a⟩
$\omega$-Scott continuity under partial application: $f(\cdot, a)$ is $\omega$-Scott continuous when $f$ is
Informal description
Let $f : \alpha \to \beta$ be an $\omega$-Scott continuous function between $\omega$-complete partial orders. For any fixed element $a \in \alpha$, the function $f(\cdot, a) : \alpha \to \beta$ defined by $x \mapsto f(x, a)$ is also $\omega$-Scott continuous.
OmegaCompletePartialOrder.ωScottContinuous.of_apply₂ theorem
(hf : ∀ a, ωScottContinuous (f · a)) : ωScottContinuous f
Full source
lemma ωScottContinuous.of_apply₂ (hf : ∀ a, ωScottContinuous (f · a)) : ωScottContinuous f :=
  ωScottContinuous.of_monotone_map_ωSup
    ⟨fun _ _ h a ↦ (hf a).monotone h, fun c ↦ by ext a; apply (hf a).map_ωSup c⟩
$\omega$-Scott Continuity from Pointwise $\omega$-Scott Continuity
Informal description
Let $f : \alpha \to \beta$ be a function between $\omega$-complete partial orders. If for every element $a \in \alpha$, the partially applied function $f(a, \cdot)$ is $\omega$-Scott continuous, then $f$ itself is $\omega$-Scott continuous.
OmegaCompletePartialOrder.ωScottContinuous_iff_apply₂ theorem
: ωScottContinuous f ↔ ∀ a, ωScottContinuous (f · a)
Full source
lemma ωScottContinuous_iff_apply₂ : ωScottContinuousωScottContinuous f ↔ ∀ a, ωScottContinuous (f · a) :=
  ⟨ωScottContinuous.apply₂, ωScottContinuous.of_apply₂⟩
Characterization of $\omega$-Scott Continuity via Partial Application
Informal description
A function $f$ between $\omega$-complete partial orders is $\omega$-Scott continuous if and only if for every element $a$, the partially applied function $f(\cdot, a)$ is $\omega$-Scott continuous.
Prod.ωSup definition
(c : Chain (α × β)) : α × β
Full source
/-- The supremum of a chain in the product `ω`-CPO. -/
@[simps]
protected def ωSup (c : Chain (α × β)) : α × β :=
  (ωSup (c.map OrderHom.fst), ωSup (c.map OrderHom.snd))
Supremum of a chain in a product $\omega$-CPO
Informal description
Given a chain $c$ in the product $\omega$-complete partial order $\alpha \times \beta$, the supremum $\omega\text{Sup}(c)$ is computed as the pair of suprema of the projections of $c$ onto $\alpha$ and $\beta$ respectively. That is, if $c$ is a chain in $\alpha \times \beta$, then $\omega\text{Sup}(c) = (\omega\text{Sup}(c_1), \omega\text{Sup}(c_2))$, where $c_1$ and $c_2$ are the chains obtained by projecting $c$ onto the first and second components.
Prod.instOmegaCompletePartialOrder instance
: OmegaCompletePartialOrder (α × β)
Full source
@[simps! ωSup_fst ωSup_snd]
instance : OmegaCompletePartialOrder (α × β) where
  ωSup := Prod.ωSup
  ωSup_le := fun _ _ h => ⟨ωSup_le _ _ fun i => (h i).1, ωSup_le _ _ fun i => (h i).2⟩
  le_ωSup c i := ⟨le_ωSup (c.map OrderHom.fst) i, le_ωSup (c.map OrderHom.snd) i⟩
Product of Omega-Complete Partial Orders is Omega-Complete
Informal description
For any two omega-complete partial orders $\alpha$ and $\beta$, the product type $\alpha \times \beta$ is also an omega-complete partial order, where the supremum of a chain is computed component-wise.
Prod.ωSup_zip theorem
(c₀ : Chain α) (c₁ : Chain β) : ωSup (c₀.zip c₁) = (ωSup c₀, ωSup c₁)
Full source
theorem ωSup_zip (c₀ : Chain α) (c₁ : Chain β) : ωSup (c₀.zip c₁) = (ωSup c₀, ωSup c₁) := by
  apply eq_of_forall_ge_iff; rintro ⟨z₁, z₂⟩
  simp [ωSup_le_iff, forall_and]
Supremum of Zipped Chains in Product ωCPO: $\omega\text{Sup}(c_0.\text{zip}\, c_1) = (\omega\text{Sup}\, c_0, \omega\text{Sup}\, c_1)$
Informal description
Let $\alpha$ and $\beta$ be omega-complete partial orders. For any chains $c_0$ in $\alpha$ and $c_1$ in $\beta$, the supremum of the zipped chain $c_0.\text{zip}\, c_1$ in $\alpha \times \beta$ is equal to the pair of suprema $(\omega\text{Sup}\, c_0, \omega\text{Sup}\, c_1)$.
CompleteLattice.instOmegaCompletePartialOrder instance
[CompleteLattice α] : OmegaCompletePartialOrder α
Full source
/-- Any complete lattice has an `ω`-CPO structure where the countable supremum is a special case
of arbitrary suprema. -/
instance (priority := 100) [CompleteLattice α] : OmegaCompletePartialOrder α where
  ωSup c := ⨆ i, c i
  ωSup_le := fun ⟨c, _⟩ s hs => by
    simp only [iSup_le_iff, OrderHom.coe_mk] at hs ⊢; intro i; apply hs i
  le_ωSup := fun ⟨c, _⟩ i => by apply le_iSup_of_le i; rfl
Complete Lattices are Omega-Complete Partial Orders
Informal description
Every complete lattice $\alpha$ is an omega-complete partial order, where the supremum operation $\omega\text{Sup}$ for any increasing sequence is given by the supremum of the sequence in the complete lattice.
CompleteLattice.ωScottContinuous.prodMk theorem
(hf : ωScottContinuous f) (hg : ωScottContinuous g) : ωScottContinuous fun x => (f x, g x)
Full source
lemma ωScottContinuous.prodMk (hf : ωScottContinuous f) (hg : ωScottContinuous g) :
    ωScottContinuous fun x => (f x, g x) := ScottContinuousOn.prodMk (fun a b hab => by
  use pair a b hab; exact range_pair a b hab) hf hg
Product of $\omega$-Scott Continuous Functions is $\omega$-Scott Continuous
Informal description
Let $f : \alpha \to \beta$ and $g : \alpha \to \gamma$ be $\omega$-Scott continuous functions between $\omega$-complete partial orders. Then the function $x \mapsto (f(x), g(x))$ is also $\omega$-Scott continuous.
CompleteLattice.ωScottContinuous.iSup theorem
{f : ι → α → β} (hf : ∀ i, ωScottContinuous (f i)) : ωScottContinuous (⨆ i, f i)
Full source
lemma ωScottContinuous.iSup {f : ι → α → β} (hf : ∀ i, ωScottContinuous (f i)) :
    ωScottContinuous (⨆ i, f i) := by
  refine ωScottContinuous.of_monotone_map_ωSup
    ⟨Monotone.iSup fun i ↦ (hf i).monotone, fun c ↦ eq_of_forall_ge_iff fun a ↦ ?_⟩
  simp +contextual [ωSup_le_iff, (hf _).map_ωSup, @forall_swap ι]
Supremum of $\omega$-Scott Continuous Functions is $\omega$-Scott Continuous
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders, and let $\{f_i : \alpha \to \beta\}_{i \in \iota}$ be a family of $\omega$-Scott continuous functions. Then the supremum function $\bigsqcup_i f_i : \alpha \to \beta$ is also $\omega$-Scott continuous.
CompleteLattice.ωScottContinuous.sSup theorem
{s : Set (α → β)} (hs : ∀ f ∈ s, ωScottContinuous f) : ωScottContinuous (sSup s)
Full source
lemma ωScottContinuous.sSup {s : Set (α → β)} (hs : ∀ f ∈ s, ωScottContinuous f) :
    ωScottContinuous (sSup s) := by
  rw [sSup_eq_iSup]; exact ωScottContinuous.iSup fun f ↦ ωScottContinuous.iSup <| hs f
Supremum of $\omega$-Scott Continuous Functions is $\omega$-Scott Continuous
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders, and let $s$ be a set of functions from $\alpha$ to $\beta$. If every function $f \in s$ is $\omega$-Scott continuous, then the supremum function $\mathrm{sSup}\, s : \alpha \to \beta$ is also $\omega$-Scott continuous.
CompleteLattice.ωScottContinuous.sup theorem
(hf : ωScottContinuous f) (hg : ωScottContinuous g) : ωScottContinuous (f ⊔ g)
Full source
lemma ωScottContinuous.sup (hf : ωScottContinuous f) (hg : ωScottContinuous g) :
    ωScottContinuous (f ⊔ g) := by
  rw [← sSup_pair]
  apply ωScottContinuous.sSup
  rintro f (rfl | rfl | _) <;> assumption
Supremum of $\omega$-Scott Continuous Functions is $\omega$-Scott Continuous
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders. If $f, g : \alpha \to \beta$ are $\omega$-Scott continuous functions, then their pointwise supremum $f \sqcup g$ is also $\omega$-Scott continuous.
CompleteLattice.ωScottContinuous.top theorem
: ωScottContinuous (⊤ : α → β)
Full source
lemma ωScottContinuous.top : ωScottContinuous ( : α → β) :=
  ωScottContinuous.of_monotone_map_ωSup
    ⟨monotone_const, fun c ↦ eq_of_forall_ge_iff fun a ↦ by simp⟩
$\omega$-Scott Continuity of the Top Function
Informal description
The constant top function $\top : \alpha \to \beta$ between $\omega$-complete partial orders is $\omega$-Scott continuous. That is, it preserves suprema of increasing chains.
CompleteLattice.ωScottContinuous.bot theorem
: ωScottContinuous (⊥ : α → β)
Full source
lemma ωScottContinuous.bot : ωScottContinuous ( : α → β) := by
  rw [← sSup_empty]; exact ωScottContinuous.sSup (by simp)
$\omega$-Scott Continuity of the Bottom Function
Informal description
The constant bottom function $\bot : \alpha \to \beta$ between $\omega$-complete partial orders is $\omega$-Scott continuous. That is, it preserves suprema of increasing chains.
CompleteLattice.ωScottContinuous.inf theorem
(hf : ωScottContinuous f) (hg : ωScottContinuous g) : ωScottContinuous (f ⊓ g)
Full source
lemma ωScottContinuous.inf (hf : ωScottContinuous f) (hg : ωScottContinuous g) :
    ωScottContinuous (f ⊓ g) := by
  refine ωScottContinuous.of_monotone_map_ωSup
    ⟨hf.monotone.inf hg.monotone, fun c ↦ eq_of_forall_ge_iff fun a ↦ ?_⟩
  simp only [Pi.inf_apply, hf.map_ωSup c, hg.map_ωSup c, inf_le_iff, ωSup_le_iff, Chain.map_coe,
    Function.comp, OrderHom.coe_mk, ← forall_or_left, ← forall_or_right]
  exact ⟨fun h _ ↦ h _ _, fun h i j ↦
    (h (max j i)).imp (le_trans <| hf.monotone <| c.mono <| le_max_left _ _)
      (le_trans <| hg.monotone <| c.mono <| le_max_right _ _)⟩
$\omega$-Scott continuity is preserved under pointwise infima
Informal description
Let $\alpha$ and $\beta$ be $\omega$-complete partial orders. If $f, g \colon \alpha \to \beta$ are $\omega$-Scott continuous functions, then their pointwise infimum $f \sqcap g$ (defined by $(f \sqcap g)(x) = f(x) \sqcap g(x)$ for all $x \in \alpha$) is also $\omega$-Scott continuous.
OmegaCompletePartialOrder.OrderHom.ωSup definition
(c : Chain (α →o β)) : α →o β
Full source
/-- The `ωSup` operator for monotone functions. -/
@[simps]
protected def ωSup (c : Chain (α →o β)) : α →o β where
  toFun a := ωSup (c.map (OrderHom.apply a))
  monotone' _ _ h := ωSup_le_ωSup_of_le ((Chain.map_le_map _) fun a => a.monotone h)
$\omega$-Supremum of a Chain of Order Homomorphisms
Informal description
The $\omega$-supremum operator for a chain of order homomorphisms $c \colon \mathbb{N} \to (\alpha \to_o \beta)$ is defined as the order homomorphism that maps each $a \in \alpha$ to the $\omega$-supremum of the chain obtained by evaluating each homomorphism in $c$ at $a$. More precisely, given a chain $c$ of order homomorphisms (i.e., $c_0 \leq c_1 \leq \cdots$ in the pointwise order), the $\omega$-supremum $\omega\text{Sup}(c)$ is the order homomorphism defined by: \[ \omega\text{Sup}(c)(a) = \omega\text{Sup}\big(\lambda n. c_n(a)\big), \] where $\omega\text{Sup}$ on the right-hand side is the $\omega$-supremum operator in $\beta$.
OmegaCompletePartialOrder.OrderHom.omegaCompletePartialOrder instance
: OmegaCompletePartialOrder (α →o β)
Full source
@[simps! ωSup_coe]
instance omegaCompletePartialOrder : OmegaCompletePartialOrder (α →o β) :=
  OmegaCompletePartialOrder.lift OrderHom.coeFnHom OrderHom.ωSup (fun _ _ h => h) fun _ => rfl
$\omega$-Complete Partial Order Structure on Order Homomorphisms
Informal description
The type of order homomorphisms $\alpha \to_o \beta$ between two partial orders $\alpha$ and $\beta$ forms an omega-complete partial order, where the order and supremum operations are defined pointwise. Specifically, for any chain $(f_n)_{n \in \mathbb{N}}$ of order homomorphisms, its supremum $\omega\text{Sup}(f_n)$ is the order homomorphism defined by $\omega\text{Sup}(f_n)(a) = \omega\text{Sup}(f_n(a))$ for each $a \in \alpha$.
OmegaCompletePartialOrder.ContinuousHom structure
extends OrderHom α β
Full source
/-- A monotone function on `ω`-continuous partial orders is said to be continuous
if for every chain `c : chain α`, `f (⊔ i, c i) = ⊔ i, f (c i)`.
This is just the bundled version of `OrderHom.continuous`. -/
structure ContinuousHom extends OrderHom α β where
  /-- The underlying function of a `ContinuousHom` is continuous, i.e. it preserves `ωSup` -/
  protected map_ωSup' (c : Chain α) : toFun (ωSup c) = ωSup (c.map toOrderHom)
Continuous Homomorphism between ωCPOs
Informal description
A continuous homomorphism between omega-complete partial orders (ωCPOs) is a monotone function $f \colon \alpha \to \beta$ that preserves suprema of increasing sequences. Specifically, for every chain $c \colon \mathbb{N} \to \alpha$ (i.e., $c_0 \leq c_1 \leq \cdots$), the function satisfies $f(\bigsqcup_i c_i) = \bigsqcup_i f(c_i)$, where $\bigsqcup$ denotes the supremum operation in the respective ωCPO.
OmegaCompletePartialOrder.term_→𝒄_ definition
: Lean.TrailingParserDescr✝
Full source
@[inherit_doc] infixr:25 " →𝒄 " => ContinuousHom
Continuous homomorphism notation (`→𝒄`)
Informal description
The notation `→𝒄` represents the type of continuous homomorphisms between omega-complete partial orders. For two omega-complete partial orders `α` and `β`, the type `α →𝒄 β` consists of all continuous order-preserving maps from `α` to `β`.
OmegaCompletePartialOrder.instFunLikeContinuousHom instance
: FunLike (α →𝒄 β) α β
Full source
instance : FunLike (α →𝒄 β) α β where
  coe f := f.toFun
  coe_injective' := by rintro ⟨⟩ ⟨⟩ h; congr; exact DFunLike.ext' h
Function-Like Structure of Continuous Homomorphisms between ωCPOs
Informal description
The type of continuous homomorphisms between omega-complete partial orders $\alpha$ and $\beta$ (denoted $\alpha \to_{\mathcal{c}} \beta$) can be treated as a function-like type, where each continuous homomorphism can be coerced to a function from $\alpha$ to $\beta$.
OmegaCompletePartialOrder.instOrderHomClassContinuousHom instance
: OrderHomClass (α →𝒄 β) α β
Full source
instance : OrderHomClass (α →𝒄 β) α β where
  map_rel f _ _ h := f.mono h
Order-Preserving Property of Continuous Homomorphisms between ωCPOs
Informal description
The type of continuous homomorphisms between omega-complete partial orders $\alpha$ and $\beta$ (denoted $\alpha \to_{\mathcal{c}} \beta$) forms an `OrderHomClass`, meaning each continuous homomorphism preserves the order structure: for any $f \in \alpha \to_{\mathcal{c}} \beta$ and any $x, y \in \alpha$, if $x \leq y$ then $f(x) \leq f(y)$.
OmegaCompletePartialOrder.instPartialOrderContinuousHom instance
: PartialOrder (α →𝒄 β)
Full source
instance : PartialOrder (α →𝒄 β) :=
  (PartialOrder.lift fun f => f.toOrderHom.toFun) <| by rintro ⟨⟨⟩⟩ ⟨⟨⟩⟩ h; congr
Partial Order on Continuous Homomorphisms between ωCPOs
Informal description
The set of continuous homomorphisms between two omega-complete partial orders $\alpha$ and $\beta$ (denoted $\alpha \to_{\mathcal{c}} \beta$) forms a partial order under the pointwise order relation. That is, for any two continuous homomorphisms $f, g \colon \alpha \to_{\mathcal{c}} \beta$, we define $f \leq g$ if and only if $f(x) \leq g(x)$ for all $x \in \alpha$.
OmegaCompletePartialOrder.ContinuousHom.ωScottContinuous theorem
(f : α →𝒄 β) : ωScottContinuous f
Full source
protected lemma ωScottContinuous (f : α →𝒄 β) : ωScottContinuous f :=
  ωScottContinuous.of_map_ωSup_of_orderHom f.map_ωSup'
Continuous Homomorphisms Preserve Suprema of Increasing Sequences
Informal description
Every continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders is $\omega$-Scott continuous, meaning it preserves suprema of increasing sequences. That is, for any increasing sequence $c \colon \mathbb{N} \to \alpha$, we have: \[ f(\omega\text{Sup}\, c) = \omega\text{Sup}\, (f \circ c). \]
OmegaCompletePartialOrder.ContinuousHom.toOrderHom_eq_coe theorem
(f : α →𝒄 β) : f.1 = f
Full source
theorem toOrderHom_eq_coe (f : α →𝒄 β) : f.1 = f := rfl
Underlying Order Homomorphism Equals Continuous Homomorphism
Informal description
For any continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, the underlying order homomorphism of $f$ is equal to $f$ itself when viewed as a function.
OmegaCompletePartialOrder.ContinuousHom.coe_mk theorem
(f : α →o β) (hf) : ⇑(mk f hf) = f
Full source
@[simp] theorem coe_mk (f : α →o β) (hf) : ⇑(mk f hf) = f := rfl
Coercion of Continuous Homomorphism Construction Equals Original Function
Informal description
For any order homomorphism $f \colon \alpha \to_o \beta$ between preorders and any proof $hf$ that $f$ is continuous (i.e., preserves suprema of increasing sequences), the underlying function of the continuous homomorphism constructed from $f$ and $hf$ is equal to $f$ itself. In other words, the coercion of the continuous homomorphism $\text{mk}(f, hf)$ to a function coincides with $f$.
OmegaCompletePartialOrder.ContinuousHom.coe_toOrderHom theorem
(f : α →𝒄 β) : ⇑f.1 = f
Full source
@[simp] theorem coe_toOrderHom (f : α →𝒄 β) : ⇑f.1 = f := rfl
Equality of Underlying Function and Continuous Homomorphism
Informal description
For any continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, the underlying function of the order homomorphism associated with $f$ is equal to $f$ itself. In other words, if we consider $f$ as an order homomorphism and then extract its underlying function, we recover the original continuous homomorphism $f$.
OmegaCompletePartialOrder.ContinuousHom.Simps.apply definition
(h : α →𝒄 β) : α → β
Full source
/-- See Note [custom simps projection]. We specify this explicitly because we don't have a DFunLike
instance.
-/
def Simps.apply (h : α →𝒄 β) : α → β :=
  h
Underlying function of a continuous homomorphism
Informal description
The function that extracts the underlying function from a continuous homomorphism between omega-complete partial orders.
OmegaCompletePartialOrder.ContinuousHom.congr_fun theorem
{f g : α →𝒄 β} (h : f = g) (x : α) : f x = g x
Full source
protected theorem congr_fun {f g : α →𝒄 β} (h : f = g) (x : α) : f x = g x :=
  DFunLike.congr_fun h x
Pointwise Equality of Continuous Homomorphisms
Informal description
For any two continuous homomorphisms $f, g \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, if $f = g$, then for all $x \in \alpha$, we have $f(x) = g(x)$.
OmegaCompletePartialOrder.ContinuousHom.congr_arg theorem
(f : α →𝒄 β) {x y : α} (h : x = y) : f x = f y
Full source
protected theorem congr_arg (f : α →𝒄 β) {x y : α} (h : x = y) : f x = f y :=
  congr_arg f h
Continuous Homomorphism Preserves Equality
Informal description
For any continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, and any elements $x, y \in \alpha$ such that $x = y$, we have $f(x) = f(y)$.
OmegaCompletePartialOrder.ContinuousHom.monotone theorem
(f : α →𝒄 β) : Monotone f
Full source
protected theorem monotone (f : α →𝒄 β) : Monotone f :=
  f.monotone'
Monotonicity of Continuous Homomorphisms between ωCPOs
Informal description
Every continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders is monotone, meaning that for any $x, y \in \alpha$ with $x \leq y$, we have $f(x) \leq f(y)$.
OmegaCompletePartialOrder.ContinuousHom.apply_mono theorem
{f g : α →𝒄 β} {x y : α} (h₁ : f ≤ g) (h₂ : x ≤ y) : f x ≤ g y
Full source
@[mono]
theorem apply_mono {f g : α →𝒄 β} {x y : α} (h₁ : f ≤ g) (h₂ : x ≤ y) : f x ≤ g y :=
  OrderHom.apply_mono (show (f : α →o β) ≤ g from h₁) h₂
Monotonicity of Continuous Homomorphism Application
Informal description
For any two continuous homomorphisms $f, g \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, if $f \leq g$ in the pointwise order and $x \leq y$ in $\alpha$, then $f(x) \leq g(y)$ in $\beta$.
OmegaCompletePartialOrder.ContinuousHom.ωSup_bind theorem
{β γ : Type v} (c : Chain α) (f : α →o Part β) (g : α →o β → Part γ) : ωSup (c.map (f.partBind g)) = ωSup (c.map f) >>= ωSup (c.map g)
Full source
theorem ωSup_bind {β γ : Type v} (c : Chain α) (f : α →o Part β) (g : α →o β → Part γ) :
    ωSup (c.map (f.partBind g)) = ωSupωSup (c.map f) >>= ωSup (c.map g) := by
  apply eq_of_forall_ge_iff; intro x
  simp only [ωSup_le_iff, Part.bind_le, Chain.mem_map_iff, and_imp, OrderHom.partBind_coe,
    exists_imp]
  constructor <;> intro h'''
  · intro b hb
    apply ωSup_le _ _ _
    rintro i y hy
    simp only [Part.mem_ωSup] at hb
    rcases hb with ⟨j, hb⟩
    replace hb := hb.symm
    simp only [Part.eq_some_iff, Chain.map_coe, Function.comp_apply, OrderHom.apply_coe] at hy hb
    replace hb : b ∈ f (c (max i j)) := f.mono (c.mono (le_max_right i j)) _ hb
    replace hy : y ∈ g (c (max i j)) b := g.mono (c.mono (le_max_left i j)) _ _ hy
    apply h''' (max i j)
    simp only [exists_prop, Part.bind_eq_bind, Part.mem_bind_iff, Chain.map_coe,
      Function.comp_apply, OrderHom.partBind_coe]
    exact ⟨_, hb, hy⟩
  · intro i
    intro y hy
    simp only [exists_prop, Part.bind_eq_bind, Part.mem_bind_iff, Chain.map_coe,
      Function.comp_apply, OrderHom.partBind_coe] at hy
    rcases hy with ⟨b, hb₀, hb₁⟩
    apply h''' b _
    · apply le_ωSup (c.map g) _ _ _ hb₁
    · apply le_ωSup (c.map f) i _ hb₀
Supremum-Preserving Property of Partial Bind Operation in ωCPOs
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be types where $\alpha$ is an omega-complete partial order. Given a chain $c$ in $\alpha$, an order homomorphism $f \colon \alpha \to_o \text{Part } \beta$, and an order homomorphism $g \colon \alpha \to_o (\beta \to \text{Part } \gamma)$, the supremum of the chain obtained by mapping $c$ through the partial bind of $f$ and $g$ is equal to the partial bind of the suprema of the chains obtained by mapping $c$ through $f$ and $g$ respectively. That is, $$ \omega\text{Sup}(c.\text{map}(f.\text{partBind } g)) = \omega\text{Sup}(c.\text{map } f) \gg= \omega\text{Sup}(c.\text{map } g) $$ where $\gg=$ denotes the partial bind operation.
OmegaCompletePartialOrder.ContinuousHom.ωScottContinuous.bind theorem
{β γ} {f : α → Part β} {g : α → β → Part γ} (hf : ωScottContinuous f) (hg : ωScottContinuous g) : ωScottContinuous fun x ↦ f x >>= g x
Full source
lemma ωScottContinuous.bind {β γ} {f : α → Part β} {g : α → β → Part γ} (hf : ωScottContinuous f)
    (hg : ωScottContinuous g) : ωScottContinuous fun x ↦ f x >>= g x :=
  ωScottContinuous.of_monotone_map_ωSup
    ⟨hf.monotone.partBind hg.monotone, fun c ↦ by rw [hf.map_ωSup, hg.map_ωSup, ← ωSup_bind]; rfl⟩
$\omega$-Scott Continuity of Partial Bind Operation: $x \mapsto f(x) \gg= g(x)$
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be types where $\alpha$ is an $\omega$-complete partial order. Given two $\omega$-Scott continuous functions $f \colon \alpha \to \text{Part } \beta$ and $g \colon \alpha \to (\beta \to \text{Part } \gamma)$, the function defined by $x \mapsto f(x) \gg= g(x)$ is also $\omega$-Scott continuous. Here, $\gg=$ denotes the partial bind operation.
OmegaCompletePartialOrder.ContinuousHom.ωScottContinuous.map theorem
{β γ} {f : β → γ} {g : α → Part β} (hg : ωScottContinuous g) : ωScottContinuous fun x ↦ f <$> g x
Full source
lemma ωScottContinuous.map {β γ} {f : β → γ} {g : α → Part β} (hg : ωScottContinuous g) :
    ωScottContinuous fun x ↦ f <$> g x := by
  simpa only [map_eq_bind_pure_comp] using ωScottContinuous.bind hg ωScottContinuous.const
$\omega$-Scott Continuity of Partial Map Operation: $x \mapsto f <$> $g(x)$
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be types where $\alpha$ is an $\omega$-complete partial order. Given a function $f \colon \beta \to \gamma$ and an $\omega$-Scott continuous function $g \colon \alpha \to \text{Part } \beta$, the function defined by $x \mapsto f <$> $g(x)$ is also $\omega$-Scott continuous. Here, $<$> denotes the map operation on partial values.
OmegaCompletePartialOrder.ContinuousHom.ωScottContinuous.seq theorem
{β γ} {f : α → Part (β → γ)} {g : α → Part β} (hf : ωScottContinuous f) (hg : ωScottContinuous g) : ωScottContinuous fun x ↦ f x <*> g x
Full source
lemma ωScottContinuous.seq {β γ} {f : α → Part (β → γ)} {g : α → Part β} (hf : ωScottContinuous f)
    (hg : ωScottContinuous g) : ωScottContinuous fun x ↦ f x <*> g x := by
  simp only [seq_eq_bind_map]
  exact ωScottContinuous.bind hf <| ωScottContinuous.of_apply₂ fun _ ↦ ωScottContinuous.map hg
$\omega$-Scott Continuity of Partial Sequential Application: $x \mapsto f(x) <*> g(x)$
Informal description
Let $\alpha$, $\beta$, and $\gamma$ be types where $\alpha$ is an $\omega$-complete partial order. Given two $\omega$-Scott continuous functions $f \colon \alpha \to \text{Part } (\beta \to \gamma)$ and $g \colon \alpha \to \text{Part } \beta$, the function defined by $x \mapsto f(x) <*> g(x)$ is also $\omega$-Scott continuous. Here, $<*>$ denotes the sequential application operation on partial values.
OmegaCompletePartialOrder.ContinuousHom.continuous theorem
(F : α →𝒄 β) (C : Chain α) : F (ωSup C) = ωSup (C.map F)
Full source
theorem continuous (F : α →𝒄 β) (C : Chain α) : F (ωSup C) = ωSup (C.map F) :=
  F.ωScottContinuous.map_ωSup _
Continuous Homomorphisms Preserve Suprema of Chains: $F(\omega\text{Sup}\, C) = \omega\text{Sup}\, (F \circ C)$
Informal description
For any continuous homomorphism $F \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders and any chain $C$ in $\alpha$, the image of the supremum of $C$ under $F$ equals the supremum of the chain obtained by mapping $F$ over $C$. That is, \[ F(\omega\text{Sup}\, C) = \omega\text{Sup}\, (C.map F). \]
OmegaCompletePartialOrder.ContinuousHom.copy definition
(f : α → β) (g : α →𝒄 β) (h : f = g) : α →𝒄 β
Full source
/-- Construct a continuous function from a bare function, a continuous function, and a proof that
they are equal. -/
@[simps!]
def copy (f : α → β) (g : α →𝒄 β) (h : f = g) : α →𝒄 β where
  toOrderHom := g.1.copy f h
  map_ωSup' := by rw [OrderHom.copy_eq]; exact g.map_ωSup'
Copy of a continuous homomorphism with a new function
Informal description
Given a function \( f \colon \alpha \to \beta \), a continuous homomorphism \( g \colon \alpha \to_{\mathcal{c}} \beta \) between omega-complete partial orders, and a proof that \( f = g \), the function `OmegaCompletePartialOrder.ContinuousHom.copy` constructs a new continuous homomorphism with the underlying function \( f \) and the same continuity properties as \( g \). This is useful for fixing definitional equalities while preserving the structure of a continuous homomorphism.
OmegaCompletePartialOrder.ContinuousHom.id definition
: α →𝒄 α
Full source
/-- The identity as a continuous function. -/
@[simps!]
def id : α →𝒄 α := ⟨OrderHom.id, ωScottContinuous.id.map_ωSup⟩
Identity continuous homomorphism on an ωCPO
Informal description
The identity function on an omega-complete partial order $\alpha$, viewed as a continuous homomorphism from $\alpha$ to itself. That is, the function $\operatorname{id} \colon \alpha \to \alpha$ together with the proof that it preserves suprema of increasing sequences (i.e., $\operatorname{id}(\bigsqcup_i c_i) = \bigsqcup_i \operatorname{id}(c_i)$ for any increasing sequence $(c_i)_{i \in \mathbb{N}}$ in $\alpha$).
OmegaCompletePartialOrder.ContinuousHom.comp definition
(f : β →𝒄 γ) (g : α →𝒄 β) : α →𝒄 γ
Full source
/-- The composition of continuous functions. -/
@[simps!]
def comp (f : β →𝒄 γ) (g : α →𝒄 β) : α →𝒄 γ :=
  ⟨.comp f.1 g.1, (f.ωScottContinuous.comp g.ωScottContinuous).map_ωSup⟩
Composition of continuous homomorphisms between ωCPOs
Informal description
The composition of two continuous homomorphisms \( f \colon \beta \to_{\mathcal{c}} \gamma \) and \( g \colon \alpha \to_{\mathcal{c}} \beta \) between omega-complete partial orders is the continuous homomorphism \( f \circ g \colon \alpha \to_{\mathcal{c}} \gamma \) defined by \( (f \circ g)(x) = f(g(x)) \), which preserves suprema of increasing sequences.
OmegaCompletePartialOrder.ContinuousHom.ext theorem
(f g : α →𝒄 β) (h : ∀ x, f x = g x) : f = g
Full source
@[ext]
protected theorem ext (f g : α →𝒄 β) (h : ∀ x, f x = g x) : f = g := DFunLike.ext f g h
Extensionality of Continuous Homomorphisms between ωCPOs
Informal description
For any two continuous homomorphisms $f, g \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, if $f(x) = g(x)$ for all $x \in \alpha$, then $f = g$.
OmegaCompletePartialOrder.ContinuousHom.coe_inj theorem
(f g : α →𝒄 β) (h : (f : α → β) = g) : f = g
Full source
protected theorem coe_inj (f g : α →𝒄 β) (h : (f : α → β) = g) : f = g :=
  DFunLike.ext' h
Injectivity of Continuous Homomorphism Coefficients
Informal description
For any two continuous homomorphisms $f, g \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, if the underlying functions $f, g \colon \alpha \to \beta$ are equal, then $f = g$ as continuous homomorphisms.
OmegaCompletePartialOrder.ContinuousHom.comp_id theorem
(f : β →𝒄 γ) : f.comp id = f
Full source
@[simp]
theorem comp_id (f : β →𝒄 γ) : f.comp id = f := rfl
Identity Law for Composition of Continuous Homomorphisms: $f \circ \operatorname{id} = f$
Informal description
For any continuous homomorphism $f \colon \beta \to_{\mathcal{c}} \gamma$ between omega-complete partial orders, the composition of $f$ with the identity continuous homomorphism on $\beta$ is equal to $f$ itself, i.e., $f \circ \operatorname{id} = f$.
OmegaCompletePartialOrder.ContinuousHom.id_comp theorem
(f : β →𝒄 γ) : id.comp f = f
Full source
@[simp]
theorem id_comp (f : β →𝒄 γ) : id.comp f = f := rfl
Identity Law for Composition of Continuous Homomorphisms: $\operatorname{id} \circ f = f$
Informal description
For any continuous homomorphism $f \colon \beta \to_{\mathcal{c}} \gamma$ between omega-complete partial orders, the composition of the identity continuous homomorphism on $\beta$ with $f$ is equal to $f$ itself, i.e., $\operatorname{id} \circ f = f$.
OmegaCompletePartialOrder.ContinuousHom.comp_assoc theorem
(f : γ →𝒄 δ) (g : β →𝒄 γ) (h : α →𝒄 β) : f.comp (g.comp h) = (f.comp g).comp h
Full source
@[simp]
theorem comp_assoc (f : γ →𝒄 δ) (g : β →𝒄 γ) (h : α →𝒄 β) : f.comp (g.comp h) = (f.comp g).comp h :=
  rfl
Associativity of Composition for Continuous Homomorphisms between ωCPOs
Informal description
For any continuous homomorphisms $f \colon \gamma \to_{\mathcal{c}} \delta$, $g \colon \beta \to_{\mathcal{c}} \gamma$, and $h \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders, the composition operation is associative, i.e., $f \circ (g \circ h) = (f \circ g) \circ h$.
OmegaCompletePartialOrder.ContinuousHom.coe_apply theorem
(a : α) (f : α →𝒄 β) : (f : α →o β) a = f a
Full source
@[simp]
theorem coe_apply (a : α) (f : α →𝒄 β) : (f : α →o β) a = f a :=
  rfl
Evaluation Consistency of Continuous Homomorphisms and Their Underlying Order Homomorphisms
Informal description
For any continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders and any element $a \in \alpha$, the evaluation of $f$ at $a$ is equal to the evaluation of the underlying order homomorphism at $a$, i.e., $(f \colon \alpha \to_o \beta)(a) = f(a)$.
OmegaCompletePartialOrder.ContinuousHom.const definition
(x : β) : α →𝒄 β
Full source
/-- `Function.const` is a continuous function. -/
@[simps!]
def const (x : β) : α →𝒄 β := ⟨.const _ x, ωScottContinuous.const.map_ωSup⟩
Constant continuous homomorphism between ωCPOs
Informal description
The constant function that maps every element of an omega-complete partial order $\alpha$ to a fixed element $x$ in an omega-complete partial order $\beta$, bundled as a continuous homomorphism. This function is continuous as it preserves suprema of increasing sequences, i.e., for any increasing sequence $(c_n)$ in $\alpha$, the supremum of the sequence $(x)$ in $\beta$ is $x$.
OmegaCompletePartialOrder.ContinuousHom.instInhabited instance
[Inhabited β] : Inhabited (α →𝒄 β)
Full source
instance [Inhabited β] : Inhabited (α →𝒄 β) :=
  ⟨const default⟩
Inhabitedness of Continuous Homomorphisms between ωCPOs
Informal description
For any inhabited omega-complete partial order $\beta$, the type of continuous homomorphisms from $\alpha$ to $\beta$ is also inhabited.
OmegaCompletePartialOrder.ContinuousHom.toMono definition
: (α →𝒄 β) →o α →o β
Full source
/-- The map from continuous functions to monotone functions is itself a monotone function. -/
@[simps]
def toMono : (α →𝒄 β) →o α →o β where
  toFun f := f
  monotone' _ _ h := h
Monotone map from continuous homomorphisms to order homomorphisms
Informal description
The function maps a continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders to its underlying monotone function $f \colon \alpha \to \beta$, viewed as an order homomorphism. This assignment is itself a monotone function from the partial order of continuous homomorphisms to the preorder of order homomorphisms.
OmegaCompletePartialOrder.ContinuousHom.forall_forall_merge theorem
(c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) (z : β) : (∀ i j : ℕ, (c₀ i) (c₁ j) ≤ z) ↔ ∀ i : ℕ, (c₀ i) (c₁ i) ≤ z
Full source
/-- When proving that a chain of applications is below a bound `z`, it suffices to consider the
functions and values being selected from the same index in the chains.

This lemma is more specific than necessary, i.e. `c₀` only needs to be a
chain of monotone functions, but it is only used with continuous functions. -/
@[simp]
theorem forall_forall_merge (c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) (z : β) :
    (∀ i j : ℕ, (c₀ i) (c₁ j) ≤ z) ↔ ∀ i : ℕ, (c₀ i) (c₁ i) ≤ z := by
  constructor <;> introv h
  · apply h
  · apply le_trans _ (h (max i j))
    trans c₀ i (c₁ (max i j))
    · apply (c₀ i).monotone
      apply c₁.monotone
      apply le_max_right
    · apply c₀.monotone
      apply le_max_left
Equivalence of Pointwise and Diagonal Chain Bounds in ωCPOs
Informal description
Let $\alpha$ and $\beta$ be omega-complete partial orders, and let $c_0 \colon \mathbb{N} \to (\alpha \to_{\mathcal{c}} \beta)$ and $c_1 \colon \mathbb{N} \to \alpha$ be chains of continuous homomorphisms and elements, respectively. For any upper bound $z \in \beta$, the following are equivalent: 1. For all indices $i, j \in \mathbb{N}$, the application $(c_0(i))(c_1(j)) \leq z$. 2. For all indices $i \in \mathbb{N}$, the application $(c_0(i))(c_1(i)) \leq z$.
OmegaCompletePartialOrder.ContinuousHom.forall_forall_merge' theorem
(c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) (z : β) : (∀ j i : ℕ, (c₀ i) (c₁ j) ≤ z) ↔ ∀ i : ℕ, (c₀ i) (c₁ i) ≤ z
Full source
@[simp]
theorem forall_forall_merge' (c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) (z : β) :
    (∀ j i : ℕ, (c₀ i) (c₁ j) ≤ z) ↔ ∀ i : ℕ, (c₀ i) (c₁ i) ≤ z := by
  rw [forall_swap, forall_forall_merge]
Equivalence of Swapped Pointwise and Diagonal Chain Bounds in ωCPOs
Informal description
Let $\alpha$ and $\beta$ be omega-complete partial orders, and let $c_0 \colon \mathbb{N} \to (\alpha \to_{\mathcal{c}} \beta)$ and $c_1 \colon \mathbb{N} \to \alpha$ be chains of continuous homomorphisms and elements, respectively. For any upper bound $z \in \beta$, the following are equivalent: 1. For all indices $j, i \in \mathbb{N}$, the application $(c_0(i))(c_1(j)) \leq z$. 2. For all indices $i \in \mathbb{N}$, the application $(c_0(i))(c_1(i)) \leq z$.
OmegaCompletePartialOrder.ContinuousHom.ωSup definition
(c : Chain (α →𝒄 β)) : α →𝒄 β
Full source
/-- The `ωSup` operator for continuous functions, which takes the pointwise countable supremum
of the functions in the `ω`-chain. -/
@[simps!]
protected def ωSup (c : Chain (α →𝒄 β)) : α →𝒄 β where
  toOrderHom := ωSup <| c.map toMono
  map_ωSup' c' := eq_of_forall_ge_iff fun a ↦ by simp [(c _).ωScottContinuous.map_ωSup]
Supremum of a chain of continuous homomorphisms between ωCPOs
Informal description
Given a chain $(c_n)_{n \in \mathbb{N}}$ of continuous homomorphisms between omega-complete partial orders $\alpha$ and $\beta$, the operator $\omega\text{Sup}$ constructs a new continuous homomorphism $\omega\text{Sup}(c_n) \colon \alpha \to_{\mathcal{c}} \beta$ which is the pointwise supremum of the chain. Specifically, for each $x \in \alpha$, we have $(\omega\text{Sup}(c_n))(x) = \omega\text{Sup}(c_n(x))$.
OmegaCompletePartialOrder.ContinuousHom.inst instance
: OmegaCompletePartialOrder (α →𝒄 β)
Full source
@[simps ωSup]
instance : OmegaCompletePartialOrder (α →𝒄 β) :=
  OmegaCompletePartialOrder.lift ContinuousHom.toMono ContinuousHom.ωSup
    (fun _ _ h => h) (fun _ => rfl)
$\omega$-Complete Partial Order Structure on Continuous Homomorphisms
Informal description
The type of continuous homomorphisms $\alpha \to_{\mathcal{c}} \beta$ between two omega-complete partial orders $\alpha$ and $\beta$ forms an omega-complete partial order, where the order and supremum operations are defined pointwise. Specifically, for any chain $(f_n)_{n \in \mathbb{N}}$ of continuous homomorphisms, its supremum $\omega\text{Sup}(f_n)$ is the continuous homomorphism defined by $\omega\text{Sup}(f_n)(a) = \omega\text{Sup}(f_n(a))$ for each $a \in \alpha$.
OmegaCompletePartialOrder.ContinuousHom.Prod.apply definition
: (α →𝒄 β) × α →𝒄 β
Full source
/-- The application of continuous functions as a continuous function. -/
@[simps]
def apply : (α →𝒄 β) × α(α →𝒄 β) × α →𝒄 β where
  toFun f := f.1 f.2
  monotone' x y h := by
    dsimp
    trans y.fst x.snd <;> [apply h.1; apply y.1.monotone h.2]
  map_ωSup' c := by
    apply le_antisymm
    · apply ωSup_le
      intro i
      dsimp
      rw [(c _).fst.continuous]
      apply ωSup_le
      intro j
      apply le_ωSup_of_le (max i j)
      apply apply_mono
      · exact monotone_fst (OrderHom.mono _ (le_max_left _ _))
      · exact monotone_snd (OrderHom.mono _ (le_max_right _ _))
    · apply ωSup_le
      intro i
      apply le_ωSup_of_le i
      dsimp
      apply OrderHom.mono _
      apply le_ωSup_of_le i
      rfl
Continuous function application operator
Informal description
The continuous function application operator, which takes a pair $(f, x)$ consisting of a continuous homomorphism $f \colon \alpha \to_{\mathcal{c}} \beta$ between omega-complete partial orders and an element $x \in \alpha$, and returns the result $f(x) \in \beta$. This operator is itself a continuous homomorphism, meaning it preserves suprema of increasing sequences in both arguments.
OmegaCompletePartialOrder.ContinuousHom.ωSup_def theorem
(c : Chain (α →𝒄 β)) (x : α) : ωSup c x = ContinuousHom.ωSup c x
Full source
theorem ωSup_def (c : Chain (α →𝒄 β)) (x : α) : ωSup c x = ContinuousHom.ωSup c x :=
  rfl
Pointwise Supremum Property for Continuous Homomorphisms
Informal description
For any chain $c$ of continuous homomorphisms between $\omega$-complete partial orders $\alpha$ and $\beta$, and for any element $x \in \alpha$, the evaluation of the supremum $\omega\text{Sup}(c)$ at $x$ is equal to the supremum of the evaluations $\omega\text{Sup}(c(x))$.
OmegaCompletePartialOrder.ContinuousHom.ωSup_apply_ωSup theorem
(c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) : ωSup c₀ (ωSup c₁) = Prod.apply (ωSup (c₀.zip c₁))
Full source
theorem ωSup_apply_ωSup (c₀ : Chain (α →𝒄 β)) (c₁ : Chain α) :
    ωSup c₀ (ωSup c₁) = Prod.apply (ωSup (c₀.zip c₁)) := by simp [Prod.apply_apply, Prod.ωSup_zip]
Supremum Evaluation Identity for Continuous Homomorphisms: $\omega\text{Sup}(c_0)(\omega\text{Sup}(c_1)) = \omega\text{Sup}(c_0.\text{zip}\, c_1).\text{apply}$
Informal description
For any chain $c_0$ of continuous homomorphisms from $\alpha$ to $\beta$ and any chain $c_1$ in $\alpha$, the evaluation of the supremum $\omega\text{Sup}(c_0)$ at the supremum $\omega\text{Sup}(c_1)$ is equal to the application of the supremum of the zipped chain $c_0.\text{zip}\, c_1$ in the product $\omega$-complete partial order $(\alpha \to_{\mathcal{c}} \beta) \times \alpha$. That is, \[ \omega\text{Sup}(c_0)(\omega\text{Sup}(c_1)) = \omega\text{Sup}(c_0.\text{zip}\, c_1).\text{apply}. \]
OmegaCompletePartialOrder.ContinuousHom.flip definition
{α : Type*} (f : α → β →𝒄 γ) : β →𝒄 α → γ
Full source
/-- A family of continuous functions yields a continuous family of functions. -/
@[simps]
def flip {α : Type*} (f : α → β →𝒄 γ) : β →𝒄 α → γ where
  toFun x y := f y x
  monotone' _ _ h a := (f a).monotone h
  map_ωSup' _ := by ext x; change f _ _ = _; rw [(f _).continuous]; rfl
Flip operation for continuous homomorphisms
Informal description
Given a continuous homomorphism $f \colon \alpha \to (\beta \to_{\mathcal{c}} \gamma)$, the function $\text{flip}\, f \colon \beta \to_{\mathcal{c}} (\alpha \to \gamma)$ is defined by $(\text{flip}\, f)(x)(y) = f(y)(x)$. This operation preserves continuity and monotonicity, and satisfies the $\omega$-supremum preservation property.
OmegaCompletePartialOrder.ContinuousHom.bind definition
{β γ : Type v} (f : α →𝒄 Part β) (g : α →𝒄 β → Part γ) : α →𝒄 Part γ
Full source
/-- `Part.bind` as a continuous function. -/
@[simps! apply]
noncomputable def bind {β γ : Type v} (f : α →𝒄 Part β) (g : α →𝒄 β → Part γ) : α →𝒄 Part γ :=
  .mk (OrderHom.partBind f g.toOrderHom) fun c => by
    rw [ωSup_bind, ← f.continuous, g.toOrderHom_eq_coe, ← g.continuous]
    rfl
Continuous homomorphism bind operation for partial functions
Informal description
The function `bind` for continuous homomorphisms between omega-complete partial orders (ωCPOs) takes two continuous homomorphisms `f : α →𝒄 Part β` and `g : α →𝒄 β → Part γ`, and returns a new continuous homomorphism `α →𝒄 Part γ`. This operation corresponds to the monadic bind operation for partial functions, lifted to the context of continuous homomorphisms between ωCPOs.
OmegaCompletePartialOrder.ContinuousHom.map definition
{β γ : Type v} (f : β → γ) (g : α →𝒄 Part β) : α →𝒄 Part γ
Full source
/-- `Part.map` as a continuous function. -/
@[simps! apply]
noncomputable def map {β γ : Type v} (f : β → γ) (g : α →𝒄 Part β) : α →𝒄 Part γ :=
  .copy (fun x => f <$> g x) (bind g (const (purepure ∘ f))) <| by
    ext1
    simp only [map_eq_bind_pure_comp, bind, coe_mk, OrderHom.partBind_coe, coe_apply,
      coe_toOrderHom, const_apply, Part.bind_eq_bind]
Continuous homomorphism map operation for partial functions
Informal description
Given a function \( f \colon \beta \to \gamma \) and a continuous homomorphism \( g \colon \alpha \to_{\mathcal{c}} \text{Part } \beta \), the function `OmegaCompletePartialOrder.ContinuousHom.map` constructs a new continuous homomorphism \( \alpha \to_{\mathcal{c}} \text{Part } \gamma \) by applying \( f \) to the values inside the partial results of \( g \). Specifically, for any \( x \in \alpha \), the result is \( f \) mapped over the partial value \( g(x) \).
OmegaCompletePartialOrder.ContinuousHom.seq definition
{β γ : Type v} (f : α →𝒄 Part (β → γ)) (g : α →𝒄 Part β) : α →𝒄 Part γ
Full source
/-- `Part.seq` as a continuous function. -/
@[simps! apply]
noncomputable def seq {β γ : Type v} (f : α →𝒄 Part (β → γ)) (g : α →𝒄 Part β) : α →𝒄 Part γ :=
  .copy (fun x => f x <*> g x) (bind f <| flip <| _root_.flip map g) <| by
      ext
      simp only [seq_eq_bind_map, Part.bind_eq_bind, Part.mem_bind_iff, flip_apply, _root_.flip,
        map_apply, bind_apply, Part.map_eq_map]
Sequential application of continuous homomorphisms for partial functions
Informal description
Given continuous homomorphisms \( f \colon \alpha \to_{\mathcal{c}} \text{Part } (\beta \to \gamma) \) and \( g \colon \alpha \to_{\mathcal{c}} \text{Part } \beta \) between omega-complete partial orders, the function `seq` constructs a new continuous homomorphism \( \alpha \to_{\mathcal{c}} \text{Part } \gamma \) by applying the partial functions from \( f \) to the partial values from \( g \). Specifically, for any \( x \in \alpha \), the result is the sequential application \( f(x) \) to \( g(x) \) in the partial function context.
OmegaCompletePartialOrder.fixedPoints.iterateChain definition
(f : α →o α) (x : α) (h : x ≤ f x) : Chain α
Full source
/-- Iteration of a function on an initial element interpreted as a chain. -/
def iterateChain (f : α →o α) (x : α) (h : x ≤ f x) : Chain α :=
  ⟨fun n => f^[n] x, f.monotone.monotone_iterate_of_le_map h⟩
Iterated chain of a monotone function
Informal description
Given a monotone function \( f : \alpha \to \alpha \) on a preorder \( \alpha \) and an element \( x \in \alpha \) such that \( x \leq f(x) \), the function constructs a chain \( (f^n(x))_{n \in \mathbb{N}} \) where each element is obtained by iterating \( f \) on \( x \). This chain is increasing due to the monotonicity of \( f \) and the initial condition \( x \leq f(x) \).
OmegaCompletePartialOrder.fixedPoints.ωSup_iterate_mem_fixedPoint theorem
(h : x ≤ f x) : ωSup (iterateChain f x h) ∈ fixedPoints f
Full source
/-- The supremum of iterating a function on x arbitrary often is a fixed point -/
theorem ωSup_iterate_mem_fixedPoint (h : x ≤ f x) :
    ωSupωSup (iterateChain f x h) ∈ fixedPoints f := by
  rw [mem_fixedPoints, IsFixedPt, f.continuous]
  apply le_antisymm
  · apply ωSup_le
    intro n
    simp only [Chain.map_coe, OrderHomClass.coe_coe, comp_apply]
    have : iterateChain f x h (n.succ) = f (iterateChain f x h n) :=
      Function.iterate_succ_apply' ..
    rw [← this]
    apply le_ωSup
  · apply ωSup_le
    rintro (_ | n)
    · apply le_trans h
      change ((iterateChain f x h).map f) 0 ≤ ωSup ((iterateChain f x h).map (f : α →o α))
      apply le_ωSup
    · have : iterateChain f x h (n.succ) = (iterateChain f x h).map f n :=
        Function.iterate_succ_apply' ..
      rw [this]
      apply le_ωSup
Supremum of Iterates is a Fixed Point in ωCPO
Informal description
Let $\alpha$ be an $\omega$-complete partial order, $f \colon \alpha \to \alpha$ a monotone function, and $x \in \alpha$ such that $x \leq f(x)$. Then the supremum of the chain $(f^n(x))_{n \in \mathbb{N}}$ is a fixed point of $f$, i.e., $f(\omega\text{Sup}(f^n(x))) = \omega\text{Sup}(f^n(x))$.
OmegaCompletePartialOrder.fixedPoints.ωSup_iterate_le_prefixedPoint theorem
(h : x ≤ f x) {a : α} (h_a : f a ≤ a) (h_x_le_a : x ≤ a) : ωSup (iterateChain f x h) ≤ a
Full source
/-- The supremum of iterating a function on x arbitrary often is smaller than any prefixed point.

A prefixed point is a value `a` with `f a ≤ a`. -/
theorem ωSup_iterate_le_prefixedPoint (h : x ≤ f x) {a : α}
    (h_a : f a ≤ a) (h_x_le_a : x ≤ a) :
    ωSup (iterateChain f x h) ≤ a := by
  apply ωSup_le
  intro n
  induction n with
  | zero => exact h_x_le_a
  | succ n h_ind =>
    have : iterateChain f x h (n.succ) = f (iterateChain f x h n) :=
      Function.iterate_succ_apply' ..
    rw [this]
    exact le_trans (f.monotone h_ind) h_a
Supremum of Iterates is Below Any Prefixed Point in ωCPO
Informal description
Let $\alpha$ be an $\omega$-complete partial order, $f \colon \alpha \to \alpha$ a monotone function, and $x \in \alpha$ such that $x \leq f(x)$. For any prefixed point $a \in \alpha$ (i.e., satisfying $f(a) \leq a$) with $x \leq a$, the supremum of the chain $(f^n(x))_{n \in \mathbb{N}}$ satisfies $\omega\text{Sup}(f^n(x)) \leq a$.
OmegaCompletePartialOrder.fixedPoints.ωSup_iterate_le_fixedPoint theorem
(h : x ≤ f x) {a : α} (h_a : a ∈ fixedPoints f) (h_x_le_a : x ≤ a) : ωSup (iterateChain f x h) ≤ a
Full source
/-- The supremum of iterating a function on x arbitrary often is smaller than any fixed point. -/
theorem ωSup_iterate_le_fixedPoint (h : x ≤ f x) {a : α}
    (h_a : a ∈ fixedPoints f) (h_x_le_a : x ≤ a) :
    ωSup (iterateChain f x h) ≤ a := by
  rw [mem_fixedPoints] at h_a
  obtain h_a := Eq.le h_a
  exact ωSup_iterate_le_prefixedPoint f x h h_a h_x_le_a
Supremum of Iterates is Below Any Fixed Point in ωCPO
Informal description
Let $\alpha$ be an $\omega$-complete partial order, $f \colon \alpha \to \alpha$ a monotone function, and $x \in \alpha$ such that $x \leq f(x)$. For any fixed point $a \in \alpha$ of $f$ (i.e., $f(a) = a$) with $x \leq a$, the supremum of the chain $(f^n(x))_{n \in \mathbb{N}}$ satisfies $\omega\text{Sup}(f^n(x)) \leq a$.