Re: [sage-combinat-devel] bug in Weyl groups?
On Tue, Jul 16, 2013 at 02:49:20PM -0700, Anne Schilling wrote: > On a similar note, should containment only hold if the objects are typed? > Currently we have > >sage: [[1,2,3],[2]] in Tableaux() >True > > Should I do the same for weak tableaux? Currently > >sage: T = WeakTableaux(3, [1], [1]) >sage: [[1]] in T >False >sage: T([[1]]) in T >True > > which I think is a better behavior, but would not be consistent with > the tableaux behavior! Yes, for the same reason I also believe this to be a better behavior. Also, after the fact, it's easier to make ``in`` more permissive than the converse (the former is more like adding a feature, so it's less likely to break backward compatibility). So in doubt ... And maybe we should eventually make the whole thing consistent by making ``in`` less permissive for tableaux. Cheers, Nicolas -- Nicolas M. Thiéry "Isil" http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] bug in Weyl groups?
On 7/16/13 2:03 PM, Nicolas M. Thiery wrote: > On Tue, Jul 16, 2013 at 11:23:05AM -0700, Anne Schilling wrote: >> Is this a bug? >> >> sage: WA = WeylGroup(['A',2,1]) >> sage: WB = WeylGroup(['B',2,1]) >> sage: wa = WA.an_element() >> sage: wa in WA >> True >> sage: wa in WB >> True > > A potential explanation about what happens: WA and WB are groups of > matrices. So `in` tries to convert wa by making it into a matrix, and > checking if this matrix is in the group WB, which it is. > > I personally put this in the bag of ugly side effects we get for using > too often conversions in containment tests. Especially since this > containment test can be quite expensive. So I'd be happy to qualify > this as a bug. > > If you want a safe and fast way to test that the parent of w is WB, > you can use: > > WB.is_parent_of(w) Ok, thank you! On a similar note, should containment only hold if the objects are typed? Currently we have sage: [[1,2,3],[2]] in Tableaux() True Should I do the same for weak tableaux? Currently sage: T = WeakTableaux(3, [1], [1]) sage: [[1]] in T False sage: T([[1]]) in T True which I think is a better behavior, but would not be consistent with the tableaux behavior! Best, Anne -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/groups/opt_out.
Re: [sage-combinat-devel] bug in Weyl groups?
On Tue, Jul 16, 2013 at 11:23:05AM -0700, Anne Schilling wrote: > Is this a bug? > > sage: WA = WeylGroup(['A',2,1]) > sage: WB = WeylGroup(['B',2,1]) > sage: wa = WA.an_element() > sage: wa in WA > True > sage: wa in WB > True A potential explanation about what happens: WA and WB are groups of matrices. So `in` tries to convert wa by making it into a matrix, and checking if this matrix is in the group WB, which it is. I personally put this in the bag of ugly side effects we get for using too often conversions in containment tests. Especially since this containment test can be quite expensive. So I'd be happy to qualify this as a bug. If you want a safe and fast way to test that the parent of w is WB, you can use: WB.is_parent_of(w) Cheers, Nicolas -- Nicolas M. Thiéry "Isil" http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/groups/opt_out.
[sage-combinat-devel] bug in Weyl groups?
Hi! Is this a bug? sage: WA = WeylGroup(['A',2,1]) sage: WB = WeylGroup(['B',2,1]) sage: wa = WA.an_element() sage: wa in WA True sage: wa in WB True Best, Anne -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/groups/opt_out.