From d41de4501a37e2576397872ad9d5f1ab7f9ca334 Mon Sep 17 00:00:00 2001 From: gmou3 Date: Thu, 13 Jun 2024 14:03:18 +0300 Subject: [PATCH] Docstring edits Remove excessive blank lines around INPUT, OUTPUT, EXAMPLES, and before docstring ending """. (#2) --- src/sage/categories/fields.py | 3 - src/sage/categories/finite_coxeter_groups.py | 2 - .../finite_dimensional_modules_with_basis.py | 1 - src/sage/categories/finite_lattice_posets.py | 1 - .../categories/finite_permutation_groups.py | 1 - src/sage/categories/finite_posets.py | 4 -- .../finitely_generated_semigroups.py | 2 - src/sage/categories/functor.pyx | 12 ---- .../graded_hopf_algebras_with_basis.py | 1 - src/sage/categories/groupoid.py | 1 - src/sage/categories/groups.py | 1 - src/sage/categories/homsets.py | 1 - .../categories/hopf_algebras_with_basis.py | 1 - src/sage/categories/integral_domains.py | 1 - .../categories/lambda_bracket_algebras.py | 1 - src/sage/categories/lattice_posets.py | 1 - src/sage/categories/magmas.py | 2 - src/sage/categories/magmatic_algebras.py | 2 - src/sage/categories/map.pyx | 2 - src/sage/categories/modules.py | 3 - src/sage/categories/modules_with_basis.py | 4 -- src/sage/categories/morphism.pyx | 4 -- src/sage/categories/poor_man_map.py | 7 --- src/sage/categories/posets.py | 3 - src/sage/categories/pushout.py | 56 ------------------- src/sage/categories/rings.py | 1 - src/sage/categories/schemes.py | 1 - src/sage/categories/semigroups.py | 2 - src/sage/categories/sets_cat.py | 8 --- src/sage/categories/simplicial_sets.py | 4 -- src/sage/categories/tensor.py | 2 - .../triangular_kac_moody_algebras.py | 1 - .../unique_factorization_domains.py | 4 -- src/sage/categories/vector_bundles.py | 6 -- src/sage/categories/vector_spaces.py | 4 -- src/sage/coding/abstract_code.py | 1 - src/sage/coding/binary_code.pyx | 40 ------------- src/sage/coding/channel.py | 2 - src/sage/coding/grs_code.py | 2 - src/sage/coding/hamming_code.py | 1 - src/sage/coding/linear_code.py | 4 -- src/sage/coding/linear_code_no_metric.py | 2 - src/sage/coding/punctured_code.py | 1 - src/sage/coding/reed_muller_code.py | 1 - src/sage/coding/subfield_subcode.py | 1 - .../cluster_algebra_quiver/cluster_seed.py | 6 -- src/sage/combinat/crystals/alcove_path.py | 2 - .../crystals/highest_weight_crystals.py | 1 - .../combinat/crystals/kirillov_reshetikhin.py | 2 - src/sage/combinat/crystals/tensor_product.py | 2 - .../crystals/tensor_product_element.pyx | 1 - .../combinat/designs/MOLS_handbook_data.py | 1 - src/sage/combinat/designs/bibd.py | 5 -- src/sage/combinat/designs/block_design.py | 1 - src/sage/combinat/designs/covering_design.py | 2 - src/sage/combinat/designs/database.py | 2 - src/sage/combinat/designs/designs_pyx.pyx | 1 - .../combinat/designs/difference_family.py | 1 - .../designs/gen_quadrangles_with_spread.pyx | 2 - .../combinat/designs/incidence_structures.py | 3 - .../combinat/designs/orthogonal_arrays.py | 4 -- .../orthogonal_arrays_build_recursive.py | 2 - .../designs/steiner_quadruple_systems.py | 5 -- src/sage/combinat/designs/twographs.py | 1 - src/sage/combinat/integer_lists/base.pyx | 1 - src/sage/combinat/matrices/dancing_links.pyx | 5 -- src/sage/combinat/matrices/hadamard_matrix.py | 1 - .../combinat/ncsf_qsym/generic_basis_code.py | 4 -- src/sage/combinat/ncsf_qsym/ncsf.py | 6 -- .../combinat/path_tableaux/path_tableau.py | 1 - src/sage/combinat/posets/elements.py | 1 - src/sage/combinat/posets/lattices.py | 2 - .../posets/linear_extension_iterator.pyx | 4 -- src/sage/combinat/posets/linear_extensions.py | 2 - src/sage/combinat/posets/poset_examples.py | 1 - .../combinat/root_system/ambient_space.py | 6 -- .../combinat/root_system/branching_rules.py | 2 - .../combinat/root_system/cartan_matrix.py | 1 - src/sage/combinat/root_system/cartan_type.py | 5 -- .../combinat/root_system/dynkin_diagram.py | 1 - .../combinat/root_system/fundamental_group.py | 2 - .../root_system/integrable_representations.py | 1 - .../non_symmetric_macdonald_polynomials.py | 4 -- .../combinat/root_system/pieri_factors.py | 2 - src/sage/combinat/root_system/plot.py | 2 - .../root_lattice_realization_algebras.py | 1 - .../root_system/root_lattice_realizations.py | 22 -------- src/sage/combinat/root_system/root_space.py | 6 -- src/sage/combinat/root_system/type_A.py | 2 - .../combinat/root_system/type_A_infinity.py | 1 - src/sage/combinat/root_system/type_B.py | 2 - .../combinat/root_system/type_BC_affine.py | 1 - .../combinat/root_system/type_B_affine.py | 1 - .../combinat/root_system/type_C_affine.py | 1 - .../combinat/root_system/type_D_affine.py | 1 - src/sage/combinat/root_system/type_E.py | 2 - .../combinat/root_system/type_E_affine.py | 1 - src/sage/combinat/root_system/type_F.py | 1 - .../combinat/root_system/type_F_affine.py | 1 - .../combinat/root_system/type_reducible.py | 2 - src/sage/combinat/root_system/type_relabel.py | 2 - .../weight_lattice_realizations.py | 2 - src/sage/combinat/root_system/weight_space.py | 3 - .../combinat/root_system/weyl_characters.py | 1 - src/sage/combinat/root_system/weyl_group.py | 1 - 105 files changed, 357 deletions(-) diff --git a/src/sage/categories/fields.py b/src/sage/categories/fields.py index 916c69a54c4..1084d0ebb12 100644 --- a/src/sage/categories/fields.py +++ b/src/sage/categories/fields.py @@ -119,7 +119,6 @@ def __contains__(self, x): sage: _ = gc.collect() sage: len([X for X in gc.get_objects() if isinstance(X, sage.rings.finite_rings.integer_mod_ring.IntegerModRing_generic)]) - n 0 - """ from sage.rings.ring import _is_Field try: @@ -154,7 +153,6 @@ def _contains_helper(cls): True sage: F._contains_helper(Q) True - """ return Category_contains_method_by_parent_class(cls()) @@ -407,7 +405,6 @@ def is_perfect(self): True sage: FunctionField(GF(2), 'x').is_perfect() False - """ if self.characteristic() == 0: return True diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py index 3cc9b1c0061..bff3bc08c2a 100644 --- a/src/sage/categories/finite_coxeter_groups.py +++ b/src/sage/categories/finite_coxeter_groups.py @@ -511,7 +511,6 @@ def inversion_sequence(self, word): sage: [t.reduced_word() for t in CoxeterGroup(["A",3]).inversion_sequence([2,1,3,2,1,3])] [[2], [1, 2, 1], [2, 3, 2], [1, 2, 3, 2, 1], [3], [1]] - """ return [self.from_reduced_word(word[:i+1]+list(reversed(word[:i]))) for i in range(len(word))] @@ -741,7 +740,6 @@ def permutahedron(self, point=None, base_ring=None): W = CoxeterGroup(['I',7]) p = W.permutahedron() sphinx_plot(p) - """ n = self.one().canonical_matrix().rank() weights = self.fundamental_weights() diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 0f255571862..03a00dde6bf 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -1059,6 +1059,5 @@ def extra_super_categories(self): sage: C.FiniteDimensional() Category of tensor products of finite dimensional modules with basis over Integer Ring - """ return [self.base_category()] diff --git a/src/sage/categories/finite_lattice_posets.py b/src/sage/categories/finite_lattice_posets.py index cb0e41a2ba8..3ad8c3e81fa 100644 --- a/src/sage/categories/finite_lattice_posets.py +++ b/src/sage/categories/finite_lattice_posets.py @@ -36,7 +36,6 @@ class FiniteLatticePosets(CategoryWithAxiom): sage: C is FiniteLatticePosets().Finite() True sage: TestSuite(C).run() - """ class ParentMethods: diff --git a/src/sage/categories/finite_permutation_groups.py b/src/sage/categories/finite_permutation_groups.py index 547793df6db..002e1a09180 100644 --- a/src/sage/categories/finite_permutation_groups.py +++ b/src/sage/categories/finite_permutation_groups.py @@ -322,7 +322,6 @@ def profile(self, n, using_polya=True): sage: D8 = DihedralGroup(8) sage: D8.profile(4, using_polya=False) 8 - """ if using_polya: diff --git a/src/sage/categories/finite_posets.py b/src/sage/categories/finite_posets.py index e73ddb33aac..719fa9833d3 100644 --- a/src/sage/categories/finite_posets.py +++ b/src/sage/categories/finite_posets.py @@ -44,7 +44,6 @@ class FinitePosets(CategoryWithAxiom): sage: C is Posets().Finite() True sage: TestSuite(C).run() - """ class ParentMethods: @@ -265,7 +264,6 @@ def is_poset_morphism(self, f, codomain): Finite poset containing 0 elements sage: P.is_poset_morphism(f, P) True - """ for x in self: for y in self.upper_covers(x): @@ -1475,7 +1473,6 @@ def rowmotion_orbits_plots(self): sage: P = Poset({}) sage: P.rowmotion_orbits_plots() Graphics Array of size 1 x 1 - """ from sage.plot.plot import graphics_array plot_of_orb_plots = [] @@ -1562,7 +1559,6 @@ def toggling_orbits_plots(self, vs): sage: P = Poset({}) sage: P.toggling_orbits_plots([]) Graphics Array of size 1 x 1 - """ from sage.plot.plot import graphics_array plot_of_orb_plots = [] diff --git a/src/sage/categories/finitely_generated_semigroups.py b/src/sage/categories/finitely_generated_semigroups.py index 58c3363ea0d..930450020fd 100644 --- a/src/sage/categories/finitely_generated_semigroups.py +++ b/src/sage/categories/finitely_generated_semigroups.py @@ -58,7 +58,6 @@ def extra_super_categories(self): sage: Semigroups().FinitelyGenerated().extra_super_categories() [Category of enumerated sets] - """ return [EnumeratedSets()] @@ -121,7 +120,6 @@ def succ_generators(self, side='twosided'): ('ca', 'cab', 'ca', 'cad') sage: S.succ_generators("twosided" )(S('ca')) ('ac', 'bca', 'ca', 'dca', 'ca', 'cab', 'ca', 'cad') - """ left = (side == "left" or side == "twosided") right = (side == "right" or side == "twosided") diff --git a/src/sage/categories/functor.pyx b/src/sage/categories/functor.pyx index 777412a0868..393f099208d 100644 --- a/src/sage/categories/functor.pyx +++ b/src/sage/categories/functor.pyx @@ -52,7 +52,6 @@ def _Functor_unpickle(Cl, D, domain, codomain): True sage: F.domain(), loads(dumps(F)).domain() (Category of rings, Category of rings) - """ F = Functor.__new__(Cl) Functor.__init__(F, domain, codomain) @@ -163,7 +162,6 @@ cdef class Functor(SageObject): sage: F(f)(p) (-a^2 - 2*a*b - b^2 + a + b)*t^2 + (a^2 + 2*a*b + b^2 - a - b)*t - 4*a^2 - 8*a*b - 4*b^2 - a - b + 1 - """ def __init__(self, domain, codomain): """ @@ -177,7 +175,6 @@ cdef class Functor(SageObject): Rational Field sage: F(GF(2)) Finite Field of size 2 - """ if not isinstance(domain, category.Category): raise TypeError("domain (=%s) must be a category" % domain) @@ -234,7 +231,6 @@ cdef class Functor(SageObject): sage: F = Functor(FiniteFields(), Fields()) sage: F._apply_functor(ZZ) Rational Field - """ return self.__codomain(x) @@ -383,7 +379,6 @@ cdef class Functor(SageObject): TypeError: Functor from Category of rings to Category of rings is ill-defined, since it sends x (=Rational Field) to something that is not in Category of rings. - """ from sage.categories.morphism import Morphism if isinstance(x, Morphism): @@ -402,7 +397,6 @@ cdef class Functor(SageObject): sage: F = ForgetfulFunctor(FiniteFields(), Fields()) sage: F.domain() Category of finite enumerated fields - """ return self.__domain @@ -415,7 +409,6 @@ cdef class Functor(SageObject): sage: F = ForgetfulFunctor(FiniteFields(), Fields()) sage: F.codomain() Category of fields - """ return self.__codomain @@ -444,7 +437,6 @@ def is_Functor(x): The forgetful functor from Category of fields to Category of rings sage: is_Functor(F2) True - """ return isinstance(x, Functor) @@ -472,7 +464,6 @@ class ForgetfulFunctor_generic(Functor): to Category of fields sage: F(GF(3)) Finite Field of size 3 - """ def __reduce__(self): """ @@ -492,7 +483,6 @@ class ForgetfulFunctor_generic(Functor): sage: F # indirect doctest The forgetful functor from Category of finite enumerated fields to Category of fields - """ return "The forgetful functor from %s to %s" % (self.domain(), self.codomain()) @@ -586,7 +576,6 @@ class IdentityFunctor_generic(ForgetfulFunctor_generic): True sage: F The identity functor on Category of groups - """ ForgetfulFunctor_generic.__init__(self, C, C) @@ -627,7 +616,6 @@ class IdentityFunctor_generic(ForgetfulFunctor_generic): sage: F._apply_functor(ZZ) Integer Ring - """ return x diff --git a/src/sage/categories/graded_hopf_algebras_with_basis.py b/src/sage/categories/graded_hopf_algebras_with_basis.py index d81929aac9b..2687cbd03be 100644 --- a/src/sage/categories/graded_hopf_algebras_with_basis.py +++ b/src/sage/categories/graded_hopf_algebras_with_basis.py @@ -72,7 +72,6 @@ def super_categories(self): TESTS:: sage: TestSuite(GradedHopfAlgebrasWithBasis(QQ).WithRealizations()).run() - """ from sage.categories.graded_hopf_algebras import GradedHopfAlgebras R = self.base_category().base_ring() diff --git a/src/sage/categories/groupoid.py b/src/sage/categories/groupoid.py index 9cd9c742385..b197c092be5 100644 --- a/src/sage/categories/groupoid.py +++ b/src/sage/categories/groupoid.py @@ -67,7 +67,6 @@ def _make_named_class_key(self, name): sage: Groupoid(DihedralGroup(3)).parent_class is Groupoid(ZZ).parent_class True - """ return None diff --git a/src/sage/categories/groups.py b/src/sage/categories/groups.py index 17375adb47c..aee9e8f8748 100644 --- a/src/sage/categories/groups.py +++ b/src/sage/categories/groups.py @@ -430,7 +430,6 @@ class provides even greater flexibility, including changing AUTHOR: - Rob Beezer (2010-03-15) - """ from sage.matrix.operation_table import OperationTable import operator diff --git a/src/sage/categories/homsets.py b/src/sage/categories/homsets.py index 01d7c65609d..d2a9d0b1250 100644 --- a/src/sage/categories/homsets.py +++ b/src/sage/categories/homsets.py @@ -148,7 +148,6 @@ def base(self): sage: ModulesWithBasis(ZZ).Homsets().base() Integer Ring - """ from sage.categories.category_types import Category_over_base for C in self._all_super_categories_proper: diff --git a/src/sage/categories/hopf_algebras_with_basis.py b/src/sage/categories/hopf_algebras_with_basis.py index 9edcdab00f1..42e44ddc35c 100644 --- a/src/sage/categories/hopf_algebras_with_basis.py +++ b/src/sage/categories/hopf_algebras_with_basis.py @@ -256,7 +256,6 @@ def _test_antipode(self, **options): sage: s = SymmetricFunctions(QQ).schur() # needs sage.combinat sage.modules sage: s._test_antipode() # needs lrcalc_python sage.combinat sage.modules - """ tester = self._tester(**options) diff --git a/src/sage/categories/integral_domains.py b/src/sage/categories/integral_domains.py index fa6e77eecd1..173a14cf25f 100644 --- a/src/sage/categories/integral_domains.py +++ b/src/sage/categories/integral_domains.py @@ -130,7 +130,6 @@ def _test_fraction_field(self, **options): EXAMPLES:: sage: ZZ._test_fraction_field() - """ tester = self._tester(**options) try: diff --git a/src/sage/categories/lambda_bracket_algebras.py b/src/sage/categories/lambda_bracket_algebras.py index 440704e5c4b..b291086e25e 100644 --- a/src/sage/categories/lambda_bracket_algebras.py +++ b/src/sage/categories/lambda_bracket_algebras.py @@ -34,7 +34,6 @@ class LambdaBracketAlgebras(Category_over_base_ring): This is an abstract base category for Lie conformal algebras and super Lie conformal algebras. - """ @staticmethod def __classcall_private__(cls, R, check=True): diff --git a/src/sage/categories/lattice_posets.py b/src/sage/categories/lattice_posets.py index 105a7ef99c2..2d752d97373 100644 --- a/src/sage/categories/lattice_posets.py +++ b/src/sage/categories/lattice_posets.py @@ -38,7 +38,6 @@ class LatticePosets(Category): sage: C = LatticePosets() sage: TestSuite(C).run() - """ @cached_method def super_categories(self): diff --git a/src/sage/categories/magmas.py b/src/sage/categories/magmas.py index 15e7c277e96..28917c9b9d0 100644 --- a/src/sage/categories/magmas.py +++ b/src/sage/categories/magmas.py @@ -1029,7 +1029,6 @@ def is_idempotent(self): 'x' sage: x.is_idempotent() True - """ return self * self == self @@ -1178,7 +1177,6 @@ def product_by_coercion(self, left, right): sage: y = Out.an_element() sage: Out.product(x, y) Out[{}] + 4*Out[{1}] + 9*Out[{2}] + Out[{1, 2}] - """ R = self.realization_of().a_realization() return self(R(left) * R(right)) diff --git a/src/sage/categories/magmatic_algebras.py b/src/sage/categories/magmatic_algebras.py index 60da61a4983..0b45887d254 100644 --- a/src/sage/categories/magmatic_algebras.py +++ b/src/sage/categories/magmatic_algebras.py @@ -65,7 +65,6 @@ def super_categories(self): sage: from sage.categories.additive_semigroups import AdditiveSemigroups sage: MA.is_subcategory((AdditiveSemigroups() & Magmas()).Distributive()) True - """ R = self.base_ring() # Note: The specifications impose `self` to be a subcategory @@ -219,7 +218,6 @@ def _product_from_product_on_basis_multiply( self, left, right ): sage: a, b, c = A.algebra_generators() # needs sage.combinat sage.modules sage: A._product_from_product_on_basis_multiply(a*b + 2*c, a - b) # needs sage.combinat sage.modules B[word: aba] - B[word: abb] + 2*B[word: ca] - 2*B[word: cb] - """ return self.linear_combination((self.product_on_basis(mon_left, mon_right), coeff_left * coeff_right ) for (mon_left, coeff_left) in left.monomial_coefficients(copy=False).items() diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index 61eb11bc76a..9e8301bc9f1 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -1711,7 +1711,6 @@ cdef class FormalCompositeMap(Map): Traceback (most recent call last): ... IndexError: list index out of range - """ return self.__list[i] @@ -1932,7 +1931,6 @@ cdef class FormalCompositeMap(Map): sage: f = QQ.hom(QQbar) * ZZ.hom(QQ) # needs sage.rings.number_field sage: f.is_injective() # needs sage.rings.number_field True - """ try: # we try the category first diff --git a/src/sage/categories/modules.py b/src/sage/categories/modules.py index 207013132be..51c55e5630e 100644 --- a/src/sage/categories/modules.py +++ b/src/sage/categories/modules.py @@ -558,7 +558,6 @@ def extra_super_categories(self): sage: Modules(QQ).FiniteDimensional().TensorProducts().FiniteDimensional() Category of tensor products of finite dimensional vector spaces over Rational Field - """ return [self.base_category()] @@ -681,7 +680,6 @@ def module_morphism(self, *, function, category=None, codomain, **keywords): 2-dimensional vector space over the Rational Field sage: neg(e[0]) Element -e_0 of the 2-dimensional vector space over the Rational Field - """ # Make sure that we only create a module morphism, even if # domain and codomain have more structure @@ -717,7 +715,6 @@ def quotient(self, submodule, check=True, **kwds): - """ return self.quotient_module(submodule, check=check, **kwds) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 9cf74ebe387..d1894373bbb 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -139,7 +139,6 @@ class ModulesWithBasis(CategoryWithAxiom_over_base_ring): 0 sage: TestSuite(ModulesWithBasis(ZZ)).run() - """ def _call_(self, x): @@ -558,7 +557,6 @@ def module_morphism(self, on_basis=None, matrix=None, function=None, Traceback (most recent call last): ... ValueError: diagonal (=3) should be a function - """ if len([x for x in [matrix, on_basis, function, diagonal] if x is not None]) != 1: raise ValueError("module_morphism() takes exactly one option out of `matrix`, `on_basis`, `function`, `diagonal`") @@ -1407,7 +1405,6 @@ def random_element(self, n=2): sage: F = Foo(QQ, tuple(), category=C) # needs sage.modules sage: F.random_element() == F.zero() # needs sage.modules True - """ indices = self.basis().keys() a = self.zero() @@ -2165,7 +2162,6 @@ def map_coefficients(self, f, new_base_ring=None): 0 sage: B['a'].map_coefficients(lambda c: GF(2)(c), QQ) B['a'] - """ R = self.parent() if isinstance(f, Map): diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx index f44f9b08a31..c084d45eba2 100644 --- a/src/sage/categories/morphism.pyx +++ b/src/sage/categories/morphism.pyx @@ -297,7 +297,6 @@ cdef class Morphism(Map): AssertionError: coercion from Univariate Polynomial Ring in x over Integer Ring to Univariate Polynomial Ring in z over Integer Ring already registered or discovered - """ self._codomain.register_coercion(self) @@ -442,7 +441,6 @@ cdef class Morphism(Map): sage: f = Hom(ZZ,Zmod(1)).an_element() sage: bool(f) # indirect doctest False - """ try: return self._is_nonzero() @@ -628,7 +626,6 @@ cdef class SetMorphism(Morphism): sage: f(2,'hello world',test=1) # indirect doctest foo called with ('hello world',) {'test': 1} 2 - """ try: return self._function(x, *args, **kwds) @@ -704,7 +701,6 @@ cdef class SetMorphism(Morphism): False sage: f._eq_c_impl(1) False - """ return isinstance(other, SetMorphism) and self.parent() == other.parent() and self._function == (other)._function diff --git a/src/sage/categories/poor_man_map.py b/src/sage/categories/poor_man_map.py index d207f171edb..5ae2998327a 100644 --- a/src/sage/categories/poor_man_map.py +++ b/src/sage/categories/poor_man_map.py @@ -56,7 +56,6 @@ class PoorManMap(sage.structure.sage_object.SageObject): sage: h = PoorManMap(sqrt, domain=(1, 4, 9), codomain=(1, 2, 3)) sage: i == g*h True - """ def __init__(self, function, domain=None, codomain=None, name=None): """ @@ -68,7 +67,6 @@ def __init__(self, function, domain=None, codomain=None, name=None): sage: TestSuite(f).run() sage: TestSuite(f*g).run() - """ from collections.abc import Iterable if not isinstance(function, Iterable): @@ -91,7 +89,6 @@ def _repr_(self): A map from (1, 2, 3) sage: PoorManMap(lambda x: x+2, codomain=(3,4,5)) A map to (3, 4, 5) - """ return ((self._name if self._name is not None else "A map") + (" from %s" % (self._domain,) if self._domain is not None else "" ) + @@ -136,7 +133,6 @@ def __eq__(self, other): sage: h4 = PoorManMap(lambda x: x, domain=(1,2,3), codomain=(1,2,6)) sage: f == g, f == h1, f == h2, f == h3, f == h4, f == 1, 1 == f (True, False, False, False, False, False, False) - """ if isinstance(other, PoorManMap): return (self._functions == other._functions @@ -161,7 +157,6 @@ def __ne__(self, other): sage: h4 = PoorManMap(lambda x: x, domain=(1,2,3), codomain=(1,2,6)) sage: f != g, f != h1, f != h2, f != h3, f != h4, f != 1, 1 != f (False, True, True, True, True, True, True) - """ return not (self == other) @@ -176,7 +171,6 @@ def __hash__(self): sage: g = PoorManMap(factorial, domain=(1,2,3), codomain=(1,2,6)) sage: hash(f) == hash(g) True - """ return hash((self._functions, self._domain, self._codomain, self._name)) @@ -256,7 +250,6 @@ def __call__(self, *args): sage: g = PoorManMap(lambda x: -x, domain=(2,3,4), codomain=(-2,-3,-4)) sage: (g*f)(2) -3 - """ for function in reversed(self._functions): args = [function(*args)] diff --git a/src/sage/categories/posets.py b/src/sage/categories/posets.py index d93000c8985..e4149337a35 100644 --- a/src/sage/categories/posets.py +++ b/src/sage/categories/posets.py @@ -88,7 +88,6 @@ class Posets(Category): sage: C = Posets() sage: TestSuite(C).run() - """ @cached_method def super_categories(self): @@ -472,7 +471,6 @@ def is_order_ideal(self, o): True sage: P.is_order_ideal([1, 3, 4]) False - """ return all((u in self and all(x in o for x in self.lower_covers(u))) for u in o) @@ -499,7 +497,6 @@ def is_order_filter(self, o): False sage: P.is_order_filter({3, 6, 12}) True - """ return all((u in self and all(x in o for x in self.upper_covers(u))) for u in o) diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py index c13bf5a275e..300a477ebc9 100644 --- a/src/sage/categories/pushout.py +++ b/src/sage/categories/pushout.py @@ -123,7 +123,6 @@ class ConstructionFunctor(Functor): b |--> a - b sage: F(f)(F(A)(x)*a) (a + b)*x - """ def __mul__(self, other): """ @@ -151,7 +150,6 @@ def __mul__(self, other): True sage: F*I is F True - """ if not isinstance(self, ConstructionFunctor) and not isinstance(other, ConstructionFunctor): raise CoercionException("Non-constructive product") @@ -179,7 +177,6 @@ def pushout(self, other): Poly[t](FractionField(...)) sage: P.pushout(F) Poly[t](FractionField(...)) - """ if self.rank > other.rank: return self * other @@ -253,7 +250,6 @@ def _repr_(self): sage: Q = ZZ.quo(2).construction()[0] sage: Q # indirect doctest QuotientFunctor - """ s = str(type(self)) import re @@ -278,7 +274,6 @@ def merge(self, other): sage: P.merge(F) sage: P.merge(P) Poly[t] - """ if self == other: return self @@ -307,7 +302,6 @@ def commutes(self, other): False sage: F.commutes(F) False - """ return False @@ -331,7 +325,6 @@ def expand(self): sage: FP = F*P sage: FP.expand() [FractionField, Poly[t]] - """ return [self] @@ -459,7 +452,6 @@ def __init__(self, *args): Poly[y](FractionField(Poly[x](FractionField(...)))) sage: F == CompositeConstructionFunctor(*F.all) True - """ self.all = [] for c in args: @@ -491,7 +483,6 @@ def _apply_functor_to_morphism(self, f): Ring endomorphism of Fraction Field of Multivariate Polynomial Ring in a, b over Rational Field Defn: a |--> a + b b |--> a - b - """ for c in self.all: f = c(f) @@ -508,7 +499,6 @@ def _apply_functor(self, R): sage: R. = QQ[] sage: F(R) # indirect doctest Univariate Polynomial Ring in y over Fraction Field of Univariate Polynomial Ring in x over Fraction Field of Multivariate Polynomial Ring in a, b over Rational Field - """ for c in self.all: R = c(R) @@ -559,7 +549,6 @@ def __mul__(self, other): sage: F2 = CompositeConstructionFunctor(QQ.construction()[0],ZZ['y'].construction()[0]) sage: F1*F2 Poly[x](FractionField(Poly[y](FractionField(...)))) - """ if isinstance(self, CompositeConstructionFunctor): all = [other] + self.all @@ -577,7 +566,6 @@ def _repr_(self): sage: F = CompositeConstructionFunctor(QQ.construction()[0],ZZ['x'].construction()[0],QQ.construction()[0],ZZ['y'].construction()[0]) sage: F # indirect doctest Poly[y](FractionField(Poly[x](FractionField(...)))) - """ s = "..." for c in self.all: @@ -604,7 +592,6 @@ def expand(self): Poly[y](FractionField(Poly[x](FractionField(...)))) sage: prod(F.expand()) == F True - """ return list(reversed(self.all)) @@ -621,7 +608,6 @@ class IdentityConstructionFunctor(ConstructionFunctor): True sage: I == loads(dumps(I)) True - """ rank = -100 @@ -635,7 +621,6 @@ def __init__(self): True sage: I(RR) is RR True - """ from sage.categories.sets_cat import Sets ConstructionFunctor.__init__(self, Sets(), Sets()) @@ -724,7 +709,6 @@ def __mul__(self, other): True sage: P*I is P True - """ if isinstance(self, IdentityConstructionFunctor): return other @@ -838,7 +822,6 @@ class PolynomialFunctor(ConstructionFunctor): Univariate Polynomial Ring in x over Finite Field of size 5 sage: (S.0 + R.0).parent().is_sparse() False - """ rank = 9 @@ -859,7 +842,6 @@ def __init__(self, var, multi_variate=False, sparse=False, implementation=None): Univariate Polynomial Ring in x over Integer Ring sage: Q == P True - """ from .rings import Rings Functor.__init__(self, Rings(), Rings()) @@ -877,7 +859,6 @@ def _apply_functor(self, R): sage: P = ZZ['x'].construction()[0] sage: P(GF(3)) # indirect doctest Univariate Polynomial Ring in x over Finite Field of size 3 - """ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing kwds = {} @@ -971,7 +952,6 @@ def merge(self, other): sage: P.merge(Q) sage: P.merge(P) is P True - """ if isinstance(other, MultiPolynomialFunctor): return other.merge(self) @@ -990,7 +970,6 @@ def _repr_(self): sage: P = ZZ['x'].construction()[0] sage: P # indirect doctest Poly[x] - """ return "Poly[%s]" % self.var @@ -1018,7 +997,6 @@ class MultiPolynomialFunctor(ConstructionFunctor): b |--> a - b sage: F(f)(F(A)(x)*a) (a + b)*x - """ rank = 9 @@ -1276,7 +1254,6 @@ class InfinitePolynomialFunctor(ConstructionFunctor): w_2 + z_3 sage: _.parent() is P True - """ # We do provide merging with polynomial rings. However, it seems that it is better @@ -1293,7 +1270,6 @@ def __init__(self, gens, order, implementation): InfPoly{[a,b,x], "degrevlex", "sparse"} sage: F == loads(dumps(F)) True - """ if not gens: raise ValueError("Infinite Polynomial Rings have at least one generator") @@ -1328,7 +1304,6 @@ def _apply_functor(self, R): InfPoly{[a,b,x], "degrevlex", "sparse"} sage: F(QQ['t']) # indirect doctest Infinite polynomial ring in a, b, x over Univariate Polynomial Ring in t over Rational Field - """ from sage.rings.polynomial.infinite_polynomial_ring import ( InfinitePolynomialRing, @@ -1341,7 +1316,6 @@ def _repr_(self): sage: F = sage.categories.pushout.InfinitePolynomialFunctor(['a','b','x'],'degrevlex','sparse'); F # indirect doctest InfPoly{[a,b,x], "degrevlex", "sparse"} - """ return 'InfPoly{[%s], "%s", "%s"}' % (','.join(self._gens), self._order, self._imple) @@ -1403,7 +1377,6 @@ def __mul__(self, other): sage: F4 = sage.categories.pushout.FractionField() sage: F2*F4 InfPoly{[x,y], "degrevlex", "dense"}(FractionField(...)) - """ if isinstance(other, IdentityConstructionFunctor): return self @@ -1508,7 +1481,6 @@ def merge(self, other): x_2 + y_3 sage: _.parent().construction() [InfPoly{[x,y], "degrevlex", "dense"}, Rational Field] - """ # Merging is only done if the ranks of self and other are the same. # It may happen that other is a substructure of self up to the monomial order @@ -1563,7 +1535,6 @@ def expand(self): InfPoly{[x], "degrevlex", "dense"}] sage: prod(F.expand())==F True - """ if len(self._gens) == 1: return [self] @@ -1601,7 +1572,6 @@ class MatrixFunctor(ConstructionFunctor): sage: F(f)(M) [ x + y x - y] [x^2 - y^2 2*x] - """ rank = 10 @@ -1650,7 +1620,6 @@ def _apply_functor(self, R): Full MatrixSpace of 2 by 3 dense matrices over Real Field with 53 bits of precision sage: F(RR) in F.codomain() # needs sage.modules True - """ from sage.matrix.matrix_space import MatrixSpace return MatrixSpace(R, self.nrows, self.ncols, sparse=self.is_sparse) @@ -1709,7 +1678,6 @@ def merge(self, other): True sage: F3.merge(F3).is_sparse True - """ if self != other: return None @@ -1744,7 +1712,6 @@ class LaurentPolynomialFunctor(ConstructionFunctor): y |--> 3*x - y sage: F(f)(x*F(P).gen()^-2 + y*F(P).gen()^3) (x + 2*y)*t^-2 + (3*x - y)*t^3 - """ rank = 9 @@ -1770,7 +1737,6 @@ def __init__(self, var, multi_variate=False): Multivariate Laurent Polynomial Ring in t, s over Rational Field sage: F3(QQ) # needs sage.modules Multivariate Laurent Polynomial Ring in s, t over Rational Field - """ Functor.__init__(self, Rings(), Rings()) if not isinstance(var, (str, tuple, list)): @@ -1795,7 +1761,6 @@ def _apply_functor(self, R): Multivariate Laurent Polynomial Ring in t, s over Rational Field sage: F3(QQ) # needs sage.modules Multivariate Laurent Polynomial Ring in s, t over Rational Field - """ from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing from sage.rings.polynomial.laurent_polynomial_ring_base import ( @@ -1868,7 +1833,6 @@ def merge(self, other): sage: F1.merge(F1)(LaurentPolynomialRing(GF(2), 'a')) # needs sage.modules Univariate Laurent Polynomial Ring in t over Univariate Laurent Polynomial Ring in a over Finite Field of size 2 - """ if self == other or isinstance(other, PolynomialFunctor) and self.var == other.var: return LaurentPolynomialFunctor(self.var, (self.multi_variate or other.multi_variate)) @@ -1927,7 +1891,6 @@ def __init__(self, n=None, is_sparse=False, inner_product_matrix=None, *, sage: M2 = F2(QQ); M2; M2.is_sparse() Sparse vector space of dimension 3 over Rational Field True - """ # Functor.__init__(self, Rings(), FreeModules()) # FreeModules() takes a base ring # Functor.__init__(self, Objects(), Objects()) # Object() makes no sense, since FreeModule raises an error, e.g., on Set(['a',1]). @@ -1977,7 +1940,6 @@ def _apply_functor(self, R): sage: M_QQ = pushout(M, QQ) sage: latex(M_QQ) M \otimes \Bold{Q} - """ from sage.modules.free_module import FreeModule name = self.name_mapping.get(R, None) @@ -2212,7 +2174,6 @@ class SubspaceFunctor(ConstructionFunctor): User basis matrix: [1 0 1] [0 1 0] - """ rank = 11 # ranking of functor, not rank of module @@ -2338,7 +2299,6 @@ def __eq__(self, other): sage: F1 == F4 == F3 # needs sage.modules True - """ if not isinstance(other, SubspaceFunctor): return False @@ -2409,7 +2369,6 @@ def merge(self, other): [1 0 0] [0 1 0] [0 0 1] - """ if isinstance(other, SubspaceFunctor): # in order to remove linear dependencies, and in @@ -2464,7 +2423,6 @@ class FractionField(ConstructionFunctor): 1/(x + 2*y) sage: F == loads(dumps(F)) True - """ rank = 5 @@ -2538,7 +2496,6 @@ class CompletionFunctor(ConstructionFunctor): (1 + O(5^20))*a + 1 + O(5^40) sage: 1/2 + a (1 + O(5^20))*a + 3 + 2*5 + 2*5^2 + 2*5^3 + 2*5^4 + 2*5^5 + 2*5^6 + 2*5^7 + 2*5^8 + 2*5^9 + 2*5^10 + 2*5^11 + 2*5^12 + 2*5^13 + 2*5^14 + 2*5^15 + 2*5^16 + 2*5^17 + 2*5^18 + 2*5^19 + O(5^20) - """ rank = 4 _real_types = ['Interval', 'Ball', 'MPFR', 'RDF', 'RLF', 'RR'] @@ -2628,7 +2585,6 @@ def _apply_functor(self, R): True sage: F1(QQ) 5-adic Field with capped relative precision 20 - """ try: if not self.extras: @@ -2936,7 +2892,6 @@ def __init__(self, I, names=None, as_field=False, domain=None, sage: F = QuotientFunctor([5] * ZZ) sage: F(ZZ) Ring of integers modulo 5 - """ if domain is None: domain = Rings() @@ -3074,7 +3029,6 @@ def merge(self, other): sage: pushout(GF(5), Integers(5)) # needs sage.libs.pari Finite Field of size 5 - """ if type(self) is not type(other): return None @@ -3204,7 +3158,6 @@ class AlgebraicExtensionFunctor(ConstructionFunctor): Residue field of Integers modulo 17 sage: F(CyclotomicField(49)) Residue field in zbar of Fractional ideal (17) - """ rank = 3 @@ -3389,7 +3342,6 @@ def _apply_functor(self, R): sage: AEF = AlgebraicExtensionFunctor([a^2 - 3], ['a'], [None]) sage: AEF(K) 3-adic Eisenstein Extension Field in a defined by a^2 - 3 - """ from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ @@ -3551,7 +3503,6 @@ def merge(self, other): CoercionException: ('Ambiguous Base Extension', Number Field in a with defining polynomial x^3 - 2 with a = -0.6299605249474365? + 1.091123635971722?*I, Number Field in b with defining polynomial x^6 - 2 with b = 1.122462048309373?) - """ if isinstance(other, AlgebraicClosureFunctor): return other @@ -3626,7 +3577,6 @@ def __mul__(self, other): sage: F, R = L.construction() sage: prod(F.expand())(R) == L #indirect doctest True - """ if isinstance(other, IdentityConstructionFunctor): return self @@ -3692,7 +3642,6 @@ class AlgebraicClosureFunctor(ConstructionFunctor): Complex Field with 53 bits of precision sage: F(F(QQ)) is F(QQ) True - """ rank = 3 @@ -3708,7 +3657,6 @@ def __init__(self): Complex Field with 53 bits of precision sage: F == loads(dumps(F)) True - """ Functor.__init__(self, Rings(), Rings()) @@ -3744,7 +3692,6 @@ def merge(self, other): True sage: CDF.construction()[0].merge(CDF.construction()[0]) # needs sage.rings.complex_double AlgebraicClosureFunctor - """ if self == other: return self @@ -4025,7 +3972,6 @@ def _apply_functor(self, R): sage: F = BlackBoxConstructionFunctor(f) sage: F(ZZ) # indirect doctest # needs sage.modules Ambient free module of rank 2 over the principal ideal domain Integer Ring - """ return self.box(R) @@ -4646,7 +4592,6 @@ def pushout_lattice(R, S): AUTHOR: - Robert Bradshaw - """ R_tower = construction_tower(R) S_tower = construction_tower(S) @@ -4817,7 +4762,6 @@ def construction_tower(R): of Univariate Polynomial Ring in t over Rational Field), (FractionField, Univariate Polynomial Ring in t over Rational Field), (Poly[t], Rational Field), (FractionField, Integer Ring)] - """ tower = [(None, R)] c = R.construction() diff --git a/src/sage/categories/rings.py b/src/sage/categories/rings.py index d41bff4c30e..bac8bc04577 100644 --- a/src/sage/categories/rings.py +++ b/src/sage/categories/rings.py @@ -137,7 +137,6 @@ def is_injective(self) -> bool: sage: R = ZpFM(3) # needs sage.rings.padics sage: R.fraction_field().coerce_map_from(R).is_injective() True - """ if self.domain().is_zero(): return True diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index f4aa8e1d13a..b8f117c0da1 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -138,7 +138,6 @@ def _call_(self, x): Defn: Natural morphism: From: Integer Ring To: Rational Field - """ from sage.schemes.generic.scheme import Scheme if isinstance(x, Scheme): diff --git a/src/sage/categories/semigroups.py b/src/sage/categories/semigroups.py index 8858f6f7013..50f5854be18 100644 --- a/src/sage/categories/semigroups.py +++ b/src/sage/categories/semigroups.py @@ -81,7 +81,6 @@ def example(self, choice='leftzero', **kwds): An example of a semigroup: the free semigroup generated by ('a', 'b', 'c', 'd') sage: Semigroups().example(choice='free', alphabet=('a','b')) An example of a semigroup: the free semigroup generated by ('a', 'b') - """ import sage.categories.examples.semigroups as examples if choice == "leftzero": @@ -114,7 +113,6 @@ def _test_associativity(self, **options): sage: L._test_associativity(elements = (L(1), L(2), L(3))) See the documentation for :class:`TestSuite` for more information. - """ tester = self._tester(**options) S = tester.some_elements() diff --git a/src/sage/categories/sets_cat.py b/src/sage/categories/sets_cat.py index 24ae9fe3533..57de46dec86 100644 --- a/src/sage/categories/sets_cat.py +++ b/src/sage/categories/sets_cat.py @@ -71,7 +71,6 @@ def print_compare(x, y): 1 != 2 sage: print_compare(1,1) 1 == 1 - """ if x == y: return LazyFormat("%s == %s") % (x, y) @@ -211,7 +210,6 @@ class Sets(Category_singleton): TESTS:: sage: TestSuite(Sets()).run() - """ def super_categories(self): @@ -572,7 +570,6 @@ def Subobjects(self): sage: Semigroups().Subobjects().is_subcategory(Semigroups().Subquotients()) True sage: TestSuite(C).run() - """ return SubobjectsCategory.category_of(self) @@ -1206,7 +1203,6 @@ def _test_elements_eq_reflexive(self, **options): We restore ``P.element_class`` in a proper state for further tests:: sage: P.element_class.__eq__ = eq - """ tester = self._tester(**options) S = list(tester.some_elements()) + [None, 0] @@ -1245,7 +1241,6 @@ def _test_elements_eq_symmetric(self, **options): We restore ``P.element_class`` in a proper state for further tests:: sage: P.element_class.__eq__ = eq - """ tester = self._tester(**options) S = list(tester.some_elements()) + [None, 0] @@ -1277,7 +1272,6 @@ def _test_elements_eq_transitive(self, **options): ... AssertionError: non transitive equality: 3 + O(3^2) == O(3) and O(3) == 0 but 3 + O(3^2) != 0 - """ tester = self._tester(**options) S = list(tester.some_elements()) @@ -1524,7 +1518,6 @@ def _test_construction(self, **options): sage: F(R) == QQ True sage: TestSuite(QQ).run() # indirect doctest - """ tester = self._tester(**options) FO = self.construction() @@ -2654,7 +2647,6 @@ def extra_super_categories(self): Category of modules with basis over Integer Ring, ... Category of objects] - """ from sage.categories.modules_with_basis import ModulesWithBasis return [ModulesWithBasis(self.base_ring())] diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index 5885ba2ad0b..0512ee15b48 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -421,7 +421,6 @@ def universal_cover_map(self): (f, e): ((1, 1), (1, e)), (f * f, 1): ((f, e), s_0 (1, 1), (f, 1)), (f * f, e): ((f, 1), s_0 (1, e), (f, e))} - """ edges = self.n_cells(1) if not edges: @@ -601,7 +600,6 @@ def _canonical_twisting_operator(self): {f: F1bar} sage: list(d2.values())[0].parent() Quotient of Univariate Laurent Polynomial Ring in F1 over Integer Ring by the ideal (-1 + F1^2) - """ G, d = self._universal_cover_dict() phi = G.abelianization_map() @@ -692,7 +690,6 @@ def twisted_chain_complex(self, twisting_operator=None, dimensions=None, augment [1 + F1] sage: C.differential(3) [] - """ from sage.homology.chain_complex import ChainComplex from sage.structure.element import get_coercion_model @@ -886,7 +883,6 @@ def twisted_homology(self, n, reduced=False): sage: X.universal_cover().homology(2) Z^5 sage: from sage.libs.singular.function import singular_function - """ from sage.libs.singular.function import singular_function from sage.libs.singular.option import opt_verb diff --git a/src/sage/categories/tensor.py b/src/sage/categories/tensor.py index 967a5925f7d..93ae6aa9fda 100644 --- a/src/sage/categories/tensor.py +++ b/src/sage/categories/tensor.py @@ -55,8 +55,6 @@ class TensorProductFunctor(CovariantFunctorialConstruction): tensor = TensorProductFunctor() - - """ The tensor product functorial construction diff --git a/src/sage/categories/triangular_kac_moody_algebras.py b/src/sage/categories/triangular_kac_moody_algebras.py index 7e756c9d55e..7dc53fdedea 100644 --- a/src/sage/categories/triangular_kac_moody_algebras.py +++ b/src/sage/categories/triangular_kac_moody_algebras.py @@ -40,7 +40,6 @@ def super_categories(self): sage: TriangularKacMoodyAlgebras(QQ).super_categories() [Join of Category of graded Lie algebras with basis over Rational Field and Category of kac moody algebras over Rational Field] - """ # We do not also derive from (Magmatic) algebras since we don't want * # to be our Lie bracket diff --git a/src/sage/categories/unique_factorization_domains.py b/src/sage/categories/unique_factorization_domains.py index a4a66111f4b..d373f73cc52 100644 --- a/src/sage/categories/unique_factorization_domains.py +++ b/src/sage/categories/unique_factorization_domains.py @@ -34,7 +34,6 @@ class UniqueFactorizationDomains(Category_singleton): TESTS:: sage: TestSuite(UniqueFactorizationDomains()).run() - """ def super_categories(self): @@ -127,7 +126,6 @@ def is_unique_factorization_domain(self, proof=True): sage: UFD = UniqueFactorizationDomains() sage: Parent(QQ, category=UFD).is_unique_factorization_domain() True - """ return True @@ -169,7 +167,6 @@ def _gcd_univariate_polynomial(self, f, g): sage: g = 4*x + 2 sage: f.gcd(g).parent() is R True - """ if f.degree() < g.degree(): A,B = g, f @@ -294,7 +291,6 @@ def squarefree_part(self): sage: squarefree_part(pol) 37*x^3 - 1369/21*x^2 + 703/21*x - 37/7 - """ decomp = self.squarefree_decomposition() return prod(fac for fac, mult in decomp if mult % 2 == 1) diff --git a/src/sage/categories/vector_bundles.py b/src/sage/categories/vector_bundles.py index bc4ab47039c..4d87464bd18 100644 --- a/src/sage/categories/vector_bundles.py +++ b/src/sage/categories/vector_bundles.py @@ -36,7 +36,6 @@ class VectorBundles(Category_over_base_ring): TESTS:: sage: TestSuite(C).run(skip='_test_category_over_bases') - """ def __init__(self, base_space, base_field, name=None): r""" @@ -48,7 +47,6 @@ def __init__(self, base_space, base_field, name=None): sage: from sage.categories.vector_bundles import VectorBundles sage: C = VectorBundles(M, RR) sage: TestSuite(C).run(skip='_test_category_over_bases') - """ if base_field not in Fields().Topological(): raise ValueError("base field must be a topological field") @@ -64,7 +62,6 @@ def super_categories(self): sage: from sage.categories.vector_bundles import VectorBundles sage: VectorBundles(M, RR).super_categories() [Category of topological spaces] - """ return [Sets().Topological()] @@ -78,7 +75,6 @@ def base_space(self): sage: from sage.categories.vector_bundles import VectorBundles sage: VectorBundles(M, RR).base_space() 2-dimensional topological manifold M - """ return self._base_space @@ -95,7 +91,6 @@ def _repr_object_names(self): sage: VectorBundles(M, RR)._repr_object_names() 'vector bundles over Real Field with 53 bits of precision with base space 2-dimensional differentiable manifold M' - """ base_space = self._base_space return Category_over_base_ring._repr_object_names(self) + \ @@ -122,7 +117,6 @@ def Differentiable(self): sage: TestSuite(VectorBundles(M, RR).Differentiable()).run() sage: VectorBundles(M, RR).Differentiable.__module__ 'sage.categories.vector_bundles' - """ return self._with_axiom('Differentiable') diff --git a/src/sage/categories/vector_spaces.py b/src/sage/categories/vector_spaces.py index fb158e39611..e6db6a7ae22 100644 --- a/src/sage/categories/vector_spaces.py +++ b/src/sage/categories/vector_spaces.py @@ -107,7 +107,6 @@ def _call_(self, x): sage: Q3 = FiniteRankFreeModule(QQ, 3) # needs sage.modules sage: Modules(QQ)(Q3) is Q3 # needs sage.modules True - """ try: V = x.vector_space(self.base_field()) @@ -175,7 +174,6 @@ def dimension(self): 3 sage: M.tensor_module(1, 2).dimension() # needs sage.modules 27 - """ return self.rank() @@ -240,7 +238,6 @@ def extra_super_categories(self): [Category of finite dimensional vector spaces with basis over Rational Field] sage: VectorSpaces(QQ).WithBasis().FiniteDimensional().TensorProducts().FiniteDimensional() Category of tensor products of finite dimensional vector spaces with basis over Rational Field - """ return [self.base_category()] @@ -301,7 +298,6 @@ def extra_super_categories(self): [Category of finite dimensional vector spaces over Rational Field] sage: VectorSpaces(QQ).FiniteDimensional().TensorProducts().FiniteDimensional() Category of tensor products of finite dimensional vector spaces over Rational Field - """ return [self.base_category()] diff --git a/src/sage/coding/abstract_code.py b/src/sage/coding/abstract_code.py index de6b40f2ab4..d460ca8951b 100644 --- a/src/sage/coding/abstract_code.py +++ b/src/sage/coding/abstract_code.py @@ -804,7 +804,6 @@ def decoder(self, decoder_name=None, *args, **kwargs): It accepts unspecified arguments as well. See the documentation of sage.coding.information_set_decoder.LinearCodeInformationSetDecoder for more details. - """ if not self._default_decoder_name: raise NotImplementedError("No decoder implemented for this code.") diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index dfd7d805eee..8d581a9624b 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -119,7 +119,6 @@ def weight_dist(M): ....: [0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1]]) sage: weight_dist(M) [1, 0, 0, 0, 0, 0, 68, 0, 85, 0, 68, 0, 34, 0, 0, 0, 0, 0] - """ cdef bitset_t word cdef int i,j,k, dim=M.nrows(), deg=M.ncols() @@ -193,7 +192,6 @@ def test_word_perms(t_limit=5.0): sage: from sage.coding.binary_code import test_word_perms sage: test_word_perms() # long time (5s on sage.math, 2011) - """ cdef WordPermutation *g cdef WordPermutation *h @@ -557,7 +555,6 @@ def test_expand_to_ortho_basis(B=None): 0000100001 0000010001 0000001001 - """ cdef codeword *output cdef int k=0, i @@ -738,7 +735,6 @@ cdef class BinaryCode: sage: B Binary [32,1] linear code, generator matrix [11111111111111111111111111111111] - """ def __cinit__(self, arg1, arg2=None): """ @@ -848,7 +844,6 @@ cdef class BinaryCode: sage: B = BinaryCode(M) sage: loads(dumps(B)) == B True - """ return BinaryCode, (self.matrix(),) @@ -882,7 +877,6 @@ cdef class BinaryCode: sage: B.matrix() [1 1 1 1 0 0] [0 0 1 1 1 1] - """ cdef int i, j from sage.matrix.constructor import matrix @@ -1016,7 +1010,6 @@ cdef class BinaryCode: [00111100] [00001111] [10101010] - """ cdef int i, j s = 'Binary [%d,%d] linear code, generator matrix\n'%(self.ncols, self.nrows) @@ -1042,7 +1035,6 @@ cdef class BinaryCode: Note that behavior under input which does not represent a word in the code is unspecified (gives nonsense). - """ s = '' for j from 0 <= j < self.ncols: @@ -1073,7 +1065,6 @@ cdef class BinaryCode: 1 sage: B._is_automorphism([1,0,3,2,4,5,6,7], [0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 13, 12, 15, 14]) 1 - """ return self.is_one(word, col) != 0 @@ -1105,7 +1096,6 @@ cdef class BinaryCode: [10101010] sage: B._is_automorphism([1,0,3,2,4,5,6,7], [0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 11, 10, 13, 12, 15, 14]) 1 - """ cdef int i cdef int *_col_gamma @@ -1176,7 +1166,6 @@ cdef class BinaryCode: [001000000000001011011110] [010000000000101110001101] [100000000000010111000111] - """ # Tests for this function implicitly test _apply_permutation_to_basis # and _update_words_from_basis. These functions should not be used @@ -1273,7 +1262,6 @@ cdef class OrbitPartition: cell of the partition, and the size of the partition. See :wikipedia:`Disjoint-set_data_structure` - """ def __cinit__(self, int nrows, int ncols): """ @@ -1347,7 +1335,6 @@ cdef class OrbitPartition: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 Columns: 0,1,2,3,4,5,6,7 - """ cdef int i cdef int j @@ -1386,7 +1373,6 @@ cdef class OrbitPartition: 0,1,2,3,4,5,6,7 sage: O._wd_find(12) 12 - """ return self.wd_find(word) @@ -1421,7 +1407,6 @@ cdef class OrbitPartition: 0,1,2,3,4,5,6,7 sage: O._wd_find(10) 1 - """ self.wd_union(x, y) @@ -1460,7 +1445,6 @@ cdef class OrbitPartition: 0,1,2,3,4,5,6,7 sage: O._col_find(6) 6 - """ return self.col_find(col) @@ -1495,7 +1479,6 @@ cdef class OrbitPartition: 0,1,2,3,1,5,6,7 sage: O._col_find(4) 1 - """ self.col_union(x, y) @@ -1542,7 +1525,6 @@ cdef class OrbitPartition: 0,1,2,3,4,5,6,7,8,8,10,10,12,12,14,14 Columns: 0,0,2,2,4,5,6,7 - """ cdef int i cdef int *_col_gamma @@ -1780,7 +1762,6 @@ cdef class PartitionStack: 0 0 0 - """ cdef int i, j s = '' @@ -1838,7 +1819,6 @@ cdef class PartitionStack: sage: P = PartitionStack(2, 6) sage: P ({0,1,2,3}) ({0,1,2,3,4,5}) - """ cdef int i, j, k s = '' @@ -1862,7 +1842,6 @@ cdef class PartitionStack: ({0,1,2,3}) ({0,1,2,3,4,5}) sage: P._repr_at_k(0) '({0,1,2,3}) ({0,1,2,3,4,5})\n' - """ s = '({' for j from 0 <= j < self.nwords: @@ -1906,7 +1885,6 @@ cdef class PartitionStack: 0 sage: P._is_discrete(5) 1 - """ return self.is_discrete(k) @@ -1942,7 +1920,6 @@ cdef class PartitionStack: ({0,1,2,3}) ({0},{1},{2},{3},{4},{5}) sage: P._num_cells(3) 5 - """ return self.num_cells(k) @@ -1982,7 +1959,6 @@ cdef class PartitionStack: ({0,1,2,3}) ({0},{1},{2},{3,4,5}) ({0,1,2,3}) ({0},{1},{2},{3},{4,5}) ({0,1,2,3}) ({0},{1},{2},{3},{4},{5}) - """ return self.sat_225(k) @@ -2262,7 +2238,6 @@ cdef class PartitionStack: ({4,3,5},{6}) ({99},{99,99,99,99,99}) ({4,3},{5},{6}) ({99},{99,99},{99,99,99}) ({4},{3},{5},{6}) ({99},{99},{99},{99},{99,99}) - """ cdef int i for i from 0 <= i < len(col_ents): @@ -2296,7 +2271,6 @@ cdef class PartitionStack: ({0},{3},{2,1}) ({0},{5,4,3,2,1}) ({0},{3},{2},{1}) ({0},{5},{4},{3,2,1}) ({0},{3},{2},{1}) ({0},{5},{4},{3},{2},{1}) - """ self.col_percolate(start, end) @@ -2331,7 +2305,6 @@ cdef class PartitionStack: ({0},{3},{2,1}) ({0},{5,4,3,2,1}) ({0},{3},{2},{1}) ({0},{5},{4},{3,2,1}) ({0},{3},{2},{1}) ({0},{5},{4},{3},{2},{1}) - """ self.wd_percolate(start, end) @@ -2430,7 +2403,6 @@ cdef class PartitionStack: ({0,1,2,3}) ({0},{1},{2},{3,4,5}) ({0,1,2,3}) ({0},{1},{2},{3},{4,5}) ({0,1,2,3}) ({0},{1},{2},{3},{4},{5}) - """ return self.split_vertex(v, k) @@ -2496,7 +2468,6 @@ cdef class PartitionStack: ({0,1,2,3}) ({0},{1},{2},{3},{4},{5}) sage: P._col_degree(B, 2, 0, 2) 2 - """ return self.col_degree(C, col, wd_ptr, k) @@ -2537,7 +2508,6 @@ cdef class PartitionStack: ({0,1,2,3}) ({0},{1},{2},{3},{4},{5}) sage: P._wd_degree(B, 1, 1, 1) 3 - """ cdef int *ham_wts = hamming_weights() result = self.wd_degree(C, wd, col_ptr, k, ham_wts) @@ -2577,7 +2547,6 @@ cdef class PartitionStack: sage: P ({0,1,2,3}) ({0,1,4,5,2,3}) ({0,1,2,3}) ({0},{1},{4,5},{2,3}) - """ cdef int i for i from 0 <= i < len(degrees): @@ -2647,7 +2616,6 @@ cdef class PartitionStack: sage: P ({0,1,6,7,2,3,4,5}) ({0,1,2,3,4,5}) ({0,1},{6,7},{2,3,4,5}) ({0,1,2,3,4,5}) - """ cdef int i for i from 0 <= i < len(degrees): @@ -2742,7 +2710,6 @@ cdef class PartitionStack: ({0},{4},{6,2},{13,9},{11,15},{10,14},{12,8},{7,3},{1},{5}) ({0},{1},{2},{3,4,7,6,5}) ({0},{4},{6,2},{13,9},{11,15},{10,14},{12,8},{7,3},{1},{5}) ({0},{1},{2},{3},{4,7,6,5}) ({0},{4},{6},{2},{13},{9},{11},{15},{10},{14},{12},{8},{7},{3},{1},{5}) ({0},{1},{2},{3},{4},{7},{6},{5}) - """ cdef int i, alpha_length = len(alpha) cdef int *_alpha = sig_malloc( (self.nwords + self.ncols) * sizeof(int) ) @@ -2858,7 +2825,6 @@ cdef class PartitionStack: sage: P ({0,1,2,3}) ({0,1,2,3,4,5}) ({0,1,2,3}) ({0},{1,2,3,4,5}) - """ self.clear(k) @@ -2959,7 +2925,6 @@ cdef class PartitionStack: 8 0 11 - """ cdef int i, j if self.basis_locations: @@ -2993,7 +2958,6 @@ cdef class PartitionStack: 8 0 11 - """ cdef int i cdef int *ham_wts = hamming_weights() @@ -3060,7 +3024,6 @@ cdef class PartitionStack: 1 sage: P._get_permutation(Q) ([0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 8, 9, 10, 11], [0, 1, 2, 3, 5, 4, 7, 6]) - """ cdef int i cdef int *word_g = sig_malloc( self.nwords * sizeof(int) ) @@ -3329,7 +3292,6 @@ cdef class BinaryCodeClassifier: sage: BC = BinaryCodeClassifier() sage: BC._aut_gp_and_can_label(B)[2] 442368 - """ cdef int i, j cdef BinaryCode C = CC @@ -3943,7 +3905,6 @@ cdef class BinaryCodeClassifier: [000000000100010011011110] [000000000010001011110101] [000000000001001101101110] - """ aut_gp_gens, labeling, size, base = self._aut_gp_and_can_label(B) B._apply_permutation_to_basis(labeling) @@ -4003,7 +3964,6 @@ cdef class BinaryCodeClassifier: n=10 : 0 1 1 1 0 0 n=11 : 0 0 1 1 0 0 n=12 : 1 2 3 4 2 0 - """ cdef BinaryCode m cdef codeword *ortho_basis diff --git a/src/sage/coding/channel.py b/src/sage/coding/channel.py index b4570e0f429..0b584c3c117 100644 --- a/src/sage/coding/channel.py +++ b/src/sage/coding/channel.py @@ -121,7 +121,6 @@ def format_interval(t): sage: t = (2, 10) sage: format_interval(t) 'between 2 and 10' - """ return str(t[0]) if t[0] == t[1] else 'between %s and %s' % (t[0], t[1]) @@ -249,7 +248,6 @@ def input_space(self): sage: Chan = channels.StaticErrorRateChannel(GF(59)^6, n_err) sage: Chan.input_space() Vector space of dimension 6 over Finite Field of size 59 - """ return self._input_space diff --git a/src/sage/coding/grs_code.py b/src/sage/coding/grs_code.py index 3019af9f080..6aaf6a5e5a3 100644 --- a/src/sage/coding/grs_code.py +++ b/src/sage/coding/grs_code.py @@ -872,7 +872,6 @@ def __init__(self, code, polynomial_ring=None): Traceback (most recent call last): ... ValueError: polynomial_ring's base field has to be the same as code's - """ from sage.rings.polynomial.polynomial_ring import PolynomialRing_commutative super().__init__(code) @@ -1054,7 +1053,6 @@ def unencode_nocheck(self, c): 6*x^4 + 6*x^3 + 2*x^2 sage: E.encode(p) == c False - """ C = self.code() alphas = C.evaluation_points() diff --git a/src/sage/coding/hamming_code.py b/src/sage/coding/hamming_code.py index a27cdab0a11..431e660fae7 100644 --- a/src/sage/coding/hamming_code.py +++ b/src/sage/coding/hamming_code.py @@ -147,7 +147,6 @@ def parity_check_matrix(self): [1 0 1 1 0 1 0 1 1 1 0 1 1] [0 1 1 2 0 0 1 1 2 0 1 1 2] [0 0 0 0 1 1 1 1 1 2 2 2 2] - """ n = self.length() F = self.base_field() diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py index ebe55bd66fe..61577a1c080 100644 --- a/src/sage/coding/linear_code.py +++ b/src/sage/coding/linear_code.py @@ -270,7 +270,6 @@ def _dump_code_in_leon_format(C): )); FINISH; sage: f.close() - """ from sage.misc.temporary_file import tmp_filename F = C.base_ring() @@ -344,7 +343,6 @@ class AbstractLinearCode(AbstractLinearCodeNoMetric): A lot of methods of the abstract class rely on the knowledge of a generator matrix. It is thus strongly recommended to set an encoder with a generator matrix implemented as a default encoder. - """ _registered_encoders = {} _registered_decoders = {} @@ -1112,7 +1110,6 @@ def product_code(self, other): True sage: A.minimum_distance() == C.minimum_distance()*D.minimum_distance() # needs sage.libs.gap True - """ G1 = self.generator_matrix() G2 = other.generator_matrix() @@ -1856,7 +1853,6 @@ def weight_distribution(self, algorithm=None): [8, 6] Hamming Code over GF(7) sage: C.weight_distribution() == C.weight_distribution(algorithm='leon') True - """ if algorithm is None: if self.base_ring().order() == 2: diff --git a/src/sage/coding/linear_code_no_metric.py b/src/sage/coding/linear_code_no_metric.py index 6d9ef886aed..e16d42b26a5 100644 --- a/src/sage/coding/linear_code_no_metric.py +++ b/src/sage/coding/linear_code_no_metric.py @@ -712,7 +712,6 @@ def __iter__(self): sage: L = list(C) sage: L[10].is_immutable() True - """ from sage.modules.finite_submodule_iter import \ FiniteFieldsubspace_iterator @@ -790,7 +789,6 @@ def __getitem__(self, i): sage: C[0].is_immutable() True - """ # IMPORTANT: If the __iter__() function implementation is changed # then the implementation here must also be changed so that diff --git a/src/sage/coding/punctured_code.py b/src/sage/coding/punctured_code.py index 7edf1068cd0..d50f9d8c1d9 100644 --- a/src/sage/coding/punctured_code.py +++ b/src/sage/coding/punctured_code.py @@ -579,7 +579,6 @@ def _repr_(self): sage: D = codes.decoders.PuncturedCodeOriginalCodeDecoder(Cp) sage: D Decoder of Puncturing of [15, 7, 9] Reed-Solomon Code over GF(16) on position(s) [3] through Error-Erasure decoder for [15, 7, 9] Reed-Solomon Code over GF(16) - """ return "Decoder of %s through %s" % (self.code(), self.original_decoder()) diff --git a/src/sage/coding/reed_muller_code.py b/src/sage/coding/reed_muller_code.py index 514a2cc1826..815c9bf420f 100644 --- a/src/sage/coding/reed_muller_code.py +++ b/src/sage/coding/reed_muller_code.py @@ -929,7 +929,6 @@ def unencode_nocheck(self, c): -x0*x1 - x1^2 + x0 + 1 sage: E.encode(p) == c False - """ return _multivariate_polynomial_interpolation( c, diff --git a/src/sage/coding/subfield_subcode.py b/src/sage/coding/subfield_subcode.py index a388bf1fec1..173e9de7663 100644 --- a/src/sage/coding/subfield_subcode.py +++ b/src/sage/coding/subfield_subcode.py @@ -71,7 +71,6 @@ def __init__(self, original_code, subfield, embedding=None): Traceback (most recent call last): ... ValueError: subfield has to be a subfield of the base field of the original code - """ if not isinstance(original_code, AbstractLinearCode): raise ValueError("original_code must be a linear code") diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py index 99fa08715f6..fcda176a60c 100644 --- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py +++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py @@ -1717,7 +1717,6 @@ def c_vector(self, k): A seed for a cluster algebra of rank 2 with 2 frozen variables sage: S.c_vector(0) (1, -1) - """ if k not in range(self._n): raise ValueError("The cluster seed does not have a c-vector of index %s." % k) @@ -1867,7 +1866,6 @@ def _d_mutate(self, k): [ 0 0 -1] sage: S.d_vector(0) (1, 0, 0) - """ B = self.b_matrix() D = copy(self._D) @@ -2050,7 +2048,6 @@ def red_vertices(self): sage: Q.mutate(1) sage: Q.red_vertices() [1] - """ # Make sure we have c vectors on if not self._use_c_vec: @@ -2075,7 +2072,6 @@ def first_red_vertex(self): sage: Q.mutate(1) sage: Q.first_red_vertex() 1 - """ # Make sure we have c vectors if not self._use_c_vec: @@ -2690,7 +2686,6 @@ def cluster_index(self, cluster_str): sage: S.cluster_index('x') sage: S.cluster_index('(y+1)/x') 0 - """ if self._use_fpolys and isinstance(cluster_str, str): c = FractionField(self._R)(cluster_str) @@ -3026,7 +3021,6 @@ def exchangeable_part(self): sage: T.exchangeable_part().quiver().digraph().edges(sort=True) [(0, 1, (1, -1)), (2, 1, (1, -1))] - """ from sage.combinat.cluster_algebra_quiver.mutation_class import _principal_part eval_dict = {self.y(i): 1 for i in range(self._m)} diff --git a/src/sage/combinat/crystals/alcove_path.py b/src/sage/combinat/crystals/alcove_path.py index ce766b1dd65..2565cf3b95a 100644 --- a/src/sage/combinat/crystals/alcove_path.py +++ b/src/sage/combinat/crystals/alcove_path.py @@ -1007,7 +1007,6 @@ def f(self, i): ((alpha[1], 0),) sage: x.f(1).f(2) ((alpha[1], 0), (alpha[1] + alpha[2], 2)) - """ Parent = self.parent() finite_cartan_type = Parent._finite_cartan_type @@ -1096,7 +1095,6 @@ def _eps(self, root): (alpha[1], 1) sage: x._eps(y) 1 - """ if root in self.value: return -1 diff --git a/src/sage/combinat/crystals/highest_weight_crystals.py b/src/sage/combinat/crystals/highest_weight_crystals.py index 96d7377c029..65e362573a5 100644 --- a/src/sage/combinat/crystals/highest_weight_crystals.py +++ b/src/sage/combinat/crystals/highest_weight_crystals.py @@ -192,7 +192,6 @@ def HighestWeightCrystal(dominant_weight, model=None): ....: C1 = crystals.HighestWeight(wt.to_ambient().to_weight_space(ZZ), model=model) ....: C2 = crystals.HighestWeight(wt, model=model) ....: assert C1 == C2 - """ cartan_type = dominant_weight.parent().cartan_type() if model is None: diff --git a/src/sage/combinat/crystals/kirillov_reshetikhin.py b/src/sage/combinat/crystals/kirillov_reshetikhin.py index a75885f4fb0..848146a970f 100644 --- a/src/sage/combinat/crystals/kirillov_reshetikhin.py +++ b/src/sage/combinat/crystals/kirillov_reshetikhin.py @@ -2371,7 +2371,6 @@ def f0(self): sage: K=crystals.KirillovReshetikhin(['B',3,1],3,1) sage: b = K.module_generators[0] sage: b.f(0) # indirect doctest - """ b = self.parent().to_ambient_crystal()(self).f_string([0,0]) if b is None: @@ -2732,7 +2731,6 @@ def from_highest_weight_vector_to_pm_diagram(self, b): sage: hw = [ b for b in T if all(b.epsilon(i)==0 for i in [2,3]) ] sage: all(K.from_pm_diagram_to_highest_weight_vector(K.from_highest_weight_vector_to_pm_diagram(b)) == b for b in hw) True - """ n = self.cartan_type().rank() - 1 s = self.s() diff --git a/src/sage/combinat/crystals/tensor_product.py b/src/sage/combinat/crystals/tensor_product.py index f10669840f2..4381bc1a440 100644 --- a/src/sage/combinat/crystals/tensor_product.py +++ b/src/sage/combinat/crystals/tensor_product.py @@ -886,7 +886,6 @@ class CrystalOfTableaux(CrystalOfWords): Traceback (most recent call last): ... ValueError: entries of each shape must be weakly decreasing - """ @staticmethod @@ -909,7 +908,6 @@ def __classcall_private__(cls, cartan_type, shapes=None, shape=None): sage: T2 = crystals.Tableaux(['A', [1,1]], [3,1,1,1]) sage: T1 is T2 True - """ cartan_type = CartanType(cartan_type) if cartan_type.letter == 'A' and isinstance(cartan_type, SuperCartanType_standard): diff --git a/src/sage/combinat/crystals/tensor_product_element.pyx b/src/sage/combinat/crystals/tensor_product_element.pyx index 94d00c97b12..34998d37d77 100644 --- a/src/sage/combinat/crystals/tensor_product_element.pyx +++ b/src/sage/combinat/crystals/tensor_product_element.pyx @@ -948,7 +948,6 @@ cdef class CrystalOfTableauxElement(TensorProductOfRegularCrystalsElement): [2, 1] sage: x.shape() [2, 1] - """ return self.to_tableau().shape() diff --git a/src/sage/combinat/designs/MOLS_handbook_data.py b/src/sage/combinat/designs/MOLS_handbook_data.py index cc555400101..7c56f13f5d2 100644 --- a/src/sage/combinat/designs/MOLS_handbook_data.py +++ b/src/sage/combinat/designs/MOLS_handbook_data.py @@ -565,6 +565,5 @@ def lower_bound(order: int) -> int: sage: from sage.combinat.designs import MOLS_handbook_data sage: MOLS_handbook_data.lower_bound(0) 0 - """ return _LOWER_BOUNDS[order] diff --git a/src/sage/combinat/designs/bibd.py b/src/sage/combinat/designs/bibd.py index 6114a395789..99cff68e2d5 100644 --- a/src/sage/combinat/designs/bibd.py +++ b/src/sage/combinat/designs/bibd.py @@ -416,7 +416,6 @@ def BruckRyserChowla_check(v, k, lambd): sage: from sage.combinat.designs.bibd import BruckRyserChowla_check sage: BruckRyserChowla_check(13,25,50) # needs sage.schemes True - """ from sage.rings.rational_field import QQ @@ -1240,7 +1239,6 @@ def PBD_from_TD(k,t,u): [[0, 2, 4], [0, 3], [1, 2], [1, 3, 4], [0, 1], [2, 3]] sage: is_pairwise_balanced_design(PBD,2*2+1,[2,3]) True - """ from .orthogonal_arrays import transversal_design TD = transversal_design(k+bool(u),t, check=False) @@ -1350,7 +1348,6 @@ def BIBD_from_arc_in_desarguesian_projective_plane(n,k,existence=False): Some maximal arcs in finite projective planes. Journal of Combinatorial Theory 6, no. 3 (1969): 317-319. :doi:`10.1016/S0021-9800(69)80095-5` - """ q = (n-1)//(k-1)-1 if (k % 2 or @@ -1428,7 +1425,6 @@ class PairwiseBalancedDesign(GroupDivisibleDesign): a list of lists of integers. The list will not be copied but will be modified in place (each block is sorted, and the whole list is sorted). Your ``blocks`` object will become the instance's internal data. - """ def __init__(self, points, blocks, K=None, lambd=1, check=True, copy=True,**kwds): r""" @@ -1438,7 +1434,6 @@ def __init__(self, points, blocks, K=None, lambd=1, check=True, copy=True,**kwds sage: designs.balanced_incomplete_block_design(13,3) # indirect doctest (13,3,1)-Balanced Incomplete Block Design - """ try: i = int(points) diff --git a/src/sage/combinat/designs/block_design.py b/src/sage/combinat/designs/block_design.py index 96668f92dab..e1ca4b1d792 100644 --- a/src/sage/combinat/designs/block_design.py +++ b/src/sage/combinat/designs/block_design.py @@ -333,7 +333,6 @@ def DesarguesianProjectivePlaneDesign(n, point_coordinates=True, check=True): Traceback (most recent call last): ... ValueError: the order of a finite field must be a prime power - """ K = FiniteField(n, 'a') n2 = n**2 diff --git a/src/sage/combinat/designs/covering_design.py b/src/sage/combinat/designs/covering_design.py index 8368209fe7f..93d51ec74af 100644 --- a/src/sage/combinat/designs/covering_design.py +++ b/src/sage/combinat/designs/covering_design.py @@ -141,7 +141,6 @@ def trivial_covering_design(v, k, t): `k` does not divide `v`. * anything else: Just use every `k`-subset of `[0, 1,..., v-1]`. - """ if t == 0: # single block [0, ..., k-1] blk = list(range(k)) @@ -467,7 +466,6 @@ def incidence_structure(self): sage: D.blocks() [[0, 1, 2], [0, 3, 4], [0, 5, 6], [1, 3, 5], [1, 4, 6], [2, 3, 6], [2, 4, 5]] - """ return self.__incidence_structure diff --git a/src/sage/combinat/designs/database.py b/src/sage/combinat/designs/database.py index 6bd0b4e8dff..bc1da573633 100644 --- a/src/sage/combinat/designs/database.py +++ b/src/sage/combinat/designs/database.py @@ -1005,7 +1005,6 @@ def OA_11_185(): sage: designs.orthogonal_arrays.is_available(11,185) # needs sage.schemes True - """ from sage.combinat.designs.difference_family import difference_family @@ -1740,7 +1739,6 @@ def OA_520_plus_x(x): sage: OA = OA_520_plus_x(0) # not tested (already tested in OA_10_520) sage: is_orthogonal_array(OA,10,520,2) # not tested (already tested in OA_10_520) True - """ from .orthogonal_arrays import incomplete_orthogonal_array k = 9+x+1 diff --git a/src/sage/combinat/designs/designs_pyx.pyx b/src/sage/combinat/designs/designs_pyx.pyx index 722743e2ef1..d8b83e29c67 100644 --- a/src/sage/combinat/designs/designs_pyx.pyx +++ b/src/sage/combinat/designs/designs_pyx.pyx @@ -145,7 +145,6 @@ def is_covering_array(array, strength=None, levels=None, verbose=False, paramete ....: [0, 1, 1, 2, 0, 2, 2, 1]] sage: is_covering_array(C,strength=2,parameters=True) (False, (8, 0, 8, 3)) - """ from itertools import product, combinations diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 8aa74f9ebf2..659a82264de 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1327,7 +1327,6 @@ def _create_m_sequence(q, n, check=True): Traceback (most recent call last): ... ValueError: q must be a prime power - """ from sage.rings.finite_rings.finite_field_constructor import GF diff --git a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx index e6d961e76b1..f5912e83690 100644 --- a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx +++ b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx @@ -91,7 +91,6 @@ def generalised_quadrangle_with_spread(const int s, const int t, RuntimeError: Sage can't build a GQ of order (3, 4) with a spread sage: designs.generalised_quadrangle_with_spread(3, 4, existence=True) Unknown - """ from sage.combinat.designs.incidence_structures import IncidenceStructure from sage.misc.unknown import Unknown @@ -213,7 +212,6 @@ def dual_GQ_ovoid(GQ, O): (2, 4) sage: is_GQ_with_spread(*t) True - """ from sage.combinat.designs.incidence_structures import IncidenceStructure diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index 5ac7dca73c8..3582d64b75d 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -472,7 +472,6 @@ def is_isomorphic(self, other, certificate=False): True sage: IS1._canonical_label is None or IS2._canonical_label is None False - """ if (self.num_points() != other.num_points() or self.num_blocks() != other.num_blocks() or @@ -775,7 +774,6 @@ def blocks(self): sage: BD = IncidenceStructure(7,[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]]) sage: BD.blocks() [[0, 1, 2], [0, 3, 4], [0, 5, 6], [1, 3, 5], [1, 4, 6], [2, 3, 6], [2, 4, 5]] - """ if self._point_to_index is None: return [b[:] for b in self._blocks] @@ -2230,7 +2228,6 @@ def _latex_(self): \draw node...; \draw node...; \end{tikzpicture} - """ from sage.functions.trig import arctan2 diff --git a/src/sage/combinat/designs/orthogonal_arrays.py b/src/sage/combinat/designs/orthogonal_arrays.py index 63127d8af14..51f4025c2d8 100644 --- a/src/sage/combinat/designs/orthogonal_arrays.py +++ b/src/sage/combinat/designs/orthogonal_arrays.py @@ -1538,7 +1538,6 @@ def OA_relabel(OA, k, n, blocks=tuple(), matrix=None, symbol_list=None): Traceback (most recent call last): ... RuntimeError: Two block have the same coordinate for one of the k dimensions - """ if blocks: l = [] @@ -1578,7 +1577,6 @@ def OA_standard_label(OA): ....: ['b', 'b', 'b', 'b']] sage: OA_standard_label(C) [[0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0], [1, 1, 1, 1]] - """ symbol_list = sorted({x for l in OA for x in l}) mapping = {symbol: index for index, symbol in enumerate(symbol_list)} @@ -2053,7 +2051,6 @@ def OA_from_wider_OA(OA,k): sage: OA_from_wider_OA(designs.orthogonal_arrays.build(6,20,2),1)[:5] [(19,), (19,), (19,), (19,), (19,)] sage: _ = designs.orthogonal_arrays.build(5,46) # indirect doctest - """ if len(OA[0]) == k: return OA @@ -2191,7 +2188,6 @@ def build(k,n,t=2,resolvable=False): [1, 0, 2], [2, 2, 0]] sage: OA_7_50 = designs.orthogonal_arrays.build(7,50) # indirect doctest - """ return orthogonal_array(k,n,t,resolvable=resolvable) diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index 1d7d13c3789..43f4b5d0041 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -220,7 +220,6 @@ def construction_3_5(k,n,m,r,s,t,explain_construction=False): Concerning eight mutually orthogonal latin squares, Vol. 15, n.3, pp. 255-261, Journal of Combinatorial Designs, 2007 - """ from .orthogonal_arrays import wilson_construction, OA_relabel assert r <= s @@ -366,7 +365,6 @@ def OA_and_oval(q, *, solver=None, integrality_tolerance=1e-3): sage: from sage.combinat.designs.orthogonal_arrays_build_recursive import OA_and_oval sage: _ = OA_and_oval - """ from sage.arith.misc import is_prime_power from sage.combinat.designs.block_design import projective_plane diff --git a/src/sage/combinat/designs/steiner_quadruple_systems.py b/src/sage/combinat/designs/steiner_quadruple_systems.py index feb0284569d..5b4a04ab2ca 100644 --- a/src/sage/combinat/designs/steiner_quadruple_systems.py +++ b/src/sage/combinat/designs/steiner_quadruple_systems.py @@ -80,7 +80,6 @@ def two_n(B): ....: sqs = designs.steiner_quadruple_system(n) ....: if not two_n(sqs).is_t_design(3,2*n,4,1): ....: print("Something is wrong !") - """ n = B.num_points() Y = [] @@ -172,7 +171,6 @@ def three_n_minus_eight(B): ....: sqs = designs.steiner_quadruple_system(n) ....: if not three_n_minus_eight(sqs).is_t_design(3,3*n-8,4,1): ....: print("Something is wrong !") - """ n = B.num_points() @@ -233,7 +231,6 @@ def three_n_minus_four(B): ....: sqs = designs.steiner_quadruple_system(n) ....: if not three_n_minus_four(sqs).is_t_design(3,3*n-4,4,1): ....: print("Something is wrong !") - """ n = B.num_points() @@ -297,7 +294,6 @@ def four_n_minus_six(B): ....: sqs = designs.steiner_quadruple_system(n) ....: if not four_n_minus_six(sqs).is_t_design(3,4*n-6,4,1): ....: print("Something is wrong !") - """ n = B.num_points() f = n-2 @@ -369,7 +365,6 @@ def twelve_n_minus_ten(B): ....: sqs = designs.steiner_quadruple_system(n) ....: if not twelve_n_minus_ten(sqs).is_t_design(3,12*n-10,4,1): ....: print("Something is wrong !") - """ n = B.num_points() B14 = steiner_quadruple_system(14) diff --git a/src/sage/combinat/designs/twographs.py b/src/sage/combinat/designs/twographs.py index 4fc26578552..b645be000c4 100644 --- a/src/sage/combinat/designs/twographs.py +++ b/src/sage/combinat/designs/twographs.py @@ -68,7 +68,6 @@ class TwoGraph(IncidenceStructure): of size four contains an even number of elements of `T`. For more information, see the documentation of the :mod:`~sage.combinat.designs.twographs` module. - """ def __init__(self, points=None, blocks=None, incidence_matrix=None, name=None, check=False, copy=True): diff --git a/src/sage/combinat/integer_lists/base.pyx b/src/sage/combinat/integer_lists/base.pyx index 5929de73c72..baa57d598a7 100644 --- a/src/sage/combinat/integer_lists/base.pyx +++ b/src/sage/combinat/integer_lists/base.pyx @@ -518,7 +518,6 @@ cdef class Envelope(): sage: Envelope(lambda x: 3, sign=-1, min_part=2).limit_start() == Infinity True - """ return self.f_limit_start diff --git a/src/sage/combinat/matrices/dancing_links.pyx b/src/sage/combinat/matrices/dancing_links.pyx index 2f5dfe4a42e..cefafe6b7a2 100644 --- a/src/sage/combinat/matrices/dancing_links.pyx +++ b/src/sage/combinat/matrices/dancing_links.pyx @@ -145,7 +145,6 @@ cdef class dancing_linksWrapper: sage: x = dlx_solver([]) sage: x.get_solution() [] - """ self._rows = [row for row in rows] self._initialize() @@ -173,7 +172,6 @@ cdef class dancing_linksWrapper: sage: x.reinitialize() # indirect doctest sage: x.get_solution() if x.search() else None [0, 1] - """ cdef vector[int] v cdef vector[vector[int]] vv @@ -226,7 +224,6 @@ cdef class dancing_linksWrapper: sage: x.get_solution() if x.search() else None [4, 5] sage: x.get_solution() if x.search() else None - """ sig_on() self._x = dancing_links() @@ -913,7 +910,6 @@ cdef class dancing_linksWrapper: sage: x.to_sat_solver('cryptominisat') # optional - pycryptosat # needs sage.sat CryptoMiniSat solver: 4 variables, 7 clauses. - """ from sage.sat.solvers.satsolver import SAT s = SAT(solver) @@ -1040,7 +1036,6 @@ cdef class dancing_linksWrapper: sage: d.to_milp('gurobi') # optional - gurobi sage_numerical_backends_gurobi, needs sage.numerical.mip (Boolean Program (no objective, 4 variables, 4 constraints), MIPVariable with 4 binary components) - """ from sage.numerical.mip import MixedIntegerLinearProgram p = MixedIntegerLinearProgram(solver=solver) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 2d1ffa85a76..57c5f8a2bea 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -802,7 +802,6 @@ def construction_four_symbol_delta_code_II(X, Y, Z, W): Traceback (most recent call last): ... AssertionError - """ n = len(Z) diff --git a/src/sage/combinat/ncsf_qsym/generic_basis_code.py b/src/sage/combinat/ncsf_qsym/generic_basis_code.py index 44bce3d44f0..df46e0d0d8c 100644 --- a/src/sage/combinat/ncsf_qsym/generic_basis_code.py +++ b/src/sage/combinat/ncsf_qsym/generic_basis_code.py @@ -57,7 +57,6 @@ def _repr_object_names(self): 'bases of Non-Commutative Symmetric Functions or Quasisymmetric functions over the Rational Field' sage: C Category of bases of Non-Commutative Symmetric Functions or Quasisymmetric functions over the Rational Field - """ return "bases of Non-Commutative Symmetric Functions or Quasisymmetric functions over the %s" % self.base().base_ring() @@ -874,7 +873,6 @@ def duality_pairing(self, y): 0 sage: L[1,1,1].duality_pairing(F[1,2]) 1 - """ return self.parent().duality_pairing(self, y) @@ -1142,7 +1140,6 @@ def _on_basis(self, c): sage: f = AlgebraMorphism(Psi, lambda i : Phi[i,i], codomain=Phi) sage: f._on_basis([ 3, 2 ]) Phi[3, 3, 2, 2] - """ if self._anti: c = reversed(c) @@ -1237,7 +1234,6 @@ def internal_product(self): R[2] sage: R.internal_product(R[2,2], R[1,2]) 0 - """ if self.internal_product_on_basis is not NotImplemented: return self.module_morphism( diff --git a/src/sage/combinat/ncsf_qsym/ncsf.py b/src/sage/combinat/ncsf_qsym/ncsf.py index f835afadb93..0ba2d81e93b 100644 --- a/src/sage/combinat/ncsf_qsym/ncsf.py +++ b/src/sage/combinat/ncsf_qsym/ncsf.py @@ -398,7 +398,6 @@ class NonCommutativeSymmetricFunctions(UniqueRepresentation, Parent): sage: TestSuite(Phi).run() sage: TestSuite(Psi).run() sage: TestSuite(complete).run() - """ def __init__(self, R): @@ -517,7 +516,6 @@ def super_categories(self): sage: N.Bases().super_categories() [Category of bases of Non-Commutative Symmetric Functions or Quasisymmetric functions over the Rational Field, Category of realizations of graded modules with internal product over Rational Field] - """ R = self.base().base_ring() from .generic_basis_code import GradedModulesWithInternalProduct @@ -2028,7 +2026,6 @@ def super_categories(self): sage: N = NonCommutativeSymmetricFunctions(QQ) sage: N.MultiplicativeBases().super_categories() [Category of bases of Non-Commutative Symmetric Functions over the Rational Field] - """ return [self.base().Bases()] @@ -4093,7 +4090,6 @@ def __init__(self, NCSF): True sage: all(Phi(S(Phi[comp])) == Phi[comp] for comp in Compositions(5)) True - """ CombinatorialFreeModule.__init__(self, NCSF.base_ring(), Compositions(), prefix='Phi', bracket=False, @@ -4492,7 +4488,6 @@ def __init__(self, NCSF): True sage: all(nM(S(nM[comp])) == nM[comp] for comp in Compositions(5)) True - """ CombinatorialFreeModule.__init__(self, NCSF.base_ring(), Compositions(), prefix='nM', bracket=False, @@ -4654,7 +4649,6 @@ def __init__(self, NCSF): True sage: all(I(S(I[comp])) == I[comp] for comp in Compositions(5)) True - """ CombinatorialFreeModule.__init__(self, NCSF.base_ring(), Compositions(), prefix='I', bracket=False, diff --git a/src/sage/combinat/path_tableaux/path_tableau.py b/src/sage/combinat/path_tableaux/path_tableau.py index 9fd36793a2e..b4906597434 100644 --- a/src/sage/combinat/path_tableaux/path_tableau.py +++ b/src/sage/combinat/path_tableaux/path_tableau.py @@ -603,7 +603,6 @@ def _latex_(self): & & & & & 0 & 1 & \frac{2}{3} & 1 & 1 & 1 & 0\\ & & & & & & 0 & 1 & 3 & 4 & 5 & 1 & 0 \end{array} - """ D = self.diagram m = len(D[-1]) diff --git a/src/sage/combinat/posets/elements.py b/src/sage/combinat/posets/elements.py index c4e55dbe385..7a94d76e213 100644 --- a/src/sage/combinat/posets/elements.py +++ b/src/sage/combinat/posets/elements.py @@ -162,7 +162,6 @@ def _cmp(self, other): sage: P(0)._cmp(P(0)) 0 sage: P(1)._cmp(P(2)) - """ return self.parent().compare_elements(self, other) diff --git a/src/sage/combinat/posets/lattices.py b/src/sage/combinat/posets/lattices.py index 5dcc906d3e7..17e6127f0bd 100644 --- a/src/sage/combinat/posets/lattices.py +++ b/src/sage/combinat/posets/lattices.py @@ -554,7 +554,6 @@ class FiniteJoinSemilattice(FinitePoset): sage: P = Poset([[1,2],[3],[3]]) sage: J = JoinSemilattice(P) sage: TestSuite(J).run() - """ Element = JoinSemilatticeElement _desc = 'Finite join-semilattice' @@ -754,7 +753,6 @@ class FiniteLatticePoset(FiniteMeetSemilattice, FiniteJoinSemilattice): sage: P = Poset([[1,2],[3],[3]]) sage: L = LatticePoset(P) sage: TestSuite(L).run() - """ Element = LatticePosetElement diff --git a/src/sage/combinat/posets/linear_extension_iterator.pyx b/src/sage/combinat/posets/linear_extension_iterator.pyx index 4b5777dbdc3..f3f8971233f 100644 --- a/src/sage/combinat/posets/linear_extension_iterator.pyx +++ b/src/sage/combinat/posets/linear_extension_iterator.pyx @@ -68,7 +68,6 @@ cdef void _linear_extension_switch(list _le, list _a, list _b, list _is_plus, Py If ``i == -1``, then the sign is changed. Otherwise, then ``_a[i]`` and ``_b[i]`` are transposed. - """ cdef Py_ssize_t a_index, b_index if i == -1: @@ -102,7 +101,6 @@ cdef bint _linear_extension_right_a(_D, list _le, list _a, list _b, Py_ssize_t i False sage: _linear_extension_right_a(D, [0, 1, 2, 4, 3], [1, 4], [2, 3], 1) # not tested False - """ cdef Py_ssize_t yindex x = _a[i] @@ -130,7 +128,6 @@ cdef bint _linear_extension_right_b(_D, list _le, list _a, list _b, Py_ssize_t i False sage: _linear_extension_right_b(D, [0, 1, 2, 4, 3], [1, 4], [2, 3], 1) # not tested False - """ cdef Py_ssize_t yindex x = _b[i] @@ -155,7 +152,6 @@ def _linear_extension_gen(_D, list _le, list _a, list _b, list _is_plus, Py_ssiz sage: le, a, b = _linear_extension_prepare(D) sage: [e for e in _linear_extension_gen(D, le, a, b, [True], len(a)-1)] # needs sage.modules [[0, 2, 1, 3, 4]] - """ cdef int mra, mrb, mla cdef Py_ssize_t index, index1 diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 3a428eceb19..823ae9febea 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -702,7 +702,6 @@ def __contains__(self, obj) -> bool: sage: [p for p in Permutations(list(P)) if list(p) in L] [[1, 2, 3, 4, 6, 12], [1, 2, 3, 6, 4, 12], [1, 2, 4, 3, 6, 12], [1, 3, 2, 4, 6, 12], [1, 3, 2, 6, 4, 12]] - """ if not self._is_facade: return super().__contains__(obj) @@ -859,7 +858,6 @@ def markov_chain_transition_matrix(self, action='promotion', labeling='identity' [ 0 x0 0 x2 -x1 - x3] .. SEEALSO:: :meth:`markov_chain_digraph`, :meth:`promotion`, :meth:`tau` - """ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.matrix.constructor import matrix diff --git a/src/sage/combinat/posets/poset_examples.py b/src/sage/combinat/posets/poset_examples.py index b5a1896ac74..6e980a87e51 100644 --- a/src/sage/combinat/posets/poset_examples.py +++ b/src/sage/combinat/posets/poset_examples.py @@ -578,7 +578,6 @@ def RestrictedIntegerPartitions(n): Finite poset containing 15 elements sage: len(P.cover_relations()) 17 - """ def lower_covers(partition): r""" diff --git a/src/sage/combinat/root_system/ambient_space.py b/src/sage/combinat/root_system/ambient_space.py index 35259abc9d9..02e3511cdc3 100644 --- a/src/sage/combinat/root_system/ambient_space.py +++ b/src/sage/combinat/root_system/ambient_space.py @@ -140,7 +140,6 @@ def dimension(self): Traceback (most recent call last): ... NotImplementedError - """ raise NotImplementedError @@ -169,7 +168,6 @@ def _repr_(self): Ambient lattice of the Root system of type ['A', 4] sage: RootSystem(['B',4]).ambient_space() Ambient space of the Root system of type ['B', 4] - """ return self._name_string() @@ -179,7 +177,6 @@ def _name_string(self, capitalize=True, base_ring=False, type=True): sage: RootSystem(['A',4]).ambient_lattice()._name_string() "Ambient lattice of the Root system of type ['A', 4]" - """ return self._name_string_helper("ambient", capitalize=capitalize, base_ring=base_ring, type=type) @@ -257,7 +254,6 @@ def reflection(self, root, coroot=None): sage: s_a = e.reflection(a) sage: s_a(b) (0, -1, 0, 0) - """ # TODO: get rid of this as one can use the generic implementation # (i.e. scalar and associated coroot are implemented) @@ -406,7 +402,6 @@ def associated_coroot(self): (1/2, -1/2, -1/2, -1/2) sage: a.associated_coroot() (1, -1, -1, -1) - """ # FIXME: make it work over ZZ! return self * self.base_ring()(2/self.inner_product(self)) @@ -508,7 +503,6 @@ def to_ambient(self): (2, 2, 3) sage: v.to_ambient() (2, 2, 3) - """ return self diff --git a/src/sage/combinat/root_system/branching_rules.py b/src/sage/combinat/root_system/branching_rules.py index 8a7ae6ead58..1c2dec4f53c 100644 --- a/src/sage/combinat/root_system/branching_rules.py +++ b/src/sage/combinat/root_system/branching_rules.py @@ -1285,7 +1285,6 @@ def branch(self, chi, style=None): The Weyl Character Ring of Type A2 with Integer Ring coefficients sage: chi.branch(A2,rule=b) A2(0,1) + A2(1,0) + A2(0,2) + 2*A2(1,1) + A2(2,0) + A2(1,2) + A2(2,1) - """ from sage.combinat.root_system.weyl_characters import WeylCharacterRing if style is None: @@ -2065,7 +2064,6 @@ def maximal_subgroups(ct, mode='print_rules'): A1xA1xA1xA1:branching_rule("D4","D2xD2","orthogonal_sum")*branching_rule("D2xD2","A1xA1xA1xA1",[branching_rule("D2","A1xA1","isomorphic"),branching_rule("D2","A1xA1","isomorphic")]) .. SEEALSO:: :meth:`~sage.combinat.root_system.weyl_characters.WeylCharacterRing.ParentMethods.maximal_subgroups` - """ if CartanType(ct) == CartanType("A2"): diff --git a/src/sage/combinat/root_system/cartan_matrix.py b/src/sage/combinat/root_system/cartan_matrix.py index c57b9c88310..5b320786de1 100644 --- a/src/sage/combinat/root_system/cartan_matrix.py +++ b/src/sage/combinat/root_system/cartan_matrix.py @@ -1017,7 +1017,6 @@ def principal_submatrices(self, proper=False): ] sage: M.principal_submatrices(proper=True) # needs sage.graphs [[], [2], [2]] - """ iset = list(range(self.ncols())) ret = [] diff --git a/src/sage/combinat/root_system/cartan_type.py b/src/sage/combinat/root_system/cartan_type.py index b761dfe488a..ae80e5cf122 100644 --- a/src/sage/combinat/root_system/cartan_type.py +++ b/src/sage/combinat/root_system/cartan_type.py @@ -2046,7 +2046,6 @@ def classical(self): ....: g2.delete_vertex(ct.special_node()) ....: assert g1.vertices(sort=True) == g2.vertices(sort=True) ....: assert g1.edges(sort=True) == g2.edges(sort=True) - """ @abstract_method @@ -2535,7 +2534,6 @@ def __reduce__(self): (CartanType, ('D', 4)) sage: T == loads(dumps(T)) True - """ return (CartanType, (self.letter, self.n)) @@ -2708,7 +2706,6 @@ def __init__(self, letter, n, affine=1): False sage: ct1 == ct3 False - """ assert (letter in ['A', 'B', 'C', 'BC', 'D', 'E', 'F', 'G']) self.letter = letter @@ -2748,7 +2745,6 @@ def __reduce__(self): (CartanType, ('D', 4, 1)) sage: T == loads(dumps(T)) True - """ return (CartanType, (self.letter, self.n, self.affine)) @@ -2917,7 +2913,6 @@ def is_untwisted_affine(self): sage: CartanType(['B', 3, 1]).is_untwisted_affine() True - """ return True diff --git a/src/sage/combinat/root_system/dynkin_diagram.py b/src/sage/combinat/root_system/dynkin_diagram.py index 09c6713832c..e2498744d81 100644 --- a/src/sage/combinat/root_system/dynkin_diagram.py +++ b/src/sage/combinat/root_system/dynkin_diagram.py @@ -415,7 +415,6 @@ def an_instance(): [ 2 -1 -1] [-2 2 -1] [-1 -1 2] - """ # hyperbolic Dynkin diagram of Exercise 4.9 p. 57 of Kac Infinite Dimensional Lie Algebras. g = DynkinDiagram() diff --git a/src/sage/combinat/root_system/fundamental_group.py b/src/sage/combinat/root_system/fundamental_group.py index 1f9fc750d3d..d59f6af5415 100644 --- a/src/sage/combinat/root_system/fundamental_group.py +++ b/src/sage/combinat/root_system/fundamental_group.py @@ -498,7 +498,6 @@ def special_nodes(self): (0, 3) sage: FundamentalGroupOfExtendedAffineWeylGroup(['A',2,1], general_linear=True).special_nodes() Integer Ring - """ return self._special_nodes @@ -555,7 +554,6 @@ def index_set(self): sage: from sage.combinat.root_system.fundamental_group import FundamentalGroupOfExtendedAffineWeylGroup sage: FundamentalGroupOfExtendedAffineWeylGroup(['A',2,1]).index_set() (0, 1, 2) - """ return self.cartan_type().index_set() diff --git a/src/sage/combinat/root_system/integrable_representations.py b/src/sage/combinat/root_system/integrable_representations.py index 72c697192d8..867e4761df8 100644 --- a/src/sage/combinat/root_system/integrable_representations.py +++ b/src/sage/combinat/root_system/integrable_representations.py @@ -1176,7 +1176,6 @@ def branch(self, i=None, weyl_character_ring=None, sequence=None, depth=5): [1, 3, 4, 7, 13, 19, 29, 43, 62, 90, 126, 174, 239, 325, 435, 580] sage: oeis(r) # optional -- internet 0: A029552: Expansion of phi(x) / f(-x) in powers of x where phi(), f() are Ramanujan theta functions. - """ if i is None: i = self._cartan_type.special_node() diff --git a/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py b/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py index 27fcbbf4621..d386a535532 100644 --- a/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +++ b/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py @@ -1285,7 +1285,6 @@ class NonSymmetricMacdonaldPolynomials(CherednikOperatorsEigenvectors): sage: for x in [0*epsilon[0], -epsilon[0], -epsilon[1], epsilon[0], epsilon[1]]: ....: x = KL.monomial(x) ....: assert q^2 * Y0(Y1(Y1(Y2(Y2(start))))) == start - """ @staticmethod @@ -1500,7 +1499,6 @@ def KL0(self): sage: NonSymmetricMacdonaldPolynomials("B2~*").KL0() Algebra of the Ambient space of the Root system of type ['C', 2] over Fraction Field of Multivariate Polynomial Ring in q, q1, q2 over Rational Field - """ return self._KL.classical() @@ -1527,7 +1525,6 @@ def Q_to_Qcheck(self): alphacheck[1] + 2*alphacheck[2] sage: _.parent() Coroot lattice of the Root system of type ['C', 2, 1] - """ #assert self.cartan_type().is_untwisted_affine() Qcheck = self._T_Y.Y().keys() @@ -1919,7 +1916,6 @@ def symmetric_macdonald_polynomial(self, mu): sage: om = E.L0().fundamental_weights() sage: E.symmetric_macdonald_polynomial(2*om[1]) ((3*q^6*v^22+3*q^5*v^22-3*q^6*v^20+q^4*v^22-4*q^5*v^20+q^4*v^18-q^5*v^16+q^3*v^18-2*q^4*v^16+q^5*v^14-q^3*v^16+q^4*v^14-4*q^4*v^12+q^2*v^14+q^5*v^10-8*q^3*v^12+4*q^4*v^10-4*q^2*v^12+8*q^3*v^10-q*v^12-q^4*v^8+4*q^2*v^10-q^2*v^8+q^3*v^6-q*v^8+2*q^2*v^6-q^3*v^4+q*v^6-q^2*v^4+4*q*v^2-q^2+3*v^2-3*q-3)/(q^6*v^22-q^5*v^20-q^4*v^12-q^3*v^12+q^3*v^10+q^2*v^10+q*v^2-1))*B[(0, 0, 0)] + ((q*v^2+v^2-q-1)/(q*v^2-1))*B[(-2, 1, 1)] + B[(-2, 2, 0)] + B[(-2, 0, 2)] + ((-q*v^2-v^2+q+1)/(-q*v^2+1))*B[(-1, -1, 2)] + ((2*q^4*v^12+2*q^3*v^12-2*q^4*v^10-2*q^3*v^10+q^2*v^8-q^3*v^6+q*v^8-2*q^2*v^6+q^3*v^4-q*v^6+q^2*v^4-2*q*v^2-2*v^2+2*q+2)/(q^4*v^12-q^3*v^10-q*v^2+1))*B[(-1, 1, 0)] + ((-q*v^2-v^2+q+1)/(-q*v^2+1))*B[(-1, 2, -1)] + ((2*q^4*v^12+2*q^3*v^12-2*q^4*v^10-2*q^3*v^10+q^2*v^8-q^3*v^6+q*v^8-2*q^2*v^6+q^3*v^4-q*v^6+q^2*v^4-2*q*v^2-2*v^2+2*q+2)/(q^4*v^12-q^3*v^10-q*v^2+1))*B[(-1, 0, 1)] + ((-q*v^2-v^2+q+1)/(-q*v^2+1))*B[(1, -2, 1)] + ((-2*q^4*v^12-2*q^3*v^12+2*q^4*v^10+2*q^3*v^10-q^2*v^8+q^3*v^6-q*v^8+2*q^2*v^6-q^3*v^4+q*v^6-q^2*v^4+2*q*v^2+2*v^2-2*q-2)/(-q^4*v^12+q^3*v^10+q*v^2-1))*B[(1, -1, 0)] + ((-q*v^2-v^2+q+1)/(-q*v^2+1))*B[(1, 1, -2)] + ((-2*q^4*v^12-2*q^3*v^12+2*q^4*v^10+2*q^3*v^10-q^2*v^8+q^3*v^6-q*v^8+2*q^2*v^6-q^3*v^4+q*v^6-q^2*v^4+2*q*v^2+2*v^2-2*q-2)/(-q^4*v^12+q^3*v^10+q*v^2-1))*B[(1, 0, -1)] + B[(2, -2, 0)] + ((q*v^2+v^2-q-1)/(q*v^2-1))*B[(2, -1, -1)] + B[(2, 0, -2)] + B[(0, -2, 2)] + ((-2*q^4*v^12-2*q^3*v^12+2*q^4*v^10+2*q^3*v^10-q^2*v^8+q^3*v^6-q*v^8+2*q^2*v^6-q^3*v^4+q*v^6-q^2*v^4+2*q*v^2+2*v^2-2*q-2)/(-q^4*v^12+q^3*v^10+q*v^2-1))*B[(0, -1, 1)] + ((2*q^4*v^12+2*q^3*v^12-2*q^4*v^10-2*q^3*v^10+q^2*v^8-q^3*v^6+q*v^8-2*q^2*v^6+q^3*v^4-q*v^6+q^2*v^4-2*q*v^2-2*v^2+2*q+2)/(q^4*v^12-q^3*v^10-q*v^2+1))*B[(0, 1, -1)] + B[(0, 2, -2)] - """ if self.cartan_type().classical() != mu.parent().cartan_type() or not mu.is_dominant(): raise ValueError("%s must be a dominant weight for the classical subrootsystem of %s" % (mu, self.cartan_type())) diff --git a/src/sage/combinat/root_system/pieri_factors.py b/src/sage/combinat/root_system/pieri_factors.py index f2f2bd0b5a3..f6265236d8f 100644 --- a/src/sage/combinat/root_system/pieri_factors.py +++ b/src/sage/combinat/root_system/pieri_factors.py @@ -652,7 +652,6 @@ def _test_maximal_elements(self, **options): sage: W.pieri_factors()._test_maximal_elements(verbose = True) sage: W.pieri_factors(min_length = 1)._test_maximal_elements(verbose = True) Strict subset of the Pieri factors; skipping test - """ tester = self._tester(**options) index_set = self.W.index_set() @@ -731,7 +730,6 @@ def __getitem__(self, support): [1, 0, 5, 4, 3] sage: W.pieri_factors()[[0,1,2,3,4]].reduced_word() [4, 3, 2, 1, 0] - """ index_set = sorted(self.W.index_set()) support = sorted(support) diff --git a/src/sage/combinat/root_system/plot.py b/src/sage/combinat/root_system/plot.py index 02fd58c4c3b..caf3b9c9160 100644 --- a/src/sage/combinat/root_system/plot.py +++ b/src/sage/combinat/root_system/plot.py @@ -1168,7 +1168,6 @@ def intersection_at_level_1(self, x): sage: options = L.plot_parse_options(affine=False) sage: options.intersection_at_level_1(L.rho()) Lambda[0] + Lambda[1] + Lambda[2] - """ if self.level is not None: return x * self.level / x.level() @@ -1594,7 +1593,6 @@ def barycentric_projection_matrix(n, angle=0): ....: m = barycentric_projection_matrix(n) ....: assert sum(m.columns()).is_zero() ....: assert matrix(QQ, n+1,n+1, lambda i,j: 1 if i==j else -1/n) == m.transpose()*m - """ from sage.matrix.constructor import matrix from sage.misc.functional import sqrt diff --git a/src/sage/combinat/root_system/root_lattice_realization_algebras.py b/src/sage/combinat/root_system/root_lattice_realization_algebras.py index 708dcc29c40..0867bc2d875 100644 --- a/src/sage/combinat/root_system/root_lattice_realization_algebras.py +++ b/src/sage/combinat/root_system/root_lattice_realization_algebras.py @@ -747,7 +747,6 @@ def demazure_lusztig_operators_on_classical(self, q, q1, q2, convention='antidom 1/(q*u)*B[Lambda[1]] sage: T0(KL0.monomial(-2*omega[1])) ((-u^2+1)/(q*u))*B[0] + 1/(q^2*u)*B[2*Lambda[1]] - """ # In type BC dual we used q^2 and q elsewhere # Not sure this is the right thing to do or just a workaround ... diff --git a/src/sage/combinat/root_system/root_lattice_realizations.py b/src/sage/combinat/root_system/root_lattice_realizations.py index d3e6f80fa35..6e1839a9767 100644 --- a/src/sage/combinat/root_system/root_lattice_realizations.py +++ b/src/sage/combinat/root_system/root_lattice_realizations.py @@ -394,7 +394,6 @@ def highest_root(self): sage: RootSystem(['E',6]).weight_space().highest_root() # needs sage.graphs Lambda[2] - """ if not self.root_system.is_finite(): raise ValueError("The root system of %s is not of finite Cartan type" % self) @@ -740,7 +739,6 @@ def nonparabolic_positive_roots(self, index_set=None): sage: sorted(L.nonparabolic_positive_roots(())) # needs sage.graphs [alpha[1], alpha[1] + alpha[2], alpha[1] + alpha[2] + alpha[3], alpha[2], alpha[2] + alpha[3], alpha[3]] - """ if not self.cartan_type().is_finite(): raise NotImplementedError("Only implemented for " @@ -766,7 +764,6 @@ def nonparabolic_positive_root_sum(self, index_set=None): 0 sage: Q.nonparabolic_positive_root_sum(()) # needs sage.graphs 3*alpha[1] + 4*alpha[2] + 3*alpha[3] - """ return self.sum(self.nonparabolic_positive_roots(index_set)) @@ -920,7 +917,6 @@ def positive_roots_by_height(self, increasing=True): Traceback (most recent call last): ... NotImplementedError: Only implemented for finite Cartan type - """ if not self.cartan_type().is_finite(): @@ -999,7 +995,6 @@ def positive_roots_nonparabolic(self, index_set=None): .. WARNING:: This returns an error if the Cartan type is not finite. - """ if not self.cartan_type().is_finite(): raise NotImplementedError("Only implemented for finite Cartan type") @@ -1036,7 +1031,6 @@ def positive_roots_nonparabolic_sum(self, index_set=None): .. WARNING:: This returns an error if the Cartan type is not finite. - """ if not self.cartan_type().is_finite(): @@ -1230,7 +1224,6 @@ def negative_roots(self): [-2*Lambda[1] + Lambda[2], -Lambda[1] - Lambda[2], Lambda[1] - 2*Lambda[2]] Algorithm: negate the positive roots - """ if not self.cartan_type().is_finite(): raise ValueError("%s is not a finite Cartan type" % self.cartan_type()) @@ -1248,7 +1241,6 @@ def coroot_lattice(self): sage: RootSystem(['A',2]).root_lattice().coroot_lattice() Coroot lattice of the Root system of type ['A', 2] - """ return self.root_system.coroot_lattice() @@ -1268,7 +1260,6 @@ def coroot_space(self, base_ring=QQ): sage: RootSystem(['A',2]).root_lattice().coroot_space(QQ['q']) Coroot space over the Univariate Polynomial Ring in q over Rational Field of the Root system of type ['A', 2] - """ return self.root_system.coroot_space(base_ring=base_ring) @@ -1293,7 +1284,6 @@ def simple_coroots(self): sage: alphacheck = RootSystem(['A',3]).root_lattice().simple_coroots() sage: [alphacheck[i] for i in [1, 2, 3]] [alphacheck[1], alphacheck[2], alphacheck[3]] - """ if not hasattr(self,"cache_simple_coroots"): self.cache_simple_coroots = Family(self.index_set(), self.simple_coroot) @@ -1330,7 +1320,6 @@ def alphacheck(self): sage: RootSystem(["A",3]).ambient_space().alphacheck() Finite family {1: (1, -1, 0, 0), 2: (0, 1, -1, 0), 3: (0, 0, 1, -1)} - """ if self.root_system.is_finite() and self.root_system.is_irreducible(): return Family(self.index_set(), self.simple_coroot, @@ -1671,7 +1660,6 @@ def weyl_group(self, prefix=None): Weyl Group of type ['F', 4] (as a matrix group acting on the ambient space) sage: RootSystem(['F',4]).root_space().weyl_group() # needs sage.libs.gap Weyl Group of type ['F', 4] (as a matrix group acting on the root space) - """ from sage.combinat.root_system.weyl_group import WeylGroup return WeylGroup(self, prefix=prefix) @@ -2224,7 +2212,6 @@ def _plot_projection_barycentric_matrix(self): [ 1/3 1/3 1/3 -1] sage: sum(m.columns()) (0, 0, 0) - """ from sage.symbolic.constants import pi m = matrix(QQ, barycentric_projection_matrix(self.dimension()-1, angle=2*pi/3).n(20)) @@ -3293,7 +3280,6 @@ def dual_type_cospace(self): sage: CartanType(['F',4]).root_system().coweight_lattice().dual_type_cospace() Weight lattice of the Root system of type ['F', 4] relabelled by {1: 4, 2: 3, 3: 2, 4: 1} - """ from .root_space import RootSpace from .weight_space import WeightSpace @@ -3330,7 +3316,6 @@ def to_ambient_space_morphism(self): Generic morphism: From: Weight lattice of the Root system of type ['B', 2] To: Ambient space of the Root system of type ['B', 2] - """ ########################################################################## @@ -3846,7 +3831,6 @@ def reduced_word(self, index_set=None, positive=True): [2, 3, 4, 5] sage: alpha[1].reduced_word([1,2]) # needs sage.graphs [2] - """ return self.to_dominant_chamber(index_set=index_set,positive=positive,reduced_word=True)[1] @@ -4180,7 +4164,6 @@ def associated_reflection(self): (1, 2, 3, 2, 1) sage: C3_rl.simple_root(2).associated_reflection() # needs sage.graphs (2,) - """ i, reduced_word = self.to_simple_root(reduced_word=True) return reduced_word + (i,) + tuple(reversed(reduced_word)) @@ -4326,7 +4309,6 @@ def weyl_stabilizer(self, index_set=None): [3, 4] sage: mu.weyl_stabilizer(index_set = [1,2,3]) [3] - """ if index_set is None: index_set = self.parent().cartan_type().index_set() @@ -4401,7 +4383,6 @@ def is_parabolic_root(self, index_set): True sage: alpha.is_parabolic_root([2]) False - """ for i in self.support(): if i not in index_set: @@ -4482,7 +4463,6 @@ def to_dual_type_cospace(self): 2*Lambdacheck[1] + 2*Lambdacheck[2] + 3*Lambdacheck[3] sage: w.parent() Coweight lattice of the Root system of type ['B', 3] - """ return self.parent().dual_type_cospace().from_vector(self.to_vector()) @@ -4505,7 +4485,6 @@ def to_classical(self): 2*e[0] + 2*e[1] + 3*e[2] sage: v.to_classical() # needs sage.graphs (2, 2, 3, 0) - """ return self.parent().classical()(self) @@ -4533,7 +4512,6 @@ def to_ambient(self): 2*alphacheck[1] + 2*alphacheck[2] + 3*alphacheck[3] sage: alphavee.to_ambient() (2, 0, 1, -3) - """ def is_long_root(self): diff --git a/src/sage/combinat/root_system/root_space.py b/src/sage/combinat/root_system/root_space.py index df6822633a4..025be873bd1 100644 --- a/src/sage/combinat/root_system/root_space.py +++ b/src/sage/combinat/root_system/root_space.py @@ -47,7 +47,6 @@ class RootSpace(CombinatorialFreeModule): alpha[1] sage: latex(r.simple_root(1)) \alpha_{1} - """ def __init__(self, root_system, base_ring): @@ -56,7 +55,6 @@ def __init__(self, root_system, base_ring): sage: P = RootSystem(['A',4]).root_space() sage: s = P.simple_reflections() - """ from sage.categories.morphism import SetMorphism from sage.categories.homset import Hom @@ -87,7 +85,6 @@ def _repr_(self): Coroot lattice of the Root system of type ['A', 4] sage: RootSystem(['B',4]).coroot_space() Coroot space over the Rational Field of the Root system of type ['B', 4] - """ return self._name_string() @@ -218,7 +215,6 @@ def to_ambient_space_morphism(self): Generic morphism: From: Root lattice of the Root system of type ['A', 2] To: Ambient space of the Root system of type ['A', 2] - """ if self.root_system.dual_side: L = self.cartan_type().dual().root_system().ambient_space() @@ -438,7 +434,6 @@ def max_quantum_element(self): [1, 2, 1] sage: Qvee.from_vector(vector([0,2])).max_quantum_element() [2] - """ Qvee = self.parent() word = [] @@ -463,7 +458,6 @@ def to_ambient(self): 2*alphacheck[1] + 2*alphacheck[2] sage: alphavee.to_ambient() (2, 2) - """ return self.parent().to_ambient_space_morphism()(self) diff --git a/src/sage/combinat/root_system/type_A.py b/src/sage/combinat/root_system/type_A.py index 9f832904eda..14faef362af 100644 --- a/src/sage/combinat/root_system/type_A.py +++ b/src/sage/combinat/root_system/type_A.py @@ -123,7 +123,6 @@ def positive_roots(self): (1, 0, 0, -1), (0, 1, 0, -1), (0, 0, 1, -1)] - """ res = [] for j in range(self.n): @@ -148,7 +147,6 @@ def fundamental_weight(self, i): sage: e = RootSystem(['A',3]).ambient_lattice() sage: e.fundamental_weights() Finite family {1: (1, 0, 0, 0), 2: (1, 1, 0, 0), 3: (1, 1, 1, 0)} - """ return self.sum(self.monomial(j) for j in range(i)) diff --git a/src/sage/combinat/root_system/type_A_infinity.py b/src/sage/combinat/root_system/type_A_infinity.py index 9e0f4711ccd..5c42db7e176 100644 --- a/src/sage/combinat/root_system/type_A_infinity.py +++ b/src/sage/combinat/root_system/type_A_infinity.py @@ -98,7 +98,6 @@ def ascii_art(self, label=None, node=None): sage: print(CartanType(['A', NN]).ascii_art()) O---O---O---O---O---O---O---.. 0 1 2 3 4 5 6 - """ if label is None: label = lambda i: i diff --git a/src/sage/combinat/root_system/type_B.py b/src/sage/combinat/root_system/type_B.py index d2964bea909..9794d00794c 100644 --- a/src/sage/combinat/root_system/type_B.py +++ b/src/sage/combinat/root_system/type_B.py @@ -32,7 +32,6 @@ def root(self, i, j): sage: e = RootSystem(['B',3]).ambient_space() sage: e.root(0,1) (1, -1, 0) - """ return self.monomial(i) - self.monomial(j) @@ -98,7 +97,6 @@ def positive_roots(self): (1, 0, 0), (0, 1, 0), (0, 0, 1)] - """ res = [] for i in range(self.n-1): diff --git a/src/sage/combinat/root_system/type_BC_affine.py b/src/sage/combinat/root_system/type_BC_affine.py index 4dc17224f56..b5ca4c803f3 100644 --- a/src/sage/combinat/root_system/type_BC_affine.py +++ b/src/sage/combinat/root_system/type_BC_affine.py @@ -103,7 +103,6 @@ def dynkin_diagram(self): BC1~ sage: c.edges(sort=True) # needs sage.graphs [(0, 1, 1), (1, 0, 4)] - """ from .dynkin_diagram import DynkinDiagram_class n = self.n diff --git a/src/sage/combinat/root_system/type_B_affine.py b/src/sage/combinat/root_system/type_B_affine.py index 047144f02d6..fd074cd2e8c 100644 --- a/src/sage/combinat/root_system/type_B_affine.py +++ b/src/sage/combinat/root_system/type_B_affine.py @@ -76,7 +76,6 @@ def dynkin_diagram(self): B1~ sage: b.edges(sort=True) [(0, 1, 2), (1, 0, 2)] - """ from . import cartan_type n = self.n diff --git a/src/sage/combinat/root_system/type_C_affine.py b/src/sage/combinat/root_system/type_C_affine.py index 32c7be84f16..c26e03f1b10 100644 --- a/src/sage/combinat/root_system/type_C_affine.py +++ b/src/sage/combinat/root_system/type_C_affine.py @@ -60,7 +60,6 @@ def dynkin_diagram(self): C3~ sage: c.edges(sort=True) # needs sage.graphs [(0, 1, 2), (1, 0, 1), (1, 2, 1), (2, 1, 1), (2, 3, 1), (3, 2, 2)] - """ n = self.n if n == 1: diff --git a/src/sage/combinat/root_system/type_D_affine.py b/src/sage/combinat/root_system/type_D_affine.py index 74a1bf2fc9c..59748fb2ff6 100644 --- a/src/sage/combinat/root_system/type_D_affine.py +++ b/src/sage/combinat/root_system/type_D_affine.py @@ -95,7 +95,6 @@ def dynkin_diagram(self): sage: d.edges(sort=True) # needs sage.graphs [(0, 2, 1), (0, 3, 1), (1, 2, 1), (1, 3, 1), (2, 0, 1), (2, 1, 1), (3, 0, 1), (3, 1, 1)] - """ from .dynkin_diagram import DynkinDiagram_class n = self.n diff --git a/src/sage/combinat/root_system/type_E.py b/src/sage/combinat/root_system/type_E.py index 15f782b07fa..5ac0041d5ca 100644 --- a/src/sage/combinat/root_system/type_E.py +++ b/src/sage/combinat/root_system/type_E.py @@ -374,7 +374,6 @@ def positive_roots(self): (1/2, 1/2, 1/2, 1/2, 1/2, 1/2, -1/2, -1/2)] sage: e.rho() (0, 1, 2, 3, 4, 5, 6, 23) - """ v = ZZ(1)/ZZ(2) # Note that @@ -562,7 +561,6 @@ def dynkin_diagram(self): [(1, 3, 1), (2, 4, 1), (3, 1, 1), (3, 4, 1), (4, 2, 1), (4, 3, 1), (4, 5, 1), (5, 4, 1), (5, 6, 1), (6, 5, 1), (6, 7, 1), (7, 6, 1), (7, 8, 1), (8, 7, 1)] - """ from .dynkin_diagram import DynkinDiagram_class g = DynkinDiagram_class(self) diff --git a/src/sage/combinat/root_system/type_E_affine.py b/src/sage/combinat/root_system/type_E_affine.py index 00357479896..a4800974566 100644 --- a/src/sage/combinat/root_system/type_E_affine.py +++ b/src/sage/combinat/root_system/type_E_affine.py @@ -113,7 +113,6 @@ def dynkin_diagram(self): [(0, 8, 1), (1, 3, 1), (2, 4, 1), (3, 1, 1), (3, 4, 1), (4, 2, 1), (4, 3, 1), (4, 5, 1), (5, 4, 1), (5, 6, 1), (6, 5, 1), (6, 7, 1), (7, 6, 1), (7, 8, 1), (8, 0, 1), (8, 7, 1)] - """ from .dynkin_diagram import DynkinDiagram_class n = self.n diff --git a/src/sage/combinat/root_system/type_F.py b/src/sage/combinat/root_system/type_F.py index bdeda74d0d9..744de2679a4 100644 --- a/src/sage/combinat/root_system/type_F.py +++ b/src/sage/combinat/root_system/type_F.py @@ -280,7 +280,6 @@ def dynkin_diagram(self): F4 sage: f.edges(sort=True) # needs sage.graphs [(1, 2, 1), (2, 1, 1), (2, 3, 2), (3, 2, 1), (3, 4, 1), (4, 3, 1)] - """ from .dynkin_diagram import DynkinDiagram_class g = DynkinDiagram_class(self) diff --git a/src/sage/combinat/root_system/type_F_affine.py b/src/sage/combinat/root_system/type_F_affine.py index 2642947d0aa..66bbeb574a0 100644 --- a/src/sage/combinat/root_system/type_F_affine.py +++ b/src/sage/combinat/root_system/type_F_affine.py @@ -62,7 +62,6 @@ def dynkin_diagram(self): sage: f.edges(sort=True) # needs sage.graphs [(0, 1, 1), (1, 0, 1), (1, 2, 1), (2, 1, 1), (2, 3, 2), (3, 2, 1), (3, 4, 1), (4, 3, 1)] - """ from .dynkin_diagram import DynkinDiagram_class g = DynkinDiagram_class(self) diff --git a/src/sage/combinat/root_system/type_reducible.py b/src/sage/combinat/root_system/type_reducible.py index 2a33fe03082..6b92973ba63 100644 --- a/src/sage/combinat/root_system/type_reducible.py +++ b/src/sage/combinat/root_system/type_reducible.py @@ -298,7 +298,6 @@ def dynkin_diagram(self): O---O 5 6 F4xA2 - """ from .dynkin_diagram import DynkinDiagram_class relabelling = self._index_relabelling @@ -465,7 +464,6 @@ class AmbientSpace(ambient_space.AmbientSpace): sage: RootSystem("A2xB2").ambient_space() Ambient space of the Root system of type A2xB2 - """ def cartan_type(self): diff --git a/src/sage/combinat/root_system/type_relabel.py b/src/sage/combinat/root_system/type_relabel.py index 33fa7d455db..d269a618852 100644 --- a/src/sage/combinat/root_system/type_relabel.py +++ b/src/sage/combinat/root_system/type_relabel.py @@ -677,7 +677,6 @@ def classical(self): O---O---O---O 2 3 4 0 A4 relabelled by {1: 2, 2: 3, 3: 4, 4: 0} - """ return self._type.classical().relabel(self._relabelling) @@ -726,6 +725,5 @@ def is_untwisted_affine(self): sage: CartanType(['B', 3, 1]).relabel({1:2, 2:3, 3:0, 0:1}).is_untwisted_affine() True - """ return self._type.is_untwisted_affine() diff --git a/src/sage/combinat/root_system/weight_lattice_realizations.py b/src/sage/combinat/root_system/weight_lattice_realizations.py index d408eee37c5..16f8ee28061 100644 --- a/src/sage/combinat/root_system/weight_lattice_realizations.py +++ b/src/sage/combinat/root_system/weight_lattice_realizations.py @@ -953,7 +953,6 @@ def _symmetric_form_matrix(self): [ 0 2 2 1] [ 0 2 4 1] [1/2 1 1 0] - """ from sage.matrix.constructor import matrix ct = self.cartan_type() @@ -1080,7 +1079,6 @@ def symmetric_form(self, la): sage: all(s1(ct) == s2(ct) # needs sage.graphs ....: for ct in CartanType.samples(finite=True, crystallographic=True)) True - """ P = self.parent() ct = P.cartan_type() diff --git a/src/sage/combinat/root_system/weight_space.py b/src/sage/combinat/root_system/weight_space.py index e778833ebd5..cbcde48787d 100644 --- a/src/sage/combinat/root_system/weight_space.py +++ b/src/sage/combinat/root_system/weight_space.py @@ -230,7 +230,6 @@ def _repr_(self): Coweight lattice of the Root system of type ['A', 4] sage: RootSystem(['B',4]).coweight_space() Coweight space over the Rational Field of the Root system of type ['B', 4] - """ return self._name_string() @@ -540,7 +539,6 @@ def is_dominant(self): sage: w = Lambda[1] - delta # needs sage.graphs sage: w.is_dominant() # needs sage.graphs True - """ return all(self.coefficient(i) >= 0 for i in self.parent().index_set()) @@ -560,7 +558,6 @@ def to_ambient(self): Only implemented in finite Cartan type. Does not work for coweight lattices because there is no implemented map from the coweight lattice to the ambient space. - """ return self.parent().to_ambient_space_morphism()(self) diff --git a/src/sage/combinat/root_system/weyl_characters.py b/src/sage/combinat/root_system/weyl_characters.py index cb834c7e125..58d2ae86dae 100644 --- a/src/sage/combinat/root_system/weyl_characters.py +++ b/src/sage/combinat/root_system/weyl_characters.py @@ -451,7 +451,6 @@ def __call__(self, *args): q*A2(0,0) sage: [A2(x) for x in [-2,-1,0,1,2,-2*q,-q,q,2*q,(1-q)]] [-2*A2(0,0), -A2(0,0), 0, A2(0,0), 2*A2(0,0), -2*q*A2(0,0), -q*A2(0,0), q*A2(0,0), 2*q*A2(0,0), (-q+1)*A2(0,0)] - """ # The purpose of this __call__ method is only to handle the # syntactical shorthand; otherwise it just delegates the work diff --git a/src/sage/combinat/root_system/weyl_group.py b/src/sage/combinat/root_system/weyl_group.py index 25918cbbb11..38af278fd76 100644 --- a/src/sage/combinat/root_system/weyl_group.py +++ b/src/sage/combinat/root_system/weyl_group.py @@ -346,7 +346,6 @@ def simple_reflections(self): True sage: type(w) == W.element_class True - """ return self.domain().simple_reflections().map(self.from_morphism)