Download Formal deduction in propositional logic

Document related concepts

History of the function concept wikipedia , lookup

Abductive reasoning wikipedia , lookup

Axiom wikipedia , lookup

Ramism wikipedia , lookup

Fuzzy logic wikipedia , lookup

Mathematical proof wikipedia , lookup

Argument wikipedia , lookup

Willard Van Orman Quine wikipedia , lookup

Foundations of mathematics wikipedia , lookup

First-order logic wikipedia , lookup

Modal logic wikipedia , lookup

Syllogism wikipedia , lookup

Catuṣkoṭi wikipedia , lookup

Combinatory logic wikipedia , lookup

Propositional formula wikipedia , lookup

Sequent calculus wikipedia , lookup

Inquiry wikipedia , lookup

History of logic wikipedia , lookup

Quantum logic wikipedia , lookup

Theorem wikipedia , lookup

Mathematical logic wikipedia , lookup

Laws of Form wikipedia , lookup

Intuitionistic logic wikipedia , lookup

Law of thought wikipedia , lookup

Curry–Howard correspondence wikipedia , lookup

Jesús Mosterín wikipedia , lookup

Natural deduction wikipedia , lookup

Propositional calculus wikipedia , lookup

Transcript
Formal deduction in propositional logic
Lila Kari
The University of Western Ontario
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
1 / 44
’I know what you’re thinking about,’ said Tweedledum; ’but it isn’t
so, nohow.’
’Contrariwise,’ continued Tweedledee, ’if it was so, it might be; and if
it were so, it would be; but as it isn’t, it ain’t. That’s logic.’
(Lewis Caroll, “Alice in Wonderland”)
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
2 / 44
Formal deducibility
• We have seen how to prove arguments valid by using
truth tables and other semantic methods.
• We now want to replace this approach by a purely
syntactic one, that is, we give formal rules for deduction
which are purely syntactical.
• We want to define a relation called formal deducibility to
allow us to mechanically check the validity of a proof.
• The significance of the word formal will be explained
later. The important point is that formal deducibility is
concerned with the syntactic structure of formulas and
proofs can be checked mechanically.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
3 / 44
Notational conventions
• Suppose Σ = {A1 , A2 , A3 , . . . }.
For convenience, Σ may be written as a sequence
A1 , A2 , A3 , . . . .
• The sets Σ ∪ {A} and Σ ∪ Σ0 may be written as Σ, A
and Σ, Σ0 respectively.
• We use the symbol ` to denote the relation of formal
deducibility and write
Σ ` A
to mean that A is formally deducible (or provable) from
Σ.
• Formal deducibility is a relation between Σ ( a set of
formulas which are the premises) and A (a formula
which is the conclusion).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
4 / 44
The 11 rules of formal deduction
(1)
(2)
(3)
(4)
(5)
A ` A
If Σ ` A,
then Σ, Σ0 ` A.
(¬ −)
If Σ, ¬A ` B,
Σ, ¬A ` ¬B,
then Σ ` A.
(→ −) If Σ ` A → B,
Σ ` A,
then Σ ` B.
(→ +) If Σ, A ` B,
then Σ ` A → B.
(Ref)
(+)
Formal deduction in propositional logic
Reflexivity
Addition of premises
¬ elimination
→ elimination
→ introduction
CS2209, Applied Logic for Computer Science
5 / 44
The 11 rules of formal deduction (contd.)
(6)
(7)
(8)
(9)
(∧ −)
If Σ ` A ∧ B,
then Σ ` A,
Σ ` B.
(∧ +) If Σ ` A,
Σ ` B,
then Σ ` A ∧ B.
(∨ −) If Σ, A ` C ,
Σ, B ` C ,
then Σ, A ∨ B ` C .
(∨ +) If Σ ` A,
then Σ ` A ∨ B,
Σ ` B ∨ A.
Formal deduction in propositional logic
∧ elimination
∧ introduction
∨ elimination
∨ introduction
CS2209, Applied Logic for Computer Science
6 / 44
The 11 rules of formal deduction (contd.)
(10)
(↔ −)
(11)
(↔ +)
If Σ ` A ↔ B,
Σ ` A,
then Σ ` B.
If Σ ` A ↔ B,
Σ ` B,
then Σ ` A.
↔ elimination
If Σ, A ` B,
Σ, B ` A,
then Σ ` A ↔ B. ↔ introduction
Observation: Each of these rules is not a single rule, but a scheme of
rules, because Σ is any set of formulas, and A, B, C are any formulas.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
7 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Proof Suppose A ∈ Σ and Σ0 = Σ − {A}.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Proof Suppose A ∈ Σ and Σ0 = Σ − {A}.
(1) A ` A (by (Ref )).
(2) A, Σ0 ` A (by (+), (1))
(That is, Σ ` A.)
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Proof Suppose A ∈ Σ and Σ0 = Σ − {A}.
(1) A ` A (by (Ref )).
(2) A, Σ0 ` A (by (+), (1))
(That is, Σ ` A.)
• Step (1) is generated directly by the rule (Ref).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Proof Suppose A ∈ Σ and Σ0 = Σ − {A}.
(1) A ` A (by (Ref )).
(2) A, Σ0 ` A (by (+), (1))
(That is, Σ ` A.)
• Step (1) is generated directly by the rule (Ref).
• Step (2) is generated by the rule (+), which is applied to Step (1).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Proof Suppose A ∈ Σ and Σ0 = Σ − {A}.
(1) A ` A (by (Ref )).
(2) A, Σ0 ` A (by (+), (1))
(That is, Σ ` A.)
• Step (1) is generated directly by the rule (Ref).
• Step (2) is generated by the rule (+), which is applied to Step (1).
• At each of the steps, the rule appplied and the preceding steps
concerned (if any) form a justification for this step, and are written
on the right.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Show that
(∈) If A ∈ Σ
then Σ ` A.
Proof Suppose A ∈ Σ and Σ0 = Σ − {A}.
(1) A ` A (by (Ref )).
(2) A, Σ0 ` A (by (+), (1))
(That is, Σ ` A.)
• Step (1) is generated directly by the rule (Ref).
• Step (2) is generated by the rule (+), which is applied to Step (1).
• At each of the steps, the rule appplied and the preceding steps
concerned (if any) form a justification for this step, and are written
on the right.
• These steps are said to form a formal proof of the last line, Σ ` A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
8 / 44
Example
Prove that A → B, B → C ` A → C
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
9 / 44
Example
Prove that A → B, B → C ` A → C
The following sequence
(1)A → B, B → C , A ` A → B (by (∈))
(2)A → B, B → C , A ` A (by (∈))
(3)A → B, B → C , A ` B (by (→ −), (1), (2))
(4)A → B, B → C , A ` B → C (by (∈))
(5)A → B, B → C , A ` C (by (→ −), (4), (3))
(6)A → B, B → C ` A → C (by (→ +), (5))
consists of six steps.
At each step, one of the eleven rules or (∈), which has just been
proved, is applied.
On the right are written justifications for the steps.
These steps form a proof of A → B, B → C ` A → C which is
generated at the last step.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
9 / 44
Comments
Rules of formal deduction are only concerned with the syntactic
structure of formulas.
For instance, from
(∗) Σ, ¬A ` B
(∗∗) Σ, ¬A ` ¬B
we can generate
(∗ ∗ ∗) Σ ` A
by applying (¬−).
• The premise Σ from (∗ ∗ ∗) is the Σ in the premises
from (∗) and (∗∗).
• The conclusion A of (∗ ∗ ∗) results by deleting the
leftmost ¬ of ¬A in the premises of (*) and (**).
• The B of (∗) is an arbitrary formula.
• Therefore it can be checked mechanically whether the
rules are used correctly.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
10 / 44
Intuitive meaning of rules
• The elimination (introduction) of a connective means
that one occurrence of this connective is eliminated
(introduced) in the conclusion of the scheme of formal
deducibility generated by the rule.
• Remark: In (∨−) it is the ∨ between A and B in A ∨ B
that is eliminated in the conclusion C .
• (¬ −) expresses the method of indirect proof or proof by
contradiction: if a contradiction (denoted by B and ¬B)
follows from certain premises (denoted by Σ) with an
additional supposition that a certain proposition does
not hold (denoted by ¬A), then this proposition is
deducible from the premises (denoted by Σ ` A.)
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
11 / 44
Intuitive meaning of rules
• (∨ −) expresses the method of proof by cases. If C
follows from A and B separately, then C follows from “A
or B”.
• (→ +) expresses that to prove “If A then B” from
certain premises (denoted by Σ ` A → B), it is
sufficient to prove B from the premises together with A
(denoted by Σ, A ` B).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
12 / 44
Formal deducibility: Finding a proof
Definition. A is formally deducible from Σ, written as Σ ` A, iff
Σ ` A is generated by a (finite number of applications of) the rules
of formal deduction. The sequence of rules generating Σ ` A is
called a formal proof.
• A scheme of formal deducibility may have various formal proofs.
Perhaps one may not know how to construct a formal proof for it.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
13 / 44
Formal deducibility: Checking a proof
• It is significant however that any proposed formal proof can be
checked mechanically to decide whether it is indeed a formal proof of
this scheme.
• This is done by checking 1) whether the rules of formal deduction
are correctly applied, and 2) whether the last term of the formal
proof is identical with this scheme.
• In this sense, rules of formal deduction and formal proofs serve to
clarify the concepts of inference and proofs in informal reasoning.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
14 / 44
Formal deducibility and formal proof
By definition, the terms in a formal proof should be generated by the
rules of formal deduction. But in writing formal proofs we can use
the demonstrated schemes of formal deducibility because they can be
reduced to rules. Therefore the 11 rules are the 11 axioms of formal
deduction, while the schemes we have proved are theorems.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
15 / 44
Observations
• Tautological consequence (Σ |= A) and formal
deducibility (Σ ` A) are different matters. The former
belongs to semantics while the latter belongs to syntax.
• Both tautological consequence and formal deducibility
are studied in the metalanguage by means of reasoning
which is informal.
• |= and ` are not symbols in Lp . They should not be
confused with → which is a symbol in Lp , a connective
used for forming formulas..
• The connection between |= and → is that
A|=B iff A → B is a tautology.
• The connection between ` and → is that
A ` B iff ∅ ` A → B.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
16 / 44
Formal deducibility: Complete definition
Definition (Formal deducibility). A formula A is formally deducible
from Σ, written as Σ ` A, iff Σ ` A is generated by (a finite
number of applications of) the rules of formal deduction.
By the above definition, Σ ` A holds iff there is a finite sequence
Σ1 ` A1
...
Σn ` An
such that each term Σk ` Ak (k = 1, . . . , n) is generated by one
rule of formal deduction, and Σn ` An is Σ ` A (that is, Σn = Σ
and An = A).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
17 / 44
Comments
To say that Σk ` Ak is generated by a rule of formal deduction, say
(¬ −), means that in the subsequence
Σ1 ` A1
...
Σk−1 ` Ak−1
which precedes Σk ` Ak , there are two terms
Σk , ¬Ak ` B,
Σk , ¬Ak ` ¬B
where B is an arbitrary formula.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
18 / 44
Comments
In another example, if Σk ` Ak is generated by (∨ −), then there
are in the subsequence preceding Σk ` Ak two terms
Σ0 , B ` Ak ,
Σ0 , C ` Ak
where B and C are arbitrary formulas such that Σ0 , B ∨ C = Σk .
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
19 / 44
Formal proof: Complete definition
• The sequence
Σ1 ` A1
...
Σn ` An
is called a formal proof. It is a formal proof of its last
term Σn → An .
• Now the significance of the word “formal” has been
explained in full.
• The definition of formal deducibility is an inductive one.
We may compare this definition with the definition of
Form(Lp ) to see that schemes of deducibility correspond
to formulas, rules of formal deduction to formation rules.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
20 / 44
Proving statements about formal deducibility
Statements concerning formal deducibility can be proved by induction
on its complexity.
The basis of induction is to prove that A ` A, which is generated
directly by rule (Ref), has a certain property.
The induction step is to prove that the other ten rules preserve this
property
For instance, in the case of (∨ −), we suppose
Σ, A ` C
Σ, B ` C
have the required property and show that
Σ, A ∨ B ` C
also has this property.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
21 / 44
Finiteness of premise set
Theorem. If Σ ` A, then there is some finite Σ0 ⊆ Σ such that
Σ0 ` A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
22 / 44
Finiteness of premise set
Theorem. If Σ ` A, then there is some finite Σ0 ⊆ Σ such that
Σ0 ` A.
Proof. By induction on the complexity of Σ ` A.
Basis: The premise A of A ` A generated by (Ref) is itself finite.
Induction Step: We distinguish ten cases. For each case, assume that
the premises have the property and show that the corresponding
conclusion has the property.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
22 / 44
Finiteness of premise set
Theorem. If Σ ` A, then there is some finite Σ0 ⊆ Σ such that
Σ0 ` A.
Proof. By induction on the complexity of Σ ` A.
Basis: The premise A of A ` A generated by (Ref) is itself finite.
Induction Step: We distinguish ten cases. For each case, assume that
the premises have the property and show that the corresponding
conclusion has the property.
Example: Case of (→ −): “If Σ ` A → B, Σ ` A, then Σ ` B.”
By induction hypothesis, there exist finite subsets Σ1 and Σ2 of Σ
such that Σ1 ` A → B and Σ2 ` A. By (+) we have
Σ1 , Σ2 ` A → B and Σ1 , Σ2 → A.
Then, by (→ −), we have Σ1 , Σ2 ` B, where Σ1 , Σ2 is a finite
subset of Σ.
The proof of the other cases is left as exercise.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
22 / 44
Finitness of premise set
This theorem captures the intuition that, in a proof involving only
finitely many steps, we can only use finitely many formulas in Σ.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
23 / 44
Transitivity of deducibility
Theorem.
Let Σ ⊆ Form(Lp ) and A1 , A2 , . . . , An be formulas in Lp . If Σ ` Ai
for all i = 1, . . . n and A1 , A2 , . . . , An ` A, then Σ ` A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
24 / 44
Transitivity of deducibility
Theorem.
Let Σ ⊆ Form(Lp ) and A1 , A2 , . . . , An be formulas in Lp . If Σ ` Ai
for all i = 1, . . . n and A1 , A2 , . . . , An ` A, then Σ ` A.
Proof.
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
A1 , . . . An ` A
by supposition
A1 , . . . , An−1 ` An → A
by (→ +), (1)
∅ ` A1 → (. . . (An → A) . . . ) analogous to (2)
Σ ` A1 → (. . . (An → A) . . . ) by (+), (3)
Σ ` A1
by supposition
Σ ` A2 → (. . . (An → A) . . . ) by (→ −), (4), (5)
Σ ` An → A
analogous to (6)
Σ ` An
by supposition
Σ ` A
by(→ −), (7), (8)
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
24 / 44
Remarks
• The theorem of transitivity of deducibility is denoted by
(Tr).
• The sequence A1 , . . . An in (Tr) is finite. Otherwise (3)
in the above proof would be obtained by applying
(→ +) infinitely many times, contradicting the
finiteness of a formal proof.
• The conclusion of a scheme of formal deducibility
consists of one formula. When a number of schemes of
formal deducibility have the same premises, we may write
Σ ` A1 , . . . , An for Σ ` A1 , . . . , Σ ` An .
• Thus, (Tr) may be written as:
If Σ ` A1 , . . . , An ,
and A1 , . . . , An ` A,
then Σ ` A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
25 / 44
Natural deduction
Since the rules of formal deduction (for propositional logic) express
naturally and intuitively the rules of informal reasoning, the formal
deduction based upon these rules is called natural deduction.
There are other types of formal deduction, one of which will be
introduced later.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
26 / 44
Some useful theorems
Theorem
¬¬A ` A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
27 / 44
Some useful theorems
Theorem
¬¬A ` A.
Proof.
(1) ¬¬A, ¬A ` ¬A
(2) ¬¬A, ¬A ` ¬¬A
(3) ¬¬A ` A
Formal deduction in propositional logic
by (∈)
by (∈)
by (¬−), (1), (2).
CS2209, Applied Logic for Computer Science
27 / 44
Some useful theorems
Theorem If Σ, A ` B and Σ, A ` ¬B, then Σ ` ¬A. (Reductio
ad absurdum, (¬+)).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
28 / 44
Some useful theorems
Theorem If Σ, A ` B and Σ, A ` ¬B, then Σ ` ¬A. (Reductio
ad absurdum, (¬+)).
Proof
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
Σ, A ` B
Σ0 , A ` B
Σ, ¬¬A ` Σ0
¬¬A ` A
Σ, ¬¬A ` A
Σ, ¬¬A ` B
Σ, ¬¬A ` ¬B
Σ ` ¬A
Formal deduction in propositional logic
by supposition
take finite Σ0 ⊆ Σ
by (∈)
by (a)
by (+), (4)
by (Tr) , (3), (5), (2)
analogous to(6)
by (¬−), (6), (7).
CS2209, Applied Logic for Computer Science
28 / 44
Comments
• In (2) and (3) of the preceding proof, we used a finite
subset Σ0 to replace Σ because Σ may be infinite and
accordingly not available in (Tr).
• Suppose Σ0 = C1 , . . . Cn . Then (3) consists of n steps
Σ, ¬¬A ` C1 ,
...
Σ, ¬¬A ` Cn .
These can be written in one step because they are
generated by the same rule (∈).
• The theorem of reductio ad absurdum is denoted by
(¬+) and sometimes called ¬ introduction.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
29 / 44
(¬−) and (¬+)
• (¬+) and (¬−) are similar in shape but different in
strength.
• (¬−) is stronger than (¬+).
• (¬+) has just been proved. But, if (¬−) is replaced by
(¬+) in the rules, (¬−) cannot be proved.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
30 / 44
Syntactical equivalence
For two formulas A and B we write
A `a B
for A ` B and B ` A.
A and B are said to be syntactically equivalent iff A `a B holds.
We write a to denote the converse of `.
Lemma If A `a A0 and B `a B 0 then
(1)¬A `a ¬A0 .
(2)A ∧ B `a A0 ∧ B 0 .
(3)A ∨ B `a A0 ∨ B 0 .
(4)A → B `a A0 → B 0 .
(5)A ↔ B `a A0 ↔ B 0 .
Note the resemblance to analogous results about tautological
equivalences.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
31 / 44
Replaceability of syntactically equivalent formulas
in formal deduction, and other theorems
Theorem (Replacement of syntactically equivalent formulas)
If B `a C and A0 results from A by replacing some (not necessarily
all) occurrences of B in A by C , then A `a A0 .
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
32 / 44
Replaceability of syntactically equivalent formulas
in formal deduction, and other theorems
Theorem (Replacement of syntactically equivalent formulas)
If B `a C and A0 results from A by replacing some (not necessarily
all) occurrences of B in A by C , then A `a A0 .
Theorem
A1 , A2 , . . . An ` A iff ∅ ` A1 ∧ . . . ∧ An → A.
Theorem
A1 , . . . , An ` A iff ∅ ` A1 → (. . . (An → A) . . . ).
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
32 / 44
Special cases
• When the premise is empty we have the special case
∅ ` A of formal deducibility.
• Obviously, ∅ ` A iff Σ ` A for any Σ.
• It has been mentioned before that A is said to be
formally provable from Σ when Σ ` A holds.
• Now A is said to be formally provable when ∅ ` A
holds.
• The laws of non-contradiction ¬(A ∧ ¬A) and excluded
middle A ∨ ¬A are instances of formally provable
formulas.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
33 / 44
Soundness and Completeness
• Mathematical logic is the study of reasoning; The
(informal) deducibility relations between the premises
and conclusions are established by their truth values.
• (Tauto)logical consequence, which is defined in terms of
value assignments and truth values corresponds to
(informal) deducibility and involves semantics.
• Formal deducibility, which is defined by a finite number
of rules of formal deduction, is concerned with the
syntactical structures of formulas and involves syntax.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
34 / 44
Soundness
Suppose that the statement
(*) “If Σ ` A then Σ|=A.”
is true for any Σ and A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
35 / 44
Soundness
Suppose that the statement
(*) “If Σ ` A then Σ|=A.”
is true for any Σ and A.
(*) means that what formal deducibility expresses about premises and
conclusions also holds in informal reasoning.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
35 / 44
Soundness
Suppose that the statement
(*) “If Σ ` A then Σ|=A.”
is true for any Σ and A.
(*) means that what formal deducibility expresses about premises and
conclusions also holds in informal reasoning.
In other words, (*) means that we cannot prove incorrect statements.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
35 / 44
Soundness
Suppose that the statement
(*) “If Σ ` A then Σ|=A.”
is true for any Σ and A.
(*) means that what formal deducibility expresses about premises and
conclusions also holds in informal reasoning.
In other words, (*) means that we cannot prove incorrect statements.
If (*) holds for a given system of formal deducibility, that system is
called sound.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
35 / 44
Soundness
Suppose that the statement
(*) “If Σ ` A then Σ|=A.”
is true for any Σ and A.
(*) means that what formal deducibility expresses about premises and
conclusions also holds in informal reasoning.
In other words, (*) means that we cannot prove incorrect statements.
If (*) holds for a given system of formal deducibility, that system is
called sound.
The Soundness Theorem.
The system of natural deduction based on the eleven given rules of
formal deduction is sound.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
35 / 44
Completeness
Suppose that
(**) “If Σ|=A then Σ ` A.”
is true for any Σ and A.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
36 / 44
Completeness
Suppose that
(**) “If Σ|=A then Σ ` A.”
is true for any Σ and A.
(**) signifies that what holds in informal reasoning can be expressed
in formal deducibility.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
36 / 44
Completeness
Suppose that
(**) “If Σ|=A then Σ ` A.”
is true for any Σ and A.
(**) signifies that what holds in informal reasoning can be expressed
in formal deducibility.
In other words, (**) means that whatever is correct can be formally
proved.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
36 / 44
Completeness
Suppose that
(**) “If Σ|=A then Σ ` A.”
is true for any Σ and A.
(**) signifies that what holds in informal reasoning can be expressed
in formal deducibility.
In other words, (**) means that whatever is correct can be formally
proved.
If (**) holds for a system of formal deducibility, that system is called
complete.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
36 / 44
Completeness
Suppose that
(**) “If Σ|=A then Σ ` A.”
is true for any Σ and A.
(**) signifies that what holds in informal reasoning can be expressed
in formal deducibility.
In other words, (**) means that whatever is correct can be formally
proved.
If (**) holds for a system of formal deducibility, that system is called
complete.
Completeness Theorem.
The system of natural deduction based on the eleven given rules of
formal deduction is complete.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
36 / 44
Connection between syntax and semantics
• The Soundness and Completeness Theorem associates
the syntactic notion of formal deduction with the
semantic notion of (tauto)logical consequence, and
establishes the equivalence between them.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
37 / 44
Connection between syntax and semantics
• The Soundness and Completeness Theorem associates
the syntactic notion of formal deduction with the
semantic notion of (tauto)logical consequence, and
establishes the equivalence between them.
• The Soundness and Completeness Theorem says that
with natural deduction (as defined by the 11 rules) we
can prove
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
37 / 44
Connection between syntax and semantics
• The Soundness and Completeness Theorem associates
the syntactic notion of formal deduction with the
semantic notion of (tauto)logical consequence, and
establishes the equivalence between them.
• The Soundness and Completeness Theorem says that
with natural deduction (as defined by the 11 rules) we
can prove
The truth,
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
37 / 44
Connection between syntax and semantics
• The Soundness and Completeness Theorem associates
the syntactic notion of formal deduction with the
semantic notion of (tauto)logical consequence, and
establishes the equivalence between them.
• The Soundness and Completeness Theorem says that
with natural deduction (as defined by the 11 rules) we
can prove
The truth,
the whole truth (completeness),
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
37 / 44
Connection between syntax and semantics
• The Soundness and Completeness Theorem associates
the syntactic notion of formal deduction with the
semantic notion of (tauto)logical consequence, and
establishes the equivalence between them.
• The Soundness and Completeness Theorem says that
with natural deduction (as defined by the 11 rules) we
can prove
The truth,
the whole truth (completeness),
and nothing but the truth. (soundness)
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
37 / 44
Another system of formal deduction
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
A, B ` A ∧ B
A∧B ` B
A∧B ` A
A ` A∨B
B ` A∨B
A, A → B ` B
¬B, A → B ` ¬A
A → B, B → C ` A → C
A ∨ B, ¬A ` B
A ∨ B, ¬B ` A
A → B, ¬A → B ` B
A↔B ` A→B
A↔B ` B →A
A → B, B → A ` A ↔ B
A, ¬A ` B
Formal deduction in propositional logic
Law of combination
Law of simplification
Var. of law of simplification
Law of addition
Var. of law of addition
Modus ponens
Modus tollens
Hypothetical syllogism
Disjunctive syllogism
Var. of disjunctive syllogism
Law of cases
Equivalence elimination
Var. of equivalence elimination
Equivalence introduction
Inconsistency law
CS2209, Applied Logic for Computer Science
38 / 44
Exercise
Exercise
Assuming that we are in the system of natural deduction, prove the
laws (1) - (15) on the preceding slide.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
39 / 44
Complenetess of new system of formal deduction
The new system we have defined is not complete.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
40 / 44
Complenetess of new system of formal deduction
The new system we have defined is not complete.
To see this, consider the law of excluded middle, which is p ∨ ¬p.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
40 / 44
Complenetess of new system of formal deduction
The new system we have defined is not complete.
To see this, consider the law of excluded middle, which is p ∨ ¬p.
This law holds without premises, that is, ∅ |= p ∨ ¬p. It is easy to
see that, without premises, none of the rules of the new system can
be used.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
40 / 44
Complenetess of new system of formal deduction
The new system we have defined is not complete.
To see this, consider the law of excluded middle, which is p ∨ ¬p.
This law holds without premises, that is, ∅ |= p ∨ ¬p. It is easy to
see that, without premises, none of the rules of the new system can
be used.
Consequently, p ∨ ¬p cannot be derived if the rules of deduction are
restricted those listed to rules (1) - (15) from the new system.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
40 / 44
Deduction Law
Deduction Law.
If
B, A1 , A2 , A3 , . . . ` C
then
A1 , A2 , A3 , . . . ` B → C .
Together with this law, the new system is complete.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
41 / 44
The deduction law
To prove A → B in mathematics one often uses the following
informal argument.
1. Assume A, and add A to the premises.
2. Prove B, using A if necessary.
3. Discharge A, which means that A is no longer necessarily true, and
write A → B.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
42 / 44
Example
Example. A couple has a boy, and they are expecting a second child.
Prove that if the second child is a girl, then the couple has a girl and
a boy.
Solution: Let p be “the first child is a boy” and q be “the second
child is a girl”.
We want to prove q → p ∧ q, given that the premise is p. According
to the method under discussion, this can be done as follows:
1. p is true: the couple has a boy.
2. Assume q: that is, assume that the second child is a girl.
3. From p and q, conclude p ∧ q by the deduction rule of ∧
introduction.
4. At this stage, one is allowed to conclude that q → p ∧ q.
q can be now discharged; that is, q → p ∧ q is true even if q turns
out to be false: in this case, q → p ∧ q is trivially true.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
43 / 44
Example contd.
The reason is clear why this proof pattern holds. When proving
A → B, one only needs to consider the case where A is true: if A is
false, A → B is trivially false.
If A is true, then it may be added to the premises.
This shows the soundness of the procedure.
Essentially, the argument states that an assumption may be
converted into an antecedent of a conditional.
Formal deduction in propositional logic
CS2209, Applied Logic for Computer Science
44 / 44