Soundness and completeness
Logik f¨ ur Informatiker Logic for computer scientists
Till Mossakowski
WiSe 2013/14
Till Mossakowski Logic 1/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Proofs for Boolean Logic
Till Mossakowski Logic 2/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Summary of Rules
Propositional rules (
FT)
Conjunction Introduction (∧ Intro)
P1
⇓ Pn
...
. P1∧. . .∧Pn
Conjunction Elimination (∧ Elim)
P1∧. . . ∧Pi∧. . .∧Pn ...
. Pi
Disjunction Introduction (∨ Intro)
Pi ...
. P1∨. . .∨Pi∨. . .∨Pn
Disjunction Elimination (∨ Elim)
P1∨. . . ∨Pn ...
P1 ... S
⇓ Pn
... S ...
. S
557
Till Mossakowski Logic 3/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Summary of Rules
Propositional rules (
FT)
Conjunction Introduction (∧ Intro)
P1
⇓ Pn
...
. P1∧. . .∧Pn
Conjunction Elimination (∧ Elim)
P1∧. . . ∧Pi∧. . .∧Pn
... . Pi
Disjunction Introduction (∨ Intro)
Pi
...
. P1∨. . .∨Pi∨. . .∨Pn
Disjunction Elimination (∨ Elim)
P1∨. . . ∨Pn
... P1
... S
⇓ Pn
... S ...
. S
557
Till Mossakowski Logic 4/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Summary of Rules
Propositional rules (
FT)
Conjunction Introduction (∧Intro)
P1
⇓ Pn
...
. P1∧. . .∧Pn
Conjunction Elimination (∧ Elim)
P1∧. . . ∧Pi∧. . .∧Pn
... . Pi
Disjunction Introduction (∨Intro)
Pi ...
. P1∨. . .∨Pi∨. . .∨Pn
Disjunction Elimination (∨ Elim)
P1∨. . . ∨Pn ...
P1 ... S
⇓ Pn
... S ...
. S
557
Till Mossakowski Logic 5/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Summary of Rules
Propositional rules (
FT)
Conjunction Introduction (∧ Intro)
P1
⇓ Pn
...
. P1∧. . .∧Pn
Conjunction Elimination (∧ Elim)
P1∧. . . ∧Pi∧. . .∧Pn ...
. Pi
Disjunction Introduction (∨ Intro)
Pi ...
. P1∨. . .∨Pi∨. . .∨Pn
Disjunction Elimination (∨ Elim)
P1∨. . . ∨Pn ...
P1
... S
⇓ Pn
... S ...
. S
557
Till Mossakowski Logic 6/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Negation Introduction (¬ Intro)
P ...
⊥
. ¬P
Negation Elimination (¬ Elim)
¬¬P ...
. P
⊥Introduction (⊥ Intro)
P...
¬P ...
. ⊥
⊥Elimination (⊥Elim)
⊥...
. P
Conditional Introduction (→ Intro)
P ... Q
. P→Q
Conditional Elimination (→Elim)
P→Q ... P...
. Q
Summary of Rules
Till Mossakowski Logic 7/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
558 /Summary of Rules
Negation Introduction (¬Intro)
P ...
⊥
. ¬P
Negation Elimination (¬ Elim)
¬¬P ...
. P
⊥Introduction (⊥Intro)
P...
¬P ...
. ⊥
⊥Elimination (⊥ Elim)
⊥...
. P
Conditional Introduction (→ Intro)
P ... Q
. P→Q
Conditional Elimination (→ Elim)
P→Q ... P...
. Q
Summary of Rules
Till Mossakowski Logic 8/ 35
Soundness and completeness
558 /Summary of Rules
Negation Introduction (¬Intro)
P ...
⊥
. ¬P
Negation Elimination (¬ Elim)
¬¬P ...
. P
⊥Introduction (⊥Intro)
P...
¬P ...
. ⊥
⊥Elimination (⊥ Elim)
⊥...
. P
Conditional Introduction (→ Intro)
P ... Q
. P→Q
Conditional Elimination (→ Elim)
P→Q ... P...
. Q
Summary of Rules
Till Mossakowski Logic 9/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
558 /Summary of Rules
Negation Introduction (¬Intro)
P ...
⊥
. ¬P
Negation Elimination (¬ Elim)
¬¬P ...
. P
⊥Introduction (⊥Intro)
P...
¬P ...
. ⊥
⊥Elimination (⊥ Elim)
⊥...
. P
Conditional Introduction (→Intro)
P ... Q
. P→Q
Conditional Elimination (→ Elim)
P→Q ... P...
. Q
Summary of Rules
Till Mossakowski Logic 10/ 35
Soundness and completeness
Strategies and tactics in Fitch
1 Understandwhat the sentences are saying.
2 Decidewhether you think the conclusion follows from the premises.
3 If you think it does not follow, or are not sure, try to find a counterexample.
4 If you think it does follow, try to give aninformal proof.
5 If aformal proofis called for, use theinformal proof to guideyou in finding one.
6 In giving consequence proofs, both formal and informal, don’t forget the tactic ofworking backwards.
7 In working backwards, though, always check that yourintermediate goals are consequencesof the available information.
Till Mossakowski Logic 11/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Strategies in Fitch, cont’d
Always try to matchthe situation in your proof with the rules in the book (see book appendix for a complete list)
Look at the main connectivein a premise, apply the corresponding elimination rule (forwards)
Or: look at themain connective in the conclusion, apply the corresponding introduction rule(backwards)
Till Mossakowski Logic 12/ 35
Soundness and completeness
Conditionals
Till Mossakowski Logic 13/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Conditionals
178 / Conditionalsdo, however, make it much easier to say and prove certain things, and so are valuable additions to the language.
Section 7.1
Material conditional symbol: →
The symbol → is used to combine two sentences P and Q to form a new sentence P → Q, called a material conditional. The sentence P is called the antecedentof the conditional, andQis called theconsequentof the conditional.
We will discuss the English counterparts of this symbol after we explain its meaning.
Semantics and the game rule for the conditional
The sentence P →Q is true if and only if either P is false or Q is true (or both). This can be summarized by the following truth table.
P Q P →Q
t t T
t f F
f t T
f f T
truth table for →
A second’s thought shows that P → Q is really just another way of saying
¬P∨Q. Tarski’s World in fact treats the former as an abbreviation of the latter. In particular, in playing the game, Tarski’s World simply replaces a game rule for →
statement of the formP → Q by its equivalent ¬P∨Q.
Remember
1. IfP and Q are sentences of fol, then so is P →Q.
2. The sentence P → Q is false in only one case: if the antecedent P is true and the consequentQ is false. Otherwise, it is true.
English forms of the material conditional
We can come fairly close to an adequate English rendering of the material conditionalP → Q with the sentence If P then Q. At any rate, it is clear that if . . . then
Chapter 7
Game rule: P →Q is replaced by¬P ∨Q.
Till Mossakowski Logic 14/ 35
Soundness and completeness
Formalisation of conditional sentences
The following English constructions are all translatedP →Q:
IfP thenQ;Q ifP;P only ifQ; andProvidedP,Q.
Unless P,Q andQ unlessP are translated: ¬P →Q. Q is a logical consequence ofP1, . . . ,Pn if and only if the sentence (P1∧ · · · ∧Pn)→Q is a logical truth.
Till Mossakowski Logic 15/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
558 /Summary of Rules
Negation Introduction (¬Intro)
P ...
⊥
. ¬P
Negation Elimination (¬ Elim)
¬¬P ...
. P
⊥Introduction (⊥Intro)
P...
¬P ...
. ⊥
⊥ Elimination (⊥Elim)
⊥...
. P
Conditional Introduction (→Intro)
P ... Q
. P→Q
Conditional Elimination (→ Elim)
P→Q ... P...
. Q
Summary of Rules
Till Mossakowski Logic 16/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Negation Introduction (¬Intro)
P ...
⊥
. ¬P
Negation Elimination (¬ Elim)
¬¬P ...
. P
⊥Introduction (⊥Intro)
P...
¬P ...
. ⊥
⊥Elimination (⊥ Elim)
⊥...
. P
Conditional Introduction (→ Intro)
P ... Q
. P→Q
Conditional Elimination (→ Elim)
P→Q ... P...
. Q
Summary of Rules
Till Mossakowski Logic 17/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Biconditionals
182 / Conditionalsmeans of the biconditional: P ↔ Q. A sentence of the form P ↔ Q is true if and only if P and Q have the same truth value, that is, either they are both true or both false. In English this is commonly expressed using the expression if and only if. So, for example, the sentence Max is home if and only if Claire if and only if
is at the library would be translated as:
Home(max)↔ Library(claire)
Mathematicians and logicians often write “iff” as an abbreviation for “if iff
and only if.” Upon encountering this, students and typesetters generally con- clude it’s a spelling mistake, to the consternation of the authors. But in fact it is shorthand for the biconditional. Mathematicians also use “just in case” as a just in case
way of expressing the biconditional. Thus the mathematical claims n is even iff n2 is even, and n is even just in case n2 is even, would both be translated as:
Even(n)↔ Even(n2)
This use of “just in case” is, we admit, one of the more bizarre quirks of mathematicians, having nothing much to do with the ordinary meaning of this phrase. In this book, we use the phrase in the mathematician’s sense, just in case you were wondering.
An important fact about the biconditional symbol is that two sentences P and Q are logically equivalent if and only if the biconditional formed from them, P ↔Q, is a logical truth. Another way of putting this is to say that P ⇔ Q is true if and only if the fol sentence P ↔Q is logically necessary.
So, for example, we can express one of the DeMorgan laws by saying that the following sentence is a logical truth:
¬(P∨Q)↔ (¬P∧ ¬Q)
This observation makes it tempting to confuse the symbols↔ and⇔. This
↔ vs. ⇔
temptation must be resisted. The former is a truth-functional connective of fol, while the latter is an abbreviation of “is logically equivalent to.” It is not a truth-functional connective and is not an expression of fol.
Semantics and the game rule for ↔
The semantics for the biconditional is given by the following truth table.
P Q P↔ Q
t t T
t f F
f t F
f f T
truth table for ↔
Chapter 7
Game rule: P ↔Q is replaced by (P →Q)∧(Q →P).
Till Mossakowski Logic 18/ 35
Soundness and completeness
Biconditionals and logical equivalence
P and Q are logically equivalent (P ⇔Q) if and only if
the sentenceP ↔Q is a logical truth.
Note thatP ⇔Q is ameta statement, not a sentence of PL1.
Till Mossakowski Logic 19/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Conversational implicature
“Max is home unless Claire is at the library” can be formalised as
¬Library(claire)→Home(max) but many people would formalise it as
¬Library(claire)↔Home(max) The part
¬Library(claire)←Home(max)
is calledconservational implicature. It is possibly, but not necessarily meant by the English sentence.
An addition cancancelthe implicature:
“On the other hand, if Claire is at the library, I have no idea where Max is.”
Till Mossakowski Logic 20/ 35
Soundness and completeness
Truth-functional completeness
Definition
A logical connective istruth-functional, if the truth value of a complex sentence built up using these connectives depends on nothing more than the truth values of the simpler sentences from which it is built.
Truth-functional: ∧,∨,¬,←,↔
Not truth-functional: because, after, necessarily Definition
A set of logical connectives istruth-functionally complete, if it suffices to express every truth-functional connective.
Theorem
The set{∧,∨,¬} is truth-functionally complete.
Till Mossakowski Logic 21/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Example: a binary truth-functional connective
P Q Neither P nor Q
T T F
T F F
F T F
F F T ¬P∧ ¬Q
Neither P nor Q can be expressed as¬P ∧ ¬Q.
Till Mossakowski Logic 22/ 35
Soundness and completeness
Example: a ternary truth-functional connective
P Q R ♣(P,Q,R)
T T T T P∧Q∧R
T T F T P∧Q∧ ¬R
T F T F
T F F F
F T T T ¬P∧Q∧R
F T F F
F F T T ¬P∧ ¬Q∧R
F F F F
♣(P,Q,R) can be expressed as
(P∧Q∧R)∨(P ∧Q∧ ¬R)∨(¬P ∧Q∧R)∨(¬P∧ ¬Q∧R).
Till Mossakowski Logic 23/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Logical equivalences of (bi)conditionals
P →Q ⇔ ¬Q → ¬P P →Q ⇔ ¬P ∨Q
¬(P →Q) ⇔ P ∧ ¬Q
P ↔Q ⇔ (P →Q)∧(Q →P) P ↔Q ⇔ (P∧Q)∨(¬P∧ ¬Q)
Till Mossakowski Logic 24/ 35
Soundness and completeness
First-order rules (F)/ 559
Biconditional Introduction (↔ Intro)
P ... Q Q ... P
. P↔Q
Biconditional Elimination (↔ Elim)
P↔Q(or Q↔P) ...
P...
. Q
Reiteration (Reit)
P...
. P
First-order rules (
F)
Identity Introduction (=Intro)
. n=n
Identity Elimination (= Elim)
P(n)... n=m
...
. P(m)
First-order rules (F)
Till Mossakowski Logic 25/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
First-order rules (F)/ 559
Biconditional Introduction (↔ Intro)
P ... Q Q ... P
. P↔Q
Biconditional Elimination (↔ Elim)
P↔Q(orQ↔P) ...
P...
. Q
Reiteration (Reit)
P...
. P
First-order rules (
F)
Identity Introduction (=Intro)
. n=n
Identity Elimination (=Elim)
P(n)... n=m
...
. P(m)
First-order rules (F)
Till Mossakowski Logic 26/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Biconditional Introduction (↔ Intro)
P ... Q Q ... P
. P↔Q
Biconditional Elimination (↔ Elim)
P↔Q(orQ↔P) ...
P...
. Q
Reiteration (Reit)
P...
. P
First-order rules (
F)
Identity Introduction (=Intro)
. n=n
Identity Elimination (=Elim)
P(n)... n=m
...
. P(m)
First-order rules (F)
Till Mossakowski Logic 27/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Soundness and completeness
Till Mossakowski Logic 28/ 35
Soundness and completeness
Object and meta theory
Object theory = reasoningwithina formal proof system (e.g. Fitch)
Meta theory = reasoningabout a formal proof system
Till Mossakowski Logic 29/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Tautological consequence
A sentenceS is a tautological consequenceof a set of sentences T, written
T |=T S,
if all valuations of atomic formulas with truth values that make all sentences inT true also makeS true.
Till Mossakowski Logic 30/ 35
Soundness and completeness
Propositional proofs
S isFT-provable fromT, written T `T S,
if there is a formal proof ofS with premises drawn from T using the elimination and introduction rules for∨,∧,¬,→,↔and ⊥. Again note: T may be infinite.
Till Mossakowski Logic 31/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Soundness
Theorem 1. The proof calculusFT is sound, i.e. if T `T S,
then
T |=T S.
Proof: Book: by contradiction, using the first invalid step.
Here: by induction on the length of the proof.
Till Mossakowski Logic 32/ 35
Soundness and completeness
Soundness
Till Mossakowski Logic 33/ 35
Proofs for Boolean Logic Conditionals Soundness and completeness
Completeness
Theorem 2(Bernays, Post). The proof calculusFT is complete, i.e. if
T |=T S, then
T `T S.
This theorem will be proved later in the lecture.
Till Mossakowski Logic 34/ 35
Soundness and completeness
Completeness
Till Mossakowski Logic 35/ 35