[Tex/LaTex] How to typeset a proof via structural induction

amsthmbest practicesenvironments

Structural induction differs from "mathmatical" induction in the number of cases: While mathmatical induction requires exactly two cases, structural induction may require many more.

A proof via structural induction thus requires:

  1. An environment for Cases (preferably labeled and numbered, preferably without further indentation)
  2. A sub-proof environment that contains the proof for the specific case (preferably with a distinctive q.e.d. sign)

Is there any support inside a \begin{proof}\end{\proof} environment that covers this?

Best Answer

Is this what you are looking for? If the way Cases work here does not please you, you should clarify the question because it's not clear what do you want exactly.

enter image description here

\documentclass{scrartcl}
\usepackage{mathtools,amssymb,amsthm,enumitem}

\SetEnumitemKey{ncases}{itemindent=!,before=\let\makelabel\ncasesmakelabel}
\newcommand*\ncasesmakelabel[1]{Case #1}

\newenvironment{subproof}
  {\def\proofname{Subproof}%
   \def\qedsymbol{$\triangleleft$}%
   \proof}
  {\endproof}

\begin{document}
\begin{proof}
  Some text or \texttt{\string\leavevmode} (so the enumerate starts in another line)
  \begin{enumerate}[ncases]
    \item Foo.
    \begin{subproof}
     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    \end{subproof}
    \item Bar.
    \begin{subproof}
     Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    \end{subproof}
  \end{enumerate}
  And more text.
\end{proof}

\end{document}