@@ -163,8 +163,8 @@ plusReducesZ' (S k) = let ih = plusReducesZ' k in
163163\useverb{prOstruct}
164164
165165\noindent
166−On running \Idris{}, two global names are created, \texttt{plusredO\_O} and
167−\texttt{plusredO\_S}, with no definition. We can use the \texttt{:m} command
166+On running \Idris{}, two global names are created, \texttt{plusredZ\_O} and
167+\texttt{plusredZ\_S}, with no definition. We can use the \texttt{:m} command
168168at the prompt to find out which metavariables are still to be solved (or, more
169169precisely, which functions exist but have no definitions), then the
170170\texttt{:t} command to see their types:
@@ -183,7 +183,7 @@ Global metavariables:
183183plusredZ_Z : Z = plus Z Z
184184
185185*theorems> :t plusredZ_S
186−plusredZ_S : (k : Nat) -> (k = plus k Z) -> S k = S (plus k Z)
186+plusredZ_S : (k : Nat) -> (k = plus k Z) -> S k = plus (S k) Z
187187
188188\end{SaveVerbatim}
189189\useverb{showmetas}
@@ -265,17 +265,17 @@ Global metavariables:
265265\noindent
266266The \texttt{:addproof} command, at the interactive prompt, will add the proof to
267267the source file (effectively in an appendix).
268−Let us now prove the other required lemma, \texttt{plusredO\_S}:
268+Let us now prove the other required lemma, \texttt{plusredZ\_S}:
269269
270−\begin{SaveVerbatim}{plusredOSprf}
270+\begin{SaveVerbatim}{plusredZSprf}
271271
272272*theorems> :p plusredZ_S
273273
274274---------------------------------- (plusredZ_S) --------
275−{hole0} : (k : Nat) -> (k = plus k Z) -> S k = S (plus k Z)
275+{hole0} : (k : Nat) -> (k = plus k Z) -> S k = plus (S k) Z
276276
277277\end{SaveVerbatim}
278−\useverb{plusredOSprf}
278+\useverb{plusredZSprf}
279279
280280\noindent
281281In this case, the goal is a function type, using \texttt{k} (the argument accessible by
@@ -288,11 +288,25 @@ twice (or \texttt{intros}, which introduces all arguments as premisses). This gi
288288 k : Nat
289289 ih : k = plus k Z
290290---------------------------------- (plusredZ_S) --------
291−{hole2} : S k = S (plus k Z)
291+{hole2} : S k = plus (S k) Z
292292
293293\end{SaveVerbatim}
294294\useverb{prSintros}
295295
296+\noindent
297+Since plus is defined is defined by recursion on its first argument, the term
298+\texttt{plus (S k) Z} in the goal can be simplified, so we use
299+\texttt{compute}.
300+
301+\begin{SaveVerbatim}{prScompute}
302+ k : Nat
303+ ih : k = plus k Z
304+---------------------------------- (plusredZ_S) --------
305+{hole2} : S k = S (plus k Z)
306+
307+\end{SaveVerbatim}
308+\useverb{prScompute}
309+
296310\noindent
297311We know, from the type of \texttt{ih}, that \texttt{k = plus k Z}, so we would like to
298312use this knowledge to replace \texttt{plus k Z} in the goal with \texttt{k}. We can