Beta: equ and equ2 are not the same relations, equ2 seems not to be beta-eta equality.
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Fri, 16 Dec 2011 16:01:12 +0900
changeset 3066 da60dc911055
parent 3065 51ef8a3cb6ef
child 3075 31d51ce547b7
Beta: equ and equ2 are not the same relations, equ2 seems not to be beta-eta equality.
Nominal/Ex/Beta.thy
--- a/Nominal/Ex/Beta.thy	Thu Dec 15 16:20:42 2011 +0000
+++ b/Nominal/Ex/Beta.thy	Fri Dec 16 16:01:12 2011 +0900
@@ -145,9 +145,24 @@
 apply(auto)
 oops
 
-
+lemma "a \<noteq> x \<Longrightarrow> x \<noteq> y \<Longrightarrow> y \<noteq> a \<Longrightarrow> y \<noteq> b \<Longrightarrow> (App (App (Lam[x]. Lam[y]. (App (Var y) (Var x))) (Var a)) (Var b) \<approx> App (Var b) (Var a))"
+  apply (rule equ_trans)
+  apply (rule equ_App1)
+  apply (rule equ_beta)
+  apply (simp add: lam.fresh fresh_at_base)
+  apply (subst subst.simps)
+  apply (simp add: lam.fresh fresh_at_base)+
+  apply (rule equ_trans)
+  apply (rule equ_beta)
+  apply (simp add: lam.fresh fresh_at_base)
+  apply (simp add: equ_refl)
+  done
 
-
+lemma "\<not> (Var b \<approx>2 Var a) \<Longrightarrow> \<not> (App (App (Lam[x]. Lam[y]. (App (Var y) (Var x))) (Var a)) (Var b) \<approx>2 App (Var b) (Var a))"
+  apply rule
+  apply (erule equ2.cases)
+  apply auto
+  done
 
 lemma [quot_respect]:
   shows "(op = ===> equ) Var Var"