30 |
30 |
31 lemma Abs_lst_fcb2: |
31 lemma Abs_lst_fcb2: |
32 fixes as bs :: "atom list" |
32 fixes as bs :: "atom list" |
33 and x y :: "'b :: fs" |
33 and x y :: "'b :: fs" |
34 and c::"'c::fs" |
34 and c::"'c::fs" |
35 assumes eq: "[as]lst. x = [bs]lst. y" |
35 assumes eq: "[bf as]lst. x = [bf bs]lst. y" |
36 and fcb1: "(set as) \<sharp>* f as x c" |
36 and fcb1: "(set (bf as)) \<sharp>* f as x c" |
37 and fresh1: "set as \<sharp>* c" |
37 and fresh1: "set (bf as) \<sharp>* c" |
38 and fresh2: "set bs \<sharp>* c" |
38 and fresh2: "set (bf bs) \<sharp>* c" |
39 and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f as x c) = f (p \<bullet> as) (p \<bullet> x) c" |
39 and perm1: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f as x c) = f (p \<bullet> as) (p \<bullet> x) c" |
40 and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f bs y c) = f (p \<bullet> bs) (p \<bullet> y) c" |
40 and perm2: "\<And>p. supp p \<sharp>* c \<Longrightarrow> p \<bullet> (f bs y c) = f (p \<bullet> bs) (p \<bullet> y) c" |
|
41 and props: "eqvt bf" "inj bf" |
41 shows "f as x c = f bs y c" |
42 shows "f as x c = f bs y c" |
42 proof - |
43 proof - |
43 have "supp (as, x, c) supports (f as x c)" |
44 have "supp (as, x, c) supports (f as x c)" |
44 unfolding supports_def fresh_def[symmetric] |
45 unfolding supports_def fresh_def[symmetric] |
45 by (simp add: fresh_Pair perm1 fresh_star_def supp_swap swap_fresh_fresh) |
46 by (simp add: fresh_Pair perm1 fresh_star_def supp_swap swap_fresh_fresh) |
49 unfolding supports_def fresh_def[symmetric] |
50 unfolding supports_def fresh_def[symmetric] |
50 by (simp add: fresh_Pair perm2 fresh_star_def supp_swap swap_fresh_fresh) |
51 by (simp add: fresh_Pair perm2 fresh_star_def supp_swap swap_fresh_fresh) |
51 then have fin2: "finite (supp (f bs y c))" |
52 then have fin2: "finite (supp (f bs y c))" |
52 by (auto intro: supports_finite simp add: finite_supp) |
53 by (auto intro: supports_finite simp add: finite_supp) |
53 obtain q::"perm" where |
54 obtain q::"perm" where |
54 fr1: "(q \<bullet> (set as)) \<sharp>* (x, c, f as x c, f bs y c)" and |
55 fr1: "(q \<bullet> (set (bf as))) \<sharp>* (x, c, f as x c, f bs y c)" and |
55 fr2: "supp q \<sharp>* Abs_lst as x" and |
56 fr2: "supp q \<sharp>* ([bf as]lst. x)" and |
56 inc: "supp q \<subseteq> (set as) \<union> q \<bullet> (set as)" |
57 inc: "supp q \<subseteq> (set (bf as)) \<union> q \<bullet> (set (bf as))" |
57 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"] |
58 using at_set_avoiding3[where xs="set (bf as)" and c="(x, c, f as x c, f bs y c)" and x="[bf as]lst. x"] |
58 fin1 fin2 |
59 fin1 fin2 |
59 by (auto simp add: supp_Pair finite_supp Abs_fresh_star dest: fresh_star_supp_conv) |
60 by (auto simp add: supp_Pair finite_supp Abs_fresh_star dest: fresh_star_supp_conv) |
60 have "Abs_lst (q \<bullet> as) (q \<bullet> x) = q \<bullet> Abs_lst as x" by simp |
61 have "[q \<bullet> (bf as)]lst. (q \<bullet> x) = q \<bullet> ([bf as]lst. x)" by simp |
61 also have "\<dots> = Abs_lst as x" |
62 also have "\<dots> = [bf as]lst. x" |
62 by (simp only: fr2 perm_supp_eq) |
63 by (simp only: fr2 perm_supp_eq) |
63 finally have "Abs_lst (q \<bullet> as) (q \<bullet> x) = Abs_lst bs y" using eq by simp |
64 finally have "[q \<bullet> (bf as)]lst. (q \<bullet> x) = [bf bs]lst. y" using eq by simp |
64 then obtain r::perm where |
65 then obtain r::perm where |
65 qq1: "q \<bullet> x = r \<bullet> y" and |
66 qq1: "q \<bullet> x = r \<bullet> y" and |
66 qq2: "q \<bullet> as = r \<bullet> bs" and |
67 qq2: "q \<bullet> (bf as) = r \<bullet> (bf bs)" and |
67 qq3: "supp r \<subseteq> (q \<bullet> (set as)) \<union> set bs" |
68 qq3: "supp r \<subseteq> (q \<bullet> (set (bf as))) \<union> set (bf bs)" |
68 apply(drule_tac sym) |
69 apply(drule_tac sym) |
69 apply(simp only: Abs_eq_iff2 alphas) |
70 apply(simp only: Abs_eq_iff2 alphas) |
70 apply(erule exE) |
71 apply(erule exE) |
71 apply(erule conjE)+ |
72 apply(erule conjE)+ |
72 apply(drule_tac x="p" in meta_spec) |
73 apply(drule_tac x="p" in meta_spec) |
73 apply(simp add: set_eqvt) |
74 apply(simp add: set_eqvt) |
74 apply(blast) |
75 apply(blast) |
75 done |
76 done |
76 have "(set as) \<sharp>* f as x c" by (rule fcb1) |
77 have qq4: "q \<bullet> as = r \<bullet> bs" using qq2 props unfolding eqvt_def inj_on_def |
77 then have "q \<bullet> ((set as) \<sharp>* f as x c)" |
78 apply(perm_simp) |
|
79 apply(simp) |
|
80 done |
|
81 have "(set (bf as)) \<sharp>* f as x c" by (rule fcb1) |
|
82 then have "q \<bullet> ((set (bf as)) \<sharp>* f as x c)" |
78 by (simp add: permute_bool_def) |
83 by (simp add: permute_bool_def) |
79 then have "set (q \<bullet> as) \<sharp>* f (q \<bullet> as) (q \<bullet> x) c" |
84 then have "set (q \<bullet> (bf as)) \<sharp>* f (q \<bullet> as) (q \<bullet> x) c" |
80 apply(simp add: fresh_star_eqvt set_eqvt) |
85 apply(simp add: fresh_star_eqvt set_eqvt) |
81 apply(subst (asm) perm1) |
86 apply(subst (asm) perm1) |
82 using inc fresh1 fr1 |
87 using inc fresh1 fr1 |
83 apply(auto simp add: fresh_star_def fresh_Pair) |
88 apply(auto simp add: fresh_star_def fresh_Pair) |
84 done |
89 done |
85 then have "set (r \<bullet> bs) \<sharp>* f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp |
90 then have "set (r \<bullet> (bf bs)) \<sharp>* f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 qq4 |
86 then have "r \<bullet> ((set bs) \<sharp>* f bs y c)" |
91 by simp |
|
92 then have "r \<bullet> ((set (bf bs)) \<sharp>* f bs y c)" |
87 apply(simp add: fresh_star_eqvt set_eqvt) |
93 apply(simp add: fresh_star_eqvt set_eqvt) |
88 apply(subst (asm) perm2[symmetric]) |
94 apply(subst (asm) perm2[symmetric]) |
89 using qq3 fresh2 fr1 |
95 using qq3 fresh2 fr1 |
90 apply(auto simp add: set_eqvt fresh_star_def fresh_Pair) |
96 apply(auto simp add: set_eqvt fresh_star_def fresh_Pair) |
91 done |
97 done |
92 then have fcb2: "(set bs) \<sharp>* f bs y c" by (simp add: permute_bool_def) |
98 then have fcb2: "(set (bf bs)) \<sharp>* f bs y c" by (simp add: permute_bool_def) |
93 have "f as x c = q \<bullet> (f as x c)" |
99 have "f as x c = q \<bullet> (f as x c)" |
94 apply(rule perm_supp_eq[symmetric]) |
100 apply(rule perm_supp_eq[symmetric]) |
95 using inc fcb1 fr1 by (auto simp add: fresh_star_def) |
101 using inc fcb1 fr1 by (auto simp add: fresh_star_def) |
96 also have "\<dots> = f (q \<bullet> as) (q \<bullet> x) c" |
102 also have "\<dots> = f (q \<bullet> as) (q \<bullet> x) c" |
97 apply(rule perm1) |
103 apply(rule perm1) |
98 using inc fresh1 fr1 by (auto simp add: fresh_star_def) |
104 using inc fresh1 fr1 by (auto simp add: fresh_star_def) |
99 also have "\<dots> = f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq2 by simp |
105 also have "\<dots> = f (r \<bullet> bs) (r \<bullet> y) c" using qq1 qq4 by simp |
100 also have "\<dots> = r \<bullet> (f bs y c)" |
106 also have "\<dots> = r \<bullet> (f bs y c)" |
101 apply(rule perm2[symmetric]) |
107 apply(rule perm2[symmetric]) |
102 using qq3 fresh2 fr1 by (auto simp add: fresh_star_def) |
108 using qq3 fresh2 fr1 by (auto simp add: fresh_star_def) |
103 also have "... = f bs y c" |
109 also have "... = f bs y c" |
104 apply(rule perm_supp_eq) |
110 apply(rule perm_supp_eq) |