Intro
Well, itβs been the far better part of a year since Iβve intended to write a follow up entry to the propositional logic. Hopefully I am still able to retain my chain of thought, but if it drifts or seems different that is why. Once again, this series is built off of the lecture work of Aris Papadopoulos.
Math
A review of the basics
Go back and read the introduction post for propositional logic if you havenβt already. Generally, we defined
- Syntax, the propositional variables and connectives that are used to construct formulas (along with subformulas and substitution)
- Semantics, the truth values of formulas and how they are evaluated (which led to models, tautologies, logical entailment and equivalence, and unsatisfiability)
- And Expressive Power, which details how a formula defines a truth function with some finite support. This led us to finish with adequacy.
Now, we want to look at how we can use these tools to prove things. What we really did in the last part of the series was to demonstrate the meaning of propositional formulas. But what we really want is a way to prove things about formulas, specifically which formulas are always true (eg tautologies). Furthermore, weβd like them to be automated, or at least computable.
That is, weβd like a system of proofs that a βcomputerβ can carry out. Eventually, we will build first a computer that is hopefully only capable of proving tautologies.
Recall last time that there was a theorem that is adequate. This means that we can use only these two connectives to express any truth function. Unfortunately at the time I was too busy to believe in proofs, so I didnβt write one; there are a lot of cool proofs online that show this, and you should look one up! So, we will build a proof system that uses only these two connectives for now.
Iβll try to provide proofs when they are easy to understand and are useful.
The computer
We want to expand on what the computer actually does.
Definition (Proof System): A proof system is a symbolic system that allows us to derive formulas from other formula. A proof system composes a set of axioms, and a set of deduction rules.
Definition (Axiom): An axiom is a formula that is assumed to be true.
Definition (Deduction Rule): A statement that allows us to derive a formula from other formulas. That is, assuming some formula is true, we can derive another formula.
We will first work with the following extremely simple proof system:
Axioms:
- (A1)
- (A2)
- (A3) for any formula .
Deduction Rules:
- Modus Ponens (MP): If and are both true, then is true.
Now, we will define the method by which we can utilize this proof system.
Definition (Formal Proof): A formal proof of formula is a finite sequence of formulas such that , and for each , one of the following is true:
- is an axiom
- is derived from some and with using the deduction rules.
Definition (Theorem): If there exists a formal proof of formula , then we say that is a theorem, and we write .
Definition (Deducible): Let be a set of formulas. Then, is deducible from if there exists a finite sequence of formulas such that , and for each , one of the following is true:
- is an axiom
- is derived from some and with using the deduction rules.
In this case, we write that .
Note here that we added the line . This is important; the notation essentially says that not only is there a proof of , but there is the restriction that is provable from the set of formulas . In general, is a stronger statement than , since the latter is a restriction of the former and states essentially that we can prove without the βassumptionsβ that construct .
Example: We want to prove that . We can do this as follows (note that we can use any formula as a placeholder for and in the axioms, including using for more than one):
Now you may say, βNyx, this proof system thing seems absurd. Who is writing out this by hand to show that something obviously true is true?β Itβs correct that this starting proof is unnecessarily verbose for something like . But now we can just add that is provable, and we can use it in future proofs. More importantly, this entire system is computable and mechanized, and we can gradually build upon it to build more and more complex formulas.
If you have assumptions as part of , you can also declare the assumptions as steps in the proof similar to axioms. For example, if we have
Example: Prove if . We can do this as follows:
Soundness and Completeness
The central idea of soundness is that if a formula is provable, then it is true. That is, if we can prove a formula under our system, then in order for our system to be sound it must be the case that the formula is true. This ensures that we cannot report a βfalse positiveβ, and this concept of βsoundnessβ is generally used in a lot of computing and logic.
Theorem (Soundness of Predicate Logic): If , then . In particular, if , then . In particular, this states that every theorem is a tautology.
Proof: We need to show that contains all the axioms, all the formulas in , and is closed under the deduction rules (in our case MP). The first part is trivial because tautologies are closed under substitutions (recall the last lesson) and (A1)-(A3) are tautologies by truth tables (try it yourself if you want). Then, if and , then by the definition of logical entailment, which we showed last time. And this completes the proof.
The idea of completeness then, is complementary to soundness. We want to show that if a formula is true, then it is provable. That is, our system can βcompleteβ the task of proving all tautologies. This is a much more difficult task, and we will not prove it here, but it is a very important result in logic.
Theorem (Completeness of Predicate Logic): If , then . In particular, if , then . In particular, this states that every tautology is a theorem.
This proof is difficult and is kind of what we want to build up to in this series; as a result, I will omit it now, but letβs be committed to learning it slowly over time. First, begin with the Deduction Theorem.
Lemma (Deduction Theorem): The following are equivalent:
These say that if we can prove from , then we can prove from and the assumption of . That is, if we can prove that implies , then we can prove if we assume . Intuitively, this makes sense, right? If we can prove that implies , then if we assume is true, we can conclude that is true. And in the other direction, if we can prove from and the assumption of , then by βpulling the assumption out into the statementβ, the proof should still hold the same way.
Proof: (1) (2): Well, this is just MP. If we have , then we can add to the proof and use MP to conclude .
(2) (1): This is a fair bit more difficult. Suppose that is a deduction of from . We want to show that . We will do this by induction on , where , that . Since , we would have that . Take some , an element in the sequence. Then, if is an axiom or an element of ,
If , then we can use the tautology to conclude that . Finally, suppose that by induction we have the deductions that for all . Then, we will show that there is a deduction . By assumption, is not an axiom, or an element of , so it is deducible using MP from some with . This also implies that is (without loss of generality) . By induction we have deductions and . Then,
And the proof is done.
End
A quick one. Next time, weβll go over adequacy theorem, inconsistency, compactness, and decidability.