mbras

52 Reputation

8 Badges

3 years, 320 days

MaplePrimes Activity


These are answers submitted by mbras

I'm not sure if this answers your question, but "1/x mod m" gives you an inverse to x modulo m, if it exists.

It seems that collect(f,[xa^2,xb^2,xc^2]) does not work as you would desire, or as I would expect.

A work around is the command:

subs([a=xa^2,b=xb^2,c=xc^2],collect(subs([xa^2=a,xb^2=b,xc^2=c],f),[a,b,c]))

This substitutes instances of squares to new variables, collects in these variables, then substitutes back to the squares of the original variables.

This is not elegant, and will not work when your polynomial involves third powers or more. It will work for your particular example. You could generalize this to higher degrees by using algsubs (which will convert xa^3 to a*xa etc.), though you'd need to make a version of algsubs which can take a list of substitutions.

Note that collect here first collects it as a polynomial in xa^2, then writes the coefficients as polynomials in xb^2, etc., recursively.

I don't think I've used this package, but looking at
https://www.maplesoft.com/support/help/maple/view.aspx?path=PolynomialIdeals%2fIdealInfo
I think that Generators(F) is what you want. It returns a set of generators.

For the elements in an ideal, you can test for membership with IdealMembership(f,F)

 

 

Page 1 of 1