Cantor Normal Form #
The Cantor normal form of an ordinal is generally defined as its base ω expansion, with its
non-zero exponents in decreasing order. Here, we more generally define a base b expansion
Ordinal.CNF in this manner, which is well-behaved for any b ≥ 2.
Implementation notes #
We implement Ordinal.CNF as an association list, where keys are exponents and values are
coefficients. This is because this structure intrinsically reflects two key properties of the Cantor
normal form:
- It is ordered.
- It has finitely many entries.
Todo #
- Prove the basic results relating the CNF to the arithmetic operations on ordinals.
Cantor normal form as a list #
Inducts on the base b expansion of an ordinal.
Instances For
Recursive definition for the Cantor normal form.
Evaluating the Cantor normal form of an ordinal returns the ordinal.
Every exponent in the Cantor normal form CNF b o is less or equal to log b o.
Every coefficient in a Cantor normal form is positive.
Alias of Ordinal.CNF.snd_pos.
Every coefficient in a Cantor normal form is positive.
Every coefficient in the Cantor normal form CNF b o is less than b.
The exponents of the Cantor normal form are decreasing.
Alias of Ordinal.CNF.sortedGT.
The exponents of the Cantor normal form are decreasing.
Cantor normal form as a finsupp #
Alias of Ordinal.CNF.coeff_of_notMem_CNF.
Evaluate a Cantor normal form #
CNF.eval f evaluates a Finsupp f : Ordinal →₀ Ordinal, interpreted as a
base b expansion on ordinals.
Instances For
For a slightly stronger version, see eval_single_add.