diff -r e3f8673085b1 -r 92c001d93225 Nominal/Nominal2_Abs.thy --- a/Nominal/Nominal2_Abs.thy Mon Jan 17 17:20:21 2011 +0100 +++ b/Nominal/Nominal2_Abs.thy Tue Jan 18 06:55:18 2011 +0100 @@ -250,6 +250,102 @@ apply(rule_tac [!] x="p \ pa" in exI) by (auto simp add: fresh_star_permute_iff permute_eqvt[symmetric]) + +section {* Strengthening the equivalence *} + +lemma disjoint_right_eq: + assumes a: "A \ B1 = A \ B2" + and b: "A \ B1 = {}" "A \ B2 = {}" + shows "B1 = B2" +using a b +by (metis Int_Un_distrib2 Int_absorb2 Int_commute Un_upper2) + +lemma supp_property_set: + assumes a: "(as, x) \set (op =) supp p (as', x')" + shows "p \ (supp x \ as) = supp x' \ as'" +proof - + from a have "(supp x - as) \* p" by (auto simp only: alphas) + then have *: "p \ (supp x - as) = (supp x - as)" + by (simp add: atom_set_perm_eq) + have "(supp x' - as') \ (supp x' \ as') = supp x'" by auto + also have "\ = supp (p \ x)" using a by (simp add: alphas) + also have "\ = p \ (supp x)" by (simp add: supp_eqvt) + also have "\ = p \ ((supp x - as) \ (supp x \ as))" by auto + also have "\ = (p \ (supp x - as)) \ (p \ (supp x \ as))" by (simp add: union_eqvt) + also have "\ = (supp x - as) \ (p \ (supp x \ as))" using * by simp + also have "\ = (supp x' - as') \ (p \ (supp x \ as))" using a by (simp add: alphas) + finally have "(supp x' - as') \ (supp x' \ as') = (supp x' - as') \ (p \ (supp x \ as))" . + moreover + have "(supp x' - as') \ (supp x' \ as') = {}" by auto + moreover + have "(supp x - as) \ (supp x \ as) = {}" by auto + then have "p \ ((supp x - as) \ (supp x \ as) = {})" by (simp add: permute_bool_def) + then have "(p \ (supp x - as)) \ (p \ (supp x \ as)) = {}" by (perm_simp) (simp) + then have "(supp x - as) \ (p \ (supp x \ as)) = {}" using * by simp + then have "(supp x' - as') \ (p \ (supp x \ as)) = {}" using a by (simp add: alphas) + ultimately show "p \ (supp x \ as) = supp x' \ as'" + by (auto dest: disjoint_right_eq) +qed + +lemma supp_property_res: + assumes a: "(as, x) \res (op =) supp p (as', x')" + shows "p \ (supp x \ as) = supp x' \ as'" +proof - + from a have "(supp x - as) \* p" by (auto simp only: alphas) + then have *: "p \ (supp x - as) = (supp x - as)" + by (simp add: atom_set_perm_eq) + have "(supp x' - as') \ (supp x' \ as') = supp x'" by auto + also have "\ = supp (p \ x)" using a by (simp add: alphas) + also have "\ = p \ (supp x)" by (simp add: supp_eqvt) + also have "\ = p \ ((supp x - as) \ (supp x \ as))" by auto + also have "\ = (p \ (supp x - as)) \ (p \ (supp x \ as))" by (simp add: union_eqvt) + also have "\ = (supp x - as) \ (p \ (supp x \ as))" using * by simp + also have "\ = (supp x' - as') \ (p \ (supp x \ as))" using a by (simp add: alphas) + finally have "(supp x' - as') \ (supp x' \ as') = (supp x' - as') \ (p \ (supp x \ as))" . + moreover + have "(supp x' - as') \ (supp x' \ as') = {}" by auto + moreover + have "(supp x - as) \ (supp x \ as) = {}" by auto + then have "p \ ((supp x - as) \ (supp x \ as) = {})" by (simp add: permute_bool_def) + then have "(p \ (supp x - as)) \ (p \ (supp x \ as)) = {}" by (perm_simp) (simp) + then have "(supp x - as) \ (p \ (supp x \ as)) = {}" using * by simp + then have "(supp x' - as') \ (p \ (supp x \ as)) = {}" using a by (simp add: alphas) + ultimately show "p \ (supp x \ as) = supp x' \ as'" + by (auto dest: disjoint_right_eq) +qed + +lemma supp_property_list: + assumes a: "(as, x) \lst (op =) supp p (as', x')" + shows "p \ (supp x \ set as) = supp x' \ set as'" +proof - + from a have "(supp x - set as) \* p" by (auto simp only: alphas) + then have *: "p \ (supp x - set as) = (supp x - set as)" + by (simp add: atom_set_perm_eq) + have "(supp x' - set as') \ (supp x' \ set as') = supp x'" by auto + also have "\ = supp (p \ x)" using a by (simp add: alphas) + also have "\ = p \ (supp x)" by (simp add: supp_eqvt) + also have "\ = p \ ((supp x - set as) \ (supp x \ set as))" by auto + also have "\ = (p \ (supp x - set as)) \ (p \ (supp x \ set as))" by (simp add: union_eqvt) + also have "\ = (supp x - set as) \ (p \ (supp x \ set as))" using * by simp + also have "\ = (supp x' - set as') \ (p \ (supp x \ set as))" using a by (simp add: alphas) + finally + have "(supp x' - set as') \ (supp x' \ set as') = (supp x' - set as') \ (p \ (supp x \ set as))" . + moreover + have "(supp x' - set as') \ (supp x' \ set as') = {}" by auto + moreover + have "(supp x - set as) \ (supp x \ set as) = {}" by auto + then have "p \ ((supp x - set as) \ (supp x \ set as) = {})" by (simp add: permute_bool_def) + then have "(p \ (supp x - set as)) \ (p \ (supp x \ set as)) = {}" by (perm_simp) (simp) + then have "(supp x - set as) \ (p \ (supp x \ set as)) = {}" using * by simp + then have "(supp x' - set as') \ (p \ (supp x \ set as)) = {}" using a by (simp add: alphas) + ultimately show "p \ (supp x \ set as) = supp x' \ set as'" + by (auto dest: disjoint_right_eq) +qed + + + +section {* Quotient types *} + quotient_type 'a abs_set = "(atom set \ 'a::pt)" / "alpha_abs_set" and 'b abs_res = "(atom set \ 'b::pt)" / "alpha_abs_res" @@ -550,7 +646,8 @@ shows "\q. [bs]set. x = [p \ bs]set. (q \ x) \ q \ bs = p \ bs" proof - from b set_renaming_perm - obtain q where *: "q \ bs = p \ bs" and **: "supp q \ bs \ (p \ bs)" by blast + obtain q where *: "\b \ bs. q \ b = p \ b" and **: "supp q \ bs \ (p \ bs)" by blast + have ***: "q \ bs = p \ bs" using b * by (induct) (simp add: permute_set_eq, simp add: insert_eqvt) have "[bs]set. x = q \ ([bs]set. x)" apply(rule perm_supp_eq[symmetric]) using a ** @@ -558,8 +655,8 @@ unfolding fresh_star_def by auto also have "\ = [q \ bs]set. (q \ x)" by simp - finally have "[bs]set. x = [p \ bs]set. (q \ x)" by (simp add: *) - then show "\q. [bs]set. x = [p \ bs]set. (q \ x) \ q \ bs = p \ bs" using * by metis + finally have "[bs]set. x = [p \ bs]set. (q \ x)" by (simp add: ***) + then show "\q. [bs]set. x = [p \ bs]set. (q \ x) \ q \ bs = p \ bs" using *** by metis qed lemma Abs_rename_res: @@ -569,7 +666,8 @@ shows "\q. [bs]res. x = [p \ bs]res. (q \ x) \ q \ bs = p \ bs" proof - from b set_renaming_perm - obtain q where *: "q \ bs = p \ bs" and **: "supp q \ bs \ (p \ bs)" by blast + obtain q where *: "\b \ bs. q \ b = p \ b" and **: "supp q \ bs \ (p \ bs)" by blast + have ***: "q \ bs = p \ bs" using b * by (induct) (simp add: permute_set_eq, simp add: insert_eqvt) have "[bs]res. x = q \ ([bs]res. x)" apply(rule perm_supp_eq[symmetric]) using a ** @@ -577,8 +675,8 @@ unfolding fresh_star_def by auto also have "\ = [q \ bs]res. (q \ x)" by simp - finally have "[bs]res. x = [p \ bs]res. (q \ x)" by (simp add: *) - then show "\q. [bs]res. x = [p \ bs]res. (q \ x) \ q \ bs = p \ bs" using * by metis + finally have "[bs]res. x = [p \ bs]res. (q \ x)" by (simp add: ***) + then show "\q. [bs]res. x = [p \ bs]res. (q \ x) \ q \ bs = p \ bs" using *** by metis qed lemma Abs_rename_lst: @@ -587,7 +685,8 @@ shows "\q. [bs]lst. x = [p \ bs]lst. (q \ x) \ q \ bs = p \ bs" proof - from a list_renaming_perm - obtain q where *: "q \ bs = p \ bs" and **: "supp q \ set bs \ (p \ set bs)" by blast + obtain q where *: "\b \ set bs. q \ b = p \ b" and **: "supp q \ set bs \ (p \ set bs)" by blast + have ***: "q \ bs = p \ bs" using * by (induct bs) (simp_all add: insert_eqvt) have "[bs]lst. x = q \ ([bs]lst. x)" apply(rule perm_supp_eq[symmetric]) using a ** @@ -595,8 +694,8 @@ unfolding fresh_star_def by auto also have "\ = [q \ bs]lst. (q \ x)" by simp - finally have "[bs]lst. x = [p \ bs]lst. (q \ x)" by (simp add: *) - then show "\q. [bs]lst. x = [p \ bs]lst. (q \ x) \ q \ bs = p \ bs" using * by metis + finally have "[bs]lst. x = [p \ bs]lst. (q \ x)" by (simp add: ***) + then show "\q. [bs]lst. x = [p \ bs]lst. (q \ x) \ q \ bs = p \ bs" using *** by metis qed