From 9352031b310b81f83c09ecac11b1ce15163f55f9 Mon Sep 17 00:00:00 2001 From: Daniel Krenn Date: Tue, 2 Jun 2015 16:10:08 +0200 Subject: [PATCH 1/2] change one word in docstring --- src/sage/sets/cartesian_product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/sets/cartesian_product.py b/src/sage/sets/cartesian_product.py index 19b84870fc6..895289dfe9c 100644 --- a/src/sage/sets/cartesian_product.py +++ b/src/sage/sets/cartesian_product.py @@ -308,7 +308,7 @@ class CartesianProductPosets(CartesianProduct): - ``'components'`` -- an element is less or equal to another element, if less or equal is true for all its components - (cartesian factors). + (cartesian projections). - a function ``order_le(left, right)``, which performs the comparison. From ef15d6c3f9f78452897b760fdf6d828353c0b8c1 Mon Sep 17 00:00:00 2001 From: Daniel Krenn Date: Sat, 22 Aug 2015 11:29:00 +0200 Subject: [PATCH 2/2] deal with categories: CartesianProductPosets should be in Posets() --- src/sage/sets/cartesian_product.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sage/sets/cartesian_product.py b/src/sage/sets/cartesian_product.py index 895289dfe9c..ccf0410dc5f 100644 --- a/src/sage/sets/cartesian_product.py +++ b/src/sage/sets/cartesian_product.py @@ -332,6 +332,15 @@ class CartesianProductPosets(CartesianProduct): sage: Cs((1, 1)) <= Cs((2, 0)) True + TESTS:: + + sage: Cc.category() + Join of Category of finite posets and + Category of Cartesian products of finite enumerated sets + sage: Cs.category() + Join of Category of finite posets and + Category of Cartesian products of finite enumerated sets + .. SEEALSO: :class:`CartesianProduct` @@ -360,6 +369,8 @@ def __init__(self, sets, category, order, **kwargs): super(CartesianProductPosets, self).__init__( sets, category, **kwargs) + from sage.categories.posets import Posets + self._refine_category_(Posets()) def le(self, left, right):