author | Christian Urban <urbanc@in.tum.de> |
Wed, 03 Mar 2010 19:10:40 +0100 | |
changeset 1350 | 5b31e49678fc |
parent 1327 | 670701b19e8e |
child 1351 | cffc5d78ab7f |
permissions | -rw-r--r-- |
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
|
1 |
theory Abs |
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 |
|
1089 | 5 |
(* the next three lemmas that should be in Nominal \<dots>\<dots>must be cleaned *) |
6 |
lemma ball_image: |
|
7 |
shows "(\<forall>x \<in> p \<bullet> S. P x) = (\<forall>x \<in> S. P (p \<bullet> x))" |
|
8 |
apply(auto) |
|
9 |
apply(drule_tac x="p \<bullet> x" in bspec) |
|
10 |
apply(simp add: mem_permute_iff) |
|
11 |
apply(simp) |
|
12 |
apply(drule_tac x="(- p) \<bullet> x" in bspec) |
|
13 |
apply(rule_tac p1="p" in mem_permute_iff[THEN iffD1]) |
|
14 |
apply(simp) |
|
15 |
apply(simp) |
|
16 |
done |
|
17 |
||
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
18 |
lemma fresh_star_plus: |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
19 |
fixes p q::perm |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
20 |
shows "\<lbrakk>a \<sharp>* p; a \<sharp>* q\<rbrakk> \<Longrightarrow> a \<sharp>* (p + q)" |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
21 |
unfolding fresh_star_def |
1087
bb7f4457091a
moved some lemmas to Nominal; updated all files
Christian Urban <urbanc@in.tum.de>
parents:
1063
diff
changeset
|
22 |
by (simp add: fresh_plus_perm) |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
23 |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
24 |
lemma fresh_star_permute_iff: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
25 |
shows "(p \<bullet> a) \<sharp>* (p \<bullet> x) \<longleftrightarrow> a \<sharp>* x" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
26 |
apply(simp add: fresh_star_def) |
1089 | 27 |
apply(simp add: ball_image) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
28 |
apply(simp add: fresh_permute_iff) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
29 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
30 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
31 |
fun |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
32 |
alpha_gen |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
where |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
34 |
alpha_gen[simp del]: |
1089 | 35 |
"alpha_gen (bs, x) R f pi (cs, y) \<longleftrightarrow> f x - bs = f y - cs \<and> (f x - bs) \<sharp>* pi \<and> R (pi \<bullet> x) y" |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
36 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
37 |
notation |
1026
278253330b6a
Disambiguating the syntax.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1024
diff
changeset
|
38 |
alpha_gen ("_ \<approx>gen _ _ _ _" [100, 100, 100, 100, 100] 100) |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
39 |
|
1005
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
995
diff
changeset
|
40 |
lemma [mono]: "R1 \<le> R2 \<Longrightarrow> alpha_gen x R1 \<le> alpha_gen x R2" |
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
995
diff
changeset
|
41 |
by (cases x) (auto simp add: le_fun_def le_bool_def alpha_gen.simps) |
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
995
diff
changeset
|
42 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
43 |
lemma alpha_gen_refl: |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
44 |
assumes a: "R x x" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
45 |
shows "(bs, x) \<approx>gen R f 0 (bs, x)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
46 |
using a by (simp add: alpha_gen fresh_star_def fresh_zero_perm) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
47 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
48 |
lemma alpha_gen_sym: |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
49 |
assumes a: "(bs, x) \<approx>gen R f p (cs, y)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
50 |
and b: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
51 |
shows "(cs, y) \<approx>gen R f (- p) (bs, x)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
52 |
using a b by (simp add: alpha_gen fresh_star_def fresh_def supp_minus_perm) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
53 |
|
1095
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
54 |
lemma alpha_gen_trans: |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
55 |
assumes a: "(bs, x) \<approx>gen R f p1 (cs, y)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
56 |
and b: "(cs, y) \<approx>gen R f p2 (ds, z)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
57 |
and c: "\<lbrakk>R (p1 \<bullet> x) y; R (p2 \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((p2 + p1) \<bullet> x) z" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
58 |
shows "(bs, x) \<approx>gen R f (p2 + p1) (ds, z)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
59 |
using a b c using supp_plus_perm |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
60 |
apply(simp add: alpha_gen fresh_star_def fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
61 |
apply(blast) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
62 |
done |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
63 |
|
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
64 |
lemma alpha_gen_eqvt: |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
65 |
assumes a: "(bs, x) \<approx>gen R f q (cs, y)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
66 |
and b: "R (q \<bullet> x) y \<Longrightarrow> R (p \<bullet> (q \<bullet> x)) (p \<bullet> y)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
67 |
and c: "p \<bullet> (f x) = f (p \<bullet> x)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
68 |
and d: "p \<bullet> (f y) = f (p \<bullet> y)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
69 |
shows "(p \<bullet> bs, p \<bullet> x) \<approx>gen R f (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
70 |
using a b |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
71 |
apply(simp add: alpha_gen c[symmetric] d[symmetric] Diff_eqvt[symmetric]) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
72 |
apply(simp add: permute_eqvt[symmetric]) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
73 |
apply(simp add: fresh_star_permute_iff) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
74 |
apply(clarsimp) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
75 |
done |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
76 |
|
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
77 |
lemma alpha_gen_compose_sym: |
1301 | 78 |
fixes pi |
79 |
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
|
80 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
1301 | 81 |
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
|
82 |
using b apply - |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
83 |
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
|
84 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
85 |
apply(rule conjI) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
86 |
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
|
87 |
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
|
88 |
apply simp |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
89 |
apply(rule a) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
90 |
apply assumption |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
91 |
done |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
92 |
|
1210
10a0e3578507
Generalize atom_trans and atom_sym.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1194
diff
changeset
|
93 |
lemma alpha_gen_compose_trans: |
1301 | 94 |
fixes pi pia |
95 |
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)" |
|
96 |
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
|
97 |
and a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
1301 | 98 |
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
|
99 |
using b c apply - |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
100 |
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
|
101 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
102 |
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
|
103 |
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
|
104 |
apply(drule mp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
105 |
apply(rotate_tac 4) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
106 |
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
|
107 |
apply(simp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
108 |
apply(rotate_tac 6) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
109 |
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
|
110 |
apply(simp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
111 |
done |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
112 |
|
1255
ab8ed83d0188
Simplified and finised eqvt proofs for t1 and t5
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1210
diff
changeset
|
113 |
lemma alpha_gen_compose_eqvt: |
1300 | 114 |
fixes pia |
115 |
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
|
116 |
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
|
117 |
and a: "\<And>x. pi \<bullet> (f x) = f (pi \<bullet> x)" |
1300 | 118 |
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
|
119 |
using b |
1039
0d832c36b1bb
fixed proofs in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1034
diff
changeset
|
120 |
apply - |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
121 |
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
|
122 |
apply(erule conjE)+ |
1034 | 123 |
apply(rule conjI) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
124 |
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
|
125 |
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
|
126 |
apply(rule conjI) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
127 |
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
|
128 |
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
|
129 |
apply(subst permute_eqvt[symmetric]) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
130 |
apply(simp) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
131 |
done |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
132 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
133 |
fun |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
134 |
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
|
135 |
where |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
136 |
"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
|
137 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
138 |
notation |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
139 |
alpha_abs ("_ \<approx>abs _") |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
140 |
|
1014 | 141 |
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
|
142 |
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
|
143 |
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
|
144 |
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)" |
1014 | 145 |
apply(simp) |
146 |
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI) |
|
147 |
apply(simp add: alpha_gen) |
|
148 |
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric]) |
|
149 |
apply(simp add: swap_set_not_in[OF a1 a2]) |
|
150 |
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}") |
|
151 |
using a1 a2 |
|
152 |
apply(simp add: fresh_star_def fresh_def) |
|
153 |
apply(blast) |
|
154 |
apply(simp add: supp_swap) |
|
155 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
156 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
157 |
fun |
1014 | 158 |
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
|
159 |
where |
1014 | 160 |
"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
|
161 |
|
1014 | 162 |
lemma supp_abs_fun_lemma: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
163 |
assumes a: "x \<approx>abs y" |
1014 | 164 |
shows "supp_abs_fun x = supp_abs_fun y" |
165 |
using a |
|
166 |
apply(induct rule: alpha_abs.induct) |
|
167 |
apply(simp add: alpha_gen) |
|
168 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
169 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
170 |
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
|
171 |
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
|
172 |
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
|
173 |
apply(simp_all) |
1089 | 174 |
(* refl *) |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
175 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
176 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
177 |
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
|
178 |
apply(simp) |
1089 | 179 |
(* symm *) |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
180 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
181 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
182 |
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
|
183 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
184 |
apply(clarsimp) |
1089 | 185 |
(* trans *) |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
186 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
187 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
188 |
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
|
189 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
190 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
191 |
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
|
192 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
193 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
194 |
quotient_definition |
1139
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
195 |
"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
|
196 |
is |
c4001cda9da3
renamed 'as' to 'is' everywhere.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1128
diff
changeset
|
197 |
"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
|
198 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
199 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
200 |
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair" |
1014 | 201 |
apply(clarsimp) |
202 |
apply(rule exI) |
|
203 |
apply(rule alpha_gen_refl) |
|
204 |
apply(simp) |
|
205 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
206 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
207 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
208 |
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute" |
1014 | 209 |
apply(clarsimp) |
210 |
apply(rule exI) |
|
211 |
apply(rule alpha_gen_eqvt) |
|
212 |
apply(assumption) |
|
213 |
apply(simp_all add: supp_eqvt) |
|
214 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
215 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
216 |
lemma [quot_respect]: |
1014 | 217 |
shows "(alpha_abs ===> (op =)) supp_abs_fun supp_abs_fun" |
218 |
apply(simp add: supp_abs_fun_lemma) |
|
219 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
220 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
221 |
lemma abs_induct: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
222 |
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t" |
1014 | 223 |
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"]) |
224 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
225 |
|
1089 | 226 |
(* TEST case *) |
227 |
lemmas abs_induct2 = prod.induct[where 'a="atom set" and 'b="'a::pt", quot_lifted] |
|
228 |
thm abs_induct abs_induct2 |
|
229 |
||
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
230 |
instantiation abs :: (pt) pt |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
231 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
232 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
233 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
234 |
"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
|
235 |
is |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
236 |
"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
|
237 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
238 |
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
|
239 |
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
|
240 |
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)" |
1014 | 241 |
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
|
242 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
243 |
instance |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
244 |
apply(default) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
245 |
apply(induct_tac [!] x rule: abs_induct) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
246 |
apply(simp_all) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
247 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
248 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
249 |
end |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
250 |
|
1014 | 251 |
quotient_definition |
252 |
"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
|
253 |
is |
1014 | 254 |
"supp_abs_fun" |
255 |
||
256 |
lemma supp_Abs_fun_simp: |
|
257 |
shows "supp_Abs_fun (Abs bs x) = (supp x) - bs" |
|
258 |
by (lifting supp_abs_fun.simps(1)) |
|
259 |
||
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 |
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
|
261 |
shows "(p \<bullet> supp_Abs_fun x) = supp_Abs_fun (p \<bullet> x)" |
1014 | 262 |
apply(induct_tac x rule: abs_induct) |
263 |
apply(simp add: supp_Abs_fun_simp supp_eqvt Diff_eqvt) |
|
264 |
done |
|
265 |
||
266 |
lemma supp_Abs_fun_fresh: |
|
267 |
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_Abs_fun (Abs bs x)" |
|
268 |
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
|
269 |
apply(simp add: eqvts_raw) |
1014 | 270 |
apply(simp) |
271 |
done |
|
272 |
||
273 |
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
|
274 |
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
|
275 |
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
|
276 |
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))" |
1014 | 277 |
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
|
278 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
279 |
lemma Abs_supports: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
280 |
shows "((supp x) - as) supports (Abs as x)" |
1014 | 281 |
unfolding supports_def |
282 |
apply(clarify) |
|
283 |
apply(simp (no_asm)) |
|
284 |
apply(subst Abs_swap[symmetric]) |
|
285 |
apply(simp_all) |
|
286 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
287 |
|
1014 | 288 |
lemma supp_Abs_subset1: |
289 |
fixes x::"'a::fs" |
|
290 |
shows "(supp x) - as \<subseteq> supp (Abs as x)" |
|
291 |
apply(simp add: supp_conv_fresh) |
|
292 |
apply(auto) |
|
293 |
apply(drule_tac supp_Abs_fun_fresh) |
|
294 |
apply(simp only: supp_Abs_fun_simp) |
|
295 |
apply(simp add: fresh_def) |
|
296 |
apply(simp add: supp_finite_atom_set finite_supp) |
|
297 |
done |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
298 |
|
1014 | 299 |
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
|
300 |
fixes x::"'a::fs" |
1014 | 301 |
shows "supp (Abs as x) \<subseteq> (supp x) - as" |
302 |
apply(rule supp_is_subset) |
|
303 |
apply(rule Abs_supports) |
|
304 |
apply(simp add: finite_supp) |
|
305 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
306 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
307 |
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
|
308 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
309 |
shows "supp (Abs as x) = (supp x) - as" |
1014 | 310 |
apply(rule_tac subset_antisym) |
311 |
apply(rule supp_Abs_subset2) |
|
312 |
apply(rule supp_Abs_subset1) |
|
313 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
314 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
315 |
instance abs :: (fs) fs |
1014 | 316 |
apply(default) |
317 |
apply(induct_tac x rule: abs_induct) |
|
318 |
apply(simp add: supp_Abs) |
|
319 |
apply(simp add: finite_supp) |
|
320 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
321 |
|
1014 | 322 |
lemma Abs_fresh_iff: |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
323 |
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
|
324 |
shows "a \<sharp> Abs bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)" |
1014 | 325 |
apply(simp add: fresh_def) |
326 |
apply(simp add: supp_Abs) |
|
327 |
apply(auto) |
|
328 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
329 |
|
1014 | 330 |
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
|
331 |
shows "Abs bs x = Abs cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))" |
1014 | 332 |
by (lifting alpha_abs.simps(1)) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
333 |
|
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
|
334 |
|
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 |
|
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
|
336 |
(* |
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
parents:
1014
diff
changeset
|
337 |
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
|
338 |
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
|
339 |
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
|
340 |
*) |
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
|
341 |
|
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
|
342 |
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
|
343 |
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
|
344 |
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
|
345 |
"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
|
346 |
|
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
|
347 |
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
|
348 |
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
|
349 |
|
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
|
350 |
thm swap_set_not_in |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
351 |
|
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 |
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
|
353 |
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
|
354 |
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
|
355 |
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
|
356 |
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
|
357 |
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
|
358 |
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
|
359 |
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
|
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 (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
|
362 |
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
|
363 |
apply(simp) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
364 |
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
|
365 |
apply(simp) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
366 |
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
|
367 |
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
|
368 |
|
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
|
369 |
lemma alpha_abs_swap: |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
370 |
assumes a1: "(supp x - bs) \<sharp>* p" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
371 |
and a2: "(supp x - bs) \<sharp>* p" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
372 |
shows "(bs, x) \<approx>abs (p \<bullet> bs, p \<bullet> x)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
373 |
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
|
374 |
apply(rule_tac x="p" in exI) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
375 |
apply(simp add: alpha_gen) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
376 |
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric]) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
377 |
apply(rule conjI) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
378 |
apply(rule sym) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
379 |
apply(rule qq) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
380 |
using a1 a2 |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
381 |
apply(auto)[1] |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
382 |
oops |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
383 |
|
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
|
384 |
|
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
|
385 |
|
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
|
386 |
lemma |
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
parents:
1014
diff
changeset
|
387 |
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
|
388 |
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
|
389 |
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
|
390 |
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
|
391 |
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
|
392 |
apply(simp) |
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
parents:
1014
diff
changeset
|
393 |
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
|
394 |
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
|
395 |
apply(simp) |
683483199a5d
added a single-binder alpha equivalence; showed one half of the equivalence proof between general and single binder case
Christian Urban <urbanc@in.tum.de>
parents:
1014
diff
changeset
|
396 |
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
|
397 |
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
|
398 |
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
|
399 |
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
|
400 |
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
|
401 |
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
|
402 |
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
|
403 |
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
|
404 |
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
|
405 |
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
|
406 |
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
|
407 |
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
|
408 |
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
|
409 |
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
|
410 |
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
|
411 |
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
|
412 |
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
|
413 |
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
|
414 |
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
|
415 |
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
|
416 |
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
|
417 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
418 |
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
|
419 |
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
|
420 |
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
|
421 |
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
|
422 |
by (simp add: expand_perm_eq) |
1327
670701b19e8e
added ACM style file for ICFP
Christian Urban <urbanc@in.tum.de>
parents:
1312
diff
changeset
|
423 |
|
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 |
fun |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
425 |
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
|
426 |
where |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
427 |
"add_perm [] = 0" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
428 |
| "add_perm ((a,b) # xs) = (a \<rightleftharpoons> b) + add_perm xs" |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
429 |
|
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
430 |
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
|
431 |
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
|
432 |
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
|
433 |
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
|
434 |
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
|
435 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
436 |
lemma |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
437 |
fixes p::perm |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
438 |
shows "\<exists>xs. p = add_perm xs" |
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(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
|
440 |
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
|
441 |
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
|
442 |
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
|
443 |
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
|
444 |
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
|
445 |
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
|
446 |
apply(rule_tac 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
|
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(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
|
449 |
defer |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
450 |
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
|
451 |
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
|
452 |
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
|
453 |
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
|
454 |
defer |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
455 |
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
|
456 |
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
|
457 |
apply(simp add: 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
|
458 |
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
|
459 |
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
|
460 |
apply(simp add: expand_perm_eq) |
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(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
|
462 |
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
|
463 |
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
|
464 |
defer |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
465 |
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
|
466 |
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
|
467 |
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
|
468 |
apply(auto 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
|
469 |
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
|
470 |
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
|
471 |
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
|
472 |
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
|
473 |
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
|
474 |
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
|
475 |
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
|
476 |
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
|
477 |
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
|
478 |
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
|
479 |
|
1194
3d54fcc5f41a
start work with the parser
Christian Urban <urbanc@in.tum.de>
parents:
1139
diff
changeset
|
480 |
lemma tt1: |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
481 |
shows "(supp x) \<sharp>* add_perm xs \<Longrightarrow> (add_perm xs) \<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
|
482 |
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
|
483 |
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
|
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(case_tac "a = b") |
1194
3d54fcc5f41a
start work with the parser
Christian Urban <urbanc@in.tum.de>
parents:
1139
diff
changeset
|
486 |
apply(simp) |
3d54fcc5f41a
start work with the parser
Christian Urban <urbanc@in.tum.de>
parents:
1139
diff
changeset
|
487 |
apply(drule meta_mp) |
3d54fcc5f41a
start work with the parser
Christian Urban <urbanc@in.tum.de>
parents:
1139
diff
changeset
|
488 |
defer |
3d54fcc5f41a
start work with the parser
Christian Urban <urbanc@in.tum.de>
parents:
1139
diff
changeset
|
489 |
apply(simp) |
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
490 |
apply(rule swap_fresh_fresh) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
491 |
apply(simp add: fresh_def) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
492 |
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
|
493 |
apply(simp add: fresh_star_def fresh_def 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
|
494 |
apply(drule_tac x="a" in bspec) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
495 |
apply(simp) |
1194
3d54fcc5f41a
start work with the parser
Christian Urban <urbanc@in.tum.de>
parents:
1139
diff
changeset
|
496 |
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
|
497 |
|
1350
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
498 |
|
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
499 |
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
|
500 |
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
|
501 |
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
|
502 |
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
|
503 |
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
|
504 |
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
|
505 |
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
|
506 |
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
|
507 |
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
|
508 |
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
|
509 |
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
|
510 |
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
|
511 |
apply(rotate_tac 3) |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
512 |
sorry |
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
513 |
|
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
514 |
|
5b31e49678fc
added a lemma that permutations can be represented as sums of swapping
Christian Urban <urbanc@in.tum.de>
parents:
1327
diff
changeset
|
515 |
|
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
|
516 |
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
|
517 |
"(supp x) \<sharp>* p \<Longrightarrow> p \<bullet> x = x" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
518 |
apply(induct p rule: perm_induct_test) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
519 |
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
|
520 |
apply(rule swap_fresh_fresh) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
521 |
apply(case_tac "a \<in> supp x") |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
522 |
apply(simp add: fresh_star_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
523 |
apply(drule_tac x="a" in bspec) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
524 |
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
|
525 |
apply(simp add: fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
526 |
apply(simp add: supp_swap) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
527 |
apply(simp add: fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
528 |
apply(case_tac "b \<in> supp x") |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
529 |
apply(simp add: fresh_star_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
530 |
apply(drule_tac x="b" in bspec) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
531 |
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
|
532 |
apply(simp add: fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
533 |
apply(simp add: supp_swap) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
534 |
apply(simp add: fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
535 |
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
|
536 |
apply(drule meta_mp) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
537 |
apply(simp add: fresh_star_def fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
538 |
apply(drule meta_mp) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
539 |
apply(simp add: fresh_star_def fresh_def) |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
540 |
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
|
541 |
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
|
542 |
|
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 |
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
|
544 |
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
|
545 |
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
|
546 |
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
|
547 |
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
|
548 |
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
|
549 |
|
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
|
550 |
|
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
|
551 |
lemma |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
552 |
assumes a: "({a}, x) \<approx>abs ({b}, y)" "sort_of a = sort_of b" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
553 |
shows "(a, x) \<approx>abs1 (b, y)" |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
554 |
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
|
555 |
apply(case_tac "a = b") |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
556 |
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
|
557 |
oops |
8441b4b2469d
a few more attempts to show the equivalence between old and new way of defining alpha-equivalence
Christian Urban <urbanc@in.tum.de>
parents:
1089
diff
changeset
|
558 |
|
1300 | 559 |
*) |
1312
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
560 |
|
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
561 |
fun |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
562 |
distinct_perms |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
563 |
where |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
564 |
"distinct_perms [] = True" |
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
565 |
| "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
|
566 |
|
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
567 |
|
b0eae8c93314
added some more examples from Peter Sewell's bestiary
Christian Urban <urbanc@in.tum.de>
parents:
1307
diff
changeset
|
568 |
|
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
|
569 |
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
|
570 |