# Revision history [back]

### substitution in expression

Hi,

After reading Simplify shenanigans, I am very confused about the possibility of doing

sage: sin(x).subs(sin(x) == 3)
3


Which becomes even more funny with

sage: SR(2).subs(SR(2) == pi)
pi


I thought one may only set values to variable but no: I can set value to integers !

Is there a concrete example where this is useful ? Or this is just one more argument to avoid the use of the symbolic ring ?

Anyway the substitution is not at all consistent with the behavior of the symbolic ring. If such substitutions are allowed, then the expression SR(2) + SR(2) should not be simplified !

### substitution in expression

Hi,

After reading Simplify shenanigans, I am very confused about the possibility of doing

sage: sin(x).subs(sin(x) == 3)
3


Which becomes even more funny with

sage: SR(2).subs(SR(2) == pi)
pi


I thought one may only set values to variable but no: I can set value to integers !

Is there a concrete example where this is useful ? Or this is just one more argument to avoid the use of the symbolic ring ?

Anyway the substitution is not at all consistent with the behavior of the symbolic ring. If such substitutions are allowed, then the expression SR(2) + SR(2) should not be simplified !