TCS: Propositions as Types
Propositions as Types
Intuitionistic Logic and Natural Deduction
Intuitionistic logic insists upon a constructionist notion of truth. In particular, a proof of \(A\lor B\) must show which of \(A\) or \(B\) holds (different from classic logic).
Natural Deduction
Proof rules should come in pairs:
- Introduction rules which are like definitions of the logic operators.
- Elimination rules which are the consequences of theirdefinitions.
Both of them should be in harmony.
We will define the four kinds of rules, conjunction, implication, disjunction and falsehood in order.
Gentzen’s contribution:
Subformula principle: Proofs can be normalized so that no concepts enter the proof other than those contained in the final result (subformula).
This means we can use only the known proposition and the subformulas of the conclusion.
Guiding Question for Defining Logic
Martin-Löf: The meaning of a proposition is determined by what counts as a verification (or proof) of it.
- Proposition: \(A\)
- Justification: \(A \text{ true}\), \(A \text{ is true at time } t\), \(\dots\)
So that we need to determin a proposition by a verification(not only itself).
In this lecture, we only consider justification \(A \text{ true}\) so we omit thet suffix \(\text{true}\)
Conjunction
We define the local soundness and local completeness as follows:
Local Soundness: The elimination cannot give us new information.
Local Completeness: The elimination can reconstitute the proof by introduction
Implication
We define the hypothetical judgment at first:
This is not an inference as it consists of two inferences! We have conjunctions inferences at now.
Then we can define implication introduction and elimination rules:
In which that the \(^{x}\) means the local scope.
Disjunction
Define the disjunction as follows:
Falsehood
Falsehood is written as \(\bot\).
It has no introduction as we shouldn’t prove it.
Intuitionistic Natural Deduction
So, we can use these four to define some other operates such as \(\neg\), \(\top\) and \(\leftrightarrow\)
Now we can begin prove! The follows is some interesting conclusion:
But some weird things hapend as the following is not provable:
What the f***!
The most interesting is that:
(Gilvenko’s Theorem):, \(A\) is valid in classical logic if and only if \(\neg\neg A\) is valid in intuitionistic logic!
And intuitionistic logic is PSPACE-complete!
Propositions as Types
We write \(M: A\) to represent that \(M\) is a proof of \(A\) and alternatively \(M\) is a program of type \(A\).
So we can rewrite the four kinds of roles by \(\lambda\)-calculus!
Implication
From its local soundness we can get \(\beta\) reduction, and from local completeness we can get \(\eta\) rule!
Turing has proved that typed \(\lambda\)-calculus always terminates.
Conjunction
The local reduction and expansion can give out the meaning of \(\langle \cdot, \cdot\rangle\), \(\mathbf{fst}\) and \(\mathbf{snd}\)
Disjunction
Falsehood
No introduction rule.