2. MATHEMATICAL LOGIC
◦ Propositional and Predicate Logic
◦ Propositional Equivalences
◦ Normal Forms
◦ Predicates and Quantifiers
◦ Nested Quantifiers
◦ Rules of Inference
3. Propositional and Predicate Logic
◦ Every statement (or proposition) is either TRUE or FALSE.
◦ A statement can be formed using other statements connected to each other by 5 kinds of
connectives: AND, OR, NOT, IMPLIES and IFF.
◦ The Connectives AND (∧), OR (∨), NOT (¬), IMPLIES ( =⇒ ) and IFF ( ⇐⇒ ) .
◦ So these connectives are functions of the form {T rue, F alse} 2 → {T rue, F alse}. The connective
NOT takes a single statement and outputs a single statement. So the connective NOT is a
function of the form {T rue, F alse} → {T rue, F alse}.
7. The IMPLIES (p ⇒ q)
◦ TRUE statements proves a TRUE statement.
◦ TRUE statements cannot proves a FALSE statement.
◦ FALSE statement can prove any statement.
◦ Example of False implying anything
◦ “If 2 + 2 = 5 then you are pope.”
◦ Let 2 + 2 = 5.
◦ But we know 2 + 2 = 4.
◦ So 5 = 4
◦ and so subtracting 3 from both sides 2 = 1
◦ So 2 person = 1 person.
8. Cont…..
◦ So YOU and POPE are 1 person and hence you are pope.
◦ The IMPLIES (p ⇒ q)
10. Every statement (proposition) is either
TRUE or FALSE.
◦ If you did not know the material earlier and you don’t study hard then you will not get a A in
this course. Therefore if you get a A grade in this course then you knew this material earlier and
you studied hard.
◦ A statement is true if under any condition satisfying the premise (or assumptions) the
statement holds true.
◦ Is the above sentence True or False?
◦ Variable:
◦ you did not know the material earlier = p
◦ you don’t study hard = q
◦ you will not get a A in this course = r
◦ What is “you knew this material earlier”?
11. Cont…..
◦ you knew this material earlier = ¬p
◦ you studied hard = ¬q
◦ you get a A grade in this course = ¬r
So the sentence is ((p ∧ q) =⇒ r) =⇒ (¬r =⇒ (¬p ∧ ¬q))
We create a table with all the possible input and the
evaluations.
That is, we write the truth table explicitly.
f = [((p ∧ q) =⇒ r) =⇒ (¬r =⇒ (¬p ∧ ¬q))]
f = [s =⇒ t]
13. Consistency/correctness of the
expression
◦ Since the expression does not evaluate to true always so the expression is not correct.
◦ Two statements are equivalent if their TRUTH TABLES are the same.
◦ Is: A ⇒ B is equivalent to (¬B ∧ A)
14. Definition of Logical Equivalence
◦ Tautology – A proposition which is always true, is called a tautology.
◦ Contradiction – A proposition which is always false, is called a contradiction.
◦ Contingency – A proposition that is neither a tautology nor a contradiction is called a
contingency.
15. Normal Forms
◦ The problem of finding whether a given statement is tautology or contradiction or satisfiable in
a finite number of steps is called the Decision Problem.
◦ For Decision Problem, construction of truth table may not be practical always. We consider an
alternate procedure known as the reduction to normal forms.
◦ There are two such forms:
◦ Disjunctive Normal Form (DNF)
◦ Conjunctive Normal Form
16. Disjunctive Normal Form (DNF):
◦ Disjunctive Normal Form (DNF): If p, q are two statements, then "p or q" is a compound
statement, denoted by p ∨ q and referred as the disjunction of p and q.
◦ The disjunction of p and q is true whenever at least one of the two statements is true, and it is
false only when both p and q are false.
p q p ∨ q
T T T
T F T
F T T
F F F
17. Conjunctive Normal Form
◦ Conjunctive Normal Form: If p, q are two statements, then "p and q" is a compound
statement, denoted by p ∧ q and referred as the conjunction of p and q.
◦ The conjunction of p and q is true only when both p and q are true, otherwise, it is false.
p q p ∧ q
T T T
T F F
F T F
F F F
18. Predicate Logic – Definition
◦ A predicate is an expression of one or more variables defined on some specific domain. A
predicate with variables can be made a proposition by either assigning a value to the variable or
by quantifying the variable.
◦ The following are some examples of predicates −
◦ Let E(x, y) denote "x = y"
◦ Let X(a, b, c) denote "a + b + c = 0"
◦ Let M(x, y) denote "x is married to y"
19. Quantifiers
◦ Quantifiers are expressions that indicate the scope of the term to which they are attached, here
predicates. A predicate is a property the subject of the statement can have.
◦ Types of quantification or scopes:
◦ Universal(∀) – The predicate is true for all values of x in the domain.
◦ Existential(∃) – The predicate is true for at least one x in the domain.
◦ “For all” ∀
◦ ∀x P(x)
◦ “There exists” ∃
◦ ∃x P(x)
20. Nested Quantifiers
◦ a) Everybody loves Jerry.
◦ ∀x L(x, Jerry)
◦ b) Everybody loves somebody.
◦ ∀x ∃y L(x, y)
◦ c) There is somebody whom everybody loves.
◦ ∃y ∀x L(x, y)
◦ d) Nobody loves everybody.
◦ ∀x ∃y ¬L(x, y) or ¬∃x ∀y L(x, y)
◦ e) Everyone loves himself or herself
◦ ∀x L(x, x)
21. Rules of Inference
◦ Simple arguments can be used as building blocks to construct more complicated valid
arguments.
◦ Certain simple arguments that have been established as valid are very important in terms of
their usage.
◦ These arguments are called Rules of Inference.