Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/sage/categories/pushout.py
Original file line number Diff line number Diff line change
Expand Up @@ -3294,7 +3294,12 @@ def __init__(self, polys, names, embeddings=None, structures=None,
if latex_names[i] == latex_variable_name(name):
latex_names[i] = None
self.latex_names = latex_names
self.kwds = kwds
kwds_self = dict(kwds.items())
if 'implementation' in kwds_self:
assert len(self.polys) == 1
self.implementations = [kwds_self['implementation']]
del kwds_self['implementation']
self.kwds = kwds_self

def _apply_functor(self, R):
"""
Expand Down Expand Up @@ -3529,11 +3534,7 @@ def merge(self, other):
# integers to encode degrees of extensions.
from sage.rings.integer import Integer
kwds_self = dict(self.kwds.items())
if 'impl' in kwds_self:
del kwds_self['impl']
kwds_other = dict(other.kwds.items())
if 'impl' in kwds_other:
del kwds_other['impl']
if (isinstance(self.polys[0], Integer)
and isinstance(other.polys[0], Integer)
and self.embeddings == other.embeddings == [None]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/homology/homology_vector_space_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ def is_GF2(R):
sage: from sage.homology.homology_vector_space_with_basis import is_GF2
sage: is_GF2(GF(2))
True
sage: is_GF2(GF(2, impl='ntl'))
sage: is_GF2(GF(2, implementation='ntl'))
True
sage: is_GF2(GF(3))
False
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modules/free_module_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
Create the multiplication table of `GF(4)` using GP::

sage: # needs sage.libs.pari
sage: k.<a> = GF(4, impl='pari_ffelt')
sage: k.<a> = GF(4, implementation="pari_ffelt")
sage: v = gp(vector(list(k)))
sage: v
[0, 1, a, a + 1]
Expand Down
10 changes: 5 additions & 5 deletions src/sage/rings/finite_rings/element_base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -738,16 +738,16 @@ cdef class FinitePolyExtElement(FiniteRingElement):

EXAMPLES::

sage: k.<a> = FiniteField(9, impl='givaro', modulus='primitive') # needs sage.libs.linbox
sage: k.<a> = FiniteField(9, implementation='givaro', modulus='primitive') # needs sage.libs.linbox
sage: a.is_square() # needs sage.libs.linbox
False
sage: (a**2).is_square() # needs sage.libs.linbox
True
sage: k.<a> = FiniteField(4, impl='ntl', modulus='primitive') # needs sage.libs.ntl
sage: k.<a> = FiniteField(4, implementation='ntl', modulus='primitive') # needs sage.libs.ntl
sage: (a**2).is_square() # needs sage.libs.ntl
True
sage: k.<a> = FiniteField(17^5, impl='pari_ffelt', modulus='primitive') # needs sage.libs.pari
sage: a.is_square() # needs sage.libs.pari
sage: k.<a> = FiniteField(17^5, implementation='pari_ffelt', modulus='primitive') # needs sage.libs.pari
sage: a.is_square()
False
sage: (a**2).is_square() # needs sage.libs.pari
True
Expand Down Expand Up @@ -796,7 +796,7 @@ cdef class FinitePolyExtElement(FiniteRingElement):
3
sage: F(4).square_root()
2
sage: K = FiniteField(7^3, 'alpha', impl='pari_ffelt')
sage: K = FiniteField(7^3, 'alpha', implementation='pari_ffelt')
sage: K(3).square_root()
Traceback (most recent call last):
...
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/finite_rings/element_givaro.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -580,12 +580,12 @@ cdef class Cache_givaro(Cache_base):
sage: k._cache._element_repr(a^20)
'2*a^3 + 2*a^2 + 2'

sage: k = FiniteField(3^4,'a', impl='givaro', repr='int')
sage: k = FiniteField(3^4,'a', implementation='givaro', repr='int')
sage: a = k.gen()
sage: k._cache._element_repr(a^20)
'74'

sage: k = FiniteField(3^4,'a', impl='givaro', repr='log')
sage: k = FiniteField(3^4,'a', implementation='givaro', repr='log')
sage: a = k.gen()
sage: k._cache._element_repr(a^20)
'20'
Expand Down
10 changes: 5 additions & 5 deletions src/sage/rings/finite_rings/element_ntl_gf2e.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ cdef class Cache_ntl_gf2e(Cache_base):

TESTS::

sage: k.<a> = GF(2^8, impl='ntl')
sage: k.<a> = GF(2^8, implementation="ntl")
"""
self._parent = <FiniteField?>parent
self._zero_element = self._new()
Expand Down Expand Up @@ -262,10 +262,10 @@ cdef class Cache_ntl_gf2e(Cache_base):

We can coerce from PARI finite field implementations::

sage: K.<a> = GF(2^19, impl='ntl')
sage: K.<a> = GF(2^19, implementation="ntl")
sage: a^20
a^6 + a^3 + a^2 + a
sage: M.<c> = GF(2^19, impl='pari_ffelt')
sage: M.<c> = GF(2^19, implementation="pari_ffelt")
sage: K(c^20)
a^6 + a^3 + a^2 + a
"""
Expand Down Expand Up @@ -501,7 +501,7 @@ cdef class FiniteField_ntl_gf2eElement(FinitePolyExtElement):

EXAMPLES::

sage: k.<a> = GF(2^8, impl='ntl') # indirect doctest
sage: k.<a> = GF(2^8, implementation="ntl") # indirect doctest
"""
if parent is None:
return
Expand Down Expand Up @@ -998,7 +998,7 @@ cdef class FiniteField_ntl_gf2eElement(FinitePolyExtElement):

EXAMPLES::

sage: k.<a> = GF(2^8, impl='ntl')
sage: k.<a> = GF(2^8, implementation="ntl")
sage: b = a^3 + a
sage: b.minpoly()
x^4 + x^3 + x^2 + x + 1
Expand Down
Loading