# HG changeset patch # User Christian Urban <urbanc@in.tum.de> # Date 1279550653 -3600 # Node ID b83c75d051b72e941f9aa5f8234a7d868f5c56f0 # Parent d9a223c023f64a6116cd40ce00be873a21a58171 updated for new isabelle diff -r d9a223c023f6 -r b83c75d051b7 ProgTutorial/Essential.thy --- a/ProgTutorial/Essential.thy Tue Jun 08 15:18:30 2010 +0200 +++ b/ProgTutorial/Essential.thy Mon Jul 19 15:44:13 2010 +0100 @@ -244,7 +244,7 @@ @{ML_response [display,gray] "@{typ \"bool \<Rightarrow> nat\"}" - "Type (\"fun\", [Type (\"bool\", []), Type (\"nat\", [])])"} + "Type (\"fun\", [Type (\"bool\", []), Type (\"Nat.nat\", [])])"} We can restore the usual behaviour of Isabelle's pretty printer with the code @@ -303,7 +303,7 @@ @{ML_response [display,gray] "make_imp @{term S} @{term T}" "Const \<dots> $ - Abs (\"x\", Type (\"nat\",[]), + Abs (\"x\", Type (\"Nat.nat\",[]), Const \<dots> $ (Free (\"S\",\<dots>) $ \<dots>) $ (Free (\"T\",\<dots>) $ \<dots>))"} whereas with @{ML make_wrong_imp} you obtain a term involving the @{term "P"} @@ -341,7 +341,7 @@ in lambda x_nat trm end" - "Abs (\"x\", \"nat\", Free (\"P\", \"bool \<Rightarrow> bool\") $ Bound 0)"} + "Abs (\"x\", \"Nat.nat\", Free (\"P\", \"bool \<Rightarrow> bool\") $ Bound 0)"} In this example, @{ML lambda} produces a de Bruijn index (i.e.~@{ML "Bound 0"}), and an abstraction, where it also records the type of the abstracted @@ -446,7 +446,7 @@ in Term.dest_abs (\"x\", @{typ \"nat \<Rightarrow> bool\"}, body) end" - "(\"xa\", Free (\"xa\", \"nat \<Rightarrow> bool\") $ Free (\"x\", \"nat\"))"} + "(\"xa\", Free (\"xa\", \"Nat.nat \<Rightarrow> bool\") $ Free (\"x\", \"Nat.nat\"))"} There are also many convenient functions that construct specific HOL-terms in the structure @{ML_struct HOLogic}. For example @{ML_ind mk_eq in diff -r d9a223c023f6 -r b83c75d051b7 progtutorial.pdf Binary file progtutorial.pdf has changed