src/HOL/Tools/Predicate_Compile/predicate_compile_aux.ML
changeset 67405 e9ab4ad7bd15
parent 67399 eab6ce8368fa
child 69593 3dda49e08b9d
equal deleted inserted replaced
67404:e128ab544996 67405:e9ab4ad7bd15
  1032   let
  1032   let
  1033     val ctxt = Proof_Context.init_global thy  (* FIXME proper context!? *)
  1033     val ctxt = Proof_Context.init_global thy  (* FIXME proper context!? *)
  1034     val process =
  1034     val process =
  1035       rewrite_rule ctxt (Named_Theorems.get ctxt @{named_theorems code_pred_simp})
  1035       rewrite_rule ctxt (Named_Theorems.get ctxt @{named_theorems code_pred_simp})
  1036     fun process_False intro_t =
  1036     fun process_False intro_t =
  1037       if member (=) (Logic.strip_imp_prems intro_t) @{prop "False"}
  1037       if member (op =) (Logic.strip_imp_prems intro_t) @{prop "False"}
  1038       then NONE else SOME intro_t
  1038       then NONE else SOME intro_t
  1039     fun process_True intro_t =
  1039     fun process_True intro_t =
  1040       map_filter_premises (fn p => if p = @{prop True} then NONE else SOME p) intro_t
  1040       map_filter_premises (fn p => if p = @{prop True} then NONE else SOME p) intro_t
  1041   in
  1041   in
  1042     Option.map (Skip_Proof.make_thm thy)
  1042     Option.map (Skip_Proof.make_thm thy)