On Tue, Oct 28, 2008 at 12:39 PM, Martin Rubey wrote:
>
> Waldek Hebisch writes:
>
>> Martin Rubey wrote:
>> >
>> > Waldek Hebisch writes:
>> >
>> > > 2) I think we have all tools to do actual computations: we can
>>> > factorise in algebraic extensions, so we can verify irreducibility
>>> > assumptions. We have functions to compute primitive elements.
>> >
>> > I was unable to use the latter. Do you think you could compute the
>> > example I gave with FriCAS?
>> >
>>
>> Is te following what you want?
>>
>> pol1 := x^2+1
>> pol2 := z^3-2
>> primrec := primitiveElement([pol1, pol2], [x, z])$PrimitiveElement(Fraction
>> Integer)
>> Ae := SAE(Fraction(Integer), SparseUnivariatePolynomial(Fraction(Integer)),
>> primrec.prim)
>> (primrec.poly.1::Ae)^2
>> (primrec.poly.2::Ae)^3
>
>
> Oh, how very very nice! I didn't know about PrimitiveElement. Many
> thanks, I'll sent this to my colleague!
>
> BTW: this also means that the polynomial is not unique? I got a
> different one using Sage/pari...
>
Here also is a Sage/Fricas example of this computation:
sage: var('z')
z
sage: pol1=x^2+1
sage: pol2=z^3-2
sage: axiom.eval(')expose PrimitiveElement')
''
sage: primrec=axiom.primitiveElement([pol1,pol2],[x,z])
sage: Ae=axiom('SAE(Fraction(Integer),
SparseUnivariatePolynomial(Fraction(Integer)),%s.prim)'%primrec.name())
sage: axiom('(%s.poly.1::%s)^2'%(primrec.name(),Ae.name()))
- 1
sage: axiom('(%s.poly.1::%s)^3'%(primrec.name(),Ae.name()))
12 5 243 4 160 3 2106 2 8481 9828
----- ? - ----- ? + ----- ? - ----- ? + ----- ? + -----
18659 74636 18659 18659 37318 18659
sage:
----
The string manipulation in the last three lines is the kind of thing
that I would like to eliminate from the Sage/Axiom user interface by
improving the integration between Sage and Axiom types in 'axiom.py'.
If any has some ideas about how best to do this, I would be very
interested.
Regards,
Bill Page.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---