EM214_Logic_part 1
EM214_Logic_part 1
Class Notes
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 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:
Mathematical 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.
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.
• 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)
• 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:
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:
• Logical Equivalences:
Definitions:
Example: p ∨ ⌝p
Example: p ∧ ⌝p
Example: p
Propositional Logic
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
- Use truth table: That is the corresponding columns have the same
truth values. When the number of propositional variables increase this
becomes tedious.
1.
2.
Propositional Logic
Note:
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)