I opened the following ticket
https://trac.sagemath.org/ticket/33313
to track and hopefully solve the issue.
Thanks for your report.
Best
Vincent
Le 08/02/2022 à 08:20, Vincent Delecroix a écrit :
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/81223f6b-2d3e-60d6-708c-2f542842a620%40gmail.com.