1440
+ − 1
theory Abs
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 2
imports "Nominal2_Atoms"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 3
"Nominal2_Eqvt"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 4
"Nominal2_Supp"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 5
"Nominal2_FSet"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 6
"../Quotient"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 7
"../Quotient_Product"
1440
+ − 8
begin
+ − 9
+ − 10
fun
+ − 11
alpha_gen
+ − 12
where
+ − 13
alpha_gen[simp del]:
1465
+ − 14
"alpha_gen (bs, x) R f pi (cs, y) \<longleftrightarrow>
+ − 15
f x - bs = f y - cs \<and>
+ − 16
(f x - bs) \<sharp>* pi \<and>
+ − 17
R (pi \<bullet> x) y \<and>
+ − 18
pi \<bullet> bs = cs"
1440
+ − 19
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 20
fun
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 21
alpha_res
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 22
where
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
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>
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>
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>
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>
diff
changeset
+ − 27
R (pi \<bullet> x) y"
1440
+ − 28
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 29
fun
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 30
alpha_lst
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 31
where
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
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>
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>
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>
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>
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>
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>
diff
changeset
+ − 38
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
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>
diff
changeset
+ − 40
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 41
notation
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
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>
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>
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>
diff
changeset
+ − 45
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 46
(* monos *)
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 47
lemma [mono]:
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
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>
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>
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>
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>
diff
changeset
+ − 52
(auto simp add: le_fun_def le_bool_def alphas)
1440
+ − 53
+ − 54
fun
+ − 55
alpha_abs
+ − 56
where
1558
+ − 57
"alpha_abs (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op=) supp p (cs, y))"
1440
+ − 58
1657
+ − 59
fun
+ − 60
alpha_abs_lst
+ − 61
where
+ − 62
"alpha_abs_lst (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>lst (op=) supp p (cs, y))"
+ − 63
+ − 64
fun
+ − 65
alpha_abs_res
+ − 66
where
+ − 67
"alpha_abs_res (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op=) supp p (cs, y))"
+ − 68
1440
+ − 69
notation
1657
+ − 70
alpha_abs ("_ \<approx>abs _") and
+ − 71
alpha_abs_lst ("_ \<approx>abs'_lst _") and
+ − 72
alpha_abs_res ("_ \<approx>abs'_res _")
+ − 73
+ − 74
lemmas alphas_abs = alpha_abs.simps alpha_abs_res.simps alpha_abs_lst.simps
+ − 75
+ − 76
lemma alphas_abs_refl:
+ − 77
shows "(bs, x) \<approx>abs (bs, x)"
+ − 78
and "(bs, x) \<approx>abs_res (bs, x)"
+ − 79
and "(cs, x) \<approx>abs_lst (cs, x)"
+ − 80
unfolding alphas_abs
+ − 81
unfolding alphas
+ − 82
unfolding fresh_star_def
+ − 83
by (rule_tac [!] x="0" in exI)
+ − 84
(simp_all add: fresh_zero_perm)
+ − 85
+ − 86
lemma alphas_abs_sym:
+ − 87
shows "(bs, x) \<approx>abs (cs, y) \<Longrightarrow> (cs, y) \<approx>abs (bs, x)"
+ − 88
and "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (cs, y) \<approx>abs_res (bs, x)"
+ − 89
and "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (es, y) \<approx>abs_lst (ds, x)"
+ − 90
unfolding alphas_abs
+ − 91
unfolding alphas
+ − 92
unfolding fresh_star_def
+ − 93
by (erule_tac [!] exE, rule_tac [!] x="-p" in exI)
+ − 94
(auto simp add: fresh_minus_perm)
1440
+ − 95
1657
+ − 96
lemma alphas_abs_trans:
+ − 97
shows "\<lbrakk>(bs, x) \<approx>abs (cs, y); (cs, y) \<approx>abs (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs (ds, z)"
+ − 98
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)"
+ − 99
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)"
+ − 100
unfolding alphas_abs
+ − 101
unfolding alphas
+ − 102
unfolding fresh_star_def
+ − 103
apply(erule_tac [!] exE, erule_tac [!] exE)
+ − 104
apply(rule_tac [!] x="pa + p" in exI)
+ − 105
by (simp_all add: fresh_plus_perm)
+ − 106
+ − 107
lemma alphas_abs_eqvt:
+ − 108
shows "(bs, x) \<approx>abs (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs (p \<bullet> cs, p \<bullet> y)"
+ − 109
and "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs_res (p \<bullet> cs, p \<bullet> y)"
+ − 110
and "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>abs_lst (p \<bullet> es, p \<bullet> y)"
+ − 111
unfolding alphas_abs
+ − 112
unfolding alphas
+ − 113
unfolding set_eqvt[symmetric]
+ − 114
unfolding supp_eqvt[symmetric]
+ − 115
unfolding Diff_eqvt[symmetric]
+ − 116
apply(erule_tac [!] exE)
+ − 117
apply(rule_tac [!] x="p \<bullet> pa" in exI)
+ − 118
by (auto simp add: fresh_star_permute_iff permute_eqvt[symmetric])
+ − 119
1440
+ − 120
fun
1657
+ − 121
aux_set
+ − 122
where
+ − 123
"aux_set (bs, x) = (supp x) - bs"
+ − 124
+ − 125
fun
+ − 126
aux_list
1460
+ − 127
where
1657
+ − 128
"aux_list (cs, x) = (supp x) - (set cs)"
1440
+ − 129
1657
+ − 130
lemma aux_abs_lemma:
+ − 131
assumes a: "(bs, x) \<approx>abs (cs, y)"
+ − 132
shows "aux_set (bs, x) = aux_set (cs, y)"
+ − 133
using a
+ − 134
by (induct rule: alpha_abs.induct)
+ − 135
(simp add: alphas_abs alphas)
1558
+ − 136
1657
+ − 137
lemma aux_abs_res_lemma:
+ − 138
assumes a: "(bs, x) \<approx>abs_res (cs, y)"
+ − 139
shows "aux_set (bs, x) = aux_set (cs, y)"
1440
+ − 140
using a
1657
+ − 141
by (induct rule: alpha_abs_res.induct)
+ − 142
(simp add: alphas_abs alphas)
+ − 143
+ − 144
lemma aux_abs_list_lemma:
+ − 145
assumes a: "(bs, x) \<approx>abs_lst (cs, y)"
+ − 146
shows "aux_list (bs, x) = aux_list (cs, y)"
+ − 147
using a
+ − 148
by (induct rule: alpha_abs_lst.induct)
+ − 149
(simp add: alphas_abs alphas)
1558
+ − 150
1657
+ − 151
quotient_type
+ − 152
'a abs_gen = "(atom set \<times> 'a::pt)" / "alpha_abs"
+ − 153
and 'b abs_res = "(atom set \<times> 'b::pt)" / "alpha_abs_res"
+ − 154
and 'c abs_lst = "(atom list \<times> 'c::pt)" / "alpha_abs_lst"
+ − 155
apply(rule_tac [!] equivpI)
1440
+ − 156
unfolding reflp_def symp_def transp_def
1657
+ − 157
by (auto intro: alphas_abs_sym alphas_abs_refl alphas_abs_trans simp only:)
1440
+ − 158
+ − 159
quotient_definition
1558
+ − 160
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_gen"
1440
+ − 161
is
+ − 162
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
+ − 163
1657
+ − 164
quotient_definition
+ − 165
"Abs_res::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_res"
+ − 166
is
+ − 167
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
+ − 168
+ − 169
quotient_definition
+ − 170
"Abs_lst::atom list \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_lst"
+ − 171
is
+ − 172
"Pair::atom list \<Rightarrow> ('a::pt) \<Rightarrow> (atom list \<times> 'a)"
+ − 173
1440
+ − 174
lemma [quot_respect]:
1657
+ − 175
shows "(op= ===> op= ===> alpha_abs) Pair Pair"
+ − 176
and "(op= ===> op= ===> alpha_abs_res) Pair Pair"
+ − 177
and "(op= ===> op= ===> alpha_abs_lst) Pair Pair"
+ − 178
unfolding fun_rel_def
+ − 179
by (auto intro: alphas_abs_refl simp only:)
1440
+ − 180
+ − 181
lemma [quot_respect]:
1657
+ − 182
shows "(op= ===> alpha_abs ===> alpha_abs) permute permute"
+ − 183
and "(op= ===> alpha_abs_res ===> alpha_abs_res) permute permute"
+ − 184
and "(op= ===> alpha_abs_lst ===> alpha_abs_lst) permute permute"
+ − 185
unfolding fun_rel_def
+ − 186
by (auto intro: alphas_abs_eqvt simp only: Pair_eqvt)
1440
+ − 187
+ − 188
lemma [quot_respect]:
1657
+ − 189
shows "(alpha_abs ===> op=) aux_set aux_set"
+ − 190
and "(alpha_abs_res ===> op=) aux_set aux_set"
+ − 191
and "(alpha_abs_lst ===> op=) aux_list aux_list"
+ − 192
unfolding fun_rel_def
+ − 193
apply(rule_tac [!] allI)
+ − 194
apply(rule_tac [!] allI)
+ − 195
apply(case_tac [!] x, case_tac [!] y)
+ − 196
apply(rule_tac [!] impI)
+ − 197
by (simp_all only: aux_abs_lemma aux_abs_res_lemma aux_abs_list_lemma)
1440
+ − 198
1657
+ − 199
lemma abs_inducts:
+ − 200
shows "(\<And>as (x::'a::pt). P1 (Abs as x)) \<Longrightarrow> P1 x1"
+ − 201
and "(\<And>as (x::'a::pt). P2 (Abs_res as x)) \<Longrightarrow> P2 x2"
+ − 202
and "(\<And>as (x::'a::pt). P3 (Abs_lst as x)) \<Longrightarrow> P3 x3"
1661
+ − 203
by (lifting prod.induct[where 'a="atom set" and 'b="'a"]
+ − 204
prod.induct[where 'a="atom set" and 'b="'a"]
+ − 205
prod.induct[where 'a="atom list" and 'b="'a"])
1440
+ − 206
1558
+ − 207
instantiation abs_gen :: (pt) pt
1440
+ − 208
begin
+ − 209
+ − 210
quotient_definition
1558
+ − 211
"permute_abs_gen::perm \<Rightarrow> ('a::pt abs_gen) \<Rightarrow> 'a abs_gen"
1440
+ − 212
is
+ − 213
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
+ − 214
1657
+ − 215
lemma permute_Abs[simp]:
1558
+ − 216
fixes x::"'a::pt"
1440
+ − 217
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)"
1657
+ − 218
by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"])
1440
+ − 219
+ − 220
instance
+ − 221
apply(default)
1657
+ − 222
apply(induct_tac [!] x rule: abs_inducts(1))
+ − 223
apply(simp_all)
+ − 224
done
+ − 225
+ − 226
end
+ − 227
+ − 228
instantiation abs_res :: (pt) pt
+ − 229
begin
+ − 230
+ − 231
quotient_definition
+ − 232
"permute_abs_res::perm \<Rightarrow> ('a::pt abs_res) \<Rightarrow> 'a abs_res"
+ − 233
is
+ − 234
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
+ − 235
+ − 236
lemma permute_Abs_res[simp]:
+ − 237
fixes x::"'a::pt"
+ − 238
shows "(p \<bullet> (Abs_res as x)) = Abs_res (p \<bullet> as) (p \<bullet> x)"
+ − 239
by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"])
+ − 240
+ − 241
instance
+ − 242
apply(default)
+ − 243
apply(induct_tac [!] x rule: abs_inducts(2))
+ − 244
apply(simp_all)
+ − 245
done
+ − 246
+ − 247
end
+ − 248
+ − 249
instantiation abs_lst :: (pt) pt
+ − 250
begin
+ − 251
+ − 252
quotient_definition
+ − 253
"permute_abs_lst::perm \<Rightarrow> ('a::pt abs_lst) \<Rightarrow> 'a abs_lst"
+ − 254
is
+ − 255
"permute:: perm \<Rightarrow> (atom list \<times> 'a::pt) \<Rightarrow> (atom list \<times> 'a::pt)"
+ − 256
+ − 257
lemma permute_Abs_lst[simp]:
+ − 258
fixes x::"'a::pt"
+ − 259
shows "(p \<bullet> (Abs_lst as x)) = Abs_lst (p \<bullet> as) (p \<bullet> x)"
+ − 260
by (lifting permute_prod.simps[where 'a="atom list" and 'b="'a"])
+ − 261
+ − 262
instance
+ − 263
apply(default)
+ − 264
apply(induct_tac [!] x rule: abs_inducts(3))
1440
+ − 265
apply(simp_all)
+ − 266
done
+ − 267
+ − 268
end
+ − 269
1657
+ − 270
lemmas permute_abs = permute_Abs permute_Abs_res permute_Abs_lst
+ − 271
+ − 272
1440
+ − 273
quotient_definition
1657
+ − 274
"supp_gen :: ('a::pt) abs_gen \<Rightarrow> atom set"
1440
+ − 275
is
1657
+ − 276
"aux_set"
+ − 277
+ − 278
quotient_definition
+ − 279
"supp_res :: ('a::pt) abs_res \<Rightarrow> atom set"
+ − 280
is
+ − 281
"aux_set"
1440
+ − 282
1657
+ − 283
quotient_definition
+ − 284
"supp_lst :: ('a::pt) abs_lst \<Rightarrow> atom set"
+ − 285
is
+ − 286
"aux_list"
1440
+ − 287
1657
+ − 288
lemma aux_supps:
+ − 289
shows "supp_gen (Abs bs x) = (supp x) - bs"
+ − 290
and "supp_res (Abs_res bs x) = (supp x) - bs"
+ − 291
and "supp_lst (Abs_lst cs x) = (supp x) - (set cs)"
1661
+ − 292
by (lifting aux_set.simps aux_set.simps aux_list.simps)
1440
+ − 293
1657
+ − 294
lemma aux_supp_eqvt[eqvt]:
+ − 295
shows "(p \<bullet> supp_gen x) = supp_gen (p \<bullet> x)"
+ − 296
and "(p \<bullet> supp_res y) = supp_res (p \<bullet> y)"
+ − 297
and "(p \<bullet> supp_lst z) = supp_lst (p \<bullet> z)"
+ − 298
apply(induct_tac x rule: abs_inducts(1))
+ − 299
apply(simp add: aux_supps supp_eqvt Diff_eqvt)
+ − 300
apply(induct_tac y rule: abs_inducts(2))
+ − 301
apply(simp add: aux_supps supp_eqvt Diff_eqvt)
+ − 302
apply(induct_tac z rule: abs_inducts(3))
+ − 303
apply(simp add: aux_supps supp_eqvt Diff_eqvt set_eqvt)
1440
+ − 304
done
+ − 305
1657
+ − 306
lemma aux_fresh:
+ − 307
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_gen (Abs bs x)"
+ − 308
and "a \<sharp> Abs_res bs x \<Longrightarrow> a \<sharp> supp_res (Abs_res bs x)"
+ − 309
and "a \<sharp> Abs_lst cs x \<Longrightarrow> a \<sharp> supp_lst (Abs_lst cs x)"
+ − 310
apply(rule_tac [!] fresh_fun_eqvt_app)
+ − 311
apply(simp_all add: eqvts_raw)
+ − 312
done
+ − 313
1661
+ − 314
lemma abs_eq_iff:
+ − 315
shows "Abs bs x = Abs cs y \<longleftrightarrow> (bs, x) \<approx>abs (cs, y)"
+ − 316
and "Abs_res bs x = Abs_res cs y \<longleftrightarrow> (bs, x) \<approx>abs_res (cs, y)"
+ − 317
and "Abs_lst ds x = Abs_lst hs y \<longleftrightarrow> (ds, x) \<approx>abs_lst (hs, y)"
+ − 318
apply(simp_all)
+ − 319
apply(lifting alphas_abs)
+ − 320
done
+ − 321
1657
+ − 322
lemma abs_swap1:
1440
+ − 323
assumes a1: "a \<notin> (supp x) - bs"
+ − 324
and a2: "b \<notin> (supp x) - bs"
1657
+ − 325
shows "Abs bs x = Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)"
+ − 326
and "Abs_res bs x = Abs_res ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)"
1661
+ − 327
unfolding abs_eq_iff
+ − 328
unfolding alphas_abs
+ − 329
unfolding alphas
+ − 330
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric]
+ − 331
unfolding fresh_star_def fresh_def
+ − 332
unfolding swap_set_not_in[OF a1 a2]
+ − 333
using a1 a2
+ − 334
by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI)
+ − 335
(auto simp add: supp_perm swap_atom)
1440
+ − 336
1657
+ − 337
lemma abs_swap2:
+ − 338
assumes a1: "a \<notin> (supp x) - (set bs)"
+ − 339
and a2: "b \<notin> (supp x) - (set bs)"
+ − 340
shows "Abs_lst bs x = Abs_lst ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)"
1661
+ − 341
unfolding abs_eq_iff
+ − 342
unfolding alphas_abs
+ − 343
unfolding alphas
+ − 344
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric]
+ − 345
unfolding fresh_star_def fresh_def
+ − 346
unfolding swap_set_not_in[OF a1 a2]
+ − 347
using a1 a2
+ − 348
by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI)
+ − 349
(auto simp add: supp_perm swap_atom)
1657
+ − 350
+ − 351
lemma abs_supports:
+ − 352
shows "((supp x) - as) supports (Abs as x)"
+ − 353
and "((supp x) - as) supports (Abs_res as x)"
+ − 354
and "((supp x) - (set bs)) supports (Abs_lst bs x)"
+ − 355
unfolding supports_def
+ − 356
unfolding permute_abs
+ − 357
by (simp_all add: abs_swap1[symmetric] abs_swap2[symmetric])
+ − 358
+ − 359
lemma supp_abs_subset1:
+ − 360
assumes a: "finite (supp x)"
1440
+ − 361
shows "(supp x) - as \<subseteq> supp (Abs as x)"
1657
+ − 362
and "(supp x) - as \<subseteq> supp (Abs_res as x)"
+ − 363
and "(supp x) - (set bs) \<subseteq> supp (Abs_lst bs x)"
+ − 364
unfolding supp_conv_fresh
+ − 365
apply(auto dest!: aux_fresh simp add: aux_supps)
+ − 366
apply(simp_all add: fresh_def supp_finite_atom_set a)
1440
+ − 367
done
+ − 368
1657
+ − 369
lemma supp_abs_subset2:
+ − 370
assumes a: "finite (supp x)"
1440
+ − 371
shows "supp (Abs as x) \<subseteq> (supp x) - as"
1657
+ − 372
and "supp (Abs_res as x) \<subseteq> (supp x) - as"
+ − 373
and "supp (Abs_lst bs x) \<subseteq> (supp x) - (set bs)"
+ − 374
apply(rule_tac [!] supp_is_subset)
+ − 375
apply(simp_all add: abs_supports a)
1478
+ − 376
done
+ − 377
1657
+ − 378
lemma abs_finite_supp:
+ − 379
assumes a: "finite (supp x)"
1478
+ − 380
shows "supp (Abs as x) = (supp x) - as"
1657
+ − 381
and "supp (Abs_res as x) = (supp x) - as"
+ − 382
and "supp (Abs_lst bs x) = (supp x) - (set bs)"
+ − 383
apply(rule_tac [!] subset_antisym)
+ − 384
apply(simp_all add: supp_abs_subset1[OF a] supp_abs_subset2[OF a])
1440
+ − 385
done
+ − 386
1657
+ − 387
lemma supp_abs:
1440
+ − 388
fixes x::"'a::fs"
+ − 389
shows "supp (Abs as x) = (supp x) - as"
1657
+ − 390
and "supp (Abs_res as x) = (supp x) - as"
+ − 391
and "supp (Abs_lst bs x) = (supp x) - (set bs)"
+ − 392
apply(rule_tac [!] abs_finite_supp)
+ − 393
apply(simp_all add: finite_supp)
1440
+ − 394
done
+ − 395
1558
+ − 396
instance abs_gen :: (fs) fs
1440
+ − 397
apply(default)
1657
+ − 398
apply(induct_tac x rule: abs_inducts(1))
+ − 399
apply(simp add: supp_abs finite_supp)
1440
+ − 400
done
+ − 401
1657
+ − 402
instance abs_res :: (fs) fs
+ − 403
apply(default)
+ − 404
apply(induct_tac x rule: abs_inducts(2))
+ − 405
apply(simp add: supp_abs finite_supp)
+ − 406
done
+ − 407
+ − 408
instance abs_lst :: (fs) fs
+ − 409
apply(default)
+ − 410
apply(induct_tac x rule: abs_inducts(3))
+ − 411
apply(simp add: supp_abs finite_supp)
1440
+ − 412
done
+ − 413
1657
+ − 414
lemma abs_fresh_iff:
+ − 415
fixes x::"'a::fs"
+ − 416
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
+ − 417
and "a \<sharp> Abs_res bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
+ − 418
and "a \<sharp> Abs_lst cs x \<longleftrightarrow> a \<in> (set cs) \<or> (a \<notin> (set cs) \<and> a \<sharp> x)"
+ − 419
unfolding fresh_def
+ − 420
unfolding supp_abs
+ − 421
by auto
1460
+ − 422
1440
+ − 423
1657
+ − 424
section {* BELOW is stuff that may or may not be needed *}
1440
+ − 425
+ − 426
(* support of concrete atom sets *)
+ − 427
+ − 428
lemma supp_atom_image:
+ − 429
fixes as::"'a::at_base set"
+ − 430
shows "supp (atom ` as) = supp as"
+ − 431
apply(simp add: supp_def)
+ − 432
apply(simp add: image_eqvt)
+ − 433
apply(simp add: atom_eqvt_raw)
+ − 434
apply(simp add: atom_image_cong)
+ − 435
done
+ − 436
1460
+ − 437
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"
+ − 438
apply (simp add: fresh_def)
+ − 439
apply (simp add: supp_atom_image)
+ − 440
apply (fold fresh_def)
+ − 441
apply (simp add: swap_fresh_fresh)
1440
+ − 442
done
+ − 443
1467
+ − 444
(* TODO: The following lemmas can be moved somewhere... *)
1657
+ − 445
+ − 446
lemma Abs_eq_iff:
+ − 447
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))"
+ − 448
by (lifting alpha_abs.simps(1))
+ − 449
+ − 450
1467
+ − 451
lemma split_rsp2[quot_respect]: "((R1 ===> R2 ===> prod_rel R1 R2 ===> op =) ===>
+ − 452
prod_rel R1 R2 ===> prod_rel R1 R2 ===> op =) split split"
+ − 453
by auto
+ − 454
+ − 455
lemma split_prs2[quot_preserve]:
+ − 456
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 457
and q2: "Quotient R2 Abs2 Rep2"
+ − 458
shows "((Abs1 ---> Abs2 ---> prod_fun Abs1 Abs2 ---> id) ---> prod_fun Rep1 Rep2 ---> prod_fun Rep1 Rep2 ---> id) split = split"
+ − 459
by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
+ − 460
+ − 461
lemma alpha_gen2:
+ − 462
"(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
+ − 463
(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
+ − 464
\<and> pi \<bullet> bs = cs)"
1467
+ − 465
by (simp add: alpha_gen)
+ − 466
1544
+ − 467
1558
+ − 468
lemma alpha_gen_compose_sym:
+ − 469
fixes pi
+ − 470
assumes b: "(aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)"
+ − 471
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
+ − 472
shows "(ab, s) \<approx>gen R f (- pi) (aa, t)"
+ − 473
using b apply -
+ − 474
apply(simp add: alpha_gen)
+ − 475
apply(erule conjE)+
+ − 476
apply(rule conjI)
+ − 477
apply(simp add: fresh_star_def fresh_minus_perm)
+ − 478
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))")
+ − 479
apply simp
+ − 480
apply(clarify)
+ − 481
apply(simp)
+ − 482
apply(rule a)
+ − 483
apply assumption
+ − 484
done
+ − 485
+ − 486
lemma alpha_gen_compose_sym2:
+ − 487
assumes a: "(aa, t1, t2) \<approx>gen (\<lambda>(x11, x12) (x21, x22).
+ − 488
(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)"
+ − 489
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)"
+ − 490
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)"
+ − 491
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)"
+ − 492
using a
+ − 493
apply(simp add: alpha_gen)
+ − 494
apply clarify
+ − 495
apply (rule conjI)
+ − 496
apply(simp add: fresh_star_def fresh_minus_perm)
+ − 497
apply (rule conjI)
+ − 498
apply (rotate_tac 3)
+ − 499
apply (drule_tac pi="- pi" in r1)
+ − 500
apply simp
+ − 501
apply (rule conjI)
+ − 502
apply (rotate_tac -1)
+ − 503
apply (drule_tac pi="- pi" in r2)
+ − 504
apply simp_all
+ − 505
done
+ − 506
+ − 507
lemma alpha_gen_compose_trans:
+ − 508
fixes pi pia
+ − 509
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)"
+ − 510
and c: "(ab, ta) \<approx>gen R f pia (ac, sa)"
+ − 511
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
+ − 512
shows "(aa, t) \<approx>gen R f (pia + pi) (ac, sa)"
+ − 513
using b c apply -
1581
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 514
apply(simp add: alpha_gen)
1558
+ − 515
apply(erule conjE)+
+ − 516
apply(simp add: fresh_star_plus)
+ − 517
apply(drule_tac x="- pia \<bullet> sa" in spec)
+ − 518
apply(drule mp)
+ − 519
apply(rotate_tac 5)
+ − 520
apply(drule_tac pi="- pia" in a)
+ − 521
apply(simp)
+ − 522
apply(rotate_tac 7)
+ − 523
apply(drule_tac pi="pia" in a)
+ − 524
apply(simp)
+ − 525
done
+ − 526
1581
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 527
lemma alpha_gen_compose_trans2:
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 528
fixes pi pia
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 529
assumes b: "(aa, (t1, t2)) \<approx>gen
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 530
(\<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>
diff
changeset
+ − 531
(\<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>
diff
changeset
+ − 532
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>
diff
changeset
+ − 533
pia (ac, (sa1, sa2))"
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 534
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>
diff
changeset
+ − 535
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>
diff
changeset
+ − 536
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>
diff
changeset
+ − 537
(pia + pi) (ac, (sa1, sa2))"
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 538
using b c apply -
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 539
apply(simp add: alpha_gen2)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 540
apply(simp add: alpha_gen)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 541
apply(erule conjE)+
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 542
apply(simp add: fresh_star_plus)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 543
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>
diff
changeset
+ − 544
apply(drule mp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 545
apply(rotate_tac 5)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 546
apply(drule_tac pi="- pia" in r1)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 547
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 548
apply(rotate_tac -1)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 549
apply(drule_tac pi="pia" in r1)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 550
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 551
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>
diff
changeset
+ − 552
apply(drule mp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 553
apply(rotate_tac 6)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 554
apply(drule_tac pi="- pia" in r2)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 555
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 556
apply(rotate_tac -1)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 557
apply(drule_tac pi="pia" in r2)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 558
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 559
done
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 560
1657
+ − 561
lemma alpha_gen_refl:
+ − 562
assumes a: "R x x"
+ − 563
shows "(bs, x) \<approx>gen R f 0 (bs, x)"
+ − 564
and "(bs, x) \<approx>res R f 0 (bs, x)"
+ − 565
and "(cs, x) \<approx>lst R f 0 (cs, x)"
+ − 566
using a
+ − 567
unfolding alphas
+ − 568
unfolding fresh_star_def
+ − 569
by (simp_all add: fresh_zero_perm)
+ − 570
+ − 571
lemma alpha_gen_sym:
+ − 572
assumes a: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x"
+ − 573
shows "(bs, x) \<approx>gen R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>gen R f (- p) (bs, x)"
+ − 574
and "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)"
+ − 575
and "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)"
+ − 576
using a
+ − 577
unfolding alphas
+ − 578
unfolding fresh_star_def
+ − 579
by (auto simp add: fresh_minus_perm)
+ − 580
+ − 581
lemma alpha_gen_trans:
+ − 582
assumes a: "\<lbrakk>R (p \<bullet> x) y; R (q \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((q + p) \<bullet> x) z"
+ − 583
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)"
+ − 584
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)"
+ − 585
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)"
+ − 586
using a
+ − 587
unfolding alphas
+ − 588
unfolding fresh_star_def
+ − 589
by (simp_all add: fresh_plus_perm)
+ − 590
+ − 591
lemma alpha_gen_eqvt:
+ − 592
assumes a: "R (q \<bullet> x) y \<Longrightarrow> R (p \<bullet> (q \<bullet> x)) (p \<bullet> y)"
+ − 593
and b: "p \<bullet> (f x) = f (p \<bullet> x)"
+ − 594
and c: "p \<bullet> (f y) = f (p \<bullet> y)"
+ − 595
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)"
+ − 596
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)"
+ − 597
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)"
+ − 598
unfolding alphas
+ − 599
unfolding set_eqvt[symmetric]
+ − 600
unfolding b[symmetric] c[symmetric]
+ − 601
unfolding Diff_eqvt[symmetric]
+ − 602
unfolding permute_eqvt[symmetric]
+ − 603
using a
+ − 604
by (auto simp add: fresh_star_permute_iff)
+ − 605
+ − 606
1440
+ − 607
end
+ − 608