diff -r 1effd04264cc -r 4b5d3d0abb69 src/HOL/Nominal/Examples/Class1.thy --- a/src/HOL/Nominal/Examples/Class1.thy Sat Jul 20 16:47:04 2024 +0100 +++ b/src/HOL/Nominal/Examples/Class1.thy Mon Jul 22 20:13:38 2024 +0100 @@ -50,7 +50,7 @@ nominal_datatype trm = Ax "name" "coname" - | Cut "\coname\trm" "\name\trm" ("Cut <_>._ (_)._" [0,100,1000,100] 101) + | Cut "\coname\trm" "\name\trm" ("Cut <_>._ ('(_'))._" [0,0,0,100] 101) | NotR "\name\trm" "coname" ("NotR (_)._ _" [100,100,100] 101) | NotL "\coname\trm" "name" ("NotL <_>._ _" [0,100,100] 101) | AndR "\coname\trm" "\coname\trm" "coname" ("AndR <_>._ <_>._ _" [0,100,0,100,100] 101) @@ -673,7 +673,7 @@ done nominal_primrec (freshness_context: "(d::name,z::coname,P::trm)") - substc :: "trm \ coname \ name \ trm \ trm" ("_{_:=(_)._}" [100,100,100,100] 100) + substc :: "trm \ coname \ name \ trm \ trm" ("_{_:=('(_'))._}" [100,0,0,100] 100) where "(Ax x a){d:=(z).P} = (if d=a then Cut .(Ax x a) (z).P else Ax x a)" | "\a\(d,P,N);x\(z,P,M)\ \ (Cut .M (x).N){d:=(z).P} = @@ -2329,161 +2329,98 @@ by (metis abs_fresh(2) fic.intros(6) fic_ImpR_elim freshc_after_substc) qed (use fic_rest_elims in auto) - lemma fic_subst1: - assumes a: "fic M a" "a\b" "a\P" + assumes "fic M a" "a\b" "a\P" shows "fic (M{b:=(x).P}) a" -using a -apply(nominal_induct M avoiding: x b a P rule: trm.strong_induct) -apply(drule fic_elims) -apply(simp add: fic.intros) -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(rule subst_fresh) -apply(simp) -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -done +using assms +proof (nominal_induct M avoiding: x b a P rule: trm.strong_induct) + case (Ax name coname) + then show ?case + using fic_Ax_elim by force +next + case (NotR name trm coname) + with fic_NotR_elim show ?case + by (fastforce simp add: fresh_prod subst_fresh) +next + case (AndR coname1 trm1 coname2 trm2 coname3) + with fic_AndR_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +next + case (OrR1 coname1 trm coname2) + with fic_OrR1_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +next + case (OrR2 coname1 trm coname2) + with fic_OrR2_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +next + case (ImpR name coname1 trm coname2) + with fic_ImpR_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +qed (use fic_rest_elims in force)+ lemma fic_subst2: - assumes a: "fic M a" "c\a" "a\P" "M\Ax x a" + assumes "fic M a" "c\a" "a\P" "M\Ax x a" shows "fic (M{x:=.P}) a" -using a -apply(nominal_induct M avoiding: x a c P rule: trm.strong_induct) -apply(drule fic_elims) -apply(simp add: trm.inject) -apply(rule fic.intros) -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(rule subst_fresh) -apply(simp) -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -apply(drule fic_elims, simp) -apply(rule fic.intros) -apply(simp add: abs_fresh fresh_atm) -apply(rule subst_fresh) -apply(auto)[1] -apply(drule fic_elims, simp) -done +using assms +proof (nominal_induct M avoiding: x a c P rule: trm.strong_induct) + case (Ax name coname) + then show ?case + using fic_Ax_elim by force +next + case (NotR name trm coname) + with fic_NotR_elim show ?case + by (fastforce simp add: fresh_prod subst_fresh) +next + case (AndR coname1 trm1 coname2 trm2 coname3) + with fic_AndR_elim show ?case + by simp (metis abs_fresh(2) crename_cfresh crename_fresh fic.intros(3) fresh_atm(2) substn_crename_comm') +next + case (OrR1 coname1 trm coname2) + with fic_OrR1_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +next + case (OrR2 coname1 trm coname2) + with fic_OrR2_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +next + case (ImpR name coname1 trm coname2) + with fic_ImpR_elim show ?case + by (fastforce simp add: abs_fresh fresh_prod subst_fresh) +qed (use fic_rest_elims in force)+ lemma fic_substc_crename: - assumes a: "fic M a" "a\b" "a\P" + assumes "fic M a" "a\b" "a\P" shows "M[a\c>b]{b:=(y).P} = Cut .(M{b:=(y).P}) (y).P" -using a -apply(nominal_induct M avoiding: a b y P rule: trm.strong_induct) -apply(drule fic_Ax_elim) -apply(simp) -apply(simp add: trm.inject) -apply(simp add: alpha calc_atm fresh_atm trm.inject) -apply(simp) -apply(drule fic_rest_elims) -apply(simp) -apply(drule fic_NotR_elim) -apply(simp) -apply(generate_fresh "coname") -apply(fresh_fun_simp) -apply(simp add: trm.inject alpha fresh_atm fresh_prod fresh_atm calc_atm abs_fresh) -apply(rule conjI) -apply(simp add: csubst_eqvt calc_atm) -apply(simp add: perm_fresh_fresh) -apply(simp add: crename_fresh) -apply(rule subst_fresh) -apply(simp) -apply(drule fic_rest_elims) -apply(simp) -apply(drule fic_AndR_elim) -apply(simp add: abs_fresh fresh_atm subst_fresh rename_fresh) -apply(generate_fresh "coname") -apply(fresh_fun_simp) -apply(simp add: trm.inject alpha fresh_atm calc_atm abs_fresh fresh_prod) -apply(rule conjI) -apply(simp add: csubst_eqvt calc_atm) -apply(simp add: perm_fresh_fresh) -apply(simp add: csubst_eqvt calc_atm) -apply(simp add: perm_fresh_fresh) -apply(simp add: subst_fresh) -apply(drule fic_rest_elims) -apply(simp) -apply(drule fic_rest_elims) -apply(simp) -apply(drule fic_OrR1_elim) -apply(simp) -apply(generate_fresh "coname") -apply(fresh_fun_simp) -apply(simp add: trm.inject alpha fresh_atm calc_atm abs_fresh fresh_prod) -apply(simp add: csubst_eqvt calc_atm) -apply(simp add: perm_fresh_fresh) -apply(simp add: subst_fresh rename_fresh) -apply(drule fic_OrR2_elim) -apply(simp add: abs_fresh fresh_atm) -apply(generate_fresh "coname") -apply(fresh_fun_simp) -apply(simp add: trm.inject alpha fresh_atm calc_atm abs_fresh fresh_prod) -apply(simp add: csubst_eqvt calc_atm) -apply(simp add: perm_fresh_fresh) -apply(simp add: subst_fresh rename_fresh) -apply(drule fic_rest_elims) -apply(simp) -apply(drule fic_ImpR_elim) -apply(simp add: abs_fresh fresh_atm) -apply(generate_fresh "coname") -apply(fresh_fun_simp) -apply(simp add: trm.inject alpha fresh_atm calc_atm abs_fresh fresh_prod) -apply(simp add: csubst_eqvt calc_atm) -apply(simp add: perm_fresh_fresh) -apply(simp add: subst_fresh rename_fresh) -apply(drule fic_rest_elims) -apply(simp) -done +using assms +proof (nominal_induct M avoiding: a b y P rule: trm.strong_induct) + case (Ax name coname) + with fic_Ax_elim show ?case + by(force simp add: trm.inject alpha(2) fresh_atm(2,4) swap_simps(4,8)) +next + case (Cut coname trm1 name trm2) + with fic_rest_elims show ?case by force +next + case (NotR name trm coname) + with fic_NotR_elim[OF NotR.prems(1)] show ?case + by (simp add: trm.inject crename_fresh fresh_fun_simp_NotR subst_fresh(6)) +next + case (AndR coname1 trm1 coname2 trm2 coname3) + with AndR fic_AndR_elim[OF AndR.prems(1)] show ?case + by (simp add: abs_fresh rename_fresh fresh_fun_simp_AndR fresh_atm(2) subst_fresh(6)) +next + case (OrR1 coname1 trm coname2) + with fic_OrR1_elim[OF OrR1.prems(1)] show ?case + by (simp add: abs_fresh rename_fresh fresh_fun_simp_OrR1 fresh_atm(2) subst_fresh(6)) +next + case (OrR2 coname1 trm coname2) + with fic_OrR2_elim[OF OrR2.prems(1)] show ?case + by (simp add: abs_fresh rename_fresh fresh_fun_simp_OrR2 fresh_atm(2) subst_fresh(6)) +next + case (ImpR name coname1 trm coname2) + with fic_ImpR_elim[OF ImpR.prems(1)] crename_fresh show ?case + by (force simp add: abs_fresh fresh_fun_simp_ImpR fresh_atm(2) subst_fresh(6)) +qed (use fic_rest_elims in force)+ inductive l_redu :: "trm \ trm \ bool" ("_ \\<^sub>l _" [100,100] 100) @@ -2511,37 +2448,42 @@ and pi2::"coname prm" shows "(pi1\M) \\<^sub>l (pi1\M') \ M \\<^sub>l M'" and "(pi2\M) \\<^sub>l (pi2\M') \ M \\<^sub>l M'" -apply - -apply(drule_tac pi="rev pi1" in l_redu.eqvt(1)) -apply(perm_simp) -apply(drule_tac pi="rev pi2" in l_redu.eqvt(2)) -apply(perm_simp) -done + using l_redu.eqvt perm_pi_simp by metis+ nominal_inductive l_redu - apply(simp_all add: abs_fresh fresh_atm rename_fresh fresh_prod abs_supp fin_supp) - apply(force)+ - done - -lemma fresh_l_redu: - fixes x::"name" - and a::"coname" - shows "M \\<^sub>l M' \ x\M \ x\M'" - and "M \\<^sub>l M' \ a\M \ a\M'" -apply - -apply(induct rule: l_redu.induct) -apply(auto simp: abs_fresh rename_fresh) -apply(case_tac "xa=x") -apply(simp add: rename_fresh) -apply(simp add: rename_fresh fresh_atm) -apply(simp add: fresh_prod abs_fresh abs_supp fin_supp)+ -apply(induct rule: l_redu.induct) -apply(auto simp: abs_fresh rename_fresh) -apply(case_tac "aa=a") -apply(simp add: rename_fresh) -apply(simp add: rename_fresh fresh_atm) -apply(simp add: fresh_prod abs_fresh abs_supp fin_supp)+ -done + by (force simp add: abs_fresh fresh_atm rename_fresh fresh_prod abs_supp fin_supp)+ + + +lemma fresh_l_redu_x: + fixes z::"name" + shows "M \\<^sub>l M' \ z\M \ z\M'" +proof (induct rule: l_redu.induct) + case (LAxL a M x y) + then show ?case + by (metis abs_fresh(1,5) nrename_nfresh nrename_rename trm.fresh(1,3)) +next + case (LImp z N y P x M b a c) + then show ?case + apply (simp add: abs_fresh fresh_prod) + by (metis abs_fresh(3,5) abs_supp(5) fs_name1) +qed (auto simp add: abs_fresh fresh_prod crename_nfresh) + +lemma fresh_l_redu_a: + fixes c::"coname" + shows "M \\<^sub>l M' \ c\M \ c\M'" +proof (induct rule: l_redu.induct) + case (LAxR x M a b) + then show ?case + apply (simp add: abs_fresh) + by (metis crename_cfresh crename_rename) +next + case (LAxL a M x y) + with nrename_cfresh show ?case + by (simp add: abs_fresh) +qed (auto simp add: abs_fresh fresh_prod crename_nfresh) + + +lemmas fresh_l_redu = fresh_l_redu_x fresh_l_redu_a lemma better_LAxR_intro[intro]: shows "fic M a \ Cut .M (x).(Ax x b) \\<^sub>l M[a\c>b]" @@ -2737,13 +2679,13 @@ \ Cut .(ImpR (x)..M b) (z).(ImpL .N (y).P z) \\<^sub>l Cut .(Cut .N (x).M) (y).P" proof - assume fs: "z\(N,[y].P)" "b\[a].M" "a\N" - obtain y'::"name" where f1: "y'\(y,M,N,P,z,x)" by (rule exists_fresh(1), rule fin_supp, blast) - obtain x'::"name" where f2: "x'\(y,M,N,P,z,x,y')" by (rule exists_fresh(1), rule fin_supp, blast) - obtain z'::"name" where f3: "z'\(y,M,N,P,z,x,y',x')" by (rule exists_fresh(1), rule fin_supp, blast) - obtain a'::"coname" where f4: "a'\(a,N,P,M,b)" by (rule exists_fresh(2), rule fin_supp, blast) - obtain b'::"coname" where f5: "b'\(a,N,P,M,b,c,a')" by (rule exists_fresh(2),rule fin_supp, blast) - obtain c'::"coname" where f6: "c'\(a,N,P,M,b,c,a',b')" by (rule exists_fresh(2),rule fin_supp, blast) - have " Cut .(ImpR (x)..M b) (z).(ImpL .N (y).P z) + obtain y'::"name" and x'::"name" and z'::"name" + where f1: "y'\(y,M,N,P,z,x)" and f2: "x'\(y,M,N,P,z,x,y')" and f3: "z'\(y,M,N,P,z,x,y',x')" + by (meson exists_fresh(1) fs_name1) + obtain a'::"coname" and b'::"coname" and c'::"coname" + where f4: "a'\(a,N,P,M,b)" and f5: "b'\(a,N,P,M,b,c,a')" and f6: "c'\(a,N,P,M,b,c,a',b')" + by (meson exists_fresh(2) fs_coname1) + have "Cut .(ImpR (x)..M b) (z).(ImpL .N (y).P z) = Cut .(ImpR (x)..M b') (z').(ImpL .N (y).P z')" using f1 f2 f3 f4 f5 fs apply(rule_tac sym) @@ -2754,16 +2696,7 @@ (z').(ImpL .([(c',c)]\N) (y').([(y',y)]\P) z')" using f1 f2 f3 f4 f5 f6 fs apply(rule_tac sym) - apply(simp add: trm.inject) - apply(simp add: alpha) - apply(rule conjI) - apply(simp add: trm.inject) - apply(simp add: alpha fresh_prod fresh_atm abs_perm calc_atm fresh_left abs_fresh) - apply(simp add: trm.inject) - apply(simp add: alpha) - apply(rule conjI) - apply(simp add: alpha fresh_prod fresh_atm abs_perm calc_atm fresh_left abs_fresh) - apply(simp add: alpha fresh_prod fresh_atm abs_perm calc_atm fresh_left abs_fresh) + apply(simp add: trm.inject alpha fresh_prod fresh_atm abs_perm calc_atm fresh_left abs_fresh) done also have "\ \\<^sub>l Cut .(Cut .([(c',c)]\N) (x').([(a',a)]\[(x',x)]\M)) (y').([(y',y)]\P)" using f1 f2 f3 f4 f5 f6 fs @@ -2774,67 +2707,41 @@ also have "\ = Cut .(Cut .N (x).M) (y).P" using f1 f2 f3 f4 f5 f6 fs apply(simp add: trm.inject) - apply(rule conjI) - apply(simp add: alpha) - apply(rule disjI2) - apply(simp add: trm.inject) - apply(rule conjI) - apply(simp add: fresh_prod fresh_atm) - apply(rule conjI) - apply(perm_simp add: calc_atm) - apply(auto simp: fresh_prod fresh_atm)[1] - apply(perm_simp add: alpha) - apply(perm_simp add: alpha) - apply(perm_simp add: alpha) - apply(rule conjI) - apply(perm_simp add: calc_atm) - apply(rule_tac pi="[(a',a)]" in pt_bij4[OF pt_coname_inst, OF at_coname_inst]) - apply(perm_simp add: abs_perm calc_atm) apply(perm_simp add: alpha fresh_prod fresh_atm) - apply(simp add: abs_fresh) - apply(perm_simp add: alpha fresh_prod fresh_atm) + apply(simp add: trm.inject abs_fresh alpha(1) fresh_perm_app(4) perm_compose(4) perm_dj(4)) + apply (metis alpha'(2) crename_fresh crename_swap swap_simps(2,4,6)) done finally show ?thesis by simp qed lemma alpha_coname: fixes M::"trm" - and a::"coname" - assumes a: "[a].M = [b].N" "c\(a,b,M,N)" + and a::"coname" + assumes "[a].M = [b].N" "c\(a,b,M,N)" shows "M = [(a,c)]\[(b,c)]\N" -using a -apply(auto simp: alpha_fresh fresh_prod fresh_atm) -apply(drule sym) -apply(perm_simp) -done + by (metis alpha_fresh'(2) assms fresh_atm(2) fresh_prod) lemma alpha_name: fixes M::"trm" - and x::"name" - assumes a: "[x].M = [y].N" "z\(x,y,M,N)" + and x::"name" + assumes "[x].M = [y].N" "z\(x,y,M,N)" shows "M = [(x,z)]\[(y,z)]\N" -using a -apply(auto simp: alpha_fresh fresh_prod fresh_atm) -apply(drule sym) -apply(perm_simp) -done + by (metis alpha_fresh'(1) assms fresh_atm(1) fresh_prod) lemma alpha_name_coname: fixes M::"trm" and x::"name" and a::"coname" - assumes a: "[x].[b].M = [y].[c].N" "z\(x,y,M,N)" "a\(b,c,M,N)" +assumes "[x].[b].M = [y].[c].N" "z\(x,y,M,N)" "a\(b,c,M,N)" shows "M = [(x,z)]\[(b,a)]\[(c,a)]\[(y,z)]\N" -using a -apply(auto simp: alpha_fresh fresh_prod fresh_atm - abs_supp fin_supp abs_fresh abs_perm fresh_left calc_atm) -apply(drule sym) -apply(simp) -apply(perm_simp) -done + using assms + apply(clarsimp simp: alpha_fresh fresh_prod fresh_atm + abs_supp fin_supp abs_fresh abs_perm fresh_left calc_atm) + by (metis perm_swap(1,2)) + lemma Cut_l_redu_elim: - assumes a: "Cut .M (x).N \\<^sub>l R" + assumes "Cut .M (x).N \\<^sub>l R" shows "(\b. R = M[a\c>b]) \ (\y. R = N[x\n>y]) \ (\y M' b N'. M = NotR (y).M' a \ N = NotL .N' x \ R = Cut .N' (y).M' \ fic M a \ fin N x) \ (\b M1 c M2 y N'. M = AndR .M1 .M2 a \ N = AndL1 (y).N' x \ R = Cut .M1 (y).N' @@ -2847,344 +2754,294 @@ \ fic M a \ fin N x) \ (\z b M' c N1 y N2. M = ImpR (z)..M' a \ N = ImpL .N1 (y).N2 x \ R = Cut .(Cut .N1 (z).M') (y).N2 \ b\(c,N1) \ fic M a \ fin N x)" -using a -apply(erule_tac l_redu.cases) -apply(rule disjI1) -(* ax case *) -apply(simp add: trm.inject) -apply(rule_tac x="b" in exI) -apply(erule conjE) -apply(simp add: alpha) -apply(erule disjE) -apply(simp) -apply(simp) -apply(simp add: rename_fresh) -apply(rule disjI2) -apply(rule disjI1) -(* ax case *) -apply(simp add: trm.inject) -apply(rule_tac x="y" in exI) -apply(erule conjE) -apply(thin_tac "[a].M = [aa].Ax y aa") -apply(simp add: alpha) -apply(erule disjE) -apply(simp) -apply(simp) -apply(simp add: rename_fresh) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI1) -(* not case *) -apply(simp add: trm.inject) -apply(erule conjE)+ -apply(generate_fresh "coname") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac c="c" in alpha_coname) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp add: calc_atm) -apply(rule exI)+ -apply(rule conjI) -apply(rule refl) -apply(generate_fresh "name") -apply(simp add: calc_atm abs_fresh fresh_prod fresh_atm fresh_left) -apply(auto)[1] -apply(drule_tac z="ca" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp add: calc_atm) -apply(rule exI)+ -apply(rule conjI) -apply(rule refl) -apply(auto simp: calc_atm abs_fresh fresh_left)[1] -apply(case_tac "y=x") -apply(perm_simp) -apply(perm_simp) -apply(case_tac "aa=a") -apply(perm_simp) -apply(perm_simp) -(* and1 case *) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI1) -apply(simp add: trm.inject) -apply(erule conjE)+ -apply(generate_fresh "coname") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac c="c" in alpha_coname) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule exI)+ -apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="ca" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,ca)]\[(y,ca)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh split: if_splits)[1] -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -(* and2 case *) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI1) -apply(simp add: trm.inject) -apply(erule conjE)+ -apply(generate_fresh "coname") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac c="c" in alpha_coname) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="ca" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,ca)]\[(y,ca)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh split: if_splits)[1] -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -(* or1 case *) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI1) -apply(simp add: trm.inject) -apply(erule conjE)+ -apply(generate_fresh "coname") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac c="c" in alpha_coname) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="ca" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule exI)+ -apply(rule_tac s="x" and t="[(x,ca)]\[(y,ca)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule exI)+ -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -(* or2 case *) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI1) -apply(simp add: trm.inject) -apply(erule conjE)+ -apply(generate_fresh "coname") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac c="c" in alpha_coname) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="ca" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,ca)]\[(y,ca)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -(* imp-case *) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(rule disjI2) -apply(simp add: trm.inject) -apply(erule conjE)+ -apply(generate_fresh "coname") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac c="ca" in alpha_coname) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="a" and t="[(a,ca)]\[(b,ca)]\b" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cb" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cb)]\[(z,cb)]\z" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -apply(generate_fresh "name") -apply(simp add: abs_fresh fresh_prod fresh_atm) -apply(auto)[1] -apply(drule_tac z="cc" in alpha_name) -apply(simp add: fresh_prod fresh_atm abs_fresh) -apply(simp) -apply(rule exI)+ -apply(rule conjI) -apply(rule_tac s="x" and t="[(x,cc)]\[(z,cc)]\z" in subst) -apply(simp add: calc_atm) -apply(rule refl) -apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] -apply(perm_simp)+ -done +using assms +proof (cases rule: l_redu.cases) + case (LAxR x M a b) + then show ?thesis + apply(simp add: trm.inject) + by (metis alpha(2) crename_rename) +next + case (LAxL a M x y) + then show ?thesis + apply(simp add: trm.inject) + by (metis alpha(1) nrename_rename) +next + case (LNot y M N x a b) + then show ?thesis + apply(simp add: trm.inject) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI1) + apply(erule conjE)+ + apply(generate_fresh "coname") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac c="c" in alpha_coname) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp add: calc_atm) + apply(rule exI)+ + apply(rule conjI) + apply(rule refl) + apply(generate_fresh "name") + apply(simp add: calc_atm abs_fresh fresh_prod fresh_atm fresh_left) + apply(auto)[1] + apply(drule_tac z="ca" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp add: calc_atm) + apply(rule exI)+ + apply(rule conjI) + apply(rule refl) + apply(auto simp: calc_atm abs_fresh fresh_left)[1] + using nrename_fresh nrename_swap apply presburger + using crename_fresh crename_swap by presburger +next + case (LAnd1 b a1 M1 a2 M2 N y x) + then show ?thesis + apply - + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI1) + apply(clarsimp simp add: trm.inject) + apply(generate_fresh "coname") + apply(clarsimp simp add: abs_fresh fresh_prod fresh_atm) + apply(drule_tac c="c" in alpha_coname) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule exI)+ + apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="ca" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply (metis swap_simps(6)) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply (smt (verit, del_insts) abs_fresh(1,2) abs_perm(1,2) fic.intros(3) fin.intros(3) fresh_bij(1) perm_fresh_fresh(1,2) swap_simps(1,6)) + apply(perm_simp)+ + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(perm_simp) + apply (smt (verit) abs_fresh(1,2) abs_perm(1,2) fic.intros(3) fin.intros(3) perm_fresh_fresh(1,2) perm_swap(3) swap_simps(1,6)) + apply(perm_simp)+ + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh cong: conj_cong) + apply(perm_simp) + by (smt (verit, best) abs_fresh(1,2) abs_perm(1) alpha(2) fic.intros(3) fin.intros(3) fresh_bij(1,2) perm_fresh_fresh(1,2) swap_simps(2,3)) +next + case (LAnd2 b a1 M1 a2 M2 N y x) + then show ?thesis + apply - + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI1) + apply(clarsimp simp add: trm.inject) + apply(generate_fresh "coname") + apply(clarsimp simp add: abs_fresh fresh_prod fresh_atm) + apply(drule_tac c="c" in alpha_coname) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(generate_fresh "name") + apply(auto simp add: abs_fresh fresh_prod fresh_atm) + apply(drule_tac z="ca" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply (metis swap_simps(6)) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(perm_simp) + apply (smt (verit, ccfv_threshold) abs_fresh(1,2) abs_perm(1) fic.intros(3) fin.intros(4) fresh_bij(1,2) perm_fresh_fresh(1,2) swap_simps(1,4,6)) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply (smt (verit) abs_fresh(1,2) abs_perm(1,2) fic.intros(3) fin.intros(4) fresh_bij(1) perm_fresh_fresh(1,2) swap_simps(1,6)) + apply(generate_fresh "name") + apply(clarsimp simp add: abs_fresh fresh_prod fresh_atm) + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(perm_simp) + by (smt (verit, ccfv_SIG) abs_fresh(1,2) abs_perm(1) alpha(2) fic.intros(3) fin.intros(4) fresh_bij(1,2) perm_fresh_fresh(1,2) swap_simps(2,3)) +next + case (LOr1 b a M N1 N2 y x1 x2) + then show ?thesis + apply - + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI1) + apply(clarsimp simp add: trm.inject) + apply(generate_fresh "coname") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac c="c" in alpha_coname) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="ca" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule exI)+ + apply(rule_tac s="x" and t="[(x,ca)]\[(y,ca)]\y" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] + apply(perm_simp)+ + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule exI)+ + apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] + apply(perm_simp)+ + done +next + case (LOr2 b a M N1 N2 y x1 x2) + then show ?thesis + apply - + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI2) + apply(rule disjI1) + apply(simp add: trm.inject) + apply(erule conjE)+ + apply(generate_fresh "coname") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac c="c" in alpha_coname) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="a" and t="[(a,c)]\[(b,c)]\b" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="ca" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="x" and t="[(x,ca)]\[(y,ca)]\y" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] + apply(perm_simp)+ + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="x" and t="[(x,cb)]\[(y,cb)]\y" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] + apply(perm_simp)+ + done +next + case (LImp z N y P x M b a c) + then show ?thesis + apply(intro disjI2) + apply(clarsimp simp add: trm.inject) + apply(generate_fresh "coname") + apply(clarsimp simp add: abs_fresh fresh_prod fresh_atm) + apply(drule_tac c="ca" in alpha_coname) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="a" and t="[(a,ca)]\[(b,ca)]\b" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="caa" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="x" and t="[(x,caa)]\[(z,caa)]\z" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] + apply(perm_simp)+ + apply(generate_fresh "name") + apply(simp add: abs_fresh fresh_prod fresh_atm) + apply(auto)[1] + apply(drule_tac z="cb" in alpha_name) + apply(simp add: fresh_prod fresh_atm abs_fresh) + apply(simp) + apply(perm_simp) + apply(rule exI)+ + apply(rule conjI) + apply(rule_tac s="x" and t="[(x,cb)]\[(z,cb)]\z" in subst) + apply(simp add: calc_atm) + apply(rule refl) + apply(auto simp: fresh_left calc_atm abs_fresh alpha perm_fresh_fresh split: if_splits)[1] + apply(perm_simp)+ + done +qed + inductive c_redu :: "trm \ trm \ bool" ("_ \\<^sub>c _" [100,100] 100) @@ -3637,44 +3494,20 @@ lemma a_redu_AndL1_elim: assumes a: "AndL1 (x).M y \\<^sub>a R" shows "\M'. R = AndL1 (x).M' y \ M\\<^sub>aM'" -using a [[simproc del: defined_all]] -apply(erule_tac a_redu.cases, simp_all add: trm.inject) -apply(erule_tac l_redu.cases, simp_all add: trm.inject) -apply(erule_tac c_redu.cases, simp_all add: trm.inject) -apply(auto) -apply(rotate_tac 3) -apply(erule_tac a_redu.cases, simp_all add: trm.inject) -apply(erule_tac l_redu.cases, simp_all add: trm.inject) -apply(erule_tac c_redu.cases, simp_all add: trm.inject) -apply(auto simp: alpha a_redu.eqvt) -apply(rule_tac x="([(x,xa)]\M'a)" in exI) -apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu) -apply(simp add: perm_swap) -apply(rule_tac x="([(x,xaa)]\M'a)" in exI) -apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu) -apply(simp add: perm_swap) -done + using a + apply(erule_tac a_redu.cases, simp_all add: trm.inject) + apply(erule_tac l_redu.cases, simp_all add: trm.inject) + apply(erule_tac c_redu.cases, simp_all add: trm.inject) + by (metis a_NotR a_redu_NotR_elim trm.inject(3)) lemma a_redu_AndL2_elim: assumes a: "AndL2 (x).M y \\<^sub>a R" shows "\M'. R = AndL2 (x).M' y \ M\\<^sub>aM'" -using a [[simproc del: defined_all]] -apply(erule_tac a_redu.cases, simp_all add: trm.inject) -apply(erule_tac l_redu.cases, simp_all add: trm.inject) -apply(erule_tac c_redu.cases, simp_all add: trm.inject) -apply(auto) -apply(rotate_tac 3) -apply(erule_tac a_redu.cases, simp_all add: trm.inject) -apply(erule_tac l_redu.cases, simp_all add: trm.inject) -apply(erule_tac c_redu.cases, simp_all add: trm.inject) -apply(auto simp: alpha a_redu.eqvt) -apply(rule_tac x="([(x,xa)]\M'a)" in exI) -apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu) -apply(simp add: perm_swap) -apply(rule_tac x="([(x,xaa)]\M'a)" in exI) -apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu) -apply(simp add: perm_swap) -done + using a + apply(erule_tac a_redu.cases, simp_all add: trm.inject) + apply(erule_tac l_redu.cases, simp_all add: trm.inject) + apply(erule_tac c_redu.cases, simp_all add: trm.inject) + by (metis a_NotR a_redu_NotR_elim trm.inject(3)) lemma a_redu_OrL_elim: assumes a: "OrL (x).M (y).N z\\<^sub>a R" @@ -3958,37 +3791,24 @@ where "M \\<^sub>a* M' \ (a_redu)\<^sup>*\<^sup>* M M'" -lemma a_starI: - assumes a: "M \\<^sub>a M'" - shows "M \\<^sub>a* M'" -using a by blast +lemmas a_starI = r_into_rtranclp lemma a_starE: assumes a: "M \\<^sub>a* M'" shows "M = M' \ (\N. M \\<^sub>a N \ N \\<^sub>a* M')" -using a -by (induct) (auto) + using a by (induct) (auto) lemma a_star_refl: shows "M \\<^sub>a* M" by blast -lemma a_star_trans[trans]: - assumes a1: "M1\\<^sub>a* M2" - and a2: "M2\\<^sub>a* M3" - shows "M1 \\<^sub>a* M3" -using a2 a1 -by (induct) (auto) +declare rtranclp_trans [trans] text \congruence rules for \\\<^sub>a*\\ lemma ax_do_not_a_star_reduce: shows "Ax x a \\<^sub>a* M \ M = Ax x a" -apply(induct set: rtranclp) -apply(auto) -apply(drule ax_do_not_a_reduce) -apply(simp) -done + using a_starE ax_do_not_a_reduce by blast lemma a_star_CutL: