# HG changeset patch # User Christian Urban # Date 1251153023 -7200 # Node ID 6a1b4c22a386fbd5c4513693d8a2aa1cf2c6ccf1 # Parent b3d878d19a0976b631c01dbf06ebf3386917f2f2 added the prove command diff -r b3d878d19a09 -r 6a1b4c22a386 Prove.thy --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Prove.thy Tue Aug 25 00:30:23 2009 +0200 @@ -0,0 +1,26 @@ +theory Prove +imports Main +begin + +ML {* +val r = ref (NONE:(unit -> term) option) +*} +ML {* +let + fun setup_proof (txt, pos) lthy = + let + val trm = ML_Context.evaluate lthy true ("r", r) txt + in + Proof.theorem_i NONE (K I) [[(trm,[])]] lthy + end; + + val setup_proof_parser = OuterParse.ML_source >> setup_proof + + val kind = OuterKeyword.thy_goal +in + OuterSyntax.local_theory_to_proof "prove" "proving a proposition" + kind setup_proof_parser +end +*} + +end diff -r b3d878d19a09 -r 6a1b4c22a386 QuotMain.thy --- a/QuotMain.thy Fri Aug 21 13:56:20 2009 +0200 +++ b/QuotMain.thy Tue Aug 25 00:30:23 2009 +0200 @@ -1,7 +1,13 @@ theory QuotMain -imports QuotScript QuotList +imports QuotScript QuotList Prove begin +(* +prove {* @{prop "True"} *} +apply(rule TrueI) +done +*) + locale QUOT_TYPE = fixes R :: "'a \ 'a \ bool" and Abs :: "('a \ bool) \ 'b" diff -r b3d878d19a09 -r 6a1b4c22a386 isar-keywords-prove.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/isar-keywords-prove.el Tue Aug 25 00:30:23 2009 +0200 @@ -0,0 +1,570 @@ +;; +;; Keyword classification tables for Isabelle/Isar. +;; Generated from HOL + Pure + Pure-ProofGeneral + HOL-Command. +;; *** DO NOT EDIT *** DO NOT EDIT *** DO NOT EDIT *** +;; + +(defconst isar-keywords-major + '("\\." + "\\.\\." + "Isabelle\\.command" + "Isar\\.begin_document" + "Isar\\.command" + "Isar\\.define_command" + "Isar\\.edit_document" + "Isar\\.end_document" + "Isar\\.insert" + "Isar\\.remove" + "ML" + "ML_command" + "ML_prf" + "ML_val" + "ProofGeneral\\.inform_file_processed" + "ProofGeneral\\.inform_file_retracted" + "ProofGeneral\\.kill_proof" + "ProofGeneral\\.process_pgip" + "ProofGeneral\\.restart" + "ProofGeneral\\.undo" + "abbreviation" + "also" + "apply" + "apply_end" + "arities" + "assume" + "atp_info" + "atp_kill" + "atp_messages" + "atp_minimize" + "attribute_setup" + "ax_specification" + "axclass" + "axiomatization" + "axioms" + "back" + "by" + "cannot_undo" + "case" + "cd" + "chapter" + "class" + "class_deps" + "classes" + "classrel" + "code_abort" + "code_class" + "code_const" + "code_datatype" + "code_deps" + "code_include" + "code_instance" + "code_library" + "code_module" + "code_modulename" + "code_monad" + "code_pred" + "code_reserved" + "code_thms" + "code_type" + "coinductive" + "coinductive_set" + "commit" + "constdefs" + "consts" + "consts_code" + "context" + "corollary" + "datatype" + "declaration" + "declare" + "def" + "defaultsort" + "defer" + "defer_recdef" + "definition" + "defs" + "disable_pr" + "display_drafts" + "done" + "enable_pr" + "end" + "exit" + "export_code" + "extract" + "extract_type" + "finalconsts" + "finally" + "find_consts" + "find_theorems" + "fix" + "from" + "full_prf" + "fun" + "function" + "global" + "guess" + "have" + "header" + "help" + "hence" + "hide" + "inductive" + "inductive_cases" + "inductive_set" + "init_toplevel" + "instance" + "instantiation" + "interpret" + "interpretation" + "judgment" + "kill" + "kill_thy" + "lemma" + "lemmas" + "let" + "linear_undo" + "local" + "local_setup" + "locale" + "method_setup" + "moreover" + "next" + "no_notation" + "no_syntax" + "no_translations" + "nonterminals" + "normal_form" + "notation" + "note" + "obtain" + "oops" + "oracle" + "overloading" + "parse_ast_translation" + "parse_translation" + "pr" + "prefer" + "presume" + "pretty_setmargin" + "prf" + "primrec" + "print_abbrevs" + "print_antiquotations" + "print_ast_translation" + "print_atps" + "print_attributes" + "print_binds" + "print_cases" + "print_claset" + "print_classes" + "print_codeproc" + "print_codesetup" + "print_commands" + "print_configs" + "print_context" + "print_drafts" + "print_facts" + "print_induct_rules" + "print_locale" + "print_locales" + "print_methods" + "print_orders" + "print_rules" + "print_simpset" + "print_statement" + "print_syntax" + "print_theorems" + "print_theory" + "print_trans_rules" + "print_translation" + "proof" + "prop" + "prove" + "pwd" + "qed" + "quickcheck" + "quickcheck_params" + "quit" + "realizability" + "realizers" + "recdef" + "recdef_tc" + "record" + "refute" + "refute_params" + "remove_thy" + "rep_datatype" + "sect" + "section" + "setup" + "show" + "simproc_setup" + "sledgehammer" + "sorry" + "specification" + "subclass" + "sublocale" + "subsect" + "subsection" + "subsubsect" + "subsubsection" + "syntax" + "term" + "termination" + "text" + "text_raw" + "then" + "theorem" + "theorems" + "theory" + "thm" + "thm_deps" + "thus" + "thy_deps" + "touch_thy" + "translations" + "txt" + "txt_raw" + "typ" + "typed_print_translation" + "typedecl" + "typedef" + "types" + "types_code" + "ultimately" + "undo" + "undos_proof" + "unfolding" + "unused_thms" + "use" + "use_thy" + "using" + "value" + "values" + "welcome" + "with" + "{" + "}")) + +(defconst isar-keywords-minor + '("advanced" + "and" + "assumes" + "attach" + "begin" + "binder" + "congs" + "constrains" + "contains" + "defines" + "file" + "fixes" + "for" + "hints" + "identifier" + "if" + "imports" + "in" + "infix" + "infixl" + "infixr" + "is" + "module_name" + "monos" + "morphisms" + "notes" + "obtains" + "open" + "output" + "overloaded" + "permissive" + "shows" + "structure" + "unchecked" + "uses" + "where")) + +(defconst isar-keywords-control + '("Isabelle\\.command" + "Isar\\.begin_document" + "Isar\\.command" + "Isar\\.define_command" + "Isar\\.edit_document" + "Isar\\.end_document" + "Isar\\.insert" + "Isar\\.remove" + "ProofGeneral\\.inform_file_processed" + "ProofGeneral\\.inform_file_retracted" + "ProofGeneral\\.kill_proof" + "ProofGeneral\\.process_pgip" + "ProofGeneral\\.restart" + "ProofGeneral\\.undo" + "cannot_undo" + "exit" + "init_toplevel" + "kill" + "linear_undo" + "quit" + "undo" + "undos_proof")) + +(defconst isar-keywords-diag + '("ML_command" + "ML_val" + "atp_info" + "atp_kill" + "atp_messages" + "atp_minimize" + "cd" + "class_deps" + "code_deps" + "code_thms" + "commit" + "disable_pr" + "display_drafts" + "enable_pr" + "export_code" + "find_consts" + "find_theorems" + "full_prf" + "header" + "help" + "kill_thy" + "normal_form" + "pr" + "pretty_setmargin" + "prf" + "print_abbrevs" + "print_antiquotations" + "print_atps" + "print_attributes" + "print_binds" + "print_cases" + "print_claset" + "print_classes" + "print_codeproc" + "print_codesetup" + "print_commands" + "print_configs" + "print_context" + "print_drafts" + "print_facts" + "print_induct_rules" + "print_locale" + "print_locales" + "print_methods" + "print_orders" + "print_rules" + "print_simpset" + "print_statement" + "print_syntax" + "print_theorems" + "print_theory" + "print_trans_rules" + "prop" + "pwd" + "quickcheck" + "refute" + "remove_thy" + "sledgehammer" + "term" + "thm" + "thm_deps" + "thy_deps" + "touch_thy" + "typ" + "unused_thms" + "use_thy" + "value" + "values" + "welcome")) + +(defconst isar-keywords-theory-begin + '("theory")) + +(defconst isar-keywords-theory-switch + '()) + +(defconst isar-keywords-theory-end + '("end")) + +(defconst isar-keywords-theory-heading + '("chapter" + "section" + "subsection" + "subsubsection")) + +(defconst isar-keywords-theory-decl + '("ML" + "abbreviation" + "arities" + "attribute_setup" + "axclass" + "axiomatization" + "axioms" + "class" + "classes" + "classrel" + "code_abort" + "code_class" + "code_const" + "code_datatype" + "code_include" + "code_instance" + "code_library" + "code_module" + "code_modulename" + "code_monad" + "code_reserved" + "code_type" + "coinductive" + "coinductive_set" + "constdefs" + "consts" + "consts_code" + "context" + "datatype" + "declaration" + "declare" + "defaultsort" + "defer_recdef" + "definition" + "defs" + "extract" + "extract_type" + "finalconsts" + "fun" + "global" + "hide" + "inductive" + "inductive_set" + "instantiation" + "judgment" + "lemmas" + "local" + "local_setup" + "locale" + "method_setup" + "no_notation" + "no_syntax" + "no_translations" + "nonterminals" + "notation" + "oracle" + "overloading" + "parse_ast_translation" + "parse_translation" + "primrec" + "print_ast_translation" + "print_translation" + "quickcheck_params" + "realizability" + "realizers" + "recdef" + "record" + "refute_params" + "setup" + "simproc_setup" + "syntax" + "text" + "text_raw" + "theorems" + "translations" + "typed_print_translation" + "typedecl" + "types" + "types_code" + "use")) + +(defconst isar-keywords-theory-script + '("inductive_cases")) + +(defconst isar-keywords-theory-goal + '("ax_specification" + "code_pred" + "corollary" + "function" + "instance" + "interpretation" + "lemma" + "prove" + "recdef_tc" + "rep_datatype" + "specification" + "subclass" + "sublocale" + "termination" + "theorem" + "typedef")) + +(defconst isar-keywords-qed + '("\\." + "\\.\\." + "by" + "done" + "sorry")) + +(defconst isar-keywords-qed-block + '("qed")) + +(defconst isar-keywords-qed-global + '("oops")) + +(defconst isar-keywords-proof-heading + '("sect" + "subsect" + "subsubsect")) + +(defconst isar-keywords-proof-goal + '("have" + "hence" + "interpret")) + +(defconst isar-keywords-proof-block + '("next" + "proof")) + +(defconst isar-keywords-proof-open + '("{")) + +(defconst isar-keywords-proof-close + '("}")) + +(defconst isar-keywords-proof-chain + '("finally" + "from" + "then" + "ultimately" + "with")) + +(defconst isar-keywords-proof-decl + '("ML_prf" + "also" + "let" + "moreover" + "note" + "txt" + "txt_raw" + "unfolding" + "using")) + +(defconst isar-keywords-proof-asm + '("assume" + "case" + "def" + "fix" + "presume")) + +(defconst isar-keywords-proof-asm-goal + '("guess" + "obtain" + "show" + "thus")) + +(defconst isar-keywords-proof-script + '("apply" + "apply_end" + "back" + "defer" + "prefer")) + +(provide 'isar-keywords)