User blog comment:Ynought/The degree function/@comment-36957202-20181227173203/@comment-35470197-20181228022702

It is better for me to show an example of a way to write a definition which is "readable from above". (It is readable for me, but it does not mean that it is readabel for others.)

For example, see the following:

A term means an expression of the form \((a)_b\) for numral numbers \(a\) and \(b\). For a term \(t = (a)_b\), I call \(a\) the upper value of \(t\).

For a finite array \(B = ((a_1)_{b_1},\ldots,(a_L)_{b_L})\) of terms and a natural number \(n\), I denote by \(B + n\) the finite array of terms given by adding \(n\) to the upper value of each entry of \(B\), i.e. \(((a_1+n)_{b_1},\ldots,(a_L+n)_{b_L})\).

For a natural number \(k\) and a finite array \(B\) of terms, I define a natural number \([k] B\) in the following way:


 * 1) Put \(f(k) = k^3\).
 * 2) Suppose that \(B\) is the empty array, then \([k] B = f(k)\).
 * 3) Otherwise, denote by \(A\) the left most entry of \(B\).
 * 4) Suppose that there is an entry of \(B\) of the form \((n)_0\) or \((0)_n\) for some natural number \(n\).
 * 5) Let \(n\) denote the minimum of such one.
 * 6) Replace \(B\) by the finite array of terms obtained by removing from \(B\) all entries of the form \((n)_0\) or \((0)_n\).
 * 7) Replace \(B\) by \(B + k + n\).
 * 8) Replace \(k\) by \(f(k)\).
 * 9) Go to 2.
 * 10) Otherwise, ...