[step:Translate derivations into typed terms and identify detours with beta-redexes]Let $\mathcal{F}$ denote the set of formulas of propositional intuitionistic logic generated from propositional variables and $\bot$ by $\to$, $\wedge$, and $\vee$. Let $\mathcal{T}$ denote the set of simple types generated from atomic types and the empty type by the type constructors $\to$, $\times$, and $+$. Define the type assignment map $T: \mathcal{F} \to \mathcal{T}$ recursively by sending propositional variables to atomic types, $\bot$ to the empty type, $B \to C$ to the function type $T(B) \to T(C)$, $B \wedge C$ to the product type $T(B) \times T(C)$, and $B \vee C$ to the sum type $T(B) + T(C)$.
For a finite natural-deduction derivation $\Pi$ of conclusion $A$ from open assumptions $\Gamma$, let $T(\Gamma)$ denote the finite typed context obtained by assigning each open assumption occurrence of formula $B$ a variable of type $T(B)$. Define its term translation $\tau(\Pi)$ to be a term of type $T(A)$ in the context $T(\Gamma)$:
\begin{align*}
\tau(\Pi) &\in \mathsf{Term}(\Gamma,A).
\end{align*}
The translation is defined by the Curry-Howard recursion on the last rule of $\Pi$: assumptions translate to variables, $\to I$ to lambda abstraction, $\to E$ to application, $\wedge I$ to pairing, $\wedge E$ to projection, $\vee I_1$ and $\vee I_2$ to the two injections, $\vee E$ to case analysis, and $\bot E$ to the eliminator from the empty type.
Under this translation, a detour in $\Pi$ is exactly a beta-redex in $\tau(\Pi)$. In the following schematic reductions, $x$ and $y$ denote term variables, while $s$, $t$, $u$, and $v$ denote well-typed terms of the indicated types in the ambient typing contexts. The three principal correspondences are
\begin{align*}
(\lambda x:T(B).\,s)\,t &\longrightarrow_\beta s[t/x],\\
\pi_1(\langle s,t\rangle) &\longrightarrow_\beta s,\\
\pi_2(\langle s,t\rangle) &\longrightarrow_\beta t,
\end{align*}
and
\begin{align*}
\operatorname{case}(\operatorname{inl}(s);x.u;y.v) &\longrightarrow_\beta u[s/x],\\
\operatorname{case}(\operatorname{inr}(t);x.u;y.v) &\longrightarrow_\beta v[t/y].
\end{align*}
Thus reducing a natural-deduction detour is the derivation-level image of one beta reduction of the translated term.[/step]