353 case study. |
353 case study. |
354 |
354 |
355 |
355 |
356 \subsection{Lists} |
356 \subsection{Lists} |
357 |
357 |
358 Lists are one of the essential datatypes in computing. Readers of this tutorial |
358 Lists are one of the essential datatypes in computing. Readers of this |
359 and users of HOL need to be familiar with their basic operations. Theory |
359 tutorial and users of HOL need to be familiar with their basic operations. |
360 \texttt{ToyList} is only a small fragment of HOL's predefined theory |
360 Theory \texttt{ToyList} is only a small fragment of HOL's predefined theory |
361 \texttt{List}\footnote{\texttt{http://www.in.tum.de/\~\relax |
361 \texttt{List}\footnote{\texttt{http://isabelle.in.tum.de/library/HOL/List.html}}. |
362 isabelle/library/HOL/List.html}}. |
|
363 The latter contains many further operations. For example, the functions |
362 The latter contains many further operations. For example, the functions |
364 \ttindexbold{hd} (`head') and \ttindexbold{tl} (`tail') return the first |
363 \ttindexbold{hd} (`head') and \ttindexbold{tl} (`tail') return the first |
365 element and the remainder of a list. (However, pattern-matching is usually |
364 element and the remainder of a list. (However, pattern-matching is usually |
366 preferable to \texttt{hd} and \texttt{tl}.) |
365 preferable to \texttt{hd} and \texttt{tl}.) Theory \texttt{List} also |
367 Theory \texttt{List} also contains more syntactic sugar: |
366 contains more syntactic sugar: |
368 \texttt{[}$x@1$\texttt{,}\dots\texttt{,}$x@n$\texttt{]} abbreviates |
367 \texttt{[}$x@1$\texttt{,}\dots\texttt{,}$x@n$\texttt{]} abbreviates |
369 $x@1$\texttt{\#}\dots\texttt{\#}$x@n$\texttt{\#[]}. |
368 $x@1$\texttt{\#}\dots\texttt{\#}$x@n$\texttt{\#[]}. In the rest of the |
370 In the rest of the tutorial we always use HOL's predefined lists. |
369 tutorial we always use HOL's predefined lists. |
371 |
370 |
372 |
371 |
373 \subsection{The general format} |
372 \subsection{The general format} |
374 \label{sec:general-datatype} |
373 \label{sec:general-datatype} |
375 |
374 |