Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with polynomials over extensions of finite fields #15777

Closed
tscrim opened this issue Feb 2, 2014 · 21 comments
Closed

Problems with polynomials over extensions of finite fields #15777

tscrim opened this issue Feb 2, 2014 · 21 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Feb 2, 2014

While looking at #13642, I noticed the following:

sage: k = GF(5)
sage: D.<x> = k[]
sage: l.<x> = k.extension(x^2 + 2)
sage: R.<t> = l[]
sage: f = t^4 + (2*x - 1)*t^3 + (2*x + 1)*t^2 + 3
sage: h = t^4 - x*t^3 + (3*x + 1)*t^2 + 2*t + 2*x - 1
sage: pow(f, 2, h)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
...
RuntimeError: PowerMod: bad args

sage: pow(t, 2, x) # segfault

This occurs on a clean 6.1.

Depends on #13642

CC: @burcin @roed314 @jdemeyer @pjbruin

Component: basic arithmetic

Keywords: NTL

Author: Jean-Pierre Flori

Branch: c742335

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/15777

@tscrim tscrim added this to the sage-6.2 milestone Feb 2, 2014
@tscrim tscrim self-assigned this Feb 2, 2014
@tscrim
Copy link
Collaborator Author

tscrim commented Feb 2, 2014

comment:1

Also we should re-enable the tests in #13642.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 2, 2014

Dependencies: #13642

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

Changed keywords from none to NTL

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

Commit: 2f4851d

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

Author: Jean-Pierre Flori

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:2

It was a problem with the use of NTL modular exp which does not like the base of equal or higher degree than the modulus.


New commits:

d3e730dtrac #13642: modular exponentiation of polynomials
9917b28Reinstated doctest.
878bd99Marked new doctests as "not tested".
30d7f5bMerge remote-tracking branch 'trac/develop' into ticket/13642
623c5b6Reenable previously failing doctests for modular exponentiation of
2f4851dFix modular exponentiation of polynomials over finite field extensions.

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

Branch: u/jpflori/ticket/15777

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:3

Oops, I forgot the segfault which was not in the disabled tests.

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:4

Ok NTL does not like building a pre conditionning modulus object when the modulus is of degree one...

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:5

Not sure what to do about this one:

sage: x = polygen(GF(5))
sage: x % 2
0

and similar stuff.
Whatsoever, I propose to postpone that case where the modulus is of degree < 1 to a later ticket.

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:6

This one in not so good as well:

sage: x = polygen(GF(5))
sage: pow(x,100000000000,x)
Exception (FLINT memory_manager). Unable to allocate memory.

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:7

This one is nice enough as well:

sage: x = polygen(ZZ)
sage: pow(x,100,x+1)
x^100

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:8

Replying to @jpflori:

Ok NTL does not like building a pre conditionning modulus object when the modulus is of degree one...

Same problem for NTL GF2X polynomials.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 26, 2014

Changed commit from 2f4851d to c742335

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 26, 2014

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

c742335Fix modular exponentiation of polynomials over finite field extensions.

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:10

At least the two problems mentioned in the ticket description and involving NTL are fixed now.

The polynomial stuff needs major refactoring anyway, we should move the template files to different folders in the spirit of what was done in #12555 for p-adics, use templating for additional classes, etc.; so let's postpone the other issues I reported here to follow up tickets.

@jpflori
Copy link
Contributor

jpflori commented Feb 26, 2014

comment:11

Follow-up tickets: #15866, #15867, #15868.

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 27, 2014

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 27, 2014

comment:12

Well let's get on those, but first, positive review here. Thanks Jean-Pierre.

@vbraun
Copy link
Member

vbraun commented Mar 1, 2014

Changed branch from u/jpflori/ticket/15777 to c742335

@fchapoton
Copy link
Contributor

Changed commit from c742335 to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants