A form of arithmetic based on program's source code

Definitions

A+B=addition of blocks A and B;
A,B=branches of node A+B=
A
B
;
A B=AB=a b;
A[]=a {};
A[]B=a { b };
A[]B[]=a { b{} };
A(B,C)=A B,C=tree with root A and branches B,C;
[N]=tree that has a single root;
[[M]]=tree that has more than one root;
Therefore, [N][[M]] results in another tree with a single root,
but [[M]][N] does not result in this.

Special cases

Laws

A+B=B+A;
A,B≠B,A, except when A=B;
AB≠BA, except when A=B;
A[]B≠B[]A, except when A[]=B[];
A[]B[]≠B[]A[], except when A[]=B[];

What about [N]n or [[M]]m or [N]n[[M]]m?

Hosted by www.Geocities.ws

1