LOGIC
PRESENTED BY: PROF. BRYAN O. CORDOVA, LPT
“For every action, there is a corresponding
consequence”.
LOGIC
Generally labeled as the “Science of Reasoning”
Importance: Give meaning to mathematical sentences
Validity of Arguments ∃ � such that � ≠ �2 + �2 , where �, �, � ∈ ℤ
Follow set of rules “There exists an integer that is
Forms and norms not the sum of two squares”.
Good judgement
I. PROPOSITION
A declarative sentence or a statement which is either true
or false but not both is called a proposition.
The basic building block of logic.
Mere sentences are not propositions:
Questions/Interrogative Sentences
Commands/Imperative Sentences
Exclamation/Exclamatory Sentences
I. PROPOSITION
Examples:
1. Puppies are cuter than kittens.
2. I am a married man.
3. 8 is an even number.
4. �−2≥�
5. This is the last entry on this list.
I. PROPOSITION
Propositional Logic
A mathematical system for reasoning about propositions and how they
are related to one another.
Propositional logic enables us to:
Formally encode how the truth of various propositions influences the truth
of other propositions.
Determines if certain combinations of propositions are always, sometimes,
or never true.
Determines whether certain combinations of propositions logically entail
other combinations.
I. PROPOSITION
Variables and Connectives
Propositional logic is a formal mathematical system whose syntax is
rigidly specified.
Every statement in propositional logic consists of propositional
variables combined via logical connectives.
Each variable represents some propositions.
“You wanted it” or “You should have put a ring on it.”
Connectives encode how propositions are related.
“If you wanted it, then you should have put a ring on it”.
I. PROPOSITION
Propositional Variables
Each proposition will be represented by a propositional variable.
Propositional variables are usually represented as lower-case letters,
�, �, �, �, etc.
If we need more, we can use subscripts:
�1 , �2 , etc.
Each variable can take one of two values: true or false.
I. PROPOSITION
Logical Connectives
Negation: ¬�
Read “not p”
¬� is true if and only if p is false.
Conjunction: � ∧ �
Read “p and q.”
� ∧ � is true if both p and q are true.
Disjunction: � ∨ �
Read “p or q.”
� ∨ � is true if at least one of � or � are true.
I. PROPOSITION
Logical Connectives
Implication/Conditional: p → q.
p → q reads “p implies q”.
p → q means “if p is true then q is true as well.”
p → q says nothing about causality; it just says that if p is true, q will be true as well.
Double Implication/ Biconditional: p ↔ q
p ↔ q reads “p if and only if q”.
Intuitively, either both p and q are true, or neither of them are.
Think of it as an equality, two propositions must have equal truth values.
EXAMPLES
Negation: Disjunction:
The Disjunction of “Today is Monday” and
The negation of “We have class today”
is “ We do not have class today”. “We have class today” is “Today is
Monday or we have class today”.
Conjunction: Implication:
The Conjunction of “Today is “If today is Monday then we have class
Monday” and “We have class today” today”.
is “Today is Monday and we have
class today”.
Biconditional:
“Today is Monday if and only if we have
class today”.
II.TRUTH TABLES
Negation of �
� ¬�
T F
F T
propositions and or implies iff
� � � � � � �→� �↔�
T T T T T T
T F F T F F
F T F T T F
F F F F T T
II.TRUTH TABLES
Tautologies
When all substitution instances of an argument are all true.
Truth table for (� → �) (� → �)
� � �→� �→� (� → �) (� → �)
T T T T T
T F F T T
F T T F T
F F T T T
II.TRUTH TABLES
Contradiction
When all substitution instances of an argument are all false.
Truth table for (� ↔ �) (� ↔ ¬�)
� � (� → �) (� ↔ ¬ �)
T T T F T F F
T F F F T T T
F T F F F T F
F F T F F F T
1 5 2 4 3
II.TRUTH TABLES
Contingency
When it is neither a tautology nor contradiction.
Truth table for (¬� → ¬�) ↔ (� → �)
� � ( ¬� → ¬� ) ↔ (� → �)
T T F T F T T
T F F T T F F
F T T F F F T
F F T T T T T
1 3 2 5 4
II.TRUTH TABLES
Multiple Propositions
� � �
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
III. CONDITIONAL STATEMENTS (� → �)
Conditional Statements are written in the form
�→�
�� �, ���� �.
�� �, �.
� �� �.
� is called the antecedent
� is called the consequent
If you do not pass your requirement on time, I will give you a failing mark.
III. CONDITIONAL STATEMENTS (� → �)
Converse
If the premise and conclusion of the conditional statement is interchanged.
�→� “if �, then �”
Inverse
If the premise and conclusion of the conditional statement is negated.
¬� → ¬� “if not �, then not �”
Contrapositive
If the converse statement is negated.
¬� → ¬� “if not �, then not �”
EXAMPLES
Conditional: � → �
If two lines intersect to form a right angle, then the lines are perpendicular.
Converse: � → �
If the lines are perpendicular, then the lines intersect to form a right angle.
Inverse: ¬� → ¬�
If two lines do not intersect to form a right angle, then the lines are not
perpendicular.
Contrapositive: ¬� → ¬�
If the lines are not perpendicular, then the lines do not intersect to form a
right angle.
IV. LOGICAL EQUIVALENCE (� ≡ �)
Logical Equivalence
Two propositions materially equivalent if they always have the same truth
values. If their biconditional statement is a tautology.
Example: ¬(� ∨ �) ≡ ¬� ∧ ¬�
� � ¬ (� ∨ �) ↔ ¬� ∧ ¬�
T T F T T F F F
T F F T T F F T
F T F T T T F F
F F T F T T T T
2 1 6 3 5 4
EXERCISES
A. Use the propositional connectives in the propositions
“I learned my lessons.” and “I will pass the subject”.
1. Negation of both propositions:
2. Conjunction:
3. Disjunction:
4. Implication:
5. Biconditional:
EXERCISES
B. Complete the Truth Table and tell whether the given argument is a tautology,
contradiction or contingency. Argument:(� ∧ �) → (� ∨ �)
� � � (� ∧ �) → (� ∨ �)
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
The ninth commandment:
“Thou shalt not bear false witness against thy neighbour”.
-Exodus 20:16
God bless you all.
Thank you!
END OF SLIDES