LamEx.thy
changeset 501 375e28eedee7
parent 500 184d74813679
child 508 fac6069d8e80
child 513 eed5d55ea9a6
equal deleted inserted replaced
500:184d74813679 501:375e28eedee7
   208 apply (tactic {* lift_tac_lam @{context} @{thm a2} 1 *})
   208 apply (tactic {* lift_tac_lam @{context} @{thm a2} 1 *})
   209 done
   209 done
   210 
   210 
   211 lemma a3: "\<lbrakk>(x\<Colon>lam) = [(a\<Colon>name, b\<Colon>name)] \<bullet> (xa\<Colon>lam); a \<notin> fv (Lam b x)\<rbrakk> \<Longrightarrow> Lam a x = Lam b xa"
   211 lemma a3: "\<lbrakk>(x\<Colon>lam) = [(a\<Colon>name, b\<Colon>name)] \<bullet> (xa\<Colon>lam); a \<notin> fv (Lam b x)\<rbrakk> \<Longrightarrow> Lam a x = Lam b xa"
   212 apply (tactic {* lift_tac_lam @{context} @{thm a3} 1 *})
   212 apply (tactic {* lift_tac_lam @{context} @{thm a3} 1 *})
   213 apply (simp add:perm_lam_def)
       
   214 done
   213 done
   215 
   214 
   216 lemma alpha_cases: "\<lbrakk>a1 = a2; \<And>a b. \<lbrakk>a1 = Var a; a2 = Var b; a = b\<rbrakk> \<Longrightarrow> P;
   215 lemma alpha_cases: "\<lbrakk>a1 = a2; \<And>a b. \<lbrakk>a1 = Var a; a2 = Var b; a = b\<rbrakk> \<Longrightarrow> P;
   217      \<And>x xa xb xc. \<lbrakk>a1 = App x xb; a2 = App xa xc; x = xa; xb = xc\<rbrakk> \<Longrightarrow> P;
   216      \<And>x xa xb xc. \<lbrakk>a1 = App x xb; a2 = App xa xc; x = xa; xb = xc\<rbrakk> \<Longrightarrow> P;
   218      \<And>x a b xa. \<lbrakk>a1 = Lam a x; a2 = Lam b xa; x = [(a, b)] \<bullet> xa; a \<notin> fv (Lam b x)\<rbrakk> \<Longrightarrow> P\<rbrakk>
   217      \<And>x a b xa. \<lbrakk>a1 = Lam a x; a2 = Lam b xa; x = [(a, b)] \<bullet> xa; a \<notin> fv (Lam b x)\<rbrakk> \<Longrightarrow> P\<rbrakk>
   219     \<Longrightarrow> P"
   218     \<Longrightarrow> P"
   220 apply (tactic {* lift_tac_lam @{context} @{thm alpha.cases} 1 *})
   219 apply (tactic {* lift_tac_lam @{context} @{thm alpha.cases} 1 *})
   221 apply (simp add:perm_lam_def)
       
   222 done
   220 done
   223 
   221 
   224 lemma alpha_induct: "\<lbrakk>(qx\<Colon>lam) = (qxa\<Colon>lam); \<And>(a\<Colon>name) b\<Colon>name. a = b \<Longrightarrow> (qxb\<Colon>lam \<Rightarrow> lam \<Rightarrow> bool) (Var a) (Var b);
   222 lemma alpha_induct: "\<lbrakk>(qx\<Colon>lam) = (qxa\<Colon>lam); \<And>(a\<Colon>name) b\<Colon>name. a = b \<Longrightarrow> (qxb\<Colon>lam \<Rightarrow> lam \<Rightarrow> bool) (Var a) (Var b);
   225      \<And>(x\<Colon>lam) (xa\<Colon>lam) (xb\<Colon>lam) xc\<Colon>lam. \<lbrakk>x = xa; qxb x xa; xb = xc; qxb xb xc\<rbrakk> \<Longrightarrow> qxb (App x xb) (App xa xc);
   223      \<And>(x\<Colon>lam) (xa\<Colon>lam) (xb\<Colon>lam) xc\<Colon>lam. \<lbrakk>x = xa; qxb x xa; xb = xc; qxb xb xc\<rbrakk> \<Longrightarrow> qxb (App x xb) (App xa xc);
   226      \<And>(x\<Colon>lam) (a\<Colon>name) (b\<Colon>name) xa\<Colon>lam.
   224      \<And>(x\<Colon>lam) (a\<Colon>name) (b\<Colon>name) xa\<Colon>lam.
   227         \<lbrakk>x = [(a, b)] \<bullet> xa; qxb x ([(a, b)] \<bullet> xa); a \<notin> fv (Lam b x)\<rbrakk> \<Longrightarrow> qxb (Lam a x) (Lam b xa)\<rbrakk>
   225         \<lbrakk>x = [(a, b)] \<bullet> xa; qxb x ([(a, b)] \<bullet> xa); a \<notin> fv (Lam b x)\<rbrakk> \<Longrightarrow> qxb (Lam a x) (Lam b xa)\<rbrakk>
   228     \<Longrightarrow> qxb qx qxa"
   226     \<Longrightarrow> qxb qx qxa"
   229 apply (tactic {* lift_tac_lam @{context} @{thm alpha.induct} 1 *})
   227 apply (tactic {* lift_tac_lam @{context} @{thm alpha.induct} 1 *})
   230 apply (simp add:perm_lam_def)
       
   231 done
   228 done
   232 
   229 
   233 lemma var_inject: "(Var a = Var b) = (a = b)"
   230 lemma var_inject: "(Var a = Var b) = (a = b)"
   234 apply (tactic {* lift_tac_lam @{context} @{thm rvar_inject} 1 *})
   231 apply (tactic {* lift_tac_lam @{context} @{thm rvar_inject} 1 *})
   235 done
   232 done