0% found this document useful (0 votes)
18 views55 pages

Logic_and_Set_Theory-9

The document covers the fundamentals of logic and set theory, focusing on propositions, logical operators, and their truth values. It explains concepts such as simple and compound propositions, logical connectors, tautologies, contradictions, and quantification. Additionally, it includes examples and activities to illustrate these concepts and their applications.

Uploaded by

kayceecalde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views55 pages

Logic_and_Set_Theory-9

The document covers the fundamentals of logic and set theory, focusing on propositions, logical operators, and their truth values. It explains concepts such as simple and compound propositions, logical connectors, tautologies, contradictions, and quantification. Additionally, it includes examples and activities to illustrate these concepts and their applications.

Uploaded by

kayceecalde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Logic and Set Theory

Maricar P. Balolong

Benguet State University

February 26, 2025

Logic and Set Theory


Propositions

Proposition

☞ A proposition is a declarative sentence that is either true or


false, but not both.
☞ If a proposition is true, then its truth value is true (T ).
☞ If a proposition is false, then its truth value is false (F ).

Convention: We use lowercase letters such as p, q, r and s to


represent statements. These are called propositional variables.

Logic and Set Theory


Logical Connectors

One is not prime and one is not composite.


One is neither prime nor composite.
Ken likes singing and he does not like dancing.
He likes singing but not dancing.
If x = 2, then x 2 = 4.
It may be stated as ”x = 2 implies x 2 = 4”. Note that
”x 2 = 4 implies x = 2” may not be necessarily true.

Logic and Set Theory


Propositions

Simple and Compound proposition

☞ A proposition is simple if it cannot be broken down any


further into other component propositions.
☞ A proposition is compound if it is formed from simple
propositions using logical connectors or some combination
of logical connectors.

Logic and Set Theory


Logical Operators

Logical Operators
Logical Operators are symbolic counterparts of the logical
connectors.

Logic and Set Theory


Logical Operators

Definition 0.1
If p is a propositional variable, the negation of p, denoted as
∼ p, is "not p" or "It is not the case that p". The ∼ p has opposite
truth value from p.

p ∼p
T F
F T

Example 0.2
p : Three is an odd number.
∼ p: Three is not an odd number. / It is not the case that three
is an odd number.

Logic and Set Theory


Logical Operators

Definition 0.3
If p and q are propositional variables, the disjunction of p and
q, denoted as p ∨ q, is the proposition “ p or q." It is false when,
and only when both p and q are false.

p q p∨q
T T T
T F T
F T T
F F F

Example 0.4
p : Orange is a color.
q : Orange is a fruit.

Logic and Set Theory


Logical Operators

Definition 0.5
If p and q are propositional variables, the conjunction of p and
q, denoted as p ∧ q, is the proposition “ p and q". It is true when,
and only when both p and q are true.

p q p∧q
T T T
T F F
F T F
F F F

Example 0.6
p : One plus one is two.
q : One multiply by one is one.

Logic and Set Theory


Logical Operators

Definition 0.7
If p and q are propositional variables, the conditional of q by p
is " If p then q" or " p implies q " and is denoted p → q. It is false
when p is true and q is false; otherwise it is true. We call p the
hypothesis (antecedent or premise) of the conditional and q the
conclusion (or consequence)

p q p→q
T T T
T F F
F T T
F F T

Logic and Set Theory


Conditional Statement

Example 0.8
Your mom said that if you pass your math subject, you will
receive a gift. Let
p : You pass your math subject.
q : You receive a gift from your mom.
The promise of your mom may be expressed as

p→q

Logic and Set Theory


Conditional Statement

Case 1: p is true, q is true


This means that your mom kept her promise.
Case 2: p is true, q is false
Certainly, your mom broke her promise.
Case 3: p is false, q is true
You did not pass your math subject, but your mom gave you a
gift. Perhaps, your mom has another reason for giving a gift.
There are many reasons to give you a gift anyway. So your
mother did not break her promise.
Case 4: p is false, q is false
Your mom promised nothing if you did not pass your math
exam. So, she did not break her promise.

Logic and Set Theory


Logical Operators
Definition 0.9
Given propositional variables p and q, the biconditional of p and q is " p if,
and only if, q" and is denoted p ↔ q. It is true if both p and q have the same
truth values and is false if p and q have opposite truth values.

Example 0.10
p : Today is Monday.
q : Tomorrow is Tuesday.
p → q: If today is Monday then tomorrow is Tuesday.
q → p: If tomorrow is Tuesday then today is Monday.
p ↔ q : Today is Monday if and only if tomorrow is Tuesday

p q p↔q
T T T
T F F
F T F
F F T
Logic and Set Theory
Truth Table

Definition 0.11
The truth table for a given statement form displays the truth
values that correspond to all possible combinations of truth
values for its component propositional variables.

Logic and Set Theory


Elementary Logic
Definition 0.12
A statement form (propositional form) is an expression made
up of statement variables and logical connectives

Logic and Set Theory


Elementary Logic

Definition 0.13
Two statement forms are called logically equivalent if and only
if they have identical truth values for each possible substitution
of statements for their statement variables.

∼ (p ∧ q) and ∼ p∨ ∼ q are logically equivalent.

Logic and Set Theory


Definition 0.14
A tautology is a statement form that is always true regardless
of the truth values of the individual statements substituted for
its statement variables. A statement whose form is a tautology
is a tautological statement.

Truth table for (p → q) ∨ (q → p).

p q p→q q→p (p → q) ∨ (q → p)
T T T T T
T F F T T
F T T F T
F F T T T

The statement form is a tautology since in all cases its truth


value is always true.

Logic and Set Theory


Definition 0.15
A contradiction is a statement form that is always false
regardless of the truth values of the individual statements
substituted for its statement variables. A statement whose form
is a contradictory statement.

p ∼p p∧ ∼ p
T F F
F T F

Logic and Set Theory


Definition 0.16
A contingency is a statement form that has a mixture of truth
values of true in some circumstances and false in other
circumstances.

Logic and Set Theory


Example: Contingency

Example 0.17
Construct a truth table of the compound proposition
∼ (b → c) ∧ (∼ c ↔ a).

Logic and Set Theory


Example: Contingency

Example 0.18
Construct a truth table for the compound proposition
∼ (b → c) ∧ (∼ c ↔ a).

a b c ∼c b→c ∼ (b → c) ∼c↔a ∼ (b → c) ∧ (∼ c ↔ a)
T T T F T F F F
T T F T F T T T
T F T F T F F F
T F F T T F T F
F T T F T F T F
F T F T F T F F
F F T F T F T F
F F F T T F F F

Logic and Set Theory


Activity

Tell whether the following is tautology, contradiction or


contingency.
1. (p → q) ∨ (q → r)
2. ∼ p ∧ r → r ∨ q
3. (p ∨ q) ∧ (∼ p∨ ∼ q)
4. (p ∧ q) ∨ (∼ p∨ ∼ q)
Are the statements (p ∨ q) → r and (p → r) ∨ (q → r) logically
equivalent?

Logic and Set Theory


Open Sentence

Definition 0.19
An open sentence is a statement that contains one or more
variables and becomes true or false depending on the values of
those variables.

Logic and Set Theory


Example
Example 0.20
2
If S = {1, 2, 3, . . . , 7}, then P(n) : 2n +5+(−1)
n

2 is prime is a
statement for each n ∈ S . Therefore,

P(1) :3 is prime.
P(2) :7 is prime.
P(3) :11 is prime.
P(4) :19 is prime.

are true statements; while

P(5) :27 is prime.


P(6) :39 is prime.
P(7) :51 is prime.

are false statements.


Logic and Set Theory
Quantification

There are other ways that an open sentence can be converted


into a statement, namely by a method called quantification.
Example 0.21
∀x ∈ S, P(x) can be expressed in words by "For every
x ∈ S, P(x)".

Example 0.22
∃x ∈ S, P(x) can be expressed in words by "There exists x ∈ S
such that P(x).

Logic and Set Theory


Quantification

Consider the open sentence P(x) : x 2 ≥ 0 over the set R. Then

∀x ∈ R, P(x)

or equivalently,
∀x ∈ R, x 2 ≥ 0
can be expressed as

For every real number x , x 2 ≥ 0.

as well as

The square of every real number is nonnegative.

Logic and Set Theory


Universal and Existential Quantifier

Universal Quantifier
The universal quantifier is typically denoted by ∀ and it is
informally read "for all". It follows that the statement
"∀x ∈ U, P(x)" is true if P(x) is true for all values of x in U .

Existential Quantifier
The other type of quantifier is the existential quantifier,
denoted by ∃. The statement ”∃x ∈ U, P(x)” is true if P(x) is
true for at least one value of x in U .

Logic and Set Theory


Activity

Determine the truth value of each of the following statements.


a. ∃x ∈ R, x 2 − x = 0.
b. ∀n ∈ N, n + 1 ≥ 2.
p
c. ∀x ∈ R, x 2 = x.
d. ∃x ∈ Q, 3x 2 − 27 = 0.
e. ∃ ∈ R, ∃ y ∈ R, x + y + 3 = 8.
f. ∀x, y ∈ R, x + y + 3 = 8.
g. ∃x, y ∈ R, x 2 + y 2 = 9.
h. ∀x ∈ R, ∀ y ∈ R, x 2 + y 2 = 9.

Logic and Set Theory


Converse, Contrapositive and Inverse
Definition 0.23
Let p and q be propositional variables.
a. The conditional statement q → p is called the converse of
p → q.
b. The conditional statement ∼ q →∼ p is called the contra-
positive of p → q.
c. The conditional statement ∼ p →∼ q is called the inverse of
p → q.

Example 0.24
Given the statement "If x = 1, then x 3 = 1."
1. The converse of the implication is "If x = 1 then x 3 = 1."
2. The contrapositive of the given is "If x 3 ̸= 1 then x ̸= 1."
3. The inverse of the given is "If x ̸= 1 then x 3 ̸= 1."

Logic and Set Theory


Replacement Rules

Identity P∧T ≡P P∨F ≡P


Domination P∨T ≡T P∧F ≡F
Negation P∨ ∼ P ≡ T P∧ ∼ P ≡ F

Logic and Set Theory


Rules of Replacement

For each of the following propositions state the rules of


replacement that justify the equivalences.
1. [(p∨ ∼ r) → s] ≡ [∼ (p∨ ∼ r) ∨ s]
2. [∼ (p∨ ∼ r) ∨ s] ≡ [(∼ p ∧ r) ∨ s]
3. [{(p∨ ∼ r)∧ ∼ q} → s] ≡ [{(p∨ ∼ r) → (∼ q → s)]
4. [(p∨ ∼ r) →∼ s] ≡ [s →∼ (p∨ ∼ r)]

Logic and Set Theory


Rules of Replacement

Example 0.25
What are the equivalent expressions of the following? State the
rule that you used to find the equivalent expressions.
1. ∼ (∼ h ∨ s)
2. (h ∧ s) ∨ (h∧ ∼ s)
3. p →∼ p

The equivalent expressions are:


1. ∼∼ h∧ ∼ s by De Morgan’s Law
2. h ∧ (s∨ ∼ s) by Distributive property
3. ∼ p∨ ∼ p by material implication

Logic and Set Theory


Rules of Replacement

Example 0.26
Using rules of replacement, show that the given expressions are
logically equivalent.
1. ∼ [(p ∧ q)∨ ∼ (∼ p ∨ q)] ≡∼ p

Logic and Set Theory


Rules of Replacement

Verify if the given propositions are logically equivalent by


constructing a truth table. If they are, prove their equivalence
using the rules of replacement.
1. (p∧ ∼ q) ∨ (∼ p ∧ q) ∨ (∼ p∧ ∼ q) ≡∼ p∨ ∼ q
2. (p → q) ∧ (q → r) ≡ p → r
3. {p ∧ [∼ (∼ p ∨ q)]} ∨ (p ∧ q) ≡ p
4. (Material Equivalence) p ↔ q ≡ (p ∧ q) ∨ (∼ p∧ ∼ q) (No
need to construct a truth table)

Logic and Set Theory


There are many interesting equivalent expressions aside from
the rules that we already have. But we can always derive these
equivalent expressions if we are familiar with the basic
equivalent expressions in our list of rules.

Logic and Set Theory


Arguments

Definition 0.27 (Argument)


An argument is a collection of propositions where it is claimed
that one of the propositions called the conclusion follows from
the other propositions called the premises of the argument.

Example 0.28

1. Premise 1: All spiders have eight legs.


Premise 2: A tarantula is a spider.
Conclusion: Therefore, tarantulas have eight legs.
2. Premise : I see fireflies in my backyard every summer.
Conclusion: This summer, I will probably see fireflies in
my backyard.

Logic and Set Theory


Arguments

Example 0.29
Given the following arguments, identify the premises and the
conclusion.
1. Extensive exercise is good for the health. Good health guar-
antees clear thinking. So, I recommend extensive exercise
to my students.
2. I believe that Allan is the best prospect for the highest po-
sition in the company. He is very intelligent and articulate.
To this day, he does all his duties conscientiously. I have not
heard of anyone complain about him since he goes along
very well with his subordinates and colleagues. He has a
clear vision of the direction the company should take. He is
also well respected in the business community.

Logic and Set Theory


Types of Arguments

Two General Types of Argument

1. A deductive argument is one where it is claimed that the


conclusion absolutely follows from the premises. If the ar-
gument is proven to be valid by using the rules of logic,
then we are absolutely certain that the conclusion follows
from the premises.
2. An inductive argument is one where it is claimed that
within a certain probability of error the conclusion follows
from the premises. The truth of the premise does not guar-
antee the truth of the conclusion.

Logic and Set Theory


Valid Argument

Definition 0.30 (Valid Argument)


A deductive argument is said to be valid argument if whenever
the premises are all true, the conclusion is also true. Thus, the
argument
p1
p2
..
.
pn
∴q
is valid iff the propositional form (p1 ∧ p2 ∧ · · · ∧ pn ) → q is a
tautology. Otherwise, the argument is invalid.

Logic and Set Theory


Proof of Invalidity of an Argument
The invalidity of an argument may be verified by showing that
its propositional form is not tautology. One counterexample
which gives the truth values of the propositions in the
argument that make all the premises true and the conclusion
false is enough to disprove the validity of the argument.
Example 0.31
Prove the invalidity of the argument

a→b
c→d
b∨c

∴a∨d

The propositional form of this argumant is

((a → b) ∧ (c → d) ∧ (b ∨ c)) → (a ∨ d)
Logic and Set Theory
Proof of Invalidity of an Argument

The previous example is false when the propositional variables


have the following truth values

a b c d
F T F F

Since the propositional form of the argument is not a tautology,


then the argument is not valid. The proof of invalidity of an
argument consists of finding the truth values of the
propositional variable which makes the premises true and the
conclusion false.

Logic and Set Theory


Exercise

Use the shortened truth table method to prove the invalidity of


the following arguments
1.
a→b
c→d
b∨c

∴a∨d
2.
e → ( f ∨ g)
g → (h ∧ i)
∼h

∴e→i

Logic and Set Theory


Exercise

Scenario: Brian, Christian, and John all joined a talent


competition where only one got a perfect score.
Brian or John got a perfect score. If Christian’s score was below
100% then John’s score was below 100%. If Brian’s score was
not perfect, then Chistian’s score was not perfect. Therefore,
Brian got a perfect score.
a. Write the corresponding propositional form of the
argument.
b. Use the shortened truth table method to prove the
invalidity of the given argument.

Logic and Set Theory


If Kenneth likes ice cream, then Bheng likes cake. Kenneth
doesn’t like ice cream. Therefore, Bheng doesn’t like cake.
a. Write the corresponding propositional form of the
argument.
b. Use the shortened truth table method to prove the
invalidity of the given argument.

Logic and Set Theory


If we switch to the parliamentary form of government and a
constitutional amendment takes place, then it will cost the
government a considerable amount of money. If it will cost the
government a lot of money, then other important projects will
be neglected. If important projects are neglected, then the
people will be dissatisfied and there will be unrest. Therefore, if
we switch to the parliamentary form of government and a
constitutional amendment takes place, then there will be unrest
in the country.
a. Write the corresponding propositional form of the
argument.
b. Use the shortened truth table method to prove the
invalidity of the given argument.

Logic and Set Theory


If we are vigilant, then most of the problems that we have on
pollution will be solved and we can be assured of a better
future for the coming generations.
a. Propositional Form
b. Negation of propositional form in a
c. Equivalent expression of b
d. The resulting equivalent expression in words

Logic and Set Theory


Use the shortened truth table method to show the invalidity of
the argument
j → (k → l)
k → (∼ l → m)
(l ∨ m) → n

∴ j→n

Logic and Set Theory


Rules of Inference (Proof of Validity of Arguments)

Logic and Set Theory


Example

Example 0.32
Show that the argument

a
a→b
b →∼ c

∴∼ c

is valid using rules of inference.

Logic and Set Theory


Example

Consider the following logical inferences.


I1: If it rains then the basketball match will not be played.
The basketball match was played.
Therefore, there was no rain.

I2: If it rains then the basketball match will not be played.


It did not rain.
Therefore, the basketball match was played.

Which of the following argument is correct?

Logic and Set Theory


Example

Example 0.33
Suppose the given argument is

(a ∧ b) → (a → (d ∧ e))
(a ∧ b) ∧ c
∴ a → (d ∧ e)

a. What rules of inference justify the validity of the given ar-


gument?
b. What are the substitution instances of the rules of inference
in a?
c. Write the corresponding proof of validity.

Logic and Set Theory


Example

Example 0.34
Consider the argument

(a ∧ b) → (a → (d ∧ e))
(a ∧ b) ∧ c
∴ (d ∧ e)

a. What rules of inference justify the validity of the given ar-


gument?
b. What are the substitution instances of the rules of inference
in a?
c. Write the corresponding proof of validity.

Logic and Set Theory


Example

Example 0.35
Suppose the given argument is

(a ∧ b) → (a → (d ∧ e))
(a ∧ b) ∧ c
∴ (d ∨ e)

a. What rules of inference justify the validity of the given ar-


gument?
b. What are the substitution instances of the rules of inference
in a?
c. Write the corresponding proof of validity.

Logic and Set Theory


Example

Example 0.36
If it does not rain or it is not foggy, then the sailing race will be
held and the lifesaving demonstration will go on. If the sailing
race is held, then the trophy will be awarded. The trophy was
not awarded. Therefore, it rained.

Determine if the given argument is valid. If it is valid, prove


the validity of it using rules of inference. Use the following
propositional variables: r-It rains, f-it is foggy, s-the sailing race
will be held, d- the lifesaving demonstration will go on and
t-trophy will be awarded.

Logic and Set Theory


Example

Use the rules of inference to prove the validity of the given


arguments.
1.
(p ∧ c) → n
n → (d ∧ u)

∴∼ (p ∧ c) ∨ (d ∧ u)
2.
(p ∧ c) → m
m→n
n → (d ∧ u)

∴ (p ∧ c) → u

Logic and Set Theory


Example

Write a proof of validity for the following argument

a → (b → c)
d → (b → c)
(∼ a∧ ∼ d) → (∼ e∨ ∼ f )
(∼ e →∼ g) ∧ (∼ f →∼ h)
(i → g) ∧ ( j → h)
∼ (b → c)

∴∼ i∨ ∼ j

Logic and Set Theory

You might also like