src/Pure/Proof/proof_syntax.ML
changeset 12909 d3ad295a087a
parent 11839 3ef83c265aca
child 13199 18402c1f76bf
equal deleted inserted replaced
12908:53bfe07a7916 12909:d3ad295a087a
   119   in (rename prf, tab) end;
   119   in (rename prf, tab) end;
   120 
   120 
   121 
   121 
   122 (**** translation between proof terms and pure terms ****)
   122 (**** translation between proof terms and pure terms ****)
   123 
   123 
   124 fun change_type T (PThm (name, prf, prop, _)) = PThm (name, prf, prop, T)
       
   125   | change_type T (PAxm (name, prop, _)) = PAxm (name, prop, T)
       
   126   | change_type _ _ = error "Not a proper theorem";
       
   127 
       
   128 fun proof_of_term thy tab ty =
   124 fun proof_of_term thy tab ty =
   129   let
   125   let
   130     val thys = thy :: Theory.ancestors_of thy;
   126     val thys = thy :: Theory.ancestors_of thy;
   131     val thms = flat (map thms_of thys);
   127     val thms = flat (map thms_of thys);
   132     val axms = flat (map (Symtab.dest o #axioms o rep_theory) thys);
   128     val axms = flat (map (Symtab.dest o #axioms o rep_theory) thys);