equal
deleted
inserted
replaced
59 (*--------------------------------------------------------------------------- |
59 (*--------------------------------------------------------------------------- |
60 * Some simple constructor functions. |
60 * Some simple constructor functions. |
61 *---------------------------------------------------------------------------*) |
61 *---------------------------------------------------------------------------*) |
62 |
62 |
63 fun mk_const sign pr = cterm_of sign (Const pr); |
63 fun mk_const sign pr = cterm_of sign (Const pr); |
64 val mk_hol_const = mk_const (sign_of HOL.thy); |
64 val mk_hol_const = mk_const (Theory.sign_of HOL.thy); |
65 |
65 |
66 fun mk_exists (r as (Bvar,Body)) = |
66 fun mk_exists (r as (Bvar,Body)) = |
67 let val ty = #T(rep_cterm Bvar) |
67 let val ty = #T(rep_cterm Bvar) |
68 val c = mk_hol_const("Ex", (ty --> HOLogic.boolT) --> HOLogic.boolT) |
68 val c = mk_hol_const("Ex", (ty --> HOLogic.boolT) --> HOLogic.boolT) |
69 in capply c (uncurry cabs r) |
69 in capply c (uncurry cabs r) |
179 |
179 |
180 |
180 |
181 (*--------------------------------------------------------------------------- |
181 (*--------------------------------------------------------------------------- |
182 * Going into and out of prop |
182 * Going into and out of prop |
183 *---------------------------------------------------------------------------*) |
183 *---------------------------------------------------------------------------*) |
184 local val prop = cterm_of (sign_of HOL.thy) (read"Trueprop") |
184 local val prop = cterm_of (Theory.sign_of HOL.thy) (read"Trueprop") |
185 in fun mk_prop ctm = |
185 in fun mk_prop ctm = |
186 case (#t(rep_cterm ctm)) |
186 case (#t(rep_cterm ctm)) |
187 of (Const("Trueprop",_)$_) => ctm |
187 of (Const("Trueprop",_)$_) => ctm |
188 | _ => capply prop ctm |
188 | _ => capply prop ctm |
189 end; |
189 end; |