Some bug in SymmetricFunctions over QQ['t']

27 views
Skip to first unread message

Xie

unread,
Feb 7, 2022, 11:31:43 PM2/7/22
to sage-support
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.


Vincent Delecroix

unread,
Feb 8, 2022, 2:23:47 AM2/8/22
to sage-s...@googlegroups.com
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

Vincent Delecroix

unread,
Feb 8, 2022, 2:29:18 AM2/8/22
to sage-s...@googlegroups.com
I opened the following ticket

https://trac.sagemath.org/ticket/33313

to track and hopefully solve the issue.

Thanks for your report.

Best
Vincent
Reply all
Reply to author
Forward
0 new messages