Another fact for classical T is that T is consistent iff Q' is trueD(D) does not halt. We have already shown that if T is consistent then Q' is trueD(D) does not halt. If T is inconsistent and classical then by the principle of explosion T proves both QW and Q'W', and so HG(CD,CD) halts, and hence Cso D(CD) doeshalts.
We do not even need T to be classical if we modify G to halt. Similarly if at some point it has found proofs within T of opposite statements. With this, it suffices to have the following extra condition on T (which is classical thencompatible with T being intuitionistic):
If T proves "It is not true that the program P halts on input X.":
T proves "It is not true that the program P halts on input X and outputs Y.".
If T is inconsistent:
G(D,D) halts (due to the modification).
Thus D(D) halts.
If T is consistent iff:
G behaves exactly as before.
Thus D(D) does not halt.
And T does not prove "It is not true that the program D halts on input D and outputs 0.".
Thus T does not prove "It is not true that the program D halts on input D.".
Thus T does not prove something equivalent to its own consistency!