Skip to content

Warn with substitution of derived classes using equality #24255

@rwst

Description

@rwst

There is a long-standing problem with substitution in that some substitutions do not work when given as equality but do work when given as dictionary.

sage: (x*pi).subs(x*pi==e)
x*pi
sage: (x*pi).subs({x*pi:e})
e

sage: s = x.series(x,2); s
1*x + Order(x^2)
sage: (x*pi).subs(x*pi==s)
pi*x

It looks like that in some cases the conversion to dict switches lhs and rhs of the equation and this is because of such behaviour:

sage: x*pi==e
e == pi*x
sage: x == s
1*x + Order(x^2) == x

Component: symbolics

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions