# HG changeset patch # User bulwahn # Date 1242027593 -7200 # Node ID 657386d94f14efd61203cf6fde21071e07aa8830 # Parent 9a1178204dc0b9f7465cf29ae7ae2904f87cf366 fixed code_pred command diff -r 9a1178204dc0 -r 657386d94f14 etc/isar-keywords-ZF.el --- a/etc/isar-keywords-ZF.el Mon May 11 09:18:42 2009 +0200 +++ b/etc/isar-keywords-ZF.el Mon May 11 09:39:53 2009 +0200 @@ -45,15 +45,18 @@ "class_deps" "classes" "classrel" + "codatatype" "code_datatype" "code_library" "code_module" + "coinductive" "commit" "constdefs" "consts" "consts_code" "context" "corollary" + "datatype" "declaration" "declare" "def" @@ -83,6 +86,8 @@ "help" "hence" "hide" + "inductive" + "inductive_cases" "init_toplevel" "instance" "instantiation" @@ -118,6 +123,7 @@ "presume" "pretty_setmargin" "prf" + "primrec" "print_abbrevs" "print_antiquotations" "print_ast_translation" @@ -140,6 +146,7 @@ "print_simpset" "print_statement" "print_syntax" + "print_tcset" "print_theorems" "print_theory" "print_trans_rules" @@ -154,6 +161,7 @@ "realizability" "realizers" "remove_thy" + "rep_datatype" "sect" "section" "setup" @@ -207,9 +215,13 @@ "attach" "begin" "binder" + "case_eqns" + "con_defs" "constrains" "contains" "defines" + "domains" + "elimination" "file" "fixes" "for" @@ -217,17 +229,23 @@ "if" "imports" "in" + "induction" "infix" "infixl" "infixr" + "intros" "is" + "monos" "notes" "obtains" "open" "output" "overloaded" + "recursor_eqns" "shows" "structure" + "type_elims" + "type_intros" "unchecked" "uses" "where")) @@ -295,6 +313,7 @@ "print_simpset" "print_statement" "print_syntax" + "print_tcset" "print_theorems" "print_theory" "print_trans_rules" @@ -338,13 +357,16 @@ "class" "classes" "classrel" + "codatatype" "code_datatype" "code_library" "code_module" + "coinductive" "constdefs" "consts" "consts_code" "context" + "datatype" "declaration" "declare" "defaultsort" @@ -355,6 +377,7 @@ "finalconsts" "global" "hide" + "inductive" "instantiation" "judgment" "lemmas" @@ -371,11 +394,13 @@ "overloading" "parse_ast_translation" "parse_translation" + "primrec" "print_ast_translation" "print_translation" "quickcheck_params" "realizability" "realizers" + "rep_datatype" "setup" "simproc_setup" "syntax" @@ -390,7 +415,7 @@ "use")) (defconst isar-keywords-theory-script - '()) + '("inductive_cases")) (defconst isar-keywords-theory-goal '("corollary" diff -r 9a1178204dc0 -r 657386d94f14 etc/isar-keywords.el --- a/etc/isar-keywords.el Mon May 11 09:18:42 2009 +0200 +++ b/etc/isar-keywords.el Mon May 11 09:39:53 2009 +0200 @@ -1,6 +1,6 @@ ;; ;; Keyword classification tables for Isabelle/Isar. -;; Generated from Pure + Pure-ProofGeneral + HOL + HOLCF + IOA + HOL-Nominal + HOL-Statespace + HOL-ex. +;; Generated from Pure + Pure-ProofGeneral + HOL + HOLCF + IOA + HOL-Nominal + HOL-Statespace. ;; *** DO NOT EDIT *** DO NOT EDIT *** DO NOT EDIT *** ;; @@ -36,6 +36,7 @@ "atp_kill" "atp_messages" "attribute_setup" + "automaton" "ax_specification" "axclass" "axiomatization" @@ -73,6 +74,7 @@ "consts_code" "context" "corollary" + "cpodef" "datatype" "declaration" "declare" @@ -84,6 +86,7 @@ "defs" "disable_pr" "display_drafts" + "domain" "done" "enable_pr" "end" @@ -97,6 +100,8 @@ "find_consts" "find_theorems" "fix" + "fixpat" + "fixrec" "from" "full_prf" "fun" @@ -146,6 +151,7 @@ "overloading" "parse_ast_translation" "parse_translation" + "pcpodef" "pr" "prefer" "presume" @@ -249,13 +255,15 @@ "}")) (defconst isar-keywords-minor - '("advanced" + '("actions" + "advanced" "and" "assumes" "attach" "avoids" "begin" "binder" + "compose" "congs" "constrains" "contains" @@ -263,6 +271,7 @@ "file" "fixes" "for" + "hide_action" "hints" "identifier" "if" @@ -271,7 +280,11 @@ "infix" "infixl" "infixr" + "initially" + "inputs" + "internals" "is" + "lazy" "module_name" "monos" "morphisms" @@ -279,10 +292,20 @@ "obtains" "open" "output" + "outputs" "overloaded" "permissive" + "post" + "pre" + "rename" + "restrict" "shows" + "signature" + "states" "structure" + "to" + "transitions" + "transrel" "unchecked" "uses" "where")) @@ -400,6 +423,7 @@ "arities" "atom_decl" "attribute_setup" + "automaton" "axclass" "axiomatization" "axioms" @@ -431,10 +455,13 @@ "defer_recdef" "definition" "defs" + "domain" "equivariance" "extract" "extract_type" "finalconsts" + "fixpat" + "fixrec" "fun" "global" "hide" @@ -487,6 +514,7 @@ '("ax_specification" "code_pred" "corollary" + "cpodef" "function" "instance" "interpretation" @@ -494,6 +522,7 @@ "nominal_inductive" "nominal_inductive2" "nominal_primrec" + "pcpodef" "recdef_tc" "rep_datatype" "specification" diff -r 9a1178204dc0 -r 657386d94f14 lib/jedit/isabelle.xml --- a/lib/jedit/isabelle.xml Mon May 11 09:18:42 2009 +0200 +++ b/lib/jedit/isabelle.xml Mon May 11 09:39:53 2009 +0200 @@ -47,6 +47,7 @@ ML_prf abbreviation + actions advanced also and @@ -61,6 +62,7 @@ attach attribute_setup + automaton avoids ax_specification axclass @@ -72,12 +74,14 @@ by cannot_undo case + case_eqns chapter class classes classrel + codatatype code_abort code_class code_const @@ -89,12 +93,15 @@ code_module code_modulename code_monad + code_pred code_reserved code_type coinductive coinductive_set + compose + con_defs congs constdefs constrains @@ -103,6 +110,7 @@ contains context corollary + cpodef datatype declaration declare @@ -115,7 +123,10 @@ defs + domain + domains done + elimination end equivariance @@ -130,6 +141,8 @@ fix fixes + fixpat + fixrec for from @@ -142,11 +155,13 @@ hence hide + hide_action hints identifier if imports in + induction inductive inductive_cases inductive_set @@ -154,14 +169,19 @@ infixl infixr init_toplevel + initially + inputs instance instantiation + internals interpret interpretation + intros is judgment kill + lazy lemma lemmas let @@ -193,12 +213,16 @@ open oracle output + outputs overloaded overloading parse_ast_translation parse_translation + pcpodef permissive + post + pre prefer presume @@ -228,6 +252,7 @@ + @@ -244,19 +269,24 @@ recdef recdef_tc record + recursor_eqns refute_params + rename rep_datatype + restrict sect section setup show shows + signature simproc_setup sorry specification + states statespace structure subclass @@ -278,11 +308,16 @@ thus + to + transitions translations + transrel txt txt_raw + type_elims + type_intros typed_print_translation typedecl typedef diff -r 9a1178204dc0 -r 657386d94f14 src/HOL/ex/Predicate_Compile.thy --- a/src/HOL/ex/Predicate_Compile.thy Mon May 11 09:18:42 2009 +0200 +++ b/src/HOL/ex/Predicate_Compile.thy Mon May 11 09:39:53 2009 +0200 @@ -49,6 +49,7 @@ code_pred append using assms by (rule append.cases) +thm append_codegen thm append_cases diff -r 9a1178204dc0 -r 657386d94f14 src/HOL/ex/predicate_compile.ML --- a/src/HOL/ex/predicate_compile.ML Mon May 11 09:18:42 2009 +0200 +++ b/src/HOL/ex/predicate_compile.ML Mon May 11 09:39:53 2009 +0200 @@ -1378,18 +1378,18 @@ val const = prep_const thy raw_const val nparams = get_nparams thy const val intro_rules = pred_intros thy const - val (((tfrees, frees), fact), ctxt') = + val (((tfrees, frees), fact), lthy') = Variable.import_thms true intro_rules lthy; - val (pred, prop, ctxt'') = mk_casesrule fact nparams ctxt' + val (pred, prop, lthy'') = mk_casesrule fact nparams lthy' val (predname, _) = dest_Const pred - fun after_qed [[th]] ctxt'' = + fun after_qed [[th]] lthy'' = LocalTheory.note Thm.theoremK - ((Binding.name (Long_Name.base_name predname ^ "_cases"), - [Attrib.internal (K (code_ind_cases_attrib))]) , [th]) ctxt'' + ((Binding.name (Long_Name.base_name predname ^ "_cases"), (* FIXME: other suffix *) + [Attrib.internal (K (code_ind_cases_attrib))]) , [th]) lthy'' |> snd - |> ProofContext.theory (create_def_equation predname) + |> LocalTheory.theory (create_def_equation predname) in - Proof.theorem_i NONE after_qed [[(prop, [])]] ctxt'' + Proof.theorem_i NONE after_qed [[(prop, [])]] lthy'' end; val code_pred = generic_code_pred (K I);