src/Pure/raw_simplifier.ML
changeset 74525 c960bfcb91db
parent 74518 de4f151c2a34
child 74561 8e6c973003c8
equal deleted inserted replaced
74524:8ee3d5d3c1bf 74525:c960bfcb91db
  1128       | NONE => Thm.reflexive t)
  1128       | NONE => Thm.reflexive t)
  1129 
  1129 
  1130     and subc skel ctxt t0 =
  1130     and subc skel ctxt t0 =
  1131         let val Simpset (_, {congs, ...}) = simpset_of ctxt in
  1131         let val Simpset (_, {congs, ...}) = simpset_of ctxt in
  1132           (case Thm.term_of t0 of
  1132           (case Thm.term_of t0 of
  1133               Abs (a, T, _) =>
  1133               Abs (a, _, _) =>
  1134                 let
  1134                 let
  1135                     val (v, ctxt') = Variable.next_bound (a, T) ctxt;
  1135                   val ((v, t'), ctxt') = Variable.dest_abs_cterm t0 ctxt;
  1136                     val b = #1 (Term.dest_Free v);
  1136                   val skel' = (case skel of Abs (_, _, sk) => sk | _ => skel0);
  1137                     val (v', t') = Thm.dest_abs_name b t0;
       
  1138                     val b' = #1 (Term.dest_Free (Thm.term_of v'));
       
  1139                     val _ =
       
  1140                       if b <> b' then
       
  1141                         warning ("Bad Simplifier context: renamed bound variable " ^
       
  1142                           quote b ^ " to " ^ quote b' ^ Position.here (Position.thread_data ()))
       
  1143                       else ();
       
  1144                     val skel' = (case skel of Abs (_, _, sk) => sk | _ => skel0);
       
  1145                 in
  1137                 in
  1146                   (case botc skel' ctxt' t' of
  1138                   (case botc skel' ctxt' t' of
  1147                     SOME thm => SOME (Thm.abstract_rule a v' thm)
  1139                     SOME thm => SOME (Thm.abstract_rule a v thm)
  1148                   | NONE => NONE)
  1140                   | NONE => NONE)
  1149                 end
  1141                 end
  1150             | t $ _ =>
  1142             | t $ _ =>
  1151               (case t of
  1143               (case t of
  1152                 Const ("Pure.imp", _) $ _  => impc t0 ctxt
  1144                 Const ("Pure.imp", _) $ _  => impc t0 ctxt