Skip to content

substitute doesn't substitute x*z in x*z*k? #443

@hwpang

Description

@hwpang

I expect substitute to substitute the xz in xz*k, but it doesn't? Is there a workaround? I'm using version 0.19.7.
Here's a minimal working example:

using SymbolicUtils

@syms x y z k

y = x*z*k

eq = 0.0 ~ y

println(eq.rhs) #got x*z*k
println(substitute(eq.rhs,Dict(x*z=>0))) #expecting to get 0, but got x*z*k

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions