generate_fresh works even if there is no free variable in the goal
authornarboux
Wed, 13 Jun 2007 11:16:24 +0200
changeset 23368 ad690b9bca1c
parent 23367 05f399115ba5
child 23369 227c51012cdb
generate_fresh works even if there is no free variable in the goal
src/HOL/Nominal/nominal_fresh_fun.ML
--- a/src/HOL/Nominal/nominal_fresh_fun.ML	Wed Jun 13 10:44:35 2007 +0200
+++ b/src/HOL/Nominal/nominal_fresh_fun.ML	Wed Jun 13 11:16:24 2007 +0200
@@ -86,9 +86,8 @@
    val vs = filter (fn t => is_of_fs_name (fastype_of1 (Ts, t)))
      (term_frees goal @ bvs);
 (* build the tuple *)
-   val s = Library.foldr1 (fn (v, s) =>
-     HOLogic.pair_const (fastype_of1 (Ts, v)) (fastype_of1 (Ts, s)) $ v $ s)
-       vs;
+   val s = (Library.foldr1 (fn (v, s) =>
+     HOLogic.pair_const (fastype_of1 (Ts, v)) (fastype_of1 (Ts, s)) $ v $ s) vs) handle _ => HOLogic.unit ;
    val fs_name_thm = get_dyn_thm thy ("fs_"^atom_basename^"1") atom_basename;
    val at_name_inst_thm = get_dyn_thm thy ("at_"^atom_basename^"_inst") atom_basename;
    val exists_fresh' = at_name_inst_thm RS at_exists_fresh';