@@ -1,5 +1,7 @@
1\section{Provisional Definitions}
1\section{Provisional Definitions}
3+\label{sect:provisional}
3Sometimes when programming with dependent types, the type required by the type
5Sometimes when programming with dependent types, the type required by the type
4checker and the type of the program we have written will be different (in that
6checker and the type of the program we have written will be different (in that
5they do not have the same normal form), but nevertheless provably equal. For
7they do not have the same normal form), but nevertheless provably equal. For
@@ -195,6 +197,19 @@ We can complete this proof using the \texttt{trivial} tactic, which finds
195\texttt{value} in the premisses. The proof of the second lemma proceeds in
197\texttt{value} in the premisses. The proof of the second lemma proceeds in
196exactly the same way.
198exactly the same way.
200+We can now test the \texttt{natToBin} function from Section
201+\ref{sect:nattobin} at the prompt. 42 is 101010 in
202+binary. The binary digits are reversed:
204+\begin{SaveVerbatim}{ntbtest}
206+*views> show (natToBin 42)
207+"[False, True, False, True, False, True]" : String
198\subsection{Suspension of Disbelief}
213\subsection{Suspension of Disbelief}
200\Idris{} requires that proofs be complete before compiling programs (although
215\Idris{} requires that proofs be complete before compiling programs (although