GSP 2205 Lecture Note

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

Page 1 of 12

GSP2205 MODULE 4

5.1 WHAT IS LOGIC?


Logic is a non-empirical science of reasoning. Logic helps in uncovering error and
establishing the truth.
5.2 LOGICAL TERMS
Logical terms are used for reasoning that may occur in statements about any kind
of subject-matter, and are supposed to be based on rules or axioms that specify
their valid and proper use.
5.3 WHAT ARE THE LOGICAL TERMS?
The answer to this question appears difficult because there is no universal
agreement on what are the logical terms. However, it is a good idea to have the
notion, for further characteristic and provide a list. The further characteristics
logical terms are often were called Syncategorematic terms i.e. to have no meaning
on their own, but only in conjunction with terms that have meaning. Here are some
of the logical terms that have been widely considered and appeared as such in
many texts:
True, false, necessary, possible, contingent, tautology, contradiction, antecedent,
consequence, premise, conclusion, not, and, or, implies, if and only if, every, some,
no, equal, such that, so.etc
The common or basic logical terms and their symbols that are widely accepted and
sufficient for first-order logic are summarized in the table below.
Not And Or Implies If and only if
~ ˄ ˅ → ↔

Definition 1: A proposition is a statement that is either true or false, but not both,
i.e. a statement of opinion or judgment.
Example 1
1. BUK is the best university in Nigeria.
2. Abdu gets money
3. Bola study hard
4. 3 + 9 = 12
Page 2 of 12

5. The votes have been counted


6. Today is Sunday
7. Nobody is above the law
8. Either today is Sunday or Abuja is the capital of Ghana
9. Yesterday was raining and BUK is in Abuja
10.Whenever it is Election Day government declare a holiday.
Conventionally, letters such as p, q, r, s, etc are used to denote propositions. The
truth value of a proposition is denoted by T, if it is true and F, if it is false.
Definition 2: New propositions that are obtained by combining one or more
propositions are called Compound propositions. And are formed using logical
terms.
Definition 3: Let p be a proposition. The statement “it is not the case that p”
Is another proposition called Negation of p. The negation of p is denoted by ~p.
The proposition ~ p is read as “not p”.
Examples
1. “GSP2205 is a course in BUK”
The negation is “it is not the case that GSP2205 is a course in BUK”
or even more simply as
“GSP2205 is not a course in BUK”.
2. Find the negation of the proposition
“Ali’s Smartphone has at least 22GB of memory” and express this in simple
English.
Solution: The negation is
“It is not the case that Ali’s Smartphone has at least 22GB of memory.”
This negation can also be expressed as
“Ali’s Smartphone does not have at least 22GB of memory”
or even more simply as
“Ali’s Smartphone has less than 22GB of memory.”
Definition 4: Let p and q be propositions. The proposition “p and q” denoted by
p˄q, is the proposition that is true when both p and q are true at the same time and
is false otherwise. The proposition p˄q is called the Conjunction of p and q.
Examples
Page 3 of 12

1. Let p and q be propositions “It is a good idea” and “It is difficult to


implement” respectively. The conjunction of the propositions p and q, is
p˄q= “It is a good idea and difficult to implement”.
2. Find the conjunction of the propositions p and q where p is the proposition
“Today is Monday” and q is the proposition “It is raining today.”
Solution:
The conjunction of these propositions, p ∧ q, is the proposition “Today is Monday,
and it is raining today.”
For this conjunction to be true, both conditions given must be true. It is false, when
one or both of these conditions are false.

Definition 5: Let p and q be propositions. The proposition “p or q” denoted by


p˅q, is the proposition that is false when p and q are both false and is true
otherwise. The proposition p˅q is called the Disjunction of p and q.
Examples
1. The disjunction of p and q, where p and q are the same in the previous
example, is p˅ q = “It is a good idea or it is difficult to implement”.
2. What is the disjunction of the propositions p and q where p and q are the
same propositions as in the previous example 2
Solution:
The disjunction of p and q, p v q, is the proposition
"Today is Monday or it is raining today."
This proposition is true on any day that is either a Monday or a rainy day
(including rainy Mondays).
It is only false on days that are not Mondays when it also does not rain
Definition 6: Let p and q be propositions, the compound proposition “if p then q”
denoted by “p→q” is the proposition that is false when p is true and q is false and
true otherwise. It is called Conditional (or Implication). In this p is called the
hypothesis (or antecedent or premise) and q is called the conclusion (or
consequence).
Because implications arise in many places in mathematical reasoning, various
ways are used to express p → q, some of the common ways are
(a) “if p, then q”
(b) “p implies q
(c) “p is sufficient for q”
(d) “q if p”
(e) “If p, q”
Page 4 of 12

(f) “q follows from p”


(g) “q is necessary for p”
(h) “p only if q”
Examples
1. Given p is the proposition “it is raining” and q is the proposition “it is
cloudy”. Write the conditional of p and q.
Answer: “If it is raining, then it is cloudy”.
2. "If I am elected, then I will lower fuel price."
If the politician is elected, voters would expect this politician to lower fuel
price. Furthermore, if the politician is not elected, then voters will not have
any expectation that this person will lower fuel price, although the person
may have sufficient influence to cause those in power to lower fuel price. It
is only when the politician is elected but does not lower fuel price that voters
can say that the politician has broken the campaign pledge. This last scenario
corresponds to the case when p is true but q is false in p → q.

Note: that there are some related conditionals that can be formed from p→q. The
proposition q→p is called Converse of p→q. The proposition ~q→~p is called
Contra-positive of p→q. The proposition ~p→~q is called the Inverse of p→q.
Example
Write the converse, inverse and the contra-positive of the implication “if today is
Tuesday, then I have a class today”
Answers
The converse is “if I have a class today, then today is Tuesday”
The inverse is “if today is not Tuesday, then I do not have class a today”
The contra-positive is “if I do not have a class today, then today is not Tuesday”.

Definition 7: Let p and q be positions. The proposition “p if and only if q” denoted


by p↔q is the proposition that is true when p and q have the same truth values and
if false otherwise. It is also called Biconditional.
Page 5 of 12

Note: - The biconditional p↔q is true precisely when both the conditionals p→q
and q→p are true. Because of this the terminology “p if and only if” is used and
this abbreviated as “iff”.
Some ways of expressing the proposition p↔q are
(a) “p is necessary and sufficient for q”
(b) “If p then q, and conversely”.
Examples
1. You passed the GSP2205 course, if and only if you scored 45% or higher
2. Abdu can takes the flight, is necessary and sufficient for Abdu buy a ticker
3. You are breathing, iff you are alive.
5.4 Uses of Logical terms
(1) Sometimes English sentences can be translate into expressions that involves
propositions and logical terms, one of the reason of doing this, is to analyze
the logical expression to determine their truth values.
Example
How can the following English statement be translated to logical expression?
“You can pass the GSP2205 only if you attend all the classes of GSP2205 or you
study the book of GSP2205”
Answer: Logical expression
p: “You can pass the GSP2205”
q: “if you attend all the classes of GSP2205”
r: “you study the book of GSP2205”
p→(qvr).
(2) Logical terms are used extensively in searches of large collections of
information, such as indexes of web pages etc.
5.5 LOGICAL EQUIVALENCES
Definition 8: Compound propositions that have the same truth values in all
possible cases are called logical equivalent.
Page 6 of 12

Definition 9: A compound statement that is always true no matter what the truth
values of the propositions that occur in it, is called a Tautology.
Definition 10: A compound proposition that is always false is called
Contradiction.
Definition 11: A proposition which is neither a tautology nor a contradiction is
called Contingency.
Definition 12: The propositions p and q are called logically equivalent.
If p↔q is a Tautology. The notation p≡q denotes that p and q are logically
equivalent.
One way to determine whether two propositions are equivalent is to use a truth
table.
Examples
1. p↔q is equivalent to (p→q)˄(q→p).
2. ~(p˅q) and ~p˄~q are logically equivalent. (use truth table to verify)
5.6 QUANTIFIERS
Mathematical statements involving variables, such as
“𝑥 > 0”, “𝑥 + 𝑦 = 5”, and “𝑥 + 𝑧 < 𝑦”
are common in mathematical assertions. The truth value of these assertions can
only be determined when the values of the variables 𝑥, 𝑦 and 𝑧, are given. The
statement “𝑥 is greater than 0” has two parts, the variable 𝑥 and the predicate “is
greater than”. We can denotes this assertion by P(𝑥), where P denotes the predicate
“is greater than 0” and 𝑥 is the variable. The statement P( 𝑥) is called the value of
propositional function P at 𝑥. However, when the value of 𝑥 is given, then P(𝑥)
becomes proposition and has a truth value.
For example: if P(𝑥) denotes “𝑥 >0” what are the true values of P(4) & P(-1)? P(4)
is “4>0” is true and P(-1) is “-1>0” is false.

Definition 13: Let 𝑋 be a universe of discourse (or domain). The Universal


quantification of P(x) is the proposition “P(x) is true for all values of x in 𝑋. The
Page 7 of 12

notation ∀ 𝑥, P(𝑥), is used where ∀ is called universal quantifier and it is also


expressed as
“for all 𝑥 P(𝑥)” or “for every 𝑥 P(𝑥)”.
Examples
1. Express the statement “Every student in the class of GSP2205 is intelligent”
as a universal quantification.
Answer:
Let P(x) denote the statement
“𝑥 is intelligent”
Then the statement “every student in the class of GSP2205 is intelligent” can be
written as for all 𝑥 P(𝑥), where the universe of discourse consist of all students in
the class of GSP2205.
2. What does the statement∀ 𝑥 P(x) mean if P(x) is "Computer x is connected
to the network” and the domain consists of all computers on BUK new
campus?
Answer:
The statement ∀ 𝑥 P(x) means that for every computer x on BUK new campus, that
computer x is connected to the network. This statement can be expressed in
English as "Every computer on BUK new campus is connected to the network."
As we have pointed out, specifying the domain is mandatory when quantifiers are
used.

Definition 14: The Existential quantification of P(x) is the proposition “there


exists an element x in the universe of discourse such that P(x) is true”.
The notation Ǝ 𝑥 P(𝑥) is used for the existential qualification of P(x), where Ǝ is
called the existential qualifier. It can also be expressed as
“there is an 𝑥 such that P(𝑥)”
“there is at least one 𝑥 such that P(𝑥)”
“for some 𝑥 P(𝑥)”
Examples
Page 8 of 12

1. Let P(x) donate the statement “x>5” what is the truth value of the
quantifications Ǝ x P(x), where the universe of discourse is the set of real
numbers?
Answer
Since “x>5” is true for instance when x=6-the existential quantification of
P(x), which is Ǝ x p(x) is true.
2. Let Q(x) denote the statement “x+1<x” what is the truth value of the
qualification Ǝ x Q(x) where the universe of discourse is the set of real
numbers?
Answer
Since there is no real number x such that Q(x) is true, the existential of Q(x)
which is Ǝ x Q(x) is false.
Note: that the truth value of a quantified statement often depends on which
elements are in this domain.

5.7 LAWS OF THOUGHT


The following three laws of thought are identified by Aristotle as necessary
conditions for thought. These laws are axiomatic rules in which rational discourse
are based. These laws are
1. The law of identity
The law states that, A is A. In other words, everything is the same as itself.
For example, human is human. Further, 3-2=1, if what the number 3
represents have the same identity with what the number 2 represents.
2. The law of non-contradiction
The law states that nothing can both be and not be at the same time and in
the same sense. For example, the statements: “Ali is Nigerian” and “Ali is
not Nigerian” cannot both be true in the same context.
3. The law of excluded middle
The law states that every statement is either true or false. In-fact this law is
the principle for every proposition.
5.8 NATURE AND FUNDAMENTAL PRINCIPLES OF LOGIC

Logic is dealing with techniques and principles of reasoning. The necessity and
importance of logic is indicated by the place it occupies in the order of learning. St
Thomas says that “logic must be learned before any other science, and he points
out that this has been the usual method of philosophers”.
Page 9 of 12

Definition 15: Argument is simply defined as the collection of statements and a


conclusion. The statements are called premises, where the premises and the
conclusion are separated by either phrase or mark. For example:
If you study hard, then you will pass GSP2205 (premise)
You study hard (premise)
So, you pass GSP2205 (conclusion)
5.9 Fundamental principles of logic
In logic, we study the validity and power of arguments. Since not all arguments are
valid, we need to identify the principles that will ensure the validity of an
argument. For an argument to be valid, it must satisfy the laws of thought. In
addition, an argument needs to satisfy the following fundamental principles of
logic:
1. No argument with all true premises but has a false conclusion is valid.
2. If an argument has all true premises but has a false conclusion, then it is
invalid.
3. If an argument is valid, then every argument with the same form is also
valid.
4. If an argument is invalid, then every argument with the same form is also
invalid.
Furthermore, the nature of every argument is either valid or invalid. It is possible
for a valid argument to have:
a. All true premises and a true conclusion
b. Some false premises and true conclusion
c. All false premises and a true conclusion
d. All false premises and a false conclusion.
Note: that it is not possible for a valid argument to have all true premises and a
false conclusion.

EXERCISES

1) Which of the following statements are propositions? What are the truth values
of them?
a) Audu is a name
Page 10 of 12

b) Do you read at night?


c) Answer all the questions
d) 5+5 = 10
e) There is no weak students in BUK
f) Three is odd number
g) 7 + x =6
h) GSP2205 is a level one course
i) Abuja is the capital of Ghana
j) Do not write on the question paper.
2) What is the negation of each of the following propositions?
a) This month is April
b) There is no students in the campus
c) Audu is a student
d) Today is Friday
e) Level three is difficult in the first degree
f) Bayero University, Kano is the best university in Nigeria.
3) Determine the truth value of each of the following propositions
a) Buhari is the president of Nigeria and Prof. M. Y. Bello is the VC of BUK.
b) Either Abuja or Lagos is the capital of Nigeria now
c) 7 + 3 = 10 and 8 + 2 = 9
d) If 4*3 = 12, then 3 is a factor of 12
e) If 2 + 3 = 5 then 5 is divisible by 3
f) Osinbanjo is the vice president of Nigeria and Prof. Hafiz is the Governor of
Kano
4) Let p and q be propositions
p: I get money
q: I will buy a smart phone

Express each of the following propositions as an English sentence

a) p ˄ q b) ~ q˅ p c) ~ p→ ~ q d) ~ q ˄ ~ p e) ~ p ˅ ~ q f) p → q g) p ↔ q
h) ~p˅ ~ q
5) Consider the following propositions
p: Audu is rich
q: John is poor
Page 11 of 12

Write each of the following compound propositions in term of p and q and logical
terms

a) Audu and John are both rich


b) Neither Audu nor John is poor
c) Audu is not rich and John is not poor
d) It is not true that Audu and John are both rich
e) Either John is not poor or Audu is rich
f) If Audu is rich then, John is poor.
6) Let p and q be propositions
p: It is raining today
q: Today is Friday

Write each of the following compound propositions in term of p and q and logical
terms (symbolic)

a) It is raining today or it is Friday


b) It is raining today but it is not Friday
c) It is not raining today and it is not Friday
d) It is either raining or it is Friday.
7) Let p, q and r be propositions
p: You get admission
q: You study hard
r: You pass all the courses

Express each of the following propositions as an English sentence

a) (p ˄ q)˅ r b) ~q˅(p˄ r) c) ~p→~q d) ~q˄ ~r e) ~p ˅ ~q f) ~p→~r g) q ↔ r


h) ~p˅ ~q
8) Write the converse, inverse and contrapositive of each of the following
implications.
a) If it rains today then, I will carry an umbrella
b) I come to class whenever there is GSP lecture
c) If you study hard, then you will pass all GSP courses
d) A positive integer is even only if it is divisible by two
e) I got to School early whenever I have morning class
f) Study hard is necessary and sufficient conditions of getting A’s grades.
Page 12 of 12

9) Show that the following are logically equivalents


a) ~ (p ↔ q) and ~ p ↔ q
b) p → q and ~ q → ~ p
c) ~ p ↔ q and ~ p↔ ~q
d) (p → q) → r and p → (q → r)
10) Let P(𝑥) denoted the statement “𝑥 is greater or equal 3” what are the truth
values of the following
a) P(1) b) P(4) c) P(-3) d) P(3)
11) Let P(𝑥) denoted the statement “𝑥 contain the letter e” what are the truth
values of the following
a) P(students) b) P(classroom) c) P(true) d) P (faculty) e) P(false)
12) Let P(𝑥) denoted the statement “𝑥 spend more than 6 hours in class every
week,” where the universe of discourse for 𝑥 is the set of BUK students.
Express each of the following quantifications in English
a) ∀ 𝑥 P(𝑥) b) ∀ 𝑥 ~P(𝑥) c) ᴟ 𝑥 P(𝑥) d) ᴟ 𝑥 ~P(𝑥)

For further reading

Anderson. L. A first course in Discrete Mathematics, Springer-Verlag, London,


2001.

Biggs N. L. Discrete Mathematics, Oxford University Press, New Delhi, 2003

Dymacek W. M. and Henry S. J., Introduction to Discrete Mathematics, MacgRaw


Hill. International Singapore, 1998.

Eccles P. J. An Introduction to Mathematical Reasoning, Cambridge University


Press, City MA 02116, 1995.

Kenneth A. R. and Charles R. B. W., Discrete Mathematics and Its Application,


McGraw-Hill, City 1999

You might also like