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

PRINCIPLES OF LOGIC

PROPOSITIONAL LOGIC

As the name suggests propositional


logic is a branch of mathematical logic
which studies the logical relationships
between propositions (or statements,
sentences, assertions) taken as a whole,
and connected via logical connectives.
Propositional logic is also known by the
names sentential logic, propositional
calculus and sentential calculus. It is useful in
a variety of fields, including, but not limited
to:
• workflow problems
• computer logic gates
• computer science
• game strategies
• designing electrical systems
LOGIC

• the study of correct thinking and reasoning


• the foundation for expressing logical methods used to
prove theorems, design computer software, and to
solve mathematical problems.
• It includes:
• A language for expressing statements
• A concise notation for writing statements.
• A methodology for objectively reasoning about their
truth or falsity.
FUNDAMENTAL CONCEPTS -
DEFINITIONS

In propositional logic a statement


(or proposition) is represented by a
symbol (or letter) whose relationship with
other statements is defined via a set of
symbols (or connectives). The statement is
described by its truth value which is
either true or false.
PROPOSITIONS

A proposition is a statement,
taken in its entirety, that is either
true or false. For example, a
proposition might be:
All elephants are green.
STATEMENT OR
PROPOSITION

• A declarative sentence with a definite meaning,


having a truth value that is true or false but not both.
• A proposition (statement) may be denoted by a
variable like P, Q, R,…, called a proposition
(statement).
STATE WHETHER OR NOT THE
FOLLOWING ARE STATEMENTS

a. Washington, D.C., is the capital of


the United States of America.
b. 7 + 2 = 10.
c. Read this carefully.
d. x + 1 = 2.
e. A circle represents a function.
STATE WHETHER OR NOT THE
FOLLOWING ARE STATEMENTS

f. Why should we study Math?


g. A number is divisible by 2 if and only if
it is even.
h. 4 < 7 or 3 < 2
i. 2 is the only even prime number.
j. If a triangle is isosceles, then it has 2
equal sides.
PROPOSITION LETTERS

In propositional logic, a proposition by


convention is represented by a capital letter,
typically boldface. For example, the
proposition above might be represented by
the letter A.
A: All elephants are green
TRUTH VALUE

Each of the propositions is assigned a truth


value of either true or false. In other areas
(for example computer logic gates) these
values are given by the binary representations
1 (true) and 0 (false)
CONNECTIVES

In propositional logic, the relationships between propositions are


represented by connectives.
There are essentially five different connectives outlined in the following
table:
Truth tables are a way of visualizing the truth values of propositions. A
value of true is represented by a "1" and a value of false is represented
by a "0".
• Represented in a truth table, we have one row for each of the
above statements (which include all possible combinations of
Marty wearing green boots and/or having a dog), and each
column represents the possible states of each of the
propositions A, B, and, C above.
• So, the four statements above are represented in the following
truth table:
LOGICAL
CONNECTIVES
Logical connective is a word or symbol that joins two sentences
to produce a new one.
George Boole uses symbols such as p, q, r, and s to represent
simple statements and the symbols ˄, ˅, ⁓ or ¬, →, to
represent connectives.
1. Negation
2. Conjunction
3. Disjunction
4. Implication
5. Bi-conditional
LOGICAL CONNECTIVES AND SYMBOLS

Symbolic Type
Statements Connective
Form of Statement

not p not ¬𝑝 /⁓ p negation

p and q and p˄q conjunction

p or q or p˅q disjunction

If p, then q If…then… p→q implication/conditional

p if and only if q …if and only p q biconditional


if…
NEGATION

• The negation of the statement p is denoted by ~𝑝 where ~ is the symbol for


“not”. The truth value of the negation is always the reverse of the truth value of
the original statement.

p q ~p ~q
1 1 0 0
1 0 0 1
0 1 1 0
0 0 1 1

The truth table (1=true, 0=false) for negation


CONJUNCTION

• The conjunction of two statements p and q denoted by p ⋀ q is defined by the


following truth table.
• The only condition for p ⋀ q to be a true statement is when both p and q are true.

p q p⋀q
1 1 1
1 0 0
0 1 0
0 0 0

The truth table (1=true, 0=false)


DISJUNCTION

• The disjunction of two statements p and q denoted by p ⋁ q is defined by the


following truth table.
• This means that the disjunction of two statements is only false when both p and q
are false.
p q p⋁q
1 1 1
1 0 1
0 1 1
0 0 0

The truth table (1=true, 0=false)


IMPLICATION OR
CONDITIONAL

• If p, then q, denoted as 𝑝 → 𝑞 which is false only when p is true and q is false.


• The truth table of p → q is given in the following table.

p q p→ q
1 1 1
1 0 0
0 1 1
0 0 1
BICONDITIONAL

• It is a compound statement “p if and only if q”, denoted as 𝑝 𝑞 which is true


only when both p and q have the same truth values.
• The biconditional statement p 𝑞, is defined by the following truth table

p q p 𝐪
1 1 1
1 0 0
0 1 0
0 0 1

The truth table (1=true, 0=false)


TRUTH VALUES

• Summary of truth values of simple and compound statements using logical connectives

P q ~𝒑 ~𝒒 p⋀q p⋁q p→q p 𝐪

1 1 0 0 1 0 1 1

1 0 0 1 0 0 0 0

0 1 1 0 0 0 1 0

0 0 1 1 0 1 1 1
EXERCISE!
Let p: John is tall.
q: John plays basketball.
r: John is smart.
Translate each of the following into an English sentence.
1. ¬q
2. p˅q
3. r˄q
4. p →q
5. q p
TRUTH TABLES

• Truth tables describe the truth values of compound


propositions.
• The number of rows for the truth tables depends on the
number of propositions being combined.
• If there 2 propositions, there are 4 decision values.
• If there are 3 propositions, there are 8 decision values.
• To determine the number of rows, use rows = 𝟐𝒏
𝑤ℎ𝑒𝑟𝑒 𝒏 𝑖𝑠 𝑡ℎ𝑒 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑟𝑜𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛𝑠
CONSTRUCT A TRUTH TABLE
FOR

a. [⁓ p → ( p ⋀ q)]
Since it involves 2 propositions, there are 4 combinations.

p q ⁓p p⋀q [⁓ p → ( p ⋀
q)]
1 1 0 1 1
1 0 0 0 1
0 1 1 0 0
0 0 1 0 0
CONSTRUCT A TRUTH TABLE
FOR

b. [(p q) ⋁ (p → r)] → ⁓ (q ⋀ r)
Since it involves 3 propositions, there are 8 combinations.

p q r (p q) (p→r) (p q)⋁(p→r) (q⋀r) ⁓(q⋀r) [(p q)⋁(p→r)]→⁓(q⋀r)

1 1 1 1 1 1 1 0 0
1 1 0 1 0 1 0 1 1
1 0 1 0 1 1 0 1 1
1 0 0 0 0 0 0 1 1
0 1 1 0 1 1 1 0 0
0 1 0 0 1 1 0 1 1
0 0 1 1 1 1 0 1 1
0 0 0 1 1 1 0 1 1
EXERCISE

Construct the truth tables for the following:


1. p ˅ (p →q)
2. (p ˅ q)→ (q˄p)
3. (p ˅ q)→ ¬(p˄r)
4. p → [(¬p˄r) ˅ (p r) ]
TAUTOLOGY, CONTRADICTION,
AND CONTINGENCIES
TAUTOLOGY

Tautologies are all true

P ~P 𝑷 ∨ ~𝑷
1 0 1
0 1 1

The truth table (1=true, 0=false)


CONTRADICTION

It has to be always false

P ~P 𝑷 ∧ ~𝑷
1 0 F
0 1 F

The truth table (1=true, 0=false)


CONTINGENT

A contingent statement will have a truth table with both


true and false rows.

P Q 𝑷∨𝑸
1 1 1
1 0 1
0 1 1
0 0 0

The truth table (1=true, 0=false)


CONSTR UCT TR UTH TABLES TO TEST THE FOLLOWIN G
SE NTE NCE S FOR TAUTOLOGY, CONTR ADICT IO N AND
CONTINGE N CY
LOGICAL EQUIVALENCE

Logical equivalence is the condition of


equality that exists between two statements or
sentences in propositional logic
or Boolean algebra.
The relationship between the two statements
translates verbally into "if and only if." In
mathematics, logical equivalence is typically
symbolized by a double arrow (⟺ or ⟷) or triple
lines (≡). The double arrow is sometimes referred
to as an IIF function.
LOGICAL EQUIVALENCE

P Q 𝑷∨𝑸 Q∨𝑷
1 1 1 1
1 0 1 1
0 1 1 1
0 0 0 0

The truth table (1=true, 0=false)


LOGICAL EQUIVALENCE

P Q R 𝑷 ∨ (𝑸 ∧ 𝑹) (𝑷 ∨ 𝑸) ∧ (𝑷 ∨ 𝑹)

1 1 1 1 1
1 1 0 1 1
1 0 1 1 1
1 0 0 1 1
0 1 1 1 1
0 1 0 0 0
0 0 1 0 0
0 0 0 0 0

The truth table (1=true, 0=false)


FUNDAMENTAL LOGICAL
EQUIVALENCES

You might also like