[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## RE: [Axiom-math] How to make symbolic computations?

**From**: |
Fabio Stumbo |

**Subject**: |
RE: [Axiom-math] How to make symbolic computations? |

**Date**: |
Mon, 3 Apr 2006 13:24:22 +0200 (CEST) |

Hi all,
I am back again to ask for some help on symbolic computation.
The setting was:

I would like to build the non-commutative algebra h=k[x,y] and
then I would like to make computations in h using some predefined
rules for x and y. As an example, take the three equations
x*y*x=y*x*y
x*x=a*x+b
y*y=a*y+b
where a and b are (generic, if possible) elements of k.
Then, I would like to be able to reduce polynomials in x and
y according to the previous rules. For example,
(x+y)^2 (=x^2+x*y+y*x+y^2)
should reduce to
a*(x+y)+2*b+x*y+y*x
and
(x+y)^3
(
=(x+y)(x+y)^2
=(x+y)(a(x+y)+2b+xy+yx)
=axx+axy+ayx+ayy+2bx+2by+xxy+xyx+yxy+yyx
=a^2x+ab+axy+ayx+a^2y+ab+2bx+2by+(ax+b)y+xyx+yxy+(ay+b)x
=a^2x+ab+axy+ayx+a^2y+ab+2bx+2by+axy+by+xyx+yxy+ayx+bx
=xyx+yxy+axy+axy+ayx+ayx+a^2x+2bx+bx+a^2y+2by+by+ab+ab
)
should reduce to
2*x*y*x+2*a*x*y+2*a*y*x+(a^2+3*b)*x+(a^2+3*b)*y+2*a*b

Look at the example at:
http://wiki.axiom-developer.org/SandBoxNoncommutativePolynomials

...
I made many computations and I am quite satisfied with the results.

`I had no difficult to modify the functions defined on the wiki page to
``change the settings (variable number, minimal polinomial). About this, I
``have just a couple of simple questions:
`

`1) Is it possible to define the functions so that the number of variable
``is itself a variable and the function generates "on the fly" the required
``variables (all with the same minimal polinomial)? I am meaning the
``following: instead of
`newpoly(t:H):H
I would like to define
newpoly(t:H,n:INT):H

`so that t is a polinomial in the variables x_1,...,x_n the relations are,
``for example, x_i^2=ax_i+b for each i.
``So, we should generate the array of the variables, then an array with all
``the relations and then we should try div for each relation in this last
``array...
`

`I am asking this beacuse I had to make may examples changing the number of
``variables and I had to rewrite the same file each time with minor
``(and uniform) changes.
`

`2) Is it possible to get rid of all the declarations ::V in
``p1:=(x::V+y::V)$H^2 ?
`

`I want to add a remark: as noted on the wiki, the reduction should be
``carried over as many time as possible, so I use the auxiliary function
`
reduce(p:H):H ==
p2 := newpoly(p)
p3 := newpoly(p2)
while p3 ~= p2 repeat
p2 := p3
p3 := newpoly(p2)
p3

`Now, if you try to reduce the successive powers of x+y, the functions
``slows down very quicly and you can't go further than (x+y)^10 or little
``more. In this particular case, it is much more efficient to do it
``in the following way:
`
power(q:H,n:INT):H ==
qq:H:=1
for i in 1..n repeat
qq:=reduce(qq*q)
qq

`This way, I have no difficulties in calculating (x+y)^100 or even much
``more. Is there another way to obtain this same efficency?
`

`All of this is, anyway, simply a matter of making working better what
``already is done.
`I also have another problem, more important to me.
The above setting is:
Q=FRAC INT
K=Q(a,b)
H=K[x,y]
with relations
xyx=yxy
xx=ax+b
yy=ay+b
I would like to write the element
s=1+x+y+xy+yx+xyx
of H like a polinomial in u=x+y
In mathematics, if I is the ideal
I=(xyx-yxy,xx-ax-b,yy-ay-b) and L=H/I,
then I would like to see if s belongs to the subring L[u].

`I guess that one way should be to use Groebner basis, but H is
``noncommutative. Is there a noncommutative groebner basis package in axiom?
`

`In any case, it is not exactly this: I do not want to see if s belongs to
``I, but I want to write it as a polynomial in u.
`
Thank you and best regards
Fabio

[Prev in Thread] |
**Current Thread** |
[Next in Thread] |

**RE: [Axiom-math] How to make symbolic computations?**,
*Fabio Stumbo* **<=**