Please explain the error in my reasoning with this:
Let T be a formal theory within which Godel's first incompleteness theorem can be proved. In other words... suppose when we write the proof of godel's incompleteness theorem we are doing so within theory T. And suppose theory T is also of the kind Godel's incompleteness theorem refers to... ie: formal theory capable of doing arithmetic etc...
Can such a theory T as described above exist?
If it is possible... then by proving godel's incompleteness theorem within T... we prove that the Godel sentence for T is true... we also prove that the godel sentence is true and unprovable since the theorem applies to theory T.... a contradiction.
So my question is... about the theory within which godel's incompleteness theorem itself is proved... if the theorem is proved within a theory T... then is there something that stipulates the proof cannot itself be applied to theory T...
So when Godel's incompleteness theorem is proved... it applies to all formal theories except the one within which the theorem itself is proved?
Or is the writing of the proof of godel's incompleteness theorem done outside something referred to as a "formal theory capable of arithmetic" ?
Appreciate any help with this.