989
af02b193a19a
the supp of a lambda can now be characterised, *provided* the notion of free variables coincides with support on lambda terms
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 1
theory Abs
1128
+ − 2
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "../Quotient" "../Quotient_Product"
984
+ − 3
begin
+ − 4
1089
+ − 5
(* the next three lemmas that should be in Nominal \<dots>\<dots>must be cleaned *)
+ − 6
lemma ball_image:
+ − 7
shows "(\<forall>x \<in> p \<bullet> S. P x) = (\<forall>x \<in> S. P (p \<bullet> x))"
+ − 8
apply(auto)
+ − 9
apply(drule_tac x="p \<bullet> x" in bspec)
+ − 10
apply(simp add: mem_permute_iff)
+ − 11
apply(simp)
+ − 12
apply(drule_tac x="(- p) \<bullet> x" in bspec)
+ − 13
apply(rule_tac p1="p" in mem_permute_iff[THEN iffD1])
+ − 14
apply(simp)
+ − 15
apply(simp)
+ − 16
done
+ − 17
1021
+ − 18
lemma fresh_star_plus:
+ − 19
fixes p q::perm
+ − 20
shows "\<lbrakk>a \<sharp>* p; a \<sharp>* q\<rbrakk> \<Longrightarrow> a \<sharp>* (p + q)"
+ − 21
unfolding fresh_star_def
1087
+ − 22
by (simp add: fresh_plus_perm)
1021
+ − 23
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 24
lemma fresh_star_permute_iff:
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 25
shows "(p \<bullet> a) \<sharp>* (p \<bullet> x) \<longleftrightarrow> a \<sharp>* x"
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 26
apply(simp add: fresh_star_def)
1089
+ − 27
apply(simp add: ball_image)
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 28
apply(simp add: fresh_permute_iff)
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 29
done
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 30
1006
+ − 31
fun
+ − 32
alpha_gen
984
+ − 33
where
1006
+ − 34
alpha_gen[simp del]:
1089
+ − 35
"alpha_gen (bs, x) R f pi (cs, y) \<longleftrightarrow> f x - bs = f y - cs \<and> (f x - bs) \<sharp>* pi \<and> R (pi \<bullet> x) y"
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 36
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 37
notation
1026
+ − 38
alpha_gen ("_ \<approx>gen _ _ _ _" [100, 100, 100, 100, 100] 100)
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 39
1005
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 40
lemma [mono]: "R1 \<le> R2 \<Longrightarrow> alpha_gen x R1 \<le> alpha_gen x R2"
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 41
by (cases x) (auto simp add: le_fun_def le_bool_def alpha_gen.simps)
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
diff
changeset
+ − 42
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 43
lemma alpha_gen_refl:
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 44
assumes a: "R x x"
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 45
shows "(bs, x) \<approx>gen R f 0 (bs, x)"
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 46
using a by (simp add: alpha_gen fresh_star_def fresh_zero_perm)
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 47
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 48
lemma alpha_gen_sym:
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 49
assumes a: "(bs, x) \<approx>gen R f p (cs, y)"
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 50
and b: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x"
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 51
shows "(cs, y) \<approx>gen R f (- p) (bs, x)"
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 52
using a b by (simp add: alpha_gen fresh_star_def fresh_def supp_minus_perm)
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 53
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 54
lemma alpha_gen_trans:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 55
assumes a: "(bs, x) \<approx>gen R f p1 (cs, y)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 56
and b: "(cs, y) \<approx>gen R f p2 (ds, z)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 57
and c: "\<lbrakk>R (p1 \<bullet> x) y; R (p2 \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((p2 + p1) \<bullet> x) z"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 58
shows "(bs, x) \<approx>gen R f (p2 + p1) (ds, z)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 59
using a b c using supp_plus_perm
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 60
apply(simp add: alpha_gen fresh_star_def fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 61
apply(blast)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 62
done
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 63
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 64
lemma alpha_gen_eqvt:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 65
assumes a: "(bs, x) \<approx>gen R f q (cs, y)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 66
and b: "R (q \<bullet> x) y \<Longrightarrow> R (p \<bullet> (q \<bullet> x)) (p \<bullet> y)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 67
and c: "p \<bullet> (f x) = f (p \<bullet> x)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 68
and d: "p \<bullet> (f y) = f (p \<bullet> y)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 69
shows "(p \<bullet> bs, p \<bullet> x) \<approx>gen R f (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 70
using a b
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 71
apply(simp add: alpha_gen c[symmetric] d[symmetric] Diff_eqvt[symmetric])
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 72
apply(simp add: permute_eqvt[symmetric])
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 73
apply(simp add: fresh_star_permute_iff)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 74
apply(clarsimp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 75
done
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 76
1210
+ − 77
lemma alpha_gen_compose_sym:
+ − 78
assumes b: "\<exists>pi. (aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)"
+ − 79
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
+ − 80
shows "\<exists>pi. (ab, s) \<approx>gen R f pi (aa, t)"
+ − 81
using b apply -
1021
+ − 82
apply(erule exE)
+ − 83
apply(rule_tac x="- pi" in exI)
+ − 84
apply(simp add: alpha_gen.simps)
+ − 85
apply(erule conjE)+
+ − 86
apply(rule conjI)
+ − 87
apply(simp add: fresh_star_def fresh_minus_perm)
+ − 88
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))")
+ − 89
apply simp
+ − 90
apply(rule a)
+ − 91
apply assumption
+ − 92
done
+ − 93
1210
+ − 94
lemma alpha_gen_compose_trans:
+ − 95
assumes b: "\<exists>pi\<Colon>perm. (aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi (ab, ta)"
+ − 96
and c: "\<exists>pi\<Colon>perm. (ab, ta) \<approx>gen R f pi (ac, sa)"
+ − 97
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
+ − 98
shows "\<exists>pi\<Colon>perm. (aa, t) \<approx>gen R f pi (ac, sa)"
+ − 99
using b c apply -
1021
+ − 100
apply(simp add: alpha_gen.simps)
+ − 101
apply(erule conjE)+
+ − 102
apply(erule exE)+
+ − 103
apply(erule conjE)+
+ − 104
apply(rule_tac x="pia + pi" in exI)
+ − 105
apply(simp add: fresh_star_plus)
+ − 106
apply(drule_tac x="- pia \<bullet> sa" in spec)
+ − 107
apply(drule mp)
+ − 108
apply(rotate_tac 4)
+ − 109
apply(drule_tac pi="- pia" in a)
+ − 110
apply(simp)
+ − 111
apply(rotate_tac 6)
+ − 112
apply(drule_tac pi="pia" in a)
+ − 113
apply(simp)
+ − 114
done
+ − 115
1024
+ − 116
lemma alpha_gen_atom_eqvt:
+ − 117
assumes a: "\<And>x. pi \<bullet> (f x) = f (pi \<bullet> x)"
1026
+ − 118
and b: "\<exists>pia. ({atom a}, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R (pi \<bullet> x1) (pi \<bullet> x2)) f pia ({atom b}, s)"
1024
+ − 119
shows "\<exists>pia. ({atom (pi \<bullet> a)}, pi \<bullet> t) \<approx>gen R f pia ({atom (pi \<bullet> b)}, pi \<bullet> s)"
1039
+ − 120
using b
+ − 121
apply -
1024
+ − 122
apply(erule exE)
+ − 123
apply(rule_tac x="pi \<bullet> pia" in exI)
+ − 124
apply(simp add: alpha_gen.simps)
+ − 125
apply(erule conjE)+
1034
+ − 126
apply(rule conjI)
1024
+ − 127
apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1])
1039
+ − 128
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt)
1024
+ − 129
apply(rule conjI)
+ − 130
apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1])
1039
+ − 131
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt)
1024
+ − 132
apply(subst permute_eqvt[symmetric])
+ − 133
apply(simp)
+ − 134
done
+ − 135
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 136
fun
1007
+ − 137
alpha_abs
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 138
where
1007
+ − 139
"alpha_abs (bs, x) (cs, y) = (\<exists>p. (bs, x) \<approx>gen (op=) supp p (cs, y))"
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 140
1006
+ − 141
notation
1007
+ − 142
alpha_abs ("_ \<approx>abs _")
984
+ − 143
1014
+ − 144
lemma alpha_abs_swap:
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 145
assumes a1: "a \<notin> (supp x) - bs"
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 146
and a2: "b \<notin> (supp x) - bs"
1007
+ − 147
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)"
1014
+ − 148
apply(simp)
+ − 149
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI)
+ − 150
apply(simp add: alpha_gen)
+ − 151
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
+ − 152
apply(simp add: swap_set_not_in[OF a1 a2])
+ − 153
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}")
+ − 154
using a1 a2
+ − 155
apply(simp add: fresh_star_def fresh_def)
+ − 156
apply(blast)
+ − 157
apply(simp add: supp_swap)
+ − 158
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 159
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 160
fun
1014
+ − 161
supp_abs_fun
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 162
where
1014
+ − 163
"supp_abs_fun (bs, x) = (supp x) - bs"
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 164
1014
+ − 165
lemma supp_abs_fun_lemma:
1007
+ − 166
assumes a: "x \<approx>abs y"
1014
+ − 167
shows "supp_abs_fun x = supp_abs_fun y"
+ − 168
using a
+ − 169
apply(induct rule: alpha_abs.induct)
+ − 170
apply(simp add: alpha_gen)
+ − 171
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 172
1007
+ − 173
quotient_type 'a abs = "(atom set \<times> 'a::pt)" / "alpha_abs"
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 174
apply(rule equivpI)
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 175
unfolding reflp_def symp_def transp_def
1006
+ − 176
apply(simp_all)
1089
+ − 177
(* refl *)
1006
+ − 178
apply(clarify)
+ − 179
apply(rule exI)
+ − 180
apply(rule alpha_gen_refl)
+ − 181
apply(simp)
1089
+ − 182
(* symm *)
1006
+ − 183
apply(clarify)
+ − 184
apply(rule exI)
+ − 185
apply(rule alpha_gen_sym)
+ − 186
apply(assumption)
+ − 187
apply(clarsimp)
1089
+ − 188
(* trans *)
1006
+ − 189
apply(clarify)
+ − 190
apply(rule exI)
+ − 191
apply(rule alpha_gen_trans)
+ − 192
apply(assumption)
+ − 193
apply(assumption)
+ − 194
apply(simp)
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 195
done
984
+ − 196
+ − 197
quotient_definition
1139
+ − 198
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs"
+ − 199
is
+ − 200
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
984
+ − 201
+ − 202
lemma [quot_respect]:
1007
+ − 203
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair"
1014
+ − 204
apply(clarsimp)
+ − 205
apply(rule exI)
+ − 206
apply(rule alpha_gen_refl)
+ − 207
apply(simp)
+ − 208
done
984
+ − 209
+ − 210
lemma [quot_respect]:
1007
+ − 211
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute"
1014
+ − 212
apply(clarsimp)
+ − 213
apply(rule exI)
+ − 214
apply(rule alpha_gen_eqvt)
+ − 215
apply(assumption)
+ − 216
apply(simp_all add: supp_eqvt)
+ − 217
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 218
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 219
lemma [quot_respect]:
1014
+ − 220
shows "(alpha_abs ===> (op =)) supp_abs_fun supp_abs_fun"
+ − 221
apply(simp add: supp_abs_fun_lemma)
+ − 222
done
984
+ − 223
1007
+ − 224
lemma abs_induct:
+ − 225
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t"
1014
+ − 226
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"])
+ − 227
done
984
+ − 228
1089
+ − 229
(* TEST case *)
+ − 230
lemmas abs_induct2 = prod.induct[where 'a="atom set" and 'b="'a::pt", quot_lifted]
+ − 231
thm abs_induct abs_induct2
+ − 232
1007
+ − 233
instantiation abs :: (pt) pt
984
+ − 234
begin
+ − 235
+ − 236
quotient_definition
1007
+ − 237
"permute_abs::perm \<Rightarrow> ('a::pt abs) \<Rightarrow> 'a abs"
1139
+ − 238
is
1006
+ − 239
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
984
+ − 240
+ − 241
lemma permute_ABS [simp]:
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 242
fixes x::"'a::pt" (* ??? has to be 'a \<dots> 'b does not work *)
1007
+ − 243
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)"
1014
+ − 244
by (lifting permute_prod.simps(1)[where 'a="atom set" and 'b="'a"])
984
+ − 245
+ − 246
instance
+ − 247
apply(default)
1007
+ − 248
apply(induct_tac [!] x rule: abs_induct)
984
+ − 249
apply(simp_all)
+ − 250
done
+ − 251
+ − 252
end
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 253
1014
+ − 254
quotient_definition
+ − 255
"supp_Abs_fun :: ('a::pt) abs \<Rightarrow> atom \<Rightarrow> bool"
1139
+ − 256
is
1014
+ − 257
"supp_abs_fun"
+ − 258
+ − 259
lemma supp_Abs_fun_simp:
+ − 260
shows "supp_Abs_fun (Abs bs x) = (supp x) - bs"
+ − 261
by (lifting supp_abs_fun.simps(1))
+ − 262
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 263
lemma supp_Abs_fun_eqvt [eqvt]:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 264
shows "(p \<bullet> supp_Abs_fun x) = supp_Abs_fun (p \<bullet> x)"
1014
+ − 265
apply(induct_tac x rule: abs_induct)
+ − 266
apply(simp add: supp_Abs_fun_simp supp_eqvt Diff_eqvt)
+ − 267
done
+ − 268
+ − 269
lemma supp_Abs_fun_fresh:
+ − 270
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_Abs_fun (Abs bs x)"
+ − 271
apply(rule fresh_fun_eqvt_app)
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 272
apply(simp add: eqvts_raw)
1014
+ − 273
apply(simp)
+ − 274
done
+ − 275
+ − 276
lemma Abs_swap:
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 277
assumes a1: "a \<notin> (supp x) - bs"
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 278
and a2: "b \<notin> (supp x) - bs"
1007
+ − 279
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))"
1014
+ − 280
using a1 a2 by (lifting alpha_abs_swap)
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 281
1007
+ − 282
lemma Abs_supports:
+ − 283
shows "((supp x) - as) supports (Abs as x)"
1014
+ − 284
unfolding supports_def
+ − 285
apply(clarify)
+ − 286
apply(simp (no_asm))
+ − 287
apply(subst Abs_swap[symmetric])
+ − 288
apply(simp_all)
+ − 289
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 290
1014
+ − 291
lemma supp_Abs_subset1:
+ − 292
fixes x::"'a::fs"
+ − 293
shows "(supp x) - as \<subseteq> supp (Abs as x)"
+ − 294
apply(simp add: supp_conv_fresh)
+ − 295
apply(auto)
+ − 296
apply(drule_tac supp_Abs_fun_fresh)
+ − 297
apply(simp only: supp_Abs_fun_simp)
+ − 298
apply(simp add: fresh_def)
+ − 299
apply(simp add: supp_finite_atom_set finite_supp)
+ − 300
done
1006
+ − 301
1014
+ − 302
lemma supp_Abs_subset2:
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 303
fixes x::"'a::fs"
1014
+ − 304
shows "supp (Abs as x) \<subseteq> (supp x) - as"
+ − 305
apply(rule supp_is_subset)
+ − 306
apply(rule Abs_supports)
+ − 307
apply(simp add: finite_supp)
+ − 308
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 309
1007
+ − 310
lemma supp_Abs:
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 311
fixes x::"'a::fs"
1007
+ − 312
shows "supp (Abs as x) = (supp x) - as"
1014
+ − 313
apply(rule_tac subset_antisym)
+ − 314
apply(rule supp_Abs_subset2)
+ − 315
apply(rule supp_Abs_subset1)
+ − 316
done
984
+ − 317
1007
+ − 318
instance abs :: (fs) fs
1014
+ − 319
apply(default)
+ − 320
apply(induct_tac x rule: abs_induct)
+ − 321
apply(simp add: supp_Abs)
+ − 322
apply(simp add: finite_supp)
+ − 323
done
984
+ − 324
1014
+ − 325
lemma Abs_fresh_iff:
984
+ − 326
fixes x::"'a::fs"
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 327
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
1014
+ − 328
apply(simp add: fresh_def)
+ − 329
apply(simp add: supp_Abs)
+ − 330
apply(auto)
+ − 331
done
984
+ − 332
1014
+ − 333
lemma Abs_eq_iff:
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 334
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))"
1014
+ − 335
by (lifting alpha_abs.simps(1))
984
+ − 336
1015
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 337
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 338
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 339
(*
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 340
below is a construction site for showing that in the
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 341
single-binder case, the old and new alpha equivalence
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 342
coincide
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 343
*)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 344
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 345
fun
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 346
alpha1
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 347
where
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 348
"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)"
1015
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 349
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 350
notation
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 351
alpha1 ("_ \<approx>abs1 _")
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 352
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 353
thm swap_set_not_in
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 354
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 355
lemma qq:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 356
fixes S::"atom set"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 357
assumes a: "supp p \<inter> S = {}"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 358
shows "p \<bullet> S = S"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 359
using a
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 360
apply(simp add: supp_perm permute_set_eq)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 361
apply(auto)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 362
apply(simp only: disjoint_iff_not_equal)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 363
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 364
apply (metis permute_atom_def_raw)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 365
apply(rule_tac x="(- p) \<bullet> x" in exI)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 366
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 367
apply(simp only: disjoint_iff_not_equal)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 368
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 369
apply(metis permute_minus_cancel)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 370
done
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 371
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 372
lemma alpha_abs_swap:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 373
assumes a1: "(supp x - bs) \<sharp>* p"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 374
and a2: "(supp x - bs) \<sharp>* p"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 375
shows "(bs, x) \<approx>abs (p \<bullet> bs, p \<bullet> x)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 376
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 377
apply(rule_tac x="p" in exI)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 378
apply(simp add: alpha_gen)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 379
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 380
apply(rule conjI)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 381
apply(rule sym)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 382
apply(rule qq)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 383
using a1 a2
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 384
apply(auto)[1]
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 385
oops
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 386
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 387
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 388
1015
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 389
lemma
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 390
assumes a: "(a, x) \<approx>abs1 (b, y)" "sort_of a = sort_of b"
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 391
shows "({a}, x) \<approx>abs ({b}, y)"
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 392
using a
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 393
apply(simp)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 394
apply(erule disjE)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 395
apply(simp)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 396
apply(rule exI)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 397
apply(rule alpha_gen_refl)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 398
apply(simp)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 399
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 400
apply(simp add: alpha_gen)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 401
apply(simp add: fresh_def)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 402
apply(rule conjI)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 403
apply(rule_tac ?p1="(a \<rightleftharpoons> b)" in permute_eq_iff[THEN iffD1])
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 404
apply(rule trans)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 405
apply(simp add: Diff_eqvt supp_eqvt)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 406
apply(subst swap_set_not_in)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 407
back
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 408
apply(simp)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 409
apply(simp)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 410
apply(simp add: permute_set_eq)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 411
apply(rule_tac ?p1="(a \<rightleftharpoons> b)" in fresh_star_permute_iff[THEN iffD1])
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 412
apply(simp add: permute_self)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 413
apply(simp add: Diff_eqvt supp_eqvt)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 414
apply(simp add: permute_set_eq)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 415
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}")
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 416
apply(simp add: fresh_star_def fresh_def)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 417
apply(blast)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 418
apply(simp add: supp_swap)
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 419
done
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 420
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 421
thm supp_perm
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 422
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 423
lemma perm_induct_test:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 424
fixes P :: "perm => bool"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 425
assumes zero: "P 0"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 426
assumes swap: "\<And>a b. \<lbrakk>sort_of a = sort_of b; a \<noteq> b\<rbrakk> \<Longrightarrow> P (a \<rightleftharpoons> b)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 427
assumes plus: "\<And>p1 p2. \<lbrakk>supp (p1 + p2) = (supp p1 \<union> supp p2); P p1; P p2\<rbrakk> \<Longrightarrow> P (p1 + p2)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 428
shows "P p"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 429
sorry
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 430
1194
+ − 431
lemma tt1:
+ − 432
assumes a: "finite (supp p)"
+ − 433
shows "(supp x) \<sharp>* p \<Longrightarrow> p \<bullet> x = x"
+ − 434
using a
+ − 435
unfolding fresh_star_def fresh_def
+ − 436
apply(induct F\<equiv>"supp p" arbitrary: p rule: finite.induct)
+ − 437
apply(simp add: supp_perm)
+ − 438
defer
+ − 439
apply(case_tac "a \<in> A")
+ − 440
apply(simp add: insert_absorb)
+ − 441
apply(subgoal_tac "A = supp p - {a}")
+ − 442
prefer 2
+ − 443
apply(blast)
+ − 444
apply(case_tac "p \<bullet> a = a")
+ − 445
apply(simp add: supp_perm)
+ − 446
apply(drule_tac x="p + (((- p) \<bullet> a) \<rightleftharpoons> a)" in meta_spec)
+ − 447
apply(simp)
+ − 448
apply(drule meta_mp)
+ − 449
apply(rule subset_antisym)
+ − 450
apply(rule subsetI)
+ − 451
apply(simp)
+ − 452
apply(simp add: supp_perm)
+ − 453
apply(case_tac "xa = p \<bullet> a")
+ − 454
apply(simp)
+ − 455
apply(case_tac "p \<bullet> a = (- p) \<bullet> a")
+ − 456
apply(simp)
+ − 457
defer
+ − 458
apply(simp)
+ − 459
oops
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 460
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 461
lemma tt:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 462
"(supp x) \<sharp>* p \<Longrightarrow> p \<bullet> x = x"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 463
apply(induct p rule: perm_induct_test)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 464
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 465
apply(rule swap_fresh_fresh)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 466
apply(case_tac "a \<in> supp x")
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 467
apply(simp add: fresh_star_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 468
apply(drule_tac x="a" in bspec)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 469
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 470
apply(simp add: fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 471
apply(simp add: supp_swap)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 472
apply(simp add: fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 473
apply(case_tac "b \<in> supp x")
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 474
apply(simp add: fresh_star_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 475
apply(drule_tac x="b" in bspec)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 476
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 477
apply(simp add: fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 478
apply(simp add: supp_swap)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 479
apply(simp add: fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 480
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 481
apply(drule meta_mp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 482
apply(simp add: fresh_star_def fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 483
apply(drule meta_mp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 484
apply(simp add: fresh_star_def fresh_def)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 485
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 486
done
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 487
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 488
lemma yy:
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 489
assumes "S1 - {x} = S2 - {x}" "x \<in> S1" "x \<in> S2"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 490
shows "S1 = S2"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 491
using assms
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 492
apply (metis insert_Diff_single insert_absorb)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 493
done
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 494
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 495
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 496
lemma
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 497
assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 498
shows "(a, x) \<approx>abs1 (b, y)"
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 499
using a
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 500
apply(case_tac "a = b")
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 501
apply(simp)
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 502
oops
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 503
1015
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 504
989
af02b193a19a
the supp of a lambda can now be characterised, *provided* the notion of free variables coincides with support on lambda terms
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 505
end
988
a987b5acadc8
improved the proof slightly by defining alpha as a function and completely characterised the equality between two abstractions
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 506