User blog:Rgetar/Converting CNF into epsilon power multiplier form

Let an ordinal is given as Cantor normal form (CNF)
 * ωα0 + ωα1 + ωα2 + ...
 * α0 ≥ α1 ≥ α2 ≥ ...
 * αi are also given as CNF

Epsilon power multiplier form
Let we want to convert it into "epsilon power multiplier form" (EPM) that is convert each term ωαi ≥ ε0 into
 * ωαi → εx i βiγi
 * εx i ≤ ωαi < εx i + 1
 * γi < εx i

where xi, βi, γi are also converted into EPM, and each term ωαi < ε0 is not converted.

Converting a CNF term
If ωαi < ε0 then do not convert. Else find xi such as
 * εx i ≤ ωαi < εx i + 1
 * (note that εx i ≤ αi < εx i + 1 )
 * ωαi = εx i βiγi

Then
 * βi = brain(αi)
 * γi = ωtail(αi)

where
 * αi = εx i brain(αi) + tail(αi)
 * tail(αi) < εx i

Then convert also each βi and γi.

Computing brain and tail
Tail is part of CNF of αi, which consisnts of terms less than εx i. The other part is
 * εx i brain(αi)

which consists of terms larger than or equal to εx i. Let its CNF is
 * εx i brain(αi) = ωδ0 + ωδ1 + ωδ2 + ...

where
 * εx i ≤ δj < εx i + 1

To convert εx i brain(αi) into brain(αi) replace each δj with δ*j such as
 * δj = εx i + δ*j

That is
 * if first (left) CNF term of δj is larger than εx i, then do nothing
 * else if first CNF term of δj equal to εx i, then remove this first term

(Note: first CNF term of δj cannot be less than εx i due to εx i ≤ δj < εx i + 1 ).

Examples

 * ωε0 + 1 = ε0ω
 * ωε02 = ε02
 * ωω ε0 + 1 = ε0ω
 * ωω ε02 = ε0ε0
 * ωω ω ε0 + 1 = ε0ε0 ω
 * ωω ω ε02 = ε0ε0 ε0
 * ωΩ + 1 = Ωω
 * ωΩ2 = Ω2
 * ωω Ω + 1 = Ωω
 * ωω Ω2 = ΩΩ
 * ωω ω Ω + 1 = ΩΩ ω
 * ωω ω Ω2 = ΩΩ Ω

Program
I tried to convert ordinals into EPM about one year ago in my program Ordinal Explorer v2.0, and then I failed (for example, it converted ωε0 + 1, ωε02, ωω ε0 + 1, ωω ε02 , but did not convert properly ωω ω ε0 + 1 , ωω ω ε02  and higher power towers). Today I fixed this program using this method, and now it works. Possibly, I will use this converting method in my newer programs.