equal
deleted
inserted
replaced
180 fun proof_of full thm = |
180 fun proof_of full thm = |
181 let |
181 let |
182 val thy = Thm.theory_of_thm thm; |
182 val thy = Thm.theory_of_thm thm; |
183 val prop = Thm.full_prop_of thm; |
183 val prop = Thm.full_prop_of thm; |
184 val prf = Thm.proof_of thm; |
184 val prf = Thm.proof_of thm; |
185 val prf' = |
185 in |
186 (case fst (Proofterm.strip_combt (fst (Proofterm.strip_combP prf))) of |
186 (case fst (Proofterm.strip_combt (fst (Proofterm.strip_combP prf))) of |
187 PThm ({prop = prop', ...}, thm_body) => |
187 PThm ({prop = prop', ...}, thm_body) => |
188 if prop = prop' then Proofterm.thm_body_proof_raw thm_body else prf |
188 if prop = prop' then Proofterm.thm_body_proof_raw thm_body else prf |
189 | _ => prf) |
189 | _ => prf) |
190 in if full then Proofterm.reconstruct_proof thy prop prf' else prf' end; |
190 |> full ? Proofterm.reconstruct_proof thy prop |
|
191 end; |
191 |
192 |
192 fun pretty_proof ctxt prf = |
193 fun pretty_proof ctxt prf = |
193 Proof_Context.pretty_term_abbrev |
194 Proof_Context.pretty_term_abbrev |
194 (Proof_Context.transfer (proof_syntax prf (Proof_Context.theory_of ctxt)) ctxt) |
195 (Proof_Context.transfer (proof_syntax prf (Proof_Context.theory_of ctxt)) ctxt) |
195 (Proofterm.term_of_proof prf); |
196 (Proofterm.term_of_proof prf); |