# GroupJep Console Example Applet

The JEP Java Expression Parser can parse and evaluate mathematical expresions. The DJep package adds differentation, simplification vectors and matricies, abstract groups and several other advanced features.

Below is a console for the GroupJep part of the DJep package, which adds exact arithmatic over abstract groups.

## Groups

Various groups are available:
 group Z integers (full precision) `1*2*3*4*5*6*7*8*9*10*11*12*13*14*15*16*17*18*19*20 -> 2432902008176640000` group Q rationals `1/3-1/4 -> 1/12` group R reals, represented as Doubles. group R 3 reals reprecented as BigDecimals with 3 decimal places group P 3 permutation group on three symbols [1,3,2]+[3,2,1] -> [3,1,2] group Zn 5 integers modulo 5 `3+4 -> 2` group Qu Quartonians `i*j -> -k` extend x extends current group by adding symbol x, i.e. a free group. Such a group can be considered as the ring of polynomials simplification happens automatically. ```group Z extend x (x-1)^3 -> x^3-3 x^2+3 x-1 ``` extend t a b c algebraic extensions generated by t where t is a root of the polynomial a t^2 + b t +c=0 e.g 'extend t 1 0 1' gives complex numbers, t^2+1=0. for these groups there is a natural mapping to complex numbers and complex result is also printed. ```group Z extend t 1 0 -2 # Z[sqrt(2)] (t+1)^2 -> 2 t+3 group Z extend t 1 -1 -1 # Z[t^2-t-1, t = tau] t^2 -> t+1 ```