src/HOL/Tools/function_package/mutual.ML
changeset 24171 25381ce95316
parent 24170 33f055a0f3a1
child 24977 9f98751c9628
equal deleted inserted replaced
24170:33f055a0f3a1 24171:25381ce95316
   239                                  | [cond] => (implies_elim psimp (assume cond), implies_intr cond)
   239                                  | [cond] => (implies_elim psimp (assume cond), implies_intr cond)
   240                                  | _ => sys_error "Too many conditions"
   240                                  | _ => sys_error "Too many conditions"
   241     in
   241     in
   242       Goal.prove ctxt [] [] 
   242       Goal.prove ctxt [] [] 
   243                  (HOLogic.Trueprop $ HOLogic.mk_eq (list_comb (f, args), rhs))
   243                  (HOLogic.Trueprop $ HOLogic.mk_eq (list_comb (f, args), rhs))
   244                  (fn _ => SIMPSET (unfold_tac all_orig_fdefs)
   244                  (fn _ => (LocalDefs.unfold_tac ctxt all_orig_fdefs)
   245                           THEN EqSubst.eqsubst_tac ctxt [0] [simp] 1
   245                           THEN EqSubst.eqsubst_tac ctxt [0] [simp] 1
   246                           THEN SIMPSET' (fn ss => simp_tac (ss addsimps [projl_inl, projr_inr])) 1)
   246                           THEN SIMPSET' (fn ss => simp_tac (ss addsimps [projl_inl, projr_inr])) 1)
   247         |> restore_cond 
   247         |> restore_cond 
   248         |> export
   248         |> export
   249     end
   249     end