@@ -109,7 +109,7 @@ The first of these has the following type:
109*views> :p views.parity_lemma_1
109*views> :p views.parity_lemma_1
111---------------------------------- (views.parity_lemma_1) --------
111---------------------------------- (views.parity_lemma_1) --------
112−{hole0} : (j : Nat) -> (Parity (plus (S j) (S j))) -> Parity (S (S (plus j j)))
112+{hole0} : (j : Nat) -> (Parity (plus (S j) (S j))) -> Parity (S (S (j + j)))
114-views.parity_lemma_1>
114-views.parity_lemma_1>
@@ -127,7 +127,7 @@ the prelude:
127\begin{SaveVerbatim}{plusnsm}
127\begin{SaveVerbatim}{plusnsm}
129plusSuccRightSucc : (left : Nat) -> (right : Nat) ->
129plusSuccRightSucc : (left : Nat) -> (right : Nat) ->
130− S (plus left right) = plus left (S right)
130+ S (left + right) = left + (S right)
133\end{SaveVerbatim}
133\end{SaveVerbatim}
@@ -143,11 +143,26 @@ After applying \texttt{intro} twice, we have:
144 value : Parity (S (plus j (S j)))
144 value : Parity (S (plus j (S j)))
145---------------------------------- (views.parity_lemma_1) --------
145---------------------------------- (views.parity_lemma_1) --------
146−{hole2} : Parity (S (S (plus j j)))
146+{hole2} : Parity (S (S (j + j)))
148\end{SaveVerbatim}
148\end{SaveVerbatim}
149\useverb{prolemii}
149\useverb{prolemii}
152+We need to use \texttt{compute} again to unfold the definition of \texttt{(+)}.
154+\begin{SaveVerbatim}{prolemcomp}
156+-views.parity_lemma_1> intro
159+ value : Parity (S (plus j (S j)))
160+---------------------------------- (views.parity_lemma_1) --------
161+{hole2} : Parity (S (S (plus j j)))
152Then we apply the \texttt{plusSuccRightSucc} rewrite rule, symmetrically,
167Then we apply the \texttt{plusSuccRightSucc} rewrite rule, symmetrically,
153to \texttt{j} and \texttt{j}, giving:
168to \texttt{j} and \texttt{j}, giving: