cse 311 lecture 08: inference rules and proofs for ... · proving implications with the direct...
TRANSCRIPT
![Page 1: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/1.jpg)
CSE 311 Lecture 08: Inference Rules and Proofsfor Predicate LogicEmina Torlak and Kevin Zatloukal
1
![Page 2: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/2.jpg)
TopicsPropositional logic proofs
A brief review of .A quick look at predicate logic proofs
Inference rules for quantifiers and a “hello” world example.An in-depth look at predicate logic proofs
Understanding rules for quantifiers through more advanced examples.
Lecture 07
2
![Page 3: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/3.jpg)
Propositional logic proofsA brief review of .Lecture 07
![Page 5: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/5.jpg)
Inference rules for propositional logicTwo rules per binary connective: to eliminate and introduce it.
Intro
Elim
Intro
Elim
Direct Proof Rule
Modus Ponens
Direct Proof Rule is special: not like the other rules.
∧ A; B∴ A ∧ B
∧ A ∧ B∴ A, B
∨ A∴ A ∨ B, B ∨ A
∨ A ∨ B; ¬A∴ B
A ⟹ B∴ A → B
A; A → B∴ B
4
![Page 6: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/6.jpg)
Proving implications with the direct proof rule
Direct Proof Rule
The premise means “Given , we can prove .”
So the direct proof rule says that if we have such a proof, then we canconclude that is true.
A ⟹ B∴ A → B
A ⟹ B A B
A → B
5
![Page 7: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/7.jpg)
Proving implications with the direct proof rule
Direct Proof Rule
The premise means “Given , we can prove .”
So the direct proof rule says that if we have such a proof, then we canconclude that is true.
Example: prove .
1.1. Assumption1.2.1.3.
2. Direct Proof Rule
A ⟹ B∴ A → B
A ⟹ B A B
A → B(p ∧ q) → (p ∨ q)
p ∧ qpp ∨ q
(p ∧ q) → (p ∨ q)
Indent the proof subroutine.Write the assumption and the goal.
5
![Page 8: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/8.jpg)
Proving implications with the direct proof rule
Direct Proof Rule
The premise means “Given , we can prove .”
So the direct proof rule says that if we have such a proof, then we canconclude that is true.
Example: prove .
1.1. Assumption1.2. Elim : 1.11.3. Intro : 1.2
2. Direct Proof Rule
A ⟹ B∴ A → B
A ⟹ B A B
A → B(p ∧ q) → (p ∨ q)
p ∧ qp ∧p ∨ q ∨
(p ∧ q) → (p ∨ q)
Indent the proof subroutine.Write the assumption and the goal.Fill in the steps.
5
![Page 9: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/9.jpg)
Why does the direct proof rule work?Inference rules let us derive facts that are implied by the existing facts.
6
![Page 10: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/10.jpg)
Why does the direct proof rule work?Inference rules let us derive facts that are implied by the existing facts.
So, for every rule , is a tautology ( ).P
∴ QP → Q P → Q ≡ '
6
![Page 11: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/11.jpg)
Why does the direct proof rule work?Inference rules let us derive facts that are implied by the existing facts.
So, for every rule , is a tautology ( ).
The proof shows that is a tautology ( ),since it just a series of implications that we know are tautologies.
P∴ Q
P → Q P → Q ≡ '
P ⟹ Q P → Q P → Q ≡ '
6
![Page 12: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/12.jpg)
Why does the direct proof rule work?Inference rules let us derive facts that are implied by the existing facts.
So, for every rule , is a tautology ( ).
The proof shows that is a tautology ( ),since it just a series of implications that we know are tautologies.
So the Direct Proof Rule says that we can add to
our set of facts, if we can show that is a tautology.
P∴ Q
P → Q P → Q ≡ '
P ⟹ Q P → Q P → Q ≡ '
A ⟹ B∴ A → B
A → B
A → B
6
![Page 13: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/13.jpg)
Why does the direct proof rule work?Inference rules let us derive facts that are implied by the existing facts.
So, for every rule , is a tautology ( ).
The proof shows that is a tautology ( ),since it just a series of implications that we know are tautologies.
So the Direct Proof Rule says that we can add to
our set of facts, if we can show that is a tautology.
One way to show that is by writing a subproof, using allthe facts we have inferred up to that point.
P∴ Q
P → Q P → Q ≡ '
P ⟹ Q P → Q P → Q ≡ '
A ⟹ B∴ A → B
A → B
A → BA → B ≡ '
6
![Page 14: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/14.jpg)
An example proofProve .((p → q) ∧ (q → r)) → (p → r)
7
![Page 15: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/15.jpg)
An example proofProve .
1.1. Assumption1.2.1.3.
1.5.
2. DirectProofRule
((p → q) ∧ (q → r)) → (p → r)(p → q) ∧ (q → r)
p → r((p → q) ∧ (q → r)) → (p → r)
Write the premise and the conclusion.
7
![Page 16: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/16.jpg)
An example proofProve .
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.5.
2. DirectProofRule
((p → q) ∧ (q → r)) → (p → r)(p → q) ∧ (q → r)p → q ∧q → r ∧
p → r((p → q) ∧ (q → r)) → (p → r)
Write the premise and the conclusion.Work forwards and backwards.
We’ll need parts of 1.1 so Elim toget 1.2, 1.3.
∧
7
![Page 17: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/17.jpg)
An example proofProve .
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2.1.4.3.
1.5. Direct Proof Rule
2. DirectProofRule
((p → q) ∧ (q → r)) → (p → r)(p → q) ∧ (q → r)p → q ∧q → r ∧
p
rp → r
((p → q) ∧ (q → r)) → (p → r)
Write the premise and the conclusion.Work forwards and backwards.
We’ll need parts of 1.1 so Elim toget 1.2, 1.3.We can use DPR to get 1.5.
∧
7
![Page 18: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/18.jpg)
An example proofProve .
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3.
1.5. Direct Proof Rule
2. DirectProofRule
((p → q) ∧ (q → r)) → (p → r)(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
Write the premise and the conclusion.Work forwards and backwards.
We’ll need parts of 1.1 so Elim toget 1.2, 1.3.We can use DPR to get 1.5.Using MP on 1.2, 1.4.1 gives us 1.4.2.
∧
7
![Page 19: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/19.jpg)
An example proofProve .
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
((p → q) ∧ (q → r)) → (p → r)(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
Write the premise and the conclusion.Work forwards and backwards.
We’ll need parts of 1.1 so Elim toget 1.2, 1.3.We can use DPR to get 1.5.Using MP on 1.2, 1.4.1 gives us 1.4.2.Using MP on 1.3, 1.4.2 gives us 1.4.3.
∧
7
![Page 20: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/20.jpg)
Which facts can be used in a subproof?
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
A line in a (sub)proof can use a factat line if the set of assumptions andgivens that is derived from containsall the assumptions and givens that is derived from.
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
ki
ki
8
![Page 21: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/21.jpg)
Which facts can be used in a subproof?
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
A line in a (sub)proof can use a factat line if the set of assumptions andgivens that is derived from containsall the assumptions and givens that is derived from.So, 1.4.2 can use 1.2 because they arederived from the assumptions {1.1,1.4.1} and {1.1}, respectively.
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
ki
ki
8
![Page 22: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/22.jpg)
Which facts can be used in a subproof?
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
A line in a (sub)proof can use a factat line if the set of assumptions andgivens that is derived from containsall the assumptions and givens that is derived from.So, 1.4.2 can use 1.2 because they arederived from the assumptions {1.1,1.4.1} and {1.1}, respectively.Can 1.5 use 1.4.3?
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
ki
ki
8
![Page 23: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/23.jpg)
Which facts can be used in a subproof?
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
A line in a (sub)proof can use a factat line if the set of assumptions andgivens that is derived from containsall the assumptions and givens that is derived from.So, 1.4.2 can use 1.2 because they arederived from the assumptions {1.1,1.4.1} and {1.1}, respectively.Can 1.5 use 1.4.3?
No. Because 1.5 is derived from{1.1} and 1.4.3 from {1.1, 1.4.1}.
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
ki
ki
8
![Page 24: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/24.jpg)
Which facts can be used in a subproof?
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
A line in a (sub)proof can use a factat line if the set of assumptions andgivens that is derived from containsall the assumptions and givens that is derived from.So, 1.4.2 can use 1.2 because they arederived from the assumptions {1.1,1.4.1} and {1.1}, respectively.Can 1.5 use 1.4.3?
No. Because 1.5 is derived from{1.1} and 1.4.3 from {1.1, 1.4.1}.
Can 2 use 1.2?
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
ki
ki
8
![Page 25: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/25.jpg)
Which facts can be used in a subproof?
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
1.5. Direct Proof Rule
2. DirectProofRule
A line in a (sub)proof can use a factat line if the set of assumptions andgivens that is derived from containsall the assumptions and givens that is derived from.So, 1.4.2 can use 1.2 because they arederived from the assumptions {1.1,1.4.1} and {1.1}, respectively.Can 1.5 use 1.4.3?
No. Because 1.5 is derived from{1.1} and 1.4.3 from {1.1, 1.4.1}.
Can 2 use 1.2?No. Because 2 is derived from {}and 1.2 from {1.1}.
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r((p → q) ∧ (q → r)) → (p → r)
ki
ki
8
![Page 26: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/26.jpg)
Which facts can be used in a subproof? A mnemonic{
{
1.1. Assumption1.2. Elim : 1.11.3. Elim : 1.1
{
1.4.1. Assumption1.4.2. MP: 1.2, 1.4.11.4.3. MP: 1.3, 1.4.2
}
1.5. Direct Proof Rule}
2. Direct ProofRule
}
(p → q) ∧ (q → r)p → q ∧q → r ∧
pqr
p → r
((p → q) ∧ (q → r)) → (p → r)
This is just like Java’s scoping rules.
9
![Page 27: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/27.jpg)
A general proof strategy
1. Look at the rules for introducing connectives to see how you wouldbuild up the formula you want to prove from pieces of what is given.
2. Use the rules for eliminating connectives to break down the givenformulas so that you get the pieces need for 1
3. Write the proof beginning with what you figured out for 2 followed by 1.
Intro
Elim
Intro
Elim
Direct Proof Rule
Modus Ponens
∧ A; B∴ A ∧ B
∧ A ∧ B∴ A, B
∨ A∴ A ∨ B, B ∨ A
∨ A ∨ B; ¬A∴ B
A ⟹ B∴ A → B
A; A → B∴ B
10
![Page 28: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/28.jpg)
A quick look at predicate logic proofsInference rules for quantifiers and a “hello” world example.
11
![Page 29: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/29.jpg)
Inference rules for quantifiers
Elim
Intro
Intro
Elim
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for anarbitrary value in the domain. Noother name in depends on .
a
P a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for avalue in the domain where is true.List all dependencies for .
cP(c)
c
12
![Page 30: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/30.jpg)
Predicate logic proofs can use …
Predicate logic inference rulesApplied to whole formulas only.
Predicate logic equivalencesEven on subformulas.
Propositional logic inference rulesApplied to whole formulas only.
Propositional logic equivalencesEven on subformulas.
13
![Page 31: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/31.jpg)
A “hello world” proofProve .
Elim
Intro
Intro
Elim
(∀x. P(x)) → (∃x. P(x))
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
14
![Page 32: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/32.jpg)
A “hello world” proofProve .
1.1. Assumption1.2.1.3.
2. Direct Proof Rule
Elim
Intro
Intro
Elim
(∀x. P(x)) → (∃x. P(x))∀x. P(x)
∃x. P(x)(∀x. P(x)) → (∃x. P(x))
Given , so use Direct Proof Rule.→
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
14
![Page 33: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/33.jpg)
A “hello world” proofProve .
1.1. Assumption1.2.1.3. Intro : 1.2
2. Direct Proof Rule
Elim
Intro
Intro
Elim
(∀x. P(x)) → (∃x. P(x))∀x. P(x)P(c)∃x. P(x) ∃
(∀x. P(x)) → (∃x. P(x))
Given , so use Direct Proof Rule.We can use Intro to get 1.3, but
need for some .
→∃
P(c) c
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
14
![Page 34: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/34.jpg)
A “hello world” proofProve .
1.1. Assumption1.2. Elim : 1.11.3. Intro : 1.2
2. Direct Proof Rule
Elim
Intro
Intro
Elim
(∀x. P(x)) → (∃x. P(x))∀x. P(x)P(c) ∀∃x. P(x) ∃
(∀x. P(x)) → (∃x. P(x))
Given , so use Direct Proof Rule.We can use Intro to get 1.3, but
need for some .We have from Elim on 1.1.
→∃
P(c) cP(c) ∀
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
14
![Page 35: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/35.jpg)
A “hello world” proofProve .
1.1. Assumption1.2. Elim : 1.11.3. Intro : 1.2
2. Direct Proof Rule
Elim
Intro
Intro
Elim
Working forwards and backwards:In applying Intro rule, we didn’tknow what expression we mightbe able to prove for, so weworked forwards to figure outwhat might work.
(∀x. P(x)) → (∃x. P(x))∀x. P(x)P(c) ∀∃x. P(x) ∃
(∀x. P(x)) → (∃x. P(x))
Given , so use Direct Proof Rule.We can use Intro to get 1.3, but
need for some .We have from Elim on 1.1.
→∃
P(c) cP(c) ∀
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
∃
P(c)
14
![Page 36: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/36.jpg)
An in-depth look at predicate logic proofsUnderstanding rules for quantifiers through more advanced examples.
15
![Page 37: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/37.jpg)
Advanced proofs: considering domain semanticsSo far, we have treated the predicate definitions as black boxes, and thedomain of discourse as a set of objects with no additional properties.
In practice, we want to prove theorems for specific domains, and usethe properties of those domains in our proofs.
16
![Page 38: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/38.jpg)
Advanced proofs: considering domain semanticsSo far, we have treated the predicate definitions as black boxes, and thedomain of discourse as a set of objects with no additional properties.
In practice, we want to prove theorems for specific domains, and usethe properties of those domains in our proofs.
For example, the set of integers is equipped with the operators .+, ⋅, =
16
![Page 39: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/39.jpg)
Advanced proofs: considering domain semanticsSo far, we have treated the predicate definitions as black boxes, and thedomain of discourse as a set of objects with no additional properties.
In practice, we want to prove theorems for specific domains, and usethe properties of those domains in our proofs.
For example, the set of integers is equipped with the operators .
We can use these operators in our predicates (below) and proofs (next):
+, ⋅, =
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
16
![Page 40: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/40.jpg)
A not so odd exampleProve that there is an even number: .
Elim
Intro
Intro
Elim
∃x. Even(x)
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
17
![Page 41: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/41.jpg)
A not so odd exampleProve that there is an even number: .
1.2.3.4.
Elim
Intro
Intro
Elim
∃x. Even(x)
∃x. Even(x)
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
17
![Page 42: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/42.jpg)
A not so odd exampleProve that there is an even number: .
1.2.3.4. Intro : 3
Elim
Intro
Intro
Elim
∃x. Even(x)
Even(2)∃x. Even(x) ∃
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
17
![Page 43: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/43.jpg)
A not so odd exampleProve that there is an even number: .
1.2.3. Definition of Even: 24. Intro : 3
Elim
Intro
Intro
Elim
∃x. Even(x)
∃y. 2 = 2 ⋅ yEven(2)∃x. Even(x) ∃
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
17
![Page 44: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/44.jpg)
A not so odd exampleProve that there is an even number: .
1. Arithmetic2. Intro : 13. Definition of Even: 24. Intro : 3
Elim
Intro
Intro
Elim
∃x. Even(x)2 = 2 ⋅ 1∃y. 2 = 2 ⋅ y ∃Even(2)∃x. Even(x) ∃
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
17
![Page 45: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/45.jpg)
A prime exampleProve that there is an even prime number: .
Elim
Intro
Intro
Elim
We use a black-box definition of Prime because the proof won’t need to break it down further.
∃x. Even(x) ∧ Prime(x)
Domain of discourseIntegers
Predicate definitions
“ is prime”Even(x) ::= ∃y. x = 2 ⋅ yPrime(x) ::= x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
18
![Page 46: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/46.jpg)
A prime exampleProve that there is an even prime number: .
1.2.3.4.5.6.
Elim
Intro
Intro
Elim
We use a black-box definition of Prime because the proof won’t need to break it down further.
∃x. Even(x) ∧ Prime(x)
∃x. Even(x) ∧ Prime(x)
Domain of discourseIntegers
Predicate definitions
“ is prime”Even(x) ::= ∃y. x = 2 ⋅ yPrime(x) ::= x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
18
![Page 47: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/47.jpg)
A prime exampleProve that there is an even prime number: .
1.2.3.4.5.6. Intro : 5
Elim
Intro
Intro
Elim
We use a black-box definition of Prime because the proof won’t need to break it down further.
∃x. Even(x) ∧ Prime(x)
Even(2) ∧ Prime(2)∃x. Even(x) ∧ Prime(x) ∃
Domain of discourseIntegers
Predicate definitions
“ is prime”Even(x) ::= ∃y. x = 2 ⋅ yPrime(x) ::= x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
18
![Page 48: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/48.jpg)
A prime exampleProve that there is an even prime number: .
1.2.3.4.5. Intro : 3, 46. Intro : 5
Elim
Intro
Intro
Elim
We use a black-box definition of Prime because the proof won’t need to break it down further.
∃x. Even(x) ∧ Prime(x)
Even(2)Prime(2)Even(2) ∧ Prime(2) ∧∃x. Even(x) ∧ Prime(x) ∃
Domain of discourseIntegers
Predicate definitions
“ is prime”Even(x) ::= ∃y. x = 2 ⋅ yPrime(x) ::= x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
18
![Page 49: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/49.jpg)
A prime exampleProve that there is an even prime number: .
1.2.3.4. Property of integer 25. Intro : 3, 46. Intro : 5
Elim
Intro
Intro
Elim
We use a black-box definition of Prime because the proof won’t need to break it down further.
∃x. Even(x) ∧ Prime(x)
Even(2)Prime(2)Even(2) ∧ Prime(2) ∧∃x. Even(x) ∧ Prime(x) ∃
Domain of discourseIntegers
Predicate definitions
“ is prime”Even(x) ::= ∃y. x = 2 ⋅ yPrime(x) ::= x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
18
![Page 50: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/50.jpg)
A prime exampleProve that there is an even prime number: .
1. Arithmetic2. Intro : 13. Definition of Even: 24. Property of integer 25. Intro : 3, 46. Intro : 5
Elim
Intro
Intro
Elim
We use a black-box definition of Prime because the proof won’t need to break it down further.
∃x. Even(x) ∧ Prime(x)2 = 2 ⋅ 1∃y. 2 = 2 ⋅ y ∃Even(2)Prime(2)Even(2) ∧ Prime(2) ∧∃x. Even(x) ∧ Prime(x) ∃
Domain of discourseIntegers
Predicate definitions
“ is prime”Even(x) ::= ∃y. x = 2 ⋅ yPrime(x) ::= x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
18
![Page 51: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/51.jpg)
An equal exampleProve that follows from .
Elim
Intro
Intro
Elim
∀y. ∃z. y = z ∀x. x = x
Domain of discourseIntegers
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
19
![Page 52: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/52.jpg)
An equal exampleProve that follows from .
1. Given2.3.4.
Elim
Intro
Intro
Elim
∀y. ∃z. y = z ∀x. x = x∀x. x = x
∀y. ∃z. y = z
Domain of discourseIntegers
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
19
![Page 53: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/53.jpg)
An equal exampleProve that follows from .
1. Given2. Elim : 1, is arbitrary3.4.
Elim
Intro
Intro
Elim
∀y. ∃z. y = z ∀x. x = x∀x. x = xa = a ∀ a
∀y. ∃z. y = z
Domain of discourseIntegers
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
19
![Page 54: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/54.jpg)
An equal exampleProve that follows from .
1. Given2. Elim : 1, is arbitrary3. Intro : 24.
Elim
Intro
Intro
Elim
∀y. ∃z. y = z ∀x. x = x∀x. x = xa = a ∀ a∃z. a = z ∃∀y. ∃z. y = z
Domain of discourseIntegers
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
19
![Page 55: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/55.jpg)
An equal exampleProve that follows from .
1. Given2. Elim : 1, is arbitrary3. Intro : 24. Intro : 3
Elim
Intro
Intro
Elim
∀y. ∃z. y = z ∀x. x = x∀x. x = xa = a ∀ a∃z. a = z ∃∀y. ∃z. y = z ∀
Domain of discourseIntegers
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
19
![Page 56: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/56.jpg)
A square exampleProve that the square of every even number is even: .
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 57: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/57.jpg)
A square exampleProve that the square of every even number is even: .
4.
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
∀x. Even(x) → Even( )x2
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 58: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/58.jpg)
A square exampleProve that the square of every even number is even: .
1. Let be an arbitrary integer.
3.4. Intro : 1, 3
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
a
Even(a) → Even( )a2
∀x. Even(x) → Even( )x2 ∀
Use Intro on 1 and 2.∀
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 59: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/59.jpg)
A square exampleProve that the square of every even number is even: .
1. Let be an arbitrary integer.
2.1. Assumption2.2.2.3.2.4.2.5.2.6.
3. Direct Proof Rule4. Intro : 1, 3
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
aEven(a)
Even( )a2
Even(a) → Even( )a2
∀x. Even(x) → Even( )x2 ∀
Use Intro on 1 and 2. so use DRP to get 3.
∀→
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 60: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/60.jpg)
A square exampleProve that the square of every even number is even: .
1. Let be an arbitrary integer.
2.1. Assumption2.2. Definition of Even: 2.12.3.2.4.2.5.2.6. Definition of Even: 2.5
3. Direct Proof Rule4. Intro : 1, 3
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
aEven(a)∃y. a = 2y
∃y. = 2ya2
Even( )a2
Even(a) → Even( )a2
∀x. Even(x) → Even( )x2 ∀
Use Intro on 1 and 2. so use DRP to get 3.
Use definition of Even to breakdown 2.1 and 2.6.
∀→
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 61: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/61.jpg)
A square exampleProve that the square of every even number is even: .
1. Let be an arbitrary integer.
2.1. Assumption2.2. Definition of Even: 2.12.3. Elim : 2.2, depends on 2.4.2.5.2.6. Definition of Even: 2.5
3. Direct Proof Rule4. Intro : 1, 3
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
aEven(a)∃y. a = 2ya = 2b ∃ b a
∃y. = 2ya2
Even( )a2
Even(a) → Even( )a2
∀x. Even(x) → Even( )x2 ∀
Use Intro on 1 and 2. so use DRP to get 3.
Use definition of Even to breakdown 2.1 and 2.6.
Use Elim on 2.2.
∀→
∃
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 62: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/62.jpg)
A square exampleProve that the square of every even number is even: .
1. Let be an arbitrary integer.
2.1. Assumption2.2. Definition of Even: 2.12.3. Elim : 2.2, depends on 2.4. Algebra2.5.2.6. Definition of Even: 2.5
3. Direct Proof Rule4. Intro : 1, 3
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
aEven(a)∃y. a = 2ya = 2b ∃ b a
= 4 = 2(2 )a2 b2 b2
∃y. = 2ya2
Even( )a2
Even(a) → Even( )a2
∀x. Even(x) → Even( )x2 ∀
Use Intro on 1 and 2. so use DRP to get 3.
Use definition of Even to breakdown 2.1 and 2.6.
Use Elim on 2.2.Use algebra on 2.3 to match the
body of 2.5.
∀→
∃
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 63: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/63.jpg)
A square exampleProve that the square of every even number is even: .
1. Let be an arbitrary integer.
2.1. Assumption2.2. Definition of Even: 2.12.3. Elim : 2.2, depends on 2.4. Algebra2.5. Intro : 2.42.6. Definition of Even: 2.5
3. Direct Proof Rule4. Intro : 1, 3
Elim
Intro
Intro
Elim
∀x. Even(x) → Even( )x2
aEven(a)∃y. a = 2ya = 2b ∃ b a
= 4 = 2(2 )a2 b2 b2
∃y. = 2ya2 ∃Even( )a2
Even(a) → Even( )a2
∀x. Even(x) → Even( )x2 ∀
Use Intro on 1 and 2. so use DRP to get 3.
Use definition of Even to breakdown 2.1 and 2.6.
Use Elim on 2.2.Use algebra on 2.3 to match the
body of 2.5.Use Intro on 2.4 to get 2.5.
∀→
∃
∃
Domain of discourseIntegers
Predicate definitionsEven(x) ::= ∃y. x = 2 ⋅ y
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
20
![Page 64: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/64.jpg)
Why list dependencies? To avoid incorrect proofs.Over the integer domain: is True but is False.
Elim
Intro
Intro
Elim
∀x. ∃y. y ≥ x ∃y. ∀x. y ≥ x
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for an arbitrary value in thedomain. No other name in depends on .
aP a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for a value in the domainwhere is true. List all dependencies for .
cP(c) c
21
![Page 65: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/65.jpg)
Why list dependencies? To avoid incorrect proofs.Over the integer domain: is True but is False.
1. Given2. 3.4.5.6.
Elim
Intro
Intro
Elim
∀x. ∃y. y ≥ x ∃y. ∀x. y ≥ x
∀x. ∃y. y ≥ x
∃y. ∀x. y ≥ x
Example: an incorrect proof.
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for an arbitrary value in thedomain. No other name in depends on .
aP a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for a value in the domainwhere is true. List all dependencies for .
cP(c) c
21
![Page 66: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/66.jpg)
Why list dependencies? To avoid incorrect proofs.Over the integer domain: is True but is False.
1. Given2. Let be an arbitrary integer. 3.4.5.6. Intro : 5
Elim
Intro
Intro
Elim
∀x. ∃y. y ≥ x ∃y. ∀x. y ≥ x
∀x. ∃y. y ≥ xa
∃y. ∀x. y ≥ x ∃
Example: an incorrect proof.
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for an arbitrary value in thedomain. No other name in depends on .
aP a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for a value in the domainwhere is true. List all dependencies for .
cP(c) c
21
![Page 67: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/67.jpg)
Why list dependencies? To avoid incorrect proofs.Over the integer domain: is True but is False.
1. Given2. Let be an arbitrary integer. 3. Elim : 14.5.6. Intro : 5
Elim
Intro
Intro
Elim
∀x. ∃y. y ≥ x ∃y. ∀x. y ≥ x
∀x. ∃y. y ≥ xa
∃y. y ≥ a ∀
∃y. ∀x. y ≥ x ∃
Example: an incorrect proof.
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for an arbitrary value in thedomain. No other name in depends on .
aP a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for a value in the domainwhere is true. List all dependencies for .
cP(c) c
21
![Page 68: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/68.jpg)
Why list dependencies? To avoid incorrect proofs.Over the integer domain: is True but is False.
1. Given2. Let be an arbitrary integer. 3. Elim : 14. Elim : 3, depends on 5.6. Intro : 5
Elim
Intro
Intro
Elim
∀x. ∃y. y ≥ x ∃y. ∀x. y ≥ x
∀x. ∃y. y ≥ xa
∃y. y ≥ a ∀b ≥ a ∃ b a
∃y. ∀x. y ≥ x ∃
Example: an incorrect proof.
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for an arbitrary value in thedomain. No other name in depends on .
aP a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for a value in the domainwhere is true. List all dependencies for .
cP(c) c
21
![Page 69: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/69.jpg)
Why list dependencies? To avoid incorrect proofs.Over the integer domain: is True but is False.
1. Given2. Let be an arbitrary integer. 3. Elim : 14. Elim : 3, depends on 5. Intro : 2, 46. Intro : 5
Elim
Intro
Intro
Elim
∀x. ∃y. y ≥ x ∃y. ∀x. y ≥ x
∀x. ∃y. y ≥ xa
∃y. y ≥ a ∀b ≥ a ∃ b a∀x. b ≥ x ∀∃y. ∀x. y ≥ x ∃
Example: an incorrect proof.
Can’t get rid of sinceanother name, , in thesame formula depends on it!
ab
∀ ∀x. P(x)∴ P(a) for any a
∀ P(a); a is arbitrary∴ ∀x. P(x)
The name stands for an arbitrary value in thedomain. No other name in depends on .
aP a
∃ P(c) for some c∴ ∃x. P(x)
∃ ∃x. P(x)∴ P(c) for a specific c
The name is fresh and stands for a value in the domainwhere is true. List all dependencies for .
cP(c) c
21
![Page 70: CSE 311 Lecture 08: Inference Rules and Proofs for ... · Proving implications with the direct proof rule Direct Proof Rule The premise means “Given , we can prove .” So the direct](https://reader034.vdocuments.site/reader034/viewer/2022042620/5f3c22aebeee2536ac1ba8c8/html5/thumbnails/70.jpg)
SummaryPredicate logic proofs extend propositional logic proofs.
Can use all rules and equivalences for propositional logic.Plus inference rules for quantifiers and equivalences for predicate logic.
When applying Intro to , make sure that is arbitrary, and
no other name depends on .When applying Elim to , make sure that
in is fresh, andall the dependencies for are listed.
∀ P(a)a
a∃ ∃x. P(x)
c P(c)c
22