equal
deleted
inserted
replaced
43 val is_Var: term -> bool |
43 val is_Var: term -> bool |
44 val is_TVar: typ -> bool |
44 val is_TVar: typ -> bool |
45 val dest_Const: term -> string * typ |
45 val dest_Const: term -> string * typ |
46 val dest_Free: term -> string * typ |
46 val dest_Free: term -> string * typ |
47 val dest_Var: term -> indexname * typ |
47 val dest_Var: term -> indexname * typ |
|
48 val dest_comb: term -> term * term |
48 val domain_type: typ -> typ |
49 val domain_type: typ -> typ |
49 val range_type: typ -> typ |
50 val range_type: typ -> typ |
50 val binder_types: typ -> typ list |
51 val binder_types: typ -> typ list |
51 val body_type: typ -> typ |
52 val body_type: typ -> typ |
52 val strip_type: typ -> typ list * typ |
53 val strip_type: typ -> typ list * typ |
276 | dest_Free t = raise TERM("dest_Free", [t]); |
277 | dest_Free t = raise TERM("dest_Free", [t]); |
277 |
278 |
278 fun dest_Var (Var x) = x |
279 fun dest_Var (Var x) = x |
279 | dest_Var t = raise TERM("dest_Var", [t]); |
280 | dest_Var t = raise TERM("dest_Var", [t]); |
280 |
281 |
|
282 fun dest_comb (t1 $ t2) = (t1, t2) |
|
283 | dest_comb t = raise TERM("dest_comb", [t]); |
|
284 |
281 |
285 |
282 fun domain_type (Type("fun", [T,_])) = T |
286 fun domain_type (Type("fun", [T,_])) = T |
283 and range_type (Type("fun", [_,T])) = T; |
287 and range_type (Type("fun", [_,T])) = T; |
284 |
288 |
285 (* maps [T1,...,Tn]--->T to the list [T1,T2,...,Tn]*) |
289 (* maps [T1,...,Tn]--->T to the list [T1,T2,...,Tn]*) |