Let G be a formula such that for all P and X, ⊢[G(P,X,0)⟺Q(X,0)], where P="Q".
Now, let D(P,n) := ¬G(P,P,n).
Assume ⊢D("D",0). Then, ⊢¬G("D","D",0) by def D. Then, ⊢¬D("D",0) by prop G.
Assume ⊢¬D("D",0). Then, ⊢G("D","D",0) by def D. Then, ⊢D("D",0) by prop G.
Therefore no such formula G exists.
---
Let G be a formula such that [⊢G(P,X,0)⟺Bew(P++"(X,0)")] and [⊢G(P,X,1)⟺Bew("¬"++P++"(X,0)")].
Then, for any P and X: let "Q"=P.
Assume ⊢Q(X,0). Then, ⊢Bew("Q(X,0)"). Therefore, ⊢G(P,X,0).
Assume ⊢¬Q(X,0). Then, ⊢Bew("¬Q(X,0)"). Therefore, ⊢G(P,X,1).