Closed videlec closed 9 years ago
Description changed:
---
+++
@@ -1,3 +1,3 @@
-The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework. We just make `CartesianProduct` an alias for `sage.sets.cartesian_product.CartesianProduct` (with some tweak to support the behavior).
+The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We just make `CartesianProduct` an alias for `sage.sets.cartesian_product.CartesianProduct` (with some tweak to support the previous behavior which considered the cartesian product as a set of lists).
`sage.combinat.cartesian_product.CartesianProduct` is deprecated.
Dependencies: #18290, #12955
Branch: public/18411
Commit: e703eb4
Branch pushed to git repo; I updated commit sha1. New commits:
e703eb4 | Trac 18411: remove occurrences of CartesianProduct |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
635279f | Trac 18411: a bounded_number_of_tuples function |
1b60903 | Trac 18411: remove occurrences of CartesianProduct |
bec57ae | Trac 18411: cartesian_product works with tuple/list/set/frozenset |
7dbb663 | Trac 18411: move iteration of cartesian products to Sets |
4fbb4ae | Trac 18411: refine category of Set(...) |
10df218 | Trac 18411: fix combinat tutorial |
Author: Vincent Delecroix
Description changed:
---
+++
@@ -1,3 +1,5 @@
-The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We just make `CartesianProduct` an alias for `sage.sets.cartesian_product.CartesianProduct` (with some tweak to support the previous behavior which considered the cartesian product as a set of lists).
+The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We remove most occurrences of `CartesianProduct` to either `cartesian_product` or `itertools.product`.
-`sage.combinat.cartesian_product.CartesianProduct` is deprecated.
+follow up: #19192
+
+
Changed dependencies from #18290, #12955 to none
Branch pushed to git repo; I updated commit sha1. New commits:
57b82e3 | trax #18411 fixing a typo and doctest continuation |
Thanks Frédéric for fixing a doctest. Though, I do not see the point of modifying src/sage/rings/quotient_ring.py
. This file is completely unrelated to this ticket.
Branch pushed to git repo; I updated commit sha1. New commits:
a640c24 | trac #18411 fixing some doctests |
Hi Frédéric,
This was clearly not the way to fix composition_signed.py
. I removed this change from your commit. The rest of my commits should fix all issues with timed out testing (ie root system and padic) as well as the issue with tableau tuples.
Vincent
Branch pushed to git repo; I updated commit sha1. New commits:
70949c7 | Trac 18411: fix two doctests |
Branch pushed to git repo; I updated commit sha1. New commits:
9beb023 | Trac 18411: bound number of tests for Domains |
Description changed:
---
+++
@@ -1,5 +1,10 @@
The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We remove most occurrences of `CartesianProduct` to either `cartesian_product` or `itertools.product`.
+We also:
+- move the `__iter__` from `EnumeratedSets.CartesianProducts.ParentMethods` category to `Sets`
+- allows `cartesian_product` to be called with `list`, `tuple`, `set`, `frozenset`
+- introduce a function `bounded_number_of_tuples` in `sage.misc.misc` that is intensively used in the testing framework
+- refine the category of `Set([1,2,3])` to be finite
+- implement a (very naive) `random_element` for `Set([1,2,3])`
+
follow up: #19192
-
-
Branch pushed to git repo; I updated commit sha1. New commits:
6580825 | Trac 18411: fix is_empty |
The only failing doctest is fine when run independently... I am not sure what may have happend.
Vincent
Description changed:
---
+++
@@ -1,6 +1,6 @@
-The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We remove most occurrences of `CartesianProduct` to either `cartesian_product` or `itertools.product`.
+The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We remove all occurrences of `CartesianProduct` to either `cartesian_product` or `itertools.product`. We also deprecate the `CartesianProduct` from `sage.combinat.cartesian_product`.
-We also:
+In order to support all features of the old class we also:
- move the `__iter__` from `EnumeratedSets.CartesianProducts.ParentMethods` category to `Sets`
- allows `cartesian_product` to be called with `list`, `tuple`, `set`, `frozenset`
- introduce a function `bounded_number_of_tuples` in `sage.misc.misc` that is intensively used in the testing framework
I was worried with CombinatorialFreeModule
but it went smoothly. I just need to add a commit for the deprecation!
Description changed:
---
+++
@@ -6,5 +6,6 @@
- introduce a function `bounded_number_of_tuples` in `sage.misc.misc` that is intensively used in the testing framework
- refine the category of `Set([1,2,3])` to be finite
- implement a (very naive) `random_element` for `Set([1,2,3])`
+- implement a (naive) hash for `EnumeratedSetFromIterator`
follow up: #19192
Description changed:
---
+++
@@ -1,4 +1,4 @@
-The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We remove all occurrences of `CartesianProduct` to either `cartesian_product` or `itertools.product`. We also deprecate the `CartesianProduct` from `sage.combinat.cartesian_product`.
+The features of `sage.combinat.cartesian_product.CartesianProduct` are now completely integrated into the category framework (see #18290). We remove all occurrences of `CartesianProduct` to either `cartesian_product` or `itertools.product`. We deprecate the `CartesianProduct` from `sage.combinat.cartesian_product`.
In order to support all features of the old class we also:
- move the `__iter__` from `EnumeratedSets.CartesianProducts.ParentMethods` category to `Sets`
@@ -8,4 +8,5 @@
- implement a (very naive) `random_element` for `Set([1,2,3])`
- implement a (naive) hash for `EnumeratedSetFromIterator`
-follow up: #19192
+see also : #15425
+one that can be closed as duplicate: #14224, #19192
Annoying bug:
sage: F = FiniteEnumeratedSet([int(1), int(2)])
sage: F(1)
Traceback (most recent call last):
...
TypeError: Cannot convert int to sage.structure.element.Element
And the following is also a bug IMHO
sage: FiniteEnumeratedSet([1,2]) is FiniteEnumeratedSet([int(1),int(2)])
True
I got into troubles. Combinatorial free modules are too laxist and you discover mistakes only very lately... in the following an element g
is built
sage: M = SchurTensorModule(QQ, 2, 2)
sage: A = M._schur
sage: f = M.basis()[(1,1)]
sage: e = A.basis().values()[0]
sage: g = e*f
but it is not valid in the sense that the keys do not correspond to the basis
sage: map(type, g.monomial_coefficients().keys())
[<type 'tuple'>]
sage: g.parent().basis().keys()
The cartesian product of ({1, 2}, {1, 2})
And hence you silently got
sage: g.to_vector()
(0, 0, 0, 0)
All right, my solution is to not use cartesian_product
in combinatorial free module and postponed this step to #19195. Needs review again.
Vincent
Description changed:
---
+++
@@ -8,5 +8,5 @@
- implement a (very naive) `random_element` for `Set([1,2,3])`
- implement a (naive) hash for `EnumeratedSetFromIterator`
-see also : #15425
+see also : #15425, #19195
one that can be closed as duplicate: #14224, #19192
Patchbot's green light ;-)
Branch pushed to git repo; I updated commit sha1. New commits:
c2eeac8 | Trac 18411: removed unused import |
I just implemented the changes requested By Nicolas Thiéry while we discussed on phone.
Reviewer: Nicolas Thiéry
The features of
sage.combinat.cartesian_product.CartesianProduct
are now completely integrated into the category framework (see #18290). We remove all occurrences ofCartesianProduct
to eithercartesian_product
oritertools.product
. We deprecate theCartesianProduct
fromsage.combinat.cartesian_product
.In order to support all features of the old class we also:
__iter__
fromEnumeratedSets.CartesianProducts.ParentMethods
toSets.CartesianProducts.ParentMethods
cartesian_product
to be called withlist
,tuple
,set
,frozenset
cartesian_product([])
workssome_tuples
insage.misc.misc
that is intensively used in the testing framework (and incidentally speed up some doc test)Set([1,2,3])
to be finiterandom_element
forSet([1,2,3])
EnumeratedSetFromIterator
see also : #15425, #19195 one that can be closed as duplicate: #14224, #19192
Depends on #17411
CC: @nthiery @nathanncohen
Component: combinatorics
Author: Vincent Delecroix
Branch/Commit:
6e27dde
Reviewer: Nicolas M. Thiéry
Issue created by migration from https://trac.sagemath.org/ticket/18411