author | Christian Urban <urbanc@in.tum.de> |
Sat, 14 Aug 2010 16:54:41 +0800 | |
changeset 2397 | c670a849af65 |
parent 2395 | 79e493880801 |
child 2398 | 1e6160690546 |
permissions | -rw-r--r-- |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
1 |
theory SingleLet |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
2 |
imports "../NewParser" |
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
4 |
|
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
5 |
atom_decl name |
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
6 |
|
2388 | 7 |
declare [[STEPS = 17]] |
2294
72ad4e766acf
properly exported bn_descr
Christian Urban <urbanc@in.tum.de>
parents:
2293
diff
changeset
|
8 |
|
2336
f2d545b77b31
added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents:
2330
diff
changeset
|
9 |
nominal_datatype trm = |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
10 |
Var "name" |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
11 |
| App "trm" "trm" |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
12 |
| Lam x::"name" t::"trm" bind_set x in t |
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
13 |
| Let a::"assg" t::"trm" bind_set "bn a" in t |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2308
diff
changeset
|
14 |
| Foo x::"name" y::"name" t::"trm" t1::"trm" t2::"trm" bind_set x in y t t1 t2 |
2296 | 15 |
| Bar x::"name" y::"name" t::"trm" bind y x in t x y |
2316 | 16 |
| Baz x::"name" t1::"trm" t2::"trm" bind x in t1, bind x in t2 |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
17 |
and assg = |
2320
d835a2771608
prove that alpha implies alpha_bn (needed for rsp proofs)
Christian Urban <urbanc@in.tum.de>
parents:
2318
diff
changeset
|
18 |
As "name" x::"name" t::"trm" bind x in t |
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
19 |
binder |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
20 |
bn::"assg \<Rightarrow> atom set" |
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
21 |
where |
2320
d835a2771608
prove that alpha implies alpha_bn (needed for rsp proofs)
Christian Urban <urbanc@in.tum.de>
parents:
2318
diff
changeset
|
22 |
"bn (As x y t) = {atom x}" |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
23 |
|
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
24 |
(* can lift *) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
25 |
thm distinct |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
26 |
thm trm_raw_assg_raw.inducts |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
27 |
thm fv_defs |
2395 | 28 |
|
29 |
||
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
30 |
(* cannot lift yet *) |
2384
841b7e34e70a
fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents:
2382
diff
changeset
|
31 |
thm eq_iff |
2387
082d9fd28f89
helper lemmas for rsp-lemmas
Christian Urban <urbanc@in.tum.de>
parents:
2386
diff
changeset
|
32 |
thm eq_iff_simps |
2384
841b7e34e70a
fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents:
2382
diff
changeset
|
33 |
thm perm_simps |
841b7e34e70a
fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents:
2382
diff
changeset
|
34 |
thm perm_laws |
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
35 |
thm trm_raw_assg_raw.size(9 - 16) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
36 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
37 |
(* rsp lemmas *) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
38 |
thm size_rsp |
2388 | 39 |
thm funs_rsp |
2395 | 40 |
thm constrs_rsp |
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
41 |
thm permute_rsp |
2384
841b7e34e70a
fixed order of fold_union to make alpha and fv agree
Christian Urban <urbanc@in.tum.de>
parents:
2382
diff
changeset
|
42 |
|
2395 | 43 |
declare constrs_rsp[quot_respect] |
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
44 |
declare funs_rsp[quot_respect] |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
45 |
declare size_rsp[quot_respect] |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
46 |
declare permute_rsp[quot_respect] |
2361 | 47 |
|
48 |
ML {* |
|
49 |
val thms_d = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms distinct} |
|
50 |
*} |
|
51 |
||
52 |
ML {* |
|
53 |
val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.inducts} |
|
54 |
*} |
|
55 |
||
56 |
ML {* |
|
57 |
val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms fv_defs} |
|
58 |
*} |
|
59 |
||
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
60 |
instantiation trm and assg :: size |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
61 |
begin |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
62 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
63 |
quotient_definition |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
64 |
"size_trm :: trm \<Rightarrow> nat" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
65 |
is "size :: trm_raw \<Rightarrow> nat" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
66 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
67 |
quotient_definition |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
68 |
"size_assg :: assg \<Rightarrow> nat" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
69 |
is "size :: assg_raw \<Rightarrow> nat" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
70 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
71 |
instance .. |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
72 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
73 |
end |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
74 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
75 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
76 |
val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.size(9 - 16)} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
77 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
78 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
79 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
80 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
81 |
instantiation trm and assg :: pt |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
82 |
begin |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
83 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
84 |
quotient_definition |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
85 |
"permute_trm :: perm => trm => trm" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
86 |
is "permute :: perm \<Rightarrow> trm_raw \<Rightarrow> trm_raw" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
87 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
88 |
quotient_definition |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
89 |
"permute_assg :: perm => assg => assg" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
90 |
is "permute :: perm \<Rightarrow> assg_raw \<Rightarrow> assg_raw" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
91 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
92 |
lemma qperm_laws: |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
93 |
fixes t::trm and a::assg |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
94 |
shows "permute 0 t = t" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
95 |
and "permute 0 a = a" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
96 |
sorry |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
97 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
98 |
instance |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
99 |
apply(default) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
100 |
sorry |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
101 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
102 |
end |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
103 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
104 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
105 |
(* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
106 |
lemma [quot_respect]: |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
107 |
"(alpha_assg_raw ===> alpha_assg_raw ===> op =) alpha_bn_raw alpha_bn_raw" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
108 |
apply(simp) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
109 |
sorry |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
110 |
*) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
111 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
112 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
113 |
val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff[unfolded alphas prod_fv.simps prod_rel.simps prod_alpha_def]} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
114 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
115 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
116 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
117 |
val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff[unfolding alphas]} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
118 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
119 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
120 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
121 |
(* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
122 |
instance trm :: size .. |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
123 |
instance assg :: size .. |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
124 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
125 |
lemma "(size (Var x)) = 0" |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
126 |
apply(descending) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
127 |
apply(rule trm_raw_assg_raw.size(9 - 16)) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
128 |
apply(simp) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
129 |
*) |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
130 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
131 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
132 |
val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff[unfolding alphas]} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
133 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
134 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
135 |
section {* NOT *} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
136 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
137 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
138 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
139 |
val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.size(9 - 16)} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
140 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
141 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
142 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
143 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
144 |
val thms_p = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_simps(1)} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
145 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
146 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
147 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
148 |
val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_laws} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
149 |
*} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
150 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
151 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
152 |
ML {* |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
153 |
val thms_p = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_simps(1)} |
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
154 |
*} |
2361 | 155 |
|
156 |
instance trm :: pt sorry |
|
157 |
instance assg :: pt sorry |
|
158 |
||
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
159 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
160 |
|
2361 | 161 |
|
162 |
||
2397
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
163 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
164 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
165 |
|
c670a849af65
more experiments with lifting
Christian Urban <urbanc@in.tum.de>
parents:
2395
diff
changeset
|
166 |
|
2361 | 167 |
|
2365 | 168 |
thm eq_iff[no_vars] |
169 |
||
170 |
ML {* |
|
171 |
val q1 = lift_thm [@{typ trm}, @{typ assg}] @{context} @{thm "eq_iff"(1)} |
|
172 |
*} |
|
173 |
||
2361 | 174 |
local_setup {* Local_Theory.note ((@{binding d1}, []), thms_d) #> snd *} |
175 |
local_setup {* Local_Theory.note ((@{binding i1}, []), thms_i) #> snd *} |
|
176 |
local_setup {* Local_Theory.note ((@{binding f1}, []), thms_f) #> snd *} |
|
2365 | 177 |
local_setup {* Local_Theory.note ((@{binding q1}, []), [q1]) #> snd *} |
178 |
||
2361 | 179 |
|
180 |
thm perm_defs |
|
181 |
thm perm_simps |
|
182 |
||
183 |
lemma supp_fv: |
|
184 |
"supp t = fv_trm t" |
|
185 |
"supp b = fv_bn b" |
|
186 |
apply(induct t and b rule: i1) |
|
187 |
apply(simp_all add: f1) |
|
188 |
apply(simp_all add: supp_def) |
|
2365 | 189 |
apply(simp_all add: b1) |
190 |
sorry |
|
191 |
||
192 |
consts perm_bn_trm :: "perm \<Rightarrow> trm \<Rightarrow> trm" |
|
193 |
consts perm_bn_assg :: "perm \<Rightarrow> assg \<Rightarrow> assg" |
|
194 |
||
195 |
lemma y: |
|
196 |
"perm_bn_trm p (Var x) = (Var x)" |
|
197 |
"perm_bn_trm p (App t1 t2) = (App t1 t2)" |
|
198 |
"perm_bn_trm p (" |
|
199 |
||
200 |
||
2361 | 201 |
|
202 |
ML {* |
|
203 |
map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms eq_iff} |
|
204 |
*} |
|
205 |
||
206 |
||
207 |
||
2359 | 208 |
|
209 |
||
210 |
lemma "Var x \<noteq> App y1 y2" |
|
211 |
apply(descending) |
|
212 |
apply(simp add: trm_raw.distinct) |
|
213 |
||
214 |
||
215 |
||
216 |
ML {* |
|
217 |
map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw.distinct(1)} |
|
218 |
*} |
|
219 |
||
220 |
||
221 |
||
2338 | 222 |
|
2336
f2d545b77b31
added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents:
2330
diff
changeset
|
223 |
typ trm |
f2d545b77b31
added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents:
2330
diff
changeset
|
224 |
typ assg |
f2d545b77b31
added definition of the quotient types
Christian Urban <urbanc@in.tum.de>
parents:
2330
diff
changeset
|
225 |
|
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
226 |
thm trm_assg.fv |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
227 |
thm trm_assg.supp |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
228 |
thm trm_assg.eq_iff |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
229 |
thm trm_assg.bn |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
230 |
thm trm_assg.perm |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
231 |
thm trm_assg.induct |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
232 |
thm trm_assg.inducts |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
233 |
thm trm_assg.distinct |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
234 |
ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *} |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
235 |
|
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
236 |
(* TEMPORARY |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
237 |
thm trm_assg.fv[simplified trm_assg.supp(1-2)] |
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
238 |
*) |
2064
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2028
diff
changeset
|
239 |
|
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
240 |
end |
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
241 |
|
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
242 |
|
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
243 |