Logic Presentation

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

Propositional Logic

Logic is a science of the necessary laws of thought, without


which no employment of the understanding and the reason
takes place. --- Immanuel Kant, 1785

Logic is defined as “The study of truths based completely on the


meanings of the terms they contain.” It includes the act of
reasoning by humans in order to form thoughts and opinions,
as well as classifications and judgments. Some forms of logic
can also be performed by computers and even animals.
Mathematical Logic is defined as a method of reasoning,
provides rules, and techniques to determine whether the
arguments are valid.

The use of logic illustrates the importance of precision and


conciseness in communicating mathematics.
A Proposition (statement) is a declarative sentence
Definition 1.
(a sentence that declares a fact) that is either true or false but
not both. If the proposition is true, then its truth value is true
which is denoted by T, otherwise, the truth value is false which
is denoted by F.

The statement “I am attending the Math class.” is a proposition


but the statement “Are you attending the Math class?” is not a
proposition.
 Note: We use letters to denote propositional variables
(statement variables), that is, variables that represent
propositions. Letters 𝑝, 𝑞, 𝑟, 𝑠, … are the conventional
letters used for propositional variables.
Propositions
 A proposition is a declarative sentence that is either true or false but not both. It is
made in people’s statements many times. Propositions can be written as P is an
example variable to use:

 Examples: Each of the following statements is a proposition, some are true and some are false. Can
you tell which are true, and which are false? If it false, state why.

a) P: 9 is a prime number.
b) Q: PhilSCA-Main Campus is located in Makati City.
c) R: The sum of 3 and 8 is 11.
d) S: 10 < -3.
The following are not proposition

a) P: What is your name?


b) Q: The sum of two numbers.
c) R: x is greater than 3.

 It is an interrogative sentence.
 It does not state a complete thought. So, we cannot say whether it is true or
false.
 x is a variable representing a number. But why is it not a proposition? It is
because specific value of x is not given so we cannot say whether it is true or
false.
Determine whether each of the following statements is a
proposition or not. If proposition, give its truth value.
1. The capital of Philippines is Manila.

2. How many primes are there?

3. Philippines is in China.

4. Why are you here?


5. My seatmate is beautiful (handsome).
6. Mabuhay! It is more fun in the Philippines.
7. The sum of two even numbers is odd.
8. I am lying.
9. It is not true that is not irrational.
10. Participate in class discussion.
A compound proposition is formed from existing
Definition 2.
propositions using logical operators or connectives.
Primitive(simple) propositions are propositions that
cannot be broken down into simpler propositions.

 Determine whether the proposition is simple or compound. If it is compound, identify the primitive
components.
1. Julius is a Math and Science major.
Compound
p: Julius is a Math major.
q: Julius is a Science major.

2. My college years were exciting and it was a roller coaster ride.


Compound
p: My college years were exciting.
q: My college years was a roller coaster ride.
3. If the prices of goods are increasing, then my salary will
increase.
Compound
p: The prices of goods are increasing.
q: My salary will increase.

4. The product of m and n is x or y.


Compound
p: The product of m and n is x.
q: The product of m and n is y.
Definition 3.
The Truth Table for a given statement
displays the truth values that correspond to all
possible combinations of truth values for its
component statement variables.
CONJUNCTION­
A proposition formed by combining two or
more simple statements in certain ways is
called a compound proposition. Two common
connectives used for this purpose are the words
“and” and “or” which are called logical
connectives.
Definition 4: Conjunction Let p and q be
propositions. The conjunction of p and q,
denoted by 𝑝^𝑞, is the proposition "𝑝 𝑎𝑛𝑑 𝑞".
The conjunction 𝑝^𝑞 is true when both p and q
are true and is false otherwise.
𝑷: √2 is a rational number.
Q: 6 is an even number.
𝑷 ∧ 𝐐: √2 is a rational number and 6 is an even
number.
CONJUNCTION­
Consider the following simple propositions:

p = “June has 30 days.”


q = “3 is odd.”

If we join these propositions by the word “and”, we


have a compound proposition. That is,

p and q = “June has 30 days and 3 is odd.”


CONJUNCTION­
Conjunction Truth Table
Table 1-A

p q pq
T T T
T F F
F T F
F F F
CONJUNTION­

The conjunction q
p“June has 30 days and 3 is odd.”
Is true because p is true and q is also true.

The conjunction = “4 is divisible by 2 and


,” is false because p pis qtrue and q is false.
Try this

1. Philsca is in Villamor, Pasay and 4 + 5 = 9

2. Today is October 27, 2021 and tomorrow is


Thursday.

3. 3 + 1 = 4, and 1 is a prime number.


 Disjunction – a disjunction is statement formed by joining
statement using the word “or”.
 𝑷: √2 is a rational number.
 Q: 6 is an even number.
𝑷 ∨ 𝐐: √2 is a rational number or 6 is an even number
Definition 5: Disjunction (Inclusive) Let p and q be
propositions. The disjunction of p and q, denoted
by 𝑝 ∨ 𝑞, is the proposition "𝑝 𝑜𝑟 𝑞". The
disjunction 𝑝 ∨ 𝑞 is false when both p and q are false
and is true otherwise.
Table 1-B
q q pvq
T T T
T F T
F T T
F F F
DISJUNCTION­
Which of the following sentences are propositions: Determine the
truth value if possible.

1. Many happy returns of the day.


2. All smokers are drinkers.

3. If x = 2, then x2 = 4
4.
5. Please call me up.
6. Today is Monday.
7. An equilateral triangle is also isosceles.
8. Parallel lines do not intersect.
9. Where do you live?
10.
DISJUNCTION­
In each of the following, construct the disjunction.
Determine the truth value of each.

11. The moon is larger than the earth


Equilateral triangles are also equiangular.

12.
Pagsanjan Falls is in Batangas.

13. The area of a circle is 2r

14. 32 is odd
23 is even
Use table 1-A and 1-B to construct the truth table for each of the following.

1. pqr
2. pqr
3. pqr
4. pqr
Definition 4: Negation
Let p be a proposition. The negation of p, denoted by ~𝑝, is the
statement “It is not the case that p.”
The proposition ~𝑝 is read as “not p”. The truth value of the
negation of p, ~p, is the opposite of the truth value of p.

Negation is the denial of statement Such a negation may be stated in various


ways. For example, to negate the statement “3 is odd”, we may use or assert
any of the following:

“3 is not odd.”
“It is not true that 3 is odd.”
“It is false that 3 is odd.”
NEGATION

If p is any proposition, we may use any of the following symbols


to denote its negation.

p or p or ~p

In like manner the negation of compound proposition, say , may


be denoted by

pq or  ( p  q) or ~ ( p  q)
To be consistent with our symbolism, we shall use the third
notation, that is, the negation sign . The symbol is read “not p”.
NEGATION
Table 1-C
Table 1-C is the truth table for .
p
It Table 1-C ~p

tells us that the negation of a true T F

proposition F T

will be considered false and the negation


of a
false proposition will be considered true.
That
is if p is true, then is false or if p is false,
then is true.
NEGATION
EXAMPLE 1: Negate the following:
(a) p = “5 is divisible by 2.”
(b) q = “”
(c) p  q = “5 is divisible by 2 and ”

Solution:
(a) ~ p = “5 is not divisible by 2.”
(b) ~ q = “ .”
(c) ~ ( p  q) = “It is not true that 5 is divisible by 2 and .”

EXAMPLE 2: Let p and q be any two propositions. Construct a truth


table for each of
the following propositions:(a) ~ ( p  q(b)
) ~ p ~ q

Solution:
The truth table for isq)constructed
~ (p  by use Table 1-A and Table 1-C.
NEGATION
Table 1-D
p q pq
~ ( p  q)
T T T F
T F F T
F T F T
F F F T

(b) The truth table for ~ p is~ constructed


q by use Table 1-C
and Table 1-B.

Table 1-E
P q ~p ~q ~ p ~ q

T T F F F
T F F T T
F T T F T
F F T T T
NEGATION
Negate each of the following:
1. X2 – 1 is factorable.
2. 4 is not odd.
3. 5 = 8
4. Today is Monday.
5. He is tall and handsome.
6. 5 + 2 7 or 42 = 16.
7. Christmas is December 25th or I am happy.
8. I am rich and she is cute.
Definition 8: Conditional Statements (Implication) Let p and q be propositions.
The conditional statement 𝒑 → 𝒒 is the proposition “if p, then q.”. The conditional
statement 𝑝 → 𝑞 is false when p is true and q is false, and true otherwise. In the
conditional statement 𝑝 → 𝑞, p is called the hypothesis (or antecedent or premise)
and q is called the conclusion (or consequence).

Conditional statements 𝒑 → 𝒒 can be converted into another conditional


statements, such as:
A. Converse: The converse of 𝒑 → 𝒒 is 𝒒 → 𝒑.
B. Inverse: The inverse of 𝒑 → 𝒒 is ~𝒑 → ~𝒒.
C. Contrapositive: The contrapositive of 𝒑 → 𝒒 is ~𝒒 → ~𝒑.

Note: When 2 compound propositions always have the same truth value, then
they are called equivalent (logically equivalent). The symbol ⟺ is sometimes
used instead of ≡ to denote logical equivalence.
Write/state the converse, inverse, and contrapositive of the
following statements.

1. If P is a square, then P is a rectangle.

2. If today is New Year’s eve, then tomorrow is January.


3. If n is prime, then n is odd or n is 2.

4. If Tom is Ann’s father, then Jim is her uncle and Sue is her aunt.
CONDITIONAL
PROPOSITION
Table 1-G is a combination of the truth tables of and its converse . this table shows that
whenever p q and q p are both true, their components are either true together (TT) or false
together (FF).
P Q
Table 1-G
T T T T

T F F T

F T T F

F F T T

EXAMPLE 3. = “if x = 2, then x + 3 = 5.” Is TRUE


= “if x + 3 = 5, then x = 2.” Is TRUE

EXAMPLE 4. = “if x = 2, then x2 = 4.” Is TRUE


= “if x2 = 4, then x = 2.” Is FALSE

In Example 4, while the conditional is TRUE, its converse is FALSE. The


conclusion “x = 2” is not necessarily TRUE since x might -2.
Definition 9: Biconditionals Let p and q be
propositions. The biconditional statement
𝑝 ↔ 𝑞 is the proposition "𝑝 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑞". The
biconditional statement 𝑝 ↔ 𝑞 is true when p and q
have the same truth values, and is false otherwise.
Biconditional statements are also called bi-implications.
Express each of these propositions as an English sentence.

Let p, q and r be the propositions


p: You have the flu.
q: You miss the final examination.
r: You pass the course.

a. p → q

b. ~q ↔ r
Express each of these propositions as an English sentence.

Let p, q and r be the propositions


p: You have the flu.
q: You miss the final examination.
r: You pass the course.
c. p ∨ q ∨ r

d. (p → ~r) ∨ (q → ~r)
Verify the following logical equivalences Involving Conditional
and Biconditionals using truth tables.
a. ~(𝑝 → 𝑞) ⇔ 𝑝 ∧ ~𝑞
b. 𝑝 ∨ 𝑞 ⇔ ~𝑝 → 𝑞
c. (𝑝 → 𝑞) ∧ (𝑝 → 𝑟) ⇔ 𝑝 → (𝑞 ∧ 𝑟)
d. ⇔

e. (( p ʌ q) → ( p v q ) ⇔ T

You might also like