Peter Smith writes in his Type of Proof System
"I take it that neither of those proofs is wonderfully obvious or natural. For another example, consider (P -> (Q -> R)) $\vdash$$_M$ (Q -> (P -> R)). Again, that's an intuitively ob-vious validity, and can be checked by a quick tree proof (do it!). But the shortest known m-proof has twenty-one lines..."
The M-system has axiom schema:
Ax1. (A -> (B -> A))
Ax2. ((A -> (B -> C)) -> ((A -> B) -> (A -> C)))
Ax3. (($\lnot$ B -> $\lnot$A) -> (A -> B))
The only rule of inference is formal modus ponens; from A and (A -> C) infer C.
Can (P -> (Q -> R)) $\vdash$$_M$ (Q -> (P -> R)) get proven in less than twenty-one lines?
Suppose we rewrite the definition of well-formed formula of M in Polish notation. Then, it follows that the correlates of the above axiom schema can get written as the following:
Formal modus ponens in Smith's system L corresponds to C-detachment; from Cac and a, we may infer c.
The question then corresponds to asking:
"Given CpCqr as a premiss in the above system in Polish notation, can we derive CqCpr in less than twenty-one lines?"
Consider the following:
Consequently, given CpCqr as a premiss, CqCpr can get derived in nine steps. Nine is less than twenty-one. Therefore, (P -> (Q -> R)) ⊢$_M$ (Q -> (P -> R) can get proven in less than twenty-one steps.
Existence of such a proof: