Interesting question. I don't know if this behavior is intended but I think I can at least give some insight into the problem.
We can use a custom ComplexityFunction
with an embedded Print
to take a look at what transformed expressions are tested.
cf = (Print[#]; LeafCount[#] + Count[#, _Symbol, {0, -1}]) &;
We will also need to make use of ClearSystemCache[]
to see all simplification attempts.
First without Automatic
:
ClearSystemCache[]
Simplify[a + b, TransformationFunctions -> {t1, t2}, ComplexityFunction -> cf]
Observe that for whatever reason t1
and t2
are not applied to atomic elements when Automatic
is included:
ClearSystemCache[]
Simplify[a + b, TransformationFunctions -> {Automatic, t1, t2}, ComplexityFunction -> cf]
While the cause is not clear the solution is: write your transformation functions so that they work on compound expressions.
For example:
t3 = # /. {a -> 1, b -> 0} &;
Simplify[a + b, TransformationFunctions -> {Automatic, t3}]
1