The element constructor looks buggy to me as it stores coefficients which are not in the base ring
sage: a = s([[2],[1]]) sage: a.coefficients()[0].parent() Integer Ring The division that is happening is (Integer 1) / (Integer 2) which is indeed impossible in the Integer Ring. This should have been (1 in QQ['t']) / (2 in QQ['t']) which is possible. The culprit is the function _from_dict which has a coerce argument which is set to False by default. It is called when you perform s([[2],[1]]) bt without changing this default. The difference with FractionField(R) is that it is a field. In that case another code path is used to perform the division. Vincent Le 08/02/2022 à 05:31, Xie a écrit :
R.<t>=QQ['t'] Sym=SymmetricFunctions(R); Sym.inject_shorthands(); s([[2],[1]])/2 will cause wrong: ValueError: 1 is not divisible by 2 But s([[2],[1]])*1/2 is good. s([[2],[1]])==s[1]. s[1]/2 is good. So, why? If we work on SymmetricFunctions(FractionField(R)), s([[2],[1]])/2 will work.
-- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/fc317921-2d94-41f1-c285-117f24586937%40gmail.com.
