another concession to backward compatibility
authorblanchet
Thu, 12 May 2011 15:29:19 +0200
changeset 42760 d83802e7348e
parent 42759 fdd15e889ad7
child 42761 8ea9c6fa8b53
another concession to backward compatibility
src/HOL/Metis_Examples/HO_Reas.thy
src/HOL/Tools/Meson/meson.ML
--- a/src/HOL/Metis_Examples/HO_Reas.thy	Thu May 12 15:29:19 2011 +0200
+++ b/src/HOL/Metis_Examples/HO_Reas.thy	Thu May 12 15:29:19 2011 +0200
@@ -28,10 +28,6 @@
 sledgehammer [expect = some] (inc_def)
 by (metis inc_def)
 
-lemma "(\<lambda>y. y + 1) = inc"
-sledgehammer [expect = some] (inc_def)
-by (metis inc_def)
-
 definition add_swap :: "nat \<Rightarrow> nat \<Rightarrow> nat" where
 "add_swap = (\<lambda>x y. y + x)"
 
--- a/src/HOL/Tools/Meson/meson.ML	Thu May 12 15:29:19 2011 +0200
+++ b/src/HOL/Tools/Meson/meson.ML	Thu May 12 15:29:19 2011 +0200
@@ -616,18 +616,14 @@
     skolemize_with_choice_theorems ctxt (choice_theorems thy)
   end
 
-fun is_Abs (Abs _) = true
-  | is_Abs _ = false
-
-(* Removes the lambdas from an equation of the form "t = (%x. u)".  *)
+(* Removes the lambdas from an equation of the form "t = (%x1 ... xn. u)". It
+   would be desirable to do this symmetrically but there's at least one existing
+   proof in "Tarski" that relies on the current behavior. *)
 fun extensionalize_conv ctxt ct =
   case term_of ct of
-    Const (@{const_name HOL.eq}, _) $ t1 $ t2 =>
-    ct |> (if is_Abs t1 orelse is_Abs t2 then
-             Conv.rewr_conv @{thm fun_eq_iff [THEN eq_reflection]}
-             then_conv extensionalize_conv ctxt
-           else
-             Conv.comb_conv (extensionalize_conv ctxt))
+    Const (@{const_name HOL.eq}, _) $ _ $ Abs _ =>
+    ct |> (Conv.rewr_conv @{thm fun_eq_iff [THEN eq_reflection]}
+           then_conv extensionalize_conv ctxt)
   | _ $ _ => Conv.comb_conv (extensionalize_conv ctxt) ct
   | Abs _ => Conv.abs_conv (extensionalize_conv o snd) ctxt ct
   | _ => Conv.all_conv ct