All articles
Discrete MathematicsOpen to everyone

Converse, Contrapositive, Inverse, Negation & Derived Connectives

Learn converse, inverse, contrapositive, negation of compound statements, and derived connectives like NAND, NOR, and XOR

Gulshan Kumar

· 15 min read

Conditional statements are an important part of propositional logic. From a conditional statement, we can construct several related statements such as its converse, inverse, and contrapositive.

We will also study how compound propositions are negated and introduce three useful derived logical connectives: NAND, NOR, and XOR.


1. Converse, Contrapositive and Inverse

Consider the conditional proposition

p→qp \rightarrow q

which is read as:

If pp, then qq.

From this conditional proposition, three related propositions can be formed.

Converse

The converse of

p→qp \rightarrow q

is obtained by interchanging pp and qq:

q→pq \rightarrow p

Therefore,

Converse of p→q=q→p\boxed{\text{Converse of } p\rightarrow q = q\rightarrow p}

Contrapositive

The contrapositive is obtained by interchanging pp and qq and negating both:

¬q→¬p\neg q \rightarrow \neg p

Therefore,

Contrapositive of p→q=¬q→¬p\boxed{\text{Contrapositive of } p\rightarrow q = \neg q\rightarrow\neg p}

Inverse

The inverse is obtained by negating both pp and qq without changing their order:

¬p→¬q\neg p \rightarrow \neg q

Therefore,

Inverse of p→q=¬p→¬q\boxed{\text{Inverse of } p\rightarrow q = \neg p\rightarrow\neg q}

2. Truth Table for Conditional and Its Related Statements

The relationship among the conditional, converse, inverse, and contrapositive can be seen clearly using a truth table.

ppqqConditional p→qp\rightarrow qConverse q→pq\rightarrow pInverse ¬p→¬q\neg p\rightarrow\neg qContrapositive ¬q→¬p\neg q\rightarrow\neg p
TTTTTT
TFFTTF
FTTFFT
FFTTTT

Two important relationships follow immediately from the table:

p→q≡¬q→¬p\boxed{p\rightarrow q\equiv\neg q\rightarrow\neg p}

Thus, a conditional proposition is logically equivalent to its contrapositive.

Similarly,

q→p≡¬p→¬q\boxed{q\rightarrow p\equiv\neg p\rightarrow\neg q}

Thus, the converse and inverse are also logically equivalent to each other.

However, in general,

p→q≢q→pp\rightarrow q\not\equiv q\rightarrow p

and

p→q≢¬p→¬qp\rightarrow q\not\equiv\neg p\rightarrow\neg q

So a conditional statement is generally not equivalent to its converse or inverse.


3. Example of Converse, Contrapositive and Inverse

Consider:

  • pp: It rains.
  • qq: The crops will grow.

The original conditional proposition is

p→qp\rightarrow q

If it rains, then the crops will grow.

Converse

q→pq\rightarrow p

If the crops grow, then it has rained.

Contrapositive

¬q→¬p\neg q\rightarrow\neg p

If the crops do not grow, then it has not rained.

Inverse

¬p→¬q\neg p\rightarrow\neg q

If it does not rain, then the crops will not grow.

The original conditional and its contrapositive always have the same truth value, whereas its converse and inverse need not have the same truth value as the original conditional.


4. Logical Equivalence of a Conditional and Its Contrapositive

We want to show that

p→q≡¬q→¬pp\rightarrow q\equiv\neg q\rightarrow\neg p

Consider the truth table:

ppqq¬p\neg p¬q\neg q¬q→¬p\neg q\rightarrow\neg pp→qp\rightarrow q
TTFFTT
TFFTFF
FTTFTT
FFTTTT

The last two columns are identical for every possible combination of truth values.

Hence,

p→q≡¬q→¬p\boxed{p\rightarrow q\equiv\neg q\rightarrow\neg p}

Therefore, the contrapositive and the original conditional proposition are logically equivalent.


Negation of Compound Statements

Negation reverses the truth value of a proposition. When a proposition contains logical connectives such as AND, OR, implication, or biconditional, its negation must be formed according to the corresponding logical laws.


5. Negation of a Conjunction

A conjunction has the form

p∧qp\land q

Its negation is

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

In words:

The negation of “pp and qq” is “not pp or not qq.”

This is one of De Morgan's Laws.

Truth Table

ppqqp∧qp\land q¬(p∧q)\neg(p\land q)¬p\neg p¬q\neg q¬p∨¬q\neg p\lor\neg q
TTTFFFF
TFFTFTT
FTFTTFT
FFFTTTT

Since the columns for ¬(p∧q)\neg(p\land q) and ¬p∨¬q\neg p\lor\neg q are identical,

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

Example 1

Consider:

Paris is in France and London is in England.

Let

  • pp: Paris is in France.
  • qq: London is in England.

The statement is

p∧qp\land q

Its negation is

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

Therefore:

Paris is not in France or London is not in England.

Example 2

Consider:

2+4=6and7<122+4=6 \quad\text{and}\quad 7<12

Its negation is

2+4≠6or7≥122+4\ne6 \quad\text{or}\quad 7\ge12

6. Negation of a Disjunction

A disjunction has the form

p∨qp\lor q

Its negation is

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

In words:

The negation of “pp or qq” is “not pp and not qq.”

This is the second De Morgan's Law.

Truth Table

ppqq¬p\neg p¬q\neg q¬p∧¬q\neg p\land\neg qp∨qp\lor q¬(p∨q)\neg(p\lor q)
TTFFFTF
TFFTFTF
FTTFFTF
FFTTTFT

The columns for ¬(p∨q)\neg(p\lor q) and ¬p∧¬q\neg p\land\neg q are identical.

Hence,

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

Example 1

Consider:

Ram is in Class XI or Arun is in Class XII.

Let

  • pp: Ram is in Class XI.
  • qq: Arun is in Class XII.

The statement is

p∨qp\lor q

Its negation is

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

Therefore:

Ram is not in Class XI and Arun is not in Class XII.

Example 2

Consider:

9 is greater than 4 or 6 is less than 8.

Its negation is:

9 is not greater than 4 and 6 is not less than 8.

Equivalently,

9≤4and6≥89\le4\quad\text{and}\quad6\ge8

7. Negation of a Negation

Negating a proposition twice gives the original proposition.

¬(¬p)≡p\boxed{\neg(\neg p)\equiv p}

This is known as the Double Negation Law.

Example

Let

pp: Roses are red.

Then

¬p\neg p: Roses are not red.

Negating it again gives

¬(¬p)\neg(\neg p): It is not the case that roses are not red.

which is equivalent to

Roses are red.

Therefore,

¬(¬p)≡p\neg(\neg p)\equiv p

8. Negation of a Conditional

Consider the conditional proposition

p→qp\rightarrow q

Its negation is

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

This result has an intuitive meaning. A statement of the form

If pp, then qq

is false only when pp actually occurs but qq does not.

Therefore, its negation is

pp occurs and qq does not occur.

Truth Table

ppqqp→qp\rightarrow q¬(p→q)\neg(p\rightarrow q)¬q\neg qp∧¬qp\land\neg q
TTTFFF
TFFTTT
FTTFFF
FFTFTF

The last two relevant columns are identical. Hence,

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

Example 1

Consider:

If it is raining, then the game is cancelled.

Let

  • pp: It is raining.
  • qq: The game is cancelled.

The statement is

p→qp\rightarrow q

Its negation is

p∧¬qp\land\neg q

Therefore:

It is raining and the game is not cancelled.

Example 2

Consider:

If he studies, he will pass the examination.

Let

  • pp: He studies.
  • qq: He will pass the examination.

The negation is

p∧¬qp\land\neg q

Therefore:

He studies and he will not pass the examination.


9. Negation of a Biconditional

A biconditional has the form

p↔qp\leftrightarrow q

and is true when pp and qq have the same truth value.

Therefore, its negation must be true when pp and qq have different truth values.

The negation can be expressed as

¬(p↔q)≡p↔¬q\boxed{\neg(p\leftrightarrow q)\equiv p\leftrightarrow\neg q}

or equivalently,

¬(p↔q)≡¬p↔q\boxed{\neg(p\leftrightarrow q)\equiv\neg p\leftrightarrow q}

Thus,

¬(p↔q)≡p↔¬q≡¬p↔q\boxed{\neg(p\leftrightarrow q) \equiv p\leftrightarrow\neg q \equiv\neg p\leftrightarrow q}

Truth Table

ppqqp↔qp\leftrightarrow q¬(p↔q)\neg(p\leftrightarrow q)¬p\neg p¬p↔q\neg p\leftrightarrow q¬q\neg qp↔¬qp\leftrightarrow\neg q
TTTFFFFF
TFFTFTTT
FTFTTTFT
FFTFTFTF

The corresponding columns are identical, establishing the equivalence.

The same negation can also be written as

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

This form makes the meaning particularly clear: the negation is true when exactly one of pp and qq is true.

Example 1

Consider:

He swims if and only if the water is warm.

Let

  • pp: He swims.
  • qq: The water is warm.

The statement is

p↔qp\leftrightarrow q

Its negation can be represented as

p↔¬qp\leftrightarrow\neg q

giving:

He swims if and only if the water is not warm.

Equivalently, using

¬p↔q,\neg p\leftrightarrow q,

we may write:

He does not swim if and only if the water is warm.

Example 2

Let

  • pp: This computer program is correct.
  • qq: It produces the correct answer for all possible sets of input data.

The original statement is

This computer program is correct if and only if it produces the correct answer for all possible sets of input data.

Symbolically,

p↔qp\leftrightarrow q

Its negation may be expressed as

p↔¬qp\leftrightarrow\neg q

or

¬p↔q.\neg p\leftrightarrow q.

Thus, equivalent ways of expressing the negation are:

This computer program is correct if and only if it does not produce the correct answer for all possible sets of input data.

or

This computer program is not correct if and only if it produces the correct answer for all possible sets of input data.


Derived Connectives

Some logical operations can be constructed from the basic logical connectives. Three important derived connectives are NAND, NOR, and XOR.


10. NAND

NAND means NOT AND, or the negation of conjunction.

For propositions pp and qq,

p↑q≡¬(p∧q)\boxed{p\uparrow q\equiv\neg(p\land q)}

The NAND operation is false only when both pp and qq are true. In every other case, it is true.

Truth Table

ppqqp↑qp\uparrow q
TTF
TFT
FTT
FFT

Therefore,

p↑q=¬(p∧q)p\uparrow q=\neg(p\land q)

11. NOR

NOR means NOT OR, or the negation of disjunction.

For propositions pp and qq,

p↓q≡¬(p∨q)\boxed{p\downarrow q\equiv\neg(p\lor q)}

NOR is true only when both pp and qq are false.

Truth Table

ppqqp↓qp\downarrow q
TTF
TFF
FTF
FFT

Using only NOR, other logical operations can also be represented.

Negation using NOR

¬p≡p↓p\boxed{\neg p\equiv p\downarrow p}

because

p↓p=¬(p∨p)=¬pp\downarrow p =\neg(p\lor p) =\neg p

Conjunction using NOR

p∧q≡(p↓p)↓(q↓q)\boxed{p\land q\equiv(p\downarrow p)\downarrow(q\downarrow q)}

Since

p↓p=¬pp\downarrow p=\neg p

and

q↓q=¬q,q\downarrow q=\neg q,

we get

(¬p)↓(¬q)=¬(¬p∨¬q)=p∧q.(\neg p)\downarrow(\neg q) =\neg(\neg p\lor\neg q) =p\land q.

Disjunction using NOR

p∨q≡(p↓q)↓(p↓q)\boxed{p\lor q\equiv(p\downarrow q)\downarrow(p\downarrow q)}

Here,

p↓q=¬(p∨q).p\downarrow q=\neg(p\lor q).

Applying NOR to this result with itself negates it again:

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

12. XOR — Exclusive OR

The exclusive OR, abbreviated as XOR, of two propositions pp and qq is denoted by

p⊕q.p\oplus q.

It is true when exactly one of pp and qq is true and false when both have the same truth value.

Truth Table

ppqqp⊕qp\oplus q
TTF
TFT
FTT
FFF

Thus, XOR differs from ordinary OR because ordinary OR is true when both propositions are true, whereas XOR is not.


13. Properties of XOR

Commutative Property

The order of the propositions does not affect the result:

p⊕q≡q⊕p\boxed{p\oplus q\equiv q\oplus p}

Associative Property

For three propositions,

(p⊕q)⊕r≡p⊕(q⊕r)\boxed{(p\oplus q)\oplus r \equiv p\oplus(q\oplus r)}

Therefore, XOR operations can be regrouped without changing the result.

Distributive Property with Conjunction

Conjunction distributes over XOR:

p∧(q⊕r)≡(p∧q)⊕(p∧r)\boxed{p\land(q\oplus r) \equiv (p\land q)\oplus(p\land r)}

Summary

Starting with a conditional proposition p→qp\rightarrow q, we can construct its converse, inverse, and contrapositive:

FormExpression
Conditionalp→qp\rightarrow q
Converseq→pq\rightarrow p
Inverse¬p→¬q\neg p\rightarrow\neg q
Contrapositive¬q→¬p\neg q\rightarrow\neg p

The most important equivalence is

p→q≡¬q→¬p\boxed{p\rightarrow q\equiv\neg q\rightarrow\neg p}

For negation of compound propositions:

PropositionEquivalent Negation
p∧qp\land q¬p∨¬q\neg p\lor\neg q
p∨qp\lor q¬p∧¬q\neg p\land\neg q
¬p\neg p¬(¬p)≡p\neg(\neg p)\equiv p
p→qp\rightarrow qp∧¬qp\land\neg q
p↔qp\leftrightarrow q(p∧¬q)∨(¬p∧q)(p\land\neg q)\lor(\neg p\land q)

Finally, the derived connectives are:

ConnectiveSymbolMeaning
NANDp↑qp\uparrow q¬(p∧q)\neg(p\land q)
NORp↓qp\downarrow q¬(p∨q)\neg(p\lor q)
XORp⊕qp\oplus qTrue when exactly one of p,qp,q is true

These relationships provide the foundation for manipulating logical expressions and understanding more advanced concepts in propositional logic.

What did you think?

Conditional StatementsContrapositiveConverseInverseLogical NegationNANDNORPropositional LogicXOR

Continue the conversation

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

Discussion loads when you reach this section.

Follow the idea

Keep reading