Skip to content

Commit

Permalink
sagemathgh-36114: using # needs in posets folder
Browse files Browse the repository at this point in the history
    
using the `needs` directive in `posets` folder

### 📝 Checklist

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
    
URL: sagemath#36114
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Aug 26, 2023
2 parents 3c6a36a + b42148c commit 1e6119e
Show file tree
Hide file tree
Showing 3 changed files with 467 additions and 450 deletions.
29 changes: 15 additions & 14 deletions src/sage/combinat/posets/elements.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# sage.doctest: needs sage.modules
r"""
Elements of posets, lattices, semilattices, etc.
"""
Expand Down Expand Up @@ -78,13 +79,13 @@ def _latex_(self):
EXAMPLES::
sage: m = matrix(2, [1,2,3,4]) # optional - sage.modules
sage: m.set_immutable() # optional - sage.modules
sage: P = Poset(([m],[]), facade=False) # optional - sage.modules
sage: [e] = P # optional - sage.modules
sage: type(e) # optional - sage.modules
sage: m = matrix(2, [1,2,3,4])
sage: m.set_immutable()
sage: P = Poset(([m],[]), facade=False)
sage: [e] = P
sage: type(e)
<class 'sage.combinat.posets.posets.FinitePoset_with_category.element_class'>
sage: latex(e) #indirect doctest # optional - sage.modules
sage: latex(e) #indirect doctest
\left(\begin{array}{rr}
1 & 2 \\
3 & 4
Expand Down Expand Up @@ -244,13 +245,13 @@ def __mul__(self, other):
EXAMPLES::
sage: D = posets.DiamondPoset(5, facade=False)
sage: D(1) * D(2) # optional - sage.modules
sage: D(1) * D(2)
0
sage: D(1) * D(1) # optional - sage.modules
sage: D(1) * D(1)
1
sage: D(1) * D(0) # optional - sage.modules
sage: D(1) * D(0)
0
sage: D(1) * D(4) # optional - sage.modules
sage: D(1) * D(4)
1
"""
return self.parent().meet(self, other)
Expand All @@ -264,13 +265,13 @@ def __add__(self, other):
EXAMPLES::
sage: D = posets.DiamondPoset(5,facade=False)
sage: D(1) + D(2) # optional - sage.modules
sage: D(1) + D(2)
4
sage: D(1) + D(1) # optional - sage.modules
sage: D(1) + D(1)
1
sage: D(1) + D(4) # optional - sage.modules
sage: D(1) + D(4)
4
sage: D(1) + D(0) # optional - sage.modules
sage: D(1) + D(0)
1
"""
return self.parent().join(self, other)
Expand Down
Loading

0 comments on commit 1e6119e

Please sign in to comment.