0% found this document useful (0 votes)
11 views98 pages

Logic 2019

The document covers the fundamentals of logic, including propositions, logical operations, and their applications in mathematics and computer programming. It explains concepts such as conjunction, disjunction, negation, and the construction of truth tables, along with exercises to reinforce understanding. Additionally, it discusses logical equivalence, conditional and biconditional statements, and provides examples and exercises for practical application.

Uploaded by

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

Logic 2019

The document covers the fundamentals of logic, including propositions, logical operations, and their applications in mathematics and computer programming. It explains concepts such as conjunction, disjunction, negation, and the construction of truth tables, along with exercises to reinforce understanding. Additionally, it discusses logical equivalence, conditional and biconditional statements, and provides examples and exercises for practical application.

Uploaded by

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

Logic

MIT11053 Mathematics and Statistic for IT

AJM Hasmy – [email protected]

Enrolment Key :
Logic

• Mathematical representation of facts and Mathematical reasoning.


• used to distinguish between valid and invalid mathematical arguments
• Besides the importance of logic in understanding mathematical reasoning, logic has
numerous applications to computer science. These rules are used in the design of
computer circuits, the construction of computer programs, and in many other ways.

Logical statement in simple plain English:


“If you want to pass the subject,
you have to score at least 40”
Application of Logic in JAVA Prgramming Language
Condition T/F
(Logical operator)
if(marks>=40){
System.out.print(“Pass”)
}
else {
System.out.print(“Fail”)
}
== Equal to
!= Not equal to
> Greater than
>= Greater than or
equal to
< Less than
<= Less than or equal to
So, the basic syntax for any programming language,
if(Condition) Returns either True / False
statement(s) Executed if the result of the condition is true
else
statement(s) Executed if the result of the condition is false

In Logic, in terms of mathematical notation, we can say that,

pq (if p, then q)


where , p denotes “marks at least 40” and
q denotes “pass”
Propositions

Definition : A proposition is a statement that is either true or


false, but not both. Whichever of these (true or
false) is the case is called the truth value of the
proposition.
Propositions…..
EXAMPLE 1 All the following declarative sentences are propositions.
1. Colombo is the capital of the Sri Lanka
2. Sri Lanka is in Europe.
3. 1 + 1 = 2.
4. 2 *2 = 8.
Propositions 1 and 3 are true, whereas 2 and 4 are false.

EXAMPLE 2 Consider the following sentences.


1. What time is it?
2. Read this carefully.
3. x + 1 = 2.
4. x + y = z.
Propositions….
EXAMPLE 2 Consider the following sentences.
1. What time is it?
2. Read this carefully.
3. x + 1 = 2.
4. x + y = z.

Sentences 1 and 2 are not propositions because they are


not declarative sentences.
Sentences 3 and 4 are not propositions because they are
neither true nor false
Propositions….
Exercise : proposition or not?

1. Where are you going?


2. Come here.
3. This sentence is false.
4. Anne is tall.
5. Ice cream is delicious.
6. x > 5.
Propositions….
Exercise : proposition or not?

1. Where are you going? A Question


2. Come here. A Command
3. This sentence is false. An Statement
4. Anne is tall. How tall?
5. Ice cream is delicious. Personal opinion
6. x > 5. x is not specified
Propositions….
Exercise : proposition or not?

1. Where are you going? A Question Not a Proposition

2. Come here. A Command Not Proposition


3. This sentence is false. An Statement Proposition
4. Anne is tall. How tall? Not Proposition
5. Ice cream is delicious. Personal opinion Not Proposition
6. x > 5. x is not specified Not Proposition
Propositions….
Exercise : proposition or not?

Which of the following are propositions? Give the truth value


of the propositions?
a. 2 + 3 = 7
b. Bill Clinton was president of Sri Lanka.
c. What time is it?
d. Be quiet !
Propositions….
Exercise : proposition or not?

Which of the following are propositions? Give the truth value of


the propositions.
b. 2 + 2 = 4
c. X+6 > 7
d. How are you?
e. x+6 > 7, where x>1
f. x+6 > 7, where x<1
Compound Proposition
Many propositions are composite, that is, composed of
subpropositions and various connectives discussed
subsequently.
Such composite propositions are called compound propositions.
A proposition is said to be primitive proposition, if it cannot be
broken down into simpler propositions, that is, if it is not
composite.
Eg: 1. “Roses are red and violets are blue.”
2. “John is smart or he studies every night.”
BASIC LOGICAL OPERATIONS
This section discusses the three basic logical operations of
conjunction(AND), disjunction(OR), and negation(NOT).

The connectives if-then and if-and-only-if are also known as implies and is-
equivalent-to respectively.
CONJUNCTION
DEFINITION :
Let p and q be propositions. The conjunction of p and q, denoted
by p ∧ q, is the proposition “p and q.” The conjunction p ∧ q is
true when both p and q are true and is false otherwise.

(if p is true and q is true, then p ∧ q is true)


(if p is true and q is false, then p ∧ q is false)
Example
Consider the following four statements:
(i) Ice floats in water and 2 + 2 = 4.
(ii) Ice floats in water and 2 + 2 = 5.
(iii) China is in Europe and 2 + 2 = 4.
(iv) China is in Europe and 2 + 2 = 5.

Only the first statement is true. Each of the others is false


since at least one of its sub statements is false.
DISJUNCTION
DEFINITION :
Let p and q be propositions. The disjunction of p and q, denoted
by p∨ q, is the proposition “p or q.” The disjunction p ∨ q is
false when both p and q are false and is true otherwise.
Example
Consider the following four statements:
(i) Ice floats in water or 2 + 2 = 4.
(ii) Ice floats in water or 2 + 2 = 5.
(iii) China is in Europe or 2 + 2 = 4.
(iv) China is in Europe or 2 + 2 = 5.

Only the last statement (iv) is false. Each of the others is true
since at least one of its sub-statements is true..
Compound Proposition..
Exercise:
Consider the following propositions
p : It is Friday
q : It is raining
A. Construct the propositions p ∧ q and p ∨ q:
B. Construct the Truth Table for p ∧ q and p ∨ q:
Compound Proposition..
Solution.
A)
The conjunction of the propositions p and q is the proposition
p Ʌ q : It is Friday and it is raining:
The disjunction of the propositions p and q is the proposition
p V q : It is Friday or It is raining
Compound Proposition..
Solution.
B)
NEGATION
DEFINITION :
Let p be a proposition. The negation of p, denoted by ¬ p (also
denoted by p), is the statement “It is not the case that p.”

The proposition ¬ p is read “not p.” The truth value of the ¬ p,


is the opposite of the truth value of p.

P can be formed by writing “It is not true that . . .” or “It is false that . . .”
Example
(a1) Ice floats in water.
(a2) It is false that ice floats in water.
(a3) Ice does not float in water.

(b1) 2 + 2 =5
(b2) It is false that 2 + 2 = 5.
(b3) 2 + 2 ≠ 5

(a2) and (a3) are each the negation of (a1); and


(b2) and (b3) are each the negation of (b1).

Since (a1) is true, (a2) and (a3) are false; and


Note
The logical notation for the connectives “and,” “or,” and “not”
is not completely standardized.
For example, some books use:
PROPOSITIONS AND TRUTH
TABLES
The main property of a proposition Z(p, q, . . .) is that its truth value
depends exclusively upon the truth values of its variables, that is, the
truth value of a proposition is known once the truth value of each of its
variables is known. A simple concise way to show this relationship is
through a truth table.
CONSTRUCTING TRUTH TABLES FOR COMPOUND
PROPOSITIONS

Eg : Construct a Truth Table for the Proposition ¬(p ∧ ¬q).

STEPS:
1) Calculate Number of Possible T/F combinations for the given variables
using 2n where n is the number of variables.

For 2 variables(22), 4 rows are necessary;


for 3 variables(23), 8 rows are necessary.
CONSTRUCTING TRUTH TABLES…
STEPS:
2) Construct a separate column for each variable involving
NEGATION.

3) Then a column for each “elementary” stage of the


construction of the proposition, the truth value at
each step being determined from the previous stages
by the definitions of the connectives ∧, V, ¬.
CONSTRUCTING TRUTH TABLES…
STEPS:
4) Finally we obtain the truth value of the proposition, which appears in the
last column(by applying conjunction/disjunction/negation between
appropriate columns ).

Remark: In order to avoid an excessive number of parentheses,


we sometimes adopt an order of precedence for the logical
connectives. Specifically, ¬ has precedence over ∧ which
has precedence over V
For example, ¬p ∧ q means (¬p) ∧ q and not ¬(p ∧ q).
TAUTOLOGIES AND
CONTRADICTIONS
TAUTOLOGIES
Some propositions Z(p, q, . . .) contain only T in the last column of their truth
tables or, in other words, they are true for any truth values of their variables.
Such propositions are called tautologies.

Eg: The proposition “p or not p,” that is, p V ¬p, is a tautology


TAUTOLOGIES AND
CONTRADICTIONS
CONTRADICTIONS
A proposition Z(p, q, . . .) is called a contradiction if it contains only F in the last
column of its truth table or, in other words, if it is false for any truth values of
its variables.
Eg : the proposition “p and not p,” that is, p ∧ ¬p, is a contradiction.
TAUTOLOGIES AND
CONTRADICTIONS..
Note :
Note that the negation of a tautology is a contradiction since it
is always false, and the negation of a contradiction is a
tautology since it is always true.
EXERCISE :
1. Construct truth table for the propositions ¬(p ∧ q) ∧(¬p V ¬q) and
verify it is tautology
2. Let p be “It is cold” and let q be “It is raining”. Give a simple verbal
s sentence which describes each of the following statements:
(a) ¬p (b) p ∧ q (c) p V q (d) q V ¬p
Answer :
1. Construct truth table for the propositions ¬(p ∧ q) ∧(¬p V ¬q) and verify it is tautology
2. Let p be “It is cold” and let q be “It is raining”. Give a simple verbal s sentence which describes each
of the following statements:
(a) ¬p (b) p ∧ q (c) p V q (d) q V ¬p
1) Since the truth value of
¬(p ∧ q) ∧(¬p V ¬q)
is T for all values of p
and q, the proposition is
a tautology.

2)
(a) It is not cold. (b) It is cold and raining.
(c) It is cold or it is raining. (d) It is raining or it is not cold.
Exercise:
1. What is the negation of each of these propositions?
a) Juan has an MP3 player.
b) There is no pollution in Kandy.
c) 2 + 1 = 3.
d) The first semester in MIT is hard.

2. Let p and q be the propositions “chatting is not allowed in the class room” and
“Students have been spotted near the shore,” respectively. Express each of these
compound propositions as an English sentence.
a) p ∧ q b) pV q c) ¬p ∨ q
d) p → ¬q e) ¬q → p f) ¬p → ¬q
g) p ↔ ¬q h) ¬p ∧ (p ∨ ¬q)
LOGICAL EQUIVALENCE
Two propositions X(p, q, . . .) and Y(p, q, . . .) are said to be logically equivalent, or simply
equivalent or equal, denoted by
X(p, q, . . .) Ξ Y(p, q, . . .)
if they have identical truth tables.
Consider, for example, the truth tables of ¬(p ∧ q) and ¬p V ¬q.
LOGICAL EQUIVALENCE..

Observe that both truth tables are the same, that is, both propositions are
false in the first case and true in the other three cases. Accordingly, we can
write ¬(p ∧ q) Ξ ¬p V ¬q
In other words, the propositions are logically equivalent.
ALGEBRA OF PROPOSITIONS

(Double Negation Law)

(Negation Law)
Use the laws Table to show that ¬(p V q) V
(¬p ∧ q) Ξ ¬p.
CONDITIONAL AND BICONDITIONAL
STATEMENTS
CONDITIONAL STATEMENT
Let p and q be propositions. The conditional statement p → q is
the proposition “if p, then q.” The conditional statement p → q
is false when p is true and q is false, and true otherwise.

In the conditional statement p → q,


p is called the hypothesis and
q is called the conclusion (or consequence).

The conditional p → q is frequently read “p implies q” or “p only if q.”


CONDITIONAL AND BICONDITIONAL
STATEMENTS..
CONDITIONAL STATEMENT..
Truth Table for Conditional Statement pq

pq is only false when the hypothesis (p)


is true and the conclusion (q) is
false; otherwise it is true. Note that a
conditional is a compound statement
Eg:
“If you get 100% on the final, then you will get an A.”
CONDITIONAL AND BICONDITIONAL
STATEMENTS..
CONDITIONAL STATEMENT..
Note that the truth table of ¬p V q and p  q are identical, that is, they
are both false only in the second case. Accordingly, p  q is logically
equivalent to ¬p V q; that is, p q Ξ ¬p V q

“If p then q” Ξ “Not p or q”


Check this out for logical
equivalence

You can either use truth table or


equivalence law
Exercise:
• Using Truth Table
• Using Laws

2
DeMorgan’s Law

Involution Law
1. Using Truth Table
2. Using Laws
1. Using Truth Table
2. Using Laws
1. Using Truth Table
2. Using Laws
CONDITIONAL AND BICONDITIONAL
STATEMENTS..
CONDITIONAL STATEMENT..
CONDITIONAL AND BICONDITIONAL
STATEMENTS..
CONDITIONAL STATEMENT..
Consider following two statements
1) “If John has a smartphone, then 2 +
3 = 5”
2) “If John has a smartphone, then 2 +
3 = 6”
Exercise:
Determine whether each of these conditional statements is
.
true or false.
a) If 1 + 1 = 2, then 2 + 2 = 5.
b) If 1 + 1 = 3, then 2 + 2 = 4.
c) If 1 + 1 = 3, then 2 + 2 = 5.
d) If monkeys can fly, then 1 + 1 = 3.
BICONDITIONAL STATEMENTS
Let p and q be propositions. The biconditional statement p
↔ q is the proposition “p if and only if q.” The biconditional
statement p ↔ q is true when p and q have the same truth
values, and is false otherwise. Biconditional statements are
also called bi-implications.
The statement p ↔ q is true
when both the conditional
statements p → q and q → p
are true and is false
otherwise.
Note that p ↔ q has exactly the
same truth value as
BICONDITIONAL STATEMENTS
There
. are some other common ways to express p ↔ q:
“p is necessary and sufficient for q”
“if p then q, and conversely”
“p iff q.”

Eg: Let p be the statement “You can take the flight,” and let q
be the statement “You buy a ticket.”
Then p ↔ q is the statement
“You can take the flight if and only if you buy a ticket.”
BICONDITIONAL STATEMENTS
Eg:. Let p be the statement “You can take the flight,” and let q
be the statement “You buy a ticket.”
Then p ↔ q is the statement
“You can take the flight if and only if you buy a ticket.”
This statement is true if p and q are either both true or both
false,
that is, if you buy a ticket and can take the flight or if you do
not buy a ticket and you cannot take the flight.
It is false when p and q have opposite truth values.
Arguments
An argument is an assertion that a given set of propositions P1, P2, .
. . , Pn, called premises, yields (has a consequence) another
proposition Q, called the conclusion. Such an argument is denoted
by P1, P2, . . ., Pn Q
The notion of a “logical argument” or “valid argument” is formalized
as follows:
Definition : An argument P1, P2, . . ., Pn Q is said to be valid if Q is
true whenever all the premises P1, P2, . . . , Pn are true.

* An argument which is not valid is called fallacy.


Arguments…
Premises:
One or more propositions in an argument. They are the evidence (or reasons) for
accepting the argument and its conclusions.
Inference:
The premises of the argument are used to obtain further propositions. This process
is known as inference
Conclusion:
Finally, we arrive at the conclusion of the argument (another proposition). The
conclusion is often stated as the final stage of inference. It is affirmed on the basis the
original premises, and the inference from them. Conclusions are often indicated by phrases
such as "therefore", "it follows that", "we conclude" and so on.
Arguments…
Statements: An argument : (p1,p2,p3,…..,pn) q
p: Roger studies.
q: Roger plays tennis.
r: Roger passes discrete mathematics. premises conclusion

Premises:
p1: If Roger studies, then he will pass discrete math.
p2: If Roger doesn't play tennis, then he'll study.
p3: Roger failed discrete mathematics.
Determine whether the argument p1,p2,p3 q is valid.
p1: p  r , p 2 :  q  p , p 3 :  r which is a tautology,
the original argument
 ( p1  p 2  p 3 )  q  is valid
[( p  r )  (  q  p )   r ]  q
Arguments…
Statements: p: Roger studies. | q: Roger plays tennis. | r: Roger passes discrete mathematics.
Premises: p1: If Roger studies, then he will pass discrete math. | p2: If Roger doesn't play tennis, then he'll study.
p3: Roger failed discrete mathematics.

Determine whether the argument p1,p2,p3 q is valid.

Method 1: Construct the truth table for – If tautology – it is valid


Method 2: Construct the truth table for pr, ¬qp, ¬r,q – if whenever all premises have T in a
particular row and conclusion also has T in that same row – it is valid argument
Exercise

1. Determine whether the argument p  q, ¬p ¬q is valid


2. Determine the validity of the following argument: p  q, ¬p
¬p.
Exercise
1. Determine whether the argument p  q, ¬p ¬q is valid

Since the proposition is not a tautology, the


argument is a fallacy.
Equivalently, the argument is a fallacy since in
the third line of the truth table p  q and ¬p
are true but ¬q is false.

2. Determine the validity of the following argument: p  q, ¬p ¬p.

Since the proposition is a tautology, the argument is valid.


Arguments…
Law of Detachment:
The proof of this rule follows from the truth table. Specifically, p and p  q are true simultaneously
only in Case (row) 1, and in this case q is true.

Law of Syllogism:
This fact is verified by the following truth table which shows that the proposition is a tautology:

Equivalently, the argument is valid since the premises p  q and q  r are true simultaneously only
in Cases (rows) 1, 5, 7, and 8, and in these cases the conclusion p  r is also true.
Arguments…
The propositions P1, P2, . . . , Pn are true simultaneously if and only if
the. proposition P1 ∧ P2 ∧ . . . Pn is true.
Thus the argument P1, P2, . . . , Pn Q is valid if and only if Q is true
whenever P1 ∧ P2 ∧ . . . ∧ Pn is true or, equivalently, if the
proposition (P1 ∧ P2 ∧ . . . ∧ Pn)  Q is a tautology.
We state this result formally.
Theorem : The argument P1, P2, . . ., Pn Q is valid if and only if the
proposition (P1 ∧ P2 . . . ∧ Pn)  Q is a tautology.
Arguments…
Consider the following argument:
S1 : If a man is a bachelor, he is unhappy.
S2 : If a man is unhappy, he dies young.
________________________________
S : Bachelors die young
Here the statement S below the line denotes the conclusion of the
argument, and the statements S1 and S2 above the line denote the
premises. We claim that the argument S1, S2 S is valid. For the
argument is of the form p  q, q r p  r
Exercise
1. Determine the validity of the following argument: p → q, ¬ p ¬p.
2. Show that the following argument is a fallacy: p  q, ¬p ¬q.
Hint :
I. Construct the truth table containing all premises and the conclusion
II. If the proposition (involving the argument) is tautology, then the argument
is valid otherwise fallacy

3. Determine the validity of the following argument:


If 7 is less than 4, then 7 is not a prime number.
7 is not less than 4.

7 is a prime number.
Answer
3. Determine the validity of the following argument:
If 7 is less than 4, then 7 is not a prime number.
7 is not less than 4.
7 is a prime number.
First translate the argument into symbolic form.
Let p be “7 is less than 4” and
q be “7 is a prime number.” Then
the argument is of the form p  ¬q, ¬p q
Now, we construct a truth table.

Remark: The fact that the conclusion of the argument happens to be a true statement is
irrelevant to the fact that the argument presented is a fallacy.
PREDICATE Logic
Predicate:
A Predicate is a declarative sentence whose true/false value depends on one or more
variables.
The statement “x is greater than 3” (x>3)has two parts:
The subject: x is the subject of the statement
The predicate: “is greater than 3” (a property that the subject can have).
We denote the statement “x is greater than 3” by P(x), where,
P is the predicate “is greater than 3” and
x is the variable.
The statement P(x) is also called the value of propositional function P at x.
Assign a value to x, so P(x) becomes a proposition and has a truth value:
P(5) is the statement “5 is greater than 3”, so P(5) is true.
P(2) is the statement “2 is greater than 3”, so P(2) is false.
Predicates: Examples
Given each propositional function determine its true/false value when variables are
set as below.
Prime(x) = “x is a prime number.”  propositional function
Prime(2) is true, since the only numbers that divide 2 are 1 and itself.
Prime(9) is false, since 3 divides 9.

C(x, y)=“x is the capital of y”.


C(Ottawa, Canada) is true.
C(Colombo, India) is false.

E(x, y, z) = “x + y = z”.
E(2, 3, 5) is ...
E(4, 4, 17) is ...
Quantifiers
Assign a value to x in P (x) =“x is an odd number”, so the resulting statement
becomes a proposition:
P (7) is true, P (2) is false.
Quantification is another way to create propositions from a propositional
functions:
Universal quantification: ∀ x P(x) says,
“The predicate P is true for every element under consideration.”
Under the domain of natural numbers, ∀ x P(x) is false.
Existencial quantification: ∃ x P(x) says,
“There is one or more element under consideration for which the predicate P is
true.”
Under the domain of natural numbers, ∃ x P(x) is true, since for instance P (7) is
true.
Domain / Domain of Discourse /
Universe of Discourse
The set of all related things we wish to talk about; that is, the set of all objects
that we can sensibly assign to a variable in a propositional function.
Eg:
1. Color(x) = “ x is my favourite”
The domain of x can be {Red,Blue,Green,Yellow,Brown}
2. P (x) =“x is an odd number”
∀xP (x) is false for the domain of integer numbers; but
∀xP (x) is true for the domain of prime numbers greater than 2.
Universal Quantifier
The universal quantification of P(x) is the statement
“P(x) for all values of x in the domain.”
The notation ∀xP(x) denotes the universal quantification of P(x).
Here ∀ is called the universal quantifier.
We read ∀xP(x) as “for all x P(x)” or “for every x P(x).”

An element for which P(x) is false is called a counterexample of


∀xP(x).

If the domain is empty, ∀xP (x) is true for any propositional


function P (x), since there are no counterexamples in the domain.
Existencial Quantifier
The existential quantification of P(x) is the proposition “There exists
an element x in the domain such that P(x).”
We use the notation ∃xP(x) for the existential quantification of P(x).
Here ∃ is called the existential quantifier.
∃x P (x) is true when P (x) is true for one or more x in the
domain. An element for which P (x) is true is called a witness of
∃x P (x)
If the domain is empty, ∃xP (x) is false for any propositional
function P (x), since there are no witnesses in the domain.
Quantification ∃xP(x) is read as, “There is an x such that P(x),” “There
is at least one x such that P(x),” or “For some xP(x).”
Let P(x) be the statement “x + 1 > x.” What is the truth value
of the quantification ∀xP(x), where the domain consists of all
real numbers?
Solution: Because P(x) is true for all real numbers x, the
quantification
Let Q(x) be the statement “x < 2.” What is the truth value of
∀xP(x) is true.
the quantification ∀xQ(x), where the domain consists of all real
numbers?
Solution: Q(x) is not true for every real number x, because, for
instance, Q(3) is false. That is, x = 3 is a counterexample for the
NEGATION OF QUANTIFIED
STATEMENTS
Consider the statement: “All math genius are male.” Its negation reads:
“It is not the case that all math genius are male” or, equivalently,
“There exists at least one math genius who is a female (not male)”
Considering the domain of all math genius, the above can be written as
¬(∀x)(x is male) ≡ (∃ x) (x is not male) or, when p(x) denotes “x is male,”
¬(∀x)p(x) ≡ (∃ x)¬p(x) or ¬∀x p(x) ≡ ∃x ¬p(x)
The above is true for any proposition p(x). That is:
Theorem i (DeMorgan): ¬(∀x ∈ A)p(x) ≡ (∃ x ∈ A)¬p(x).
In other words, the following two statements are equivalent:
(1) It is not true that, for all a ∈ A, p(a) is true.
(2) There exists an a ∈ A such that p(a) is false.
There is an analogous theorem for the negation of a proposition which contains the existential
quantifier.
NEGATION OF QUANTIFIED
STATEMENTS
Consider the statement: “All math genius are male.” Its negation reads:
“It is not the case that all math genius are male” or, equivalently,
“There exists at least one math genius who is a female (not male)”
Considering the domain is set of math all genius, the above can be written as
¬(∀x)(x is male) ≡ (∃ x) (x is not male) or, when p(x) denotes “x is male,”
¬(∀x)p(x) ≡ (∃ x)¬p(x) or ¬∀xp(x) ≡ ∃x¬p(x)
The above is true for any proposition p(x). That is:

Theorem ii (DeMorgan): ¬(∃x ∈ A)p(x) ≡ (∀x ∈ A)¬p(x).

That is, the following two statements are equivalent:


(1) It is not true that for some a ∈ A, p(a) is true.
(2) For all a ∈ A, p(a) is false.
Exercise A
1. What is the truth value of ∀xP(x), where P(x) is the statement “x2 < 10”
and the domain consists of the positive integers not exceeding 4?
2. What does the statement ∀xN(x) mean if N(x) is “Computer x is
connected to the network” and the domain consists of all computers on
campus?
3. Let P(x) denote the statement “x > 3.” What is the truth value of the
quantification ∃xP(x), where the domain consists of all real numbers?
4. Let Q(x) denote the statement “x = x + 1.”What is the truth value of the
quantification ∃xQ(x), where the domain consists of all real numbers?
Exercise A
1. What is the truth value of ∀xP(x), where P(x) is the statement “x2 < 10”
and the domain consists of the positive integers not exceeding 4?

Answer: False
The statement ∀xP(x) is the same as the conjunction
P(1) ∧ P(2) ∧ P(3) ∧ P(4),
because the domain consists of the integers 1, 2, 3, and 4.
Because P(4), which is the statement
“42 < 10,” is false, it follows that ∀xP(x) is false.
Exercise A
2. What does the statement ∀xN(x) mean if N(x) is “Computer x is
connected to the network” and the domain consists of all computers on
campus?

Answer : Every computer on campus is connected to the network

The statement ∀xN(x) means that for every computer x on campus,


that computer x is connected to the network. This statement can be
expressed in English as “Every computer on campus is connected to
the network.”
Exercise A
3. Let P(x) denote the statement “x > 3.” What is the truth value of the
quantification ∃xP(x), where the domain consists of all real numbers?
Answer : True

Because “x > 3” is sometimes true—for instance, when x = 4—the


existential quantification of P(x), which is ∃xP(x), is true.

Observe that the statement ∃xP(x) is false if and only if there is no


element x in the domain for which P(x) is true. That is, ∃xP(x) is false if
and only if P(x) is false for every element of the domain.
Exercise A
4. Let Q(x) denote the statement “x = x + 1.”What is the truth value of the
quantification ∃xQ(x), where the domain consists of all real numbers?

Answer : False

Because Q(x) is false for every real number x, the existential


quantification of Q(x), which is ∃xQ(x), is false.
Exercise B
Let A = {1, 2, 3, 4, 5}. Determine the truth value of each of the
following statements:
(a) (∃x ∈ A)(x + 3 = 10) (c) (∃x ∈ A)(x + 3 < 5)
(b) (∀x ∈ A)(x + 3 < 10) (d) (∀x ∈ A)(x + 3 ≤ 7)
Exercise B
Let A = {1, 2, 3, 4, 5}. Determine the truth value of each of the following statements:
(a) (∃x ∈ A)(x + 3 = 10) (c) (∃x ∈ A)(x + 3 < 5)
(b) (∀x ∈ A)(x + 3 < 10) (d) (∀x ∈ A)(x + 3 ≤ 7)

a) False. For no number in A is a solution to x + 3 = 10.


b) True. For every number in A satisfies x + 3 < 10.
c) True. For if x = 1, then x + 3 < 5, i.e., 1 is a solution.
0 0

d) False. For if x = 5, then x + 3 is not less than or equal 7. In other words,


0 0

5 is not a solution to the given condition.


Exercise C
Express each of these statements using logical operators, predicates, and
quantifiers.
1. Some propositions are tautologies.
2. The negation of a contradiction is a tautology.
3. The disjunction of two contingencies can be a tautology.
4. The conjunction of two tautologies is a tautology.
Exercise C
Express each of these statements using logical operators, predicates, and quantifiers.
1. Some propositions are tautologies.
2. The negation of a contradiction is a tautology.
3. The conjunction of two tautologies is a tautology.

Let T(x) mean that x is a tautology and


C(x) mean that x is a contradiction.
1) ∃x T (x)
2) ∀x(C(x)→T ( ¬ x))
3) ∀x∀y((T (x) ∧T (y)) → T (x∧y))
Exercise D
Translate these statements into English, where the domain for each variable
consists of all real numbers.
a) ∀x∃y(x < y)
b) ∀x∀y(((x ≥ 0) ∧ (y ≥ 0)) → (xy ≥ 0))
c) ∀x∀y∃z(xy = z)
Exercise D
Translate these statements into English, where the domain for each variable
consists of all real numbers.
a) ∀x∃y(x < y)
b) ∀x∀y(((x ≥ 0) ∧ (y ≥ 0)) → (xy ≥ 0))
c) ∀x∀y∃z(xy = z)
a) For every real number x there exists a real number y such that x is
less than y.
b) For every real number x and real number y, if x and y are both
nonnegative, then their product is nonnegative.
c) For every real number x and real number y, there exists a real
number z such that xy = z.
Nested Quantifiers
Existential and universal quantifiers can be used together to quantify a
predicate statement; for example,
∀x∃y P(x, y)
is perfectly valid. However, you must be careful—it must be read left to right.
For example, ∀x∃yP (x, y) is not equivalent to ∃y∀xP (x, y). Thus, ordering is
important.
For example:
 ∀x∃y Loves(x, y): everybody loves somebody
 ∃y∀x Loves(x, y): There is someone loved by everyone

Those expressions do not mean the same thing!


Nested Quantifiers…
Nested Quantifiers…
Exercise:
1. Use quantifiers to express the statement “There is a woman who has
taken a flight on every airline in the world.”

2. Write the following two propositions in symbols:


‘For every number x there is a number y such that y = x + 1.’
‘There is a number y such that, for every number x, y = x + 1.’
Nested Quantifiers…
Exercise:
1. Use quantifiers to express the statement “There is a woman who has taken a
flight on every airline in the world.”
Let P(w, f ) be “w has taken f ” and Q(f, a) be “f is a flight on a.”
We can express the statement as ∃w∀a∃f (P(w, f ) ∧ Q(f, a)),
where the domains of discourse for w, f , and a consist of all the women in the
world, all airplane flights, and all airlines, respectively.
2. Write the following two propositions in symbols:
‘For every number x there is a number y such that y = x + 1.’
‘There is a number y such that, for every number x, y = x + 1.’
Let P(x,y) denote the predicate ‘y = x + 1’.
The first proposition is: ∀x∃y P(x, y)
The second proposition is: ∃y∀xP(x, y)
Types of Proofs
• Direct Proof
• Contrapositive Proof
• Proof by Contradiction
• Proof by counterexample
• Proof by Mathematical Induction
Types of Proofs…
Direct Proof
Ex: Prove that if x and y are odd integers then xy is odd

Solution: Since x and y are odd we can write x= (2m+1) and y= 2n+1
where m and n are integers
Then xy = (2m+1)(2n+1)
4mn+2m+2n+1
2(2mn+m+n) + 1
xy = 2p + 1 where p is an integer
Since mn, m and n are integers . Therefor xy is odd
Types of Proofs…
Proof by Mathematical Induction
Let p(n) be a statement that is either true or false for any positive integer n. suppose we have,
(i) P(i) is true
(ii) assuming P(r) is true, we can show that P(r+1) is also true
for all positive integers r

Then p(n) is true for all n1.


Condition (i) is called the basis for the induction
Condition (ii) is called the inductive step

Ex: Prove that 1+2+3+…..+n = (n+1) for any integer n1

Solution: Let p(n) be the proposition


1+2+3+…..+n = (n+1)
(i) When n = 1, p(1) states 1 = (1+1) which is true,
result is true for n = 1, That is P(1) is true
Types of Proofs…
Proof by Mathematical Induction
Ex: Prove that 1+2+3+…..+n = (n+1) for any integer n1
Solution: Let p(n) be the proposition
1+2+3+…..+n = (n+1)
(i) When n = 1, p(1) states 1 = (1+1) which is true,
Result is true for n = 1,
That is P(1) is true

(ii) Assume that the result is true for n = r,


That is assume that P(r) is true.
Then 1+2+3+…..+r = (r+1)
Adding (r+1) to both sides, we get Therefor result is true for n = (r+1)
1+2+3+…..+r +(r+1) = (r+1) + (r+1) That is P(r+1) is true
= (r+2) Hence P(n) is true for all n1
Exercise
1

You might also like