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

shorter doctests in finite monoids #35257

Merged
merged 1 commit into from
Apr 1, 2023
Merged
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions src/sage/categories/finite_monoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,20 +144,18 @@ def nerve(self):
sage: len(BSigma3.n_cells(3))
125

sage: BC3.homology(range(5), base_ring=GF(3))
sage: BC3.homology(range(4), base_ring=GF(3))
{0: Vector space of dimension 0 over Finite Field of size 3,
1: Vector space of dimension 1 over Finite Field of size 3,
2: Vector space of dimension 1 over Finite Field of size 3,
3: Vector space of dimension 1 over Finite Field of size 3,
4: Vector space of dimension 1 over Finite Field of size 3}
3: Vector space of dimension 1 over Finite Field of size 3}

sage: BC5 = groups.permutation.Cyclic(5).nerve()
sage: BC5.homology(range(5), base_ring=GF(5))
sage: BC5.homology(range(4), base_ring=GF(5))
{0: Vector space of dimension 0 over Finite Field of size 5,
1: Vector space of dimension 1 over Finite Field of size 5,
2: Vector space of dimension 1 over Finite Field of size 5,
3: Vector space of dimension 1 over Finite Field of size 5,
4: Vector space of dimension 1 over Finite Field of size 5}
3: Vector space of dimension 1 over Finite Field of size 5}
"""
from sage.topology.simplicial_set_examples import Nerve
return Nerve(self)
Expand Down Expand Up @@ -209,7 +207,7 @@ def rhodes_radical_congruence(self, base_ring=None):
res = []
for m in self:
for n in self:
if (m == n) or ((n, m) in res):
if m == n or (n, m) in res:
continue
try:
kSrad.retract(kS(m) - kS(n))
Expand All @@ -222,7 +220,7 @@ def rhodes_radical_congruence(self, base_ring=None):
class ElementMethods:
def pseudo_order(self):
r"""
Returns the pair `[k, j]` with `k` minimal and `0\leq j <k` such
Return the pair `[k, j]` with `k` minimal and `0\leq j <k` such
that ``self^k == self^j``.

Note that `j` is uniquely determined.
Expand Down Expand Up @@ -256,8 +254,10 @@ def pseudo_order(self):
sage: x.pseudo_order()
[2, 0]

TODO: more appropriate name? see, for example, Jean-Eric Pin's
lecture notes on semigroups.
.. TODO::

more appropriate name? see, for example, Jean-Eric Pin's
lecture notes on semigroups.
"""
self_powers = {self.parent().one(): 0}
k = 1
Expand Down