# Tree Fraction Calculator

 1
$\bot$
 2
$\bot$
 ? =
 3
$\bot$
To have a fast visual effect ;) try the following:
1. Enter 4 in the 1st cell, enter ~5 in the 2nd cell, press then * (uncancelled multiplication) between them. A big expression on the right side (3rd cell) appears,
2. now press % (cancel) on the 3rd cell
3. and enjoy reducing the right side.
Some more examples you should try:
 general equation examples (the subscripts mean the assigned cell) xo(~x)=1 enter [1,2,3]1, ~[1,2,3]2, press *, %3 (1+x)o(~x)=x+1 enter [1,2,3,4]1, press to21, ~1, 1+1, o ~(xoy)=(~y)o(~x) enter 41, ~52, press o, new cell, as34, swap, ~1, ~2, o, ~3 cell 3 and 4 should be equal, press x4 (xo(~y))o(yoz)=xoz enter 4 * (~3)1, press enter1, %1, enter 3 o (~5)2, press enter2, o, enter 4 o (~5)3, press enter ? enter [1,2,3]1, [2,3,4]2, press ~2, *, %3 enter [1,[1,1]]1, [1,[1,1],[[1,1,1]];]2, press *, %3 Caution: computation expensive! Could fail to finish,with error message. $2^{n+1}\circ 2^{-n}=2$ enter [1,2,[1,2]]1, [1,2]2, press ~2, *, %3 enter [1,2,[1,2],[1,2,[1,2]]]1, [1,2,[1,2]]2, press ~2, * , %3 (does not work with IE, expression too big) Notice that $2^n$ corresponds to the number n as defined in set theory, e.g. $2^3$ = {{},{{}},{{},{{}}}}=[1,2,[1,2]] enter 2o2o2o21, 2o2o22, press ~2, * , %3
After that, experiment for your own.

### Some more details

Fractional trees have the general form
$\begin{Bmatrix}b_1,\dots,b_n \\ a_1,\dots,a_m\end{Bmatrix}$
where those a1,...,am;b1,...,bn are again fractional trees. So they are built up recursively, starting with 1. The order of the ai and the order of the bi does not matter. The text notation for the (above) fractional tree is [a1,...,am;b1,...,bn], which can be quite unmanageable for bigger expression. For [;b1,...,bn] we write short [b1,...,bn]. The natural numbers are short for [...[1]...], for example 4 is short for [[[1]]]. To handle empty sequences in the graphical representation we write according with the rules

$1=[;]$
$\begin{Bmatrix}b_1,\dots,b_n\end{Bmatrix}=[;b_1,...,b_n]$
$\sim\begin{Bmatrix}a_1,\dots,a_m\end{Bmatrix}=[a_1,...,a_m;]$

The fraction intention is expressed by

$\sim\{a_1,\dots,a_m\}\circ \{b_1,\dots,b_n\}=\begin{Bmatrix}b_1,\dots,b_n \\ a_1,\dots,a_m\end{Bmatrix}$

Verify the following laws by some examples

1oa = ao1 = a
ao(~a) = (~a)oa = 1
ao(boc)=(aob)oc (associative)
a*(b*c)=(a*b)*c
a+(b+c)=b+(a+c) (left-commutative)

You see that 1,o,~ form a group. By further playing
1. Find out how ~ (inversion) works! (easy)
2. Find out how the * (uncanceled multiplication) works!
3. Find out how % (canceling) works! (terrible)
The canceled multiplication aob is implemented differently from simply %(a*b), i.e. canceling the uncanceled multiplication, but they should yield the same result on canceled arguments. As you have seen from the introductory examples you can also input expressions involving the given operations in the input field of every cell. The parser recognizes the same operations as written on the buttons,
though be aware that parsing is not very robust. Note that expressions can become big very fast. And computations then rapidly increase in time, so the server will kill the process after some seconds and you retrieve an error page.

Fractional trees are a generalization of fractional numbers. If we call an algebraic structure (C,1,+,o,~) a coppice if (C,1,o,~) is a group and if (a+b)oc = (aoc) + (boc) then the fractional numbers are the free +-associative coppice and the fractional trees are the free +-left-commutative coppice (both generated by the empty set, because we have already the constant 1 in the signature).
For a theoretical foundation look at my phd Arborescent numbers and higher arithmetic operations. To discuss this application feel free to post in the thread Fractional Tree Calculator of the Eretrandre mathematics forum.