Is it possible to detect the non-standard transformation rules (
UpValues, etc) that activate in an evaluation (and remove them)?
With non-standard I mean user defined, but the transformation rules assigned to Unprotected objects should be a good enough proxy for this.
So say I have assigned a downvalue for
f[x_]:= x, and I input
transformationDetection[f] it would output the downvalue (and optionally remove that downvalue). Similarly if a chain of transformations are triggered it would output all of them (and optionally remove all of them).