Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform to doc requirements so that the docs look more beautiful #35069

Merged
merged 22 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e78344c
conform to doc requirements so that the docs look beautiful
alexjbest Feb 10, 2023
b6defa6
Merge branch 'sagemath:develop' into alexjbest/doc-fixes
alexjbest Feb 10, 2023
735e372
Merge branch 'master' of /~https://github.com/sagemath/sage into alexjb…
alexjbest Feb 28, 2023
5228878
Update src/sage/coding/guruswami_sudan/interpolation.py
alexjbest Feb 28, 2023
5595ddc
Update src/sage/combinat/subset.py
alexjbest Feb 28, 2023
83030e5
Update src/sage/combinat/tableau.py
alexjbest Feb 28, 2023
9557710
Update src/sage/geometry/newton_polygon.py
alexjbest Feb 28, 2023
a5244f3
Update src/sage/modules/fg_pid/fgp_element.py
alexjbest Feb 28, 2023
0a71e9c
Update src/sage/sets/set.py
alexjbest Feb 28, 2023
694ff40
Update src/sage/sets/finite_set_maps.py
alexjbest Feb 28, 2023
5a9a786
Update src/sage/rings/padics/padic_extension_generic.py
alexjbest Feb 28, 2023
da55dc5
Update src/sage/rings/polynomial/ore_function_element.py
alexjbest Feb 28, 2023
a2a1e36
Update src/sage/rings/padics/padic_lattice_element.py
alexjbest Feb 28, 2023
7d4c8e6
Update src/sage/modules/torsion_quadratic_module.py
alexjbest Feb 28, 2023
d4dd22c
Update src/sage/plot/plot3d/plot3d.py
alexjbest Feb 28, 2023
97fcfa8
Update src/sage/quivers/morphism.py
alexjbest Feb 28, 2023
d82ad4b
Update src/sage/rings/padics/lattice_precision.py
alexjbest Feb 28, 2023
5e051b4
Update src/sage/rings/padics/padic_base_leaves.py
alexjbest Feb 28, 2023
94fbe06
Update src/sage/rings/polynomial/infinite_polynomial_ring.py
alexjbest Feb 28, 2023
86b59b2
Update src/sage/rings/padics/padic_valuation.py
alexjbest Feb 28, 2023
418e9ed
Apply suggestions from code review
alexjbest Feb 28, 2023
971c0b1
Merge remote-tracking branch 'upstream/develop' into alexjbest/doc-fixes
alexjbest Feb 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/sage/algebras/free_algebra_quotient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions src/sage/algebras/iwahori_hecke_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2491,6 +2491,8 @@ def __init__(self, IHAlgebra, prefix=None):
r"""
Initialize the `A`-basis of the Iwahori-Hecke algebra ``IHAlgebra``.

EXAMPLES::

sage: R.<v> = LaurentPolynomialRing(QQ)
sage: H = IwahoriHeckeAlgebra('A3', v**2)
sage: A = H.A()
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,8 @@ def __init__(self, A, basis, check=True):
sage: type(R)
<class 'sage.algebras.quatalg.quaternion_algebra.QuaternionOrder_with_category'>

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.<i,j,k> = QuaternionAlgebra(-1,-1)
sage: A.quaternion_order([1,i,j,i-j])
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/cartesian_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions src/sage/categories/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/examples/sets_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions src/sage/categories/magmas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions src/sage/coding/abstract_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/coding/guruswami_sudan/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/coding/linear_code_no_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions src/sage/combinat/colored_permutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/ordered_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(), [])
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/posets/hasse_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/root_system/type_affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/sf/sfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/words/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/sage/functions/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/game_theory/normal_form_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]])
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -6370,7 +6370,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)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 3 additions & 1 deletion src/sage/geometry/newton_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/polyhedron/base3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/polyhedron/base_QQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down
6 changes: 3 additions & 3 deletions src/sage/graphs/generic_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
Expand Down Expand Up @@ -6356,7 +6356,7 @@ def num_faces(self, embedding=None):
...
ValueError: no embedding is provided and the graph is not planar

Issue :trac:`22003` is fixed:
Issue :trac:`22003` is fixed::

sage: Graph(1).num_faces()
1
Expand Down Expand Up @@ -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...],
Expand Down
4 changes: 2 additions & 2 deletions src/sage/groups/perm_gps/permgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,15 +654,15 @@ 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()
Group([ (2,3,4), (1,2,3) ])
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()
Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/perm_gps/permgroup_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,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)
Expand Down
Loading