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

Commit

Permalink
fix a few trivialities in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Oct 24, 2020
1 parent 684ccea commit 7b3cb8b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
38 changes: 20 additions & 18 deletions src/sage/combinat/species/group_cycle_index_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

@cached_function
def GroupCycleIndexSeriesRing(G, R = RationalField()):
"""
r"""
Return the ring of group cycle index series.
EXAMPLES::
Expand All @@ -89,7 +89,7 @@ def GroupCycleIndexSeriesRing(G, R = RationalField()):

class GroupCycleIndexSeriesRing_class(CombinatorialFreeModule):
def __init__(self, G, R = RationalField()):
"""
r"""
EXAMPLES::
sage: from sage.combinat.species.group_cycle_index_series import GroupCycleIndexSeriesRing
Expand All @@ -109,7 +109,7 @@ def __init__(self, G, R = RationalField()):
CombinatorialFreeModule.__init__(self, CISR, G, element_class = GroupCycleIndexSeries, category = AlgebrasWithBasis(CISR), prefix = 'G')

def product_on_basis(self, left, right):
"""
r"""
Return the product of two basis elements ``left`` and ``right`` of ``self``.
Multiplication of `\Gamma`-cycle indices is defined componentwise.
Expand All @@ -131,11 +131,11 @@ def product_on_basis(self, left, right):
"""
if left == right:
return self.monomial(left)
else:
return self(0)

return self(0)

def one(self):
"""
r"""
Return the multiplicative identity element of this algebra.
EXAMPLES::
Expand All @@ -150,7 +150,7 @@ def one(self):
return self.sum(basis[k] for k in basis.keys())

def _an_element_(self):
"""
r"""
Return a representative element of this algebra.
EXAMPLES::
Expand All @@ -164,7 +164,7 @@ def _an_element_(self):
return self.monomial(G.one()) + self.monomial(G.an_element())

def _repr_(self):
"""
r"""
EXAMPLES::
sage: from sage.combinat.species.group_cycle_index_series import GroupCycleIndexSeriesRing
Expand All @@ -174,7 +174,7 @@ def _repr_(self):
return "Ring of (%s)-Cycle Index Series over %s" %(self._group, self._coeff_ring)

class GroupCycleIndexSeries(CombinatorialFreeModule.Element):
"""
r"""
EXAMPLES::
Expand All @@ -186,7 +186,8 @@ class GroupCycleIndexSeries(CombinatorialFreeModule.Element):
"""

def quotient(self):
"""Return the quotient of this group cycle index.
r"""
Return the quotient of this group cycle index.
This is defined to be the ordinary cycle index `F / \Gamma` obtained from a
`\Gamma`-cycle index `F` by:
Expand Down Expand Up @@ -220,7 +221,8 @@ def quotient(self):
return 1/self.parent()._group.cardinality() * sum(self.coefficients())

def composition(self, y, test_constant_term_is_zero = True):
"""Return the group-cycle-index plethysm of ``self`` with ``y``.
r"""
Return the group-cycle-index plethysm of ``self`` with ``y``.
Plethysm of group cycle index series is defined by a sort of 'mixing' operation in [Hend]_:
Expand Down Expand Up @@ -297,9 +299,9 @@ def monomial_composer( partition, g ):
def term_map( term, g ):
if test_constant_term_is_zero and term == 0:
return cisr.zero()
else:
res = sum(coeff*monomial_composer(part, g) for part,coeff in term)
return res

res = sum(coeff*monomial_composer(part, g) for part,coeff in term)
return res

def component_builder( g ):
if test_constant_term_is_zero and self[g] == 0:
Expand All @@ -317,7 +319,7 @@ def component_builder( g ):
__call__ = composition

def functorial_composition(self, y):
"""
r"""
Return the functorial composition of ``self`` with ``y``.
Functorial composition of group cycle index series satisfies
Expand Down Expand Up @@ -412,7 +414,7 @@ def ctp_term(g, ctp):
return result

def derivative(self):
"""
r"""
Return the cycle-index derivative of ``self``.
Differentiation of group cycle index series is defined termwise:
Expand All @@ -433,7 +435,7 @@ def derivative(self):
return self.map_coefficients(lambda x: x.derivative())

def restricted(self, min=None, max=None):
"""
r"""
Return the restriction of ``self`` with coefficients starting at degree
``min`` and going up to, but not including, degree ``max``.
If ``min`` is not specified, it is assumed to be zero. If ``max`` is not
Expand All @@ -454,7 +456,7 @@ def restricted(self, min=None, max=None):
return self.map_coefficients(lambda x: x.restricted(min=min, max=max))

def define(self, x):
"""
r"""
Set ``self`` equal to ``x``, possibly recursively.
EXAMPLES:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def Ltgen():

@cached_function
def CyclicOrderWithReversalGroupCycleIndex():
"""
r"""
Returns the $\mathfrak{S}_{2}$-cycle index of the species $C$
of cyclically-ordered sets with the order-reversing action of
$\mathfrak{S}_{2}$.
Expand Down

0 comments on commit 7b3cb8b

Please sign in to comment.