# bug in basis or family?

I am having trouble dealing with modules with infinite bases and I think I pin-pointed the issue to the fact that there are no checks on elements belonging on a family. I am not sure if this is a feature of Sage or a bug so I'll accept any explanation on this. An example will clarify the issue:

sage: E = cartesian_product([{'L'}, NonNegativeIntegers()])
sage: ('L', 0) in E
True
sage: ('L', -2) in E
False
sage: M = CombinatorialFreeModule(QQ, E)
sage: B = M.basis()
sage: B[('L', -3)]
B[('L', -3)]
sage: B[('L', -3)] in M
True

So I am not sure I can trust any code I'm writing with CombinatorialFreeModule cause I can make those checks, but I will have to go over the source to see if every method that I am calling makes these checks. Somehow if this is a feature I should get a warning or something in the docs isn't it?

edit retag close merge delete