User blog:Bubby3/Dropping worm function

Here, I am going to indroduce a creative and much simpler version of DAN and dropping hydra. It is all of DAN, minus all of the nesting and tree system.

The notation is a worm of 0's, 1's and A's called W. The A can only be first, and the worm must start with an A. A's have the lowest level, 0's have a higher level, and 1's have the highest level. It has two numerical variables, n and m, in the form of (n,m)W. n never changes, because it is the dropping level. m is the ocunter like the m in f_#(n). The subworm from entry a to b is W[a,b], and the length is l.

To compare the levels of two worms, compare them lexicographically, based on the levels of their entries.

Here are the rules
 * 1) If the last entry is 0, cut it off and incream m by 1.
 * 2) If the last entry is 1, then do the following
 * 3) Let C(0) be l, or the length
 * 4) Repeat these steps n times from i = 1 to n
 * 5) Let C(i) be the largest of D so that W[D,l] which has a level lower than W[C(i-1),l] and D is less than C(i-1)
 * 6) If C(1) = 1 then.
 * 7) Worm W_1 is obtained by the worm W, by adding a 0 between the A and the rest of i.
 * 8) (n,m)W = (n,m)W_1
 * 9) If i > 1 then let B(i) be the result of replacing W[C(i-2),l] by W[C(i-1),l] in W[C(i-1),l]
 * 10) If i > 1 and W[C(i),l] < B(i) then
 * 11) Let k(i) be the least of D such that W[D,l] has a level less than W[C(i-2),l] and D > C(n)
 * 12) Worm A(i) is obtained by replacing W[C(i-2),l] by W[k(i),l] from W[C(i-1),l]
 * 13) Worm W_2(i) is obtained by replacing W[k(i),l] by A(i) from W
 * 14) (n,m)W = (n,m)W_2(i)
 * 15) If i = 1 or W[C(i),l] >= B(i), then keep repeating, otherwise stop.
 * 16) Let S_0 be a worm with just a 0, S_(D+1) is obtained by replacing W[C(n-1),l] by S_D from W[C(n),l]
 * 17) Tree T_3 is obtained by replacing W[C(n),l] with S_m from W.
 * (n,m)W = (n,m)W_3