sympy / sympy

A computer algebra system written in pure Python

Home Page:https://sympy.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dirac delta doesn't get simplified by `assuming`

icarosadero opened this issue · comments

Minimal example:

import sympy as sp

δ = sp.DiracDelta
x = sp.symbols('x', positive=True)
u = δ(x-1)

with sp.assuming(sp.Q.positive(x-1)):
    print(u)

The output is still $\delta(x-1)$ when it is expected to be just zero from the assumption.

The operation should be

In [18]: refine(u, Q.positive(x-1))
Out[18]: δ(x - 1)

There are many similar issues about this. The new assumptions and the evaluation code do not interact.