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
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
+ − 77
(* introduced for examples *)
1021
+ − 78
lemma alpha_gen_atom_sym:
+ − 79
assumes a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
1026
+ − 80
shows "\<exists>pi. ({atom a}, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi ({atom b}, s) \<Longrightarrow>
1021
+ − 81
\<exists>pi. ({atom b}, s) \<approx>gen R f pi ({atom a}, t)"
+ − 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
+ − 94
lemma alpha_gen_atom_trans:
+ − 95
assumes a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))"
1026
+ − 96
shows "\<lbrakk>\<exists>pi\<Colon>perm. ({atom a}, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi ({atom aa}, ta);
1021
+ − 97
\<exists>pi\<Colon>perm. ({atom aa}, ta) \<approx>gen R f pi ({atom ba}, sa)\<rbrakk>
+ − 98
\<Longrightarrow> \<exists>pi\<Colon>perm. ({atom a}, t) \<approx>gen R f pi ({atom ba}, sa)"
+ − 99
apply(simp add: alpha_gen.simps)
+ − 100
apply(erule conjE)+
+ − 101
apply(erule exE)+
+ − 102
apply(erule conjE)+
+ − 103
apply(rule_tac x="pia + pi" in exI)
+ − 104
apply(simp add: fresh_star_plus)
+ − 105
apply(drule_tac x="- pia \<bullet> sa" in spec)
+ − 106
apply(drule mp)
+ − 107
apply(rotate_tac 4)
+ − 108
apply(drule_tac pi="- pia" in a)
+ − 109
apply(simp)
+ − 110
apply(rotate_tac 6)
+ − 111
apply(drule_tac pi="pia" in a)
+ − 112
apply(simp)
+ − 113
done
+ − 114
1024
+ − 115
lemma alpha_gen_atom_eqvt:
+ − 116
assumes a: "\<And>x. pi \<bullet> (f x) = f (pi \<bullet> x)"
1026
+ − 117
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
+ − 118
shows "\<exists>pia. ({atom (pi \<bullet> a)}, pi \<bullet> t) \<approx>gen R f pia ({atom (pi \<bullet> b)}, pi \<bullet> s)"
1039
+ − 119
using b
+ − 120
apply -
1024
+ − 121
apply(erule exE)
+ − 122
apply(rule_tac x="pi \<bullet> pia" in exI)
+ − 123
apply(simp add: alpha_gen.simps)
+ − 124
apply(erule conjE)+
1034
+ − 125
apply(rule conjI)
1024
+ − 126
apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1])
1039
+ − 127
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt)
1024
+ − 128
apply(rule conjI)
+ − 129
apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1])
1039
+ − 130
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt)
1024
+ − 131
apply(subst permute_eqvt[symmetric])
+ − 132
apply(simp)
+ − 133
done
+ − 134
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 135
fun
1007
+ − 136
alpha_abs
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 137
where
1007
+ − 138
"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
+ − 139
1006
+ − 140
notation
1007
+ − 141
alpha_abs ("_ \<approx>abs _")
984
+ − 142
1014
+ − 143
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
+ − 144
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
+ − 145
and a2: "b \<notin> (supp x) - bs"
1007
+ − 146
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)"
1014
+ − 147
apply(simp)
+ − 148
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI)
+ − 149
apply(simp add: alpha_gen)
+ − 150
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric])
+ − 151
apply(simp add: swap_set_not_in[OF a1 a2])
+ − 152
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}")
+ − 153
using a1 a2
+ − 154
apply(simp add: fresh_star_def fresh_def)
+ − 155
apply(blast)
+ − 156
apply(simp add: supp_swap)
+ − 157
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 158
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 159
fun
1014
+ − 160
supp_abs_fun
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 161
where
1014
+ − 162
"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
+ − 163
1014
+ − 164
lemma supp_abs_fun_lemma:
1007
+ − 165
assumes a: "x \<approx>abs y"
1014
+ − 166
shows "supp_abs_fun x = supp_abs_fun y"
+ − 167
using a
+ − 168
apply(induct rule: alpha_abs.induct)
+ − 169
apply(simp add: alpha_gen)
+ − 170
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 171
1007
+ − 172
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
+ − 173
apply(rule equivpI)
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 174
unfolding reflp_def symp_def transp_def
1006
+ − 175
apply(simp_all)
1089
+ − 176
(* refl *)
1006
+ − 177
apply(clarify)
+ − 178
apply(rule exI)
+ − 179
apply(rule alpha_gen_refl)
+ − 180
apply(simp)
1089
+ − 181
(* symm *)
1006
+ − 182
apply(clarify)
+ − 183
apply(rule exI)
+ − 184
apply(rule alpha_gen_sym)
+ − 185
apply(assumption)
+ − 186
apply(clarsimp)
1089
+ − 187
(* trans *)
1006
+ − 188
apply(clarify)
+ − 189
apply(rule exI)
+ − 190
apply(rule alpha_gen_trans)
+ − 191
apply(assumption)
+ − 192
apply(assumption)
+ − 193
apply(simp)
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 194
done
984
+ − 195
+ − 196
quotient_definition
1139
+ − 197
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs"
+ − 198
is
+ − 199
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)"
984
+ − 200
+ − 201
lemma [quot_respect]:
1007
+ − 202
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair"
1014
+ − 203
apply(clarsimp)
+ − 204
apply(rule exI)
+ − 205
apply(rule alpha_gen_refl)
+ − 206
apply(simp)
+ − 207
done
984
+ − 208
+ − 209
lemma [quot_respect]:
1007
+ − 210
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute"
1014
+ − 211
apply(clarsimp)
+ − 212
apply(rule exI)
+ − 213
apply(rule alpha_gen_eqvt)
+ − 214
apply(assumption)
+ − 215
apply(simp_all add: supp_eqvt)
+ − 216
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 217
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 218
lemma [quot_respect]:
1014
+ − 219
shows "(alpha_abs ===> (op =)) supp_abs_fun supp_abs_fun"
+ − 220
apply(simp add: supp_abs_fun_lemma)
+ − 221
done
984
+ − 222
1007
+ − 223
lemma abs_induct:
+ − 224
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t"
1014
+ − 225
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"])
+ − 226
done
984
+ − 227
1089
+ − 228
(* TEST case *)
+ − 229
lemmas abs_induct2 = prod.induct[where 'a="atom set" and 'b="'a::pt", quot_lifted]
+ − 230
thm abs_induct abs_induct2
+ − 231
1007
+ − 232
instantiation abs :: (pt) pt
984
+ − 233
begin
+ − 234
+ − 235
quotient_definition
1007
+ − 236
"permute_abs::perm \<Rightarrow> ('a::pt abs) \<Rightarrow> 'a abs"
1139
+ − 237
is
1006
+ − 238
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)"
984
+ − 239
+ − 240
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
+ − 241
fixes x::"'a::pt" (* ??? has to be 'a \<dots> 'b does not work *)
1007
+ − 242
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)"
1014
+ − 243
by (lifting permute_prod.simps(1)[where 'a="atom set" and 'b="'a"])
984
+ − 244
+ − 245
instance
+ − 246
apply(default)
1007
+ − 247
apply(induct_tac [!] x rule: abs_induct)
984
+ − 248
apply(simp_all)
+ − 249
done
+ − 250
+ − 251
end
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 252
1014
+ − 253
quotient_definition
+ − 254
"supp_Abs_fun :: ('a::pt) abs \<Rightarrow> atom \<Rightarrow> bool"
1139
+ − 255
is
1014
+ − 256
"supp_abs_fun"
+ − 257
+ − 258
lemma supp_Abs_fun_simp:
+ − 259
shows "supp_Abs_fun (Abs bs x) = (supp x) - bs"
+ − 260
by (lifting supp_abs_fun.simps(1))
+ − 261
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
+ − 262
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
+ − 263
shows "(p \<bullet> supp_Abs_fun x) = supp_Abs_fun (p \<bullet> x)"
1014
+ − 264
apply(induct_tac x rule: abs_induct)
+ − 265
apply(simp add: supp_Abs_fun_simp supp_eqvt Diff_eqvt)
+ − 266
done
+ − 267
+ − 268
lemma supp_Abs_fun_fresh:
+ − 269
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_Abs_fun (Abs bs x)"
+ − 270
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
+ − 271
apply(simp add: eqvts_raw)
1014
+ − 272
apply(simp)
+ − 273
done
+ − 274
+ − 275
lemma Abs_swap:
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 276
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
+ − 277
and a2: "b \<notin> (supp x) - bs"
1007
+ − 278
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))"
1014
+ − 279
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
+ − 280
1007
+ − 281
lemma Abs_supports:
+ − 282
shows "((supp x) - as) supports (Abs as x)"
1014
+ − 283
unfolding supports_def
+ − 284
apply(clarify)
+ − 285
apply(simp (no_asm))
+ − 286
apply(subst Abs_swap[symmetric])
+ − 287
apply(simp_all)
+ − 288
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 289
1014
+ − 290
lemma supp_Abs_subset1:
+ − 291
fixes x::"'a::fs"
+ − 292
shows "(supp x) - as \<subseteq> supp (Abs as x)"
+ − 293
apply(simp add: supp_conv_fresh)
+ − 294
apply(auto)
+ − 295
apply(drule_tac supp_Abs_fun_fresh)
+ − 296
apply(simp only: supp_Abs_fun_simp)
+ − 297
apply(simp add: fresh_def)
+ − 298
apply(simp add: supp_finite_atom_set finite_supp)
+ − 299
done
1006
+ − 300
1014
+ − 301
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
+ − 302
fixes x::"'a::fs"
1014
+ − 303
shows "supp (Abs as x) \<subseteq> (supp x) - as"
+ − 304
apply(rule supp_is_subset)
+ − 305
apply(rule Abs_supports)
+ − 306
apply(simp add: finite_supp)
+ − 307
done
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 308
1007
+ − 309
lemma supp_Abs:
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
diff
changeset
+ − 310
fixes x::"'a::fs"
1007
+ − 311
shows "supp (Abs as x) = (supp x) - as"
1014
+ − 312
apply(rule_tac subset_antisym)
+ − 313
apply(rule supp_Abs_subset2)
+ − 314
apply(rule supp_Abs_subset1)
+ − 315
done
984
+ − 316
1007
+ − 317
instance abs :: (fs) fs
1014
+ − 318
apply(default)
+ − 319
apply(induct_tac x rule: abs_induct)
+ − 320
apply(simp add: supp_Abs)
+ − 321
apply(simp add: finite_supp)
+ − 322
done
984
+ − 323
1014
+ − 324
lemma Abs_fresh_iff:
984
+ − 325
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
+ − 326
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)"
1014
+ − 327
apply(simp add: fresh_def)
+ − 328
apply(simp add: supp_Abs)
+ − 329
apply(auto)
+ − 330
done
984
+ − 331
1014
+ − 332
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
+ − 333
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))"
1014
+ − 334
by (lifting alpha_abs.simps(1))
984
+ − 335
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
+ − 336
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
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
+ − 340
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
+ − 341
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
+ − 342
*)
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
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
+ − 345
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
+ − 346
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
+ − 347
"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
+ − 348
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
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
+ − 350
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
+ − 351
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
+ − 352
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
+ − 353
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
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
+ − 355
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
+ − 356
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
+ − 357
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
+ − 358
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
+ − 359
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
+ − 360
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
+ − 361
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
+ − 362
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
+ − 363
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
+ − 364
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
+ − 365
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
+ − 366
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
+ − 367
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
+ − 368
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
+ − 369
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
+ − 370
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
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
+ − 372
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
+ − 373
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
+ − 374
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
+ − 375
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
+ − 376
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
+ − 377
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
+ − 378
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
+ − 379
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
+ − 380
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
+ − 381
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
+ − 382
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
+ − 383
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
+ − 384
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
+ − 385
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
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
+ − 388
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
+ − 389
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
+ − 390
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
+ − 391
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
+ − 392
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
+ − 393
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
+ − 394
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
+ − 395
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
+ − 396
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
+ − 397
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
+ − 398
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
+ − 399
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
+ − 400
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
+ − 401
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
+ − 402
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
+ − 403
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
+ − 404
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
+ − 405
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
+ − 406
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
+ − 407
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
+ − 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 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
+ − 410
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
+ − 411
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
+ − 412
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
+ − 413
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
+ − 414
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
+ − 415
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
+ − 416
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
+ − 417
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
+ − 418
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
+ − 419
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
+ − 420
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
+ − 421
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
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
+ − 423
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
+ − 424
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
+ − 425
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
+ − 426
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
+ − 427
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
+ − 428
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
+ − 429
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
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
+ − 431
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
+ − 432
"(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
+ − 433
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
+ − 434
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
+ − 435
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
+ − 436
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
+ − 437
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
+ − 438
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
+ − 439
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
+ − 440
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
+ − 441
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
+ − 442
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
+ − 443
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
+ − 444
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
+ − 445
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
+ − 446
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
+ − 447
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
+ − 448
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
+ − 449
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
+ − 450
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
+ − 451
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
+ − 452
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
+ − 453
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
+ − 454
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
+ − 455
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
+ − 456
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
+ − 457
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
+ − 458
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
+ − 459
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
+ − 460
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
+ − 461
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
+ − 462
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
+ − 463
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
+ − 464
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
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
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
+ − 467
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
+ − 468
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
+ − 469
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
+ − 470
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
+ − 471
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
+ − 472
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
+ − 473
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
+ − 474
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
+ − 475
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
+ − 476