1

As far as I know, the first statement of the correspondence is between two formal theories named simply typed lambda calculus and intuitionistic propositional logic, which maps types to formulas and terms to proofs. We also have other statements for higher order logics and type theories.

But it is also famous to replace the word "term" with "program" when people try to express the correspondence informally (like Wikipedia). I think that if we assume that programs and terms are same things here, then we can conclude that writing a program, which means expressing a program in a possibly Turing-complete language, is actually proving a mathematical theorem intuitionistically (without the use of law of excluded middle and other proof techniques that are banned for an intuitionist!) Is this true?

I think that replacing the word "term" with "program" is misleading here! Because in any statements of the correspondence that I am aware of, we don't have a Turing-complete type theory, and I don't think that type theories are computational models like Turing machines and untyped lambda calculus. Also I think the fact that untyped lambda calculus is equivalent to Turing machine is also misleading to think that a term in a type theory is equivalent to some Turing machine, while as far as I know the equivalence between untyped lambda calculus and Turing machines is not necessarily a bijection, and even if it is, what does it have to do with simply typed lambda calculus?! All in all, don't you think that using the word "program" in the statement is wrong and misleading?

  • 3
    I don't quite want to vote to close as a duplicate, but I think you'll find this question very interesting. – Chris Grossack Aug 08 '23 at 00:44
  • 4
    Also, what do you mean by a "turing complete type theory"? We always want our type theory to have decidable type checking, so it provably can't be turing complete (and, if we really want to be careful, neither can our term-language (read: the programming language itself, rather than its types)) – Chris Grossack Aug 08 '23 at 00:47
  • 1
    @HallaSurvivor One useful type theory with undecidable type checking is extensional Martin-Löf type theory. This theory has gone somewhat out of fashion recently. – Mark Saving Aug 08 '23 at 04:15
  • @HallaSurvivor I think when we say "program" we are referring to all the things that can be expressed with Turing machines. While "term" can have a limited meaning. And thanks for the link, that was useful. I don't know if this question should be closed right now. – Senmorta Aug 08 '23 at 11:48
  • 1
    Technically, for the Curry-Howard correspondence you usually want to restrict to programs such that you can always prove termination in finite time. That means you're not quite Turing-complete. Though you're very close - for example, that does still allow for a program which takes a description of a Turing machine, an initial tape, and a positive integer $n$ and runs the Turing machine for up to $n$ steps. (The reason for this restriction being that an infinite loop program can be viewed as proving a contradiction.) – Daniel Schepler Aug 08 '23 at 16:13
  • 1
    Please don't rely on the title of your MSE questions to convey important information. The body of your question should be self-contained. In this case, I read your question and the comments without knowing what your were asking. As for the mathematics writing a well-typed program is indeed proving a theorem of a sort (although it is the type-checker that actually did the proof). The content of that theorem depends on the programming language and can be very weak. As for your last paragraph, there are many different type theories and you need to be much more specific in your criticisms. – Rob Arthan Aug 09 '23 at 21:15

0 Answers0