src/HOL/Tools/Meson/meson_clausify.ML
changeset 69593 3dda49e08b9d
parent 67149 e61557884799
child 70157 62b19f19350a
equal deleted inserted replaced
69592:a80d8ec6c998 69593:3dda49e08b9d
   174               "\nException message: " ^ msg);
   174               "\nException message: " ^ msg);
   175             (* A type variable of sort "{}" will make "abstraction" fail. *)
   175             (* A type variable of sort "{}" will make "abstraction" fail. *)
   176             TrueI)
   176             TrueI)
   177 
   177 
   178 (*cterms are used throughout for efficiency*)
   178 (*cterms are used throughout for efficiency*)
   179 val cTrueprop = Thm.cterm_of @{theory_context HOL} HOLogic.Trueprop;
   179 val cTrueprop = Thm.cterm_of \<^theory_context>\<open>HOL\<close> HOLogic.Trueprop;
   180 
   180 
   181 (*Given an abstraction over n variables, replace the bound variables by free
   181 (*Given an abstraction over n variables, replace the bound variables by free
   182   ones. Return the body, along with the list of free variables.*)
   182   ones. Return the body, along with the list of free variables.*)
   183 fun c_variant_abs_multi (ct0, vars) =
   183 fun c_variant_abs_multi (ct0, vars) =
   184       let val (cv,ct) = Thm.dest_abs NONE ct0
   184       let val (cv,ct) = Thm.dest_abs NONE ct0
   292 fun ss_only ths ctxt = clear_simpset (put_simpset HOL_basic_ss ctxt) addsimps ths
   292 fun ss_only ths ctxt = clear_simpset (put_simpset HOL_basic_ss ctxt) addsimps ths
   293 
   293 
   294 val cheat_choice =
   294 val cheat_choice =
   295   \<^prop>\<open>\<forall>x. \<exists>y. Q x y \<Longrightarrow> \<exists>f. \<forall>x. Q x (f x)\<close>
   295   \<^prop>\<open>\<forall>x. \<exists>y. Q x y \<Longrightarrow> \<exists>f. \<forall>x. Q x (f x)\<close>
   296   |> Logic.varify_global
   296   |> Logic.varify_global
   297   |> Skip_Proof.make_thm @{theory}
   297   |> Skip_Proof.make_thm \<^theory>
   298 
   298 
   299 (* Converts an Isabelle theorem into NNF. *)
   299 (* Converts an Isabelle theorem into NNF. *)
   300 fun nnf_axiom choice_ths new_skolem ax_no th ctxt =
   300 fun nnf_axiom choice_ths new_skolem ax_no th ctxt =
   301   let
   301   let
   302     val thy = Proof_Context.theory_of ctxt
   302     val thy = Proof_Context.theory_of ctxt