234 | dest_imp t = raise TERM ("dest_imp", [t]); |
234 | dest_imp t = raise TERM ("dest_imp", [t]); |
235 |
235 |
236 fun dest_not (Const ("HOL.Not", _) $ t) = t |
236 fun dest_not (Const ("HOL.Not", _) $ t) = t |
237 | dest_not t = raise TERM ("dest_not", [t]); |
237 | dest_not t = raise TERM ("dest_not", [t]); |
238 |
238 |
239 fun eq_const T = Const ("op =", T --> T --> boolT); |
239 fun eq_const T = Const ("HOL.eq", T --> T --> boolT); |
240 fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u; |
240 fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u; |
241 |
241 |
242 fun dest_eq (Const ("op =", _) $ lhs $ rhs) = (lhs, rhs) |
242 fun dest_eq (Const ("HOL.eq", _) $ lhs $ rhs) = (lhs, rhs) |
243 | dest_eq t = raise TERM ("dest_eq", [t]) |
243 | dest_eq t = raise TERM ("dest_eq", [t]) |
244 |
244 |
245 fun all_const T = Const ("HOL.All", [T --> boolT] ---> boolT); |
245 fun all_const T = Const ("HOL.All", [T --> boolT] ---> boolT); |
246 fun mk_all (x, T, P) = all_const T $ absfree (x, T, P); |
246 fun mk_all (x, T, P) = all_const T $ absfree (x, T, P); |
247 fun list_all (xs, t) = fold_rev (fn (x, T) => fn P => all_const T $ Abs (x, T, P)) xs t; |
247 fun list_all (xs, t) = fold_rev (fn (x, T) => fn P => all_const T $ Abs (x, T, P)) xs t; |