# HG changeset patch # User Christian Urban # Date 1295370280 -3600 # Node ID 3c79dfec1cf0f7a8d7af10dc0225f86b35ff91ae # Parent 87ebc706df67478085bec0b74f6a9fd4927e9806 derived stronger Abs_eq_iff2 theorems diff -r 87ebc706df67 -r 3c79dfec1cf0 Nominal/Nominal2_Abs.thy --- a/Nominal/Nominal2_Abs.thy Tue Jan 18 17:30:47 2011 +0100 +++ b/Nominal/Nominal2_Abs.thy Tue Jan 18 18:04:40 2011 +0100 @@ -260,33 +260,6 @@ 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'" @@ -314,36 +287,7 @@ 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 - -lemma alpha_abs_res_stronger1: - fixes x::"'a::fs" +lemma alpha_abs_res_stronger1_aux: assumes asm: "(as, x) \res (op =) supp p' (as', x')" shows "\p. (as, x) \res (op =) supp p (as', x') \ supp p \ (supp x \ as) \ (supp x' \ as')" proof - @@ -376,8 +320,12 @@ show "\p. (as, x) \res (op =) supp p (as', x') \ supp p \ (supp x \ as) \ (supp x' \ as')" by blast qed +lemma alpha_abs_res_stronger1: + assumes asm: "(as, x) \res (op =) supp p' (as', x')" + shows "\p. (as, x) \res (op =) supp p (as', x') \ supp p \ as \ as'" +using alpha_abs_res_stronger1_aux[OF asm] by auto + lemma alpha_abs_set_stronger1: - fixes x::"'a::fs" assumes asm: "(as, x) \set (op =) supp p' (as', x')" shows "\p. (as, x) \set (op =) supp p (as', x') \ supp p \ as \ as'" proof - @@ -421,7 +369,61 @@ show "\p. (as, x) \set (op =) supp p (as', x') \ supp p \ as \ as'" using zc by blast qed +lemma alpha_abs_lst_stronger1: + assumes asm: "(as, x) \lst (op =) supp p' (as', x')" + shows "\p. (as, x) \lst (op =) supp p (as', x') \ supp p \ set as \ set as'" +proof - + from asm have 0: "(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) + obtain p where *: "\b \ (supp x \ set as). p \ b = p' \ b" + and **: "supp p \ (supp x \ set as) \ p' \ (supp x \ set as)" + using set_renaming_perm2 by blast + from * have "\b \ supp x. p \ b = p' \ b" by blast + then have a: "p \ x = p' \ x" using supp_perm_perm_eq by auto + from * have "\b \ set as. p \ b = p' \ b" by blast + then have zb: "p \ as = p' \ as" by (induct as) (auto) + have zc: "p' \ set as = set as'" using asm by (simp add: alphas set_eqvt) + from 0 have 1: "(supp x - set as) \* p" using * + by (auto simp add: fresh_star_def fresh_perm) + then have 2: "(supp x - set as) \ supp p = {}" + by (auto simp add: fresh_star_def fresh_def) + have b: "supp x = (supp x - set as) \ (supp x \ set as)" by auto + have "supp p \ supp x \ set as \ p' \ supp x \ p' \ set as" using ** using union_eqvt by blast + also have "\ = (supp x - set as) \ (supp x \ set as) \ set as \ + (p' \ ((supp x - set as) \ (supp x \ set as))) \ p' \ set as" using b by simp + also have "\ = (supp x - set as) \ (supp x \ set as) \ set as \ + ((p' \ (supp x - set as)) \ (p' \ (supp x \ set as))) \ p' \ set as" by (simp add: union_eqvt) + also have "\ = (supp x - set as) \ (supp x \ set as) \ set as \ + (p' \ (supp x \ set as)) \ p' \ set as" using # by auto + also have "\ = (supp x - set as) \ (supp x \ set as) \ set as \ p' \ ((supp x \ set as) \ set as)" + using union_eqvt by auto + also have "\ = (supp x - set as) \ (supp x \ set as) \ set as \ p' \ set as" + by (metis Int_commute Un_commute sup_inf_absorb) + also have "\ = (supp x - set as) \ set as \ p' \ set as" by blast + finally have "supp p \ (supp x - set as) \ set as \ p' \ set as" . + then have "supp p \ set as \ p' \ set as" using 2 by blast + moreover + have "(as, x) \lst (op =) supp p (as', x')" using asm 1 a zb by (simp add: alphas) + ultimately + show "\p. (as, x) \lst (op =) supp p (as', x') \ supp p \ set as \ set as'" using zc by blast +qed +lemma alphas_abs_stronger: + shows "(as, x) \abs_set (as', x') \ (\p. (as, x) \set (op =) supp p (as', x') \ supp p \ as \ as')" + and "(as, x) \abs_res (as', x') \ (\p. (as, x) \res (op =) supp p (as', x') \ supp p \ as \ as')" + and "(bs, x) \abs_lst (bs', x') \ + (\p. (bs, x) \lst (op =) supp p (bs', x') \ supp p \ set bs \ set bs')" +apply(rule iffI) +apply(auto simp add: alphas_abs alpha_abs_set_stronger1)[1] +apply(auto simp add: alphas_abs)[1] +apply(rule iffI) +apply(auto simp add: alphas_abs alpha_abs_res_stronger1)[1] +apply(auto simp add: alphas_abs)[1] +apply(rule iffI) +apply(auto simp add: alphas_abs alpha_abs_lst_stronger1)[1] +apply(auto simp add: alphas_abs)[1] +done section {* Quotient types *} @@ -474,6 +476,13 @@ and "Abs_lst bsl x = Abs_lst csl y \ (\p. (bsl, x) \lst (op =) supp p (csl, y))" by (lifting alphas_abs) +lemma Abs_eq_iff2: + shows "Abs_set bs x = Abs_set cs y \ (\p. (bs, x) \set (op =) supp p (cs, y) \ supp p \ bs \ cs)" + and "Abs_res bs x = Abs_res cs y \ (\p. (bs, x) \res (op =) supp p (cs, y) \ supp p \ bs \ cs)" + and "Abs_lst bsl x = Abs_lst csl y \ + (\p. (bsl, x) \lst (op =) supp p (csl, y) \ supp p \ set bsl \ set csl)" + by (lifting alphas_abs_stronger) + lemma Abs_exhausts: shows "(\as (x::'a::pt). y1 = Abs_set as x \ P1) \ P1" and "(\as (x::'a::pt). y2 = Abs_res as x \ P2) \ P2" @@ -717,6 +726,7 @@ subsection {* Renaming of bodies of abstractions *} +(* FIXME: finiteness assumption is not needed *) lemma Abs_rename_set: fixes x::"'a::fs"