author | Christian Urban <urbanc@in.tum.de> |
Tue, 18 Jan 2011 06:55:18 +0100 | |
changeset 2668 | 92c001d93225 |
parent 2663 | 54aade5d0fe6 |
child 2669 | 1d1772a89026 |
permissions | -rw-r--r-- |
2568
8193bbaa07fe
merged Nominal-General directory into Nominal; renamed Abs.thy to Nominal2_Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2559
diff
changeset
|
1 |
theory Nominal2_Abs |
8193bbaa07fe
merged Nominal-General directory into Nominal; renamed Abs.thy to Nominal2_Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2559
diff
changeset
|
2 |
imports "Nominal2_Base" |
8193bbaa07fe
merged Nominal-General directory into Nominal; renamed Abs.thy to Nominal2_Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2559
diff
changeset
|
3 |
"Nominal2_Eqvt" |
2635
64b4cb2c2bf8
simple cases for string rule inductions
Christian Urban <urbanc@in.tum.de>
parents:
2616
diff
changeset
|
4 |
"~~/src/HOL/Quotient" |
64b4cb2c2bf8
simple cases for string rule inductions
Christian Urban <urbanc@in.tum.de>
parents:
2616
diff
changeset
|
5 |
"~~/src/HOL/Library/Quotient_List" |
64b4cb2c2bf8
simple cases for string rule inductions
Christian Urban <urbanc@in.tum.de>
parents:
2616
diff
changeset
|
6 |
"~~/src/HOL/Library/Quotient_Product" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
begin |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
|
2473
a3711f07449b
added the definition supp_rel (support w.r.t. a relation)
Christian Urban <urbanc@in.tum.de>
parents:
2471
diff
changeset
|
9 |
|
a3711f07449b
added the definition supp_rel (support w.r.t. a relation)
Christian Urban <urbanc@in.tum.de>
parents:
2471
diff
changeset
|
10 |
section {* Abstractions *} |
a3711f07449b
added the definition supp_rel (support w.r.t. a relation)
Christian Urban <urbanc@in.tum.de>
parents:
2471
diff
changeset
|
11 |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
12 |
fun |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
13 |
alpha_set |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
14 |
where |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
15 |
alpha_set[simp del]: |
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
16 |
"alpha_set (bs, x) R f pi (cs, y) \<longleftrightarrow> |
1465
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
17 |
f x - bs = f y - cs \<and> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
18 |
(f x - bs) \<sharp>* pi \<and> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
19 |
R (pi \<bullet> x) y \<and> |
4de35639fef0
added another supp-proof for the non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1460
diff
changeset
|
20 |
pi \<bullet> bs = cs" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
|
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
22 |
fun |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
23 |
alpha_res |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
24 |
where |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
25 |
alpha_res[simp del]: |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
26 |
"alpha_res (bs, x) R f pi (cs, y) \<longleftrightarrow> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
27 |
f x - bs = f y - cs \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
28 |
(f x - bs) \<sharp>* pi \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
29 |
R (pi \<bullet> x) y" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
30 |
|
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
31 |
fun |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
32 |
alpha_lst |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
33 |
where |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
34 |
alpha_lst[simp del]: |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
35 |
"alpha_lst (bs, x) R f pi (cs, y) \<longleftrightarrow> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
36 |
f x - set bs = f y - set cs \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
37 |
(f x - set bs) \<sharp>* pi \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
38 |
R (pi \<bullet> x) y \<and> |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
39 |
pi \<bullet> bs = cs" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
40 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
41 |
lemmas alphas = alpha_set.simps alpha_res.simps alpha_lst.simps |
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
42 |
|
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
43 |
notation |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
44 |
alpha_set ("_ \<approx>set _ _ _ _" [100, 100, 100, 100, 100] 100) and |
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
45 |
alpha_res ("_ \<approx>res _ _ _ _" [100, 100, 100, 100, 100] 100) and |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
46 |
alpha_lst ("_ \<approx>lst _ _ _ _" [100, 100, 100, 100, 100] 100) |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
47 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
48 |
section {* Mono *} |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
49 |
|
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
50 |
lemma [mono]: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
51 |
shows "R1 \<le> R2 \<Longrightarrow> alpha_set bs R1 \<le> alpha_set bs R2" |
1557
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
52 |
and "R1 \<le> R2 \<Longrightarrow> alpha_res bs R1 \<le> alpha_res bs R2" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
53 |
and "R1 \<le> R2 \<Longrightarrow> alpha_lst cs R1 \<le> alpha_lst cs R2" |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
54 |
by (case_tac [!] bs, case_tac [!] cs) |
fee2389789ad
moved infinite_Un into mainstream Isabelle; moved permute_boolI/E lemmas
Christian Urban <urbanc@in.tum.de>
parents:
1544
diff
changeset
|
55 |
(auto simp add: le_fun_def le_bool_def alphas) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
57 |
section {* Equivariance *} |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
58 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
59 |
lemma alpha_eqvt[eqvt]: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
60 |
shows "(bs, x) \<approx>set R f q (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>set (p \<bullet> R) (p \<bullet> f) (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)" |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
61 |
and "(bs, x) \<approx>res R f q (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>res (p \<bullet> R) (p \<bullet> f) (p \<bullet> q) (p \<bullet> cs, p \<bullet> y)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
62 |
and "(ds, x) \<approx>lst R f q (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>lst (p \<bullet> R) (p \<bullet> f) (p \<bullet> q) (p \<bullet> es, p \<bullet> y)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
63 |
unfolding alphas |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
64 |
unfolding permute_eqvt[symmetric] |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
65 |
unfolding set_eqvt[symmetric] |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
66 |
unfolding permute_fun_app_eq[symmetric] |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
67 |
unfolding Diff_eqvt[symmetric] |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
68 |
by (auto simp add: permute_bool_def fresh_star_permute_iff) |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
69 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
70 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
71 |
section {* Equivalence *} |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
72 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
73 |
lemma alpha_refl: |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
74 |
assumes a: "R x x" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
75 |
shows "(bs, x) \<approx>set R f 0 (bs, x)" |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
76 |
and "(bs, x) \<approx>res R f 0 (bs, x)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
77 |
and "(cs, x) \<approx>lst R f 0 (cs, x)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
78 |
using a |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
79 |
unfolding alphas |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
80 |
unfolding fresh_star_def |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
81 |
by (simp_all add: fresh_zero_perm) |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
82 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
83 |
lemma alpha_sym: |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
84 |
assumes a: "R (p \<bullet> x) y \<Longrightarrow> R (- p \<bullet> y) x" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
85 |
shows "(bs, x) \<approx>set R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>set R f (- p) (bs, x)" |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
86 |
and "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
87 |
and "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
88 |
unfolding alphas fresh_star_def |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
89 |
using a |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
90 |
by (auto simp add: fresh_minus_perm) |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
91 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
92 |
lemma alpha_trans: |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
93 |
assumes a: "\<lbrakk>R (p \<bullet> x) y; R (q \<bullet> y) z\<rbrakk> \<Longrightarrow> R ((q + p) \<bullet> x) z" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
94 |
shows "\<lbrakk>(bs, x) \<approx>set R f p (cs, y); (cs, y) \<approx>set R f q (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>set R f (q + p) (ds, z)" |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
95 |
and "\<lbrakk>(bs, x) \<approx>res R f p (cs, y); (cs, y) \<approx>res R f q (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>res R f (q + p) (ds, z)" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
96 |
and "\<lbrakk>(es, x) \<approx>lst R f p (gs, y); (gs, y) \<approx>lst R f q (hs, z)\<rbrakk> \<Longrightarrow> (es, x) \<approx>lst R f (q + p) (hs, z)" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
97 |
using a |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
98 |
unfolding alphas fresh_star_def |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
99 |
by (simp_all add: fresh_plus_perm) |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
100 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
101 |
lemma alpha_sym_eqvt: |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
102 |
assumes a: "R (p \<bullet> x) y \<Longrightarrow> R y (p \<bullet> x)" |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
103 |
and b: "p \<bullet> R = R" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
104 |
shows "(bs, x) \<approx>set R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>set R f (- p) (bs, x)" |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
105 |
and "(bs, x) \<approx>res R f p (cs, y) \<Longrightarrow> (cs, y) \<approx>res R f (- p) (bs, x)" |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
106 |
and "(ds, x) \<approx>lst R f p (es, y) \<Longrightarrow> (es, y) \<approx>lst R f (- p) (ds, x)" |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
107 |
apply(auto intro!: alpha_sym) |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
108 |
apply(drule_tac [!] a) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
109 |
apply(rule_tac [!] p="p" in permute_boolE) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
110 |
apply(perm_simp add: permute_minus_cancel b) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
111 |
apply(assumption) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
112 |
apply(perm_simp add: permute_minus_cancel b) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
113 |
apply(assumption) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
114 |
apply(perm_simp add: permute_minus_cancel b) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
115 |
apply(assumption) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
116 |
done |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
117 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
118 |
lemma alpha_set_trans_eqvt: |
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
119 |
assumes b: "(cs, y) \<approx>set R f q (ds, z)" |
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
120 |
and a: "(bs, x) \<approx>set R f p (cs, y)" |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
121 |
and d: "q \<bullet> R = R" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
122 |
and c: "\<lbrakk>R (p \<bullet> x) y; R y (- q \<bullet> z)\<rbrakk> \<Longrightarrow> R (p \<bullet> x) (- q \<bullet> z)" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
123 |
shows "(bs, x) \<approx>set R f (q + p) (ds, z)" |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
124 |
apply(rule alpha_trans) |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
125 |
defer |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
126 |
apply(rule a) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
127 |
apply(rule b) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
128 |
apply(drule c) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
129 |
apply(rule_tac p="q" in permute_boolE) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
130 |
apply(perm_simp add: permute_minus_cancel d) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
131 |
apply(assumption) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
132 |
apply(rotate_tac -1) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
133 |
apply(drule_tac p="q" in permute_boolI) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
134 |
apply(perm_simp add: permute_minus_cancel d) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
135 |
apply(simp add: permute_eqvt[symmetric]) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
136 |
done |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
137 |
|
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
138 |
lemma alpha_res_trans_eqvt: |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
139 |
assumes b: "(cs, y) \<approx>res R f q (ds, z)" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
140 |
and a: "(bs, x) \<approx>res R f p (cs, y)" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
141 |
and d: "q \<bullet> R = R" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
142 |
and c: "\<lbrakk>R (p \<bullet> x) y; R y (- q \<bullet> z)\<rbrakk> \<Longrightarrow> R (p \<bullet> x) (- q \<bullet> z)" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
143 |
shows "(bs, x) \<approx>res R f (q + p) (ds, z)" |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
144 |
apply(rule alpha_trans) |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
145 |
defer |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
146 |
apply(rule a) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
147 |
apply(rule b) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
148 |
apply(drule c) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
149 |
apply(rule_tac p="q" in permute_boolE) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
150 |
apply(perm_simp add: permute_minus_cancel d) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
151 |
apply(assumption) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
152 |
apply(rotate_tac -1) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
153 |
apply(drule_tac p="q" in permute_boolI) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
154 |
apply(perm_simp add: permute_minus_cancel d) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
155 |
apply(simp add: permute_eqvt[symmetric]) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
156 |
done |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
157 |
|
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
158 |
lemma alpha_lst_trans_eqvt: |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
159 |
assumes b: "(cs, y) \<approx>lst R f q (ds, z)" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
160 |
and a: "(bs, x) \<approx>lst R f p (cs, y)" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
161 |
and d: "q \<bullet> R = R" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
162 |
and c: "\<lbrakk>R (p \<bullet> x) y; R y (- q \<bullet> z)\<rbrakk> \<Longrightarrow> R (p \<bullet> x) (- q \<bullet> z)" |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
163 |
shows "(bs, x) \<approx>lst R f (q + p) (ds, z)" |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
164 |
apply(rule alpha_trans) |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
165 |
defer |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
166 |
apply(rule a) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
167 |
apply(rule b) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
168 |
apply(drule c) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
169 |
apply(rule_tac p="q" in permute_boolE) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
170 |
apply(perm_simp add: permute_minus_cancel d) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
171 |
apply(assumption) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
172 |
apply(rotate_tac -1) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
173 |
apply(drule_tac p="q" in permute_boolI) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
174 |
apply(perm_simp add: permute_minus_cancel d) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
175 |
apply(simp add: permute_eqvt[symmetric]) |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
176 |
done |
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
177 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
178 |
lemmas alpha_trans_eqvt = alpha_set_trans_eqvt alpha_res_trans_eqvt alpha_lst_trans_eqvt |
2313
25d2cdf7d7e4
transitivity proofs done
Christian Urban <urbanc@in.tum.de>
parents:
2311
diff
changeset
|
179 |
|
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
180 |
|
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
181 |
section {* General Abstractions *} |
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2302
diff
changeset
|
182 |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
183 |
fun |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
184 |
alpha_abs_set |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
185 |
where |
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
186 |
[simp del]: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
187 |
"alpha_abs_set (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>set (op=) supp p (cs, y))" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
188 |
|
1657 | 189 |
fun |
190 |
alpha_abs_lst |
|
191 |
where |
|
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
192 |
[simp del]: |
1657 | 193 |
"alpha_abs_lst (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>lst (op=) supp p (cs, y))" |
194 |
||
195 |
fun |
|
196 |
alpha_abs_res |
|
197 |
where |
|
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
198 |
[simp del]: |
1657 | 199 |
"alpha_abs_res (bs, x) (cs, y) \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op=) supp p (cs, y))" |
200 |
||
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
201 |
notation |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
202 |
alpha_abs_set (infix "\<approx>abs'_set" 50) and |
1666
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
203 |
alpha_abs_lst (infix "\<approx>abs'_lst" 50) and |
a99ae705b811
Removed some warnings.
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1665
diff
changeset
|
204 |
alpha_abs_res (infix "\<approx>abs'_res" 50) |
1657 | 205 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
206 |
lemmas alphas_abs = alpha_abs_set.simps alpha_abs_res.simps alpha_abs_lst.simps |
1657 | 207 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
208 |
|
1657 | 209 |
lemma alphas_abs_refl: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
210 |
shows "(bs, x) \<approx>abs_set (bs, x)" |
1657 | 211 |
and "(bs, x) \<approx>abs_res (bs, x)" |
212 |
and "(cs, x) \<approx>abs_lst (cs, x)" |
|
213 |
unfolding alphas_abs |
|
214 |
unfolding alphas |
|
215 |
unfolding fresh_star_def |
|
216 |
by (rule_tac [!] x="0" in exI) |
|
217 |
(simp_all add: fresh_zero_perm) |
|
218 |
||
219 |
lemma alphas_abs_sym: |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
220 |
shows "(bs, x) \<approx>abs_set (cs, y) \<Longrightarrow> (cs, y) \<approx>abs_set (bs, x)" |
1657 | 221 |
and "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (cs, y) \<approx>abs_res (bs, x)" |
222 |
and "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (es, y) \<approx>abs_lst (ds, x)" |
|
223 |
unfolding alphas_abs |
|
224 |
unfolding alphas |
|
225 |
unfolding fresh_star_def |
|
226 |
by (erule_tac [!] exE, rule_tac [!] x="-p" in exI) |
|
227 |
(auto simp add: fresh_minus_perm) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
228 |
|
1657 | 229 |
lemma alphas_abs_trans: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
230 |
shows "\<lbrakk>(bs, x) \<approx>abs_set (cs, y); (cs, y) \<approx>abs_set (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs_set (ds, z)" |
1657 | 231 |
and "\<lbrakk>(bs, x) \<approx>abs_res (cs, y); (cs, y) \<approx>abs_res (ds, z)\<rbrakk> \<Longrightarrow> (bs, x) \<approx>abs_res (ds, z)" |
232 |
and "\<lbrakk>(es, x) \<approx>abs_lst (gs, y); (gs, y) \<approx>abs_lst (hs, z)\<rbrakk> \<Longrightarrow> (es, x) \<approx>abs_lst (hs, z)" |
|
233 |
unfolding alphas_abs |
|
234 |
unfolding alphas |
|
235 |
unfolding fresh_star_def |
|
236 |
apply(erule_tac [!] exE, erule_tac [!] exE) |
|
237 |
apply(rule_tac [!] x="pa + p" in exI) |
|
238 |
by (simp_all add: fresh_plus_perm) |
|
239 |
||
240 |
lemma alphas_abs_eqvt: |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
241 |
shows "(bs, x) \<approx>abs_set (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs_set (p \<bullet> cs, p \<bullet> y)" |
1657 | 242 |
and "(bs, x) \<approx>abs_res (cs, y) \<Longrightarrow> (p \<bullet> bs, p \<bullet> x) \<approx>abs_res (p \<bullet> cs, p \<bullet> y)" |
243 |
and "(ds, x) \<approx>abs_lst (es, y) \<Longrightarrow> (p \<bullet> ds, p \<bullet> x) \<approx>abs_lst (p \<bullet> es, p \<bullet> y)" |
|
244 |
unfolding alphas_abs |
|
245 |
unfolding alphas |
|
246 |
unfolding set_eqvt[symmetric] |
|
247 |
unfolding supp_eqvt[symmetric] |
|
248 |
unfolding Diff_eqvt[symmetric] |
|
249 |
apply(erule_tac [!] exE) |
|
250 |
apply(rule_tac [!] x="p \<bullet> pa" in exI) |
|
251 |
by (auto simp add: fresh_star_permute_iff permute_eqvt[symmetric]) |
|
252 |
||
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
253 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
254 |
section {* Strengthening the equivalence *} |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
255 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
256 |
lemma disjoint_right_eq: |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
257 |
assumes a: "A \<union> B1 = A \<union> B2" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
258 |
and b: "A \<inter> B1 = {}" "A \<inter> B2 = {}" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
259 |
shows "B1 = B2" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
260 |
using a b |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
261 |
by (metis Int_Un_distrib2 Int_absorb2 Int_commute Un_upper2) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
262 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
263 |
lemma supp_property_set: |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
264 |
assumes a: "(as, x) \<approx>set (op =) supp p (as', x')" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
265 |
shows "p \<bullet> (supp x \<inter> as) = supp x' \<inter> as'" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
266 |
proof - |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
267 |
from a have "(supp x - as) \<sharp>* p" by (auto simp only: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
268 |
then have *: "p \<bullet> (supp x - as) = (supp x - as)" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
269 |
by (simp add: atom_set_perm_eq) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
270 |
have "(supp x' - as') \<union> (supp x' \<inter> as') = supp x'" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
271 |
also have "\<dots> = supp (p \<bullet> x)" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
272 |
also have "\<dots> = p \<bullet> (supp x)" by (simp add: supp_eqvt) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
273 |
also have "\<dots> = p \<bullet> ((supp x - as) \<union> (supp x \<inter> as))" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
274 |
also have "\<dots> = (p \<bullet> (supp x - as)) \<union> (p \<bullet> (supp x \<inter> as))" by (simp add: union_eqvt) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
275 |
also have "\<dots> = (supp x - as) \<union> (p \<bullet> (supp x \<inter> as))" using * by simp |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
276 |
also have "\<dots> = (supp x' - as') \<union> (p \<bullet> (supp x \<inter> as))" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
277 |
finally have "(supp x' - as') \<union> (supp x' \<inter> as') = (supp x' - as') \<union> (p \<bullet> (supp x \<inter> as))" . |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
278 |
moreover |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
279 |
have "(supp x' - as') \<inter> (supp x' \<inter> as') = {}" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
280 |
moreover |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
281 |
have "(supp x - as) \<inter> (supp x \<inter> as) = {}" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
282 |
then have "p \<bullet> ((supp x - as) \<inter> (supp x \<inter> as) = {})" by (simp add: permute_bool_def) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
283 |
then have "(p \<bullet> (supp x - as)) \<inter> (p \<bullet> (supp x \<inter> as)) = {}" by (perm_simp) (simp) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
284 |
then have "(supp x - as) \<inter> (p \<bullet> (supp x \<inter> as)) = {}" using * by simp |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
285 |
then have "(supp x' - as') \<inter> (p \<bullet> (supp x \<inter> as)) = {}" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
286 |
ultimately show "p \<bullet> (supp x \<inter> as) = supp x' \<inter> as'" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
287 |
by (auto dest: disjoint_right_eq) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
288 |
qed |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
289 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
290 |
lemma supp_property_res: |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
291 |
assumes a: "(as, x) \<approx>res (op =) supp p (as', x')" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
292 |
shows "p \<bullet> (supp x \<inter> as) = supp x' \<inter> as'" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
293 |
proof - |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
294 |
from a have "(supp x - as) \<sharp>* p" by (auto simp only: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
295 |
then have *: "p \<bullet> (supp x - as) = (supp x - as)" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
296 |
by (simp add: atom_set_perm_eq) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
297 |
have "(supp x' - as') \<union> (supp x' \<inter> as') = supp x'" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
298 |
also have "\<dots> = supp (p \<bullet> x)" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
299 |
also have "\<dots> = p \<bullet> (supp x)" by (simp add: supp_eqvt) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
300 |
also have "\<dots> = p \<bullet> ((supp x - as) \<union> (supp x \<inter> as))" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
301 |
also have "\<dots> = (p \<bullet> (supp x - as)) \<union> (p \<bullet> (supp x \<inter> as))" by (simp add: union_eqvt) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
302 |
also have "\<dots> = (supp x - as) \<union> (p \<bullet> (supp x \<inter> as))" using * by simp |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
303 |
also have "\<dots> = (supp x' - as') \<union> (p \<bullet> (supp x \<inter> as))" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
304 |
finally have "(supp x' - as') \<union> (supp x' \<inter> as') = (supp x' - as') \<union> (p \<bullet> (supp x \<inter> as))" . |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
305 |
moreover |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
306 |
have "(supp x' - as') \<inter> (supp x' \<inter> as') = {}" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
307 |
moreover |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
308 |
have "(supp x - as) \<inter> (supp x \<inter> as) = {}" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
309 |
then have "p \<bullet> ((supp x - as) \<inter> (supp x \<inter> as) = {})" by (simp add: permute_bool_def) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
310 |
then have "(p \<bullet> (supp x - as)) \<inter> (p \<bullet> (supp x \<inter> as)) = {}" by (perm_simp) (simp) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
311 |
then have "(supp x - as) \<inter> (p \<bullet> (supp x \<inter> as)) = {}" using * by simp |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
312 |
then have "(supp x' - as') \<inter> (p \<bullet> (supp x \<inter> as)) = {}" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
313 |
ultimately show "p \<bullet> (supp x \<inter> as) = supp x' \<inter> as'" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
314 |
by (auto dest: disjoint_right_eq) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
315 |
qed |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
316 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
317 |
lemma supp_property_list: |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
318 |
assumes a: "(as, x) \<approx>lst (op =) supp p (as', x')" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
319 |
shows "p \<bullet> (supp x \<inter> set as) = supp x' \<inter> set as'" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
320 |
proof - |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
321 |
from a have "(supp x - set as) \<sharp>* p" by (auto simp only: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
322 |
then have *: "p \<bullet> (supp x - set as) = (supp x - set as)" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
323 |
by (simp add: atom_set_perm_eq) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
324 |
have "(supp x' - set as') \<union> (supp x' \<inter> set as') = supp x'" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
325 |
also have "\<dots> = supp (p \<bullet> x)" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
326 |
also have "\<dots> = p \<bullet> (supp x)" by (simp add: supp_eqvt) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
327 |
also have "\<dots> = p \<bullet> ((supp x - set as) \<union> (supp x \<inter> set as))" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
328 |
also have "\<dots> = (p \<bullet> (supp x - set as)) \<union> (p \<bullet> (supp x \<inter> set as))" by (simp add: union_eqvt) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
329 |
also have "\<dots> = (supp x - set as) \<union> (p \<bullet> (supp x \<inter> set as))" using * by simp |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
330 |
also have "\<dots> = (supp x' - set as') \<union> (p \<bullet> (supp x \<inter> set as))" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
331 |
finally |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
332 |
have "(supp x' - set as') \<union> (supp x' \<inter> set as') = (supp x' - set as') \<union> (p \<bullet> (supp x \<inter> set as))" . |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
333 |
moreover |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
334 |
have "(supp x' - set as') \<inter> (supp x' \<inter> set as') = {}" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
335 |
moreover |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
336 |
have "(supp x - set as) \<inter> (supp x \<inter> set as) = {}" by auto |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
337 |
then have "p \<bullet> ((supp x - set as) \<inter> (supp x \<inter> set as) = {})" by (simp add: permute_bool_def) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
338 |
then have "(p \<bullet> (supp x - set as)) \<inter> (p \<bullet> (supp x \<inter> set as)) = {}" by (perm_simp) (simp) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
339 |
then have "(supp x - set as) \<inter> (p \<bullet> (supp x \<inter> set as)) = {}" using * by simp |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
340 |
then have "(supp x' - set as') \<inter> (p \<bullet> (supp x \<inter> set as)) = {}" using a by (simp add: alphas) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
341 |
ultimately show "p \<bullet> (supp x \<inter> set as) = supp x' \<inter> set as'" |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
342 |
by (auto dest: disjoint_right_eq) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
343 |
qed |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
344 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
345 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
346 |
|
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
347 |
section {* Quotient types *} |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
348 |
|
1657 | 349 |
quotient_type |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
350 |
'a abs_set = "(atom set \<times> 'a::pt)" / "alpha_abs_set" |
1657 | 351 |
and 'b abs_res = "(atom set \<times> 'b::pt)" / "alpha_abs_res" |
352 |
and 'c abs_lst = "(atom list \<times> 'c::pt)" / "alpha_abs_lst" |
|
353 |
apply(rule_tac [!] equivpI) |
|
2592
98236fbd8aa6
updated to Isabelle 2nd December
Christian Urban <urbanc@in.tum.de>
parents:
2591
diff
changeset
|
354 |
unfolding reflp_def refl_on_def symp_def sym_def transp_def trans_def |
1657 | 355 |
by (auto intro: alphas_abs_sym alphas_abs_refl alphas_abs_trans simp only:) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
356 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
357 |
quotient_definition |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
358 |
Abs_set ("[_]set. _" [60, 60] 60) |
1932 | 359 |
where |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
360 |
"Abs_set::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_set" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
361 |
is |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
362 |
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
363 |
|
1657 | 364 |
quotient_definition |
1932 | 365 |
Abs_res ("[_]res. _" [60, 60] 60) |
366 |
where |
|
1657 | 367 |
"Abs_res::atom set \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_res" |
368 |
is |
|
369 |
"Pair::atom set \<Rightarrow> ('a::pt) \<Rightarrow> (atom set \<times> 'a)" |
|
370 |
||
371 |
quotient_definition |
|
1932 | 372 |
Abs_lst ("[_]lst. _" [60, 60] 60) |
373 |
where |
|
1657 | 374 |
"Abs_lst::atom list \<Rightarrow> ('a::pt) \<Rightarrow> 'a abs_lst" |
375 |
is |
|
376 |
"Pair::atom list \<Rightarrow> ('a::pt) \<Rightarrow> (atom list \<times> 'a)" |
|
377 |
||
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
378 |
lemma [quot_respect]: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
379 |
shows "(op= ===> op= ===> alpha_abs_set) Pair Pair" |
1657 | 380 |
and "(op= ===> op= ===> alpha_abs_res) Pair Pair" |
381 |
and "(op= ===> op= ===> alpha_abs_lst) Pair Pair" |
|
382 |
unfolding fun_rel_def |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
383 |
by (auto intro: alphas_abs_refl) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
384 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
385 |
lemma [quot_respect]: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
386 |
shows "(op= ===> alpha_abs_set ===> alpha_abs_set) permute permute" |
1657 | 387 |
and "(op= ===> alpha_abs_res ===> alpha_abs_res) permute permute" |
388 |
and "(op= ===> alpha_abs_lst ===> alpha_abs_lst) permute permute" |
|
389 |
unfolding fun_rel_def |
|
390 |
by (auto intro: alphas_abs_eqvt simp only: Pair_eqvt) |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
391 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
392 |
lemma Abs_eq_iff: |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
393 |
shows "Abs_set bs x = Abs_set cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>set (op =) supp p (cs, y))" |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
394 |
and "Abs_res bs x = Abs_res cs y \<longleftrightarrow> (\<exists>p. (bs, x) \<approx>res (op =) supp p (cs, y))" |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
395 |
and "Abs_lst bsl x = Abs_lst csl y \<longleftrightarrow> (\<exists>p. (bsl, x) \<approx>lst (op =) supp p (csl, y))" |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
396 |
by (lifting alphas_abs) |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
397 |
|
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
398 |
lemma Abs_exhausts: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
399 |
shows "(\<And>as (x::'a::pt). y1 = Abs_set as x \<Longrightarrow> P1) \<Longrightarrow> P1" |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
400 |
and "(\<And>as (x::'a::pt). y2 = Abs_res as x \<Longrightarrow> P2) \<Longrightarrow> P2" |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
401 |
and "(\<And>as (x::'a::pt). y3 = Abs_lst as x \<Longrightarrow> P3) \<Longrightarrow> P3" |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
402 |
by (lifting prod.exhaust[where 'a="atom set" and 'b="'a"] |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
403 |
prod.exhaust[where 'a="atom set" and 'b="'a"] |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
404 |
prod.exhaust[where 'a="atom list" and 'b="'a"]) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
405 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
406 |
instantiation abs_set :: (pt) pt |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
407 |
begin |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
408 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
409 |
quotient_definition |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
410 |
"permute_abs_set::perm \<Rightarrow> ('a::pt abs_set) \<Rightarrow> 'a abs_set" |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
411 |
is |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
412 |
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)" |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
413 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
414 |
lemma permute_Abs_set[simp]: |
1558
a5ba76208983
started cleaning up and introduced 3 versions of ~~gen
Christian Urban <urbanc@in.tum.de>
parents:
1557
diff
changeset
|
415 |
fixes x::"'a::pt" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
416 |
shows "(p \<bullet> (Abs_set as x)) = Abs_set (p \<bullet> as) (p \<bullet> x)" |
1657 | 417 |
by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"]) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
418 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
419 |
instance |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
420 |
apply(default) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
421 |
apply(case_tac [!] x rule: Abs_exhausts(1)) |
1657 | 422 |
apply(simp_all) |
423 |
done |
|
424 |
||
425 |
end |
|
426 |
||
427 |
instantiation abs_res :: (pt) pt |
|
428 |
begin |
|
429 |
||
430 |
quotient_definition |
|
431 |
"permute_abs_res::perm \<Rightarrow> ('a::pt abs_res) \<Rightarrow> 'a abs_res" |
|
432 |
is |
|
433 |
"permute:: perm \<Rightarrow> (atom set \<times> 'a::pt) \<Rightarrow> (atom set \<times> 'a::pt)" |
|
434 |
||
435 |
lemma permute_Abs_res[simp]: |
|
436 |
fixes x::"'a::pt" |
|
437 |
shows "(p \<bullet> (Abs_res as x)) = Abs_res (p \<bullet> as) (p \<bullet> x)" |
|
438 |
by (lifting permute_prod.simps[where 'a="atom set" and 'b="'a"]) |
|
439 |
||
440 |
instance |
|
441 |
apply(default) |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
442 |
apply(case_tac [!] x rule: Abs_exhausts(2)) |
1657 | 443 |
apply(simp_all) |
444 |
done |
|
445 |
||
446 |
end |
|
447 |
||
448 |
instantiation abs_lst :: (pt) pt |
|
449 |
begin |
|
450 |
||
451 |
quotient_definition |
|
452 |
"permute_abs_lst::perm \<Rightarrow> ('a::pt abs_lst) \<Rightarrow> 'a abs_lst" |
|
453 |
is |
|
454 |
"permute:: perm \<Rightarrow> (atom list \<times> 'a::pt) \<Rightarrow> (atom list \<times> 'a::pt)" |
|
455 |
||
456 |
lemma permute_Abs_lst[simp]: |
|
457 |
fixes x::"'a::pt" |
|
458 |
shows "(p \<bullet> (Abs_lst as x)) = Abs_lst (p \<bullet> as) (p \<bullet> x)" |
|
459 |
by (lifting permute_prod.simps[where 'a="atom list" and 'b="'a"]) |
|
460 |
||
461 |
instance |
|
462 |
apply(default) |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
463 |
apply(case_tac [!] x rule: Abs_exhausts(3)) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
464 |
apply(simp_all) |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
465 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
466 |
|
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
467 |
end |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
468 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
469 |
lemmas permute_Abs[eqvt] = permute_Abs_set permute_Abs_res permute_Abs_lst |
1657 | 470 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
471 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
472 |
lemma Abs_swap1: |
1662 | 473 |
assumes a1: "a \<notin> (supp x) - bs" |
474 |
and a2: "b \<notin> (supp x) - bs" |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
475 |
shows "Abs_set bs x = Abs_set ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)" |
1662 | 476 |
and "Abs_res bs x = Abs_res ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)" |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
477 |
unfolding Abs_eq_iff |
1662 | 478 |
unfolding alphas |
479 |
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] |
|
480 |
unfolding fresh_star_def fresh_def |
|
481 |
unfolding swap_set_not_in[OF a1 a2] |
|
482 |
using a1 a2 |
|
483 |
by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI) |
|
484 |
(auto simp add: supp_perm swap_atom) |
|
485 |
||
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
486 |
lemma Abs_swap2: |
1662 | 487 |
assumes a1: "a \<notin> (supp x) - (set bs)" |
488 |
and a2: "b \<notin> (supp x) - (set bs)" |
|
489 |
shows "Abs_lst bs x = Abs_lst ((a \<rightleftharpoons> b) \<bullet> bs) ((a \<rightleftharpoons> b) \<bullet> x)" |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
490 |
unfolding Abs_eq_iff |
1662 | 491 |
unfolding alphas |
492 |
unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric] |
|
493 |
unfolding fresh_star_def fresh_def |
|
494 |
unfolding swap_set_not_in[OF a1 a2] |
|
495 |
using a1 a2 |
|
496 |
by (rule_tac [!] x="(a \<rightleftharpoons> b)" in exI) |
|
497 |
(auto simp add: supp_perm swap_atom) |
|
498 |
||
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
499 |
lemma Abs_supports: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
500 |
shows "((supp x) - as) supports (Abs_set as x)" |
1662 | 501 |
and "((supp x) - as) supports (Abs_res as x)" |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
502 |
and "((supp x) - set bs) supports (Abs_lst bs x)" |
1662 | 503 |
unfolding supports_def |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
504 |
unfolding permute_Abs |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
505 |
by (simp_all add: Abs_swap1[symmetric] Abs_swap2[symmetric]) |
1657 | 506 |
|
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
507 |
function |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
508 |
supp_set :: "('a::pt) abs_set \<Rightarrow> atom set" |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
509 |
where |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
510 |
"supp_set (Abs_set as x) = supp x - as" |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
511 |
apply(case_tac x rule: Abs_exhausts(1)) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
512 |
apply(simp) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
513 |
apply(simp add: Abs_eq_iff alphas_abs alphas) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
514 |
done |
1657 | 515 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
516 |
termination supp_set |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
517 |
by (auto intro!: local.termination) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
518 |
|
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
519 |
function |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
520 |
supp_res :: "('a::pt) abs_res \<Rightarrow> atom set" |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
521 |
where |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
522 |
"supp_res (Abs_res as x) = supp x - as" |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
523 |
apply(case_tac x rule: Abs_exhausts(2)) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
524 |
apply(simp) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
525 |
apply(simp add: Abs_eq_iff alphas_abs alphas) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
526 |
done |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
527 |
|
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
528 |
termination supp_res |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
529 |
by (auto intro!: local.termination) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
530 |
|
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
531 |
function |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
532 |
supp_lst :: "('a::pt) abs_lst \<Rightarrow> atom set" |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
533 |
where |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
534 |
"supp_lst (Abs_lst cs x) = (supp x) - (set cs)" |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
535 |
apply(case_tac x rule: Abs_exhausts(3)) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
536 |
apply(simp) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
537 |
apply(simp add: Abs_eq_iff alphas_abs alphas) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
538 |
done |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
539 |
|
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
540 |
termination supp_lst |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
541 |
by (auto intro!: local.termination) |
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
542 |
|
2663
54aade5d0fe6
moved high level code from LamTest into the main libraries.
Christian Urban <urbanc@in.tum.de>
parents:
2659
diff
changeset
|
543 |
lemma supp_funs_eqvt[eqvt]: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
544 |
shows "(p \<bullet> supp_set x) = supp_set (p \<bullet> x)" |
1657 | 545 |
and "(p \<bullet> supp_res y) = supp_res (p \<bullet> y)" |
546 |
and "(p \<bullet> supp_lst z) = supp_lst (p \<bullet> z)" |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
547 |
apply(case_tac x rule: Abs_exhausts(1)) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
548 |
apply(simp add: supp_eqvt Diff_eqvt) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
549 |
apply(case_tac y rule: Abs_exhausts(2)) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
550 |
apply(simp add: supp_eqvt Diff_eqvt) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
551 |
apply(case_tac z rule: Abs_exhausts(3)) |
1686
7b3dd407f6b3
got rid of the aux-function on the raw level, by defining it with function on the quotient level
Christian Urban <urbanc@in.tum.de>
parents:
1673
diff
changeset
|
552 |
apply(simp add: supp_eqvt Diff_eqvt set_eqvt) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
553 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
554 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
555 |
lemma Abs_fresh_aux: |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
556 |
shows "a \<sharp> Abs bs x \<Longrightarrow> a \<sharp> supp_set (Abs bs x)" |
1657 | 557 |
and "a \<sharp> Abs_res bs x \<Longrightarrow> a \<sharp> supp_res (Abs_res bs x)" |
558 |
and "a \<sharp> Abs_lst cs x \<Longrightarrow> a \<sharp> supp_lst (Abs_lst cs x)" |
|
1932 | 559 |
by (rule_tac [!] fresh_fun_eqvt_app) |
2663
54aade5d0fe6
moved high level code from LamTest into the main libraries.
Christian Urban <urbanc@in.tum.de>
parents:
2659
diff
changeset
|
560 |
(auto simp only: eqvt_def eqvts_raw) |
1657 | 561 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
562 |
lemma Abs_supp_subset1: |
1657 | 563 |
assumes a: "finite (supp x)" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
564 |
shows "(supp x) - as \<subseteq> supp (Abs_set as x)" |
1657 | 565 |
and "(supp x) - as \<subseteq> supp (Abs_res as x)" |
566 |
and "(supp x) - (set bs) \<subseteq> supp (Abs_lst bs x)" |
|
567 |
unfolding supp_conv_fresh |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
568 |
by (auto dest!: Abs_fresh_aux) |
1932 | 569 |
(simp_all add: fresh_def supp_finite_atom_set a) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
570 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
571 |
lemma Abs_supp_subset2: |
1657 | 572 |
assumes a: "finite (supp x)" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
573 |
shows "supp (Abs_set as x) \<subseteq> (supp x) - as" |
1657 | 574 |
and "supp (Abs_res as x) \<subseteq> (supp x) - as" |
575 |
and "supp (Abs_lst bs x) \<subseteq> (supp x) - (set bs)" |
|
1932 | 576 |
by (rule_tac [!] supp_is_subset) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
577 |
(simp_all add: Abs_supports a) |
1478
1ea4ca823266
added proof of supp/fv for type schemes
Christian Urban <urbanc@in.tum.de>
parents:
1470
diff
changeset
|
578 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
579 |
lemma Abs_finite_supp: |
1657 | 580 |
assumes a: "finite (supp x)" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
581 |
shows "supp (Abs_set as x) = (supp x) - as" |
1657 | 582 |
and "supp (Abs_res as x) = (supp x) - as" |
583 |
and "supp (Abs_lst bs x) = (supp x) - (set bs)" |
|
1932 | 584 |
by (rule_tac [!] subset_antisym) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
585 |
(simp_all add: Abs_supp_subset1[OF a] Abs_supp_subset2[OF a]) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
586 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
587 |
lemma supp_Abs: |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
588 |
fixes x::"'a::fs" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
589 |
shows "supp (Abs_set as x) = (supp x) - as" |
1657 | 590 |
and "supp (Abs_res as x) = (supp x) - as" |
591 |
and "supp (Abs_lst bs x) = (supp x) - (set bs)" |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
592 |
by (rule_tac [!] Abs_finite_supp) |
1932 | 593 |
(simp_all add: finite_supp) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
594 |
|
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
595 |
instance abs_set :: (fs) fs |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
596 |
apply(default) |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
597 |
apply(case_tac x rule: Abs_exhausts(1)) |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
598 |
apply(simp add: supp_Abs finite_supp) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
599 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
600 |
|
1657 | 601 |
instance abs_res :: (fs) fs |
602 |
apply(default) |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
603 |
apply(case_tac x rule: Abs_exhausts(2)) |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
604 |
apply(simp add: supp_Abs finite_supp) |
1657 | 605 |
done |
606 |
||
607 |
instance abs_lst :: (fs) fs |
|
608 |
apply(default) |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
609 |
apply(case_tac x rule: Abs_exhausts(3)) |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
610 |
apply(simp add: supp_Abs finite_supp) |
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
611 |
done |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
612 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
613 |
lemma Abs_fresh_iff: |
1657 | 614 |
fixes x::"'a::fs" |
2469
4a6e78bd9de9
renamed alpha_gen -> alpha_set and Abs -> Abs_set etc
Christian Urban <urbanc@in.tum.de>
parents:
2468
diff
changeset
|
615 |
shows "a \<sharp> Abs_set bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)" |
1657 | 616 |
and "a \<sharp> Abs_res bs x \<longleftrightarrow> a \<in> bs \<or> (a \<notin> bs \<and> a \<sharp> x)" |
617 |
and "a \<sharp> Abs_lst cs x \<longleftrightarrow> a \<in> (set cs) \<or> (a \<notin> (set cs) \<and> a \<sharp> x)" |
|
618 |
unfolding fresh_def |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
619 |
unfolding supp_Abs |
1657 | 620 |
by auto |
1460
0fd03936dedb
merge and proof of support for non-recursive case
Christian Urban <urbanc@in.tum.de>
parents:
1451
diff
changeset
|
621 |
|
2591
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
622 |
lemma Abs_fresh_star_iff: |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
623 |
fixes x::"'a::fs" |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
624 |
shows "as \<sharp>* Abs_set bs x \<longleftrightarrow> (as - bs) \<sharp>* x" |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
625 |
and "as \<sharp>* Abs_res bs x \<longleftrightarrow> (as - bs) \<sharp>* x" |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
626 |
and "as \<sharp>* Abs_lst cs x \<longleftrightarrow> (as - set cs) \<sharp>* x" |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
627 |
unfolding fresh_star_def |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
628 |
by (auto simp add: Abs_fresh_iff) |
35c570891a3a
isarfied some of the high-level proofs
Christian Urban <urbanc@in.tum.de>
parents:
2584
diff
changeset
|
629 |
|
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
630 |
lemma Abs_fresh_star: |
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
631 |
fixes x::"'a::fs" |
2584
1eac050a36f4
completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents:
2574
diff
changeset
|
632 |
shows "as \<subseteq> as' \<Longrightarrow> as \<sharp>* Abs_set as' x" |
1eac050a36f4
completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents:
2574
diff
changeset
|
633 |
and "as \<subseteq> as' \<Longrightarrow> as \<sharp>* Abs_res as' x" |
1eac050a36f4
completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents:
2574
diff
changeset
|
634 |
and "bs \<subseteq> set bs' \<Longrightarrow> bs \<sharp>* Abs_lst bs' x" |
2491
d0961e6d6881
more consistent naming in Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2489
diff
changeset
|
635 |
unfolding fresh_star_def |
2584
1eac050a36f4
completely different method fro deriving the exhaust lemma
Christian Urban <urbanc@in.tum.de>
parents:
2574
diff
changeset
|
636 |
by(auto simp add: Abs_fresh_iff) |
2468 | 637 |
|
638 |
||
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
639 |
subsection {* Renaming of bodies of abstractions *} |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
640 |
|
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
641 |
|
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
642 |
lemma Abs_rename_set: |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
643 |
fixes x::"'a::fs" |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
644 |
assumes a: "(p \<bullet> bs) \<sharp>* x" |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
645 |
and b: "finite bs" |
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
646 |
shows "\<exists>q. [bs]set. x = [p \<bullet> bs]set. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
647 |
proof - |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
648 |
from b set_renaming_perm |
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
649 |
obtain q where *: "\<forall>b \<in> bs. q \<bullet> b = p \<bullet> b" and **: "supp q \<subseteq> bs \<union> (p \<bullet> bs)" by blast |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
650 |
have ***: "q \<bullet> bs = p \<bullet> bs" using b * by (induct) (simp add: permute_set_eq, simp add: insert_eqvt) |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
651 |
have "[bs]set. x = q \<bullet> ([bs]set. x)" |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
652 |
apply(rule perm_supp_eq[symmetric]) |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
653 |
using a ** |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
654 |
unfolding Abs_fresh_star_iff |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
655 |
unfolding fresh_star_def |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
656 |
by auto |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
657 |
also have "\<dots> = [q \<bullet> bs]set. (q \<bullet> x)" by simp |
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
658 |
finally have "[bs]set. x = [p \<bullet> bs]set. (q \<bullet> x)" by (simp add: ***) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
659 |
then show "\<exists>q. [bs]set. x = [p \<bullet> bs]set. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" using *** by metis |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
660 |
qed |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
661 |
|
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
662 |
lemma Abs_rename_res: |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
663 |
fixes x::"'a::fs" |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
664 |
assumes a: "(p \<bullet> bs) \<sharp>* x" |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
665 |
and b: "finite bs" |
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
666 |
shows "\<exists>q. [bs]res. x = [p \<bullet> bs]res. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
667 |
proof - |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
668 |
from b set_renaming_perm |
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
669 |
obtain q where *: "\<forall>b \<in> bs. q \<bullet> b = p \<bullet> b" and **: "supp q \<subseteq> bs \<union> (p \<bullet> bs)" by blast |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
670 |
have ***: "q \<bullet> bs = p \<bullet> bs" using b * by (induct) (simp add: permute_set_eq, simp add: insert_eqvt) |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
671 |
have "[bs]res. x = q \<bullet> ([bs]res. x)" |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
672 |
apply(rule perm_supp_eq[symmetric]) |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
673 |
using a ** |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
674 |
unfolding Abs_fresh_star_iff |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
675 |
unfolding fresh_star_def |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
676 |
by auto |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
677 |
also have "\<dots> = [q \<bullet> bs]res. (q \<bullet> x)" by simp |
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
678 |
finally have "[bs]res. x = [p \<bullet> bs]res. (q \<bullet> x)" by (simp add: ***) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
679 |
then show "\<exists>q. [bs]res. x = [p \<bullet> bs]res. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" using *** by metis |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
680 |
qed |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
681 |
|
2611
3d101f2f817c
simple cases for strong inducts done; infrastructure for the difficult ones is there
Christian Urban <urbanc@in.tum.de>
parents:
2599
diff
changeset
|
682 |
lemma Abs_rename_lst: |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
683 |
fixes x::"'a::fs" |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
684 |
assumes a: "(p \<bullet> (set bs)) \<sharp>* x" |
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
685 |
shows "\<exists>q. [bs]lst. x = [p \<bullet> bs]lst. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
686 |
proof - |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
687 |
from a list_renaming_perm |
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
688 |
obtain q where *: "\<forall>b \<in> set bs. q \<bullet> b = p \<bullet> b" and **: "supp q \<subseteq> set bs \<union> (p \<bullet> set bs)" by blast |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
689 |
have ***: "q \<bullet> bs = p \<bullet> bs" using * by (induct bs) (simp_all add: insert_eqvt) |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
690 |
have "[bs]lst. x = q \<bullet> ([bs]lst. x)" |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
691 |
apply(rule perm_supp_eq[symmetric]) |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
692 |
using a ** |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
693 |
unfolding Abs_fresh_star_iff |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
694 |
unfolding fresh_star_def |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
695 |
by auto |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
696 |
also have "\<dots> = [q \<bullet> bs]lst. (q \<bullet> x)" by simp |
2668
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
697 |
finally have "[bs]lst. x = [p \<bullet> bs]lst. (q \<bullet> x)" by (simp add: ***) |
92c001d93225
modified the renaming_perm lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2663
diff
changeset
|
698 |
then show "\<exists>q. [bs]lst. x = [p \<bullet> bs]lst. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" using *** by metis |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
699 |
qed |
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
700 |
|
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
701 |
|
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
702 |
text {* for deep recursive binders *} |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
703 |
|
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
704 |
lemma Abs_rename_set': |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
705 |
fixes x::"'a::fs" |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
706 |
assumes a: "(p \<bullet> bs) \<sharp>* x" |
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
707 |
and b: "finite bs" |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
708 |
shows "\<exists>q. [bs]set. x = [q \<bullet> bs]set. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
709 |
using Abs_rename_set[OF a b] by metis |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
710 |
|
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
711 |
lemma Abs_rename_res': |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
712 |
fixes x::"'a::fs" |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
713 |
assumes a: "(p \<bullet> bs) \<sharp>* x" |
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
714 |
and b: "finite bs" |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
715 |
shows "\<exists>q. [bs]res. x = [q \<bullet> bs]res. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
716 |
using Abs_rename_res[OF a b] by metis |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
717 |
|
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
718 |
lemma Abs_rename_lst': |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
719 |
fixes x::"'a::fs" |
2659
619ecb57db38
strengthened renaming lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2635
diff
changeset
|
720 |
assumes a: "(p \<bullet> (set bs)) \<sharp>* x" |
2616
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
721 |
shows "\<exists>q. [bs]lst. x = [q \<bullet> bs]lst. (q \<bullet> x) \<and> q \<bullet> bs = p \<bullet> bs" |
dd7490fdd998
all examples for strong exhausts work; recursive binders need to be treated differently; still unclean version with lots of diagnostic code
Christian Urban <urbanc@in.tum.de>
parents:
2611
diff
changeset
|
722 |
using Abs_rename_lst[OF a] by metis |
2599
d6fe94028a5d
moved general theorems into the libraries
Christian Urban <urbanc@in.tum.de>
parents:
2592
diff
changeset
|
723 |
|
2468 | 724 |
section {* Infrastructure for building tuples of relations and functions *} |
725 |
||
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
726 |
fun |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
727 |
prod_fv :: "('a \<Rightarrow> atom set) \<Rightarrow> ('b \<Rightarrow> atom set) \<Rightarrow> ('a \<times> 'b) \<Rightarrow> atom set" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
728 |
where |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
729 |
"prod_fv fv1 fv2 (x, y) = fv1 x \<union> fv2 y" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
730 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
731 |
definition |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
732 |
prod_alpha :: "('a \<Rightarrow> 'a \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'b \<Rightarrow> bool) \<Rightarrow> ('a \<times> 'b \<Rightarrow> 'a \<times> 'b \<Rightarrow> bool)" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
733 |
where |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
734 |
"prod_alpha = prod_rel" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
735 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
736 |
lemma [quot_respect]: |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
737 |
shows "((R1 ===> op =) ===> (R2 ===> op =) ===> prod_rel R1 R2 ===> op =) prod_fv prod_fv" |
2559
add799cf0817
adapted to changes by Florian on the quotient package and removed local fix for function package
Christian Urban <urbanc@in.tum.de>
parents:
2491
diff
changeset
|
738 |
unfolding fun_rel_def |
add799cf0817
adapted to changes by Florian on the quotient package and removed local fix for function package
Christian Urban <urbanc@in.tum.de>
parents:
2491
diff
changeset
|
739 |
unfolding prod_rel_def |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
740 |
by auto |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
741 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
742 |
lemma [quot_preserve]: |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
743 |
assumes q1: "Quotient R1 abs1 rep1" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
744 |
and q2: "Quotient R2 abs2 rep2" |
2574 | 745 |
shows "((abs1 ---> id) ---> (abs2 ---> id) ---> map_pair rep1 rep2 ---> id) prod_fv = prod_fv" |
2479
a9b6a00b1ba0
updated to Isabelle Sept 16
Christian Urban <urbanc@in.tum.de>
parents:
2475
diff
changeset
|
746 |
by (simp add: fun_eq_iff Quotient_abs_rep[OF q1] Quotient_abs_rep[OF q2]) |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
747 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
748 |
lemma [mono]: |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
749 |
shows "A <= B \<Longrightarrow> C <= D ==> prod_alpha A C <= prod_alpha B D" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
750 |
unfolding prod_alpha_def |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
751 |
by auto |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
752 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
753 |
lemma [eqvt]: |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
754 |
shows "p \<bullet> prod_alpha A B x y = prod_alpha (p \<bullet> A) (p \<bullet> B) (p \<bullet> x) (p \<bullet> y)" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
755 |
unfolding prod_alpha_def |
2559
add799cf0817
adapted to changes by Florian on the quotient package and removed local fix for function package
Christian Urban <urbanc@in.tum.de>
parents:
2491
diff
changeset
|
756 |
unfolding prod_rel_def |
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
757 |
by (perm_simp) (rule refl) |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
758 |
|
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
759 |
lemma [eqvt]: |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
760 |
shows "p \<bullet> prod_fv A B (x, y) = prod_fv (p \<bullet> A) (p \<bullet> B) (p \<bullet> x, p \<bullet> y)" |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
761 |
unfolding prod_fv.simps |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
762 |
by (perm_simp) (rule refl) |
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
763 |
|
2489
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
764 |
lemma prod_fv_supp: |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
765 |
shows "prod_fv supp supp = supp" |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
766 |
by (rule ext) |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
767 |
(auto simp add: prod_fv.simps supp_Pair) |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
768 |
|
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
769 |
lemma prod_alpha_eq: |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
770 |
shows "prod_alpha (op=) (op=) = (op=)" |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
771 |
unfolding prod_alpha_def |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
772 |
by (auto intro!: ext) |
c0695bb33fcd
added simp rules for prod_fv and prod_alpha
Christian Urban <urbanc@in.tum.de>
parents:
2479
diff
changeset
|
773 |
|
2385
fe25a3ffeb14
cleaned up a bit Abs.thy
Christian Urban <urbanc@in.tum.de>
parents:
2324
diff
changeset
|
774 |
|
1440
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
775 |
end |
ffd5540ac2e9
added preliminary test version....but Test works now
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
776 |