Vous êtes sur la page 1sur 15

The Foundations: Logic and

Proof, Sets, and Functions

Discrete Structures
AL ME B . M ARAVIL L AS, MC S
LOGIC

Logic is the study of good reasoning. It deals with true and false.
Proposition(s)- is a declarative statement that is either true or false,
but not both.

“but not both?”- statements that are true and false at the same
time. These are called “bivalent statements, half-truths, paradoxes”
Examples of propositions
1. Washington D.C. is the capital of the United States of America.
2. Toronto is the capital of Canada.
3. 1 + 1 = 2.
4. 2 + 2 = 3.
Propositions 1 and 3 are true, whereas 2 and 4 are false.
Proposition’s Truth Values
The truth value of a proposition is true, denoted by T, if it is a true proposition, and
false, denoted by F, if it is a false proposition.

Proposition’s Truth Table


A truth table displays the relationships between the truth values of propositions.
Truth tables are specially valuable in the determination of the truth values of
propositions constructed from simpler propositions.
DEFINITION 1
Let p be a proposition.
The statement “It is not the case that p” is another proposition, called the
negation of p. The negation of p is denoted by ~p. The proposition ~p is read “not
p.”
Example: Find the negation of the proposition
“Today is Friday.”
Solution: The negation is “It is not the case that today is Friday.”
This negation can be more simply expressed by “Today is not Friday.” or “It is not
Friday today.”
DEFINITION 2
Let p and q be propositions.
The proposition “p and q,” denoted p  q, is the proposition that is true when both p
and q are true and is false otherwise. The proposition p  q is called the conjunction of
p and q.

Examples
Conjunction: Let p be the proposition “Today is Friday” and q be the proposition “It is
raining today.” Find the conjunction of p and q.
p  q: “Today is Friday and it is raining today.”
DEFINITION 3
Let p and q be propositions.
The proposition “p or q,” denoted p  q, is the proposition that is false when both p and q are
false and is true otherwise. The proposition p  q is called the disjunction of p and q.
DEFINITION 4
Let p and q be propositions.

The exclusive or of p and q, denoted by p  q, is the proposition that is true


when exactly one of p and q is true and is false otherwise.
DEFINITION 5
Let p and q be propositions.
The implication p q is the proposition that is false when p is true and q is false, and true
otherwise. In this implication p is called the hypothesis (or antecedent or premise) and q is called
the conclusion (or consequent).

Ways to express implications:


“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” “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”
Examples of conditional
statements
1.“If I am elected, then I will lower taxes.”
2.“It is sunny today only if we will go to the beach.”
3.“2 + 3 = 6 whenever today is Friday.”
Determine whether these
implications are 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 pigs can fly, then 1+1=3.
e) If 1+1=3, then God exists.
f) Goat can swim whenever today is Friday.
g) I am beautiful when today is Monday.
Converse, Contrapositive, And
Inverse Of Implications

Converse: q  p is the converse of p  q.


Contrapositive: ~q  ~p is the contrapositive of p  q.
Inverse: ~p  ~q is the inverse of p  q.
Example: What are the contrapositive, the converse, and the inverse
of the implication
“The home team wins whenever it is raining.”
Solution:
“q whenever p” type

q: “The home team wins.” p:”It is raining.”


Converse: “If the home team wins, then it is raining.”
Contrapositive: “If the home team losses, then it is not raining.”
Inverse: “If it is not raining, then the home team lost.”
State the converse, the contrapositive,
and inverse of each of these statements.

a) If it snows today, I will ski tomorrow.


b) I come to class whenever there is going to be a quiz.
c) A positive integer is a prime only if it has no divisors other
than one and itself.
DEFINITION 6
Let p and q be propositions.
The biconditional p  q is the proposition that is true when p and q have the
same truth values, and is false otherwise.

Read as “p if and only if q” “p is necessary and sufficient for q” “if p, then q,


and conversely” “p iff q”
Note: p  q has exactly the same truth values as (p  q)  (q  p).

Vous aimerez peut-être aussi