User blog:B1mb0w/Recursion and Summation Functions

Recursion & Summation Functions
These functions are used to create short hand notation for nested functions. They are a further development of notation I use that is not in common use.

Review of my Basic Notation
Here is a summary review of my notation:

Decremented Function \(C\) is short-hand notation. For any arbitrary function:

\(M^{c + 1}(n)\) then \(C = M^{c}(n)\)

e.g.

\(M^{c + 1}(n) = M(C) = M(M^c(n))\)

Parameter Subscript Brackets is shorthand for functions with multiple parameters:

\(M(x,0_{[2]}) = M(x,0,0)\)

\(M(x,y_{[2]}) = M(x,y_1,y_2)\)

\(M(x,0_{[2]},y_{[3]},z) = M(x,0,0,y_1,y_2,y_3,z)\)

Leading Zeros Assumption applies and all leading zeroes can be ignored:

\(M(0_{[x]},0_{[2]},y_{[3]},1) = M(0_{[x + 2]},y_{[3]},1) = t_0(y_{[3]},1) = M(y_1,y_2,y_3,1)\)

Recursion Function
A new function \(R\) is introduced to standardise the notation for nested functions. The function acts on other functions by treating them as string literals. Therefore, the \(R\) function has no defined mathematical operation. It simply constructs nested functions from any arbitrary function that can be operated by using the definition of the arbitrary function.

Here are some trivial uses of the \(R\) function.

\(R(a,r) = a\)

\(R^{c + 1}(a,r) = a\)

\(R^{c + 1}(a,M(r)) = M(C) = M(R^{c}(a,M(r))) = M^{c + 1}(a)\)

I use the \(R\) function to completely replace any use of Recursion Parameter Subscript \(*\) which I used extensively to define how recursion applies to multi-parameter functions. e.g.:

\(M^{c + 1}(1,n_*) = M(1,C) = M(1,M^c(1,n_*))\)

\(M^{c + 1}(1_*,n) = M(C,n) = M(M^c(1,n_*),n)\)

Using the \(R\) function for these examples we get:

\(R^{c + 1}(n,M(1,r)) = M(1,C) = M(1,R^{c}(n,M(1,n)))\)

\(R^{c + 1}(1,M(r,n)) = M(C,n) = M(R^{c}(1,M(r,n)),n)\)

Remember, the \(R\) function has no defined mathematical operation. Instead it replaces the instance of \(r\) with itself and decrements its exponent by 1. Here are more examples:

\(R^{c + 1}(y,W(x,r,z)) = W(x,C,z) = W(x,R^{c}(y,W(x,r,z)),z)\)

\(R(y,W(x,r,z)) = W(x,y,z)\)

Nested Recursion Function
The \(R\) function can be nested. Subscripts are required to uniquely identify the \(r\) replacement variable. Here are more examples:

\(R^{3}(y,W(x,r,z)) = W(x,C,z) = W(x,R^{2}(y,W(x,r,z)),z)\)

\(= R_0^{3}(y,W(x,r_0,z)) = W(x,C,z) = W(x,R_0^{2}(y,W(x,r_0,z)),z)\)

then by evaluating \(R\) function in reverse order of their subscripts we get:

\(R_1^{2}(x,R_0^{3}(y,W(r_1,r_0,z)))\)

TBA TBA  TBA  TBA  TBA  TBA  TBA  TBA  TBA  TBA  TBA

\(= R_0^{3}(y,W(R_1(x,R_0^{3}(y,W(r_1,r_0,z))),r_0,z))\)

\(= R_0^{3}(y,W(R_0^{3}(y,W(x,r_0,z))),r_0,z))\)

Indexing Notation is shorthand notation (index) for a function within a nested stack.

\(t_0^5(0) = t_0(t_0(t_0(t_0(t_0(0)))))\)

then indexing notation is useful shorthand for these nested functions.

\(t_0^5(Q(t_0^{[4]}(0))) = t_0(Q(t_0(t_0(t_0(t_0(0)))))) = t_0(Q(t_0^4(0)))\)

\(t_0^5(Q^2(t_0^{[2]}(0))) = t_0(t_0(t_0(Q^2(t_0(t_0(0)))))) = t_0^3(Q^2(t_0^2(0)))\)

\(t_0^5(Q(t_0^{[4]}(Q^2(t_0^{[2]}(0))))) = t_0(Q(t_0(t_0(Q^2(t_0(t_0(0))))))) = t_0(Q(t_0^2(Q^2(t_0^2(0)))))\)

and indexing notation is used by the \(t\) function:

Rule 8: \(t_0^{c + 1}(x) = t_0(C) = D\)

then

\(Q^D(D_*,D) = t_0^{c + 1}(Q(t_0^{[c]}(x))) = t_0(Q(t_0^c(x)))\)

e.g.

\(t_0(1,0) = t_0^C(1_*,0_{[0]}) = t_0^C(1) = t_0^{t_0(1)}(1)\)

Summation Notation introduces summation functions \(t_0(s)\) for use with Indexing Notation:

Rule s1: \(t_0(s)(t_0(1,0)) = t_0(1)\)

Rule s2: \(t_0(s)(t_0(1,c + 1)) = t_0(1,c) + C = t_0(1,c) + t_0(s)(t_0(1,c))\)

\(t_0(1,s)(t_0(2,0)) = t_0(1,0)\)

\(t_0(1,s)(t_0(2,c + 1)) = t_0(2,c) + C = t_0(2,c) + t_0(1,s)(t_0(2,c))\)

Rule s3: \(t_0(c,s)(t_0(c + 1,0)) = t_0(c,0)\)

Rule s3 is the general rule for Rule s1 where \(c = 0\)

Rule s4: \(t_0(c,s)(t_0(c + 1,x)) = t_0(c + 1,x) + C = t_0(c + 1,x) + t_0(c,s)(t_0(x + 1,c))\)

Rule s5: \(t_0(x,s)(t_0(x + 1,c + 1)) = t_0(x + 1,c + 1) + C = t_0(x + 1,c + 1) + t_0(x,s)(t_0(x + 1,c))\)

Rule s5 is the general rule for Rule s2 where \(x = 0\)

Rules s3 and s5 can be combined into Rule s6

Rule s6: \(t_0(c + 1,s)(t_0(c + 2,0)) = t_0(c + 1,0) = t_0(c,s)(t_0(c + 1,1))\)

Further References
Further references to relevant blogs can be found here: User:B1mb0w