-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
Add the ability to substitute variables in InfinitePolynomialRing
.
sage: R.<z> = InfinitePolynomialRing(QQ)
sage: f = z[1] + z[1]*z[2]*z[3]
sage: f.subs({z[1]:z[0]})
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 f.subs({z[Integer(1)]:z[Integer(0)]})
File ~/Applications/sage/src/sage/structure/element.pyx:830, in sage.structure.element.Element.subs()
828 if str(gen) in kwds:
829 variables.append(kwds[str(gen)])
--> 830 elif in_dict and gen in in_dict:
831 variables.append(in_dict[gen])
832 else:
TypeError: unhashable type: 'InfinitePolynomialGen'
CC: @tscrim @mwhansen @simon-king-jena
Component: algebra
Keywords: polynomial infinite substitution subs
Author: Trevor K. Karn
Branch/Commit: a56e345
Reviewer: Tomer Bauer, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/34581