After reading about the Curry-Howard correspondence, I came back to the commonly asked area of questioning for those less learned (such as I) in the areas of computability theory and logic: the connection between uncomputability in foundational computer science and incompleteness in formal systems. In order to examine this in a more formal manner, I wonder - is it possible to explicitly create, either in first/second/whatever-order logic or in a made up formal system, a statement which encodes the concept of the halting problem and is, as a consequence, incomplete (as in, either independent or true but unprovable)?
It's an unfortunate fact that the above question is deeply vague (because if I knew how to formulate it, I would have done so). Some sketches of possible ways of doing what I was describing above:
A formal system where one (or more) of the rules to get from a theorem $A$ to a new theorem $B$ essentially encodes performing an iteration of a Turing machine's tape-looking (perhaps in SKI-combinator form). Then, the undecidable statement here would be something to do with determining whether there exists a finite number $N$ for every proof of each such statement so that the length of the proof (the number of derivations required to get to it from the axioms) is $N$.
Perhaps a formal system which describes numbers and, in particular, the concept of busy beaver numbers. Then the incomplete statement would come somewhere from statements about whether one can prove that a given number $n$ is a Busy Beaver number (or an upper bound for one, or a lower bound or something).
Is it possible to formulate this more rigorously or is my question so vague that there is nothing meaningful here? If it possible to formulate more rigorously, are there some examples of "solutions"?
Yes. The "arithmetization" techniques developed by Gödel for the incompleteness theorem allows us to write just about any claim Turing machines as a first-order statement in the language of arithmetic. Gödel showed it suffices to have the constants $0$, $1$, operations $+$, $\times$, the relation $=$, and quantification over the natural numbers.
In particular, "such-and-such Turing machine terminates on such-and-such input" can be encoded as an arithmetical sentence in a systematic way, and we can then search for a proof of either it or its negation in our favorite proof system for arithmetical statements. Since it is easy to search for proofs (just enumerate all possible symbol strings and check whether each of them is a valid proof of what you're looking for), such a search would give an algorithm for the halting problem unless some of those sentences are undecidable.
The central trick in the construction is the beta function which allows you to express quantification over arbitrarily long finite sequences of natural numbers by a finite number of quantifiers over single natural numbers. Once you can quantify over such sequences, expressing a Turing machine computation is as easy as
Representing tapes as numbers is easy enough; just use base-$b$ representation for a $b$ large enough to contain the tape alphabet.