0% found this document useful (0 votes)
13 views19 pages

EM214_Logic_part 1

discrete mathematics logic part 1

Uploaded by

e21200
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views19 pages

EM214_Logic_part 1

discrete mathematics logic part 1

Uploaded by

e21200
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

EM 214: Discrete Mathematics

Class Notes

Propositional logic : Part 1

Dr. R. Palamakumbura
Introduction
Mathematical Logic:

• In this lecture, we will discuss basic concepts that are part of the
foundation of mathematical logic.

• What is mathematical logic? Mathematical logic is the application of


mathematical techniques to logic.

• What is logic?
- Recall first the role of logic in the clarification of human reasoning.
- In order to make the reasoning fruitful, first of all we have to
decide what is the subject of reasoning or, in other words, what
are we going to talk about and what language are we going to
use.
- The next step is to associate a precise meaning to basic notions
of the language, in order to avoid ambiguities and
misunderstandings.
Introduction
Mathematical Logic:

- Finally we have to state clearly what kind of opinions


(sentences) can be formulated in the language we deal with
and, moreover, which of those opinions are true (valid), and
which are false (invalid).
- Now we can investigate the subject of reasoning via the
validity of expressed opinions. Such an abstraction defines a
specific logic.
- Logic has two aspects: formal and informal.
- Informal logic exists whenever we have a language.
- Formal often called, ‘mathematical’ logic has its origins in
ancient Greece in the West with Aristotle. Mathematical logic
has two sides: syntax and semantics. Syntax is how we say
things; semantics is what we mean.
Introduction

Mathematical Logic:

• Logical formalisms are applied in many areas of computer


science. The extensive use of those formalisms resulted in
defining hundreds of logics that fit nicely to particular
application areas.

• Some examples propositional logic, predicate or first order


logic, second order logic, Modal logic etc.

• Here we will focused on classical propositional and predicate


logics.

• Automated deduction techniques are presented mainly in the


context of propositional logic.
Propositional Logic

• From the work of George Boole, an Irish mathematician in the nineteenth


century, that we have Boolean algebra or Boolean logic or, as it is often
known today, propositional logic.

• The basic unit of reasoning is a statement that can have a truth value,
either true or false. We call such a statement a proposition.

• Thus a proposition is a statement that is either true or false and contains


no variables.

Examples:
1. “It is raining now” is a proposition.
2. “3+2=5” is a proposition.
3. “x.0=0” is not a proposition since it contains a variable.
4. “What a beautiful morning”, is not a proposition.

• Notation: Use English letters p,q,r,…or P,Q,R,… to denote propositions.


Truth values are denoted by,
True:T or 1
False: F or 0
Propositional Logic

• The language of propositional logic consists of a


- Symbols: Vocabulary
- Syntax: Grammar expressed interns of a set of formation
rules
- Semantics: Interpretation of the formal language

• Symbols:
- An infinite number of propositional letters: p,q,r,…or P,Q,R,
…etc.
- Six logical connectives: ⌝: Not
∨ : Or
∧ : And
⊕ : Xor
→ : Implication
↔ : Biconditional
(, ): Left right parantheses
Propositional Logic

• Syntax:
This specifies which symbols can be put together in what
order.This formation rules specify which combination of
symbols is a well defined formula. A well defined formula is
abbreviated as wff.(pronounced woof)

A well defined formula is any formula obtained as follows and


repeated application of 1-7.
1. p, q, r, ⋯
2. ⌝p 3. p ∨ q
4. p ∧ q 5. p ⊕ q
6. p → q 7. p ↔ q
Propositional Logic
Precedence:
When simplifying a wff the convention is as follows.
1. ⌝p
2. p ∨ q, p ∧ q, p ⊕ q
3. p → q, p ↔ q

Note that this convention is not universal.

• Semantics:
Here we will see how to interpret a wff. That is how to find the truth
value of a wff.
The valuation is done by assigning a truth value for each
propositional variable and evaluate according to the logical
connectives.
Graphical interpretation or the tabulated form is called a truth
table.
Propositional Logic

• Truth Table: We will start from logical connectives:


Propositional Logic

• Truth Table:

In the implication p is called the assumption or antecedent and q is


called the conclusion. Now if you observe the truth table for the
implication, you see when p is false then q the conclusion is true.
To understand this we will consider an example.
Propositional Logic
Suppose a professor said, “If you get 90, you get an A”.

Here p: You get 90 and q: you get an A. That is p → q .

Now when is the only time a student can complain? Which means the
statement is not true. A student got 90 and didn’t get an A. That is p is true
and q is false.

Note: A conditional statement is false when the hypothesis is true and the
conclusion is false. In mathematical logic false implies everything.

Summary:
Propositional Logic

More examples:

As a homework complete the following.


Propositional Logic

• Logical Equivalences:

An important type of step used in a mathematical argument is the replacement of a


statement with another statement(usually simpler) with the same truth value. This leads
to the concept of logical equivalences. First we will have some definitions.

Definitions:

- Tautology: A wff that is always true is called a tautology.

Example: p ∨ ⌝p

- Contradiction: A wff that is always false is called a contradiction.

Example: p ∧ ⌝p

- Contingency: A wff that is neither a tautology nor a contradiction is called a


contingency.

Example: p
Propositional Logic

Examples: Showing a tautology

1.

2.
Propositional Logic

• Logical Equivalences:

Compound propositions that have the same truth values in all possible
cases are called logically equivalent. That is compound propositions P
and Q are called logically equivalent if P ↔ Q is a tautology.

Notation: P ≡ Q

To prove logical equivalence:

- Use truth table: That is the corresponding columns have the same
truth values. When the number of propositional variables increase this
becomes tedious.

- Transform P to Q using known logical equivalences.


Propositional Logic

• Examples: Showing logically equivalent using a truth table.

1.

2.
Propositional Logic

• Some important logical equivalences:


Logical Equivalences
Equivalence Name
𝑝∧𝑻≡𝑝
Identity laws
𝑝∨𝑭≡𝑝
𝑝∨𝑻≡𝑻
Domination laws
𝑝∧𝑭≡𝑭
𝑝∨𝑝≡𝑝
Idempotent laws
𝑝∧𝑝≡𝑝
¬(¬𝑝)≡𝑝 Double negation laws
𝑝∨𝑞≡𝑞∨𝑝
Commutative laws
𝑝∧𝑞≡𝑞∧𝑝
𝑝∨𝑞∨𝑟≡𝑝∨𝑞∨𝑟
Associative laws
𝑝∧𝑞∧𝑟≡𝑝∧𝑞∧𝑟
𝑝∨𝑞∧𝑟≡𝑝∨𝑞∧𝑝∨𝑟
Distributive laws
𝑝∧𝑞∨𝑟≡𝑝∧𝑞∨𝑝∧𝑟
¬𝑝∧𝑞≡¬𝑝∨¬𝑞
De Morgan’s laws
¬𝑝∨𝑞≡¬𝑝∧¬𝑞
𝑝∨(𝑝∧𝑞)≡𝑝
Absorption laws
𝑝∧(𝑝∨𝑞)≡𝑝
𝑝∨¬𝑝≡𝑻
Negation laws
𝑝∧¬𝑝≡𝑭
Propositional Logic

• Some important logical equivalences:


Logical Equivalences Involving Conditional Statements
𝑝→𝑞≡¬𝑝∨𝑞
𝑝→𝑞≡¬𝑞→¬𝑝
𝑝∨𝑞≡¬𝑝→𝑞
𝑝∧𝑞≡¬(𝑝→¬𝑞)
¬𝑝→𝑞≡𝑝∧¬𝑞
(𝑝→𝑞)∧(𝑝→𝑟)≡𝑝→(𝑞∧𝑟)
(𝑝→𝑟)∧(𝑞→𝑟)≡(𝑝∨𝑞)→𝑟
(𝑝→𝑞)∨(𝑝→𝑟)≡𝑝→(𝑞∨𝑟)
(𝑝→𝑟)∨(𝑞→𝑟)≡(𝑝∧𝑞)→𝑟

Logical Equivalences Involving Biconditional Statements


𝑝↔𝑞≡(𝑝→𝑞)∧(𝑞→𝑝)
𝑝↔𝑞≡¬𝑝↔¬𝑞, ¬𝑝↔𝑞≡𝑝↔¬𝑞
𝑝↔𝑞≡(𝑝∧𝑞)∨(¬𝑝∧¬𝑞)

Note:

You can prove all above equivalences using truth tables.


Propositional Logic

• Proving logical equivalences using known equivalences:

Examples: Prove (p → r) ∨ (q → r) ≡ (p ∧ q) → r
(p → r) ∨ (q → r) ≡ (⌝p ∨ r) ∨ (⌝q ∨ r) ( ∵ p → q ≡ ⌝p ∨ q)
≡ ⌝p ∨ ⌝q ∨ r ∨ ∨r (Associative & commutative)
≡ ⌝p ∨ ⌝q ∨ r (Idempotent law)
≡ ⌝(p ∧ q) ∨ r (Demorgan′s law)
≡ p ∧ q → r ( ∵ p → q ≡ ⌝p ∨ q)

Prove ⌝(p ∨ (⌝p ∧ q)) ≡ ⌝p ∧ ⌝q .


⌝(p ∨ (⌝p ∧ q)) ≡ ⌝p ∧ ⌝(⌝p ∧ q) (Demorgan′s law)
≡ ⌝p ∧ (⌝(⌝p) ∨ ⌝q) (Demorgan′s law)
≡ ⌝p ∧ (p ∨ ⌝q) (Double negation law)
≡ (⌝p ∧ p) ∨ (⌝p ∧ ⌝q) (Distributive law)
≡ F ∨ (⌝p ∧ ⌝q) ( ∵ ⌝p ∧ p ≡ F)
≡ ⌝p ∧ ⌝q (Identity law for F)

You might also like