src/HOL/Import/proof_kernel.ML
changeset 17324 0a5eebd5ff58
parent 17322 781abf7011e6
child 17328 7bbfb79eda96
equal deleted inserted replaced
17323:2fc68de9de1f 17324:0a5eebd5ff58
   119 type term = Term.term
   119 type term = Term.term
   120 datatype tag = Tag of string list
   120 datatype tag = Tag of string list
   121 type ('a,'b) subst = ('a * 'b) list
   121 type ('a,'b) subst = ('a * 'b) list
   122 datatype thm = HOLThm of (Term.term * Term.term) list * Thm.thm
   122 datatype thm = HOLThm of (Term.term * Term.term) list * Thm.thm
   123 
   123 
       
   124 fun hthm2thm (HOLThm (_, th)) = th 
       
   125 
   124 datatype proof_info
   126 datatype proof_info
   125   = Info of {disk_info: (string * string) option ref}
   127   = Info of {disk_info: (string * string) option ref}
   126 	    
   128 	    
   127 datatype proof = Proof of proof_info * proof_content
   129 datatype proof = Proof of proof_info * proof_content
   128      and proof_content
   130      and proof_content
  1094 
  1096 
  1095 fun disamb_thm_from info (HOLThm (_,thm)) = (info, thm)
  1097 fun disamb_thm_from info (HOLThm (_,thm)) = (info, thm)
  1096 
  1098 
  1097 fun disamb_terms_from info tms = (info, tms)
  1099 fun disamb_terms_from info tms = (info, tms)
  1098 
  1100 
  1099 fun disamb_thms_from info hthms =
  1101 fun disamb_thms_from info hthms = (info, map hthm2thm hthms)
  1100     foldr (fn (hthm,(info,thms)) =>
       
  1101 	      let
       
  1102 		  val (info',tm') = disamb_thm_from info hthm
       
  1103 	      in
       
  1104 		  (info',tm'::thms)
       
  1105 	      end)
       
  1106 	  (info,[]) hthms
       
  1107 
  1102 
  1108 fun disamb_term tm   = disamb_term_from disamb_info_empty tm
  1103 fun disamb_term tm   = disamb_term_from disamb_info_empty tm
  1109 fun disamb_terms tms = disamb_terms_from disamb_info_empty tms
  1104 fun disamb_terms tms = disamb_terms_from disamb_info_empty tms
  1110 fun disamb_thm thm   = disamb_thm_from disamb_info_empty thm
  1105 fun disamb_thm thm   = disamb_thm_from disamb_info_empty thm
  1111 fun disamb_thms thms = disamb_thms_from disamb_info_empty thms
  1106 fun disamb_thms thms = disamb_thms_from disamb_info_empty thms