Sie sind auf Seite 1von 26

Logic

PROPOSITION
O A proposition is a declarative sentence (that
is, a sentence that declares a fact) that is either
true or false, but not both.

O 1. Quezon City is the Capital of Manila.


O 2. Apple is the national fruit.
O 3. 1+1=2.4. 2+2=3.
Example

O Consider the following sentences.

O What time is it?


O Read this carefully.
O x+1=2.
O x + y = z.
Exercises
O 1. Which of these sentences are propositions? What
are the truth values of those that are propositions?
a) BatStateU is the number 1 university in the
Philippines.
b) Hangul is the official language of North and
South Korea.
O c) 2+3=5.
d) 5+7=10.
e) x+2=11.
f) Answer this question.
Things to remember
O The conventional letters used for
propositional variables are p, q, r, s, .

O The truth value of a proposition is true,


denoted by T, if it is a true proposition, and the
truth value of a proposition is false, denoted
by F, if it is a false proposition.
O The area of logic that deals with propositions
is called the propositional calculus or propo-
sitional logic. It was first developed
systematically by the Greek philosopher
Aristotle more than 2300 years ago.
Definition 1
O 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.

O The proposition ¬p is read “not p.” The truth


value of the negation of p, ¬p, is the opposite
of the truth value of p.
Exercises
O What is the negation of each of these
propositions?
O a) Mei has an MP3 player.
O b) There is no pollution in Batangas City.
c) 2+1=3.
d) The summer in Philippines is hot and
sunny.
O Definition 2: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.

O Definition 3: 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.
Exercises
O Let p and q be the propositions
O p : I bought a lottery ticket this week.
O q : I won the million dollar jackpot.
Express each of these propositions as an
English sentence.
a)¬p b)p∨q c)p→q d)p∧q
e)p↔q f)¬p→¬q g)¬p∧¬q
h)¬p∨(p∧q)
O Definition 4:Let p and q be propositions. The
conditional statement p → q is the proposition “if
p, then q.”
O The conditional statement p → q is false when p
is true and q is false, and true otherwise.

O In the conditional statement p → q, p is called the


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

O statement p → q is called a conditional statement ,


asserts that q is true on the condition that p holds
ways to express conditional statement

O “if p, then q”
“if p, q”
“p is sufficient for q”
“q if p”
“q when p”
“a necessary condition for p is q” “q unless ¬p”
O “p implies q”
“p only if q”
“a sufficient condition for q is p” “q whenever p”
“q is necessary for p”
“q follows from p”
Exercises
O Let p and q be the propositions “Swimming at
the New Jersey shore is allowed” and “Sharks
have been spotted near the shore,”
respectively. Express each of these com- pound
propositions as an English sentence.
O a) ¬q f) p→¬q h) p∧q
O b) ¬q→p g) ¬p→¬q
c) ¬p∨q
O d) p↔¬q
O e) ¬p∧(p∨ ¬q)
Exercises
O Let p and q be the propositions p : It is below freezing.
O q : It is snowing.
O Write these propositions using p and q and logical
connectives (including negations).
O It is below freezing and snowing.
It is below freezing but not snowing.
It is not below freezing and it is not snowing.
It is either snowing or below freezing (or both).
If it is below freezing, it is also snowing.
Either it is below freezing or it is snowing, but it is not
snowing if it is below freezing.
That it is below freezing is necessary and sufficient for
it to be snowing.
Exercises
O Let p, q, and r be the propositions p : You have
the flu.
O q : You miss the final examination.
O r : You pass the course.
Express each of these propositions as an
English sen- tence.
a) p → q
c) q → ¬r
e) (p→¬r)∨(q→¬r)
f) (p∧q)∨(¬q∧r)
O Definition 6: 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.

O “p is necessary and sufficient for q” “if p then


q, and conversely”
“p iff q.”
Exercises
Exercises
Converse, Contrapositive, Inverse

O The proposition q → p is called the converse


of p → q.

O The contrapositive of p → q is the


proposition ¬q → ¬p.

O The proposition ¬p → ¬q is called the inverse


of p → q.
Example

O “If it is raining, then the home team wins.”

O Inverse

O Converse

O Contrapositive
Exercises
O State the converse, contrapositive, and
inverse of each of
O these conditional statements.
O a) If it snows today,I will ski tomorrow.
b) I come to class whenever there is going to
be a quiz.
O c) A positive integer is a prime only if it has
no divisors other than 1 and itself.
Exercises

O State the converse, contrapositive, and


inverse of each of
O these conditional statements.
O a)  If it snows tonight, then I will stay at
home.
O b)  I go to the beach whenever it is a
sunny summer day.
O c)  When I stay up late, it is necessary
that I sleep until noon.

Das könnte Ihnen auch gefallen