Skip to content

Commit 38743c1

Browse files
committed
Merge branch 't/21295/sequences/recognizable' into t/21203/sequences/k-regular
* t/21295/sequences/recognizable: Trac #21295: rename to coefficient_ring
2 parents be462dc + cbd187f commit 38743c1

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
@@ -541,7 +541,7 @@ def coefficient_of_word(self, w, multiply_left=True, multiply_right=True):
541541
OUTPUT:
542542
543543
An element in the parent's
544-
:meth:`~RecognizableSeriesSpace.coefficients`
544+
:meth:`~RecognizableSeriesSpace.coefficient_ring`
545545
546546
EXAMPLES::
547547
@@ -1004,7 +1004,7 @@ class RecognizableSeriesSpace(UniqueRepresentation, Parent):
10041004
10051005
INPUT:
10061006
1007-
- ``coefficients`` -- a (semi-)ring
1007+
- ``coefficient_ring`` -- a (semi-)ring
10081008
10091009
- ``alphabet`` -- a tuple, list or
10101010
:class:`~sage.sets.totally_ordered_finite_set.TotallyOrderedFiniteSet`.
@@ -1036,7 +1036,7 @@ class RecognizableSeriesSpace(UniqueRepresentation, Parent):
10361036
sage: Rec1 = RecognizableSeriesSpace(ZZ, [0, 1])
10371037
sage: Rec1
10381038
Space of recognizable series on {0, 1} with coefficients in Integer Ring
1039-
sage: Rec2 = RecognizableSeriesSpace(coefficients=ZZ, alphabet=[0, 1])
1039+
sage: Rec2 = RecognizableSeriesSpace(coefficient_ring=ZZ, alphabet=[0, 1])
10401040
sage: Rec2
10411041
Space of recognizable series on {0, 1} with coefficients in Integer Ring
10421042
sage: Rec3 = RecognizableSeriesSpace(ZZ, indices=Words([0, 1], infinite=False))
@@ -1064,7 +1064,7 @@ def __classcall__(cls, *args, **kwds):
10641064
sage: Rec1 = RecognizableSeriesSpace(ZZ, [0, 1])
10651065
sage: Rec1
10661066
Space of recognizable series on {0, 1} with coefficients in Integer Ring
1067-
sage: Rec2 = RecognizableSeriesSpace(coefficients=ZZ, alphabet=[0, 1])
1067+
sage: Rec2 = RecognizableSeriesSpace(coefficient_ring=ZZ, alphabet=[0, 1])
10681068
sage: Rec2
10691069
Space of recognizable series on {0, 1} with coefficients in Integer Ring
10701070
sage: Rec3 = RecognizableSeriesSpace(ZZ, indices=Words([0, 1], infinite=False))
@@ -1078,7 +1078,7 @@ def __classcall__(cls, *args, **kwds):
10781078

10791079
@classmethod
10801080
def __normalize__(cls,
1081-
coefficients=None,
1081+
coefficient_ring=None,
10821082
alphabet=None, indices=None,
10831083
category=None):
10841084
r"""
@@ -1095,7 +1095,7 @@ def __normalize__(cls,
10951095
sage: RecognizableSeriesSpace([0, 1], [0, 1])
10961096
Traceback (most recent call last):
10971097
...
1098-
ValueError: Coefficients [0, 1] are not a semiring.
1098+
ValueError: Coefficient ring [0, 1] is not a semiring.
10991099
11001100
::
11011101
@@ -1111,7 +1111,7 @@ def __normalize__(cls,
11111111
sage: RecognizableSeriesSpace(alphabet=[0, 1])
11121112
Traceback (most recent call last):
11131113
...
1114-
ValueError: No coefficients speficied.
1114+
ValueError: No coefficient ring specified.
11151115
sage: RecognizableSeriesSpace(ZZ, indices=Words(ZZ))
11161116
Traceback (most recent call last):
11171117
...
@@ -1126,20 +1126,20 @@ def __normalize__(cls,
11261126
if not indices.alphabet().is_finite():
11271127
raise NotImplementedError('Alphabet is not finite.')
11281128

1129-
if coefficients is None:
1130-
raise ValueError('No coefficients speficied.')
1129+
if coefficient_ring is None:
1130+
raise ValueError('No coefficient ring specified.')
11311131
from sage.categories.semirings import Semirings
1132-
if coefficients not in Semirings:
1132+
if coefficient_ring not in Semirings:
11331133
raise ValueError(
1134-
'Coefficients {} are not a semiring.'.format(coefficients))
1134+
'Coefficient ring {} is not a semiring.'.format(coefficient_ring))
11351135

11361136
from sage.categories.sets_cat import Sets
11371137
category = category or Sets()
11381138

1139-
return (coefficients, indices, category)
1139+
return (coefficient_ring, indices, category)
11401140

11411141
@experimental(trac_number=21202)
1142-
def __init__(self, coefficients, indices, category):
1142+
def __init__(self, coefficient_ring, indices, category):
11431143
r"""
11441144
See :class:`RecognizableSeriesSpace` for details.
11451145
@@ -1159,7 +1159,7 @@ def __init__(self, coefficients, indices, category):
11591159
"""
11601160
self._indices_ = indices
11611161
super(RecognizableSeriesSpace, self).__init__(
1162-
category=category, base=coefficients)
1162+
category=category, base=coefficient_ring)
11631163

11641164
def alphabet(self):
11651165
r"""
@@ -1196,7 +1196,7 @@ def indices(self):
11961196
"""
11971197
return self._indices_
11981198

1199-
def coefficients(self):
1199+
def coefficient_ring(self):
12001200
r"""
12011201
Return the coefficients of this recognizable series space.
12021202
@@ -1206,7 +1206,7 @@ def coefficients(self):
12061206
12071207
EXAMPLES::
12081208
1209-
sage: RecognizableSeriesSpace(ZZ, [0, 1]).coefficients()
1209+
sage: RecognizableSeriesSpace(ZZ, [0, 1]).coefficient_ring()
12101210
Integer Ring
12111211
"""
12121212
return self.base()
@@ -1227,7 +1227,7 @@ def _repr_(self):
12271227
"""
12281228
return 'Space of recognizable series on {} ' \
12291229
'with coefficients in {}'.format(self.alphabet(),
1230-
self.coefficients())
1230+
self.coefficient_ring())
12311231

12321232
def zero(self):
12331233
"""

0 commit comments

Comments
 (0)