Skip to content

schur functions construct elements with coefficients in the wrong base ring #33313

@videlec

Description

@videlec
sage: Sym = SymmetricFunctions(QQ['t'])
sage: Sym.schur()([[2], [1]]) / 2
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [51], in <module>
----> 1 Sym.schur()([[Integer(2)], [Integer(1)]]) / Integer(2)

File /usr/lib/python3.10/site-packages/sage/modules/with_basis/indexed_element.pyx:896, in sage.modules.with_basis.indexed_element.IndexedFreeModuleElement.__truediv__ (build/cythonized/sage/modules/with_basis/indexed_element.c:9578)()

File /usr/lib/python3.10/site-packages/sage/categories/rings.py:1349, in Rings.ElementMethods._divide_if_possible(self, y)
   1347 q, r = self.quo_rem(y)
   1348 if r != 0:
-> 1349     raise ValueError("%s is not divisible by %s"%(self, y))
   1350 return q

ValueError: 1 is not divisible by 2

The underlying reason for this error is that coefficients are stored as integers

sage: Sym.schur()([[2], [1]]).coefficients()[0].parent()
Integer Ring

Original report https://groups.google.com/g/sage-support/c/vxgtsSwJxXE

Depends on #33267

CC: @tscrim

Component: combinatorics

Author: Travis Scrimshaw

Branch: 5ffa2f0

Reviewer: Vincent Delecroix

Issue created by migration from https://trac.sagemath.org/ticket/33313

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions