src/Pure/Isar/object_logic.ML
changeset 41228 e1fce873b814
parent 37216 3165bc303f66
child 41493 f05976d69141
equal deleted inserted replaced
41227:11e7ee2ca77f 41228:e1fce873b814
   176 
   176 
   177 
   177 
   178 (* atomize *)
   178 (* atomize *)
   179 
   179 
   180 fun atomize_term thy =
   180 fun atomize_term thy =
   181   drop_judgment thy o MetaSimplifier.rewrite_term thy (get_atomize thy) [];
   181   drop_judgment thy o Raw_Simplifier.rewrite_term thy (get_atomize thy) [];
   182 
   182 
   183 fun atomize ct =
   183 fun atomize ct =
   184   MetaSimplifier.rewrite true (get_atomize (Thm.theory_of_cterm ct)) ct;
   184   Raw_Simplifier.rewrite true (get_atomize (Thm.theory_of_cterm ct)) ct;
   185 
   185 
   186 fun atomize_prems ct =
   186 fun atomize_prems ct =
   187   if Logic.has_meta_prems (Thm.term_of ct) then
   187   if Logic.has_meta_prems (Thm.term_of ct) then
   188     Conv.params_conv ~1 (K (Conv.prems_conv ~1 atomize))
   188     Conv.params_conv ~1 (K (Conv.prems_conv ~1 atomize))
   189       (ProofContext.init_global (Thm.theory_of_cterm ct)) ct
   189       (ProofContext.init_global (Thm.theory_of_cterm ct)) ct
   193 val full_atomize_tac = CONVERSION atomize;
   193 val full_atomize_tac = CONVERSION atomize;
   194 
   194 
   195 
   195 
   196 (* rulify *)
   196 (* rulify *)
   197 
   197 
   198 fun rulify_term thy = MetaSimplifier.rewrite_term thy (get_rulify thy) [];
   198 fun rulify_term thy = Raw_Simplifier.rewrite_term thy (get_rulify thy) [];
   199 fun rulify_tac i st = MetaSimplifier.rewrite_goal_tac (get_rulify (Thm.theory_of_thm st)) i st;
   199 fun rulify_tac i st = rewrite_goal_tac (get_rulify (Thm.theory_of_thm st)) i st;
   200 
   200 
   201 fun gen_rulify full thm =
   201 fun gen_rulify full thm =
   202   MetaSimplifier.simplify full (get_rulify (Thm.theory_of_thm thm)) thm
   202   Raw_Simplifier.simplify full (get_rulify (Thm.theory_of_thm thm)) thm
   203   |> Drule.gen_all |> Thm.strip_shyps |> Drule.zero_var_indexes;
   203   |> Drule.gen_all |> Thm.strip_shyps |> Drule.zero_var_indexes;
   204 
   204 
   205 val rulify = gen_rulify true;
   205 val rulify = gen_rulify true;
   206 val rulify_no_asm = gen_rulify false;
   206 val rulify_no_asm = gen_rulify false;
   207 
   207