Logic 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

The Science of Reasoning

Why Study Logic?


Isn’t it better perhaps, to be spontaneous, intuitive and perceptive?
Reasoning is …
• drawing out conclusion on the basis of certain evidence,
• infer one thing from another or
• to figure out consequences of a certain course of action.
PROPOSITION
a statement that can be either

true or false;
it must be one or the other, and it cannot be
both
***We usually denote a proposition by a letter: p, q, r, s, …
Proposition
• Definition: The value of a proposition is called its truth value;
denoted by
p
• T or 1 if it is true or T(1)
• F or 0 if it is false F(0)

• Opinions, interrogative, and imperative are NOT propositions


Propositions
• Examples
• Today is Tuesday.
• The grass is wet.
• It is raining.

• NOT PROPOSITIONS
• Taylor Swift is the best artist. Opinion
• When is the Midterm test? Interrogative
• Do your homework.
Imperative
Exercise: Proposition or Not a Proposition
Tell whether the ff is a Proposition (P) or Not
P.
1) Philippines is a province of China.
2) Blink three times.
3) Aaron is a medical front liner.
4) The number 4 is even and less than 12.
5. 2+2=5
6. Every integer is divisible by 12
7. Microsoft is an excellent company.
The Structure
of
Sentential
Logic
A Sentential Operator

• Is an expression containing blanks such that, when the


blanks are filled with complete sentences, the result is a
sentence.
• There are a lot of sentential operators in English, but we will
be using only 5 in sentential logic.
A Sentential Operator in
Logic
• Either _____ or _____
• Neither _____ nor _____
• _____ and _____
• If _____, then _____
• _____ if and only if _____
• _____ unless _____
• _____ after _____
• _____ only if _____
• _____ because _____
5 Sentential Operators
Operator Technical Name Meaning Example

~,¬ Negation Not ~ p , ¬p


&,∧ Conjunctio And p∧q
n
V Disjunction Or pvq
⊕ or V Exclusive XOR p⊕q
OR
⊃, → or ⇒ Conditional If ___ then p⇒q
Implication ____
≡, ↔, if or Biconditional If and only p⇔q
5 Sentential operators

• In p ∧ q, p and q are called conjuncts.


• In p v q, p and q are called disjuncts.
→ q, p is the antecedent, q is the
• In p

consequent.
5 Sentential operators
Let M be Marcos is president.
D be Duterte is vice-president.
E be Erap is president.
R be Mar Roxas is vice-president.
• Convert these into symbols:
• Duterte is vice-president and Marcos is president.
• Not both Erap and Marcos are president.
• Duterte is vice-president if and only if Marcos is president.
• If Duterte is vice-president, then Marcos is president.
5 Sentential operators
Let M be Marcos is president.
D be Duterte is vice-president.
E be Erap is president.
R be Mar Roxas is vice-president.
• Convert these into symbols:
• Erap or Marcos is president.
• Erap is not the president.
• Either Erap is president and Duterte is vice-president, or Marcos is
president and Mar Roxas is vice-president.
• Mar Roxas is vice-president if and only if Marcos is president.
Recall : Logical
connectives
• Connectives are used to create a compound proposition from two
or more propositions
– Negation
– AND - logical conjunction
– OR - logical disjunction
– IF-THEN - Implication
IF AND ONLY IF – Biconditional

We define the meaning (semantics) of the logical


connectives using truth tables
Recall : Logical
connectives
• Connectives are used to create a compound proposition from two
or more propositions
– Negation
– AND - logical conjunction
– OR - logical disjunction
– IF-THEN - Implication
IF AND ONLY IF – Biconditional

We define the meaning (semantics) of the logical


connectives using truth tables
TRUTH TABLE
is a diagram in table form that is used to show all
its possible truth values.
Logical Connective:
Negation ¬p
• Examples:
• Today is not Monday
• It is not the case that today is Monday, etc.
• It is not true that today is Monday
p ¬p
Truth table T (1)
F (0)
Logical Connective: Disjunction OR ∨
• TRUE if one or both of the propositions are TRUE.
• Examples
• It is raining or it is the second lecture
• (2+2=5) ∨ (1<2)
p q p∨q
• You may have cake or ice cream

Truth table
Logical Connective: Conjunction AND ∧
• TRUE only when BOTH of the propositions are TRUE!
• Examples
• It is raining and it is warm
• (2+3=5) and (1<2) p q p∨q p∧q

Truth table
Logical Connective: Implication IF-THEN
p→q
• The implication p→q is the proposition that is false when p is true and q is
false and true otherwise
• p is called the hypothesis, antecedent, premise
• q is called the conclusion, consequence
p q p∨q p∧q p⇒q

Truth table
Logical Connective: Implication IF-THEN
p→q
• The implication of p→q can be also read as
• If p then q
• p implies q
• If p, q
• p only if q
• q if p
• q when p
• q whenever p
• q follows from p
• p is a sufficient condition for q (p is sufficient for q)
• q is a necessary condition for p (q is necessary for p)
Logical Connective: Biconditional IF and ONLY IF
p↔q
• true when p and q have the same truth values. It is false otherwise.
• Note that it is equivalent to (p→q)∧(q→p)
• Truth table

p q p∧q p∨q p⇒q p⇔q


T(1) 1 1 1 1 1
T(1) 0 0 1 0 0
F(0) 1 0 1 1 0
F(0) 0 0 0 1 1
Logical Connective: Biconditional (2)
• The biconditional p↔q can be equivalently read as
• p if and only if q
• p is a necessary and sufficient condition for q
• if p then q, and conversely
• p iff q
• Examples
• x>0 if and only if x2 is positive
• Two sides of a triangle are congruent if and only if the two angles
opposite them are congruent.
Exercise: Which of the following biconditionals is true?

True. Both implications hold

True. Both implications hold.

False. The implication “if x ≥ 0 then x2 ≥ 0” holds.


However, the implication “if x2 ≥ 0 then x ≥ 0” is false.
Consider x=-1.
The hypothesis (-1)2=1 ≥ 0 but the conclusion fails.
REMEMBER
Constructing Truth Tables
• Construct the truth table for the following compound proposition

( p ∧ q ) ∨ ¬q
Let p and q are propositions, construct a truth table for
~ p ∧ (p → q)

You might also like