src/HOL/Tools/Datatype/datatype_aux.ML
changeset 42364 8c674b3b8e44
parent 42290 b1f544c84040
child 42368 3b8498ac2314
equal deleted inserted replaced
42363:e52e3f697510 42364:8c674b3b8e44
   130 
   130 
   131 fun indtac indrule indnames i st =
   131 fun indtac indrule indnames i st =
   132   let
   132   let
   133     val ts = HOLogic.dest_conj (HOLogic.dest_Trueprop (concl_of indrule));
   133     val ts = HOLogic.dest_conj (HOLogic.dest_Trueprop (concl_of indrule));
   134     val ts' = HOLogic.dest_conj (HOLogic.dest_Trueprop
   134     val ts' = HOLogic.dest_conj (HOLogic.dest_Trueprop
   135       (Logic.strip_imp_concl (List.nth (prems_of st, i - 1))));
   135       (Logic.strip_imp_concl (nth (prems_of st) (i - 1))));
   136     val getP = if can HOLogic.dest_imp (hd ts) then
   136     val getP = if can HOLogic.dest_imp (hd ts) then
   137       (apfst SOME) o HOLogic.dest_imp else pair NONE;
   137       (apfst SOME) o HOLogic.dest_imp else pair NONE;
   138     val flt = if null indnames then I else
   138     val flt = if null indnames then I else
   139       filter (fn Free (s, _) => member (op =) indnames s | _ => false);
   139       filter (fn Free (s, _) => member (op =) indnames s | _ => false);
   140     fun abstr (t1, t2) = (case t1 of
   140     fun abstr (t1, t2) = (case t1 of