src/Pure/Thy/thm_database.ML
changeset 5155 21177b8a4d7f
parent 5090 75ac9b451ae0
child 5346 bc9748ad8491
equal deleted inserted replaced
5154:40fd46f3d3a1 5155:21177b8a4d7f
   118 fun prems_of_goal i =
   118 fun prems_of_goal i =
   119   let val (gi,frees) = goal_params i
   119   let val (gi,frees) = goal_params i
   120       val As = Logic.strip_assums_hyp gi
   120       val As = Logic.strip_assums_hyp gi
   121   in map (fn A => subst_bounds(frees,A)) As end;
   121   in map (fn A => subst_bounds(frees,A)) As end;
   122 
   122 
       
   123 (*returns all those named_thms whose subterm extracted by extract can be
       
   124   instantiated to obj; the list is sorted according to the number of premises
       
   125   and the size of the required substitution.*)
   123 fun select_match(obj, signobj, named_thms, extract) =
   126 fun select_match(obj, signobj, named_thms, extract) =
   124   let fun matches(prop, tsig) =
   127   let fun matches(prop, tsig) =
   125             case extract prop of
   128             case extract prop of
   126               None => false
   129               None => false
   127             | Some pat => Pattern.matches tsig (pat, obj);
   130             | Some pat => Pattern.matches tsig (pat, obj);