equal
deleted
inserted
replaced
164 end |
164 end |
165 |
165 |
166 structure Predicate_Compile_Aux : PREDICATE_COMPILE_AUX = |
166 structure Predicate_Compile_Aux : PREDICATE_COMPILE_AUX = |
167 struct |
167 struct |
168 |
168 |
|
169 val no_constr = [@{const_name STR}]; |
|
170 |
169 (* general functions *) |
171 (* general functions *) |
170 |
172 |
171 fun comb_option f (SOME x1, SOME x2) = SOME (f (x1, x2)) |
173 fun comb_option f (SOME x1, SOME x2) = SOME (f (x1, x2)) |
172 | comb_option f (NONE, SOME x2) = SOME x2 |
174 | comb_option f (NONE, SOME x2) = SOME x2 |
173 | comb_option f (SOME x1, NONE) = SOME x1 |
175 | comb_option f (SOME x1, NONE) = SOME x1 |
502 length ts = i andalso Tname = Tname' andalso forall check ts |
504 length ts = i andalso Tname = Tname' andalso forall check ts |
503 | _ => false) |
505 | _ => false) |
504 | _ => false) |
506 | _ => false) |
505 in check end |
507 in check end |
506 |
508 |
507 val is_constr = Code.is_constr o Proof_Context.theory_of |
509 fun is_constr ctxt c = |
|
510 not (member (op =) no_constr c) andalso Code.is_constr (Proof_Context.theory_of ctxt) c; |
508 |
511 |
509 fun strip_all t = (Term.strip_all_vars t, Term.strip_all_body t) |
512 fun strip_all t = (Term.strip_all_vars t, Term.strip_all_body t) |
510 |
513 |
511 fun strip_ex (Const (@{const_name Ex}, _) $ Abs (x, T, t)) = |
514 fun strip_ex (Const (@{const_name Ex}, _) $ Abs (x, T, t)) = |
512 let |
515 let |