diff -r ad3bd3d6ba8a -r e4817fa0f6a1 src/HOL/Nominal/Examples/SN.thy --- a/src/HOL/Nominal/Examples/SN.thy Wed Mar 28 10:47:19 2007 +0200 +++ b/src/HOL/Nominal/Examples/SN.thy Wed Mar 28 17:27:44 2007 +0200 @@ -26,11 +26,19 @@ fixes a::"name" assumes a: "a\t1" and b: "a\t2" - shows "a\(t1[b::=t2])" + shows "a\t1[b::=t2]" using a b by (nominal_induct t1 avoiding: a b t2 rule: lam.induct) (auto simp add: abs_fresh fresh_atm) +lemma fresh_fact': + fixes a::"name" + assumes a: "a\t2" + shows "a\t1[a::=t2]" +using a +by (nominal_induct t1 avoiding: a t2 rule: lam.induct) + (auto simp add: abs_fresh fresh_atm) + lemma subst_lemma: assumes a: "x\y" and b: "x\L" @@ -56,10 +64,10 @@ b1[intro!]: "s1\\<^isub>\s2 \ (App s1 t)\\<^isub>\(App s2 t)" | b2[intro!]: "s1\\<^isub>\s2 \ (App t s1)\\<^isub>\(App t s2)" | b3[intro!]: "s1\\<^isub>\s2 \ (Lam [a].s1)\\<^isub>\ (Lam [a].s2)" -| b4[intro!]: "a\(s1,s2) \(App (Lam [a].s1) s2)\\<^isub>\(s1[a::=s2])" +| b4[intro!]: "a\s2 \(App (Lam [a].s1) s2)\\<^isub>\(s1[a::=s2])" nominal_inductive Beta - by (simp_all add: abs_fresh fresh_fact) + by (simp_all add: abs_fresh fresh_fact') abbreviation "Beta_star" :: "lam\lam\bool" (" _ \\<^isub>\\<^sup>* _" [80,80] 80) where "t1 \\<^isub>\\<^sup>* t2 \ Beta\<^sup>*\<^sup>* t1 t2" @@ -314,7 +322,7 @@ then obtain \1 \2 where "\=\1\\2" and "((a,\1)#\) \ s1 : \2" by blast with ih show "\ \ Lam [a].s2 : \" using fr by blast next - case (b4 a s1 s2) --"Beta-redex" + case (b4 a s2 s1) --"Beta-redex" have fr: "a\\" by fact have "\ \ App (Lam [a].s1) s2 : \" by fact hence "\\. (\ \ (Lam [a].s1) : \\\ \ \ \ s2 : \)" by (simp add: t2_elim) @@ -694,7 +702,6 @@ apply(auto simp add: fresh_list_nil fresh_list_cons fresh_prod) done - lemma id_apply: shows "(id \) = t" apply(nominal_induct t avoiding: \ rule: lam.induct)