src/HOL/Matrix_LP/Compute_Oracle/compute.ML
changeset 61039 80f40d89dab6
parent 60948 b710a5087116
child 62870 cf724647f75b
equal deleted inserted replaced
61038:9c28a4feebd1 61039:80f40d89dab6
   189 
   189 
   190 
   190 
   191 datatype cthm = ComputeThm of term list * sort list * term
   191 datatype cthm = ComputeThm of term list * sort list * term
   192 
   192 
   193 fun thm2cthm th = 
   193 fun thm2cthm th = 
   194     let
   194     (if not (null (Thm.tpairs_of th)) then raise Make "theorems may not contain tpairs" else ();
   195         val {hyps, prop, tpairs, shyps, ...} = Thm.rep_thm th
   195      ComputeThm (Thm.hyps_of th, Thm.shyps_of th, Thm.prop_of th))
   196         val _ = if not (null tpairs) then raise Make "theorems may not contain tpairs" else ()
       
   197     in
       
   198         ComputeThm (hyps, shyps, prop)
       
   199     end
       
   200 
   196 
   201 fun make_internal machine thy stamp encoding cache_pattern_terms raw_ths =
   197 fun make_internal machine thy stamp encoding cache_pattern_terms raw_ths =
   202     let
   198     let
   203         fun transfer (x:thm) = Thm.transfer thy x
   199         fun transfer (x:thm) = Thm.transfer thy x
   204         val ths = map (thm2cthm o Thm.strip_shyps o transfer) raw_ths
   200         val ths = map (thm2cthm o Thm.strip_shyps o transfer) raw_ths