equal
deleted
inserted
replaced
172 fun zip_vars _ [] = [] |
172 fun zip_vars _ [] = [] |
173 | zip_vars (_ :: xs) (NONE :: rest) = zip_vars xs rest |
173 | zip_vars (_ :: xs) (NONE :: rest) = zip_vars xs rest |
174 | zip_vars ((x, _) :: xs) (SOME t :: rest) = ((x, Position.none), t) :: zip_vars xs rest |
174 | zip_vars ((x, _) :: xs) (SOME t :: rest) = ((x, Position.none), t) :: zip_vars xs rest |
175 | zip_vars [] _ = error "More instantiations than variables in theorem"; |
175 | zip_vars [] _ = error "More instantiations than variables in theorem"; |
176 val insts = |
176 val insts = |
177 zip_vars (rev (Term.add_vars (Thm.full_prop_of thm) [])) args @ |
177 zip_vars (build_rev (Term.add_vars (Thm.full_prop_of thm))) args @ |
178 zip_vars (rev (Term.add_vars (Thm.concl_of thm) [])) concl_args; |
178 zip_vars (build_rev (Term.add_vars (Thm.concl_of thm))) concl_args; |
179 in where_rule ctxt insts fixes thm end; |
179 in where_rule ctxt insts fixes thm end; |
180 |
180 |
181 fun read_instantiate ctxt insts xs = |
181 fun read_instantiate ctxt insts xs = |
182 where_rule ctxt insts (map (fn x => (Binding.name x, NONE, NoSyn)) xs); |
182 where_rule ctxt insts (map (fn x => (Binding.name x, NONE, NoSyn)) xs); |
183 |
183 |