You are on page 1of 10

MATHEMATICAL LOGIC

Introduction to Logic
 Logic and Propositions
 Logical Connectives
 Truth Tables
 Conditional Statements
 Tautology, Contradiction, and Contingency
 Logical Equivalences and Implications

Logic and Propositions


Logic is the discipline that deals with the study of reasoning. It
provides rules and techniques for determining whether a given
argument is valid or not.
The rules of logic are used in many areas, particularly in
mathematics. Logical methods are used to prove theorems or to
distinguish between valid and invalid mathematical arguments. It is also
essential in computer science in verifying the correctness of programs.

A proposition is any declarative sentence that is either true or


false, but not both.

The truth value of a proposition is true, denoted by T (or 1), if it is


a true proposition and false, denoted by F (or 0), if it is a false
proposition.

Example 1
Which of the following are propositions?
a. Today is Monday.
b. Did you buy the textbook?
c. 13 + 17 = 40
d. Take your medicine.
e. There are nine planets in the universe.
f. 23 – x = 11

Logical Connectives
A proposition is said to be atomic if it cannot be further
subdivided. Atomic propositions may be combined to form compound
propositions. Atomic propositions are usually denoted by lowercase
letters p, q, r etc.
Compound propositions are formed by combining one or more
atomic propositions using logical connectives. There are five basic
logical connectives or logical operators used in logic. These are the
negation, conjunction, disjunction, conditional, and biconditional.

Negation
The negation of a proposition p, denoted by ¬p (read as "not
p"), is the statement
"It is not the case that p."
The truth value of ¬p is the opposite of the truth value of p.
Example 2
Give the negation of each proposition.
a. Today is Wednesday.
b. There is no pollution in Metro Manila.

Conjunction

The conjunction of two propositions 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.

Disjunction

The disjunction of two propositions 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 3
Let p: Today is Monday.
q: It is raining today.
Write the following in words.

a. p∧q

b. p∨q
c. ¬p∧q

d. p∨¬q .

Exclusive or

The exclusive or of propositions 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.

Conditional

The conditional statement (also called implication) 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 statement
p→q , p is called the hypothesis (or antecedent or premise) and q is
called the conclusion (or consequent).

Biconditional

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.

Example 4
Let p: John learns math logic.
q: John will get a good grade.
Write the following in words.

a. p→q
b. q ↔ p

c. ¬ p→¬q

d. ¬q ↔¬ p

Example 5
Let p: You pass the final examination.
q: You do every exercise in class.
q: You pass this course.
Write these propositions using p, q, and r and logical connectives.
a. You pass the final exam and this course.
b. You pass this course but you do not do every exercise in class.
c. If you either do every exercise in class or pass the final examination
you will pass this course.
d. You will pass this course if and only you both do every exercise in
class
and pass the final exam.
e. You won’t pass this course if you neither pass the final exam nor do
every exercise in class.
In general, parentheses, brackets, and braces are used to specify the
order in which logical operators in a compound proposition are to be
applied. In cases where grouping symbols were not used we shall use
the following precedence of logical operators.

Operator Precedence

¬¿ ¿
1
¿ 2
¿
3

4

5

Example 6
Using parenthesis/parentheses and the rules of precedence of
logical operators to establish what is really meant in each expression.
a. ¬ p∧q

b. p∧q∨r

c. p∨q →r
Truth Tables
Truth values of propositions may be summarized in a table. A
truth table of a proposition gives the truth values of the proposition
under all possible cases or assignments.
The following are the truth tables of the compound propositions
combined by the logical operators.

p ¬p
T F
F T

p q p∧q p q p∨q p q p⊕ q
T T T T T T T T F
T F F T F T T F T
F T F F T T F T T
F F F F F F F F F

p q p→q p q p↔ q
T T T T T T
T F F T F F
F T T F T F
F F T F F T
Example 7
Construct the truth table for each proposition.

a. p∧¬ p b. p⊕¬ p

c. ¬p∧( q →¬p ) d. ( p→q ) ↔ (¬q →¬ p )

e. ( p∨q )∧¬r f. ( p∨q ) → ( r∧¬ p )


Solution
p∧¬ p p⊕¬ p
p p
T T
F F

¬p∧( q →¬p ) ( p→q ) ↔ (¬q →¬ p )

p q p q

T T T T
T F T F
F T F T
F F F F
( p∨q )∧¬r

p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F

( p∨q ) → ( r∧¬ p )
p q r
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F

You might also like