#14990: Implement algebraic closures of finite fields
-------------------------------------+-------------------------------------
       Reporter:  pbruin             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  algebra            |   Resolution:
       Keywords:  finite field       |    Merged in:
  algebraic closure                  |    Reviewers:
        Authors:  Peter Bruin        |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  u/pbruin/14990     |  b1d4424ec179f4975a54a14993e4c842b3fb39f5
   Dependencies:  #14958, #13214     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Dear Peter,

 I like very much the documentation in `algebraic_closure`. Thank you.

 For each problem below, I think we need to find a solution which might be:
 either write specifications in the documentation or provide a fix that
 change the behaviour.

 1) Equality among algebraic closures is not constant over time:
 {{{
 sage: F1 = AlgebraicClosureFiniteField(GF(3), 'z', use_database=False)
 sage: F2 = AlgebraicClosureFiniteField(GF(3), 'z', use_database=False)
 sage: F1 == F2
 True
 sage: F1.gen(3)
 z3
 sage: F1 == F2
 False
 sage: F2.gen(3)
 z3
 sage: F1 == F2
 True
 }}}
 It becomes really weird when we play with pickling
 {{{
 sage: p = 100003
 sage: K = GF(p).algebraic_closure()
 sage: K2 = loads(dumps(K))
 sage: K.gen(3)
 z3
 sage: K == K2
 False
 }}}
 One fix is to use identity in comparisons of the parent themselves as I
 suggested in previous comments. The only drawback I see is that `K ==
 loads(dumps(K))` will be `False`. I think it would be safer that way.

 2) Get a very strange error from conversions between different algebraic
 closures that can be fixed introducing more type checking in the methods.
 {{{
 sage: from sage.rings.algebraic_closure_finite_field import
 AlgebraicClosureFiniteField
 sage: F1 = AlgebraicClosureFiniteField(GF(3), 'z')
 sage: F2 = AlgebraicClosureFiniteField(GF(3), 'z')
 sage: F1(F2.gen(1))
 Traceback (most recent call last):
 ...
 TypeError: no canonical coercion from Algebraic closure of Finite Field of
 size 3 to Finite Field of size 3
 }}}

 3) (minor) The cache in `algebraic_closure` does not take into account the
 default arguments.
 {{{
 sage: K1 = GF(5).algebraic_closure(implementation='pseudo_conway',
 use_database=True)
 sage: K2 = GF(5).algebraic_closure(implementation='pseudo_conway')
 sage: K4 = GF(5).algebraic_closure()
 sage: K1 is K2 or K1 is K3 or K2 is K3
 False
 }}}
 One fix is to move the cache at the level of
 `AlgebraicClosureFiniteField`, but on the other hand it is good to have
 the cache at a Cython level.

 That's all
 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/14990#comment:85>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to