author | Christian Urban <urbanc@in.tum.de> |
Wed, 03 Feb 2010 12:31:58 +0100 | |
changeset 1039 | 0d832c36b1bb |
parent 1034 | c1af17982f98 |
child 1063 | b93b631570ca |
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 |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
2 |
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "../QuotMain" "../QuotProd" |
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 |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
5 |
(* lemmas that should be in Nominal \<dots>\<dots>must be cleaned *) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
6 |
lemma in_permute_iff: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
7 |
shows "(p \<bullet> x) \<in> (p \<bullet> X) \<longleftrightarrow> x \<in> X" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
8 |
apply(unfold mem_def permute_fun_def)[1] |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
9 |
apply(simp add: permute_bool_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
10 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
11 |
|
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
12 |
lemma fresh_plus: |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
13 |
fixes p q::perm |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
14 |
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
|
15 |
unfolding fresh_def |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
16 |
using supp_plus_perm |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
17 |
by(auto) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
18 |
|
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
19 |
lemma fresh_star_plus: |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
20 |
fixes p q::perm |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
21 |
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
|
22 |
unfolding fresh_star_def |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
23 |
by (simp add: fresh_plus) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
24 |
|
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
25 |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
26 |
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
|
27 |
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
|
28 |
apply(simp add: fresh_star_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
29 |
apply(auto) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
30 |
apply(drule_tac x="p \<bullet> xa" in bspec) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
31 |
apply(unfold mem_def permute_fun_def)[1] |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
32 |
apply(simp add: eqvts) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
33 |
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
|
34 |
apply(rule_tac ?p1="- p" in fresh_permute_iff[THEN iffD1]) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
35 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
36 |
apply(drule_tac x="- p \<bullet> xa" in bspec) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
37 |
apply(rule_tac ?p1="p" in in_permute_iff[THEN iffD1]) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
38 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
39 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
40 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
41 |
|
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
42 |
lemma fresh_minus_perm: |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
43 |
fixes p::perm |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
44 |
shows "a \<sharp> (- p) \<longleftrightarrow> a \<sharp> p" |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
45 |
apply(simp add: fresh_def) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
46 |
apply(simp only: supp_minus_perm) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
47 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
48 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
49 |
fun |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
50 |
alpha_gen |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
51 |
where |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
52 |
alpha_gen[simp del]: |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
53 |
"(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
|
54 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
55 |
notation |
1026
278253330b6a
Disambiguating the syntax.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1024
diff
changeset
|
56 |
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
|
57 |
|
1005
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
995
diff
changeset
|
58 |
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
|
59 |
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
|
60 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
61 |
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
|
62 |
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
|
63 |
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
|
64 |
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
|
65 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
66 |
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
|
67 |
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
|
68 |
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
|
69 |
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
|
70 |
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
|
71 |
|
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
72 |
lemma alpha_gen_atom_sym: |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
73 |
assumes a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
1026
278253330b6a
Disambiguating the syntax.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1024
diff
changeset
|
74 |
shows "\<exists>pi. ({atom a}, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R x2 x1) f pi ({atom b}, s) \<Longrightarrow> |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
75 |
\<exists>pi. ({atom b}, s) \<approx>gen R f pi ({atom a}, t)" |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
76 |
apply(erule exE) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
77 |
apply(rule_tac x="- pi" in exI) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
78 |
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
|
79 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
80 |
apply(rule conjI) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
81 |
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
|
82 |
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
|
83 |
apply simp |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
84 |
apply(rule a) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
85 |
apply assumption |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
86 |
done |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
87 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
88 |
lemma alpha_gen_trans: |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
89 |
assumes a: "(bs, x) \<approx>gen R f p1 (cs, y)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
90 |
and b: "(cs, y) \<approx>gen R f p2 (ds, z)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
91 |
and c: "\<lbrakk>R (p1 \<bullet> x) y; R (p2 \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((p2 + p1) \<bullet> x) z" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
92 |
shows "(bs, x) \<approx>gen R f (p2 + p1) (ds, z)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
93 |
using a b c using supp_plus_perm |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
94 |
apply(simp add: alpha_gen fresh_star_def fresh_def) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
95 |
apply(blast) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
96 |
done |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
97 |
|
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
98 |
lemma alpha_gen_atom_trans: |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
99 |
assumes a: "\<And>pi t s. (R t s \<Longrightarrow> R (pi \<bullet> t) (pi \<bullet> s))" |
1026
278253330b6a
Disambiguating the syntax.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1024
diff
changeset
|
100 |
shows "\<lbrakk>\<exists>pi\<Colon>perm. ({atom a}, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> (\<forall>x. R x2 x \<longrightarrow> R x1 x)) f pi ({atom aa}, ta); |
1021
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
101 |
\<exists>pi\<Colon>perm. ({atom aa}, ta) \<approx>gen R f pi ({atom ba}, sa)\<rbrakk> |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
102 |
\<Longrightarrow> \<exists>pi\<Colon>perm. ({atom a}, t) \<approx>gen R f pi ({atom ba}, sa)" |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
103 |
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
|
104 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
105 |
apply(erule exE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
106 |
apply(erule conjE)+ |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
107 |
apply(rule_tac x="pia + pi" in exI) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
108 |
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
|
109 |
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
|
110 |
apply(drule mp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
111 |
apply(rotate_tac 4) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
112 |
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
|
113 |
apply(simp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
114 |
apply(rotate_tac 6) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
115 |
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
|
116 |
apply(simp) |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
117 |
done |
bacf3584640e
General alpha_gen_trans for one-variable abstraction.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1015
diff
changeset
|
118 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
119 |
lemma alpha_gen_eqvt: |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
120 |
assumes a: "(bs, x) \<approx>gen R f q (cs, y)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
121 |
and b: "R (q \<bullet> x) y \<Longrightarrow> R (p \<bullet> (q \<bullet> x)) (p \<bullet> y)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
122 |
and c: "p \<bullet> (f x) = f (p \<bullet> x)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
123 |
and d: "p \<bullet> (f y) = f (p \<bullet> y)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
124 |
shows "(p \<bullet> bs, p \<bullet> x) \<approx>gen R f (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)" |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
125 |
using a b |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
126 |
apply(simp add: alpha_gen c[symmetric] d[symmetric] Diff_eqvt[symmetric]) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
127 |
apply(simp add: permute_eqvt[symmetric]) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
128 |
apply(simp add: fresh_star_permute_iff) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
129 |
apply(clarsimp) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
130 |
done |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
131 |
|
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
132 |
lemma alpha_gen_atom_eqvt: |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
133 |
assumes a: "\<And>x. pi \<bullet> (f x) = f (pi \<bullet> x)" |
1026
278253330b6a
Disambiguating the syntax.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1024
diff
changeset
|
134 |
and b: "\<exists>pia. ({atom a}, t) \<approx>gen (\<lambda>x1 x2. R x1 x2 \<and> R (pi \<bullet> x1) (pi \<bullet> x2)) f pia ({atom b}, s)" |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
135 |
shows "\<exists>pia. ({atom (pi \<bullet> a)}, pi \<bullet> t) \<approx>gen R f pia ({atom (pi \<bullet> b)}, pi \<bullet> s)" |
1039
0d832c36b1bb
fixed proofs in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1034
diff
changeset
|
136 |
using b |
0d832c36b1bb
fixed proofs in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1034
diff
changeset
|
137 |
apply - |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
138 |
apply(erule exE) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
139 |
apply(rule_tac x="pi \<bullet> pia" in exI) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
140 |
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
|
141 |
apply(erule conjE)+ |
1034 | 142 |
apply(rule conjI) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
143 |
apply(rule_tac ?p1="- pi" in permute_eq_iff[THEN iffD1]) |
1039
0d832c36b1bb
fixed proofs in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1034
diff
changeset
|
144 |
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
145 |
apply(rule conjI) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
146 |
apply(rule_tac ?p1="- pi" in fresh_star_permute_iff[THEN iffD1]) |
1039
0d832c36b1bb
fixed proofs in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
1034
diff
changeset
|
147 |
apply(simp add: a[symmetric] atom_eqvt Diff_eqvt insert_eqvt set_eqvt empty_eqvt) |
1024
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
148 |
apply(subst permute_eqvt[symmetric]) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
149 |
apply(simp) |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
150 |
done |
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
151 |
|
b3deb964ad26
Some equivariance machinery that comes useful in LF.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1021
diff
changeset
|
152 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
153 |
fun |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
154 |
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
|
155 |
where |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
156 |
"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
|
157 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
158 |
notation |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
159 |
alpha_abs ("_ \<approx>abs _") |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
160 |
|
1014 | 161 |
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
|
162 |
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
|
163 |
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
|
164 |
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)" |
1014 | 165 |
apply(simp) |
166 |
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI) |
|
167 |
apply(simp add: alpha_gen) |
|
168 |
apply(simp add: supp_eqvt[symmetric] Diff_eqvt[symmetric]) |
|
169 |
apply(simp add: swap_set_not_in[OF a1 a2]) |
|
170 |
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}") |
|
171 |
using a1 a2 |
|
172 |
apply(simp add: fresh_star_def fresh_def) |
|
173 |
apply(blast) |
|
174 |
apply(simp add: supp_swap) |
|
175 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
176 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
177 |
fun |
1014 | 178 |
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
|
179 |
where |
1014 | 180 |
"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
|
181 |
|
1014 | 182 |
lemma supp_abs_fun_lemma: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
183 |
assumes a: "x \<approx>abs y" |
1014 | 184 |
shows "supp_abs_fun x = supp_abs_fun y" |
185 |
using a |
|
186 |
apply(induct rule: alpha_abs.induct) |
|
187 |
apply(simp add: alpha_gen) |
|
188 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
189 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
190 |
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
|
191 |
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
|
192 |
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
|
193 |
apply(simp_all) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
194 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
195 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
196 |
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
|
197 |
apply(simp) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
198 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
199 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
200 |
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
|
201 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
202 |
apply(clarsimp) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
203 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
204 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
205 |
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
|
206 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
207 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
208 |
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
|
209 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
210 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
211 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
212 |
"Abs::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs" |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
213 |
as |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
214 |
"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
|
215 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
216 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
217 |
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair" |
1014 | 218 |
apply(clarsimp) |
219 |
apply(rule exI) |
|
220 |
apply(rule alpha_gen_refl) |
|
221 |
apply(simp) |
|
222 |
done |
|
984
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 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
225 |
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute" |
1014 | 226 |
apply(clarsimp) |
227 |
apply(rule exI) |
|
228 |
apply(rule alpha_gen_eqvt) |
|
229 |
apply(assumption) |
|
230 |
apply(simp_all add: supp_eqvt) |
|
231 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
232 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
233 |
lemma [quot_respect]: |
1014 | 234 |
shows "(alpha_abs ===> (op =)) supp_abs_fun supp_abs_fun" |
235 |
apply(simp add: supp_abs_fun_lemma) |
|
236 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
237 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
238 |
lemma abs_induct: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
239 |
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t" |
1014 | 240 |
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"]) |
241 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
242 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
243 |
instantiation abs :: (pt) pt |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
244 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
245 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
246 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
247 |
"permute_abs::perm \<Rightarrow> ('a::pt abs) \<Rightarrow> 'a abs" |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
248 |
as |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
249 |
"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
|
250 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
251 |
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
|
252 |
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
|
253 |
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)" |
1014 | 254 |
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
|
255 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
256 |
instance |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
257 |
apply(default) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
258 |
apply(induct_tac [!] x rule: abs_induct) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
259 |
apply(simp_all) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
260 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
261 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
262 |
end |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
263 |
|
1014 | 264 |
quotient_definition |
265 |
"supp_Abs_fun :: ('a::pt) abs \<Rightarrow> atom \<Rightarrow> bool" |
|
266 |
as |
|
267 |
"supp_abs_fun" |
|
268 |
||
269 |
lemma supp_Abs_fun_simp: |
|
270 |
shows "supp_Abs_fun (Abs bs x) = (supp x) - bs" |
|
271 |
by (lifting supp_abs_fun.simps(1)) |
|
272 |
||
273 |
lemma supp_Abs_fun_eqvt: |
|
274 |
shows "(p \<bullet> supp_Abs_fun) = supp_Abs_fun" |
|
275 |
apply(subst permute_fun_def) |
|
276 |
apply(subst expand_fun_eq) |
|
277 |
apply(rule allI) |
|
278 |
apply(induct_tac x rule: abs_induct) |
|
279 |
apply(simp add: supp_Abs_fun_simp supp_eqvt Diff_eqvt) |
|
280 |
done |
|
281 |
||
282 |
lemma supp_Abs_fun_fresh: |
|
283 |
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_Abs_fun (Abs bs x)" |
|
284 |
apply(rule fresh_fun_eqvt_app) |
|
285 |
apply(simp add: supp_Abs_fun_eqvt) |
|
286 |
apply(simp) |
|
287 |
done |
|
288 |
||
289 |
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
|
290 |
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
|
291 |
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
|
292 |
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))" |
1014 | 293 |
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
|
294 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
295 |
lemma Abs_supports: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
296 |
shows "((supp x) - as) supports (Abs as x)" |
1014 | 297 |
unfolding supports_def |
298 |
apply(clarify) |
|
299 |
apply(simp (no_asm)) |
|
300 |
apply(subst Abs_swap[symmetric]) |
|
301 |
apply(simp_all) |
|
302 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
303 |
|
1014 | 304 |
lemma supp_Abs_subset1: |
305 |
fixes x::"'a::fs" |
|
306 |
shows "(supp x) - as \<subseteq> supp (Abs as x)" |
|
307 |
apply(simp add: supp_conv_fresh) |
|
308 |
apply(auto) |
|
309 |
apply(drule_tac supp_Abs_fun_fresh) |
|
310 |
apply(simp only: supp_Abs_fun_simp) |
|
311 |
apply(simp add: fresh_def) |
|
312 |
apply(simp add: supp_finite_atom_set finite_supp) |
|
313 |
done |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
314 |
|
1014 | 315 |
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
|
316 |
fixes x::"'a::fs" |
1014 | 317 |
shows "supp (Abs as x) \<subseteq> (supp x) - as" |
318 |
apply(rule supp_is_subset) |
|
319 |
apply(rule Abs_supports) |
|
320 |
apply(simp add: finite_supp) |
|
321 |
done |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
322 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
323 |
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
|
324 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
325 |
shows "supp (Abs as x) = (supp x) - as" |
1014 | 326 |
apply(rule_tac subset_antisym) |
327 |
apply(rule supp_Abs_subset2) |
|
328 |
apply(rule supp_Abs_subset1) |
|
329 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
330 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
331 |
instance abs :: (fs) fs |
1014 | 332 |
apply(default) |
333 |
apply(induct_tac x rule: abs_induct) |
|
334 |
apply(simp add: supp_Abs) |
|
335 |
apply(simp add: finite_supp) |
|
336 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
337 |
|
1014 | 338 |
lemma Abs_fresh_iff: |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
339 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
340 |
shows "a \<sharp> Abs bs x = (a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x))" |
1014 | 341 |
apply(simp add: fresh_def) |
342 |
apply(simp add: supp_Abs) |
|
343 |
apply(auto) |
|
344 |
done |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
345 |
|
1014 | 346 |
lemma Abs_eq_iff: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
347 |
shows "(Abs bs x) = (Abs cs y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))" |
1014 | 348 |
by (lifting alpha_abs.simps(1)) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
349 |
|
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
|
350 |
|
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
|
351 |
|
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
|
352 |
(* |
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
|
353 |
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
|
354 |
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
|
355 |
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
|
356 |
*) |
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
|
357 |
|
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
|
358 |
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
|
359 |
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
|
360 |
where |
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
|
361 |
"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))" |
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
|
362 |
|
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
|
363 |
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
|
364 |
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
|
365 |
|
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
|
366 |
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
|
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 |
|
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 |
|
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
|
399 |
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
|
400 |