added type global_theory -- theory or local_theory;
added begin/exit_local_theory;
removed theory_context;
renamed body_context_node to presentation_context;
removed copy (checkpoint twice instead -- avoids unrelated theories);
theory ToyList
imports PreList
begin
datatype 'a list = Nil                          ("[]")
                 | Cons 'a "'a list"            (infixr "#" 65)
consts app :: "'a list => 'a list => 'a list"   (infixr "@" 65)
       rev :: "'a list => 'a list"
primrec
"[] @ ys       = ys"
"(x # xs) @ ys = x # (xs @ ys)"
primrec
"rev []        = []"
"rev (x # xs)  = (rev xs) @ (x # [])"