Well if we are being non-rigorous, then being prime basically means that you
have *all* the equations. For example the ideal generated by (s**2 + c**2 -
1)**2 is obviously not prime, because we "forgot" to add the equation s**2 +
c**2 - 1.

I see.  My intuition comes partly from the wikipedia page, which gives
an example of<x**2 + y**2 - 1, x>  as a non-prime ideal.  If we let x
= cos(t) and y = sin(t), then this amounts to saying sin(t)**2 +
cos(t)**2 = 1 and cos(t) = 0, and of course the last equation is
wrong.  But your example shows that correctness is not sufficient.


Actually (sorry to banter ^^), the ideal <x**2 + y**2 - 1, x> says that x = 0, and that x**2 + y**2 = 1. But if x=0 then y**2 = 1, hence "really", y = + or - one (i.e. y**2-1 factorises as (y+1)(y-1) - not prime). But the ideal does not "say" which.




In any case it does not really matter (for correctness) if the ideal is
*not* prime. The worst thing that happens is that ratsimpmodprime proves
it
is not prime and raises an exception ^^.


I tried adding tan(x)*cos(x) - sin(x) to the ideal and (after fixing
the above bug), I got a lot of cool results, like


Nice :-). Adding the following kinds of generators is definitely safe:

(new generator) - (arbitry poly in old gens)
(new generator)*(arbitrary expression in old gens) - 1.


Awesome.  This kind of algorithm is extremely general, then.  We can
clearly add all the trig functions (including sec, csc, and cot), and
it will automatically find the "best" representation among them
(lowest degree).  Furthermore, we can also generalize it to hyperbolic
trig functions, and indeed, simplification of other kinds of
transcendental functions as well.


Yes it is very general. Certainly hyperbolic functions work.

One thing to remember is that as we use more generators, the algorithm gets
slow fast. But it seems to work quite well, so I guess only experience will
show if it is feasible. Also, the more generators you add, the more "weird"
answers you can get (e.g. simplifying sin(x)**3 with n=2, 3 etc yields more
and more complicated answers of the same degree).

Here we really start to see the importance of having fast Groebner
basis algorithms.  Have you tried playing with using the f5b algorithm
implemented last summer?


No. Currently groebner basis computation is not the slowest part. We should certainly try, at some stage.

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to