src/Pure/proofterm.ML
changeset 19012 2577ac76cdc6
parent 18928 042608ffa2ec
child 19222 111ba44c66b2
equal deleted inserted replaced
19011:d1c3294ca417 19012:2577ac76cdc6
   911       | shrink' ls lev ts prfs prf =
   911       | shrink' ls lev ts prfs prf =
   912           let
   912           let
   913             val prop = (case prf of PThm (_, _, prop, _) => prop | PAxm (_, prop, _) => prop
   913             val prop = (case prf of PThm (_, _, prop, _) => prop | PAxm (_, prop, _) => prop
   914               | Oracle (_, prop, _) => prop | _ => error "shrink: proof not in normal form");
   914               | Oracle (_, prop, _) => prop | _ => error "shrink: proof not in normal form");
   915             val vs = vars_of prop;
   915             val vs = vars_of prop;
   916             val (ts', ts'') = splitAt (length vs, ts)
   916             val (ts', ts'') = chop (length vs) ts;
   917             val insts = Library.take (length ts', map (fst o dest_Var) vs) ~~ ts';
   917             val insts = Library.take (length ts', map (fst o dest_Var) vs) ~~ ts';
   918             val nvs = Library.foldl (fn (ixns', (ixn, ixns)) =>
   918             val nvs = Library.foldl (fn (ixns', (ixn, ixns)) =>
   919               insert (op =) ixn (case AList.lookup (op =) insts ixn of
   919               insert (op =) ixn (case AList.lookup (op =) insts ixn of
   920                   SOME (SOME t) => if is_proj t then ixns union ixns' else ixns'
   920                   SOME (SOME t) => if is_proj t then ixns union ixns' else ixns'
   921                 | _ => ixns union ixns'))
   921                 | _ => ixns union ixns'))