You are on page 1of 69

Statements, Notation and Connectives

Our aim is to develop units for our object language called primary (primitive or atomic)
statements.
We assume that object language contains a set of declarative sentences which cannot be
broken down into simpler statements. These statements are called primary statements.

Declarative sentence means; a sentence that declares a fact, i.e, is either true or false,
but not both. Therefore, we only admit those declarative sentence which have one and only
one of two possible values called truth values. The truth values are true and false and are
denoted by symbols T and F (1 and 0), respectively.

Therefore, we assume that it is possible to assign one and only one of the two possible
values to a declarative sentence. As, we admit only two possible truth values, this logic is
called two-valued logic.

We shall develop a mechanism by which we should be able to construct other declarative


sentences having one of the two possible truth values.

There are two types of declarative sentences in our object language;


the first types of declarative sentences are primitive and is denoted by distinct symbols
A, B, C, · · · , P, Q, R, · · · , and the other types are those sentences which are obtained from
the primitive ones by using certain symbols called connectives, and certain punctuation
marks, such as parentheses to join the primitive sentences. In any case, all the declarative
sentences to which it is possible to assign one and only one of the possible truth values are
called statements.

Examples: We now look at few examples;


(1) India is a country.
(2) This statement is false.
(3) 1 + 101 = 110.
(4) Close the door.
(5) Varanasi is an old city.
(6) India will win 50 gold in the next olympic games.

Connectives: The truth values for simple statements are obvious. We shall construct
(complicated) statements from simple statements by using certain connecting words called
sentential connectives.

We shall define these connectives and try to develop methods to determine the truth values
of statements that are formed by using them. We shall look at properties of these statements
and relationship between them (if any).

1
2

Also, we shall see how the statements along with the connectives forms an algebra satisfy-
ing certain properties and using these properties we shall be able to perform some calculations
using statements as objects. These algebras has many interesting and important applications
in the field of switching theory and logical design of computers.

The new statements which is formed from primary (primitive or atomic) statements are
called compound or molecular statements. Thus, primary statements are those which do not
have any connectives.

Any arbitrary sentence will be denoted by P, Q, R, · · · , P1 , Q1 , R1 , · · · .


The truth value of “P ” is the truth value of the statement which it represents.

Negation: The negation of a statement is generally formed by introducing the word “not”
at proper place in the statement or by prefixing the statement with the phrase “It is not the
case that”.

• If P denotes a statement, then the negation of “P ” is written as “¬P ” and read as


“ not P.”
• If the truth value of P is T, then the truth value of ¬P is F, and vice-versa.
Below is the truth table for negation;

P ¬P
T F
F T
Example 1: Consider the statement P : Delhi is a city.
Then the negation of P, ¬P is a statement ¬P : It is not the case that Delhi is a city.
It can also be written as ¬P : Delhi is not a city.

The above two statements are not identical but have the same meaning in english language.
Thus a given statement in the object language is denoted by a symbol, and it may correspond
to several statements (as in the previous example) in english language.

Example 2: Consider the statement P : I went to my class yesterday, then ¬P is any one
of the following statements
(1) It is not the case that I went to my class yesterday.
(2) I did not go to my class yesterday.
(3) I was absent from my class yesterday.

Example 3: P : At least 10 inches of rain fell today in Mumbai.


¬P : It is not the case that at least 10 inches of rain fell today in Mumbai.
¬P : Less than 10 inches of rain fell today in Mumbai.
3

Note that negation is a connective although it only modifies a statement. Thus negation
is unary operation which operates on a single statement.
The other symbol for negation are P̃ , P , N OT P.

Conjunction: Let P and Q be two statements. The conjunction of P and Q is the state-
ment P ∧ Q which is read as “P and Q.” The statement P ∧ Q has truth value T whenever
both P and Q have the truth value T, and otherwise it has the truth value F.
Below is the truth table for conjunction;

P Q P ∧Q
T T T
T F F
F T F
F F F

Example 1: Consider the statements;

P : It is raining today.
Q : There are 20 tables in this room.
P ∧ Q : It is raining today and there are 20 tables in this room.

The above two statements are not related still we could form a statement by adding the
conjunction “and” between them and is perfectly acceptable in our logic. However, in english
the conjunction “and” is used between two statements which are related in some way.

Example 2: P : X got A+ in this course. Q : Y got A+ in this course.


P ∧ Q : X got A+ in this course and Y got A+ in this course.
P ∧ Q : X and Y got A+ in this course.

We have seen that the symbol ∧ is used as translation of the connective “and” in english.
However, the connective “and” is sometimes used in a different sense, and in such cases
it cannot be translated by symbol ∧ defined above. For illustration we shall look at the
following examples;

Roses are red and violets are blue.


Here, the conjunction “and” is used in the same sense as the symbol ∧ defined above.

He opened the book and started to read.


Here, “and” is used in the sense of “and then.”

Ram and Sam are cousins.


Here, “and” is not a conjunction.

It is easy to observe that ∧ is symmetric, i.e. P ∧ Q = Q ∧ P.


The other symbol for conjunction are P &Q, P · Q, P AND Q.
4

Disjunction: Let P and Q be two statements. The disjunction of P and Q is the statement
P ∨ Q which is read as “P or Q.” The statement P ∨ Q has truth value F whenever both P
and Q have the truth value F, and otherwise it has the truth value T.
Below is the truth table for conjunction;

P Q P ∨Q
T T T
T F T
F T T
F F F
The connective ∨ is not always the same as the word “or” because in english the word
“or” is used both as an “exclusive OR” and as an “inclusive OR”;
Examples:
(1) I shall watch the game on television or go to the game.
(2) There is something wrong in the bulb or with the wiring.
(3) Twenty or thirty animals were killed in the fire today.
In (1), the connective “or” is used in the exclusive sense; i.e. one or other possibility exists
but not both.
In (2), the connective “or” is used is “inclusive OR,” i.e. one or other or both.
In (3), “or” is used to for an approximate number of animals and not as connective.

Note, that in the definition of ∨ it is clear that it is “inclusive OR.”

Statement formula, truth tables, conditional and bi-conditional

We have defined the connectives ¬, ∧, and ∨.


• Those statements which do not contain any connectives are called atomic or primary
or simple statements.
• Those statements which contain one or more connectives are called molecular or
composite or compound statements.
• Let P and Q be two statements. Few examples of compound statements are;
¬P, P ∨ Q, (P ∧ Q) ∨ (¬P ), P ∧ (¬Q).
• The parrntheses are used in the same sense in which they are used in arithmetic or
algebra, which means that expressions in the innermost parentheses are simplified
first.
• ¬(P ∧ Q), (P ∧ Q) ∨ (Q ∧ R), ((P ∧ Q) ∨ R) ∧ (¬P ).
• Truth tables for P ∨ ¬Q, P ∧ ¬P, (P ∨ Q) ∧ ¬P.
We now determine the truth value of a statement formula for each possible combination
of the truth values of the component statements. A table which shows such truth value is
called the truth table of the statement formula.
5

• One component - two rows, e.g. negation.


• Two components - four rows, e.g. ∨ and ∧.
• n - components - 2n rows.
There are two methods of constructing the truth table of a given statement formula, which
is illustrated by following example;
Find the truth table for the statements formula P ∨ ¬Q:

Method 1: We shall consider all the possible truth values of the statements P and Q,
and these values are entered in first two columns.

P Q ¬Q P ∨ ¬Q
T T F T
T F T T
F T F F
F F T T
In the third column the truth values of ¬Q is entered and finally the truth values of P ∨ ¬Q
is entered in the fourth column.

Method 2: In this method a column is drawn for each statement as well as for the
connectives that appear. The truth values are entered step by step. The step number at the
last row of the table show the sequence followed in arriving at the final step.
P Q P ∨ ¬ Q
T T T T F T
T F T T T F
F T F F F T
F F F T T F
Step number 1 3 2 1

Exercise: Find the truth table for the statement formulas P ∧ ¬P and (P ∨ Q) ∧ ¬P.

Conditional and Biconditional: Let P and Q be two statements. Then statement P → Q


which is read as “If P, then Q” is called a conditional statement. The statement P → Q has
a truth value F when Q has the truth value F and P the truth value T ; otherwise it has the
truth value T.
P Q P →Q
T T T
T F F
F T T
F F T
6

The statement P → Q is called conditional because the truth value of Q is T on the


condition that P holds. Note that, in the truth table of P → Q, the truth value of P → Q
is T when truth values of both P and Q is T, and when the truth value of P is F (in this
case it does not matter what is the truth value of Q.)

P
Example: Let (xn ) be a sequence of real numbers. If the series xn converges, then
n=1
lim xn = 0.
n→∞

Problem: Express in english the statement P → Q where


P : The sun is shining today.
Q : 2 + 7 > 4.
Solution: If the sun is shining today, then 2 + 7 > 4.

The following expressions are represented by P → Q;


• Q is necessary for P.
• P is sufficient for Q.
• P implies Q.
• Q if P.
• P only if Q.
Problem: Write the following statement in symbolic form; If either Jak takes Mathematics
or Michael takes Physics, then Raj will take Chemistry.
Solution: P : Jak takes Mathematics.
Q : Michael takes Physics.
R : Raj takes Chemistry.
The given statement is (P ∨ Q) → R.

Exercise: Write the truth table for (P → Q) ∧ (Q → P ).

Let P and Q be two statements. Then statement P  Q, which is read as “P if and


only if Q” and abbreviated as “P iff Q” is called a biconditional statement. The statement
P  Q has a truth value T whenever both P and Q have identical truth values. This is
translated as“ P is necessary and sufficient for Q.”

Exercise: Write the truth table for P  Q.


Exercise: Write the truth table for the formula ¬(P ∧ Q)  (¬P ∨ ¬Q.)

Converse, Contrapositive and Inverse: We now look at some new conditional state-
ments obtained from P → Q.

• Q → P is called the converse of P → Q.


• ¬Q → ¬P is called the contrapositive of P → Q.
• ¬P → ¬Q is called the inverse of P → Q.
7

The truth value of the contrapositive ¬Q → ¬P of a conditional statement P → Q is same


as of the statement P → Q. Note that the truth value of contrapositive is F only when the
truth value of ¬P is F and that of ¬Q is T. Which means the truth value of contrapositive
is F only when the truth value of P is T and that of Q is F.

Note also that neither the converse Q → P nor the inverse ¬P → ¬Q has same truth values
as P → Q for all possible truth values of P and Q. Because when the truth values of P and
Q are T and F, respectively, then the truth value of P → Q is F. However, in this case the
converse and the inverse have truth value T (why?).

Exercise: Write the truth table for the formula (P ∨ ¬Q) → (P ∧ Q.)
8

Well-formed formula and tautologies

Recall the previous lectures; primary statements, truth tables, compound statements, con-
nectives, negation, conjunction, disjunction, statement formulas, conditional and bicondi-
tional statements, converse, contrapositive and inverse.

A “statement formula” is an expression which is a string consisting of variables, parenthe-


ses, and connective symbols. However, not every string of these symbols is a formula. We
give a recursive definition of a statement formula, called well-formed formula.
A well-formed formula can be constructed by the following rules:
(1) A statement variable standing alone is a well-formed formula.
(2) If A is a well-formed formula, then ¬A is a well-formed formula.
(3) If A and B are well-formed formulas, then (A ∧ B), (A ∨ B), (A → B), and (A ↔ B)
are all well-formed formulas.
(4) A string of symbols containing the statement variables, connectives, and parentheses
is a well-formed formula, if and only if it can be obtained by finitely many applications
of the rules 1, 2, and 3.

Examples: The following are the examples of well-formed formulas:


¬(P ∧ Q), ¬(P ∨ Q), (P → (P ∨ Q)), (P → (Q → R)), (((P → Q) ∧ (Q → R)) ↔ (P → R))

Non-examples: The following are not well-formed formulas:


(1) ¬P ∧ Q. P and Q are well-formed formulas. A well-formed formula would be either
(¬P ∧ Q) or ¬(P ∧ Q).
(2) (P → Q) → (∧Q) is not a well-formed formula as ∧Q is not.
(3) (P → Q is not a well-formed formula. (P → Q) is a well-formed formula.
(4) (P ∧ Q) → Q) is not a well-formed formula as one of the parentheses in the beginning
is missing. A well-formed formula would be ((P ∧ Q) → Q). Note that (P ∧ Q) → Q
is still not a well-formed formula.
Sometime to reduced the number of parentheses, we shall omit the outer parentheses. Also,
we only encounter well-formed formulas, we refer to well-formed formulas as formulas.

Tautologies: In general, the final column of the truth tables of a given formula contains
both the truth values T and F. However, there are some formulas whose truth values are
always T or always F regardless of the truth value assigned to the variables. e.g., P ∨ ¬P -
always T, and P ∧ ¬P - always F.

A statement formula which is true regardless of the truth values of the statements which
occur in in it is called a universally valid formula or a tautology or a logical truth.
9

A statement formula which is false regardless of the truth values of the statements which
occur in in it is called a contradiction.

It is to see that the negation of a contradiction is a tautology.

In other words, a statement formula which is a tautology is identically true and a state-
ment formula which is a contradiction is identically false.

One can determine whether a statement formula is a tautology or not by constructing its
truth table. However, if the number of variables is large or when formula is complicated,
constructing truth table become tedious (if there are n variables then there will be 2n rows
in the truth table).

The conjunction of two tautologies is again a tautology. To see this, let A and B be two
statements formula which are tautologies. If we assign any truth values to the variables of
A and B, then the truth values of A and B will always be T and hence the truth value of
A ∧ B will always be T. Thus A ∧ B is a tautology.

A formula A is called a substitution instance of another formula B if A it can be obtained


from B by substituting formulas for some variables of B, with the condition that that same
formula is substituted for the same variable each time it occurs.

Let B : P → (J ∧ P ), substitute R ↔ S for P in B, we obtain


A : (R ↔ S) → (J ∧ (R ↔ S)).
Then A is a substitution instance of B. Note that
A : (R ↔ S) → (J ∧ P )
is not a substitution instance of B, because the variable P in J ∧P is not replaced by R ↔ S.

One can substitute more than one variable by other formulas, provided all the substitution
is done simultaneously.

We now see examples of substitution instances of P → ¬Q :


(1) (R ∧ ¬S) → ¬(J ∨ M )
(2) (R ∧ ¬S) → ¬(R ∧ ¬S)
(3) (R ∧ ¬S) → ¬P
(4) Q → ¬(P ∧ ¬Q)
10

We now consider the following formulas which comes from P → ¬Q.


(1) Substitute P ∨ Q for P and R for Q to get the substitution instance (P ∨ Q) → ¬R.
(2) First substitute P ∨ Q for P to obtain the substitution instance (P ∨ Q) → ¬Q.
Next, substitute R for Q in (P ∨ Q) → ¬Q and we get (P ∨ R) → ¬R. Note that
(P ∨ R) → ¬R is a substitution instance for (P ∨ Q) → ¬Q with Q replaced by R
but not a substitution instance of P → ¬Q under. the substitution (P ∨ Q) for P
and R for Q. This is because we did not substitute simultaneously as done in 1.

Observe that, while constructing substitution instances of a formula, substitutions are


made for the atomic formula and never for the molecular formula. e.g. P → Q is not a
substitution instance P → ¬R, because R should be replaced not ¬R.

Any substitution instance of a tautology is again a tautology. e.g. consider the tautology
P ∨ ¬P. The truth value of P ∨ ¬P is always T, irrespective of the truth value of P. Thus,
if we substitute any formula for P, the resulting formula will be a tautology.
The following substitution instances of P ∨ ¬P are tautologies.
(R → S) ∨ ¬(R → S)
((P ∨ S) ∧ R) ∨ ¬((P ∨ S) ∧ R)
(((P ∨ ¬Q) → R) ↔ S) ∨ ¬(((P ∨ ¬Q) → R) ↔ S)

Therefore, If we are able to determine that whether a given formula is a substitution


instance of a tautology, then it is clear that the given formula is also a tautology.

One can construct a number of formulas which are tautologies by writing several substi-
tution instances of a tautology.

Note the change in symbol for biconditional statement from ⇐⇒ to ↔ in this lecture.
11

Equivalence of formulas

Recall the previous lectures; primary statements, truth tables, compound statements,
connectives, negation, conjunction, disjunction, statement formulas, conditional and bicon-
ditional statements, converse, contrapositive and inverse, well-formed formula, tautology,
substitution instances.

Let A and B be two statement formulas and let P1 , P2 , · · · , Pn denote all the variables
which are occurring in both A and B. If the truth value of A is equal to the truth value of
B for every one of the 2n possible sets of truth values assigned to P1 , P2 , · · · , Pn , then we
say that A is equivalent to B.

If we assume that the variables and assignment of the truth values to the variables appear
in the same order in the truth tables of A and B, then the final columns in the truth tables
of A and B are identical, if A and B are equivalent.

Examples:
(1) ¬¬P is equivalent to P.
(2) P ∨ P is equivalent to P.
(3) (P ∧ ¬P ) ∨ Q is equivalent to Q.
(4) P ∨ ¬P is equivalent to Q ∨ ¬Q.

Note that it is not necessary that both A and B contain the same variables. e.g. (3) and
(4). However, if two formulas are equivalent and a variable occurs in only one of them, then
the truth value of this formula is independent of this variable. e.g. in (3), the truth value
of (P ∧ ¬P ) ∨ Q is independent of the truth value of P. Similarly, in (4), the truth value of
(P ∨ ¬P ) and Q ∨ ¬Q is independent of the truth value of P and Q.

Consider the truth table for conditional and biconditional statements;


P Q P →Q P ↔Q
T T T T
T F F F
F T T F
F F T T
We see that P ↔ Q is T whenever both P and Q have the same truth values. Thus, the
statement formulas A and B are equivalent provided A ↔ B is a tautology and conversely,
if A ↔ B is a tautology then A is equivalent to B. We use the notation A ⇐⇒ B to say
that A is equivalent to B.
It is easy to see that A is equivalent to B or A ⇐⇒ B is an equivalence relation.
12

Binary relation: A binary relation over sets X and Y is a subset of the cartesian product
X × Y ; that is, it is a set of ordered pairs (x, y) consisting of elements x ∈ X and y ∈ Y. An
element x is related to an element y, if and only if the pair (x, y) belongs to the set. We say
x is related to y denoted by xRy.
Consider a binary relation on X, i.e. consider a subset of X × X.
(1) Reflexive: x is related to x, ∀x ∈ X, i.e. xRx, ∀x ∈ X or (x, x) ∈ X × X, ∀x ∈ X.
(2) Symmetric: If x is related to y, the y is related to x, i.e. if xRy, then yRx, or if
(x, y) ∈ X × X, then (y, x) ∈ X × X.
(3) Transitive: If xRy and yRz, then xRz.
Example: Let X = N, for m, n ∈ N define mRn if m|n.

Example: Let S 6= φ and X = P(S). For A, B ⊆ S define ARB if A ⊆ B.

Example: Let X = Mn×n (R), for matrices A, B ∈ Mn×n (R) define a relation ARB if there
exists an invertible matrix P ∈ Mn×n( R) such that B = P −1 AP.

As we have seen in the case of tautologies, one method to determine whether given two for-
mulas are equivalent is to construct their truth table. Write all the possible combinations of
the truth values of the variables present in both formulas and then compare the final column.

Example (1): Prove that (P → Q) ⇐⇒ (¬P ∨ Q).

P Q P → Q ¬P ¬P ∨ Q (P → Q) ⇐⇒ (¬P ∨ Q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T
We now give a list of equivalent formulas;

(1) P ∨ P ⇐⇒ P P ∧ P ⇐⇒ P
(2) (P ∨ Q) ∨ R ⇐⇒ P ∨ (Q ∨ R), (P ∧ Q) ∧ R ⇐⇒ P ∧ (Q ∧ R)
(3) P ∨ Q ⇐⇒ Q ∨ P, P ∧ Q ⇐⇒ Q ∧ P
(4) P ∨ (Q ∧ R) ⇐⇒ (P ∨ Q) ∧ (P ∨ R), P ∧ (Q ∨ R) ⇐⇒ (P ∧ Q) ∨ (P ∧ R)
(5) P ∨ (P ∧ Q) ⇐⇒ P, P ∧ (P ∨ Q) ⇐⇒ P
(6) ¬(P ∨ Q) ⇐⇒ ¬P ∧ ¬Q, ¬(P ∧ Q) ⇐⇒ ¬P ∨ ¬Q
(7) P ∨ F ⇐⇒ P P ∧ T ⇐⇒ P
(8) P ∨ T ⇐⇒ T P ∧ F ⇐⇒ F
(9) P ∨ ¬P ⇐⇒ T P ∧ ¬P ⇐⇒ F
In the above list of formulas, the symbols T and F is used in the sense that T can be
replaced only by a tautology and F by a contradiction.
13

In view of the formula (2) which is called associativity, the formulas (P ∨ Q) ∨ R and
(P ∧ Q) ∧ R can be written as P ∨ Q ∨ R and P ∧ Q ∧ R, respectively.

Also, note that the formulas listed above is written as a pair of formula;

A1 ⇐⇒ B1 , A2 ⇐⇒ B2

and for each pair A1 , B1 there is a pair A2 , B2 in which ∨, ∧, T and F is replaced by ∧, ∨, F


and T, respectively. A1 and A2 are called duals of each other, and so are B1 and B2 .

Recall that, while constructing substitution instances we only substituted for the variables
which appeared in the formula. Also, the same formula (which we substituted) replace that
particular variable everywhere in the formula. This ensures that a substitution instance of
a tautology is again a tautology.
We shall now introduce another substitution process, called a replacement process. In re-
placement process any part of the formula (which is itself a formula, atomic, molecular) can
be replaced by any other formula.

Consider the formula (P ∨ Q) → P, replace (P ∨ Q) by R → (S ∧ ¬M ) and also replace


the second P by (P ∧ R) → (¬S ∨ M ), with the above replacement we obtain the following
formula;

(R → (S ∧ ¬M ) ∨ Q) → ((P ∧ R) → (¬S ∨ M )).

In general, the replacement process gives a new formula, however, the resulting formula may
not always be “interesting.”

If we add an extra condition that any part of a given formula that is to be replaced by
another formula must be equivalent to other formula, then the resulting formula is equivalent
to the original formula. Thus, using this process we can obtain new formulas equivalent to
the original one.
For example, in the formula P ∧ Q we can replace P by the formula P ∨ P as P ∨ P ⇐⇒ P,
to obtain (P ∨ P ) ∧ Q and it is easy to see that (P ∨ P ) ∧ Q ⇐⇒ P ∧ Q.
Also, if we replace any part of a tautology by formulas which is equivalent to this part,
the resulting formula will also be a tautology.

Exercise: Show that P → (Q → R) ⇐⇒ P → (¬Q ∨ R) ⇐⇒ (P ∧ Q) → R.


Hint: Use example 1 and the equivalent formulas (associativity of ∨, De Morgan’s law).
14

Example: Show that (¬P ∧ (¬Q ∧ R)) ∨ (Q ∧ R) ∨ (P ∧ R) ⇐⇒ R.


(¬P ∧ (¬Q ∧ R)) ∨ (Q ∧ R) ∨ (P ∧ R)
⇐⇒ (¬P ∧ (¬Q ∧ R)) ∨ ((Q ∨ P ) ∧ R) (by distributive property),
⇐⇒ ((¬P ∧ ¬Q) ∧ R)) ∨ ((Q ∨ P ) ∧ R) (by associative property),
⇐⇒ ((¬P ∧ ¬Q) ∨ (Q ∨ P )) ∧ R) (by distributive property),
⇐⇒ ((¬P ∧ ¬Q) ∨ (P ∨ Q)) ∧ R) (by commutative property),
⇐⇒ (¬(P ∨ Q) ∨ (P ∨ Q)) ∧ R (by De Morgan0 s law),
⇐⇒ T ∧ R (by (9)),
⇐⇒ R (by (7)).

Example: Show that ((P ∨Q)∧¬(¬P ∧(¬Q∨¬R)))∨(¬P ∧¬Q)∨(¬P ∧¬R) is a tautology.


We have
¬(¬P ∧ (¬Q ∨ ¬R) ⇐⇒ ¬(¬P ∧ ¬(Q ∧ R)) ⇐⇒ P ∨ (Q ∧ R) ⇐⇒ (P ∨ Q) ∧ (P ∨ R),
and
(P ∨ Q) ∧ ((P ∨ Q) ∧ (P ∨ R)) ⇐⇒ (P ∨ Q) ∧ (P ∨ R).
Now,
¬P ∧ ¬Q ⇐⇒ ¬(P ∨ Q), ¬P ∧ ¬R ⇐⇒ ¬(P ∨ R).
Therefore,
(¬P ∧ ¬Q) ∨ (¬P ∧ ¬R) ⇐⇒ ¬(P ∨ Q) ∨ ¬(P ∨ R) ⇐⇒ ¬((P ∨ Q) ∧ (P ∨ R)).
Finally, the given formula is equivalent to
((P ∨ Q) ∧ (P ∨ R)) ∨ ¬((P ∨ Q) ∧ (P ∨ R)).
The above formula clearly is a substitution instance of the formula P ∨ ¬P (with P replaced
by ((P ∨ Q) ∧ (P ∨ R)) which is a tautology. Hence, the given formula is a tautology.
15

Duality laws, tautological implications

Recall the previous lectures; primary statements, truth tables, compound statements,
connectives, negation, conjunction, disjunction, statement formulas, conditional and bicon-
ditional statements, converse, contrapositive and inverse, well-formed formula, tautology,
substitution instances, equivalence of formulas and replacement process.

We now consider the formulas which involves the connectives ∧, ∨ and ¬ only. There is no
loss of generality in assuming this and hence we can restrict ourselves to these connectives
only, as we shall se that any formula involving any other connectives can be replaced by an
equivalent formula which involves ∧, ∨ and ¬ only.

Let A and A∗ be two formulas, we say that A and A∗ are duals of each other if one can
be obtained from other by replacing ∧ by ∨ and ∨ by ∧. The connectives ∧ and ∨ are also
called duals of each other. Furthermore, if the formula A involves the special variables T or
F, then its dual A∗ is obtained by replacing T by F and F by T, in addition to the above
mentioned interchanges.

Examples: The duals of the formulas (P ∨Q)∧R, (P ∧Q)∨T and ¬(P ∨Q)∧(P ∨¬(Q∧¬S))
are (P ∧ Q) ∨ R, (P ∨ Q) ∧ F and ¬(P ∧ Q) ∨ (P ∧ ¬(Q ∨ ¬S)), respectively.

Let A and A∗ be duals formulas and let P1 , P2 , · · · , Pn be all the atomic variables which
appears in A and A∗ . Then we may write A and A∗ as follows
A(P1 , P2 , · · · , Pn ), A∗ (P1 , P2 , · · · , Pn ).
Then by using De Morgan’s law we see that
P ∧ Q ⇐⇒ ¬(¬P ∨ ¬Q), P ∨ Q ⇐⇒ ¬(¬P ∧ ¬Q)
and finally
¬A(P1 , P2 , · · · , Pn ) ⇐⇒ A∗ (¬P1 , ¬P2 , · · · , ¬Pn )
and consequently
A(¬P1 , ¬P2 , · · · , ¬Pn ) ⇐⇒ ¬A∗ (P1 , P2 , · · · , Pn ).
Exercise: Verify the above for A(P, Q, R) = ¬P ∧ ¬(Q ∨ R).

A∗ (P, Q, R) = ¬P ∨ ¬(Q ∧ R)
and
A∗ (¬P, ¬Q, ¬R) = ¬¬P ∨ ¬(¬Q ∧ ¬R) ⇐⇒ P ∨ (Q ∨ R).

Also,
¬A(P, Q, R) = ¬(¬P ∧ ¬(Q ∨ R)) ⇐⇒ P ∨ (Q ∨ R).
Second equivalence can be verified in a similar way.
16

Next we see the relation between duals and equivalence.


Let A and B be two formulas and let P1 , P2 , · · · , Pn be all the atomic variables which appears
in A and B.
Assume that A ⇐⇒ B, i.e. A is equivalent to B. This means that A ↔ B is a tautology.
Then
A(¬P1 , ¬P2 , · · · , ¬Pn ) ↔ B(¬P1 , ¬P2 , · · · , ¬Pn )
is also a tautology.
Now, use
A(¬P1 , ¬P2 , · · · , ¬Pn ) ⇐⇒ ¬A∗ (P1 , P2 , · · · , Pn )
in above to conclude that
¬A∗ (P1 , P2 , · · · , Pn ) ↔ ¬B ∗ (P1 , P2 , · · · , Pn )
is a tautology, which means
A∗ ⇐⇒ B ∗ .
Recall the list of basic equivalent formulas from the last lecture, for every pair of equivalent
formulas we had a pair of equivalent formulas which was dual to the first pair.

Exercise: Prove that


(1) ¬(P ∧ Q) → (¬P ∨ (¬P ∨ Q)) ⇐⇒ (¬P ∨ Q).
(2) (P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)) ⇐⇒ (¬P ∧ Q).
Solution:
Since
(A → B) ⇐⇒ (¬A ∨ B),
therefore by taking A = ¬(P ∧ Q) and B = (¬P ∨ (¬P ∨ Q)), we obtain
¬(P ∧ Q) → (¬P ∨ (¬P ∨ Q)) ⇐⇒ (P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q))
⇐⇒ (P ∧ Q) ∨ (¬P ∨ Q)
⇐⇒ (P ∧ Q) ∨ ¬P ∨ Q
⇐⇒ ((P ∨ ¬P ) ∧ (Q ∨ ¬P )) ∨ Q
⇐⇒ (T ∧ (Q ∨ ¬P )) ∨ Q
⇐⇒ (Q ∨ ¬P )) ∨ Q
⇐⇒ (Q ∨ ¬P )
Now, consider the formula
(P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q)),
then its dual is given by
(P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)).
We have already seen that if A ⇐⇒ B, then A∗ ⇐⇒ B ∗ , and we have proved that
A = (P ∧ Q) ∨ (¬P ∨ (¬P ∨ Q)) ⇐⇒ (Q ∨ ¬P ) = B.
Thus A∗ ⇐⇒ B ∗ , yields the following
(P ∨ Q) ∧ (¬P ∧ (¬P ∧ Q)) ⇐⇒ (¬P ∧ Q).
17

Tautological Implications: We know that the connectives ∨, ∧ and ↔ are symmetric, in


the sense that
P ∧ Q ⇐⇒ Q ∧ P, P ∨ Q ⇐⇒ Q ∨ P, P ↔ Q ⇐⇒ Q ↔ P.
Also, we have seen that P → Q is not equivalent to Q → P.

Recall that for a given conditional statement formula P → Q, Q → P the formulas


¬P → ¬Q and ¬Q → ¬P is called its converse, inverse and contrapositive, respectively.
We also saw that the following holds;
P → Q ⇐⇒ ¬Q → ¬P, Q → P ⇐⇒ ¬P → ¬Q.
P Q ¬P ¬Q P → Q ¬Q → ¬P
T T F F T T
T F F T F F
F T T F T T
F F T T T T

We now define tautological implication as follows;

A statement formula A is said to tautologically imply a statement B if and only if A → B


is a tautology. It is denoted by A =⇒ B and read as “A implies B.”

We now list some basic implications and they can be proved by truth tables.
(1) P ∧ Q =⇒ P
(2) P ∧ Q =⇒ Q
(3) P =⇒ P ∨ Q
(4) ¬P =⇒ P → Q
(5) Q =⇒ P → Q
(6) ¬(P → Q) =⇒ P
(7) ¬(P → Q) =⇒ ¬Q
(8) P ∧ (P → Q) =⇒ Q
(9) ¬Q ∧ (P → Q) =⇒ ¬P
(10) ¬P ∧ (P ∨ Q) =⇒ Q
(11) (P → Q) ∧ (Q → R) =⇒ P → R
(12) (P ∨ Q) ∧ (P → R) ∧ (Q → R) =⇒ R
Recall that in P → Q, the statement P and Q are called antecedent and consequent,
respectively.

To prove a given implication, it suffices to prove that if we assign the truth value T to the
antecedent then it gives the truth value T for the consequent, which means that the given
conditional statement is a tautology an hence the implication follows.

Examples: Consider the implication (9), assume that ¬Q ∧ (P → Q) has the truth value
T, then both ¬Q and P → Q have the truth values T, which means that the truth value of
18

Q is F. Now, the truth value of P → Q is T, therefore the truth value of P must be F (as
the truth value of Q is F ). Hence, the truth value of the consequent ¬P is T.

Next consider the implication (12), assume that antecedent is true. This means that
P ∨ Q, P → R and Q → R all are true. Now, if P is true then R must be true because
P → R is true. Similarly, if Q is true then R must be true. Also, either P or Q is true by
the assumption that P ∨ Q is true. In any case, we conclude that R is true and hence the
implication (12) follows.

Another method to prove an implication P =⇒ Q is that, assume that the consequent


is false and show that the antecedent is also false and this means that P → Q is true. Try
this method to prove the implication (9)(exercise).

Exercise: Show that (P =⇒ Q and Q =⇒ P ) iff P ⇐⇒ Q.

The above can be taken as an alternative definition of the equivalence of the two formu-
las. More precisely, if each of the two formulas A and B implies other, then A and B are
equivalent.

Recall that, if a formula is equivalent to a tautology, then it must be a tautology. Simi-


larly, if a formula is implied by a tautology, then it is a tautology (why?).

We now prove that the implication is transitive. Assume that A =⇒ B and B =⇒ C.


This means that A → B and B → C is a tautology and so is their conjunction (A →
B) ∧ (B → C). Now, the implication (11) says that (A → B) ∧ (B → C) =⇒ A → C.
Hence A → C is a tautology and this means that A =⇒ C. This proves the transitivity of
implication.

Transitivity of implication can be generalized for many formulas.

Another important property of implication is the following (which is easy to see);


if A =⇒ B and A =⇒ C, then A =⇒ B ∧ C.

Also, we can extend the notion of implication P =⇒ Q to several formulas, say


H1 , H2 , · · · , Hm jointly imply a formula Q, i.e. H1 , H2 , · · · , Hm =⇒ Q means
(H1 ∧ H2 ∧ · · · ∧ Hm ) =⇒ Q.
Theorem 0.1. If H1 , H2 , · · · , Hm and P imply Q, then H1 , H2 , · · · , Hm imply P → Q.
Proof. Given that
(H1 ∧ H2 ∧ · · · ∧ Hm ∧ P ) =⇒ Q.
This means that
(H1 ∧ H2 ∧ · · · ∧ Hm ∧ P ) → Q
is a tautology.

We have seen that


P → (Q → R) ⇐⇒ (P ∧ Q) → R.
19

Take P = (H1 ∧ H2 ∧ · · · ∧ Hm , Q = P and R = Q, then


(H1 ∧ H2 ∧ · · · ∧ Hm ) → (P → Q)
is a tautology and we are done. 
20

Formulas with distinct truth tables

Recall the previous lectures; primary statements, truth tables, compound statements,
connectives, negation, conjunction, disjunction, statement formulas, conditional and bicon-
ditional statements, converse, contrapositive and inverse, well-formed formula, tautology,
substitution instances, equivalence of formulas, replacement process, duality laws and tau-
tological implications.

Using connectives and the rule of constructing well-formed formula we have constructed
several statement formulas. We shall now see that how many of these these formulas have
distinct truth tables.

Let us consider all possible truth tables that can be obtained when the formulas involve
only one variable P. These possible truth tables are shown in the table below;
P 1 2 3 4
T T F T F
F F T T F
Any formula involving only one variable will have one of these four truth tables. The most
simplest formulas having the truth tables 1, 2, 3 and 4 are P, ¬P, P ∨ ¬P and P ∧ ¬P, re-
spectively. Any other formula which involves P only will be equivalent to one of these four
formulas.

Let us now consider the formulas obtained by using the two variables and any connectives,
then we shall get several formulas. The number of distinct truth tables for formulas involving
2
two variables is equals to 22 = 16. Since there are there are 22 rows in the truth tables and
2
each row could have any of the two entries T or F, therefore, we have 22 possible tables
(given in the table below);
P Q 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
T T T T T T T T T T F F F F F F F F
T F T T T T F F F F T T T T F F F F
F T T T F F T T F F T T F F T T F F
F F T F T F T F T F T F T F T F T F
Thus, any formula involving two variables will have one of these 16 truth tables. Also, for-
mulas which have one of these truth tables are equivalent.
n
Similarly, a statement formula containing n variables must have as its truth table of the 22
possible truth tables and each of them will have 2n rows. Thus we see that there are several
formulas which may look different but are equivalent.

One method to check whether two formulas A and B are equivalent is to construct their
truth table and compare them. However, this method is tedious and difficult to perform even
on a computer because the number of entries increase very rapidly as n increases. Therefore,
another approach could be to transform A and B to some standard forms A0 and B 0 and
21

compare A0 and B 0 to check whether A ⇐⇒ B. These standard forms are called canonical
or normal forms.

Functionally complete sets of connectives

We defined the connectives ∧, ∨, ¬, → and ↔ . We shall see some more examples of connec-
tives. We prove that not all the connectives defined so far are necessary. In fact, we can
find certain proper subsets of these connectives which are sufficient to express any formula
in an equivalent form. Any set of connectives in which every formula can be expressed in
terms of an equivalent formula involving the connectives from this set is called a functionally
complete set of connectives. We assume that a functionally complete set does not contain
any redundant connectives, i.e., a connective which can be expresses in terms of the other
connectives.

Consider the following equivalence:


P ↔ Q ⇐⇒ (P → Q) ∧ (Q → P ).
This means that in a formula we can replace the part involving biconditional by an equiva-
lent formula which does not contain biconditional. Thus we can replace all the biconditional
in a formula.

Example (1): Write an equivalent formula for P ∧ (Q ↔ R) ∨ (R ↔ P ) which does not


involve the biconditional.

Use the above equivalence to obtain


P ∧ (Q ↔ R) ∨ (R ↔ P ) ⇐⇒ P ∧ ((Q → R) ∧ (R → Q)) ∨ ((R → P ) ∧ (P → R)).
Next, consider the equivalence P → Q ⇐⇒ ¬P ∨Q. Thus, we can replace the conditional
also.

Example (2): Write an equivalent formula for P ∧ (Q ↔ R) which contains neither condi-
tional nor the biconditional.

P ∧ (Q ↔ R) ⇐⇒ P ∧ ((Q → R) ∧ (R → Q)) ⇐⇒ P ∧ ((¬Q ∨ R) ∧ (¬R ∨ Q)).

Let us now recall the De Morgan’s law,


P ∧ Q ⇐⇒ ¬(¬P ∨ ¬Q), P ∨ Q ⇐⇒ ¬(¬P ∧ ¬Q).
Thus, in view of the first (resp. second) equivalence we can eliminate conjunction (resp.
disjunction) in a formula.

If we apply all the previous equivalences, we see that in a formula, we can replace all the
biconditionals, then the conditionals, and finally all the conjunctions or all the disjunctions
22

to obtain an equivalent formula which contains either the negation and disjunction only or
the negation and the conjunction only. This means that the following sets of connectives
{¬, ∨} and {¬, ∧} are functionally complete.
Thus from the set of five connectives ∧, ∨, ¬, → and ↔we obtained at least two sets of func-
tionally complete connectives.
We now ask the following question;
Does there exists a single connective which is functionally complete?
Answer to the above question is NO, if we consider the above five connectives only. However,
there are some connectives (which we shall define) are functionally complete.

Note that if a formula is replaced by an equivalent formula in which the number of different
connectives is less than the given formula, the reulting formula may become more complex.

So far we have seen that not all connectives defined are necessary. For any formula, there
exists an equivalent formula which involves only those connectives belonging to one of the
functionally complete set of connectives. In spite of this fact, we did define other connec-
tives because, by using them, some of the formulas become simpler. There are some other
connectives which serves the similar purpose. We shall now discuss those connectives.

Let P and Q be any two formulas. Then the formula P ∨ Q, is true whenever either P or
Q, but not both, is true. The connective ∨ is called exclusive OR or exclusive disjunction.
The truth table for ∨ is;
P Q P ∨Q
T T F
T F T
F T T
F F F
We now list some equivalences which is easy to prove and hence left as an exercise;
(1) P ∨ Q ⇐⇒ Q ∨ P (symmetric)
(2) (P ∨ Q) ∨ R ⇐⇒ P ∨ (Q ∨ R) (associative)
(3) P ∧ (Q ∨ R) ⇐⇒ (P ∧ Q) ∨ (P ∧ R) (distributive)
(4) (P ∨ Q) ⇐⇒ (P ∧ ¬Q) ∨ (¬P ∧ Q)
(5) (P ∨ Q) ⇐⇒ ¬(P ↔ Q)
Exercise: If P ∨ Q ⇐⇒ R, then P ∨ R ⇐⇒ Q and Q ∨ R ⇐⇒ P, and P ∨ Q ∨ R is
contradiction.

Thus, for a given formula involving ∨ can be replaced by an equivalent formula which
contains only the connectives ∧, ∨, and ¬ by using the equivalence (4).

We now define other connectives which are important in design of computers, called NAND
and NOR. The connective NAND is denoted by the symbol ↑ . For any two formula P and
Q;

P ↑ Q ⇐⇒ ¬(P ∧ Q).
23

The connective NOR is denoted by the symbol ↓, and for formulas P and Q;
P ↓ Q ⇐⇒ ¬(P ∨ Q).
The connectives ↑ and ↓ have been defined in terms of the connectives ∨, ∧ and ¬. There-
fore, for a formula involving the connectives ↑ or ↓, we can obtain an equivalent formula
containing the connectives ∨, ∧ and ¬, only.

Also, note that ↑ and ↓ are duals to each other. Therefore, in order to find the dual of a
formula involving ↑ and ↓, we interchange ↑ and ↓ in addition to other interchanges which
we already have discussed.

We now prove that each of the connectives ↑ and ↓ is functionally complete. To see this,
it suffices to show that the set of connectives {∧, ¬} and {∨, ¬} can be expressed either in
terms of ↑ alone or in terms of ↓ alone. Which can be seen through the following equivalences;
(1) P ↑ P ⇐⇒ ¬(P ∧ P ) ⇐⇒ ¬P
(2) (P ↑ Q) ↑ (P ↑ Q) ⇐⇒ ¬(P ↑ Q) ⇐⇒ P ∧ Q
(3) (P ↑ P ) ↑ (Q ↑ Q) ⇐⇒ ¬P ↑ ¬Q ⇐⇒ ¬(¬P ∧ ¬Q) ⇐⇒ P ∨ Q
Similarly we express ¬, ∨ and ∧ in terms of ↓ alone as follows;
(1) P ↓ P ⇐⇒ ¬(P ∨ P ) ⇐⇒ ¬P
(2) (P ↓ Q) ↓ (P ↓ Q) ⇐⇒ ¬(P ↓ Q) ⇐⇒ P ∨ Q
(3) (P ↓ P ) ↓ (Q ↓ Q) ⇐⇒ ¬P ↓ ¬Q ⇐⇒ P ∧ Q
Thus, we have proved that a single operator NAND and NOR is functionally complete.
Each of the sets {↑} and {↓} is called minimal functionally complete set or minimal set.

We now list some basic properties of the connectives NAND and NOR.
(1) P ↑ Q ⇐⇒ Q ↑ P, P ↓ Q ⇐⇒ Q ↓ P (commutative)
(2) P ↑ (Q ↑ R) ⇐⇒ P ↑ ¬(Q ∧ R) ⇐⇒ ¬(P ∧ ¬(Q ∧ R)) ⇐⇒ ¬P ∨ (Q ∧ R)
As
(P ↑ Q) ↑ R ⇐⇒ (P ∧ Q) ∨ ¬R,
we see that ↑ is not associative. Similarly,
P ↓ (Q ↓ R) ⇐⇒ ¬P (Q ∨ R), (P ↓ Q) ↓ R ⇐⇒ (P ∨ Q)¬R.

Two-state devices and statement logic

Since we admit only those statements which have a truth value either true or false, the logic
is called two-valued logic.

A similar situation exists in several electrical and mechanical devices which are assumed
to be in one of two possible configurations and because of this reason, these devices are called
two-state devices.
24

Let us look at some examples of such commonly known devices and then we shall discuss
their connection to two-valued logic.

• An electric switch is used for turning “on” and “off” and electric light is two-state
device.
• A vaccum tube or a transistor is also a two-state device in which the current is either
passing or not passing.
• A mechanical clutch is either engaged or disengaged.
• A small doughnut-shaped metal disc with a wire coil wrapped around it (called a
magnetic core in computers) may be magnetized in one direction if the current is
passed through the coil in one way and may be magnetized in the opposite direction
if the current is reversed.
A general description of such devices can be given by replacing the word “switch” by
the word “gate” to mean a device which permits or stops the flow of not only electric cur-
rent but any quantity that can go through the device, such as water, information, person, etc.

Consider the example of an electric lamp controlled by a mechanical switch as shown in


the figure;

state of switch p state of lamp s


closed open
open off
when the switch p is open, there is no current flowing in the circuit and the lamp s is “off.”
When p is closed, the lamp s is “on.” The state of the switch and the lamp is shown in the
table above.

Now consider the following statements;

P : The switch p is closed, S : The lamp s is on


Then the above table can be rewritten as;
p(P ) s(S)
T1 T1
F0 F0
25

Consider an extension of the preceding circuit in which we have two switches p and q in series

P : The switch p is closed, Q : The switch q is closed, S : The lamp s is on

P Q S
1 1 1
1 0 0
0 1 0
0 0 0
It is immediate from the table that P ∧ Q ⇐⇒ S.

Parallel:

P Q S
1 1 1
1 0 1
0 1 1
0 0 0
It is immediate from the table that P ∨ Q ⇐⇒ S.
Thus we see that switches connected in series and in parallel corresponds to the connectives
∧ and ∨, respectively.
We next see an example of a switch controlled by a relay.
26

P Q R
1 0 1
0 1 0
When the switch p is open (P is false, P : The switch p is closed) no current flows and the
contact q which is normally closed remains closed and the contact r remains open. When p is
closed, the current will flow from the battery through the coil which will cause the movement
of a relay armature, which in turn causes the springs to move downward and the normally
closed contact q to open while the normally open contact r closed. If p is open, then the
contact q closes and r opens, because the spring moves upward to its original position.

Consider the statements:

P : The switch p is closed, Q : The switch q is closed, R : The switch r is closed

The switches q and r are always in the opposite states, i.e.,

Q ⇐⇒ ¬R, Q ⇐⇒ ¬P, R ⇐⇒ P.

Note that, the output Q is the negation of the input P.

Instead of representing the logical connectives ¬, ∨, and ∧ by the circuits, they are repre-
sented by block diagrams or gates. Each gate has one or more input wire and one output wire.

Also, we shall use +, − and · for the logical connectives ∨, ¬ and ∧, respectively.
27

Input Output
p q r(p + q)
11 1
10 1
01 1
00 0

Input Output
p q r(p · q)
11 1
10 0
01 0
00 0
28

Input Output
p r(p)
1 0
0 1

The block diagrams not only replace the switches and relay but can also be used to repre-
sent “gates” in a much more general sense. We may use p to denote voltage potential of an
input which is “high” or “low” to allow a transistor to be in a conducting or non-conducting
state.

The above gates can be interconnected to realize various logical expressions. These sys-
tems of gates are known as logic or combinatorial networks.
29

To reduce the number of parentheses we write


a · b + c · d for (a · b) + (c · d).

Now, consider the logical expression a · b + c · d, which involves disjunction of two conjunc-
tions. A logic network to realize this expression can be two - level network, as shown in the
figure below;

A two - level network is a logic network in which the longest path through which information
must pass from input to output is two gates.

In the above figure, we see that this is a two - level network consisting of AN D gates at
the input stage and OR gate at the output stage. It is sometimes called sum of products
(AN D- to OR) network.

Another possibility for a two - level network is to keep OR gates at the input stage and
AN D gate at output stage (see the figure below);
30

It is called product of sums (OR- to AN D) network.

Other types of gates frequently used in computers are N OR and N AN D gates (shown
below);

Input Output
ab
11 0
10 0
01 0
00 1
31

tables
32

Input Output
ab
11 0
10 1
01 1
00 1

We already have seen that each of the connectives N AN D(↑) and N OR(↓) is functionally
complete; and either can be used to obtain the AN D, OR and N OT operations.
33

We have discusses certain elements which corresponds to some of the connectives of state-
ment logic. Usually, if a formula involving these connectives is given, we can physically
realize a circuit that corresponds to the formula by replacing the connectives by the appro-
priate gates and the variables by certain physical quantities such as voltage, current, etc.

This method may, however, not yield the best design from the point of view of using a
minimum number of gates, or the design it yields may not be a minimal design in some other
sense.

Sometimes even the formula may not be available and all we may have is its truth table.
Even in this case, we may be required to physically realize the formula, not in any manner,
but in some optimal way.
34

This design process in cases consists of the following steps;

(1) Express the given information in terms of logical variables.


(2) Obtain a formula for the required output in terms of the variables defined in step (1)
using the logical connectives.
(3) Obtain a formula which is logically equivalent to the one formed in step (2) and
which will result in a least expensive (minimal) physical realization.
(4) Replace the logical connectives in the formula in step (3) by proper logic blocks.

We now see the steps (1) and (2) through example.

Example: A certain government installation has an intruder alarm system which is to be


operative only if a manual master switch situated at a security office is in the closed po-
sition. If this master switch is on (i.e., closed), an alarm will be sounded if a door to a
restricted-access area within the installation is disturbed, or if the main gates to the in-
stallation are opened without the security officer first turning a special switch to the closed
position. The restricted-access area door is equipped with a sensing device that causes a
switch to set off the alarm if this door is disturbed in any way whenever the master switch
is closed. However, the main gates are opened during daytime hours to allow the public to
enter the installation grounds. Furthermore, at certain specified time intervals during a 24−
hour period, the master switch is turned off to allowed the authorized personnel to enter or
leave the restricted-access area. During the period when the main gates are open and the
master switch is turned off, it is required that some automatic recording instrument make
an entry every time the door to the restricted-access area is opened.

Step 1: We associate each primary statement with a variable. This association will allow
us to consider all possible truth values to the variables.
A : The alarm will be given.
M : The manual master switch is closed.
G : The main gates to the installation are open
R : The restricted − area door has been disturbed.
S : The special switch is closed.
E : The recording equipment isactivated.
Step 2: The output variables are A and E. The conditions given in the problem require
A ⇐⇒ M · (R + (G · S)), E ⇐⇒ M · G · R.
35

Normal forms

Let us consider all possible truth tables that can be obtained when the formulas involve
only one variable P. These possible truth tables are shown in the table below;
P 1 2 3 4
T T F T F
F F T T F
Any formula involving only one variable will have one of these four truth tables. The most
simplest formulas having the truth tables 1, 2, 3 and 4 are P, ¬P, P ∨ ¬P and P ∧ ¬P, re-
spectively. Any other formula which involves P only will be equivalent to one of these four
formulas.

Let us now consider the formulas obtained by using the two variables and any connectives,
then we shall get several formulas. The number of distinct truth tables for formulas involving
2
two variables is equals to 22 = 16. Since there are there are 22 rows in the truth tables and
2
each row could have any of the two entries T or F, therefore, we have 22 possible tables
(given in the table below);
P Q 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
T T T T T T T T T T F F F F F F F F
T F T T T T F F F F T T T T F F F F
F T T T F F T T F F T T F F T T F F
F F T F T F T F T F T F T F T F T F
Thus, any formula involving two variables will have one of these 16 truth tables. Also, for-
mulas which have one of these truth tables are equivalent.
n
Similarly, a statement formula containing n variables must have as its truth table of the 22
possible truth tables and each of them will have 2n rows. Thus we see that there are several
formulas which may look different but are equivalent.

One method to check whether two formulas A and B are equivalent is to construct their
truth table and compare them. However, this method is tedious and difficult to perform even
on a computer because the number of entries increase very rapidly as n increases. Therefore,
another approach could be to transform A and B to some standard forms A0 and B 0 and
compare A0 and B 0 to check whether A ⇐⇒ B. These standard forms are called canonical
or normal forms.

Let A(P1 , P2 , · · · , Pn ) be a statement formula and P1 , P2 , · · · , Pn are the atomic variables.


To get the truth table for the formula A, we assign all the possible truth values to the
variables P1 , P2 , · · · , Pn and obtain the truth values of the formula A. Note that there will
be 2n rows in the truth table of the formula A. Now,
• A is a tautology.
• A is a contradiction.
36

If A has the truth value T for at least one possible combination of the truth values of the
variables P1 , P2 , · · · , Pn , then we say that A is satisfiable.

The problem of determining, in a finite number of steps, whether a formula is a tautology


or a contradiction or at least satisfiable is called a decision problem.

Note that a decision problem in statement calculus has always a solution because the truth
table for a statement formula can be obtained in finite number of steps. However, for other
logical system (e.g., predicate calculus) solution to the decision problem may not be simple.

For our convenience, we shall use the word “product” (resp. “sum” ) for “conjunction”
(resp. “disjunction”).

A product of the variables and their negations (resp. a sum of the variables and their
negations) in a formula is called an elementary product (resp. elementary sum).

Examples: For atomic variables P and Q;


P, ¬P ∧ Q, ¬Q ∧ P ∧ ¬P, P ∧ ¬P, Q ∧ ¬P - elementary products.
P, ¬P ∨ Q, ¬Q ∨ P ∨ ¬P, P ∨ ¬P, Q ∨ ¬P - elementary sums.

Any part of the elementary product or sum which is itself and elementary product or sum
is called a factor of the original elementary product or sum.

¬Q, P ∧ ¬P, ¬Q ∧ P are some factors of ¬Q ∧ P ∧ ¬P.

The following statement holds for elementary sums and products;

A necessary and sufficient condition for an elementary product to be identically false is


that it contain at least one pair of factors in which one is the negation of the other.

A necessary and sufficient condition for an elementary sum to be identically true is that
it contain at least one pair of factors in which one is the negation of the other.

The proof of above two statements are left as exercise.

Disjunctive normal form: Let A be a given formula. A formula B which is equivalent to


the formula A is called a disjunctive normal form of A, if B consists of a sum of elementary
products.

Let us see how we can obtain a disjunctive normal form of a given formula.

We have seen that the connectives → and ↔ can be replaced by ∧, ∨, and ¬. Therefore,
without loss of generality we may assume that the given formula contains the connectives
∧, ∨, and ¬, only.

If we apply the negation to the formula or to a part of the formula and not to the variables
appearing in it, then by using De Morgan’s law we obtain an equivalent formula, in which
37

the negation is applied to the variables only.

If the formula is disjunctive normal form of the given formula then we are done otherwise;

the repeated application of distributive law we obtained the required form.

Let us apply this process to the following formulas;


(1) P ∧ (P → Q) (2) ¬(P ∨ Q) ↔ (P ∧ Q).

(1) P ∧ (P → Q) ⇐⇒ P ∧ (¬P ∨ Q) ⇐⇒ (P ∧ ¬P ) ∨ (P ∧ Q).

(2) ¬(P ∨ Q) ↔ (P ∧ Q) ⇐⇒ (¬(P ∨ Q) ∧ (P ∧ Q)) ∨ ((P ∨ Q) ∧ ¬(P ∧ Q))


⇐⇒ (¬P ∧ ¬Q ∧ P ∧ Q) ∨ ((P ∨ Q) ∧ ¬P ) ∨ ((P ∨ Q) ∧ Q)
⇐⇒ (¬P ∧ ¬Q ∧ P ∧ Q) ∨ (P ∧ ¬P ) ∨ (Q ∧ ¬P ) ∨ (P ∧ ¬Q) ∨ (Q ∧ ¬Q)
which is the required disjunctive normal form.

The disjunctive normal form of a given formula is not necessarily unique, because one can
apply the distributive law in a different way. e.g., consider the formula P ∨ (Q ∧ R) (which
is already in disjunctive normal form) can also be written as
P ∨ (Q ∧ R) ⇐⇒ (P ∨ Q) ∧ (P ∨ R) ⇐⇒ (P ∧ P ) ∨ (P ∧ Q) ∨ (P ∧ R) ∨ (Q ∧ R)
In any case all the disjunctive normal form of a given formula are equivalent.

Note that, a given formula is identically false if every elementary product appearing in its
disjunctive normal form is identically false.

A given formula is identically true if every elementary product have at least two factors,
of which one is the negation of the other.

Conjunctive normal form: Let A be a given formula. A formula B which is equivalent


to the formula A is called a conjunctive normal form of A, if B consists of a product of
elementary sums.

The process for obtaining a conjunctive normal form is similar to the process as discussed
for disjunctive normal form. Like disjunctive normal forms a conjunctive normal form of a
formula is not necessarily unique.

A given formula is identically true if every elementary sum in its conjunctive normal form
is identically true (when is this true?).

Examples: Find a conjunctive normal form of the following formulas;


38

(1) P ∧ (P → Q) (2) ¬(P ∨ Q) ↔ (P ∧ Q).

(1) P ∧ (P → Q) ⇐⇒ P ∧ (¬P ∨ Q).

(2) ¬(P ∨ Q) ↔ (P ∧ Q) ⇐⇒ (¬(P ∨ Q) → (P ∧ Q)) ∧ ((P ∧ Q) → ¬(P ∨ Q))


⇐⇒ ((P ∨ Q) ∨ (P ∧ Q)) ∧ (¬(P ∧ Q) ∨ (¬P ∧ ¬Q))
⇐⇒ ((P ∨ Q ∨ P ) ∧ (P ∨ Q ∨ Q)) ∧ ((¬P ∨ ¬Q) ∨ (¬P ∧ ¬Q))
⇐⇒ (P ∨ Q ∨ P ) ∧ (P ∨ Q ∨ Q) ∧ (¬P ∨ ¬Q¬P ) ∧ (¬P ∨ ¬Q ∨ ¬Q).

Examples: Prove that the formula Q ∨ (P ∧ ¬Q) ∨ (¬P ∧ ¬Q) is a tautology.

Try to write a conjunctive normal form of the given formula (it is given by )

Q ∨ (P ∧ ¬Q) ∨ (¬P ∧ ¬Q) ⇐⇒ (Q ∨ P ∨ ¬P ) ∧ (Q ∨ ¬Q)


Note here that each of the elementary sums is a tautology and so is the given formula (why?).
39

Normal forms

Principal disjunctive normal forms: Let P and Q be two statement variables. Consider
all the formulas which consist of conjunctions of P or its negation and Q or its negation. No
formula should contain both a variable and its negation. Furthermore, a formula which is
obtained by commuting the formulas in the conjunction is not included in the list because
such formula will be equivalent to the one which is included in the list. e.g., either P ∧ Q or
Q ∧ P is included, but not both.

In this case (case of two variables P and Q), there are 4 such formulas given by
P ∧ Q, P ∧ ¬Q, ¬P ∧ Q, and ¬P ∧ ¬Q.
These formulas are called miniterms or Boolean conjunctions of P and Q.

It is immediate to see that no two miniterms are equivalent.

P Q P ∧ Q P ∧ ¬Q ¬P ∧ Q ¬P ∧ ¬Q
T T T F F F
T F F T F F
F T F F T F
F F F F F T
Observe that each each of the miniterms has the truth value T for exactly one combination
of the truth values of the variables P and Q.

Now, if the truth table of any formula containing only the variables P and Q is known, then
it is easy to obtain an equivalent formula involving a disjunction of some of the miniterms.

For every truth value T in the truth table of the given formula, select the miniterm with
truth value T for the same combination of truth values of P and Q. The disjunction of these
miniterms will then be equivalent to the given formula.

Let A be a given formula, an equivalent formula involving the disjunctions of miniterms


only is called the principal disjunctive normal form of the formula A.

Examples: Find the principal disjunctive normal form of the following formulas
P → Q, P ∨ Q, ¬(P ∧ Q).

P Q P → Q P ∨ Q ¬(P ∧ Q)
T T T T F
T F F T T
F T T T T
F F T F T
40

P → Q ⇐⇒ (P ∧ Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q)


P ∨ Q ⇐⇒ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q)
¬(P ∧ Q) ⇐⇒ (P ∧ ¬Q) ∨ (¬P ∧ Q) ∨ (¬P ∧ ¬Q)
Note that the number of miniterms appearing in the normal form is the same as the num-
ber of entries with the truth value T in the truth table of the formula.

Thus every formula which is not a contradiction has an equivalent principal disjunctive
normal form. Also, it is unique up to the rearrangement of the factors as well as in each
miniterms.

If we impose certain ordering in which the the variables appear in the miniterms appear
as well as the in which order the miniterms appear in the disjunction, then we obtain the
unique normal form. Thus, if two formulas are equivalent then they must have identical
principal disjunctive normal forms. Hence, it is sufficient to know the principal disjunctive
normal form to know the equivalent formulas.

We have seen the construction of principal disjunctive normal for the formulas involving
two variables P and Q. It is possible to extend this for more than two variables;

Let us first define the miniterms for three variables P, Q and R.


P ∧ Q ∧ R, P ∧ Q ∧ ¬R, P ∧ ¬Q ∧ R, P ∧ ¬Q ∧ ¬R,
¬P ∧ Q ∧ R, ¬P ∧ ¬Q ∧ R, ¬P ∧ Q ∧ ¬R, ¬P ∧ ¬Q ∧ ¬R.
These miniterms satisfy properties similar to the miniterms for two variables. Using these
miniterms one can obtain an equivalent principal disjunctive normal form of a given formula
in three variables P, Q and R.

Note here that, there are 23 miniterms in this case. More generally, if we consider n vari-
ables, say P1 , P2 , · · · , Pn there will be 2n miniterms.

In order to obtain the principal disjunctive normal form of a given formula, first replace
the conditionals and biconditionals by using the connectives ∧, ∨ and ¬. Then use the De
Morgan’s law and distributive law as we have done to obtain disjunctive normal form. If an
elementary product is contradiction then remove it.
We now illustrate this process by examples

Example: Obtain the principal disjunctive normal forms of the following formulas
¬P ∨ Q, (P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R)

¬P ∨ Q ⇐⇒ (¬P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ (P ∨ ¬P )), (A ∧ T ⇐⇒ A)


⇐⇒ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (Q ∧ P ) ∨ (Q ∧ ¬P ), (distributive law)
⇐⇒ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q), (commuativity)
41

(P ∧ Q) ∨ (¬P ∧ R) ∨ (Q ∧ R)
⇐⇒ (P ∧ Q ∧ (R ∨ ¬R)) ∨ (¬P ∧ R ∧ (Q ∨ ¬Q)) ∨ (Q ∧ R ∧ (P ∨ ¬P ))
⇐⇒ (P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R)
Example: Find the principal disjunctive normal form of the formula
P → ((P → Q) ∧ ¬(¬Q ∨ ¬P )).

P → ((P → Q) ∧ ¬(¬Q ∨ ¬P )))


⇐⇒ ¬P ∨ ((¬P ∨ Q) ∧ (Q ∧ P ))
⇐⇒ ¬P ∨ (¬P ∧ (Q ∧ P ) ∨ (Q ∧ (Q ∧ P )))
⇐⇒ ¬P ∨ (Q ∧ P )
⇐⇒ (¬P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ P )
⇐⇒ (¬P ∧ Q) ∨ (¬P ∧ ¬Q) ∨ (P ∧ Q).
Example: Show that the following formulas are equivalent;
(1) P ∨ (P ∧ Q) ⇐⇒ P
(2) P ∨ (¬P ∧ Q) ⇐⇒ P ∨ Q
Solution:
(1) P ∨ (P ∧ Q) ⇐⇒ (P ∧ (Q ∨ ¬Q)) ∨ (P ∧ Q) ⇐⇒ (P ∧ Q) ∨ (P ∧ ¬Q)

P ⇐⇒ P ∧ (Q ∨ ¬Q) ⇐⇒ (P ∧ Q) ∨ (P ∧ ¬Q).
(2) P ∨ (¬P ∧ Q) ⇐⇒ (P ∧ (Q ∨ ¬Q)) ∨ (¬P ∧ Q) ⇐⇒ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q
P ∨ Q ⇐⇒ (P ∧ (Q ∨ ¬Q)) ∨ (Q ∧ (P ∨ ¬P )) ⇐⇒ (P ∧ Q) ∨ (P ∧ ¬Q) ∨ (¬P ∧ Q).

Principal conjunctive normal forms: For a given number of variables, we define max-
term which consists of disjunctions and in which each variable or its negation, but not both,
appears only once. Maxterms are dual of miniterms.

Either by using duality or truth table we see that each of the maxterms has the truth value
F for exactly one combination of the truth values of the variables. Also, different maxterms
have the truth value F for different combinations of the truth values of the variables.

For a given formula, an equivalent formula consisting of conjunctions of the maxterms


only is called its principal conjunctive normal form.

A formula which is not a tautology has an equivalent principal conjunctive normal form.
A principal conjunctive normal form of a given formula is unique up to rearrangements of
the factors in maxterms as well as in their conjunctions.

The method to obtain the principal conjunctive normal form for a given formula is similar
to the one for obtaining principal disjunctive normal form.
In fact all the assertion which is true for principal disjunctive normal form is also true for
42

principal conjunctive normal form in view of the duality laws.

By using repeated applications of De Morgan’s law and the equivalence A ⇐⇒ ¬¬A one
can obtain the principal conjunctive (disjunctive) normal form.

Example: Obtain the principal conjunctive normal form of the formula


A := (¬P → R) ∧ (Q ↔ P ).

(¬P → R) ∧ (Q ↔ P )
⇐⇒ (P ∨ R) ∧ ((Q → P ) ∧ (P → Q))
⇐⇒ (P ∨ R) ∧ ((¬Q ∨ P ) ∧ (¬P ∨ Q))
⇐⇒ (P ∨ R ∨ (Q ∧ ¬Q)) ∧ (¬Q ∨ P ∨ (R ∧ ¬R)) ∧ (¬P ∨ Q ∨ (R ∧ ¬R))
⇐⇒ (P ∨ Q ∨ R) ∧ (P ∨ ¬Q ∨ R) ∧ (P ∨ ¬Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R) ∧ (¬P ∨ Q¬R)
Now, we can find the principal conjunctive normal form of ¬S by writing the conjunction
of remaining maxterms; thus the principal conjunctive normal form of ¬A is given by
(P ∨ Q ∨ ¬R) ∧ (¬P ∨ ¬Q ∨ R) ∧ (¬P ∨ ¬Q ∨ ¬R).
Consider now, ¬¬A,
¬(P ∨ Q ∨ ¬R) ∨ ¬(¬P ∨ ¬Q ∨ R) ∨ ¬(¬P ∨ ¬Q ∨ ¬R)

⇐⇒ (¬P ∧ ¬Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (P ∧ Q ∧ R),


which is the principal disjunctive normal form of A.

Example: Let A be a given formula. Below is the truth table for A. Find its disjunctive
and conjunctive normal forms.
P Q R A
T T T F
T T F F
T F T T
T F F F
F T T T
F T F T
F F T F
F F F T
We now choose the miniterms corresponding to each T value of A to obtain
A ⇐⇒ (P ∧ ¬Q ∧ R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ Q ∧ ¬R) ∨ (¬P ∧ ¬Q ∧ ¬R)
Similarly,
A ⇐⇒ (¬P ∨ ¬Q ∨ ¬R) ∧ (¬P ∨ Q ∨ R) ∧ (¬P ∨ Q ∨ R) ∧ (¬P ¬Q ∧ R).
43

Completely parenthesized infix notation and Polish notation: We shall now see how
a given statement formula can be translated into some targeted language such as machine
language or assembly language. Also, we mechanically determine its truth values for several
possible assignment of truth values of its variables.

To write a statement formula we have used parentheses (whenever necessary). In fact, we


emphasised the usage of parentheses in the definition of well formed formula. We agreed on
some conventions;
• If A is a well formed formula then so is ¬A. No parentheses is used with A.
¬P ∨ Q means ¬(P ) ∨ Q and not ¬(P ∨ Q).
• The next convention was; outermost parentheses of an expression can be dropped so
that one can write (P ∧ Q) ∨ R in place of ((P ∧ Q) ∨ R).
To reduce the number of parentheses further we have top fix the order of precedence for
the connectives. Once we fix this, further reductions cam be done as follows; for any two
binary connectives appearing in a formula which have the same precedence, the left one is
evaluated first.
This convention is used in arithmetic; e.g. 4 + 6 × 3 − 7 means [4 + (6 × 3)] − 7.

We now assume that the formula which we shall encounter involves the connectives ¬, ∧,
and ∨ only and assume the following order of precedence: ¬, then ∧ and then ∨.

Consider the expression P ∨ Q ∧ R ∨ S ∧ T.

According to our convention the above expression stands for (P ∨ (Q ∧ R) ∨ (S ∧ T )).


44

The Theory of Inference

Ordering and uniqueness of normal forms. We shall first fix the ordering in variables.
If we consider n variables, then
• If the variables are denoted by capital letters, we shall arrange them in alphabetical
order.
• If subscripted letters are also used to denote the variables , then we shall use following
illustration;
A, B, · · · , Z, A1 , B1 , · · · , Z1 , A2 , B2 , · · ·
e.g. if the variables are P1 , Q, R3 , S1 , T2 and Q3 , then we arrange them in the following order;
Q, P1 , S1 , T2 , Q3 , R3 .
Once we fix the ordering, we can assign numbering to them e.g., first variable, second
variable, etc.

If we are given n variables which have been arranged according to the above ordering.
There will be 2n miniterms corresponding to these n variables and we can number these
miniterms as follows;
m0 , m1 , · · · , m2n −1 .
Write the subscript of miniterms in binary and add a suitable number of zeros on the left
(if necessary) so that the number of digits in the subscript is exactly n, then we get the
corresponding miniterm as follows;

• If in the i-th location from the left there appears 1, then the i-th variables appears
in the conjunction.
• If 0 appears in the i-th location from the left, then negation of the i-th variable
appears in the conjunction forming the miniterm.
Thus, each of the m0 , m1 , · · · , m2n− 1 corresponds to a unique miniterm, which is deter-
mined by the binary representation of the subscript.
Conversely, for a given miniterm, it is easy to see that which of m0 , m1 , · · · , m2n −1 desig-
nates it.

Consider three variables P, Q, and R arrange in this order. Let corresponding miniterms
are denoted by m0 , m1 , · · · , m7 .

The binary representation of 5 is 101, hence the miniterm corresponding to m5 is P ∧


¬Q ∧ R. Similarly, m0 corresponds to the miniterm ¬P ∧ ¬Q ∧ ¬R.
To obtain the miniterms m3 , write 3 in binary representation which is 11. We add an extra
zero to get 011 and hence the miniterm m3 is given by ¬P ∧ Q ∧ R.

If we consider six variables P1 , P2 , · · · , P6 then miniterms are denoted by m0 , m1 , cdots, m6 3.


To get m38 write 38 in binary representation which is 100110, thus m38 is given by
P1 ∧ ¬P2 ∧ ¬P3 ∧ P4 ∧ P5 ∧ ¬P6 .
45

Using the above notation, we write


P the sum-of-products canonical form representing the
disjunction of mi , mj , and mk as i, j, k.

We have seen that

(P ∧Q)∨(¬P ∧R)∨(Q∧R) ⇐⇒ (¬P ∧¬Q∧R)∨(¬P ∧Q∧R)∨(P ∧Q∧¬R)∨(P ∧Q∧R).


P
Thus principal disjunctive normal form of (P ∧Q)∨(¬P ∧R)∨(Q∧R) is given by 1, 3, 6, 7.

We now develop the similar notation for principal conjunctive normal forms.

Let us denote the maxterms associated to n variables as M0 , M1 , · · · , M2n −1 . Then the


maxterm corresponding to Mj is obtained by expressing j in binary and adding a suitable
number of zero to the left in order to get n digits.
• If 0 appears in the i-th location from the left, then the i-th variable appears in the
disnjunction forming the maxterm.
• If 1 appears in the i-th location from the left, then negation of the i-th variable
appears in the disnjunction forming the maxterm.
Thus, the binary representation of subscripts determine thr maxterms and conversely, every
binary representation of numbers between 0 and 2n − 1 determines a maxterms.

Note here that the convention regarding 1 and 0 is opposite of what was used for miniterms.
This is in view to connect the two principal normal forms of a given formula.

The maxterms M0 , M1 , · · · , M7 corresponding to three variables P, Q, and R is given by


P ∨Q∨R P ∨ Q ∨ ¬R P ∨ ¬Q ∨ R P ∨ ¬Q ∨ ¬R
¬P ∨ Q ∨ R ¬P ∨ Q ∨ ¬R ¬P ∨ ¬Q ∨ R ¬P ∨ ¬Q ∨ ¬R
Q
We denote the principal conjunctive normal form by i, j, k which represents the con-
junction of maxterms Mi , Mj , adn Mk .

Example: Consider the following formula (P ∧ Q) ∨ (¬P ∧ R)

(P ∧ Q) ∨ (¬P ∧ R)
⇐⇒ ((P ∧ Q) ∨ ¬P ) ∧ ((P ∧ Q) ∨ R)
⇐⇒ (P ∨ ¬P ) ∧ (Q ∨ ¬P ) ∧ (P ∨ R) ∧ (Q ∨ R)
⇐⇒ (Q ∨ ¬P ∨ (R ∧ ¬R)) ∧ (P ∨ R ∨ (Q ∧ ¬Q)) ∧ (Q ∨ R ∨ (P ∧ ¬P ))
⇐⇒ (Q ∨ ¬P ∨ R) ∧ (Q ∨ ¬P ∨ ¬R) ∧ (P ∨ R ∨ Q) ∧ (P ∨ R ∨ ¬Q) ∧ (Q ∨ R ∨ P ) ∧ (Q ∨ R ∨ ¬P )
⇐⇒ (¬P ∨ Q ∨ Q) ∧ (¬P ∨ Q¬R) ∧ (P ∨ Q ∨ R) ∧ (P ∨ ¬Q ∨ R)

Thus inQthe notation above, the product-of-sums canonical form of (P ∧ Q) ∨ (¬P ∧ R) is


given by 0, 2, 4, 5.

Also, its disjunctive normal form is given by


X
(P ∧ Q ∧ R) ∨ (P ∧ Q ∧ ¬R) ∨ (¬P ∧ Q ∧ R) ∨ (¬P ∧ ¬Q ∧ R) ⇐⇒ 1, 3, 6, 7.
46

Theory of Inference. The main function of logic is to provide the rules of inference, or
principles of reasoning. The theory associated with such rules is known as inference theory.

When we derive a conclusion from a set of premises by using the accepted rules of reason-
ing, then such a process of derivation is called a deduction or aformal proof.

Formal proof: Every rule of inference that is used at any stage in the derivation is ac-
knowledged.

Mathematical proofs are, in general, informal in the sense that many steps in the deriva-
tion are either omitted or considered to be understood.

Validity using truth tables: Let A and B be two statement formulas. We say that “B
logically follows from A” or “B is a valid conclusion (consequence) of the premise A” iff
A → B is a tautology, i.e., A =⇒ B.

The above can be extended for a set of premises as follows; we say that from a set of
premises {H1 , H2 , · · · , Hm } a conclusion C follows logically iff
(1) H1 ∧ H2 ∧ · · · ∧ Hm =⇒ C
Let P1 , P2 , · · · , Pn be all the atomic variables appearing in the premises H1 , H2 , · · · , Hm
and tge conclusion C. By looking at truth table one can immediately tell whether (0.86)
holds or not.

We look for the rows in which all the premises H1 , H2 , · · · , Hm have the truth value T. If,
for every such row, C also has the truth value T, then (0.86) holds.

Alternatively, we may look for rows in which the truth value of C is F. If, in every such
row, at leat one of the truth values of H1 , H2 , · · · , Hm is F, then (0.86) holds.

This method of finding the validity is called “truth table technique.”

Examples: Determine whether the conclusion C follows logically from the premises H1 and
H2 .
(1) H1 : P → Q H2 : P C : Q
(2) H1 : P → Q H2 : ¬P C : Q
(3) H1 : P → Q H2 : ¬(P ∧ Q) C : ¬P
(4) H1 : ¬P H2 : P ↔ Q C : ¬(P ∧ Q)
(5) H1 : P → Q H2 : Q C : P
We first construct the truth table for all the formulas involved here;
P Q P → Q ¬P ¬Q ¬(P ∧ Q) P ↔ Q
T T T F F F T
T F F F T T F
F T T T F T F
F F T T T T T
47

(1) Observe that the first row is the only row in which both the premises have the truth
value T. The conclusion C also has the truth value T in that row. Therefore, it is
valid.
(2) Not valid.
(3) Valid.
(4) Valid.
(5) Not Valid.
Rules of Inference: We now give a process of derivation by which one can determine
whether a particular formula is a valid consequence of a given set of premises. We first give
two rules of inference called rules P and T.

Rule P: A premise may be introduced at any point in the derivation.


Rule T: A formula S may be introduced in a derivation if S is tautologically implied by
any one or more of the preceding formulas in the derivation.

Before proceeding to the process of derivation, let us list some important formulas which
will be used frequently.
List of Implications
I1 P ∧ Q =⇒ P (simplification)
I2 P ∧ Q =⇒ Q (simplification)
I3 P =⇒ P ∧ Q (addition)
I4 Q =⇒ P ∧ Q (addition)
I5 ¬P =⇒ P → Q
I6 Q =⇒ P → Q
I7 ¬(P → Q) =⇒ P
I8 ¬(P → Q) =⇒ ¬Q
I9 P, Q =⇒ P ∧ Q
I10 ¬P, P ∨ Q =⇒ Q (disjunctive syllogism)
I11 P, P → Q =⇒ Q (modus ponens)
I12 ¬Q, P → Q =⇒ ¬P (modus tollens)
I13 P → Q, Q → R =⇒ P → R (hypothetical syllogism)
I14 P ∨ Q, P → R, Q → R =⇒ R (dilemma)
48

List of Equivalences
E1 ¬¬P ⇐⇒ P (double negation)
E2 P ∧ Q ⇐⇒ Q ∧ P (commutativity)
E3 P ∨ Q ⇐⇒ Q ∨ P (commutativity)
E4 (P ∧ Q) ∧ R ⇐⇒ P ∧ (Q ∧ R) (associativity)
E5 (P ∨ Q) ∨ R ⇐⇒ P ∨ (Q ∨ R) (associativity)
E6 P ∧ (Q ∨ R) ⇐⇒ (P ∧ Q) ∨ (Q ∧ R) (distributive law)
E7 P ∨ (Q ∧ R) ⇐⇒ (P ∨ Q) ∧ (Q ∨ R) (distributive law)
E8 ¬(P ∧ Q) ⇐⇒ ¬P ∨ ¬Q (De Morgan’s law)
E9 ¬(P ∨ Q) ⇐⇒ ¬P ∧ ¬Q (De Morgan’s law)
E10 P ∨ P ⇐⇒ P
E11 P ∧ P ⇐⇒ P
E12 R ∨ (P ∧ ¬P ) ⇐⇒ R
E13 R ∧ (P ∨ ¬P ) ⇐⇒ R
E14 R ∨ (P ∨ ¬P ) ⇐⇒ T
E15 R ∧ (P ∧ ¬P ) ⇐⇒ F
E16 P → Q ⇐⇒ ¬P ∨ Q
E17 ¬(P → Q) ⇐⇒ P ∧ ¬Q
E18 P → Q ⇐⇒ ¬Q → ¬P
E19 P → (Q → R) ⇐⇒ (P ∧ Q) → R
E20 ¬(P ↔ Q) ⇐⇒ P ↔ ¬Q
E21 P ↔ Q ⇐⇒ (P → Q) ∧ (Q → P )
E22 P ↔ Q ⇐⇒ (P ∧ Q) ∨ (¬P ∧ ¬Q)
Example 1: Demonstrate that R is a valid inference from the premises P → Q, Q → R,
and P.

{1} (1) P → Q Rule P


{2} (2) P Rule P
{1, 2} (3) Q Rule T, (1), (2), and I11
{4} (4) Q → R Rule P
{1, 2, 4} (5) R Rule T, (3), (4), and I11
• The first column for each line shows the premises on which the formula in the line
depends.
• The second column of numbers designates the formula as well as the line of derivation
in which it occurs.
• On the right, P or T represents the rule of inference, followed by a comment showing
from which formulas and tautology that particular formula has been obtained.
e.g., if we follow this notation, the third line shows that formula in this line is numbered (3)
and has been obtained from premises (1) and (2). The comment on the right says that the
formula Q has been introduced using rule T and also indicates the details of the application
49

of rule T.

Example 2: Prove that R ∨ S follows logically from the premises C ∨ D, (C ∨ D) →


¬H, ¬H → (A ∧ B), and (A ∧ ¬B) → (R ∨ S).

{1} (1) (C ∨ D) → ¬H P
{2} (2) ¬H → (A ∧ ¬B) P
{1, 2} (3) (C ∨ D) → (A ∧ ¬B) T, (1), (2), and I13
{4} (4) (A ∧ ¬B) → (R ∨ S) P
{1, 2, 4} (5) (C ∨ D) → (R ∨ S) T, (3), (4), and I13
{6} (6) C ∨D P
{1, 2, 4, 6} (7) R∨S T, (5), (6), and I11
Example 3: Prove that S ∨ R is tautologically implied by (P ∨ Q) ∧ (P → R) ∧ (Q → S).

{1} (1) P ∨Q P
{1} (2) ¬P → Q T, (1), E1 , and E16
{3} (3) Q→S P
{1, 3} (4) ¬P → S T, (2), (3), and I13
{1, 3} (5) ¬S → P T, (4), E18 , and E1
{6} (6) P →R P
{1, 3, 6} (7) ¬S → R T, (5), (6), and I13
{1, 3, 6} (8) S∨R T, (7), E16 , and E1
Example 4: Prove that R ∧ (P ∨ Q) is a valid conclusion from the premises P ∨ Q, Q →
R, P → M, and ¬M.

{1} (1) P →M P
{2} (2) ¬M P
{1, 2} (3) ¬P T, (1), (2), and I12
{4} (4) P ∨Q P
{1, 2, 4} (5) Q T, (3), (4), and I10
{6} (6) Q→R P
{1, 2, 4, 6} (7) R T, (5), (6), and I11
{1, 2, 4, 6} (8) R ∧ (P ∨ Q) T, (4), (7), and I9
Example 5: Prove that ¬Q, P → Q =⇒ ¬P.

{1} (1) P → Q P
{1} (2) ¬Q → ¬P T, (1), and E18
{3} (3) ¬Q P
{1, 3} (4) ¬P T, (2), (3), and I11
50

We now introduce a third rule, called rule CP or rule of conditional proof.

Rule CP: If we can derive S from R and a set of premises, then we can derive R → S
from the set of premises alone.

Rule CP follows also from the equivalence (P ∧ R) → S ⇐⇒ P → (R → S).

Let P be the conjunction of the set of premises and let R be any formula. Then the above
equivalence says that if we include R as an additional premise and if S is derived from P ∧ R,
then R → S can be derived from the premise P alone.

Rule CP is also called the deduction theorem and is generally used if conclusion is of the
form R → S. In such cases, R is taken as an additional premise and S is derived from the
given premise and R.

Example 6: Prove that R → S can be derived from the premise P → (Q → S), ¬R ∨ P,


and Q.

{1} (1) ¬R ∨ P P
{2} (2) R P (assumed premise)
{1, 2} (3) P T, (1), (2), and I10
{4} (4) P → (Q → S) P
{1, 2, 4} (5) Q→S T, (3), (4), and I11
{6} (6) Q→R P
{1, 2, 4, 6} (7) S T, (5), (6), and I11
{1, 4, 6} (8) R→S CP
Thus, we have seen that a derivation consists of a sequence of formulas, each formula in
the sequence being either a premise or tautologically implied by formula appearing before.

We have discussed about the decision problem, which is to determine in a finite number
of steps that a given formula is tautology. Similarly, if one can determine in a finite number
of steps whether an argument is valid, then the decision problem for validity is solvable.
51

The Theory of Inference

Validity using truth tables: Let A and B be two statement formulas. We say that “B
logically follows from A” or “B is a valid conclusion (consequence) of the premise A” iff
A → B is a tautology, i.e., A =⇒ B.

The above can be extended for a set of premises as follows; we say that from a set of
premises {H1 , H2 , · · · , Hm } a conclusion C follows logically iff
(2) H1 ∧ H2 ∧ · · · ∧ Hm =⇒ C
Let P1 , P2 , · · · , Pn be all the atomic variables appearing in the premises H1 , H2 , · · · , Hm
and tge conclusion C. By looking at truth table one can immediately tell whether (0.86)
holds or not.

We look for the rows in which all the premises H1 , H2 , · · · , Hm have the truth value T. If,
for every such row, C also has the truth value T, then (0.86) holds.

Alternatively, we may look for rows in which the truth value of C is F. If, in every such
row, at leat one of the truth values of H1 , H2 , · · · , Hm is F, then (0.86) holds.

Rule P: A premise may be introduced at any point in the derivation.


Rule T: A formula S may be introduced in a derivation if S is tautologically implied by
any one or more of the preceding formulas in the derivation.

Rule CP: If we can derive S from R and a set of premises, then we can derive R → S
from the set of premises alone.

Rule CP follows also from the equivalence (P ∧ R) → S ⇐⇒ P → (R → S).

Let P be the conjunction of the set of premises and let R be any formula. Then the above
equivalence says that if we include R as an additional premise and if S is derived from P ∧ R,
then R → S can be derived from the premise P alone.

Example: Prove that R → S can be derived from the premise P → (Q → S), ¬R∨P, and Q.

{1} (1) ¬R ∨ P P
{2} (2) R P (assumed premise)
{1, 2} (3) P T, (1), (2), and I10
{4} (4) P → (Q → S) P
{1, 2, 4} (5) Q→S T, (3), (4), and I11
{6} (6) Q→R P
{1, 2, 4, 6} (7) S T, (5), (6), and I11
{1, 4, 6} (8) R→S CP
52

Consistency of premises and Indirect Method of proofs. We say that a set of formulas
H1 , H2 , · · · , Hm is consistent if their conjunction has the truth value T for some assignment
of the truth values to the atomic variables appearing in H1 , H2 , · · · , Hm .

If, for every assignment of the truth values to the atomic variables, at least one of the
formulas H1 , H2 , · · · , Hm is false, so that their conjunction is identically false, then the for-
mulas H1 , H2 , · · · , Hm are called inconsistent.

Equivalently, a set of formulas H1 , H2 , · · · , Hm is inconsistent if their conjunction implies


a contradiction, i.e.,
H1 ∧ H2 ∧ · · · ∧ Hm =⇒ R ∧ ¬R,
where R is any formula.

Note here that, R ∧ ¬R is a contradiction, and it is necessary and sufficient for the
implication that H1 ∧ H2 ∧ · · · ∧ Hm be a contradiction.
We have introduced the notion of consistency, because it is used in a procedure called
proof by contradiction or indirect method of proof.

In order to show that a conclusion C follows logically from the premises H1 , H2 , · · · , Hm ,


we shall assume that C is false, and consider ¬C as an additional premise. If the new set of
premises is inconsistent, so that they imply a contradiction, then the assumption that ¬C is
true does not hold simultaneously with H1 ∧ H2 ∧ · · · ∧ Hm being true. Therefore, C is true
whenever H1 ∧ H2 ∧ · · · ∧ Hm is true, and hence the conclusion C follows logically from the
premises H1 , H2 , · · · , Hm .

Example 1: Prove that ¬(P ∧ Q) follows from ¬P ∧ ¬Q.

We introduce ¬¬(P ∧ Q) as an additional premises and prove that this additional premise
leads to a contradiction.

{1} (1) ¬¬(P ∧ Q) Rule P(assumed)


{1} (2) P ∧Q Rule T, (1), and E1
{1} (3) P Rule T, (2), and I1
{4} (4) ¬P ∧ ¬Q Rule P
{4} (5) ¬P Rule T, (4), and I1
{1, 4} (6) P ∧ ¬P Rule T, (3), (5), and I9
Example 1: Show that the following premises are inconsistent.
(1) If Jack misses many classes through illness, then he fails high school.
(2) If Jack fails high school, then he is uneducated.
(3) If Jack reads a lot of book, then he is not uneducated.
(4) Jack misses many classes through illness and reads a lot of book.
E : Jack misses many classes.
S : Jack fails high school.
A : Jack reads a lot of book.
53

H : Jack is uneducated.

The given premises are


E → S, S → H, A → ¬H, E ∧ A.
{1} (1) E→S Rule P
{2} (2) S→H Rule P
{1, 2} (3) E→H Rule T, (1), (2) and I13
{4} (4) A → ¬H Rule P
{4} (5) H → ¬A Rule T, (4), and E18
{1, 2, 4} (6) E → ¬A Rule T, (3), (5), and I13
{1, 2, 4} (7) ¬E ∨ ¬A Rule T, (6), and E16
{1, 2, 4} (8) ¬(E ∧ A) Rule T, (7), and E8
{9} (9) E∧A Rule P
{1, 2, 4, 9} (10) (E ∧ A) ∧ ¬(E ∧ A) Rule T, (8), (9), and I9
The method of proof by contradiction is sometimes convenient. However, it can be elimi-
nated and replaced by a conditional proof CP. Observe that
P → (Q ∧ ¬Q) =⇒ P.
In the proof by contradiction we show that
H1 , H2 , · · · , Hm =⇒ C
by showing that
H1 , H2 , · · · , Hm , ¬C =⇒ R ∧ ¬R.
Now the above can be converted to the following by using CP
H1 , H2 , · · · , Hm =⇒ ¬C → (R ∧ ¬R).
Now the first and last implications with E1 , together yield
H1 , H2 , · · · , Hm =⇒ C.

Automatic Theorem Proving: We now see the rules of inference theory for statement
calculus and describe a process of derivation which can be conducted mechanically. The
formulation given earlier could not be used for this purpose because the construction of
derivation depends heavily upon the skill, experience, and inenuity of the person to make
the righr decision at every step.

• Rule P permits the introduction of a premise at any point in the derivation, but does
not suggest either the premise or the step at which it should be introduced.
• Rule T allows us to introduce any formula which follows from the previous steps.
However, there is no choice of such formula, nor is there any guidance for the use of
any particular equivalence.
• Similarly, rule CP does not tell anything about the stages at which an antecedent is
to be introduced as an assumed premise, nor does it indicate the stage at which it is
again incorporated into the conditional.
54

At every step, such decisions are taken from a large number of alternatives, with the ultimate
aim of reaching the conclusion. Thus, such a process is far from mechanical.

We shall now give a set of rules and a process which allow to construct each step deriva-
tion in a specified manner without recourse to any ingenuity and finally arrive at a last step
which clearly tells whether a given conclusion follows from the premises or not. Therefore,
this process is not only mechanical, but is also a full decision process of validity.

We now described our system which consists of certain rules, an axiom schema, and rules
of well formed sequents and formulas;

(1) Variables: The capital letters A, B, C, · · · , P, Q, R, · · · are used as statement vari-


ables. They are also used as statement formulas; however, in such cases the context
will clearly indicate this usage.
(2) Connectives: The connectives ¬, ∧, ∨, →, and ↔ appear in the formula with the
order of the precedence as given, namely., ¬ has the highest precedence, followed by
∧, and so on. The concept of well-formed formula remains same as discussed earlier
with an additional assumption of precedence and associativity of the connectives need
in order to reduce the number of parentheses appearing in the formula.
(3) Strings of formula: A string of formulas is defined as follows;
(a) Any formula is a string of formulas.
(b) If α and β are strings of formula, then α, β and β, α are strings of formulas.
(c) Only those strings which are obtained by the steps above are strings of formulas,
with the exception of the empty string which is also a string of formulas.
Here the order in which the formulas appear in a string does not matter; A, B, C; B, C, A; C, B
are the same.
s
(4) Sequents: If α and β are strings of formulas, then α → − β is called a sequent in
which α is denoted the antecedent and β the consequent of the sequent.
s
A sequent α → − β is true iff either at least one of the formulas of antecedent is false
or at least one of the formulas of the consequent is true.
s
Thus, A, B, C →
− D, E, F is true iff A ∧ B ∧ C → D ∨ E ∨ F is true. In this sense
s
the symbol →
− is generalization of the connective → to strings of formulas.
s
Similarly, we use the symbol ⇒
= applied to the string of formulas, as a generalization
s
of the symbol =⇒ . Thus, A =⇒ B means A → B is a tautology and α ⇒
= β
s
means α → − β is true.
(5) Axiom Schema: If α and β are strings of formulas such that every formula in both
s
α and β are variables only, then the sequent α →− β is an axiom iff α and β have at
s
least one variable in common. e.g., A, B, C →− P, B, R, where A, B, C, P, and R are
variables, is an axiom.
(6) Theorem: The following sequents are theorem of our system.
(a) Every axiom is a theorem.
(b) If a sequent α is a theorem and a sequent β results from α through the use of
one of the 10 rules of the systems which are given below, then β is a theorem.
55

(c) Sequents obtained by the above two are the only theorems.
(7) Rules: The following rules are used to combine formulas within stringgs by intro-
ducing connectives. Correspondin to each of the connectives there are two rules, one
for the introduction of the connective in the antecedent and the other for its intro-
duction in the consequent. In the description of these rules, α, β, γ, · · · are strings of
formulas while X and Y are formulas to which the connectives are applied.

Antecedent Rules
s s
Rule ¬=⇒ : If α, β ⇒
= X, γ, then α, ¬X, β ⇒
= γ.
s s
Rule ∧=⇒ : If X, Y, α, β ⇒
= γ, then α, X ∧ Y, β ⇒
= γ.
s s s
Rule ∨=⇒ : If X, α, β ⇒
= γ, and Y, α, β ⇒
= X, γ, then α, X ∨ Y, β ⇒
= γ.
s s s
Rule →=⇒ : If Y, α, β ⇒
= γ, and α, β ⇒
= X, γ, then α, X → Y, β ⇒
= γ.
s s s
Rule ↔=⇒ : If X, Y, α, β ⇒
= X, γ, and α, β ⇒
= X, Y, γ then α, X ↔ Y, β ⇒
= γ.

Consequent Rules
s s
Rule =⇒¬ : If X, α, ⇒
= β, γ, then α ⇒
= β, ¬X, γ.
s s s
Rule =⇒∧ : If α ⇒
= X, β, γ, and α ⇒
= Y, β, γ, then α ⇒
= β, X ∧ Y, γ.
s s
Rule =⇒∨ : If α ⇒
= X, Y, β, γ, then α ⇒
= β, X ∨ Y, γ.
s s
Rule =⇒→: If X, α ⇒
= Y, β, γ, then α ⇒
= β, X → Y, γ.
s s s
Rule =⇒↔: If X, α, ⇒
= Y, β, γ, and Y, α ⇒
= X, β, γ then α ⇒
= β, X ↔ Y, γ.

The order in which the formulas and strings of formulas appear in a string in any of the
rules is not important.

The system which have described above is equivalent to the one described in the previous
class except that the procedure and techniques of derivation are different. However, this
difference does not affect the validity of an argument.

We now see how this procedure can be used in practice.

In the method which was introduced in the previous class, we showed that a conclusion
C follows from the premises H1 , H2 , · · · , Hm by a derivation whose last step was C, and
H1 , H2 , · · · , Hm were introduced at various stages by using the rule P. This method essen-
tially means showing
(3) H1 , H2 , · · · , Hm =⇒ C.
Another way of stating (3) is
(4) H1 → (H2 → (H3 · · · (Hm → C) · · · ))
56

is a tautology (because?? )

This new formulation is premise-free, so that in order to show that C follows from
H1 , H2 , · · · , Hm , we establish that

s
(5) →
− H1 → (H2 → (H3 · · · (Hm → C) · · · ))
is a theorem. We must show that
s
(6) ⇒
= H1 → (H2 → (H3 · · · (Hm → C) · · · )).

Our procedure involves showing (5) to be a theorem. For this purpose, we first assume (6)
and then show that this is or is not justified. This task is done by working backword from
(6), using tje rules and showing that (6) holds if some simpler sequent is a theorem. We
continue going backward until we arive at the simplest possible sequents, i.e., those which do
not have any connectives. If these sequents are axioms, then we have justified our assump-
tion in (6). If at least one of the simplest sequents is not an axiom, then the assumption in
(6) is not justified and C does not follow from H1 , H2 , · · · , Hm .

We now demonstrate the above process by means of some examples.

Example 1: Show that P ∨ Q follows from P.

We need to show that


s
(1) ⇒
= P → (P ∨ Q)
s
(1) if (2) P ⇒
= (P ∨ Q) ( =⇒→)
s
(2) if (3) P ⇒
= P, Q ( =⇒ ∨)

s
We first eliminate the connective → in (1). Using the rule =⇒→ we have “if P ⇒
= P ∨Q
s s
then ⇒
= P → (P ∨ Q)”. Here, we have named P ⇒
= P ∨ Q by (2). Each line of derivation
thus introduces the name as well as gives a rule. Note also that “(1) if (2)” means “(2) then
(1).” The chain of arguments is then given by (1) holds if (2), and (2) holds if (3). Finally,
(3) is a theorem, because it is an axiom. The actual derivation is simply a reversal of these
P
steps in which (3) is an axiom that leads to =⇒→ (P ∨ Q) as shown
s
(a) P ⇒
= P, Q, Axiom
s
(b) P ⇒
= P ∨ Q, Rule ( =⇒ ∨), (a)
s
(c) ⇒
= P → (P ∨ Q), Rule ( =⇒→), (b)

s
Example 2: Show that ⇒
= (¬Q ∧ (P ∨ Q)) → ¬P.
57

s
(1) ⇒
= (¬Q ∧ (P → Q)) → ¬P
s
(1) if (2) ¬Q ∧ (P → Q) ⇒
= ¬P ( =⇒→)
s
(2) if (3) ¬Q, P → Q ⇒
= ¬P (∧ =⇒ )
s
(3) if (4) P → Q ⇒
= ¬P, Q, (¬=⇒ )
s s
(4) if (5)Q ⇒
= ¬P, Q, and (6) ⇒
= P, ¬P, Q (→=⇒ )
s
(5) if (7) P, Q ⇒
= Q ( =⇒ ¬)
s
(6) if (8) P ⇒
= P, Q ( =⇒ ¬)

Now (7) and (8) are axioms, hence the theorem (1) follows. We omit the derivation, which
is easily obtained by starting with the axiom (7) and (8) and retracing the steps.

Example 3: Does P follows from P ∨ Q?


s s
We investigate whether →
− (P ∨ Q) → P is a theorem. Assume (1) ⇒
= (P ∨ Q) → P.

s
(1) if (2) P ∨ Q ⇒
= P ( =⇒→)
s s
(2) if (3) P ⇒
= P and (4) Q ⇒
= P (∨ =⇒ )

Note that (3) is an axiom, but (4) is not. Hence P does not follow from P ∨ Q.
58

Example 4: Show that S ∨ R is tautologically implied by (P ∨ Q) ∧ (P → R) ∧ (Q → S).

s
(1) ⇒
= ((P ∨ Q) ∧ (P → R) ∧ (Q → S)) → (S ∨ R)
s
(1) if (2) (P ∨ Q) ∧ (P → R) ∧ (Q → S) ⇒
= (S ∨ R) ( =⇒→)
s
(2) if (3) (P ∨ Q) ∧ (P → R) ∧ (Q → S) ⇒
= S, R ( =⇒ ∨)
s
(3) if (4) (P ∨ Q), (P → R), (Q → S) ⇒
= S, R (∨=⇒ twice)
s s
(4) if (5) P, P → R, Q → S ⇒
= S, R, and (6) Q, P → R, Q → S ⇒
= S, R (∨ =⇒ )
s s
(5) if (7) P, R, Q → S ⇒
= S, R and (8) P, Q → S ⇒
= P, S, R (→=⇒ )
s s
(7) if (9) P, R, S ⇒
= S, R and (10) P, R ⇒
= S, R, Q (→=⇒ )
s s
(8) if (11) P, S ⇒
= P, S, R and (12) P ⇒
= P, S, R, Q (→=⇒ )
s s
(6) if (13) Q, R, Q → S ⇒
= S, R and (14) Q, Q → S ⇒
= S, R, P (→=⇒ )
s s
(13) if (15) Q, R, S ⇒
= S, R and (16) Q, R ⇒
= S, R, Q (→=⇒ )
s s
(14) if (17) Q, S ⇒
= S, R, P and (18) Q ⇒
= S, R, P, Q (→=⇒ )

Now, (9) to (12) and (15) to (18) are all axioms; therefore the result follows.
59

Predicate Calculus

We have discussed the propositional logic or statement logic and its theory of inference.
However, sometime it is not possible to express the meaning of all the statements in math-
ematics and natural language by this logic. e.g.
“Every computer connected to the college network is working properly.”
Truth of the above statement cannot be decided by any rules propositional logic. Therefore,
to conclude the truth of a wide range of statements in mathematics and computer science
we shall now introduce a powerful logic called predicate logic. We first discuss what is
predicate and then introduce notion of quantifiers, which enables us reason with statements
that assert that a certain property holds for objects of a certain type and with statements
that assert the existence of an object with a particular property.

Predicate: Consider the statements


“x > 3, ” “x = y + 3, ” “x + y = z,
and “computer x is under attack by an intruder”

“ computer x is working properly”.


This type of statements are often occur in mathematical assertions and in computer pro-
grams. We cannot say anything about the truthness or falseness of these statements when
the variables are not specified.

Consider now the statement “x is greater than 3.” This statement has two parts. The
first part is the variable x, which is the subject of the statement. The second part - the
predicate, “is greater than 3”- and this refers to a property that the subject of the statement
can have. Thus, we can denote the statement “x is greater than 3” by P (x), where P denotes
the predicate “ is greater than 3” and x is the variable. We say that P (x) is the value of
the propositional function P at x. Once we assign variable x is assigned the statement P (x)
becomes a proposition and we can talk about its truth value.

Example: If P (x) denotes the statement “x > 3”, then the truth value of P (4) and P (2),
is true and false, respectively.

One can have statements involving more than one variable. e.g., consider the statement
“x = y + 3.” We shall denote this by Q(x, y), here x and y are variables and Q is the pred-
icate. Again, if we assign the variables x and y, we can talk about its truth value. It is
immediate that Q(1, 2) is false where as Q(3, 0) is true.

Similarly, if we denote the statement x + y = z by R(x, y, z), then the truth values of
R(1, 2, 3) and R(0, 0, 1) is true and false, respectively.

More general, we denote a statement that involves the n variables x1 , x2 , · · · , xn by


P (x1 , x2 , · · · , xn ).
60

A statement of the form P (x1 , x2 , · · · , xn ) is the value of the propositional function P at


the n-tuple (x1 , x2 , · · · , xn ).

Propositional function occur in computer programs and predicates are used to verify that
computer programs always produce the desired output when given valid input. The state-
ments that describe valid input are called as preconditions and the conditions that the output
should satisfy when the program has run are called postconditions.

When we assign the values to the variables in a propositional function, the resulting state-
ment becomes a proposition with a certain truth value. However, there is another important
way to, called quantification, to create a proposition from a propositional function. Quan-
tification express the extent to which a predicate is true over a range of elements.

Usually, the english words all, many, none, and few are used in quantification. Here, we
shall discuss two types of quantifications: universal and existential; universal quantification
tells us that a predicate is true for every element under consideration where as existential
quantification tells us that there is one or more element in consideration for which predicate
is true. The area of logic in which we deal with predicates and quantifiers is called the
predicate calculus.

The Universal Quantifier: There are many mathematical statements that asserts that
a property is true for all values of a variable in a particular domain, called the domain of
discourse (or the universe of discourse), or simply domain. We express such statements
by using universal quantifier. The universal quantification of P (x) for a particular domain
is the proposition that asserts that P (x) is true for all values of x in this domain. It is
important that the domain must always be specified when a universal quantifier is used
otherwise quantification of a statement is not defined.
Definition 0.2. The universal quantification of P (x) is the statement
“P (x) for all values of x in the domain.”

The notation ∀xP (x) denotes the universal quantification of P (x). Here, ∀ is called the
universal quantifier. ∀xP (x) is read as “for all xP (x)” or ‘for every xP (x).” An element
for which P (x) is false is called a counterexample of ∀xP (x).
• If P (x) is the statement “x + 1 > x”, then as P (x) is true for all real numbers x, the
quantification ∀xP (x) is true.
• If P (x) is the statement “x2 > 0”, then the quantification ∀xP (x) is false if the
universe of discourse is the set of all integers.(??)
If the domain is finite and the elements are listed as; x1 , x2 , · · · , xn , then the universal
quantification is same as the conjunction
P (x1 ) ∧ P (x2 ) ∧ · · · ∧ P (xn ),
because it is immediately clear that the above conjunction is true if and only if P (x1 ), P (x2 ), · · · , P (xn )
are all true.
61

Consider ∀xP (x), where P (x) is the statement “x2 ≥ x.” If the domain under consider-
2
ation is R - the set of real numbers, then ∀xP (x) is false, e.g. 12  12 . However, if we
consider Z as the domain then ∀xP (x) is true.

The above example shows the dependency on the domain of consideration.

The Existential Quantifier:


Definition 0.3. The existential quantification of P (x) is the statement
“ There exists an element x in the domain such that P (x).”

We use the notation ∃xP (x) for the existtential quantification of P (x). Here, ∃ is called
the existential quantifier.
If the domain is finite and the elements are listed as; x1 , x2 , · · · , xn , then the existential
quantification is same as the disjunction
P (x1 ) ∨ P (x2 ) ∨ · · · ∨ P (xn ),
because it is immediately clear that the above disjunction is true if and only if at least one
of the P (x1 ), P (x2 ), · · · , P (xn ) is true.

Statement True False


∀xP (x) P (x) is true for every x. There is an x for which P (x) is false.
∃xP (x) There is an x for which P (x) is true. P (x) is false for every x.

Uniqueness quantifier, denoted by ∃! or the notation ∃!xP (x) is the statement

“ There exists a unique x in the domain such that P (x) is true.”

e.g., every positive real number (resp. positive definite matrix) has a positive (positive
definite) square root.

Example: Consider the statements ∀x < 0(x2 > 0), ∀y(y 3 6= 0), and ∃z(z 2 = 2) with R as
the domain in each cases.

Precedence of Quantifiers: The quantifier ∀ and ∃ have higher precedence than all the
logical operators from propositional calculus/statement calculus. e.g., ∀xP (x) ∨ Q(x) is the
disjunction of ∀xP (x) and Q(x), i.e. (∀xP (x)) ∨ Q(x) and not ∀(xP (x) ∨ Q(x)).

Binding variables: When a quantifier is used on the variable x, we say that this occurrence
of the variable is bound.

An occurrence of a variable that is not bound by a quantifier or set equal to a particular


value is called free.

All the variables that occur in a propositional function must be bound or set equal to a
particular value to turn into a proposition. This is done by using a combination of universal
62

quantifier, existential quantifier, and the value assignments.

The part of logical expression to which a quantifier is applied is called the scope of this
quantifier. Consequently, a variable is free if it is outside the scope of all quantifiers in the
formula that specifies this variable.

Example: Consider the statement ∃x(x + y = 1). Here, the variable x is bound by the ex-
istential quantification ∃x, and the variable y is free because it is not bound by a quantifier
and no value is assigned to this variable. Thus, x is bound and y is free.

Consider the statement ∃x(P (x) ∧ Q(x)) ∨ ∀xR(x). Here, all variables are bound. The
scope of first quantifier, ∃x, is P (x) ∧ Q(x) as ∃x is applied only to P (x) ∧ Q(x). Similarly,
the scope of second quantifier, ∀x, is R(x).

Definition 0.4 (Equivalence involving Quantifiers:). Two statements S and T involving


predicates and quantifiers are said to be logically equivalent if and only if they have the
same truth value no matter which predicates are substituted into these statements and which
domain of discourse is used for the variables in these propositional functions. We use the
notation S ≡ T to denote that S and T are logically equivalent.

Example: Show that ∀x(P (x) ∧ Q(x)) and ∀xP (x) ∧ ∀xQ(x) are logically equivalent.

This means that a universal quantifier can be distributed over conjunction.

The proof is easy and left as an exercise.

We now discuss the negation of a quantified expression. Consider the statement

“Every student in your class has taken a course in calculus.”

This is universal quantification, viz., ∀xP (x), where P (x) is the statement “x has taken a
course in calculus” and the domain is the students in your class. The negation of the above
statement is

“It is not the case that every student in your class has taken a course in calculus” or equiv-
alently, “There is a student a in your class who has not taken a course in calculus.” Which
is the existential quantification of the negation of the original propositional functional, viz.,
∃x¬P (x).

Prove that ¬∀xP (x) ≡ ∃x¬P (x).


Proof:
• No matter what the propositional function P (x) is what the domain of consideration
is, note that ¬∀xP (x) is true if an only if ∀xP (x) is false.
• ∀xP (x) is false if and only if there is an element x in the domain for which P (x) is
false and which holds if and only if there is an element x in the domain for which
¬P (x) is true.
63

• Finally, note that there is an element x in the domain for which ¬P (x) is true if and
only if ∃x¬P (x) is true.
All together implies that ¬∀xP (x) is true if and only if ∃x¬P (x) is true. Which
means that these two are logically equivalent.

We now negate an existential qualification. Consider the statement

“There is a student in this class who has taken a course in calculus.” This is an existential
quantification ∃xQ(x), where Q(x) is the statement “x has taken a course in calculus.”

The negation of the above statement is “It is not the case that there is a student in this
class who has taken a course in calculus” or equivalently“Every student in this class has
not taken a course in calculus.” Which is the universal quantification of the negation of the
original propositional function, i.e. ∀x¬Q(x).

Prove that ¬∃xQ(x) ≡ ∀x¬Q(x).


Proof:

• No matter what the propositional function Q(x) is what the domain of consideration
is, note that ¬∃xQ(x) is true if an only if ∃xP (x) is false. Which is true if an only
if there is no x in the domain for which Q(x) is true.
• There is no x in the domain for which Q(x) is true if and only if Q(x) is false for
every x in the domain.
• Finally, note that Q(x) is false for every x in the domain if and only if ¬Q(x) is true
for every x in the domain which holds if and only if ∀x¬Q(x) is true.
All together implies that ¬∃xQ(x) is true if and only if ∀x¬Q(x) is true. Which
means that these two are logically equivalent.

Negation Equivalent When is Negation True? When False?


¬∃xP (x) ∀x¬P (x) For every x, P (x) is false. There is an x for which P (x) is true.
¬∀xP (x) ∃x¬P (x) There is an x for which P (x) is false. P (x) is true for every x.

When the domain of the predicate P (x) has finite number of elements, say n listed as
follows; x1 , x2 , · · · , xn , then the rule of negation is exactly same as De Morgan’s law;
¬∀xP (x) is same as ¬(P (x1 )∧P (x2 )∧· · ·∧P (xn )) which is equivalent to ¬P (x1 )∨¬P (x2 )∨
· · · ∨ P (xn ) by De Morgan’s law, and this is same as ∃x¬P (x).

Similarly, ¬∃xP (x) is same as ¬(P (x1 ) ∨ P (x2 ) ∨ · · · ∨ P (xn )) which is equivalent to
¬P (x1 ) ∧ ¬P (x2 ) ∧ · · · ∧ P (xn ) by De Morgan’s law, and this is same as ∀x¬P (x).

Example: Show that ¬∀x(P (x) → Q(x)) and ∃x(P (x) ∧ ¬Q(x)) are logically equivalent.

From the previous table we see that ¬∀x(P (x) → Q(x)) and ∃x(¬(P (x) → Q(x))) are
logically equivalent. We also know that ¬(P (x) → Q(x)) and P (x) ∧ ¬Q(x) are logically
equivalent. Now the claim follows immediately, by using transitivity of equivalence.
64

Nested Quantifiers: We now discuss nested quantifiers. Two quantifiers are nested if one
is within scope of others, such as
∀x∃y(x + y = 0).
Everything within the scope of of a quantifier can be thought of as a propositional function.
e.g., ∀x∃y(x + y = 0) is same as ∀xQ(x), where Q(x) is ∃yP (x, y), where P (x, y) is x + y = 0.

• ∀x∀y(x + y = y + x) - addition is commutative.


• ∀x∃y(x + y = 0) - existence of additive inverse.
• ∀x∀y∀z(x(y + z) = (x + y) + z) - associativity in addition.

It is sometimes helpful to think in terms of loop while working with quantifications of


more than one variables. e.g. to see whether ∀x∀yP (x, y) is true, we loop the values of x,
and for each x we loop the values for y. If we find that P (x, y) is true for all value of x and
y, we have determined that ∀x∀yP (x, y) is true.

If we ever hit a value of x for which we have a value y for which P (x, y) is false, we have
shown that ∀x∀yP (x, y) is false.

Similar thing can be done for ∀x∃P (x, y), ∃x∃yP (x, y).

• If P (x, y) denotes the statement x + y = y + x, then ∀x∀yP (x, y) and ∀y∀xP (x, y)
are same.
• Let P (x, y) be the statement x + y = 0. Then the quantifications ∃y∀xQ(x, y) and
∀x∃yQ(x, y) are not the same.
Statement When True? When False?
∀x∀yP (x, y) P (x, y) is true for every pair x, y There is a pair x, y for.
∀y∀xP (x, y) which P (x, y) is false
∀x∃yP (x, y) For every x there is a y There is an x such that
for which P (x, y) is true. P (x, y) is false for every y.
∃x∀yP (x, y) There is an x for which P (x, y) For every x there is a y
is true for every y. for which P (x, y) is false.
∃x∃yP (x, y) There is a pair x, y for which P (x, y) is false for
P (x, y) is true. every pair x, y.
∃y∃xP (x, y)

• If P (x, y, z) denotes the statement x + y = z, then what is the truth value of


∀x∀y∃P (x, y, z) and ∃z∀x∀yP (x, y, z).
65

Rule of Inference, Proofs

Translating Mathematical sentences into statements involving nested quantifiers:


This will be illustrated by examples.

(1) Translate “The sum of two positive number is always positive.”

Let us rewrite the above as follows; “For every two integers, if these integers are
both positive, then the sum of these integers is positive.”This can be expressed as

∀x∀y((x > 0) ∧ (y > 0) → (x + y > 0)),


where the domain of discourse for both the variables is Z.

(2) Express the definition of limit using quantifiers.


Let f : R −→ R be a function. We say that f tends to a limit l as x tends to a, if
for every real number  > 0 there exists a real number δ > 0 such that |f (x) − l| < 
whenever 0 < |x − a| < δ. The above definition of limit can be expressed using
quantifiers
∀∃δ∀x(0 < |x − a| < δ → |f (x) − l| < ).
(3) Express the definition of convergence of a sequence using quantifiers.

Negating nested quantifiers: Recall the negation involving a single quantifier

Negation Equivalent When is Negation True? When False?


¬∃xP (x) ∀x¬P (x) For every x, P (x) is false. There is an x for which P (x) is true.
¬∀xP (x) ∃x¬P (x) There is an x for which P (x) is false. P (x) is true for every x.

To negate the statements involving nested quantifiers one has to successively apply the
rules for negating statements involving a single quantifier.

(1) Negate the statement ∀x∃y(xy = 1) such that no negation precedes a quantifier.

We shall apply De Morgan’s law successively for quantifiers so that we can move
the negation ¬∀∃(xy = 1) inside all the quantifiers.
¬∀x∃y(xy = 1) is equivalent to ∃x¬∃y(xy = 1), which is equivalent to ∃x∀y¬(xy =
1).
Now, ¬(xy = 1) can be expressed as xy 6= 1. Therefore, we conclude that the nega-
tion of the given statement is ∃x∀y(xy 6= 1).

(2) Use quantifiers and predicates to express the fact that lim f (x) does not exists.
x→a
66

This means that for all real numbers l, lim f (x) 6= l. Which can be expressed by
x→a
the negation

¬∀ > 0∃δ > 0∀x(0 < |x − a| < δ → |f (x) − l| < ).

¬ > 0 ∃δ > 0∀x(0 < |x − a| < δ → |f (x) − l| < )


≡ ∃ > 0¬∃δ > 0∀x(0 < |x − a| < δ → |f (x) − l| < )
≡ ∃ > 0∀δ > 0¬∀x(0 < |x − a| < δ → |f (x) − l| < )
≡ ∃ > 0∀δ > 0∃¬x(0 < |x − a| < δ → |f (x) − l| < )
≡ ∃ > 0∀δ > 0∃x((0 < |x − a| < δ) ∧ (|f (x) − l| ≥ ))

Now, the statement “ lim f (x) does not exists” means that for all real numbers
x→a
l, lim f (x) 6= l, and it can be expressed as
x→a

∀l∃ > 0∀δ > 0∃x((0 < |x − a| < δ) ∧ (|f (x) − l| ≥ )).

The above statement means that “for every real number l there is a real number
 > 0 such that for every real number δ > 0, there exists a real number x such that
0 < |x − a| < δ and |f (x) − l| ≤ .”
(3) Express “the sequence {xn }n∈N is not convergent” using quantifiers.

Rule of inference for quantified statements:


Rule of Inference Name
∀xP (x) Universal Instantiation
P (c)
P (c) for an arbitrary c Universal generalization
∀xP (x)
∃xP (x) Existential Instantiation
P (c) for some element c
P (c) for some element c Existential generalization
∃xP (x)

Example: Show that the premises “A student in this class has not read the book,” and
“Everyone in this class passed the first exam” imply the conclusion “Someone who passed
the first exam has not read the book.”

Let C(x) be “x is in this class,” B(x) be “x has read the book,” and P (x) be “x passed
the first exam.”

Then the premises are ∃x(C(x) ∧ ¬B(x)) and ∀x(C(x) → P (x)).

The conclusion is ∃x(P (x) ∧ ¬B(x)).


67

Step Reason
1. ∃x(C(x) ∧ ¬B(x)) Premise
2. C(a) ∧ ¬B(a) Existential Instantiation from (1)
3. C(a) Simplification from (2)
4. ∀x(C(x) → P (x)) Premise
5. C(a) → P (a) Universal Instantiation from (4)
6. P (a) Modus ponens from (3) and (5)
7. ¬B(a) Simplification from (2)
8. P (a) ∧ ¬B(a) Conjunction from (6) and (7)
9. ∃x(P (x) ∧ ¬B(x)) Existential generalization from (8)

Introduction to Proofs: We now discuss the notion of a proof and method of con-
structing proofs. A proof is a valid argument that establishes the truth of a mathematical
statement. It uses the hypotheses of the theorem, if any, axioms assumed to be true, and
previously known theorems.

The proof which we have seen earlier is called formal proof, where we used all the hy-
potheses and rules were acknowledged. Formal proofs can be very long and hard to follow.
Therefore, we move from formal proofs towards informal proofs. In informal proofs more
tahn one rule of of inference can be used in each step, and also the well understood steps
may be skipped.

• Theorem: A theorem is a statement that can be shown true.


• Proposition, Lemma: A less important theorem.
• Proof: A proof is a valid argument that establishes the truth of a theorem.
• Corollary: A theorem that can be established directly from an already proved
theorem.
• Conjecture: A statement that is being proposed to be true on the basis of some
practical evidences.

Methods of proving Theorems: To prove a theorem of the form ∀x(P (x) → Q(x)),
we need to show that P (a) → Q(a), for an arbitrary element a in the domain, and then apply
universal generalization.

Direct Proofs: A direct proof of a conditional statement P → Q involves the following;


the first step is the assumption that p is true and then use the rule of inference and previously
proven theorem to conclude that Q is also true in the final step.

“If n is an odd integer then so is the integer n2 .”

Proof by Contraposition: This method use the fact that P → Q is equivalent to


¬Q → ¬P. Thus, the conditional P → Q can be proved by showing that its contrapositive
¬Q → ¬P is true. To prove ¬Q → ¬P we use the method of direct proof.
√ √
Example: Let a, b, and n be positive integers. If n = ab, then a ≤ n, b ≤ n.
68
√ √
We prove
√ by contraposition.
√ Assume that a ≤ n and b ≤ n is false. Which means
that a > n, b > n and this implies that ab > n. Thus we have shown that contrapositive
is true hence the statement is also true.

Vacuous or trivial proofs: A proof of P → Q is true based on the fact that P is


false.
Proof by contradiction: Suppose we want to prove that P is true. If we can find
a contradiction Q such that ¬P → Q is true.Since Q is already known to be false, but
¬P → Q. Therefore, we conclude that ¬P is false and hence P is true.

Example: 2 is irrational.

Proof of equivalence: To prove a biconditional P ↔ Q, we show that P → Q and


Q → P are both true, because

P ↔ Q ⇐⇒ (P → Q) ∧ (Q → P ).

Sometimes a theorem states that several statements are equivalent. viz. the following
statements are equivalent P1 , P2 , · · · , Pn . This can be written as P1 ↔ P2 · · · ↔ Pn .
This means that all these statements ahave same truth value or equivalently, Pi ↔ Pj for
1 ≤ i, j ≤ n.
We shall use the following to prove such theorems;

P1 ↔ P2 · · · ↔ Pn ⇐⇒ ((P1 ↔ P2 ) ∧ (P2 ↔ P3 ) ∧ · · · ∧ (Pn ↔ P1 )).

This means that if we show that P1 ↔ P2 , P2 ↔ P3 , · · · Pn ↔ P1 are all true then P1 , P2 , · · · Pn


are all equivalent.

Counterexample: To prove that a statement of the form ∀xP (x) is false, we need to find
an x for which P (x) is false. This x will be called counterexample for the statement ∀xP (x).

Example: Every positive integer is sum of two squares.

3 cannot be written as sum of two squares.

Exhaustive Proof and Proof by cases: Sometime a theorem cannot be proved using
a single arguments that holds for all possible cases. In this situation we consider differ-
ent cases separately. This method is based on the following rule of inference; To prove
a conditional statement of the form (P1 ∨ P2 ∨ · · · , Pn ) → Q we use the equivalence
(P1 ∨ P2 ∨ · · · , Pn ) → Q ⇐⇒ (P1 → Q) ∧ (P2 → Q) ∧ · · · ∧ (Pn → Q) can be used.
This means that to prove the original condition statement where hypotheses is made up of
a disjunction of P1 , P2 , · · · , Pn one has tp prove each conditional Pi → Q individually. This
argument is called proof by case.

Sometime to prove a condition statement P → Q is true, it is helpful to consider the


disjunction P1 ∨ P2 ∨ · · · ∨ Pn instead of P as hypotheses, where P ⇐⇒ P1 ∨ P2 ∨ · · · ∨ Pn .
69

Some theorems are proved by examining a relatively small number of examples. Such
proofs are called exhaustive proofs because these proofs proceed by exhausting all possibili-
ties.

Without Loss of Generality: To reduce the number of cases WLOG is used where re-
maining cases can be proved by using the same argument.

Existence Proof: There are many theorems which assert that a particular type of object
exists. i.e. the proposition of the form ∃xP (x), where P is a predicate. A proof of the
proposition ∃xP (x) is called existence proof.

Sometime existence proof is given by finding an element α for which P (α) is true. Such
existence proof is called constructive proof. Sometime, a nonconstructive proof of a propo-
sition ∃xP (x) can be given. That is we do not construct a particular element α satisfying
P (α) but rather prove that ∃xP (x) is true in some other way. For this purpose, we usually
use the method of proof by contradiction.

Example: Show that there exists a positive integer that can be written as the sum of cubes
of positive integers in two different ways.

1729 = 103 + 93 = 123 + 13 ,


this number is called taxicab number.

Nonconstructive proof: Show that there exists irrational numbers x and y such that xy
is rational.
√ √ √2 √ √2
2 is known to be irrational. If 2 is rational, then we are done. If 2 is irrational
√ √2 √
then let x = 2 , and y = 2 and we have
√ √2 √ √ √√ √ 2
xy = ( 2 ) 2 = ( 2)( 2 2) = 2 = 2.
This we did not give a pair of irrational x, y such that xy is rational but proved that one
√ √ √ √2 √
of the pairs 2, 2 and 2 , 2 will serve the purpose.

Uniqueness Proofs: Some theorem asserts the existence of element with a particular
property. In other words the assertion of the type “There is exactly one element with this
property.” To prove such theorems we prove two things;

Existence: Such an element x exists.


Uniqueness: If y 6= x, then y does not have this property.

Example: If a and b are real numbers and a 6= 0, then there is a unique real number r such
that ar + b = 0.

You might also like