src/Pure/pure_thy.ML
changeset 19046 bc5c6c9b114e
parent 18838 d32f70789342
child 19125 59b26248547b
equal deleted inserted replaced
19045:75786c2eb897 19046:bc5c6c9b114e
   310 fun thms_containing theory spec =
   310 fun thms_containing theory spec =
   311   (theory :: Theory.ancestors_of theory)
   311   (theory :: Theory.ancestors_of theory)
   312   |> map (fn thy =>
   312   |> map (fn thy =>
   313       FactIndex.find (fact_index_of thy) spec
   313       FactIndex.find (fact_index_of thy) spec
   314       |> List.filter (fn (name, ths) => valid_thms theory (Name name, ths))
   314       |> List.filter (fn (name, ths) => valid_thms theory (Name name, ths))
   315       |> gen_distinct (eq_fst (op =)))
   315       |> distinct (eq_fst (op =)))
   316   |> List.concat;
   316   |> List.concat;
   317 
   317 
   318 fun thms_containing_consts thy consts =
   318 fun thms_containing_consts thy consts =
   319   thms_containing thy (consts, []) |> map #2 |> List.concat
   319   thms_containing thy (consts, []) |> map #2 |> List.concat
   320   |> map (fn th => (Thm.name_of_thm th, th));
   320   |> map (fn th => (Thm.name_of_thm th, th));