src/Pure/Proof/proof_syntax.ML
changeset 26626 c6231d64d264
parent 25245 1fcfcdcba53c
child 26939 1035c89b4c02
equal deleted inserted replaced
26625:e0cc4169626e 26626:c6231d64d264
   257       (map (NameSpace.append "thm") thm_names @ map (NameSpace.append "axm") axm_names)
   257       (map (NameSpace.append "thm") thm_names @ map (NameSpace.append "axm") axm_names)
   258   end;
   258   end;
   259 
   259 
   260 fun proof_of full thm =
   260 fun proof_of full thm =
   261   let
   261   let
   262     val {thy, der = (_, prf), ...} = Thm.rep_thm thm;
   262     val thy = Thm.theory_of_thm thm;
   263     val prop = Thm.full_prop_of thm;
   263     val prop = Thm.full_prop_of thm;
       
   264     val prf = Thm.proof_of thm;
   264     val prf' = (case strip_combt (fst (strip_combP prf)) of
   265     val prf' = (case strip_combt (fst (strip_combP prf)) of
   265         (PThm (_, prf', prop', _), _) => if prop = prop' then prf' else prf
   266         (PThm (_, prf', prop', _), _) => if prop = prop' then prf' else prf
   266       | _ => prf)
   267       | _ => prf)
   267   in if full then Reconstruct.reconstruct_proof thy prop prf' else prf' end;
   268   in if full then Reconstruct.reconstruct_proof thy prop prf' else prf' end;
   268 
   269