Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
use Posets.ChainPosets in a doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrenn committed Sep 22, 2015
1 parent 693b0bd commit f3b1387
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sage/combinat/posets/cartesian_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ def le(self, left, right):
EXAMPLES::
sage: QQ.CartesianProduct = sage.combinat.posets.cartesian_product.CartesianProductPosets # needed until #19269 is fixed
sage: P = Posets.ChainPoset(10)
sage: def le_sum(left, right):
....: return (sum(left) < sum(right) or
....: sum(left) == sum(right) and left[0] <= right[0])
sage: C = cartesian_product((QQ, QQ), order=le_sum)
sage: C.le(C((1/3, 2)), C((2, 1/3)))
sage: C = cartesian_product((P, P), order=le_sum)
sage: C.le(C((1, 6)), C((6, 1)))
True
sage: C.le(C((2, 1/3)), C((1/3, 2)))
sage: C.le(C((6, 1)), C((1, 6)))
False
sage: C.le(C((1/3, 2)), C((2, 2)))
sage: C.le(C((1, 6)), C((6, 6)))
True
sage: C.le(C((2, 2)), C((1/3, 2)))
sage: C.le(C((6, 6)), C((1, 6)))
False
"""
return self._le_(left, right)
Expand Down

0 comments on commit f3b1387

Please sign in to comment.