Bringing this to the recent:
PAIN 3.0:
a = base if a is to the left of P.
aP = a+1
aP... = (... ((aP,,,)P,,,)P,,, ... )P,,, with 'a' nestings and ,,, = reduced(...)
If k is the left-most thing that is a number and greater than zero, then: reduced(n#...#p#k+1#...) = n#...#p'#p'#...#p'#a#p#k#..., with 'a' iteration of #p', where p' = reduced(p)
reduced(0) = a
In a line of #'s, if the last entry is not a number greater than zero, drop it
<{?-}...> is the notation nester.
If the ... is empty, then we have reduced(<{?-}>) = ???...?a with 'a' nestings of ?