src/HOL/Tools/Sledgehammer/sledgehammer_proof_methods.ML
changeset 57777 563df8185d98
parent 57776 1111a9a328fe
child 57948 75724d71013c
equal deleted inserted replaced
57776:1111a9a328fe 57777:563df8185d98
   177   let val s = string_of_play_outcome play in
   177   let val s = string_of_play_outcome play in
   178     banner ^ ": " ^ Active.sendback_markup [Markup.padding_command] command ^
   178     banner ^ ": " ^ Active.sendback_markup [Markup.padding_command] command ^
   179     (s |> s <> "" ? enclose " (" ")") ^ "."
   179     (s |> s <> "" ? enclose " (" ")") ^ "."
   180   end
   180   end
   181 
   181 
   182 fun split_used_facts facts =
       
   183   facts
       
   184   |> List.partition (fn (_, (sc, _)) => sc = Chained)
       
   185 
       
   186 fun one_line_proof_text ctxt num_chained
   182 fun one_line_proof_text ctxt num_chained
   187     ((used_facts, (meth, play)), banner, subgoal, subgoal_count) =
   183     ((used_facts, (meth, play)), banner, subgoal, subgoal_count) =
   188   let val (chained, extra) = split_used_facts used_facts in
   184   let val (chained, extra) = List.partition (fn (_, (sc, _)) => sc = Chained) used_facts in
   189     map fst extra
   185     map fst extra
   190     |> proof_method_command ctxt meth subgoal subgoal_count (map fst chained) num_chained
   186     |> proof_method_command ctxt meth subgoal subgoal_count (map fst chained) num_chained
   191     |> (if play = Play_Failed then enclose "One-line proof reconstruction failed: " "."
   187     |> (if play = Play_Failed then enclose "One-line proof reconstruction failed: " "."
   192         else try_command_line banner play)
   188         else try_command_line banner play)
   193   end
   189   end