#11797: Finite field elements are allowed in exponents
----------------------------+----------------------------------------------
       Reporter:  nbruin    |        Owner:  AlexGhitza
           Type:  defect    |       Status:  closed
       Priority:  major     |    Milestone:  sage-duplicate/invalid/wontfix
      Component:  basic     |   Resolution:  duplicate
  arithmetic                |    Merged in:
       Keywords:            |    Reviewers:
        Authors:            |  Work issues:
Report Upstream:  N/A       |       Commit:
         Branch:            |     Stopgaps:
   Dependencies:            |
----------------------------+----------------------------------------------
Changes (by jdemeyer):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  sage-6.4 => sage-duplicate/invalid/wontfix


Old description:

> {{{
> sage: p=7
> sage: k=GF(p)
> sage: k(2)^k(p)
> 1
> sage: (GF(7)(2))^(GF(5)(2))
> 4
> sage: k(2)^p
> 2
> }}}
> It looks like it's simply quietly lifting the exponent to the integers,
> which it shouldn't do because there is no coercion in that direction
> (only a conversion):
> {{{
> sage: k.<a>=GF(p^2)
> sage: k(2)^k(p)
> 1
> sage: k(2)^k(a)
> TypeError: not in prime subfield
> sage: ZZ(k(1))
> 1
> sage: ZZ(k(a))
> TypeError: not in prime subfield
> }}}
> There is one side-effect of this that does look elegant:
> {{{
> sage: R=Integers(p-1)
> sage: (k(2))^(R(p))
> 2
> }}}
> but in general I'd say an error should result from exponentiations like
> this.

New description:

 Duplicate of #15709.

--

--
Ticket URL: <http://trac.sagemath.org/ticket/11797#comment:5>
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