Skip to content

Commit cbd187f

Browse files
committed
Trac #21295: rename to coefficient_ring
1 parent 2b91fd8 commit cbd187f

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/sage/combinat/recognizable_series.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def __getitem__(self, w):
528528
OUTPUT:
529529
530530
An element in the parent's
531-
:meth:`~RecognizableSeriesSpace.coefficients`
531+
:meth:`~RecognizableSeriesSpace.coefficient_ring`
532532
533533
EXAMPLES::
534534
@@ -968,7 +968,7 @@ class RecognizableSeriesSpace(UniqueRepresentation, Parent):
968968
969969
INPUT:
970970
971-
- ``coefficients`` -- a (semi-)ring
971+
- ``coefficient_ring`` -- a (semi-)ring
972972
973973
- ``alphabet`` -- a tuple, list or
974974
:class:`~sage.sets.totally_ordered_finite_set.TotallyOrderedFiniteSet`.
@@ -1000,7 +1000,7 @@ class RecognizableSeriesSpace(UniqueRepresentation, Parent):
10001000
sage: Rec1 = RecognizableSeriesSpace(ZZ, [0, 1])
10011001
sage: Rec1
10021002
Space of recognizable series on {0, 1} with coefficients in Integer Ring
1003-
sage: Rec2 = RecognizableSeriesSpace(coefficients=ZZ, alphabet=[0, 1])
1003+
sage: Rec2 = RecognizableSeriesSpace(coefficient_ring=ZZ, alphabet=[0, 1])
10041004
sage: Rec2
10051005
Space of recognizable series on {0, 1} with coefficients in Integer Ring
10061006
sage: Rec3 = RecognizableSeriesSpace(ZZ, indices=Words([0, 1], infinite=False))
@@ -1028,7 +1028,7 @@ def __classcall__(cls, *args, **kwds):
10281028
sage: Rec1 = RecognizableSeriesSpace(ZZ, [0, 1])
10291029
sage: Rec1
10301030
Space of recognizable series on {0, 1} with coefficients in Integer Ring
1031-
sage: Rec2 = RecognizableSeriesSpace(coefficients=ZZ, alphabet=[0, 1])
1031+
sage: Rec2 = RecognizableSeriesSpace(coefficient_ring=ZZ, alphabet=[0, 1])
10321032
sage: Rec2
10331033
Space of recognizable series on {0, 1} with coefficients in Integer Ring
10341034
sage: Rec3 = RecognizableSeriesSpace(ZZ, indices=Words([0, 1], infinite=False))
@@ -1042,7 +1042,7 @@ def __classcall__(cls, *args, **kwds):
10421042

10431043
@classmethod
10441044
def __normalize__(cls,
1045-
coefficients=None,
1045+
coefficient_ring=None,
10461046
alphabet=None, indices=None,
10471047
category=None):
10481048
r"""
@@ -1059,7 +1059,7 @@ def __normalize__(cls,
10591059
sage: RecognizableSeriesSpace([0, 1], [0, 1])
10601060
Traceback (most recent call last):
10611061
...
1062-
ValueError: Coefficients [0, 1] are not a semiring.
1062+
ValueError: Coefficient ring [0, 1] is not a semiring.
10631063
10641064
::
10651065
@@ -1075,7 +1075,7 @@ def __normalize__(cls,
10751075
sage: RecognizableSeriesSpace(alphabet=[0, 1])
10761076
Traceback (most recent call last):
10771077
...
1078-
ValueError: No coefficients speficied.
1078+
ValueError: No coefficient ring specified.
10791079
sage: RecognizableSeriesSpace(ZZ, indices=Words(ZZ))
10801080
Traceback (most recent call last):
10811081
...
@@ -1090,20 +1090,20 @@ def __normalize__(cls,
10901090
if not indices.alphabet().is_finite():
10911091
raise NotImplementedError('Alphabet is not finite.')
10921092

1093-
if coefficients is None:
1094-
raise ValueError('No coefficients speficied.')
1093+
if coefficient_ring is None:
1094+
raise ValueError('No coefficient ring specified.')
10951095
from sage.categories.semirings import Semirings
1096-
if coefficients not in Semirings:
1096+
if coefficient_ring not in Semirings:
10971097
raise ValueError(
1098-
'Coefficients {} are not a semiring.'.format(coefficients))
1098+
'Coefficient ring {} is not a semiring.'.format(coefficient_ring))
10991099

11001100
from sage.categories.sets_cat import Sets
11011101
category = category or Sets()
11021102

1103-
return (coefficients, indices, category)
1103+
return (coefficient_ring, indices, category)
11041104

11051105
@experimental(trac_number=21202)
1106-
def __init__(self, coefficients, indices, category):
1106+
def __init__(self, coefficient_ring, indices, category):
11071107
r"""
11081108
See :class:`RecognizableSeriesSpace` for details.
11091109
@@ -1123,7 +1123,7 @@ def __init__(self, coefficients, indices, category):
11231123
"""
11241124
self._indices_ = indices
11251125
super(RecognizableSeriesSpace, self).__init__(
1126-
category=category, base=coefficients)
1126+
category=category, base=coefficient_ring)
11271127

11281128
def alphabet(self):
11291129
r"""
@@ -1160,7 +1160,7 @@ def indices(self):
11601160
"""
11611161
return self._indices_
11621162

1163-
def coefficients(self):
1163+
def coefficient_ring(self):
11641164
r"""
11651165
Return the coefficients of this recognizable series space.
11661166
@@ -1170,7 +1170,7 @@ def coefficients(self):
11701170
11711171
EXAMPLES::
11721172
1173-
sage: RecognizableSeriesSpace(ZZ, [0, 1]).coefficients()
1173+
sage: RecognizableSeriesSpace(ZZ, [0, 1]).coefficient_ring()
11741174
Integer Ring
11751175
"""
11761176
return self.base()
@@ -1191,7 +1191,7 @@ def _repr_(self):
11911191
"""
11921192
return 'Space of recognizable series on {} ' \
11931193
'with coefficients in {}'.format(self.alphabet(),
1194-
self.coefficients())
1194+
self.coefficient_ring())
11951195

11961196
def zero(self):
11971197
"""

0 commit comments

Comments
 (0)