Yes. Elements of F are linear combinations of the basis vectors a and b. 
Since 5/3 is not such a linear combination, it is certainly not in F.

On Saturday, February 24, 2024 at 4:35:56 PM UTC-5 Martin R wrote:

> 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: G = CombinatorialFreeModule(ZZ,["a", "b"])
>             sage: F.monomial("a") in F
>             True
>             sage: G.monomial("a") in F
>             False
>             sage: "a" in F
>             False
>             sage: 5/3 in F
>             False
>         """
>         return parent(x) == self  # is self?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/bebd9634-51d2-4a3b-bf20-a58e63d9f3c0n%40googlegroups.com.

Reply via email to