src/HOL/Tools/SMT2/smt2_util.ML
changeset 56245 84fc7dfa3cd4
parent 56090 34bd10a9a2ad
child 57229 489083abce44
equal deleted inserted replaced
56244:3298b7a2795a 56245:84fc7dfa3cd4
   183 fun dest_cprop ct =
   183 fun dest_cprop ct =
   184   (case Thm.term_of ct of
   184   (case Thm.term_of ct of
   185     @{const Trueprop} $ _ => Thm.dest_arg ct
   185     @{const Trueprop} $ _ => Thm.dest_arg ct
   186   | _ => raise CTERM ("not a property", [ct]))
   186   | _ => raise CTERM ("not a property", [ct]))
   187 
   187 
   188 val equals = mk_const_pat @{theory} @{const_name "=="} destT1
   188 val equals = mk_const_pat @{theory} @{const_name Pure.eq} destT1
   189 fun mk_cequals ct cu = Thm.mk_binop (instT' ct equals) ct cu
   189 fun mk_cequals ct cu = Thm.mk_binop (instT' ct equals) ct cu
   190 
   190 
   191 val dest_prop = (fn @{const Trueprop} $ t => t | t => t)
   191 val dest_prop = (fn @{const Trueprop} $ t => t | t => t)
   192 fun term_of ct = dest_prop (Thm.term_of ct)
   192 fun term_of ct = dest_prop (Thm.term_of ct)
   193 fun prop_of thm = dest_prop (Thm.prop_of thm)
   193 fun prop_of thm = dest_prop (Thm.prop_of thm)