equal
deleted
inserted
replaced
221 | check_arg _ = false; |
221 | check_arg _ = false; |
222 fun close_arg (Bound _) t = t |
222 fun close_arg (Bound _) t = t |
223 | close_arg x t = Term.all (Term.fastype_of x) $ lambda x t; |
223 | close_arg x t = Term.all (Term.fastype_of x) $ lambda x t; |
224 |
224 |
225 val lhs_bads = filter_out check_arg args; |
225 val lhs_bads = filter_out check_arg args; |
226 val lhs_dups = gen_duplicates (op aconv) args; |
226 val lhs_dups = duplicates (op aconv) args; |
227 val rhs_extras = Term.fold_aterms (fn v as Free (x, _) => |
227 val rhs_extras = Term.fold_aterms (fn v as Free (x, _) => |
228 if is_fixed x orelse member (op aconv) args v then I |
228 if is_fixed x orelse member (op aconv) args v then I |
229 else insert (op aconv) v | _ => I) rhs []; |
229 else insert (op aconv) v | _ => I) rhs []; |
230 val rhs_extrasT = Term.fold_aterms (Term.fold_types (fn v as TFree (a, S) => |
230 val rhs_extrasT = Term.fold_aterms (Term.fold_types (fn v as TFree (a, S) => |
231 if is_fixedT a orelse member (op =) head_tfrees (a, S) then I |
231 if is_fixedT a orelse member (op =) head_tfrees (a, S) then I |