src/Pure/raw_simplifier.ML
changeset 55635 00e900057b38
parent 55377 d79c057c68f0
child 56245 84fc7dfa3cd4
     1.1 --- a/src/Pure/raw_simplifier.ML	Thu Feb 20 21:04:24 2014 +0100
     1.2 +++ b/src/Pure/raw_simplifier.ML	Thu Feb 20 21:27:14 2014 +0100
     1.3 @@ -1082,18 +1082,19 @@
     1.4            (case term_of t0 of
     1.5                Abs (a, T, _) =>
     1.6                  let
     1.7 -                    val (b, ctxt') = Variable.next_bound (a, T) ctxt;
     1.8 -                    val (v, t') = Thm.dest_abs (SOME b) t0;
     1.9 -                    val b' = #1 (Term.dest_Free (term_of v));
    1.10 +                    val (v, ctxt') = Variable.next_bound (a, T) ctxt;
    1.11 +                    val b = #1 (Term.dest_Free v);
    1.12 +                    val (v', t') = Thm.dest_abs (SOME b) t0;
    1.13 +                    val b' = #1 (Term.dest_Free (term_of v'));
    1.14                      val _ =
    1.15                        if b <> b' then
    1.16 -                        warning ("Simplifier: renamed bound variable " ^
    1.17 +                        warning ("Bad Simplifier context: renamed bound variable " ^
    1.18                            quote b ^ " to " ^ quote b' ^ Position.here (Position.thread_data ()))
    1.19                        else ();
    1.20                      val skel' = (case skel of Abs (_, _, sk) => sk | _ => skel0);
    1.21                  in
    1.22                    (case botc skel' ctxt' t' of
    1.23 -                    SOME thm => SOME (Thm.abstract_rule a v thm)
    1.24 +                    SOME thm => SOME (Thm.abstract_rule a v' thm)
    1.25                    | NONE => NONE)
    1.26                  end
    1.27              | t $ _ =>