Propositional Logic

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 75

Unit 1:Propositional

Logic
WEEK 1:PROPOSITIONS, SIMPLE AND COMPOUND PROPOSITIONS,
LOGICAL CONNECTIVES
Let’s Review!
▪Numbers
▪Operation symbols
▪Relation symbols
▪Grouping symbols
▪Variables
▪Mathematical expression
▪Mathematical sentence
Logic
▪The basis of all mathematical reasoning,
and of all automated reasoning.
▪Rules of logic are used to distinguish
between valid and invalid mathematical
arguments.
Propositions
▪Basic building blocks of logic.
▪A declarative sentence that is either true
or false, but not both.
How do we represent propositions?
▪We use letters to denote propositional variables (or
statement variables), that is, variables that represent
propositions, just as letter are used to denote
numerical variables.
▪It usually uses small letters such as p, q, r, s, …
Truth Value
▪The value of a proposition that can be either True (T)
of False (F).
Let’s have
examples.
Exercise
Consider the following statements. Identify if they are
propositions or not. If yes, determine their truth value.
▪1. p= Manila is the capital of the Philippines. T
▪2. q = Dogs are mammals. T
▪3. r = Is it Tuesday?
▪4. s = Go get the car.
▪5. t = 8 is a prime number. F
▪6. u = This is a nice car.
Propositional Calculus/Propositional Logic
▪Area of logic that deals with propositions.
▪First developed systematically by the Greek
Philosopher Aristotle more than 2300 years ago.
Simple Propositions
▪A statement that conveys a single idea.
▪p = Jonathan likes to play video games.
▪r = Jonathan always stay up late.
Compound Propositions
▪A statement that conveys a two or more ideas.
Jonathan likes to play video games and always
stay up late.
Logical Connectives
▪These are word or words that combine simple
proposition to form compound propositions.
NEGATION
Logical Connectives
▪Definition 1:Negation
Let p be a proposition. The negation of p,
denoted by ~p , is the statement
“It is not the case that p.”
Logical Connectives
▪Negation
-Read as “not” and has a symbol ~.
Consider the following propositions:
p= Today is Sunday.
q= The shop is closed.
~p= Today is not Sunday.
~q= The shop is not closed.
Try it!
Find the negation of the proposition.
p= My dog is a girl.
q= The canteen sells burgers.
CONJUNCTION
Logical Connectives
▪Definition 2:Conjunction
Let p and q be propositions. The
conjunctions of p and q, denoted by p ^ q,
is the proposition
“ p and q”
Logical Connectives
▪Conjunction
-Read as “and” and has a symbol ∧.
Consider the following propositions:
p= Today is Sunday.
q= The shop is closed.
p ∧ q= Today is Sunday and the shop is closed.
Note
▪Note that in logics the word “but”
sometimes is used instead “and” in a
conjunction.
▪Example:
“The sun is shining, but it is raining.”
“The sun is shining and it is raining.”
Try it!
Use conjunction to form the compound
proposition:
p= Mama went to the grocery today.
q= Ate Sam bought vanilla ice cream.
p∧q=
DISJUNCTION
Logical Connectives
▪Definition 3:Disjunction
Let p and q be propositions. The disjunctions
of p and q, denoted by p V q, is the
proposition
“ p or q”
Logical Connectives
▪Conjunctions
-Read as “or” and has a symbol V.
Consider the following propositions:
p= Today is Sunday.
q= The shop is closed.
p V q= Today is Sunday or the shop is closed.
Try it!
Use disjunction to form the compound
proposition:
p= Gian plays volleyball.
q= Lance plays basketball.
pVq=
Logical Connectives
▪Definition 4:Conditional
Let p and q be propositions. The conditional
statement p→q, is the proposition “if p, then
q.”
In the conditional statement p→q, p is called
the hypothesis (antecedent or premise) and q
is called the conclusion (or consequence).
Logical Connectives
▪Conditionals
-Read as “if…then…” and has a symbol →.
Consider the following propositions:
p= Today is Sunday.
q= The shop is closed.
p → q= If today is Sunday, then the shop is
closed.
Try it!
Use conditional to form the compound
proposition:
p= I am elected as president.
q= I will lead the class.
p → q=
Logical Connectives
▪Definition 5:Biconditional Statement
Let p and q be propositions. The biconditional
statement p↔q, is the proposition “if p, if
and only if q.”
The biconditional statement p↔q, is true
when p is and q has the same truth values,
and false otherwise.
Logical Connectives
▪Biconditional Statement
-Read as “if and only if” and has a symbol ↔.
Consider the following propositions:
p= Today is Sunday.
q= The shop is closed.
p ↔ q= Today is Sunday, if and only if the
shop is closed.
Try it!
Use conditional to form the compound
proposition:
p= A polygon is a triangle.
q= A polygon has three sides.
p ↔ q=
Let’s Summarize!
Exercise
Change the following propositions from symbol form to
sentence form given:
p= Joy watched the concert of Ben and Ben.
q= Joy studies for the test.
r= Joy is fully rested.
s= Joy passed the test.
1. p ∧ q
2. q V r
3. ~q
4. q →s
5. s↔(q ∧ r)
Let’s Review!
Which of the following is a proposition?
1. 3 is greater than 4.
2. Show me where the library is.
3. August 21, 2023 is a holiday.
4. The baby wears pretty clothes.
Logical Connectives/Connectors
• Negation – Today is Tuesday.
-Today is not Tuesday.
-It is false that today is Tuesday.
-It is not true that today is Tuesday.
Quantifiers and Negation
Examples:
• All men play basketball.

• Some men do not play basketball.


Examples:
• No odd numbers are divisible by 2.

• Some odd numbers are divisible by 2.


Simple or Compound?
1. I washed my clothes and mopped the floor.
2. The dogs are eating their dinner.
3. If 8 is a composite number, then it has
more than 2 factors.
4. I am looking for a red rose or a yellow
tulip.
GROUPING STATEMENTS AND GROUPING SYMBOLS

41
Symbolic to Compound
Consider the given simple
propositions and construct the
compound statement of the ~r ⋀ q
given symbolic statement.
p: Today is Monday.
q: The kids are playing.
r: It is raining.
For numbers 20 through 25, translate each sentence in symbolic
form. Use p, q, r, and s as defined below.
p : Stephen Curry is a football player.
q : Stephen Curry is a basketball player.
r : Stephen Curry is a rock star.
s : Stephen Curry plays for the Warriors.
20. Stephen Curry is a basketball player, if and only if he
is not a rock star.
A. q → ~ r B. q → r C. q ↔ ~ r D. q ↔ r
43
p : Stephen Curry is a football player.
q : Stephen Curry is a basketball player.
r : Stephen Curry is a rock star.
s : Stephen Curry plays for the Warriors.
21. If Stephen Curry plays for the Warriors, then he is a
basketball player.
A. s → q B. s ↔ q C. s → ~ q D. s ↔ ~ q
44
It’s time for
groupwork!
Task #1: Write the following compound
statements in symbolic form.
1.If it rains, then I will stay at home.
2.If I will go to Australia, then I will earn more
money.
3.He is poor but honest.
4.If a = b and b = c then a = c.
5.Neither it is hot nor cold today.
Task #2: Convert the following symbolic
statements into compound statements given
the following propositions.
p: The sun is shining.
q: It is raining.
r: The ground is wet.
a. (p ⋀ q) → r
b. r → (~p ⋀ q)
c. q↔r
Converse,
Inverse, and
Contrapositives
Conditional
• If-Then Statement
• “IF” refers to the hypothesis.
• “THEN” refers to the conclusion.

p→q
Related Statements to Conditionals
Converse
•To form the converse of the conditional
statement, interchange the hypothesis and the
conclusion.

Conditional: p → q If p, then q
Converse: q → p If q, then p
Example:
Conditional: p → q
If you live in Puerto Princesa City, then
you live in Palawan.
Converse: q → p
If you live in Palawan, then you live in
Puerto Princesa City.
Inverse
•To form the inverse of the conditional
statement, take the negation of both the
hypothesis and the conclusion.

Conditional: p → q If p, then q
Inverse: ~p → ~q If not p, then not q
Example:
Conditional: p → q
If you live in Puerto Princesa City, then
you live in Palawan.
Inverse: ~p → ~q
If you do not live in Puerto Princesa
City, then you do not live in Palawan.
Contrapositive
•To form the contrapositive of the conditional
statement, interchange the hypothesis and the
conclusion of the inverse statement.

Conditional: p → q If p, then q
Contrapositive: ~q → ~p If not q, then not p
Example:
Conditional: p → q
If you live in Puerto Princesa City, then
you live in Palawan.
Contrapositive: ~q → ~p
If you do not live in Palawan, then you
do not live in Puerto Princesa City.
Truth Tables
Truth Values
•The value of a simple or compound
proposition whether true (T) or false (F).
1. Negation
• Equal to the p ~p
opposite truth
T F
value of the
proposition. F T
2. Conjunction
•Has only a “TRUE” p q p⋀ q
truth value when
both are true. T T T
Otherwise, it has a T F F
“FALSE” truth vale. F T F
F F F
3. Disjunction
•Has a “TRUE” truth
when either one or p q p⋁ q
both of the T T T
proposition has a T F T
“TRUE” truth value. F T T
Otherwise, it has a
“FALSE” truth value. F F F
4. Conditional
•Has a “FALSE” truth
value when the first p q p→ q
proposition is TRUE T T T
and the second T F F
proposition is FALSE.
F T T
Otherwise, it has a
“TRUE” truth value. F F T
5. Biconditional
•Has a “TRUE” truth p q p↔ q
value when both
T T T
propositions share
the same truth value. T F F
Otherwise, it has a F T F
“FALSE” truth value. F F T
Summary
•The value of a simple or compound
proposition whether true (T) or false (F).
Exercises
Write the converse, inverse, and contrapositive
of the following statements.
1. If you are in love, then you are inspired.
Converse
Inverse
Contrapositive
Write the converse, inverse, and contrapositive
of the following statements.
2. If two lines are parallel, then the two lines do
not intersect.
Converse
Inverse
Contrapositive
Write the converse, inverse, and contrapositive
of the following statements.
3. If the number is divisible by 2 and 3, then the
number is divisible by 6.
Converse
Inverse
Contrapositive
Write the converse, inverse, and contrapositive
of the following statements.
4. If you participate in class, then you will get
extra points.
Converse
Inverse
Contrapositive
Write the converse, inverse, and contrapositive
of the following statements.
5. If the garbage is disposed properly, then the
diseases will be prevented.
Converse
Inverse
Contrapositive
Construct the truth table for the following
symbolic statements.
p q ~p ~p V q
T T

T F

F T

F F
Construct the truth table for the following
symbolic statements.

p q pꓥq ~q (p ꓥ q) ꓦ ~q

T T

T F

F T

F F
Construct the truth table for the following
symbolic statements.

p q (p V q) ~(p V q)

T T

T F

F T

F F
Construct the truth table for the following
symbolic statements.
(p ꓥ q)
p q (p ꓥ q) (p V q) V
(p V q)
T T
T F
F T
F F
Construct the truth table for the following
symbolic statements.
p q r (p ꓥ q) (p ꓥ q) → r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F

You might also like