src/Pure/Tools/rule_insts.ML
changeset 74235 dbaed92fd8af
parent 74232 1091880266e5
child 74241 eb265f54e3ce
equal deleted inserted replaced
74234:4f2bd13edce3 74235:dbaed92fd8af
   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