equal
deleted
inserted
replaced
149 |
149 |
150 (*This rewrite rule works upon formulae; thus it requires explicit use of |
150 (*This rewrite rule works upon formulae; thus it requires explicit use of |
151 H_cong to expose the equality*) |
151 H_cong to expose the equality*) |
152 goalw WF.thy [cut_def] |
152 goalw WF.thy [cut_def] |
153 "(cut f r x = cut g r x) = (!y. (y,x):r --> f(y)=g(y))"; |
153 "(cut f r x = cut g r x) = (!y. (y,x):r --> f(y)=g(y))"; |
154 by (simp_tac (HOL_ss addsimps [expand_fun_eq] |
154 by (simp_tac (HOL_ss addsimps [expand_fun_eq] addsplits [expand_if]) 1); |
155 setloop (split_tac [expand_if])) 1); |
|
156 qed "cuts_eq"; |
155 qed "cuts_eq"; |
157 |
156 |
158 goalw WF.thy [cut_def] "!!x. (x,a):r ==> (cut f r a)(x) = f(x)"; |
157 goalw WF.thy [cut_def] "!!x. (x,a):r ==> (cut f r a)(x) = f(x)"; |
159 by (asm_simp_tac HOL_ss 1); |
158 by (asm_simp_tac HOL_ss 1); |
160 qed "cut_apply"; |
159 qed "cut_apply"; |
191 val gundef = recgb RS is_recfun_undef |
190 val gundef = recgb RS is_recfun_undef |
192 and fisg = recgb RS (recfa RS (transr RS (wfr RS is_recfun_equal))); |
191 and fisg = recgb RS (recfa RS (transr RS (wfr RS is_recfun_equal))); |
193 by (cut_facts_tac prems 1); |
192 by (cut_facts_tac prems 1); |
194 by (rtac ext 1); |
193 by (rtac ext 1); |
195 by (asm_simp_tac (wf_super_ss addsimps [gundef,fisg] |
194 by (asm_simp_tac (wf_super_ss addsimps [gundef,fisg] |
196 setloop (split_tac [expand_if])) 1); |
195 addsplits [expand_if]) 1); |
197 qed "is_recfun_cut"; |
196 qed "is_recfun_cut"; |
198 |
197 |
199 (*** Main Existence Lemma -- Basic Properties of the_recfun ***) |
198 (*** Main Existence Lemma -- Basic Properties of the_recfun ***) |
200 |
199 |
201 val prems = goalw WF.thy [the_recfun_def] |
200 val prems = goalw WF.thy [the_recfun_def] |