# HG changeset patch # User paulson # Date 1721685319 -3600 # Node ID fbc859ccdaf34ba87df09cfae5c8173b3939de63 # Parent 628d2e5015e3ba32bbb96b094d4164d40b45fc64 A massive reduction of some truly horrible proofs diff -r 628d2e5015e3 -r fbc859ccdaf3 src/HOL/Nominal/Examples/Class1.thy --- a/src/HOL/Nominal/Examples/Class1.thy Mon Jul 22 20:13:46 2024 +0100 +++ b/src/HOL/Nominal/Examples/Class1.thy Mon Jul 22 22:55:19 2024 +0100 @@ -51,7 +51,7 @@ nominal_datatype trm = Ax "name" "coname" | Cut "\coname\trm" "\name\trm" ("Cut <_>._ ('(_'))._" [0,0,0,100] 101) - | NotR "\name\trm" "coname" ("NotR (_)._ _" [100,100,100] 101) + | NotR "\name\trm" "coname" ("NotR ('(_'))._ _" [0,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) | AndL1 "\name\trm" "name" ("AndL1 (_)._ _" [100,100,100] 101) @@ -3063,11 +3063,8 @@ have "Cut .M (x).N = Cut .([(a',a)]\M) (x').([(x',x)]\N)" using fs1 fs2 by (rule_tac sym, auto simp: trm.inject alpha fresh_atm fresh_prod calc_atm) also have "\ \\<^sub>c ([(a',a)]\M){a':=(x').([(x',x)]\N)}" using fs1 fs2 not_fic - apply - - apply(rule left) - apply(clarify) - apply(drule_tac a'="a" in fic_rename) - apply(simp add: perm_swap) + apply(intro left) + apply (metis fic_rename perm_swap(4)) apply(simp add: fresh_left calc_atm)+ done also have "\ = M{a:=(x).N}" using fs1 fs2 @@ -3084,12 +3081,9 @@ have "Cut .M (x).N = Cut .([(a',a)]\M) (x').([(x',x)]\N)" using fs1 fs2 by (rule_tac sym, auto simp: trm.inject alpha fresh_atm fresh_prod calc_atm) also have "\ \\<^sub>c ([(x',x)]\N){x':=.([(a',a)]\M)}" using fs1 fs2 not_fin - apply - - apply(rule right) - apply(clarify) - apply(drule_tac x'="x" in fin_rename) - apply(simp add: perm_swap) - apply(simp add: fresh_left calc_atm)+ + apply (intro right) + apply (metis fin_rename perm_swap(3)) + apply (simp add: fresh_left calc_atm)+ done also have "\ = N{x:=.M}" using fs1 fs2 by (simp add: subst_rename[symmetric] fresh_atm fresh_prod fresh_left calc_atm) @@ -3101,12 +3095,7 @@ and c::"coname" shows "M \\<^sub>c M' \ x\M \ x\M'" and "M \\<^sub>c M' \ c\M \ c\M'" -apply - -apply(induct rule: c_redu.induct) -apply(auto simp: abs_fresh rename_fresh subst_fresh) -apply(induct rule: c_redu.induct) -apply(auto simp: abs_fresh rename_fresh subst_fresh) -done + by (induct rule: c_redu.induct) (auto simp: abs_fresh rename_fresh subst_fresh)+ inductive a_redu :: "trm \ trm \ bool" ("_ \\<^sub>a _" [100,100] 100) @@ -3129,21 +3118,17 @@ | a_ImpL_r: "\a\N; x\(M,y); N\\<^sub>a N'\ \ ImpL .M (x).N y \\<^sub>a ImpL .M (x).N' y" | a_ImpR: "\a\b; M\\<^sub>a M'\ \ ImpR (x)..M b \\<^sub>a ImpR (x)..M' b" -lemma fresh_a_redu: +lemma fresh_a_redu1: fixes x::"name" - and c::"coname" shows "M \\<^sub>a M' \ x\M \ x\M'" - and "M \\<^sub>a M' \ c\M \ c\M'" -apply - -apply(induct rule: a_redu.induct) -apply(simp add: fresh_l_redu) -apply(simp add: fresh_c_redu) -apply(auto simp: abs_fresh abs_supp fin_supp) -apply(induct rule: a_redu.induct) -apply(simp add: fresh_l_redu) -apply(simp add: fresh_c_redu) -apply(auto simp: abs_fresh abs_supp fin_supp) -done + by (induct rule: a_redu.induct) (auto simp: fresh_l_redu fresh_c_redu abs_fresh abs_supp fin_supp) + +lemma fresh_a_redu2: + fixes c::"coname" + shows "M \\<^sub>a M' \ c\M \ c\M'" + by (induct rule: a_redu.induct) (auto simp: fresh_l_redu fresh_c_redu abs_fresh abs_supp fin_supp) + +lemmas fresh_a_redu = fresh_a_redu1 fresh_a_redu2 equivariance a_redu @@ -3353,148 +3338,43 @@ lemma ax_do_not_a_reduce: shows "Ax x a \\<^sub>a M \ False" apply(erule_tac a_redu.cases) -apply(auto simp: trm.inject) -apply(drule ax_do_not_l_reduce) -apply(simp) -apply(drule ax_do_not_c_reduce) -apply(simp) -done +apply(simp_all add: trm.inject) + using ax_do_not_l_reduce ax_do_not_c_reduce by blast+ lemma a_redu_NotL_elim: - assumes a: "NotL .M x \\<^sub>a R" + assumes "NotL .M x \\<^sub>a R" shows "\M'. R = NotL .M' x \ 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 2) -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="([(a,aa)]\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="([(a,aaa)]\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 assms + 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 (smt (verit, best) a_redu.eqvt(2) alpha(2) fresh_a_redu2)+ + done lemma a_redu_NotR_elim: - assumes a: "NotR (x).M a \\<^sub>a R" + assumes "NotR (x).M a \\<^sub>a R" shows "\M'. R = NotR (x).M' a \ 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 2) -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 assms + 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 (smt (verit, best) a_redu.eqvt(1) alpha(1) fresh_a_redu1)+ + done lemma a_redu_AndR_elim: - assumes a: "AndR .M .N c\\<^sub>a R" + assumes "AndR .M .N c\\<^sub>a R" shows "(\M'. R = AndR .M' .N c \ M\\<^sub>aM') \ (\N'. R = AndR .M .N' c \ N\\<^sub>aN')" -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(rotate_tac 6) -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(rule disjI1) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule disjI2) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(b,ba)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,ba)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,ba)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,ba)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rotate_tac 6) -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(rule disjI1) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule disjI2) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(b,ba)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,ba)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,ba)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,ba)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(b,baa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -done + using assms + 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 (smt (verit) a_redu.eqvt(2) alpha'(2) fresh_a_redu2) + by (metis a_NotL a_redu_NotL_elim trm.inject(4)) lemma a_redu_AndL1_elim: - assumes a: "AndL1 (x).M y \\<^sub>a R" + assumes "AndL1 (x).M y \\<^sub>a R" shows "\M'. R = AndL1 (x).M' y \ M\\<^sub>aM'" - using a + using assms 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) @@ -3505,229 +3385,47 @@ shows "\M'. R = AndL2 (x).M' y \ M\\<^sub>aM'" 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 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" + assumes "OrL (x).M (y).N z\\<^sub>a R" shows "(\M'. R = OrL (x).M' (y).N z \ M\\<^sub>aM') \ (\N'. R = OrL (x).M (y).N' z \ N\\<^sub>aN')" -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(rotate_tac 6) -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(rule disjI1) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(x,xa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule disjI2) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(y,ya)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,ya)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,ya)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,ya)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rotate_tac 6) -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(rule disjI1) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(x,xa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(x,xaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule disjI2) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(y,ya)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,ya)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,ya)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,ya)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,yaa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] + using assms + 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 (metis a_NotR a_redu_NotR_elim trm.inject(3))+ done lemma a_redu_OrR1_elim: - assumes a: "OrR1 .M b \\<^sub>a R" + assumes "OrR1 .M b \\<^sub>a R" shows "\M'. R = OrR1 .M' b \ 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="([(a,aa)]\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="([(a,aaa)]\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 assms + 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_NotL a_redu_NotL_elim trm.inject(4)) lemma a_redu_OrR2_elim: assumes a: "OrR2 .M b \\<^sub>a R" shows "\M'. R = OrR2 .M' b \ 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="([(a,aa)]\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="([(a,aaa)]\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 assms + 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_redu_OrR1_elim better_OrR1_intro trm.inject(8)) lemma a_redu_ImpL_elim: assumes a: "ImpL .M (y).N z\\<^sub>a R" shows "(\M'. R = ImpL .M' (y).N z \ M\\<^sub>aM') \ (\N'. R = ImpL .M (y).N' z \ N\\<^sub>aN')" -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(rotate_tac 5) -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(rule disjI1) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule disjI2) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rotate_tac 5) -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(rule disjI1) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(a,aaa)]\M')" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule disjI2) -apply(auto simp: alpha a_redu.eqvt)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -apply(rule_tac x="([(y,xa)]\N'a)" in exI) -apply(auto simp: perm_swap fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu)[1] -done + using assms + 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 (smt (verit) a_redu.eqvt(2) alpha'(2) fresh_a_redu2) + by (metis a_NotR a_redu_NotR_elim trm.inject(3)) lemma a_redu_ImpR_elim: assumes a: "ImpR (x)..M b \\<^sub>a R" @@ -3740,7 +3438,7 @@ 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(erule_tac c_redu.cases, simp_all add: trm.inject) apply(auto simp: alpha a_redu.eqvt abs_perm abs_fresh) apply(rule_tac x="([(a,aa)]\M'a)" in exI) apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu perm_swap) @@ -3772,17 +3470,9 @@ apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu perm_swap) apply(rule_tac x="([(a,aa)]\[(x,xaa)]\M'a)" in exI) apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu perm_swap) -apply(rule sym) -apply(rule trans) -apply(rule perm_compose) -apply(simp add: calc_atm perm_swap) -apply(rule_tac x="([(a,aaa)]\[(x,xaa)]\M'a)" in exI) -apply(auto simp: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu perm_swap) -apply(rule sym) -apply(rule trans) -apply(rule perm_compose) -apply(simp add: calc_atm perm_swap) -done + apply (simp add: cp_coname_name1 perm_dj(4) perm_swap(3,4)) + apply(rule_tac x="([(a,aaa)]\[(x,xaa)]\M'a)" in exI) +by(simp add: fresh_left alpha a_redu.eqvt calc_atm fresh_a_redu perm_swap perm_compose(4) perm_dj(4)) text \Transitive Closure\