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
lemma alpha_gen_refl:
+ − 55
assumes a: "R x x"
1460
+ − 56
shows "(bs, x) \<approx>gen R f 0 (bs, x)"
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 57
and "(bs, x) \<approx>res R f 0 (bs, x)"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 58
and "(cs, x) \<approx>lst R f 0 (cs, x)"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 59
using a
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 60
unfolding alphas
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 61
unfolding fresh_star_def
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 62
by (simp_all add: fresh_zero_perm)
1440
+ − 63
+ − 64
lemma alpha_gen_sym:
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 65
assumes a: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 66
shows "(bs, x) \<approx>gen R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>gen R f (- p) (bs, x)"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 67
and "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 68
and "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)"
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 69
using a
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 70
unfolding alphas
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 71
unfolding fresh_star_def
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 72
by (auto simp add: fresh_minus_perm)
1440
+ − 73
+ − 74
lemma alpha_gen_trans:
1558
+ − 75
assumes a: "\<lbrakk>R (p \<bullet> x) y; R (q \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((q + p) \<bullet> x) z"
+ − 76
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)"
+ − 77
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)"
+ − 78
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)"
+ − 79
using a
+ − 80
unfolding alphas
+ − 81
unfolding fresh_star_def
+ − 82
by (simp_all add: fresh_plus_perm)
1440
+ − 83
+ − 84
lemma alpha_gen_eqvt:
1558
+ − 85
assumes a: "R (q \<bullet> x) y \<Longrightarrow> R (p \<bullet> (q \<bullet> x)) (p \<bullet> y)"
+ − 86
and b: "p \<bullet> (f x) = f (p \<bullet> x)"
+ − 87
and c: "p \<bullet> (f y) = f (p \<bullet> y)"
+ − 88
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)"
+ − 89
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)"
+ − 90
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)"
+ − 91
unfolding alphas
+ − 92
unfolding set_eqvt[symmetric]
+ − 93
unfolding b[symmetric] c[symmetric]
+ − 94
unfolding Diff_eqvt[symmetric]
+ − 95
unfolding permute_eqvt[symmetric]
1487
+ − 96
using a
1558
+ − 97
by (auto simp add: fresh_star_permute_iff)
1440
+ − 98
+ − 99
fun
+ − 100
alpha_abs
+ − 101
where
1558
+ − 102
"alpha_abs (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op=) supp p (cs, y))"
1440
+ − 103
+ − 104
notation
+ − 105
alpha_abs ("_ \<approx>abs _")
+ − 106
+ − 107
lemma alpha_abs_swap:
+ − 108
assumes a1: "a \<notin> (supp x) - bs"
+ − 109
and a2: "b \<notin> (supp x) - bs"
+ − 110
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)"
+ − 111
using a1 a2
1558
+ − 112
unfolding Diff_iff
+ − 113
unfolding alpha_abs.simps
+ − 114
unfolding alphas
+ − 115
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric]
+ − 116
unfolding fresh_star_def fresh_def
+ − 117
unfolding swap_set_not_in[OF a1 a2]
+ − 118
by (rule_tac x="(a \<rightleftharpoons> b)" in exI)
+ − 119
(auto simp add: supp_perm swap_atom)
1440
+ − 120
+ − 121
fun
+ − 122
supp_abs_fun
1460
+ − 123
where
1440
+ − 124
"supp_abs_fun (bs, x) = (supp x) - bs"
+ − 125
1558
+ − 126
1440
+ − 127
lemma supp_abs_fun_lemma:
+ − 128
assumes a: "x \<approx>abs y"
+ − 129
shows "supp_abs_fun x = supp_abs_fun y"
+ − 130
using a
+ − 131
apply(induct rule: alpha_abs.induct)
+ − 132
apply(simp add: alpha_gen)
+ − 133
done
+ − 134
1558
+ − 135
+ − 136
quotient_type 'a abs_gen = "(atom set \<times> 'a::pt)" / "alpha_abs"
1440
+ − 137
apply(rule equivpI)
+ − 138
unfolding reflp_def symp_def transp_def
+ − 139
apply(simp_all)
+ − 140
(* refl *)
+ − 141
apply(clarify)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 142
apply(rule_tac x="0" in exI)
1440
+ − 143
apply(rule alpha_gen_refl)
+ − 144
apply(simp)
+ − 145
(* symm *)
+ − 146
apply(clarify)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 147
apply(rule_tac x="- p" in exI)
1440
+ − 148
apply(rule alpha_gen_sym)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 149
apply(clarsimp)
1440
+ − 150
apply(assumption)
+ − 151
(* trans *)
+ − 152
apply(clarify)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 153
apply(rule_tac x="pa + p" in exI)
1440
+ − 154
apply(rule alpha_gen_trans)
1558
+ − 155
apply(auto)
1440
+ − 156
done
+ − 157
+ − 158
quotient_definition
1558
+ − 159
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_gen"
1440
+ − 160
is
+ − 161
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
+ − 162
+ − 163
lemma [quot_respect]:
+ − 164
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair"
+ − 165
apply(clarsimp)
+ − 166
apply(rule exI)
+ − 167
apply(rule alpha_gen_refl)
+ − 168
apply(simp)
+ − 169
done
+ − 170
+ − 171
lemma [quot_respect]:
+ − 172
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute"
+ − 173
apply(clarsimp)
+ − 174
apply(rule exI)
+ − 175
apply(rule alpha_gen_eqvt)
+ − 176
apply(simp_all add: supp_eqvt)
+ − 177
done
+ − 178
+ − 179
lemma [quot_respect]:
+ − 180
shows "(alpha_abs ===> (op =)) supp_abs_fun supp_abs_fun"
+ − 181
apply(simp add: supp_abs_fun_lemma)
+ − 182
done
+ − 183
+ − 184
lemma abs_induct:
+ − 185
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t"
+ − 186
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"])
+ − 187
done
+ − 188
+ − 189
(* TEST case *)
+ − 190
lemmas abs_induct2 = prod.induct[where 'a="atom set" and 'b="'a::pt", quot_lifted]
+ − 191
thm abs_induct abs_induct2
+ − 192
1558
+ − 193
instantiation abs_gen :: (pt) pt
1440
+ − 194
begin
+ − 195
+ − 196
quotient_definition
1558
+ − 197
"permute_abs_gen::perm \<Rightarrow> ('a::pt abs_gen) \<Rightarrow> 'a abs_gen"
1440
+ − 198
is
+ − 199
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
+ − 200
1558
+ − 201
(* ??? has to be 'a \<dots> 'b does not work *)
1440
+ − 202
lemma permute_ABS [simp]:
1558
+ − 203
fixes x::"'a::pt"
1440
+ − 204
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)"
1558
+ − 205
thm permute_prod.simps
1440
+ − 206
by (lifting permute_prod.simps(1)[where 'a="atom set" and 'b="'a"])
+ − 207
+ − 208
instance
+ − 209
apply(default)
+ − 210
apply(induct_tac [!] x rule: abs_induct)
+ − 211
apply(simp_all)
+ − 212
done
+ − 213
+ − 214
end
+ − 215
+ − 216
quotient_definition
1558
+ − 217
"supp_Abs_fun :: ('a::pt) abs_gen \<Rightarrow> atom \<Rightarrow> bool"
1440
+ − 218
is
+ − 219
"supp_abs_fun"
+ − 220
+ − 221
lemma supp_Abs_fun_simp:
+ − 222
shows "supp_Abs_fun (Abs bs x) = (supp x) - bs"
+ − 223
by (lifting supp_abs_fun.simps(1))
+ − 224
+ − 225
lemma supp_Abs_fun_eqvt [eqvt]:
+ − 226
shows "(p \<bullet> supp_Abs_fun x) = supp_Abs_fun (p \<bullet> x)"
+ − 227
apply(induct_tac x rule: abs_induct)
+ − 228
apply(simp add: supp_Abs_fun_simp supp_eqvt Diff_eqvt)
+ − 229
done
+ − 230
+ − 231
lemma supp_Abs_fun_fresh:
+ − 232
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_Abs_fun (Abs bs x)"
+ − 233
apply(rule fresh_fun_eqvt_app)
+ − 234
apply(simp add: eqvts_raw)
+ − 235
apply(simp)
+ − 236
done
+ − 237
+ − 238
lemma Abs_swap:
+ − 239
assumes a1: "a \<notin> (supp x) - bs"
+ − 240
and a2: "b \<notin> (supp x) - bs"
+ − 241
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))"
1460
+ − 242
using a1 a2 by (lifting alpha_abs_swap)
1440
+ − 243
+ − 244
lemma Abs_supports:
1460
+ − 245
shows "((supp x) - as) supports (Abs as x)"
1440
+ − 246
unfolding supports_def
+ − 247
apply(clarify)
+ − 248
apply(simp (no_asm))
+ − 249
apply(subst Abs_swap[symmetric])
+ − 250
apply(simp_all)
+ − 251
done
+ − 252
1478
+ − 253
lemma finite_supp_Abs_subset1:
+ − 254
assumes "finite (supp x)"
1440
+ − 255
shows "(supp x) - as \<subseteq> supp (Abs as x)"
+ − 256
apply(simp add: supp_conv_fresh)
+ − 257
apply(auto)
+ − 258
apply(drule_tac supp_Abs_fun_fresh)
+ − 259
apply(simp only: supp_Abs_fun_simp)
+ − 260
apply(simp add: fresh_def)
1478
+ − 261
apply(simp add: supp_finite_atom_set assms)
1440
+ − 262
done
+ − 263
1478
+ − 264
lemma finite_supp_Abs_subset2:
+ − 265
assumes "finite (supp x)"
1440
+ − 266
shows "supp (Abs as x) \<subseteq> (supp x) - as"
+ − 267
apply(rule supp_is_subset)
+ − 268
apply(rule Abs_supports)
1478
+ − 269
apply(simp add: assms)
+ − 270
done
+ − 271
+ − 272
lemma finite_supp_Abs:
+ − 273
assumes "finite (supp x)"
+ − 274
shows "supp (Abs as x) = (supp x) - as"
+ − 275
apply(rule_tac subset_antisym)
+ − 276
apply(rule finite_supp_Abs_subset2[OF assms])
+ − 277
apply(rule finite_supp_Abs_subset1[OF assms])
1440
+ − 278
done
+ − 279
+ − 280
lemma supp_Abs:
+ − 281
fixes x::"'a::fs"
+ − 282
shows "supp (Abs as x) = (supp x) - as"
1478
+ − 283
apply(rule finite_supp_Abs)
+ − 284
apply(simp add: finite_supp)
1440
+ − 285
done
+ − 286
1558
+ − 287
instance abs_gen :: (fs) fs
1440
+ − 288
apply(default)
+ − 289
apply(induct_tac x rule: abs_induct)
+ − 290
apply(simp add: supp_Abs)
+ − 291
apply(simp add: finite_supp)
+ − 292
done
+ − 293
+ − 294
lemma Abs_fresh_iff:
+ − 295
fixes x::"'a::fs"
+ − 296
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
+ − 297
apply(simp add: fresh_def)
+ − 298
apply(simp add: supp_Abs)
+ − 299
apply(auto)
+ − 300
done
+ − 301
+ − 302
lemma Abs_eq_iff:
+ − 303
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))"
+ − 304
by (lifting alpha_abs.simps(1))
+ − 305
+ − 306
+ − 307
+ − 308
(*
+ − 309
below is a construction site for showing that in the
+ − 310
single-binder case, the old and new alpha equivalence
+ − 311
coincide
+ − 312
*)
+ − 313
+ − 314
fun
+ − 315
alpha1
+ − 316
where
+ − 317
"alpha1 (a, x) (b, y) \<longleftrightarrow> (a = b \<and> x = y) \<or> (a \<noteq> b \<and> x = (a \<rightleftharpoons> b) \<bullet> y \<and> a \<sharp> y)"
+ − 318
+ − 319
notation
+ − 320
alpha1 ("_ \<approx>abs1 _")
+ − 321
1460
+ − 322
fun
+ − 323
alpha2
+ − 324
where
+ − 325
"alpha2 (a, x) (b, y) \<longleftrightarrow> (\<exists>c. c \<sharp> (a,b,x,y) \<and> ((c \<rightleftharpoons> a) \<bullet> x) = ((c \<rightleftharpoons> b) \<bullet> y))"
+ − 326
+ − 327
notation
+ − 328
alpha2 ("_ \<approx>abs2 _")
+ − 329
+ − 330
lemma alpha_old_new:
1440
+ − 331
assumes a: "(a, x) \<approx>abs1 (b, y)" "sort_of a = sort_of b"
+ − 332
shows "({a}, x) \<approx>abs ({b}, y)"
+ − 333
using a
+ − 334
apply(simp)
+ − 335
apply(erule disjE)
+ − 336
apply(simp)
+ − 337
apply(rule exI)
+ − 338
apply(rule alpha_gen_refl)
+ − 339
apply(simp)
+ − 340
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI)
+ − 341
apply(simp add: alpha_gen)
+ − 342
apply(simp add: fresh_def)
+ − 343
apply(rule conjI)
1460
+ − 344
apply(rule_tac ?p1="(a \<rightleftharpoons> b)" in permute_eq_iff[THEN iffD1])
1440
+ − 345
apply(rule trans)
+ − 346
apply(simp add: Diff_eqvt supp_eqvt)
+ − 347
apply(subst swap_set_not_in)
+ − 348
back
+ − 349
apply(simp)
+ − 350
apply(simp)
+ − 351
apply(simp add: permute_set_eq)
1465
+ − 352
apply(rule conjI)
1460
+ − 353
apply(rule_tac ?p1="(a \<rightleftharpoons> b)" in fresh_star_permute_iff[THEN iffD1])
1440
+ − 354
apply(simp add: permute_self)
+ − 355
apply(simp add: Diff_eqvt supp_eqvt)
+ − 356
apply(simp add: permute_set_eq)
+ − 357
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}")
+ − 358
apply(simp add: fresh_star_def fresh_def)
+ − 359
apply(blast)
+ − 360
apply(simp add: supp_swap)
1465
+ − 361
apply(simp add: eqvts)
1440
+ − 362
done
+ − 363
+ − 364
+ − 365
lemma perm_induct_test:
+ − 366
fixes P :: "perm => bool"
+ − 367
assumes fin: "finite (supp p)"
+ − 368
assumes zero: "P 0"
+ − 369
assumes swap: "\<And>a b. \<lbrakk>sort_of a = sort_of b; a \<noteq> b\<rbrakk> \<Longrightarrow> P (a \<rightleftharpoons> b)"
+ − 370
assumes plus: "\<And>p1 p2. \<lbrakk>supp p1 \<inter> supp p2 = {}; P p1; P p2\<rbrakk> \<Longrightarrow> P (p1 + p2)"
+ − 371
shows "P p"
+ − 372
using fin
+ − 373
apply(induct F\<equiv>"supp p" arbitrary: p rule: finite_induct)
+ − 374
oops
1465
+ − 375
+ − 376
lemma ii:
+ − 377
assumes "\<forall>x \<in> A. p \<bullet> x = x"
+ − 378
shows "p \<bullet> A = A"
+ − 379
using assms
+ − 380
apply(auto)
+ − 381
apply (metis Collect_def Collect_mem_eq Int_absorb assms eqvt_bound inf_Int_eq mem_def mem_permute_iff)
+ − 382
apply (metis Collect_def Collect_mem_eq Int_absorb assms eqvt_apply eqvt_bound eqvt_lambda inf_Int_eq mem_def mem_permute_iff permute_minus_cancel(2) permute_pure)
+ − 383
done
+ − 384
+ − 385
+ − 386
+ − 387
lemma alpha_abs_Pair:
+ − 388
shows "(bs, (x1, x2)) \<approx>gen (\<lambda>(x1,x2) (y1,y2). x1=y1 \<and> x2=y2) (\<lambda>(x,y). supp x \<union> supp y) p (cs, (y1, y2))
+ − 389
\<longleftrightarrow> ((bs, x1) \<approx>gen (op=) supp p (cs, y1) \<and> (bs, x2) \<approx>gen (op=) supp p (cs, y2))"
+ − 390
apply(simp add: alpha_gen)
+ − 391
apply(simp add: fresh_star_def)
+ − 392
apply(simp add: ball_Un Un_Diff)
+ − 393
apply(rule iffI)
+ − 394
apply(simp)
+ − 395
defer
+ − 396
apply(simp)
+ − 397
apply(rule conjI)
+ − 398
apply(clarify)
+ − 399
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
+ − 400
apply(rule sym)
+ − 401
apply(rule ii)
+ − 402
apply(simp add: fresh_def supp_perm)
+ − 403
apply(clarify)
+ − 404
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
+ − 405
apply(simp add: fresh_def supp_perm)
+ − 406
apply(rule sym)
+ − 407
apply(rule ii)
+ − 408
apply(simp)
+ − 409
done
+ − 410
1440
+ − 411
+ − 412
lemma yy:
+ − 413
assumes "S1 - {x} = S2 - {x}" "x \<in> S1" "x \<in> S2"
+ − 414
shows "S1 = S2"
+ − 415
using assms
+ − 416
apply (metis insert_Diff_single insert_absorb)
+ − 417
done
+ − 418
+ − 419
lemma kk:
+ − 420
assumes a: "p \<bullet> x = y"
+ − 421
shows "\<forall>a \<in> supp x. (p \<bullet> a) \<in> supp y"
+ − 422
using a
+ − 423
apply(auto)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 424
apply(rule_tac p="- p" in permute_boolE)
1440
+ − 425
apply(simp add: mem_eqvt supp_eqvt)
+ − 426
done
+ − 427
+ − 428
lemma ww:
+ − 429
assumes "a \<notin> supp x" "b \<in> supp x" "a \<noteq> b" "sort_of a = sort_of b"
+ − 430
shows "((a \<rightleftharpoons> b) \<bullet> x) \<noteq> x"
+ − 431
apply(subgoal_tac "(supp x) supports x")
+ − 432
apply(simp add: supports_def)
+ − 433
using assms
+ − 434
apply -
+ − 435
apply(drule_tac x="a" in spec)
+ − 436
defer
+ − 437
apply(rule supp_supports)
+ − 438
apply(auto)
+ − 439
apply(rotate_tac 1)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 440
apply(drule_tac p="(a \<rightleftharpoons> b)" in permute_boolI)
1440
+ − 441
apply(simp add: mem_eqvt supp_eqvt)
+ − 442
done
+ − 443
+ − 444
lemma alpha_abs_sym:
+ − 445
assumes a: "({a}, x) \<approx>abs ({b}, y)"
+ − 446
shows "({b}, y) \<approx>abs ({a}, x)"
+ − 447
using a
+ − 448
apply(simp)
+ − 449
apply(erule exE)
+ − 450
apply(rule_tac x="- p" in exI)
+ − 451
apply(simp add: alpha_gen)
+ − 452
apply(simp add: fresh_star_def fresh_minus_perm)
+ − 453
apply (metis permute_minus_cancel(2))
+ − 454
done
+ − 455
+ − 456
lemma alpha_abs_trans:
+ − 457
assumes a: "({a1}, x1) \<approx>abs ({a2}, x2)"
+ − 458
assumes b: "({a2}, x2) \<approx>abs ({a3}, x3)"
+ − 459
shows "({a1}, x1) \<approx>abs ({a3}, x3)"
+ − 460
using a b
+ − 461
apply(simp)
+ − 462
apply(erule exE)+
+ − 463
apply(rule_tac x="pa + p" in exI)
+ − 464
apply(simp add: alpha_gen)
+ − 465
apply(simp add: fresh_star_def fresh_plus_perm)
+ − 466
done
+ − 467
+ − 468
lemma alpha_equal:
+ − 469
assumes a: "({a}, x) \<approx>abs ({a}, y)"
+ − 470
shows "(a, x) \<approx>abs1 (a, y)"
+ − 471
using a
+ − 472
apply(simp)
+ − 473
apply(erule exE)
+ − 474
apply(simp add: alpha_gen)
+ − 475
apply(erule conjE)+
+ − 476
apply(case_tac "a \<notin> supp x")
+ − 477
apply(simp)
+ − 478
apply(subgoal_tac "supp x \<sharp>* p")
1563
+ − 479
apply(drule supp_perm_eq)
1440
+ − 480
apply(simp)
+ − 481
apply(simp)
+ − 482
apply(simp)
+ − 483
apply(case_tac "a \<notin> supp y")
+ − 484
apply(simp)
1563
+ − 485
apply(drule supp_perm_eq)
1440
+ − 486
apply(clarify)
+ − 487
apply(simp (no_asm_use))
+ − 488
apply(simp)
+ − 489
apply(simp)
+ − 490
apply(drule yy)
+ − 491
apply(simp)
+ − 492
apply(simp)
+ − 493
apply(simp)
+ − 494
apply(case_tac "a \<sharp> p")
+ − 495
apply(subgoal_tac "supp y \<sharp>* p")
1563
+ − 496
apply(drule supp_perm_eq)
1440
+ − 497
apply(clarify)
+ − 498
apply(simp (no_asm_use))
+ − 499
apply(metis)
+ − 500
apply(auto simp add: fresh_star_def)[1]
+ − 501
apply(frule_tac kk)
+ − 502
apply(drule_tac x="a" in bspec)
+ − 503
apply(simp)
+ − 504
apply(simp add: fresh_def)
+ − 505
apply(simp add: supp_perm)
+ − 506
apply(subgoal_tac "((p \<bullet> a) \<sharp> p)")
+ − 507
apply(simp add: fresh_def supp_perm)
+ − 508
apply(simp add: fresh_star_def)
+ − 509
done
+ − 510
+ − 511
lemma alpha_unequal:
+ − 512
assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b" "a \<noteq> b"
+ − 513
shows "(a, x) \<approx>abs1 (b, y)"
+ − 514
using a
+ − 515
apply -
+ − 516
apply(subgoal_tac "a \<notin> supp x - {a}")
+ − 517
apply(subgoal_tac "b \<notin> supp x - {a}")
+ − 518
defer
+ − 519
apply(simp add: alpha_gen)
+ − 520
apply(simp)
+ − 521
apply(drule_tac alpha_abs_swap)
+ − 522
apply(assumption)
+ − 523
apply(simp only: insert_eqvt empty_eqvt swap_atom_simps)
+ − 524
apply(drule alpha_abs_sym)
+ − 525
apply(rotate_tac 4)
+ − 526
apply(drule_tac alpha_abs_trans)
+ − 527
apply(assumption)
+ − 528
apply(drule alpha_equal)
+ − 529
apply(simp)
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 530
apply(rule_tac p="(a \<rightleftharpoons> b)" in permute_boolE)
1440
+ − 531
apply(simp add: fresh_eqvt)
+ − 532
apply(simp add: fresh_def)
+ − 533
done
+ − 534
+ − 535
lemma alpha_new_old:
+ − 536
assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b"
+ − 537
shows "(a, x) \<approx>abs1 (b, y)"
+ − 538
using a
+ − 539
apply(case_tac "a=b")
+ − 540
apply(simp only: alpha_equal)
+ − 541
apply(drule alpha_unequal)
+ − 542
apply(simp)
+ − 543
apply(simp)
+ − 544
apply(simp)
+ − 545
done
+ − 546
+ − 547
(* support of concrete atom sets *)
+ − 548
+ − 549
lemma supp_atom_image:
+ − 550
fixes as::"'a::at_base set"
+ − 551
shows "supp (atom ` as) = supp as"
+ − 552
apply(simp add: supp_def)
+ − 553
apply(simp add: image_eqvt)
+ − 554
apply(simp add: atom_eqvt_raw)
+ − 555
apply(simp add: atom_image_cong)
+ − 556
done
+ − 557
1460
+ − 558
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"
+ − 559
apply (simp add: fresh_def)
+ − 560
apply (simp add: supp_atom_image)
+ − 561
apply (fold fresh_def)
+ − 562
apply (simp add: swap_fresh_fresh)
1440
+ − 563
done
+ − 564
1467
+ − 565
(* TODO: The following lemmas can be moved somewhere... *)
+ − 566
lemma split_rsp2[quot_respect]: "((R1 ===> R2 ===> prod_rel R1 R2 ===> op =) ===>
+ − 567
prod_rel R1 R2 ===> prod_rel R1 R2 ===> op =) split split"
+ − 568
by auto
+ − 569
+ − 570
lemma split_prs2[quot_preserve]:
+ − 571
assumes q1: "Quotient R1 Abs1 Rep1"
+ − 572
and q2: "Quotient R2 Abs2 Rep2"
+ − 573
shows "((Abs1 ---> Abs2 ---> prod_fun Abs1 Abs2 ---> id) ---> prod_fun Rep1 Rep2 ---> prod_fun Rep1 Rep2 ---> id) split = split"
+ − 574
by (simp add: expand_fun_eq Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2])
+ − 575
+ − 576
lemma alpha_gen2:
+ − 577
"(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
+ − 578
(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
+ − 579
\<and> pi \<bullet> bs = cs)"
1467
+ − 580
by (simp add: alpha_gen)
+ − 581
1544
+ − 582
1558
+ − 583
lemma alpha_gen_compose_sym:
+ − 584
fixes pi
+ − 585
assumes b: "(aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)"
+ − 586
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
+ − 587
shows "(ab, s) \<approx>gen R f (- pi) (aa, t)"
+ − 588
using b apply -
+ − 589
apply(simp add: alpha_gen)
+ − 590
apply(erule conjE)+
+ − 591
apply(rule conjI)
+ − 592
apply(simp add: fresh_star_def fresh_minus_perm)
+ − 593
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))")
+ − 594
apply simp
+ − 595
apply(clarify)
+ − 596
apply(simp)
+ − 597
apply(rule a)
+ − 598
apply assumption
+ − 599
done
+ − 600
+ − 601
lemma alpha_gen_compose_sym2:
+ − 602
assumes a: "(aa, t1, t2) \<approx>gen (\<lambda>(x11, x12) (x21, x22).
+ − 603
(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)"
+ − 604
and r1: "\<And>pi t s. R1 t s \<Longrightarrow> R1 (pi \<bullet> t) (pi \<bullet> s)"
+ − 605
and r2: "\<And>pi t s. R2 t s \<Longrightarrow> R2 (pi \<bullet> t) (pi \<bullet> s)"
+ − 606
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)"
+ − 607
using a
+ − 608
apply(simp add: alpha_gen)
+ − 609
apply clarify
+ − 610
apply (rule conjI)
+ − 611
apply(simp add: fresh_star_def fresh_minus_perm)
+ − 612
apply (rule conjI)
+ − 613
apply (rotate_tac 3)
+ − 614
apply (drule_tac pi="- pi" in r1)
+ − 615
apply simp
+ − 616
apply (rule conjI)
+ − 617
apply (rotate_tac -1)
+ − 618
apply (drule_tac pi="- pi" in r2)
+ − 619
apply simp_all
+ − 620
done
+ − 621
+ − 622
lemma alpha_gen_compose_trans:
+ − 623
fixes pi pia
+ − 624
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)"
+ − 625
and c: "(ab, ta) \<approx>gen R f pia (ac, sa)"
+ − 626
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
+ − 627
shows "(aa, t) \<approx>gen R f (pia + pi) (ac, sa)"
+ − 628
using b c apply -
1581
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 629
apply(simp add: alpha_gen)
1558
+ − 630
apply(erule conjE)+
+ − 631
apply(simp add: fresh_star_plus)
+ − 632
apply(drule_tac x="- pia \<bullet> sa" in spec)
+ − 633
apply(drule mp)
+ − 634
apply(rotate_tac 5)
+ − 635
apply(drule_tac pi="- pia" in a)
+ − 636
apply(simp)
+ − 637
apply(rotate_tac 7)
+ − 638
apply(drule_tac pi="pia" in a)
+ − 639
apply(simp)
+ − 640
done
+ − 641
1581
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 642
lemma alpha_gen_compose_trans2:
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 643
fixes pi pia
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 644
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
+ − 645
(\<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
+ − 646
(\<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
+ − 647
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
+ − 648
pia (ac, (sa1, sa2))"
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 649
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
+ − 650
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
+ − 651
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
+ − 652
(pia + pi) (ac, (sa1, sa2))"
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 653
using b c apply -
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 654
apply(simp add: alpha_gen2)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 655
apply(simp add: alpha_gen)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 656
apply(erule conjE)+
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 657
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
+ − 658
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
+ − 659
apply(drule mp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 660
apply(rotate_tac 5)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 661
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
+ − 662
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 663
apply(rotate_tac -1)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 664
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
+ − 665
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 666
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
+ − 667
apply(drule mp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 668
apply(rotate_tac 6)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 669
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
+ − 670
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 671
apply(rotate_tac -1)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 672
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
+ − 673
apply(simp)
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 674
done
6b1eea8dcdc0
equivp_cheat can be removed for all one-permutation examples.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 675
1558
+ − 676
lemma alpha_gen_compose_eqvt:
+ − 677
fixes pia
+ − 678
assumes b: "(g d, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R (pi \<bullet> x1) (pi \<bullet> x2)) f pia (g e, s)"
+ − 679
and c: "\<And>y. pi \<bullet> (g y) = g (pi \<bullet> y)"
+ − 680
and a: "\<And>x. pi \<bullet> (f x) = f (pi \<bullet> x)"
+ − 681
shows "(g (pi \<bullet> d), pi \<bullet> t) \<approx>gen R f (pi \<bullet> pia) (g (pi \<bullet> e), pi \<bullet> s)"
+ − 682
using b
+ − 683
apply -
+ − 684
apply(simp add: alpha_gen.simps)
+ − 685
apply(erule conjE)+
+ − 686
apply(rule conjI)
+ − 687
apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1])
+ − 688
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt c[symmetric])
+ − 689
apply(rule conjI)
+ − 690
apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1])
+ − 691
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt c[symmetric])
+ − 692
apply(subst permute_eqvt[symmetric])
+ − 693
apply(simp)
+ − 694
sorry
+ − 695
1440
+ − 696
end
+ − 697