equal
deleted
inserted
replaced
279 | Bound _ => t |
279 | Bound _ => t |
280 | Abs (s, T, t') => |
280 | Abs (s, T, t') => |
281 Abs (s, T, do_term (T :: new_Ts) (T :: old_Ts) Neut t') |
281 Abs (s, T, do_term (T :: new_Ts) (T :: old_Ts) Neut t') |
282 in do_term [] [] Pos orig_t end |
282 in do_term [] [] Pos orig_t end |
283 |
283 |
|
284 (** Destruction of set membership and comprehensions **) |
|
285 |
|
286 fun destroy_set_Collect (Const (@{const_name Set.member}, _) $ t1 |
|
287 $ (Const (@{const_name Collect}, _) $ t2)) = |
|
288 destroy_set_Collect (t2 $ t1) |
|
289 | destroy_set_Collect (t1 $ t2) = |
|
290 destroy_set_Collect t1 $ destroy_set_Collect t2 |
|
291 | destroy_set_Collect (Abs (s, T, t')) = Abs (s, T, destroy_set_Collect t') |
|
292 | destroy_set_Collect t = t |
|
293 |
284 (** Destruction of constructors **) |
294 (** Destruction of constructors **) |
285 |
295 |
286 val val_var_prefix = nitpick_prefix ^ "v" |
296 val val_var_prefix = nitpick_prefix ^ "v" |
287 |
297 |
288 fun fresh_value_var Ts k n j t = |
298 fun fresh_value_var Ts k n j t = |
1266 fun do_middle def = |
1276 fun do_middle def = |
1267 binarize ? binarize_nat_and_int_in_term |
1277 binarize ? binarize_nat_and_int_in_term |
1268 #> box ? uncurry_term table |
1278 #> box ? uncurry_term table |
1269 #> box ? box_fun_and_pair_in_term hol_ctxt def |
1279 #> box ? box_fun_and_pair_in_term hol_ctxt def |
1270 fun do_tail def = |
1280 fun do_tail def = |
1271 destroy_constrs ? (pull_out_universal_constrs hol_ctxt def |
1281 destroy_set_Collect |
1272 #> pull_out_existential_constrs hol_ctxt) |
1282 #> destroy_constrs ? (pull_out_universal_constrs hol_ctxt def |
|
1283 #> pull_out_existential_constrs hol_ctxt) |
1273 #> destroy_pulled_out_constrs hol_ctxt def destroy_constrs |
1284 #> destroy_pulled_out_constrs hol_ctxt def destroy_constrs |
1274 #> curry_assms |
1285 #> curry_assms |
1275 #> destroy_universal_equalities |
1286 #> destroy_universal_equalities |
1276 #> destroy_existential_equalities hol_ctxt |
1287 #> destroy_existential_equalities hol_ctxt |
1277 #> simplify_constrs_and_sels ctxt |
1288 #> simplify_constrs_and_sels ctxt |