Skip to main content
2 of 2
replaced http://stackoverflow.com/ with https://stackoverflow.com/

I'm not sure I understand the spirit of your question. My apologies of this answer is obvious to you and you intended something else.

Simplify::badSet = "Function Set used in assumptions where is likely in error.";

SetAttributes[mySimplify, HoldAll];

mySimplify[expr_, assum_] :=
  Message[Simplify::badSet] /; ! FreeQ[Unevaluated@assum, Set]

mySimplify[else__] := Simplify[else]

Now:

mySimplify[x + y, x = a]

Simplify::badSet: Set used in assumptions where is likely in error. >>

You could overload Simplify itself if you are comfortable with such things. You'll want to be familiar with the Villegas-Gayley method of you choose that path.

Mr.Wizard
  • 273.1k
  • 34
  • 595
  • 1.4k