lemma ty_cases: fixes T::ty shows"(\s. T=PR s) \ (\T'. T=NOT T') \ (\S U. T=S OR U) \ (\S U. T=S AND U) \ (\S U. T=S IMP U)" by (induct T rule:ty.induct) (auto)
lemma fresh_ty: fixes a::"coname" and x::"name" and T::"ty" shows"a\T" and "x\T" by (nominal_induct T rule: ty.strong_induct)
(auto simp: fresh_string)
lemmas eq_bij = pt_bij[OF pt_name_inst, OF at_name_inst] pt_bij[OF pt_coname_inst, OF at_coname_inst]
lemma crename_name_eqvt[eqvt]: fixes pi::"name prm" shows"pi\(M[d\c>e]) = (pi\M)[(pi\d)\c>(pi\e)]" by (nominal_induct M avoiding: d e rule: trm.strong_induct) (auto simp: fresh_bij eq_bij)
lemma crename_coname_eqvt[eqvt]: fixes pi::"coname prm" shows"pi\(M[d\c>e]) = (pi\M)[(pi\d)\c>(pi\e)]" by (nominal_induct M avoiding: d e rule: trm.strong_induct)(auto simp: fresh_bij eq_bij)
lemma nrename_name_eqvt[eqvt]: fixes pi::"name prm" shows"pi\(M[x\n>y]) = (pi\M)[(pi\x)\n>(pi\y)]" by(nominal_induct M avoiding: x y rule: trm.strong_induct) (auto simp: fresh_bij eq_bij)
lemma nrename_coname_eqvt[eqvt]: fixes pi::"coname prm" shows"pi\(M[x\n>y]) = (pi\M)[(pi\x)\n>(pi\y)]" by(nominal_induct M avoiding: x y rule: trm.strong_induct)(auto simp: fresh_bij eq_bij)
lemmas rename_eqvts = crename_name_eqvt crename_coname_eqvt
nrename_name_eqvt nrename_coname_eqvt lemma nrename_fresh: assumes a: "x\M" shows"M[x\n>y] = M" using a by (nominal_induct M avoiding: x y rule: trm.strong_induct)
(auto simp: trm.inject fresh_atm abs_fresh fin_supp abs_supp)
lemma crename_fresh: assumes a: "a\M" shows"M[a\c>b] = M" using a by (nominal_induct M avoiding: a b rule: trm.strong_induct)
(auto simp: trm.inject fresh_atm abs_fresh)
lemma nrename_nfresh: fixes x::"name" shows"x\y\x\M[x\n>y]" by (nominal_induct M avoiding: x y rule: trm.strong_induct)
(auto simp: fresh_atm abs_fresh abs_supp fin_supp)
lemma crename_nfresh: fixes x::"name" shows"x\M\x\M[a\c>b]" by (nominal_induct M avoiding: a b rule: trm.strong_induct)
(auto simp: fresh_atm abs_fresh abs_supp fin_supp)
lemma crename_cfresh: fixes a::"coname" shows"a\b\a\M[a\c>b]" by (nominal_induct M avoiding: a b rule: trm.strong_induct)
(auto simp: fresh_atm abs_fresh abs_supp fin_supp)
lemma nrename_cfresh: fixes c::"coname" shows"c\M\c\M[x\n>y]" by (nominal_induct M avoiding: x y rule: trm.strong_induct)
(auto simp: fresh_atm abs_fresh abs_supp fin_supp)
lemma nrename_nfresh': fixes x::"name" shows"x\(M,z,y)\x\M[z\n>y]" by (nominal_induct M avoiding: x z y rule: trm.strong_induct)
(auto simp: fresh_prod fresh_atm abs_fresh abs_supp fin_supp)
lemma crename_cfresh': fixes a::"coname" shows"a\(M,b,c)\a\M[b\c>c]" by (nominal_induct M avoiding: a b c rule: trm.strong_induct)
(auto simp: fresh_prod fresh_atm abs_fresh abs_supp fin_supp)
lemma nrename_rename: assumes a: "x'\M" shows"([(x',x)]\M)[x'\n>y]= M[x\n>y]" using a proof (nominal_induct M avoiding: x x' y rule: trm.strong_induct) qed (auto simp: abs_fresh abs_supp fin_supp fresh_left calc_atm fresh_atm)
lemma crename_rename: assumes a: "a'\M" shows"([(a',a)]\M)[a'\c>b]= M[a\c>b]" using a proof (nominal_induct M avoiding: a a' b rule: trm.strong_induct) qed (auto simp: abs_fresh abs_supp fin_supp fresh_left calc_atm fresh_atm)
lemma crename_id: shows"M[a\c>a] = M" by (nominal_induct M avoiding: a rule: trm.strong_induct) (auto)
lemma nrename_id: shows"M[x\n>x] = M" by (nominal_induct M avoiding: x rule: trm.strong_induct) (auto)
lemma nrename_swap: shows"x\M \ [(x,y)]\M = M[y\n>x]" by (nominal_induct M avoiding: x y rule: trm.strong_induct)
(auto simp: abs_fresh abs_supp fin_supp fresh_left calc_atm fresh_atm)
lemma crename_swap: shows"a\M \ [(a,b)]\M = M[b\c>a]" by (nominal_induct M avoiding: a b rule: trm.strong_induct)
(auto simp: abs_fresh abs_supp fin_supp fresh_left calc_atm fresh_atm)
lemma crename_ax: assumes a: "M[a\c>b] = Ax x c" "c\a" "c\b" shows"M = Ax x c" using a proof (nominal_induct M avoiding: a b x c rule: trm.strong_induct) qed (simp_all add: trm.inject split: if_splits)
lemma nrename_ax: assumes a: "M[x\n>y] = Ax z a" "z\x" "z\y" shows"M = Ax z a" using a proof (nominal_induct M avoiding: x y z a rule: trm.strong_induct) qed (simp_all add: trm.inject split: if_splits)
text\<open>substitution functions\<close>
lemma fresh_perm_coname: fixes c::"coname" and pi::"coname prm" and M::"trm" assumes a: "c\pi" "c\M" shows"c\(pi\M)" by (simp add: assms fresh_perm_app)
lemma fresh_perm_name: fixes x::"name" and pi::"name prm" and M::"trm" assumes a: "x\pi" "x\M" shows"x\(pi\M)" by (simp add: assms fresh_perm_app)
lemma fresh_fun_simp_NotL: assumes a: "x'\P" "x'\M" shows"fresh_fun (\x'. Cut .P (x').NotL .M x') = Cut .P (x').NotL .M x'" proof (rule fresh_fun_app) show"pt (TYPE(trm)::trm itself) (TYPE(name)::name itself)" by(rule pt_name_inst) show"at (TYPE(name)::name itself)" by(rule at_name_inst) show"finite (supp (\x'. Cut .P (x').NotL .M x')::name set)" using a by(finite_guess) obtain n::name where n: "n\(c,P,a,M)" by (metis assms fresh_atm(3) fresh_prod) with assms have"n \ (\x'. Cut .P (x').NotL .M x')" by (fresh_guess) thenshow"\b. b \ (\x'. Cut .P (x').NotL .M x', Cut .P (b).NotL .M b)" by (metis abs_fresh(1) abs_fresh(5) fresh_prod n trm.fresh(3)) show"x' \ (\x'. Cut .P (x').NotL .M x')" using assms by(fresh_guess) qed
lemma csubst_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" shows"pi1\(M{c:=(x).N}) = (pi1\M){(pi1\c):=(pi1\x).(pi1\N)}" and"pi2\(M{c:=(x).N}) = (pi2\M){(pi2\c):=(pi2\x).(pi2\N)}" by (nominal_induct M avoiding: c x N rule: trm.strong_induct)
(auto simp: eq_bij fresh_bij eqvts; perm_simp)+
lemma nsubst_eqvt[eqvt]: fixes pi1::"name prm" and pi2::"coname prm" shows"pi1\(M{x:=.N}) = (pi1\M){(pi1\x):=<(pi1\c)>.(pi1\N)}" and"pi2\(M{x:=.N}) = (pi2\M){(pi2\x):=<(pi2\c)>.(pi2\N)}" by (nominal_induct M avoiding: c x N rule: trm.strong_induct)
(auto simp: eq_bij fresh_bij eqvts; perm_simp)+
lemma supp_subst1: shows"supp (M{y:=.P}) \ ((supp M) - {y}) \ (supp P)" proof (nominal_induct M avoiding: y P c rule: trm.strong_induct) case (NotL coname trm name) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P)" by (meson exists_fresh(1) fs_name1) with NotL show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotL; blast) next case (AndL1 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL1 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL1 fresh_atm; blast) next case (AndL2 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL2 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL2 fresh_atm; blast) next case (OrL name1 trm1 name2 trm2 name3) obtain x'::name where "x'\<sharp>(trm1{y:=<c>.P},P,name1,trm2{y:=<c>.P},name2)" by (meson exists_fresh(1) fs_name1) with OrL show ?case by (auto simp: fs_name1 fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrL fresh_atm; blast) next case (ImpL coname trm1 name1 trm2 name2) obtain x'::name where "x'\<sharp>(trm1{name2:=<c>.P},P,name1,trm2{name2:=<c>.P})" by (meson exists_fresh(1) fs_name1) with ImpL show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_ImpL fresh_atm; blast) qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
text\<open>Identical to the previous proof\<close> lemma supp_subst2: shows"supp (M{y:=.P}) \ supp (M) \ ((supp P) - {c})" proof (nominal_induct M avoiding: y P c rule: trm.strong_induct) case (NotL coname trm name) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P)" by (meson exists_fresh(1) fs_name1) with NotL show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotL; blast) next case (AndL1 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL1 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL1 fresh_atm; blast) next case (AndL2 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL2 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL2 fresh_atm; blast) next case (OrL name1 trm1 name2 trm2 name3) obtain x'::name where "x'\<sharp>(trm1{y:=<c>.P},P,name1,trm2{y:=<c>.P},name2)" by (meson exists_fresh(1) fs_name1) with OrL show ?case by (auto simp: fs_name1 fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrL fresh_atm; blast) next case (ImpL coname trm1 name1 trm2 name2) obtain x'::name where "x'\<sharp>(trm1{name2:=<c>.P},P,name1,trm2{name2:=<c>.P})" by (meson exists_fresh(1) fs_name1) with ImpL show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_ImpL fresh_atm; blast) qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma supp_subst3: shows"supp (M{c:=(x).P}) \ ((supp M) - {c}) \ (supp P)" proof (nominal_induct M avoiding: x P c rule: trm.strong_induct) case (NotR name trm coname) obtain x'::coname where "x'\<sharp>(trm{coname:=(x).P},P)" by (meson exists_fresh'(2) fs_coname1) with NotR show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotR; blast) next case (AndR coname1 trm1 coname2 trm2 coname3) obtain x'::coname where x': "x'\(trm1{coname3:=(x).P},P,trm2{coname3:=(x).P},coname1,coname2)" by (meson exists_fresh'(2) fs_coname1) with AndR show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndR; blast) next case (OrR1 coname1 trm coname2) obtain x'::coname where x': "x'\(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR1 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR1; blast) next case (OrR2 coname1 trm coname2) obtain x'::coname where x': "x'\(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR2 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR2; blast) next case (ImpR name coname1 trm coname2) obtain x'::coname where x': "x'\(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with ImpR show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_ImpR; blast) qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma supp_subst4: shows"supp (M{c:=(x).P}) \ (supp M) \ ((supp P) - {x})" proof (nominal_induct M avoiding: x P c rule: trm.strong_induct) case (NotR name trm coname) obtain x'::coname where "x'\<sharp>(trm{coname:=(x).P},P)" by (meson exists_fresh'(2) fs_coname1) with NotR show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotR; blast) next case (AndR coname1 trm1 coname2 trm2 coname3) obtain x'::coname where x': "x'\(trm1{coname3:=(x).P},P,trm2{coname3:=(x).P},coname1,coname2)" by (meson exists_fresh'(2) fs_coname1) with AndR show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndR; blast) next case (OrR1 coname1 trm coname2) obtain x'::coname where x': "x'\(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR1 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR1; blast) next case (OrR2 coname1 trm coname2) obtain x'::coname where x': "x'\(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR2 show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR2; blast) next case (ImpR name coname1 trm coname2) obtain x'::coname where x': "x'\(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with ImpR show ?case by (auto simp: fresh_prod abs_supp supp_atm trm.supp fs_name1 fresh_fun_simp_ImpR; blast) qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma supp_subst5: shows"(supp M - {y}) \ supp (M{y:=.P})" proof (nominal_induct M avoiding: y P c rule: trm.strong_induct) case (NotL coname trm name) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P)" by (meson exists_fresh(1) fs_name1) with NotL show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotL) apply (auto simp: fresh_def) done next case (AndL1 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL1 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL1) apply (auto simp: fresh_def) done next case (AndL2 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL2 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL2) apply (auto simp: fresh_def) done next case (OrL name1 trm1 name2 trm2 name3) obtain x'::name where "x'\<sharp>(trm1{y:=<c>.P},P,name1,trm2{y:=<c>.P},name2)" by (meson exists_fresh(1) fs_name1) with OrL show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrL) apply (fastforce simp: fresh_def)+ done next case (ImpL coname trm1 name1 trm2 name2) obtain x'::name where "x'\<sharp>(trm1{name2:=<c>.P},P,name1,trm2{name2:=<c>.P})" by (meson exists_fresh(1) fs_name1) with ImpL show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_ImpL) apply (fastforce simp: fresh_def)+ done qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma supp_subst6: shows"(supp M) \ ((supp (M{y:=.P}))::coname set)" proof (nominal_induct M avoiding: y P c rule: trm.strong_induct) case (NotL coname trm name) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P)" by (meson exists_fresh(1) fs_name1) with NotL show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotL) apply (auto simp: fresh_def) done next case (AndL1 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL1 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL1) apply (auto simp: fresh_def) done next case (AndL2 name1 trm name2) obtain x'::name where "x'\<sharp>(trm{y:=<c>.P},P,name1)" by (meson exists_fresh(1) fs_name1) with AndL2 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndL2) apply (auto simp: fresh_def) done next case (OrL name1 trm1 name2 trm2 name3) obtain x'::name where "x'\<sharp>(trm1{y:=<c>.P},P,name1,trm2{y:=<c>.P},name2)" by (meson exists_fresh(1) fs_name1) with OrL show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrL) apply (fastforce simp: fresh_def)+ done next case (ImpL coname trm1 name1 trm2 name2) obtain x'::name where "x'\<sharp>(trm1{name2:=<c>.P},P,name1,trm2{name2:=<c>.P})" by (meson exists_fresh(1) fs_name1) with ImpL show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_ImpL) apply (fastforce simp: fresh_def)+ done qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma supp_subst7: shows"(supp M - {c}) \ supp (M{c:=(x).P})" proof (nominal_induct M avoiding: x P c rule: trm.strong_induct) case (NotR name trm coname) obtain x'::coname where "x'\<sharp>(trm{coname:=(x).P},P)" by (meson exists_fresh'(2) fs_coname1) with NotR show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotR) apply (auto simp: fresh_def) done next case (AndR coname1 trm1 coname2 trm2 coname3) obtain x'::coname where "x'\<sharp>(trm1{coname3:=(x).P},P,trm2{coname3:=(x).P},coname1,coname2)" by (meson exists_fresh'(2) fs_coname1) with AndR show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndR) apply (fastforce simp: fresh_def)+ done next case (OrR1 coname1 trm coname2) obtain x'::coname where "x'\<sharp>(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR1 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR1) apply (auto simp: fresh_def) done next case (OrR2 coname1 trm coname2) obtain x'::coname where "x'\<sharp>(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR2 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR2) apply (auto simp: fresh_def) done next case (ImpR name coname1 trm coname2) obtain x'::coname where "x'\<sharp>(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with ImpR show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_ImpR) apply (auto simp: fresh_def) done qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma supp_subst8: shows"(supp M) \ ((supp (M{c:=(x).P}))::name set)" proof (nominal_induct M avoiding: x P c rule: trm.strong_induct) case (NotR name trm coname) obtain x'::coname where "x'\<sharp>(trm{coname:=(x).P},P)" by (meson exists_fresh'(2) fs_coname1) with NotR show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_NotR) apply (auto simp: fresh_def) done next case (AndR coname1 trm1 coname2 trm2 coname3) obtain x'::coname where "x'\<sharp>(trm1{coname3:=(x).P},P,trm2{coname3:=(x).P},coname1,coname2)" by (meson exists_fresh'(2) fs_coname1) with AndR show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_AndR) apply (fastforce simp: fresh_def)+ done next case (OrR1 coname1 trm coname2) obtain x'::coname where "x'\<sharp>(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR1 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR1) apply (auto simp: fresh_def) done next case (OrR2 coname1 trm coname2) obtain x'::coname where "x'\<sharp>(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with OrR2 show ?case apply (auto simp: fresh_prod abs_supp supp_atm trm.supp fresh_fun_simp_OrR2) apply (auto simp: fresh_def) done next case (ImpR name coname1 trm coname2) obtain x'::coname where "x'\<sharp>(trm{coname2:=(x).P},P,coname1)" by (meson exists_fresh'(2) fs_coname1) with ImpR show ?case by (force simp: fresh_prod abs_supp fs_name1 supp_atm trm.supp fresh_fun_simp_ImpR) qed (simp add: abs_supp supp_atm trm.supp fs_name1; blast)+
lemma forget: shows"x\M \ M{x:=.P} = M" and"c\M \ M{c:=(x).P} = M" by (nominal_induct M avoiding: x c P rule: trm.strong_induct)
(auto simp: fresh_atm abs_fresh abs_supp fin_supp)
lemma substc_rename1: assumes a: "c\(M,a)" shows"M{a:=(x).N} = ([(c,a)]\M){c:=(x).N}" using a proof(nominal_induct M avoiding: c a x N rule: trm.strong_induct) case (AndR c1 M c2 M' c3) thenshow ?case apply(auto simp: fresh_prod calc_atm fresh_atm abs_fresh fresh_left) apply (metis (no_types, lifting))+ done next case ImpL thenshow ?case by (auto simp: calc_atm alpha fresh_atm abs_fresh fresh_prod fresh_left)
metis next case (Cut d M y M') thenshow ?case by(simp add: calc_atm trm.inject alpha fresh_atm abs_fresh fresh_prod fresh_left)
(metis crename.simps(1) crename_id crename_rename) qed (auto simp: calc_atm alpha fresh_atm abs_fresh fresh_prod fresh_left trm.inject)
lemma substc_rename2: assumes a: "y\(N,x)" shows"M{a:=(x).N} = M{a:=(y).([(y,x)]\N)}" using a proof(nominal_induct M avoiding: a x y N rule: trm.strong_induct) case (NotR y M d) obtain a::coname where"a\(N,M{d:=(y).([(y,x)]\N)},[(y,x)]\N)" by (meson exists_fresh(2) fs_coname1) with NotR show ?case apply(auto simp: calc_atm alpha fresh_atm fresh_prod fresh_left) by (metis (no_types, opaque_lifting) alpha(1) trm.inject(2)) next case (AndR c1 M c2 M' c3) obtain a'::coname where "a'\<sharp>(N,M{c3:=(y).([(y,x)]\<bullet>N)},M'{c3:=(y).([(y,x)]\<bullet>N)},[(y,x)]\<bullet>N,c1,c2,c3)" by (meson exists_fresh(2) fs_coname1) with AndR show ?case apply(auto simp: calc_atm alpha fresh_atm fresh_prod fresh_left) by (metis (no_types, opaque_lifting) alpha(1) trm.inject(2)) next case (OrR1 d M e) obtain a'::coname where "a'\<sharp>(N,M{e:=(y).([(y,x)]\<bullet>N)},[(y,x)]\<bullet>N,d,e)" by (meson exists_fresh(2) fs_coname1) with OrR1 show ?case by (auto simp: perm_swap calc_atm trm.inject alpha fresh_atm fresh_prod fresh_left fresh_fun_simp_OrR1) next case (OrR2 d M e) obtain a'::coname where "a'\<sharp>(N,M{e:=(y).([(y,x)]\<bullet>N)},[(y,x)]\<bullet>N,d,e)" by (meson exists_fresh(2) fs_coname1) with OrR2 show ?case by (auto simp: perm_swap calc_atm trm.inject alpha fresh_atm fresh_prod fresh_left fresh_fun_simp_OrR2) next case (ImpR y d M e) obtain a'::coname where "a'\<sharp>(N,M{e:=(y).([(y,x)]\<bullet>N)},[(y,x)]\<bullet>N,d,e)" by (meson exists_fresh(2) fs_coname1) with ImpR show ?case by (auto simp: perm_swap calc_atm trm.inject alpha fresh_atm fresh_prod fresh_left fresh_fun_simp_ImpR) qed (auto simp: calc_atm trm.inject alpha fresh_atm fresh_prod fresh_left perm_swap)
lemma substn_rename3: assumes a: "y\(M,x)" shows"M{x:=.N} = ([(y,x)]\M){y:=.N}" using a proof(nominal_induct M avoiding: a x y N rule: trm.strong_induct) case (OrL x1 M x2 M' x3) thenshow ?case apply(auto simp add: calc_atm fresh_atm abs_fresh fresh_prod fresh_left) by (metis (mono_tags))+ next case (ImpL d M v M' u) thenshow ?case apply(auto simp add: calc_atm fresh_atm abs_fresh fresh_prod fresh_left) by (metis (mono_tags))+ next case (Cut d M y M') thenshow ?case apply(auto simp: calc_atm trm.inject alpha fresh_atm abs_fresh fresh_prod fresh_left) by (metis nrename.simps(1) nrename_id nrename_rename)+ qed (auto simp: calc_atm trm.inject alpha fresh_atm abs_fresh fresh_left abs_supp fin_supp fresh_prod)
lemma substn_rename4: assumes a: "c\(N,a)" shows"M{x:=.N} = M{x:=.([(c,a)]\N)}" using a proof(nominal_induct M avoiding: x c a N rule: trm.strong_induct) case (Ax z d) thenshow ?case by (auto simp: fresh_prod fresh_atm calc_atm trm.inject alpha perm_swap fresh_left) next case NotR thenshow ?case by (auto simp: fresh_prod fresh_atm calc_atm trm.inject alpha perm_swap fresh_left) next case (NotL d M y) thenobtain a'::name where "a'\<sharp>(N, M{x:=<c>.([(c,a)]\<bullet>N)}, [(c,a)]\<bullet>N)" by (meson exists_fresh(1) fs_name1) with NotL show ?case apply(auto simp: calc_atm trm.inject fresh_atm fresh_prod fresh_left) by (metis (no_types, opaque_lifting) alpha(2) trm.inject(2)) next case (OrL x1 M x2 M' x3) thenobtain a'::name where "a'\<sharp>(N,M{x:=<c>.([(c,a)]\<bullet>N)},M'{x:=<c>.([(c,a)]\<bullet>N)},[(c,a)]\<bullet>N,x1,x2,x3)" by (meson exists_fresh(1) fs_name1) with OrL show ?case apply(auto simp: calc_atm trm.inject fresh_atm fresh_prod fresh_left) by (metis (no_types) alpha'(2) trm.inject(2)) next case (AndL1 u M v) thenobtain a'::name where "a'\<sharp>(N,M{x:=<c>.([(c,a)]\<bullet>N)},[(c,a)]\<bullet>N,u,v)" by (meson exists_fresh(1) fs_name1) with AndL1 show ?case apply(auto simp: calc_atm trm.inject fresh_atm fresh_prod fresh_left) by (metis (mono_tags, opaque_lifting) alpha'(2) trm.inject(2)) next case (AndL2 u M v) thenobtain a'::name where "a'\<sharp>(N,M{x:=<c>.([(c,a)]\<bullet>N)},[(c,a)]\<bullet>N,u,v)" by (meson exists_fresh(1) fs_name1) with AndL2 show ?case apply(auto simp: calc_atm trm.inject fresh_atm fresh_prod fresh_left) by (metis (mono_tags, opaque_lifting) alpha'(2) trm.inject(2)) next case (ImpL d M y M' u) thenobtain a'::name where "a'\<sharp>(N,M{u:=<c>.([(c,a)]\<bullet>N)},M'{u:=<c>.([(c,a)]\<bullet>N)},[(c,a)]\<bullet>N,y,u)" by (meson exists_fresh(1) fs_name1) with ImpL show ?case apply(auto simp: calc_atm trm.inject fresh_atm fresh_prod fresh_left) by (metis (no_types) alpha'(2) trm.inject(2)) next case (Cut d M y M') thenshow ?case by (auto simp: calc_atm trm.inject alpha fresh_atm abs_fresh fresh_prod fresh_left perm_swap) qed (auto simp: calc_atm fresh_atm fresh_left)
lemma subst_rename5: assumes a: "c'\(c,N)" "x'\(x,M)" shows"M{x:=.N} = ([(x',x)]\M){x':=.([(c',c)]\N)}" proof - have"M{x:=.N} = ([(x',x)]\M){x':=.N}" using a by (simp add: substn_rename3) alsohave"\ = ([(x',x)]\M){x':=.([(c',c)]\N)}" using a by (simp add: substn_rename4) finallyshow ?thesis by simp qed
lemma subst_rename6: assumes a: "c'\(c,M)" "x'\(x,N)" shows"M{c:=(x).N} = ([(c',c)]\M){c':=(x').([(x',x)]\N)}" proof - have"M{c:=(x).N} = ([(c',c)]\M){c':=(x).N}" using a by (simp add: substc_rename1) alsohave"\ = ([(c',c)]\M){c':=(x').([(x',x)]\N)}" using a by (simp add: substc_rename2) finallyshow ?thesis by simp qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.