doc-next-gen

Mathlib.SetTheory.Ordinal.Family

Module docstring

{"# Arithmetic on families of ordinals

Main definitions and results

  • sup, lsub: the supremum / least strict upper bound of an indexed family of ordinals in Type u, as an ordinal in Type u.
  • bsup, blsub: the supremum / least strict upper bound of a set of ordinals indexed by ordinals less than a given ordinal o.

Various other basic arithmetic results are given in Principal.lean instead. ","### Families of ordinals

There are two kinds of indexed families that naturally arise when dealing with ordinals: those indexed by some type in the appropriate universe, and those indexed by ordinals less than another. The following API allows one to convert from one kind of family to the other.

In many cases, this makes it easy to prove claims about one kind of family via the corresponding claim on the other. ","### Supremum of a family of ordinals ","### Results about injectivity and surjectivity ","### Properties of ω ","### Casting naturals into ordinals, compatibility with operations "}

Ordinal.bfamilyOfFamily' definition
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) : ∀ a < type r, α
Full source
/-- Converts a family indexed by a `Type u` to one indexed by an `Ordinal.{u}` using a specified
well-ordering. -/
def bfamilyOfFamily' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) :
    ∀ a < type r, α := fun a ha => f (enum r ⟨a, ha⟩)
Conversion from type-indexed family to ordinal-indexed family via well-order
Informal description
Given a well-order relation \( r \) on a type \( \iota \) and a family \( f : \iota \to \alpha \) indexed by \( \iota \), the function converts this into a family indexed by ordinals \( a \) less than the order type of \( r \). Specifically, for each ordinal \( a < \text{type } r \), the value is \( f \) evaluated at the \( a \)-th element in the enumeration of \( \iota \) according to \( r \).
Ordinal.bfamilyOfFamily definition
{ι : Type u} : (ι → α) → ∀ a < type (@WellOrderingRel ι), α
Full source
/-- Converts a family indexed by a `Type u` to one indexed by an `Ordinal.{u}` using a well-ordering
given by the axiom of choice. -/
def bfamilyOfFamily {ι : Type u} : (ι → α) → ∀ a < type (@WellOrderingRel ι), α :=
  bfamilyOfFamily' WellOrderingRel
Conversion from type-indexed family to ordinal-indexed family via well-ordering
Informal description
Given a family of elements of type $\alpha$ indexed by a type $\iota$ in universe `Type u`, this function converts it into a family indexed by ordinals $a$ less than the order type of $\iota$ under the well-ordering relation `WellOrderingRel`. The conversion uses the axiom of choice to well-order $\iota$ and then maps each ordinal $a$ to the corresponding element in the original family via this well-ordering.
Ordinal.familyOfBFamily' definition
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o) (f : ∀ a < o, α) : ι → α
Full source
/-- Converts a family indexed by an `Ordinal.{u}` to one indexed by a `Type u` using a specified
well-ordering. -/
def familyOfBFamily' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o)
    (f : ∀ a < o, α) : ι → α := fun i =>
  f (typein r i)
    (by
      rw [← ho]
      exact typein_lt_type r i)
Conversion from ordinal-indexed family to type-indexed family via well-order
Informal description
Given a well-order relation \( r \) on a type \( \iota \) and an ordinal \( o \) such that the order type of \( r \) equals \( o \), the function converts a family \( f \) of elements of type \( \alpha \) indexed by ordinals \( a < o \) into a family indexed by elements of \( \iota \). Specifically, for each \( i \in \iota \), the value at \( i \) is \( f \) evaluated at the ordinal corresponding to the initial segment of \( i \) in \( r \).
Ordinal.familyOfBFamily definition
(o : Ordinal) (f : ∀ a < o, α) : o.toType → α
Full source
/-- Converts a family indexed by an `Ordinal.{u}` to one indexed by a `Type u` using a well-ordering
given by the axiom of choice. -/
def familyOfBFamily (o : Ordinal) (f : ∀ a < o, α) : o.toType → α :=
  familyOfBFamily' (· < ·) (type_toType o) f
Conversion from ordinal-indexed family to canonical type-indexed family
Informal description
Given an ordinal $o$ and a family of elements of type $\alpha$ indexed by ordinals $a < o$, this function converts it into a family indexed by elements of the canonical type associated with $o$ (via `Ordinal.toType`). The conversion is done using the well-ordering relation on the canonical type, ensuring that the indexing respects the order structure of $o$.
Ordinal.bfamilyOfFamily'_typein theorem
{ι} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) (i) : bfamilyOfFamily' r f (typein r i) (typein_lt_type r i) = f i
Full source
@[simp]
theorem bfamilyOfFamily'_typein {ι} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) (i) :
    bfamilyOfFamily' r f (typein r i) (typein_lt_type r i) = f i := by
  simp only [bfamilyOfFamily', enum_typein]
Compatibility of $\mathrm{bfamilyOfFamily}'$ with Initial Segment Order Type
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$, and let $f : \iota \to \alpha$ be a family of elements of type $\alpha$ indexed by $\iota$. For any element $i \in \iota$, the value of the ordinal-indexed family $\mathrm{bfamilyOfFamily}'\, r\, f$ at the ordinal $\mathrm{typein}\, r\, i$ (which represents the order type of the initial segment $\{j \in \iota \mid r(j, i)\}$) is equal to $f(i)$. In symbols: $$\mathrm{bfamilyOfFamily}'\, r\, f\, (\mathrm{typein}\, r\, i)\, (\mathrm{typein\_lt\_type}\, r\, i) = f(i)$$
Ordinal.bfamilyOfFamily_typein theorem
{ι} (f : ι → α) (i) : bfamilyOfFamily f (typein _ i) (typein_lt_type _ i) = f i
Full source
@[simp]
theorem bfamilyOfFamily_typein {ι} (f : ι → α) (i) :
    bfamilyOfFamily f (typein _ i) (typein_lt_type _ i) = f i :=
  bfamilyOfFamily'_typein _ f i
Compatibility of $\mathrm{bfamilyOfFamily}$ with Initial Segment Order Type
Informal description
For any type $\iota$ and any family of elements $f : \iota \to \alpha$, the ordinal-indexed family $\mathrm{bfamilyOfFamily}\, f$ evaluated at the ordinal $\mathrm{typein}\, r\, i$ (where $r$ is the well-ordering relation on $\iota$ and $i \in \iota$) equals $f(i)$. In symbols: $$\mathrm{bfamilyOfFamily}\, f\, (\mathrm{typein}\, r\, i)\, (\mathrm{typein\_lt\_type}\, r\, i) = f(i)$$
Ordinal.familyOfBFamily'_enum theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o) (f : ∀ a < o, α) (i hi) : familyOfBFamily' r ho f (enum r ⟨i, by rwa [ho]⟩) = f i hi
Full source
theorem familyOfBFamily'_enum {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o}
    (ho : type r = o) (f : ∀ a < o, α) (i hi) :
    familyOfBFamily' r ho f (enum r ⟨i, by rwa [ho]⟩) = f i hi := by
  simp only [familyOfBFamily', typein_enum]
Compatibility of Ordinal-Indexed Family Conversion with Enumeration
Informal description
Let $\iota$ be a type with a well-order relation $r$, and let $o$ be an ordinal such that the order type of $r$ equals $o$. Given a family of elements $f$ indexed by ordinals $a < o$, and given an ordinal $i < o$ with proof $hi$ of this inequality, then evaluating the converted type-indexed family at the $i$-th element (via the enumeration function for $r$) yields $f$ evaluated at $i$ with proof $hi$. In symbols: if $\text{type } r = o$, then for the family $\text{familyOfBFamily}'\, r\, ho\, f$ (where $ho$ is the proof of $\text{type } r = o$), we have: $$\text{familyOfBFamily}'\, r\, ho\, f\, (\text{enum}\, r\, \langle i, \text{by } rwa [ho] \rangle) = f\, i\, hi$$
Ordinal.familyOfBFamily_enum theorem
(o : Ordinal) (f : ∀ a < o, α) (i hi) : familyOfBFamily o f (enum (α := o.toType) (· < ·) ⟨i, hi.trans_eq (type_toType _).symm⟩) = f i hi
Full source
theorem familyOfBFamily_enum (o : Ordinal) (f : ∀ a < o, α) (i hi) :
    familyOfBFamily o f (enum (α := o.toType) (· < ·) ⟨i, hi.trans_eq (type_toType _).symm⟩)
    = f i hi :=
  familyOfBFamily'_enum _ (type_toType o) f _ _
Compatibility of Ordinal-Indexed Family Conversion with Enumeration on Canonical Type
Informal description
For any ordinal $o$ and any family of elements $f$ indexed by ordinals $a < o$, evaluating the converted type-indexed family at the $i$-th element (via the enumeration function for the canonical well-order on $o.\text{toType}$) yields $f$ evaluated at $i$ with proof $hi$ of $i < o$. In symbols: $$\text{familyOfBFamily}\, o\, f\, (\text{enum}\, (\cdot < \cdot)\, \langle i, hi \rangle) = f\, i\, hi$$
Ordinal.brange definition
(o : Ordinal) (f : ∀ a < o, α) : Set α
Full source
/-- The range of a family indexed by ordinals. -/
def brange (o : Ordinal) (f : ∀ a < o, α) : Set α :=
  { a | ∃ i hi, f i hi = a }
Range of a family indexed by ordinals below `o`
Informal description
For an ordinal `o` and a family of elements `f` indexed by ordinals less than `o`, the set `brange o f` consists of all elements `a` such that there exists an ordinal `i < o` with `f i hi = a`, where `hi` is a proof that `i < o`.
Ordinal.mem_brange theorem
{o : Ordinal} {f : ∀ a < o, α} {a} : a ∈ brange o f ↔ ∃ i hi, f i hi = a
Full source
theorem mem_brange {o : Ordinal} {f : ∀ a < o, α} {a} : a ∈ brange o fa ∈ brange o f ↔ ∃ i hi, f i hi = a :=
  Iff.rfl
Characterization of Membership in the Range of an Ordinal-Indexed Family
Informal description
For an ordinal $o$ and a family of elements $f$ indexed by ordinals less than $o$, an element $a$ belongs to the range $\mathrm{brange}\, o\, f$ if and only if there exists an ordinal $i < o$ and a proof $hi$ that $i < o$ such that $f\, i\, hi = a$.
Ordinal.mem_brange_self theorem
{o} (f : ∀ a < o, α) (i hi) : f i hi ∈ brange o f
Full source
theorem mem_brange_self {o} (f : ∀ a < o, α) (i hi) : f i hi ∈ brange o f :=
  ⟨i, hi, rfl⟩
Self-Membership in Bounded Range of Ordinal-Indexed Family
Informal description
For any ordinal $o$, any family of elements $f$ indexed by ordinals $a < o$, and any ordinal $i < o$ with proof $hi$, the element $f(i, hi)$ belongs to the range of $f$ restricted to ordinals below $o$, i.e., $f(i, hi) \in \mathrm{brange}(o, f)$.
Ordinal.range_familyOfBFamily' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o) (f : ∀ a < o, α) : range (familyOfBFamily' r ho f) = brange o f
Full source
@[simp]
theorem range_familyOfBFamily' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o}
    (ho : type r = o) (f : ∀ a < o, α) : range (familyOfBFamily' r ho f) = brange o f := by
  refine Set.ext fun a => ⟨?_, ?_⟩
  · rintro ⟨b, rfl⟩
    apply mem_brange_self
  · rintro ⟨i, hi, rfl⟩
    exact ⟨_, familyOfBFamily'_enum _ _ _ _ _⟩
Range Correspondence for Ordinal-Indexed Family Conversion via Well-Order
Informal description
Let $\iota$ be a type with a well-order relation $r$, and let $o$ be an ordinal such that the order type of $r$ equals $o$. Given a family of elements $f$ indexed by ordinals $a < o$, the range of the converted type-indexed family $\text{familyOfBFamily}'\, r\, ho\, f$ is equal to the bounded range $\text{brange}\, o\, f$. In symbols: if $\text{type } r = o$, then $$\text{range } (\text{familyOfBFamily}'\, r\, ho\, f) = \text{brange}\, o\, f.$$
Ordinal.range_familyOfBFamily theorem
{o} (f : ∀ a < o, α) : range (familyOfBFamily o f) = brange o f
Full source
@[simp]
theorem range_familyOfBFamily {o} (f : ∀ a < o, α) : range (familyOfBFamily o f) = brange o f :=
  range_familyOfBFamily' _ _ f
Range Correspondence for Ordinal-Indexed Family Conversion
Informal description
For any ordinal $o$ and any family of elements $f$ indexed by ordinals $a < o$, the range of the converted family $\mathrm{familyOfBFamily}\, o\, f$ (indexed by elements of the canonical type associated with $o$) is equal to the bounded range $\mathrm{brange}\, o\, f$. In symbols: $$\mathrm{range}\, (\mathrm{familyOfBFamily}\, o\, f) = \mathrm{brange}\, o\, f.$$
Ordinal.brange_bfamilyOfFamily' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) : brange _ (bfamilyOfFamily' r f) = range f
Full source
@[simp]
theorem brange_bfamilyOfFamily' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) :
    brange _ (bfamilyOfFamily' r f) = range f := by
  refine Set.ext fun a => ⟨?_, ?_⟩
  · rintro ⟨i, hi, rfl⟩
    apply mem_range_self
  · rintro ⟨b, rfl⟩
    exact ⟨_, _, bfamilyOfFamily'_typein _ _ _⟩
Range Correspondence for Well-Ordered Family Conversion to Ordinal-Indexed Family
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$, and let $f : \iota \to \alpha$ be a family of elements of type $\alpha$ indexed by $\iota$. The bounded range of the ordinal-indexed family obtained from $f$ via $\mathrm{bfamilyOfFamily}'$ is equal to the range of $f$. In symbols: $$\mathrm{brange}\, (\mathrm{type}\, r)\, (\mathrm{bfamilyOfFamily}'\, r\, f) = \mathrm{range}\, f.$$
Ordinal.brange_bfamilyOfFamily theorem
{ι : Type u} (f : ι → α) : brange _ (bfamilyOfFamily f) = range f
Full source
@[simp]
theorem brange_bfamilyOfFamily {ι : Type u} (f : ι → α) : brange _ (bfamilyOfFamily f) = range f :=
  brange_bfamilyOfFamily' _ _
Range Preservation in Conversion from Type-Indexed to Ordinal-Indexed Family
Informal description
For any type $\iota$ in universe `Type u` and any family of elements $f : \iota \to \alpha$, the bounded range of the ordinal-indexed family obtained from $f$ via the well-ordering relation is equal to the range of $f$. In symbols: $$\mathrm{brange}\, (\mathrm{type}\, \mathrm{WellOrderingRel})\, (\mathrm{bfamilyOfFamily}\, f) = \mathrm{range}\, f.$$
Ordinal.brange_const theorem
{o : Ordinal} (ho : o ≠ 0) {c : α} : (brange o fun _ _ => c) = { c }
Full source
@[simp]
theorem brange_const {o : Ordinal} (ho : o ≠ 0) {c : α} : (brange o fun _ _ => c) = {c} := by
  rw [← range_familyOfBFamily]
  exact @Set.range_const _ o.toType (toType_nonempty_iff_ne_zero.2 ho) c
Bounded Range of Constant Family is Singleton Set
Informal description
For any nonzero ordinal $o$ and any element $c$ of type $\alpha$, the bounded range of the constant family $f$ defined by $f(i, h_i) = c$ for all $i < o$ is equal to the singleton set $\{c\}$. In symbols: $$\mathrm{brange}\, o\, (\lambda i\, h_i, c) = \{c\}.$$
Ordinal.comp_bfamilyOfFamily' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α) (g : α → β) : (fun i hi => g (bfamilyOfFamily' r f i hi)) = bfamilyOfFamily' r (g ∘ f)
Full source
theorem comp_bfamilyOfFamily' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → α)
    (g : α → β) : (fun i hi => g (bfamilyOfFamily' r f i hi)) = bfamilyOfFamily' r (g ∘ f) :=
  rfl
Composition Commutes with Conversion to Ordinal-Indexed Family via Well-Order
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$, and let $f : \iota \to \alpha$ be a family of elements indexed by $\iota$. For any function $g : \alpha \to \beta$, the composition of $g$ with the family obtained by converting $f$ via the well-order $r$ is equal to the family obtained by converting $g \circ f$ via the same well-order $r$. In symbols: \[ \big(\lambda i\ hi,\ g (\text{bfamilyOfFamily'}\ r\ f\ i\ hi)\big) = \text{bfamilyOfFamily'}\ r\ (g \circ f) \]
Ordinal.comp_bfamilyOfFamily theorem
{ι : Type u} (f : ι → α) (g : α → β) : (fun i hi => g (bfamilyOfFamily f i hi)) = bfamilyOfFamily (g ∘ f)
Full source
theorem comp_bfamilyOfFamily {ι : Type u} (f : ι → α) (g : α → β) :
    (fun i hi => g (bfamilyOfFamily f i hi)) = bfamilyOfFamily (g ∘ f) :=
  rfl
Composition Commutes with Conversion to Ordinal-Indexed Family
Informal description
For any type $\iota$ and any family of elements $f : \iota \to \alpha$, the composition of a function $g : \alpha \to \beta$ with the ordinal-indexed family obtained from $f$ via the well-ordering relation on $\iota$ is equal to the ordinal-indexed family obtained from the composition $g \circ f$. In symbols: \[ \big(\lambda i\ hi,\ g (\text{bfamilyOfFamily}\ f\ i\ hi)\big) = \text{bfamilyOfFamily}\ (g \circ f) \]
Ordinal.comp_familyOfBFamily' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o) (f : ∀ a < o, α) (g : α → β) : g ∘ familyOfBFamily' r ho f = familyOfBFamily' r ho fun i hi => g (f i hi)
Full source
theorem comp_familyOfBFamily' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o}
    (ho : type r = o) (f : ∀ a < o, α) (g : α → β) :
    g ∘ familyOfBFamily' r ho f = familyOfBFamily' r ho fun i hi => g (f i hi) :=
  rfl
Composition Commutes with Family Conversion via Well-Order
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$, and let $o$ be an ordinal such that the order type of $r$ is equal to $o$. Given a family of elements $f$ indexed by ordinals $a < o$ and a function $g : \alpha \to \beta$, the composition of $g$ with the family obtained from $f$ via the well-order $r$ is equal to the family obtained by applying $g$ pointwise to $f$ under the same well-order $r$. In symbols, for any $f : \forall a < o, \alpha$ and $g : \alpha \to \beta$, we have: \[ g \circ \text{familyOfBFamily'}\ r\ ho\ f = \text{familyOfBFamily'}\ r\ ho\ (\lambda i\ hi, g (f\ i\ hi)) \]
Ordinal.comp_familyOfBFamily theorem
{o} (f : ∀ a < o, α) (g : α → β) : g ∘ familyOfBFamily o f = familyOfBFamily o fun i hi => g (f i hi)
Full source
theorem comp_familyOfBFamily {o} (f : ∀ a < o, α) (g : α → β) :
    g ∘ familyOfBFamily o f = familyOfBFamily o fun i hi => g (f i hi) :=
  rfl
Composition Commutes with Ordinal-Indexed Family Conversion
Informal description
For any ordinal $o$, any family of elements $f$ indexed by ordinals $a < o$ (i.e., $f : \forall a < o, \alpha$), and any function $g : \alpha \to \beta$, the composition of $g$ with the family obtained from $f$ via the canonical type associated with $o$ is equal to the family obtained by applying $g$ pointwise to $f$ under the same canonical type. In symbols: \[ g \circ \text{familyOfBFamily}\ o\ f = \text{familyOfBFamily}\ o\ (\lambda i\ hi, g (f\ i\ hi)) \]
Ordinal.sup definition
{ι : Type u} (f : ι → Ordinal.{max u v}) : Ordinal.{max u v}
Full source
/-- The supremum of a family of ordinals -/
@[deprecated iSup (since := "2024-08-27")]
def sup {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) : OrdinalOrdinal.{max u v} :=
  iSup f
Supremum of a family of ordinals
Informal description
The supremum of a family of ordinals indexed by a type $\iota$ is the least ordinal that is greater than or equal to every ordinal in the family. Given a function $f : \iota \to \text{Ordinal}$, the supremum $\text{sup}\, f$ is the smallest ordinal $\alpha$ such that $f(i) \leq \alpha$ for all $i \in \iota$.
Ordinal.bddAbove_range theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : BddAbove (Set.range f)
Full source
/-- The range of an indexed ordinal function, whose outputs live in a higher universe than the
    inputs, is always bounded above. See `Ordinal.lsub` for an explicit bound. -/
theorem bddAbove_range {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) : BddAbove (Set.range f) :=
  ⟨(iSup (succ ∘ card ∘ f)).ord, by
    rintro a ⟨i, rfl⟩
    exact le_of_lt (Cardinal.lt_ord.2 ((lt_succ _).trans_le
      (le_ciSup (Cardinal.bddAbove_range _) _)))⟩
Range of Ordinal-Valued Function is Bounded Above
Informal description
For any type $\iota$ in universe level $u$ and any function $f : \iota \to \text{Ordinal}$ mapping to ordinals in universe level $\max(u,v)$, the range of $f$ is bounded above in the order of ordinals. That is, there exists an ordinal $\alpha$ such that $f(i) \leq \alpha$ for all $i \in \iota$.
Ordinal.bddAbove_of_small theorem
(s : Set Ordinal.{u}) [h : Small.{u} s] : BddAbove s
Full source
theorem bddAbove_of_small (s : Set OrdinalOrdinal.{u}) [h : Small.{u} s] : BddAbove s := by
  obtain ⟨a, ha⟩ := bddAbove_range (fun x => ((@equivShrink s h).symm x).val)
  use a
  intro b hb
  simpa using ha (mem_range_self (equivShrink s ⟨b, hb⟩))
Boundedness of Small Sets of Ordinals
Informal description
For any set $s$ of ordinals in universe level $u$, if $s$ is $u$-small (i.e., there exists a bijection between $s$ and a type in universe level $u$), then $s$ is bounded above in the order of ordinals.
Ordinal.bddAbove_iff_small theorem
{s : Set Ordinal.{u}} : BddAbove s ↔ Small.{u} s
Full source
theorem bddAbove_iff_small {s : Set OrdinalOrdinal.{u}} : BddAboveBddAbove s ↔ Small.{u} s :=
  ⟨fun ⟨a, h⟩ => small_subset <| show s ⊆ Iic a from fun _ hx => h hx, fun _ =>
    bddAbove_of_small _⟩
Boundedness of Ordinal Sets is Equivalent to Smallness
Informal description
For any set $s$ of ordinals in universe level $u$, $s$ is bounded above if and only if $s$ is $u$-small (i.e., there exists a bijection between $s$ and a type in universe level $u$).
Ordinal.bddAbove_image theorem
{s : Set Ordinal.{u}} (hf : BddAbove s) (f : Ordinal.{u} → Ordinal.{max u v}) : BddAbove (f '' s)
Full source
theorem bddAbove_image {s : Set OrdinalOrdinal.{u}} (hf : BddAbove s)
    (f : OrdinalOrdinal.{u}OrdinalOrdinal.{max u v}) : BddAbove (f '' s) := by
  rw [bddAbove_iff_small] at hf ⊢
  exact small_lift _
Boundedness of Images of Bounded Ordinal Sets
Informal description
Let $s$ be a set of ordinals in universe level $u$ that is bounded above, and let $f$ be a function from ordinals in universe level $u$ to ordinals in universe level $\max(u,v)$. Then the image $f(s)$ is also bounded above in the order of ordinals.
Ordinal.bddAbove_range_comp theorem
{ι : Type u} {f : ι → Ordinal.{v}} (hf : BddAbove (range f)) (g : Ordinal.{v} → Ordinal.{max v w}) : BddAbove (range (g ∘ f))
Full source
theorem bddAbove_range_comp {ι : Type u} {f : ι → OrdinalOrdinal.{v}} (hf : BddAbove (range f))
    (g : OrdinalOrdinal.{v}OrdinalOrdinal.{max v w}) : BddAbove (range (g ∘ f)) := by
  rw [range_comp]
  exact bddAbove_image hf g
Boundedness of Range under Composition of Ordinal Functions
Informal description
Let $\iota$ be a type, $f : \iota \to \text{Ordinal}$ a function whose range is bounded above in the ordinals, and $g : \text{Ordinal} \to \text{Ordinal}$ another function. Then the range of the composition $g \circ f$ is also bounded above in the ordinals.
Ordinal.le_iSup theorem
{ι} (f : ι → Ordinal.{u}) [Small.{u} ι] : ∀ i, f i ≤ iSup f
Full source
/-- `le_ciSup` whenever the input type is small in the output universe. This lemma sometimes
fails to infer `f` in simple cases and needs it to be given explicitly. -/
protected theorem le_iSup {ι} (f : ι → OrdinalOrdinal.{u}) [Small.{u} ι] : ∀ i, f i ≤ iSup f :=
  le_ciSup (bddAbove_of_small _)
Element is bounded by indexed supremum of ordinals for small index type
Informal description
Let $\iota$ be a type that is small in the universe level $u$, and let $f : \iota \to \text{Ordinal}$ be a function from $\iota$ to the ordinals. Then for every $i \in \iota$, the ordinal $f(i)$ is less than or equal to the supremum of the range of $f$, i.e., $f(i) \leq \sup f$.
Ordinal.le_sup theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : ∀ i, f i ≤ sup.{_, v} f
Full source
@[deprecated Ordinal.le_iSup (since := "2024-08-27")]
theorem le_sup {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) : ∀ i, f i ≤ sup.{_, v} f := fun i =>
  Ordinal.le_iSup f i
Element-wise bound by supremum for ordinal families
Informal description
For any type $\iota$ in universe level $u$ and any function $f : \iota \to \text{Ordinal}$ (where the ordinals are in universe level $\max(u,v)$), every element $f(i)$ in the family is less than or equal to the supremum $\sup f$ of the family. In symbols: \[ \forall i \in \iota, \quad f(i) \leq \sup f. \]
Ordinal.iSup_le_iff theorem
{ι} {f : ι → Ordinal.{u}} {a : Ordinal.{u}} [Small.{u} ι] : iSup f ≤ a ↔ ∀ i, f i ≤ a
Full source
/-- `ciSup_le_iff'` whenever the input type is small in the output universe. -/
protected theorem iSup_le_iff {ι} {f : ι → OrdinalOrdinal.{u}} {a : OrdinalOrdinal.{u}} [Small.{u} ι] :
    iSupiSup f ≤ a ↔ ∀ i, f i ≤ a :=
  ciSup_le_iff' (bddAbove_of_small _)
Characterization of Supremum Bound for Ordinals: $\bigsqcup_i f(i) \leq a \leftrightarrow \forall i, f(i) \leq a$
Informal description
Let $\iota$ be a type in universe level $u$, and let $f : \iota \to \text{Ordinal}$ be a function from $\iota$ to the ordinals. Then the supremum of $f$ is less than or equal to an ordinal $a$ if and only if $f(i) \leq a$ for all $i \in \iota$. In symbols: \[ \bigsqcup_{i} f(i) \leq a \leftrightarrow \forall i, f(i) \leq a. \]
Ordinal.sup_le_iff theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} {a} : sup.{_, v} f ≤ a ↔ ∀ i, f i ≤ a
Full source
@[deprecated Ordinal.iSup_le_iff (since := "2024-08-27")]
theorem sup_le_iff {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}} {a} : supsup.{_, v} f ≤ a ↔ ∀ i, f i ≤ a :=
  Ordinal.iSup_le_iff
Supremum Bound Characterization for Ordinal Families: $\sup f \leq a \leftrightarrow \forall i, f(i) \leq a$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$ and any ordinal $a$, the supremum $\sup f$ satisfies $\sup f \leq a$ if and only if $f(i) \leq a$ for all $i \in \iota$.
Ordinal.iSup_le theorem
{ι} {f : ι → Ordinal} {a} : (∀ i, f i ≤ a) → iSup f ≤ a
Full source
/-- An alias of `ciSup_le'` for discoverability. -/
protected theorem iSup_le {ι} {f : ι → Ordinal} {a} :
    (∀ i, f i ≤ a) → iSup f ≤ a :=
  ciSup_le'
Supremum Bound for Ordinals: $\bigsqcup_i f(i) \leq a$ when $f(i) \leq a$ for all $i$
Informal description
For any indexed family of ordinals $f : \iota \to \text{Ordinal}$ and any ordinal $a$, if $f(i) \leq a$ for all $i \in \iota$, then the supremum of the family satisfies $\bigsqcup_{i} f(i) \leq a$.
Ordinal.sup_le theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} {a} : (∀ i, f i ≤ a) → sup.{_, v} f ≤ a
Full source
@[deprecated Ordinal.iSup_le (since := "2024-08-27")]
theorem sup_le {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}} {a} : (∀ i, f i ≤ a) → sup.{_, v} f ≤ a :=
  Ordinal.iSup_le
Supremum Bound for Ordinal Families
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, if $f(i) \leq a$ for all $i \in \iota$, then the supremum of the family satisfies $\sup f \leq a$.
Ordinal.lt_iSup_iff theorem
{ι} {f : ι → Ordinal.{u}} {a : Ordinal.{u}} [Small.{u} ι] : a < iSup f ↔ ∃ i, a < f i
Full source
/-- `lt_ciSup_iff'` whenever the input type is small in the output universe. -/
protected theorem lt_iSup_iff {ι} {f : ι → OrdinalOrdinal.{u}} {a : OrdinalOrdinal.{u}} [Small.{u} ι] :
    a < iSup f ↔ ∃ i, a < f i :=
  lt_ciSup_iff' (bddAbove_of_small _)
Characterization of Strict Supremum Bound for Small Families of Ordinals: $a < \bigsqcup_i f(i) \leftrightarrow \exists i, a < f(i)$
Informal description
Let $\iota$ be a small type in universe level $u$, and let $f : \iota \to \text{Ordinal}$ be a family of ordinals. For any ordinal $a$, we have $a < \bigsqcup_{i} f(i)$ if and only if there exists an index $i \in \iota$ such that $a < f(i)$. In symbols: \[ a < \bigsqcup_{i} f(i) \leftrightarrow \exists i, a < f(i). \]
Ordinal.ne_iSup_iff_lt_iSup theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} : (∀ i, f i ≠ iSup f) ↔ ∀ i, f i < iSup f
Full source
@[deprecated "No deprecation message was provided." (since := "2024-08-27")]
theorem ne_iSup_iff_lt_iSup {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}} :
    (∀ i, f i ≠ iSup f) ↔ ∀ i, f i < iSup f :=
  forall_congr' fun i => (Ordinal.le_iSup f i).lt_iff_ne.symm
Supremum Strict Inequality Characterization for Ordinal Families: $f(i) \neq \bigsqcup_j f(j) \leftrightarrow f(i) < \bigsqcup_j f(j)$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the following are equivalent: 1. For every $i \in \iota$, $f(i) \neq \bigsqcup_{j} f(j)$ (the supremum of the family). 2. For every $i \in \iota$, $f(i) < \bigsqcup_{j} f(j)$. In other words, no element of the family equals the supremum if and only if every element is strictly less than the supremum.
Ordinal.ne_sup_iff_lt_sup theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} : (∀ i, f i ≠ sup.{_, v} f) ↔ ∀ i, f i < sup.{_, v} f
Full source
@[deprecated ne_iSup_iff_lt_iSup (since := "2024-08-27")]
theorem ne_sup_iff_lt_sup {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}} :
    (∀ i, f i ≠ sup.{_, v} f) ↔ ∀ i, f i < sup.{_, v} f :=
  ne_iSup_iff_lt_iSup
Supremum Strict Inequality Characterization for Ordinal Families: $f(i) \neq \sup f \leftrightarrow f(i) < \sup f$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the following are equivalent: 1. For every $i \in \iota$, $f(i) \neq \sup f$ (the supremum of the family). 2. For every $i \in \iota$, $f(i) < \sup f$. In other words, no element of the family equals the supremum if and only if every element is strictly less than the supremum.
Ordinal.succ_lt_iSup_of_ne_iSup theorem
{ι} {f : ι → Ordinal.{u}} [Small.{u} ι] (hf : ∀ i, f i ≠ iSup f) {a} (hao : a < iSup f) : succ a < iSup f
Full source
theorem succ_lt_iSup_of_ne_iSup {ι} {f : ι → OrdinalOrdinal.{u}} [Small.{u} ι]
    (hf : ∀ i, f i ≠ iSup f) {a} (hao : a < iSup f) : succ a < iSup f := by
  by_contra! hoa
  exact hao.not_le (Ordinal.iSup_le fun i => le_of_lt_succ <|
    (lt_of_le_of_ne (Ordinal.le_iSup _ _) (hf i)).trans_le hoa)
Successor Below Supremum for Non-Constant Families of Ordinals
Informal description
Let $\iota$ be a type that is small in universe level $u$, and let $f : \iota \to \text{Ordinal}$ be a family of ordinals such that $f(i) \neq \sup f$ for all $i \in \iota$. Then for any ordinal $a < \sup f$, the successor ordinal $\text{succ}\, a$ is also strictly less than $\sup f$.
Ordinal.sup_not_succ_of_ne_sup theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} (hf : ∀ i, f i ≠ sup.{_, v} f) {a} (hao : a < sup.{_, v} f) : succ a < sup.{_, v} f
Full source
@[deprecated succ_lt_iSup_of_ne_iSup (since := "2024-08-27")]
theorem sup_not_succ_of_ne_sup {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}}
    (hf : ∀ i, f i ≠ sup.{_, v} f) {a} (hao : a < sup.{_, v} f) : succ a < sup.{_, v} f := by
  by_contra! hoa
  exact
    hao.not_le (sup_le fun i => le_of_lt_succ <| (lt_of_le_of_ne (le_sup _ _) (hf i)).trans_le hoa)
Successor Below Supremum for Non-Constant Ordinal Families
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, if $f(i) \neq \sup f$ for all $i \in \iota$, then for any ordinal $a < \sup f$, the successor ordinal $\text{succ}\, a$ is also strictly less than $\sup f$.
Ordinal.iSup_eq_zero_iff theorem
{ι} {f : ι → Ordinal.{u}} [Small.{u} ι] : iSup f = 0 ↔ ∀ i, f i = 0
Full source
theorem iSup_eq_zero_iff {ι} {f : ι → OrdinalOrdinal.{u}} [Small.{u} ι] :
    iSupiSup f = 0 ↔ ∀ i, f i = 0 := by
  refine
    ⟨fun h i => ?_, fun h =>
      le_antisymm (Ordinal.iSup_le fun i => Ordinal.le_zero.2 (h i)) (Ordinal.zero_le _)⟩
  rw [← Ordinal.le_zero, ← h]
  exact Ordinal.le_iSup f i
Characterization of Zero Supremum for Ordinal Families: $\bigsqcup_i f(i) = 0 \leftrightarrow \forall i, f(i) = 0$
Informal description
For any small type $\iota$ (relative to universe $u$) and any family of ordinals $f : \iota \to \text{Ordinal}$, the supremum $\bigsqcup_{i} f(i)$ equals $0$ if and only if $f(i) = 0$ for every $i \in \iota$.
Ordinal.sup_const theorem
{ι} [_hι : Nonempty ι] (o : Ordinal) : (sup fun _ : ι => o) = o
Full source
@[deprecated ciSup_const (since := "2024-08-27")]
theorem sup_const {ι} [_hι : Nonempty ι] (o : Ordinal) : (sup fun _ : ι => o) = o :=
  ciSup_const
Supremum of a Constant Ordinal Family
Informal description
For any nonempty type $\iota$ and any ordinal $o$, the supremum of the constant function $f(i) = o$ over $\iota$ is equal to $o$, i.e., $\sup_{i \in \iota} o = o$.
Ordinal.sup_unique theorem
{ι} [Unique ι] (f : ι → Ordinal) : sup f = f default
Full source
@[deprecated ciSup_unique (since := "2024-08-27")]
theorem sup_unique {ι} [Unique ι] (f : ι → Ordinal) : sup f = f default :=
  ciSup_unique
Supremum of an Ordinal Family over a Unique Type Equals its Value at Default
Informal description
For any unique type $\iota$ (i.e., a type with exactly one element) and any function $f : \iota \to \text{Ordinal}$, the supremum of $f$ is equal to the value of $f$ at the default element of $\iota$, i.e., $\sup f = f(\text{default})$.
Ordinal.sup_le_of_range_subset theorem
{ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal} (h : Set.range f ⊆ Set.range g) : sup.{u, max v w} f ≤ sup.{v, max u w} g
Full source
@[deprecated csSup_le_csSup' (since := "2024-08-27")]
theorem sup_le_of_range_subset {ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal}
    (h : Set.rangeSet.range f ⊆ Set.range g) : sup.{u, max v w} f ≤ sup.{v, max u w} g :=
  csSup_le_csSup' (bddAbove_range.{v, max u w} _) h
Supremum Inequality for Ordinal Families under Range Inclusion
Informal description
Let $\iota$ and $\iota'$ be types, and let $f : \iota \to \text{Ordinal}$ and $g : \iota' \to \text{Ordinal}$ be families of ordinals. If the range of $f$ is a subset of the range of $g$ (i.e., $\{f(i) \mid i \in \iota\} \subseteq \{g(j) \mid j \in \iota'\}$), then the supremum of $f$ is less than or equal to the supremum of $g$, i.e., $\sup f \leq \sup g$.
Ordinal.iSup_eq_of_range_eq theorem
{ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal} (h : Set.range f = Set.range g) : iSup f = iSup g
Full source
theorem iSup_eq_of_range_eq {ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal}
    (h : Set.range f = Set.range g) : iSup f = iSup g :=
  congr_arg _ h
Suprema Equality for Ordinal Families with Identical Ranges
Informal description
For any two indexed families of ordinals $f : \iota \to \text{Ordinal}$ and $g : \iota' \to \text{Ordinal}$, if their ranges are equal (i.e., $\{f(i) \mid i \in \iota\} = \{g(j) \mid j \in \iota'\}$), then their suprema are equal: $\bigsqcup f = \bigsqcup g$.
Ordinal.sup_eq_of_range_eq theorem
{ι : Type u} {ι' : Type v} {f : ι → Ordinal.{max u v w}} {g : ι' → Ordinal.{max u v w}} (h : Set.range f = Set.range g) : sup.{u, max v w} f = sup.{v, max u w} g
Full source
@[deprecated iSup_eq_of_range_eq (since := "2024-08-27")]
theorem sup_eq_of_range_eq {ι : Type u} {ι' : Type v}
    {f : ι → OrdinalOrdinal.{max u v w}} {g : ι' → OrdinalOrdinal.{max u v w}}
    (h : Set.range f = Set.range g) : sup.{u, max v w} f = sup.{v, max u w} g :=
  Ordinal.iSup_eq_of_range_eq h
Suprema Equality for Ordinal Families with Identical Ranges
Informal description
For any two indexed families of ordinals $f : \iota \to \text{Ordinal}$ and $g : \iota' \to \text{Ordinal}$ (where $\iota$ and $\iota'$ are types in possibly different universes), if their ranges are equal (i.e., $\{f(i) \mid i \in \iota\} = \{g(j) \mid j \in \iota'\}$), then their suprema are equal: $\sup f = \sup g$.
Ordinal.iSup_succ theorem
(o : Ordinal) : ⨆ a : Iio o, succ a.1 = o
Full source
theorem iSup_succ (o : Ordinal) : ⨆ a : Iio o, succ a.1 = o := by
  apply (le_of_forall_lt _).antisymm'
  · simp [Ordinal.iSup_le_iff]
  · exact fun a ha ↦ (lt_succ a).trans_le <| Ordinal.le_iSup (fun x : Iio _ ↦ _) ⟨a, ha⟩
Supremum of Successors of Ordinals Below $o$ Equals $o$
Informal description
For any ordinal $o$, the supremum of the successors of all ordinals less than $o$ is equal to $o$. That is, \[ \bigsqcup_{a < o} \text{succ}(a) = o. \]
Ordinal.iSup_sum theorem
{α β} (f : α ⊕ β → Ordinal.{u}) [Small.{u} α] [Small.{u} β] : iSup f = max (⨆ a, f (Sum.inl a)) (⨆ b, f (Sum.inr b))
Full source
theorem iSup_sum {α β} (f : α ⊕ βOrdinalOrdinal.{u}) [Small.{u} α] [Small.{u} β]:
    iSup f = max (⨆ a, f (Sum.inl a)) (⨆ b, f (Sum.inr b)) := by
  apply (Ordinal.iSup_le _).antisymm (max_le _ _)
  · rintro (i | i)
    · exact le_max_of_le_left (Ordinal.le_iSup (fun x ↦ f (Sum.inl x)) i)
    · exact le_max_of_le_right (Ordinal.le_iSup (fun x ↦ f (Sum.inr x)) i)
  all_goals
    apply csSup_le_csSup' (bddAbove_of_small _)
    rintro i ⟨a, rfl⟩
    apply mem_range_self
Supremum Decomposition for Sum Types of Ordinals: $\bigsqcup_{x \in \alpha \oplus \beta} f(x) = \max(\bigsqcup_{a \in \alpha} f(a), \bigsqcup_{b \in \beta} f(b))$
Informal description
Let $\alpha$ and $\beta$ be types that are small in universe level $u$, and let $f : \alpha \oplus \beta \to \text{Ordinal}$ be a function from their sum type to ordinals. Then the supremum of $f$ equals the maximum of the suprema of $f$ restricted to $\alpha$ and $\beta$, i.e., \[ \bigsqcup_{x \in \alpha \oplus \beta} f(x) = \max\left(\bigsqcup_{a \in \alpha} f(\text{inl}\, a), \bigsqcup_{b \in \beta} f(\text{inr}\, b)\right). \]
Ordinal.sup_sum theorem
{α : Type u} {β : Type v} (f : α ⊕ β → Ordinal) : sup.{max u v, w} f = max (sup.{u, max v w} fun a => f (Sum.inl a)) (sup.{v, max u w} fun b => f (Sum.inr b))
Full source
@[deprecated iSup_sum (since := "2024-08-27")]
theorem sup_sum {α : Type u} {β : Type v} (f : α ⊕ βOrdinal) :
    sup.{max u v, w} f =
      max (sup.{u, max v w} fun a => f (Sum.inl a)) (sup.{v, max u w} fun b => f (Sum.inr b)) := by
  apply (sup_le_iff.2 _).antisymm (max_le_iff.2 ⟨_, _⟩)
  · rintro (i | i)
    · exact le_max_of_le_left (le_sup _ i)
    · exact le_max_of_le_right (le_sup _ i)
  all_goals
    apply sup_le_of_range_subset.{_, max u v, w}
    rintro i ⟨a, rfl⟩
    apply mem_range_self
Supremum Decomposition for Ordinal Families over Sum Types: $\sup f = \max(\sup f|_\alpha, \sup f|_\beta)$
Informal description
For any types $\alpha$ and $\beta$, and any function $f : \alpha \oplus \beta \to \text{Ordinal}$, the supremum of $f$ equals the maximum of the suprema of $f$ restricted to $\alpha$ and $\beta$. That is, \[ \sup f = \max \left( \sup_{a \in \alpha} f(\text{inl}\, a), \sup_{b \in \beta} f(\text{inr}\, b) \right). \]
Ordinal.unbounded_range_of_le_iSup theorem
{α β : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : β → α) (h : type r ≤ ⨆ i, typein r (f i)) : Unbounded r (range f)
Full source
theorem unbounded_range_of_le_iSup {α β : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : β → α)
    (h : type r ≤ ⨆ i, typein r (f i)) : Unbounded r (range f) :=
  (not_bounded_iff _).1 fun ⟨x, hx⟩ =>
    h.not_lt <| lt_of_le_of_lt
      (Ordinal.iSup_le fun y => ((typein_lt_typein r).2 <| hx _ <| mem_range_self y).le)
      (typein_lt_type r x)
Unbounded Range Condition for Supremum of Initial Segment Ordinals
Informal description
Let $\alpha$ and $\beta$ be types in the same universe, equipped with a well-order relation $r$ on $\alpha$. Given a function $f : \beta \to \alpha$, if the order type of $r$ is less than or equal to the supremum of the order types of the initial segments $\mathrm{typein}\, r\, (f(i))$ for all $i \in \beta$, then the range of $f$ is unbounded with respect to $r$.
Ordinal.IsNormal.map_iSup_of_bddAbove theorem
{f : Ordinal.{u} → Ordinal.{v}} (H : IsNormal f) {ι : Type*} (g : ι → Ordinal.{u}) (hg : BddAbove (range g)) [Nonempty ι] : f (⨆ i, g i) = ⨆ i, f (g i)
Full source
theorem IsNormal.map_iSup_of_bddAbove {f : OrdinalOrdinal.{u}OrdinalOrdinal.{v}} (H : IsNormal f)
    {ι : Type*} (g : ι → OrdinalOrdinal.{u}) (hg : BddAbove (range g))
    [Nonempty ι] : f (⨆ i, g i) = ⨆ i, f (g i) := eq_of_forall_ge_iff fun a ↦ by
  have := bddAbove_iff_small.mp hg
  have := univLE_of_injective H.strictMono.injective
  have := Small.trans_univLE.{u, v} (range g)
  have hfg : BddAbove (range (f ∘ g)) := bddAbove_iff_small.mpr <| by
    rw [range_comp]
    exact small_image f (range g)
  change _ ↔ ⨆ i, (f ∘ g) i ≤ a
  rw [ciSup_le_iff hfg, H.le_set' _ Set.univ_nonempty g] <;> simp [ciSup_le_iff hg]
Normal Functions Preserve Suprema of Bounded Families: $f(\bigsqcup_i g(i)) = \bigsqcup_i f(g(i))$
Informal description
Let $f$ be a normal ordinal function (i.e., strictly increasing and continuous at limit ordinals). For any type $\iota$ and any bounded-above family of ordinals $g : \iota \to \text{Ordinal}$, if $\iota$ is nonempty, then $f$ preserves the supremum: \[ f\left(\bigsqcup_{i} g(i)\right) = \bigsqcup_{i} f(g(i)). \]
Ordinal.IsNormal.map_iSup theorem
{f : Ordinal.{u} → Ordinal.{v}} (H : IsNormal f) {ι : Type w} (g : ι → Ordinal.{u}) [Small.{u} ι] [Nonempty ι] : f (⨆ i, g i) = ⨆ i, f (g i)
Full source
theorem IsNormal.map_iSup {f : OrdinalOrdinal.{u}OrdinalOrdinal.{v}} (H : IsNormal f)
    {ι : Type w} (g : ι → OrdinalOrdinal.{u}) [Small.{u} ι] [Nonempty ι] :
    f (⨆ i, g i) = ⨆ i, f (g i) :=
  H.map_iSup_of_bddAbove g (bddAbove_of_small _)
Normal Functions Preserve Suprema of Small Families: $f(\bigsqcup_i g(i)) = \bigsqcup_i f(g(i))$
Informal description
Let $f$ be a normal ordinal function (i.e., strictly increasing and continuous at limit ordinals). For any type $\iota$ in universe level $w$ and any family of ordinals $g : \iota \to \text{Ordinal}$ in universe level $u$, if $\iota$ is $u$-small and nonempty, then $f$ preserves the supremum: \[ f\left(\bigsqcup_{i} g(i)\right) = \bigsqcup_{i} f(g(i)). \]
Ordinal.IsNormal.map_sSup_of_bddAbove theorem
{f : Ordinal.{u} → Ordinal.{v}} (H : IsNormal f) {s : Set Ordinal.{u}} (hs : BddAbove s) (hn : s.Nonempty) : f (sSup s) = sSup (f '' s)
Full source
theorem IsNormal.map_sSup_of_bddAbove {f : OrdinalOrdinal.{u}OrdinalOrdinal.{v}} (H : IsNormal f)
    {s : Set OrdinalOrdinal.{u}} (hs : BddAbove s) (hn : s.Nonempty) : f (sSup s) = sSup (f '' s) := by
  have := hn.to_subtype
  rw [sSup_eq_iSup', sSup_image', H.map_iSup_of_bddAbove]
  rwa [Subtype.range_coe_subtype, setOf_mem_eq]
Normal Functions Preserve Suprema of Bounded Sets: $f(\sup s) = \sup f[s]$
Informal description
Let $f$ be a normal ordinal function (i.e., strictly increasing and continuous at limit ordinals). For any nonempty set $s$ of ordinals that is bounded above, $f$ preserves the supremum: \[ f\left(\sup s\right) = \sup \{f(\alpha) \mid \alpha \in s\}. \]
Ordinal.IsNormal.map_sSup theorem
{f : Ordinal.{u} → Ordinal.{v}} (H : IsNormal f) {s : Set Ordinal.{u}} (hn : s.Nonempty) [Small.{u} s] : f (sSup s) = sSup (f '' s)
Full source
theorem IsNormal.map_sSup {f : OrdinalOrdinal.{u}OrdinalOrdinal.{v}} (H : IsNormal f)
    {s : Set OrdinalOrdinal.{u}} (hn : s.Nonempty) [Small.{u} s] : f (sSup s) = sSup (f '' s) :=
  H.map_sSup_of_bddAbove (bddAbove_of_small s) hn
Normal Functions Preserve Suprema of Small Sets: $f(\sup s) = \sup f[s]$
Informal description
Let $f$ be a normal ordinal function (i.e., strictly increasing and continuous at limit ordinals). For any nonempty set $s$ of ordinals in universe level $u$ that is $u$-small (i.e., there exists a bijection between $s$ and a type in universe level $u$), $f$ preserves the supremum: \[ f\left(\sup s\right) = \sup \{f(\alpha) \mid \alpha \in s\}. \]
Ordinal.IsNormal.sup theorem
{f : Ordinal.{max u v} → Ordinal.{max u w}} (H : IsNormal f) {ι : Type u} (g : ι → Ordinal.{max u v}) [Nonempty ι] : f (sup.{_, v} g) = sup.{_, w} (f ∘ g)
Full source
@[deprecated IsNormal.map_iSup (since := "2024-08-27")]
theorem IsNormal.sup {f : OrdinalOrdinal.{max u v}OrdinalOrdinal.{max u w}} (H : IsNormal f) {ι : Type u}
    (g : ι → OrdinalOrdinal.{max u v}) [Nonempty ι] : f (sup.{_, v} g) = sup.{_, w} (f ∘ g) :=
  H.map_iSup g
Normal Functions Preserve Suprema of Ordinal Families: $f(\sup_i g(i)) = \sup_i f(g(i))$
Informal description
Let $f$ be a normal function from ordinals to ordinals (i.e., strictly increasing and continuous at limit ordinals). For any nonempty type $\iota$ in universe level $u$ and any family of ordinals $g : \iota \to \text{Ordinal}$ in universe level $\max(u,v)$, the function $f$ preserves the supremum: \[ f\left(\sup_{i \in \iota} g(i)\right) = \sup_{i \in \iota} f(g(i)). \]
Ordinal.IsNormal.apply_of_isLimit theorem
{f : Ordinal.{u} → Ordinal.{v}} (H : IsNormal f) {o : Ordinal} (ho : IsLimit o) : f o = ⨆ a : Iio o, f a
Full source
theorem IsNormal.apply_of_isLimit {f : OrdinalOrdinal.{u}OrdinalOrdinal.{v}} (H : IsNormal f) {o : Ordinal}
    (ho : IsLimit o) : f o = ⨆ a : Iio o, f a := by
  have : Nonempty (Iio o) := ⟨0, ho.pos⟩
  rw [← H.map_iSup, ho.iSup_Iio]
Normal Function Value at Limit Ordinal Equals Supremum of Predecessor Values
Informal description
For any normal ordinal function $f$ and any limit ordinal $o$, the value of $f$ at $o$ is equal to the supremum of the values of $f$ at all ordinals less than $o$, i.e., \[ f(o) = \bigsqcup_{a < o} f(a). \]
Ordinal.sSup_ord theorem
{s : Set Cardinal.{u}} (hs : BddAbove s) : (sSup s).ord = sSup (ord '' s)
Full source
theorem sSup_ord {s : Set CardinalCardinal.{u}} (hs : BddAbove s) : (sSup s).ord = sSup (ordord '' s) :=
  eq_of_forall_ge_iff fun a => by
    rw [csSup_le_iff'
        (bddAbove_iff_small.2 (@small_image _ _ _ s (Cardinal.bddAbove_iff_small.1 hs))),
      ord_le, csSup_le_iff' hs]
    simp [ord_le]
Ordinal-Cardinal Supremum Relation: $\mathrm{ord}(\sup s) = \sup \mathrm{ord}[s]$ for bounded cardinal sets
Informal description
For any bounded above set $s$ of cardinal numbers in universe level $u$, the smallest ordinal $\mathrm{ord}(\sup s)$ with cardinality equal to the supremum of $s$ is equal to the supremum of the ordinals $\mathrm{ord}(\kappa)$ for all $\kappa \in s$. In other words: $$\mathrm{ord}(\sup s) = \sup \{\mathrm{ord}(\kappa) \mid \kappa \in s\}$$
Ordinal.iSup_ord theorem
{ι} {f : ι → Cardinal} (hf : BddAbove (range f)) : (iSup f).ord = ⨆ i, (f i).ord
Full source
theorem iSup_ord {ι} {f : ι → Cardinal} (hf : BddAbove (range f)) :
    (iSup f).ord = ⨆ i, (f i).ord := by
  unfold iSup
  convert sSup_ord hf
  -- Porting note: `change` is required.
  conv_lhs => change range (ordord ∘ f)
  rw [range_comp]
Ordinal-Cardinal Supremum Relation for Indexed Families: $\mathrm{ord}(\sup_i f_i) = \sup_i \mathrm{ord}(f_i)$
Informal description
For any indexed family of cardinal numbers $\{f_i\}_{i \in \iota}$ whose range is bounded above, the smallest ordinal $\mathrm{ord}(\sup_i f_i)$ with cardinality equal to the supremum of the family is equal to the supremum of the ordinals $\mathrm{ord}(f_i)$ for all $i \in \iota$. In other words: $$\mathrm{ord}\left(\sup_{i \in \iota} f_i\right) = \sup_{i \in \iota} \mathrm{ord}(f_i)$$
Ordinal.lift_card_sInf_compl_le theorem
(s : Set Ordinal.{u}) : Cardinal.lift.{u + 1} (sInf sᶜ).card ≤ #s
Full source
theorem lift_card_sInf_compl_le (s : Set OrdinalOrdinal.{u}) :
    Cardinal.lift.{u + 1} (sInf sᶜ).card#s := by
  rw [← mk_Iio_ordinal]
  refine mk_le_mk_of_subset fun x (hx : x < _) ↦ ?_
  rw [← not_not_mem]
  exact not_mem_of_lt_csInf' hx
Cardinality bound: $\text{lift}(\text{card}(\inf(s^c))) \leq \#s$ for ordinal sets
Informal description
For any set $s$ of ordinals in universe `Type u`, the universe-lifted cardinality of the complement's infimum is bounded above by the cardinality of $s$. More precisely, we have: $$\text{lift}_{u+1}(\text{card}(\inf(s^c))) \leq \#s$$ where $s^c$ denotes the complement of $s$ in the class of all ordinals.
Ordinal.card_sInf_range_compl_le_lift theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : (sInf (range f)ᶜ).card ≤ Cardinal.lift.{v} #ι
Full source
theorem card_sInf_range_compl_le_lift {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    (sInf (range f)ᶜ).cardCardinal.lift.{v}  := by
  rw [← Cardinal.lift_le.{max u v + 1}, Cardinal.lift_lift]
  apply (lift_card_sInf_compl_le _).trans
  rw [← Cardinal.lift_id'.{u, max u v + 1} #(range _)]
  exact mk_range_le_lift
Cardinality Bound: $\text{card}(\inf(\text{range}\, f)^c) \leq \text{lift}(\#\iota)$ for Ordinal Families
Informal description
For any function $f : \iota \to \text{Ordinal}$ from a type $\iota$ in universe $u$ to ordinals in universe $\max(u,v)$, the cardinality of the complement of the infimum of the range of $f$ is bounded above by the lift of the cardinality of $\iota$ to universe $v$. That is: $$\text{card}(\inf(\text{range}\, f)^c) \leq \text{lift}_v(\#\iota)$$
Ordinal.card_sInf_range_compl_le theorem
{ι : Type u} (f : ι → Ordinal.{u}) : (sInf (range f)ᶜ).card ≤ #ι
Full source
theorem card_sInf_range_compl_le {ι : Type u} (f : ι → OrdinalOrdinal.{u}) :
    (sInf (range f)ᶜ).card :=
  Cardinal.lift_id card_sInf_range_compl_le_lift f
Cardinality bound: $\text{card}(\inf(\text{range}\, f)^c) \leq \#\iota$ for ordinal families in the same universe
Informal description
For any function $f : \iota \to \text{Ordinal}$ from a type $\iota$ to ordinals in the same universe, the cardinality of the complement of the infimum of the range of $f$ is bounded above by the cardinality of $\iota$. That is: $$\text{card}(\inf(\text{range}\, f)^c) \leq \#\iota$$
Ordinal.sInf_compl_lt_lift_ord_succ theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : sInf (range f)ᶜ < lift.{v} (succ #ι).ord
Full source
theorem sInf_compl_lt_lift_ord_succ {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    sInf (range f)ᶜ < lift.{v} (succ ).ord := by
  rw [lift_ord, Cardinal.lift_succ, ← card_le_iff]
  exact card_sInf_range_compl_le_lift f
Strict Upper Bound for Complement of Infimum in Ordinal Families: $\inf(\text{range}\, f)^c < \text{lift}(\text{ord}(\text{succ}(\#\iota)))$
Informal description
For any function $f : \iota \to \text{Ordinal}$ from a type $\iota$ in universe $u$ to ordinals in universe $\max(u,v)$, the complement of the infimum of the range of $f$ is strictly less than the lift to universe $v$ of the smallest ordinal with cardinality equal to the successor of the cardinality of $\iota$. In symbols: $$\inf(\text{range}\, f)^c < \text{lift}_v(\text{ord}(\text{succ}(\#\iota)))$$
Ordinal.sup_eq_sup theorem
{ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [IsWellOrder ι r] [IsWellOrder ι' r'] {o : Ordinal.{u}} (ho : type r = o) (ho' : type r' = o) (f : ∀ a < o, Ordinal.{max u v}) : sup.{_, v} (familyOfBFamily' r ho f) = sup.{_, v} (familyOfBFamily' r' ho' f)
Full source
theorem sup_eq_sup {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [IsWellOrder ι r]
    [IsWellOrder ι' r'] {o : OrdinalOrdinal.{u}} (ho : type r = o) (ho' : type r' = o)
    (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    sup.{_, v} (familyOfBFamily' r ho f) = sup.{_, v} (familyOfBFamily' r' ho' f) :=
  sup_eq_of_range_eq.{u, u, v} (by simp)
Equality of Suprema for Ordinal-Indexed Families with Identical Order Types
Informal description
Let $\iota$ and $\iota'$ be types equipped with well-order relations $r$ and $r'$ respectively, both having the same order type $o$. Given a family of ordinals $f$ indexed by ordinals $a < o$, the suprema of the converted families $\text{familyOfBFamily}'\, r\, ho\, f$ and $\text{familyOfBFamily}'\, r'\, ho'\, f$ are equal. In symbols, if $\text{type } r = \text{type } r' = o$, then $$\sup (\text{familyOfBFamily}'\, r\, ho\, f) = \sup (\text{familyOfBFamily}'\, r'\, ho'\, f).$$
Ordinal.bsup definition
(o : Ordinal.{u}) (f : ∀ a < o, Ordinal.{max u v}) : Ordinal.{max u v}
Full source
/-- The supremum of a family of ordinals indexed by the set of ordinals less than some
    `o : Ordinal.{u}`. This is a special case of `sup` over the family provided by
    `familyOfBFamily`. -/
def bsup (o : OrdinalOrdinal.{u}) (f : ∀ a < o, OrdinalOrdinal.{max u v}) : OrdinalOrdinal.{max u v} :=
  sup.{_, v} (familyOfBFamily o f)
Bounded supremum of an ordinal-indexed family of ordinals
Informal description
For an ordinal $o$ and a family of ordinals $f$ indexed by ordinals $a < o$, the bounded supremum $\mathrm{bsup}\, o\, f$ is the supremum of the family obtained by converting $f$ into a family indexed by the canonical type associated with $o$. This is equivalent to taking the supremum of the original family $f$ directly.
Ordinal.sup_eq_bsup theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : sup.{_, v} (familyOfBFamily o f) = bsup.{_, v} o f
Full source
@[simp]
theorem sup_eq_bsup {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    sup.{_, v} (familyOfBFamily o f) = bsup.{_, v} o f :=
  rfl
Equality of Supremum and Bounded Supremum for Ordinal-Indexed Families
Informal description
For an ordinal $o$ and a family of ordinals $f$ indexed by ordinals $a < o$, the supremum of the family obtained by converting $f$ to a type-indexed family via the canonical type associated with $o$ is equal to the bounded supremum of $f$ over $o$. That is, \[ \sup_{i \in o.\mathrm{toType}} f(i) = \mathrm{bsup}_o f. \]
Ordinal.sup_eq_bsup' theorem
{o : Ordinal.{u}} {ι} (r : ι → ι → Prop) [IsWellOrder ι r] (ho : type r = o) (f : ∀ a < o, Ordinal.{max u v}) : sup.{_, v} (familyOfBFamily' r ho f) = bsup.{_, v} o f
Full source
@[simp]
theorem sup_eq_bsup' {o : OrdinalOrdinal.{u}} {ι} (r : ι → ι → Prop) [IsWellOrder ι r] (ho : type r = o)
    (f : ∀ a < o, OrdinalOrdinal.{max u v}) : sup.{_, v} (familyOfBFamily' r ho f) = bsup.{_, v} o f :=
  sup_eq_sup r _ ho _ f
Equality of Supremum and Bounded Supremum for Well-Ordered Families: $\sup_{\iota} f = \mathrm{bsup}_o f$
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$ whose order type is $o$. Given a family of ordinals $f$ indexed by ordinals $a < o$, the supremum of the family obtained by converting $f$ to a $\iota$-indexed family via $r$ is equal to the bounded supremum of $f$ over $o$. In symbols, if $\text{type}(r) = o$, then: $$\sup_{i \in \iota} f(\text{ord}(i)) = \mathrm{bsup}_o f$$ where $\text{ord}(i)$ is the ordinal corresponding to the initial segment of $i$ in $r$.
Ordinal.sSup_eq_bsup theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : sSup (brange o f) = bsup.{_, v} o f
Full source
theorem sSup_eq_bsup {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    sSup (brange o f) = bsup.{_, v} o f := by
  congr
  rw [range_familyOfBFamily]
Supremum of Bounded Range Equals Bounded Supremum for Ordinal-Indexed Families
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the supremum of the range of $f$ (denoted $\mathrm{brange}\, o\, f$) is equal to the bounded supremum $\mathrm{bsup}\, o\, f$. In symbols: $$\sup (\mathrm{brange}\, o\, f) = \mathrm{bsup}\, o\, f.$$
Ordinal.bsup_eq_sup' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → Ordinal.{max u v}) : bsup.{_, v} _ (bfamilyOfFamily' r f) = sup.{_, v} f
Full source
@[simp]
theorem bsup_eq_sup' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → OrdinalOrdinal.{max u v}) :
    bsup.{_, v} _ (bfamilyOfFamily' r f) = sup.{_, v} f := by
  simp +unfoldPartialApp only [← sup_eq_bsup' r, enum_typein,
    familyOfBFamily', bfamilyOfFamily']
Equality of Bounded Supremum and Supremum for Well-Ordered Families: $\mathrm{bsup}_o f = \sup f$
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$, and let $f : \iota \to \text{Ordinal}$ be a family of ordinals. The bounded supremum of the family obtained by converting $f$ to an ordinal-indexed family via $r$ is equal to the supremum of $f$. In symbols: $$\mathrm{bsup}_o (f \circ \mathrm{enum}\, r) = \sup f$$ where $o$ is the order type of $r$ and $\mathrm{enum}\, r$ is the enumeration of $\iota$ by ordinals less than $o$.
Ordinal.bsup_eq_bsup theorem
{ι : Type u} (r r' : ι → ι → Prop) [IsWellOrder ι r] [IsWellOrder ι r'] (f : ι → Ordinal.{max u v}) : bsup.{_, v} _ (bfamilyOfFamily' r f) = bsup.{_, v} _ (bfamilyOfFamily' r' f)
Full source
theorem bsup_eq_bsup {ι : Type u} (r r' : ι → ι → Prop) [IsWellOrder ι r] [IsWellOrder ι r']
    (f : ι → OrdinalOrdinal.{max u v}) :
    bsup.{_, v} _ (bfamilyOfFamily' r f) = bsup.{_, v} _ (bfamilyOfFamily' r' f) := by
  rw [bsup_eq_sup', bsup_eq_sup']
Invariance of Bounded Supremum under Change of Well-Order: $\mathrm{bsup}_r f = \mathrm{bsup}_{r'} f$
Informal description
Let $\iota$ be a type equipped with two well-order relations $r$ and $r'$, and let $f : \iota \to \text{Ordinal}$ be a family of ordinals. The bounded supremum of the family obtained by converting $f$ to an ordinal-indexed family via $r$ is equal to the bounded supremum obtained by converting $f$ via $r'$. In symbols: $$\mathrm{bsup}_o (f \circ \mathrm{enum}\, r) = \mathrm{bsup}_{o'} (f \circ \mathrm{enum}\, r')$$ where $o$ and $o'$ are the order types of $r$ and $r'$ respectively, and $\mathrm{enum}\, r$, $\mathrm{enum}\, r'$ are the enumerations of $\iota$ by ordinals less than $o$ and $o'$ respectively.
Ordinal.bsup_eq_sup theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : bsup.{_, v} _ (bfamilyOfFamily f) = sup.{_, v} f
Full source
@[simp]
theorem bsup_eq_sup {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    bsup.{_, v} _ (bfamilyOfFamily f) = sup.{_, v} f :=
  bsup_eq_sup' _ f
Equality of Bounded Supremum and Supremum for Ordinal Families: $\mathrm{bsup}_o f = \sup f$
Informal description
For any type $\iota$ and any family of ordinals $f \colon \iota \to \text{Ordinal}$, the bounded supremum of the ordinal-indexed family obtained from $f$ via the well-ordering relation on $\iota$ is equal to the supremum of $f$. In symbols: $$\mathrm{bsup}_o (f \circ \mathrm{enum}) = \sup f$$ where $o$ is the order type of $\iota$ under its well-ordering relation, and $\mathrm{enum}$ is the enumeration of $\iota$ by ordinals less than $o$.
Ordinal.bsup_congr theorem
{o₁ o₂ : Ordinal.{u}} (f : ∀ a < o₁, Ordinal.{max u v}) (ho : o₁ = o₂) : bsup.{_, v} o₁ f = bsup.{_, v} o₂ fun a h => f a (h.trans_eq ho.symm)
Full source
@[congr]
theorem bsup_congr {o₁ o₂ : OrdinalOrdinal.{u}} (f : ∀ a < o₁, OrdinalOrdinal.{max u v}) (ho : o₁ = o₂) :
    bsup.{_, v} o₁ f = bsup.{_, v} o₂ fun a h => f a (h.trans_eq ho.symm) := by
  subst ho
  -- Porting note: `rfl` is required.
  rfl
Bounded Supremum Invariance under Ordinal Equality
Informal description
For any two ordinals $o_1$ and $o_2$ in universe $u$, and any family of ordinals $f$ indexed by ordinals $a < o_1$ (with values in universe $\max(u, v)$), if $o_1 = o_2$, then the bounded supremum of $f$ over $o_1$ is equal to the bounded supremum of the family obtained by composing $f$ with the equality proof over $o_2$. More precisely, if $o_1 = o_2$, then: $$\mathrm{bsup}_{u,v}\, o_1\, f = \mathrm{bsup}_{u,v}\, o_2\, \big(\lambda (a : o_2) (h : a < o_2), f\, a\, (h \circ \mathrm{ho.symm})\big)$$ where $\mathrm{ho.symm}$ is the symmetry of the equality $o_1 = o_2$.
Ordinal.bsup_le_iff theorem
{o f a} : bsup.{u, v} o f ≤ a ↔ ∀ i h, f i h ≤ a
Full source
theorem bsup_le_iff {o f a} : bsupbsup.{u, v} o f ≤ a ↔ ∀ i h, f i h ≤ a :=
  sup_le_iff.trans
    ⟨fun h i hi => by
      rw [← familyOfBFamily_enum o f]
      exact h _, fun h _ => h _ _⟩
Bounded Supremum Bound Characterization: $\mathrm{bsup}\, o\, f \leq a \leftrightarrow \forall i < o, f(i) \leq a$
Informal description
For an ordinal $o$, a family of ordinals $f$ indexed by ordinals $i < o$, and an ordinal $a$, the bounded supremum $\mathrm{bsup}\, o\, f$ satisfies $\mathrm{bsup}\, o\, f \leq a$ if and only if $f(i, h) \leq a$ for every $i < o$ and proof $h$ of $i < o$.
Ordinal.bsup_le theorem
{o : Ordinal} {f : ∀ b < o, Ordinal} {a} : (∀ i h, f i h ≤ a) → bsup.{u, v} o f ≤ a
Full source
theorem bsup_le {o : Ordinal} {f : ∀ b < o, Ordinal} {a} :
    (∀ i h, f i h ≤ a) → bsup.{u, v} o f ≤ a :=
  bsup_le_iff.2
Bounded Supremum Upper Bound: $\mathrm{bsup}\, o\, f \leq a$ under pointwise bounds
Informal description
For any ordinal $o$, any family of ordinals $f$ indexed by ordinals $b < o$, and any ordinal $a$, if $f(i, h) \leq a$ for every $i < o$ and proof $h$ of $i < o$, then the bounded supremum $\mathrm{bsup}\, o\, f$ satisfies $\mathrm{bsup}\, o\, f \leq a$.
Ordinal.le_bsup theorem
{o} (f : ∀ a < o, Ordinal) (i h) : f i h ≤ bsup o f
Full source
theorem le_bsup {o} (f : ∀ a < o, Ordinal) (i h) : f i h ≤ bsup o f :=
  bsup_le_iff.1 le_rfl _ _
Members of Ordinal Family Bounded by Their Bounded Supremum
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, each member of the family is bounded above by the bounded supremum, i.e., for every $i < o$ and proof $h$ of $i < o$, we have $f(i, h) \leq \mathrm{bsup}\, o\, f$.
Ordinal.lt_bsup theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) {a} : a < bsup.{_, v} o f ↔ ∃ i hi, a < f i hi
Full source
theorem lt_bsup {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) {a} :
    a < bsup.{_, v} o f ↔ ∃ i hi, a < f i hi := by
  simpa only [not_forall, not_le] using not_congr (@bsup_le_iff.{_, v} _ f a)
Characterization of Elements Below Bounded Supremum: $a < \mathrm{bsup}\, o\, f \leftrightarrow \exists i < o, a < f(i)$
Informal description
For an ordinal $o$ and a family of ordinals $f$ indexed by ordinals $a < o$, an ordinal $a$ satisfies $a < \mathrm{bsup}\, o\, f$ if and only if there exists an ordinal $i < o$ such that $a < f(i)$.
Ordinal.IsNormal.bsup theorem
{f : Ordinal.{max u v} → Ordinal.{max u w}} (H : IsNormal f) {o : Ordinal.{u}} : ∀ (g : ∀ a < o, Ordinal), o ≠ 0 → f (bsup.{_, v} o g) = bsup.{_, w} o fun a h => f (g a h)
Full source
theorem IsNormal.bsup {f : OrdinalOrdinal.{max u v}OrdinalOrdinal.{max u w}} (H : IsNormal f)
    {o : OrdinalOrdinal.{u}} :
    ∀ (g : ∀ a < o, Ordinal), o ≠ 0 → f (bsup.{_, v} o g) = bsup.{_, w} o fun a h => f (g a h) :=
  inductionOn o fun α r _ g h => by
    haveI := type_ne_zero_iff_nonempty.1 h
    rw [← sup_eq_bsup' r, IsNormal.sup.{_, v, w} H, ← sup_eq_bsup' r] <;> rfl
Normal Functions Preserve Bounded Suprema: $f(\mathrm{bsup}_o g) = \mathrm{bsup}_o (f \circ g)$
Informal description
Let $f$ be a normal function from ordinals to ordinals (i.e., strictly increasing and continuous at limit ordinals). For any nonzero ordinal $o$ and any family of ordinals $g$ indexed by ordinals $a < o$, the function $f$ preserves the bounded supremum: \[ f\left(\mathrm{bsup}_o g\right) = \mathrm{bsup}_o \left(f \circ g\right). \]
Ordinal.lt_bsup_of_ne_bsup theorem
{o : Ordinal.{u}} {f : ∀ a < o, Ordinal.{max u v}} : (∀ i h, f i h ≠ bsup.{_, v} o f) ↔ ∀ i h, f i h < bsup.{_, v} o f
Full source
theorem lt_bsup_of_ne_bsup {o : OrdinalOrdinal.{u}} {f : ∀ a < o, OrdinalOrdinal.{max u v}} :
    (∀ i h, f i h ≠ bsup.{_, v} o f) ↔ ∀ i h, f i h < bsup.{_, v} o f :=
  ⟨fun hf _ _ => lt_of_le_of_ne (le_bsup _ _ _) (hf _ _), fun hf _ _ => ne_of_lt (hf _ _)⟩
Characterization of Strict Inequality with Bounded Supremum: $f(i) \neq \mathrm{bsup}_o f \leftrightarrow f(i) < \mathrm{bsup}_o f$
Informal description
For an ordinal $o$ and a family of ordinals $f$ indexed by ordinals $a < o$, the following are equivalent: 1. For every $i < o$ and proof $h$ of $i < o$, $f(i, h) \neq \mathrm{bsup}_o f$. 2. For every $i < o$ and proof $h$ of $i < o$, $f(i, h) < \mathrm{bsup}_o f$.
Ordinal.bsup_not_succ_of_ne_bsup theorem
{o : Ordinal.{u}} {f : ∀ a < o, Ordinal.{max u v}} (hf : ∀ {i : Ordinal} (h : i < o), f i h ≠ bsup.{_, v} o f) (a) : a < bsup.{_, v} o f → succ a < bsup.{_, v} o f
Full source
theorem bsup_not_succ_of_ne_bsup {o : OrdinalOrdinal.{u}} {f : ∀ a < o, OrdinalOrdinal.{max u v}}
    (hf : ∀ {i : Ordinal} (h : i < o), f i h ≠ bsup.{_, v} o f) (a) :
    a < bsup.{_, v} o f → succ a < bsup.{_, v} o f := by
  rw [← sup_eq_bsup] at *
  exact sup_not_succ_of_ne_sup fun i => hf _
Successor Below Bounded Supremum for Non-Constant Ordinal Families
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, if $f(i, h) \neq \mathrm{bsup}_o f$ for all $i < o$ and $h$, then for any ordinal $a < \mathrm{bsup}_o f$, the successor ordinal $\mathrm{succ}\, a$ is also strictly less than $\mathrm{bsup}_o f$.
Ordinal.bsup_eq_zero_iff theorem
{o} {f : ∀ a < o, Ordinal} : bsup o f = 0 ↔ ∀ i hi, f i hi = 0
Full source
@[simp]
theorem bsup_eq_zero_iff {o} {f : ∀ a < o, Ordinal} : bsupbsup o f = 0 ↔ ∀ i hi, f i hi = 0 := by
  refine
    ⟨fun h i hi => ?_, fun h =>
      le_antisymm (bsup_le fun i hi => Ordinal.le_zero.2 (h i hi)) (Ordinal.zero_le _)⟩
  rw [← Ordinal.le_zero, ← h]
  exact le_bsup f i hi
Characterization of Zero Bounded Supremum: $\mathrm{bsup}\, o\, f = 0 \leftrightarrow \forall i < o, f(i) = 0$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the bounded supremum $\mathrm{bsup}\, o\, f$ equals $0$ if and only if $f(i, h) = 0$ for every $i < o$ and proof $h$ of $i < o$.
Ordinal.lt_bsup_of_limit theorem
{o : Ordinal} {f : ∀ a < o, Ordinal} (hf : ∀ {a a'} (ha : a < o) (ha' : a' < o), a < a' → f a ha < f a' ha') (ho : ∀ a < o, succ a < o) (i h) : f i h < bsup o f
Full source
theorem lt_bsup_of_limit {o : Ordinal} {f : ∀ a < o, Ordinal}
    (hf : ∀ {a a'} (ha : a < o) (ha' : a' < o), a < a' → f a ha < f a' ha')
    (ho : ∀ a < o, succ a < o) (i h) : f i h < bsup o f :=
  (hf _ _ <| lt_succ i).trans_le (le_bsup f (succ i) <| ho _ h)
Members of Strictly Increasing Ordinal Family Below Bounded Supremum at Limit Ordinal
Informal description
Let $o$ be an ordinal and $f$ a strictly increasing family of ordinals indexed by ordinals $a < o$. If $o$ is a limit ordinal (i.e., for every $a < o$, $\mathrm{succ}\, a < o$), then for every $i < o$ and proof $h$ of $i < o$, the ordinal $f(i, h)$ is strictly less than the bounded supremum $\mathrm{bsup}_o f$.
Ordinal.bsup_succ_of_mono theorem
{o : Ordinal} {f : ∀ a < succ o, Ordinal} (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : bsup _ f = f o (lt_succ o)
Full source
theorem bsup_succ_of_mono {o : Ordinal} {f : ∀ a < succ o, Ordinal}
    (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : bsup _ f = f o (lt_succ o) :=
  le_antisymm (bsup_le fun _i hi => hf _ _ <| le_of_lt_succ hi) (le_bsup _ _ _)
Bounded Supremum of Monotonic Family at Successor Ordinal: $\mathrm{bsup}\, (\text{succ}\, o)\, f = f(o)$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < \text{succ}(o)$, if $f$ is monotonic (i.e., $i \leq j$ implies $f(i, h_i) \leq f(j, h_j)$ for any $i,j < \text{succ}(o)$ and proofs $h_i, h_j$ of their bounds), then the bounded supremum of $f$ is equal to $f(o, h)$, where $h$ is a proof that $o < \text{succ}(o)$.
Ordinal.bsup_zero theorem
(f : ∀ a < (0 : Ordinal), Ordinal) : bsup 0 f = 0
Full source
@[simp]
theorem bsup_zero (f : ∀ a < (0 : Ordinal), Ordinal) : bsup 0 f = 0 :=
  bsup_eq_zero_iff.2 fun i hi => (Ordinal.not_lt_zero i hi).elim
Bounded supremum of empty family is zero: $\mathrm{bsup}\, 0\, f = 0$
Informal description
For any family of ordinals $f$ indexed by ordinals $a < 0$, the bounded supremum $\mathrm{bsup}\, 0\, f$ equals $0$.
Ordinal.bsup_const theorem
{o : Ordinal.{u}} (ho : o ≠ 0) (a : Ordinal.{max u v}) : (bsup.{_, v} o fun _ _ => a) = a
Full source
theorem bsup_const {o : OrdinalOrdinal.{u}} (ho : o ≠ 0) (a : OrdinalOrdinal.{max u v}) :
    (bsup.{_, v} o fun _ _ => a) = a :=
  le_antisymm (bsup_le fun _ _ => le_rfl) (le_bsup _ 0 (Ordinal.pos_iff_ne_zero.2 ho))
Bounded Supremum of Constant Family: $\mathrm{bsup}\, o\, (\lambda b \,_.\, a) = a$ for $o \neq 0$
Informal description
For any nonzero ordinal $o$ and any ordinal $a$, the bounded supremum of the constant family that maps every ordinal $b < o$ to $a$ is equal to $a$. That is, $\mathrm{bsup}\, o\, (\lambda b \,_.\, a) = a$.
Ordinal.bsup_one theorem
(f : ∀ a < (1 : Ordinal), Ordinal) : bsup 1 f = f 0 zero_lt_one
Full source
@[simp]
theorem bsup_one (f : ∀ a < (1 : Ordinal), Ordinal) : bsup 1 f = f 0 zero_lt_one := by
  simp_rw [← sup_eq_bsup, sup_unique, familyOfBFamily, familyOfBFamily', typein_one_toType]
Bounded supremum of a family indexed below 1 equals its value at 0
Informal description
For any family of ordinals $f$ indexed by ordinals $a < 1$, the bounded supremum $\mathrm{bsup}\, 1\, f$ equals $f(0)$, where $0$ is the unique ordinal less than $1$ (and $\mathrm{zero\_lt\_one}$ is the proof that $0 < 1$).
Ordinal.bsup_le_of_brange_subset theorem
{o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal} (h : brange o f ⊆ brange o' g) : bsup.{u, max v w} o f ≤ bsup.{v, max u w} o' g
Full source
theorem bsup_le_of_brange_subset {o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal}
    (h : brangebrange o f ⊆ brange o' g) : bsup.{u, max v w} o f ≤ bsup.{v, max u w} o' g :=
  bsup_le fun i hi => by
    obtain ⟨j, hj, hj'⟩ := h ⟨i, hi, rfl⟩
    rw [← hj']
    apply le_bsup
Bounded Supremum Monotonicity under Range Inclusion: $\text{brange}\, f \subseteq \text{brange}\, g \Rightarrow \mathrm{bsup}\, f \leq \mathrm{bsup}\, g$
Informal description
For any ordinals $o$ and $o'$, and families of ordinals $f$ indexed by $a < o$ and $g$ indexed by $a < o'$, if the range of $f$ is a subset of the range of $g$ (i.e., $\text{brange}\, o\, f \subseteq \text{brange}\, o'\, g$), then the bounded supremum of $f$ is less than or equal to the bounded supremum of $g$: $$\mathrm{bsup}\, o\, f \leq \mathrm{bsup}\, o'\, g.$$
Ordinal.bsup_eq_of_brange_eq theorem
{o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal} (h : brange o f = brange o' g) : bsup.{u, max v w} o f = bsup.{v, max u w} o' g
Full source
theorem bsup_eq_of_brange_eq {o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal}
    (h : brange o f = brange o' g) : bsup.{u, max v w} o f = bsup.{v, max u w} o' g :=
  (bsup_le_of_brange_subset.{u, v, w} h.le).antisymm (bsup_le_of_brange_subset.{v, u, w} h.ge)
Bounded Supremum Equality under Range Equality: $\text{brange}\, f = \text{brange}\, g \Rightarrow \mathrm{bsup}\, f = \mathrm{bsup}\, g$
Informal description
For any ordinals $o$ and $o'$, and families of ordinals $f$ indexed by $a < o$ and $g$ indexed by $a < o'$, if the range of $f$ equals the range of $g$ (i.e., $\text{brange}\, o\, f = \text{brange}\, o'\, g$), then the bounded supremum of $f$ equals the bounded supremum of $g$: $$\mathrm{bsup}\, o\, f = \mathrm{bsup}\, o'\, g.$$
Ordinal.iSup_eq_bsup theorem
{o} {f : ∀ a < o, Ordinal} : ⨆ a : Iio o, f a.1 a.2 = bsup o f
Full source
theorem iSup_eq_bsup {o} {f : ∀ a < o, Ordinal} : ⨆ a : Iio o, f a.1 a.2 = bsup o f := by
  simp_rw [Iio, bsup, sup, iSup, range_familyOfBFamily, brange, range, Subtype.exists, mem_setOf]
Supremum Equals Bounded Supremum for Ordinal-Indexed Families
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the supremum of the family $\{f(a, h_a) \mid a < o\}$ (where $h_a$ is a proof that $a < o$) is equal to the bounded supremum $\mathrm{bsup}\, o\, f$. In symbols: $$\bigsqcup_{a < o} f(a, h_a) = \mathrm{bsup}\, o\, f.$$
Ordinal.lsub definition
{ι} (f : ι → Ordinal) : Ordinal
Full source
/-- The least strict upper bound of a family of ordinals. -/
def lsub {ι} (f : ι → Ordinal) : Ordinal :=
  sup (succsucc ∘ f)
Least strict upper bound of a family of ordinals
Informal description
The least strict upper bound of a family of ordinals indexed by a type $\iota$ is the smallest ordinal that is strictly greater than every ordinal in the family. Given a function $f : \iota \to \text{Ordinal}$, the least strict upper bound $\text{lsub}\, f$ is defined as the supremum of the successor ordinals of each $f(i)$, ensuring that $\text{lsub}\, f$ is the minimal ordinal $\alpha$ such that $f(i) < \alpha$ for all $i \in \iota$.
Ordinal.sup_eq_lsub theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : sup.{_, v} (succ ∘ f) = lsub.{_, v} f
Full source
@[simp]
theorem sup_eq_lsub {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    sup.{_, v} (succsucc ∘ f) = lsub.{_, v} f :=
  rfl
Supremum of Successors Equals Least Strict Upper Bound
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the supremum of the successor ordinals $\{\mathrm{succ}(f(i))\}_{i \in \iota}$ is equal to the least strict upper bound of the family $\{f(i)\}_{i \in \iota}$.
Ordinal.lsub_le_iff theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} {a} : lsub.{_, v} f ≤ a ↔ ∀ i, f i < a
Full source
theorem lsub_le_iff {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}} {a} :
    lsublsub.{_, v} f ≤ a ↔ ∀ i, f i < a := by
  convert sup_le_iff.{_, v} (f := succsucc ∘ f) (a := a) using 2
  -- Porting note: `comp_apply` is required.
  simp only [comp_apply, succ_le_iff]
Least Strict Upper Bound Characterization: $\mathrm{lsub}\, f \leq a \leftrightarrow \forall i, f(i) < a$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$ and any ordinal $a$, the least strict upper bound $\mathrm{lsub}\, f$ satisfies $\mathrm{lsub}\, f \leq a$ if and only if $f(i) < a$ for all $i \in \iota$.
Ordinal.lsub_le theorem
{ι} {f : ι → Ordinal} {a} : (∀ i, f i < a) → lsub f ≤ a
Full source
theorem lsub_le {ι} {f : ι → Ordinal} {a} : (∀ i, f i < a) → lsub f ≤ a :=
  lsub_le_iff.2
Least Strict Upper Bound Property: $\forall i, f(i) < a \Rightarrow \mathrm{lsub}\, f \leq a$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$ and any ordinal $a$, if $f(i) < a$ holds for all $i \in \iota$, then the least strict upper bound $\mathrm{lsub}\, f$ satisfies $\mathrm{lsub}\, f \leq a$.
Ordinal.lt_lsub theorem
{ι} (f : ι → Ordinal) (i) : f i < lsub f
Full source
theorem lt_lsub {ι} (f : ι → Ordinal) (i) : f i < lsub f :=
  succ_le_iff.1 (le_sup _ i)
Element-wise Strict Bound by Least Strict Upper Bound for Ordinal Families
Informal description
For any family of ordinals indexed by a type $\iota$, the value $f(i)$ at any index $i \in \iota$ is strictly less than the least strict upper bound $\mathrm{lsub}\, f$ of the family. In symbols: \[ \forall i \in \iota, \quad f(i) < \mathrm{lsub}\, f. \]
Ordinal.lt_lsub_iff theorem
{ι : Type u} {f : ι → Ordinal.{max u v}} {a} : a < lsub.{_, v} f ↔ ∃ i, a ≤ f i
Full source
theorem lt_lsub_iff {ι : Type u} {f : ι → OrdinalOrdinal.{max u v}} {a} :
    a < lsub.{_, v} f ↔ ∃ i, a ≤ f i := by
  simpa only [not_forall, not_lt, not_le] using not_congr (@lsub_le_iff.{_, v} _ f a)
Characterization of Elements Below the Least Strict Upper Bound of an Ordinal Family: $a < \mathrm{lsub}\, f \leftrightarrow \exists i, a \leq f(i)$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$ and any ordinal $a$, the inequality $a < \mathrm{lsub}\, f$ holds if and only if there exists an index $i \in \iota$ such that $a \leq f(i)$.
Ordinal.sup_le_lsub theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : sup.{_, v} f ≤ lsub.{_, v} f
Full source
theorem sup_le_lsub {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) : sup.{_, v} f ≤ lsub.{_, v} f :=
  sup_le fun i => (lt_lsub f i).le
Supremum Bounded by Least Strict Upper Bound for Ordinal Families
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the supremum of the family is less than or equal to its least strict upper bound. In symbols: \[ \sup f \leq \mathrm{lsub}\, f. \]
Ordinal.lsub_le_sup_succ theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : lsub.{_, v} f ≤ succ (sup.{_, v} f)
Full source
theorem lsub_le_sup_succ {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    lsub.{_, v} f ≤ succ (sup.{_, v} f) :=
  lsub_le fun i => lt_succ_iff.2 (le_sup f i)
Least Strict Upper Bound Bounded by Successor of Supremum for Ordinal Families
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the least strict upper bound $\mathrm{lsub}\, f$ is less than or equal to the successor of the supremum $\sup f$. In symbols: \[ \mathrm{lsub}\, f \leq \mathrm{succ}(\sup f). \]
Ordinal.sup_eq_lsub_or_sup_succ_eq_lsub theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : sup.{_, v} f = lsub.{_, v} f ∨ succ (sup.{_, v} f) = lsub.{_, v} f
Full source
theorem sup_eq_lsub_or_sup_succ_eq_lsub {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    supsup.{_, v} f = lsub.{_, v} f ∨ succ (sup.{_, v} f) = lsub.{_, v} f := by
  rcases eq_or_lt_of_le (sup_le_lsub.{_, v} f) with h | h
  · exact Or.inl h
  · exact Or.inr ((succ_le_of_lt h).antisymm (lsub_le_sup_succ f))
Supremum and Least Strict Upper Bound Relation for Ordinal Families: $\sup f = \mathrm{lsub}\, f$ or $\mathrm{succ}(\sup f) = \mathrm{lsub}\, f$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, either the supremum $\sup f$ equals the least strict upper bound $\mathrm{lsub}\, f$, or the successor of the supremum equals the least strict upper bound. In symbols: \[ \sup f = \mathrm{lsub}\, f \quad \text{or} \quad \mathrm{succ}(\sup f) = \mathrm{lsub}\, f. \]
Ordinal.sup_succ_le_lsub theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : succ (sup.{_, v} f) ≤ lsub.{_, v} f ↔ ∃ i, f i = sup.{_, v} f
Full source
theorem sup_succ_le_lsub {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    succsucc (sup.{_, v} f) ≤ lsub.{_, v} f ↔ ∃ i, f i = sup.{_, v} f := by
  refine ⟨fun h => ?_, ?_⟩
  · by_contra! hf
    exact (succ_le_iff.1 h).ne ((sup_le_lsub f).antisymm (lsub_le (ne_sup_iff_lt_sup.1 hf)))
  rintro ⟨_, hf⟩
  rw [succ_le_iff, ← hf]
  exact lt_lsub _ _
Successor-Supremum Relation for Ordinal Families: $\mathrm{succ}(\sup f) \leq \mathrm{lsub}\, f \leftrightarrow \exists i, f(i) = \sup f$
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the successor of the supremum $\mathrm{sup}\, f$ is less than or equal to the least strict upper bound $\mathrm{lsub}\, f$ if and only if there exists an index $i \in \iota$ such that $f(i) = \mathrm{sup}\, f$. In symbols: \[ \mathrm{succ}(\mathrm{sup}\, f) \leq \mathrm{lsub}\, f \leftrightarrow \exists i, f(i) = \mathrm{sup}\, f. \]
Ordinal.sup_succ_eq_lsub theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : succ (sup.{_, v} f) = lsub.{_, v} f ↔ ∃ i, f i = sup.{_, v} f
Full source
theorem sup_succ_eq_lsub {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    succsucc (sup.{_, v} f) = lsub.{_, v} f ↔ ∃ i, f i = sup.{_, v} f :=
  (lsub_le_sup_succ f).le_iff_eq.symm.trans (sup_succ_le_lsub f)
Successor-Supremum Equals Least Strict Upper Bound Condition for Ordinal Families
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the successor of the supremum $\mathrm{sup}\, f$ equals the least strict upper bound $\mathrm{lsub}\, f$ if and only if there exists an index $i \in \iota$ such that $f(i) = \mathrm{sup}\, f$. In symbols: \[ \mathrm{succ}(\mathrm{sup}\, f) = \mathrm{lsub}\, f \leftrightarrow \exists i, f(i) = \mathrm{sup}\, f. \]
Ordinal.sup_eq_lsub_iff_succ theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : sup.{_, v} f = lsub.{_, v} f ↔ ∀ a < lsub.{_, v} f, succ a < lsub.{_, v} f
Full source
theorem sup_eq_lsub_iff_succ {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    supsup.{_, v} f = lsub.{_, v} f ↔ ∀ a < lsub.{_, v} f, succ a < lsub.{_, v} f := by
  refine ⟨fun h => ?_, fun hf => le_antisymm (sup_le_lsub f) (lsub_le fun i => ?_)⟩
  · rw [← h]
    exact fun a => sup_not_succ_of_ne_sup fun i => (lsub_le_iff.1 (le_of_eq h.symm) i).ne
  by_contra! hle
  have heq := (sup_succ_eq_lsub f).2 ⟨i, le_antisymm (le_sup _ _) hle⟩
  have :=
    hf _
      (by
        rw [← heq]
        exact lt_succ (sup f))
  rw [heq] at this
  exact this.false
Supremum Equals Least Strict Upper Bound if and only if Successors are Below for All Smaller Ordinals
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the supremum $\sup f$ equals the least strict upper bound $\mathrm{lsub}\, f$ if and only if for every ordinal $a < \mathrm{lsub}\, f$, the successor ordinal $\mathrm{succ}\, a$ is also strictly less than $\mathrm{lsub}\, f$.
Ordinal.sup_eq_lsub_iff_lt_sup theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : sup.{_, v} f = lsub.{_, v} f ↔ ∀ i, f i < sup.{_, v} f
Full source
theorem sup_eq_lsub_iff_lt_sup {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    supsup.{_, v} f = lsub.{_, v} f ↔ ∀ i, f i < sup.{_, v} f :=
  ⟨fun h i => by
    rw [h]
    apply lt_lsub, fun h => le_antisymm (sup_le_lsub f) (lsub_le h)⟩
Supremum Equals Least Strict Upper Bound if and only if All Elements are Strictly Below Supremum
Informal description
For any family of ordinals $\{f(i)\}_{i \in \iota}$ indexed by a type $\iota$, the supremum $\sup f$ equals the least strict upper bound $\mathrm{lsub}\, f$ if and only if every ordinal in the family is strictly less than the supremum, i.e., $f(i) < \sup f$ for all $i \in \iota$.
Ordinal.lsub_empty theorem
{ι} [h : IsEmpty ι] (f : ι → Ordinal) : lsub f = 0
Full source
@[simp]
theorem lsub_empty {ι} [h : IsEmpty ι] (f : ι → Ordinal) : lsub f = 0 := by
  rw [← Ordinal.le_zero, lsub_le_iff]
  exact h.elim
Least Strict Upper Bound of Empty Family is Zero
Informal description
For any type $\iota$ that is empty (i.e., `IsEmpty ι` holds) and any function $f : \iota \to \text{Ordinal}$, the least strict upper bound $\mathrm{lsub}\, f$ is equal to the zero ordinal $0$.
Ordinal.lsub_pos theorem
{ι : Type u} [h : Nonempty ι] (f : ι → Ordinal.{max u v}) : 0 < lsub.{_, v} f
Full source
theorem lsub_pos {ι : Type u} [h : Nonempty ι] (f : ι → OrdinalOrdinal.{max u v}) : 0 < lsub.{_, v} f :=
  h.elim fun i => (Ordinal.zero_le _).trans_lt (lt_lsub f i)
Positivity of the Least Strict Upper Bound for Nonempty Ordinal Families
Informal description
For any nonempty type $\iota$ and any family of ordinals $f : \iota \to \text{Ordinal}$, the least strict upper bound $\mathrm{lsub}\, f$ is strictly greater than the zero ordinal $0$.
Ordinal.lsub_eq_zero_iff theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : lsub.{_, v} f = 0 ↔ IsEmpty ι
Full source
@[simp]
theorem lsub_eq_zero_iff {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    lsublsub.{_, v} f = 0 ↔ IsEmpty ι := by
  refine ⟨fun h => ⟨fun i => ?_⟩, fun h => @lsub_empty _ h _⟩
  have := @lsub_pos.{_, v} _ ⟨i⟩ f
  rw [h] at this
  exact this.false
Least Strict Upper Bound is Zero iff Index Type is Empty
Informal description
For any type $\iota$ and any family of ordinals $f : \iota \to \text{Ordinal}$, the least strict upper bound $\mathrm{lsub}\, f$ is equal to the zero ordinal $0$ if and only if the type $\iota$ is empty.
Ordinal.lsub_const theorem
{ι} [Nonempty ι] (o : Ordinal) : (lsub fun _ : ι => o) = succ o
Full source
@[simp]
theorem lsub_const {ι} [Nonempty ι] (o : Ordinal) : (lsub fun _ : ι => o) = succ o :=
  sup_const (succ o)
Least Strict Upper Bound of a Constant Ordinal Family is its Successor
Informal description
For any nonempty type $\iota$ and any ordinal $o$, the least strict upper bound of the constant function $f(i) = o$ over $\iota$ is equal to the successor ordinal of $o$, i.e., $\text{lsub}_{i \in \iota} o = \text{succ}(o)$.
Ordinal.lsub_unique theorem
{ι} [Unique ι] (f : ι → Ordinal) : lsub f = succ (f default)
Full source
@[simp]
theorem lsub_unique {ι} [Unique ι] (f : ι → Ordinal) : lsub f = succ (f default) :=
  sup_unique _
Least Strict Upper Bound of a Family over a Unique Type is Successor of Default Value
Informal description
For any family of ordinals $f : \iota \to \text{Ordinal}$ indexed by a unique type $\iota$ (i.e., a type with exactly one element), the least strict upper bound $\text{lsub}\, f$ is equal to the successor of $f(\text{default})$, where $\text{default}$ is the unique element of $\iota$.
Ordinal.lsub_le_of_range_subset theorem
{ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal} (h : Set.range f ⊆ Set.range g) : lsub.{u, max v w} f ≤ lsub.{v, max u w} g
Full source
theorem lsub_le_of_range_subset {ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal}
    (h : Set.rangeSet.range f ⊆ Set.range g) : lsub.{u, max v w} f ≤ lsub.{v, max u w} g :=
  sup_le_of_range_subset.{u, v, w} (by convert Set.image_subset succ h <;> apply Set.range_comp)
Least Strict Upper Bound Inequality under Range Inclusion
Informal description
For any two families of ordinals $f : \iota \to \text{Ordinal}$ and $g : \iota' \to \text{Ordinal}$, if the range of $f$ is contained in the range of $g$ (i.e., $\{f(i) \mid i \in \iota\} \subseteq \{g(j) \mid j \in \iota'\}$), then the least strict upper bound of $f$ is less than or equal to the least strict upper bound of $g$, i.e., $\text{lsub}\, f \leq \text{lsub}\, g$.
Ordinal.lsub_eq_of_range_eq theorem
{ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal} (h : Set.range f = Set.range g) : lsub.{u, max v w} f = lsub.{v, max u w} g
Full source
theorem lsub_eq_of_range_eq {ι ι'} {f : ι → Ordinal} {g : ι' → Ordinal}
    (h : Set.range f = Set.range g) : lsub.{u, max v w} f = lsub.{v, max u w} g :=
  (lsub_le_of_range_subset.{u, v, w} h.le).antisymm (lsub_le_of_range_subset.{v, u, w} h.ge)
Least Strict Upper Bound Equality under Range Equality
Informal description
For any two families of ordinals $f : \iota \to \text{Ordinal}$ and $g : \iota' \to \text{Ordinal}$, if the ranges of $f$ and $g$ are equal (i.e., $\{f(i) \mid i \in \iota\} = \{g(j) \mid j \in \iota'\}$), then the least strict upper bounds of $f$ and $g$ are equal, i.e., $\text{lsub}\, f = \text{lsub}\, g$.
Ordinal.lsub_sum theorem
{α : Type u} {β : Type v} (f : α ⊕ β → Ordinal) : lsub.{max u v, w} f = max (lsub.{u, max v w} fun a => f (Sum.inl a)) (lsub.{v, max u w} fun b => f (Sum.inr b))
Full source
@[simp]
theorem lsub_sum {α : Type u} {β : Type v} (f : α ⊕ βOrdinal) :
    lsub.{max u v, w} f =
      max (lsub.{u, max v w} fun a => f (Sum.inl a)) (lsub.{v, max u w} fun b => f (Sum.inr b)) :=
  sup_sum _
Decomposition of Least Strict Upper Bound over Sum Types: $\text{lsub}\, f = \max(\text{lsub}\, f|_\alpha, \text{lsub}\, f|_\beta)$
Informal description
For any types $\alpha$ and $\beta$, and any function $f : \alpha \oplus \beta \to \text{Ordinal}$, the least strict upper bound of $f$ is equal to the maximum of the least strict upper bounds of $f$ restricted to $\alpha$ and $\beta$. That is, \[ \text{lsub}\, f = \max \left( \text{lsub}_{a \in \alpha} f(\text{inl}\, a), \text{lsub}_{b \in \beta} f(\text{inr}\, b) \right). \]
Ordinal.lsub_not_mem_range theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : lsub.{_, v} f ∉ Set.range f
Full source
theorem lsub_not_mem_range {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    lsublsub.{_, v} f ∉ Set.range f := fun ⟨i, h⟩ =>
  h.not_lt (lt_lsub f i)
Least Strict Upper Bound is Not in the Range of an Ordinal Family
Informal description
For any family of ordinals $f : \iota \to \text{Ordinal}$ indexed by a type $\iota$, the least strict upper bound $\mathrm{lsub}\, f$ does not belong to the range of $f$. In other words, there is no index $i \in \iota$ such that $f(i) = \mathrm{lsub}\, f$.
Ordinal.nonempty_compl_range theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : (Set.range f)ᶜ.Nonempty
Full source
theorem nonempty_compl_range {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) : (Set.range f)ᶜ.Nonempty :=
  ⟨_, lsub_not_mem_range.{_, v} f⟩
Existence of Ordinals Outside the Range of a Family
Informal description
For any family of ordinals $f : \iota \to \text{Ordinal}$ indexed by a type $\iota$, the complement of the range of $f$ is nonempty. That is, there exists an ordinal not in the range of $f$.
Ordinal.lsub_typein theorem
(o : Ordinal) : lsub.{u, u} (typein (α := o.toType) (· < ·)) = o
Full source
@[simp]
theorem lsub_typein (o : Ordinal) : lsub.{u, u} (typein (α := o.toType) (· < ·)) = o :=
  (lsub_le.{u, u} typein_lt_self).antisymm
    (by
      by_contra! h
      -- Porting note: `nth_rw` → `conv_rhs` & `rw`
      conv_rhs at h => rw [← type_toType o]
      simpa [typein_enum] using lt_lsub.{u, u} (typein (· < ·)) (enum (· < ·) ⟨_, h⟩))
Least Strict Upper Bound of Initial Segments Equals Original Ordinal: $\mathrm{lsub}\, (\mathrm{typein}\, (<)) = o$
Informal description
For any ordinal $o$, the least strict upper bound of the family of ordinals $\{\mathrm{typein}\, (<)\, i \mid i \in o.\mathrm{toType}\}$ is equal to $o$ itself. Here, $\mathrm{typein}\, (<)\, i$ denotes the ordinal corresponding to the initial segment of $o.\mathrm{toType}$ up to $i$ under the canonical order $<$.
Ordinal.sup_typein_limit theorem
{o : Ordinal} (ho : ∀ a, a < o → succ a < o) : sup.{u, u} (typein ((· < ·) : o.toType → o.toType → Prop)) = o
Full source
theorem sup_typein_limit {o : Ordinal} (ho : ∀ a, a < o → succ a < o) :
    sup.{u, u} (typein ((· < ·) : o.toType → o.toType → Prop)) = o := by
  -- Porting note: `rwa` → `rw` & `assumption`
  rw [(sup_eq_lsub_iff_succ.{u, u} (typein (· < ·))).2] <;> rw [lsub_typein o]; assumption
Supremum of Initial Segments Equals Limit Ordinal: $\sup\, (\mathrm{typein}\, (<)) = o$ for Limit Ordinals $o$
Informal description
For any ordinal $o$ such that for every ordinal $a < o$ the successor $\mathrm{succ}\, a$ is also less than $o$, the supremum of the family of ordinals $\{\mathrm{typein}\, (<)\, i \mid i \in o.\mathrm{toType}\}$ is equal to $o$. Here, $\mathrm{typein}\, (<)\, i$ denotes the ordinal corresponding to the initial segment of $o.\mathrm{toType}$ up to $i$ under the canonical order $<$.
Ordinal.sup_typein_succ theorem
{o : Ordinal} : sup.{u, u} (typein ((· < ·) : (succ o).toType → (succ o).toType → Prop)) = o
Full source
@[simp]
theorem sup_typein_succ {o : Ordinal} :
    sup.{u, u} (typein ((· < ·) : (succ o).toType → (succ o).toType → Prop)) = o := by
  rcases sup_eq_lsub_or_sup_succ_eq_lsub.{u, u}
      (typein ((· < ·) : (succ o).toType → (succ o).toType → Prop)) with h | h
  · rw [sup_eq_lsub_iff_succ] at h
    simp only [lsub_typein] at h
    exact (h o (lt_succ o)).false.elim
  rw [← succ_eq_succ_iff, h]
  apply lsub_typein
Supremum of Initial Segments in Successor Ordinal Equals Original Ordinal: $\sup(\mathrm{typein}\, (<)) = o$ for $\mathrm{succ}\, o$
Informal description
For any ordinal $o$, the supremum of the family of ordinals $\{\mathrm{typein}(<)(i) \mid i \in (\mathrm{succ}\, o).\mathrm{toType}\}$ is equal to $o$. Here, $\mathrm{typein}(<)(i)$ denotes the ordinal corresponding to the initial segment of $(\mathrm{succ}\, o).\mathrm{toType}$ up to $i$ under the canonical order $<$.
Ordinal.blsub definition
(o : Ordinal.{u}) (f : ∀ a < o, Ordinal.{max u v}) : Ordinal.{max u v}
Full source
/-- The least strict upper bound of a family of ordinals indexed by the set of ordinals less than
    some `o : Ordinal.{u}`.

    This is to `lsub` as `bsup` is to `sup`. -/
def blsub (o : OrdinalOrdinal.{u}) (f : ∀ a < o, OrdinalOrdinal.{max u v}) : OrdinalOrdinal.{max u v} :=
  bsup.{_, v} o fun a ha => succ (f a ha)
Bounded least strict upper bound of an ordinal-indexed family of ordinals
Informal description
For an ordinal $o$ and a family of ordinals $f$ indexed by ordinals $a < o$, the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ is defined as the least ordinal strictly greater than every $f(a)$ for $a < o$. This is equivalent to taking the successor of each $f(a)$ and then computing their bounded supremum.
Ordinal.bsup_eq_blsub theorem
(o : Ordinal.{u}) (f : ∀ a < o, Ordinal.{max u v}) : (bsup.{_, v} o fun a ha => succ (f a ha)) = blsub.{_, v} o f
Full source
@[simp]
theorem bsup_eq_blsub (o : OrdinalOrdinal.{u}) (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    (bsup.{_, v} o fun a ha => succ (f a ha)) = blsub.{_, v} o f :=
  rfl
Bounded Supremum of Successors Equals Bounded Least Strict Upper Bound
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the bounded supremum of the successor function applied to $f$ equals the bounded least strict upper bound of $f$. That is, $$\mathrm{bsup}_o (\lambda a\, ha.\, \mathrm{succ}(f\, a\, ha)) = \mathrm{blsub}_o f.$$
Ordinal.lsub_eq_blsub' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o) (f : ∀ a < o, Ordinal.{max u v}) : lsub.{_, v} (familyOfBFamily' r ho f) = blsub.{_, v} o f
Full source
theorem lsub_eq_blsub' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] {o} (ho : type r = o)
    (f : ∀ a < o, OrdinalOrdinal.{max u v}) : lsub.{_, v} (familyOfBFamily' r ho f) = blsub.{_, v} o f :=
  sup_eq_bsup'.{_, v} r ho fun a ha => succ (f a ha)
Equality of Least Strict Upper Bound and Bounded Least Strict Upper Bound for Well-Ordered Families: $\mathrm{lsub}_\iota f = \mathrm{blsub}_o f$
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$ whose order type is an ordinal $o$. Given a family of ordinals $f$ indexed by ordinals $a < o$, the least strict upper bound of the $\iota$-indexed family obtained from $f$ via $r$ equals the bounded least strict upper bound of $f$ over $o$. In symbols, if $\text{type}(r) = o$, then: $$\mathrm{lsub}_{i \in \iota} f(\text{ord}(i)) = \mathrm{blsub}_o f$$ where $\text{ord}(i)$ is the ordinal corresponding to the initial segment of $i$ in $r$.
Ordinal.lsub_eq_lsub theorem
{ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [IsWellOrder ι r] [IsWellOrder ι' r'] {o} (ho : type r = o) (ho' : type r' = o) (f : ∀ a < o, Ordinal.{max u v}) : lsub.{_, v} (familyOfBFamily' r ho f) = lsub.{_, v} (familyOfBFamily' r' ho' f)
Full source
theorem lsub_eq_lsub {ι ι' : Type u} (r : ι → ι → Prop) (r' : ι' → ι' → Prop) [IsWellOrder ι r]
    [IsWellOrder ι' r'] {o} (ho : type r = o) (ho' : type r' = o)
    (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    lsub.{_, v} (familyOfBFamily' r ho f) = lsub.{_, v} (familyOfBFamily' r' ho' f) := by
  rw [lsub_eq_blsub', lsub_eq_blsub']
Invariance of Least Strict Upper Bound under Well-Order Isomorphism: $\mathrm{lsub}_\iota f = \mathrm{lsub}_{\iota'} f$
Informal description
Let $\iota$ and $\iota'$ be types equipped with well-order relations $r$ and $r'$ respectively, both having the same order type $o$. Given a family of ordinals $f$ indexed by ordinals $a < o$, the least strict upper bound of the $\iota$-indexed family obtained from $f$ via $r$ equals the least strict upper bound of the $\iota'$-indexed family obtained from $f$ via $r'$. In symbols, if $\text{type}(r) = \text{type}(r') = o$, then: $$\mathrm{lsub}_{i \in \iota} f(\text{ord}_r(i)) = \mathrm{lsub}_{j \in \iota'} f(\text{ord}_{r'}(j))$$ where $\text{ord}_r(i)$ and $\text{ord}_{r'}(j)$ are the ordinals corresponding to the initial segments of $i$ in $r$ and $j$ in $r'$ respectively.
Ordinal.lsub_eq_blsub theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : lsub.{_, v} (familyOfBFamily o f) = blsub.{_, v} o f
Full source
@[simp]
theorem lsub_eq_blsub {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    lsub.{_, v} (familyOfBFamily o f) = blsub.{_, v} o f :=
  lsub_eq_blsub' _ _ _
Equality of lsub and blsub for canonical type conversion: $\mathrm{lsub}_{o.\mathrm{toType}} f = \mathrm{blsub}_o f$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the least strict upper bound of the family obtained by converting $f$ to a family indexed by the canonical type of $o$ is equal to the bounded least strict upper bound of $f$ over $o$. In symbols: $$\mathrm{lsub}_{i \in o.\mathrm{toType}} f(\mathrm{ord}(i)) = \mathrm{blsub}_o f$$ where $\mathrm{ord}(i)$ is the ordinal corresponding to the initial segment of $i$ in the canonical well-order of $o.\mathrm{toType}$.
Ordinal.blsub_eq_lsub' theorem
{ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r] (f : ι → Ordinal.{max u v}) : blsub.{_, v} _ (bfamilyOfFamily' r f) = lsub.{_, v} f
Full source
@[simp]
theorem blsub_eq_lsub' {ι : Type u} (r : ι → ι → Prop) [IsWellOrder ι r]
    (f : ι → OrdinalOrdinal.{max u v}) : blsub.{_, v} _ (bfamilyOfFamily' r f) = lsub.{_, v} f :=
  bsup_eq_sup'.{_, v} r (succsucc ∘ f)
Equality of Bounded Least Strict Upper Bound and Least Strict Upper Bound for Well-Ordered Families: $\mathrm{blsub}_o f = \mathrm{lsub}\, f$
Informal description
Let $\iota$ be a type equipped with a well-order relation $r$, and let $f : \iota \to \text{Ordinal}$ be a family of ordinals. The bounded least strict upper bound of the family obtained by converting $f$ to an ordinal-indexed family via $r$ is equal to the least strict upper bound of $f$. In symbols: $$\mathrm{blsub}_o (f \circ \mathrm{enum}\, r) = \mathrm{lsub}\, f$$ where $o$ is the order type of $r$ and $\mathrm{enum}\, r$ is the enumeration of $\iota$ by ordinals less than $o$.
Ordinal.blsub_eq_blsub theorem
{ι : Type u} (r r' : ι → ι → Prop) [IsWellOrder ι r] [IsWellOrder ι r'] (f : ι → Ordinal.{max u v}) : blsub.{_, v} _ (bfamilyOfFamily' r f) = blsub.{_, v} _ (bfamilyOfFamily' r' f)
Full source
theorem blsub_eq_blsub {ι : Type u} (r r' : ι → ι → Prop) [IsWellOrder ι r] [IsWellOrder ι r']
    (f : ι → OrdinalOrdinal.{max u v}) :
    blsub.{_, v} _ (bfamilyOfFamily' r f) = blsub.{_, v} _ (bfamilyOfFamily' r' f) := by
  rw [blsub_eq_lsub', blsub_eq_lsub']
Independence of Bounded Least Strict Upper Bound from Choice of Well-Order: $\mathrm{blsub}_o f = \mathrm{blsub}_{o'} f$
Informal description
Let $\iota$ be a type equipped with two well-order relations $r$ and $r'$, and let $f : \iota \to \text{Ordinal}$ be a family of ordinals. The bounded least strict upper bounds of the families obtained by converting $f$ to ordinal-indexed families via $r$ and $r'$ are equal. In symbols: $$\mathrm{blsub}_o (f \circ \mathrm{enum}\, r) = \mathrm{blsub}_{o'} (f \circ \mathrm{enum}\, r')$$ where $o$ and $o'$ are the order types of $r$ and $r'$ respectively, and $\mathrm{enum}\, r$, $\mathrm{enum}\, r'$ are the enumerations of $\iota$ by ordinals less than $o$ and $o'$ respectively.
Ordinal.blsub_eq_lsub theorem
{ι : Type u} (f : ι → Ordinal.{max u v}) : blsub.{_, v} _ (bfamilyOfFamily f) = lsub.{_, v} f
Full source
@[simp]
theorem blsub_eq_lsub {ι : Type u} (f : ι → OrdinalOrdinal.{max u v}) :
    blsub.{_, v} _ (bfamilyOfFamily f) = lsub.{_, v} f :=
  blsub_eq_lsub' _ _
Equality of Bounded Least Strict Upper Bound and Least Strict Upper Bound for Type-Indexed Families: $\mathrm{blsub}_o f = \mathrm{lsub}\, f$
Informal description
For any type $\iota$ and any family of ordinals $f : \iota \to \text{Ordinal}$, the bounded least strict upper bound of the family obtained by converting $f$ to an ordinal-indexed family via the well-ordering relation on $\iota$ is equal to the least strict upper bound of $f$. In symbols: $$\mathrm{blsub}_o (f \circ \mathrm{enum}) = \mathrm{lsub}\, f$$ where $o$ is the order type of the well-ordering relation on $\iota$ and $\mathrm{enum}$ is the enumeration of $\iota$ by ordinals less than $o$.
Ordinal.blsub_congr theorem
{o₁ o₂ : Ordinal.{u}} (f : ∀ a < o₁, Ordinal.{max u v}) (ho : o₁ = o₂) : blsub.{_, v} o₁ f = blsub.{_, v} o₂ fun a h => f a (h.trans_eq ho.symm)
Full source
@[congr]
theorem blsub_congr {o₁ o₂ : OrdinalOrdinal.{u}} (f : ∀ a < o₁, OrdinalOrdinal.{max u v}) (ho : o₁ = o₂) :
    blsub.{_, v} o₁ f = blsub.{_, v} o₂ fun a h => f a (h.trans_eq ho.symm) := by
  subst ho
  -- Porting note: `rfl` is required.
  rfl
Bounded Least Strict Upper Bound is Congruent with Respect to Equal Ordinal Indices
Informal description
For any two ordinals $o_1$ and $o_2$ in universe $u$, and any family of ordinals $f$ indexed by ordinals $a < o_1$ (with values in a potentially larger universe $\max(u,v)$), if $o_1 = o_2$, then the bounded least strict upper bounds of $f$ over $o_1$ and over $o_2$ are equal. Specifically, $\mathrm{blsub}\, o_1\, f = \mathrm{blsub}\, o_2\, (\lambda a\, h, f\, a\, (h \circ \mathrm{ho.symm}))$.
Ordinal.blsub_le_iff theorem
{o : Ordinal.{u}} {f : ∀ a < o, Ordinal.{max u v}} {a} : blsub.{_, v} o f ≤ a ↔ ∀ i h, f i h < a
Full source
theorem blsub_le_iff {o : OrdinalOrdinal.{u}} {f : ∀ a < o, OrdinalOrdinal.{max u v}} {a} :
    blsubblsub.{_, v} o f ≤ a ↔ ∀ i h, f i h < a := by
  convert bsup_le_iff.{_, v} (f := fun a ha => succ (f a ha)) (a := a) using 2
  simp_rw [succ_le_iff]
Bounded Least Strict Upper Bound Characterization: $\mathrm{blsub}\, o\, f \leq a \leftrightarrow \forall i < o, f(i) < a$
Informal description
For an ordinal $o$, a family of ordinals $f$ indexed by ordinals $i < o$, and an ordinal $a$, the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ satisfies $\mathrm{blsub}\, o\, f \leq a$ if and only if $f(i, h) < a$ for every $i < o$ and proof $h$ of $i < o$.
Ordinal.blsub_le theorem
{o : Ordinal} {f : ∀ b < o, Ordinal} {a} : (∀ i h, f i h < a) → blsub o f ≤ a
Full source
theorem blsub_le {o : Ordinal} {f : ∀ b < o, Ordinal} {a} : (∀ i h, f i h < a) → blsub o f ≤ a :=
  blsub_le_iff.2
Bounded Least Strict Upper Bound is Bounded Above: $\mathrm{blsub}\, o\, f \leq a$ if $\forall i < o, f(i) < a$
Informal description
For an ordinal $o$, a family of ordinals $f$ indexed by ordinals $b < o$, and an ordinal $a$, if $f(i, h) < a$ for every $i < o$ and proof $h$ of $i < o$, then the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ satisfies $\mathrm{blsub}\, o\, f \leq a$.
Ordinal.lt_blsub theorem
{o} (f : ∀ a < o, Ordinal) (i h) : f i h < blsub o f
Full source
theorem lt_blsub {o} (f : ∀ a < o, Ordinal) (i h) : f i h < blsub o f :=
  blsub_le_iff.1 le_rfl _ _
Bounded Least Strict Upper Bound Exceeds All Members: $f(i) < \mathrm{blsub}\, o\, f$ for all $i < o$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, and for any specific index $i < o$ with proof $h$ of $i < o$, the value $f(i, h)$ is strictly less than the bounded least strict upper bound $\mathrm{blsub}\, o\, f$.
Ordinal.lt_blsub_iff theorem
{o : Ordinal.{u}} {f : ∀ b < o, Ordinal.{max u v}} {a} : a < blsub.{_, v} o f ↔ ∃ i hi, a ≤ f i hi
Full source
theorem lt_blsub_iff {o : OrdinalOrdinal.{u}} {f : ∀ b < o, OrdinalOrdinal.{max u v}} {a} :
    a < blsub.{_, v} o f ↔ ∃ i hi, a ≤ f i hi := by
  simpa only [not_forall, not_lt, not_le] using not_congr (@blsub_le_iff.{_, v} _ f a)
Characterization of Elements Below Bounded Least Strict Upper Bound: $a < \mathrm{blsub}\, o\, f \leftrightarrow \exists i < o, a \leq f(i)$
Informal description
For an ordinal $o$, a family of ordinals $f$ indexed by ordinals $b < o$, and an ordinal $a$, we have $a < \mathrm{blsub}\, o\, f$ if and only if there exists some $i < o$ such that $a \leq f(i)$.
Ordinal.bsup_le_blsub theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : bsup.{_, v} o f ≤ blsub.{_, v} o f
Full source
theorem bsup_le_blsub {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    bsup.{_, v} o f ≤ blsub.{_, v} o f :=
  bsup_le fun i h => (lt_blsub f i h).le
Bounded Supremum is Below Bounded Least Strict Upper Bound: $\mathrm{bsup}\, o\, f \leq \mathrm{blsub}\, o\, f$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the bounded supremum $\mathrm{bsup}\, o\, f$ is less than or equal to the bounded least strict upper bound $\mathrm{blsub}\, o\, f$.
Ordinal.blsub_le_bsup_succ theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : blsub.{_, v} o f ≤ succ (bsup.{_, v} o f)
Full source
theorem blsub_le_bsup_succ {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    blsub.{_, v} o f ≤ succ (bsup.{_, v} o f) :=
  blsub_le fun i h => lt_succ_iff.2 (le_bsup f i h)
Bounded Least Strict Upper Bound is Bounded by Successor of Bounded Supremum: $\mathrm{blsub}\, o\, f \leq \mathrm{succ}(\mathrm{bsup}\, o\, f)$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ satisfies $\mathrm{blsub}\, o\, f \leq \mathrm{succ}(\mathrm{bsup}\, o\, f)$, where $\mathrm{bsup}\, o\, f$ is the bounded supremum of the family $f$.
Ordinal.bsup_eq_blsub_or_succ_bsup_eq_blsub theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : bsup.{_, v} o f = blsub.{_, v} o f ∨ succ (bsup.{_, v} o f) = blsub.{_, v} o f
Full source
theorem bsup_eq_blsub_or_succ_bsup_eq_blsub {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    bsupbsup.{_, v} o f = blsub.{_, v} o f ∨ succ (bsup.{_, v} o f) = blsub.{_, v} o f := by
  rw [← sup_eq_bsup, ← lsub_eq_blsub]
  exact sup_eq_lsub_or_sup_succ_eq_lsub _
Relation between Bounded Supremum and Bounded Least Strict Upper Bound: $\mathrm{bsup}_o f = \mathrm{blsub}_o f$ or $\mathrm{succ}(\mathrm{bsup}_o f) = \mathrm{blsub}_o f$
Informal description
For any ordinal $o$ and any family of ordinals $\{f(a)\}_{a < o}$ indexed by ordinals less than $o$, either the bounded supremum $\mathrm{bsup}_o f$ equals the bounded least strict upper bound $\mathrm{blsub}_o f$, or the successor of the bounded supremum equals the bounded least strict upper bound. In symbols: \[ \mathrm{bsup}_o f = \mathrm{blsub}_o f \quad \text{or} \quad \mathrm{succ}(\mathrm{bsup}_o f) = \mathrm{blsub}_o f. \]
Ordinal.bsup_succ_le_blsub theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : succ (bsup.{_, v} o f) ≤ blsub.{_, v} o f ↔ ∃ i hi, f i hi = bsup.{_, v} o f
Full source
theorem bsup_succ_le_blsub {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    succsucc (bsup.{_, v} o f) ≤ blsub.{_, v} o f ↔ ∃ i hi, f i hi = bsup.{_, v} o f := by
  refine ⟨fun h => ?_, ?_⟩
  · by_contra! hf
    exact
      ne_of_lt (succ_le_iff.1 h)
        (le_antisymm (bsup_le_blsub f) (blsub_le (lt_bsup_of_ne_bsup.1 hf)))
  rintro ⟨_, _, hf⟩
  rw [succ_le_iff, ← hf]
  exact lt_blsub _ _ _
Successor of Bounded Supremum is Below Bounded Least Strict Upper Bound if and only if Supremum is Attained
Informal description
For any ordinal $o$ and any family of ordinals $\{f(a)\}_{a < o}$ indexed by ordinals less than $o$, the successor of the bounded supremum $\mathrm{bsup}_o f$ is less than or equal to the bounded least strict upper bound $\mathrm{blsub}_o f$ if and only if there exists an index $i < o$ such that $f(i) = \mathrm{bsup}_o f$. In symbols: \[ \mathrm{succ}(\mathrm{bsup}_o f) \leq \mathrm{blsub}_o f \leftrightarrow \exists i < o, f(i) = \mathrm{bsup}_o f. \]
Ordinal.bsup_succ_eq_blsub theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : succ (bsup.{_, v} o f) = blsub.{_, v} o f ↔ ∃ i hi, f i hi = bsup.{_, v} o f
Full source
theorem bsup_succ_eq_blsub {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    succsucc (bsup.{_, v} o f) = blsub.{_, v} o f ↔ ∃ i hi, f i hi = bsup.{_, v} o f :=
  (blsub_le_bsup_succ f).le_iff_eq.symm.trans (bsup_succ_le_blsub f)
Successor of Bounded Supremum Equals Bounded Least Strict Upper Bound if and only if Supremum is Attained: $\mathrm{succ}(\mathrm{bsup}_o f) = \mathrm{blsub}_o f \leftrightarrow \exists i < o, f(i) = \mathrm{bsup}_o f$
Informal description
For an ordinal $o$ and a family of ordinals $\{f(a)\}_{a < o}$ indexed by ordinals less than $o$, the successor of the bounded supremum $\mathrm{bsup}_o f$ equals the bounded least strict upper bound $\mathrm{blsub}_o f$ if and only if there exists an index $i < o$ such that $f(i) = \mathrm{bsup}_o f$. In symbols: \[ \mathrm{succ}(\mathrm{bsup}_o f) = \mathrm{blsub}_o f \leftrightarrow \exists i < o, f(i) = \mathrm{bsup}_o f. \]
Ordinal.bsup_eq_blsub_iff_succ theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : bsup.{_, v} o f = blsub.{_, v} o f ↔ ∀ a < blsub.{_, v} o f, succ a < blsub.{_, v} o f
Full source
theorem bsup_eq_blsub_iff_succ {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    bsupbsup.{_, v} o f = blsub.{_, v} o f ↔ ∀ a < blsub.{_, v} o f, succ a < blsub.{_, v} o f := by
  rw [← sup_eq_bsup, ← lsub_eq_blsub]
  apply sup_eq_lsub_iff_succ
Equality of Bounded Supremum and Least Strict Upper Bound via Successor Condition
Informal description
For an ordinal $o$ and a family of ordinals $\{f(a)\}_{a < o}$ indexed by ordinals less than $o$, the bounded supremum $\mathrm{bsup}_o f$ equals the bounded least strict upper bound $\mathrm{blsub}_o f$ if and only if for every ordinal $a < \mathrm{blsub}_o f$, the successor ordinal $\mathrm{succ}\, a$ is strictly less than $\mathrm{blsub}_o f$. In symbols: \[ \mathrm{bsup}_o f = \mathrm{blsub}_o f \leftrightarrow \forall a < \mathrm{blsub}_o f, \mathrm{succ}\, a < \mathrm{blsub}_o f. \]
Ordinal.bsup_eq_blsub_iff_lt_bsup theorem
{o : Ordinal.{u}} (f : ∀ a < o, Ordinal.{max u v}) : bsup.{_, v} o f = blsub.{_, v} o f ↔ ∀ i hi, f i hi < bsup.{_, v} o f
Full source
theorem bsup_eq_blsub_iff_lt_bsup {o : OrdinalOrdinal.{u}} (f : ∀ a < o, OrdinalOrdinal.{max u v}) :
    bsupbsup.{_, v} o f = blsub.{_, v} o f ↔ ∀ i hi, f i hi < bsup.{_, v} o f :=
  ⟨fun h i => by
    rw [h]
    apply lt_blsub, fun h => le_antisymm (bsup_le_blsub f) (blsub_le h)⟩
Equality of Bounded Supremum and Least Strict Upper Bound: $\mathrm{bsup}\, o\, f = \mathrm{blsub}\, o\, f$ if and only if $f(i) < \mathrm{bsup}\, o\, f$ for all $i < o$
Informal description
For an ordinal $o$ and a family of ordinals $f$ indexed by ordinals $a < o$, the bounded supremum $\mathrm{bsup}\, o\, f$ equals the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ if and only if for every index $i < o$, the value $f(i)$ is strictly less than $\mathrm{bsup}\, o\, f$.
Ordinal.bsup_eq_blsub_of_lt_succ_limit theorem
{o : Ordinal.{u}} (ho : IsLimit o) {f : ∀ a < o, Ordinal.{max u v}} (hf : ∀ a ha, f a ha < f (succ a) (ho.succ_lt ha)) : bsup.{_, v} o f = blsub.{_, v} o f
Full source
theorem bsup_eq_blsub_of_lt_succ_limit {o : OrdinalOrdinal.{u}} (ho : IsLimit o)
    {f : ∀ a < o, OrdinalOrdinal.{max u v}} (hf : ∀ a ha, f a ha < f (succ a) (ho.succ_lt ha)) :
    bsup.{_, v} o f = blsub.{_, v} o f := by
  rw [bsup_eq_blsub_iff_lt_bsup]
  exact fun i hi => (hf i hi).trans_le (le_bsup f _ _)
Bounded Supremum Equals Least Strict Upper Bound for Increasing Families on Limit Ordinals
Informal description
For any limit ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, if for every $a < o$ we have $f(a) < f(\text{succ}(a))$, then the bounded supremum $\mathrm{bsup}\, o\, f$ equals the bounded least strict upper bound $\mathrm{blsub}\, o\, f$.
Ordinal.blsub_succ_of_mono theorem
{o : Ordinal.{u}} {f : ∀ a < succ o, Ordinal.{max u v}} (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : blsub.{_, v} _ f = succ (f o (lt_succ o))
Full source
theorem blsub_succ_of_mono {o : OrdinalOrdinal.{u}} {f : ∀ a < succ o, OrdinalOrdinal.{max u v}}
    (hf : ∀ {i j} (hi hj), i ≤ j → f i hi ≤ f j hj) : blsub.{_, v} _ f = succ (f o (lt_succ o)) :=
  bsup_succ_of_mono fun {_ _} hi hj h => succ_le_succ (hf hi hj h)
Bounded Least Strict Upper Bound of Monotonic Family at Successor Ordinal: $\text{blsub}\, (\text{succ}\, o)\, f = \text{succ}(f(o))$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < \text{succ}(o)$, if $f$ is monotonic (i.e., $i \leq j$ implies $f(i) \leq f(j)$ for all $i,j < \text{succ}(o)$), then the bounded least strict upper bound of $f$ is equal to the successor of $f(o)$.
Ordinal.blsub_eq_zero_iff theorem
{o} {f : ∀ a < o, Ordinal} : blsub o f = 0 ↔ o = 0
Full source
@[simp]
theorem blsub_eq_zero_iff {o} {f : ∀ a < o, Ordinal} : blsubblsub o f = 0 ↔ o = 0 := by
  rw [← lsub_eq_blsub, lsub_eq_zero_iff]
  exact toType_empty_iff_eq_zero
Bounded Least Strict Upper Bound is Zero iff Index Ordinal is Zero: $\mathrm{blsub}_o f = 0 \leftrightarrow o = 0$
Informal description
For any ordinal $o$ and any family of ordinals $f$ indexed by ordinals $a < o$, the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ is equal to the zero ordinal $0$ if and only if $o$ is equal to $0$.
Ordinal.blsub_zero theorem
(f : ∀ a < (0 : Ordinal), Ordinal) : blsub 0 f = 0
Full source
@[simp]
theorem blsub_zero (f : ∀ a < (0 : Ordinal), Ordinal) : blsub 0 f = 0 := by rw [blsub_eq_zero_iff]
Bounded Least Strict Upper Bound at Zero: $\mathrm{blsub}\, 0\, f = 0$
Informal description
For any family of ordinals $f$ indexed by ordinals $a < 0$, the bounded least strict upper bound $\mathrm{blsub}\, 0\, f$ is equal to $0$.
Ordinal.blsub_pos theorem
{o : Ordinal} (ho : 0 < o) (f : ∀ a < o, Ordinal) : 0 < blsub o f
Full source
theorem blsub_pos {o : Ordinal} (ho : 0 < o) (f : ∀ a < o, Ordinal) : 0 < blsub o f :=
  (Ordinal.zero_le _).trans_lt (lt_blsub f 0 ho)
Positivity of Bounded Least Strict Upper Bound: $0 < \mathrm{blsub}\, o\, f$ for $o > 0$
Informal description
For any ordinal $o > 0$ and any family of ordinals $f$ indexed by ordinals $a < o$, the bounded least strict upper bound $\mathrm{blsub}\, o\, f$ is strictly greater than $0$.
Ordinal.blsub_type theorem
{α : Type u} (r : α → α → Prop) [IsWellOrder α r] (f : ∀ a < type r, Ordinal.{max u v}) : blsub.{_, v} (type r) f = lsub.{_, v} fun a => f (typein r a) (typein_lt_type _ _)
Full source
theorem blsub_type {α : Type u} (r : α → α → Prop) [IsWellOrder α r]
    (f : ∀ a < type r, OrdinalOrdinal.{max u v}) :
    blsub.{_, v} (type r) f = lsub.{_, v} fun a => f (typein r a) (typein_lt_type _ _) :=
  eq_of_forall_ge_iff fun o => by
    rw [blsub_le_iff, lsub_le_iff]
    exact ⟨fun H b => H _ _, fun H i h => by simpa only [typein_enum] using H (enum r ⟨i, h⟩)⟩
Bounded Least Strict Upper Bound via Initial Segments: $\mathrm{blsub}\, (\mathrm{type}\, r)\, f = \mathrm{lsub}\, (f \circ \mathrm{typein}\, r)$
Informal description
Let $\alpha$ be a type with a well-order relation $r$, and let $f$ be a family of ordinals indexed by ordinals less than the order type of $r$. Then the bounded least strict upper bound of $f$ over the order type of $r$ is equal to the least strict upper bound of the family obtained by composing $f$ with the initial segment embedding $\mathrm{typein}\, r$. In symbols: \[ \mathrm{blsub}\, (\mathrm{type}\, r)\, f = \mathrm{lsub}\, (a \mapsto f(\mathrm{typein}\, r\, a, \mathrm{typein\_lt\_type}\, r\, a)) \]
Ordinal.blsub_const theorem
{o : Ordinal} (ho : o ≠ 0) (a : Ordinal) : (blsub.{u, v} o fun _ _ => a) = succ a
Full source
theorem blsub_const {o : Ordinal} (ho : o ≠ 0) (a : Ordinal) :
    (blsub.{u, v} o fun _ _ => a) = succ a :=
  bsup_const.{u, v} ho (succ a)
Bounded Least Strict Upper Bound of Constant Family: $\mathrm{blsub}\, o\, (\lambda b \,_.\, a) = \mathrm{succ}(a)$ for $o \neq 0$
Informal description
For any nonzero ordinal $o$ and any ordinal $a$, the bounded least strict upper bound of the constant family that maps every ordinal $b < o$ to $a$ is equal to the successor of $a$, i.e., $\mathrm{blsub}\, o\, (\lambda b \,_.\, a) = \mathrm{succ}(a)$.
Ordinal.blsub_one theorem
(f : ∀ a < (1 : Ordinal), Ordinal) : blsub 1 f = succ (f 0 zero_lt_one)
Full source
@[simp]
theorem blsub_one (f : ∀ a < (1 : Ordinal), Ordinal) : blsub 1 f = succ (f 0 zero_lt_one) :=
  bsup_one _
Bounded Least Strict Upper Bound for Indexing Below 1: $\mathrm{blsub}\, 1\, f = \mathrm{succ}(f(0))$
Informal description
For any family of ordinals $f$ indexed by ordinals $a < 1$, the bounded least strict upper bound $\mathrm{blsub}\, 1\, f$ equals the successor of $f(0)$, where $0$ is the unique ordinal less than $1$.
Ordinal.blsub_id theorem
: ∀ o, (blsub.{u, u} o fun x _ => x) = o
Full source
@[simp]
theorem blsub_id : ∀ o, (blsub.{u, u} o fun x _ => x) = o :=
  lsub_typein
Bounded Least Strict Upper Bound of Identity Function: $\mathrm{blsub}\, o\, (\lambda x\, \_, x) = o$
Informal description
For any ordinal $o$, the bounded least strict upper bound of the identity function indexed by ordinals less than $o$ is equal to $o$. That is, $\mathrm{blsub}\, o\, (\lambda x\, \_, x) = o$.
Ordinal.bsup_id_limit theorem
{o : Ordinal} : (∀ a < o, succ a < o) → (bsup.{u, u} o fun x _ => x) = o
Full source
theorem bsup_id_limit {o : Ordinal} : (∀ a < o, succ a < o) → (bsup.{u, u} o fun x _ => x) = o :=
  sup_typein_limit
Bounded Supremum of Identity Function Equals Limit Ordinal
Informal description
For any limit ordinal $o$ (i.e., an ordinal $o$ such that for every $a < o$ we have $\mathrm{succ}\, a < o$), the bounded supremum of the identity function indexed by ordinals less than $o$ equals $o$. That is, $$\mathrm{bsup}\, o\, (\lambda x\, \_, x) = o.$$
Ordinal.bsup_id_succ theorem
(o) : (bsup.{u, u} (succ o) fun x _ => x) = o
Full source
@[simp]
theorem bsup_id_succ (o) : (bsup.{u, u} (succ o) fun x _ => x) = o :=
  sup_typein_succ
Bounded Supremum of Identity Function on Successor Ordinal: $\mathrm{bsup}\, (\mathrm{succ}\, o)\, \mathrm{id} = o$
Informal description
For any ordinal $o$, the bounded supremum of the identity function indexed by ordinals less than the successor of $o$ is equal to $o$. That is, $$\mathrm{bsup}\, (\mathrm{succ}\, o)\, (\lambda x\, \_, x) = o.$$
Ordinal.blsub_le_of_brange_subset theorem
{o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal} (h : brange o f ⊆ brange o' g) : blsub.{u, max v w} o f ≤ blsub.{v, max u w} o' g
Full source
theorem blsub_le_of_brange_subset {o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal}
    (h : brangebrange o f ⊆ brange o' g) : blsub.{u, max v w} o f ≤ blsub.{v, max u w} o' g :=
  bsup_le_of_brange_subset.{u, v, w} fun a ⟨b, hb, hb'⟩ => by
    obtain ⟨c, hc, hc'⟩ := h ⟨b, hb, rfl⟩
    simp_rw [← hc'] at hb'
    exact ⟨c, hc, hb'⟩
Bounded Least Strict Upper Bound Monotonicity under Range Inclusion: $\text{range}\, f \subseteq \text{range}\, g \Rightarrow \mathrm{blsub}\, f \leq \mathrm{blsub}\, g$
Informal description
For any ordinals $o$ and $o'$, and families of ordinals $f$ indexed by $a < o$ and $g$ indexed by $a < o'$, if the range of $f$ is a subset of the range of $g$ (i.e., $\{f(a) \mid a < o\} \subseteq \{g(a) \mid a < o'\}$), then the bounded least strict upper bound of $f$ is less than or equal to the bounded least strict upper bound of $g$: $$\mathrm{blsub}\, o\, f \leq \mathrm{blsub}\, o'\, g.$$
Ordinal.blsub_eq_of_brange_eq theorem
{o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal} (h : {o | ∃ i hi, f i hi = o} = {o | ∃ i hi, g i hi = o}) : blsub.{u, max v w} o f = blsub.{v, max u w} o' g
Full source
theorem blsub_eq_of_brange_eq {o o'} {f : ∀ a < o, Ordinal} {g : ∀ a < o', Ordinal}
    (h : { o | ∃ i hi, f i hi = o } = { o | ∃ i hi, g i hi = o }) :
    blsub.{u, max v w} o f = blsub.{v, max u w} o' g :=
  (blsub_le_of_brange_subset.{u, v, w} h.le).antisymm (blsub_le_of_brange_subset.{v, u, w} h.ge)
Bounded Least Strict Upper Bound Equality under Range Equality: $\text{range}\, f = \text{range}\, g \Rightarrow \mathrm{blsub}\, f = \mathrm{blsub}\, g$
Informal description
For any ordinals $o$ and $o'$, and families of ordinals $f$ indexed by $a < o$ and $g$ indexed by $a < o'$, if the ranges of $f$ and $g$ are equal (i.e., $\{f(a) \mid a < o\} = \{g(a) \mid a < o'\}$), then the bounded least strict upper bounds of $f$ and $g$ are equal: $$\mathrm{blsub}\, o\, f = \mathrm{blsub}\, o'\, g.$$
Ordinal.bsup_comp theorem
{o o' : Ordinal.{max u v}} {f : ∀ a < o, Ordinal.{max u v w}} (hf : ∀ {i j} (hi) (hj), i ≤ j → f i hi ≤ f j hj) {g : ∀ a < o', Ordinal.{max u v}} (hg : blsub.{_, u} o' g = o) : (bsup.{_, w} o' fun a ha => f (g a ha) (by rw [← hg]; apply lt_blsub)) = bsup.{_, w} o f
Full source
theorem bsup_comp {o o' : OrdinalOrdinal.{max u v}} {f : ∀ a < o, OrdinalOrdinal.{max u v w}}
    (hf : ∀ {i j} (hi) (hj), i ≤ j → f i hi ≤ f j hj) {g : ∀ a < o', OrdinalOrdinal.{max u v}}
    (hg : blsub.{_, u} o' g = o) :
    (bsup.{_, w} o' fun a ha => f (g a ha) (by rw [← hg]; apply lt_blsub)) = bsup.{_, w} o f := by
  apply le_antisymm <;> refine bsup_le fun i hi => ?_
  · apply le_bsup
  · rw [← hg, lt_blsub_iff] at hi
    rcases hi with ⟨j, hj, hj'⟩
    exact (hf _ _ hj').trans (le_bsup _ _ _)
Composition Rule for Bounded Suprema of Monotonic Ordinal Families
Informal description
Let $o$ and $o'$ be ordinals, and let $f$ be a family of ordinals indexed by $a < o$ that is monotonic in the sense that for any $i \leq j < o$, we have $f(i) \leq f(j)$. Let $g$ be a family of ordinals indexed by $a < o'$ such that the bounded least strict upper bound of $g$ is equal to $o$. Then the bounded supremum of the composed family $f \circ g$ (indexed by $a < o'$) is equal to the bounded supremum of $f$: $$\mathrm{bsup}\, o'\, (f \circ g) = \mathrm{bsup}\, o\, f.$$
Ordinal.blsub_comp theorem
{o o' : Ordinal.{max u v}} {f : ∀ a < o, Ordinal.{max u v w}} (hf : ∀ {i j} (hi) (hj), i ≤ j → f i hi ≤ f j hj) {g : ∀ a < o', Ordinal.{max u v}} (hg : blsub.{_, u} o' g = o) : (blsub.{_, w} o' fun a ha => f (g a ha) (by rw [← hg]; apply lt_blsub)) = blsub.{_, w} o f
Full source
theorem blsub_comp {o o' : OrdinalOrdinal.{max u v}} {f : ∀ a < o, OrdinalOrdinal.{max u v w}}
    (hf : ∀ {i j} (hi) (hj), i ≤ j → f i hi ≤ f j hj) {g : ∀ a < o', OrdinalOrdinal.{max u v}}
    (hg : blsub.{_, u} o' g = o) :
    (blsub.{_, w} o' fun a ha => f (g a ha) (by rw [← hg]; apply lt_blsub)) = blsub.{_, w} o f :=
  @bsup_comp.{u, v, w} o _ (fun a ha => succ (f a ha))
    (fun {_ _} _ _ h => succ_le_succ_iff.2 (hf _ _ h)) g hg
Composition Rule for Bounded Least Strict Upper Bounds of Monotonic Ordinal Families
Informal description
Let $o$ and $o'$ be ordinals, and let $f$ be a family of ordinals indexed by $a < o$ that is monotonic in the sense that for any $i \leq j < o$, we have $f(i) \leq f(j)$. Let $g$ be a family of ordinals indexed by $a < o'$ such that the bounded least strict upper bound of $g$ is equal to $o$. Then the bounded least strict upper bound of the composed family $f \circ g$ (indexed by $a < o'$) is equal to the bounded least strict upper bound of $f$: $$\mathrm{blsub}\, o'\, (f \circ g) = \mathrm{blsub}\, o\, f.$$
Ordinal.IsNormal.bsup_eq theorem
{f : Ordinal.{u} → Ordinal.{max u v}} (H : IsNormal f) {o : Ordinal.{u}} (h : IsLimit o) : (Ordinal.bsup.{_, v} o fun x _ => f x) = f o
Full source
theorem IsNormal.bsup_eq {f : OrdinalOrdinal.{u}OrdinalOrdinal.{max u v}} (H : IsNormal f) {o : OrdinalOrdinal.{u}}
    (h : IsLimit o) : (Ordinal.bsup.{_, v} o fun x _ => f x) = f o := by
  rw [← IsNormal.bsup.{u, u, v} H (fun x _ => x) h.ne_bot, bsup_id_limit fun _ ↦ h.succ_lt]
Normal Functions Preserve Bounded Suprema at Limit Ordinals: $\mathrm{bsup}_o f = f(o)$
Informal description
Let $f$ be a normal function from ordinals to ordinals (i.e., strictly increasing and continuous at limit ordinals). For any limit ordinal $o$, the bounded supremum of $f$ restricted to ordinals less than $o$ equals $f(o)$. That is, \[ \mathrm{bsup}_o (\lambda x \_, f(x)) = f(o). \]
Ordinal.IsNormal.blsub_eq theorem
{f : Ordinal.{u} → Ordinal.{max u v}} (H : IsNormal f) {o : Ordinal.{u}} (h : IsLimit o) : (blsub.{_, v} o fun x _ => f x) = f o
Full source
theorem IsNormal.blsub_eq {f : OrdinalOrdinal.{u}OrdinalOrdinal.{max u v}} (H : IsNormal f) {o : OrdinalOrdinal.{u}}
    (h : IsLimit o) : (blsub.{_, v} o fun x _ => f x) = f o := by
  rw [← IsNormal.bsup_eq.{u, v} H h, bsup_eq_blsub_of_lt_succ_limit h]
  exact fun a _ => H.1 a
Normal Functions Preserve Bounded Least Strict Upper Bounds at Limit Ordinals: $\mathrm{blsub}_o f = f(o)$
Informal description
Let $f$ be a normal function from ordinals to ordinals (i.e., strictly increasing and continuous at limit ordinals). For any limit ordinal $o$, the bounded least strict upper bound of $f$ restricted to ordinals less than $o$ equals $f(o)$. That is, \[ \mathrm{blsub}_o (\lambda x \_, f(x)) = f(o). \]
Ordinal.isNormal_iff_lt_succ_and_bsup_eq theorem
{f : Ordinal.{u} → Ordinal.{max u v}} : IsNormal f ↔ (∀ a, f a < f (succ a)) ∧ ∀ o, IsLimit o → (bsup.{_, v} o fun x _ => f x) = f o
Full source
theorem isNormal_iff_lt_succ_and_bsup_eq {f : OrdinalOrdinal.{u}OrdinalOrdinal.{max u v}} :
    IsNormalIsNormal f ↔ (∀ a, f a < f (succ a)) ∧ ∀ o, IsLimit o → (bsup.{_, v} o fun x _ => f x) = f o :=
  ⟨fun h => ⟨h.1, @IsNormal.bsup_eq f h⟩, fun ⟨h₁, h₂⟩ =>
    ⟨h₁, fun o ho a => by
      rw [← h₂ o ho]
      exact bsup_le_iff⟩⟩
Characterization of Normal Ordinal Functions via Successor and Bounded Supremum Conditions
Informal description
A function $f$ from ordinals to ordinals is normal if and only if it satisfies the following two conditions: 1. For every ordinal $a$, $f(a) < f(\text{succ } a)$. 2. For every limit ordinal $o$, the bounded supremum of $f$ restricted to ordinals less than $o$ equals $f(o)$, i.e., \[ \mathrm{bsup}_o (\lambda x \_, f(x)) = f(o). \]
Ordinal.isNormal_iff_lt_succ_and_blsub_eq theorem
{f : Ordinal.{u} → Ordinal.{max u v}} : IsNormal f ↔ (∀ a, f a < f (succ a)) ∧ ∀ o, IsLimit o → (blsub.{_, v} o fun x _ => f x) = f o
Full source
theorem isNormal_iff_lt_succ_and_blsub_eq {f : OrdinalOrdinal.{u}OrdinalOrdinal.{max u v}} :
    IsNormalIsNormal f ↔ (∀ a, f a < f (succ a)) ∧
      ∀ o, IsLimit o → (blsub.{_, v} o fun x _ => f x) = f o := by
  rw [isNormal_iff_lt_succ_and_bsup_eq.{u, v}, and_congr_right_iff]
  intro h
  constructor <;> intro H o ho <;> have := H o ho <;>
    rwa [← bsup_eq_blsub_of_lt_succ_limit ho fun a _ => h a] at *
Characterization of Normal Ordinal Functions via Successor and Bounded Least Strict Upper Bound Conditions
Informal description
A function $f$ from ordinals to ordinals is normal if and only if it satisfies the following two conditions: 1. For every ordinal $a$, $f(a) < f(\text{succ } a)$. 2. For every limit ordinal $o$, the bounded least strict upper bound of $f$ restricted to ordinals less than $o$ equals $f(o)$, i.e., \[ \mathrm{blsub}_o (\lambda x \_, f(x)) = f(o). \]
not_surjective_of_ordinal theorem
{α : Type u} (f : α → Ordinal.{u}) : ¬Surjective f
Full source
theorem not_surjective_of_ordinal {α : Type u} (f : α → OrdinalOrdinal.{u}) : ¬Surjective f := fun h =>
  Ordinal.lsub_not_mem_range.{u, u} f (h _)
No Surjection from a Type to its Ordinals
Informal description
For any type $\alpha$ in universe $u$, there is no surjective function $f : \alpha \to \text{Ordinal}$ from $\alpha$ to the ordinals in the same universe.
not_injective_of_ordinal theorem
{α : Type u} (f : Ordinal.{u} → α) : ¬Injective f
Full source
theorem not_injective_of_ordinal {α : Type u} (f : OrdinalOrdinal.{u} → α) : ¬Injective f := fun h =>
  not_surjective_of_ordinal _ (invFun_surjective h)
No Injection from Ordinals to a Type in the Same Universe
Informal description
For any type $\alpha$ in universe $u$, there is no injective function $f : \text{Ordinal} \to \alpha$ from the ordinals in universe $u$ to $\alpha$.
not_surjective_of_ordinal_of_small theorem
{α : Type v} [Small.{u} α] (f : α → Ordinal.{u}) : ¬Surjective f
Full source
theorem not_surjective_of_ordinal_of_small {α : Type v} [Small.{u} α] (f : α → OrdinalOrdinal.{u}) :
    ¬Surjective f := fun h => not_surjective_of_ordinal _ (h.comp (equivShrink _).symm.surjective)
No Surjection from a Small Type to Ordinals in a Smaller Universe
Informal description
For any type $\alpha$ in universe $v$ that is $u$-small, there is no surjective function $f \colon \alpha \to \text{Ordinal}_{u}$ from $\alpha$ to the ordinals in universe $u$.
not_injective_of_ordinal_of_small theorem
{α : Type v} [Small.{u} α] (f : Ordinal.{u} → α) : ¬Injective f
Full source
theorem not_injective_of_ordinal_of_small {α : Type v} [Small.{u} α] (f : OrdinalOrdinal.{u} → α) :
    ¬Injective f := fun h => not_injective_of_ordinal _ ((equivShrink _).injective.comp h)
No Injection from Ordinals to a Small Type in a Smaller Universe
Informal description
For any type $\alpha$ in universe $v$ that is $u$-small, there is no injective function $f \colon \text{Ordinal}_{u} \to \alpha$ from the ordinals in universe $u$ to $\alpha$.
not_small_ordinal theorem
: ¬Small.{u} Ordinal.{max u v}
Full source
/-- The type of ordinals in universe `u` is not `Small.{u}`. This is the type-theoretic analog of
the Burali-Forti paradox. -/
theorem not_small_ordinal : ¬Small.{u} Ordinal.{max u v} := fun h =>
  @not_injective_of_ordinal_of_small _ h _ fun _a _b => Ordinal.lift_inj.{v, u}.1
Ordinals in a Higher Universe are Not Small in a Lower Universe
Informal description
The type of ordinals in universe $\text{max}(u, v)$ is not $\text{Small}\{u\}$.
Ordinal.not_bddAbove_compl_of_small theorem
(s : Set Ordinal.{u}) [hs : Small.{u} s] : ¬BddAbove sᶜ
Full source
theorem Ordinal.not_bddAbove_compl_of_small (s : Set OrdinalOrdinal.{u}) [hs : Small.{u} s] :
    ¬BddAbove sᶜ := by
  rw [bddAbove_iff_small]
  intro h
  have := small_union s sᶜ
  rw [union_compl_self, small_univ_iff] at this
  exact not_small_ordinal this
Unboundedness of the Complement of a Small Set of Ordinals
Informal description
For any set $s$ of ordinals in universe level $u$, if $s$ is $u$-small (i.e., there exists a bijection between $s$ and a type in universe level $u$), then the complement set $s^c$ is not bounded above in the ordinals.
Ordinal.lt_add_of_limit theorem
{a b c : Ordinal.{u}} (h : IsLimit c) : a < b + c ↔ ∃ c' < c, a < b + c'
Full source
theorem lt_add_of_limit {a b c : OrdinalOrdinal.{u}} (h : IsLimit c) :
    a < b + c ↔ ∃ c' < c, a < b + c' := by
  -- Porting note: `bex_def` is required.
  rw [← IsNormal.bsup_eq.{u, u} (isNormal_add_right b) h, lt_bsup, bex_def]
Limit Ordinal Addition Inequality: $a < b + c \leftrightarrow \exists c' < c, a < b + c'$
Informal description
For ordinals $a$, $b$, and a limit ordinal $c$, the inequality $a < b + c$ holds if and only if there exists an ordinal $c' < c$ such that $a < b + c'$.
Ordinal.iSup_natCast theorem
: iSup Nat.cast = ω
Full source
@[simp]
theorem iSup_natCast : iSup Nat.cast = ω :=
  (Ordinal.iSup_le fun n => (nat_lt_omega0 n).le).antisymm <| omega0_le.2 <| Ordinal.le_iSup _
Supremum of Natural Numbers as Ordinals is $\omega$
Informal description
The supremum of the image of the natural numbers under the canonical embedding into ordinals is equal to the first infinite ordinal $\omega$. That is, \[ \sup_{n \in \mathbb{N}} n = \omega. \]
Ordinal.IsNormal.apply_omega0 theorem
{f : Ordinal.{u} → Ordinal.{v}} (hf : IsNormal f) : ⨆ n : ℕ, f n = f ω
Full source
theorem IsNormal.apply_omega0 {f : OrdinalOrdinal.{u}OrdinalOrdinal.{v}} (hf : IsNormal f) :
    ⨆ n : ℕ, f n = f ω := by rw [← iSup_natCast, hf.map_iSup]
Normal Function Supremum Property: $\sup_n f(n) = f(\omega)$
Informal description
For any normal ordinal function $f \colon \text{Ordinal} \to \text{Ordinal}$, the supremum of the sequence $\{f(n)\}_{n \in \mathbb{N}}$ is equal to $f(\omega)$, where $\omega$ is the first infinite ordinal. That is, \[ \sup_{n \in \mathbb{N}} f(n) = f(\omega). \]
Ordinal.iSup_add_nat theorem
(o : Ordinal) : ⨆ n : ℕ, o + n = o + ω
Full source
@[simp]
theorem iSup_add_nat (o : Ordinal) : ⨆ n : ℕ, o + n = o + ω :=
  (isNormal_add_right o).apply_omega0
Supremum of Ordinal Addition with Naturals: $\sup_n (o + n) = o + \omega$
Informal description
For any ordinal $o$, the supremum of the sequence $\{o + n\}_{n \in \mathbb{N}}$ is equal to $o + \omega$, where $\omega$ is the first infinite ordinal. That is, \[ \sup_{n \in \mathbb{N}} (o + n) = o + \omega. \]
Ordinal.iSup_mul_nat theorem
(o : Ordinal) : ⨆ n : ℕ, o * n = o * ω
Full source
@[simp]
theorem iSup_mul_nat (o : Ordinal) : ⨆ n : ℕ, o * n = o * ω := by
  rcases eq_zero_or_pos o with (rfl | ho)
  · rw [zero_mul]
    exact iSup_eq_zero_iff.2 fun n => zero_mul (n : Ordinal)
  · exact (isNormal_mul_right ho).apply_omega0
Supremum of Ordinal Multiples: $\sup_n (o \cdot n) = o \cdot \omega$
Informal description
For any ordinal $o$, the supremum of the sequence $\{o \cdot n\}_{n \in \mathbb{N}}$ is equal to $o \cdot \omega$, where $\omega$ is the first infinite ordinal. That is, \[ \sup_{n \in \mathbb{N}} (o \cdot n) = o \cdot \omega. \]