All articles
Discrete MathematicsOpen to everyone

Tautologies, Well-Formed Formulae, Functional Completeness and Normal Forms

Learn tautologies, contradictions, WFFs, functionally complete connectives, and normal forms including DNF and CNF.

Gulshan Kumar

In propositional logic, compound propositions can behave differently depending on the truth values of their component propositions. Some expressions are always true, some are always false, and others may be true in some cases and false in others.

These ideas lead to the concepts of tautology, contradiction, contingency, well-formed formulae, functionally complete sets of connectives, and normal forms.


Tautology

A compound proposition that is true for every possible combination of truth values of its variables is called a tautology.

In a truth table, a tautology has only T values in its final column.

For example, consider

(p→q)∨(q→p)(p \rightarrow q)\lor(q\rightarrow p)

Its truth table is:

ppqqp→qp\rightarrow qq→pq\rightarrow p(p→q)∨(q→p)(p\rightarrow q)\lor(q\rightarrow p)
TTTTT
TFFTT
FTTFT
FFTTT

The final column contains only T.

Therefore,

(p→q)∨(q→p)\boxed{(p\rightarrow q)\lor(q\rightarrow p)}

is a tautology.

Another Example

Consider

p→(q→p)p\rightarrow(q\rightarrow p)
ppqqq→pq\rightarrow pp→(q→p)p\rightarrow(q\rightarrow p)
TTTT
TFTT
FTFT
FFTT

Again, the final column contains only T.

Hence,

p→(q→p)\boxed{p\rightarrow(q\rightarrow p)}

is a tautology.


Contradiction

A compound proposition that is false for every possible combination of truth values of its variables is called a contradiction.

Its final truth-table column contains only F.

Consider

(p∧¬p)∧q(p\land\neg p)\land q
ppqq¬p\neg pp∧¬pp\land\neg p(p∧¬p)∧q(p\land\neg p)\land q
TTFFF
TFFFF
FTTFF
FFTFF

Since

p∧¬pp\land\neg p

can never be true, the entire expression is always false.

Therefore,

(p∧¬p)∧q\boxed{(p\land\neg p)\land q}

is a contradiction.


Contingency

A proposition that is neither always true nor always false is called a contingency.

In other words, the final column of its truth table contains both T and F.

For example,

p∧qp\land q

is a contingency because it is true when both pp and qq are true, but false in other cases.

Thus, compound propositions can be classified as:

  • Tautology — always true
  • Contradiction — always false
  • Contingency — sometimes true and sometimes false

Identifying Tautology and Contradiction in Larger Expressions

Consider the expressions

(p∨q)∨¬p(p\lor q)\lor\neg p

and

(p∧q)∧¬p(p\land q)\land\neg p

Their truth table is:

ppqq¬p\neg p¬q\neg qp∨qp\lor qp∧qp\land q(p∨q)∨¬p(p\lor q)\lor\neg p(p∧q)∧¬p(p\land q)\land\neg p
TTFFTTTF
TFFTTFTF
FTTFTFTF
FFTTFFTF

The expression

(p∨q)∨¬p(p\lor q)\lor\neg p

has only T in its final column, so it is a tautology.

The expression

(p∧q)∧¬p(p\land q)\land\neg p

has only F in its final column, so it is a contradiction.


Well-Formed Formula

What Is a Well-Formed Formula?

A logical expression is constructed using:

  • propositional variables such as p,q,rp,q,r
  • logical connectives such as ¬,∧,∨,→,↔\neg,\land,\lor,\rightarrow,\leftrightarrow
  • parentheses

However, not every arbitrary arrangement of these symbols forms a meaningful logical expression.

A syntactically correct logical expression is called a well-formed formula, abbreviated as WFF.

It is commonly pronounced “woof.”

For example,

p∧(q∨r)p\land(q\lor r)

is a well-formed formula.

But an expression such as

p∧∨qp\land\lor q

is not a WFF because the logical operators have not been used according to the rules of propositional logic.

Rules for Constructing a Well-Formed Formula

Well-formed formulae can be defined recursively.

Propositional Variables and Constants

Every propositional variable is a WFF.

Thus,

p,q,rp,\quad q,\quad r

are well-formed formulae.

Logical constants such as

TandFT\quad\text{and}\quad F

may also be treated as well-formed formulae.

Negation

If PP is a WFF, then

¬P\neg P

is also a WFF.

For example, if

pp

is a WFF, then

¬p\neg p

is also a WFF.

Similarly, if

p∨qp\lor q

is a WFF, then

¬(p∨q)\neg(p\lor q)

is also a WFF.

Combining Formulae

If PP and QQ are WFFs, then the following are also WFFs:

(P∧Q)(P\land Q) (P∨Q)(P\lor Q) (P→Q)(P\rightarrow Q) (P↔Q)(P\leftrightarrow Q)

By repeatedly applying these rules a finite number of times, more complex well-formed formulae can be constructed.

For example,

(p∧q)→(¬r∨p)(p\land q)\rightarrow(\neg r\lor p)

is a WFF because it is formed from valid variables and connectives according to these rules.


Functionally Complete Set of Connectives

Functional Completeness

A set of logical connectives is called a functionally complete set of connectives if every propositional formula can be expressed using only the connectives belonging to that set.

In other words, even if a formula originally contains several different logical operators, it should be possible to rewrite it using only the connectives from the functionally complete set.

Eliminating the Conditional

Recall the logical equivalence

p→q≡¬p∨qp\rightarrow q \equiv \neg p\lor q

Therefore, the conditional connective →\rightarrow is not strictly necessary because it can be expressed using only negation and disjunction.

Eliminating the Biconditional

The biconditional can be expressed in different ways.

One useful identity is

p↔q≡(p∧q)∨(¬p∧¬q)p\leftrightarrow q \equiv (p\land q)\lor(\neg p\land\neg q)

Another equivalent form is

p↔q≡(p→q)∧(q→p)p\leftrightarrow q \equiv (p\rightarrow q)\land(q\rightarrow p)

Since every implication can itself be replaced by negation and disjunction, the biconditional can also be eliminated.

Therefore, both

→\rightarrow

and

↔\leftrightarrow

can be expressed using combinations of

¬,∧,∨.\neg,\land,\lor.

Hence,

{¬,∧,∨}\{\neg,\land,\lor\}

is a functionally complete set.

Reducing the Number of Required Connectives

Using De Morgan's Laws, conjunction can be expressed using only negation and disjunction:

p∧q≡¬(¬p∨¬q)p\land q \equiv \neg(\neg p\lor\neg q)

Similarly, disjunction can be expressed using only negation and conjunction:

p∨q≡¬(¬p∧¬q)p\lor q \equiv \neg(\neg p\land\neg q)

Therefore, conjunction is unnecessary if ¬\neg and ∨\lor are available.

Likewise, disjunction is unnecessary if ¬\neg and ∧\land are available.

This means that the following sets are functionally complete:

{¬,∨}\boxed{\{\neg,\lor\}}

and

{¬,∧}\boxed{\{\neg,\land\}}

Every propositional formula can be rewritten using only one of these two sets.

These are examples of minimal functionally complete sets, because removing one of the connectives from either set would destroy its ability to represent every propositional formula.


Normal Forms

Why Do We Need Normal Forms?

One way to determine whether two logical expressions PP and QQ are equivalent is to construct their truth tables and compare the final columns.

However, when the number of variables increases, truth tables become increasingly large.

For example, a formula containing nn propositional variables requires

2n2^n

rows in its truth table.

Instead of always comparing large truth tables, logical expressions can be converted into standard structures called normal forms.

A normal form provides a systematic representation of a logical expression.

Two important normal forms are:

  1. Disjunctive Normal Form (DNF)
  2. Conjunctive Normal Form (CNF)

Before studying them, it is useful to understand elementary products and elementary sums.


Disjunctive Normal Form

Elementary Product

An elementary product is a conjunction of propositional variables or their negations.

Examples include

p∧qp\land q p∧¬qp\land\neg q ¬p∧q\neg p\land q

and

¬p∧¬q.\neg p\land\neg q.

Each variable or negated variable appearing in such an expression is called a literal.

For example, in

p∧¬q∧r,p\land\neg q\land r,

the literals are

p,¬q,r.p,\quad\neg q,\quad r.

Elementary Sum

An elementary sum is a disjunction of propositional variables or their negations.

Examples include

p∨qp\lor q p∨¬qp\lor\neg q ¬p∨q\neg p\lor q

and

¬p∨¬q.\neg p\lor\neg q.

Important Properties

An elementary product is always false if it contains a variable together with its negation.

For example,

p∧¬p∧qp\land\neg p\land q

is always false because

p∧¬pp\land\neg p

is a contradiction.

Thus,

p∧¬p≡F\boxed{p\land\neg p\equiv F}

Similarly, an elementary sum is always true if it contains a variable together with its negation.

For example,

p∨¬p∨qp\lor\neg p\lor q

is always true because

p∨¬pp\lor\neg p

is a tautology.

Thus,

p∨¬p≡T\boxed{p\lor\neg p\equiv T}

What Is Disjunctive Normal Form?

A logical expression is said to be in Disjunctive Normal Form (DNF) if it is a disjunction of elementary products.

In simple terms:

DNF has an OR of AND terms.

For example,

(p∧q)∨(¬p∧r)(p\land q)\lor(\neg p\land r)

is in DNF.

Another example is

p∨(q∧r).p\lor(q\land r).

Here, the single literal pp itself can be treated as an elementary product.

Therefore, this expression is also in DNF.

However,

p∧(q∨r)p\land(q\lor r)

is not in DNF because the outermost operation is conjunction and one of its components is a disjunction.

Procedure for Obtaining DNF

A logical expression can be converted into Disjunctive Normal Form by following these steps.

Step 1: Eliminate Conditional and Biconditional Connectives

Replace every implication using

p→q≡¬p∨q.p\rightarrow q \equiv \neg p\lor q.

Replace every biconditional using, for example,

p↔q≡(p∧q)∨(¬p∧¬q).p\leftrightarrow q \equiv (p\land q)\lor(\neg p\land\neg q).

After this step, the expression should contain only

¬,∧,∨.\neg,\land,\lor.

Step 2: Push Negations Inward

Use De Morgan's Laws:

¬(p∧q)≡¬p∨¬q\neg(p\land q) \equiv \neg p\lor\neg q

and

¬(p∨q)≡¬p∧¬q.\neg(p\lor q) \equiv \neg p\land\neg q.

Also use double negation:

¬¬p≡p.\neg\neg p\equiv p.

Continue until negation applies directly to individual variables.

Step 3: Apply the Distributive Law

Use

p∧(q∨r)≡(p∧q)∨(p∧r)p\land(q\lor r) \equiv (p\land q)\lor(p\land r)

until the expression becomes a disjunction of elementary products.

Example: Convert an Expression to DNF

Consider

p∧(p→q).p\land(p\rightarrow q).

First eliminate the implication:

p∧(p→q)p\land(p\rightarrow q) ≡p∧(¬p∨q)\equiv p\land(\neg p\lor q)

Now apply the distributive law:

≡(p∧¬p)∨(p∧q).\equiv (p\land\neg p)\lor(p\land q).

Since

p∧¬p≡F,p\land\neg p\equiv F,

we obtain

≡F∨(p∧q).\equiv F\lor(p\land q).

Therefore,

p∧(p→q)≡p∧q\boxed{p\land(p\rightarrow q)\equiv p\land q}

which is in Disjunctive Normal Form.

Another DNF Example

Consider

p∨(¬p→(q∨(q→¬r))).p\lor\left(\neg p\rightarrow\left(q\lor(q\rightarrow\neg r)\right)\right).

First eliminate the innermost implication:

q→¬r≡¬q∨¬r.q\rightarrow\neg r \equiv \neg q\lor\neg r.

Thus,

p∨(¬p→(q∨(¬q∨¬r))).p\lor\left(\neg p\rightarrow \left(q\lor(\neg q\lor\neg r)\right)\right).

Now eliminate the remaining implication.

Since

¬p→X≡¬(¬p)∨X≡p∨X,\neg p\rightarrow X \equiv \neg(\neg p)\lor X \equiv p\lor X,

we get

p∨(p∨(q∨¬q∨¬r)).p\lor \left( p\lor \left(q\lor\neg q\lor\neg r\right) \right).

Therefore,

≡p∨q∨¬q∨¬r.\equiv p\lor q\lor\neg q\lor\neg r.

But

q∨¬q≡T.q\lor\neg q\equiv T.

Hence,

p∨q∨¬q∨¬r≡T.p\lor q\lor\neg q\lor\neg r \equiv T.

So the original expression is a tautology.

It is also already expressible as a disjunction of literals during the simplification process, which is compatible with DNF.


Conjunctive Normal Form

What Is Conjunctive Normal Form?

A logical expression is said to be in Conjunctive Normal Form (CNF) if it is a conjunction of elementary sums.

In simple terms:

CNF has an AND of OR terms.

For example,

(p∨q)∧(¬p∨r)(p\lor q)\land(\neg p\lor r)

is in CNF.

Each parenthesized expression is an elementary sum, and these elementary sums are connected by conjunction.

Another example is

p∧(q∨¬r).p\land(q\lor\neg r).

The literal pp can itself be treated as an elementary sum containing one literal.

Therefore, this expression is also in CNF.

However,

p∨(q∧r)p\lor(q\land r)

is not in CNF.

Procedure for Obtaining CNF

The procedure for obtaining CNF is similar to that used for DNF.

Step 1: Eliminate Conditional and Biconditional Connectives

Replace implications and biconditionals so that only

¬,∧,∨\neg,\land,\lor

remain.

For example,

p→q≡¬p∨q.p\rightarrow q \equiv \neg p\lor q.

Step 2: Push Negations Inward

Use De Morgan's Laws and double negation until every negation applies directly to a variable.

Step 3: Apply the Appropriate Distributive Law

For CNF, distribute OR over AND:

p∨(q∧r)≡(p∨q)∧(p∨r).p\lor(q\land r) \equiv (p\lor q)\land(p\lor r).

Continue until the expression becomes a conjunction of elementary sums.

Example: Obtain CNF

Consider

p∧(p→q).p\land(p\rightarrow q).

First eliminate the implication:

p∧(p→q)p\land(p\rightarrow q) ≡p∧(¬p∨q).\equiv p\land(\neg p\lor q).

The expression now consists of a conjunction of:

pp

and

¬p∨q.\neg p\lor q.

Therefore, it is already in Conjunctive Normal Form:

p∧(¬p∨q)\boxed{p\land(\neg p\lor q)}

Another CNF Example

Consider

p∨(q∧r).p\lor(q\land r).

This is not initially in CNF because a conjunction occurs inside a disjunction.

Apply the distributive law:

p∨(q∧r)p\lor(q\land r) ≡(p∨q)∧(p∨r).\equiv (p\lor q)\land(p\lor r).

Now both

p∨qp\lor q

and

p∨rp\lor r

are elementary sums.

Therefore,

(p∨q)∧(p∨r)\boxed{(p\lor q)\land(p\lor r)}

is the Conjunctive Normal Form of the expression.

What did you think?

CNFContingencyContradictionDNFFunctional CompletenessNormal FormsPropositional LogicTautologyWell-Formed Formula

Continue the conversation

Share a question, an insight, or a different perspective.

Discussion loads when you reach this section.

Follow the idea

Keep reading