Skip to content

Implement substitution in InfinitePolynomialRing #34581

@trevorkarn

Description

@trevorkarn

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions