127 by (cut_facts_tac prems 1); |
127 by (cut_facts_tac prems 1); |
128 by (wf_ind_tac "a" prems 1); |
128 by (wf_ind_tac "a" prems 1); |
129 by (res_inst_tac [("f","cut (%y. H (the_recfun r H y) y) r a1")] |
129 by (res_inst_tac [("f","cut (%y. H (the_recfun r H y) y) r a1")] |
130 is_the_recfun 1); |
130 is_the_recfun 1); |
131 by (rewtac is_recfun_def); |
131 by (rewtac is_recfun_def); |
132 by (rtac (cuts_eq RS ssubst) 1); |
132 by (stac cuts_eq 1); |
133 by (rtac allI 1); |
133 by (rtac allI 1); |
134 by (rtac impI 1); |
134 by (rtac impI 1); |
135 by (res_inst_tac [("f1","H"),("x","y")](arg_cong RS fun_cong) 1); |
135 by (res_inst_tac [("f1","H"),("x","y")](arg_cong RS fun_cong) 1); |
136 by (subgoal_tac |
136 by (subgoal_tac |
137 "the_recfun r H y = cut(%x. H(cut(the_recfun r H y) r x) x) r y" 1); |
137 "the_recfun r H y = cut(%x. H(cut(the_recfun r H y) r x) x) r y" 1); |
157 "[| wf(r); trans(r) |] ==> is_recfun r H a (the_recfun r H a)"; |
157 "[| wf(r); trans(r) |] ==> is_recfun r H a (the_recfun r H a)"; |
158 by (cut_facts_tac prems 1); |
158 by (cut_facts_tac prems 1); |
159 by (wf_ind_tac "a" prems 1); |
159 by (wf_ind_tac "a" prems 1); |
160 by (res_inst_tac [("f", "cut (%y. wftrec r H y) r a1")] is_the_recfun 1); |
160 by (res_inst_tac [("f", "cut (%y. wftrec r H y) r a1")] is_the_recfun 1); |
161 by (rewrite_goals_tac [is_recfun_def, wftrec_def]); |
161 by (rewrite_goals_tac [is_recfun_def, wftrec_def]); |
162 by (rtac (cuts_eq RS ssubst) 1); |
162 by (stac cuts_eq 1); |
163 (*Applying the substitution: must keep the quantified assumption!!*) |
163 (*Applying the substitution: must keep the quantified assumption!!*) |
164 by (EVERY1 [strip_tac, rtac H_cong1, rtac allE, atac, |
164 by (EVERY1 [strip_tac, rtac H_cong1, rtac allE, atac, |
165 etac (mp RS ssubst), atac]); |
165 etac (mp RS ssubst), atac]); |
166 by (fold_tac [is_recfun_def]); |
166 by (fold_tac [is_recfun_def]); |
167 by (asm_simp_tac (wf_super_ss addsimps[cut_apply,is_recfun_cut,cuts_eq]) 1); |
167 by (asm_simp_tac (wf_super_ss addsimps[cut_apply,is_recfun_cut,cuts_eq]) 1); |