Question: modp1 documentation

1. This seems wrong:

modp1(ConvertIn((x^2+1)^5, x), 2);
Error, modp1: invalid arguments

ConvertIn works for other unexpanded inputs, and the documentation doesn't say that the polynomial should be expanded.

2. It's not clear what the correct way to test for equality is:

p := modp1(Monomial(1, x), 2):
q := modp1(Multiply(p, One(x)), 2):

is(p=q);
Error, (in property/ConvertRelation) invalid terms in sum: modp1(ConvertIn(x, x), 2)

evalb(p = q);
                              true

There is no Equal function, and IsZero(Subtract(p, q)) is rather clumsy.

3. In the documentation, with "Display Examples with 2D math input" checked, the second input looks like this:

a := (x^4-x^2+2) mod p

which doesn't make any sense.

4. In a 2D Input cell, using a label to refer to a previous output which is zppoly gives an error:

Error, '_Inert_ZPPOLY' is not a valid inert form

The same label in a 1D Input cell works.

5. It's not quite consistent that sometimes one-argument modp1(zppoly) works -- because zppoly stores the modulus -- but sometimes it doesn't:

modp1(IsZero(Subtract(p, q)));
Error, modp1: invalid arguments to function Subtract

6. There is no documentation for modp1/Embed.

Please Wait...