User blog comment:Ikosarakt1/Symbols function/@comment-25418284-20121205235359

I've been trying to define a minimal formal system that allows recursion, then defining an s function as you have. However, it doesn't seem to work. Here is my unsuccessful attempt:


 * v(1) = 1
 * v(+ST) = v(S) + v(T)
 * v(*1S) = 1
 * v(*nSTU) = v(nSnS...nSnST) with s(U) copies of nS

For example, v(+11) = 2, and v(*+1+11++111) = v(++11++11++111) = 7. (+ and * are prefix operators.) Sadly, the system breaks down when U is itself an expression beginning with *. *++11*++11++11 creates an infinite loop. Thoughts?