diff -r aa999d263b10 -r d00dd828f7af Nominal/Abs.thy --- a/Nominal/Abs.thy Fri Mar 26 22:22:41 2010 +0100 +++ b/Nominal/Abs.thy Fri Mar 26 22:23:22 2010 +0100 @@ -117,33 +117,6 @@ apply(rule_tac [!] x="p \ pa" in exI) by (auto simp add: fresh_star_permute_iff permute_eqvt[symmetric]) -lemma alphas_abs_swap1: - assumes a1: "a \ (supp x) - bs" - and a2: "b \ (supp x) - bs" - shows "(bs, x) \abs ((a \ b) \ bs, (a \ b) \ x)" - and "(bs, x) \abs_res ((a \ b) \ bs, (a \ b) \ x)" - using a1 a2 - unfolding alphas_abs - unfolding alphas - unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] - unfolding fresh_star_def fresh_def - unfolding swap_set_not_in[OF a1 a2] - by (rule_tac [!] x="(a \ b)" in exI) - (auto simp add: supp_perm swap_atom) - -lemma alphas_abs_swap2: - assumes a1: "a \ (supp x) - (set bs)" - and a2: "b \ (supp x) - (set bs)" - shows "(bs, x) \abs_lst ((a \ b) \ bs, (a \ b) \ x)" - using a1 a2 - unfolding alphas_abs - unfolding alphas - unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric] - unfolding fresh_star_def fresh_def - unfolding swap_set_not_in[OF a1 a2] - by (rule_tac [!] x="(a \ b)" in exI) - (auto simp add: supp_perm swap_atom) - fun aux_set where @@ -227,9 +200,16 @@ shows "(\as (x::'a::pt). P1 (Abs as x)) \ P1 x1" and "(\as (x::'a::pt). P2 (Abs_res as x)) \ P2 x2" and "(\as (x::'a::pt). P3 (Abs_lst as x)) \ P3 x3" - apply(lifting prod.induct[where 'a="atom set" and 'b="'a"]) - apply(lifting prod.induct[where 'a="atom set" and 'b="'a"]) - apply(lifting prod.induct[where 'a="atom list" and 'b="'a"]) + by (lifting prod.induct[where 'a="atom set" and 'b="'a"] + prod.induct[where 'a="atom set" and 'b="'a"] + prod.induct[where 'a="atom list" and 'b="'a"]) + +lemma abs_eq_iff: + shows "Abs bs x = Abs cs y \ (bs, x) \abs (cs, y)" + and "Abs_res bs x = Abs_res cs y \ (bs, x) \abs_res (cs, y)" + and "Abs_lst ds x = Abs_lst hs y \ (ds, x) \abs_lst (hs, y)" + apply(simp_all) + apply(lifting alphas_abs) done instantiation abs_gen :: (pt) pt @@ -297,6 +277,42 @@ lemmas permute_abs = permute_Abs permute_Abs_res permute_Abs_lst +lemma abs_swap1: + assumes a1: "a \ (supp x) - bs" + and a2: "b \ (supp x) - bs" + shows "Abs bs x = Abs ((a \ b) \ bs) ((a \ b) \ x)" + and "Abs_res bs x = Abs_res ((a \ b) \ bs) ((a \ b) \ x)" + unfolding abs_eq_iff + unfolding alphas_abs + unfolding alphas + unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] + unfolding fresh_star_def fresh_def + unfolding swap_set_not_in[OF a1 a2] + using a1 a2 + by (rule_tac [!] x="(a \ b)" in exI) + (auto simp add: supp_perm swap_atom) + +lemma abs_swap2: + assumes a1: "a \ (supp x) - (set bs)" + and a2: "b \ (supp x) - (set bs)" + shows "Abs_lst bs x = Abs_lst ((a \ b) \ bs) ((a \ b) \ x)" + unfolding abs_eq_iff + unfolding alphas_abs + unfolding alphas + unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric] + unfolding fresh_star_def fresh_def + unfolding swap_set_not_in[OF a1 a2] + using a1 a2 + by (rule_tac [!] x="(a \ b)" in exI) + (auto simp add: supp_perm swap_atom) + +lemma abs_supports: + shows "((supp x) - as) supports (Abs as x)" + and "((supp x) - as) supports (Abs_res as x)" + and "((supp x) - (set bs)) supports (Abs_lst bs x)" + unfolding supports_def + unfolding permute_abs + by (simp_all add: abs_swap1[symmetric] abs_swap2[symmetric]) quotient_definition "supp_gen :: ('a::pt) abs_gen \ atom set" @@ -317,10 +333,7 @@ shows "supp_gen (Abs bs x) = (supp x) - bs" and "supp_res (Abs_res bs x) = (supp x) - bs" and "supp_lst (Abs_lst cs x) = (supp x) - (set cs)" - apply(lifting aux_set.simps) - apply(lifting aux_set.simps) - apply(lifting aux_list.simps) - done + by (lifting aux_set.simps aux_set.simps aux_list.simps) lemma aux_supp_eqvt[eqvt]: shows "(p \ supp_gen x) = supp_gen (p \ x)" @@ -342,30 +355,6 @@ apply(simp_all add: eqvts_raw) done -lemma abs_swap1: - assumes a1: "a \ (supp x) - bs" - and a2: "b \ (supp x) - bs" - shows "Abs bs x = Abs ((a \ b) \ bs) ((a \ b) \ x)" - and "Abs_res bs x = Abs_res ((a \ b) \ bs) ((a \ b) \ x)" - using a1 a2 - apply(lifting alphas_abs_swap1(1)) - apply(lifting alphas_abs_swap1(2)) - done - -lemma abs_swap2: - assumes a1: "a \ (supp x) - (set bs)" - and a2: "b \ (supp x) - (set bs)" - shows "Abs_lst bs x = Abs_lst ((a \ b) \ bs) ((a \ b) \ x)" - using a1 a2 by (lifting alphas_abs_swap2) - -lemma abs_supports: - shows "((supp x) - as) supports (Abs as x)" - and "((supp x) - as) supports (Abs_res as x)" - and "((supp x) - (set bs)) supports (Abs_lst bs x)" - unfolding supports_def - unfolding permute_abs - by (simp_all add: abs_swap1[symmetric] abs_swap2[symmetric]) - lemma supp_abs_subset1: assumes a: "finite (supp x)" shows "(supp x) - as \ supp (Abs as x)" @@ -430,14 +419,6 @@ unfolding supp_abs by auto -lemma abs_eq_iff: - shows "Abs bs x = Abs cs y \ (bs, x) \abs (cs, y)" - and "Abs_res bs x = Abs_res cs y \ (bs, x) \abs_res (cs, y)" - and "Abs_lst ds x = Abs_lst hs y \ (ds, x) \abs_lst (hs, y)" - apply(simp_all) - apply(lifting alphas_abs) - done - section {* BELOW is stuff that may or may not be needed *}