equal
deleted
inserted
replaced
117 (descr ~~ recTs ~~ rec_result_Ts ~~ tnames))); |
117 (descr ~~ recTs ~~ rec_result_Ts ~~ tnames))); |
118 val cert = cterm_of sg; |
118 val cert = cterm_of sg; |
119 val inst = map (pairself cert) (map head_of (HOLogic.dest_conj |
119 val inst = map (pairself cert) (map head_of (HOLogic.dest_conj |
120 (HOLogic.dest_Trueprop (concl_of induction))) ~~ ps); |
120 (HOLogic.dest_Trueprop (concl_of induction))) ~~ ps); |
121 |
121 |
122 val thm = simple_prove_goal_cterm (cert (Logic.list_implies (prems, concl))) |
122 val thm = OldGoals.simple_prove_goal_cterm (cert (Logic.list_implies (prems, concl))) |
123 (fn prems => |
123 (fn prems => |
124 [rewrite_goals_tac (map mk_meta_eq [fst_conv, snd_conv]), |
124 [rewrite_goals_tac (map mk_meta_eq [fst_conv, snd_conv]), |
125 rtac (cterm_instantiate inst induction) 1, |
125 rtac (cterm_instantiate inst induction) 1, |
126 ALLGOALS ObjectLogic.atomize_tac, |
126 ALLGOALS ObjectLogic.atomize_tac, |
127 rewrite_goals_tac (o_def :: map mk_meta_eq rec_rewrites), |
127 rewrite_goals_tac (o_def :: map mk_meta_eq rec_rewrites), |
188 val r = Const (case_name, map fastype_of rs ---> T --> rT); |
188 val r = Const (case_name, map fastype_of rs ---> T --> rT); |
189 |
189 |
190 val y = Var (("y", 0), Type.varifyT T); |
190 val y = Var (("y", 0), Type.varifyT T); |
191 val y' = Free ("y", T); |
191 val y' = Free ("y", T); |
192 |
192 |
193 val thm = prove_goalw_cterm [] (cert (Logic.list_implies (prems, |
193 val thm = OldGoals.prove_goalw_cterm [] (cert (Logic.list_implies (prems, |
194 HOLogic.mk_Trueprop (Free ("P", rT --> HOLogic.boolT) $ |
194 HOLogic.mk_Trueprop (Free ("P", rT --> HOLogic.boolT) $ |
195 list_comb (r, rs @ [y']))))) |
195 list_comb (r, rs @ [y']))))) |
196 (fn prems => |
196 (fn prems => |
197 [rtac (cterm_instantiate [(cert y, cert y')] exhaustion) 1, |
197 [rtac (cterm_instantiate [(cert y, cert y')] exhaustion) 1, |
198 ALLGOALS (EVERY' |
198 ALLGOALS (EVERY' |