I don't think it is possible for FullSimplify
to assess how far it is from a meaningful reduction of complexity. At every stage parts of the expression may after some transformation cancel (or not).
Sometimes complexity has to be increased before it can be lowered (as I showed in this answer). Simplification is the process of minimizing complexity, where the complexity function has numerous local minimums. This is basically a very difficult and unpredictable problem.
To have some kind of progress indication you could provide FullSimplify
with a ComplexityFunction
of your own, one which stores the complexity of the expressions fed through it:
lc = {}; (* List to store intermediate complicity values *)
myLeafCount[expr_] := Module[{c}, AppendTo[lc, c = LeafCount[expr]]; c]
The Automatic
method is slightly more complicated than LeafCount
(you can find it at the bottom of the ComplexityFunction
page), but for a demonstration this suffices.
First, lets pick a function to simplify. This question has a nice, complex one:
expr = x[t] /.
DSolve[{z'[t] == d (x[t] + u) - k (z[t] + s),
y'[t] == -R*x[t] v - R y[t] u - R u v + k (1 - c (x[t] + u) - (y[t] + v)),
x'[t] == R x[t] v + R y[t] u + R u v - x[t] - u},
{y[t], z[t], x[t]}, t];
It has a huge LeafCount
:
myLeafCount[expr]
(* 34464 *)
Then we generate a dynamic plot of the intermediate results
Dynamic[ListPlot[lc]]
and we start the simplification:
FullSimplify[expr, ComplexityFunction -> myLeafCount]
We get a refresh of the plot for every call to myLeafCount
.
After 20 steps:

100 steps:

1,000 steps (note Mathematica rescales the plot to show the parts it thinks are most interesting):

10,000 steps:

100,000 steps:

200,000 steps:

and after a few hours it ends at 312,893 steps:

with a result that has a LeafCount
of 727.
As you can see there are quite a few very similar patterns in it. My guess it is trying various permutations of sub-expressions recursively.
Although this is a poor substitute for a progress bar (especially given that it is still difficult to see when it will finish), it will give you some indication of what's going on and whether the simplification process got stuck somewhere.
I guess this all should also suffice to show why it would be very difficult to make a real progress bar.
TimeConstraint
option $\endgroup$TimeConstraint
as suggested by @BobHanlon $\endgroup$FullSimplify
iterates through a finite set of substitution rules. Given a starting size of an input it might be able to produce a worst case scenario estimate of required iterations and then update it while the expression is being simplified. $\endgroup$