src/HOL/Tools/old_primrec.ML
changeset 36692 54b64d4ad524
parent 36610 bafd82950e24
child 39557 fe5722fce758
equal deleted inserted replaced
36674:d95f39448121 36692:54b64d4ad524
   118           |-> (fn t' => pair (Abs (a, T, t')))
   118           |-> (fn t' => pair (Abs (a, T, t')))
   119       | subst subs (t as (_ $ _)) fs =
   119       | subst subs (t as (_ $ _)) fs =
   120           let
   120           let
   121             val (f, ts) = strip_comb t;
   121             val (f, ts) = strip_comb t;
   122           in
   122           in
   123             if is_Const f andalso dest_Const f mem map fst rec_eqns then
   123             if is_Const f andalso member (op =) (map fst rec_eqns) (dest_Const f) then
   124               let
   124               let
   125                 val fnameT' as (fname', _) = dest_Const f;
   125                 val fnameT' as (fname', _) = dest_Const f;
   126                 val (_, rpos, _) = the (AList.lookup (op =) rec_eqns fnameT');
   126                 val (_, rpos, _) = the (AList.lookup (op =) rec_eqns fnameT');
   127                 val ls = take rpos ts;
   127                 val ls = take rpos ts;
   128                 val rest = drop rpos ts;
   128                 val rest = drop rpos ts;