1

I'm trying to find a constructive proof for the proposition:

P => ((P => Q) => Q)

given P and Q to nullary proposition symbols but I can't find a proof without using the excluded middle rule. Anyone has an idea on how to build a constructive demonstration for the proposition?

  • 3
    "Assume $P$. Assume $P \Rightarrow Q$. From $P$ and $P \Rightarrow Q$ it follows that $Q$. QED." – Andrej Bauer Feb 15 '14 at 09:37
  • Thanks Andrej! God it couldn't be simpler. I need practice on resolving this kind of exercises. Do you know any book where I can find exercises similar to this one with solutions? –  Feb 15 '14 at 10:09

1 Answers1

5

Andrej Bauer explained the proof in a comment. But a useful technique if you can't think of a constructive proof is to try to construct a program with the same type. The structure of the program tells you the proof.

In this case we want a function of type $p\to(p\to q)\to q$. That is, the function takes an argument $x$ of type $p$ and an argument $y$ of type $p\to q$ and somehow produces a result of type $q$. There's evidently only one way to do this, which is to apply the function $y$ to the argument $x$. The function we get is $$\lambda x. \lambda y. y x.$$ Function abstraction $\lambda a. E$ where $a$ has type $s$ and $E$ has type $t$ means to assume $s$ and prove $t$. Function application $(y\ x)$ where $y$ has type $p\to q$ and $x$ has type $p$ mean to use modus ponens and deduce $q$.

So the proof that corresponds to the program above is:

  1. Assume $p$
  2. Assume $p\to q$
  3. From 1 and 2, deduce $q$
  4. From 2 and 3, conclude $(p \to q)\to q $
  5. From 1 and 4, conclude $p\to((p \to q)\to q)$

[ Addendum 20140823: I gave a talk that explains this in more detail; materials are here. ]

[ Addendum 20220310: A more interesting example of the same idea. ]

MJD
  • 65,394
  • 39
  • 298
  • 580