Lec 5
Lec 5
Lecture - 5
Logic in Proof
A theorem is a proposition that can be proved to be true. An argument that
establishes the truth of a theorem is called a proof. There are many different types of
proofs.
Valid Arguments
• An argument is a sequence of statements. All statements except the final one
are called premises (or assumptions or hypotheses).
• The final statement is called the conclusion. The symbol "∴", read as
"therefore", is normally placed just before the conclusion.
• An argument is a process by which a conclusion is drawn from a set of
propositions. The given set of propositions are called premises or hypotheses.
The final proposition derived from the given propositions is called the
conclusion.
Sometimes an argument is written in the following form:
Summary
In both examples:
• Critical Rows are those where all premises are true.
• To determine if an argument is valid, you check whether the conclusion is true
in these critical rows.
• Rows where not all premises are true (like Row 3 in the examples) are not
considered for testing validity.
• Valid Argument: If in every critical row (where all premises are true), the
conclusion is also true, then the argument is valid.
• Invalid Argument: If there is at least one critical row where all premises are
true but the conclusion is false, then the argument is invalid.
Rules of Inference
Rules of inference are basic tools used to draw conclusions from given statements or
premises. They help us make logical arguments, prove ideas, and solve problems in
areas like math, computer science, and philosophy. Knowing these rules is important
because they ensure that our conclusions logically follow from the information we
start with.
Basic Rules of Inference
1. Addition
Rule: If a statement p is true, then p v q (read as "p or q") is also true, regardless of
what q is.
Symbolically:
Example:
• Premise: Ram is not guilty.
• Conclusion: Therefore, Ram is not guilty or Shyam is telling the truth.
Here, regardless of whether Shyam is telling the truth or not, the statement "Ram is
not guilty or Shyam is telling the truth" is true because "Ram is not guilty" is true.
2. Simplification
Rule: If a conjunction p ^ q (read as "p and q") is true, then both p and q are
individually true.
Symbolically:
Example:
• Premise: It is raining, and I have an umbrella.
• Conclusion: Therefore, it is raining (or) I have an umbrella.
If both statements are true together, each statement is also true individually.
3. Conjunction
Rule: If two statements p and q are both true, then their conjunction p ^ q is true.
Symbolically:
Example:
• Premise 1: I study hard.
• Premise 2: I get good grades.
• Conclusion: Therefore, I study hard and I get good grades.
If both individual premises are true, their conjunction is also true.
Example:
• Premise 1: If I study hard, I will get A’s.
• Premise 2: I study hard.
• Conclusion: Therefore, I will get A’s.
The truth of the premises leads to the truth of the conclusion through Modus Ponens.
Example:
• Premise 1: If the number is divisible by 6, it is divisible by 3.
• Premise 2: The number is not divisible by 3.
• Conclusion: Therefore, the number is not divisible by 6.
Here, since the number is not divisible by 3 (the consequent is false), the number
cannot be divisible by 6 (the antecedent).
6. Hypothetical Syllogism
Rule: If p → q and q → r are both true, then p → r is also true.
Symbolically:
Example:
• Premise 1: If it rains, I will stay home.
• Premise 2: If I stay home, I will watch a movie.
• Conclusion: Therefore, if it rains, I will watch a movie.
Since both premises are true, we can conclude that the rain implies watching a movie.
7. Disjunctive Syllogism
Rule: If p v q is true, and ¬q is true, then p must be true.
Symbolically:
Example:
• Premise 1: Either Ram is not guilty, or Shyam is telling the truth.
• Premise 2: Shyam is not telling the truth.
• Conclusion: Therefore, Ram is not guilty.
Since Shyam is not telling the truth, the other alternative in the disjunction (Ram is
not guilty) must be true.
8. Constructive Dilemma
Rule: If p → q and r → s are true, and p v r is true, then q v s must be true.
Symbolically:
Example:
• Premise 1: If I study hard, I will get A’s.
• Premise 2: If I don’t go to the party, I will finish my homework.
• Premise 3: Either I study hard, or I don’t go to the party.
• Conclusion: Therefore, either I will get A’s or I will finish my homework.
By applying the rule of Constructive Dilemma, we conclude that either of the
outcomes will be true.
9. Destructive Dilemma
Rule: If p → q and r → s are true, and ¬q v ¬s is true, then ¬p v ¬r must be true.
Symbolically:
Example:
• Premise 1: If I go to the gym, I will be fit.
• Premise 2: If I eat healthy, I will lose weight.
• Premise 3: Either I am not fit, or I did not lose weight.
• Conclusion: Therefore, either I did not go to the gym, or I did not eat healthy.
Here, since one or both consequences failed, one or both of the causes must also fail.
Examples:
Problem 1: Represent the argument:
If I study hard, then I get A's.
I study hard.
--------------------------------------------
Therefore, I get A's.
Solution:
Let:
• p: I study hard,
• q: I get A's.
The argument may be written symbolically as:
To determine whether the argument is valid, you can use the truth table method.
This will allow you to verify whether the logical argument holds true based on its
premises and conclusion.
• Premise 1: If a number is divisible by 6, then it is divisible by 3. (p→q)
• Premise 2: The number is not divisible by 3. (¬q)
• Conclusion: The number is not divisible by 6. (¬p)
This is an instance of Modus Tollens, which states:
Problem 6: Show that s is a valid conclusion from the premises p→q, p→r, ¬(q∧r),
and s∨p.
Solution: The valid argument for deducing s from the given premises is shown step
by step:
1 p→q Premise 1 (Given)
2 p→r Premise 2 (Given)
3 (p→q) ∧ (p→r) Using Conjunction (from Premises 1 and 2):
4 ¬(q ∧ r) Premise 3 (Given)
1 (p∧q)→r Premise 1: (If I get the job and work hard, I will get promoted)
2 r→s Premise 2: (If I get promoted, I will be happy)
3 (p∧q)→s Hypothetical Syllogism (using Premises 1 and 2)
4 ¬s Premise 3: (I will not be happy)
5 ¬(p∧q) Modus Tollens (using Premises 3 and 4)
6 ¬p∨¬q De Morgan's Law (on Step 5)
Thus, the argument is valid, and we can conclude that either I will not get the job or
I will not work hard.
Problem 8: Show that the premises “It is not sunny this afternoon and it is
colder than yesterday,” “We will go swimming only if it is sunny,” “If we do not
go swimming, then we will take a canoe trip,” and “If we take a canoe trip, then
we will be home by sunset” lead to the conclusion “We will be home by sunset.”
Solution: The propositions are:
• p: "It is sunny this afternoon."
• q: "It is colder than yesterday."
• r: "We will go swimming."
• s: "We will take a canoe trip."
• t: "We will be home by sunset."
The premises are:
1. ¬p ∧ q (It is not sunny this afternoon and it is colder than yesterday.)
2. r→p (If we go swimming, then it is sunny this afternoon.)
3. ¬r→s (If we do not go swimming, then we will take a canoe trip.)
4. s→t (If we take a canoe trip, then we will be home by sunset.)
5. Conclusion: t (We will be home by sunset).
Argument construction:
1. ¬p∧q Premise
3. r→p Premise
5. ¬r→s Premise
7. s→t Premise
Problem 9: Show that the premises “If you send me an e-mail message, then I
will finish writing the program,” “If you do not send me an e-mail message, then
I will go to sleep early,” and “If I go to sleep early, then I will wake up feeling
refreshed” lead to the conclusion “If I do not finish writing the program, then I
will wake up feeling refreshed.”
Solution: The propositions are:
• p: "You send me an e-mail message."
• q: "I will finish writing the program."
• r: "I will go to sleep early."
• s: "I will wake up feeling refreshed."
The premises are:
1. p→q (If you send me an e-mail message, I will finish writing the program.)
2. ¬p→r (If you do not send me an e-mail message, I will go to sleep early.)
3. r→s (If I go to sleep early, I will wake up feeling refreshed.)
4. Conclusion: ¬q→s (If I do not finish writing the program, I will wake up feeling
refreshed).
Argument Construction:
1. p→q Premise
2. ¬q→¬p Contrapositive using (1)
3. ¬p→r Premise
4. ¬q→r Hypothetical syllogism using (2) and (3)
5. r→s Premise
6. ¬q→s Hypothetical syllogism using (4) and (5)
Problem 10: Use rules of inference to show that the hypotheses “Randy works
hard,” “If Randy works hard, then he is a dull boy,” and “If Randy is a dull boy,
then he will not get the job” imply the conclusion “Randy will not get the job.”
Solution: The propositions are:
• p: "Randy works hard."
• q: "Randy is a dull boy."
• r: "Randy will not get the job."
The hypotheses are:
1. p (Randy works hard.)
2. p→q (If Randy works hard, then he is a dull boy.)
3. q→r (If Randy is a dull boy, then he will not get the job.)
4. Conclusion we want to prove is r (Randy will not get the job).
Argument Construction:
1. P Premise
2. p→q Premise
3. q Modus ponens using (1) and (2)
4. q→r Premise
5. r Modus ponens using (3) and (4)
Thus, the hypotheses logically lead to the conclusion that Randy will not get the job.
Practice problems:
1. Show that r ^ (p v q) is a valid conclusion from the premises pvq, q→r,
p→m and ~m.
2. Using the rule of inference, determine whether the following inference
patterns are valid or not.
~t→ ~r
~s
t→w
rvs
∴ w
Solution 2:
1 rvs Premise (Given)
2 svr Commutative law v (using 1)
3 ~s Premise (Given)
4 r Disjunctive syllogism (using 2 and 3)
5 ~t → ~r Premise (Given)
6 ~(~t) Modus Tollens (using 5 and 4)
7 t
8 t→w Premise (Given)
9 w Modus Ponens (using 8 and 7)
Solution 3:
1 p^q Premise (Given)
2 p Simplification (using 1)
3 p →(q→r) Premise (Given)
4 q→r Modus Ponens (using 3 and 2)
5 q^p Commutative law ^ (using 1)
6 q Simplification (using 5)
7 r Modus Ponens (using 4 and 6)