author | Christian Urban <urbanc@in.tum.de> |
Thu, 28 Jan 2010 15:47:35 +0100 | |
changeset 984 | 8e2dd0b29466 |
child 986 | 98375dde48fc |
permissions | -rw-r--r-- |
984
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
theory LamEx |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
2 |
imports "Nominal2_Atoms" "Nominal2_Eqvt" "Nominal2_Supp" "../QuotMain" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
datatype 'a ABS_raw = Abs_raw "atom list" "'a::pt" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
6 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
primrec |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
Abs_raw_map |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
10 |
"Abs_raw_map f (Abs_raw as x) = Abs_raw as (f x)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
11 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
12 |
fun |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
13 |
Abs_raw_rel |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
14 |
where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
15 |
"Abs_raw_rel R (Abs_raw as x) (Abs_raw bs y) = R x y" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
16 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
declare [[map "ABS_raw" = (Abs_raw_map, Abs_raw_rel)]] |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
instantiation ABS_raw :: (pt) pt |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
22 |
primrec |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
23 |
permute_ABS_raw |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
24 |
where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
25 |
"permute_ABS_raw p (Abs_raw as x) = Abs_raw (p \<bullet> as) (p \<bullet> x)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
26 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
27 |
instance |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
apply(default) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
29 |
apply(case_tac [!] x) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
30 |
apply(simp_all) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
31 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
32 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
end |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
34 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
35 |
inductive |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
36 |
alpha_abs :: "('a::pt) ABS_raw \<Rightarrow> 'a ABS_raw \<Rightarrow> bool" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
37 |
where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
38 |
"\<lbrakk>\<exists>pi. (supp x) - (set as) = (supp y) - (set bs) \<and> ((supp x) - (set as)) \<sharp>* pi \<and> pi \<bullet> x = y\<rbrakk> |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
39 |
\<Longrightarrow> alpha_abs (Abs_raw as x) (Abs_raw bs y)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
40 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
41 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
42 |
lemma Abs_raw_eq1: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
43 |
assumes "alpha_abs (Abs_raw bs x) (Abs_raw bs y)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
44 |
shows "x = y" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
45 |
using assms |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
46 |
apply(erule_tac alpha_abs.cases) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
47 |
apply(auto) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
48 |
apply(drule sym) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
49 |
apply(simp) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
50 |
sorry |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
51 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
52 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
53 |
quotient_type 'a ABS = "('a::pt) ABS_raw" / "alpha_abs::('a::pt) ABS_raw \<Rightarrow> 'a ABS_raw \<Rightarrow> bool" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
54 |
sorry |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
55 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
quotient_definition |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
57 |
"Abs::atom list \<Rightarrow> ('a::pt) \<Rightarrow> 'a ABS" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
58 |
as |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
59 |
"Abs_raw" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
60 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
61 |
lemma [quot_respect]: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
62 |
shows "((op =) ===> (op =) ===> alpha_abs) Abs_raw Abs_raw" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
63 |
apply(auto) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
64 |
apply(rule alpha_abs.intros) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
65 |
apply(rule_tac x="0" in exI) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
66 |
apply(simp add: fresh_star_def fresh_zero_perm) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
67 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
68 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
69 |
lemma [quot_respect]: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
70 |
shows "((op =) ===> alpha_abs ===> alpha_abs) permute permute" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
71 |
apply(auto) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
72 |
sorry |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
73 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
74 |
lemma ABS_induct: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
75 |
"\<lbrakk>\<And>as (x::'a::pt). P (Abs as x)\<rbrakk> \<Longrightarrow> P t" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
76 |
apply(lifting ABS_raw.induct) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
77 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
78 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
79 |
lemma Abs_eq1: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
80 |
assumes "(Abs bs x) = (Abs bs y)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
81 |
shows "x = y" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
82 |
using assms |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
83 |
apply(lifting Abs_raw_eq1) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
84 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
85 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
86 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
87 |
instantiation ABS :: (pt) pt |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
88 |
begin |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
89 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
90 |
quotient_definition |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
91 |
"permute_ABS::perm \<Rightarrow> ('a::pt ABS) \<Rightarrow> 'a ABS" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
92 |
as |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
93 |
"permute::perm \<Rightarrow> ('a::pt ABS_raw) \<Rightarrow> 'a ABS_raw" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
94 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
95 |
lemma permute_ABS [simp]: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
96 |
fixes x::"'b::pt" (* ??? has to be 'b \<dots> 'a doe not work *) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
97 |
shows "(p \<bullet> (Abs as x)) = Abs (p \<bullet> as) (p \<bullet> x)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
98 |
apply(lifting permute_ABS_raw.simps(1)) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
99 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
100 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
101 |
instance |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
102 |
apply(default) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
103 |
apply(induct_tac [!] x rule: ABS_induct) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
104 |
apply(simp_all) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
105 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
106 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
107 |
end |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
108 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
109 |
lemma Abs_supports: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
110 |
shows "(supp (as, x)) supports (Abs as x) " |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
111 |
unfolding supports_def |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
112 |
unfolding fresh_def[symmetric] |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
113 |
apply(simp add: fresh_Pair swap_fresh_fresh) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
114 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
115 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
116 |
instance ABS :: (fs) fs |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
117 |
apply(default) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
118 |
apply(induct_tac x rule: ABS_induct) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
119 |
thm supports_finite |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
120 |
apply(rule supports_finite) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
121 |
apply(rule Abs_supports) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
122 |
apply(simp add: supp_Pair finite_supp) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
123 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
124 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
125 |
lemma Abs_fresh1: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
126 |
fixes x::"'a::fs" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
127 |
assumes a1: "a \<sharp> bs" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
128 |
and a2: "a \<sharp> x" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
129 |
shows "a \<sharp> Abs bs x" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
130 |
proof - |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
131 |
obtain c where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
132 |
fr: "c \<sharp> bs" "c \<sharp> x" "c \<sharp> Abs bs x" "sort_of c = sort_of a" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
133 |
apply(rule_tac X="supp (bs, x, Abs bs x)" in obtain_atom) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
134 |
unfolding fresh_def[symmetric] |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
135 |
apply(auto simp add: supp_Pair finite_supp fresh_Pair fresh_atom) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
136 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
137 |
have "(c \<rightleftharpoons> a) \<bullet> (Abs bs x) = Abs bs x" using a1 a2 fr(1) fr(2) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
138 |
by (simp add: swap_fresh_fresh) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
139 |
moreover from fr(3) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
140 |
have "((c \<rightleftharpoons> a) \<bullet> c) \<sharp> ((c \<rightleftharpoons> a) \<bullet>(Abs bs x))" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
141 |
by (simp only: fresh_permute_iff) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
142 |
ultimately show "a \<sharp> Abs bs x" using fr(4) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
143 |
by simp |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
144 |
qed |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
145 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
146 |
lemma Abs_fresh2: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
147 |
fixes x :: "'a::fs" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
148 |
assumes a1: "a \<sharp> Abs bs x" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
149 |
and a2: "a \<sharp> bs" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
150 |
shows "a \<sharp> x" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
151 |
proof - |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
152 |
obtain c where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
153 |
fr: "c \<sharp> bs" "c \<sharp> x" "c \<sharp> Abs bs x" "sort_of c = sort_of a" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
154 |
apply(rule_tac X="supp (bs, x, Abs bs x)" in obtain_atom) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
155 |
unfolding fresh_def[symmetric] |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
156 |
apply(auto simp add: supp_Pair finite_supp fresh_Pair fresh_atom) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
157 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
158 |
have "Abs bs x = (c \<rightleftharpoons> a) \<bullet> (Abs bs x)" using a1 fr(3) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
159 |
by (simp only: swap_fresh_fresh) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
160 |
also have "\<dots> = Abs bs ((c \<rightleftharpoons> a) \<bullet> x)" using a2 fr(1) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
161 |
by (simp add: swap_fresh_fresh) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
162 |
ultimately have "Abs bs x = Abs bs ((c \<rightleftharpoons> a) \<bullet> x)" by simp |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
163 |
then have "x = (c \<rightleftharpoons> a) \<bullet> x" by (rule Abs_eq1) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
164 |
moreover from fr(2) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
165 |
have "((c \<rightleftharpoons> a) \<bullet> c) \<sharp> ((c \<rightleftharpoons> a) \<bullet> x)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
166 |
by (simp only: fresh_permute_iff) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
167 |
ultimately show "a \<sharp> x" using fr(4) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
168 |
by simp |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
169 |
qed |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
170 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
171 |
lemma Abs_fresh3: |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
172 |
fixes x :: "'a::fs" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
173 |
assumes "a \<in> set bs" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
174 |
shows "a \<sharp> Abs bs x" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
175 |
proof - |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
176 |
obtain c where |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
177 |
fr: "c \<sharp> a" "c \<sharp> x" "c \<sharp> Abs bs x" "sort_of c = sort_of a" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
178 |
apply(rule_tac X="supp (a, x, Abs bs x)" in obtain_atom) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
179 |
unfolding fresh_def[symmetric] |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
180 |
apply(auto simp add: supp_Pair finite_supp fresh_Pair fresh_atom) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
181 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
182 |
from fr(3) have "((c \<rightleftharpoons> a) \<bullet> c) \<sharp> ((c \<rightleftharpoons> a) \<bullet> Abs bs x)" |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
183 |
by (simp only: fresh_permute_iff) |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
184 |
moreover |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
185 |
have "((c \<rightleftharpoons> a) \<bullet> Abs bs x) = Abs bs x" using assms fr(1) fr(2) sorry |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
186 |
ultimately |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
187 |
show "a \<sharp> Abs bs x" using fr(4) by simp |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
188 |
qed |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
189 |
|
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
190 |
done |
8e2dd0b29466
attempt of a general abstraction operator
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
191 |