[sage-devel] containment

2024-02-24 Thread 'Martin R' via sage-devel
In combinat/free_module.py, CombinatorialFreeModule, I find the doctest below. Do we *really* want that 5/3 is not in CombinatorialFreeModule(QQ,["a", "b"])??? Martin def __contains__(self, x): """ TESTS:: sage: F = CombinatorialFreeModule(QQ,["a", "b"])

[sage-devel] containment in a set different from containment in a set - help needed

2022-12-02 Thread 'Martin R' via sage-devel
I need help with https://trac.sagemath.org/ticket/34817 Essentially, I have a list P and an object g such that g in P but g not in set(P). How could this happen? -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group

[sage-devel] Containment and general/special linear

2012-09-26 Thread Greg Laun
Hi Everyone, I'm sorry if this has been discussed, but I can't find a discussion. I noticed the following behavior: sage: matrix(GL(2),2,[1,0,0,1]) in GL(2,CC) True so 'in' ignores base ring. The problem is that __contains__ for general_linear.pyx and special_linear.pyx only check whether a