author | Christian Urban <urbanc@in.tum.de> |
Thu, 18 Mar 2010 10:05:36 +0100 | |
changeset 1501 | 7e7dc267ae6b |
parent 1436 | 04dad9b0136d |
permissions | -rw-r--r-- |
1436
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
1 |
theory Abs_res |
1128
17ca92ab4660
Main renaming + fixes for new Isabelle in IntEx2.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1096
diff
changeset
|
2 |
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "../Quotient" "../Quotient_Product" |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
5 |
fun |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
6 |
alpha_gen |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
where |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
8 |
alpha_gen[simp del]: |
1089 | 9 |
"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>
parents:
989
diff
changeset
|
10 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
11 |
notation |
1026
278253330b6a
Disambiguating the syntax.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1024
diff
changeset
|
12 |
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>
parents:
989
diff
changeset
|
13 |
|
1005
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
995
diff
changeset
|
14 |
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>
parents:
995
diff
changeset
|
15 |
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>
parents:
995
diff
changeset
|
16 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
17 |
lemma alpha_gen_refl: |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
18 |
assumes a: "R x x" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
19 |
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>
parents:
989
diff
changeset
|
20 |
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>
parents:
989
diff
changeset
|
21 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
22 |
lemma alpha_gen_sym: |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
23 |
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>
parents:
989
diff
changeset
|
24 |
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>
parents:
989
diff
changeset
|
25 |
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>
parents:
989
diff
changeset
|
26 |
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>
parents:
989
diff
changeset
|
27 |
|
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>
parents:
1089
diff
changeset
|
28 |
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>
parents:
1089
diff
changeset
|
29 |
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>
parents:
1089
diff
changeset
|
30 |
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>
parents:
1089
diff
changeset
|
31 |
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>
parents:
1089
diff
changeset
|
32 |
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>
parents:
1089
diff
changeset
|
33 |
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>
parents:
1089
diff
changeset
|
34 |
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>
parents:
1089
diff
changeset
|
35 |
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>
parents:
1089
diff
changeset
|
36 |
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>
parents:
1089
diff
changeset
|
37 |
|
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
38 |
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>
parents:
1089
diff
changeset
|
39 |
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>
parents:
1089
diff
changeset
|
40 |
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>
parents:
1089
diff
changeset
|
41 |
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>
parents:
1089
diff
changeset
|
42 |
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>
parents:
1089
diff
changeset
|
43 |
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>
parents:
1089
diff
changeset
|
44 |
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>
parents:
1089
diff
changeset
|
45 |
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>
parents:
1089
diff
changeset
|
46 |
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>
parents:
1089
diff
changeset
|
47 |
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>
parents:
1089
diff
changeset
|
48 |
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>
parents:
1089
diff
changeset
|
49 |
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>
parents:
1089
diff
changeset
|
50 |
|
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
51 |
lemma alpha_gen_compose_sym: |
1301 | 52 |
fixes pi |
53 |
assumes b: "(aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi (ab, s)" |
|
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
54 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
1301 | 55 |
shows "(ab, s) \<approx>gen R f (- pi) (aa, t)" |
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
56 |
using b apply - |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
57 |
apply(simp add: alpha_gen.simps) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
58 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
59 |
apply(rule conjI) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
60 |
apply(simp add: fresh_star_def fresh_minus_perm) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
61 |
apply(subgoal_tac "R (- pi \<bullet> s) ((- pi) \<bullet> (pi \<bullet> t))") |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
62 |
apply simp |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
63 |
apply(rule a) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
64 |
apply assumption |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
65 |
done |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
66 |
|
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
67 |
lemma alpha_gen_compose_trans: |
1301 | 68 |
fixes pi pia |
69 |
assumes b: "(aa, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi (ab, ta)" |
|
70 |
and c: "(ab, ta) \<approx>gen R f pia (ac, sa)" |
|
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
71 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
1301 | 72 |
shows "(aa, t) \<approx>gen R f (pia + pi) (ac, sa)" |
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
73 |
using b c apply - |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
74 |
apply(simp add: alpha_gen.simps) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
75 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
76 |
apply(simp add: fresh_star_plus) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
77 |
apply(drule_tac x="- pia \<bullet> sa" in spec) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
78 |
apply(drule mp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
79 |
apply(rotate_tac 4) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
80 |
apply(drule_tac pi="- pia" in a) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
81 |
apply(simp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
82 |
apply(rotate_tac 6) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
83 |
apply(drule_tac pi="pia" in a) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
84 |
apply(simp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
85 |
done |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
86 |
|
1255
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
87 |
lemma alpha_gen_compose_eqvt: |
1300 | 88 |
fixes pia |
89 |
assumes b: "(g d, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R (pi \<bullet> x1) (pi \<bullet> x2)) f pia (g e, s)" |
|
1255
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
90 |
and c: "\<And>y. pi \<bullet> (g y) = g (pi \<bullet> y)" |
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
91 |
and a: "\<And>x. pi \<bullet> (f x) = f (pi \<bullet> x)" |
1300 | 92 |
shows "(g (pi \<bullet> d), pi \<bullet> t) \<approx>gen R f (pi \<bullet> pia) (g (pi \<bullet> e), pi \<bullet> s)" |
1255
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
93 |
using b |
1039
0d832c36b1bb
fixed proofs in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1034
diff
changeset
|
94 |
apply - |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
95 |
apply(simp add: alpha_gen.simps) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
96 |
apply(erule conjE)+ |
1034 | 97 |
apply(rule conjI) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
98 |
apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1]) |
1255
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
99 |
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt c[symmetric]) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
100 |
apply(rule conjI) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
101 |
apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1]) |
1255
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
102 |
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt c[symmetric]) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
103 |
apply(subst permute_eqvt[symmetric]) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
104 |
apply(simp) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
105 |
done |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
106 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
107 |
fun |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
108 |
alpha_abs |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
109 |
where |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
110 |
"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>
parents:
984
diff
changeset
|
111 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
112 |
notation |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
113 |
alpha_abs ("_ \<approx>abs _") |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
114 |
|
1014 | 115 |
lemma alpha_abs_swap: |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
116 |
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>
parents:
984
diff
changeset
|
117 |
and a2: "b \<notin> (supp x) - bs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
118 |
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)" |
1014 | 119 |
apply(simp) |
120 |
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI) |
|
121 |
apply(simp add: alpha_gen) |
|
122 |
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric]) |
|
123 |
apply(simp add: swap_set_not_in[OF a1 a2]) |
|
124 |
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}") |
|
125 |
using a1 a2 |
|
126 |
apply(simp add: fresh_star_def fresh_def) |
|
127 |
apply(blast) |
|
128 |
apply(simp add: supp_swap) |
|
129 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
130 |
|
1436
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
131 |
lemma alpha_gen_swap_fun: |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
132 |
assumes f_eqvt: "\<And>pi. (pi \<bullet> (f x)) = f (pi \<bullet> x)" |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
133 |
assumes a1: "a \<notin> (f x) - bs" |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
134 |
and a2: "b \<notin> (f x) - bs" |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
135 |
shows "\<exists>pi. (bs, x) \<approx>gen (op=) f pi ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)" |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
136 |
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
137 |
apply(simp add: alpha_gen) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
138 |
apply(simp add: f_eqvt[symmetric] Diff_eqvt[symmetric]) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
139 |
apply(simp add: swap_set_not_in[OF a1 a2]) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
140 |
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}") |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
141 |
using a1 a2 |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
142 |
apply(simp add: fresh_star_def fresh_def) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
143 |
apply(blast) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
144 |
apply(simp add: supp_swap) |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
145 |
done |
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
146 |
|
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
147 |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
148 |
fun |
1014 | 149 |
supp_abs_fun |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
150 |
where |
1014 | 151 |
"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>
parents:
984
diff
changeset
|
152 |
|
1014 | 153 |
lemma supp_abs_fun_lemma: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
154 |
assumes a: "x \<approx>abs y" |
1014 | 155 |
shows "supp_abs_fun x = supp_abs_fun y" |
156 |
using a |
|
157 |
apply(induct rule: alpha_abs.induct) |
|
158 |
apply(simp add: alpha_gen) |
|
159 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
160 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
161 |
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>
parents:
984
diff
changeset
|
162 |
apply(rule equivpI) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
163 |
unfolding reflp_def symp_def transp_def |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
164 |
apply(simp_all) |
1089 | 165 |
(* refl *) |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
166 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
167 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
168 |
apply(rule alpha_gen_refl) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
169 |
apply(simp) |
1089 | 170 |
(* symm *) |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
171 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
172 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
173 |
apply(rule alpha_gen_sym) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
174 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
175 |
apply(clarsimp) |
1089 | 176 |
(* trans *) |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
177 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
178 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
179 |
apply(rule alpha_gen_trans) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
180 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
181 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
182 |
apply(simp) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
183 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
184 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
185 |
quotient_definition |
1139
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
186 |
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs" |
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
187 |
is |
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
188 |
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)" |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
189 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
190 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
191 |
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair" |
1014 | 192 |
apply(clarsimp) |
193 |
apply(rule exI) |
|
194 |
apply(rule alpha_gen_refl) |
|
195 |
apply(simp) |
|
196 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
197 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
198 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
199 |
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute" |
1014 | 200 |
apply(clarsimp) |
201 |
apply(rule exI) |
|
202 |
apply(rule alpha_gen_eqvt) |
|
203 |
apply(assumption) |
|
204 |
apply(simp_all add: supp_eqvt) |
|
205 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
206 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
207 |
lemma [quot_respect]: |
1014 | 208 |
shows "(alpha_abs ===> (op =)) supp_abs_fun supp_abs_fun" |
209 |
apply(simp add: supp_abs_fun_lemma) |
|
210 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
211 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
212 |
lemma abs_induct: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
213 |
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t" |
1014 | 214 |
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"]) |
215 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
216 |
|
1089 | 217 |
(* TEST case *) |
218 |
lemmas abs_induct2 = prod.induct[where 'a="atom set" and 'b="'a::pt", quot_lifted] |
|
219 |
thm abs_induct abs_induct2 |
|
220 |
||
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
221 |
instantiation abs :: (pt) pt |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
222 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
223 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
224 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
225 |
"permute_abs::perm \<Rightarrow> ('a::pt abs) \<Rightarrow> 'a abs" |
1139
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
226 |
is |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
227 |
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)" |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
228 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
229 |
lemma permute_ABS [simp]: |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
230 |
fixes x::"'a::pt" (* ??? has to be 'a \<dots> 'b does not work *) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
231 |
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)" |
1014 | 232 |
by (lifting permute_prod.simps(1)[where 'a="atom set" and 'b="'a"]) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
233 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
234 |
instance |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
235 |
apply(default) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
236 |
apply(induct_tac [!] x rule: abs_induct) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
237 |
apply(simp_all) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
238 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
239 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
240 |
end |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
241 |
|
1014 | 242 |
quotient_definition |
243 |
"supp_Abs_fun :: ('a::pt) abs \<Rightarrow> atom \<Rightarrow> bool" |
|
1139
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
244 |
is |
1014 | 245 |
"supp_abs_fun" |
246 |
||
247 |
lemma supp_Abs_fun_simp: |
|
248 |
shows "supp_Abs_fun (Abs bs x) = (supp x) - bs" |
|
249 |
by (lifting supp_abs_fun.simps(1)) |
|
250 |
||
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>
parents:
1089
diff
changeset
|
251 |
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>
parents:
1089
diff
changeset
|
252 |
shows "(p \<bullet> supp_Abs_fun x) = supp_Abs_fun (p \<bullet> x)" |
1014 | 253 |
apply(induct_tac x rule: abs_induct) |
254 |
apply(simp add: supp_Abs_fun_simp supp_eqvt Diff_eqvt) |
|
255 |
done |
|
256 |
||
257 |
lemma supp_Abs_fun_fresh: |
|
258 |
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_Abs_fun (Abs bs x)" |
|
259 |
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>
parents:
1089
diff
changeset
|
260 |
apply(simp add: eqvts_raw) |
1014 | 261 |
apply(simp) |
262 |
done |
|
263 |
||
264 |
lemma Abs_swap: |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
265 |
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>
parents:
984
diff
changeset
|
266 |
and a2: "b \<notin> (supp x) - bs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
267 |
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))" |
1014 | 268 |
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>
parents:
984
diff
changeset
|
269 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
270 |
lemma Abs_supports: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
271 |
shows "((supp x) - as) supports (Abs as x)" |
1014 | 272 |
unfolding supports_def |
273 |
apply(clarify) |
|
274 |
apply(simp (no_asm)) |
|
275 |
apply(subst Abs_swap[symmetric]) |
|
276 |
apply(simp_all) |
|
277 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
278 |
|
1014 | 279 |
lemma supp_Abs_subset1: |
280 |
fixes x::"'a::fs" |
|
281 |
shows "(supp x) - as \<subseteq> supp (Abs as x)" |
|
282 |
apply(simp add: supp_conv_fresh) |
|
283 |
apply(auto) |
|
284 |
apply(drule_tac supp_Abs_fun_fresh) |
|
285 |
apply(simp only: supp_Abs_fun_simp) |
|
286 |
apply(simp add: fresh_def) |
|
287 |
apply(simp add: supp_finite_atom_set finite_supp) |
|
288 |
done |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
289 |
|
1014 | 290 |
lemma supp_Abs_subset2: |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
291 |
fixes x::"'a::fs" |
1014 | 292 |
shows "supp (Abs as x) \<subseteq> (supp x) - as" |
293 |
apply(rule supp_is_subset) |
|
294 |
apply(rule Abs_supports) |
|
295 |
apply(simp add: finite_supp) |
|
296 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
297 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
298 |
lemma supp_Abs: |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
299 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
300 |
shows "supp (Abs as x) = (supp x) - as" |
1014 | 301 |
apply(rule_tac subset_antisym) |
302 |
apply(rule supp_Abs_subset2) |
|
303 |
apply(rule supp_Abs_subset1) |
|
304 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
305 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
306 |
instance abs :: (fs) fs |
1014 | 307 |
apply(default) |
308 |
apply(induct_tac x rule: abs_induct) |
|
309 |
apply(simp add: supp_Abs) |
|
310 |
apply(simp add: finite_supp) |
|
311 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
312 |
|
1014 | 313 |
lemma Abs_fresh_iff: |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
314 |
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>
parents:
1089
diff
changeset
|
315 |
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)" |
1014 | 316 |
apply(simp add: fresh_def) |
317 |
apply(simp add: supp_Abs) |
|
318 |
apply(auto) |
|
319 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
320 |
|
1014 | 321 |
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>
parents:
1089
diff
changeset
|
322 |
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))" |
1014 | 323 |
by (lifting alpha_abs.simps(1)) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
324 |
|
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>
parents:
1014
diff
changeset
|
325 |
|
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>
parents:
1014
diff
changeset
|
326 |
|
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>
parents:
1014
diff
changeset
|
327 |
(* |
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>
parents:
1014
diff
changeset
|
328 |
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>
parents:
1014
diff
changeset
|
329 |
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>
parents:
1014
diff
changeset
|
330 |
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>
parents:
1014
diff
changeset
|
331 |
*) |
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>
parents:
1014
diff
changeset
|
332 |
|
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>
parents:
1014
diff
changeset
|
333 |
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>
parents:
1014
diff
changeset
|
334 |
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>
parents:
1014
diff
changeset
|
335 |
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>
parents:
1089
diff
changeset
|
336 |
"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>
parents:
1014
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>
parents:
1014
diff
changeset
|
338 |
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>
parents:
1014
diff
changeset
|
339 |
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>
parents:
1014
diff
changeset
|
340 |
|
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
341 |
fun |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
342 |
alpha2 |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
343 |
where |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
344 |
"alpha2 (a, x) (b, y) \<longleftrightarrow> (\<exists>c. c \<sharp> (a,b,x,y) \<and> ((c \<rightleftharpoons> a) \<bullet> x) = ((c \<rightleftharpoons> b) \<bullet> y))" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
345 |
|
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
346 |
notation |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
347 |
alpha2 ("_ \<approx>abs2 _") |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
348 |
|
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>
parents:
1089
diff
changeset
|
349 |
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>
parents:
1089
diff
changeset
|
350 |
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>
parents:
1089
diff
changeset
|
351 |
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>
parents:
1089
diff
changeset
|
352 |
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>
parents:
1089
diff
changeset
|
353 |
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>
parents:
1089
diff
changeset
|
354 |
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>
parents:
1089
diff
changeset
|
355 |
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>
parents:
1089
diff
changeset
|
356 |
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>
parents:
1089
diff
changeset
|
357 |
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>
parents:
1089
diff
changeset
|
358 |
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>
parents:
1089
diff
changeset
|
359 |
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>
parents:
1089
diff
changeset
|
360 |
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>
parents:
1089
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>
parents:
1089
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>
parents:
1089
diff
changeset
|
363 |
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>
parents:
1089
diff
changeset
|
364 |
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>
parents:
1089
diff
changeset
|
365 |
|
1436
04dad9b0136d
started supp-fv proofs (is going to work)
Christian Urban <urbanc@in.tum.de>
parents:
1433
diff
changeset
|
366 |
lemma alpha_old_new: |
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>
parents:
1014
diff
changeset
|
367 |
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>
parents:
1014
diff
changeset
|
368 |
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>
parents:
1014
diff
changeset
|
369 |
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>
parents:
1014
diff
changeset
|
370 |
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>
parents:
1014
diff
changeset
|
371 |
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>
parents:
1014
diff
changeset
|
372 |
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>
parents:
1014
diff
changeset
|
373 |
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>
parents:
1014
diff
changeset
|
374 |
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>
parents:
1014
diff
changeset
|
375 |
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>
parents:
1014
diff
changeset
|
376 |
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>
parents:
1014
diff
changeset
|
377 |
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>
parents:
1014
diff
changeset
|
378 |
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>
parents:
1014
diff
changeset
|
379 |
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>
parents:
1014
diff
changeset
|
380 |
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>
parents:
1014
diff
changeset
|
381 |
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>
parents:
1014
diff
changeset
|
382 |
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>
parents:
1014
diff
changeset
|
383 |
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>
parents:
1014
diff
changeset
|
384 |
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>
parents:
1014
diff
changeset
|
385 |
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>
parents:
1014
diff
changeset
|
386 |
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>
parents:
1014
diff
changeset
|
387 |
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>
parents:
1014
diff
changeset
|
388 |
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>
parents:
1014
diff
changeset
|
389 |
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>
parents:
1014
diff
changeset
|
390 |
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>
parents:
1014
diff
changeset
|
391 |
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>
parents:
1014
diff
changeset
|
392 |
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>
parents:
1014
diff
changeset
|
393 |
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>
parents:
1014
diff
changeset
|
394 |
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>
parents:
1014
diff
changeset
|
395 |
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>
parents:
1014
diff
changeset
|
396 |
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>
parents:
1014
diff
changeset
|
397 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
398 |
lemma perm_zero: |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
399 |
assumes a: "\<forall>x::atom. p \<bullet> x = x" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
400 |
shows "p = 0" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
401 |
using a |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
402 |
by (simp add: expand_perm_eq) |
1327
670701b19e8e
added ACM style file for ICFP
Christian Urban <urbanc@in.tum.de>
parents:
1312
diff
changeset
|
403 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
404 |
fun |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
405 |
add_perm |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
406 |
where |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
407 |
"add_perm [] = 0" |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
408 |
| "add_perm ((a, b) # xs) = (a \<rightleftharpoons> b) + add_perm xs" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
409 |
|
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
410 |
fun |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
411 |
elem_perm |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
412 |
where |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
413 |
"elem_perm [] = {}" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
414 |
| "elem_perm ((a, b) # xs) = {a, b} \<union> elem_perm xs" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
415 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
416 |
|
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
417 |
lemma add_perm_apend: |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
418 |
shows "add_perm (xs @ ys) = add_perm xs + add_perm ys" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
419 |
apply(induct xs arbitrary: ys) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
420 |
apply(auto simp add: add_assoc) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
421 |
done |
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>
parents:
1089
diff
changeset
|
422 |
|
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
423 |
lemma perm_list_exists: |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
424 |
fixes p::perm |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
425 |
shows "\<exists>xs. p = add_perm xs \<and> supp xs \<subseteq> supp p" |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
426 |
apply(induct p taking: "\<lambda>p::perm. card (supp p)" rule: measure_induct) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
427 |
apply(rename_tac p) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
428 |
apply(case_tac "supp p = {}") |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
429 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
430 |
apply(simp add: supp_perm) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
431 |
apply(drule perm_zero) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
432 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
433 |
apply(rule_tac x="[]" in exI) |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
434 |
apply(simp add: supp_Nil) |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
435 |
apply(subgoal_tac "\<exists>x. x \<in> supp p") |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
436 |
defer |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
437 |
apply(auto)[1] |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
438 |
apply(erule exE) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
439 |
apply(drule_tac x="p + (((- p) \<bullet> x) \<rightleftharpoons> x)" in spec) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
440 |
apply(drule mp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
441 |
defer |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
442 |
apply(erule exE) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
443 |
apply(rule_tac x="xs @ [((- p) \<bullet> x, x)]" in exI) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
444 |
apply(simp add: add_perm_apend) |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
445 |
apply(erule conjE) |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
446 |
apply(drule sym) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
447 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
448 |
apply(simp add: expand_perm_eq) |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
449 |
apply(simp add: supp_append) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
450 |
apply(simp add: supp_perm supp_Cons supp_Nil supp_Pair supp_atom) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
451 |
apply(rule conjI) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
452 |
prefer 2 |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
453 |
apply(auto)[1] |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
454 |
apply (metis left_minus minus_unique permute_atom_def_raw permute_minus_cancel(2)) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
455 |
defer |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
456 |
apply(rule psubset_card_mono) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
457 |
apply(simp add: finite_supp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
458 |
apply(rule psubsetI) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
459 |
defer |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
460 |
apply(subgoal_tac "x \<notin> supp (p + (- p \<bullet> x \<rightleftharpoons> x))") |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
461 |
apply(blast) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
462 |
apply(simp add: supp_perm) |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
463 |
defer |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
464 |
apply(auto simp add: supp_perm)[1] |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
465 |
apply(case_tac "x = xa") |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
466 |
apply(simp) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
467 |
apply(case_tac "((- p) \<bullet> x) = xa") |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
468 |
apply(simp) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
469 |
apply(case_tac "sort_of xa = sort_of x") |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
470 |
apply(simp) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
471 |
apply(auto)[1] |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
472 |
apply(simp) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
473 |
apply(simp) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
474 |
apply(subgoal_tac "{a. p \<bullet> (- p \<bullet> x \<rightleftharpoons> x) \<bullet> a \<noteq> a} \<subseteq> {a. p \<bullet> a \<noteq> a}") |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
475 |
apply(blast) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
476 |
apply(auto simp add: supp_perm)[1] |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
477 |
apply(case_tac "x = xa") |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
478 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
479 |
apply(case_tac "((- p) \<bullet> x) = xa") |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
480 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
481 |
apply(case_tac "sort_of xa = sort_of x") |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
482 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
483 |
apply(auto)[1] |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
484 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
485 |
apply(simp) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
486 |
done |
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>
parents:
1089
diff
changeset
|
487 |
|
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
488 |
lemma tt0: |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
489 |
fixes p::perm |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
490 |
shows "(supp x) \<sharp>* p \<Longrightarrow> \<forall>a \<in> supp p. a \<sharp> x" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
491 |
apply(auto simp add: fresh_star_def supp_perm fresh_def) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
492 |
done |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
493 |
|
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
494 |
lemma uu0: |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
495 |
shows "(\<forall>a \<in> elem_perm xs. a \<sharp> x) \<Longrightarrow> (add_perm xs \<bullet> x) = x" |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
496 |
apply(induct xs rule: add_perm.induct) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
497 |
apply(simp) |
1351
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
498 |
apply(simp add: swap_fresh_fresh) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
499 |
done |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
500 |
|
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
501 |
lemma yy0: |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
502 |
fixes xs::"(atom \<times> atom) list" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
503 |
shows "supp xs = elem_perm xs" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
504 |
apply(induct xs rule: elem_perm.induct) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
505 |
apply(auto simp add: supp_Nil supp_Cons supp_Pair supp_atom) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
506 |
done |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
507 |
|
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
508 |
lemma tt1: |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
509 |
shows "(supp x) \<sharp>* p \<Longrightarrow> p \<bullet> x = x" |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
510 |
apply(drule tt0) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
511 |
apply(subgoal_tac "\<exists>xs. p = add_perm xs \<and> supp xs \<subseteq> supp p") |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
512 |
prefer 2 |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
513 |
apply(rule perm_list_exists) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
514 |
apply(erule exE) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
515 |
apply(simp only: yy0) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
516 |
apply(rule uu0) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
517 |
apply(auto) |
cffc5d78ab7f
more proofs in Abs and work on Core Haskell
Christian Urban <urbanc@in.tum.de>
parents:
1350
diff
changeset
|
518 |
done |
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>
parents:
1089
diff
changeset
|
519 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
520 |
|
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
521 |
lemma perm_induct_test: |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
522 |
fixes P :: "perm => bool" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
523 |
assumes fin: "finite (supp p)" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
524 |
assumes zero: "P 0" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
525 |
assumes swap: "\<And>a b. \<lbrakk>sort_of a = sort_of b; a \<noteq> b\<rbrakk> \<Longrightarrow> P (a \<rightleftharpoons> b)" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
526 |
assumes plus: "\<And>p1 p2. \<lbrakk>supp p1 \<inter> supp p2 = {}; P p1; P p2\<rbrakk> \<Longrightarrow> P (p1 + p2)" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
527 |
shows "P p" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
528 |
using fin |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
529 |
apply(induct F\<equiv>"supp p" arbitrary: p rule: finite_induct) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
530 |
apply(simp add: supp_perm) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
531 |
apply(drule perm_zero) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
532 |
apply(simp add: zero) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
533 |
apply(rotate_tac 3) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
534 |
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>
parents:
1089
diff
changeset
|
535 |
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>
parents:
1089
diff
changeset
|
536 |
"(supp x) \<sharp>* p \<Longrightarrow> p \<bullet> x = x" |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
537 |
oops |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
538 |
|
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>
parents:
1089
diff
changeset
|
539 |
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>
parents:
1089
diff
changeset
|
540 |
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>
parents:
1089
diff
changeset
|
541 |
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>
parents:
1089
diff
changeset
|
542 |
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>
parents:
1089
diff
changeset
|
543 |
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>
parents:
1089
diff
changeset
|
544 |
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>
parents:
1089
diff
changeset
|
545 |
|
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
546 |
lemma permute_boolI: |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
547 |
fixes P::"bool" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
548 |
shows "p \<bullet> P \<Longrightarrow> P" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
549 |
apply(simp add: permute_bool_def) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
550 |
done |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
551 |
|
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
552 |
lemma permute_boolE: |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
553 |
fixes P::"bool" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
554 |
shows "P \<Longrightarrow> p \<bullet> P" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
555 |
apply(simp add: permute_bool_def) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
556 |
done |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
557 |
|
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
558 |
lemma kk: |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
559 |
assumes a: "p \<bullet> x = y" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
560 |
shows "\<forall>a \<in> supp x. (p \<bullet> a) \<in> supp y" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
561 |
using a |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
562 |
apply(auto) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
563 |
apply(rule_tac p="- p" in permute_boolI) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
564 |
apply(simp add: mem_eqvt supp_eqvt) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
565 |
done |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
566 |
|
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
567 |
lemma ww: |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
568 |
assumes "a \<notin> supp x" "b \<in> supp x" "a \<noteq> b" "sort_of a = sort_of b" |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
569 |
shows "((a \<rightleftharpoons> b) \<bullet> x) \<noteq> x" |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
570 |
apply(subgoal_tac "(supp x) supports x") |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
571 |
apply(simp add: supports_def) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
572 |
using assms |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
573 |
apply - |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
574 |
apply(drule_tac x="a" in spec) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
575 |
defer |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
576 |
apply(rule supp_supports) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
577 |
apply(auto) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
578 |
apply(rotate_tac 1) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
579 |
apply(drule_tac p="(a \<rightleftharpoons> b)" in permute_boolE) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
580 |
apply(simp add: mem_eqvt supp_eqvt) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
581 |
done |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
582 |
|
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
583 |
lemma alpha_abs_sym: |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
584 |
assumes a: "({a}, x) \<approx>abs ({b}, y)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
585 |
shows "({b}, y) \<approx>abs ({a}, x)" |
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>
parents:
1089
diff
changeset
|
586 |
using a |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
587 |
apply(simp) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
588 |
apply(erule exE) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
589 |
apply(rule_tac x="- p" in exI) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
590 |
apply(simp add: alpha_gen) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
591 |
apply(simp add: fresh_star_def fresh_minus_perm) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
592 |
apply (metis permute_minus_cancel(2)) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
593 |
done |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
594 |
|
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
595 |
lemma alpha_abs_trans: |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
596 |
assumes a: "({a1}, x1) \<approx>abs ({a2}, x2)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
597 |
assumes b: "({a2}, x2) \<approx>abs ({a3}, x3)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
598 |
shows "({a1}, x1) \<approx>abs ({a3}, x3)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
599 |
using a b |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
600 |
apply(simp) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
601 |
apply(erule exE)+ |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
602 |
apply(rule_tac x="pa + p" in exI) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
603 |
apply(simp add: alpha_gen) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
604 |
apply(simp add: fresh_star_def fresh_plus_perm) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
605 |
done |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
606 |
|
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
607 |
lemma alpha_equal: |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
608 |
assumes a: "({a}, x) \<approx>abs ({a}, y)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
609 |
shows "(a, x) \<approx>abs1 (a, y)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
610 |
using a |
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>
parents:
1089
diff
changeset
|
611 |
apply(simp) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
612 |
apply(erule exE) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
613 |
apply(simp add: alpha_gen) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
614 |
apply(erule conjE)+ |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
615 |
apply(case_tac "a \<notin> supp x") |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
616 |
apply(simp) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
617 |
apply(subgoal_tac "supp x \<sharp>* p") |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
618 |
apply(drule tt1) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
619 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
620 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
621 |
apply(simp) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
622 |
apply(case_tac "a \<notin> supp y") |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
623 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
624 |
apply(drule tt1) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
625 |
apply(clarify) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
626 |
apply(simp (no_asm_use)) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
627 |
apply(simp) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
628 |
apply(simp) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
629 |
apply(drule yy) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
630 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
631 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
632 |
apply(simp) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
633 |
apply(case_tac "a \<sharp> p") |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
634 |
apply(subgoal_tac "supp y \<sharp>* p") |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
635 |
apply(drule tt1) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
636 |
apply(clarify) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
637 |
apply(simp (no_asm_use)) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
638 |
apply(metis) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
639 |
apply(auto simp add: fresh_star_def)[1] |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
640 |
apply(frule_tac kk) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
641 |
apply(drule_tac x="a" in bspec) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
642 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
643 |
apply(simp add: fresh_def) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
644 |
apply(simp add: supp_perm) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
645 |
apply(subgoal_tac "((p \<bullet> a) \<sharp> p)") |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
646 |
apply(simp add: fresh_def supp_perm) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
647 |
apply(simp add: fresh_star_def) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
648 |
done |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
649 |
|
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
650 |
lemma alpha_unequal: |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
651 |
assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b" "a \<noteq> b" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
652 |
shows "(a, x) \<approx>abs1 (b, y)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
653 |
using a |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
654 |
apply - |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
655 |
apply(subgoal_tac "a \<notin> supp x - {a}") |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
656 |
apply(subgoal_tac "b \<notin> supp x - {a}") |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
657 |
defer |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
658 |
apply(simp add: alpha_gen) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
659 |
apply(simp) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
660 |
apply(drule_tac alpha_abs_swap) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
661 |
apply(assumption) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
662 |
apply(simp only: insert_eqvt empty_eqvt swap_atom_simps) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
663 |
apply(drule alpha_abs_sym) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
664 |
apply(rotate_tac 4) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
665 |
apply(drule_tac alpha_abs_trans) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
666 |
apply(assumption) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
667 |
apply(drule alpha_equal) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
668 |
apply(simp) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
669 |
apply(rule_tac p="(a \<rightleftharpoons> b)" in permute_boolI) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
670 |
apply(simp add: fresh_eqvt) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
671 |
apply(simp add: fresh_def) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
672 |
done |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
673 |
|
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
674 |
lemma alpha_new_old: |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
675 |
assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
676 |
shows "(a, x) \<approx>abs1 (b, y)" |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
677 |
using a |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
678 |
apply(case_tac "a=b") |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
679 |
apply(simp only: alpha_equal) |
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
680 |
apply(drule alpha_unequal) |
1403
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
681 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
682 |
apply(simp) |
4a10338c2535
almost done with showing the equivalence between old and new alpha-equivalence (one subgoal remaining)
Christian Urban <urbanc@in.tum.de>
parents:
1351
diff
changeset
|
683 |
apply(simp) |
1423
d59f851926c5
finally the proof that new and old alpha agree
Christian Urban <urbanc@in.tum.de>
parents:
1403
diff
changeset
|
684 |
done |
1312
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
685 |
|
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
686 |
fun |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
687 |
distinct_perms |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
688 |
where |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
689 |
"distinct_perms [] = True" |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
690 |
| "distinct_perms (p # ps) = (supp p \<inter> supp ps = {} \<and> distinct_perms ps)" |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
691 |
|
1431
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
692 |
(* support of concrete atom sets *) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
693 |
|
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
694 |
lemma atom_eqvt_raw: |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
695 |
fixes p::"perm" |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
696 |
shows "(p \<bullet> atom) = atom" |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
697 |
by (simp add: expand_fun_eq permute_fun_def atom_eqvt) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
698 |
|
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
699 |
lemma atom_image_cong: |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
700 |
shows "(atom ` X = atom ` Y) = (X = Y)" |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
701 |
apply(rule inj_image_eq_iff) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
702 |
apply(simp add: inj_on_def) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
703 |
done |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
704 |
|
1433
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
705 |
lemma supp_atom_image: |
1432
b41de1879dae
generalised the supp for atoms to all concrete atoms (not just names)
Christian Urban <urbanc@in.tum.de>
parents:
1431
diff
changeset
|
706 |
fixes as::"'a::at_base set" |
1431
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
707 |
shows "supp (atom ` as) = supp as" |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
708 |
apply(simp add: supp_def) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
709 |
apply(simp add: image_eqvt) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
710 |
apply(simp add: atom_eqvt_raw) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
711 |
apply(simp add: atom_image_cong) |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
712 |
done |
bc9ed52bcef5
support of atoms at the end of Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1423
diff
changeset
|
713 |
|
1433
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
714 |
lemma swap_atom_image_fresh: "\<lbrakk>a \<sharp> atom ` (fn :: ('a :: at_base set)); b \<sharp> atom ` fn\<rbrakk> \<Longrightarrow> (a \<rightleftharpoons> b) \<bullet> fn = fn" |
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
715 |
apply (simp add: fresh_def) |
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
716 |
apply (simp add: supp_atom_image) |
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
717 |
apply (fold fresh_def) |
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
718 |
apply (simp add: swap_fresh_fresh) |
7a9217a7f681
Do not fail if the finite support proof fails.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1432
diff
changeset
|
719 |
done |
1312
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
720 |
|
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
721 |
|
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>
parents:
988
diff
changeset
|
722 |
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>
parents:
986
diff
changeset
|
723 |