equal
deleted
inserted
replaced
174 val typedef_thm = #type_definition (snd typedef_info) |
174 val typedef_thm = #type_definition (snd typedef_info) |
175 val pred_name = |
175 val pred_name = |
176 (case HOLogic.dest_Trueprop (Thm.concl_of typedef_thm) of |
176 (case HOLogic.dest_Trueprop (Thm.concl_of typedef_thm) of |
177 (_ $ _ $ _ $ (_ $ Const (n, _))) => n |
177 (_ $ _ $ _ $ (_ $ Const (n, _))) => n |
178 | _ => raise Match) |
178 | _ => raise Match) |
179 val induct_info = Inductive.the_inductive ctxt pred_name |
179 val induct_info = Inductive.the_inductive_global ctxt pred_name |
180 val pred_names = #names (fst induct_info) |
180 val pred_names = #names (fst induct_info) |
181 val induct_thms = #inducts (snd induct_info) |
181 val induct_thms = #inducts (snd induct_info) |
182 val alist = pred_names ~~ induct_thms |
182 val alist = pred_names ~~ induct_thms |
183 val induct_thm = the (AList.lookup (op =) alist pred_name) |
183 val induct_thm = the (AList.lookup (op =) alist pred_name) |
184 val vars = rev (Term.add_vars (Thm.prop_of induct_thm) []) |
184 val vars = rev (Term.add_vars (Thm.prop_of induct_thm) []) |