author | Christian Urban <urbanc@in.tum.de> |
Mon, 01 Feb 2010 13:00:01 +0100 | |
changeset 1007 | b4f956137114 |
parent 1006 | ef34da709a0b |
child 1014 | 272ea46a1766 |
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 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
12 |
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
|
13 |
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
|
14 |
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
|
15 |
apply(auto) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
16 |
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
|
17 |
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
|
18 |
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
|
19 |
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
|
20 |
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
|
21 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
22 |
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
|
23 |
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
|
24 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
25 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
26 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
27 |
|
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
29 |
fun |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
30 |
alpha_gen |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
31 |
where |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
32 |
alpha_gen[simp del]: |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
33 |
"(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
|
34 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
35 |
notation |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
36 |
alpha_gen ("_ \<approx>gen _ _ _ _") |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
37 |
|
1005
9d5d9e7ff71b
Monotonicity of ~~gen, needed for using it in inductive definitions.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
995
diff
changeset
|
38 |
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
|
39 |
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
|
40 |
|
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
41 |
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
|
42 |
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
|
43 |
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
|
44 |
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
|
45 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
46 |
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
|
47 |
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
|
48 |
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
|
49 |
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
|
50 |
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
|
51 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
52 |
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
|
53 |
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
|
54 |
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
|
55 |
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
|
56 |
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
|
57 |
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
|
58 |
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
|
59 |
apply(blast) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
60 |
done |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
61 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
62 |
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
|
63 |
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
|
64 |
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
|
65 |
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
|
66 |
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
|
67 |
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
|
68 |
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
|
69 |
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
|
70 |
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
|
71 |
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
|
72 |
apply(clarsimp) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
73 |
done |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
74 |
|
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
75 |
fun |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
76 |
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
|
77 |
where |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
78 |
"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
|
79 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
80 |
notation |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
81 |
alpha_abs ("_ \<approx>abs _") |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
82 |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
83 |
lemma test1: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
84 |
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
|
85 |
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
|
86 |
shows "(bs, x) \<approx>abs ((a \<rightleftharpoons> b) \<bullet> bs, (a \<rightleftharpoons> b) \<bullet> x)" |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
87 |
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
|
88 |
apply(rule_tac x="(a \<rightleftharpoons> b)" in exI) |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
89 |
apply(simp add: alpha_gen) |
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
90 |
apply(simp add: supp_eqvt[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
|
91 |
apply(simp add: swap_set_fresh[OF a1 a2]) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
92 |
apply(subgoal_tac "supp (a \<rightleftharpoons> b) \<subseteq> {a, b}") |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
93 |
using a1 a2 |
995
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: fresh_star_def fresh_def) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
95 |
apply(blast) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
96 |
apply(simp add: supp_swap) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
97 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
98 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
99 |
fun |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
100 |
s_test |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
101 |
where |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
102 |
"s_test (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
|
103 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
104 |
lemma s_test_lemma: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
105 |
assumes a: "x \<approx>abs y" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
106 |
shows "s_test x = s_test y" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
107 |
using a |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
108 |
apply(induct rule: alpha_abs.induct) |
995
ee0619b5adff
introduced a generic alpha (but not sure whether it is helpful)
Christian Urban <urbanc@in.tum.de>
parents:
989
diff
changeset
|
109 |
apply(simp add: alpha_gen) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
110 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
111 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
112 |
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
|
113 |
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
|
114 |
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
|
115 |
apply(simp_all) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
116 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
117 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
118 |
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
|
119 |
apply(simp) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
120 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
121 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
122 |
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
|
123 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
124 |
apply(clarsimp) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
125 |
apply(clarify) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
126 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
127 |
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
|
128 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
129 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
130 |
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
|
131 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
132 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
133 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
134 |
"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
|
135 |
as |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
136 |
"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
|
137 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
138 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
139 |
shows "((op =) ===> (op =) ===> alpha_abs) Pair Pair" |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
140 |
apply(clarsimp) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
141 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
142 |
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
|
143 |
apply(simp) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
144 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
145 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
146 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
147 |
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute" |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
148 |
apply(clarsimp) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
149 |
apply(rule exI) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
150 |
apply(rule alpha_gen_eqvt) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
151 |
apply(assumption) |
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
152 |
apply(simp_all add: supp_eqvt) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
153 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
154 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
155 |
lemma [quot_respect]: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
156 |
shows "(alpha_abs ===> (op =)) s_test s_test" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
157 |
apply(simp add: s_test_lemma) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
158 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
159 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
160 |
lemma abs_induct: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
161 |
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t" |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
162 |
apply(lifting prod.induct[where 'a="atom set" and 'b="'a"]) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
163 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
164 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
165 |
instantiation abs :: (pt) pt |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
166 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
167 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
168 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
169 |
"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
|
170 |
as |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
171 |
"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
|
172 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
173 |
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
|
174 |
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
|
175 |
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)" |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
176 |
apply(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
|
177 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
178 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
179 |
instance |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
180 |
apply(default) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
181 |
apply(induct_tac [!] x rule: abs_induct) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
182 |
apply(simp_all) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
183 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
184 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
185 |
end |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
186 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
187 |
lemma test1_lifted: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
188 |
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
|
189 |
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
|
190 |
shows "(Abs bs x) = (Abs ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x))" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
191 |
using a1 a2 |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
192 |
apply(lifting test1) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
193 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
194 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
195 |
lemma Abs_supports: |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
196 |
shows "((supp x) - as) supports (Abs as x)" |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
197 |
unfolding supports_def |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
198 |
apply(clarify) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
199 |
apply(simp (no_asm)) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
200 |
apply(subst test1_lifted[symmetric]) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
201 |
apply(simp_all) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
202 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
203 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
204 |
quotient_definition |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
205 |
"s_test_lifted :: ('a::pt) abs \<Rightarrow> atom \<Rightarrow> bool" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
206 |
as |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
207 |
"s_test" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
208 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
209 |
lemma s_test_lifted_simp: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
210 |
shows "s_test_lifted (Abs 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
|
211 |
apply(lifting s_test.simps(1)) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
212 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
213 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
214 |
lemma s_test_lifted_eqvt: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
215 |
shows "(p \<bullet> (s_test_lifted ab)) = s_test_lifted (p \<bullet> ab)" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
216 |
apply(induct ab rule: abs_induct) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
217 |
apply(simp add: s_test_lifted_simp supp_eqvt Diff_eqvt) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
218 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
219 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
220 |
lemma fresh_f_empty_supp: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
221 |
assumes a: "\<forall>p. p \<bullet> f = f" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
222 |
shows "a \<sharp> x \<Longrightarrow> a \<sharp> (f x)" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
223 |
apply(simp add: fresh_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
224 |
apply(simp add: supp_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
225 |
apply(simp add: permute_fun_app_eq) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
226 |
apply(simp add: a) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
227 |
apply(rule finite_subset) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
228 |
prefer 2 |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
229 |
apply(assumption) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
230 |
apply(auto) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
231 |
done |
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 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
234 |
lemma s_test_fresh_lemma: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
235 |
shows "(a \<sharp> Abs bs x) \<Longrightarrow> (a \<sharp> s_test_lifted (Abs bs x))" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
236 |
apply(rule fresh_f_empty_supp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
237 |
apply(rule allI) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
238 |
apply(subst permute_fun_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
239 |
apply(simp add: s_test_lifted_eqvt) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
240 |
apply(simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
241 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
242 |
|
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
243 |
|
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
244 |
lemma supp_finite_set: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
245 |
fixes S::"atom set" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
246 |
assumes "finite S" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
247 |
shows "supp S = S" |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
248 |
apply(rule finite_supp_unique) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
249 |
apply(simp add: supports_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
250 |
apply(auto simp add: permute_set_eq swap_atom)[1] |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
251 |
apply(metis) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
252 |
apply(rule assms) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
253 |
apply(auto simp add: permute_set_eq swap_atom)[1] |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
254 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
255 |
|
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
256 |
lemma s_test_subset: |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
257 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
258 |
shows "((supp x) - as) \<subseteq> (supp (Abs as x))" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
259 |
apply(rule subsetI) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
260 |
apply(rule contrapos_pp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
261 |
apply(assumption) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
262 |
unfolding fresh_def[symmetric] |
1006
ef34da709a0b
got rid of RAbst type - is now just pairs
Christian Urban <urbanc@in.tum.de>
parents:
1005
diff
changeset
|
263 |
thm s_test_fresh_lemma |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
264 |
apply(drule_tac s_test_fresh_lemma) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
265 |
apply(simp only: s_test_lifted_simp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
266 |
apply(simp add: fresh_def) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
267 |
apply(subgoal_tac "finite (supp x - as)") |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
268 |
apply(simp add: supp_finite_set) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
269 |
apply(simp add: finite_supp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
270 |
done |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
271 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
272 |
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
|
273 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
274 |
shows "supp (Abs as x) = (supp x) - as" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
275 |
apply(rule subset_antisym) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
276 |
apply(rule supp_is_subset) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
277 |
apply(rule Abs_supports) |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
278 |
apply(simp add: finite_supp) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
279 |
apply(rule s_test_subset) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
280 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
281 |
|
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
282 |
instance abs :: (fs) fs |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
283 |
apply(default) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
284 |
apply(induct_tac x rule: abs_induct) |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
285 |
apply(simp add: 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
|
286 |
apply(simp add: finite_supp) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
287 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
288 |
|
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
|
289 |
lemma fresh_abs: |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
290 |
fixes x::"'a::fs" |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
291 |
shows "a \<sharp> Abs bs x = (a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x))" |
986
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
292 |
apply(simp add: fresh_def) |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
293 |
apply(simp add: 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
|
294 |
apply(auto) |
98375dde48fc
general abstraction operator and complete characterisation of its support and freshness
Christian Urban <urbanc@in.tum.de>
parents:
984
diff
changeset
|
295 |
done |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
296 |
|
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
|
297 |
lemma abs_eq: |
1007
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
298 |
shows "(Abs bs x) = (Abs cs y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>gen (op =) supp p (cs, y))" |
b4f956137114
renamed Abst/abst to Abs/abs
Christian Urban <urbanc@in.tum.de>
parents:
1006
diff
changeset
|
299 |
apply(lifting alpha_abs.simps(1)) |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
300 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
301 |
|
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
|
302 |
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
|
303 |