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

Factorization in iterated extensions of finite fields #21996

Closed
saraedum opened this issue Nov 30, 2016 · 43 comments
Closed

Factorization in iterated extensions of finite fields #21996

saraedum opened this issue Nov 30, 2016 · 43 comments

Comments

@saraedum
Copy link
Member

At the moment there is no factorization implemented in iterated extensions of finite fields:

sage: K = GF(2)
sage: R.<x> = K[]
sage: L.<x> = K.extension(x^2 + x + 1)
sage: R.<y> = L[]
sage: M.<y> = L.extension(y^2 + y + x)
sage: R.<T> = M[]
sage: (T^2 + T + x).factor()
NotImplementedError

The reason is that M in the above example is just a quotient of a polynomial ring over L.
Here, we implement isomorphisms (for this special case) to a simple extensions of a prime field over which factorization is implemented. We also implement univariate factorization for polynomial quotient rings if an isomorphism to a field which supports such factorization is known.

Depends on #21998
Depends on #22001

CC: @jpflori

Component: finite rings

Keywords: factorization, finite field, sd86.5, sd87

Author: Julian Rüth, Hanson Smith, Edouard Rousseau

Branch/Commit: d585fdb

Reviewer: Hanson Smith, Edouard Rousseau, Aly Deines

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

@saraedum saraedum added this to the sage-7.5 milestone Nov 30, 2016
@saraedum

This comment has been minimized.

@saraedum
Copy link
Member Author

Dependencies: #21998

@saraedum
Copy link
Member Author

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 30, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

ec1b78bfix typo in any_root()
af6f451Merge branch 't/21998/any_root___sometimes_fails_over_finite_fields' into t/21996/factorization_in_iterated_extensions_of_finite_fields
3a43d57fix doctests for _isomorphic_ring
1a3cb94extend _isomorphic_ring to handle number fields

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 30, 2016

Commit: 1a3cb94

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 30, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

ca050d3Refine quotient ring category to Fields()
f9e393bImprove categories of quotient ring morphisms
80a0e1fRefine category of quotient rings isomorphic to number fields
1c9f1c6Make quotient ring morphisms inherit from the correct category type

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 30, 2016

Changed commit from 1a3cb94 to 1c9f1c6

@saraedum
Copy link
Member Author

comment:7

I added some __make_element_class__ around the SetMorphism. They make no difference because SetMorphism is an extension type, but morally they should be there (if it were not an extension type) so that the result inherits the right methods from the category.

@saraedum
Copy link
Member Author

Changed dependencies from #21998 to #21998, #22001

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 30, 2016

Changed commit from 1c9f1c6 to b2dfab4

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 30, 2016

Branch pushed to git repo; I updated commit sha1. New commits:

b2dfab4Do not pass in category explicitly

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2017

Changed commit from b2dfab4 to 725ad0f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

725ad0fMerge branch 'develop' into u/saraedum/factorization_in_iterated_extensions_of_finite_fields

@jpflori
Copy link

jpflori commented Jan 31, 2017

comment:11

I'll have a closer look soon but right now this looks like a good addition.
The only thing that I find disturbing is the method name _isomorphic_ring.
Maybe it's not descriptive enough?

@jpflori
Copy link

jpflori commented Jan 31, 2017

comment:12

You've got this simple model stuff for function fields.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

87b2f65Merge branch 'develop' into t/21996/factorization_in_iterated_extensions_of_finite_fields

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2017

Changed commit from 725ad0f to 87b2f65

@saraedum
Copy link
Member Author

comment:14

Jens Bauch reported that the factorization does not work here:

K = GF(3)
R.<x> = K[]
L.<x> = K.extension(x^2 + x + 1)
R.<y> = L[]
M.<y> = L.extension(y^2 + y + x)
R.<T> = M[]
(T^2 + T + x).factor()

@saraedum
Copy link
Member Author

Work Issues: merge conflicts, factorization incorrect

@saraedum
Copy link
Member Author

saraedum commented Jun 6, 2017

Changed keywords from factorization, finite field to factorization, finite field, sd86.5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 6, 2017

Changed commit from 87b2f65 to 0b44d33

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 6, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

0b44d33Merge branch 'develop' into t/21996/factorization_in_iterated_extensions_of_finite_fields

@saraedum
Copy link
Member Author

saraedum commented Jun 6, 2017

New commits:

0b44d33Merge branch 'develop' into t/21996/factorization_in_iterated_extensions_of_finite_fields

New commits:

0b44d33Merge branch 'develop' into t/21996/factorization_in_iterated_extensions_of_finite_fields

@sagetrac-erousseau
Copy link
Mannequin

sagetrac-erousseau mannequin commented Jun 9, 2017

Changed commit from 0b44d33 to 5608932

@sagetrac-erousseau
Copy link
Mannequin

sagetrac-erousseau mannequin commented Jun 9, 2017

comment:20

If the fix is OK, then I think it is ready for positive review.

Edouard


New commits:

5608932Fixed a bug in polynomial factorisation

@sagetrac-erousseau
Copy link
Mannequin

sagetrac-erousseau mannequin commented Jun 9, 2017

Reviewer: Hanson Smith, Edouard Rousseau

@vbraun
Copy link
Member

vbraun commented Jun 9, 2017

comment:22
$ sage -t --long --warn-long 68.9 src/sage/rings/polynomial/polynomial_quotient_ring.py  # 4 doctests failed
Running doctests with ID 2017-06-10-00-08-57-0afdacb4.
Git branch: develop
Using --optional=mpir,python2,sage
Doctesting 1 file.
sage -t --long --warn-long 68.9 src/sage/rings/polynomial/polynomial_quotient_ring.py
**********************************************************************
File "src/sage/rings/polynomial/polynomial_quotient_ring.py", line 267, in sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing_generic
Failed example:
    isinstance(Q.an_element(),Q.element_class)
Expected:
    True
Got:
    False
**********************************************************************
File "src/sage/rings/polynomial/polynomial_quotient_ring.py", line 269, in sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing_generic
Failed example:
    [s for s in dir(Q.category().element_class) if not s.startswith('_')]
Expected:
    ['cartesian_product', 'is_idempotent', 'is_one', 'is_unit', 'lift', 'powers']
Got:
    ['cartesian_product',
     'euclidean_degree',
     'factor',
     'gcd',
     'is_idempotent',
     'is_one',
     'is_unit',
     'lcm',
     'lift',
     'powers',
     'quo_rem',
     'xgcd']
**********************************************************************
File "src/sage/rings/polynomial/polynomial_quotient_ring.py", line 281, in sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing_generic
Failed example:
    first_class == Q.__class__
Expected:
    False
Got:
    True
**********************************************************************
File "src/sage/rings/polynomial/polynomial_quotient_ring.py", line 834, in sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing_generic.is_field
Failed example:
    F2.is_field()
Expected:
    Traceback (most recent call last):
    ...
    NotImplementedError
Got:
    False
**********************************************************************
2 items had failures:
   3 of  29 in sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing_generic
   1 of  13 in sage.rings.polynomial.polynomial_quotient_ring.PolynomialQuotientRing_generic.is_field
    [410 tests, 4 failures, 2.37 s]
----------------------------------------------------------------------
sage -t --long --warn-long 68.9 src/sage/rings/polynomial/polynomial_quotient_ring.py  # 4 doctests failed
----------------------------------------------------------------------
Total time for all tests: 2.5 seconds
    cpu time: 2.2 seconds
    cumulative wall time: 2.4 seconds

@saraedum
Copy link
Member Author

@saraedum
Copy link
Member Author

@saraedum
Copy link
Member Author

@jpflori
Copy link

jpflori commented Jun 22, 2017

New commits:

9ccb592Merge branch 'develop' into t/21996/factorization_in_iterated_extensions_of_finite_fields
439b9afThe test suite of quotient refines the category

@jpflori
Copy link

jpflori commented Jun 22, 2017

Changed commit from 5608932 to 439b9af

@roed314
Copy link
Contributor

roed314 commented Jul 17, 2017

Changed keywords from factorization, finite field, sd86.5 to factorization, finite field, sd86.5, sd87

@adeines
Copy link
Mannequin

adeines mannequin commented Jul 18, 2017

comment:28

Should the following example work with this branch? It does not for me. I get a not implemented error.

All examples in ticket have fields with cardinality a power of 2.

Replying to @saraedum:

Jens Bauch reported that the factorization does not work here:

K = GF(3)
R.<x> = K[]
L.<x> = K.extension(x^2 + x + 1)
R.<y> = L[]
M.<y> = L.extension(y^2 + y + x)
R.<T> = M[]
(T^2 + T + x).factor()

@saraedum
Copy link
Member Author

comment:29

Replying to @adeines:

Should the following example work with this branch? It does not for me. I get a not implemented error.

All examples in ticket have fields with cardinality a power of 2.

Replying to @saraedum:

Jens Bauch reported that the factorization does not work here:

K = GF(3)
R.<x> = K[]
L.<x> = K.extension(x^2 + x + 1)
R.<y> = L[]
M.<y> = L.extension(y^2 + y + x)
R.<T> = M[]
(T^2 + T + x).factor()

That's expected. L is not a field in this example.

@saraedum
Copy link
Member Author

Changed work issues from factorization incorrect to none

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 20, 2017

Changed commit from 439b9af to d585fdb

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 20, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

d585fdbMerge branch 'develop' into t/21996/factorization_in_iterated_extensions_of_finite_fields

@adeines
Copy link
Mannequin

adeines mannequin commented Jul 21, 2017

Changed reviewer from Hanson Smith, Edouard Rousseau to Hanson Smith, Edouard Rousseau, Aly Deines

@vbraun
Copy link
Member

vbraun commented Jul 26, 2017

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