diff --git a/src/sage/algebras/fusion_rings/f_matrix.py b/src/sage/algebras/fusion_rings/f_matrix.py index 704067ba6cb..c017f7170e4 100644 --- a/src/sage/algebras/fusion_rings/f_matrix.py +++ b/src/sage/algebras/fusion_rings/f_matrix.py @@ -919,7 +919,7 @@ def get_fvars_by_size(self, n, indices=False): INPUT: - - `n` -- a positive integer + - ``n`` -- positive integer - ``indices`` -- boolean (default: ``False``) If ``indices`` is ``False`` (default), diff --git a/src/sage/algebras/group_algebra.py b/src/sage/algebras/group_algebra.py index 5d9f56cd6d1..eb70b0c699f 100644 --- a/src/sage/algebras/group_algebra.py +++ b/src/sage/algebras/group_algebra.py @@ -51,8 +51,8 @@ def GroupAlgebra(G, R=IntegerRing()): INPUT: - - `G` -- a group - - `R` -- (default: `\ZZ`) a ring + - ``G`` -- a group + - ``R`` -- (default: `\ZZ`) a ring EXAMPLES: diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx index 30978223e1c..dc9a23a0682 100644 --- a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx @@ -326,7 +326,7 @@ cdef class FreeAlgebra_letterplace(Parent): INPUT: - - `i` -- an integer + - ``i`` -- integer OUTPUT: the generator with index `i` diff --git a/src/sage/algebras/lie_algebras/examples.py b/src/sage/algebras/lie_algebras/examples.py index a5755fd6d72..2679b72dc97 100644 --- a/src/sage/algebras/lie_algebras/examples.py +++ b/src/sage/algebras/lie_algebras/examples.py @@ -272,7 +272,8 @@ def Heisenberg(R, n, representation='structure'): - ``R`` -- the base ring - ``n`` -- the rank (a nonnegative integer or infinity) - - ``representation`` -- (default: "structure") can be one of the following: + - ``representation`` -- (default: ``'structure'``) can be one of the + following: - ``'structure'`` -- using structure coefficients - ``'matrix'`` -- using matrices diff --git a/src/sage/algebras/lie_algebras/verma_module.py b/src/sage/algebras/lie_algebras/verma_module.py index 1ae160f8f63..87549c007d6 100644 --- a/src/sage/algebras/lie_algebras/verma_module.py +++ b/src/sage/algebras/lie_algebras/verma_module.py @@ -907,7 +907,7 @@ def _composition_(self, right, homset): INPUT: - ``self``, ``right`` -- maps - - homset -- a homset + - ``homset`` -- a homset ASSUMPTION: diff --git a/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py index 08888274e45..a560f000b53 100644 --- a/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py @@ -39,9 +39,9 @@ class FermionicGhostsLieConformalAlgebra(GradedLieConformalAlgebra): - ``R`` -- a commutative ring; the base ring of this Lie conformal algebra - - ``ngens`` -- an even positive Integer (default: ``2``); The + - ``ngens`` -- an even positive Integer (default: ``2``); the number of non-central generators of this Lie conformal - algebra. + algebra - ``names`` -- a tuple of ``str``; alternative names for the generators - ``index_set`` -- an enumerated set; alternative indexing diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index ddd7c55483c..ffd86abd9a2 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1384,7 +1384,7 @@ def modp_splitting_data(self, p): INPUT: - - `p` -- unramified odd prime + - ``p`` -- unramified odd prime OUTPUT: 2-tuple of matrices over finite field @@ -1485,7 +1485,7 @@ def modp_splitting_map(self, p): INPUT: - - `p` -- prime number + - ``p`` -- prime number EXAMPLES:: @@ -3087,7 +3087,7 @@ def theta_series(self, B, var='q'): INPUT: - ``B`` -- positive integer - - ``var`` -- string (default: 'q') + - ``var`` -- string (default: ``'q'``) OUTPUT: power series diff --git a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx index b075635c564..77c585731e7 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx +++ b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx @@ -144,8 +144,8 @@ cdef to_quaternion(R, x): INPUT: - - R -- callable - - x -- element or 4-tuple + - ``R`` -- callable + - ``x`` -- element or 4-tuple Given a callable R and an x that defines a quaternion, which can be a 4-tuple, list of length 4, or something that coerces to R, return @@ -168,9 +168,9 @@ cdef inline print_coeff(y, i, bint atomic): INPUT: - - y -- coefficient - - i -- string (name of a generator) - - atomic -- boolean int; whether or not elements of base ring + - ``y`` -- coefficient + - ``i`` -- string (name of a generator) + - ``atomic`` -- boolean int; whether or not elements of base ring print atomically EXAMPLES:: @@ -563,7 +563,8 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement): INPUT: - - var -- string (default: 'x'); indeterminate of characteristic polynomial + - ``var`` -- string (default: ``'x'``); indeterminate of characteristic + polynomial EXAMPLES:: @@ -592,7 +593,7 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement): INPUT: - - ``action`` -- (default: 'right') 'right' or 'left'. + - ``action`` -- (default: ``'right'``) 'right' or 'left'. OUTPUT: a matrix diff --git a/src/sage/algebras/steenrod/steenrod_algebra.py b/src/sage/algebras/steenrod/steenrod_algebra.py index f0b72606016..023e999f4e4 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra.py +++ b/src/sage/algebras/steenrod/steenrod_algebra.py @@ -957,7 +957,7 @@ def profile(self, i, component=0): INPUT: - - `i` -- integer + - ``i`` -- integer - ``component`` -- either 0 or 1 (default: 0) OUTPUT: integer or `\infty` @@ -1038,7 +1038,7 @@ def homogeneous_component(self, n): INPUT: - - `n` -- integer + - ``n`` -- integer OUTPUT: a vector space spanned by the basis for this algebra in dimension `n` @@ -1720,7 +1720,7 @@ def milnor(self): INPUT: - - x -- an element of this algebra + - ``x`` -- an element of this algebra OUTPUT: x converted to the Milnor basis @@ -1745,7 +1745,7 @@ def _change_basis_on_basis(self, t, basis='milnor'): - ``t`` -- tuple, representing basis element in the current basis - ``basis`` -- string, the basis to which to convert, optional - (default: 'milnor') + (default: ``'milnor'``) OUTPUT: an element of the Steenrod algebra with basis ``basis`` @@ -1827,7 +1827,7 @@ def _change_basis(self, x, basis='milnor'): - ``x`` -- an element of this algebra - ``basis`` -- string, the basis to which to convert, optional - (default: 'milnor') + (default: ``'milnor'``) OUTPUT: an element of the Steenrod algebra with basis ``basis`` @@ -2191,7 +2191,7 @@ def basis(self, d=None): INPUT: - - `d` -- integer or ``None``, (default: ``None``) + - ``d`` -- integer or ``None`` (default: ``None``) OUTPUT: @@ -4185,8 +4185,8 @@ def AA(n=None, p=2): INPUT: - - `n` -- nonnegative integer (default: ``None``) - - `p` -- prime number (default: 2) + - ``n`` -- nonnegative integer (default: ``None``) + - ``p`` -- prime number (default: 2) OUTPUT: diff --git a/src/sage/algebras/steenrod/steenrod_algebra_misc.py b/src/sage/algebras/steenrod/steenrod_algebra_misc.py index af75540082b..4d460570c32 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra_misc.py +++ b/src/sage/algebras/steenrod/steenrod_algebra_misc.py @@ -54,7 +54,7 @@ def get_basis_name(basis, p, generic=None): - ``p`` -- positive prime number - - ``generic`` -- boolean, optional, default to 'None' + - ``generic`` -- boolean (default: 'None') OUTPUT: ``basis_name`` -- string @@ -195,9 +195,9 @@ def is_valid_profile(profile, truncation_type, p=2, generic=None): - ``truncation_type`` -- either 0 or `\infty` - - `p` -- prime number (default: 2) + - ``p`` -- prime number (default: 2) - - `generic` -- boolean (default: ``None``) + - ``generic`` -- boolean (default: ``None``) OUTPUT: ``True`` if the profile function is valid, False otherwise @@ -304,10 +304,10 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene INPUT: - ``profile`` -- a profile function in form specified below - - ``precision`` -- integer or ``None``, optional, default ``None`` - - ``truncation_type`` -- 0 or `\infty` or 'auto', optional, default 'auto' - - `p` -- prime, optional, default 2 - - `generic` -- boolean, optional, default ``None`` + - ``precision`` -- integer or ``None`` (default: ``None``) + - ``truncation_type`` -- 0 or `\infty` or 'auto' (default: 'auto') + - ``p`` -- prime (default: 2) + - ``generic`` -- boolean (default: ``None``) OUTPUT: diff --git a/src/sage/algebras/steenrod/steenrod_algebra_mult.py b/src/sage/algebras/steenrod/steenrod_algebra_mult.py index f544799eff6..3f951a7a767 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra_mult.py +++ b/src/sage/algebras/steenrod/steenrod_algebra_mult.py @@ -210,8 +210,8 @@ def milnor_multiplication(r,s): INPUT: - - r -- tuple of nonnegative integers - - s -- tuple of nonnegative integers + - ``r`` -- tuple of nonnegative integers + - ``s`` -- tuple of nonnegative integers OUTPUT: @@ -324,7 +324,7 @@ def multinomial(list): INPUT: - - list -- list of integers + - ``list`` -- list of integers OUTPUT: none if the multinomial coefficient is 0, or sum of list if it is 1 @@ -378,10 +378,10 @@ def milnor_multiplication_odd(m1,m2,p): INPUT: - - m1 -- pair of tuples (e,r), where e is an increasing tuple of + - ``m1`` -- pair of tuples (e,r), where e is an increasing tuple of nonnegative integers and r is a tuple of nonnegative integers - - m2 -- pair of tuples (f,s), same format as m1 - - p -- odd prime number + - ``m2`` -- pair of tuples (f,s), same format as m1 + - ``p`` -- odd prime number OUTPUT: @@ -574,8 +574,8 @@ def multinomial_odd(list,p): INPUT: - - list -- list of integers - - p -- a prime number + - ``list`` -- list of integers + - ``p`` -- a prime number OUTPUT: associated multinomial coefficient, mod p @@ -672,7 +672,7 @@ def binomial_modp(n,k,p): INPUT: - `n`, `k` -- integers - - `p` -- prime number + - ``p`` -- prime number OUTPUT: `n` choose `k`, mod `p` @@ -698,8 +698,8 @@ def adem(a, b, c=0, p=2, generic=None): - `a`, `b`, `c` -- nonnegative integers (optional); corresponding to either `P^a P^b` or (if `c` present) to `P^a \beta^b P^c` - - `p` -- positive prime number (default: 2) - - `generic` -- whether to use the generic Steenrod algebra, (default: depends on prime) + - ``p`` -- positive prime number (default: 2) + - ``generic`` -- whether to use the generic Steenrod algebra, (default: depends on prime) OUTPUT: @@ -847,8 +847,8 @@ def make_mono_admissible(mono, p=2, generic=None): INPUT: - ``mono`` -- a tuple of nonnegative integers - - `p` -- prime number (default: 2) - - `generic` -- whether to use the generic Steenrod algebra (default: depends on prime) + - ``p`` -- prime number (default: 2) + - ``generic`` -- whether to use the generic Steenrod algebra (default: depends on prime) OUTPUT: diff --git a/src/sage/arith/misc.py b/src/sage/arith/misc.py index d4d20c2ccf4..4c160b6f54c 100644 --- a/src/sage/arith/misc.py +++ b/src/sage/arith/misc.py @@ -406,7 +406,7 @@ def factorial(n, algorithm='gmp'): - ``n`` -- an integer - - ``algorithm`` -- string (default: 'gmp'): + - ``algorithm`` -- string (default: ``'gmp'``): - ``'gmp'`` -- use the GMP C-library factorial function @@ -934,9 +934,9 @@ def primes_first_n(n, leave_pari=False): INPUT: - - `n` -- a nonnegative integer + - ``n`` -- nonnegative integer - OUTPUT: a list of the first `n` prime numbers + OUTPUT: list of the first `n` prime numbers EXAMPLES:: @@ -1039,7 +1039,7 @@ def primes(start=2, stop=None, proof=None): - ``stop`` -- integer (or infinity); upper (open) bound for the primes - - ``proof`` -- bool or ``None`` (default: ``None``); If ``True``, the + - ``proof`` -- bool or ``None`` (default: ``None``); if ``True``, the function yields only proven primes. If ``False``, the function uses a pseudo-primality test, which is much faster for really big numbers but does not provide a proof of primality. If ``None``, uses the global @@ -1691,21 +1691,19 @@ def plot(self, xmin=1, xmax=50, k=1, pointsize=30, rgbcolor=(0,0,1), join=True, INPUT: + - ``xmin`` -- default: 1 - - ``xmin`` -- default: 1 - - - ``xmax`` -- default: 50 + - ``xmax`` -- default: 50 - - ``k`` -- default: 1 + - ``k`` -- default: 1 - - ``pointsize`` -- default: 30 + - ``pointsize`` -- default: 30 - - ``rgbcolor`` -- default: (0,0,1) + - ``rgbcolor`` -- default: (0,0,1) - - ``join`` -- default: ``True``; whether to join the - points. + - ``join`` -- default: ``True``; whether to join the points - - ``**kwds`` -- passed on + - ``**kwds`` -- passed on EXAMPLES:: @@ -2323,9 +2321,9 @@ def rational_reconstruction(a, m, algorithm='fast'): - ``m`` -- a modulus - - ``algorithm`` -- string (default: ``'fast'``s) + - ``algorithm`` -- string (default: ``'fast'``) - - ``'fast'`` -- a fast implementation using direct GMP library calls + - ``'fast'`` -- a fast implementation using direct GMP library calls in Cython OUTPUT: @@ -6054,8 +6052,8 @@ def squarefree_divisors(x): INPUT: - - x -- an element of any ring for which the prime_divisors - function works. + - ``x`` -- an element of any ring for which the prime_divisors + function works EXAMPLES: diff --git a/src/sage/arith/multi_modular.pyx b/src/sage/arith/multi_modular.pyx index 98fec1674e2..660fe02f698 100644 --- a/src/sage/arith/multi_modular.pyx +++ b/src/sage/arith/multi_modular.pyx @@ -502,8 +502,8 @@ cdef class MultiModularBasis_base(): INPUT: - ``z`` -- the integer being reduced - - ``b`` -- array to hold the reductions mod each m_i. - It MUST be allocated and have length at least len + - ``b`` -- array to hold the reductions mod each `m_i`; + it MUST be allocated and have length at least len - ``offset`` -- first prime in list to reduce against - ``len`` -- number of primes in list to reduce against """ @@ -864,8 +864,8 @@ cdef class MultiModularBasis(MultiModularBasis_base): INPUT: - ``z`` -- the integer being reduced - - ``b`` -- array to hold the reductions mod each m_i. - It MUST be allocated and have length at least len + - ``b`` -- array to hold the reductions mod each `m_i`; + it MUST be allocated and have length at least len """ self.mpz_reduce_tail(z, b, 0, self.n) @@ -878,10 +878,9 @@ cdef class MultiModularBasis(MultiModularBasis_base): INPUT: - ``z`` -- an array of integers being reduced - - ``b`` -- array to hold the reductions mod each m_i. - It MUST be fully allocated and each - have length at least len - - ``vn`` -- length of z and each b[i] + - ``b`` -- array to hold the reductions mod each `m_i`; + it MUST be fully allocated and each have length at least len + - ``vn`` -- length of ``z`` and each ``b[i]`` """ self.mpz_reduce_vec_tail(z, b, vn, 0, self.n) @@ -893,10 +892,10 @@ cdef class MultiModularBasis(MultiModularBasis_base): INPUT: - - ``z`` -- a placeholder for the constructed integer - z MUST NOT be initialized - - ``b`` -- array holding the reductions mod each `m_i`. - It MUST have length at least len(self) + - ``z`` -- a placeholder for the constructed integer; + ``z`` MUST NOT be initialized + - ``b`` -- array holding the reductions mod each `m_i`; + it MUST have length at least ``len(self)`` """ self.mpz_crt_tail(z, b, 0, self.n) @@ -911,8 +910,8 @@ cdef class MultiModularBasis(MultiModularBasis_base): - ``z`` -- a placeholder for the constructed integers z MUST be allocated and have length at least vn, but each z[j] MUST NOT be initialized - - ``b`` -- array holding the reductions mod each `m_i`. - It MUST have length at least len(self) + - ``b`` -- array holding the reductions mod each `m_i`; + it MUST have length at least ``len(self)`` - ``vn`` -- length of z and each b[i] """ self.mpz_crt_vec_tail(z, b, vn, 0, self.n) diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py index 505e055fb34..8fca8fa68ad 100644 --- a/src/sage/calculus/calculus.py +++ b/src/sage/calculus/calculus.py @@ -939,7 +939,7 @@ def minpoly(ex, var='x', algorithm=None, bits=None, degree=None, epsilon=0): INPUT: - - ``var`` -- polynomial variable name (default: 'x') + - ``var`` -- polynomial variable name (default: ``'x'``) - ``algorithm`` -- ``'algebraic'`` or ``'numerical'`` (default both, but with numerical first) diff --git a/src/sage/calculus/interpolation.pyx b/src/sage/calculus/interpolation.pyx index 550e5ef258c..7c1334d07d9 100644 --- a/src/sage/calculus/interpolation.pyx +++ b/src/sage/calculus/interpolation.pyx @@ -311,7 +311,7 @@ cdef class Spline: - ``x`` -- value at which to evaluate the derivative - - ``order`` (default: 1) -- order of the derivative. Must be 1 or 2. + - ``order`` -- (default: 1) order of the derivative; must be 1 or 2 EXAMPLES: diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx index 9ecd8c4c56c..805db24248f 100644 --- a/src/sage/calculus/riemann.pyx +++ b/src/sage/calculus/riemann.pyx @@ -716,7 +716,7 @@ cdef class Riemann_Map: The following inputs may be passed in as named parameters: - - ``plotjoined`` -- boolean (default: ``True``); If ``False``, + - ``plotjoined`` -- boolean (default: ``True``); if ``False``, discrete points will be drawn; otherwise they will be connected by lines. In this case, if ``plotjoined=False``, the points shown will be the original collocation points used to generate the @@ -770,12 +770,12 @@ cdef class Riemann_Map: INPUT: - - ``plot_range`` -- a tuple of the form ``[xmin, xmax, ymin, ymax]``. - If the value is ``[]``, the default plotting window of the map will - be used. + - ``plot_range`` -- a tuple of the form ``[xmin, xmax, ymin, ymax]``; + if the value is ``[]``, the default plotting window of the map will + be used - - ``x_points`` -- int, the size of the grid in the x direction - The number of points in the y_direction is scaled accordingly + - ``x_points`` -- integer; the size of the grid in the x direction; + the number of points in the y direction is scaled accordingly OUTPUT: @@ -864,22 +864,22 @@ cdef class Riemann_Map: - only for simply connected domains - ``linescale`` -- float between 0 and 1; shrinks the radial lines - away from the boundary to reduce erratic behavior. + away from the boundary to reduce erratic behavior - only for simply connected domains - - ``rgbcolor`` -- float array (default: ``[0,0,0]``) the - red-green-blue color of the spiderweb. + - ``rgbcolor`` -- float array (default: ``[0,0,0]``); the + red-green-blue color of the spiderweb - - ``thickness`` -- positive float (default: ``1``) the thickness of - the lines or points in the spiderweb. + - ``thickness`` -- positive float (default: `1`); the thickness of + the lines or points in the spiderweb - - ``plotjoined`` -- boolean (default: ``True``); If ``False``, + - ``plotjoined`` -- boolean (default: ``True``); if ``False``, discrete points will be drawn; otherwise they will be connected - by lines. + by lines - only for simply connected domains - - ``withcolor`` -- boolean (default: ``False``); If ``True``, - The spiderweb will be overlaid on the basic color plot. + - ``withcolor`` -- boolean (default: ``False``); if ``True``, + the spiderweb will be overlaid on the basic color plot - ``plot_points`` -- integer (default: ``200``); the size of the grid in the x direction. The number of points in the y_direction is scaled @@ -887,7 +887,7 @@ cdef class Riemann_Map: run slowly. - only for multiply connected domains - - ``min_mag`` -- float (default: ``0.001``); The magnitude cutoff + - ``min_mag`` -- float (default: ``0.001``); the magnitude cutoff below which spiderweb points are not drawn. This only applies to multiply connected domains and is designed to prevent "fuzz" at the edge of the domain. Some complicated multiply diff --git a/src/sage/calculus/transforms/dft.py b/src/sage/calculus/transforms/dft.py index 152c0ff5960..ea6fa319da6 100644 --- a/src/sage/calculus/transforms/dft.py +++ b/src/sage/calculus/transforms/dft.py @@ -717,8 +717,8 @@ def dwt(self, other='haar', wavelet_k=2): * ``'bspline_centered'`` - ``wavelet_k`` -- for daubechies wavelets, ``wavelet_k`` specifies a - daubechie wavelet with `k/2` vanishing moments. - `k = 4,6,...,20` for `k` even are the only ones implemented. + daubechie wavelet with `k/2` vanishing moments; + `k = 4,6,...,20` for `k` even are the only ones implemented For Haar wavelets, ``wavelet_k`` must be 2. @@ -783,8 +783,8 @@ def idwt(self, other='haar', wavelet_k=2): * ``'bspline_centered'`` - ``wavelet_k`` -- for daubechies wavelets, ``wavelet_k`` specifies a - daubechie wavelet with `k/2` vanishing moments. - `k = 4,6,...,20` for `k` even are the only ones implemented. + daubechie wavelet with `k/2` vanishing moments; + `k = 4,6,...,20` for `k` even are the only ones implemented For Haar wavelets, ``wavelet_k`` must be 2. diff --git a/src/sage/categories/coxeter_groups.py b/src/sage/categories/coxeter_groups.py index 2f059ea5946..1b88ca07b07 100644 --- a/src/sage/categories/coxeter_groups.py +++ b/src/sage/categories/coxeter_groups.py @@ -445,7 +445,7 @@ def weak_order_ideal(self, predicate, side='right', category=None): - ``predicate``: a predicate on the elements of ``self`` defining an weak order ideal in ``self`` - - ``side``: "left" or "right" (default: "right") + - ``side``: "left" or "right" (default: ``'right'``) OUTPUT: an enumerated set @@ -892,7 +892,7 @@ def simple_projections(self, side='right', length_increasing=True): INPUT: - ``self`` -- a Coxeter group `W` - - ``side`` -- 'left' or 'right' (default: 'right') + - ``side`` -- 'left' or 'right' (default: ``'right'``) - ``length_increasing`` -- boolean (default: ``True``); whether the operator increases or decreases length @@ -1005,7 +1005,7 @@ def demazure_product(self, Q): INPUT: - - ``Q`` is a list of elements from the index set of ``self``. + - ``Q`` -- list of elements from the index set of ``self`` This returns the Coxeter group element that represents the composition of 0-Hecke or Demazure operators. @@ -1538,7 +1538,7 @@ def descents(self, side='right', index_set=None, positive=False): - ``index_set`` -- a subset (as a list or iterable) of the nodes of the Dynkin diagram; (default: all of them) - - ``side`` -- 'left' or 'right' (default: 'right') + - ``side`` -- 'left' or 'right' (default: ``'right'``) - ``positive`` -- boolean (default: ``False``) The ``index_set`` option can be used to restrict to the @@ -1579,7 +1579,7 @@ def is_grassmannian(self, side='right') -> bool: INPUT: - - ``side`` -- "left" or "right" (default: "right") + - ``side`` -- "left" or "right" (default: ``'right'``) An element is Grassmannian if it has at most one descent on the right (resp. on the left). @@ -2322,7 +2322,7 @@ def apply_simple_projection(self, i, side='right', length_increasing=True): INPUT: - ``i`` -- an element of the index set of the Coxeter group - - ``side`` -- 'left' or 'right' (default: 'right') + - ``side`` -- 'left' or 'right' (default: ``'right'``) - ``length_increasing`` -- boolean (default: ``True``); specifying the direction of the projection @@ -2647,7 +2647,7 @@ def bruhat_le(self, other): INPUT: - - other -- an element of the same Coxeter group + - ``other`` -- an element of the same Coxeter group OUTPUT: boolean @@ -2719,8 +2719,8 @@ def weak_le(self, other, side='right'): INPUT: - - other -- an element of the same Coxeter group - - side -- 'left' or 'right' (default: 'right') + - ``other`` -- an element of the same Coxeter group + - ``side`` -- 'left' or 'right' (default: ``'right'``) OUTPUT: boolean @@ -2790,9 +2790,9 @@ def weak_covers(self, side='right', index_set=None, positive=False): INPUT: - - side -- 'left' or 'right' (default: 'right') - - positive -- boolean (default: ``False``) - - index_set -- list of indices or None + - ``side`` -- 'left' or 'right' (default: ``'right'``) + - ``positive`` -- boolean (default: ``False``) + - ``index_set`` -- list of indices or None OUTPUT: list @@ -2954,7 +2954,7 @@ def apply_demazure_product(self, element, side='right', reduced word) of elements from the index set of the Coxeter group. - - ``side`` -- 'left' or 'right' (default: 'right'); the + - ``side`` -- 'left' or 'right' (default: ``'right'``); the side of ``self`` on which the element should be applied. If ``side`` is 'left' then the operation is applied on the left. @@ -3042,8 +3042,9 @@ def deodhar_factor_element(self, w, index_set): INPUT: - - ``w`` is an element of the same Coxeter group ``W`` as ``self`` - - ``index_set`` is a subset of Dynkin nodes defining a parabolic subgroup ``W'`` of ``W`` + - ``w`` -- an element of the same Coxeter group ``W`` as ``self`` + - ``index_set`` -- a subset of Dynkin nodes defining a parabolic + subgroup ``W'`` of ``W`` It is assumed that ``v = self`` and ``w`` are minimum length coset representatives for ``W/W'`` such that ``v`` `\le` ``w`` in Bruhat order. @@ -3101,8 +3102,9 @@ def deodhar_lift_up(self, w, index_set): INPUT: - - ``w`` is an element of the same Coxeter group ``W`` as ``self``. - - ``index_set`` is a subset of Dynkin nodes defining a parabolic subgroup ``W'``. + - ``w`` -- an element of the same Coxeter group ``W`` as ``self`` + - ``index_set`` -- a subset of Dynkin nodes defining a parabolic + subgroup ``W'`` OUTPUT: @@ -3136,8 +3138,8 @@ def deodhar_lift_down(self, w, index_set): INPUT: - - ``w`` is an element of the same Coxeter group ``W`` as ``self``. - - ``index_set`` is a subset of Dynkin nodes defining a parabolic subgroup ``W'``. + - ``w`` -- an element of the same Coxeter group ``W`` as ``self`` + - ``index_set`` -- a subset of Dynkin nodes defining a parabolic subgroup ``W'`` OUTPUT: diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index f14c07559a1..45e7e3a64aa 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -212,7 +212,7 @@ def __init__(self, base_field, name='t'): - ``base_field`` -- the base field, which is a ring extension over a base - - ``name`` (default: ``'t'``) -- the name of the Ore polynomial + - ``name`` -- (default: ``'t'``) the name of the Ore polynomial variable TESTS:: diff --git a/src/sage/categories/examples/finite_coxeter_groups.py b/src/sage/categories/examples/finite_coxeter_groups.py index f8bdaa8f460..df06e337d2c 100644 --- a/src/sage/categories/examples/finite_coxeter_groups.py +++ b/src/sage/categories/examples/finite_coxeter_groups.py @@ -92,7 +92,7 @@ def __init__(self, n=5): INPUT: - - `n` -- an integer with `n \geq 2` + - ``n`` -- integer with `n \geq 2` EXAMPLES:: diff --git a/src/sage/categories/facade_sets.py b/src/sage/categories/facade_sets.py index ecb32a25835..208ba53b1e5 100644 --- a/src/sage/categories/facade_sets.py +++ b/src/sage/categories/facade_sets.py @@ -23,7 +23,7 @@ def example(self, choice='subset'): INPUT: - - ``choice`` -- 'union' or 'subset' (default: 'subset'). + - ``choice`` -- 'union' or 'subset' (default: ``'subset'``) EXAMPLES:: diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py index 6778f68fda6..811545a5823 100644 --- a/src/sage/categories/finite_coxeter_groups.py +++ b/src/sage/categories/finite_coxeter_groups.py @@ -398,7 +398,7 @@ def weak_poset(self, side='right', facade=False): """ INPUT: - - ``side`` -- "left", "right", or "twosided" (default: "right") + - ``side`` -- "left", "right", or "twosided" (default: ``'right'``) - ``facade`` -- boolean (default: ``False``) Returns the left (resp. right) poset for weak order. In @@ -552,10 +552,10 @@ def m_cambrian_lattice(self, c, m=1, on_roots=False): INPUT: - - `c` -- a Coxeter element of ``self`` (as a tuple, or + - ``c`` -- a Coxeter element of ``self`` (as a tuple, or as an element of ``self``) - - `m` -- a positive integer (default: 1) + - ``m`` -- a positive integer (default: 1) - ``on_roots`` -- boolean (default: ``False``); if ``on_roots`` is ``True``, the lattice is realized on diff --git a/src/sage/categories/finite_dimensional_algebras_with_basis.py b/src/sage/categories/finite_dimensional_algebras_with_basis.py index faff88304f5..0f8b531e37a 100644 --- a/src/sage/categories/finite_dimensional_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_algebras_with_basis.py @@ -652,7 +652,7 @@ def idempotent_lift(self, x): INPUT: - - `x` -- an element of `A` that projects on an idempotent + - ``x`` -- an element of `A` that projects on an idempotent `\overline x` of the semisimple quotient of `A`. Alternatively one may give as input the idempotent `\overline{x}`, in which case some lift thereof will be @@ -847,7 +847,7 @@ def isotypic_projective_modules(self, side='left'): INPUT: - - ``side`` -- 'left' or 'right' (default: 'left') + - ``side`` -- 'left' or 'right' (default: ``'left'``) OUTPUT: a list of subspaces of ``self`` @@ -1171,7 +1171,7 @@ def to_matrix(self, base_ring=None, action=operator.mul, side='left'): - ``base_ring`` -- the base ring for the matrix to be constructed - ``action`` -- a bivariate function (default: :func:`operator.mul`) - - ``side`` -- 'left' or 'right' (default: 'left') + - ``side`` -- 'left' or 'right' (default: ``'left'``) EXAMPLES:: diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 4a107de2dff..874fd384195 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -64,7 +64,7 @@ def annihilator(self, S, action=operator.mul, side='right', category=None): - ``action`` -- a function (default: :obj:`operator.mul`) - - ``side`` -- 'left' or 'right' (default: 'right') + - ``side`` -- 'left' or 'right' (default: ``'right'``) - ``category`` -- a category @@ -141,7 +141,7 @@ def annihilator_basis(self, S, action=operator.mul, side='right'): - ``action`` -- a function (default: :obj:`operator.mul`) - - ``side`` -- 'left' or 'right' (default: 'right'): + - ``side`` -- 'left' or 'right' (default: ``'right'``): on which side of ``self`` the elements of `S` acts. See :meth:`annihilator` for the assumptions and definition @@ -580,7 +580,7 @@ def matrix(self, base_ring=None, side='left'): - ``base_ring`` -- a ring (default: ``None``, meaning the base ring of the codomain) - - ``side`` -- "left" or "right" (default: "left") + - ``side`` -- "left" or "right" (default: ``'left'``) If ``side`` is "left", this morphism is considered as acting on the left; i.e. each column of the matrix diff --git a/src/sage/categories/finite_posets.py b/src/sage/categories/finite_posets.py index ba20c6cfd82..b07bccde6a3 100644 --- a/src/sage/categories/finite_posets.py +++ b/src/sage/categories/finite_posets.py @@ -386,7 +386,7 @@ def order_ideal_complement_generators(self, antichain, direction='up'): - ``antichain`` -- an antichain of ``self``, as a list (or iterable), or, more generally, generators of an order ideal (resp. order filter) - - ``direction`` -- 'up' or 'down' (default: 'up') + - ``direction`` -- 'up' or 'down' (default: ``'up'``) OUTPUT: diff --git a/src/sage/categories/lambda_bracket_algebras.py b/src/sage/categories/lambda_bracket_algebras.py index 970def4aac0..637f5ae6ee5 100644 --- a/src/sage/categories/lambda_bracket_algebras.py +++ b/src/sage/categories/lambda_bracket_algebras.py @@ -41,7 +41,7 @@ def __classcall_private__(cls, R, check=True): r""" INPUT: - - `R` -- a commutative ring + - ``R`` -- a commutative ring - ``check`` -- boolean (default: ``True``); whether to check that `R` is a commutative ring diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index 5052096059c..ba8c599be4b 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -977,7 +977,7 @@ cdef class Map(Element): INPUT: - ``self``, ``right`` -- maps - - homset -- a homset + - ``homset`` -- a homset ASSUMPTION: diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 24848a51aa0..9cf74ebe387 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -284,8 +284,8 @@ def module_morphism(self, on_basis=None, matrix=None, function=None, As a shorthand, one may use ``unitriangular="lower"`` for ``triangular='lower', unitriangular=True``. - - ``side`` -- "left" or "right" (default: "left") - Only meaningful for a morphism built from a matrix. + - ``side`` -- "left" or "right" (default: ``'left'``); + only meaningful for a morphism built from a matrix EXAMPLES: diff --git a/src/sage/categories/number_fields.py b/src/sage/categories/number_fields.py index 09b549d0012..c353a453818 100644 --- a/src/sage/categories/number_fields.py +++ b/src/sage/categories/number_fields.py @@ -140,14 +140,14 @@ def zeta_function(self, prec=53, - ``max_asymp_coeffs`` -- integer (default: 40) - - ``algorithm`` -- (default: "pari") either "gp" or "pari" + - ``algorithm`` -- (default: ``'pari'``) either 'gp' or 'pari' OUTPUT: the zeta function of this number field - If algorithm is "gp", this returns an interface to Tim + If algorithm is 'gp', this returns an interface to Tim Dokchitser's gp script for computing with L-functions. - If algorithm is "pari", this returns instead an interface to Pari's + If algorithm is 'pari', this returns instead an interface to Pari's own general implementation of L-functions. EXAMPLES:: diff --git a/src/sage/categories/posets.py b/src/sage/categories/posets.py index 97ff55a7130..d93000c8985 100644 --- a/src/sage/categories/posets.py +++ b/src/sage/categories/posets.py @@ -318,9 +318,9 @@ def directed_subset(self, elements, direction): INPUT: - - elements -- list of elements + - ``elements`` -- list of elements - - direction -- 'up' or 'down' + - ``direction`` -- 'up' or 'down' EXAMPLES:: diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py index 3c4650efbb6..c13bf5a275e 100644 --- a/src/sage/categories/pushout.py +++ b/src/sage/categories/pushout.py @@ -428,7 +428,7 @@ class CompositeConstructionFunctor(ConstructionFunctor): INPUT: - ``F1, F2,...``: A list of Construction Functors. The result is the + ``F1, F2,...`` -- A list of Construction Functors. The result is the composition ``F1`` followed by ``F2`` followed by ... EXAMPLES:: @@ -1752,8 +1752,8 @@ def __init__(self, var, multi_variate=False): """ INPUT: - - ``var``, a string or a list of strings - - ``multi_variate``, optional bool, default ``False`` if ``var`` is a string + - ``var`` -- a string or a list of strings + - ``multi_variate`` -- optional bool, default ``False`` if ``var`` is a string and ``True`` otherwise: If ``True``, application to a Laurent polynomial ring yields a multivariate Laurent polynomial ring. @@ -1899,11 +1899,11 @@ def __init__(self, n=None, is_sparse=False, inner_product_matrix=None, *, """ INPUT: - - ``n``, the rank of the to-be-created modules (nonnegative integer) - - ``is_sparse`` (optional bool, default ``False``), create sparse implementation of modules - - ``inner_product_matrix``: ``n`` by ``n`` matrix, used to compute inner products in the + - ``n`` -- the rank of the to-be-created modules (nonnegative integer) + - ``is_sparse`` -- (optional bool, default ``False``), create sparse implementation of modules + - ``inner_product_matrix`` -- ``n`` by ``n`` matrix, used to compute inner products in the to-be-created modules - - ``name_mapping``, ``latex_name_mapping``: Dictionaries from base rings to names + - ``name_mapping``, ``latex_name_mapping`` -- Dictionaries from base rings to names - other keywords: see :func:`~sage.modules.free_module.FreeModule` TESTS:: @@ -2224,7 +2224,7 @@ def __init__(self, basis): """ INPUT: - ``basis``: a list of elements of a free module. + ``basis`` -- a list of elements of a free module. TESTS:: @@ -2548,14 +2548,15 @@ def __init__(self, p, prec, extras=None): """ INPUT: - - ``p``: A prime number, the generator of a univariate polynomial ring, or ``+Infinity`` + - ``p`` -- prime number, the generator of a univariate polynomial ring, + or ``+Infinity`` - - ``prec``: an integer, yielding the precision in bits. Note that + - ``prec`` -- integer; yielding the precision in bits. Note that if ``p`` is prime then the ``prec`` is the *capped* precision, while it is the *set* precision if ``p`` is ``+Infinity``. In the ``lattice-cap`` precision case, ``prec`` will be a tuple instead. - - ``extras`` (optional dictionary): Information on how to print elements, etc. + - ``extras`` -- dictionary (optional); information on how to print elements, etc. If 'type' is given as a key, the corresponding value should be a string among the following: @@ -2898,15 +2899,15 @@ def __init__(self, I, names=None, as_field=False, domain=None, """ INPUT: - - ``I``, an ideal (the modulus) - - ``names`` (optional string or list of strings), the names for the + - ``I`` -- an ideal (the modulus) + - ``names`` -- string or list of strings (optional); the names for the quotient ring generators - - ``as_field`` (optional bool, default false), return the quotient - ring as field (if available). - - ``domain`` (optional category, default ``Rings()``), the domain of - this functor. - - ``codomain`` (optional category, default ``Rings()``), the codomain - of this functor. + - ``as_field`` -- boolean (default: ``False``); return the quotient + ring as field (if available) + - ``domain`` -- category (default: ``Rings()``); the domain of + this functor + - ``codomain`` -- category (default: ``Rings()``); the codomain + of this functor - Further named arguments. In particular, an implementation of the quotient can be suggested here. These named arguments are passed to the quotient construction. diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index bcf51374dd5..22039d5fc0e 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -647,7 +647,7 @@ def twisted_chain_complex(self, twisting_operator=None, dimensions=None, augment - ``subcomplex`` -- (default: ``None``) if present, compute the chain complex relative to this subcomplex. - - ``check`` -- boolean (default: ``False``); If ``True``, make + - ``check`` -- boolean (default: ``False``); if ``True``, make sure that the chain complex is actually a chain complex: the differentials are composable and their product is zero. diff --git a/src/sage/categories/vector_spaces.py b/src/sage/categories/vector_spaces.py index 282c227151c..935ef0a4e90 100644 --- a/src/sage/categories/vector_spaces.py +++ b/src/sage/categories/vector_spaces.py @@ -43,7 +43,7 @@ def __classcall_private__(cls, K, check=True): """ INPUT: - - `K` -- a field + - ``K`` -- a field - ``check`` -- boolean (default: ``True``); whether to check that `K` is a field diff --git a/src/sage/categories/weyl_groups.py b/src/sage/categories/weyl_groups.py index b0794af3def..a5b78d7709c 100644 --- a/src/sage/categories/weyl_groups.py +++ b/src/sage/categories/weyl_groups.py @@ -171,7 +171,7 @@ def bruhat_cone(self, x, y, side='upper', backend='cdd'): - ``y`` -- an element in the group `W` - - ``side`` (default: ``'upper'``) -- must be one of the following: + - ``side`` -- (default: ``'upper'``) must be one of the following: * ``'upper'`` -- return the upper Bruhat cone of the interval [``x``, ``y``] * ``'lower'`` -- return the lower Bruhat cone of the interval [``x``, ``y``] diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index 0441f6f5a5b..c964181b33a 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -581,8 +581,8 @@ cdef codeword *expand_to_ortho_basis(BinaryCode B, int n) noexcept: r""" INPUT: - - B -- a BinaryCode in standard form - - n -- the degree + - ``B`` -- a BinaryCode in standard form + - ``n`` -- the degree OUTPUT: @@ -1086,10 +1086,10 @@ cdef class BinaryCode: INPUT: - - col_gamma -- permutation sending i |--> col_gamma[i] acting - on the columns. - - word_gamma -- permutation sending i |--> word_gamma[i] acting - on the words. + - ``col_gamma`` -- permutation sending i |--> col_gamma[i] acting + on the columns + - ``word_gamma`` -- permutation sending i |--> word_gamma[i] acting + on the words EXAMPLES:: @@ -1141,7 +1141,7 @@ cdef class BinaryCode: INPUT: - - labeling -- list permutation of the columns + - ``labeling`` -- list permutation of the columns EXAMPLES:: @@ -2561,9 +2561,9 @@ cdef class PartitionStack: INPUT: - - start -- location of the beginning of the cell - - k -- at what level of refinement the partition of interest lies - - degrees -- the counts to sort by + - ``start`` -- location of the beginning of the cell + - ``k`` -- at what level of refinement the partition of interest lies + - ``degrees`` -- the counts to sort by EXAMPLES:: @@ -2633,9 +2633,9 @@ cdef class PartitionStack: INPUT: - - start -- location of the beginning of the cell - - k -- at what level of refinement the partition of interest lies - - degrees -- the counts to sort by + - ``start`` -- location of the beginning of the cell + - ``k`` -- at what level of refinement the partition of interest lies + - ``degrees`` -- the counts to sort by EXAMPLES:: diff --git a/src/sage/coding/codecan/autgroup_can_label.pyx b/src/sage/coding/codecan/autgroup_can_label.pyx index 44cee14ef02..f31154a6244 100644 --- a/src/sage/coding/codecan/autgroup_can_label.pyx +++ b/src/sage/coding/codecan/autgroup_can_label.pyx @@ -192,10 +192,10 @@ class LinearCodeAutGroupCanLabel: - ``C`` -- a linear code - - ``P`` (optional) -- a coloring of the coordinates i.e. a partition + - ``P`` -- optional; a coloring of the coordinates i.e. a partition (list of disjoint lists) of [0 , ..., C.length()-1 ] - - ``algorithm_type`` (optional) -- which defines the acting group, either + - ``algorithm_type`` -- optional; defines the acting group, either * ``permutational`` @@ -412,7 +412,7 @@ class LinearCodeAutGroupCanLabel: only if the indices ``col2pos[i]`` and ``col2pos[j]`` are in the same partition - - ``zero_column_case`` (boolean) -- set to ``True`` iff we are dealing + - ``zero_column_case`` -- boolean; set to ``True`` iff we are dealing with the zero column OUTPUT: a list of generators in `S` diff --git a/src/sage/coding/codecan/codecan.pyx b/src/sage/coding/codecan/codecan.pyx index 6e1e4358b27..c283b7aad37 100644 --- a/src/sage/coding/codecan/codecan.pyx +++ b/src/sage/coding/codecan/codecan.pyx @@ -146,7 +146,7 @@ cdef class InnerGroup: * "permutational -- no field automorphisms and no column multiplications i.e. `G = GL(k,q)` - - ``transporter`` (optional) -- set to an element of the group + - ``transporter`` -- optional; set to an element of the group :class:`sage.groups.semimonomial_transformations.semimonomial_transformation_group.SemimonomialTransformationGroup` if you would like to modify this element simultaneously diff --git a/src/sage/coding/cyclic_code.py b/src/sage/coding/cyclic_code.py index 8c02715c837..284e8444fb5 100644 --- a/src/sage/coding/cyclic_code.py +++ b/src/sage/coding/cyclic_code.py @@ -589,7 +589,7 @@ def defining_set(self, primitive_root=None): INPUT: - - ``primitive_root`` (optional) -- a primitive root of the extension + - ``primitive_root`` -- optional; a primitive root of the extension field EXAMPLES: diff --git a/src/sage/coding/gabidulin_code.py b/src/sage/coding/gabidulin_code.py index 2ae31cdfb11..cce8fcfc7d5 100644 --- a/src/sage/coding/gabidulin_code.py +++ b/src/sage/coding/gabidulin_code.py @@ -257,7 +257,7 @@ def __eq__(self, other): - ``other`` -- another Gabidulin Code object - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -465,7 +465,7 @@ def __eq__(self, other): - ``other`` -- another Gabidulin Generator Matrix Encoder - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -621,7 +621,7 @@ def __eq__(self, other): - ``other`` -- another Gabidulin Polynomial Evaluation Encoder - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -674,7 +674,7 @@ def encode(self, p, form='vector'): - ``form`` -- type parameter taking strings "vector" or "matrix" as values and converting the output codeword into the respective form - (default: "vector") + (default: ``'vector'``) OUTPUT: a codeword corresponding to `p` in vector or matrix form @@ -847,7 +847,7 @@ def __eq__(self, other) -> bool: - ``other`` -- another Gabidulin Gao Decoder - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: diff --git a/src/sage/coding/information_set_decoder.py b/src/sage/coding/information_set_decoder.py index a0584ff44b2..7682af230c1 100644 --- a/src/sage/coding/information_set_decoder.py +++ b/src/sage/coding/information_set_decoder.py @@ -439,8 +439,8 @@ def decode(self, r): INPUT: - - `r` -- a received word, i.e. a vector in the ambient space of - :meth:`decoder.Decoder.code`. + - ``r`` -- a received word, i.e. a vector in the ambient space of + :meth:`decoder.Decoder.code` OUTPUT: a codeword whose distance to `r` satisfies ``self.decoding_interval()``. @@ -606,8 +606,8 @@ def _calibrate_select(self, estimates): INPUT: - - `estimates` -- list of time estimates, for the search size set to the - index of the list entry. + - ``estimates`` -- list of time estimates, for the search size set to the + index of the list entry OUTPUT: none, but sets the private fields `self._parameters` and `self._time_estimate`. diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py index c4e83fde8ba..9674cc207fa 100644 --- a/src/sage/coding/linear_code.py +++ b/src/sage/coding/linear_code.py @@ -445,7 +445,7 @@ def automorphism_group_gens(self, equivalence='semilinear'): INPUT: - - ``equivalence`` (optional) -- which defines the acting group, either + - ``equivalence`` -- optional; defines the acting group, either * ``'permutational'`` @@ -745,7 +745,7 @@ def canonical_representative(self, equivalence='semilinear'): INPUT: - - ``equivalence`` (optional) -- which defines the acting group, either + - ``equivalence`` -- optional; defines the acting group, either * ``'permutational'`` diff --git a/src/sage/coding/source_coding/huffman.py b/src/sage/coding/source_coding/huffman.py index c97b0e455b6..edd92c4d9f6 100644 --- a/src/sage/coding/source_coding/huffman.py +++ b/src/sage/coding/source_coding/huffman.py @@ -266,7 +266,7 @@ def _build_code_from_tree(self, tree, d, prefix): - ``d`` -- the dictionary to fill - - ``prefix`` (string) -- binary string which is the prefix + - ``prefix`` -- string; binary string which is the prefix of any element of the tree EXAMPLES:: diff --git a/src/sage/combinat/affine_permutation.py b/src/sage/combinat/affine_permutation.py index 7088b3c95c1..7fdeb0a67cb 100644 --- a/src/sage/combinat/affine_permutation.py +++ b/src/sage/combinat/affine_permutation.py @@ -675,11 +675,11 @@ def maximal_cyclic_factor(self, typ='decreasing', side='right', verbose=False): (default: ``'decreasing'``); chooses whether to find increasing or decreasing sets - - ``side`` -- ``'right'`` or ``'left'`` (default: ``'right'``) chooses + - ``side`` -- ``'right'`` or ``'left'`` (default: ``'right'``); chooses whether to find maximal sets starting from the left or the right - - ``verbose`` -- boolean; If ``True``, outputs information about how - the cyclically increasing element was found. + - ``verbose`` -- boolean; if ``True``, outputs information about how + the cyclically increasing element was found EXAMPLES:: diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 06175665f67..f911ca53519 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2739,7 +2739,7 @@ def _is_solution(self, constraint, values): INPUT: - ``constraint`` -- a - :class:`sage.numerical.linear_functions.LinearConstraint`. + :class:`sage.numerical.linear_functions.LinearConstraint` - ``values`` -- a candidate for a solution of the MILP as a dictionary from pairs `(a, z)\in A\times Z` to `0` or `1`, diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py index 1ec32b693f2..5e79f50201d 100644 --- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py +++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py @@ -396,7 +396,7 @@ def use_c_vectors(self, use=True, bot_is_c=False, force=False): - ``use`` -- boolean (default: ``True``); if ``True``, will use `c`-vectors - - ``bot_is_c`` -- boolean (default: ``False``); If ``True`` and + - ``bot_is_c`` -- boolean (default: ``False``); if ``True`` and :class:`ClusterSeed` ``self`` has ``self._m == self._n``, then will assume bottom half of the extended exchange matrix is the c-matrix. If ``True``, lets the :class:`ClusterSeed` know c-vectors can be @@ -481,7 +481,7 @@ def use_g_vectors(self, use=True, force=False): INPUT: - - ``use`` -- boolean (default: ``True``); If ``True``, will use + - ``use`` -- boolean (default: ``True``); if ``True``, will use g-vectors EXAMPLES:: @@ -567,7 +567,7 @@ def use_d_vectors(self, use=True, force=False): INPUT: - - ``use`` -- boolean (default: ``True``); If ``True``, will use + - ``use`` -- boolean (default: ``True``); if ``True``, will use `d`-vectors EXAMPLES:: @@ -753,7 +753,7 @@ def track_mutations(self, use=True): INPUT: - - ``use`` -- boolean (default: ``True``); If ``True``, will begin + - ``use`` -- boolean (default: ``True``); if ``True``, will begin filling the mutation path EXAMPLES:: @@ -809,7 +809,7 @@ def _sanitize_init_vars(self, user_labels, user_labels_prefix='x'): INPUT: - - ``user_labels`` -- The labels that need sanitizing + - ``user_labels`` -- the labels that need sanitizing - ``user_labels_prefix`` -- (default: ``'x'``) The prefix to use for labels if integers given for labels @@ -878,9 +878,9 @@ def set_c_matrix(self, data): INPUT: - - ``data`` -- The matrix to set the c-matrix to. Also allowed + - ``data`` -- the matrix to set the c-matrix to; also allowed to be a quiver or cluster seed, in which case the b-matrix - is used. + is used EXAMPLES:: @@ -1153,7 +1153,7 @@ def save_image(self, filename, circular=False, mark=None, save_pos=False): sage: S = ClusterSeed(['F',4,[1,2]]) sage: import tempfile - sage: with tempfile.NamedTemporaryFile(suffix=".png") as f: # needs sage.plot sage.symbolic + sage: with tempfile.NamedTemporaryFile(suffix='.png') as f: # needs sage.plot sage.symbolic ....: S.save_image(f.name) """ graph_plot = self.plot(circular=circular, mark=mark, save_pos=save_pos) @@ -1221,7 +1221,7 @@ def x(self, k): sage: S.x(2) x2 - sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format="list_of_edges") + sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format='list_of_edges') sage: S = ClusterSeed(dg, frozen=['c']) sage: S.x(0) a @@ -1260,7 +1260,7 @@ def y(self, k): sage: S.y(2) y2 - sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format="list_of_edges") + sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format='list_of_edges') sage: S = ClusterSeed(dg, frozen=['c']) sage: S.y(0) c @@ -1984,7 +1984,7 @@ def green_vertices(self): r""" Return the list of green vertices of ``self``. - A vertex is defined to be green if its c-vector has all non-positive + A vertex is defined to be green if its c-vector has all nonpositive entries. More information on green vertices can be found at [BDP2013]_ OUTPUT: the green vertices as a list of integers @@ -2008,7 +2008,7 @@ def first_green_vertex(self): r""" Return the first green vertex of ``self``. - A vertex is defined to be green if its c-vector has all non-positive entries. + A vertex is defined to be green if its c-vector has all nonpositive entries. More information on green vertices can be found at [BDP2013]_ EXAMPLES:: @@ -2033,7 +2033,7 @@ def red_vertices(self): r""" Return the list of red vertices of ``self``. - A vertex is defined to be red if its c-vector has all non-negative entries. + A vertex is defined to be red if its c-vector has all nonnegative entries. More information on red vertices can be found at [BDP2013]_. OUTPUT: the red vertices as a list of integers @@ -2062,7 +2062,7 @@ def first_red_vertex(self): r""" Return the first red vertex of ``self``. - A vertex is defined to be red if its c-vector has all non-negative entries. + A vertex is defined to be red if its c-vector has all nonnegative entries. More information on red vertices can be found at [BDP2013]_. EXAMPLES:: @@ -2139,7 +2139,7 @@ def highest_degree_denominator(self, filter=None): INPUT: - - ``filter`` -- a list or iterable + - ``filter`` -- list or iterable OUTPUT: integer @@ -2285,14 +2285,14 @@ def mutate(self, sequence, inplace=True, input_type=None): Possible values for vertex types in ``sequence`` are: - - ``"first_source"``: mutates at first found source vertex, - - ``"sources"``: mutates at all sources, - - ``"first_sink"``: mutates at first sink, - - ``"sinks"``: mutates at all sink vertices, - - ``"green"``: mutates at the first green vertex, - - ``"red"``: mutates at the first red vertex, - - ``"urban_renewal"`` or ``"urban"``: mutates at first urban renewal vertex, - - ``"all_urban_renewals"`` or ``"all_urban"``: mutates at all + - ``'first_source'``: mutates at first found source vertex, + - ``'sources'``: mutates at all sources, + - ``'first_sink'``: mutates at first sink, + - ``'sinks'``: mutates at all sink vertices, + - ``'green'``: mutates at the first green vertex, + - ``'red'``: mutates at the first red vertex, + - ``'urban_renewal'`` or ``'urban'``: mutates at first urban renewal vertex, + - ``'all_urban_renewals'`` or ``'all_urban'``: mutates at all urban renewal vertices. For ``input_type``, if no value is given, preference will @@ -2300,9 +2300,9 @@ def mutate(self, sequence, inplace=True, input_type=None): If all input is not of the same type, an error is given. Possible values for ``input_type`` are: - - ``"vertices"``: interprets the input sequence as vertices - - ``"indices"``: interprets the input sequence as indices - - ``"cluster_vars"``: interprets the input sequence as cluster variables + - ``'vertices'``: interprets the input sequence as vertices + - ``'indices'``: interprets the input sequence as indices + - ``'cluster_vars'``: interprets the input sequence as cluster variables this must be selected if inputting a sequence of cluster variables. EXAMPLES:: @@ -2436,7 +2436,7 @@ def mutate(self, sequence, inplace=True, input_type=None): Mutating at vertices by default. sage: S.cluster() [(x2 + 1)/x1, x2, c] - sage: S.mutate(1, input_type="indices") + sage: S.mutate(1, input_type='indices') sage: S.cluster() [(x2 + 1)/x1, (x2*c + x1 + c)/(x1*x2), c] @@ -2449,7 +2449,7 @@ def mutate(self, sequence, inplace=True, input_type=None): Mutating at vertices by default. sage: S.cluster() [(a*c*d + 1)/b, a, c, d] - sage: S.mutate('a', input_type="cluster_vars") + sage: S.mutate('a', input_type='cluster_vars') sage: S.cluster() [(a*c*d + 1)/b, (a*c*d + b + 1)/(a*b), c, d] sage: S.mutate(['(a*c*d + 1)/b', 'd']) @@ -2613,7 +2613,7 @@ def mutate(self, sequence, inplace=True, input_type=None): index_list = [] for cluster_var in seqq: new_index = mutation_seed.cluster_index(cluster_var) - mutation_seed.mutate(new_index, input_type="indices") + mutation_seed.mutate(new_index, input_type='indices') index_list.append(new_index) except (ValueError, TypeError): raise ValueError('input interpreted as cluster variables,' @@ -2712,24 +2712,24 @@ def mutation_sequence(self, sequence, show_sequence=False, INPUT: - - ``sequence`` -- an iterable of vertices of self. + - ``sequence`` -- an iterable of vertices of self - ``show_sequence`` -- boolean (default: ``False``); if ``True``, a png - containing the associated quivers is shown. + containing the associated quivers is shown - ``fig_size`` -- (default: 1.2) factor by which the size of - the plot is multiplied. + the plot is multiplied - ``return_output`` -- (default: ``'seed'``) determines what output is to be returned: * if ``'seed'``, outputs all the cluster seeds obtained - by the ``sequence`` of mutations. + by the ``sequence`` of mutations - * if ``'matrix'``, outputs a list of exchange matrices. + * if ``'matrix'``, outputs a list of exchange matrices * if ``'var'``, outputs a list of new cluster variables obtained - at each step. + at each step EXAMPLES:: @@ -2785,20 +2785,20 @@ def mutation_analysis(self, options=['all'], filter=None): Possible options are: - - ``"all"`` -- All options below - - ``"edges"`` -- Number of edges (works with skew-symmetric quivers) - - ``"edge_diff"`` -- Edges added/deleted (works with skew-symmetric quivers) - - ``"green_vertices"`` -- List of green vertices (works with principals) - - ``"green_vertices_diff"`` -- Green vertices added/removed (works with principals) - - ``"red_vertices"`` -- List of red vertices (works with principals) - - ``"red_vertices_diff"`` -- Red vertices added/removed (works with principals) - - ``"urban_renewals"`` -- List of urban renewal vertices - - ``"urban_renewals_diff"`` -- Urban renewal vertices added/removed - - ``"sources"`` -- List of source vertices - - ``"sources_diff"`` -- Source vertices added/removed - - ``"sinks"`` -- List of sink vertices - - ``"sinks_diff"`` -- Sink vertices added/removed - - ``"denominators"`` -- List of all denominators of the cluster variables + - ``'all'`` -- all options below + - ``'edges'`` -- number of edges (works with skew-symmetric quivers) + - ``'edge_diff'`` -- edges added/deleted (works with skew-symmetric quivers) + - ``'green_vertices'`` -- list of green vertices (works with principals) + - ``'green_vertices_diff'`` -- green vertices added/removed (works with principals) + - ``'red_vertices'`` -- list of red vertices (works with principals) + - ``'red_vertices_diff'`` -- red vertices added/removed (works with principals) + - ``'urban_renewals'`` -- list of urban renewal vertices + - ``'urban_renewals_diff'`` -- urban renewal vertices added/removed + - ``'sources'`` -- list of source vertices + - ``'sources_diff'`` -- source vertices added/removed + - ``'sinks'`` -- list of sink vertices + - ``'sinks_diff'`` -- sink vertices added/removed + - ``'denominators'`` -- list of all denominators of the cluster variables OUTPUT: @@ -3270,7 +3270,7 @@ def set_cluster(self, cluster, force=False): INPUT: - - ``cluster`` -- an iterable defining a cluster for ``self``. + - ``cluster`` -- an iterable defining a cluster for ``self`` EXAMPLES:: @@ -3581,7 +3581,7 @@ def mutation_class_iter(self, depth=infinity, show_depth=False, # If we aren't only sinking the source if not only_sink_source or all(entry >= 0 for entry in sd[0]._M.row(i)) or all(entry <= 0 for entry in sd[0]._M.row(i)): # do an inplace mutation on our cluster (sd[0]) - sd2 = sd[0].mutate(i, inplace=False, input_type="indices") + sd2 = sd[0].mutate(i, inplace=False, input_type='indices') # set up our new cluster variables if up_to_equivalence: @@ -3740,7 +3740,7 @@ def cluster_class_iter(self, depth=infinity, show_depth=False, up_to_equivalence For a cluster seed from an arbitrarily labelled digraph:: - sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format="list_of_edges") + sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format='list_of_edges') sage: S = ClusterSeed(dg, frozen=['b']) sage: S.cluster_class() [[a, c], [a, (b + 1)/c], [(b + 1)/a, c], [(b + 1)/a, (b + 1)/c]] @@ -3874,7 +3874,7 @@ def b_matrix_class_iter(self, depth=infinity, up_to_equivalence=True): For a cluster seed from an arbitrarily labelled digraph:: - sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format="list_of_edges") + sage: dg = DiGraph([['a', 'b'], ['b', 'c']], format='list_of_edges') sage: S = ClusterSeed(dg, frozen=['b']) sage: S.b_matrix_class() [ @@ -4477,8 +4477,8 @@ def get_upper_cluster_algebra_element(self, a): INPUT: - ``B`` -- a skew-symmetric matrix. Must have the same number of columns - as the length of the vectors in `vd`. - - ``a`` -- a vector in `\ZZ^n` where `n` is the number of columns in `B`. + as the length of the vectors in `vd` + - ``a`` -- a vector in `\ZZ^n` where `n` is the number of columns in `B` OUTPUT: return an element in the upper cluster algebra. Depending on the input it may or may not be irreducible @@ -4524,9 +4524,9 @@ def LLM_gen_set(self, size_limit=-1): INPUT: - - ``B`` -- a skew-symmetric matrix. + - ``B`` -- a skew-symmetric matrix - ``size_limit`` -- a limit on how many vectors you want - the function to return. + the function to return OUTPUT: an array of elements in the upper cluster algebra @@ -4566,14 +4566,13 @@ def _compute_compatible_vectors(self, vd): INPUT: - ``B`` -- a skew-symmetric matrix. Must have the same number of columns - as the length of the vectors in ``vd``. + as the length of the vectors in ``vd`` - ``vd`` -- a collection of tuples `(v,z)` with `v \in \{0,1\}^n` and `z \in \ZZ`. `n` must be the number of columns in `B`. Taken from the output of :func:`_vector_decomposition`. - OUTPUT: - - a 2-dimensional array containing all the vectors compatible with each vector in ``vd.`` + OUTPUT: a 2-dimensional array containing all the vectors compatible + with each vector in ``vd.`` .. NOTE:: @@ -4643,7 +4642,7 @@ def _compute_compatible_vectors(self, vd): if any(am < 0 for am in a[0]): compatibleList.append([]) continue - # If the vector a in vd is non-positive, it is not compatible + # If the vector a in vd is nonpositive, it is not compatible # with any vector. 0 vector will pass this check but will be # handled later. clist = [] @@ -4902,7 +4901,7 @@ def get_green_vertices(C): INPUT: - - ``C`` -- The C-matrix to check + - ``C`` -- the C-matrix to check EXAMPLES:: @@ -4923,7 +4922,7 @@ def get_red_vertices(C): INPUT: - - ``C`` -- The C-matrix to check + - ``C`` -- the C-matrix to check EXAMPLES:: @@ -4941,7 +4940,7 @@ def _vector_decomposition(a, length): INPUT: - - `a` -- a vector in `\ZZ^n` + - ``a`` -- a vector in `\ZZ^n` OUTPUT: @@ -5032,7 +5031,7 @@ def _power_set(n): INPUT: - - `n` -- an integer. + - ``n`` -- integer OUTPUT: diff --git a/src/sage/combinat/cluster_algebra_quiver/interact.py b/src/sage/combinat/cluster_algebra_quiver/interact.py index cf677761eee..834e8a38d44 100644 --- a/src/sage/combinat/cluster_algebra_quiver/interact.py +++ b/src/sage/combinat/cluster_algebra_quiver/interact.py @@ -16,12 +16,12 @@ def cluster_interact(self, fig_size=1, circular=True, kind='seed'): INPUT: - ``fig_size`` -- (default: 1) factor by which the size of the - plot is multiplied. + plot is multiplied - ``circular`` -- boolean (default: ``True``); if ``True``, the circular - plot is chosen, otherwise >>spring<< is used. + plot is chosen, otherwise >>spring<< is used - - ``kind`` -- either ``"seed"`` (default) or ``"quiver"`` + - ``kind`` -- either ``'seed'`` (default) or ``'quiver'`` TESTS:: diff --git a/src/sage/combinat/cluster_algebra_quiver/mutation_class.py b/src/sage/combinat/cluster_algebra_quiver/mutation_class.py index ed826411f00..bb20bf71ee0 100644 --- a/src/sage/combinat/cluster_algebra_quiver/mutation_class.py +++ b/src/sage/combinat/cluster_algebra_quiver/mutation_class.py @@ -68,7 +68,7 @@ def _digraph_mutate(dg, k, frozen=None): - ``dg`` -- a digraph with integral edge labels with ``n+m`` vertices - ``k`` -- the vertex at which ``dg`` is mutated - - ``frozen`` -- the list of frozen vertices (default is the empty list) + - ``frozen`` -- the list of frozen vertices (default: empty list) EXAMPLES:: @@ -197,9 +197,7 @@ def _dg_canonical_form(dg, frozen=None): - ``frozen`` -- list (default: ``[]``) of frozen vertices - OUTPUT: - - - dictionary {original label: canonical label} + OUTPUT: dictionary {original label: canonical label} - list of orbits of mutable vertices (using canonical labels) @@ -288,7 +286,7 @@ def _mutation_class_iter( dg, n, m, depth=infinity, return_dig6=False, show_dept string data - ``show_depth`` -- if ``True``, indicates that a running count of the depth is to be displayed - - ``up_to_equivalence`` -- if ``True``, only one digraph for each + - ``up_to_equivalence`` -- if ``True``, only one digraph for each graph-isomorphism class is recorded - ``sink_source`` -- if ``True``, only mutations at sinks or sources are applied diff --git a/src/sage/combinat/cluster_algebra_quiver/mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/mutation_type.py index eb0d00c45e9..435159c17e1 100644 --- a/src/sage/combinat/cluster_algebra_quiver/mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/mutation_type.py @@ -809,9 +809,9 @@ def _connected_mutation_type_AAtildeD(dg, ret_conn_vert=False): INPUT: - - ``ret_conn_vert`` -- boolean (default: ``False``). If ``True``, + - ``ret_conn_vert`` -- boolean (default: ``False``); if ``True``, returns 'connecting vertices', technical information that is - used in the algorithm. + used in the algorithm A brief description of the algorithm:: @@ -1418,10 +1418,10 @@ def _random_tests(mt, k, mut_class=None, nr_mut=5): INPUT: - - ``mt`` something that can be turned into a QuiverMutationType - - ``k`` (integer) the number of tests performed for each quiver of rank ``n`` - - ``mut_class`` is given, this mutation class is used - - ``nr_mut`` (integer, default:5) the number of mutations performed before + - ``mt`` something that can be turned into a ``QuiverMutationType`` + - ``k`` -- integer; the number of tests performed for each quiver of rank ``n`` + - ``mut_class`` -- if given, this mutation class is used + - ``nr_mut`` -- integer (default: 5); the number of mutations performed before testing The idea of this random test is to start with a mutation type @@ -1512,9 +1512,9 @@ def _random_multi_tests(n, k, nr_mut=5): INPUT: - - ``n`` (integer) -- the rank of the mutation types to test - - ``k`` (integer) -- the number of tests performed for each quiver of rank ``n`` - - ``nr_mut`` (integer, default:5) -- the number of mutations performed before testing + - ``n`` -- integer; the rank of the mutation types to test + - ``k`` -- integer; the number of tests performed for each quiver of rank ``n`` + - ``nr_mut`` -- integer (default: 5); the number of mutations performed before testing TESTS:: diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver.py b/src/sage/combinat/cluster_algebra_quiver/quiver.py index 23cd0c1eaa4..082cc1e0dc3 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver.py @@ -666,7 +666,7 @@ def show(self, fig_size=1, circular=False, directed=True, mark=None, save_pos=Fa circular plot is chosen, otherwise >>spring<< is used - ``directed`` -- boolean (default: ``True``); if ``True``, the directed version is shown, otherwise the undirected - - ``mark`` -- boolean (default: ``None``) if set to i, the vertex i is + - ``mark`` -- boolean (default: ``None``); if set to i, the vertex i is highlighted - ``save_pos`` -- boolean (default: ``False``); if ``True``, the positions of the vertices are saved @@ -705,7 +705,7 @@ def interact(self, fig_size=1, circular=True): sage: S.interact() # needs sage.plot sage.symbolic ...VBox(children=... """ - return cluster_interact(self, fig_size, circular, kind="quiver") + return cluster_interact(self, fig_size, circular, kind='quiver') def save_image(self, filename, circular=False): """ @@ -721,7 +721,7 @@ def save_image(self, filename, circular=False): sage: Q = ClusterQuiver(['F',4,[1,2]]) sage: import tempfile - sage: with tempfile.NamedTemporaryFile(suffix=".png") as f: # needs sage.plot sage.symbolic + sage: with tempfile.NamedTemporaryFile(suffix='.png') as f: # needs sage.plot sage.symbolic ....: Q.save_image(f.name) """ graph_plot = self.plot(circular=circular) @@ -737,7 +737,7 @@ def qmu_save(self, filename=None): INPUT: - - ``filename`` -- the filename the image is saved to. + - ``filename`` -- the filename the image is saved to If a filename is not specified, the default name is ``from_sage.qmu`` in the current sage directory. @@ -746,7 +746,7 @@ def qmu_save(self, filename=None): sage: Q = ClusterQuiver(['F',4,[1,2]]) sage: import tempfile - sage: with tempfile.NamedTemporaryFile(suffix=".qmu") as f: # needs sage.plot sage.symbolic + sage: with tempfile.NamedTemporaryFile(suffix='.qmu') as f: # needs sage.plot sage.symbolic ....: Q.qmu_save(f.name) Make sure we can save quivers with `m != n` frozen variables, see :issue:`14851`:: @@ -755,7 +755,7 @@ def qmu_save(self, filename=None): sage: T1 = S.principal_extension() sage: Q = T1.quiver() sage: import tempfile - sage: with tempfile.NamedTemporaryFile(suffix=".qmu") as f: # needs sage.plot sage.symbolic + sage: with tempfile.NamedTemporaryFile(suffix='.qmu') as f: # needs sage.plot sage.symbolic ....: Q.qmu_save(f.name) """ M = self.b_matrix() @@ -1121,9 +1121,9 @@ def canonical_label(self, certificate=False): INPUT: - - ``certificate`` -- boolean (default: ``False``) if ``True``, the dictionary - from ``self.vertices()`` to the vertices of the returned quiver - is returned as well. + - ``certificate`` -- boolean (default: ``False``); if ``True``, the + dictionary from ``self.vertices()`` to the vertices of the returned + quiver is returned as well EXAMPLES:: @@ -1480,7 +1480,7 @@ def mutation_sequence(self, sequence, show_sequence=False, fig_size=1.2 ): INPUT: - - ``sequence`` -- a list or tuple of vertices of ``self`` + - ``sequence`` -- list or tuple of vertices of ``self`` - ``show_sequence`` -- boolean (default: ``False``); if ``True``, a png containing the mutation sequence is shown - ``fig_size`` -- (default: 1.2) factor by which the size of the @@ -1637,7 +1637,7 @@ def mutation_class_iter(self, depth=infinity, show_depth=False, - ``return_paths`` -- boolean (default: ``False``); if ``True``, a shortest path of mutation sequences from ``self`` to the given quiver is returned as well - - ``data_type`` -- (default: "quiver") can be one of the following:: + - ``data_type`` -- (default: ``'quiver'``) can be one of the following:: * "quiver" * "matrix" @@ -1764,7 +1764,7 @@ def mutation_class_iter(self, depth=infinity, show_depth=False, yield next_element def mutation_class(self, depth=infinity, show_depth=False, return_paths=False, - data_type="quiver", up_to_equivalence=True, sink_source=False): + data_type='quiver', up_to_equivalence=True, sink_source=False): """ Return the mutation class of ``self`` together with certain constraints. @@ -1777,12 +1777,12 @@ def mutation_class(self, depth=infinity, show_depth=False, return_paths=False, - ``return_paths`` -- boolean (default: ``False``); if ``True``, a shortest path of mutation sequences from self to the given quiver is returned as well - - ``data_type`` -- (default: ``"quiver"``) can be one of + - ``data_type`` -- (default: ``'quiver'``) can be one of the following: - * ``"quiver"`` -- the quiver is returned - * ``"dig6"`` -- the dig6-data is returned - * ``"path"`` -- shortest paths of mutation sequences from + * ``'quiver'`` -- the quiver is returned + * ``'dig6'`` -- the dig6-data is returned + * ``'path'`` -- shortest paths of mutation sequences from ``self`` are returned - ``sink_source`` -- boolean (default: ``False``); if ``True``, only @@ -1999,7 +1999,7 @@ def relabel(self, relabelling, inplace=True): INPUT: - - ``relabelling`` -- Dictionary of labels to move around + - ``relabelling`` -- dictionary of labels to move around - ``inplace`` -- boolean (default: ``True``); if ``True``, will return a duplicate of the quiver diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py index 54bb74286fd..443ce5ab865 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py @@ -1973,8 +1973,8 @@ def __init__(self, *args): INPUT: - - ``data`` -- a list each of whose entries is a - QuiverMutationType_Irreducible + - ``data`` -- list; each of whose entries is a + ``QuiverMutationType_Irreducible`` EXAMPLES:: diff --git a/src/sage/combinat/crystals/affine.py b/src/sage/combinat/crystals/affine.py index 186d2ea373e..82fbab73c36 100644 --- a/src/sage/combinat/crystals/affine.py +++ b/src/sage/combinat/crystals/affine.py @@ -537,7 +537,7 @@ class AffineCrystalFromClassicalAndPromotion(AffineCrystalFromClassical): - ``automorphism, inverse_automorphism`` -- a function on the elements of the ``classical_crystal`` - - ``dynkin_node`` -- an integer specifying the classical node in the + - ``dynkin_node`` -- integer specifying the classical node in the image of the zero node under the automorphism sigma EXAMPLES:: diff --git a/src/sage/combinat/crystals/affinization.py b/src/sage/combinat/crystals/affinization.py index d849e407c3f..32f56ff545f 100644 --- a/src/sage/combinat/crystals/affinization.py +++ b/src/sage/combinat/crystals/affinization.py @@ -85,7 +85,7 @@ def __init__(self, B): We skip the Stembridge axioms test since this is an abstract crystal:: sage: A = crystals.KirillovReshetikhin(['A',2,1], 2, 2).affinization() - sage: TestSuite(A).run(skip="_test_stembridge_local_axioms") # long time + sage: TestSuite(A).run(skip='_test_stembridge_local_axioms') # long time """ if not B.cartan_type().is_affine(): raise ValueError("must be an affine crystal") diff --git a/src/sage/combinat/crystals/alcove_path.py b/src/sage/combinat/crystals/alcove_path.py index 27222de68c7..7f5b32bf323 100644 --- a/src/sage/combinat/crystals/alcove_path.py +++ b/src/sage/combinat/crystals/alcove_path.py @@ -53,18 +53,18 @@ class CrystalOfAlcovePaths(UniqueRepresentation, Parent): INPUT: - ``cartan_type`` -- Cartan type of a finite or affine untwisted root - system. + system - - ``weight`` -- Dominant weight as a list of (integral) coefficients of - the fundamental weights. + - ``weight`` -- dominant weight as a list of (integral) coefficients of + the fundamental weights - - ``highest_weight_crystal`` -- (Default: ``True``) If ``True`` + - ``highest_weight_crystal`` -- (default: ``True``) if ``True`` returns the highest weight crystal. If ``False`` returns an object which is close to being isomorphic to the tensor product of Kirillov-Reshetikhin crystals of column shape in the following sense: We get all the vertices, but only some of the edges. We'll call the included edges pseudo-Demazure. They are - all non-zero edges and the 0-edges not at the end of a 0-string + all nonzero edges and the 0-edges not at the end of a 0-string of edges, i.e. not those with `f_{0}(b) = b'` with `\varphi_0(b) =1`. (Whereas Demazure 0-edges are those that are not at the beginning of a zero string.) In this case the @@ -295,7 +295,7 @@ def __init__(self, starting_weight, highest_weight_crystal): sage: TestSuite(C).run() #long time sage: C = crystals.AlcovePaths(['A',2,1],[1,0],False) - sage: TestSuite(C).run(skip="_test_stembridge_local_axioms") #long time + sage: TestSuite(C).run(skip='_test_stembridge_local_axioms') #long time Check that :issue:`20292` is fixed:: @@ -453,7 +453,7 @@ class CrystalOfAlcovePathsElement(ElementWrapper): INPUT: - - ``data`` -- a list of folding positions in the lambda chain (indexing + - ``data`` -- list of folding positions in the lambda chain (indexing starts at 0) or a tuple of :class:`RootsWithHeight` giving folding positions in the lambda chain. @@ -776,7 +776,7 @@ def _folding_data(self, i): INPUT: - - ``i`` -- element of the index_set of the underlying root_system. + - ``i`` -- element of the index_set of the underlying root_system OUTPUT: @@ -877,7 +877,7 @@ def e(self, i): INPUT: - - ``i`` -- element of the index set of the underlying root system. + - ``i`` -- element of the index set of the underlying root system EXAMPLES:: @@ -943,7 +943,7 @@ def _gi(self, i): INPUT: - - ``i`` -- element of the index_set of the underlying root_system. + - ``i`` -- element of the index_set of the underlying root_system OUTPUT: @@ -997,7 +997,7 @@ def f(self, i): INPUT: - - ``i`` -- element of the index_set of the underlying root_system. + - ``i`` -- element of the index_set of the underlying root_system EXAMPLES:: @@ -1398,7 +1398,7 @@ def projection(self, k=None): class RootsWithHeight(UniqueRepresentation, Parent): r""" Data structure of the ordered pairs `(\beta,k)`, - where `\beta` is a positive root and `k` is a non-negative integer. A total + where `\beta` is a positive root and `k` is a nonnegative integer. A total order is implemented on this set, and depends on the weight. INPUT: @@ -1620,8 +1620,8 @@ class RootsWithHeightElement(Element): INPUT: - - ``root`` -- A positive root `\beta` in our root system - - ``height`` -- Is an integer, such that + - ``root`` -- a positive root `\beta` in our root system + - ``height`` -- integer such that `0 \leq l \leq \langle \lambda, \beta^{\vee} \rangle` EXAMPLES:: diff --git a/src/sage/combinat/crystals/direct_sum.py b/src/sage/combinat/crystals/direct_sum.py index 190a3279513..53b588f02b4 100644 --- a/src/sage/combinat/crystals/direct_sum.py +++ b/src/sage/combinat/crystals/direct_sum.py @@ -33,8 +33,8 @@ class DirectSumOfCrystals(DisjointUnionEnumeratedSets): INPUT: - - ``crystals`` -- a list of crystals of the same Cartan type - - ``keepkey`` -- a boolean + - ``crystals`` -- list of crystals of the same Cartan type + - ``keepkey`` -- boolean The option ``keepkey`` is by default set to ``False``, assuming that the crystals are all distinct. In this case the elements of diff --git a/src/sage/combinat/crystals/elementary_crystals.py b/src/sage/combinat/crystals/elementary_crystals.py index 475d45893ba..7619e0e0a5e 100644 --- a/src/sage/combinat/crystals/elementary_crystals.py +++ b/src/sage/combinat/crystals/elementary_crystals.py @@ -162,7 +162,7 @@ def e(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -181,7 +181,7 @@ def f(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -216,9 +216,9 @@ class TCrystal(UniqueRepresentation, Parent): INPUT: - - ``cartan_type`` -- A Cartan type + - ``cartan_type`` -- a Cartan type - - ``weight`` -- An element of the weight lattice of type ``cartan_type`` + - ``weight`` -- an element of the weight lattice of type ``cartan_type`` EXAMPLES:: @@ -300,7 +300,7 @@ def _element_constructor_(self, weight): INPUT: - - ``weight`` -- An element of the weight lattice + - ``weight`` -- an element of the weight lattice EXAMPLES:: @@ -387,7 +387,7 @@ def epsilon(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -406,7 +406,7 @@ def phi(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -563,7 +563,7 @@ def _element_constructor_(self, weight): INPUT: - - ``weight`` -- An element of the weight lattice + - ``weight`` -- an element of the weight lattice EXAMPLES:: @@ -658,7 +658,7 @@ def epsilon(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -686,7 +686,7 @@ def phi(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -827,7 +827,7 @@ def _element_constructor_(self, m): INPUT: - - ``m`` -- An integer + - ``m`` -- integer EXAMPLES:: @@ -952,7 +952,7 @@ def e(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -974,7 +974,7 @@ def f(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -996,7 +996,7 @@ def epsilon(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -1019,7 +1019,7 @@ def phi(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -1208,7 +1208,7 @@ def epsilon(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: @@ -1225,7 +1225,7 @@ def phi(self, i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: diff --git a/src/sage/combinat/crystals/fast_crystals.py b/src/sage/combinat/crystals/fast_crystals.py index 9eadecb32df..91639920f7e 100644 --- a/src/sage/combinat/crystals/fast_crystals.py +++ b/src/sage/combinat/crystals/fast_crystals.py @@ -42,7 +42,7 @@ class FastCrystal(UniqueRepresentation, Parent): - ``cartan_type`` -- the Cartan type and must be either type `A_2`, `B_2`, or `C_2` - - ``shape`` -- A shape is of the form ``[l1,l2]`` where ``l1`` and ``l2`` + - ``shape`` -- a shape is of the form ``[l1,l2]`` where ``l1`` and ``l2`` are either integers or (in type `B_2`) half integers such that ``l1 - l2`` is integral. It is assumed that ``l1 >= l2 >= 0``. If ``l1`` and ``l2` are integers, this will produce a crystal @@ -101,7 +101,7 @@ class FastCrystal(UniqueRepresentation, Parent): [2, 1, 0]] """ @staticmethod - def __classcall__(cls, cartan_type, shape, format="string"): + def __classcall__(cls, cartan_type, shape, format='string'): """ Normalize the input arguments to ensure unique representation diff --git a/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py b/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py index c8004e4bd6a..79af3fb80a1 100644 --- a/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py +++ b/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py @@ -450,8 +450,8 @@ class FullyCommutativeStableGrothendieckCrystal(UniqueRepresentation, Parent): - ``excess`` -- the total number of letters in the factorization minus the length of a reduced word for ``w`` - - ``shape`` -- (default: ``False``) indicator for input ``w``, ``True`` if - ``w`` is entered as a (skew) shape and ``False`` otherwise. + - ``shape`` -- boolean (default: ``False``); indicator for input ``w``, + ``True`` if ``w`` is entered as a (skew) shape and ``False`` otherwise EXAMPLES:: @@ -1147,27 +1147,27 @@ def _apply_relations(word, position, move): sage: from sage.combinat.crystals.fully_commutative_stable_grothendieck import _apply_relations sage: w = [2, 1, 3, 4] - sage: _apply_relations(w, position=1, move="pq=qp") + sage: _apply_relations(w, position=1, move='pq=qp') [2, 3, 1, 4] sage: w = [1, 3, 2, 1, 2, 4] - sage: _apply_relations(w, position=2, move="pqp=qpq") + sage: _apply_relations(w, position=2, move='pqp=qpq') [1, 3, 1, 2, 1, 4] sage: w = [2, 3, 1, 2, 2, 3] - sage: _apply_relations(w, position=3, move="pp=p") + sage: _apply_relations(w, position=3, move='pp=p') [2, 3, 1, 2, 3] sage: w = [2, 3, 1, 2, 3] - sage: _apply_relations(w, position=3, move="p=pp") + sage: _apply_relations(w, position=3, move='p=pp') [2, 3, 1, 2, 2, 3] sage: w = [2, 3, 1, 2, 2, 3] - sage: _apply_relations(w, position=2, move="pqq=ppq") + sage: _apply_relations(w, position=2, move='pqq=ppq') [2, 3, 1, 1, 2, 3] sage: w = [2, 3, 1, 1, 2, 3] - sage: _apply_relations(w, position=2, move="ppq=pqq") + sage: _apply_relations(w, position=2, move='ppq=pqq') [2, 3, 1, 2, 2, 3] """ w = list(word) diff --git a/src/sage/combinat/crystals/generalized_young_walls.py b/src/sage/combinat/crystals/generalized_young_walls.py index 12ab091f6cd..ce16e41c495 100644 --- a/src/sage/combinat/crystals/generalized_young_walls.py +++ b/src/sage/combinat/crystals/generalized_young_walls.py @@ -247,8 +247,8 @@ def _sig_sort(self,a): INPUT: - - `a` -- list of the form ``['s',j,k]`` where `s` is a string, `j` is an integer - and `k` is an integer + - ``a`` -- list of the form ``['s',j,k]`` where `s` is a string, `j` is + an integer and `k` is an integer EXAMPLES:: @@ -544,7 +544,7 @@ def weight(self, root_lattice=False): INPUT: - ``root_lattice`` -- boolean determining whether weight should appear - in root lattice or not in extended affine weight lattice. + in root lattice or not in extended affine weight lattice EXAMPLES:: diff --git a/src/sage/combinat/crystals/induced_structure.py b/src/sage/combinat/crystals/induced_structure.py index 95ed85bf5f8..094a0e7a37b 100644 --- a/src/sage/combinat/crystals/induced_structure.py +++ b/src/sage/combinat/crystals/induced_structure.py @@ -47,8 +47,8 @@ class InducedCrystal(UniqueRepresentation, Parent): - ``X`` -- the base set - ``phi`` -- the map `\Phi` - ``inverse`` -- (optional) the inverse map `\Phi^{-1}` - - ``from_crystal`` -- (default: ``False``) if the induced structure is - of the second type `\Phi : C \to X` + - ``from_crystal`` -- boolean (default: ``False``); if the induced + structure is of the second type `\Phi : C \to X` EXAMPLES: diff --git a/src/sage/combinat/crystals/infinity_crystals.py b/src/sage/combinat/crystals/infinity_crystals.py index 8b2053bec8b..a54e986d84b 100644 --- a/src/sage/combinat/crystals/infinity_crystals.py +++ b/src/sage/combinat/crystals/infinity_crystals.py @@ -130,7 +130,7 @@ class InfinityCrystalOfTableaux(CrystalOfWords): INPUT: - - ``cartan_type`` -- One of ``['A',n]``, ``['B',n]``, ``['C',n]``, + - ``cartan_type`` -- one of ``['A',n]``, ``['B',n]``, ``['C',n]``, ``['D',n]``, or ``['G',2]``, where ``n`` is a positive integer EXAMPLES:: @@ -307,7 +307,7 @@ def phi(self,i): INPUT: - - ``i`` -- An element of the index set + - ``i`` -- an element of the index set EXAMPLES:: diff --git a/src/sage/combinat/crystals/kirillov_reshetikhin.py b/src/sage/combinat/crystals/kirillov_reshetikhin.py index 411725aa0ea..0a82c6b51f6 100644 --- a/src/sage/combinat/crystals/kirillov_reshetikhin.py +++ b/src/sage/combinat/crystals/kirillov_reshetikhin.py @@ -4091,7 +4091,7 @@ class CrystalDiagramAutomorphism(CrystalMorphism): weight elements - ``index_set`` -- (default: the empty set) the index set - ``automorphism`` -- (default: the identity) the twisting automorphism - - ``cache`` -- (default: ``True``) cache the result + - ``cache`` -- boolean (default: ``True``); cache the result """ def __init__(self, C, on_hw, index_set=None, automorphism=None, cache=True): diff --git a/src/sage/combinat/crystals/littelmann_path.py b/src/sage/combinat/crystals/littelmann_path.py index 2bc8396f7a4..c9fa7cb7933 100644 --- a/src/sage/combinat/crystals/littelmann_path.py +++ b/src/sage/combinat/crystals/littelmann_path.py @@ -760,7 +760,7 @@ def one_dimensional_configuration_sum(self, q=None, group_components=True): - ``q`` -- (default: ``None``) a variable or ``None``; if ``None``, a variable ``q`` is set in the code - - ``group_components`` -- (default: ``True``) boolean; if ``True``, + - ``group_components`` -- boolean (default: ``True``); if ``True``, then the terms are grouped by classical component The one-dimensional configuration sum is the sum of the weights @@ -997,7 +997,7 @@ def weyl_group_representation(self): """ cartan = self.parent().weight.parent().cartan_type().classical() I = cartan.index_set() - W = WeylGroup(cartan, prefix='s', implementation="permutation") + W = WeylGroup(cartan, prefix='s', implementation='permutation') return [W.from_reduced_word(x.to_dominant_chamber(index_set=I, reduced_word=True)[1]) for x in self.value] @cached_in_parent_method @@ -1151,7 +1151,7 @@ def energy_function(self): ct = P.cartan_type() cartan = ct.classical() Qv = RootSystem(cartan).coroot_lattice() - W = WeylGroup(cartan, prefix='s', implementation="permutation") + W = WeylGroup(cartan, prefix='s', implementation='permutation') J = tuple(weight.weyl_stabilizer()) L = self.weyl_group_representation() if ct.is_untwisted_affine() or ct.type() == 'BC': @@ -1160,7 +1160,7 @@ def energy_function(self): else: untwisted = False cartan_dual = cartan.dual() - Wd = WeylGroup(cartan_dual, prefix='s', implementation="permutation") + Wd = WeylGroup(cartan_dual, prefix='s', implementation='permutation') G = Wd.quantum_bruhat_graph(J) Qd = RootSystem(cartan_dual).root_lattice() @@ -1305,7 +1305,7 @@ def e(self, i, power=1, length_only=False): - ``i`` -- element of the index set - ``power`` -- (default: 1) positive integer; specifies the power of the lowering operator to be applied - - ``length_only`` -- (default: ``False``) boolean; if ``True``, + - ``length_only`` -- boolean (default: ``False``); if ``True``, then return the distance to the anti-dominant end of the `i`-string of ``self`` @@ -1382,7 +1382,7 @@ def f(self, i, power=1, length_only=False): - ``i`` -- element of the index set - ``power`` -- (default: 1) positive integer; specifies the power of the lowering operator to be applied - - ``length_only`` -- (default: ``False``) boolean; if ``True``, + - ``length_only`` -- boolean (default: ``False``); if ``True``, then return the distance to the anti-dominant end of the `i`-string of ``self`` diff --git a/src/sage/combinat/crystals/monomial_crystals.py b/src/sage/combinat/crystals/monomial_crystals.py index 48804bd9c15..00a1d92f528 100644 --- a/src/sage/combinat/crystals/monomial_crystals.py +++ b/src/sage/combinat/crystals/monomial_crystals.py @@ -700,7 +700,7 @@ class InfinityCrystalOfNakajimaMonomials(UniqueRepresentation, Parent): where `\{h_i : i \in I\}` and `\{\Lambda_i : i \in I \}` are the simple coroots and fundamental weights, respectively. With a chosen set of - non-negative integers `C = (c_{ij})_{i\neq j}` such that + nonnegative integers `C = (c_{ij})_{i\neq j}` such that `c_{ij} + c_{ji} = 1`, one defines .. MATH:: @@ -797,7 +797,7 @@ def _normalize_c(c, n): sage: C = InfinityCrystalOfNakajimaMonomials._normalize_c(c, 2) Traceback (most recent call last): ... - ValueError: the c matrix must have non-negative entries + ValueError: the c matrix must have nonnegative entries sage: c = matrix([[0,1],[1,0]]) sage: C = InfinityCrystalOfNakajimaMonomials._normalize_c(c, 2) Traceback (most recent call last): @@ -815,7 +815,7 @@ def _normalize_c(c, n): if any(c[i,j] + c[j,i] != 1 for i in range(n) for j in range(i)): raise ValueError("transpose entries do not sum to 1") if any(c[i,j] < 0 or c[j,i] < 0 for i in range(n) for j in range(i)): - raise ValueError("the c matrix must have non-negative entries") + raise ValueError("the c matrix must have nonnegative entries") return c @staticmethod diff --git a/src/sage/combinat/crystals/pbw_datum.pyx b/src/sage/combinat/crystals/pbw_datum.pyx index 2adcb09d902..695ccf09eb8 100644 --- a/src/sage/combinat/crystals/pbw_datum.pyx +++ b/src/sage/combinat/crystals/pbw_datum.pyx @@ -44,7 +44,7 @@ class PBWDatum(): sage: from sage.combinat.crystals.pbw_datum import PBWData, PBWDatum sage: P = PBWData("A2") sage: L = PBWDatum(P, (1,2,1), (1,4,7)) - sage: TestSuite(L).run(skip="_test_pickling") + sage: TestSuite(L).run(skip='_test_pickling') """ self.parent = parent self.long_word = tuple(long_word) @@ -195,7 +195,7 @@ class PBWData(): # UniqueRepresentation? sage: from sage.combinat.crystals.pbw_datum import PBWData sage: P = PBWData(["A",2]) - sage: TestSuite(P).run(skip="_test_pickling") + sage: TestSuite(P).run(skip='_test_pickling') """ self.cartan_type = CartanType(cartan_type) self.root_system = RootSystem(self.cartan_type) diff --git a/src/sage/combinat/crystals/spins.pyx b/src/sage/combinat/crystals/spins.pyx index 869447915c4..b5310c1c6f6 100644 --- a/src/sage/combinat/crystals/spins.pyx +++ b/src/sage/combinat/crystals/spins.pyx @@ -73,7 +73,7 @@ def CrystalOfSpins(ct): INPUT: - - ``['B', n]`` -- A Cartan type `B_n`. + - ``['B', n]`` -- a Cartan type `B_n`. EXAMPLES:: @@ -113,7 +113,7 @@ def CrystalOfSpinsPlus(ct): INPUT: - - ``['D', n]`` -- A Cartan type `D_n`. + - ``['D', n]`` -- a Cartan type `D_n`. EXAMPLES:: @@ -146,7 +146,7 @@ def CrystalOfSpinsMinus(ct): INPUT: - - ``['D', n]`` -- A Cartan type `D_n`. + - ``['D', n]`` -- a Cartan type `D_n`. EXAMPLES:: diff --git a/src/sage/combinat/crystals/tensor_product.py b/src/sage/combinat/crystals/tensor_product.py index e0482ec74eb..e8668249eb3 100644 --- a/src/sage/combinat/crystals/tensor_product.py +++ b/src/sage/combinat/crystals/tensor_product.py @@ -196,7 +196,7 @@ class TensorProductOfCrystals(CrystalOfWords): .. RUBRIC:: Regular crystals Now if all crystals `B_k` are regular crystals, all `\varepsilon_i` and - `\varphi_i` are non-negative and we can + `\varphi_i` are nonnegative and we can define tensor product by the *signature rule*. We start by writing a word in `+` and `-` as follows: @@ -451,7 +451,7 @@ class options(GlobalOptions): description='Sets the convention used for displaying/inputting tensor product of crystals', values=dict(antiKashiwara='use the anti-Kashiwara convention', Kashiwara='use the Kashiwara convention'), - alias=dict(anti="antiKashiwara", opposite="antiKashiwara"), + alias=dict(anti='antiKashiwara', opposite='antiKashiwara'), case_sensitive=False) def _element_constructor_(self, *crystalElements): @@ -711,7 +711,7 @@ class CrystalOfTableaux(CrystalOfWords): - ``cartan_type`` -- a Cartan type - ``shape`` -- a partition of length at most ``cartan_type.rank()`` - - ``shapes`` -- a list of such partitions + - ``shapes`` -- list of such partitions This constructs a classical crystal with the given Cartan type and highest weight(s) corresponding to the given shape(s). @@ -979,7 +979,7 @@ def __init__(self, cartan_type, shapes): INPUT: - ``cartan_type`` -- (data coercible into) a Cartan type - - ``shapes`` -- a list (or iterable) of shapes + - ``shapes`` -- list (or iterable) of shapes - ``shape`` -- a shape Shapes themselves are lists (or iterable) of integers. diff --git a/src/sage/combinat/designs/bibd.py b/src/sage/combinat/designs/bibd.py index 48e24b4ac75..177cd0f99cb 100644 --- a/src/sage/combinat/designs/bibd.py +++ b/src/sage/combinat/designs/bibd.py @@ -73,14 +73,14 @@ def biplane(n, existence=False): - ``n`` -- (integer) order of the biplane - - ``existence`` (boolean) -- instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design - ``Unknown`` -- meaning that Sage does not know how to build the - design, but that the design may exist (see :mod:`sage.misc.unknown`). + design, but that the design may exist (see :mod:`sage.misc.unknown`) - - ``False`` -- meaning that the design does not exist. + - ``False`` -- meaning that the design does not exist .. SEEALSO:: @@ -127,16 +127,16 @@ def balanced_incomplete_block_design(v, k, lambd=1, existence=False, use_LJCR=Fa - ``v``, ``k``, ``lambd`` -- integers - - ``existence`` (boolean) -- instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design - ``Unknown`` -- meaning that Sage does not know how to build the - design, but that the design may exist (see :mod:`sage.misc.unknown`). + design, but that the design may exist (see :mod:`sage.misc.unknown`) - - ``False`` -- meaning that the design does not exist. + - ``False`` -- meaning that the design does not exist - - ``use_LJCR`` (boolean) -- whether to query the La Jolla Covering + - ``use_LJCR`` -- boolean; whether to query the La Jolla Covering Repository for the design when Sage does not know how to build it (see :func:`~sage.combinat.designs.covering_design.best_known_covering_design_www`). This requires internet. @@ -373,9 +373,7 @@ def BruckRyserChowla_check(v, k, lambd): - ``v``, ``k``, ``lambd`` -- integers; parameters to check - OUTPUT: - - - ``True`` -- the parameters satisfy the theorem + OUTPUT: ``True`` -- the parameters satisfy the theorem - ``False`` -- the theorem fails for the given parameters @@ -455,7 +453,7 @@ def steiner_triple_system(n): INPUT: - - ``n`` return a Steiner Triple System of `\{0,...,n-1\}` + - ``n`` -- return a Steiner Triple System of `\{0,...,n-1\}` EXAMPLES: @@ -528,9 +526,9 @@ def BIBD_from_TD(v,k,existence=False): INPUT: - - ``v``, ``k`` -- (integers) computes a `(v,k,1)`-BIBD. + - ``v``, ``k`` -- integers; computes a `(v,k,1)`-BIBD - - ``existence`` -- (boolean) instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design @@ -766,9 +764,9 @@ def v_4_1_BIBD(v, check=True): INPUT: - - ``v`` (integer) -- number of points. + - ``v`` -- integer; number of points - - ``check`` (boolean) -- whether to check that output is correct before + - ``check`` -- boolean; whether to check that output is correct before returning it. As this is expected to be useless (but we are cautious guys), you may want to disable it whenever you want speed. Set to ``True`` by default. @@ -852,17 +850,16 @@ def BIBD_from_PBD(PBD, v, k, check=True, base_cases=None): INPUT: - - ``v``, ``k`` -- integers. + - ``v``, ``k`` -- integers - - ``PBD`` -- A PBD on `r=(v-1)/(k-1)` points, such that for any block of - ``PBD`` of size `s` there must exist a `((k-1)s+1,k,1)`-BIBD. + - ``PBD`` -- a PBD on `r=(v-1)/(k-1)` points, such that for any block of + ``PBD`` of size `s` there must exist a `((k-1)s+1,k,1)`-BIBD - - ``check`` (boolean) -- whether to check that output is correct before - returning it. As this is expected to be useless (but we are cautious - guys), you may want to disable it whenever you want speed. Set to ``True`` - by default. + - ``check`` -- boolean (default: ``True``); whether to check that output is + correct before returning it. As this is expected to be useless (but we + are cautious guys), you may want to disable it whenever you want speed. - - ``base_cases`` -- caching system, for internal use. + - ``base_cases`` -- caching system, for internal use EXAMPLES:: @@ -903,11 +900,11 @@ def _relabel_bibd(B,n,p=None): INPUT: - - ``B`` -- a list of blocks. + - ``B`` -- list of blocks - - ``n`` (integer) -- number of points. + - ``n`` -- integer; number of points - - ``p`` (optional) -- the point that will be labeled with `n-1`. + - ``p`` -- optional; the point that will be labeled with `n-1` EXAMPLES:: @@ -944,9 +941,9 @@ def PBD_4_5_8_9_12(v, check=True): INPUT: - - ``v`` -- an integer congruent to `0` or `1` modulo `4`. + - ``v`` -- integer congruent to `0` or `1` modulo `4` - - ``check`` (boolean) -- whether to check that output is correct before + - ``check`` -- boolean; whether to check that output is correct before returning it. As this is expected to be useless (but we are cautious guys), you may want to disable it whenever you want speed. Set to ``True`` by default. @@ -1083,7 +1080,7 @@ def _get_t_u(v): INPUT: - - ``v`` (integer) + - ``v`` -- integer EXAMPLES:: @@ -1115,7 +1112,7 @@ def v_5_1_BIBD(v, check=True): INPUT: - - ``v`` (integer) + - ``v`` -- integer .. SEEALSO:: @@ -1189,7 +1186,7 @@ def _get_r_s_t_u(v): INPUT: - - ``v`` (integer) + - ``v`` -- integer EXAMPLES:: @@ -1262,7 +1259,7 @@ def BIBD_5q_5_for_q_prime_power(q): INPUT: - - ``q`` (integer) -- a prime power such that `q\equiv 1\pmod 4`. + - ``q`` -- integer; a prime power such that `q\equiv 1\pmod 4` EXAMPLES:: @@ -1308,9 +1305,9 @@ def BIBD_from_arc_in_desarguesian_projective_plane(n,k,existence=False): INPUT: - - ``n``, ``k`` (integers) -- must be powers of two (among other restrictions). + - ``n``, ``k`` -- integers; must be powers of two (among other restrictions) - - ``existence`` (boolean) -- whether to return the BIBD obtained through + - ``existence`` -- boolean; whether to return the BIBD obtained through this construction (default), or to merely indicate with a boolean return value whether this method *can* build the requested BIBD. @@ -1422,10 +1419,10 @@ class PairwiseBalancedDesign(GroupDivisibleDesign): - ``K`` -- list of integers of which the sizes of the blocks must be elements. Set to ``None`` (automatic guess) by default. - - ``lambd`` (integer) -- value of `\lambda`, set to `1` by default. + - ``lambd`` -- integer; value of `\lambda`, set to `1` by default - - ``check`` (boolean) -- whether to check that the design is a `PBD` with - the right parameters. + - ``check`` -- boolean; whether to check that the design is a `PBD` with + the right parameters - ``copy`` -- (use with caution) if set to ``False`` then ``blocks`` must be a list of lists of integers. The list will not be copied but will be @@ -1484,13 +1481,13 @@ class BalancedIncompleteBlockDesign(PairwiseBalancedDesign): - ``blocks`` -- collection of blocks - - ``k`` (integer) -- size of the blocks. Set to ``None`` (automatic guess) + - ``k`` -- integer; size of the blocks. Set to ``None`` (automatic guess) by default. - - ``lambd`` (integer) -- value of `\lambda`, set to `1` by default. + - ``lambd`` -- integer; value of `\lambda`, set to `1` by default - - ``check`` (boolean) -- whether to check that the design is a `PBD` with - the right parameters. + - ``check`` -- boolean; whether to check that the design is a `PBD` with + the right parameters - ``copy`` -- (use with caution) if set to ``False`` then ``blocks`` must be a list of lists of integers. The list will not be copied but will be @@ -1553,7 +1550,7 @@ def arc(self, s=2, solver=None, verbose=0, *, integrality_tolerance=1e-3): INPUT: - - ``s`` -- (default to ``2``) the maximum number of points from the arc + - ``s`` -- (default: `2`) the maximum number of points from the arc in each block - ``solver`` -- (default: ``None``) Specify a Mixed Integer Linear @@ -1564,8 +1561,8 @@ def arc(self, s=2, solver=None, verbose=0, *, integrality_tolerance=1e-3): :class:`MixedIntegerLinearProgram `. - - ``verbose`` -- integer (default: ``0``). Sets the level of - verbosity. Set to 0 by default, which means quiet. + - ``verbose`` -- integer (default: `0`); sets the level of + verbosity. Set to `0` by default, which means quiet. - ``integrality_tolerance`` -- parameter for use with MILP solvers over an inexact base ring; see diff --git a/src/sage/combinat/designs/block_design.py b/src/sage/combinat/designs/block_design.py index 96a4fc6e17c..33c19b33bdf 100644 --- a/src/sage/combinat/designs/block_design.py +++ b/src/sage/combinat/designs/block_design.py @@ -196,9 +196,9 @@ def ProjectiveGeometryDesign(n, d, F, algorithm=None, point_coordinates=True, ch - ``n`` -- the projective dimension - - ``d`` -- the dimension of the subspaces which make up the blocks. + - ``d`` -- the dimension of the subspaces which make up the blocks - - ``F`` -- a finite field or a prime power. + - ``F`` -- a finite field or a prime power - ``algorithm`` -- set to ``None`` by default, which results in using Sage's own implementation. In order to use GAP's implementation instead (i.e. its @@ -210,7 +210,7 @@ def ProjectiveGeometryDesign(n, d, F, algorithm=None, point_coordinates=True, ch ``algorithm="gap"``. If ``True``, the ground set is indexed by coordinates in `\GF{q}^{n+1}`. Otherwise the ground set is indexed by integers. - - ``check`` -- (default: ``True``) whether to check the output. + - ``check`` -- boolean (default: ``True``); whether to check the output EXAMPLES: @@ -245,7 +245,7 @@ def ProjectiveGeometryDesign(n, d, F, algorithm=None, point_coordinates=True, ch Check that the constructor using gap also works:: - sage: BD = designs.ProjectiveGeometryDesign(2, 1, GF(2), algorithm="gap") # optional - gap_package_design + sage: BD = designs.ProjectiveGeometryDesign(2, 1, GF(2), algorithm='gap') # optional - gap_package_design sage: BD.is_t_design(return_parameters=True) # optional - gap_package_design (True, (2, 7, 3, 1)) """ @@ -270,7 +270,7 @@ def ProjectiveGeometryDesign(n, d, F, algorithm=None, point_coordinates=True, ch m.set_immutable() b.append(points[m]) blocks.append(b) - B = BlockDesign(len(points), blocks, name="ProjectiveGeometryDesign", check=check) + B = BlockDesign(len(points), blocks, name='ProjectiveGeometryDesign', check=check) if point_coordinates: B.relabel({i:p[0] for p,i in points.items()}) @@ -282,7 +282,7 @@ def ProjectiveGeometryDesign(n, d, F, algorithm=None, point_coordinates=True, ch gB = [] for b in gblcks: gB.append([x - 1 for x in b]) - B = BlockDesign(v, gB, name="ProjectiveGeometryDesign", check=check) + B = BlockDesign(v, gB, name='ProjectiveGeometryDesign', check=check) if check: from sage.combinat.q_analogues import q_binomial @@ -305,7 +305,7 @@ def DesarguesianProjectivePlaneDesign(n, point_coordinates=True, check=True): INPUT: - - ``n`` -- an integer which must be a power of a prime number + - ``n`` -- integer which must be a power of a prime number - ``point_coordinates`` -- (boolean) whether to label the points with their homogeneous coordinates (default) or with integers. @@ -345,7 +345,7 @@ def DesarguesianProjectivePlaneDesign(n, point_coordinates=True, check=True): # plane into an affine plane, an affine line and a point. At the same time, # we relabel the points with the integers from 0 to n^2 + n as follows: # - the affine plane is the set of points [x:y:1] (i.e. the third coordinate - # is non-zero) and gets relabeled from 0 to n^2-1 + # is nonzero) and gets relabeled from 0 to n^2-1 affine_plane = lambda x,y: relabel[x] + n * relabel[y] # - the affine line is the set of points [x:1:0] (i.e. the third coordinate is @@ -636,13 +636,12 @@ def projective_plane_to_OA(pplane, pt=None, check=True): - ``pplane`` -- a projective plane as a 2-design - - ``pt`` -- a point in the projective plane ``pplane``. If it is not provided, - then it is set to `n^2 + n`. + - ``pt`` -- a point in the projective plane ``pplane``; if it is not provided, + then it is set to `n^2 + n` - - ``check`` -- (boolean) Whether to check that output is correct before - returning it. As this is expected to be useless (but we are cautious - guys), you may want to disable it whenever you want speed. Set to - ``True`` by default. + - ``check`` -- boolean (default: ``True``); whether to check that output is + correct before returning it. As this is expected to be useless (but we + are cautious guys), you may want to disable it whenever you want speed. EXAMPLES:: @@ -803,18 +802,18 @@ def AffineGeometryDesign(n, d, F, point_coordinates=True, check=True): INPUT: - - ``n`` (integer) -- the Euclidean dimension. The number of points of the - design is `v=|\GF{q}^n|`. + - ``n`` -- integer; the Euclidean dimension. The number of points of the + design is `v=|\GF{q}^n|` - - ``d`` (integer) -- the dimension of the (affine) subspaces of `\GF{q}^n` - which make up the blocks. + - ``d`` -- integer; the dimension of the (affine) subspaces of `\GF{q}^n` + which make up the blocks - - ``F`` -- a finite field or a prime power. + - ``F`` -- a finite field or a prime power - - ``point_coordinates`` -- (default: ``True``) whether we use - coordinates in `\GF{q}^n` or plain integers for the points of the design. + - ``point_coordinates`` -- boolean (default: ``True``); whether we use + coordinates in `\GF{q}^n` or plain integers for the points of the design - - ``check`` -- (default: ``True``) whether to check the output. + - ``check`` -- boolean (default: ``True``); whether to check the output EXAMPLES:: @@ -875,7 +874,7 @@ def AffineGeometryDesign(n, d, F, point_coordinates=True, check=True): b.append(points[m]) blocks.append(b) - B = BlockDesign(len(points), blocks, name="AffineGeometryDesign", check=check) + B = BlockDesign(len(points), blocks, name='AffineGeometryDesign', check=check) if point_coordinates: rd = {i: p[0][1:] for p, i in points.items()} @@ -923,7 +922,7 @@ def WittDesign(n): """ INPUT: - - ``n`` is in `9,10,11,12,21,22,23,24`. + - ``n`` -- integer in `9,10,11,12,21,22,23,24` Wraps GAP Design's WittDesign. If ``n=24`` then this function returns the large Witt design `W_{24}`, the unique (up to isomorphism) `5-(24,8,1)` @@ -950,7 +949,7 @@ def WittDesign(n): B = libgap.WittDesign(n) v = B['v'].sage() gB = [[x - 1 for x in b] for b in B['blocks'].sage()] - return BlockDesign(v, gB, name="WittDesign", check=True) + return BlockDesign(v, gB, name='WittDesign', check=True) def HadamardDesign(n): @@ -999,7 +998,7 @@ def HadamardDesign(n): MS = J.parent() A = MS((H2+J)/2) # convert -1's to 0's; coerce entries to ZZ # A is the incidence matrix of the block design - return IncidenceStructure(incidence_matrix=A,name="HadamardDesign") + return IncidenceStructure(incidence_matrix=A,name='HadamardDesign') def Hadamard3Design(n): @@ -1012,7 +1011,7 @@ def Hadamard3Design(n): INPUT: - - ``n`` (integer) -- a multiple of 4 such that `n>4`. + - ``n`` -- integer; a multiple of 4 such that `n>4` EXAMPLES:: @@ -1062,4 +1061,4 @@ def Hadamard3Design(n): A1 = (H1+J)/2 A2 = (J-H1)/2 A = block_matrix(1, 2, [A1, A2]) #the incidence matrix of the design. - return IncidenceStructure(incidence_matrix=A, name="HadamardThreeDesign") + return IncidenceStructure(incidence_matrix=A, name='HadamardThreeDesign') diff --git a/src/sage/combinat/designs/covering_design.py b/src/sage/combinat/designs/covering_design.py index 42de42282d1..bbd0e1b02b9 100644 --- a/src/sage/combinat/designs/covering_design.py +++ b/src/sage/combinat/designs/covering_design.py @@ -63,11 +63,11 @@ def schonheim(v, k, t): INPUT: - - ``v`` -- integer, size of point set + - ``v`` -- integer; size of point set - - ``k`` -- integer, cardinality of each block + - ``k`` -- integer; cardinality of each block - - ``t`` -- integer, cardinality of sets being covered + - ``t`` -- integer; cardinality of sets being covered OUTPUT: @@ -95,11 +95,11 @@ def trivial_covering_design(v, k, t): INPUT: - - ``v`` -- integer, size of point set + - ``v`` -- integer; size of point set - - ``k`` -- integer, cardinality of each block + - ``k`` -- integer; cardinality of each block - - ``t`` -- integer, cardinality of sets being covered + - ``t`` -- integer; cardinality of sets being covered OUTPUT: @@ -171,13 +171,13 @@ class CoveringDesign(SageObject): - ``v``, ``k``, ``t`` -- integer parameters of the covering design - - ``size`` (integer) + - ``size`` -- integer - - ``points`` -- list of points (default points are `[0, ..., v-1]`) + - ``points`` -- list of points (default: `[0, ..., v-1]`) - ``blocks`` - - ``low_bd`` (integer) -- lower bound for such a design + - ``low_bd`` -- integer; lower bound for such a design - ``method``, ``creator``, ``timestamp`` -- database information """ @@ -481,11 +481,11 @@ def best_known_covering_design_www(v, k, t, verbose=False): INPUT: - - ``v`` -- integer, the size of the point set for the design + - ``v`` -- integer; the size of the point set for the design - - ``k`` -- integer, the number of points per block + - ``k`` -- integer; the number of points per block - - ``t`` -- integer, the size of sets covered by the blocks + - ``t`` -- integer; the size of sets covered by the blocks - ``verbose`` -- boolean (default: ``False``); print verbose message diff --git a/src/sage/combinat/designs/database.py b/src/sage/combinat/designs/database.py index 943f7c9ba22..6538eb34261 100644 --- a/src/sage/combinat/designs/database.py +++ b/src/sage/combinat/designs/database.py @@ -72,11 +72,11 @@ def _MOLS_from_string(s,k): INPUT: - - ``s`` (string) -- represents the MOLS with entries in a-z. To understand + - ``s`` -- string; represents the MOLS with entries in a-z; to understand how the string should be formatted, read the source code of a constructor - that uses it. + that uses it - - ``k`` (integer) -- the number of MOLS encoded by the string. + - ``k`` -- integer; the number of MOLS encoded by the string EXAMPLES:: @@ -4143,8 +4143,8 @@ def BIBD_45_9_8(from_code=False): INPUT: - - ``from_code`` (boolean) -- whether to build the design from hardcoded data - (default) or from the code object (much longer). + - ``from_code`` -- boolean; whether to build the design from hardcoded data + (default) or from the code object (much longer) EXAMPLES:: diff --git a/src/sage/combinat/designs/designs_pyx.pyx b/src/sage/combinat/designs/designs_pyx.pyx index 054e5782930..6ffd0df76b4 100644 --- a/src/sage/combinat/designs/designs_pyx.pyx +++ b/src/sage/combinat/designs/designs_pyx.pyx @@ -24,20 +24,20 @@ def is_covering_array(array, strength=None, levels=None, verbose=False, paramete INPUT: - - ``array`` -- the Covering Array to be tested. + - ``array`` -- the Covering Array to be tested - - ``strength`` (integer) -- the parameter `t` of the covering array, + - ``strength`` -- integer; the parameter `t` of the covering array, such that in any selection of `t` columns of the array, every `t` -tuple appears at least once. If set to None then all t > 0 are tested to and the maximal strength is used. - - ``levels`` -- the number of symbols that appear in ``array``. - If set to None, then each unique entry in ``array`` is counted. + - ``levels`` -- the number of symbols that appear in ``array`` + If set to None, then each unique entry in ``array`` is counted - - ``verbose`` (boolean) -- whether to display some information about - the covering array. + - ``verbose`` -- boolean; whether to display some information about + the covering array - - ``parameters`` (boolean) -- whether to return the parameters of + - ``parameters`` -- boolean; whether to return the parameters of the Covering Array. If set to ``True``, the function returns a pair ``(boolean_answer,(N,t,k,v))``. @@ -211,7 +211,7 @@ def is_covering_array(array, strength=None, levels=None, verbose=False, paramete return result -def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology="OA"): +def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology='OA'): r""" Check that the integer matrix `OA` is an `OA(k,n,t)`. @@ -222,12 +222,12 @@ def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology="O - ``OA`` -- the Orthogonal Array to be tested - - ``k``, ``n``, ``t`` (integers) -- only implemented for `t=2`. + - ``k``, ``n``, ``t`` -- integers; only implemented for `t=2` - - ``verbose`` (boolean) -- whether to display some information when ``OA`` - is not an orthogonal array `OA(k,n)`. + - ``verbose`` -- boolean; whether to display some information when ``OA`` + is not an orthogonal array `OA(k,n)` - - ``terminology`` (string) -- how to phrase the information when ``verbose = + - ``terminology`` -- string; how to phrase the information when ``verbose = True``. Possible values are `"OA"`, `"MOLS"`. EXAMPLES:: @@ -245,7 +245,7 @@ def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology="O sage: is_orthogonal_array(OA,8,9,verbose=True) Columns 0 and 3 are not orthogonal False - sage: is_orthogonal_array(OA,8,9, verbose=True, terminology="MOLS") + sage: is_orthogonal_array(OA,8,9, verbose=True, terminology='MOLS') Squares 0 and 3 are not orthogonal False @@ -259,13 +259,13 @@ def is_orthogonal_array(OA, int k, int n, int t=2, verbose=False, terminology="O sage: is_orthogonal_array([[3]*8],8,9, verbose=True) The number of rows is 1 instead of 9^2=81 False - sage: is_orthogonal_array([[3]*8],8,9, verbose=True, terminology="MOLS") + sage: is_orthogonal_array([[3]*8],8,9, verbose=True, terminology='MOLS') All squares do not have dimension n^2=9^2 False sage: is_orthogonal_array([[3]*7],8,9, verbose=True) Some row does not have length 8 False - sage: is_orthogonal_array([[3]*7],8,9, verbose=True, terminology="MOLS") + sage: is_orthogonal_array([[3]*7],8,9, verbose=True, terminology='MOLS') The number of squares is not 6 False @@ -366,7 +366,7 @@ def is_group_divisible_design(groups,blocks,v,G=None,K=None,lambd=1,verbose=Fals - ``blocks`` -- collection of blocks - - ``v`` (integers) -- size of the ground set assumed to be `X=\{0,...,v-1\}`. + - ``v`` -- integers; size of the ground set assumed to be `X=\{0,...,v-1\}` - ``G`` -- list of integers of which the sizes of the groups must be elements. Set to ``None`` (automatic guess) by default. @@ -374,10 +374,10 @@ def is_group_divisible_design(groups,blocks,v,G=None,K=None,lambd=1,verbose=Fals - ``K`` -- list of integers of which the sizes of the blocks must be elements. Set to ``None`` (automatic guess) by default. - - ``lambd`` -- value of `\lambda`. Set to `1` by default. + - ``lambd`` -- value of `\lambda`. Set to `1` by default - - ``verbose`` (boolean) -- whether to display some information when the - design is not a GDD. + - ``verbose`` -- boolean; whether to display some information when the + design is not a GDD EXAMPLES:: @@ -430,7 +430,7 @@ def is_group_divisible_design(groups,blocks,v,G=None,K=None,lambd=1,verbose=Fals if v < 0 or lambd < 0: if verbose: - print("v={} and lambda={} must be non-negative integers".format(v,l)) + print("v={} and lambda={} must be nonnegative integers".format(v,l)) return False # Block sizes are element of K @@ -546,15 +546,15 @@ def is_pairwise_balanced_design(blocks,v,K=None,lambd=1,verbose=False): - ``blocks`` -- collection of blocks - - ``v`` (integers) -- size of the ground set assumed to be `X=\{0,...,v-1\}`. + - ``v`` -- integers; size of the ground set assumed to be `X=\{0,...,v-1\}` - ``K`` -- list of integers of which the sizes of the blocks must be - elements. Set to ``None`` (automatic guess) by default. + elements; set to ``None`` (automatic guess) by default - - ``lambd`` -- value of `\lambda`. Set to `1` by default. + - ``lambd`` -- value of `\lambda` (default: `1`) - - ``verbose`` (boolean) -- whether to display some information when the - design is not a PBD. + - ``verbose`` -- boolean; whether to display some information when the + design is not a PBD EXAMPLES:: @@ -681,10 +681,10 @@ def is_difference_matrix(M,G,k,lmbda=1,verbose=False): - ``k`` -- integer - - ``lmbda`` (integer) -- set to `1` by default. + - ``lmbda`` -- integer (default: `1`) - - ``verbose`` (boolean) -- whether to print some information when the answer - is ``False``. + - ``verbose`` -- boolean; whether to print some information when the answer + is ``False`` EXAMPLES:: @@ -757,8 +757,8 @@ def is_quasi_difference_matrix(M,G,int k,int lmbda,int mu,int u,verbose=False): - ``k``, ``lmbda``, ``mu``, ``u`` -- integers - - ``verbose`` (boolean) -- whether to print some information when the answer - is ``False``. + - ``verbose`` -- boolean; whether to print some information when the answer + is ``False`` EXAMPLES: @@ -960,7 +960,7 @@ cpdef _OA_cache_set(int k,int n,truth_value): INPUT: - - ``k``, ``n`` (integers) + - ``k``, ``n`` -- integers - ``truth_value`` -- one of ``True,False,Unknown`` """ diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index a881e72743c..8aa74f9ebf2 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -990,7 +990,7 @@ def are_mcfarland_1973_parameters(v, k, lmbda, return_parameters=False): INPUT: - ``v``, ``k``, ``lmbda`` -- integers; parameters of the difference family - - ``return_parameters`` -- boolean (default ``False``); if ``True``, return a + - ``return_parameters`` -- boolean (default: ``False``); if ``True``, return a pair ``(True, (q, s))`` so that ``(q,s)`` can be used in the function :func:`mcfarland_1973_construction` to actually build a ``(v,k,lmbda)``-difference family. Or ``(False, None)`` if the @@ -1473,8 +1473,8 @@ def relative_difference_set_from_homomorphism(q, N, d, check=True, return_group= INPUT: - ``q`` -- a prime power - - ``N`` -- an integer greater than 1 - - ``d`` -- an integer which divides `q-1` + - ``N`` -- integer greater than 1 + - ``d`` -- integer which divides `q-1` - ``check`` -- boolean (default: ``True``); if ``True``, check that the result is a relative difference set before returning it - ``return_group`` -- boolean (default: ``False``); if ``True``, the function @@ -1636,7 +1636,7 @@ def is_supplementary_difference_set(Ks, v=None, lmbda=None, G=None, verbose=Fals INPUT: - - ``Ks`` -- a list of sets to be checked + - ``Ks`` -- list of sets to be checked - ``v`` -- integer; the parameter `v` of the supplementary difference sets - ``lmbda`` -- integer; the parameter `\lambda` of the supplementary difference sets - ``G`` -- a group of order `v` @@ -1731,9 +1731,9 @@ def supplementary_difference_set_from_rel_diff_set(q, existence=False, check=Tru INPUT: - ``q`` -- an odd prime power - - ``existence`` -- boolean (default: ``False``); If ``True``, only check + - ``existence`` -- boolean (default: ``False``); if ``True``, only check whether the supplementary difference sets can be constructed - - ``check`` -- boolean (default: ``True``); If ``True``, check that the sets + - ``check`` -- boolean (default: ``True``); if ``True``, check that the sets are supplementary difference sets before returning them OUTPUT: @@ -1987,9 +1987,9 @@ def is_fixed_relative_difference_set(R, q): INPUT: - - ``R`` -- a list containing elements of an abelian group; the relative + - ``R`` -- list containing elements of an abelian group; the relative difference set - - ``q`` -- an integer + - ``q`` -- integer EXAMPLES:: @@ -3125,7 +3125,7 @@ def complementary_difference_setsI(n, check=True): Construct complementary difference sets in a group of order `n \cong 3 \mod 4`, `n` a prime power. Let `G` be a Galois Field of order `n`, where `n` satisfies the requirements - above. Let `A` be the set of non-zero quadratic elements in `G`, and `B = A`. + above. Let `A` be the set of nonzero quadratic elements in `G`, and `B = A`. Then `A` and `B` are complementary difference sets over a group of order `n`. This construction is described in [Sze1971]_. @@ -3190,11 +3190,11 @@ def complementary_difference_setsII(n, check=True): the corresponding multiplicative group. Then, there are two different constructions, depending on whether `t` is even or odd. - If `t \cong 2 \mod 4`, let `C_0` be the set of non-zero octic residues in `G`, + If `t \cong 2 \mod 4`, let `C_0` be the set of nonzero octic residues in `G`, and let `C_i = \rho^i C_0` for `1 \le i \le 7`. Then, `A = C_0 \cup C_1 \cup C_2 \cup C_3` and `B = C_0 \cup C_1 \cup C_6 \cup C_7`. - If `t` is odd, let `C_0` be the set of non-zero fourth powers in `G`, and let + If `t` is odd, let `C_0` be the set of nonzero fourth powers in `G`, and let `C_i = \rho^i C_0` for `1 \le i \le 3`. Then, `A = C_0 \cup C_1` and `B = C_0 \cup C_3`. diff --git a/src/sage/combinat/designs/difference_matrices.py b/src/sage/combinat/designs/difference_matrices.py index 9be65fb4e65..b52a5145496 100644 --- a/src/sage/combinat/designs/difference_matrices.py +++ b/src/sage/combinat/designs/difference_matrices.py @@ -145,14 +145,14 @@ def difference_matrix(g,k,lmbda=1,existence=False,check=True): guys), you may want to disable it whenever you want speed. Set to ``True`` by default. - - ``existence`` (boolean) -- instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design - ``Unknown`` -- meaning that Sage does not know how to build the design, but that the design may exist (see :mod:`sage.misc.unknown`). - - ``False`` -- meaning that the design does not exist. + - ``False`` -- meaning that the design does not exist .. NOTE:: diff --git a/src/sage/combinat/designs/evenly_distributed_sets.pyx b/src/sage/combinat/designs/evenly_distributed_sets.pyx index 75704f995c8..8ffaa880664 100644 --- a/src/sage/combinat/designs/evenly_distributed_sets.pyx +++ b/src/sage/combinat/designs/evenly_distributed_sets.pyx @@ -71,7 +71,7 @@ cdef class EvenlyDistributedSetsBacktracker: `x \mapsto ax + b`. If set to ``False`` then the iteration is over all evenly distributed sets that contain ``0`` and ``1``. - - ``check`` -- boolean (default is ``False``). Whether you want to check + - ``check`` -- boolean (default: ``False``); whether you want to check intermediate steps of the iterator. This is mainly intended for debugging purpose. Setting it to ``True`` will considerably slow the iteration. @@ -410,9 +410,7 @@ cdef class EvenlyDistributedSetsBacktracker: This is an internal function and should only be call by the backtracker implemented in the method `__iter__`. - OUTPUT: - - - ``False`` if ``self.B`` is not minimal + OUTPUT: ``False`` if ``self.B`` is not minimal - the list of evenly distributed sets isomorphic to ``self.B`` given as a list of tuples if ``self.up_to_isom=0`` or list diff --git a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx index 5edc2ff8a57..e6d961e76b1 100644 --- a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx +++ b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx @@ -187,9 +187,7 @@ def dual_GQ_ovoid(GQ, O): - ``O`` -- iterable; the iterable of blocks we want to compute the dual - OUTPUT: - - A pair ``(D, S)`` where ``D`` is the dual of ``GQ`` and + OUTPUT: a pair ``(D, S)`` where ``D`` is the dual of ``GQ`` and ``S`` is the dual of ``O`` EXAMPLES:: @@ -248,7 +246,7 @@ def generalised_quadrangle_hermitian_with_ovoid(const int q): A pair ``(D, O)`` where ``D`` is an IncidenceStructure representing the generalised quadrangle and ``O`` is a list of points of ``D`` which - constitute an ovoid of ``D`` + constitute an ovoid of ``D``. EXAMPLES:: diff --git a/src/sage/combinat/designs/group_divisible_designs.py b/src/sage/combinat/designs/group_divisible_designs.py index a583dd2607e..16870c8e917 100644 --- a/src/sage/combinat/designs/group_divisible_designs.py +++ b/src/sage/combinat/designs/group_divisible_designs.py @@ -57,18 +57,18 @@ def group_divisible_design(v, K, G, existence=False, check=False): INPUT: - - ``v`` (integer) + - ``v`` -- integer - - ``K``, ``G`` (sets of integers) + - ``K``, ``G`` -- sets of integers - - ``existence`` (boolean) -- instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design - ``Unknown`` -- meaning that Sage does not know how to build the design, but that the design may exist (see :mod:`sage.misc.unknown`). - - ``False`` -- meaning that the design does not exist. + - ``False`` -- meaning that the design does not exist - ``check`` -- (boolean) Whether to check that output is correct before returning it. As this is expected to be useless (but we are cautious @@ -139,16 +139,16 @@ def GDD_4_2(q, existence=False, check=True): INPUT: - - ``q`` (integer) + - ``q`` -- integer - - ``existence`` (boolean) -- instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design - ``Unknown`` -- meaning that Sage does not know how to build the design, but that the design may exist (see :mod:`sage.misc.unknown`). - - ``False`` -- meaning that the design does not exist. + - ``False`` -- meaning that the design does not exist - ``check`` -- (boolean) Whether to check that output is correct before returning it. As this is expected to be useless (but we are cautious @@ -235,10 +235,10 @@ class GroupDivisibleDesign(IncidenceStructure): - ``K`` -- list of integers of which the sizes of the blocks must be elements. Set to ``None`` (automatic guess) by default. - - ``lambd`` (integer) -- value of `\lambda`, set to `1` by default. + - ``lambd`` -- integer (default: `1`); value of `\lambda` - - ``check`` (boolean) -- whether to check that the design is indeed a `GDD` - with the right parameters. Set to ``True`` by default. + - ``check`` -- boolean (default: ``True``); whether to check that the design is indeed a `GDD` + with the right parameters - ``copy`` -- (use with caution) if set to ``False`` then ``blocks`` must be a list of lists of integers. The list will not be copied but will be diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index 4c15aa31cd0..7d160d0c3dc 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -73,12 +73,12 @@ class IncidenceStructure: ['a', 'b', 'c', 'd', 'e'] - ``blocks`` -- (i.e. edges, i.e. sets) the blocks defining the incidence - structure. Can be any iterable. + structure; can be any iterable - - ``incidence_matrix`` -- a binary incidence matrix. Each column represents - a set. + - ``incidence_matrix`` -- a binary incidence matrix; each column represents + a set - - ``name`` (a string, such as "Fano plane"). + - ``name`` -- string (such as "Fano plane") - ``check`` -- whether to check the input @@ -340,7 +340,7 @@ def __contains__(self, block): INPUT: - - ``block`` -- a block. + - ``block`` -- a block EXAMPLES:: @@ -422,11 +422,10 @@ def is_isomorphic(self, other, certificate=False): INPUT: - - ``other`` -- an incidence structure. + - ``other`` -- an incidence structure - - ``certificate`` (boolean) -- whether to return an - isomorphism from ``self`` to ``other`` instead of a boolean - answer. + - ``certificate`` -- boolean (default: ``False``); whether to return an + isomorphism from ``self`` to ``other`` instead of a boolean answer EXAMPLES:: @@ -514,10 +513,10 @@ def isomorphic_substructures_iterator(self, H2,induced=False): INPUT: - - ``H2`` an :class:`IncidenceStructure` object. + - ``H2`` -- an :class:`IncidenceStructure` object - - ``induced`` (boolean) -- whether to require the copies to be - induced. Set to ``False`` by default. + - ``induced`` -- boolean (default: ``False``); whether to require the copies to be + induced EXAMPLES: @@ -570,7 +569,7 @@ def copy(self): EXAMPLES:: - sage: IS = IncidenceStructure([[1,2,3,"e"]],name="Test") + sage: IS = IncidenceStructure([[1,2,3,"e"]], name='Test') sage: IS Incidence structure with 4 points and 1 blocks sage: copy(IS) @@ -600,7 +599,7 @@ def induced_substructure(self, points): INPUT: - - ``points`` -- a set of points. + - ``points`` -- a set of points .. NOTE:: @@ -661,7 +660,7 @@ def trace(self, points, min_size=1, multiset=True): INPUT: - - ``points`` -- a set of points. + - ``points`` -- a set of points - ``min_size`` (integer; default 1) -- minimum size of the sets to keep. By default all empty sets are discarded, i.e. ``min_size=1``. @@ -809,7 +808,7 @@ def degree(self, p=None, subset=False): - ``p`` -- a point (or a set of points) of the incidence structure. - - ``subset`` (boolean) -- whether to interpret the argument as a set of + - ``subset`` -- boolean; whether to interpret the argument as a set of point (``subset=True``) or as a point (``subset=False``, default). EXAMPLES:: @@ -856,7 +855,7 @@ def degrees(self, size=None): INPUT: - - ``size`` (integer) -- return the degree of all subsets of points of + - ``size`` -- integer; return the degree of all subsets of points of cardinality ``size``. When ``size=None``, the function outputs the degree of all points. @@ -921,7 +920,7 @@ def is_regular(self, r=None) -> bool | int: INPUT: - - ``r`` (integer) + - ``r`` -- integer OUTPUT: @@ -972,7 +971,7 @@ def is_uniform(self, k=None) -> bool | int: INPUT: - - ``k`` (integer) + - ``k`` -- integer OUTPUT: @@ -1092,7 +1091,7 @@ def intersection_graph(self, sizes=None): INPUT: - - ``sizes`` -- a list/set of integers. For convenience, setting + - ``sizes`` -- list/set of integers; for convenience, setting ``sizes`` to ``5`` has the same effect as ``sizes=[5]``. When set to ``None`` (default), behaves as ``sizes=PositiveIntegers()``. @@ -1162,10 +1161,10 @@ def incidence_graph(self,labels=False): INPUT: - - ``labels`` (boolean) -- whether to return a graph whose vertices are - integers, or labelled elements. + - ``labels`` -- boolean; whether to return a graph whose vertices are + integers, or labelled elements - - ``labels is False`` (default) -- in this case the first vertices + - ``labels is False`` -- default; in this case the first vertices of the graphs are the elements of :meth:`ground_set`, and appear in the same order. Similarly, the following vertices represent the elements of :meth:`blocks`, and appear in the same order. @@ -1255,7 +1254,7 @@ def complement(self,uniform=False): INPUT: - - ``uniform`` (boolean) -- + - ``uniform`` -- boolean - if set to ``False`` (default), returns the incidence structure whose blocks are the complements of all blocks of the incidence structure. @@ -1340,8 +1339,8 @@ def relabel(self, perm=None, inplace=True): - ``None`` -- the incidence structure is relabeled to be on `\{0,1,...,n-1\}` in the ordering given by :meth:`ground_set`. - - ``inplace`` -- If ``True`` then return a relabeled graph and does not - touch ``self`` (default is ``False``). + - ``inplace`` -- boolean (default: ``False``); if ``True`` then return + a relabeled graph and does not touch ``self`` EXAMPLES:: @@ -1434,8 +1433,8 @@ def packing(self, solver=None, verbose=0, *, integrality_tolerance=1e-3): :class:`MixedIntegerLinearProgram `. - - ``verbose`` -- integer (default: ``0``). Sets the level of - verbosity. Set to 0 by default, which means quiet. + - ``verbose`` -- integer (default: `0`); sets the level of + verbosity. Set to `0` by default, which means quiet. - ``integrality_tolerance`` -- parameter for use with MILP solvers over an inexact base ring; see @@ -1484,12 +1483,12 @@ def is_t_design(self, t=None, v=None, k=None, l=None, return_parameters=False): INPUT: - - ``t``, ``v``, ``k``, ``l`` (integers) -- their value is set to + - ``t``, ``v``, ``k``, ``l`` -- integers; their value is set to ``None`` by default. The function tests whether the design is a `t-(v,k,l)` design using the provided values and guesses the others. Note that ``l`` cannot be specified if ``t`` is not. - - ``return_parameters`` (boolean)-- whether to return the parameters of + - ``return_parameters`` -- boolean; whether to return the parameters of the `t`-design. If set to ``True``, the function returns a pair ``(boolean_answer,(t,v,k,l))``. @@ -1701,10 +1700,10 @@ def is_generalized_quadrangle(self, verbose=False, parameters=False): INPUT: - - ``verbose`` (boolean) -- whether to print an explanation when the - instance is not a generalized quadrangle. + - ``verbose`` -- boolean; whether to print an explanation when the + instance is not a generalized quadrangle - - ``parameters`` (boolean; ``False``) -- if set to ``True``, the + - ``parameters`` -- (boolean; ``False``); if set to ``True``, the function returns a pair ``(s,t)`` instead of ``True`` answers. In this case, `s` and `t` are the integers defined above if they exist (each can be set to ``False`` otherwise). @@ -1796,12 +1795,12 @@ def dual(self, algorithm=None): Incidence structure with 4 points and 3 blocks sage: D.dual() # needs sage.modules Incidence structure with 3 points and 4 blocks - sage: print(D.dual(algorithm="gap")) # optional - gap_package_design + sage: print(D.dual(algorithm='gap')) # optional - gap_package_design Incidence structure with 3 points and 4 blocks sage: blocks = [[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]] - sage: BD = IncidenceStructure(7, blocks, name="FanoPlane"); BD + sage: BD = IncidenceStructure(7, blocks, name='FanoPlane'); BD Incidence structure with 7 points and 7 blocks - sage: print(BD.dual(algorithm="gap")) # optional - gap_package_design + sage: print(BD.dual(algorithm='gap')) # optional - gap_package_design Incidence structure with 7 points and 7 blocks sage: BD.dual() # needs sage.modules Incidence structure with 7 points and 7 blocks @@ -1891,7 +1890,7 @@ def is_resolvable(self, certificate=False, solver=None, verbose=0, check=True, INPUT: - - ``certificate`` (boolean) -- whether to return the classes along with + - ``certificate`` -- boolean; whether to return the classes along with the binary answer (see examples below). - ``solver`` -- (default: ``None``) Specify a Mixed Integer Linear @@ -1902,10 +1901,10 @@ def is_resolvable(self, certificate=False, solver=None, verbose=0, check=True, :class:`MixedIntegerLinearProgram `. - - ``verbose`` -- integer (default: ``0``). Sets the level of - verbosity. Set to 0 by default, which means quiet. + - ``verbose`` -- integer (default: `0`); sets the level of + verbosity. Set to `0` by default, which means quiet. - - ``check`` (boolean) -- whether to check that output is correct before + - ``check`` -- boolean; whether to check that output is correct before returning it. As this is expected to be useless (but we are cautious guys), you may want to disable it whenever you want speed. Set to ``True`` by default. @@ -2031,7 +2030,7 @@ def coloring(self, k=None, solver=None, verbose=0, INPUT: - - ``k`` (integer) -- compute a coloring with `k` colors if an integer is + - ``k`` -- integer; compute a coloring with `k` colors if an integer is provided, otherwise returns an optimal coloring (i.e. with the minimum possible number of colors). @@ -2043,10 +2042,10 @@ def coloring(self, k=None, solver=None, verbose=0, :class:`MixedIntegerLinearProgram `. - - ``verbose`` -- non-negative integer (default: ``0``). Set the level + - ``verbose`` -- nonnegative integer (default: `0`). Set the level of verbosity you want from the linear program solver. Since the problem is `NP`-complete, its solving may take some time depending on - the graph. A value of 0 means that there will be no message printed by + the graph. A value of `0` means that there will be no message printed by the solver. - ``integrality_tolerance`` -- parameter for use with MILP solvers over @@ -2146,7 +2145,7 @@ def edge_coloring(self): g = Graph([list(range(self.num_blocks())), lambda x, y: len(blocks_sets[x] & blocks_sets[y])], loops=False) - return [[blocks[i] for i in C] for C in g.coloring(algorithm="MILP")] + return [[blocks[i] for i in C] for C in g.coloring(algorithm='MILP')] def _spring_layout(self): r""" diff --git a/src/sage/combinat/designs/latin_squares.py b/src/sage/combinat/designs/latin_squares.py index e05816e8977..9f9bb8de2d3 100644 --- a/src/sage/combinat/designs/latin_squares.py +++ b/src/sage/combinat/designs/latin_squares.py @@ -199,7 +199,7 @@ def are_mutually_orthogonal_latin_squares(l, verbose=False): return False from .designs_pyx import is_orthogonal_array - return is_orthogonal_array(list(zip(*[[x for R in M for x in R] for M in l])),k,n, verbose=verbose, terminology="MOLS") + return is_orthogonal_array(list(zip(*[[x for R in M for x in R] for M in l])),k,n, verbose=verbose, terminology='MOLS') def mutually_orthogonal_latin_squares(k, n, partitions=False, check=True): @@ -211,12 +211,12 @@ def mutually_orthogonal_latin_squares(k, n, partitions=False, check=True): INPUT: - - ``k`` (integer) -- number of MOLS. If ``k=None`` it is set to the largest - value available. + - ``k`` -- integer; number of MOLS. If ``k=None`` it is set to the largest + value available - - ``n`` (integer) -- size of the latin square. + - ``n`` -- integer; size of the latin square - - ``partitions`` (boolean) -- a Latin Square can be seen as 3 partitions of + - ``partitions`` -- boolean; a Latin Square can be seen as 3 partitions of the `n^2` cells of the array into `n` sets of size `n`, respectively: * The partition of rows @@ -460,16 +460,16 @@ def MOLS_table(start,stop=None,compare=False,width=None): INPUT: - - ``start``, ``stop`` (integers) -- print the table of MOLS for value of + - ``start``, ``stop`` -- integers; print the table of MOLS for value of `n` such that ``start<=n`. - ``integrality_tolerance`` -- parameter for use with MILP solvers over an - inexact base ring; see :meth:`MixedIntegerLinearProgram.get_values`. + inexact base ring; see :meth:`MixedIntegerLinearProgram.get_values` .. SEEALSO:: @@ -1479,9 +1477,9 @@ def OA_relabel(OA, k, n, blocks=tuple(), matrix=None, symbol_list=None): - ``OA`` -- an OA, or rather a list of blocks of length `k`, each of which contains integers from `0` to `n-1`. - - ``k``, ``n`` (integers) + - ``k``, ``n`` -- integers - - ``blocks`` (list of blocks) -- relabels the integers of the OA + - ``blocks`` -- list of blocks; relabels the integers of the OA from `[0..n-1]` into `[0..n-1]` in such a way that the `i` blocks from ``block`` are respectively relabeled as ``[n-i,...,n-i]``, ..., ``[n-1,...,n-1]``. Thus, the blocks from @@ -1499,7 +1497,7 @@ def OA_relabel(OA, k, n, blocks=tuple(), matrix=None, symbol_list=None): If set to ``None`` (default) no such relabelling is performed. - - ``symbol_list`` -- a list of the desired symbols for the + - ``symbol_list`` -- list of the desired symbols for the relabelled OA. If this is not ``None``, the same relabelling is done on all blocks such that the index of an element in symbol_list is its preimage in the relabelling map. @@ -1567,8 +1565,8 @@ def OA_standard_label(OA): INPUT: - - ``OA`` -- a list of lists with symbols as entries that are not - necessarily integers. + - ``OA`` -- list of lists with symbols as entries that are not + necessarily integers EXAMPLES:: @@ -1812,10 +1810,10 @@ def OA_from_quasi_difference_matrix(M,G,add_col=True,fill_hole=True): - ``G`` -- a group - - ``add_col`` (boolean) -- whether to add a column to the final OA equal to + - ``add_col`` -- boolean; whether to add a column to the final OA equal to `(x_1,\dots,x_g,x_1,\dots,x_g,\dots)` where `G=\{x_1,\dots,x_g\}`. - - ``fill_hole`` (boolean) -- whether to return the incomplete orthogonal + - ``fill_hole`` -- boolean; whether to return the incomplete orthogonal array, or complete it with the `OA(k,u)` (default). When ``fill_hole is None``, no block of the incomplete OA contains more than one value `\geq |G|`. @@ -1872,9 +1870,9 @@ def OA_from_Vmt(m,t,V): INPUT: - - ``m``, ``t`` (integers) + - ``m``, ``t`` -- integers - - ``V`` -- the vector `V(m,t)`. + - ``V`` -- the vector `V(m,t)` .. SEEALSO:: @@ -1923,9 +1921,9 @@ def QDM_from_Vmt(m,t,V): INPUT: - - ``m``, ``t`` (integers) + - ``m``, ``t`` -- integers - - ``V`` -- the vector `V(m,t)`. + - ``V`` -- the vector `V(m,t)` .. SEEALSO:: @@ -1976,9 +1974,9 @@ def OA_from_PBD(k,n,PBD, check=True): INPUT: - - ``k``, ``n`` (integers) + - ``k``, ``n`` -- integers - - ``PBD`` -- a PBD on `0,...,n-1`. + - ``PBD`` -- a PBD on `0, \ldots, n-1` EXAMPLES: @@ -2045,9 +2043,9 @@ def OA_from_wider_OA(OA,k): INPUT: - - ``OA`` -- an orthogonal array. + - ``OA`` -- an orthogonal array - - ``k`` (integer) + - ``k`` -- integer EXAMPLES:: @@ -2144,7 +2142,7 @@ def explain_construction(k,n,t=2): INPUT: - - ``k``, ``n``, ``t`` (integers) -- parameters of the orthogonal array. + - ``k``, ``n``, ``t`` -- integers; parameters of the orthogonal array EXAMPLES:: @@ -2173,12 +2171,12 @@ def build(k,n,t=2,resolvable=False): INPUT: - - ``k``, ``n``, ``t`` (integers) -- parameters of the orthogonal array. + - ``k``, ``n``, ``t`` -- integers; parameters of the orthogonal array - - ``resolvable`` (boolean) -- set to ``True`` if you want the design to be - resolvable. The `n` classes of the resolvable design are obtained as the - first `n` blocks, then the next `n` blocks, etc ... Set to ``False`` by - default. + - ``resolvable`` -- boolean (default: ``False``); set to ``True`` if + you want the design to be resolvable. The `n` classes of the + resolvable design are obtained as the first `n` blocks, then the next + `n` blocks, etc. EXAMPLES:: @@ -2204,7 +2202,7 @@ def exists(k,n,t=2): INPUT: - - ``k``, ``n``, ``t`` (integers) -- parameters of the orthogonal array. + - ``k``, ``n``, ``t`` -- integers; parameters of the orthogonal array .. WARNING:: @@ -2233,7 +2231,7 @@ def is_available(k,n,t=2): INPUT: - - ``k``, ``n``, ``t`` (integers) -- parameters of the orthogonal array. + - ``k``, ``n``, ``t`` -- integers; parameters of the orthogonal array .. SEEALSO:: diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index b828caaaadf..e33b1e844d4 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -49,11 +49,11 @@ def construction_3_3(k,n,m,i,explain_construction=False): INPUT: - - ``k``, ``n``, ``m``, ``i`` (integers) such that the following designs are - available: `OA(k,n)`, `OA(k,m)`, `OA(k,m+1)`, `OA(k,r)`. + - ``k``, ``n``, ``m``, ``i`` -- integers such that the following designs are + available: `OA(k,n)`, `OA(k,m)`, `OA(k,m+1)`, `OA(k,r)` - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: @@ -123,8 +123,8 @@ def construction_3_4(k,n,m,r,s,explain_construction=False): `OA(k,m+1)`, `OA(k,m+2)`, `OA(k,s)`. Additionally, it requires either a `OA(k,m+r)` or a `OA(k,m+r+1)`. - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: @@ -190,13 +190,13 @@ def construction_3_5(k,n,m,r,s,t,explain_construction=False): INPUT: - - ``k``, ``n``, ``m`` (integers) + - ``k``, ``n``, ``m`` -- integers - - ``r``, ``s``, ``t`` (integers) -- sizes of the three truncated groups, - such that `r\leq s` and `(q-r-1)(q-s) \geq (q-s-1)*(q-r)`. + - ``r``, ``s``, ``t`` -- integers; sizes of the three truncated groups, + such that `r\leq s` and `(q-r-1)(q-s) \geq (q-s-1)*(q-r)` - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction The following designs must be available : `OA(k,n)`, `OA(k,r)`, `OA(k,s)`, `OA(k,t)`, `OA(k,m+1)`, `OA(k,m+2)`, `OA(k,m+3)`. @@ -283,12 +283,12 @@ def construction_3_6(k,n,m,i,explain_construction=False): INPUT: - - ``k``, ``n``, ``m``, ``i`` (integers) -- `n` must be a prime power. The + - ``k``, ``n``, ``m``, ``i`` -- integers; `n` must be a prime power. The following designs must be available: `OA(k+r,q)`, `OA(k,m)`, `OA(k,m+1)`, - `OA(k,m+2)`. + `OA(k,m+2)` - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction This is construction 3.6 from [AC07]_. @@ -355,7 +355,7 @@ def OA_and_oval(q, *, solver=None, integrality_tolerance=1e-3): `. - ``integrality_tolerance`` -- parameter for use with MILP solvers over an - inexact base ring; see :meth:`MixedIntegerLinearProgram.get_values`. + inexact base ring; see :meth:`MixedIntegerLinearProgram.get_values` .. NOTE:: @@ -487,8 +487,8 @@ def construction_q_x(k, q, x, check=True, explain_construction=False): guys), you may want to disable it whenever you want speed. Set to ``True`` by default. - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: @@ -637,14 +637,14 @@ def thwart_lemma_3_5(k,n,m,a,b,c,d=0,complement=False,explain_construction=False INPUT: - ``k``, ``n``, ``m``, ``a``, ``b``, ``c``, ``d`` -- integers which must - satisfy the constraints above. In particular, `a+b+c\leq n+1` must hold. + satisfy the constraints above. In particular, `a+b+c\leq n+1` must hold By default, `d=0`. - - ``complement`` (boolean) -- whether to complement the sets, i.e. follow - the `n-a,n-b,n-c` variant described above. + - ``complement`` -- boolean; whether to complement the sets, i.e. follow + the `n-a,n-b,n-c` variant described above - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: @@ -777,10 +777,10 @@ def thwart_lemma_4_1(k,n,m,explain_construction=False): INPUT: - - ``k``, ``n``, ``m`` (integers) + - ``k``, ``n``, ``m`` -- integers - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: @@ -949,14 +949,14 @@ def three_factor_product(k,n1,n2,n3,check=False,explain_construction=False): INPUT: - - ``k``, ``n1``, ``n2``, ``n3`` (integers) + - ``k``, ``n1``, ``n2``, ``n3`` -- integers - ``check`` -- (boolean) Whether to check that everything is going smoothly while the design is being built. It is disabled by default, as the constructor of orthogonal arrays checks the final design anyway. - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: @@ -1187,7 +1187,7 @@ def _reorder_matrix(matrix): g.add_edges((x,N+i) for i,S in enumerate(matrix) for x in S) matrix = [] for _ in range(k): - matching = g.matching(algorithm="LP") + matching = g.matching(algorithm='LP') col = [0]*N for x,i,_ in matching: if i < N: @@ -1323,16 +1323,16 @@ def brouwer_separable_design(k,t,q,x,check=False,verbose=False,explain_construct INPUT: - - ``k``, ``t``, ``q``, ``x`` (integers) + - ``k``, ``t``, ``q``, ``x`` -- integers - - ``check`` -- (boolean) Whether to check that output is correct before - returning it. Set to ``False`` by default. + - ``check`` -- boolean (default: ``False``); whether to check that output + is correct before returning it - - ``verbose`` (boolean) -- whether to print some information on the - construction and parameters being used. + - ``verbose`` -- boolean; whether to print some information on the + construction and parameters being used - - ``explain_construction`` (boolean) -- return a string describing - the construction. + - ``explain_construction`` -- boolean; return a string describing + the construction .. SEEALSO:: diff --git a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx index 5690b681de1..5654f1d3ece 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx +++ b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx @@ -818,11 +818,11 @@ def int_as_sum(int value, list S, int k_max): INPUT: - - ``value`` (integer) + - ``value`` -- integer - - ``S`` -- a list of integers + - ``S`` -- list of integers - - ``k_max`` (integer) + - ``k_max`` -- integer EXAMPLES:: diff --git a/src/sage/combinat/designs/resolvable_bibd.py b/src/sage/combinat/designs/resolvable_bibd.py index 55afd031183..e04e19b4d62 100644 --- a/src/sage/combinat/designs/resolvable_bibd.py +++ b/src/sage/combinat/designs/resolvable_bibd.py @@ -65,16 +65,16 @@ def resolvable_balanced_incomplete_block_design(v,k,existence=False): INPUT: - - ``v``, ``k`` (integers) + - ``v``, ``k`` -- integers - - ``existence`` (boolean) -- instead of building the design, return: + - ``existence`` -- boolean; instead of building the design, return: - ``True`` -- meaning that Sage knows how to build the design - ``Unknown`` -- meaning that Sage does not know how to build the design, but that the design may exist (see :mod:`sage.misc.unknown`). - - ``False`` -- meaning that the design does not exist. + - ``False`` -- meaning that the design does not exist .. SEEALSO:: diff --git a/src/sage/combinat/designs/steiner_quadruple_systems.py b/src/sage/combinat/designs/steiner_quadruple_systems.py index 7c7819c4138..feb0284569d 100644 --- a/src/sage/combinat/designs/steiner_quadruple_systems.py +++ b/src/sage/combinat/designs/steiner_quadruple_systems.py @@ -70,7 +70,7 @@ def two_n(B): INPUT: - - ``B`` -- A Steiner Quadruple System on `n` points. + - ``B`` -- a Steiner Quadruple System on `n` points EXAMPLES:: @@ -107,7 +107,7 @@ def three_n_minus_two(B): INPUT: - - ``B`` -- A Steiner Quadruple System on `n` points. + - ``B`` -- a Steiner Quadruple System on `n` points EXAMPLES:: @@ -162,7 +162,7 @@ def three_n_minus_eight(B): INPUT: - - ``B`` -- A Steiner Quadruple System on `n` points. + - ``B`` -- a Steiner Quadruple System on `n` points EXAMPLES:: @@ -222,8 +222,8 @@ def three_n_minus_four(B): INPUT: - - ``B`` -- A Steiner Quadruple System on `n` points where `n\equiv - 10\pmod{12}`. + - ``B`` -- a Steiner Quadruple System on `n` points where `n\equiv + 10\pmod{12}` EXAMPLES:: @@ -287,7 +287,7 @@ def four_n_minus_six(B): INPUT: - - ``B`` -- A Steiner Quadruple System on `n` points. + - ``B`` -- a Steiner Quadruple System on `n` points EXAMPLES:: @@ -359,7 +359,7 @@ def twelve_n_minus_ten(B): INPUT: - - ``B`` -- A Steiner Quadruple System on `n` points. + - ``B`` -- a Steiner Quadruple System on `n` points EXAMPLES:: @@ -457,7 +457,7 @@ def relabel_system(B): INPUT: - - ``B`` -- a list of 4-uples on `0,...,n-1`. + - ``B`` -- list of 4-uples on `0,...,n-1` EXAMPLES:: @@ -683,10 +683,10 @@ def steiner_quadruple_system(n, check=False): INPUT: - - ``n`` -- an integer such that `n\equiv 2,4\pmod 6` + - ``n`` -- integer such that `n\equiv 2,4\pmod 6` - - ``check`` (boolean) -- whether to check that the system is a Steiner - Quadruple System before returning it (`False` by default) + - ``check`` -- boolean (default: ``False``); whether to check that the + system is a Steiner Quadruple System before returning it EXAMPLES:: diff --git a/src/sage/combinat/designs/twographs.py b/src/sage/combinat/designs/twographs.py index 2bbd4d8d308..4201bd8d276 100644 --- a/src/sage/combinat/designs/twographs.py +++ b/src/sage/combinat/designs/twographs.py @@ -103,8 +103,8 @@ def is_regular_twograph(self, alpha=False): INPUT: - - ``alpha`` -- (default: ``False``) return the value of - ``alpha``, if possible. + - ``alpha`` -- boolean (default: ``False``); return the value of + ``alpha``, if possible EXAMPLES:: diff --git a/src/sage/combinat/diagram_algebras.py b/src/sage/combinat/diagram_algebras.py index 5bc8ae55fea..a1f7de1a73a 100644 --- a/src/sage/combinat/diagram_algebras.py +++ b/src/sage/combinat/diagram_algebras.py @@ -941,7 +941,7 @@ class options(GlobalOptions): are connected, and - ``pi`` -- is a permutation that is to be interpreted as the relative - order of the remaining elements in the top row and the bottom row. + order of the remaining elements in the top row and the bottom row EXAMPLES:: diff --git a/src/sage/combinat/dyck_word.py b/src/sage/combinat/dyck_word.py index 1ea22baec12..51e4f1e4ef7 100644 --- a/src/sage/combinat/dyck_word.py +++ b/src/sage/combinat/dyck_word.py @@ -3871,7 +3871,7 @@ def from_area_sequence(self, code) -> DyckWord: INPUT: - ``code`` -- list of integers satisfying ``code[0] == 0`` - and ``0 <= code[i+1] <= code[i]+1``. + and ``0 <= code[i+1] <= code[i]+1`` EXAMPLES:: diff --git a/src/sage/combinat/e_one_star.py b/src/sage/combinat/e_one_star.py index 85eb0285092..172213f3b11 100644 --- a/src/sage/combinat/e_one_star.py +++ b/src/sage/combinat/e_one_star.py @@ -1349,11 +1349,11 @@ class E1Star(SageObject): INPUT: - ``sigma`` -- unimodular ``WordMorphism``, i.e. such that its incidence - matrix has determinant `\pm 1`. + matrix has determinant `\pm 1` - - ``method`` -- 'prefix' or 'suffix' (default: 'suffix') - Enables to use an alternative definition `E_1^*(\sigma)` substitutions, - where the abelianized of the prefix` is used instead of the suffix. + - ``method`` -- 'prefix' or 'suffix' (default: 'suffix'); + enables to use an alternative definition `E_1^*(\sigma)` substitutions, + where the abelianized of the prefix` is used instead of the suffix .. NOTE:: diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finite_state_machine.py index 834eb6670c1..86d0d5f725b 100644 --- a/src/sage/combinat/finite_state_machine.py +++ b/src/sage/combinat/finite_state_machine.py @@ -343,7 +343,7 @@ --------------------------------------- We want to build an automaton which recognizes non-adjacent forms -(NAFs), i.e., sequences which have no adjacent non-zeros. +(NAFs), i.e., sequences which have no adjacent nonzeros. We use `0`, `1`, and `-1` as digits:: sage: NAF = Automaton( @@ -730,7 +730,7 @@ True Finally, we check that this indeed computes the Gray code of the first -10 non-negative integers. +10 nonnegative integers. :: @@ -1029,7 +1029,7 @@ def equal(iterator): - ``iterator`` -- an iterator of the elements to check - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean This implements ``_. @@ -1071,7 +1071,7 @@ def startswith(list_, prefix): - ``list_`` -- list - ``prefix`` -- list representing the prefix - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean Similar to :meth:`str.startswith`. @@ -1134,7 +1134,7 @@ def FSMWordSymbol(word): INPUT: - - ``word`` -- the input word. + - ``word`` -- the input word OUTPUT: a string of ``word`` @@ -1178,10 +1178,10 @@ class FSMState(SageObject): INPUT: - - ``label`` -- the label of the state. + - ``label`` -- the label of the state - ``word_out`` -- (default: ``None``) a word that is written when - the state is reached. + the state is reached - ``is_initial`` -- (default: ``False``) @@ -1429,9 +1429,9 @@ def __lt__(self, other): INPUT: - - `other` -- a state. + - `other` -- a state - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -1487,7 +1487,7 @@ def final_word_out(self, final_word_out): INPUT: - - ``final_word_out`` -- a list, any element or ``None``. + - ``final_word_out`` -- list; any element or ``None`` OUTPUT: nothing @@ -1569,7 +1569,7 @@ def is_final(self, is_final): INPUT: - ``is_final`` -- ``True`` if the state should be final and - ``False`` otherwise. + ``False`` otherwise OUTPUT: nothing @@ -1697,7 +1697,7 @@ def __deepcopy__(self, memo): INPUT: - - ``memo`` -- a dictionary storing already processed elements. + - ``memo`` -- a dictionary storing already processed elements OUTPUT: a new state @@ -1768,10 +1768,10 @@ def relabeled(self, label, memo=None): INPUT: - - ``label`` -- the label of new state. + - ``label`` -- the label of new state - ``memo`` -- (default: ``None``) a dictionary storing already - processed elements. + processed elements OUTPUT: a new state @@ -1872,11 +1872,11 @@ def __eq__(self, other): INPUT: - - ``self`` -- a state. + - ``self`` -- a state - - ``other`` -- a state. + - ``other`` -- a state - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean Note that the hooks and whether the states are initial or final are not checked. To fully compare two states (including @@ -1906,11 +1906,11 @@ def __ne__(self, other): INPUT: - - ``self`` -- a state. + - ``self`` -- a state - - ``other`` -- a state. + - ``other`` -- a state - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -1929,14 +1929,14 @@ def fully_equal(self, other, compare_color=True): INPUT: - - ``self`` -- a state. + - ``self`` -- a state - - ``other`` -- a state. + - ``other`` -- a state - - ``compare_color`` -- If ``True`` (default) colors are - compared as well, otherwise not. + - ``compare_color`` -- boolean (default: ``True``); if ``True`` colors + are compared as well, otherwise not - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean Note that usual comparison by ``==`` does only compare the labels. @@ -1985,7 +1985,7 @@ def _epsilon_successors_(self, fsm=None): INPUT: - ``fsm`` -- the finite state machine to which ``self`` - belongs. + belongs OUTPUT: a dictionary mapping states to a list of output words @@ -2049,9 +2049,9 @@ def _in_epsilon_cycle_(self, fsm=None): INPUT: - ``fsm`` -- the finite state machine to which ``self`` - belongs. + belongs - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean TESTS:: @@ -2078,9 +2078,9 @@ def _epsilon_cycle_output_empty_(self, fsm=None): INPUT: - ``fsm`` -- the finite state machine to which ``self`` - belongs. + belongs - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean A :class:`ValueError` is raised when ``self`` is not in an epsilon cycle. @@ -2156,9 +2156,9 @@ class FSMTransition(SageObject): INPUT: - - ``from_state`` -- state from which transition starts. + - ``from_state`` -- state from which transition starts - - ``to_state`` -- state in which transition ends. + - ``to_state`` -- state in which transition ends - ``word_in`` -- the input word of the transitions (when the finite state machine is used as automaton) @@ -2243,9 +2243,9 @@ def __lt__(self, other): INPUT: - - ``other`` -- a transition. + - ``other`` -- a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -2283,7 +2283,7 @@ def __deepcopy__(self, memo): INPUT: - - ``memo`` -- a dictionary storing already processed elements. + - ``memo`` -- a dictionary storing already processed elements OUTPUT: a new transition @@ -2375,11 +2375,11 @@ def __eq__(self, other): INPUT: - - ``self`` -- a transition. + - ``self`` -- a transition - - ``other`` -- a transition. + - ``other`` -- a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -2403,11 +2403,11 @@ def __ne__(self, other): INPUT: - - ``self`` -- a transition. + - ``self`` -- a transition - - ``other`` -- a transition. + - ``other`` -- a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -2468,10 +2468,10 @@ def duplicate_transition_ignore(old_transition, new_transition): INPUT: - - ``old_transition`` -- A transition in a finite state machine. + - ``old_transition`` -- a transition in a finite state machine - - ``new_transition`` -- A transition, identical to ``old_transition``, - which is to be inserted into the finite state machine. + - ``new_transition`` -- a transition, identical to ``old_transition``, + which is to be inserted into the finite state machine OUTPUT: the same transition, unchanged @@ -2498,10 +2498,10 @@ def duplicate_transition_raise_error(old_transition, new_transition): INPUT: - - ``old_transition`` -- A transition in a finite state machine. + - ``old_transition`` -- a transition in a finite state machine - - ``new_transition`` -- A transition, identical to ``old_transition``, - which is to be inserted into the finite state machine. + - ``new_transition`` -- a transition, identical to ``old_transition``, + which is to be inserted into the finite state machine OUTPUT: nothing. A :class:`ValueError` is raised @@ -2531,10 +2531,10 @@ def duplicate_transition_add_input(old_transition, new_transition): INPUT: - - ``old_transition`` -- A transition in a finite state machine. + - ``old_transition`` -- a transition in a finite state machine - - ``new_transition`` -- A transition, identical to ``old_transition``, - which is to be inserted into the finite state machine. + - ``new_transition`` -- a transition, identical to ``old_transition``, + which is to be inserted into the finite state machine OUTPUT: @@ -2600,22 +2600,22 @@ class FiniteStateMachine(SageObject): - ``input_alphabet`` and ``output_alphabet`` -- the input and output alphabets of this machine - - ``determine_alphabets`` -- If ``True``, then the function + - ``determine_alphabets`` -- if ``True``, then the function :meth:`.determine_alphabets` is called after ``data`` was read and processed, if ``False``, then not. If it is ``None``, then it is decided during the construction of the finite state machine whether :meth:`.determine_alphabets` should be called. - - ``with_final_word_out`` -- If given (not ``None``), then the + - ``with_final_word_out`` -- if given (not ``None``), then the function :meth:`.with_final_word_out` (more precisely, its inplace pendant :meth:`.construct_final_word_out`) is called with input ``letters=with_final_word_out`` at the end of the creation process. - - ``store_states_dict`` -- If ``True``, then additionally the states - are stored in an internal dictionary for speed up. + - ``store_states_dict`` -- if ``True``, then additionally the states + are stored in an internal dictionary for speed up - - ``on_duplicate_transition`` -- A function which is called when a + - ``on_duplicate_transition`` -- a function which is called when a transition is inserted into ``self`` which already existed (same ``from_state``, same ``to_state``, same ``word_in``, same ``word_out``). @@ -3189,7 +3189,7 @@ def empty_copy(self, memo=None, new_class=None): INPUT: - - ``memo`` -- a dictionary storing already processed elements. + - ``memo`` -- a dictionary storing already processed elements - ``new_class`` -- a class for the copy. By default (``None``), the class of ``self`` is used. @@ -3233,7 +3233,7 @@ def __deepcopy__(self, memo): INPUT: - - ``memo`` -- a dictionary storing already processed elements. + - ``memo`` -- a dictionary storing already processed elements OUTPUT: a new finite state machine @@ -3283,7 +3283,7 @@ def _copy_from_other_(self, other, memo=None, empty=False): INPUT: - - ``other`` -- a :class:`FiniteStateMachine`. + - ``other`` -- a :class:`FiniteStateMachine` OUTPUT: nothing @@ -3425,7 +3425,7 @@ def induced_sub_finite_state_machine(self, states): INPUT: - - ``states`` -- a list (or an iterator) of states (either labels or + - ``states`` -- list (or an iterator) of states (either labels or instances of :class:`FSMState`) of the sub-finite-state-machine. OUTPUT: @@ -3508,7 +3508,7 @@ def __or__(self, other): INPUT: - - ``other`` -- a finite state machine. + - ``other`` -- a finite state machine OUTPUT: a new finite state machine @@ -3848,11 +3848,11 @@ def __eq__(self, other): INPUT: - - ``self`` -- a finite state machine. + - ``self`` -- a finite state machine - - ``other`` -- a finite state machine. + - ``other`` -- a finite state machine - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean Note that this function compares all attributes of a state (by using :meth:`FSMState.fully_equal`) except for colors. Colors @@ -3928,11 +3928,11 @@ def __ne__(self, other): INPUT: - - ``self`` -- a finite state machine. + - ``self`` -- a finite state machine - - ``other`` -- a finite state machine. + - ``other`` -- a finite state machine - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -3956,9 +3956,9 @@ def __contains__(self, item): INPUT: - - ``item`` -- a state or a transition. + - ``item`` -- a state or a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -3991,7 +3991,7 @@ def is_Markov_chain(self, is_zero=None): for zero, e.g. in the case of symbolic probabilities, see the examples below. - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean :attr:`on_duplicate_transition` must be :func:`duplicate_transition_add_input`, the sum of the input weights @@ -4145,7 +4145,7 @@ def format_letter_negative(self, letter): INPUT: - - ``letter`` -- anything. + - ``letter`` -- anything OUTPUT: @@ -4175,7 +4175,7 @@ def format_transition_label_reversed(self, word): INPUT: - - ``word`` -- list of letters. + - ``word`` -- list of letters OUTPUT: @@ -4888,9 +4888,9 @@ def set_coordinates(self, coordinates, default=True): INPUT: - ``coordinates`` -- a dictionary or a function mapping labels - of states to pairs interpreted as coordinates. + of states to pairs interpreted as coordinates - - ``default`` -- If ``True``, then states not given by + - ``default`` -- if ``True``, then states not given by ``coordinates`` get a default position on a circle of radius 3. @@ -4968,10 +4968,10 @@ def adjacency_matrix(self, input=None, INPUT: - - ``input`` -- Only transitions with input label ``input`` are - respected. + - ``input`` -- only transitions with input label ``input`` are + respected - - ``entry`` -- The function ``entry`` takes a transition and the + - ``entry`` -- the function ``entry`` takes a transition and the return value is written in the matrix as the entry ``(transition.from_state, transition.to_state)``. The default value (``None``) of entry takes the variable ``x`` to the @@ -5076,7 +5076,7 @@ def determine_input_alphabet(self, reset=True): INPUT: - - ``reset`` -- a boolean (default: ``True``). If ``True``, then + - ``reset`` -- boolean (default: ``True``); if ``True``, then the existing input alphabet is erased, otherwise new letters are appended to the existing alphabet. @@ -5123,7 +5123,7 @@ def determine_output_alphabet(self, reset=True): INPUT: - - ``reset`` -- a boolean (default: ``True``). If ``True``, then + - ``reset`` -- boolean (default: ``True``); If ``True``, then the existing output alphabet is erased, otherwise new letters are appended to the existing alphabet. @@ -5174,7 +5174,7 @@ def determine_alphabets(self, reset=True): INPUT: - - ``reset`` -- If reset is ``True``, then the existing input + - ``reset`` -- if reset is ``True``, then the existing input and output alphabets are erased, otherwise new letters are appended to the existing alphabets. @@ -5381,7 +5381,7 @@ def state(self, state): INPUT: - - ``state`` -- If ``state`` is not an instance of + - ``state`` -- if ``state`` is not an instance of :class:`FSMState`, then it is assumed that it is the label of a state. @@ -5424,14 +5424,12 @@ def transition(self, transition): INPUT: - - ``transition`` -- If ``transition`` is not an instance of + - ``transition`` -- if ``transition`` is not an instance of :class:`FSMTransition`, then it is assumed that it is a - tuple ``(from_state, to_state, word_in, word_out)``. + tuple ``(from_state, to_state, word_in, word_out)`` - OUTPUT: - - The transition of the finite state machine corresponding - to ``transition``. + OUTPUT: the transition of the finite state machine corresponding + to ``transition`` If no transition is found, then a :class:`LookupError` is thrown. @@ -5581,7 +5579,7 @@ def is_deterministic(self): """ Return whether the finite finite state machine is deterministic. - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean A finite state machine is considered to be deterministic if each transition has input label of length one and for each @@ -5635,7 +5633,7 @@ def is_complete(self): """ Return whether the finite state machine is complete. - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean A finite state machine is considered to be complete if each transition has an input label of length one and for each @@ -6060,9 +6058,9 @@ def _process_convert_output_(self, output_data, **kwargs): INPUT: - - ``output_data`` -- a triple. + - ``output_data`` -- a triple - - ``full_output`` -- a boolean. + - ``full_output`` -- boolean OUTPUT: the converted output @@ -6094,7 +6092,7 @@ def iter_process(self, input_tape=None, initial_state=None, INPUT: - - ``iterator_type`` -- If ``None`` (default), then + - ``iterator_type`` -- if ``None`` (default), then an instance of :class:`FSMProcessIterator` is returned. If this is ``'simple'`` only an iterator over one output is returned (an exception is raised if this is not the case, i.e., @@ -6251,7 +6249,7 @@ def _iter_process_simple_(self, iterator): INPUT: - - ``iterator`` -- in instance of :class:`FSMProcessIterator`. + - ``iterator`` -- in instance of :class:`FSMProcessIterator` OUTPUT: a generator @@ -6379,7 +6377,7 @@ def add_states(self, states): INPUT: - - ``states`` -- a list of states or iterator over states. + - ``states`` -- list of states or iterator over states OUTPUT: nothing @@ -6488,7 +6486,7 @@ def _add_fsm_transition_(self, t): INPUT: - - ``t`` -- an instance of :class:`FSMTransition`. + - ``t`` -- an instance of :class:`FSMTransition` OUTPUT: the new transition @@ -6518,15 +6516,15 @@ def add_from_transition_function(self, function, initial_states=None, INPUT: - ``function`` may return a tuple (new_state, output_word) or a - list of such tuples. + list of such tuples - - ``initial_states`` -- If no initial states are given, the - already existing initial states of self are taken. + - ``initial_states`` -- if no initial states are given, the + already existing initial states of self are taken - - If ``explore_existing_states`` is ``True`` (default), then - already existing states in self (e.g. already given final - states) will also be processed if they are reachable from - the initial states. + - ``explore_existing_states`` -- boolean (default: ``True``); if + ``True`` (default), then already existing states in self (e.g. + already given final states) will also be processed if they are + reachable from the initial statess OUTPUT: nothing @@ -6766,7 +6764,7 @@ def delete_transition(self, t): INPUT: - - ``t`` -- a transition. + - ``t`` -- a transition OUTPUT: nothing @@ -6786,7 +6784,7 @@ def delete_state(self, s): INPUT: - - ``s`` -- a label of a state or an :class:`FSMState`. + - ``s`` -- a label of a state or an :class:`FSMState` OUTPUT: nothing @@ -6839,7 +6837,7 @@ def epsilon_successors(self, state): INPUT: - ``state`` -- the state whose epsilon successors should be - determined. + determined OUTPUT: a dictionary mapping states to a list of output words @@ -7145,7 +7143,7 @@ def concatenation(self, other): INPUT: - - ``other`` -- a :class:`FiniteStateMachine`. + - ``other`` -- a :class:`FiniteStateMachine` OUTPUT: @@ -7465,19 +7463,19 @@ def product_FiniteStateMachine(self, other, function, - ``new_input_alphabet`` (optional) -- the new input alphabet as a list. - - ``only_accessible_components`` -- If ``True`` (default), then + - ``only_accessible_components`` -- if ``True`` (default), then the result is piped through :meth:`.accessible_components`. If no ``new_input_alphabet`` is given, it is determined by :meth:`.determine_alphabets`. - - ``final_function`` -- A function mapping `d` final states of + - ``final_function`` -- a function mapping `d` final states of the original finite state machines to the final output of the corresponding state in the new finite state machine. By default, the final output is the empty word if both final outputs of the constituent states are empty; otherwise, a :class:`ValueError` is raised. - - ``new_class`` -- Class of the new finite state machine. By + - ``new_class`` -- class of the new finite state machine. By default (``None``), the class of ``self`` is used. OUTPUT: @@ -7723,7 +7721,7 @@ def composition(self, other, algorithm=None, - ``algorithm`` -- can be one of the following - - ``direct`` -- The composition is calculated directly. + - ``direct`` -- the composition is calculated directly There can be arbitrarily many initial and final states, but the input and output labels must have length `1`. @@ -7732,7 +7730,7 @@ def composition(self, other, algorithm=None, The output of ``other`` is fed into ``self``. - - ``explorative`` -- An explorative algorithm is used. + - ``explorative`` -- an explorative algorithm is used The input alphabet of self has to be specified. @@ -8294,10 +8292,8 @@ def transposition(self, reverse_output_labels=True): INPUT: - - ``reverse_output_labels`` -- a boolean (default: ``True``): whether to reverse - output labels. - - OUTPUT: a new finite state machine + - ``reverse_output_labels`` -- boolean (default: ``True``); whether to + reverse output labels EXAMPLES:: @@ -8473,8 +8469,8 @@ def completion(self, sink=None): INPUT: - ``sink`` -- either an instance of :class:`FSMState` or a label - for the sink (default: ``None``). If ``None``, the least - available non-zero integer is used. + for the sink (default: ``None``); if ``None``, the least + available nonzero integer is used OUTPUT: @@ -9122,11 +9118,10 @@ def with_final_word_out(self, letters, allow_non_final=True): list of such elements. This is repeated cyclically when needed. - - ``allow_non_final`` -- a boolean (default: ``True``); which - indicates whether we allow that some states may be non-final - in the resulting finite state machine. I.e., if ``False`` then - each state has to have a path to a final state with input - label matching ``letters``. + - ``allow_non_final`` -- boolean (default: ``True``); whether we allow + that some states may be non-final in the resulting finite state + machine. I.e., if ``False`` then each state has to have a path to a + final state with input label matching ``letters``. OUTPUT: a finite state machine @@ -9534,14 +9529,14 @@ def plot(self): def predecessors(self, state, valid_input=None): """ - Lists all predecessors of a state. + List all predecessors of a state. INPUT: - ``state`` -- the state from which the predecessors should be - listed. + listed - - ``valid_input`` -- If ``valid_input`` is a list, then we + - ``valid_input`` -- if ``valid_input`` is a list, then we only consider transitions whose input labels are contained in ``valid_input``. ``state`` has to be a :class:`FSMState` (not a label of a state). If input labels of length larger @@ -9597,7 +9592,7 @@ def number_of_words(self, variable=None, - ``variable`` -- a symbol denoting the length of the words, by default `n` - - ``base_ring`` -- Ring (default: ``QQbar``) in which to + - ``base_ring`` -- ring (default: ``QQbar``) in which to compute the eigenvalues OUTPUT: a symbolic expression @@ -9737,7 +9732,7 @@ def asymptotic_moments(self, variable=None): INPUT: - ``variable`` -- a symbol denoting the length of the input, - by default `n`. + (default: `n`) OUTPUT: a dictionary consisting of @@ -10609,7 +10604,7 @@ def is_monochromatic(self): """ Check whether the colors of all states are equal. - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean EXAMPLES:: @@ -10630,7 +10625,7 @@ def language(self, max_length=None, **kwargs): INPUT: - - ``max_length`` -- an integer or ``None`` (default). Only + - ``max_length`` -- integer or ``None`` (default). Only output words which come from inputs of length at most ``max_length`` will be considered. If ``None``, then this iterates over all possible words without length restrictions. @@ -10880,7 +10875,7 @@ def intersection(self, other, only_accessible_components=True): - ``other`` -- an automaton - - ``only_accessible_components`` -- If ``True`` (default), then + - ``only_accessible_components`` -- if ``True`` (default), then the result is piped through :meth:`.accessible_components`. If no ``new_input_alphabet`` is given, it is determined by :meth:`.determine_alphabets`. @@ -11153,7 +11148,7 @@ def minimization(self, algorithm=None): INPUT: - - ``algorithm`` -- Either Moore's algorithm (by + - ``algorithm`` -- either Moore's algorithm (by ``algorithm='Moore'`` or as default for deterministic automata) or Brzozowski's algorithm (when ``algorithm='Brzozowski'`` or when the automaton is not @@ -11316,7 +11311,7 @@ def is_equivalent(self, other): INPUT: - - ``other`` -- an :class:`Automaton`. + - ``other`` -- an :class:`Automaton` EXAMPLES:: @@ -11599,9 +11594,9 @@ def _process_convert_output_(self, output_data, **kwargs): INPUT: - - ``output_data`` -- a triple. + - ``output_data`` -- a triple - - ``full_output`` -- a boolean. + - ``full_output`` -- boolean - ``always_include_output`` -- if set (not by default), always return a triple containing the (non-existing) output. This @@ -11867,7 +11862,7 @@ def language(self, max_length=None, **kwargs): INPUT: - - ``max_length`` -- an integer or ``None`` (default). Only + - ``max_length`` -- integer or ``None`` (default). Only inputs of length at most ``max_length`` will be considered. If ``None``, then this iterates over all possible words without length restrictions. @@ -12057,7 +12052,7 @@ def intersection(self, other, only_accessible_components=True): - ``other`` -- a transducer - - ``only_accessible_components`` -- If ``True`` (default), then + - ``only_accessible_components`` -- if ``True`` (default), then the result is piped through :meth:`.accessible_components`. If no ``new_input_alphabet`` is given, it is determined by :meth:`.determine_alphabets`. @@ -12180,7 +12175,7 @@ def cartesian_product(self, other, only_accessible_components=True): - ``other`` -- a finite state machine (if `d=2`) or a list (or other iterable) of `d-1` finite state machines - - ``only_accessible_components`` -- If ``True`` (default), then + - ``only_accessible_components`` -- if ``True`` (default), then the result is piped through :meth:`.accessible_components`. If no ``new_input_alphabet`` is given, it is determined by :meth:`.determine_alphabets`. @@ -12763,9 +12758,9 @@ def _process_convert_output_(self, output_data, **kwargs): INPUT: - - ``output_data`` -- a triple. + - ``output_data`` -- a triple - - ``full_output`` -- a boolean. + - ``full_output`` -- boolean OUTPUT: the converted output @@ -12802,14 +12797,14 @@ class _FSMTapeCache_(SageObject): INPUT: - - ``tape_cache_manager`` -- a list of the existing instances of - :class:`_FSMTapeCache_`. ``self`` will be appended to this list. + - ``tape_cache_manager`` -- list of the existing instances of + :class:`_FSMTapeCache_`. ``self`` will be appended to this list - - ``tape`` -- a tuple or list of the input tracks (iterables). + - ``tape`` -- a tuple or list of the input tracks (iterables) - - ``tape_ended`` -- a list of booleans (one for each track of the + - ``tape_ended`` -- list of booleans (one for each track of the tape), which indicate whether the track iterator has already raised - a ``StopIteration`` exception. + a ``StopIteration`` exception - ``position`` -- a tuple of pairs `(p, t)` marking the current positions of each of the input tracks. There `p` is the number @@ -12817,7 +12812,7 @@ class _FSMTapeCache_(SageObject): sorted first by `p` (smallest first) and then by `t`, i.e., lexicographically. - - ``is_multitape`` -- If ``True`` each entry of the + - ``is_multitape`` -- if ``True`` each entry of the input-word-tuple of a transition is interpreted as word for the corresponding input track. If ``False`` input-words are interpreted as an iterable of letters. @@ -12951,7 +12946,7 @@ def deepcopy(self, memo=None): INPUT: - - ``memo`` -- a dictionary. + - ``memo`` -- a dictionary OUTPUT: an instance of ``_FSMCacheTape_`` @@ -12981,7 +12976,7 @@ def read(self, track_number): INPUT: - - ``track_number`` -- an integer. + - ``track_number`` -- integer OUTPUT: @@ -13037,10 +13032,10 @@ def finished(self, track_number=None): INPUT: - - ``track_number`` -- an integer or ``None``. If ``None``, - then ``True`` is returned if all tracks are finished. + - ``track_number`` -- integer or ``None`` (default); If ``None``, + then ``True`` is returned if all tracks are finished - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean TESTS:: @@ -13098,7 +13093,7 @@ def preview_word(self, track_number=None, length=1, return_word=False): INPUT: - - ``track_number`` -- an integer (default: ``None``); If ``None``, + - ``track_number`` -- integer (default: ``None``); If ``None``, then a tuple of words (one from each track) is returned - ``length`` -- (default: ``1``) the length of the word(s) @@ -13197,11 +13192,11 @@ def compare_to_tape(self, track_number, word): INPUT: - - ``track_number`` -- an integer. + - ``track_number`` -- integer - - ``word`` -- a tuple or list of letters. + - ``word`` -- a tuple or list of letters - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean TESTS:: @@ -13244,7 +13239,7 @@ def forward(self, transition): INPUT: - - ``transition`` -- a transition of a finite state machine. + - ``transition`` -- a transition of a finite state machine OUTPUT: nothing @@ -13321,9 +13316,9 @@ def transition_possible(self, transition): INPUT: - - ``transition`` -- a transition of a finite state machine. + - ``transition`` -- a transition of a finite state machine - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean TESTS:: @@ -13363,9 +13358,9 @@ def _transition_possible_epsilon_(self, word_in): INPUT: - - ``word_in`` -- an input word of a transition. + - ``word_in`` -- an input word of a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean TESTS:: @@ -13393,9 +13388,9 @@ def _transition_possible_test_(self, word_in): INPUT: - - ``word_in`` -- an input word of a transition. + - ``word_in`` -- an input word of a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean This method is usually overridden in inherited classes, cf. :class:`_FSMTapeCacheDetectEpsilon_` and @@ -13487,9 +13482,9 @@ def _transition_possible_test_(self, word_in): INPUT: - - ``word_in`` -- an input word of a transition. + - ``word_in`` -- an input word of a transition - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean TESTS:: @@ -13526,11 +13521,11 @@ def compare_to_tape(self, track_number, word): INPUT: - - ``track_number`` -- an integer. + - ``track_number`` -- integer - - ``word`` -- a tuple or list of letters. Only its length is used. + - ``word`` -- a tuple or list of letters. Only its length is used - OUTPUT: ``True`` or ``False`` + OUTPUT: boolean Note that this method usually returns ``True``. ``False`` can only be returned at the end of the input tape. @@ -13576,7 +13571,7 @@ def tupleofwords_to_wordoftuples(tupleofwords): INPUT: - - ``tupleofwords`` -- a tuple of a list of letters. + - ``tupleofwords`` -- a tuple of a list of letters OUTPUT: a list of tuples @@ -13600,7 +13595,7 @@ def wordoftuples_to_tupleofwords(wordoftuples): INPUT: - - ``wordoftuples`` -- a list of tuples of letters. + - ``wordoftuples`` -- list of tuples of letters OUTPUT: a tuple of lists @@ -13656,7 +13651,7 @@ class FSMProcessIterator(SageObject, Iterator): INPUT: - ``fsm`` -- the finite state machine on which the input should be - processed. + processed - ``input_tape`` -- the input tape can be a list or an iterable with entries from the input alphabet. If we are @@ -14035,13 +14030,13 @@ def _push_branch_(self, state, tape_cache, outputs): INPUT: - - ``state`` -- state which has to be processed. + - ``state`` -- state which has to be processed - ``tape_cache`` -- an instance of :class:`_FSMTapeCache_` (storing - information what to read next). + information what to read next) - - ``outputs`` -- a list of output tapes on each of which words - were written until reaching ``state``. + - ``outputs`` -- list of output tapes on each of which words + were written until reaching ``state`` OUTPUT: nothing @@ -14132,8 +14127,8 @@ def _push_branches_(self, state, tape_cache, outputs): - ``tape_cache`` -- an instance of :class:`_FSMTapeCache_` (storing information what to read next). - - ``outputs`` -- a list of output tapes on each of which words - were written until reaching ``state``. + - ``outputs`` -- list of output tapes on each of which words + were written until reaching ``state`` OUTPUT: nothing @@ -14817,13 +14812,13 @@ def _push_branch_(self, state, tape_cache, outputs): INPUT: - - ``state`` -- state which has to be processed. + - ``state`` -- state which has to be processed - ``tape_cache`` -- an instance of :class:`_FSMTapeCache_` (storing - information what to read next). + information what to read next) - - ``outputs`` -- a list of output tapes on each of which words - were written until reaching ``state``. + - ``outputs`` -- list of output tapes on each of which words + were written until reaching ``state`` OUTPUT: nothing diff --git a/src/sage/combinat/finite_state_machine_generators.py b/src/sage/combinat/finite_state_machine_generators.py index 53bf8cbfd24..a397a8fc0eb 100644 --- a/src/sage/combinat/finite_state_machine_generators.py +++ b/src/sage/combinat/finite_state_machine_generators.py @@ -1374,7 +1374,7 @@ def Recursion(self, recursions, base, function=None, var=None, - ``base`` -- base of the digit expansion - ``function`` -- symbolic function ``f`` occurring in the - recursions. + recursions - ``var`` -- symbolic variable diff --git a/src/sage/combinat/integer_lists/base.pyx b/src/sage/combinat/integer_lists/base.pyx index 6da2125396e..e425979ee9a 100644 --- a/src/sage/combinat/integer_lists/base.pyx +++ b/src/sage/combinat/integer_lists/base.pyx @@ -394,7 +394,7 @@ cdef class Envelope(): inf sage: f.min_slope 1 - sage: TestSuite(f).run(skip="_test_pickling") + sage: TestSuite(f).run(skip='_test_pickling') sage: Envelope(3, sign=1/3, max_slope=-1, min_length=4) Traceback (most recent call last): ... diff --git a/src/sage/combinat/integer_lists/invlex.pyx b/src/sage/combinat/integer_lists/invlex.pyx index d8ab12b0a3d..4bcb964dfde 100644 --- a/src/sage/combinat/integer_lists/invlex.pyx +++ b/src/sage/combinat/integer_lists/invlex.pyx @@ -62,29 +62,29 @@ class IntegerListsLex(IntegerLists, metaclass=ClasscallMetaclass): INPUT: - - ``min_sum`` -- a nonnegative integer (default: 0): - a lower bound on ``sum(l)``. + - ``min_sum`` -- a nonnegative integer (default: 0); + a lower bound on ``sum(l)`` - - ``max_sum`` -- a nonnegative integer or `\infty` (default: `\infty`): - an upper bound on ``sum(l)``. + - ``max_sum`` -- a nonnegative integer or `\infty` (default: `\infty`); + an upper bound on ``sum(l)`` - - ``n`` -- a nonnegative integer (optional): if specified, this - overrides ``min_sum`` and ``max_sum``. + - ``n`` -- a nonnegative integer (optional); if specified, this + overrides ``min_sum`` and ``max_sum`` - - ``min_length`` -- a nonnegative integer (default: `0`): a lower - bound on ``len(l)``. + - ``min_length`` -- a nonnegative integer (default: `0`); a lower + bound on ``len(l)`` - ``max_length`` -- a nonnegative integer or `\infty` (default: - `\infty`): an upper bound on ``len(l)``. + `\infty`); an upper bound on ``len(l)`` - - ``length`` -- an integer (optional); overrides ``min_length`` - and ``max_length`` if specified; + - ``length`` -- integer (optional); overrides ``min_length`` + and ``max_length`` if specified - - ``min_part`` -- a nonnegative integer: a lower bounds on all - parts: ``min_part <= l[i]`` for ``0 <= i < len(l)``. + - ``min_part`` -- a nonnegative integer; a lower bounds on all + parts: ``min_part <= l[i]`` for ``0 <= i < len(l)`` - - ``floor`` -- a list of nonnegative integers or a function: lower - bounds on the individual parts `l[i]`. + - ``floor`` -- list of nonnegative integers or a function; lower + bounds on the individual parts `l[i]` If ``floor`` is a list of integers, then ``floor<=l[i]`` for ``0 <= i < min(len(l), len(floor)``. Similarly, if ``floor`` is a @@ -98,22 +98,22 @@ class IntegerListsLex(IntegerLists, metaclass=ClasscallMetaclass): `\infty` is allowed in addition to integers, and the default value is `\infty`. - - ``min_slope`` -- an integer or `-\infty` (default: `-\infty`): + - ``min_slope`` -- integer or `-\infty` (default: `-\infty`); a lower bound on the slope between consecutive parts: ``min_slope <= l[i+1]-l[i]`` for ``0 <= i < len(l)-1`` - - ``max_slope`` -- an integer or `+\infty` (defaults: `+\infty`) + - ``max_slope`` -- integer or `+\infty` (defaults: `+\infty`); an upper bound on the slope between consecutive parts: ``l[i+1]-l[i] <= max_slope`` for ``0 <= i < len(l)-1`` - ``category`` -- a category (default: :class:`FiniteEnumeratedSets`) - - ``check`` -- boolean (default: ``True``): whether to display the + - ``check`` -- boolean (default: ``True``); whether to display the warnings raised when functions are given as input to ``floor`` or ``ceiling`` and the errors raised when there is no proper enumeration. - - ``name`` -- a string or ``None`` (default: ``None``) if set, + - ``name`` -- a string or ``None`` (default: ``None``); if set, this will be passed down to :meth:`Parent.rename` to specify the name of ``self``. It is recommended to use rename method directly because this feature may become deprecated. @@ -1101,7 +1101,7 @@ class IntegerListsLexIter(builtins.object): - ``_current_sum`` -- the sum of the parts of ``_current_list``; - - ``_search_ranges`` -- a list of same length as + - ``_search_ranges`` -- list of same length as ``_current_list``: the range for each part. Furthermore, we assume that there is no obvious contradiction diff --git a/src/sage/combinat/matrices/dancing_links.pyx b/src/sage/combinat/matrices/dancing_links.pyx index 0c178a2f664..6b761d422e3 100644 --- a/src/sage/combinat/matrices/dancing_links.pyx +++ b/src/sage/combinat/matrices/dancing_links.pyx @@ -410,7 +410,7 @@ cdef class dancing_linksWrapper: INPUT: - - ``indices`` -- list, row indices to be found in the solution + - ``indices`` -- list; row indices to be found in the solution OUTPUT: dancing links solver @@ -486,7 +486,7 @@ cdef class dancing_linksWrapper: INPUT: - - ``column`` -- integer, the column used to split the problem into + - ``column`` -- integer; the column used to split the problem into independent subproblems OUTPUT: dict where keys are row numbers and values are dlx solvers @@ -578,12 +578,12 @@ cdef class dancing_linksWrapper: INPUT: - - ``ncpus`` -- integer (default: ``None``), maximal number of + - ``ncpus`` -- integer (default: ``None``); maximal number of subprocesses to use at the same time. If ``None``, it detects the number of effective CPUs in the system using :func:`sage.parallel.ncpus.ncpus()`. If ``ncpus=1``, the first solution is searched serially. - - ``column`` -- integer (default: ``None``), the column used to split + - ``column`` -- integer (default: ``None``); the column used to split the problem (see :meth:`restrict`). If ``None``, a random column is chosen. This argument is ignored if ``ncpus=1``. @@ -679,11 +679,11 @@ cdef class dancing_linksWrapper: INPUT: - - ``ncpus`` -- integer (default: ``None``), maximal number of + - ``ncpus`` -- integer (default: ``None``); maximal number of subprocesses to use at the same time. If ``None``, it detects the number of effective CPUs in the system using :func:`sage.parallel.ncpus.ncpus()`. - - ``column`` -- integer (default: ``None``), the column used to split + - ``column`` -- integer (default: ``None``); the column used to split the problem, if ``None`` a random column is chosen OUTPUT: list of solutions @@ -794,13 +794,13 @@ cdef class dancing_linksWrapper: INPUT: - - ``ncpus`` -- integer (default: ``None``), maximal number of + - ``ncpus`` -- integer (default: ``None``); maximal number of subprocesses to use at the same time. If ``ncpus>1`` the dancing links problem is split into independent subproblems to allow parallel computation. If ``None``, it detects the number of effective CPUs in the system using :func:`sage.parallel.ncpus.ncpus()`. - - ``column`` -- integer (default: ``None``), the column used to split + - ``column`` -- integer (default: ``None``); the column used to split the problem, if ``None`` a random column is chosen (this argument is ignored if ``ncpus`` is ``1``) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index fc9d78bc9b2..f8d239aead8 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -909,10 +909,10 @@ def _construction_goethals_seidel_matrix(A, B, C, D): INPUT: - - ``A`` -- The first matrix used in the construction - - ``B`` -- The second matrix used in the construction - - ``C`` -- The third matrix used in the construction - - ``D`` -- The fourth matrix used in the construction + - ``A`` -- the first matrix used in the construction + - ``B`` -- the second matrix used in the construction + - ``C`` -- the third matrix used in the construction + - ``D`` -- the fourth matrix used in the construction TESTS:: @@ -1293,10 +1293,10 @@ def hadamard_matrix_turyn_type(a, b, c, d, e1, e2, e3, e4, check=True): - ``b`` -- 1,-1 list; the 1st row of `B` - ``d`` -- 1,-1 list; the 1st row of `C` - ``c`` -- 1,-1 list; the 1st row of `D` - - ``e1`` -- Matrix; the first Baumert-Hall unit - - ``e2`` -- Matrix; the second Baumert-Hall unit - - ``e3`` -- Matrix; the third Baumert-Hall unit - - ``e4`` -- Matrix; the fourth Baumert-Hall unit + - ``e1`` -- matrix; the first Baumert-Hall unit + - ``e2`` -- matrix; the second Baumert-Hall unit + - ``e3`` -- matrix; the third Baumert-Hall unit + - ``e4`` -- matrix; the fourth Baumert-Hall unit - ``check`` -- boolean (default: ``True``); whether to check that the output is a Hadamard matrix before returning it @@ -1362,9 +1362,9 @@ def turyn_type_hadamard_matrix_smallcases(n, existence=False, check=True): INPUT: - ``n`` -- integer; the order of the matrix to be constructed - - ``existence`` -- boolean (default: ``False``): if ``True``, only check if + - ``existence`` -- boolean (default: ``False``); if ``True``, only check if the matrix exists - - ``check`` -- boolean (default: ``True``): if ``True``, check that the matrix + - ``check`` -- boolean (default: ``True``); if ``True``, check that the matrix is a Hadamard matrix before returning EXAMPLES:: @@ -1658,7 +1658,7 @@ def hadamard_matrix(n, existence=False, check=True, construction_name=False): - ``True`` -- meaning that Sage knows how to build the matrix - ``Unknown`` -- meaning that Sage does not know how to build the matrix, although the matrix may exist (see :mod:`sage.misc.unknown`). - - ``False`` -- meaning that the matrix does not exist. + - ``False`` -- meaning that the matrix does not exist - ``check`` -- boolean (default: ``True``); whether to check that output is correct before returning it. As this is expected to be useless (but we are cautious @@ -2205,7 +2205,7 @@ def rshcd_from_close_prime_powers(n): INPUT: - - ``n`` -- an integer congruent to `0\pmod{4}` + - ``n`` -- integer congruent to `0\pmod{4}` .. SEEALSO:: @@ -2534,7 +2534,7 @@ def GS_skew_hadamard_smallcases(n, existence=False, check=True): - ``n`` -- integer; the order of the matrix - ``existence`` -- boolean (default: ``True``); if ``True``, only check that we can do the construction - - ``check`` -- boolean (default: ``False``): if ``True``, check the result + - ``check`` -- boolean (default: ``False``); if ``True``, check the result TESTS:: @@ -2801,7 +2801,7 @@ def skew_hadamard_matrix_whiteman_construction(n, existence=False, check=True): INPUT: - ``n`` -- positive integer; the order of the matrix to be constructed - - ``existence`` -- boolean (default: ``False``); If ``True``, only return + - ``existence`` -- boolean (default: ``False``); if ``True``, only return whether the Hadamard matrix can be constructed - ``check`` -- boolean (default: ``True``); if ``True``, check that the result is a skew Hadamard matrix before returning it @@ -2994,7 +2994,7 @@ def skew_hadamard_matrix_from_good_matrices_smallcases(n, existence=False, check - ``n`` -- integer; the order of the skew Hadamard matrix to be constructed - ``existence`` -- boolean (default: ``False``); If ``True``, only return whether the Hadamard matrix can be constructed - - ``check`` -- boolean (default: ``True``): if ``True``, check that the matrix + - ``check`` -- boolean (default: ``True``); if ``True``, check that the matrix is a Hadamard matrix before returning it OUTPUT: @@ -3100,7 +3100,7 @@ def skew_hadamard_matrix(n, existence=False, skew_normalize=True, check=True, - ``True`` -- meaning that Sage knows how to build the matrix - ``Unknown`` -- meaning that Sage does not know how to build the matrix, but that the design may exist (see :mod:`sage.misc.unknown`). - - ``False`` -- meaning that the matrix does not exist. + - ``False`` -- meaning that the matrix does not exist - ``skew_normalize`` -- boolean (default: ``True``); whether to make the 1st row all-one, and adjust the 1st column accordingly @@ -3401,7 +3401,7 @@ def rshcd_from_prime_power_and_conference_matrix(n): INPUT: - - ``n`` -- an integer + - ``n`` -- integer .. SEEALSO:: @@ -3477,7 +3477,7 @@ def are_amicable_hadamard_matrices(M, N, verbose=False): - ``M`` -- a square matrix - ``N`` -- a square matrix - - ``verbose`` -- boolean (default ``False``); whether to be verbose when the + - ``verbose`` -- boolean (default: ``False``); whether to be verbose when the matrices are not amicable Hadamard matrices EXAMPLES:: diff --git a/src/sage/combinat/ncsf_qsym/combinatorics.py b/src/sage/combinat/ncsf_qsym/combinatorics.py index d85efe38719..855e0f78514 100644 --- a/src/sage/combinat/ncsf_qsym/combinatorics.py +++ b/src/sage/combinat/ncsf_qsym/combinatorics.py @@ -185,7 +185,7 @@ def m_to_s_stat(R, I, K): INPUT: - - ``R`` -- A ring, supposed to be a `\QQ`-algebra + - ``R`` -- a ring; supposed to be a `\QQ`-algebra - ``I``, ``K`` -- compositions OUTPUT: @@ -226,9 +226,7 @@ def number_of_fCT(content_comp, shape_comp): - ``content_comp``, ``shape_comp`` -- compositions - OUTPUT: - - - An integer + OUTPUT: integer EXAMPLES:: @@ -274,9 +272,7 @@ def number_of_SSRCT(content_comp, shape_comp): - ``content_comp``, ``shape_comp`` -- compositions - OUTPUT: - - - An integer + OUTPUT: integer EXAMPLES:: diff --git a/src/sage/combinat/ncsf_qsym/generic_basis_code.py b/src/sage/combinat/ncsf_qsym/generic_basis_code.py index 4fe908d727c..0a16bf68ac6 100644 --- a/src/sage/combinat/ncsf_qsym/generic_basis_code.py +++ b/src/sage/combinat/ncsf_qsym/generic_basis_code.py @@ -132,9 +132,7 @@ def one_basis(self): r""" Return the empty composition. - OUTPUT: - - - The empty composition. + OUTPUT: the empty composition EXAMPLES:: @@ -243,7 +241,7 @@ def alternating_sum_of_finer_compositions(self, composition, conjugate=False): INPUT: - ``composition`` -- a composition - - ``conjugate`` -- (default: ``False``) a boolean + - ``conjugate`` -- boolean (default: ``False``) OUTPUT: @@ -633,8 +631,8 @@ def duality_pairing_matrix(self, basis, degree): INPUT: - - ``basis`` -- A basis of the dual Hopf algebra - - ``degree`` -- a non-negative integer + - ``basis`` -- a basis of the dual Hopf algebra + - ``degree`` -- a nonnegative integer OUTPUT: @@ -857,9 +855,7 @@ def duality_pairing(self, y): - ``y`` -- an element of the dual Hopf algebra of ``self`` - OUTPUT: - - - The result of pairing ``self`` with ``y``. + OUTPUT: the result of pairing ``self`` with ``y`` EXAMPLES:: @@ -893,11 +889,9 @@ def skew_by(self, y, side='left'): INPUT: - ``y`` -- an element of the dual Hopf algebra of ``self`` - - ``side`` -- (Default='left') Either 'left' or 'right' + - ``side`` -- (default=``'left'``) Either 'left' or 'right' - OUTPUT: - - - The result of skewing ``self`` by ``y``, on the side ``side`` + OUTPUT: the result of skewing ``self`` by ``y``, on the side ``side`` EXAMPLES: @@ -1008,13 +1002,11 @@ def __init__(self, domain, on_generators, position=0, codomain=None, category=No - ``domain`` -- an algebra with a multiplicative basis - ``on_generators`` -- a function defined on the index set of the generators - ``codomain`` -- the codomain - - ``position`` -- integer; default is 0 - - ``category`` -- a category; defaults to None - - ``anti`` -- a boolean; defaults to False - - OUTPUT: + - ``position`` -- integer (default: 0) + - ``category`` -- a category (default: ``None``) + - ``anti`` -- boolean (default: False) - - module morphism + OUTPUT: module morphism EXAMPLES: @@ -1139,9 +1131,7 @@ def _on_basis(self, c): - ``c`` -- an iterable that spits out generators - OUTPUT: - - - element of the codomain + OUTPUT: element of the codomain EXAMPLES:: @@ -1426,9 +1416,7 @@ def internal_product_by_coercion(self, left, right): - ``left`` -- an element of the non-commutative symmetric functions - ``right`` -- an element of the non-commutative symmetric functions - OUTPUT: - - - The internal product of ``left`` and ``right``. + OUTPUT: the internal product of ``left`` and ``right`` EXAMPLES:: diff --git a/src/sage/combinat/ncsf_qsym/ncsf.py b/src/sage/combinat/ncsf_qsym/ncsf.py index 65b03741885..15d493ec843 100644 --- a/src/sage/combinat/ncsf_qsym/ncsf.py +++ b/src/sage/combinat/ncsf_qsym/ncsf.py @@ -101,9 +101,9 @@ class NonCommutativeSymmetricFunctions(UniqueRepresentation, Parent): The basis itself is accessible through:: sage: Psi.basis() - Lazy family (Term map from Compositions of non-negative integers... + Lazy family (Term map from Compositions of nonnegative integers... sage: Psi.basis().keys() - Compositions of non-negative integers + Compositions of nonnegative integers To construct an element one can therefore do:: @@ -509,9 +509,7 @@ def super_categories(self): Return the super categories of the category of bases of the non-commutative symmetric functions. - OUTPUT: - - - list + OUTPUT: list TESTS:: @@ -1677,9 +1675,7 @@ def to_symmetric_function(self): r""" Return the commutative image of a non-commutative symmetric function. - OUTPUT: - - - The commutative image of ``self``. This will be a symmetric function. + OUTPUT: the commutative image of ``self``; this will be a symmetric function EXAMPLES:: @@ -1959,7 +1955,7 @@ def expand(self, n, alphabet='x'): One can use a different set of variables by adding an optional argument ``alphabet=...``:: - sage: L[3].expand(4, alphabet="y") + sage: L[3].expand(4, alphabet='y') y2*y1*y0 + y3*y1*y0 + y3*y2*y0 + y3*y2*y1 TESTS:: @@ -2025,9 +2021,7 @@ def super_categories(self): Return the super categories of the category of multiplicative bases of the non-commutative symmetric functions. - OUTPUT: - - - list + OUTPUT: list TESTS:: @@ -2046,9 +2040,7 @@ def algebra_generators(self): Return the algebra generators of a given multiplicative basis of non-commutative symmetric functions. - OUTPUT: - - - The family of generators of the multiplicative basis ``self``. + OUTPUT: the family of generators of the multiplicative basis ``self`` EXAMPLES:: @@ -2101,8 +2093,8 @@ def algebra_morphism(self, on_generators, **keywords): - ``on_generators`` -- a function defined on the index set of the generators (that is, on the positive integers) - - ``anti`` -- a boolean; defaults to ``False`` - - ``category`` -- a category; defaults to ``None`` + - ``anti`` -- boolean (default: ``False``) + - ``category`` -- a category (default: ``None``) OUTPUT: @@ -2300,9 +2292,7 @@ def super_categories(self): bases of group-like elements of the non-commutative symmetric functions. - OUTPUT: - - - list + OUTPUT: list TESTS:: @@ -2423,9 +2413,7 @@ def super_categories(self): bases of primitive elements of the non-commutative symmetric functions. - OUTPUT: - - - list + OUTPUT: list TESTS:: @@ -2584,9 +2572,7 @@ def dual(self): Return the dual basis to the ribbon basis of the non-commutative symmetric functions. This is the Fundamental basis of the quasi-symmetric functions. - OUTPUT: - - - The fundamental basis of the quasi-symmetric functions. + OUTPUT: the fundamental basis of the quasi-symmetric functions EXAMPLES:: @@ -2605,9 +2591,7 @@ def product_on_basis(self, I, J): - ``I``, ``J`` -- compositions - OUTPUT: - - - The product of the ribbon functions indexed by ``I`` and ``J``. + OUTPUT: the product of the ribbon functions indexed by ``I`` and ``J`` EXAMPLES:: @@ -2982,9 +2966,7 @@ def dual(self): Return the dual basis to the complete basis of non-commutative symmetric functions. This is the Monomial basis of quasi-symmetric functions. - OUTPUT: - - - The Monomial basis of quasi-symmetric functions. + OUTPUT: the Monomial basis of quasi-symmetric functions EXAMPLES:: @@ -4710,7 +4692,7 @@ def _H(self, alpha): INPUT: - - ``alpha`` -- a list + - ``alpha`` -- list OUTPUT: @@ -4804,9 +4786,7 @@ def dual(self): The basis returned is the dualImmaculate basis of QSym. - OUTPUT: - - - The dualImmaculate basis of the quasi-symmetric functions. + OUTPUT: the dualImmaculate basis of the quasi-symmetric functions EXAMPLES:: @@ -4869,7 +4849,7 @@ def bernstein_creation_operator(self, n): sage: S(elt).bernstein_creation_operator(1) == S(elt.bernstein_creation_operator(1)) True - Check on non-positive values of `n`:: + Check on nonpositive values of `n`:: sage: I[2,2,2].bernstein_creation_operator(-1) I[1, 1, 1, 2] + I[1, 1, 2, 1] + I[1, 2, 1, 1] - I[1, 2, 2] @@ -4998,11 +4978,9 @@ def _to_complete_transition_matrix(self, n): INPUT: - - ``n`` -- an integer - - OUTPUT: + - ``n`` -- integer - - a pair of a square matrix and the ordered list of compositions + OUTPUT: a pair of a square matrix and the ordered list of compositions EXAMPLES:: @@ -5037,9 +5015,7 @@ def _to_complete_on_basis(self, comp): - ``comp`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the complete basis + OUTPUT: a quasi-symmetric function in the complete basis EXAMPLES:: @@ -5094,9 +5070,7 @@ def dual(self): :class:`~sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Quasisymmetric_Schur` basis of QSym. - OUTPUT: - - - the Quasisymmetric-Schur basis of the quasi-symmetric functions + OUTPUT: the Quasisymmetric-Schur basis of the quasi-symmetric functions EXAMPLES:: @@ -5233,9 +5207,7 @@ def _to_complete_on_basis(self, comp): - ``comp`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the complete basis + OUTPUT: a quasi-symmetric function in the complete basis EXAMPLES:: @@ -5283,9 +5255,7 @@ def dual(self): :class:`~sage.combinat.ncsf_qsym.qsym.QuasiSymmetricFunctions.Quasisymmetric_Schur` basis of QSym. - OUTPUT: - - - the Young Quasisymmetric-Schur basis of quasi-symmetric functions + OUTPUT: the Young Quasisymmetric-Schur basis of quasi-symmetric functions EXAMPLES:: diff --git a/src/sage/combinat/ncsf_qsym/qsym.py b/src/sage/combinat/ncsf_qsym/qsym.py index 23a9003b506..3a944c9c5fa 100644 --- a/src/sage/combinat/ncsf_qsym/qsym.py +++ b/src/sage/combinat/ncsf_qsym/qsym.py @@ -623,9 +623,7 @@ def a_realization(self): r""" Return the realization of the Monomial basis of the ring of quasi-symmetric functions. - OUTPUT: - - - The Monomial basis of quasi-symmetric functions. + OUTPUT: the Monomial basis of quasi-symmetric functions EXAMPLES:: @@ -641,9 +639,7 @@ def dual(self): Return the dual Hopf algebra of the quasi-symmetric functions, which is the non-commutative symmetric functions. - OUTPUT: - - - The non-commutative symmetric functions. + OUTPUT: the non-commutative symmetric functions EXAMPLES:: @@ -663,12 +659,10 @@ def from_polynomial(self, f, check=True): - ``f`` -- a polynomial in finitely many variables over the same base ring as ``self``. It is assumed that this polynomial is quasi-symmetric. - - ``check`` -- boolean (default: ``True``), checks whether the - polynomial is indeed quasi-symmetric. - - OUTPUT: + - ``check`` -- boolean (default: ``True``); checks whether the + polynomial is indeed quasi-symmetric - - quasi-symmetric function in the Monomial basis + OUTPUT: quasi-symmetric function in the Monomial basis EXAMPLES:: @@ -729,9 +723,7 @@ def super_categories(self): r""" Return the super categories of bases of the Quasi-symmetric functions. - OUTPUT: - - - a list of categories + OUTPUT: list of categories TESTS:: @@ -760,12 +752,10 @@ def from_polynomial(self, f, check=True): - ``f`` -- a polynomial in finitely many variables over the same base ring as ``self``. It is assumed that this polynomial is quasi-symmetric. - - ``check`` -- boolean (default: ``True``), checks whether the - polynomial is indeed quasi-symmetric. + - ``check`` -- boolean (default: ``True``); checks whether the + polynomial is indeed quasi-symmetric - OUTPUT: - - - quasi-symmetric function + OUTPUT: quasi-symmetric function EXAMPLES:: @@ -876,7 +866,7 @@ def internal_coproduct(self): #. If `I` is a composition, then a `(0, I)`-matrix will mean a matrix whose entries are nonnegative integers such that no row and no column of this matrix is zero, and such that if - all the non-zero entries of the matrix are read (row by row, + all the nonzero entries of the matrix are read (row by row, starting at the topmost row, reading every row from left to right), then the reading word obtained is `I`. If `A` is a `(0, I)`-matrix, then `\mathrm{row}(A)` will denote the @@ -1576,15 +1566,13 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- A nonnegative integer; the number of variables + - ``n`` -- nonnegative integer; the number of variables in the expansion - ``alphabet`` -- (default: ``'x'``); the alphabet in which ``self`` is to be expanded - OUTPUT: - - - An expansion of ``self`` into the ``n`` variables specified - by ``alphabet``. + OUTPUT: an expansion of ``self`` into the ``n`` variables + specified by ``alphabet`` EXAMPLES:: @@ -1723,9 +1711,7 @@ def dual(self): Return the dual basis to the Monomial basis. This is the complete basis of the non-commutative symmetric functions. - OUTPUT: - - - The complete basis of the non-commutative symmetric functions. + OUTPUT: the complete basis of the non-commutative symmetric functions EXAMPLES:: @@ -2011,13 +1997,11 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- an integer - - ``alphabet`` -- (default: ``'x'``) a string + - ``n`` -- integer + - ``alphabet`` -- string (default: ``'x'``) - OUTPUT: - - - The quasi-symmetric function ``self`` expressed in the ``n`` variables - described by ``alphabet``. + OUTPUT: the quasi-symmetric function ``self`` expressed in the + `n` variables described by ``alphabet`` .. TODO:: accept an *alphabet* as input @@ -2237,9 +2221,7 @@ def dual(self): Return the dual basis to the Fundamental basis. This is the ribbon basis of the non-commutative symmetric functions. - OUTPUT: - - - The ribbon basis of the non-commutative symmetric functions. + OUTPUT: the ribbon basis of the non-commutative symmetric functions EXAMPLES:: @@ -2454,7 +2436,7 @@ def internal_coproduct(self): #. If `I` is a composition, then a `(0, I)`-matrix will mean a matrix whose entries are nonnegative integers such that no row and no column of this matrix is zero, and such that if - all the non-zero entries of the matrix are read (row by row, + all the nonzero entries of the matrix are read (row by row, starting at the topmost row, reading every row from left to right), then the reading word obtained is `I`. If `A` is a `(0, I)`-matrix, then `\mathrm{row}(A)` will denote the @@ -2886,11 +2868,9 @@ def _from_monomial_transition_matrix(self, n): INPUT: - - ``n`` -- an integer - - OUTPUT: + - ``n`` -- integer - - a pair of a square matrix and the ordered list of compositions + OUTPUT: a pair of a square matrix and the ordered list of compositions EXAMPLES:: @@ -2924,9 +2904,7 @@ def _from_monomial_on_basis(self, comp): - ``comp`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the Quasisymmetric Schur basis + OUTPUT: a quasi-symmetric function in the Quasisymmetric Schur basis EXAMPLES:: @@ -2960,9 +2938,7 @@ def _to_monomial_on_basis(self, comp_shape): - ``comp_shape`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the Monomial basis + OUTPUT: a quasi-symmetric function in the Monomial basis EXAMPLES:: @@ -3082,9 +3058,7 @@ def _to_monomial_on_basis(self, comp): - ``comp`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the Monomial basis + OUTPUT: a quasi-symmetric function in the Monomial basis EXAMPLES:: @@ -3108,9 +3082,7 @@ def _from_monomial_on_basis(self, comp): - ``comp`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the Young Quasisymmetric Schur basis + OUTPUT: a quasi-symmetric function in the Young Quasisymmetric Schur basis EXAMPLES:: @@ -3163,9 +3135,7 @@ def _to_Monomial_on_basis(self, J): - ``J`` -- a composition - OUTPUT: - - - A quasi-symmetric function in the monomial basis. + OUTPUT: a quasi-symmetric function in the monomial basis EXAMPLES:: @@ -3231,9 +3201,7 @@ def _from_Monomial_on_basis(self, J): - ``J`` -- a composition - OUTPUT: - - - A quasi-symmetric function in the dual immaculate basis. + OUTPUT: a quasi-symmetric function in the dual immaculate basis EXAMPLES:: @@ -3718,9 +3686,7 @@ def _to_Monomial_on_basis(self, J): - ``J`` -- a composition - OUTPUT: - - - A quasi-symmetric function in the Monomial basis. + OUTPUT: a quasi-symmetric function in the Monomial basis EXAMPLES:: @@ -3742,9 +3708,7 @@ def _from_Monomial_on_basis(self, J): - ``J`` -- a composition - OUTPUT: - - - A quasi-symmetric function in the Hazewinkel lambda basis. + OUTPUT: a quasi-symmetric function in the Hazewinkel lambda basis EXAMPLES:: @@ -3907,9 +3871,7 @@ def _from_Monomial_on_basis(self, I): - ``I`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the `\psi` basis + OUTPUT: a quasi-symmetric function in the `\psi` basis TESTS:: @@ -3935,9 +3897,7 @@ def _to_Monomial_on_basis(self, I): - ``I`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the Monomial basis + OUTPUT: a quasi-symmetric function in the Monomial basis TESTS:: @@ -4050,9 +4010,7 @@ def _from_Monomial_on_basis(self, I): - ``I`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the `\psi` basis + OUTPUT: a quasi-symmetric function in the `\psi` basis TESTS:: @@ -4078,9 +4036,7 @@ def _to_Monomial_on_basis(self, I): - ``I`` -- a composition - OUTPUT: - - - a quasi-symmetric function in the Monomial basis + OUTPUT: a quasi-symmetric function in the Monomial basis TESTS:: diff --git a/src/sage/combinat/ncsym/bases.py b/src/sage/combinat/ncsym/bases.py index 466d1ad42e5..c8a33babb3d 100644 --- a/src/sage/combinat/ncsym/bases.py +++ b/src/sage/combinat/ncsym/bases.py @@ -63,9 +63,7 @@ def super_categories(self): Return the super categories of bases of (the Hopf dual of) the symmetric functions in non-commuting variables. - OUTPUT: - - - a list of categories + OUTPUT: list of categories TESTS:: @@ -153,9 +151,7 @@ def one_basis(self): r""" Return the index of the basis element containing `1`. - OUTPUT: - - - The empty set partition + OUTPUT: the empty set partition EXAMPLES:: @@ -177,9 +173,7 @@ def counit_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - either the ``0`` or the ``1`` of the base ring of ``self`` + OUTPUT: either the `0` or the `1` of the base ring of ``self`` EXAMPLES:: @@ -213,9 +207,7 @@ def duality_pairing(self, x, y): - ``y`` -- an element of the dual of symmetric functions in non-commuting variables - OUTPUT: - - - an element of the base ring of ``self`` + OUTPUT: an element of the base ring of ``self`` EXAMPLES:: @@ -244,7 +236,7 @@ def duality_pairing_matrix(self, basis, degree): INPUT: - ``basis`` -- a basis of the dual Hopf algebra - - ``degree`` -- a non-negative integer + - ``degree`` -- a nonnegative integer OUTPUT: @@ -351,9 +343,7 @@ def super_categories(self): Return the super categories of bases of the Hopf dual of the symmetric functions in non-commuting variables. - OUTPUT: - - - a list of categories + OUTPUT: list of categories TESTS:: @@ -395,9 +385,7 @@ def from_symmetric_function(self, f): - ``f`` -- a symmetric function - OUTPUT: - - - an element of ``self`` + OUTPUT: an element of ``self`` EXAMPLES:: @@ -447,9 +435,7 @@ def primitive(self, A, i=1): - ``A`` -- a set partition - ``i`` -- a positive integer - OUTPUT: - - - an element of ``self`` + OUTPUT: an element of ``self`` EXAMPLES:: @@ -471,9 +457,7 @@ def internal_coproduct_on_basis(self, i): - ``i`` -- the indices of an element of the basis of ``self`` - OUTPUT: - - - an element of the tensor squared of ``self`` + OUTPUT: an element of the tensor squared of ``self`` EXAMPLES:: @@ -492,9 +476,7 @@ def internal_coproduct(self): `\otimes` ``self`` by extending it by linearity. Otherwise, this uses :meth:`internal_coproduct_by_coercion()`, if available. - OUTPUT: - - - an element of the tensor squared of ``self`` + OUTPUT: an element of the tensor squared of ``self`` EXAMPLES:: @@ -517,9 +499,7 @@ def internal_coproduct_by_coercion(self, x): - ``x`` -- an element of ``self`` - OUTPUT: - - - an element of the tensor squared of ``self`` + OUTPUT: an element of the tensor squared of ``self`` EXAMPLES:: @@ -587,9 +567,7 @@ def to_symmetric_function(self): multiplicity of `i` in `\mu`. For other bases this map is extended linearly. - OUTPUT: - - - an element of the symmetric functions in the monomial basis + OUTPUT: an element of the symmetric functions in the monomial basis EXAMPLES:: @@ -681,9 +659,7 @@ def internal_coproduct(self): and the map is extended linearly. - OUTPUT: - - - an element of the tensor square of the basis of ``self`` + OUTPUT: an element of the tensor square of the basis of ``self`` EXAMPLES:: @@ -706,9 +682,7 @@ def omega(self): and the result is extended linearly. - OUTPUT: - - - an element in the same basis as ``self`` + OUTPUT: an element in the same basis as ``self`` EXAMPLES:: @@ -753,9 +727,7 @@ def super_categories(self): Return the super categories of bases of the Hopf dual of the symmetric functions in non-commuting variables. - OUTPUT: - - - a list of categories + OUTPUT: list of categories TESTS:: @@ -795,9 +767,7 @@ def product_on_basis(self, A, B): - ``A``, ``B`` -- set partitions - OUTPUT: - - - an element in the basis ``self`` + OUTPUT: an element in the basis ``self`` EXAMPLES:: @@ -858,9 +828,7 @@ def super_categories(self): Return the super categories of bases of the Hopf dual of the symmetric functions in non-commuting variables. - OUTPUT: - - - a list of categories + OUTPUT: list of categories TESTS:: diff --git a/src/sage/combinat/ncsym/dual.py b/src/sage/combinat/ncsym/dual.py index 38ae7135882..9553740cbe9 100644 --- a/src/sage/combinat/ncsym/dual.py +++ b/src/sage/combinat/ncsym/dual.py @@ -166,9 +166,8 @@ def dual_basis(self): The dual basis to the `\mathbf{w}` basis is the monomial basis of the symmetric functions in non-commuting variables. - OUTPUT: - - - the monomial basis of the symmetric functions in non-commuting variables + OUTPUT: the monomial basis of the symmetric functions in + non-commuting variables EXAMPLES:: @@ -200,9 +199,7 @@ def product_on_basis(self, A, B): - ``A``, ``B`` -- set partitions - OUTPUT: - - - an element of the `\mathbf{w}` basis + OUTPUT: an element of the `\mathbf{w}` basis EXAMPLES:: @@ -289,9 +286,7 @@ def antipode_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element in the basis ``self`` + OUTPUT: an element in the basis ``self`` EXAMPLES:: @@ -322,9 +317,7 @@ def duality_pairing(self, x, y): - ``y`` -- an element of the symmetric functions in non-commuting variables - OUTPUT: - - - an element of the base ring of ``self`` + OUTPUT: an element of the base ring of ``self`` EXAMPLES:: @@ -361,11 +354,9 @@ def sum_of_partitions(self, la): INPUT: - - ``la`` -- an integer partition - - OUTPUT: + - ``la`` -- integer partition - - an element of ``self`` + OUTPUT: an element of ``self`` EXAMPLES:: @@ -444,8 +435,8 @@ def expand(self, n, letter='x'): INPUT: - - ``n`` -- an integer - - ``letter`` -- (default: ``'x'``) a string + - ``n`` -- integer + - ``letter`` -- string (default: ``'x'``) OUTPUT: diff --git a/src/sage/combinat/ncsym/ncsym.py b/src/sage/combinat/ncsym/ncsym.py index 8ebc0b899bd..30616c1b6fb 100644 --- a/src/sage/combinat/ncsym/ncsym.py +++ b/src/sage/combinat/ncsym/ncsym.py @@ -322,9 +322,7 @@ def a_realization(self): r""" Return the realization of the powersum basis of ``self``. - OUTPUT: - - - The powersum basis of symmetric functions in non-commuting variables. + OUTPUT: the powersum basis of symmetric functions in non-commuting variables EXAMPLES:: @@ -388,9 +386,7 @@ def _m_to_p_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the powersum basis + OUTPUT: an element of the powersum basis TESTS:: @@ -422,9 +418,7 @@ def _m_to_cp_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{cp}` basis + OUTPUT: an element of the `\mathbf{cp}` basis TESTS:: @@ -457,9 +451,7 @@ def from_symmetric_function(self, f): - ``f`` -- an element of the symmetric functions - OUTPUT: - - - An element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis EXAMPLES:: @@ -500,9 +492,7 @@ def dual_basis(self): r""" Return the dual basis to the monomial basis. - OUTPUT: - - - the `\mathbf{w}` basis of the dual Hopf algebra + OUTPUT: the `\mathbf{w}` basis of the dual Hopf algebra EXAMPLES:: @@ -524,9 +514,7 @@ def duality_pairing(self, x, y): - ``y`` -- an element of the dual of symmetric functions in non-commuting variables - OUTPUT: - - - an element of the base ring of ``self`` + OUTPUT: an element of the base ring of ``self`` EXAMPLES:: @@ -564,9 +552,7 @@ def product_on_basis(self, A, B): - ``A``, ``B`` -- set partitions - OUTPUT: - - - an element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis EXAMPLES:: @@ -697,9 +683,7 @@ def internal_coproduct_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the tensor square of the `\mathbf{m}` basis + OUTPUT: an element of the tensor square of the `\mathbf{m}` basis EXAMPLES:: @@ -746,11 +730,9 @@ def sum_of_partitions(self, la): INPUT: - - ``la`` -- an integer partition - - OUTPUT: + - ``la`` -- integer partition - - an element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis EXAMPLES:: @@ -789,8 +771,8 @@ def expand(self, n, alphabet='x'): INPUT: - - ``n`` -- an integer - - ``alphabet`` -- (default: ``'x'``) a string + - ``n`` -- integer + - ``alphabet`` -- string (default: ``'x'``) OUTPUT: @@ -845,9 +827,7 @@ def to_symmetric_function(self): taking the sizes of the parts and `n_i(\mu)` is the multiplicity of `i` in `\mu`. - OUTPUT: - - - an element of the symmetric functions in the monomial basis + OUTPUT: an element of the symmetric functions in the monomial basis EXAMPLES:: @@ -894,15 +874,15 @@ def __init__(self, NCSym): # get the coercion path m -> p -> e p = NCSym.p() self.module_morphism(self._e_to_p_on_basis, codomain=p, - triangular="upper").register_as_coercion() + triangular='upper').register_as_coercion() p.module_morphism(p._p_to_e_on_basis, codomain=self, - triangular="upper").register_as_coercion() + triangular='upper').register_as_coercion() # homogeneous h = NCSym.h() self.module_morphism(self._e_to_h_on_basis, codomain=h, - triangular="upper").register_as_coercion() + triangular='upper').register_as_coercion() h.module_morphism(h._h_to_e_on_basis, codomain=self, - triangular="upper").register_as_coercion() + triangular='upper').register_as_coercion() @cached_method def _e_to_m_on_basis(self, A): @@ -913,9 +893,7 @@ def _e_to_m_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis TESTS:: @@ -942,9 +920,7 @@ def _e_to_h_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{h}` basis + OUTPUT: an element of the `\mathbf{h}` basis TESTS:: @@ -970,9 +946,7 @@ def _e_to_p_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{p}` basis + OUTPUT: an element of the `\mathbf{p}` basis TESTS:: @@ -1000,9 +974,7 @@ def omega(self): The involution `\omega` on `NCSym` is defined by `\omega(\mathbf{e}_A) = \mathbf{h}_A`. - OUTPUT: - - - an element in the basis ``self`` + OUTPUT: an element in the basis ``self`` EXAMPLES:: @@ -1038,9 +1010,7 @@ def to_symmetric_function(self): where `\lambda(A)` is the partition associated with `A` by taking the sizes of the parts. - OUTPUT: - - - An element of the symmetric functions in the elementary basis + OUTPUT: an element of the symmetric functions in the elementary basis EXAMPLES:: @@ -1098,9 +1068,7 @@ def _h_to_m_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis TESTS:: @@ -1126,9 +1094,7 @@ def _h_to_e_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{e}` basis + OUTPUT: an element of the `\mathbf{e}` basis TESTS:: @@ -1155,9 +1121,7 @@ def _h_to_p_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{p}` basis + OUTPUT: an element of the `\mathbf{p}` basis TESTS:: @@ -1185,9 +1149,7 @@ def omega(self): The involution `\omega` on `NCSym` is defined by `\omega(\mathbf{h}_A) = \mathbf{e}_A`. - OUTPUT: - - - an element in the basis ``self`` + OUTPUT: an element in the basis ``self`` EXAMPLES:: @@ -1223,9 +1185,7 @@ def to_symmetric_function(self): where `\lambda(A)` is the partition associated with `A` by taking the sizes of the parts. - OUTPUT: - - - An element of the symmetric functions in the complete basis + OUTPUT: an element of the symmetric functions in the complete basis EXAMPLES:: @@ -1283,14 +1243,14 @@ def __init__(self, NCSym): # Register coercions m = NCSym.m() self.module_morphism(self._p_to_m_on_basis, codomain=m, - unitriangular="lower").register_as_coercion() + unitriangular='lower').register_as_coercion() m.module_morphism(m._m_to_p_on_basis, codomain=self, - unitriangular="lower").register_as_coercion() + unitriangular='lower').register_as_coercion() x = NCSym.x() self.module_morphism(self._p_to_x_on_basis, codomain=x, - unitriangular="upper").register_as_coercion() + unitriangular='upper').register_as_coercion() x.module_morphism(x._x_to_p_on_basis, codomain=self, - unitriangular="upper").register_as_coercion() + unitriangular='upper').register_as_coercion() @cached_method def _p_to_m_on_basis(self, A): @@ -1301,9 +1261,7 @@ def _p_to_m_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis TESTS:: @@ -1326,9 +1284,7 @@ def _p_to_e_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{e}` basis + OUTPUT: an element of the `\mathbf{e}` basis TESTS:: @@ -1354,9 +1310,7 @@ def _p_to_h_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{h}` basis + OUTPUT: an element of the `\mathbf{h}` basis TESTS:: @@ -1382,9 +1336,7 @@ def _p_to_x_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - An element of the `\mathbf{x}` basis + OUTPUT: an element of the `\mathbf{x}` basis TESTS:: @@ -1471,9 +1423,7 @@ def internal_coproduct_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the tensor square of ``self`` + OUTPUT: an element of the tensor square of ``self`` EXAMPLES:: @@ -1509,9 +1459,7 @@ def antipode_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element in the basis ``self`` + OUTPUT: an element in the basis ``self`` EXAMPLES:: @@ -1575,9 +1523,7 @@ def primitive(self, A, i=1): - ``i`` -- (default: 1) index in the base set for ``A`` specifying which set of primitives this belongs to - OUTPUT: - - - an element in the basis ``self`` + OUTPUT: an element in the basis ``self`` EXAMPLES:: @@ -1621,9 +1567,7 @@ def to_symmetric_function(self): where `\lambda(A)` is the partition associated with `A` by taking the sizes of the parts. - OUTPUT: - - - an element of symmetric functions in the power sum basis + OUTPUT: an element of symmetric functions in the power sum basis EXAMPLES:: @@ -1696,9 +1640,9 @@ def __init__(self, NCSym): # Register coercions m = NCSym.m() self.module_morphism(self._cp_to_m_on_basis, codomain=m, - unitriangular="lower").register_as_coercion() + unitriangular='lower').register_as_coercion() m.module_morphism(m._m_to_cp_on_basis, codomain=self, - unitriangular="lower").register_as_coercion() + unitriangular='lower').register_as_coercion() @cached_method def _cp_to_m_on_basis(self, A): @@ -1709,9 +1653,7 @@ def _cp_to_m_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis TESTS:: @@ -1778,9 +1720,7 @@ def _x_to_p_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the `\mathbf{p}` basis + OUTPUT: an element of the `\mathbf{p}` basis TESTS:: @@ -1906,9 +1846,7 @@ def _rho_to_m_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis TESTS:: @@ -1935,9 +1873,7 @@ def _m_to_rho_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the `\rho` basis + OUTPUT: an element of the `\rho` basis TESTS:: @@ -2052,9 +1988,7 @@ def _chi_to_m_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the `\mathbf{m}` basis + OUTPUT: an element of the `\mathbf{m}` basis TESTS:: @@ -2119,9 +2053,7 @@ def _m_to_chi_on_basis(self, A): - ``A`` -- a set partition - OUTPUT: - - - an element of the `\chi` basis + OUTPUT: an element of the `\chi` basis TESTS::