src/Pure/Proof/extraction.ML
changeset 26626 c6231d64d264
parent 26481 92e901171cc8
child 26653 60e0cf6bef89
equal deleted inserted replaced
26625:e0cc4169626e 26626:c6231d64d264
   709 
   709 
   710       | extr d defs vs ts Ts hs _ = error "extr: bad proof";
   710       | extr d defs vs ts Ts hs _ = error "extr: bad proof";
   711 
   711 
   712     fun prep_thm (thm, vs) =
   712     fun prep_thm (thm, vs) =
   713       let
   713       let
   714         val {prop, der = (_, prf), thy, ...} = rep_thm thm;
   714         val thy = Thm.theory_of_thm thm;
       
   715         val prop = Thm.prop_of thm;
       
   716         val prf = Thm.proof_of thm;
   715         val name = Thm.get_name thm;
   717         val name = Thm.get_name thm;
   716         val _ = name <> "" orelse error "extraction: unnamed theorem";
   718         val _ = name <> "" orelse error "extraction: unnamed theorem";
   717         val _ = etype_of thy' vs [] prop <> nullT orelse error ("theorem " ^
   719         val _ = etype_of thy' vs [] prop <> nullT orelse error ("theorem " ^
   718           quote name ^ " has no computational content")
   720           quote name ^ " has no computational content")
   719       in (Reconstruct.reconstruct_proof thy prop prf, vs) end;
   721       in (Reconstruct.reconstruct_proof thy prop prf, vs) end;