src/HOL/Tools/Predicate_Compile/predicate_compile_proof.ML
changeset 66012 59bf29d2b3a1
parent 64556 851ae0e7b09c
child 69593 3dda49e08b9d
equal deleted inserted replaced
66011:f10bbfe07c41 66012:59bf29d2b3a1
    59     val param_derivations = param_derivations_of deriv
    59     val param_derivations = param_derivations_of deriv
    60     val ho_args = ho_args_of mode args
    60     val ho_args = ho_args_of mode args
    61     val f_tac =
    61     val f_tac =
    62       (case f of
    62       (case f of
    63         Const (name, _) => simp_tac (put_simpset HOL_basic_ss ctxt addsimps
    63         Const (name, _) => simp_tac (put_simpset HOL_basic_ss ctxt addsimps
    64            [@{thm eval_pred}, Core_Data.predfun_definition_of ctxt name mode,
    64            [@{thm pred.sel}, Core_Data.predfun_definition_of ctxt name mode,
    65            @{thm case_prod_eta}, @{thm case_prod_beta}, @{thm fst_conv},
    65            @{thm case_prod_eta}, @{thm case_prod_beta}, @{thm fst_conv},
    66            @{thm snd_conv}, @{thm prod.collapse}, @{thm Product_Type.split_conv}]) 1
    66            @{thm snd_conv}, @{thm prod.collapse}, @{thm Product_Type.split_conv}]) 1
    67       | Free _ =>
    67       | Free _ =>
    68         Subgoal.FOCUS_PREMS (fn {context = ctxt', prems, ...} =>
    68         Subgoal.FOCUS_PREMS (fn {context = ctxt', prems, ...} =>
    69           let
    69           let
   178       (fn (pred, T) => Core_Data.predfun_definition_of ctxt pred
   178       (fn (pred, T) => Core_Data.predfun_definition_of ctxt pred
   179         (all_input_of T))
   179         (all_input_of T))
   180         preds
   180         preds
   181   in
   181   in
   182     simp_tac (put_simpset HOL_basic_ss ctxt
   182     simp_tac (put_simpset HOL_basic_ss ctxt
   183       addsimps (@{thms HOL.simp_thms eval_pred} @ defs)) 1
   183       addsimps (@{thms HOL.simp_thms pred.sel} @ defs)) 1
   184     (* need better control here! *)
   184     (* need better control here! *)
   185   end
   185   end
   186 
   186 
   187 fun prove_clause options ctxt nargs mode (_, clauses) (ts, moded_ps) =
   187 fun prove_clause options ctxt nargs mode (_, clauses) (ts, moded_ps) =
   188   let
   188   let
   337     val param_derivations = param_derivations_of deriv
   337     val param_derivations = param_derivations_of deriv
   338     val ho_args = ho_args_of mode args
   338     val ho_args = ho_args_of mode args
   339     val f_tac =
   339     val f_tac =
   340       (case f of
   340       (case f of
   341         Const (name, _) => full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps
   341         Const (name, _) => full_simp_tac (put_simpset HOL_basic_ss ctxt addsimps
   342            [@{thm eval_pred}, Core_Data.predfun_definition_of ctxt name mode,
   342            [@{thm pred.sel}, Core_Data.predfun_definition_of ctxt name mode,
   343             @{thm Product_Type.split_conv}]) 1
   343             @{thm Product_Type.split_conv}]) 1
   344       | Free _ => all_tac
   344       | Free _ => all_tac
   345       | _ => error "prove_param2: illegal parameter term")
   345       | _ => error "prove_param2: illegal parameter term")
   346   in
   346   in
   347     trace_tac ctxt options "before simplification in prove_args:"
   347     trace_tac ctxt options "before simplification in prove_args:"
   381       (fn (pred, T) => Core_Data.predfun_definition_of ctxt pred
   381       (fn (pred, T) => Core_Data.predfun_definition_of ctxt pred
   382         (all_input_of T))
   382         (all_input_of T))
   383         preds
   383         preds
   384   in
   384   in
   385     (* only simplify the one assumption *)
   385     (* only simplify the one assumption *)
   386     full_simp_tac (put_simpset HOL_basic_ss' ctxt addsimps @{thm eval_pred} :: defs) 1
   386     full_simp_tac (put_simpset HOL_basic_ss' ctxt addsimps @{thm pred.sel} :: defs) 1
   387     (* need better control here! *)
   387     (* need better control here! *)
   388     THEN trace_tac ctxt options "after sidecond2 simplification"
   388     THEN trace_tac ctxt options "after sidecond2 simplification"
   389   end
   389   end
   390 
   390 
   391 fun prove_clause2 options ctxt pred mode (ts, ps) i =
   391 fun prove_clause2 options ctxt pred mode (ts, ps) i =