From e78344c1c384b353924bc1a8d0a86a71778f15f5 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Fri, 10 Feb 2023 22:47:30 +0000 Subject: [PATCH 01/19] conform to doc requirements so that the docs look beautiful --- src/sage/algebras/free_algebra_quotient.py | 2 ++ src/sage/algebras/iwahori_hecke_algebra.py | 2 ++ .../algebras/quatalg/quaternion_algebra.py | 4 ++-- src/sage/categories/cartesian_product.py | 2 +- src/sage/categories/domains.py | 24 +++++++++---------- src/sage/categories/examples/sets_cat.py | 2 +- src/sage/categories/magmas.py | 2 ++ src/sage/coding/abstract_code.py | 8 +++---- .../coding/guruswami_sudan/interpolation.py | 2 +- src/sage/coding/linear_code_no_metric.py | 2 +- src/sage/combinat/colored_permutations.py | 2 ++ src/sage/combinat/ordered_tree.py | 2 +- src/sage/combinat/permutation.py | 4 ++-- src/sage/combinat/posets/hasse_diagram.py | 2 +- src/sage/combinat/root_system/type_affine.py | 2 +- src/sage/combinat/sf/dual.py | 2 +- src/sage/combinat/sf/sfa.py | 2 +- src/sage/combinat/subset.py | 4 ++-- src/sage/combinat/tableau.py | 2 +- src/sage/combinat/words/paths.py | 2 +- src/sage/functions/special.py | 2 +- src/sage/game_theory/normal_form_game.py | 4 ++-- src/sage/geometry/cone.py | 2 +- src/sage/geometry/fan.py | 2 +- src/sage/geometry/lattice_polytope.py | 2 +- src/sage/geometry/newton_polygon.py | 4 +++- src/sage/geometry/polyhedron/base3.py | 2 +- src/sage/geometry/polyhedron/base_QQ.py | 2 +- src/sage/graphs/generic_graph.py | 6 ++--- src/sage/groups/perm_gps/permgroup.py | 4 ++-- src/sage/groups/perm_gps/permgroup_named.py | 2 +- src/sage/interfaces/expect.py | 18 ++++---------- src/sage/interfaces/frobby.py | 2 +- src/sage/interfaces/interface.py | 2 +- src/sage/interfaces/quit.py | 2 +- src/sage/interfaces/r.py | 4 ++-- src/sage/interfaces/tides.py | 2 ++ src/sage/manifolds/utilities.py | 2 +- src/sage/matroids/constructor.py | 2 +- src/sage/misc/bindable_class.py | 2 +- src/sage/misc/decorators.py | 2 +- src/sage/misc/functional.py | 2 +- src/sage/misc/misc.py | 2 +- .../modform_hecketriangle/abstract_space.py | 2 +- .../modform_hecketriangle/analytic_type.py | 8 ++++--- src/sage/modules/fg_pid/fgp_element.py | 2 +- src/sage/modules/torsion_quadratic_module.py | 2 +- src/sage/numerical/linear_tensor.py | 2 +- src/sage/plot/plot3d/plot3d.py | 2 +- src/sage/quadratic_forms/genera/genus.py | 2 +- src/sage/quivers/morphism.py | 2 +- .../repl/ipython_kernel/widgets_sagenb.py | 4 ++-- src/sage/rings/lazy_series.py | 2 +- src/sage/rings/number_field/number_field.py | 6 ++--- .../number_field/number_field_ideal_rel.py | 2 +- src/sage/rings/number_field/structure.py | 2 +- src/sage/rings/padics/CR_template.pxi | 6 ++--- src/sage/rings/padics/factory.py | 2 +- src/sage/rings/padics/lattice_precision.py | 4 ++-- src/sage/rings/padics/padic_base_leaves.py | 6 ++--- .../rings/padics/padic_extension_generic.py | 2 +- .../rings/padics/padic_lattice_element.py | 2 +- src/sage/rings/padics/padic_valuation.py | 2 +- .../polynomial/infinite_polynomial_ring.py | 2 +- .../polynomial/laurent_polynomial_ideal.py | 2 ++ .../polynomial/laurent_polynomial_ring.py | 2 +- .../rings/polynomial/ore_function_element.py | 4 ++-- .../rings/polynomial/ore_function_field.py | 2 +- src/sage/rings/polynomial/pbori/ll.py | 2 ++ src/sage/rings/polynomial/polynomial_ring.py | 2 +- src/sage/rings/polynomial/term_order.py | 2 +- src/sage/schemes/affine/affine_morphism.py | 4 ++-- .../elliptic_curves/ell_finite_field.py | 2 +- .../schemes/elliptic_curves/hom_velusqrt.py | 2 +- src/sage/sets/finite_set_maps.py | 2 +- src/sage/sets/set.py | 2 +- src/sage/symbolic/operators.py | 2 ++ 77 files changed, 127 insertions(+), 115 deletions(-) diff --git a/src/sage/algebras/free_algebra_quotient.py b/src/sage/algebras/free_algebra_quotient.py index 583eb5f9ae8..4d5000b3df4 100644 --- a/src/sage/algebras/free_algebra_quotient.py +++ b/src/sage/algebras/free_algebra_quotient.py @@ -295,6 +295,8 @@ def module(self): """ The free module of the algebra. + EXAMPLES:: + sage: H = sage.algebras.free_algebra_quotient.hamilton_quatalg(QQ)[0]; H Free algebra quotient on 3 generators ('i', 'j', 'k') and dimension 4 over Rational Field sage: H.module() diff --git a/src/sage/algebras/iwahori_hecke_algebra.py b/src/sage/algebras/iwahori_hecke_algebra.py index 900039c7909..6df42729b70 100644 --- a/src/sage/algebras/iwahori_hecke_algebra.py +++ b/src/sage/algebras/iwahori_hecke_algebra.py @@ -2491,6 +2491,8 @@ def __init__(self, IHAlgebra, prefix=None): r""" Initialize the `A`-basis of the Iwahori-Hecke algebra ``IHAlgebra``. + EXAMPLES:: + sage: R. = LaurentPolynomialRing(QQ) sage: H = IwahoriHeckeAlgebra('A3', v**2) sage: A = H.A() diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 45a4d512c0a..0bca394c6a9 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1337,8 +1337,8 @@ def __init__(self, A, basis, check=True): sage: type(R) - Over QQ and number fields it is checked whether the given - basis actually gives an order (as a module over the maximal order): + Over QQ and number fields it is checked whether the given + basis actually gives an order (as a module over the maximal order):: sage: A. = QuaternionAlgebra(-1,-1) sage: A.quaternion_order([1,i,j,i-j]) diff --git a/src/sage/categories/cartesian_product.py b/src/sage/categories/cartesian_product.py index e6fbf670750..f61cca89629 100644 --- a/src/sage/categories/cartesian_product.py +++ b/src/sage/categories/cartesian_product.py @@ -155,7 +155,7 @@ def __call__(self, args, **kwds): sage: _.category() Category of Cartesian products of finite enumerated sets - Check that the empty product is handled correctly: + Check that the empty product is handled correctly:: sage: C = cartesian_product([]) sage: C diff --git a/src/sage/categories/domains.py b/src/sage/categories/domains.py index 2cdbb4cd2ce..c40f95ba880 100644 --- a/src/sage/categories/domains.py +++ b/src/sage/categories/domains.py @@ -57,18 +57,18 @@ def _test_zero_divisors(self, **options): In rings whose elements can not be represented exactly, there may be zero divisors in practice, even though these rings do not have them in theory. For such inexact rings, these tests - are not performed: - - sage: R = ZpFM(5); R - 5-adic Ring of fixed modulus 5^20 - sage: R.is_exact() - False - sage: a = R(5^19) - sage: a.is_zero() - False - sage: (a*a).is_zero() - True - sage: R._test_zero_divisors() + are not performed:: + + sage: R = ZpFM(5); R + 5-adic Ring of fixed modulus 5^20 + sage: R.is_exact() + False + sage: a = R(5^19) + sage: a.is_zero() + False + sage: (a*a).is_zero() + True + sage: R._test_zero_divisors() EXAMPLES:: diff --git a/src/sage/categories/examples/sets_cat.py b/src/sage/categories/examples/sets_cat.py index 93cc264580d..111fd9f3a2c 100644 --- a/src/sage/categories/examples/sets_cat.py +++ b/src/sage/categories/examples/sets_cat.py @@ -160,7 +160,7 @@ class PrimeNumbers_Abstract(UniqueRepresentation, Parent): datastructure will then be constructed by inheriting from :class:`PrimeNumbers_Abstract`. - This is used by: + This is used by:: sage: P = Sets().example("facade") sage: P = Sets().example("inherits") diff --git a/src/sage/categories/magmas.py b/src/sage/categories/magmas.py index 975ea0491b3..43327b13de6 100644 --- a/src/sage/categories/magmas.py +++ b/src/sage/categories/magmas.py @@ -711,6 +711,8 @@ def one(self): r""" Return the unit element of ``self``. + EXAMPLES:: + sage: from sage.combinat.root_system.extended_affine_weyl_group import ExtendedAffineWeylGroup sage: PvW0 = ExtendedAffineWeylGroup(['A',2,1]).PvW0() sage: PvW0 in Magmas().Unital().Realizations() diff --git a/src/sage/coding/abstract_code.py b/src/sage/coding/abstract_code.py index 238a165c021..c041e8d0eb2 100644 --- a/src/sage/coding/abstract_code.py +++ b/src/sage/coding/abstract_code.py @@ -337,7 +337,7 @@ def __iter__(self): ....: super().__init__(10) We check we get a sensible error message while asking for an - iterator over the elements of our new class: + iterator over the elements of our new class:: sage: C = MyCode() sage: list(C) @@ -365,7 +365,7 @@ def __contains__(self, c): ....: super().__init__(length) We check we get a sensible error message while asking if an element is - in our new class: + in our new class:: sage: C = MyCode(3) sage: vector((1, 0, 0, 0, 0, 1, 1)) in C @@ -461,7 +461,7 @@ def _repr_(self): ....: super().__init__(10) We check we get a sensible error message while asking for a string - representation of an instance of our new class: + representation of an instance of our new class:: sage: C = MyCode() sage: C #random @@ -489,7 +489,7 @@ def _latex_(self): ....: super().__init__(10) We check we get a sensible error message while asking for a string - representation of an instance of our new class: + representation of an instance of our new class:: sage: C = MyCode() sage: latex(C) diff --git a/src/sage/coding/guruswami_sudan/interpolation.py b/src/sage/coding/guruswami_sudan/interpolation.py index e1f9755faa3..77eba69c5c3 100644 --- a/src/sage/coding/guruswami_sudan/interpolation.py +++ b/src/sage/coding/guruswami_sudan/interpolation.py @@ -184,7 +184,7 @@ def _interpolation_matrix_problem(points, tau, parameters, wy): EXAMPLES: The following parameters arise from Guruswami-Sudan decoding of an [6,2,5] - GRS code over F(11) with multiplicity 2 and list size 4. + GRS code over F(11) with multiplicity 2 and list size 4.:: sage: from sage.coding.guruswami_sudan.interpolation import _interpolation_matrix_problem sage: F = GF(11) diff --git a/src/sage/coding/linear_code_no_metric.py b/src/sage/coding/linear_code_no_metric.py index 9610c4e31ce..932ad7ad937 100644 --- a/src/sage/coding/linear_code_no_metric.py +++ b/src/sage/coding/linear_code_no_metric.py @@ -538,7 +538,7 @@ def systematic_generator_matrix(self, systematic_positions=None): [1 2 0 1] [0 0 1 2] - Specific systematic positions can also be requested: + Specific systematic positions can also be requested:: sage: C.systematic_generator_matrix(systematic_positions=[3,2]) [1 2 0 1] diff --git a/src/sage/combinat/colored_permutations.py b/src/sage/combinat/colored_permutations.py index 4ace496fbdb..b5907c5859d 100644 --- a/src/sage/combinat/colored_permutations.py +++ b/src/sage/combinat/colored_permutations.py @@ -87,6 +87,8 @@ def __len__(self): """ Return the length of the one line form of ``self``. + EXAMPLES:: + sage: C = ColoredPermutations(2, 3) sage: s1,s2,t = C.gens() sage: len(s1) diff --git a/src/sage/combinat/ordered_tree.py b/src/sage/combinat/ordered_tree.py index fce1668bd22..702b83cb051 100644 --- a/src/sage/combinat/ordered_tree.py +++ b/src/sage/combinat/ordered_tree.py @@ -224,7 +224,7 @@ def _auto_parent(cls): .. NOTE:: - It is possible to bypass the automatic parent mechanism using: + It is possible to bypass the automatic parent mechanism using:: sage: t1 = OrderedTree.__new__(OrderedTree, Parent(), []) sage: t1.__init__(Parent(), []) diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index e64650bde6e..e35ee0c893e 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -4271,7 +4271,7 @@ def permutohedron_join(self, other, side="right") -> Permutation: sage: p.permutohedron_join(p) [1] - The left permutohedron: + The left permutohedron:: sage: p = Permutation([3,1,2]) sage: q = Permutation([1,3,2]) @@ -4387,7 +4387,7 @@ def permutohedron_meet(self, other, side="right") -> Permutation: sage: p.permutohedron_meet(p) [1] - The left permutohedron: + The left permutohedron:: sage: p = Permutation([3,1,2]) sage: q = Permutation([1,3,2]) diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index d857092f9c7..778253d0807 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -1994,7 +1994,7 @@ def orthocomplementations_iterator(self): [] Unique orthocomplementations; second is not uniquely complemented, - but has only one orthocomplementation. + but has only one orthocomplementation:: sage: H = posets.BooleanLattice(4)._hasse_diagram # Uniquely complemented sage: len(list(H.orthocomplementations_iterator())) diff --git a/src/sage/combinat/root_system/type_affine.py b/src/sage/combinat/root_system/type_affine.py index 12bf38eb52a..5ce62dfb7be 100644 --- a/src/sage/combinat/root_system/type_affine.py +++ b/src/sage/combinat/root_system/type_affine.py @@ -51,7 +51,7 @@ class AmbientSpace(CombinatorialFreeModule): \delta,\delta\rangle=0` and similarly for the null coroot. In the current implementation, `\Lambda_0` and the null coroot - are identified: + are identified:: sage: L = RootSystem(["A",3,1]).ambient_space() sage: Lambda = L.fundamental_weights() diff --git a/src/sage/combinat/sf/dual.py b/src/sage/combinat/sf/dual.py index 77e8b439d8c..d4d19461701 100644 --- a/src/sage/combinat/sf/dual.py +++ b/src/sage/combinat/sf/dual.py @@ -214,7 +214,7 @@ def _self_to_dual(self, x): sage: h._self_to_dual(h([2,1]) + 3*h[1,1,1]) 21*m[1, 1, 1] + 11*m[2, 1] + 4*m[3] - This is for internal use only. Please use instead: + This is for internal use only. Please use instead:: sage: m(h([2,1]) + 3*h[1,1,1]) 21*m[1, 1, 1] + 11*m[2, 1] + 4*m[3] diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index b435764a746..19b67895169 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -501,7 +501,7 @@ def _repr_(self): sage: Sym.macdonald(q=1,t=3).P() Sym in the Macdonald P with q=1 and t=3 basis - Hall-Littlewood polynomials: + Hall-Littlewood polynomials:: sage: Sym.hall_littlewood().P() Sym in the Hall-Littlewood P basis diff --git a/src/sage/combinat/subset.py b/src/sage/combinat/subset.py index 5cae6958510..b4801b69e59 100644 --- a/src/sage/combinat/subset.py +++ b/src/sage/combinat/subset.py @@ -342,9 +342,9 @@ def cardinality(self): sage: Subsets(3).cardinality() 8 - TESTS:: + TESTS: - ``__len__`` should return a Python int. + ``__len__`` should return a Python int.:: sage: S = Subsets(Set([1,2,3])) sage: len(S) diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 1105a3ea177..4a6bf8270f1 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -233,7 +233,7 @@ def __init__(self, parent, t, check=True): A tableau is shallowly immutable. See :trac:`15862`. The entries themselves may be mutable objects, though in that case the - resulting Tableau should be unhashable. + resulting Tableau should be unhashable.:: sage: T = Tableau([[1,2],[2]]) sage: t0 = T[0] diff --git a/src/sage/combinat/words/paths.py b/src/sage/combinat/words/paths.py index 3d0ee41a4c4..b579aeae1ae 100644 --- a/src/sage/combinat/words/paths.py +++ b/src/sage/combinat/words/paths.py @@ -384,7 +384,7 @@ def __init__(self, alphabet, steps): True If size of alphabet is twice the number of steps, then opposite - vectors are used for the second part of the alphabet. + vectors are used for the second part of the alphabet:: sage: WordPaths('abcd',[(2,1),(2,4)]) Word Paths over 4 steps diff --git a/src/sage/functions/special.py b/src/sage/functions/special.py index 56f96f2ef53..faa6a73cc7e 100644 --- a/src/sage/functions/special.py +++ b/src/sage/functions/special.py @@ -538,7 +538,7 @@ def _eval_(self, z, m): sage: elliptic_e(z, 1) elliptic_e(z, 1) - Here arccoth doesn't have 1 in its domain, so we just hold the expression: + Here arccoth doesn't have 1 in its domain, so we just hold the expression:: sage: elliptic_e(arccoth(1), x^2*e) elliptic_e(+Infinity, x^2*e) diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py index 40b3365d5e3..f8cf43485b5 100644 --- a/src/sage/game_theory/normal_form_game.py +++ b/src/sage/game_theory/normal_form_game.py @@ -2743,8 +2743,8 @@ def _is_degenerate_pure(self, certificate=False): sage: g._is_degenerate_pure() True - Whilst this game is not degenerate in pure strategies, it is - actually degenerate, but only in mixed strategies. + Whilst this game is not degenerate in pure strategies, it is + actually degenerate, but only in mixed strategies:: sage: A = matrix([[3, 0], [0, 3], [1.5, 1.5]]) sage: B = matrix([[4, 3], [2, 6], [3, 1]]) diff --git a/src/sage/geometry/cone.py b/src/sage/geometry/cone.py index 3d9cb0766fc..6cd764bacbc 100644 --- a/src/sage/geometry/cone.py +++ b/src/sage/geometry/cone.py @@ -6369,7 +6369,7 @@ def random_cone(lattice=None, min_ambient_dim=0, max_ambient_dim=None, TESTS: It's hard to test the output of a random process, but we can at - least make sure that we get a cone back. + least make sure that we get a cone back:: sage: from sage.geometry.cone import is_Cone sage: K = random_cone(max_ambient_dim=6, max_rays=10) diff --git a/src/sage/geometry/fan.py b/src/sage/geometry/fan.py index 26d814fb437..cd8041262a4 100644 --- a/src/sage/geometry/fan.py +++ b/src/sage/geometry/fan.py @@ -1390,7 +1390,7 @@ def _compute_cone_lattice(self): We use different algorithms depending on available information. One of the common cases is a fan which is KNOWN to be complete, i.e. we do - not even need to check if it is complete. + not even need to check if it is complete:: sage: fan = toric_varieties.P1xP1().fan() # optional - palp sage: fan.cone_lattice() # indirect doctest # optional - palp diff --git a/src/sage/geometry/lattice_polytope.py b/src/sage/geometry/lattice_polytope.py index 0b30f206cbe..0c762ad771c 100644 --- a/src/sage/geometry/lattice_polytope.py +++ b/src/sage/geometry/lattice_polytope.py @@ -3783,7 +3783,7 @@ def points(self, *args, **kwds): M( 0, 0, 0) in 3-d lattice M - Only two of the above points: + Only two of the above points:: sage: p.points(1, 3) # optional - palp M(0, 1, 0), diff --git a/src/sage/geometry/newton_polygon.py b/src/sage/geometry/newton_polygon.py index 4f253741ab7..0ec4bcb560e 100644 --- a/src/sage/geometry/newton_polygon.py +++ b/src/sage/geometry/newton_polygon.py @@ -630,13 +630,15 @@ def __init__(self): """ Parent class for all Newton polygons. + EXAMPLES:: + sage: from sage.geometry.newton_polygon import ParentNewtonPolygon sage: ParentNewtonPolygon() Parent for Newton polygons TESTS: - This class is a singleton. + This class is a singleton.:: sage: ParentNewtonPolygon() is ParentNewtonPolygon() True diff --git a/src/sage/geometry/polyhedron/base3.py b/src/sage/geometry/polyhedron/base3.py index 32a335ce586..5c160c907f6 100644 --- a/src/sage/geometry/polyhedron/base3.py +++ b/src/sage/geometry/polyhedron/base3.py @@ -604,7 +604,7 @@ def face_generator(self, face_dimension=None, algorithm=None, **kwds): A 1-dimensional face of a Polyhedron in ZZ^4 defined as the convex hull of 2 vertices, A 1-dimensional face of a Polyhedron in ZZ^4 defined as the convex hull of 2 vertices] - Check that we catch incorrect algorithms: + Check that we catch incorrect algorithms:: sage: list(P.face_generator(2, algorithm='integrate'))[:4] Traceback (most recent call last): diff --git a/src/sage/geometry/polyhedron/base_QQ.py b/src/sage/geometry/polyhedron/base_QQ.py index 0efcb15f1a2..c94b087a11d 100644 --- a/src/sage/geometry/polyhedron/base_QQ.py +++ b/src/sage/geometry/polyhedron/base_QQ.py @@ -119,7 +119,7 @@ def integral_points_count(self, verbose=False, use_Hrepresentation=False, 27 We enlarge the polyhedron to force the use of the generating function methods - implemented in LattE integrale, rather than explicit enumeration. + implemented in LattE integrale, rather than explicit enumeration:: sage: (1000000000*P).integral_points_count(verbose=True) # optional - latte_int This is LattE integrale... diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index fa48183ecc4..03ab9b57b53 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -5605,7 +5605,7 @@ def layout_planar(self, set_embedding=False, on_embedding=None, sage: g.layout(layout='planar', external_face=(3,1)) {0: [2, 1], 1: [0, 2], 2: [1, 1], 3: [1, 0]} - Choose the embedding: + Choose the embedding:: sage: H = graphs.LadderGraph(4) sage: em = {0:[1,4], 4:[0,5], 1:[5,2,0], 5:[4,6,1], 2:[1,3,6], 6:[7,5,2], 3:[7,2], 7:[3,6]} @@ -6356,7 +6356,7 @@ def num_faces(self, embedding=None): ... ValueError: no embedding is provided and the graph is not planar - Ticket :trac:`22003` is fixed: + Ticket :trac:`22003` is fixed:: sage: Graph(1).num_faces() 1 @@ -20622,7 +20622,7 @@ def plot(self, **options): 9: (0.47..., 0.15...)} sage: P = G.plot(save_pos=True, layout='spring') - The following illustrates the format of a position dictionary. + The following illustrates the format of a position dictionary:: sage: G.get_pos() # currently random across platforms, see #9593 {0: [1.17..., -0.855...], diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index ebdf7c4c6eb..bca0c00d843 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -654,7 +654,7 @@ def gap(self): TESTS: - see that this method does not harm pickling: + see that this method does not harm pickling:: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]) sage: A4.gap() @@ -662,7 +662,7 @@ def gap(self): sage: TestSuite(A4).run() the following test shows, that support for the ``self._libgap`` - attribute is needed in the constructor of the class: + attribute is needed in the constructor of the class:: sage: PG = PGU(6,2) sage: g, h = PG.gens() diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index a3be9f974fe..879c36a3764 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -599,7 +599,7 @@ def algebra(self, base_ring, category=None): Category of finite dimensional unital cellular semigroup algebras over Rational Field - In the following case, a usual group algebra is returned: + In the following case, a usual group algebra is returned:: sage: S = SymmetricGroup([2,3,5]) sage: S.algebra(QQ) diff --git a/src/sage/interfaces/expect.py b/src/sage/interfaces/expect.py index 8903a454df5..58802e8aeb0 100644 --- a/src/sage/interfaces/expect.py +++ b/src/sage/interfaces/expect.py @@ -1181,15 +1181,13 @@ def _expect_expr(self, expr=None, timeout=None): sage: singular._sendstr('def abc = 10 + 15;\n') Then we tell singular to print 10, which is an arbitrary number - different from the expected result 35. + different from the expected result 35:: sage: singular._sendstr('10;\n') Here an exception is raised because 25 hasn't appeared yet in the output stream. The key thing is that this doesn't lock, but instead - quickly raises an exception. - - :: + quickly raises an exception:: sage: t = walltime() sage: try: @@ -1203,21 +1201,15 @@ def _expect_expr(self, expr=None, timeout=None): sage: w = walltime(t); 0.3 < w < 10 True - We tell Singular to print abc, which equals 25. - - :: + We tell Singular to print abc, which equals 25:: sage: singular._sendstr('abc;\n') - Now 25 is in the output stream, so we can wait for it. - - :: + Now 25 is in the output stream, so we can wait for it:: sage: singular._expect_expr('25') - This gives us everything before the 25, including the 10 we printed earlier. - - :: + This gives us everything before the 25, including the 10 we printed earlier:: sage: singular._expect.before.decode('ascii') '...10\r\n> ' diff --git a/src/sage/interfaces/frobby.py b/src/sage/interfaces/frobby.py index 9f514422528..21668a48d31 100644 --- a/src/sage/interfaces/frobby.py +++ b/src/sage/interfaces/frobby.py @@ -123,7 +123,7 @@ def alexander_dual(self, monomial_ideal): True We see how it is much faster to compute this with frobby than the built-in - procedure for simplicial complexes. + procedure for simplicial complexes:: sage: t=simplicial_complexes.PoincareHomologyThreeSphere() # optional - frobby sage: R=PolynomialRing(QQ,16,'x') # optional - frobby diff --git a/src/sage/interfaces/interface.py b/src/sage/interfaces/interface.py index 5ed25e6138d..876f8e8824c 100644 --- a/src/sage/interfaces/interface.py +++ b/src/sage/interfaces/interface.py @@ -880,7 +880,7 @@ def _reduce(self): `"'abc'"` instead. That is dependant on the Elements `is_string` function to be implemented correctly. This has gone wrong in the past and remained uncaught by the doctests because the original identifier was reused. This test makes sure - that does not happen again: + that does not happen again:: sage: a = r("'abc'") # optional - rpy2 sage: b = dumps(a) # optional - rpy2 diff --git a/src/sage/interfaces/quit.py b/src/sage/interfaces/quit.py index 3bbd3ae24d3..e068c324b13 100644 --- a/src/sage/interfaces/quit.py +++ b/src/sage/interfaces/quit.py @@ -149,7 +149,7 @@ def invalidate_all(): sage: b (invalid PARI/GP interpreter object -- The pari session in which this object was defined is no longer running.) - However the maxima and gp sessions should still work out, though with their state reset: + However the maxima and gp sessions should still work out, though with their state reset:: sage: a = maxima(2); b = gp(3) sage: a, b diff --git a/src/sage/interfaces/r.py b/src/sage/interfaces/r.py index 0eabaccecf7..0e0076a0cd6 100644 --- a/src/sage/interfaces/r.py +++ b/src/sage/interfaces/r.py @@ -512,7 +512,7 @@ def _lazy_init(self): sage: my_r._initialized # optional - rpy2 True - And on package import: + And on package import:: sage: my_r = R() # optional - rpy2 sage: my_r._initialized # optional - rpy2 @@ -521,7 +521,7 @@ def _lazy_init(self): sage: my_r._initialized # optional - rpy2 True - And when fetching help pages: + And when fetching help pages:: sage: my_r = R() # optional - rpy2 sage: my_r._initialized # optional - rpy2 diff --git a/src/sage/interfaces/tides.py b/src/sage/interfaces/tides.py index 906f95396e5..f09639dd849 100644 --- a/src/sage/interfaces/tides.py +++ b/src/sage/interfaces/tides.py @@ -356,6 +356,8 @@ def remove_constants(l1,l2): Given two lists, remove the entries in the first that are real constants, and also the corresponding elements in the second one. + EXAMPLES:: + sage: from sage.interfaces.tides import subexpressions_list, remove_constants sage: f(a)=[1+cos(7)*a] sage: l1, l2 = subexpressions_list(f) diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py index de83d63326f..e082e2584af 100644 --- a/src/sage/manifolds/utilities.py +++ b/src/sage/manifolds/utilities.py @@ -1040,7 +1040,7 @@ def _latex_(self): sage: latex(ExpressionNice(fun)) \frac{\partial\,f_{x}}{\partial y} - If latex_name, it should be used in LaTeX output: + If latex_name, it should be used in LaTeX output:: sage: f = function('f_x', latex_name=r"{\cal F}")(x,y) sage: fun = f.diff(y) diff --git a/src/sage/matroids/constructor.py b/src/sage/matroids/constructor.py index 1fb2cd2b93e..dc5610f1536 100644 --- a/src/sage/matroids/constructor.py +++ b/src/sage/matroids/constructor.py @@ -360,7 +360,7 @@ def Matroid(groundset=None, data=None, **kwds): [0, 1, 2, 3] The GraphicMatroid object forces its graph to be connected. If a - disconnected graph is used as input, it will connect the components. + disconnected graph is used as input, it will connect the components:: sage: G1 = graphs.CycleGraph(3); G2 = graphs.DiamondGraph() sage: G = G1.disjoint_union(G2) diff --git a/src/sage/misc/bindable_class.py b/src/sage/misc/bindable_class.py index 92f57ef48cb..d995ad65fc8 100644 --- a/src/sage/misc/bindable_class.py +++ b/src/sage/misc/bindable_class.py @@ -160,7 +160,7 @@ class BoundClass(functools.partial): sage: c = x.Inner; c > - Introspection works, at least partially: + Introspection works, at least partially:: sage: sage_getdoc(c).strip() 'Some documentation for Outer.Inner' diff --git a/src/sage/misc/decorators.py b/src/sage/misc/decorators.py index dd9123f5004..d876634b027 100644 --- a/src/sage/misc/decorators.py +++ b/src/sage/misc/decorators.py @@ -389,7 +389,7 @@ def __call__(self, func): [('arrow_options', {'size': 5})] Demonstrate that the introspected argument specification of the - wrapped function is updated (see :trac:`9976`). + wrapped function is updated (see :trac:`9976`):: sage: from sage.misc.sageinspect import sage_getargspec sage: sage_getargspec(f) diff --git a/src/sage/misc/functional.py b/src/sage/misc/functional.py index 7d2ee692e13..356077005a7 100644 --- a/src/sage/misc/functional.py +++ b/src/sage/misc/functional.py @@ -1935,7 +1935,7 @@ def sqrt(x, *args, **kwds): sage: sqrt(2).n(prec=100) 1.4142135623730950488016887242 - Or one can input a numerical type. + Or one can input a numerical type:: sage: sqrt(2.) 1.41421356237310 diff --git a/src/sage/misc/misc.py b/src/sage/misc/misc.py index bae968c42f3..2089ff8ece2 100644 --- a/src/sage/misc/misc.py +++ b/src/sage/misc/misc.py @@ -1413,7 +1413,7 @@ def inject_variable(name, value, warn=True): sage: a 272 - That's because warn seem to not reissue twice the same warning: + That's because warn seem to not reissue twice the same warning:: sage: from warnings import warn sage: warn("blah") diff --git a/src/sage/modular/modform_hecketriangle/abstract_space.py b/src/sage/modular/modform_hecketriangle/abstract_space.py index efd12339000..c14a59f54d6 100644 --- a/src/sage/modular/modform_hecketriangle/abstract_space.py +++ b/src/sage/modular/modform_hecketriangle/abstract_space.py @@ -1963,7 +1963,7 @@ def construct_quasi_form(self, laurent_series, order_1=ZZ(0), check=True, ration sage: el == constructed_el True - If a q_basis is available the construction uses a different algorithm which we also check:: + If a q_basis is available the construction uses a different algorithm which we also check:: sage: basis = QF.q_basis(min_exp=-1) sage: QF(qexp) == constructed_el diff --git a/src/sage/modular/modform_hecketriangle/analytic_type.py b/src/sage/modular/modform_hecketriangle/analytic_type.py index 3b3b691e181..68adb2c513f 100644 --- a/src/sage/modular/modform_hecketriangle/analytic_type.py +++ b/src/sage/modular/modform_hecketriangle/analytic_type.py @@ -170,6 +170,8 @@ def analytic_name(self): r""" Return a string representation of the analytic type. + EXAMPLES:: + sage: from sage.modular.modform_hecketriangle.analytic_type import AnalyticType sage: AT = AnalyticType() sage: AT(["quasi", "weak"]).analytic_name() @@ -328,9 +330,9 @@ class AnalyticType(FiniteLatticePoset): sage: el.analytic_type() quasi modular - Similarly the type of the ring element ``el2 = E4/Delta - E6/Delta`` is - ``weakly holomorphic`` despite the fact that the sum (``el2``) describes - a function which is holomorphic at infinity. + Similarly the type of the ring element ``el2 = E4/Delta - E6/Delta`` is + ``weakly holomorphic`` despite the fact that the sum (``el2``) describes + a function which is holomorphic at infinity:: sage: from sage.modular.modform_hecketriangle.graded_ring import WeakModularFormsRing sage: x,y,z,d = var("x,y,z,d") diff --git a/src/sage/modules/fg_pid/fgp_element.py b/src/sage/modules/fg_pid/fgp_element.py index dadf8745f88..42ac52dfb38 100644 --- a/src/sage/modules/fg_pid/fgp_element.py +++ b/src/sage/modules/fg_pid/fgp_element.py @@ -156,7 +156,7 @@ def _add_(self, other): sage: 0 + x (1, 0) - We test canonical coercion from V and W. + We test canonical coercion from V and W.:: sage: Q.0 + V.0 (1, 8) diff --git a/src/sage/modules/torsion_quadratic_module.py b/src/sage/modules/torsion_quadratic_module.py index 3414c487a80..8268f7f6be2 100644 --- a/src/sage/modules/torsion_quadratic_module.py +++ b/src/sage/modules/torsion_quadratic_module.py @@ -850,7 +850,7 @@ def orthogonal_group(self, gens=None, check=False): [1 0 0] [0 0 1] - We compute the kernel of the action of the orthogonal group of `L` on the discriminant group. + We compute the kernel of the action of the orthogonal group of `L` on the discriminant group.:: sage: L = IntegralLattice('A4') sage: O = L.orthogonal_group() diff --git a/src/sage/numerical/linear_tensor.py b/src/sage/numerical/linear_tensor.py index 26d94b12cc6..34dc8e934ff 100644 --- a/src/sage/numerical/linear_tensor.py +++ b/src/sage/numerical/linear_tensor.py @@ -389,7 +389,7 @@ def _element_constructor_(self, x): sage: type(_) - Construct from scalar: + Construct from scalar:: sage: LT(123) # indirect doctest (123.0, 123.0) diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py index 174765980f7..3771780f75d 100644 --- a/src/sage/plot/plot3d/plot3d.py +++ b/src/sage/plot/plot3d/plot3d.py @@ -248,7 +248,7 @@ def __init__(self, dep_var, indep_vars): Because the base :class:`_Coordinates` class automatically checks the initializing variables with the transform method, :class:`_Coordinates` - cannot be instantiated by itself. We test a subclass. + cannot be instantiated by itself. We test a subclass.:: sage: from sage.plot.plot3d.plot3d import _ArbitraryCoordinates as arb sage: x,y,z=var('x,y,z') diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py index 0fc43f33c62..5451df7ae29 100644 --- a/src/sage/quadratic_forms/genera/genus.py +++ b/src/sage/quadratic_forms/genera/genus.py @@ -3045,7 +3045,7 @@ def representative(self): Genus symbol at 3: 1^3 3^1 A representative of ``g`` is not known yet. - Let us trigger its computation: + Let us trigger its computation:: sage: g.representative() [ 0 0 0 2] diff --git a/src/sage/quivers/morphism.py b/src/sage/quivers/morphism.py index b8bb25657eb..febc2c3136c 100644 --- a/src/sage/quivers/morphism.py +++ b/src/sage/quivers/morphism.py @@ -1108,7 +1108,7 @@ def algebraic_dual(self): Representation with dimension vector (5, 2, 1, 1, 4) The algebraic dual of an indecomposable projective is the indecomposable - projective of the same vertex in the opposite quiver. + projective of the same vertex in the opposite quiver.:: sage: Q.reverse().P(QQ, 4) Representation with dimension vector (5, 2, 1, 1, 4) diff --git a/src/sage/repl/ipython_kernel/widgets_sagenb.py b/src/sage/repl/ipython_kernel/widgets_sagenb.py index 76f4f52ac4a..01a2bc42d06 100644 --- a/src/sage/repl/ipython_kernel/widgets_sagenb.py +++ b/src/sage/repl/ipython_kernel/widgets_sagenb.py @@ -91,7 +91,7 @@ def input_box(default=None, label=None, type=None, width=80, height=1): 9 With a different ``type``, the text is evaluated and ``type`` is - called on it: + called on it:: sage: w = input_box("4+5", type=float) sage: w @@ -470,7 +470,7 @@ def selector(values, label=None, default=None, nrows=None, ncols=None, width=Non sage: selector([(1,"one"), (2,"two"), (3,"three")], buttons=True) ToggleButtons(options=(('one', 1), ('two', 2), ('three', 3)), value=1) - The values can be any kind of object: + The values can be any kind of object:: sage: selector([sin(x^2), GF(29), EllipticCurve('37a1')]) Dropdown(options=(sin(x^2), Finite Field of size 29, Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field), value=sin(x^2)) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index e77b1a7cd2e..df73af12a9d 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -3975,7 +3975,7 @@ def derivative(self, *args): TESTS: - Check the derivative of the logarithm: + Check the derivative of the logarithm:: sage: L. = LazyLaurentSeriesRing(QQ) sage: -log(1-z).derivative() diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index 8c02fa8e494..01fa87fa306 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -1708,7 +1708,7 @@ def _element_constructor_(self, x, check=True): a^2 An error is raised when a PARI element with an incorrect - modulus is given: + modulus is given:: sage: K(pari("Mod(-5/3*q^2 + 5/3*q - 1/6, q^3 - 999)")) Traceback (most recent call last): @@ -8693,8 +8693,8 @@ def _subfields_helper(self, degree=0, name=None, both_maps=True, optimize=False) (Number Field in a0 with defining polynomial x^2 - 23 with a0 = -4.795831523312720?, -4.795831523312719) - If we take a different embedding of the large field, we get a - different embedding of the degree 2 subfield:: + If we take a different embedding of the large field, we get a + different embedding of the degree 2 subfield:: sage: K. = NumberField(x^4 - 23, embedding=-50) sage: L2, _, _ = K.subfields(2)[0]; L2, CDF(L2.gen()) # indirect doctest diff --git a/src/sage/rings/number_field/number_field_ideal_rel.py b/src/sage/rings/number_field/number_field_ideal_rel.py index 192c8f15034..1292219f843 100644 --- a/src/sage/rings/number_field/number_field_ideal_rel.py +++ b/src/sage/rings/number_field/number_field_ideal_rel.py @@ -170,7 +170,7 @@ def absolute_ideal(self, names = 'a'): sage: J.absolute_ideal().norm() 4 - Now pass 'm' as the name for the generator of the absolute field: + Now pass 'm' as the name for the generator of the absolute field:: sage: J.absolute_ideal('m') Fractional ideal (m^2) diff --git a/src/sage/rings/number_field/structure.py b/src/sage/rings/number_field/structure.py index f933affe775..52e6ed6d503 100644 --- a/src/sage/rings/number_field/structure.py +++ b/src/sage/rings/number_field/structure.py @@ -151,7 +151,7 @@ class NameChange(NumberFieldStructure): sage: NameChange(K) - Check for memory leaks: + Check for memory leaks:: sage: u=id(NumberField(x^2-5,'a').absolute_field('b')) sage: import gc diff --git a/src/sage/rings/padics/CR_template.pxi b/src/sage/rings/padics/CR_template.pxi index 1b3134f3195..73f87ed27e9 100644 --- a/src/sage/rings/padics/CR_template.pxi +++ b/src/sage/rings/padics/CR_template.pxi @@ -905,13 +905,13 @@ cdef class CRElement(pAdicTemplateElement): sage: b = R(0); b.add_bigoh(3) O(7^3) - The precision never increases:: + The precision never increases:: sage: R(4).add_bigoh(2).add_bigoh(4) 4 + O(7^2) - Another example that illustrates that the precision does - not increase:: + Another example that illustrates that the precision does + not increase:: sage: k = Qp(3,5) sage: a = k(1234123412/3^70); a diff --git a/src/sage/rings/padics/factory.py b/src/sage/rings/padics/factory.py index 044dcae0bed..67da897436c 100644 --- a/src/sage/rings/padics/factory.py +++ b/src/sage/rings/padics/factory.py @@ -3019,7 +3019,7 @@ def ZpER(p, prec=None, halt=None, secure=False, *args, **kwds): 40 However, both the default precision and the halting precision can be - customized at the creation of the parent as follows: + customized at the creation of the parent as follows:: sage: S = ZpER(5, prec=10, halt=100) sage: S.default_prec() diff --git a/src/sage/rings/padics/lattice_precision.py b/src/sage/rings/padics/lattice_precision.py index 6b1386e4121..407179f9e70 100644 --- a/src/sage/rings/padics/lattice_precision.py +++ b/src/sage/rings/padics/lattice_precision.py @@ -974,7 +974,7 @@ def precision_lattice(self, elements=None): [ 0 2048] If the precision module does not project to a lattice, - an error is raised. + an error is raised.:: sage: R = ZpLF(2, label='precision_lattice') sage: prec = R.precision() @@ -2689,7 +2689,7 @@ def precision_lattice(self, elements=None): [ 0 2048] If the precision module does not project to a lattice, - an error is raised. + an error is raised.:: sage: prec.precision_lattice([x, y, u, v]) Traceback (most recent call last): diff --git a/src/sage/rings/padics/padic_base_leaves.py b/src/sage/rings/padics/padic_base_leaves.py index f27a5db5a6c..0f0042032c5 100644 --- a/src/sage/rings/padics/padic_base_leaves.py +++ b/src/sage/rings/padics/padic_base_leaves.py @@ -904,7 +904,7 @@ def _coerce_map_from_(self, R): True Note that coerce map does not exist between ``p``-adic rings with - lattice precision and other ``p``-adic rings. + lattice precision and other ``p``-adic rings.:: sage: S = Zp(2) sage: R.has_coerce_map_from(S) @@ -913,7 +913,7 @@ def _coerce_map_from_(self, R): False Similarly there is no coercion maps between ``p``-adic rings with - different labels. + different labels.:: sage: R2 = ZpLC(2, label='coerce') sage: R.has_coerce_map_from(R2) @@ -1033,7 +1033,7 @@ def _coerce_map_from_(self, R): True Note that coerce map does not exist between ``p``-adic fields with - lattice precision and other ``p``-adic rings. + lattice precision and other ``p``-adic rings.:: sage: L = Qp(2) sage: K.has_coerce_map_from(L) diff --git a/src/sage/rings/padics/padic_extension_generic.py b/src/sage/rings/padics/padic_extension_generic.py index ff2d0a5ec6c..1d15f83caad 100644 --- a/src/sage/rings/padics/padic_extension_generic.py +++ b/src/sage/rings/padics/padic_extension_generic.py @@ -510,7 +510,7 @@ def construction(self, forbid_frac_field=False): sage: c(R0) == R True - For a field, by default we return a fraction field functor. + For a field, by default we return a fraction field functor.:: sage: K. = Qq(25, 8) sage: c, R = K.construction(); R diff --git a/src/sage/rings/padics/padic_lattice_element.py b/src/sage/rings/padics/padic_lattice_element.py index ace965211bf..5a195ca9b0f 100644 --- a/src/sage/rings/padics/padic_lattice_element.py +++ b/src/sage/rings/padics/padic_lattice_element.py @@ -1010,7 +1010,7 @@ def unit_part(self): sage: b.unit_part() 1 + 16*17 + O(17^3) - If the element is indistinguishable from zero, an error is raised. + If the element is indistinguishable from zero, an error is raised.:: sage: c = R(0, 5); c O(17^5) diff --git a/src/sage/rings/padics/padic_valuation.py b/src/sage/rings/padics/padic_valuation.py index 883e36f5c96..5af3e28d3e4 100644 --- a/src/sage/rings/padics/padic_valuation.py +++ b/src/sage/rings/padics/padic_valuation.py @@ -439,7 +439,7 @@ class pAdicValuation_base(DiscreteValuation): sage: QQ.valuation(5) 5-adic valuation - For `p`-adic rings, ``p`` has to match the `p` of the ring. + For `p`-adic rings, ``p`` has to match the `p` of the ring.:: sage: v = valuations.pAdicValuation(Zp(3), 2); v Traceback (most recent call last): diff --git a/src/sage/rings/polynomial/infinite_polynomial_ring.py b/src/sage/rings/polynomial/infinite_polynomial_ring.py index 1bc126c1e00..200414984a8 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_ring.py +++ b/src/sage/rings/polynomial/infinite_polynomial_ring.py @@ -646,7 +646,7 @@ class InfinitePolynomialRing_sparse(CommutativeRing): sage: Z = InfinitePolynomialRing_sparse(QQ, ['x','y'], 'lex') Nevertheless, since infinite polynomial rings are supposed to be unique - parent structures, they do not evaluate equal. + parent structures, they do not evaluate equal.:: sage: Z == X False diff --git a/src/sage/rings/polynomial/laurent_polynomial_ideal.py b/src/sage/rings/polynomial/laurent_polynomial_ideal.py index 76d1b495274..0168a56e267 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ideal.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ideal.py @@ -103,6 +103,8 @@ def set_hint(self, hint): to speed up computation of the associated ideal in some cases; normally the end user will have no need to work with it directly. + EXAMPLES:: + sage: P. = LaurentPolynomialRing(QQ, 3) sage: I = P.ideal([x^2*y + 3*x*y^2]) sage: I.hint() diff --git a/src/sage/rings/polynomial/laurent_polynomial_ring.py b/src/sage/rings/polynomial/laurent_polynomial_ring.py index c10faf46568..0ec8ecb15f7 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ring.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ring.py @@ -731,7 +731,7 @@ def ideal(self, *args, **kwds): TESTS: - check that :trac:`26421` is fixed: + check that :trac:`26421` is fixed:: sage: R. = LaurentPolynomialRing(ZZ) sage: P. = PolynomialRing(R) diff --git a/src/sage/rings/polynomial/ore_function_element.py b/src/sage/rings/polynomial/ore_function_element.py index d21ed8d1ed4..0d2800665e0 100644 --- a/src/sage/rings/polynomial/ore_function_element.py +++ b/src/sage/rings/polynomial/ore_function_element.py @@ -845,7 +845,7 @@ def reduced_trace(self, var=None): 3/(z^2 + 2) The reduced trace lies in the center of `S`, which is the fraction field - of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`. + of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`.:: sage: tr.parent() Fraction Field of Univariate Polynomial Ring in z over Finite Field of size 5 @@ -906,7 +906,7 @@ def reduced_norm(self, var=None): (z + 2)/(z^2 + 4) The reduced norm lies in the center of `S`, which is the fraction field - of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`. + of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`.:: sage: N.parent() Fraction Field of Univariate Polynomial Ring in z over Finite Field of size 5 diff --git a/src/sage/rings/polynomial/ore_function_field.py b/src/sage/rings/polynomial/ore_function_field.py index f223f9799dd..34e6e2a6756 100644 --- a/src/sage/rings/polynomial/ore_function_field.py +++ b/src/sage/rings/polynomial/ore_function_field.py @@ -35,7 +35,7 @@ sage: g (d - 1/t)^(-1) * t -The left numerator and right denominator are accessible as follows: +The left numerator and right denominator are accessible as follows:: sage: g.left_numerator() t diff --git a/src/sage/rings/polynomial/pbori/ll.py b/src/sage/rings/polynomial/pbori/ll.py index b12985797a7..a48e7e2a84a 100644 --- a/src/sage/rings/polynomial/pbori/ll.py +++ b/src/sage/rings/polynomial/pbori/ll.py @@ -284,6 +284,8 @@ def invert(self, poly): r""" Inverted map to initial ring. + EXAMPLES:: + sage: from sage.rings.polynomial.pbori.pbori import * sage: from sage.rings.polynomial.pbori.blocks import declare_ring, Block sage: to_ring = declare_ring([Block("x", 10)], globals()) diff --git a/src/sage/rings/polynomial/polynomial_ring.py b/src/sage/rings/polynomial/polynomial_ring.py index bd34d113f5f..4759184cd83 100644 --- a/src/sage/rings/polynomial/polynomial_ring.py +++ b/src/sage/rings/polynomial/polynomial_ring.py @@ -1862,7 +1862,7 @@ def weil_polynomials(self, d, q, sign=1, lead=1): sage: all(p.is_weil_polynomial() for p in L) True - Setting multiple leading coefficients: + Setting multiple leading coefficients:: sage: R. = QQ[] sage: l = R.weil_polynomials(4,2,lead=((1,0),(2,4),(1,2))) diff --git a/src/sage/rings/polynomial/term_order.py b/src/sage/rings/polynomial/term_order.py index 6763f2016c7..613110a34eb 100644 --- a/src/sage/rings/polynomial/term_order.py +++ b/src/sage/rings/polynomial/term_order.py @@ -1790,7 +1790,7 @@ def singular_moreblocks(self): TESTS: The 'degneglex' ordering is somehow special: SINGULAR handles it - using an extra weight vector block. + using an extra weight vector block.:: sage: T = TermOrder("degneglex", 2) sage: P = PolynomialRing(QQ,2, names='x', order=T) diff --git a/src/sage/schemes/affine/affine_morphism.py b/src/sage/schemes/affine/affine_morphism.py index 32c2e47e494..0c489c65794 100644 --- a/src/sage/schemes/affine/affine_morphism.py +++ b/src/sage/schemes/affine/affine_morphism.py @@ -158,7 +158,7 @@ def __init__(self, parent, polys, check=True): Defn: Defined on coordinates by sending (x, y) to ((5*x^3 + 3*x*y^2 - y^3)/(x^3 - 1), (x^2*y + 3)/(x^3 - 1)) - If you pass in quotient ring elements, they are reduced:: + If you pass in quotient ring elements, they are reduced:: sage: A. = AffineSpace(QQ, 3) sage: X = A.subscheme([x-y]) @@ -171,7 +171,7 @@ def __init__(self, parent, polys, check=True): Defn: Defined on coordinates by sending (x, y, z) to (y, y, 2*y) - You must use the ambient space variables to create rational functions:: + You must use the ambient space variables to create rational functions:: sage: A. = AffineSpace(QQ, 3) sage: X = A.subscheme([x^2-y^2]) diff --git a/src/sage/schemes/elliptic_curves/ell_finite_field.py b/src/sage/schemes/elliptic_curves/ell_finite_field.py index 419c08cf9ca..65738e4c727 100644 --- a/src/sage/schemes/elliptic_curves/ell_finite_field.py +++ b/src/sage/schemes/elliptic_curves/ell_finite_field.py @@ -1062,7 +1062,7 @@ def is_isogenous(self, other, field=None, proof=True): ... ValueError: Curves have different base fields: use the field parameter. - When the field is given: + When the field is given:: sage: E1 = EllipticCurve(GF(13^2,'a'),[2,7]); E1 Elliptic Curve defined by y^2 = x^3 + 2*x + 7 over Finite Field in a of size 13^2 diff --git a/src/sage/schemes/elliptic_curves/hom_velusqrt.py b/src/sage/schemes/elliptic_curves/hom_velusqrt.py index 22ae56018a3..6ed7a5c3d15 100644 --- a/src/sage/schemes/elliptic_curves/hom_velusqrt.py +++ b/src/sage/schemes/elliptic_curves/hom_velusqrt.py @@ -515,7 +515,7 @@ def _point_outside_subgroup(P): ... ValueError: ECDLog problem has no solution (...) - An example where the group is non-cyclic: + An example where the group is non-cyclic:: sage: E. = EllipticCurve(GF(71^2), [0,1]) sage: E.abelian_group() diff --git a/src/sage/sets/finite_set_maps.py b/src/sage/sets/finite_set_maps.py index ce5029d8032..c4c9ab4540a 100644 --- a/src/sage/sets/finite_set_maps.py +++ b/src/sage/sets/finite_set_maps.py @@ -305,7 +305,7 @@ def an_element(self): An exception :class:`~sage.categories.sets_cat.EmptySetError` is raised if this set is empty, that is if the codomain is - empty and the domain is not. + empty and the domain is not.:: sage: M = FiniteSetMaps(4, 0) sage: M.cardinality() diff --git a/src/sage/sets/set.py b/src/sage/sets/set.py index b76e6b064ef..1796483222d 100644 --- a/src/sage/sets/set.py +++ b/src/sage/sets/set.py @@ -616,7 +616,7 @@ def __contains__(self, x): False Finite fields better illustrate the difference between - ``__contains__`` for objects and their underlying sets. + ``__contains__`` for objects and their underlying sets.:: sage: X = Set(GF(7)) sage: X diff --git a/src/sage/symbolic/operators.py b/src/sage/symbolic/operators.py index a48b0e8e393..2f700ea298f 100644 --- a/src/sage/symbolic/operators.py +++ b/src/sage/symbolic/operators.py @@ -169,6 +169,8 @@ def change_function(self, new): Return a new function derivative operator with the same parameter set but for a new function. + EXAMPLES:: + sage: from sage.symbolic.operators import FDerivativeOperator sage: f = function('foo') sage: b = function('bar') From 5228878a9fc350c2810f9341ff6ecdae01c6bf6d Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:05:53 +0100 Subject: [PATCH 02/19] Update src/sage/coding/guruswami_sudan/interpolation.py Co-authored-by: Travis Scrimshaw --- src/sage/coding/guruswami_sudan/interpolation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/coding/guruswami_sudan/interpolation.py b/src/sage/coding/guruswami_sudan/interpolation.py index 77eba69c5c3..af150b460c6 100644 --- a/src/sage/coding/guruswami_sudan/interpolation.py +++ b/src/sage/coding/guruswami_sudan/interpolation.py @@ -184,7 +184,7 @@ def _interpolation_matrix_problem(points, tau, parameters, wy): EXAMPLES: The following parameters arise from Guruswami-Sudan decoding of an [6,2,5] - GRS code over F(11) with multiplicity 2 and list size 4.:: + GRS code over F(11) with multiplicity 2 and list size 4. :: sage: from sage.coding.guruswami_sudan.interpolation import _interpolation_matrix_problem sage: F = GF(11) From 5595ddc802fae2253175b1078faac5ba5cdc739a Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:09:14 +0100 Subject: [PATCH 03/19] Update src/sage/combinat/subset.py --- src/sage/combinat/subset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/subset.py b/src/sage/combinat/subset.py index b4801b69e59..9505b1d4ced 100644 --- a/src/sage/combinat/subset.py +++ b/src/sage/combinat/subset.py @@ -344,7 +344,7 @@ def cardinality(self): TESTS: - ``__len__`` should return a Python int.:: + ``__len__`` should return a Python int:: sage: S = Subsets(Set([1,2,3])) sage: len(S) From 83030e5b5b1746593f991ae77f214590f97a71a5 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:09:21 +0100 Subject: [PATCH 04/19] Update src/sage/combinat/tableau.py --- src/sage/combinat/tableau.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 4a6bf8270f1..ae5e93682cc 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -233,7 +233,7 @@ def __init__(self, parent, t, check=True): A tableau is shallowly immutable. See :trac:`15862`. The entries themselves may be mutable objects, though in that case the - resulting Tableau should be unhashable.:: + resulting Tableau should be unhashable. :: sage: T = Tableau([[1,2],[2]]) sage: t0 = T[0] From 955771065441439bbd1e53bb2af5dff2472e9751 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:09:30 +0100 Subject: [PATCH 05/19] Update src/sage/geometry/newton_polygon.py --- src/sage/geometry/newton_polygon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/geometry/newton_polygon.py b/src/sage/geometry/newton_polygon.py index 0ec4bcb560e..42f0edb9a4c 100644 --- a/src/sage/geometry/newton_polygon.py +++ b/src/sage/geometry/newton_polygon.py @@ -638,7 +638,7 @@ def __init__(self): TESTS: - This class is a singleton.:: + This class is a singleton:: sage: ParentNewtonPolygon() is ParentNewtonPolygon() True From a5244f304511bfd8de8481a8fbd6d2b2dc8c2f0e Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:09:37 +0100 Subject: [PATCH 06/19] Update src/sage/modules/fg_pid/fgp_element.py --- src/sage/modules/fg_pid/fgp_element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/modules/fg_pid/fgp_element.py b/src/sage/modules/fg_pid/fgp_element.py index 42ac52dfb38..db16501a9d9 100644 --- a/src/sage/modules/fg_pid/fgp_element.py +++ b/src/sage/modules/fg_pid/fgp_element.py @@ -156,7 +156,7 @@ def _add_(self, other): sage: 0 + x (1, 0) - We test canonical coercion from V and W.:: + We test canonical coercion from V and W:: sage: Q.0 + V.0 (1, 8) From 0a71e9cce414480c1dfc1c9bf7ceb1aa91450659 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:09:47 +0100 Subject: [PATCH 07/19] Update src/sage/sets/set.py --- src/sage/sets/set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/sets/set.py b/src/sage/sets/set.py index 1796483222d..6c4c2662976 100644 --- a/src/sage/sets/set.py +++ b/src/sage/sets/set.py @@ -616,7 +616,7 @@ def __contains__(self, x): False Finite fields better illustrate the difference between - ``__contains__`` for objects and their underlying sets.:: + ``__contains__`` for objects and their underlying sets:: sage: X = Set(GF(7)) sage: X From 694ff40609e3623c654c41e7dc0d09db3df6705e Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:16:22 +0100 Subject: [PATCH 08/19] Update src/sage/sets/finite_set_maps.py --- src/sage/sets/finite_set_maps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/sets/finite_set_maps.py b/src/sage/sets/finite_set_maps.py index c4c9ab4540a..ffe885e2977 100644 --- a/src/sage/sets/finite_set_maps.py +++ b/src/sage/sets/finite_set_maps.py @@ -305,7 +305,7 @@ def an_element(self): An exception :class:`~sage.categories.sets_cat.EmptySetError` is raised if this set is empty, that is if the codomain is - empty and the domain is not.:: + empty and the domain is not. :: sage: M = FiniteSetMaps(4, 0) sage: M.cardinality() From 5a9a786dfac9d97d75d8ad5577ce4e4950a25bc9 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:16:30 +0100 Subject: [PATCH 09/19] Update src/sage/rings/padics/padic_extension_generic.py --- src/sage/rings/padics/padic_extension_generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/padics/padic_extension_generic.py b/src/sage/rings/padics/padic_extension_generic.py index 1d15f83caad..b93c404f660 100644 --- a/src/sage/rings/padics/padic_extension_generic.py +++ b/src/sage/rings/padics/padic_extension_generic.py @@ -510,7 +510,7 @@ def construction(self, forbid_frac_field=False): sage: c(R0) == R True - For a field, by default we return a fraction field functor.:: + For a field, by default we return a fraction field functor. :: sage: K. = Qq(25, 8) sage: c, R = K.construction(); R From da55dc5c27d9379f62be672e0b12983eac0f8aaa Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:16:37 +0100 Subject: [PATCH 10/19] Update src/sage/rings/polynomial/ore_function_element.py --- src/sage/rings/polynomial/ore_function_element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/ore_function_element.py b/src/sage/rings/polynomial/ore_function_element.py index 0d2800665e0..f7bfb7c5845 100644 --- a/src/sage/rings/polynomial/ore_function_element.py +++ b/src/sage/rings/polynomial/ore_function_element.py @@ -845,7 +845,7 @@ def reduced_trace(self, var=None): 3/(z^2 + 2) The reduced trace lies in the center of `S`, which is the fraction field - of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`.:: + of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`:: sage: tr.parent() Fraction Field of Univariate Polynomial Ring in z over Finite Field of size 5 From a2a1e366f99723e22f37a318977e2bd8b06c9454 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 15:16:47 +0100 Subject: [PATCH 11/19] Update src/sage/rings/padics/padic_lattice_element.py --- src/sage/rings/padics/padic_lattice_element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/padics/padic_lattice_element.py b/src/sage/rings/padics/padic_lattice_element.py index 5a195ca9b0f..75de5227116 100644 --- a/src/sage/rings/padics/padic_lattice_element.py +++ b/src/sage/rings/padics/padic_lattice_element.py @@ -1010,7 +1010,7 @@ def unit_part(self): sage: b.unit_part() 1 + 16*17 + O(17^3) - If the element is indistinguishable from zero, an error is raised.:: + If the element is indistinguishable from zero, an error is raised:: sage: c = R(0, 5); c O(17^5) From 7d4c8e642db6ccdca33dec0083cdb1f0f0e32b96 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:12:06 +0100 Subject: [PATCH 12/19] Update src/sage/modules/torsion_quadratic_module.py --- src/sage/modules/torsion_quadratic_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/modules/torsion_quadratic_module.py b/src/sage/modules/torsion_quadratic_module.py index 8268f7f6be2..d0750ee8c94 100644 --- a/src/sage/modules/torsion_quadratic_module.py +++ b/src/sage/modules/torsion_quadratic_module.py @@ -850,7 +850,7 @@ def orthogonal_group(self, gens=None, check=False): [1 0 0] [0 0 1] - We compute the kernel of the action of the orthogonal group of `L` on the discriminant group.:: + We compute the kernel of the action of the orthogonal group of `L` on the discriminant group:: sage: L = IntegralLattice('A4') sage: O = L.orthogonal_group() From d4dd22c84361568bfa6259d337d6aa5a88cf43ea Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:12:16 +0100 Subject: [PATCH 13/19] Update src/sage/plot/plot3d/plot3d.py --- src/sage/plot/plot3d/plot3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py index 3771780f75d..ff24627e81e 100644 --- a/src/sage/plot/plot3d/plot3d.py +++ b/src/sage/plot/plot3d/plot3d.py @@ -248,7 +248,7 @@ def __init__(self, dep_var, indep_vars): Because the base :class:`_Coordinates` class automatically checks the initializing variables with the transform method, :class:`_Coordinates` - cannot be instantiated by itself. We test a subclass.:: + cannot be instantiated by itself. We test a subclass:: sage: from sage.plot.plot3d.plot3d import _ArbitraryCoordinates as arb sage: x,y,z=var('x,y,z') From 97fcfa8bd389e7aad863fa50a86b97f0ec5d2e57 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:12:32 +0100 Subject: [PATCH 14/19] Update src/sage/quivers/morphism.py --- src/sage/quivers/morphism.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/quivers/morphism.py b/src/sage/quivers/morphism.py index febc2c3136c..fc08e35ba60 100644 --- a/src/sage/quivers/morphism.py +++ b/src/sage/quivers/morphism.py @@ -1108,7 +1108,7 @@ def algebraic_dual(self): Representation with dimension vector (5, 2, 1, 1, 4) The algebraic dual of an indecomposable projective is the indecomposable - projective of the same vertex in the opposite quiver.:: + projective of the same vertex in the opposite quiver. :: sage: Q.reverse().P(QQ, 4) Representation with dimension vector (5, 2, 1, 1, 4) From d82ad4b41e51aa9558382d70468f5b1c77c8e54f Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:12:44 +0100 Subject: [PATCH 15/19] Update src/sage/rings/padics/lattice_precision.py --- src/sage/rings/padics/lattice_precision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/padics/lattice_precision.py b/src/sage/rings/padics/lattice_precision.py index 407179f9e70..bbe3e319d1e 100644 --- a/src/sage/rings/padics/lattice_precision.py +++ b/src/sage/rings/padics/lattice_precision.py @@ -974,7 +974,7 @@ def precision_lattice(self, elements=None): [ 0 2048] If the precision module does not project to a lattice, - an error is raised.:: + an error is raised. :: sage: R = ZpLF(2, label='precision_lattice') sage: prec = R.precision() From 5e051b472de0442061a4d49bd5143c7b31e312c5 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:12:55 +0100 Subject: [PATCH 16/19] Update src/sage/rings/padics/padic_base_leaves.py --- src/sage/rings/padics/padic_base_leaves.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/padics/padic_base_leaves.py b/src/sage/rings/padics/padic_base_leaves.py index 0f0042032c5..2e29b7c85ff 100644 --- a/src/sage/rings/padics/padic_base_leaves.py +++ b/src/sage/rings/padics/padic_base_leaves.py @@ -904,7 +904,7 @@ def _coerce_map_from_(self, R): True Note that coerce map does not exist between ``p``-adic rings with - lattice precision and other ``p``-adic rings.:: + lattice precision and other ``p``-adic rings. :: sage: S = Zp(2) sage: R.has_coerce_map_from(S) From 94fbe06fc50d4a874e375401cbb8a9ea4dd74fd8 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:13:05 +0100 Subject: [PATCH 17/19] Update src/sage/rings/polynomial/infinite_polynomial_ring.py --- src/sage/rings/polynomial/infinite_polynomial_ring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/infinite_polynomial_ring.py b/src/sage/rings/polynomial/infinite_polynomial_ring.py index 200414984a8..8e1a54e5385 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_ring.py +++ b/src/sage/rings/polynomial/infinite_polynomial_ring.py @@ -646,7 +646,7 @@ class InfinitePolynomialRing_sparse(CommutativeRing): sage: Z = InfinitePolynomialRing_sparse(QQ, ['x','y'], 'lex') Nevertheless, since infinite polynomial rings are supposed to be unique - parent structures, they do not evaluate equal.:: + parent structures, they do not evaluate equal. :: sage: Z == X False From 86b59b22059a41e597447abb543321576c7fc54e Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:13:26 +0100 Subject: [PATCH 18/19] Update src/sage/rings/padics/padic_valuation.py --- src/sage/rings/padics/padic_valuation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/padics/padic_valuation.py b/src/sage/rings/padics/padic_valuation.py index 5af3e28d3e4..a091cd77d51 100644 --- a/src/sage/rings/padics/padic_valuation.py +++ b/src/sage/rings/padics/padic_valuation.py @@ -439,7 +439,7 @@ class pAdicValuation_base(DiscreteValuation): sage: QQ.valuation(5) 5-adic valuation - For `p`-adic rings, ``p`` has to match the `p` of the ring.:: + For `p`-adic rings, ``p`` has to match the `p` of the ring. :: sage: v = valuations.pAdicValuation(Zp(3), 2); v Traceback (most recent call last): From 418e9ed6093edd201b4063a9b74a899687aaf62b Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Tue, 28 Feb 2023 16:15:39 +0100 Subject: [PATCH 19/19] Apply suggestions from code review --- src/sage/rings/padics/lattice_precision.py | 2 +- src/sage/rings/padics/padic_base_leaves.py | 4 ++-- src/sage/rings/polynomial/ore_function_element.py | 2 +- src/sage/rings/polynomial/term_order.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/rings/padics/lattice_precision.py b/src/sage/rings/padics/lattice_precision.py index bbe3e319d1e..67cdefa5ce7 100644 --- a/src/sage/rings/padics/lattice_precision.py +++ b/src/sage/rings/padics/lattice_precision.py @@ -2689,7 +2689,7 @@ def precision_lattice(self, elements=None): [ 0 2048] If the precision module does not project to a lattice, - an error is raised.:: + an error is raised. :: sage: prec.precision_lattice([x, y, u, v]) Traceback (most recent call last): diff --git a/src/sage/rings/padics/padic_base_leaves.py b/src/sage/rings/padics/padic_base_leaves.py index 2e29b7c85ff..8f978846305 100644 --- a/src/sage/rings/padics/padic_base_leaves.py +++ b/src/sage/rings/padics/padic_base_leaves.py @@ -913,7 +913,7 @@ def _coerce_map_from_(self, R): False Similarly there is no coercion maps between ``p``-adic rings with - different labels.:: + different labels. :: sage: R2 = ZpLC(2, label='coerce') sage: R.has_coerce_map_from(R2) @@ -1033,7 +1033,7 @@ def _coerce_map_from_(self, R): True Note that coerce map does not exist between ``p``-adic fields with - lattice precision and other ``p``-adic rings.:: + lattice precision and other ``p``-adic rings. :: sage: L = Qp(2) sage: K.has_coerce_map_from(L) diff --git a/src/sage/rings/polynomial/ore_function_element.py b/src/sage/rings/polynomial/ore_function_element.py index f7bfb7c5845..fe87008cf2c 100644 --- a/src/sage/rings/polynomial/ore_function_element.py +++ b/src/sage/rings/polynomial/ore_function_element.py @@ -906,7 +906,7 @@ def reduced_norm(self, var=None): (z + 2)/(z^2 + 4) The reduced norm lies in the center of `S`, which is the fraction field - of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`.:: + of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`. :: sage: N.parent() Fraction Field of Univariate Polynomial Ring in z over Finite Field of size 5 diff --git a/src/sage/rings/polynomial/term_order.py b/src/sage/rings/polynomial/term_order.py index 613110a34eb..595730c5756 100644 --- a/src/sage/rings/polynomial/term_order.py +++ b/src/sage/rings/polynomial/term_order.py @@ -1790,7 +1790,7 @@ def singular_moreblocks(self): TESTS: The 'degneglex' ordering is somehow special: SINGULAR handles it - using an extra weight vector block.:: + using an extra weight vector block. :: sage: T = TermOrder("degneglex", 2) sage: P = PolynomialRing(QQ,2, names='x', order=T)