theory ToyList imports Main begin text‹\noindent HOL already has a predefined theory of lists called ‹List› --- ‹ToyList› is merely a small fragment of it chosen as an example. To avoid some ambiguities caused by defining lists twice, we manipulate the concrete syntax and name space of theory \<^theory>‹Main› as follows. › no_notation Nil ("[]") and Cons (infixr "#" 65) and append (infixr "@" 65) hide_type list hide_const rev