diff -r 99706604c573 -r 9038c9549073 Nominal/Abs.thy --- a/Nominal/Abs.thy Wed Jun 23 06:45:03 2010 +0100 +++ b/Nominal/Abs.thy Wed Jun 23 06:54:48 2010 +0100 @@ -536,7 +536,8 @@ apply(simp add: atom_image_cong) done -lemma swap_atom_image_fresh: "\a \ atom ` (fn :: ('a :: at_base set)); b \ atom ` fn\ \ (a \ b) \ fn = fn" +lemma swap_atom_image_fresh: + "\a \ atom ` (fn :: ('a :: at_base set)); b \ atom ` fn\ \ (a \ b) \ fn = fn" apply (simp add: fresh_def) apply (simp add: supp_atom_image) apply (fold fresh_def) @@ -578,291 +579,6 @@ R1 (pi \ x1) y1 \ R2 (pi \ x2) y2 \ R3 (pi \ x3) y3 \ pi \ bsl = csl)" by (simp add: alphas) -lemma alpha_gen_compose_sym: - fixes pi - assumes b: "(aa, t) \gen (\x1 x2. R x1 x2 \ R x2 x1) f pi (ab, s)" - and a: "\pi t s. (R t s \ R (pi \ t) (pi \ s))" - shows "(ab, s) \gen R f (- pi) (aa, t)" - using b apply - - apply(simp add: alphas) - apply(erule conjE)+ - apply(rule conjI) - apply(simp add: fresh_star_def fresh_minus_perm) - apply(subgoal_tac "R (- pi \ s) ((- pi) \ (pi \ t))") - apply simp - apply(clarify) - apply(simp) - apply(rule a) - apply assumption - done - -lemma alpha_res_compose_sym: - fixes pi - assumes b: "(aa, t) \res (\x1 x2. R x1 x2 \ R x2 x1) f pi (ab, s)" - and a: "\pi t s. (R t s \ R (pi \ t) (pi \ s))" - shows "(ab, s) \res R f (- pi) (aa, t)" - using b apply - - apply(simp add: alphas) - apply(erule conjE)+ - apply(rule conjI) - apply(simp add: fresh_star_def fresh_minus_perm) - apply(subgoal_tac "R (- pi \ s) ((- pi) \ (pi \ t))") - apply simp - apply(rule a) - apply assumption - done - -lemma alpha_lst_compose_sym: - fixes pi - assumes b: "(aa, t) \lst (\x1 x2. R x1 x2 \ R x2 x1) f pi (ab, s)" - and a: "\pi t s. (R t s \ R (pi \ t) (pi \ s))" - shows "(ab, s) \lst R f (- pi) (aa, t)" - using b apply - - apply(simp add: alphas) - apply(erule conjE)+ - apply(rule conjI) - apply(simp add: fresh_star_def fresh_minus_perm) - apply(subgoal_tac "R (- pi \ s) ((- pi) \ (pi \ t))") - apply simp - apply(clarify) - apply(simp) - apply(rule a) - apply assumption - done - -lemmas alphas_compose_sym = alpha_gen_compose_sym alpha_res_compose_sym alpha_lst_compose_sym - -lemma alpha_gen_compose_sym2: - assumes a: "(aa, t1, t2) \gen (\(x11, x12) (x21, x22). - (R1 x11 x21 \ R1 x21 x11) \ R2 x12 x22 \ R2 x22 x12) (\(b, a). fb b \ fa a) pi (ab, s1, s2)" - and r1: "\pi t s. R1 t s \ R1 (pi \ t) (pi \ s)" - and r2: "\pi t s. R2 t s \ R2 (pi \ t) (pi \ s)" - shows "(ab, s1, s2) \gen (\(a, b) (d, c). R1 a d \ R2 b c) (\(b, a). fb b \ fa a) (- pi) (aa, t1, t2)" - using a - apply(simp add: alphas) - apply clarify - apply (rule conjI) - apply(simp add: fresh_star_def fresh_minus_perm) - apply (rule conjI) - apply (rotate_tac 3) - apply (drule_tac pi="- pi" in r1) - apply simp - apply (rule conjI) - apply (rotate_tac -1) - apply (drule_tac pi="- pi" in r2) - apply simp_all - done - -lemma alpha_res_compose_sym2: - assumes a: "(aa, t1, t2) \res (\(x11, x12) (x21, x22). - (R1 x11 x21 \ R1 x21 x11) \ R2 x12 x22 \ R2 x22 x12) (\(b, a). fb b \ fa a) pi (ab, s1, s2)" - and r1: "\pi t s. R1 t s \ R1 (pi \ t) (pi \ s)" - and r2: "\pi t s. R2 t s \ R2 (pi \ t) (pi \ s)" - shows "(ab, s1, s2) \res (\(a, b) (d, c). R1 a d \ R2 b c) (\(b, a). fb b \ fa a) (- pi) (aa, t1, t2)" - using a - apply(simp add: alphas) - apply clarify - apply (rule conjI) - apply(simp add: fresh_star_def fresh_minus_perm) - apply (rule conjI) - apply (rotate_tac 3) - apply (drule_tac pi="- pi" in r1) - apply simp - apply (rotate_tac -1) - apply (drule_tac pi="- pi" in r2) - apply simp - done - -lemma alpha_lst_compose_sym2: - assumes a: "(aa, t1, t2) \lst (\(x11, x12) (x21, x22). - (R1 x11 x21 \ R1 x21 x11) \ R2 x12 x22 \ R2 x22 x12) (\(b, a). fb b \ fa a) pi (ab, s1, s2)" - and r1: "\pi t s. R1 t s \ R1 (pi \ t) (pi \ s)" - and r2: "\pi t s. R2 t s \ R2 (pi \ t) (pi \ s)" - shows "(ab, s1, s2) \lst (\(a, b) (d, c). R1 a d \ R2 b c) (\(b, a). fb b \ fa a) (- pi) (aa, t1, t2)" - using a - apply(simp add: alphas) - apply clarify - apply (rule conjI) - apply(simp add: fresh_star_def fresh_minus_perm) - apply (rule conjI) - apply (rotate_tac 3) - apply (drule_tac pi="- pi" in r1) - apply simp - apply (rule conjI) - apply (rotate_tac -1) - apply (drule_tac pi="- pi" in r2) - apply simp_all - done - -lemmas alphas_compose_sym2 = alpha_gen_compose_sym2 alpha_res_compose_sym2 alpha_lst_compose_sym2 - -lemma alpha_gen_compose_trans: - fixes pi pia - assumes b: "(aa, t) \gen (\x1 x2. R x1 x2 \ (\x. R x2 x \ R x1 x)) f pi (ab, ta)" - and c: "(ab, ta) \gen R f pia (ac, sa)" - and a: "\pi t s. (R t s \ R (pi \ t) (pi \ s))" - shows "(aa, t) \gen R f (pia + pi) (ac, sa)" - using b c apply - - apply(simp add: alphas) - apply(erule conjE)+ - apply(simp add: fresh_star_plus) - apply(drule_tac x="- pia \ sa" in spec) - apply(drule mp) - apply(rotate_tac 5) - apply(drule_tac pi="- pia" in a) - apply(simp) - apply(rotate_tac 7) - apply(drule_tac pi="pia" in a) - apply(simp) - done - -lemma alpha_res_compose_trans: - fixes pi pia - assumes b: "(aa, t) \res (\x1 x2. R x1 x2 \ (\x. R x2 x \ R x1 x)) f pi (ab, ta)" - and c: "(ab, ta) \res R f pia (ac, sa)" - and a: "\pi t s. (R t s \ R (pi \ t) (pi \ s))" - shows "(aa, t) \res R f (pia + pi) (ac, sa)" - using b c apply - - apply(simp add: alphas) - apply(erule conjE)+ - apply(simp add: fresh_star_plus) - apply(drule_tac x="- pia \ sa" in spec) - apply(drule mp) - apply(drule_tac pi="- pia" in a) - apply(simp) - apply(rotate_tac 6) - apply(drule_tac pi="pia" in a) - apply(simp) - done - -lemma alpha_lst_compose_trans: - fixes pi pia - assumes b: "(aa, t) \lst (\x1 x2. R x1 x2 \ (\x. R x2 x \ R x1 x)) f pi (ab, ta)" - and c: "(ab, ta) \lst R f pia (ac, sa)" - and a: "\pi t s. (R t s \ R (pi \ t) (pi \ s))" - shows "(aa, t) \lst R f (pia + pi) (ac, sa)" - using b c apply - - apply(simp add: alphas) - apply(erule conjE)+ - apply(simp add: fresh_star_plus) - apply(drule_tac x="- pia \ sa" in spec) - apply(drule mp) - apply(rotate_tac 5) - apply(drule_tac pi="- pia" in a) - apply(simp) - apply(rotate_tac 7) - apply(drule_tac pi="pia" in a) - apply(simp) - done - -lemmas alphas_compose_trans = alpha_gen_compose_trans alpha_res_compose_trans alpha_lst_compose_trans - -lemma alpha_gen_compose_trans2: - fixes pi pia - assumes b: "(aa, (t1, t2)) \gen - (\(b, a) (d, c). R1 b d \ (\z. R1 d z \ R1 b z) \ R2 a c \ (\z. R2 c z \ R2 a z)) - (\(b, a). fv_a b \ fv_b a) pi (ab, (ta1, ta2))" - and c: "(ab, (ta1, ta2)) \gen (\(b, a) (d, c). R1 b d \ R2 a c) (\(b, a). fv_a b \ fv_b a) - pia (ac, (sa1, sa2))" - and r1: "\pi t s. R1 t s \ R1 (pi \ t) (pi \ s)" - and r2: "\pi t s. R2 t s \ R2 (pi \ t) (pi \ s)" - shows "(aa, (t1, t2)) \gen (\(b, a) (d, c). R1 b d \ R2 a c) (\(b, a). fv_a b \ fv_b a) - (pia + pi) (ac, (sa1, sa2))" - using b c apply - - apply(simp add: alphas2) - apply(simp add: alphas) - apply(erule conjE)+ - apply(simp add: fresh_star_plus) - apply(drule_tac x="- pia \ sa1" in spec) - apply(drule mp) - apply(rotate_tac 5) - apply(drule_tac pi="- pia" in r1) - apply(simp) - apply(rotate_tac -1) - apply(drule_tac pi="pia" in r1) - apply(simp) - apply(drule_tac x="- pia \ sa2" in spec) - apply(drule mp) - apply(rotate_tac 6) - apply(drule_tac pi="- pia" in r2) - apply(simp) - apply(rotate_tac -1) - apply(drule_tac pi="pia" in r2) - apply(simp) - done - -lemma alpha_res_compose_trans2: - fixes pi pia - assumes b: "(aa, (t1, t2)) \res - (\(b, a) (d, c). R1 b d \ (\z. R1 d z \ R1 b z) \ R2 a c \ (\z. R2 c z \ R2 a z)) - (\(b, a). fv_a b \ fv_b a) pi (ab, (ta1, ta2))" - and c: "(ab, (ta1, ta2)) \res (\(b, a) (d, c). R1 b d \ R2 a c) (\(b, a). fv_a b \ fv_b a) - pia (ac, (sa1, sa2))" - and r1: "\pi t s. R1 t s \ R1 (pi \ t) (pi \ s)" - and r2: "\pi t s. R2 t s \ R2 (pi \ t) (pi \ s)" - shows "(aa, (t1, t2)) \res (\(b, a) (d, c). R1 b d \ R2 a c) (\(b, a). fv_a b \ fv_b a) - (pia + pi) (ac, (sa1, sa2))" - using b c apply - - apply(simp add: alphas2) - apply(simp add: alphas) - apply(erule conjE)+ - apply(simp add: fresh_star_plus) - apply(drule_tac x="- pia \ sa1" in spec) - apply(drule mp) - apply(rotate_tac 5) - apply(drule_tac pi="- pia" in r1) - apply(simp) - apply(rotate_tac -1) - apply(drule_tac pi="pia" in r1) - apply(simp) - apply(drule_tac x="- pia \ sa2" in spec) - apply(drule mp) - apply(rotate_tac 6) - apply(drule_tac pi="- pia" in r2) - apply(simp) - apply(rotate_tac -1) - apply(drule_tac pi="pia" in r2) - apply(simp) - done - -lemma alpha_lst_compose_trans2: - fixes pi pia - assumes b: "(aa, (t1, t2)) \lst - (\(b, a) (d, c). R1 b d \ (\z. R1 d z \ R1 b z) \ R2 a c \ (\z. R2 c z \ R2 a z)) - (\(b, a). fv_a b \ fv_b a) pi (ab, (ta1, ta2))" - and c: "(ab, (ta1, ta2)) \lst (\(b, a) (d, c). R1 b d \ R2 a c) (\(b, a). fv_a b \ fv_b a) - pia (ac, (sa1, sa2))" - and r1: "\pi t s. R1 t s \ R1 (pi \ t) (pi \ s)" - and r2: "\pi t s. R2 t s \ R2 (pi \ t) (pi \ s)" - shows "(aa, (t1, t2)) \lst (\(b, a) (d, c). R1 b d \ R2 a c) (\(b, a). fv_a b \ fv_b a) - (pia + pi) (ac, (sa1, sa2))" - using b c apply - - apply(simp add: alphas2) - apply(simp add: alphas) - apply(erule conjE)+ - apply(simp add: fresh_star_plus) - apply(drule_tac x="- pia \ sa1" in spec) - apply(drule mp) - apply(rotate_tac 5) - apply(drule_tac pi="- pia" in r1) - apply(simp) - apply(rotate_tac -1) - apply(drule_tac pi="pia" in r1) - apply(simp) - apply(drule_tac x="- pia \ sa2" in spec) - apply(drule mp) - apply(rotate_tac 6) - apply(drule_tac pi="- pia" in r2) - apply(simp) - apply(rotate_tac -1) - apply(drule_tac pi="pia" in r2) - apply(simp) - done - -lemmas alphas_compose_trans2 = alpha_gen_compose_trans2 alpha_res_compose_trans2 alpha_lst_compose_trans2 - - - lemma alpha_gen_simpler: assumes fv_rsp: "\x y. R y x \ f x = f y" and fin_fv: "finite (f x)"