$\overline{HALT}=$ { (M, w) : M does not halt on w }
$TOTAL=$ { M : M halts on every input }
The following is the proof from Hopcoft that TOTAL is not R.E.
Let R(x) be the following machine:
1) Simulate M on w for n steps
2) IF M halts after n steps Loop ELSE Halt
R halts on all inputs if and only if M does not halt on w.
Since $\overline{HALT}$ is not R.E neither is $TOTAL$
It's not clear to me why the simulation is only for n steps. If M halts only after n+1 steps doesn't the proof fail? I'm probably missing some context of what Hopcroft meant by "n steps". Could someone clarify?