equal
deleted
inserted
replaced
245 fst (fold_map rationalize_step steps subst_ctxt)) |
245 fst (fold_map rationalize_step steps subst_ctxt)) |
246 in |
246 in |
247 rationalize_proof ([], ctxt) |
247 rationalize_proof ([], ctxt) |
248 end |
248 end |
249 |
249 |
250 val thesis_var = HOLogic.mk_Trueprop (Var ((Auto_Bind.thesisN, 0), HOLogic.boolT)) |
250 val thesis_var = ((Auto_Bind.thesisN, 0), HOLogic.boolT) |
|
251 |
|
252 fun is_thesis ctxt t = |
|
253 (case Vartab.lookup (Variable.binds_of ctxt) (fst thesis_var) of |
|
254 SOME (_, t') => HOLogic.mk_Trueprop t' aconv t |
|
255 | NONE => false) |
|
256 |
251 val indent_size = 2 |
257 val indent_size = 2 |
252 |
258 |
253 fun string_of_isar_proof ctxt0 i n proof = |
259 fun string_of_isar_proof ctxt0 i n proof = |
254 let |
260 let |
255 (* Make sure only type constraints inserted by the type annotation code are printed. *) |
261 (* Make sure only type constraints inserted by the type annotation code are printed. *) |
341 | _ => |
347 | _ => |
342 add_str (of_obtain qs (length subs) ^ " ") |
348 add_str (of_obtain qs (length subs) ^ " ") |
343 #> add_frees xs |
349 #> add_frees xs |
344 #> add_str (" where\n" ^ of_indent (ind + 1))) |
350 #> add_str (" where\n" ^ of_indent (ind + 1))) |
345 #> add_str (of_label l) |
351 #> add_str (of_label l) |
346 #> add_term (if member (op =) qs Show then thesis_var else t) |
352 #> add_term (if is_thesis ctxt t then HOLogic.mk_Trueprop (Var thesis_var) else t) |
347 #> add_str ("\n" ^ of_indent (ind + 1) ^ of_method ls ss meth ^ |
353 #> add_str ("\n" ^ of_indent (ind + 1) ^ of_method ls ss meth ^ |
348 (if comment = "" then "" else " (* " ^ comment ^ " *)") ^ "\n") |
354 (if comment = "" then "" else " (* " ^ comment ^ " *)") ^ "\n") |
349 and add_steps ind = fold (add_step ind) |
355 and add_steps ind = fold (add_step ind) |
350 and of_proof ind ctxt (Proof (xs, assms, steps)) = |
356 and of_proof ind ctxt (Proof (xs, assms, steps)) = |
351 ("", ctxt) |
357 ("", ctxt) |