\begin{logicproof}{2}
    q \lor \lnot q & $\LEM$ \\
    \begin{subproof}
        q & \assum\\
        \begin{subproof}
            p & \assum\\
            q & $\copying 2$
        \end{subproof}
        p \imp q & $\impi 3-4$ \\
        (p \to q) \lor (q \to r) & $\ori{1} 5$
    \end{subproof}
    \begin{subproof}
        \lnot q & \assum\\
        \begin{subproof}
            q & \assum\\
            \bot & $\nege 7,8$ \\
            r & $\bote 9$
        \end{subproof}
        q \imp r & $\impi 8-10$ \\
        (p \imp q) \lor (q \imp r) & $\ori{2} 11$
    \end{subproof}
    (p \to q) \lor (q \to r) & $\ore 1, 2-6,7-12$
\end{logicproof}
