author | Cezary Kaliszyk <kaliszyk@in.tum.de> |
Sat, 27 Mar 2010 08:42:07 +0100 | |
changeset 1673 | e8cf0520c820 |
parent 1666 | a99ae705b811 |
child 1675 | d24f59f78a86 |
child 1686 | 7b3dd407f6b3 |
permissions | -rw-r--r-- |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
theory Abs |
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
2 |
imports "Nominal2_Atoms" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
3 |
"Nominal2_Eqvt" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
4 |
"Nominal2_Supp" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
5 |
"Nominal2_FSet" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
6 |
"../Quotient" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
7 |
"../Quotient_Product" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
begin |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
10 |
fun |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
11 |
alpha_gen |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
12 |
where |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
13 |
alpha_gen[simp del]: |
1465
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
14 |
"alpha_gen (bs, x) R f pi (cs, y) \<longleftrightarrow> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
15 |
f x - bs = f y - cs \<and> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
16 |
(f x - bs) \<sharp>* pi \<and> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
17 |
R (pi \<bullet> x) y \<and> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
18 |
pi \<bullet> bs = cs" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
|
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
20 |
fun |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
21 |
alpha_res |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
22 |
where |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
23 |
alpha_res[simp del]: |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
24 |
"alpha_res (bs, x) R f pi (cs, y) \<longleftrightarrow> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
25 |
f x - bs = f y - cs \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
26 |
(f x - bs) \<sharp>* pi \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
27 |
R (pi \<bullet> x) y" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
|
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
29 |
fun |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
30 |
alpha_lst |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
31 |
where |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
32 |
alpha_lst[simp del]: |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
33 |
"alpha_lst (bs, x) R f pi (cs, y) \<longleftrightarrow> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
34 |
f x - set bs = f y - set cs \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
35 |
(f x - set bs) \<sharp>* pi \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
36 |
R (pi \<bullet> x) y \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
37 |
pi \<bullet> bs = cs" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
38 |
|
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
39 |
lemmas alphas = alpha_gen.simps alpha_res.simps alpha_lst.simps |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
40 |
|
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
41 |
notation |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
42 |
alpha_gen ("_ \<approx>gen _ _ _ _" [100, 100, 100, 100, 100] 100) and |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
43 |
alpha_res ("_ \<approx>res _ _ _ _" [100, 100, 100, 100, 100] 100) and |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
44 |
alpha_lst ("_ \<approx>lst _ _ _ _" [100, 100, 100, 100, 100] 100) |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
45 |
|
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
46 |
(* monos *) |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
47 |
lemma [mono]: |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
48 |
shows "R1 \<le> R2 \<Longrightarrow> alpha_gen bs R1 \<le> alpha_gen bs R2" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
49 |
and "R1 \<le> R2 \<Longrightarrow> alpha_res bs R1 \<le> alpha_res bs R2" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
50 |
and "R1 \<le> R2 \<Longrightarrow> alpha_lst cs R1 \<le> alpha_lst cs R2" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
51 |
by (case_tac [!] bs, case_tac [!] cs) |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
52 |
(auto simp add: le_fun_def le_bool_def alphas) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
53 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
54 |
fun |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
55 |
alpha_abs |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
where |
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
57 |
[simp del]: |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
58 |
"alpha_abs (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op=) supp p (cs, y))" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
59 |
|
1657 | 60 |
fun |
61 |
alpha_abs_lst |
|
62 |
where |
|
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
63 |
[simp del]: |
1657 | 64 |
"alpha_abs_lst (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>lst (op=) supp p (cs, y))" |
65 |
||
66 |
fun |
|
67 |
alpha_abs_res |
|
68 |
where |
|
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
69 |
[simp del]: |
1657 | 70 |
"alpha_abs_res (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op=) supp p (cs, y))" |
71 |
||
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
72 |
notation |
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
73 |
alpha_abs (infix "\<approx>abs" 50) and |
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
74 |
alpha_abs_lst (infix "\<approx>abs'_lst" 50) and |
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
75 |
alpha_abs_res (infix "\<approx>abs'_res" 50) |
1657 | 76 |
|
77 |
lemmas alphas_abs = alpha_abs.simps alpha_abs_res.simps alpha_abs_lst.simps |
|
78 |
||
79 |
lemma alphas_abs_refl: |
|
80 |
shows "(bs, x) \<approx>abs (bs, x)" |
|
81 |
and "(bs, x) \<approx>abs_res (bs, x)" |
|
82 |
and "(cs, x) \<approx>abs_lst (cs, x)" |
|
83 |
unfolding alphas_abs |
|
84 |
unfolding alphas |
|
85 |
unfolding fresh_star_def |
|
86 |
by (rule_tac [!] x="0" in exI) |
|
87 |
(simp_all add: fresh_zero_perm) |
|
88 |
||
89 |
lemma alphas_abs_sym: |
|
90 |
shows "(bs, x) \<approx>abs (cs, y) \<Longrightarrow> (cs, y) \<approx>abs (bs, x)" |
|
91 |
and "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (cs, y) \<approx>abs_res (bs, x)" |
|
92 |
and "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (es, y) \<approx>abs_lst (ds, x)" |
|
93 |
unfolding alphas_abs |
|
94 |
unfolding alphas |
|
95 |
unfolding fresh_star_def |
|
96 |
by (erule_tac [!] exE, rule_tac [!] x="-p" in exI) |
|
97 |
(auto simp add: fresh_minus_perm) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
98 |
|
1657 | 99 |
lemma alphas_abs_trans: |
100 |
shows "\<lbrakk>(bs, x) \<approx>abs (cs, y); (cs, y) \<approx>abs (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs (ds, z)" |
|
101 |
and "\<lbrakk>(bs, x) \<approx>abs_res (cs, y); (cs, y) \<approx>abs_res (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs_res (ds, z)" |
|
102 |
and "\<lbrakk>(es, x) \<approx>abs_lst (gs, y); (gs, y) \<approx>abs_lst (hs, z)\<rbrakk> \<Longrightarrow> (es, x) \<approx>abs_lst (hs, z)" |
|
103 |
unfolding alphas_abs |
|
104 |
unfolding alphas |
|
105 |
unfolding fresh_star_def |
|
106 |
apply(erule_tac [!] exE, erule_tac [!] exE) |
|
107 |
apply(rule_tac [!] x="pa + p" in exI) |
|
108 |
by (simp_all add: fresh_plus_perm) |
|
109 |
||
110 |
lemma alphas_abs_eqvt: |
|
111 |
shows "(bs, x) \<approx>abs (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs (p \<bullet> cs, p \<bullet> y)" |
|
112 |
and "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs_res (p \<bullet> cs, p \<bullet> y)" |
|
113 |
and "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>abs_lst (p \<bullet> es, p \<bullet> y)" |
|
114 |
unfolding alphas_abs |
|
115 |
unfolding alphas |
|
116 |
unfolding set_eqvt[symmetric] |
|
117 |
unfolding supp_eqvt[symmetric] |
|
118 |
unfolding Diff_eqvt[symmetric] |
|
119 |
apply(erule_tac [!] exE) |
|
120 |
apply(rule_tac [!] x="p \<bullet> pa" in exI) |
|
121 |
by (auto simp add: fresh_star_permute_iff permute_eqvt[symmetric]) |
|
122 |
||
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
123 |
fun |
1657 | 124 |
aux_set |
125 |
where |
|
126 |
"aux_set (bs, x) = (supp x) - bs" |
|
127 |
||
128 |
fun |
|
129 |
aux_list |
|
1460
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
130 |
where |
1657 | 131 |
"aux_list (cs, x) = (supp x) - (set cs)" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
132 |
|
1657 | 133 |
lemma aux_abs_lemma: |
134 |
assumes a: "(bs, x) \<approx>abs (cs, y)" |
|
135 |
shows "aux_set (bs, x) = aux_set (cs, y)" |
|
136 |
using a |
|
137 |
by (induct rule: alpha_abs.induct) |
|
138 |
(simp add: alphas_abs alphas) |
|
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
139 |
|
1657 | 140 |
lemma aux_abs_res_lemma: |
141 |
assumes a: "(bs, x) \<approx>abs_res (cs, y)" |
|
142 |
shows "aux_set (bs, x) = aux_set (cs, y)" |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
143 |
using a |
1657 | 144 |
by (induct rule: alpha_abs_res.induct) |
145 |
(simp add: alphas_abs alphas) |
|
146 |
||
147 |
lemma aux_abs_list_lemma: |
|
148 |
assumes a: "(bs, x) \<approx>abs_lst (cs, y)" |
|
149 |
shows "aux_list (bs, x) = aux_list (cs, y)" |
|
150 |
using a |
|
151 |
by (induct rule: alpha_abs_lst.induct) |
|
152 |
(simp add: alphas_abs alphas) |
|
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
153 |
|
1657 | 154 |
quotient_type |
155 |
'a abs_gen = "(atom set \<times> 'a::pt)" / "alpha_abs" |
|
156 |
and 'b abs_res = "(atom set \<times> 'b::pt)" / "alpha_abs_res" |
|
157 |
and 'c abs_lst = "(atom list \<times> 'c::pt)" / "alpha_abs_lst" |
|
158 |
apply(rule_tac [!] equivpI) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
159 |
unfolding reflp_def symp_def transp_def |
1657 | 160 |
by (auto intro: alphas_abs_sym alphas_abs_refl alphas_abs_trans simp only:) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
161 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
162 |
quotient_definition |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
163 |
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_gen" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
164 |
is |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
165 |
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
166 |
|
1657 | 167 |
quotient_definition |
168 |
"Abs_res::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_res" |
|
169 |
is |
|
170 |
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)" |
|
171 |
||
172 |
quotient_definition |
|
173 |
"Abs_lst::atom list \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_lst" |
|
174 |
is |
|
175 |
"Pair::atom list \<Rightarrow> ('a::pt) \<Rightarrow> (atom list \<times> 'a)" |
|
176 |
||
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
177 |
lemma [quot_respect]: |
1657 | 178 |
shows "(op= ===> op= ===> alpha_abs) Pair Pair" |
179 |
and "(op= ===> op= ===> alpha_abs_res) Pair Pair" |
|
180 |
and "(op= ===> op= ===> alpha_abs_lst) Pair Pair" |
|
181 |
unfolding fun_rel_def |
|
182 |
by (auto intro: alphas_abs_refl simp only:) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
183 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
184 |
lemma [quot_respect]: |
1657 | 185 |
shows "(op= ===> alpha_abs ===> alpha_abs) permute permute" |
186 |
and "(op= ===> alpha_abs_res ===> alpha_abs_res) permute permute" |
|
187 |
and "(op= ===> alpha_abs_lst ===> alpha_abs_lst) permute permute" |
|
188 |
unfolding fun_rel_def |
|
189 |
by (auto intro: alphas_abs_eqvt simp only: Pair_eqvt) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
190 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
191 |
lemma [quot_respect]: |
1657 | 192 |
shows "(alpha_abs ===> op=) aux_set aux_set" |
193 |
and "(alpha_abs_res ===> op=) aux_set aux_set" |
|
194 |
and "(alpha_abs_lst ===> op=) aux_list aux_list" |
|
195 |
unfolding fun_rel_def |
|
196 |
apply(rule_tac [!] allI) |
|
197 |
apply(rule_tac [!] allI) |
|
198 |
apply(case_tac [!] x, case_tac [!] y) |
|
199 |
apply(rule_tac [!] impI) |
|
200 |
by (simp_all only: aux_abs_lemma aux_abs_res_lemma aux_abs_list_lemma) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
201 |
|
1657 | 202 |
lemma abs_inducts: |
203 |
shows "(\<And>as (x::'a::pt). P1 (Abs as x)) \<Longrightarrow> P1 x1" |
|
204 |
and "(\<And>as (x::'a::pt). P2 (Abs_res as x)) \<Longrightarrow> P2 x2" |
|
205 |
and "(\<And>as (x::'a::pt). P3 (Abs_lst as x)) \<Longrightarrow> P3 x3" |
|
1661 | 206 |
by (lifting prod.induct[where 'a="atom set" and 'b="'a"] |
207 |
prod.induct[where 'a="atom set" and 'b="'a"] |
|
208 |
prod.induct[where 'a="atom list" and 'b="'a"]) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
209 |
|
1662 | 210 |
lemma abs_eq_iff: |
211 |
shows "Abs bs x = Abs cs y \<longleftrightarrow> (bs, x) \<approx>abs (cs, y)" |
|
212 |
and "Abs_res bs x = Abs_res cs y \<longleftrightarrow> (bs, x) \<approx>abs_res (cs, y)" |
|
213 |
and "Abs_lst ds x = Abs_lst hs y \<longleftrightarrow> (ds, x) \<approx>abs_lst (hs, y)" |
|
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
214 |
apply(simp_all add: alphas_abs) |
1662 | 215 |
apply(lifting alphas_abs) |
216 |
done |
|
217 |
||
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
218 |
instantiation abs_gen :: (pt) pt |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
219 |
begin |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
220 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
221 |
quotient_definition |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
222 |
"permute_abs_gen::perm \<Rightarrow> ('a::pt abs_gen) \<Rightarrow> 'a abs_gen" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
223 |
is |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
224 |
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
225 |
|
1657 | 226 |
lemma permute_Abs[simp]: |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
227 |
fixes x::"'a::pt" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
228 |
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)" |
1657 | 229 |
by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"]) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
230 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
231 |
instance |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
232 |
apply(default) |
1657 | 233 |
apply(induct_tac [!] x rule: abs_inducts(1)) |
234 |
apply(simp_all) |
|
235 |
done |
|
236 |
||
237 |
end |
|
238 |
||
239 |
instantiation abs_res :: (pt) pt |
|
240 |
begin |
|
241 |
||
242 |
quotient_definition |
|
243 |
"permute_abs_res::perm \<Rightarrow> ('a::pt abs_res) \<Rightarrow> 'a abs_res" |
|
244 |
is |
|
245 |
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)" |
|
246 |
||
247 |
lemma permute_Abs_res[simp]: |
|
248 |
fixes x::"'a::pt" |
|
249 |
shows "(p \<bullet> (Abs_res as x)) = Abs_res (p \<bullet> as) (p \<bullet> x)" |
|
250 |
by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"]) |
|
251 |
||
252 |
instance |
|
253 |
apply(default) |
|
254 |
apply(induct_tac [!] x rule: abs_inducts(2)) |
|
255 |
apply(simp_all) |
|
256 |
done |
|
257 |
||
258 |
end |
|
259 |
||
260 |
instantiation abs_lst :: (pt) pt |
|
261 |
begin |
|
262 |
||
263 |
quotient_definition |
|
264 |
"permute_abs_lst::perm \<Rightarrow> ('a::pt abs_lst) \<Rightarrow> 'a abs_lst" |
|
265 |
is |
|
266 |
"permute:: perm \<Rightarrow> (atom list \<times> 'a::pt) \<Rightarrow> (atom list \<times> 'a::pt)" |
|
267 |
||
268 |
lemma permute_Abs_lst[simp]: |
|
269 |
fixes x::"'a::pt" |
|
270 |
shows "(p \<bullet> (Abs_lst as x)) = Abs_lst (p \<bullet> as) (p \<bullet> x)" |
|
271 |
by (lifting permute_prod.simps[where 'a="atom list" and 'b="'a"]) |
|
272 |
||
273 |
instance |
|
274 |
apply(default) |
|
275 |
apply(induct_tac [!] x rule: abs_inducts(3)) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
276 |
apply(simp_all) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
277 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
278 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
279 |
end |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
280 |
|
1657 | 281 |
lemmas permute_abs = permute_Abs permute_Abs_res permute_Abs_lst |
282 |
||
1662 | 283 |
lemma abs_swap1: |
284 |
assumes a1: "a \<notin> (supp x) - bs" |
|
285 |
and a2: "b \<notin> (supp x) - bs" |
|
286 |
shows "Abs bs x = Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)" |
|
287 |
and "Abs_res bs x = Abs_res ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)" |
|
288 |
unfolding abs_eq_iff |
|
289 |
unfolding alphas_abs |
|
290 |
unfolding alphas |
|
291 |
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] |
|
292 |
unfolding fresh_star_def fresh_def |
|
293 |
unfolding swap_set_not_in[OF a1 a2] |
|
294 |
using a1 a2 |
|
295 |
by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI) |
|
296 |
(auto simp add: supp_perm swap_atom) |
|
297 |
||
298 |
lemma abs_swap2: |
|
299 |
assumes a1: "a \<notin> (supp x) - (set bs)" |
|
300 |
and a2: "b \<notin> (supp x) - (set bs)" |
|
301 |
shows "Abs_lst bs x = Abs_lst ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)" |
|
302 |
unfolding abs_eq_iff |
|
303 |
unfolding alphas_abs |
|
304 |
unfolding alphas |
|
305 |
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric] |
|
306 |
unfolding fresh_star_def fresh_def |
|
307 |
unfolding swap_set_not_in[OF a1 a2] |
|
308 |
using a1 a2 |
|
309 |
by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI) |
|
310 |
(auto simp add: supp_perm swap_atom) |
|
311 |
||
312 |
lemma abs_supports: |
|
313 |
shows "((supp x) - as) supports (Abs as x)" |
|
314 |
and "((supp x) - as) supports (Abs_res as x)" |
|
315 |
and "((supp x) - (set bs)) supports (Abs_lst bs x)" |
|
316 |
unfolding supports_def |
|
317 |
unfolding permute_abs |
|
318 |
by (simp_all add: abs_swap1[symmetric] abs_swap2[symmetric]) |
|
1657 | 319 |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
320 |
quotient_definition |
1657 | 321 |
"supp_gen :: ('a::pt) abs_gen \<Rightarrow> atom set" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
322 |
is |
1657 | 323 |
"aux_set" |
324 |
||
325 |
quotient_definition |
|
326 |
"supp_res :: ('a::pt) abs_res \<Rightarrow> atom set" |
|
327 |
is |
|
328 |
"aux_set" |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
329 |
|
1657 | 330 |
quotient_definition |
331 |
"supp_lst :: ('a::pt) abs_lst \<Rightarrow> atom set" |
|
332 |
is |
|
333 |
"aux_list" |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
334 |
|
1657 | 335 |
lemma aux_supps: |
336 |
shows "supp_gen (Abs bs x) = (supp x) - bs" |
|
337 |
and "supp_res (Abs_res bs x) = (supp x) - bs" |
|
338 |
and "supp_lst (Abs_lst cs x) = (supp x) - (set cs)" |
|
1661 | 339 |
by (lifting aux_set.simps aux_set.simps aux_list.simps) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
340 |
|
1657 | 341 |
lemma aux_supp_eqvt[eqvt]: |
342 |
shows "(p \<bullet> supp_gen x) = supp_gen (p \<bullet> x)" |
|
343 |
and "(p \<bullet> supp_res y) = supp_res (p \<bullet> y)" |
|
344 |
and "(p \<bullet> supp_lst z) = supp_lst (p \<bullet> z)" |
|
345 |
apply(induct_tac x rule: abs_inducts(1)) |
|
346 |
apply(simp add: aux_supps supp_eqvt Diff_eqvt) |
|
347 |
apply(induct_tac y rule: abs_inducts(2)) |
|
348 |
apply(simp add: aux_supps supp_eqvt Diff_eqvt) |
|
349 |
apply(induct_tac z rule: abs_inducts(3)) |
|
350 |
apply(simp add: aux_supps supp_eqvt Diff_eqvt set_eqvt) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
351 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
352 |
|
1657 | 353 |
lemma aux_fresh: |
354 |
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_gen (Abs bs x)" |
|
355 |
and "a \<sharp> Abs_res bs x \<Longrightarrow> a \<sharp> supp_res (Abs_res bs x)" |
|
356 |
and "a \<sharp> Abs_lst cs x \<Longrightarrow> a \<sharp> supp_lst (Abs_lst cs x)" |
|
357 |
apply(rule_tac [!] fresh_fun_eqvt_app) |
|
358 |
apply(simp_all add: eqvts_raw) |
|
359 |
done |
|
360 |
||
361 |
lemma supp_abs_subset1: |
|
362 |
assumes a: "finite (supp x)" |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
363 |
shows "(supp x) - as \<subseteq> supp (Abs as x)" |
1657 | 364 |
and "(supp x) - as \<subseteq> supp (Abs_res as x)" |
365 |
and "(supp x) - (set bs) \<subseteq> supp (Abs_lst bs x)" |
|
366 |
unfolding supp_conv_fresh |
|
367 |
apply(auto dest!: aux_fresh simp add: aux_supps) |
|
368 |
apply(simp_all add: fresh_def supp_finite_atom_set a) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
369 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
370 |
|
1657 | 371 |
lemma supp_abs_subset2: |
372 |
assumes a: "finite (supp x)" |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
373 |
shows "supp (Abs as x) \<subseteq> (supp x) - as" |
1657 | 374 |
and "supp (Abs_res as x) \<subseteq> (supp x) - as" |
375 |
and "supp (Abs_lst bs x) \<subseteq> (supp x) - (set bs)" |
|
376 |
apply(rule_tac [!] supp_is_subset) |
|
377 |
apply(simp_all add: abs_supports a) |
|
1478
1ea4ca823266
added proof of supp/fv for type schemes
Christian Urban <urbanc@in.tum.de>
parents:
1470
diff
changeset
|
378 |
done |
1ea4ca823266
added proof of supp/fv for type schemes
Christian Urban <urbanc@in.tum.de>
parents:
1470
diff
changeset
|
379 |
|
1657 | 380 |
lemma abs_finite_supp: |
381 |
assumes a: "finite (supp x)" |
|
1478
1ea4ca823266
added proof of supp/fv for type schemes
Christian Urban <urbanc@in.tum.de>
parents:
1470
diff
changeset
|
382 |
shows "supp (Abs as x) = (supp x) - as" |
1657 | 383 |
and "supp (Abs_res as x) = (supp x) - as" |
384 |
and "supp (Abs_lst bs x) = (supp x) - (set bs)" |
|
385 |
apply(rule_tac [!] subset_antisym) |
|
386 |
apply(simp_all add: supp_abs_subset1[OF a] supp_abs_subset2[OF a]) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
387 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
388 |
|
1657 | 389 |
lemma supp_abs: |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
390 |
fixes x::"'a::fs" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
391 |
shows "supp (Abs as x) = (supp x) - as" |
1657 | 392 |
and "supp (Abs_res as x) = (supp x) - as" |
393 |
and "supp (Abs_lst bs x) = (supp x) - (set bs)" |
|
394 |
apply(rule_tac [!] abs_finite_supp) |
|
395 |
apply(simp_all add: finite_supp) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
396 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
397 |
|
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
398 |
instance abs_gen :: (fs) fs |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
399 |
apply(default) |
1657 | 400 |
apply(induct_tac x rule: abs_inducts(1)) |
401 |
apply(simp add: supp_abs finite_supp) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
402 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
403 |
|
1657 | 404 |
instance abs_res :: (fs) fs |
405 |
apply(default) |
|
406 |
apply(induct_tac x rule: abs_inducts(2)) |
|
407 |
apply(simp add: supp_abs finite_supp) |
|
408 |
done |
|
409 |
||
410 |
instance abs_lst :: (fs) fs |
|
411 |
apply(default) |
|
412 |
apply(induct_tac x rule: abs_inducts(3)) |
|
413 |
apply(simp add: supp_abs finite_supp) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
414 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
415 |
|
1657 | 416 |
lemma abs_fresh_iff: |
417 |
fixes x::"'a::fs" |
|
418 |
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)" |
|
419 |
and "a \<sharp> Abs_res bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)" |
|
420 |
and "a \<sharp> Abs_lst cs x \<longleftrightarrow> a \<in> (set cs) \<or> (a \<notin> (set cs) \<and> a \<sharp> x)" |
|
421 |
unfolding fresh_def |
|
422 |
unfolding supp_abs |
|
423 |
by auto |
|
1460
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
424 |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
425 |
|
1657 | 426 |
section {* BELOW is stuff that may or may not be needed *} |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
427 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
428 |
(* support of concrete atom sets *) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
429 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
430 |
lemma supp_atom_image: |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
431 |
fixes as::"'a::at_base set" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
432 |
shows "supp (atom ` as) = supp as" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
433 |
apply(simp add: supp_def) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
434 |
apply(simp add: image_eqvt) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
435 |
apply(simp add: atom_eqvt_raw) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
436 |
apply(simp add: atom_image_cong) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
437 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
438 |
|
1460
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
439 |
lemma swap_atom_image_fresh: "\<lbrakk>a \<sharp> atom ` (fn :: ('a :: at_base set)); b \<sharp> atom ` fn\<rbrakk> \<Longrightarrow> (a \<rightleftharpoons> b) \<bullet> fn = fn" |
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
440 |
apply (simp add: fresh_def) |
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
441 |
apply (simp add: supp_atom_image) |
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
442 |
apply (fold fresh_def) |
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
443 |
apply (simp add: swap_fresh_fresh) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
444 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
445 |
|
1467
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
446 |
(* TODO: The following lemmas can be moved somewhere... *) |
1657 | 447 |
|
448 |
lemma Abs_eq_iff: |
|
449 |
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))" |
|
450 |
by (lifting alpha_abs.simps(1)) |
|
451 |
||
452 |
||
1467
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
453 |
lemma split_rsp2[quot_respect]: "((R1 ===> R2 ===> prod_rel R1 R2 ===> op =) ===> |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
454 |
prod_rel R1 R2 ===> prod_rel R1 R2 ===> op =) split split" |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
455 |
by auto |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
456 |
|
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
457 |
lemma split_prs2[quot_preserve]: |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
458 |
assumes q1: "Quotient R1 Abs1 Rep1" |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
459 |
and q2: "Quotient R2 Abs2 Rep2" |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
460 |
shows "((Abs1 ---> Abs2 ---> prod_fun Abs1 Abs2 ---> id) ---> prod_fun Rep1 Rep2 ---> prod_fun Rep1 Rep2 ---> id) split = split" |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
461 |
by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]) |
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
462 |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
463 |
lemma alphas2: |
1467
77b86f1fc936
Lifting theorems with compound fv and compound alpha.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1460
diff
changeset
|
464 |
"(bs, x1, x2) \<approx>gen (\<lambda>(x1, y1) (x2, y2). R1 x1 x2 \<and> R2 y1 y2) (\<lambda>(a, b). f1 a \<union> f2 b) pi (cs, y1, y2) = |
1470
3127c75275a6
Fix for the change of alpha_gen.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1469
diff
changeset
|
465 |
(f1 x1 \<union> f2 x2 - bs = f1 y1 \<union> f2 y2 - cs \<and> (f1 x1 \<union> f2 x2 - bs) \<sharp>* pi \<and> R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2 |
3127c75275a6
Fix for the change of alpha_gen.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1469
diff
changeset
|
466 |
\<and> pi \<bullet> bs = cs)" |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
467 |
"(bs, x1, x2) \<approx>res (\<lambda>(x1, y1) (x2, y2). R1 x1 x2 \<and> R2 y1 y2) (\<lambda>(a, b). f1 a \<union> f2 b) pi (cs, y1, y2) = |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
468 |
(f1 x1 \<union> f2 x2 - bs = f1 y1 \<union> f2 y2 - cs \<and> (f1 x1 \<union> f2 x2 - bs) \<sharp>* pi \<and> R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
469 |
"(bsl, x1, x2) \<approx>lst (\<lambda>(x1, y1) (x2, y2). R1 x1 x2 \<and> R2 y1 y2) (\<lambda>(a, b). f1 a \<union> f2 b) pi (csl, y1, y2) = |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
470 |
(f1 x1 \<union> f2 x2 - set bsl = f1 y1 \<union> f2 y2 - set csl \<and> (f1 x1 \<union> f2 x2 - set bsl) \<sharp>* pi \<and> R1 (pi \<bullet> x1) y1 \<and> R2 (pi \<bullet> x2) y2 |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
471 |
\<and> pi \<bullet> bsl = csl)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
472 |
by (simp_all add: alphas) |
1544
c6849a634582
Keep only one copy of infinite_Un.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1543
diff
changeset
|
473 |
|
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
474 |
lemma alpha_gen_compose_sym: |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
475 |
fixes pi |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
476 |
assumes b: "(aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
477 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
478 |
shows "(ab, s) \<approx>gen R f (- pi) (aa, t)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
479 |
using b apply - |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
480 |
apply(simp add: alphas) |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
481 |
apply(erule conjE)+ |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
482 |
apply(rule conjI) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
483 |
apply(simp add: fresh_star_def fresh_minus_perm) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
484 |
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))") |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
485 |
apply simp |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
486 |
apply(clarify) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
487 |
apply(simp) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
488 |
apply(rule a) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
489 |
apply assumption |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
490 |
done |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
491 |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
492 |
lemma alpha_res_compose_sym: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
493 |
fixes pi |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
494 |
assumes b: "(aa, t) \<approx>res (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
495 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
496 |
shows "(ab, s) \<approx>res R f (- pi) (aa, t)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
497 |
using b apply - |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
498 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
499 |
apply(erule conjE)+ |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
500 |
apply(rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
501 |
apply(simp add: fresh_star_def fresh_minus_perm) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
502 |
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))") |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
503 |
apply simp |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
504 |
apply(rule a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
505 |
apply assumption |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
506 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
507 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
508 |
lemma alpha_lst_compose_sym: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
509 |
fixes pi |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
510 |
assumes b: "(aa, t) \<approx>lst (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
511 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
512 |
shows "(ab, s) \<approx>lst R f (- pi) (aa, t)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
513 |
using b apply - |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
514 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
515 |
apply(erule conjE)+ |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
516 |
apply(rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
517 |
apply(simp add: fresh_star_def fresh_minus_perm) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
518 |
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))") |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
519 |
apply simp |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
520 |
apply(clarify) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
521 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
522 |
apply(rule a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
523 |
apply assumption |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
524 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
525 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
526 |
lemmas alphas_compose_sym = alpha_gen_compose_sym alpha_res_compose_sym alpha_lst_compose_sym |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
527 |
|
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
528 |
lemma alpha_gen_compose_sym2: |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
529 |
assumes a: "(aa, t1, t2) \<approx>gen (\<lambda>(x11, x12) (x21, x22). |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
530 |
(R1 x11 x21 \<and> R1 x21 x11) \<and> R2 x12 x22 \<and> R2 x22 x12) (\<lambda>(b, a). fb b \<union> fa a) pi (ab, s1, s2)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
531 |
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
532 |
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
533 |
shows "(ab, s1, s2) \<approx>gen (\<lambda>(a, b) (d, c). R1 a d \<and> R2 b c) (\<lambda>(b, a). fb b \<union> fa a) (- pi) (aa, t1, t2)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
534 |
using a |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
535 |
apply(simp add: alphas) |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
536 |
apply clarify |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
537 |
apply (rule conjI) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
538 |
apply(simp add: fresh_star_def fresh_minus_perm) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
539 |
apply (rule conjI) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
540 |
apply (rotate_tac 3) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
541 |
apply (drule_tac pi="- pi" in r1) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
542 |
apply simp |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
543 |
apply (rule conjI) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
544 |
apply (rotate_tac -1) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
545 |
apply (drule_tac pi="- pi" in r2) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
546 |
apply simp_all |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
547 |
done |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
548 |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
549 |
lemma alpha_res_compose_sym2: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
550 |
assumes a: "(aa, t1, t2) \<approx>res (\<lambda>(x11, x12) (x21, x22). |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
551 |
(R1 x11 x21 \<and> R1 x21 x11) \<and> R2 x12 x22 \<and> R2 x22 x12) (\<lambda>(b, a). fb b \<union> fa a) pi (ab, s1, s2)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
552 |
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
553 |
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
554 |
shows "(ab, s1, s2) \<approx>res (\<lambda>(a, b) (d, c). R1 a d \<and> R2 b c) (\<lambda>(b, a). fb b \<union> fa a) (- pi) (aa, t1, t2)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
555 |
using a |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
556 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
557 |
apply clarify |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
558 |
apply (rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
559 |
apply(simp add: fresh_star_def fresh_minus_perm) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
560 |
apply (rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
561 |
apply (rotate_tac 3) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
562 |
apply (drule_tac pi="- pi" in r1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
563 |
apply simp |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
564 |
apply (rotate_tac -1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
565 |
apply (drule_tac pi="- pi" in r2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
566 |
apply simp |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
567 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
568 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
569 |
lemma alpha_lst_compose_sym2: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
570 |
assumes a: "(aa, t1, t2) \<approx>lst (\<lambda>(x11, x12) (x21, x22). |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
571 |
(R1 x11 x21 \<and> R1 x21 x11) \<and> R2 x12 x22 \<and> R2 x22 x12) (\<lambda>(b, a). fb b \<union> fa a) pi (ab, s1, s2)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
572 |
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
573 |
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
574 |
shows "(ab, s1, s2) \<approx>lst (\<lambda>(a, b) (d, c). R1 a d \<and> R2 b c) (\<lambda>(b, a). fb b \<union> fa a) (- pi) (aa, t1, t2)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
575 |
using a |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
576 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
577 |
apply clarify |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
578 |
apply (rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
579 |
apply(simp add: fresh_star_def fresh_minus_perm) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
580 |
apply (rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
581 |
apply (rotate_tac 3) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
582 |
apply (drule_tac pi="- pi" in r1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
583 |
apply simp |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
584 |
apply (rule conjI) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
585 |
apply (rotate_tac -1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
586 |
apply (drule_tac pi="- pi" in r2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
587 |
apply simp_all |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
588 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
589 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
590 |
lemmas alphas_compose_sym2 = alpha_gen_compose_sym2 alpha_res_compose_sym2 alpha_lst_compose_sym2 |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
591 |
|
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
592 |
lemma alpha_gen_compose_trans: |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
593 |
fixes pi pia |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
594 |
assumes b: "(aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi (ab, ta)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
595 |
and c: "(ab, ta) \<approx>gen R f pia (ac, sa)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
596 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
597 |
shows "(aa, t) \<approx>gen R f (pia + pi) (ac, sa)" |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
598 |
using b c apply - |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
599 |
apply(simp add: alphas) |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
600 |
apply(erule conjE)+ |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
601 |
apply(simp add: fresh_star_plus) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
602 |
apply(drule_tac x="- pia \<bullet> sa" in spec) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
603 |
apply(drule mp) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
604 |
apply(rotate_tac 5) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
605 |
apply(drule_tac pi="- pia" in a) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
606 |
apply(simp) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
607 |
apply(rotate_tac 7) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
608 |
apply(drule_tac pi="pia" in a) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
609 |
apply(simp) |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
610 |
done |
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
611 |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
612 |
lemma alpha_res_compose_trans: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
613 |
fixes pi pia |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
614 |
assumes b: "(aa, t) \<approx>res (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi (ab, ta)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
615 |
and c: "(ab, ta) \<approx>res R f pia (ac, sa)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
616 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
617 |
shows "(aa, t) \<approx>res R f (pia + pi) (ac, sa)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
618 |
using b c apply - |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
619 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
620 |
apply(erule conjE)+ |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
621 |
apply(simp add: fresh_star_plus) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
622 |
apply(drule_tac x="- pia \<bullet> sa" in spec) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
623 |
apply(drule mp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
624 |
apply(drule_tac pi="- pia" in a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
625 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
626 |
apply(rotate_tac 6) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
627 |
apply(drule_tac pi="pia" in a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
628 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
629 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
630 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
631 |
lemma alpha_lst_compose_trans: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
632 |
fixes pi pia |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
633 |
assumes b: "(aa, t) \<approx>lst (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi (ab, ta)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
634 |
and c: "(ab, ta) \<approx>lst R f pia (ac, sa)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
635 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
636 |
shows "(aa, t) \<approx>lst R f (pia + pi) (ac, sa)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
637 |
using b c apply - |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
638 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
639 |
apply(erule conjE)+ |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
640 |
apply(simp add: fresh_star_plus) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
641 |
apply(drule_tac x="- pia \<bullet> sa" in spec) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
642 |
apply(drule mp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
643 |
apply(rotate_tac 5) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
644 |
apply(drule_tac pi="- pia" in a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
645 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
646 |
apply(rotate_tac 7) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
647 |
apply(drule_tac pi="pia" in a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
648 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
649 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
650 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
651 |
lemmas alphas_compose_trans = alpha_gen_compose_trans alpha_res_compose_trans alpha_lst_compose_trans |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
652 |
|
1581
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
653 |
lemma alpha_gen_compose_trans2: |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
654 |
fixes pi pia |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
655 |
assumes b: "(aa, (t1, t2)) \<approx>gen |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
656 |
(\<lambda>(b, a) (d, c). R1 b d \<and> (\<forall>z. R1 d z \<longrightarrow> R1 b z) \<and> R2 a c \<and> (\<forall>z. R2 c z \<longrightarrow> R2 a z)) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
657 |
(\<lambda>(b, a). fv_a b \<union> fv_b a) pi (ab, (ta1, ta2))" |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
658 |
and c: "(ab, (ta1, ta2)) \<approx>gen (\<lambda>(b, a) (d, c). R1 b d \<and> R2 a c) (\<lambda>(b, a). fv_a b \<union> fv_b a) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
659 |
pia (ac, (sa1, sa2))" |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
660 |
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)" |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
661 |
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)" |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
662 |
shows "(aa, (t1, t2)) \<approx>gen (\<lambda>(b, a) (d, c). R1 b d \<and> R2 a c) (\<lambda>(b, a). fv_a b \<union> fv_b a) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
663 |
(pia + pi) (ac, (sa1, sa2))" |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
664 |
using b c apply - |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
665 |
apply(simp add: alphas2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
666 |
apply(simp add: alphas) |
1581
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
667 |
apply(erule conjE)+ |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
668 |
apply(simp add: fresh_star_plus) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
669 |
apply(drule_tac x="- pia \<bullet> sa1" in spec) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
670 |
apply(drule mp) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
671 |
apply(rotate_tac 5) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
672 |
apply(drule_tac pi="- pia" in r1) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
673 |
apply(simp) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
674 |
apply(rotate_tac -1) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
675 |
apply(drule_tac pi="pia" in r1) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
676 |
apply(simp) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
677 |
apply(drule_tac x="- pia \<bullet> sa2" in spec) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
678 |
apply(drule mp) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
679 |
apply(rotate_tac 6) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
680 |
apply(drule_tac pi="- pia" in r2) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
681 |
apply(simp) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
682 |
apply(rotate_tac -1) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
683 |
apply(drule_tac pi="pia" in r2) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
684 |
apply(simp) |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
685 |
done |
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1563
diff
changeset
|
686 |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
687 |
lemma alpha_res_compose_trans2: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
688 |
fixes pi pia |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
689 |
assumes b: "(aa, (t1, t2)) \<approx>res |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
690 |
(\<lambda>(b, a) (d, c). R1 b d \<and> (\<forall>z. R1 d z \<longrightarrow> R1 b z) \<and> R2 a c \<and> (\<forall>z. R2 c z \<longrightarrow> R2 a z)) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
691 |
(\<lambda>(b, a). fv_a b \<union> fv_b a) pi (ab, (ta1, ta2))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
692 |
and c: "(ab, (ta1, ta2)) \<approx>res (\<lambda>(b, a) (d, c). R1 b d \<and> R2 a c) (\<lambda>(b, a). fv_a b \<union> fv_b a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
693 |
pia (ac, (sa1, sa2))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
694 |
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
695 |
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
696 |
shows "(aa, (t1, t2)) \<approx>res (\<lambda>(b, a) (d, c). R1 b d \<and> R2 a c) (\<lambda>(b, a). fv_a b \<union> fv_b a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
697 |
(pia + pi) (ac, (sa1, sa2))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
698 |
using b c apply - |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
699 |
apply(simp add: alphas2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
700 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
701 |
apply(erule conjE)+ |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
702 |
apply(simp add: fresh_star_plus) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
703 |
apply(drule_tac x="- pia \<bullet> sa1" in spec) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
704 |
apply(drule mp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
705 |
apply(rotate_tac 5) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
706 |
apply(drule_tac pi="- pia" in r1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
707 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
708 |
apply(rotate_tac -1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
709 |
apply(drule_tac pi="pia" in r1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
710 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
711 |
apply(drule_tac x="- pia \<bullet> sa2" in spec) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
712 |
apply(drule mp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
713 |
apply(rotate_tac 6) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
714 |
apply(drule_tac pi="- pia" in r2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
715 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
716 |
apply(rotate_tac -1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
717 |
apply(drule_tac pi="pia" in r2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
718 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
719 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
720 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
721 |
lemma alpha_lst_compose_trans2: |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
722 |
fixes pi pia |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
723 |
assumes b: "(aa, (t1, t2)) \<approx>lst |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
724 |
(\<lambda>(b, a) (d, c). R1 b d \<and> (\<forall>z. R1 d z \<longrightarrow> R1 b z) \<and> R2 a c \<and> (\<forall>z. R2 c z \<longrightarrow> R2 a z)) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
725 |
(\<lambda>(b, a). fv_a b \<union> fv_b a) pi (ab, (ta1, ta2))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
726 |
and c: "(ab, (ta1, ta2)) \<approx>lst (\<lambda>(b, a) (d, c). R1 b d \<and> R2 a c) (\<lambda>(b, a). fv_a b \<union> fv_b a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
727 |
pia (ac, (sa1, sa2))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
728 |
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
729 |
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
730 |
shows "(aa, (t1, t2)) \<approx>lst (\<lambda>(b, a) (d, c). R1 b d \<and> R2 a c) (\<lambda>(b, a). fv_a b \<union> fv_b a) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
731 |
(pia + pi) (ac, (sa1, sa2))" |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
732 |
using b c apply - |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
733 |
apply(simp add: alphas2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
734 |
apply(simp add: alphas) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
735 |
apply(erule conjE)+ |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
736 |
apply(simp add: fresh_star_plus) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
737 |
apply(drule_tac x="- pia \<bullet> sa1" in spec) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
738 |
apply(drule mp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
739 |
apply(rotate_tac 5) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
740 |
apply(drule_tac pi="- pia" in r1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
741 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
742 |
apply(rotate_tac -1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
743 |
apply(drule_tac pi="pia" in r1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
744 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
745 |
apply(drule_tac x="- pia \<bullet> sa2" in spec) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
746 |
apply(drule mp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
747 |
apply(rotate_tac 6) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
748 |
apply(drule_tac pi="- pia" in r2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
749 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
750 |
apply(rotate_tac -1) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
751 |
apply(drule_tac pi="pia" in r2) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
752 |
apply(simp) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
753 |
done |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
754 |
|
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
755 |
lemmas alphas_compose_trans2 = alpha_gen_compose_trans2 alpha_res_compose_trans2 alpha_lst_compose_trans2 |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
756 |
|
1657 | 757 |
lemma alpha_gen_refl: |
758 |
assumes a: "R x x" |
|
759 |
shows "(bs, x) \<approx>gen R f 0 (bs, x)" |
|
760 |
and "(bs, x) \<approx>res R f 0 (bs, x)" |
|
761 |
and "(cs, x) \<approx>lst R f 0 (cs, x)" |
|
762 |
using a |
|
763 |
unfolding alphas |
|
764 |
unfolding fresh_star_def |
|
765 |
by (simp_all add: fresh_zero_perm) |
|
766 |
||
767 |
lemma alpha_gen_sym: |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
768 |
assumes a: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x" |
1657 | 769 |
shows "(bs, x) \<approx>gen R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>gen R f (- p) (bs, x)" |
770 |
and "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)" |
|
771 |
and "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)" |
|
1664
aa999d263b10
Modified abs_gen_sym and abs_gen_trans so it becomes usable in the proofs.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1657
diff
changeset
|
772 |
unfolding alphas fresh_star_def |
1657 | 773 |
using a |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
774 |
by (auto simp add: fresh_minus_perm) |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
775 |
|
1657 | 776 |
lemma alpha_gen_trans: |
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
777 |
assumes a: "\<lbrakk>R (p \<bullet> x) y; R (q \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((q + p) \<bullet> x) z" |
1657 | 778 |
shows "\<lbrakk>(bs, x) \<approx>gen R f p (cs, y); (cs, y) \<approx>gen R f q (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>gen R f (q + p) (ds, z)" |
779 |
and "\<lbrakk>(bs, x) \<approx>res R f p (cs, y); (cs, y) \<approx>res R f q (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>res R f (q + p) (ds, z)" |
|
780 |
and "\<lbrakk>(es, x) \<approx>lst R f p (gs, y); (gs, y) \<approx>lst R f q (hs, z)\<rbrakk> \<Longrightarrow> (es, x) \<approx>lst R f (q + p) (hs, z)" |
|
1673
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
781 |
using a |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
782 |
unfolding alphas fresh_star_def |
e8cf0520c820
New compose lemmas. Reverted alpha_gen sym/trans changes. Equivp for alpha_res should work now.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1666
diff
changeset
|
783 |
by (simp_all add: fresh_plus_perm) |
1657 | 784 |
|
785 |
lemma alpha_gen_eqvt: |
|
786 |
assumes a: "R (q \<bullet> x) y \<Longrightarrow> R (p \<bullet> (q \<bullet> x)) (p \<bullet> y)" |
|
787 |
and b: "p \<bullet> (f x) = f (p \<bullet> x)" |
|
788 |
and c: "p \<bullet> (f y) = f (p \<bullet> y)" |
|
789 |
shows "(bs, x) \<approx>gen R f q (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>gen R f (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)" |
|
790 |
and "(bs, x) \<approx>res R f q (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>res R f (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)" |
|
791 |
and "(ds, x) \<approx>lst R f q (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>lst R f (p \<bullet> q) (p \<bullet> es, p \<bullet> y)" |
|
792 |
unfolding alphas |
|
793 |
unfolding set_eqvt[symmetric] |
|
794 |
unfolding b[symmetric] c[symmetric] |
|
795 |
unfolding Diff_eqvt[symmetric] |
|
796 |
unfolding permute_eqvt[symmetric] |
|
797 |
using a |
|
798 |
by (auto simp add: fresh_star_permute_iff) |
|
799 |
||
800 |
||
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
801 |
end |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
802 |