130 |> writeln |
130 |> writeln |
131 else |
131 else |
132 (); |
132 (); |
133 (case par_map (fn f => f mode timeout_opt quad st) apply_methods of |
133 (case par_map (fn f => f mode timeout_opt quad st) apply_methods of |
134 [] => |
134 [] => |
135 (if mode = Normal then writeln "No proof found." else (); (false, (noneN, []))) |
135 (if mode = Normal then writeln "No proof found" else (); (false, (noneN, []))) |
136 | xs as (name, command, _) :: _ => |
136 | xs as (name, command, _) :: _ => |
137 let |
137 let |
138 val xs = xs |> map (fn (name, _, n) => (n, name)) |
138 val xs = xs |> map (fn (name, _, n) => (n, name)) |
139 |> AList.coalesce (op =) |
139 |> AList.coalesce (op =) |
140 |> map (swap o apsnd commas) |
140 |> map (swap o apsnd commas); |
141 val message = |
141 val message = |
142 (case mode of |
142 (case mode of |
143 Auto_Try => "Auto Try0 found a proof" |
143 Auto_Try => "Auto Try0 found a proof" |
144 | Try => "Try0 found a proof" |
144 | Try => "Try0 found a proof" |
145 | Normal => "Try this") ^ ": " ^ |
145 | Normal => "Try this") ^ ": " ^ |
146 Active.sendback_markup_command |
146 Active.sendback_markup_command |
147 ((if Thm.nprems_of (#goal (Proof.goal st)) = 1 then "by" |
147 ((if Thm.nprems_of (#goal (Proof.goal st)) = 1 then "by" |
148 else "apply") ^ " " ^ command) ^ |
148 else "apply") ^ " " ^ command) ^ |
149 (case xs of |
149 (case xs of |
150 [(_, ms)] => " (" ^ time_string ms ^ ")." |
150 [(_, ms)] => " (" ^ time_string ms ^ ")" |
151 | xs => "\n(" ^ space_implode "; " (map tool_time_string xs) ^ ").") |
151 | xs => "\n(" ^ space_implode "; " (map tool_time_string xs) ^ ")"); |
152 in |
152 in |
153 (true, (name, if mode = Auto_Try then [message] else (writeln message; []))) |
153 (true, (name, if mode = Auto_Try then [message] else (writeln message; []))) |
154 end) |
154 end) |
155 end; |
155 end; |
156 |
156 |