Ordinal arithmetic #
Ordinals have an addition (corresponding to disjoint union) that turns them into an additive monoid, and a multiplication (corresponding to the lexicographic order on the product) that turns them into a monoid. One can also define correspondingly a subtraction, a division, a successor function, a power function and a logarithm function.
We also define limit ordinals and prove the basic induction principle on ordinals separating
successor ordinals and limit ordinals, in limitRecOn.
Main definitions and results #
o₁ + o₂is the order on the disjoint union ofo₁ando₂obtained by declaring that every element ofo₁is smaller than every element ofo₂.o₁ - o₂is the unique ordinalosuch thato₂ + o = o₁, wheno₂ ≤ o₁.o₁ * o₂is the lexicographic order ono₂ × o₁.o₁ / o₂is the ordinalosuch thato₁ = o₂ * o + o'witho' < o₂. We also define the divisibility predicate, and a modulo operation.Order.succ o = o + 1is the successor ofo.pred oif the predecessor ofo. Ifois not a successor, we setpred o = o.
We discuss the properties of casts of natural numbers of and of ω with respect to these
operations.
Some properties of the operations are also used to discuss general tools on ordinals:
Order.IsSuccLimit o: an ordinal is a limit ordinal if it is neither0nor a successor.limitRecOnis the main induction principle of ordinals: if one can prove a property by induction at successor ordinals and at limit ordinals, then it holds for all ordinals.IsNormal: a functionf : Ordinal → OrdinalsatisfiesIsNormalif it is strictly increasing and order-continuous, i.e., the imagef oof a limit ordinalois the sup off afora < o.
Various other basic arithmetic results are given in Principal.lean instead.
Further properties of addition on ordinals #
Limit ordinals #
Alias of Ordinal.isSuccLimit_iff.
Alias of Order.IsSuccLimit.isSuccPrelimit.
Alias of Order.IsSuccLimit.succ_lt.
Alias of Ordinal.not_isSuccLimit_zero.
Alias of Order.not_isSuccLimit_succ.
Alias of Order.IsSuccLimit.succ_lt_iff.
Alias of Order.IsSuccLimit.le_succ_iff.
Alias of Order.IsSuccLimit.le_iff_forall_le.
Alias of Order.IsSuccLimit.lt_iff_exists_lt.
Alias of Ordinal.isSuccLimit_lift.
Alias of Ordinal.natCast_lt_of_isSuccLimit.
Alias of Ordinal.one_lt_of_isSuccLimit.
Alias of Order.IsSuccLimit.sSup_Iio.
Alias of Order.IsSuccLimit.iSup_Iio.
Main induction principle of ordinals: if one can prove a property by induction at successor ordinals and at limit ordinals, then it holds for all ordinals.
Equations
- Ordinal.limitRecOn o zero succ limit = SuccOrder.limitRecOn o (fun (_a : Ordinal.{?u.78}) (ha : IsMin _a) => ⋯ ▸ zero) (fun (a : Ordinal.{?u.78}) (x : ¬IsMax a) => succ a) limit
Instances For
Bounded recursion on ordinals. Similar to limitRecOn, with the assumption o < l
added to all cases. The final term's domain is the ordinals below l.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- o.orderTopToTypeSucc = { top := (Ordinal.enum fun (x1 x2 : (Order.succ o).toType) => x1 < x2).toRelEmbedding ⟨o, ⋯⟩, le_top := ⋯ }
The predecessor of an ordinal #
The ordinal predecessor of o is o' if o = succ o', and o otherwise.
Equations
- o.pred = Order.isSuccPrelimitRecOn o (fun (a : Ordinal.{?u.11}) (x : ¬IsMax a) => a) fun (a : Ordinal.{?u.11}) (x : Order.IsSuccPrelimit a) => a
Instances For
Alias of Ordinal.pred_eq_of_isSuccPrelimit.
Normal ordinal functions #
A normal ordinal function is a strictly increasing function which is
order-continuous, i.e., the image f o of a limit ordinal o is the sup of f a for
a < o.
Todo: deprecate this in favor of Order.IsNormal.
Equations
Instances For
Subtraction on ordinals #
a - b is the unique ordinal satisfying b + (a - b) = a when b ≤ a.
Equations
- Ordinal.sub = { sub := fun (a b : Ordinal.{?u.7}) => if h : b ≤ a then Classical.choose ⋯ else 0 }
Alias of Ordinal.lt_add_iff_of_isSuccLimit.
Alias of Ordinal.add_le_iff_of_isSuccLimit.
Alias of Ordinal.isSuccLimit_add.
Alias of Ordinal.isSuccLimit_add.
Alias of Ordinal.isSuccLimit_sub.
Multiplication of ordinals #
The multiplication of ordinals o₁ and o₂ is the (well-founded) lexicographic order on
o₂ × o₁.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Ordinal.monoidWithZero = { toMonoid := Ordinal.monoid, zero := 0, zero_mul := Ordinal.monoidWithZero._proof_1, mul_zero := Ordinal.monoidWithZero._proof_2 }
Alias of Ordinal.mul_le_iff_of_isSuccLimit.
Alias of Ordinal.lt_mul_iff_of_isSuccLimit.
Alias of Ordinal.isSuccLimit_mul.
Alias of Ordinal.isSuccLimit_mul_left.
Alias of Ordinal.add_mul_of_isSuccLimit.
Division on ordinals #
a / b is the unique ordinal o satisfying a = b * o + o' with o' < b.
Equations
- Ordinal.div = { div := fun (a b : Ordinal.{?u.5}) => if b = 0 then 0 else sInf {o : Ordinal.{?u.5} | a < b * Order.succ o} }
Alias of Ordinal.isSuccLimit_add_iff.
a % b is the unique ordinal o' satisfying
a = b * o + o' with o' < b.
Equations
- Ordinal.mod = { mod := fun (a b : Ordinal.{?u.4}) => a - b * (a / b) }
Casting naturals into ordinals, compatibility with operations #
Properties of ω #
Alias of Ordinal.isSuccLimit_omega0.
Alias of Ordinal.natCast_lt_of_isSuccLimit.
Alias of Ordinal.omega0_le_of_isSuccLimit.
Alias of Ordinal.isSuccLimit_iff_omega0_dvd.
Alias of Cardinal.isSuccLimit_ord.