Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
28566: preserve variable name in Macaulay2 Galois fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mwageringel committed Oct 6, 2019
1 parent 5308c90 commit 602f6eb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/sage/rings/finite_rings/finite_field_base.pyx
Expand Up @@ -251,14 +251,25 @@ cdef class FiniteField(Field):
EXAMPLES::
sage: GF(97,'a')._macaulay2_init_()
'GF 97'
'GF(97,Variable=>symbol x)'
sage: macaulay2(GF(97, 'a')) # optional - macaulay2
GF 97
sage: macaulay2(GF(49, 'a')) # optional - macaulay2
GF 49
TESTS:
The variable name is preserved (:trac:`28566`)::
sage: K = macaulay2(GF(49, 'b')) # optional - macaulay2
sage: K.gens() # optional - macaulay2
{b}
sage: K._sage_() # optional - macaulay2
Finite Field in b of size 7^2
"""
return "GF %s"%(self.order())
return "GF(%s,Variable=>symbol %s)" % (self.order(),
self.variable_name())

def _sage_input_(self, sib, coerced):
r"""
Expand Down

0 comments on commit 602f6eb

Please sign in to comment.