User blog:Wythagoras/Dollar function: complete ruleset

\(\bullet\) can be anything

\(\circ\) is a group of brackets.

\(\diamond\) contains only zeroes and seperators

1. If there is nothing after the $, the array is solved. The value of the array is the number before the $.

2. \(a\$b\bullet=(a+b)\$\bullet\)

3. \(a\$\circ[0]\bullet\circ=a\$\circ a\bullet\circ\)

4. \(a\$\circ[\bullet+1]_c\bullet\circ=a\$\circ[\bullet]_c[\bullet]_c...[\bullet]_c[\bullet]_c\bullet\circ\) with a \(\bullet\)'s

5. If the bracket contains a zero and the bracket has other content, you can remove the zero.

6. If the active bracket has level k and a zero in it, search for the least nested bracket with level (k-1) with the same array in it, nest that bracket a times in the place of the level k bracket.

7. \( b\bullet,c\bullet,\text{◆} = [[0,c-1\bullet,\text{◆}]_{[b-1\bullet,c\bullet,\text{◆}]1}]\)

8. \( \diamond,b\bullet,c\bullet,\bullet = [[\diamond,[\diamond,b\bullet,c-1\bullet,\bullet]_{[\diamond,b-1\bullet,c\bullet,\bullet]},c-1,\bullet]\)

10. \([0,c\bullet,\bullet] = [0]\)

11. \([0]e^{\bullet}0 = [0]\)

12. \([0]e^{\bullet}(b\bullet) = [0(\bullet)0...0(\bullet)1]e^c(b-1\bullet)\) a entries

13. \([\diamond(c,\bullet)b] = [\diamond(c,\bullet)b-1]e^{c,\bullet}([\diamond(c,\bullet)b-1]e^{c,\bullet}([\diamond(c,\bullet)b-1]e^{c,\bullet}(...)))\) where the \(e\) operator works on the first dimension before \((c,\bullet)\)

14. \([b\bullet(\diamond,0,c)1] = [0(\diamond,[b-1\bullet(\diamond,0,c)1][b-1\bullet(\diamond,0,c)1],c-1)1]\)

15. \([0(\diamond,0,c)1] = [0]\)

S1: The outermost bracket is always level 1

S2: If there is no bracket with level (k-1), add it directly after the level k bracket.

An comma is can be written shorthand for (0).