431 val (foundo, thms) = find_theorems ctxt opt_goal opt_limit rem_dups raw_criteria; |
431 val (foundo, thms) = find_theorems ctxt opt_goal opt_limit rem_dups raw_criteria; |
432 val returned = length thms; |
432 val returned = length thms; |
433 |
433 |
434 val tally_msg = |
434 val tally_msg = |
435 (case foundo of |
435 (case foundo of |
436 NONE => "displaying " ^ string_of_int returned ^ " theorems" |
436 NONE => "displaying " ^ string_of_int returned ^ " theorem(s)" |
437 | SOME found => |
437 | SOME found => |
438 "found " ^ string_of_int found ^ " theorems" ^ |
438 "found " ^ string_of_int found ^ " theorem(s)" ^ |
439 (if returned < found |
439 (if returned < found |
440 then " (" ^ string_of_int returned ^ " displayed)" |
440 then " (" ^ string_of_int returned ^ " displayed)" |
441 else "")); |
441 else "")); |
442 |
442 |
443 val end_msg = " in " ^ Time.toString (#cpu (end_timing start)) ^ " secs"; |
443 val end_msg = " in " ^ Time.toString (#cpu (end_timing start)) ^ " secs"; |
444 in |
444 in |
445 Pretty.big_list "searched for:" (map (pretty_criterion ctxt) criteria) |
445 Pretty.big_list "searched for:" (map (pretty_criterion ctxt) criteria) :: |
446 :: Pretty.str "" :: |
446 Pretty.str "" :: |
447 (if null thms then [Pretty.str ("nothing found" ^ end_msg)] |
447 (if null thms then [Pretty.str ("nothing found" ^ end_msg)] |
448 else |
448 else |
449 [Pretty.str (tally_msg ^ end_msg ^ ":"), Pretty.str ""] @ |
449 [Pretty.str (tally_msg ^ end_msg ^ ":"), Pretty.str ""] @ |
450 map (pretty_thm ctxt) thms) |
450 map (pretty_thm ctxt) thms) |
451 |> Pretty.chunks |> Pretty.writeln |
451 end |> Pretty.chunks |> Pretty.writeln; |
452 end; |
|
453 |
452 |
454 |
453 |
455 |
454 |
456 (** command syntax **) |
455 (** command syntax **) |
457 |
456 |