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" <nthi...@users.sf.net>
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.


Reply via email to