I have a conditional expression
f[x_] := x /; x ∈ Reals
This works fine for normal numbers and symbols, e.g. {f[1], f[Sin[4]], f[I], f[a]} evaluates to {1, Sin[4], f[I], f[a]} as expected.
However, if I have an unknown number $b$ which I know to be real, I cannot get Mathematica to give $f(b)=b$. I have tried
Simplify[f[b], Assumptions -> {b ∈ Reals}]
but this evaluates to f[b].
;is a programming construct: it just influences evaluation. It is not meant o be used this way andSimplifywon't (and shouldn't) operate on it. I tried to write an answer but then I realized that the real question is: what do you want to do here? You can take a look atConditionalExpressionwhich is meant for representing a mathematical concept, but whether it is of use to you depends on what you are trying to do. – Szabolcs Jan 22 '15 at 23:41{f[1], f[Sin[4]], f[I], f[a]}evaluates to{1, Sin[4], f[I], f[a]}? – bbgodfrey Jan 22 '15 at 23:55ConditionalExpression, but as you may have guessed this was not my real problem, so I will try to figure out how to formulate my real question. – Nikki Bisschop Jan 23 '15 at 00:40f[x_] /; Simplify[x \[Element] Reals] := "success!"and thenAssuming[x \[Element] Reals, Simplify[f[x]]]which should yield"success!". Does this work for you? – Mr.Wizard Jan 23 '15 at 00:44