src/Pure/goals.ML
changeset 2126 d927beecedf8
parent 1928 3d1d73e3d185
child 2169 31ba286f2307
equal deleted inserted replaced
2125:92a08ee6a9cb 2126:d927beecedf8
   277 fun filter_goal could ths i = filter_thms could (999, getgoal i, ths);
   277 fun filter_goal could ths i = filter_thms could (999, getgoal i, ths);
   278 
   278 
   279 (*For inspecting earlier levels of the backward proof*)
   279 (*For inspecting earlier levels of the backward proof*)
   280 fun chop_level n (pair,pairs) = 
   280 fun chop_level n (pair,pairs) = 
   281   let val level = length pairs
   281   let val level = length pairs
   282   in  if 0<=n andalso n<= level
   282   in  if n<0 andalso ~n <= level
       
   283       then  drop (~n, pair::pairs) 
       
   284       else if 0<=n andalso n<= level
   283       then  drop (level - n, pair::pairs) 
   285       then  drop (level - n, pair::pairs) 
   284       else  error ("Level number must lie between 0 and " ^ 
   286       else  error ("Level number must lie between 0 and " ^ 
   285 		   string_of_int level)
   287 		   string_of_int level)
   286   end;
   288   end;
   287 
   289