Principle of Commutation

Theorem

 * $$p \implies \left({q \implies r}\right) \vdash q \implies \left({p \implies r}\right)$$

This can alternatively be rendered as:


 * $$\vdash \left({p \implies \left({q \implies r}\right)}\right) \implies \left({q \implies \left({p \implies r}\right)}\right)$$

or, as an obvious corollary:


 * $$\vdash \left({p \implies \left({q \implies r}\right)}\right) \iff \left({q \implies \left({p \implies r}\right)}\right)$$

The two forms can be seen to be logically equivalent by application of the Rule of Implication and Modus Ponendo Ponens.

Proof by Natural Deduction
By the tableau method:


 * $$p \implies \left({q \implies r}\right) \vdash q \implies \left({p \implies r}\right)$$:

Proof by Truth Table
We apply the Method of Truth Tables to the propositions in turn.

As can be seen for all models by inspection, where the truth values under the main connectives on the LHS is $$T$$, that under the one on the RHS is also $$T$$:

$$\begin{array}{|ccccc||ccccc|} \hline p & \implies & (q & \implies & r) & q & \implies & (p & \implies & r) \\ \hline F & T & F & T & F & F & T & F & T & F \\ F & T & F & T & T & F & T & F & T & T \\ F & T & T & F & F & T & T & F & T & F \\ F & T & T & T & T & T & T & F & T & T \\ T & T & F & T & F & F & T & T & F & F \\ T & T & F & T & T & F & T & T & T & T \\ T & F & T & F & F & T & F & T & F & F \\ T & T & T & T & T & T & T & T & T & T \\ \hline \end{array}$$

Hence the result.

Also see

 * Rule of Commutation