# HG changeset patch # User Christian Urban # Date 1309211502 -3600 # Node ID 567967bc94cc02c02861efe8d5d0664136d3742e # Parent ae6455351572f2728db52ec493f3c834219ec5de streamlined the fcb-proof and made fcb1 a special case of fcb diff -r ae6455351572 -r 567967bc94cc Nominal/Ex/Classical.thy --- a/Nominal/Ex/Classical.thy Mon Jun 27 19:22:10 2011 +0100 +++ b/Nominal/Ex/Classical.thy Mon Jun 27 22:51:42 2011 +0100 @@ -46,203 +46,101 @@ thm trm.supp thm trm.supp[simplified] -lemma Abs_lst1_fcb2: - fixes a b :: "'a :: at" - and S T :: "'b :: fs" - and c::"'c::fs" - assumes e: "(Abs_lst [atom a] T) = (Abs_lst [atom b] S)" - and fcb1: "atom a \ f a T c" - and fresh: "{atom a, atom b} \* c" - and perm1: "\p. supp p \* c \ p \ (f a T c) = f (p \ a) (p \ T) c" - and perm2: "\p. supp p \* c \ p \ (f b S c) = f (p \ b) (p \ S) c" - shows "f a T c = f b S c" -proof - - have fcb2: "atom b \ f b S c" - using e[symmetric] - apply(simp add: Abs_eq_iff2) - apply(erule exE) - apply(simp add: alphas) - apply(rule_tac p="p" in permute_boolE) - apply(simp add: fresh_eqvt) - apply(subst perm2) - using fresh - apply(auto simp add: fresh_star_def)[1] - apply(simp add: atom_eqvt) - apply(rule fcb1) - done - have fin1: "finite (supp (f a T c))" - apply(rule_tac S="supp (a, T, c)" in supports_finite) - apply(simp add: supports_def) - apply(simp add: fresh_def[symmetric]) - apply(clarify) - apply(subst perm1) - apply(simp add: supp_swap fresh_star_def) - apply(simp add: swap_fresh_fresh fresh_Pair) - apply(simp add: finite_supp) - done - have fin2: "finite (supp (f b S c))" - apply(rule_tac S="supp (b, S, c)" in supports_finite) - apply(simp add: supports_def) - apply(simp add: fresh_def[symmetric]) - apply(clarify) - apply(subst perm2) - apply(simp add: supp_swap fresh_star_def) - apply(simp add: swap_fresh_fresh fresh_Pair) - apply(simp add: finite_supp) - done - obtain d::"'a::at" where fr: "atom d \ (a, b, S, T, c, f a T c, f b S c)" - using obtain_fresh'[where x="(a, b, S, T, c, f a T c, f b S c)"] - apply(auto simp add: finite_supp supp_Pair fin1 fin2) - done - have "(a \ d) \ (Abs_lst [atom a] T) = (b \ d) \ (Abs_lst [atom b] S)" - apply(simp (no_asm_use) only: flip_def) - apply(subst swap_fresh_fresh) - apply(simp add: Abs_fresh_iff) - using fr - apply(simp add: Abs_fresh_iff) - apply(subst swap_fresh_fresh) - apply(simp add: Abs_fresh_iff) - using fr - apply(simp add: Abs_fresh_iff) - apply(rule e) - done - then have "Abs_lst [atom d] ((a \ d) \ T) = Abs_lst [atom d] ((b \ d) \ S)" - apply (simp add: swap_atom flip_def) - done - then have eq: "(a \ d) \ T = (b \ d) \ S" - by (simp add: Abs1_eq_iff) - have "f a T c = (a \ d) \ f a T c" - unfolding flip_def - apply(rule sym) - apply(rule swap_fresh_fresh) - using fcb1 - apply(simp) - using fr - apply(simp add: fresh_Pair) - done - also have "... = f d ((a \ d) \ T) c" - unfolding flip_def - apply(subst perm1) - using fresh fr - apply(simp add: supp_swap fresh_star_def fresh_Pair) - apply(simp) - done - also have "... = f d ((b \ d) \ S) c" using eq by simp - also have "... = (b \ d) \ f b S c" - unfolding flip_def - apply(subst perm2) - using fresh fr - apply(simp add: supp_swap fresh_star_def fresh_Pair) - apply(simp) - done - also have "... = f b S c" - apply(rule flip_fresh_fresh) - using fcb2 - apply(simp) - using fr - apply(simp add: fresh_Pair) - done - finally show ?thesis by simp -qed - lemma Abs_lst_fcb2: fixes as bs :: "atom list" and x y :: "'b :: fs" and c::"'c::fs" - assumes e: "(Abs_lst as x) = (Abs_lst bs y)" + assumes eq: "[as]lst. x = [bs]lst. y" and fcb1: "(set as) \* f as x c" - and fcb2: "(set bs) \* f bs y c" and fresh1: "set as \* c" and fresh2: "set bs \* c" and perm1: "\p. supp p \* c \ p \ (f as x c) = f (p \ as) (p \ x) c" and perm2: "\p. supp p \* c \ p \ (f bs y c) = f (p \ bs) (p \ y) c" shows "f as x c = f bs y c" proof - - have fin1: "finite (supp (f as x c))" - apply(rule_tac S="supp (as, x, c)" in supports_finite) - apply(simp add: supports_def) - apply(simp add: fresh_def[symmetric]) - apply(clarify) - apply(subst perm1) - apply(simp add: supp_swap fresh_star_def) - apply(simp add: swap_fresh_fresh fresh_Pair) - apply(simp add: finite_supp) - done - have fin2: "finite (supp (f bs y c))" - apply(rule_tac S="supp (bs, y, c)" in supports_finite) - apply(simp add: supports_def) - apply(simp add: fresh_def[symmetric]) - apply(clarify) - apply(subst perm2) - apply(simp add: supp_swap fresh_star_def) - apply(simp add: swap_fresh_fresh fresh_Pair) - apply(simp add: finite_supp) - done + have "supp (as, x, c) supports (f as x c)" + unfolding supports_def fresh_def[symmetric] + by (simp add: fresh_Pair perm1 fresh_star_def supp_swap swap_fresh_fresh) + then have fin1: "finite (supp (f as x c))" + by (auto intro: supports_finite simp add: finite_supp) + have "supp (bs, y, c) supports (f bs y c)" + unfolding supports_def fresh_def[symmetric] + by (simp add: fresh_Pair perm2 fresh_star_def supp_swap swap_fresh_fresh) + then have fin2: "finite (supp (f bs y c))" + by (auto intro: supports_finite simp add: finite_supp) obtain q::"perm" where - fr1: "(q \ (set as)) \* (as, bs, x, y, c, f as x c, f bs y c)" and + fr1: "(q \ (set as)) \* (x, c, f as x c, f bs y c)" and fr2: "supp q \* Abs_lst as x" and inc: "supp q \ (set as) \ q \ (set as)" - using at_set_avoiding3[where xs="set as" and c="(as, bs, x, y, c, f as x c, f bs y c)" - and x="Abs_lst as x"] - apply(simp add: supp_Pair finite_supp fin1 fin2 Abs_fresh_star) - apply(erule exE) - apply(erule conjE)+ - apply(drule fresh_star_supp_conv) - apply(blast) - done + using at_set_avoiding3[where xs="set as" and c="(x, c, f as x c, f bs y c)" and x="[as]lst. x"] + fin1 fin2 + by (auto simp add: supp_Pair finite_supp Abs_fresh_star dest: fresh_star_supp_conv) have "Abs_lst (q \ as) (q \ x) = q \ Abs_lst as x" by simp also have "\ = Abs_lst as x" - apply(rule perm_supp_eq) - apply(simp add: fr2) - done - finally have "Abs_lst (q \ as) (q \ x) = Abs_lst bs y" using e by simp + by (simp only: fr2 perm_supp_eq) + finally have "Abs_lst (q \ as) (q \ x) = Abs_lst bs y" using eq by simp then obtain r::perm where qq1: "q \ x = r \ y" and qq2: "q \ as = r \ bs" and - qq3: "supp r \ (set (q \ as) \ set bs)" - apply - + qq3: "supp r \ (q \ (set as)) \ set bs" apply(drule_tac sym) apply(simp only: Abs_eq_iff2 alphas) apply(erule exE) apply(erule conjE)+ apply(drule_tac x="p" in meta_spec) - apply(simp) + apply(simp add: set_eqvt) apply(blast) done - have "f as x c = q \ (f as x c)" - apply(rule sym) - apply(rule perm_supp_eq) - using inc fcb1 fr1 - apply(simp add: set_eqvt) - apply(simp add: fresh_star_Pair) - apply(auto simp add: fresh_star_def) + have "(set as) \* f as x c" by (rule fcb1) + then have "q \ ((set as) \* f as x c)" + by (simp add: permute_bool_def) + then have "set (q \ as) \* f (q \ as) (q \ x) c" + apply(simp add: fresh_star_eqvt set_eqvt) + apply(subst (asm) perm1) + using inc fresh1 fr1 + apply(auto simp add: fresh_star_def fresh_Pair) done + then have "set (r \ bs) \* f (r \ bs) (r \ y) c" using qq1 qq2 by simp + then have "r \ ((set bs) \* f bs y c)" + apply(simp add: fresh_star_eqvt set_eqvt) + apply(subst (asm) perm2[symmetric]) + using qq3 fresh2 fr1 + apply(auto simp add: set_eqvt fresh_star_def fresh_Pair) + done + then have fcb2: "(set bs) \* f bs y c" by (simp add: permute_bool_def) + have "f as x c = q \ (f as x c)" + apply(rule perm_supp_eq[symmetric]) + using inc fcb1 fr1 by (auto simp add: fresh_star_def) also have "\ = f (q \ as) (q \ x) c" - apply(subst perm1) - using inc fresh1 fr1 - apply(simp add: set_eqvt) - apply(simp add: fresh_star_Pair) - apply(auto simp add: fresh_star_def) - done + apply(rule perm1) + using inc fresh1 fr1 by (auto simp add: fresh_star_def) also have "\ = f (r \ bs) (r \ y) c" using qq1 qq2 by simp also have "\ = r \ (f bs y c)" - apply(rule sym) - apply(subst perm2) - using qq3 fresh2 fr1 - apply(simp add: set_eqvt) - apply(simp add: fresh_star_Pair) - apply(auto simp add: fresh_star_def) - done - also have "... = f bs y c" + apply(rule perm2[symmetric]) + using qq3 fresh2 fr1 by (auto simp add: fresh_star_def) + also have "... = f bs y c" apply(rule perm_supp_eq) - using qq3 fr1 fcb2 - apply(simp add: set_eqvt) - apply(simp add: fresh_star_Pair) - apply(auto simp add: fresh_star_def) - done + using qq3 fr1 fcb2 by (auto simp add: fresh_star_def) finally show ?thesis by simp qed +lemma Abs_lst1_fcb2: + fixes a b :: "atom" + and x y :: "'b :: fs" + and c::"'c :: fs" + assumes e: "(Abs_lst [a] x) = (Abs_lst [b] y)" + and fcb1: "a \ f a x c" + and fresh: "{a, b} \* c" + and perm1: "\p. supp p \* c \ p \ (f a x c) = f (p \ a) (p \ x) c" + and perm2: "\p. supp p \* c \ p \ (f b y c) = f (p \ b) (p \ y) c" + shows "f a x c = f b y c" +using e +apply(drule_tac Abs_lst_fcb2[where c="c" and f="\(as::atom list) . f (hd as)"]) +apply(simp_all) +using fcb1 fresh perm1 perm2 +apply(simp_all add: fresh_star_def) +done + lemma supp_zero_perm_zero: shows "supp (p :: perm) = {} \ p = 0" by (metis supp_perm_singleton supp_zero_perm)