author | paulson |
Thu, 11 Sep 1997 12:24:28 +0200 | |
changeset 3668 | a39baf59ea47 |
parent 3650 | 282ffdc91884 |
child 3683 | aafe719dff14 |
permissions | -rw-r--r-- |
1839 | 1 |
(* Title: HOL/Auth/Message |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1996 University of Cambridge |
|
5 |
||
6 |
Datatypes of agents and messages; |
|
1913 | 7 |
Inductive relations "parts", "analz" and "synth" |
1839 | 8 |
*) |
9 |
||
10 |
open Message; |
|
11 |
||
3668 | 12 |
AddIffs atomic.inject; |
13 |
AddIffs msg.inject; |
|
1839 | 14 |
|
3514
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
15 |
(*Holds because Friend is injective: thus cannot prove for all f*) |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
16 |
goal thy "(Friend x : Friend``A) = (x:A)"; |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
17 |
by (Auto_tac()); |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
18 |
qed "Friend_image_eq"; |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
19 |
Addsimps [Friend_image_eq]; |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
20 |
|
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
21 |
|
1839 | 22 |
(** Inverse of keys **) |
23 |
||
24 |
goal thy "!!K K'. (invKey K = invKey K') = (K=K')"; |
|
25 |
by (Step_tac 1); |
|
2032 | 26 |
by (rtac box_equals 1); |
1839 | 27 |
by (REPEAT (rtac invKey 2)); |
28 |
by (Asm_simp_tac 1); |
|
29 |
qed "invKey_eq"; |
|
30 |
||
31 |
Addsimps [invKey, invKey_eq]; |
|
32 |
||
33 |
||
34 |
(**** keysFor operator ****) |
|
35 |
||
36 |
goalw thy [keysFor_def] "keysFor {} = {}"; |
|
2891 | 37 |
by (Blast_tac 1); |
1839 | 38 |
qed "keysFor_empty"; |
39 |
||
40 |
goalw thy [keysFor_def] "keysFor (H Un H') = keysFor H Un keysFor H'"; |
|
2891 | 41 |
by (Blast_tac 1); |
1839 | 42 |
qed "keysFor_Un"; |
43 |
||
44 |
goalw thy [keysFor_def] "keysFor (UN i. H i) = (UN i. keysFor (H i))"; |
|
2891 | 45 |
by (Blast_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
46 |
qed "keysFor_UN1"; |
1839 | 47 |
|
48 |
(*Monotonicity*) |
|
49 |
goalw thy [keysFor_def] "!!G H. G<=H ==> keysFor(G) <= keysFor(H)"; |
|
2891 | 50 |
by (Blast_tac 1); |
1839 | 51 |
qed "keysFor_mono"; |
52 |
||
53 |
goalw thy [keysFor_def] "keysFor (insert (Agent A) H) = keysFor H"; |
|
3102 | 54 |
by (Blast_tac 1); |
1839 | 55 |
qed "keysFor_insert_Agent"; |
56 |
||
57 |
goalw thy [keysFor_def] "keysFor (insert (Nonce N) H) = keysFor H"; |
|
3102 | 58 |
by (Blast_tac 1); |
1839 | 59 |
qed "keysFor_insert_Nonce"; |
60 |
||
3668 | 61 |
goalw thy [keysFor_def] "keysFor (insert (Number N) H) = keysFor H"; |
62 |
by (Blast_tac 1); |
|
63 |
qed "keysFor_insert_Number"; |
|
64 |
||
1839 | 65 |
goalw thy [keysFor_def] "keysFor (insert (Key K) H) = keysFor H"; |
3102 | 66 |
by (Blast_tac 1); |
1839 | 67 |
qed "keysFor_insert_Key"; |
68 |
||
2373 | 69 |
goalw thy [keysFor_def] "keysFor (insert (Hash X) H) = keysFor H"; |
3102 | 70 |
by (Blast_tac 1); |
2373 | 71 |
qed "keysFor_insert_Hash"; |
72 |
||
1839 | 73 |
goalw thy [keysFor_def] "keysFor (insert {|X,Y|} H) = keysFor H"; |
3102 | 74 |
by (Blast_tac 1); |
1839 | 75 |
qed "keysFor_insert_MPair"; |
76 |
||
77 |
goalw thy [keysFor_def] |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
78 |
"keysFor (insert (Crypt K X) H) = insert (invKey K) (keysFor H)"; |
1839 | 79 |
by (Auto_tac()); |
80 |
qed "keysFor_insert_Crypt"; |
|
81 |
||
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
82 |
Addsimps [keysFor_empty, keysFor_Un, keysFor_UN1, |
3668 | 83 |
keysFor_insert_Agent, keysFor_insert_Nonce, |
84 |
keysFor_insert_Number, keysFor_insert_Key, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
85 |
keysFor_insert_Hash, keysFor_insert_MPair, keysFor_insert_Crypt]; |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
86 |
AddSEs [keysFor_Un RS equalityD1 RS subsetD RS UnE, |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
87 |
keysFor_UN1 RS equalityD1 RS subsetD RS UN1_E]; |
1839 | 88 |
|
3514
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
89 |
goalw thy [keysFor_def] "keysFor (Key``E) = {}"; |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
90 |
by (Auto_tac ()); |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
91 |
qed "keysFor_image_Key"; |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
92 |
Addsimps [keysFor_image_Key]; |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
93 |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
94 |
goalw thy [keysFor_def] "!!H. Crypt K X : H ==> invKey K : keysFor H"; |
2891 | 95 |
by (Blast_tac 1); |
2068 | 96 |
qed "Crypt_imp_invKey_keysFor"; |
97 |
||
1839 | 98 |
|
99 |
(**** Inductive relation "parts" ****) |
|
100 |
||
101 |
val major::prems = |
|
102 |
goal thy "[| {|X,Y|} : parts H; \ |
|
103 |
\ [| X : parts H; Y : parts H |] ==> P \ |
|
104 |
\ |] ==> P"; |
|
105 |
by (cut_facts_tac [major] 1); |
|
2032 | 106 |
by (resolve_tac prems 1); |
1839 | 107 |
by (REPEAT (eresolve_tac [asm_rl, parts.Fst, parts.Snd] 1)); |
108 |
qed "MPair_parts"; |
|
109 |
||
110 |
AddIs [parts.Inj]; |
|
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
111 |
|
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
112 |
val partsEs = [MPair_parts, make_elim parts.Body]; |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
113 |
|
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
114 |
AddSEs partsEs; |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
115 |
(*NB These two rules are UNSAFE in the formal sense, as they discard the |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
116 |
compound message. They work well on THIS FILE, perhaps because its |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
117 |
proofs concern only atomic messages.*) |
1839 | 118 |
|
119 |
goal thy "H <= parts(H)"; |
|
2891 | 120 |
by (Blast_tac 1); |
1839 | 121 |
qed "parts_increasing"; |
122 |
||
123 |
(*Monotonicity*) |
|
124 |
goalw thy parts.defs "!!G H. G<=H ==> parts(G) <= parts(H)"; |
|
125 |
by (rtac lfp_mono 1); |
|
126 |
by (REPEAT (ares_tac basic_monos 1)); |
|
127 |
qed "parts_mono"; |
|
128 |
||
2373 | 129 |
val parts_insertI = impOfSubs (subset_insertI RS parts_mono); |
130 |
||
1839 | 131 |
goal thy "parts{} = {}"; |
132 |
by (Step_tac 1); |
|
2032 | 133 |
by (etac parts.induct 1); |
2891 | 134 |
by (ALLGOALS Blast_tac); |
1839 | 135 |
qed "parts_empty"; |
136 |
Addsimps [parts_empty]; |
|
137 |
||
138 |
goal thy "!!X. X: parts{} ==> P"; |
|
139 |
by (Asm_full_simp_tac 1); |
|
140 |
qed "parts_emptyE"; |
|
141 |
AddSEs [parts_emptyE]; |
|
142 |
||
1893 | 143 |
(*WARNING: loops if H = {Y}, therefore must not be repeated!*) |
144 |
goal thy "!!H. X: parts H ==> EX Y:H. X: parts {Y}"; |
|
2032 | 145 |
by (etac parts.induct 1); |
2891 | 146 |
by (ALLGOALS Blast_tac); |
1893 | 147 |
qed "parts_singleton"; |
148 |
||
1839 | 149 |
|
150 |
(** Unions **) |
|
151 |
||
152 |
goal thy "parts(G) Un parts(H) <= parts(G Un H)"; |
|
153 |
by (REPEAT (ares_tac [Un_least, parts_mono, Un_upper1, Un_upper2] 1)); |
|
154 |
val parts_Un_subset1 = result(); |
|
155 |
||
156 |
goal thy "parts(G Un H) <= parts(G) Un parts(H)"; |
|
2032 | 157 |
by (rtac subsetI 1); |
158 |
by (etac parts.induct 1); |
|
2891 | 159 |
by (ALLGOALS Blast_tac); |
1839 | 160 |
val parts_Un_subset2 = result(); |
161 |
||
162 |
goal thy "parts(G Un H) = parts(G) Un parts(H)"; |
|
163 |
by (REPEAT (ares_tac [equalityI, parts_Un_subset1, parts_Un_subset2] 1)); |
|
164 |
qed "parts_Un"; |
|
165 |
||
2011 | 166 |
goal thy "parts (insert X H) = parts {X} Un parts H"; |
1852 | 167 |
by (stac (read_instantiate [("A","H")] insert_is_Un) 1); |
2011 | 168 |
by (simp_tac (HOL_ss addsimps [parts_Un]) 1); |
169 |
qed "parts_insert"; |
|
170 |
||
171 |
(*TWO inserts to avoid looping. This rewrite is better than nothing. |
|
172 |
Not suitable for Addsimps: its behaviour can be strange.*) |
|
173 |
goal thy "parts (insert X (insert Y H)) = parts {X} Un parts {Y} Un parts H"; |
|
174 |
by (simp_tac (!simpset addsimps [Un_assoc]) 1); |
|
175 |
by (simp_tac (!simpset addsimps [parts_insert RS sym]) 1); |
|
1852 | 176 |
qed "parts_insert2"; |
177 |
||
1839 | 178 |
goal thy "(UN x:A. parts(H x)) <= parts(UN x:A. H x)"; |
179 |
by (REPEAT (ares_tac [UN_least, parts_mono, UN_upper] 1)); |
|
180 |
val parts_UN_subset1 = result(); |
|
181 |
||
182 |
goal thy "parts(UN x:A. H x) <= (UN x:A. parts(H x))"; |
|
2032 | 183 |
by (rtac subsetI 1); |
184 |
by (etac parts.induct 1); |
|
2891 | 185 |
by (ALLGOALS Blast_tac); |
1839 | 186 |
val parts_UN_subset2 = result(); |
187 |
||
188 |
goal thy "parts(UN x:A. H x) = (UN x:A. parts(H x))"; |
|
189 |
by (REPEAT (ares_tac [equalityI, parts_UN_subset1, parts_UN_subset2] 1)); |
|
190 |
qed "parts_UN"; |
|
191 |
||
192 |
goal thy "parts(UN x. H x) = (UN x. parts(H x))"; |
|
193 |
by (simp_tac (!simpset addsimps [UNION1_def, parts_UN]) 1); |
|
194 |
qed "parts_UN1"; |
|
195 |
||
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
196 |
(*Added to simplify arguments to parts, analz and synth. |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
197 |
NOTE: the UN versions are no longer used!*) |
1839 | 198 |
Addsimps [parts_Un, parts_UN, parts_UN1]; |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
199 |
AddSEs [parts_Un RS equalityD1 RS subsetD RS UnE, |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
200 |
parts_UN RS equalityD1 RS subsetD RS UN_E, |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
201 |
parts_UN1 RS equalityD1 RS subsetD RS UN1_E]; |
1839 | 202 |
|
203 |
goal thy "insert X (parts H) <= parts(insert X H)"; |
|
2922 | 204 |
by (blast_tac (!claset addIs [impOfSubs parts_mono]) 1); |
1839 | 205 |
qed "parts_insert_subset"; |
206 |
||
207 |
(** Idempotence and transitivity **) |
|
208 |
||
209 |
goal thy "!!H. X: parts (parts H) ==> X: parts H"; |
|
2032 | 210 |
by (etac parts.induct 1); |
2891 | 211 |
by (ALLGOALS Blast_tac); |
2922 | 212 |
qed "parts_partsD"; |
213 |
AddSDs [parts_partsD]; |
|
1839 | 214 |
|
215 |
goal thy "parts (parts H) = parts H"; |
|
2891 | 216 |
by (Blast_tac 1); |
1839 | 217 |
qed "parts_idem"; |
218 |
Addsimps [parts_idem]; |
|
219 |
||
220 |
goal thy "!!H. [| X: parts G; G <= parts H |] ==> X: parts H"; |
|
221 |
by (dtac parts_mono 1); |
|
2891 | 222 |
by (Blast_tac 1); |
1839 | 223 |
qed "parts_trans"; |
224 |
||
225 |
(*Cut*) |
|
2373 | 226 |
goal thy "!!H. [| Y: parts (insert X G); X: parts H |] \ |
227 |
\ ==> Y: parts (G Un H)"; |
|
2032 | 228 |
by (etac parts_trans 1); |
2373 | 229 |
by (Auto_tac()); |
1839 | 230 |
qed "parts_cut"; |
231 |
||
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
232 |
goal thy "!!H. X: parts H ==> parts (insert X H) = parts H"; |
2373 | 233 |
by (fast_tac (!claset addSDs [parts_cut] |
234 |
addIs [parts_insertI] |
|
235 |
addss (!simpset)) 1); |
|
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
236 |
qed "parts_cut_eq"; |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
237 |
|
2028
738bb98d65ec
Last working version prior to addition of "lost" component
paulson
parents:
2026
diff
changeset
|
238 |
Addsimps [parts_cut_eq]; |
738bb98d65ec
Last working version prior to addition of "lost" component
paulson
parents:
2026
diff
changeset
|
239 |
|
1839 | 240 |
|
241 |
(** Rewrite rules for pulling out atomic messages **) |
|
242 |
||
2373 | 243 |
fun parts_tac i = |
244 |
EVERY [rtac ([subsetI, parts_insert_subset] MRS equalityI) i, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
245 |
etac parts.induct i, |
3102 | 246 |
REPEAT (Blast_tac i)]; |
2373 | 247 |
|
1839 | 248 |
goal thy "parts (insert (Agent agt) H) = insert (Agent agt) (parts H)"; |
2373 | 249 |
by (parts_tac 1); |
1839 | 250 |
qed "parts_insert_Agent"; |
251 |
||
252 |
goal thy "parts (insert (Nonce N) H) = insert (Nonce N) (parts H)"; |
|
2373 | 253 |
by (parts_tac 1); |
1839 | 254 |
qed "parts_insert_Nonce"; |
255 |
||
3668 | 256 |
goal thy "parts (insert (Number N) H) = insert (Number N) (parts H)"; |
257 |
by (parts_tac 1); |
|
258 |
qed "parts_insert_Number"; |
|
259 |
||
1839 | 260 |
goal thy "parts (insert (Key K) H) = insert (Key K) (parts H)"; |
2373 | 261 |
by (parts_tac 1); |
1839 | 262 |
qed "parts_insert_Key"; |
263 |
||
2373 | 264 |
goal thy "parts (insert (Hash X) H) = insert (Hash X) (parts H)"; |
265 |
by (parts_tac 1); |
|
266 |
qed "parts_insert_Hash"; |
|
267 |
||
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
268 |
goal thy "parts (insert (Crypt K X) H) = \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
269 |
\ insert (Crypt K X) (parts (insert X H))"; |
2032 | 270 |
by (rtac equalityI 1); |
271 |
by (rtac subsetI 1); |
|
272 |
by (etac parts.induct 1); |
|
1839 | 273 |
by (Auto_tac()); |
2032 | 274 |
by (etac parts.induct 1); |
2922 | 275 |
by (ALLGOALS (blast_tac (!claset addIs [parts.Body]))); |
1839 | 276 |
qed "parts_insert_Crypt"; |
277 |
||
278 |
goal thy "parts (insert {|X,Y|} H) = \ |
|
279 |
\ insert {|X,Y|} (parts (insert X (insert Y H)))"; |
|
2032 | 280 |
by (rtac equalityI 1); |
281 |
by (rtac subsetI 1); |
|
282 |
by (etac parts.induct 1); |
|
1839 | 283 |
by (Auto_tac()); |
2032 | 284 |
by (etac parts.induct 1); |
2922 | 285 |
by (ALLGOALS (blast_tac (!claset addIs [parts.Fst, parts.Snd]))); |
1839 | 286 |
qed "parts_insert_MPair"; |
287 |
||
3668 | 288 |
Addsimps [parts_insert_Agent, parts_insert_Nonce, |
289 |
parts_insert_Number, parts_insert_Key, |
|
2373 | 290 |
parts_insert_Hash, parts_insert_Crypt, parts_insert_MPair]; |
1839 | 291 |
|
292 |
||
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
293 |
goal thy "parts (Key``N) = Key``N"; |
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
294 |
by (Auto_tac()); |
2032 | 295 |
by (etac parts.induct 1); |
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
296 |
by (Auto_tac()); |
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
297 |
qed "parts_image_Key"; |
3514
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
298 |
Addsimps [parts_image_Key]; |
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
299 |
|
3514
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
300 |
|
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
301 |
(*In any message, there is an upper bound N on its greatest nonce.*) |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
302 |
goal thy "EX N. ALL n. N<=n --> Nonce n ~: parts {msg}"; |
3668 | 303 |
by (induct_tac "msg" 1); |
304 |
by (induct_tac "atomic" 1); |
|
3514
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
305 |
by (ALLGOALS (asm_simp_tac (!simpset addsimps [exI, parts_insert2]))); |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
306 |
(*MPair case: blast_tac works out the necessary sum itself!*) |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
307 |
by (blast_tac (!claset addSEs [add_leE]) 2); |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
308 |
(*Nonce case*) |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
309 |
by (res_inst_tac [("x","N + Suc nat")] exI 1); |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
310 |
by (fast_tac (!claset addSEs [add_leE] addaltern trans_tac) 1); |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
311 |
qed "msg_Nonce_supply"; |
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
312 |
|
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
313 |
|
1913 | 314 |
(**** Inductive relation "analz" ****) |
1839 | 315 |
|
316 |
val major::prems = |
|
1913 | 317 |
goal thy "[| {|X,Y|} : analz H; \ |
318 |
\ [| X : analz H; Y : analz H |] ==> P \ |
|
1839 | 319 |
\ |] ==> P"; |
320 |
by (cut_facts_tac [major] 1); |
|
2032 | 321 |
by (resolve_tac prems 1); |
1913 | 322 |
by (REPEAT (eresolve_tac [asm_rl, analz.Fst, analz.Snd] 1)); |
323 |
qed "MPair_analz"; |
|
1839 | 324 |
|
1913 | 325 |
AddIs [analz.Inj]; |
2011 | 326 |
AddSEs [MPair_analz]; (*Perhaps it should NOT be deemed safe!*) |
1913 | 327 |
AddDs [analz.Decrypt]; |
1839 | 328 |
|
1913 | 329 |
Addsimps [analz.Inj]; |
1885 | 330 |
|
1913 | 331 |
goal thy "H <= analz(H)"; |
2891 | 332 |
by (Blast_tac 1); |
1913 | 333 |
qed "analz_increasing"; |
1839 | 334 |
|
1913 | 335 |
goal thy "analz H <= parts H"; |
1839 | 336 |
by (rtac subsetI 1); |
2032 | 337 |
by (etac analz.induct 1); |
2891 | 338 |
by (ALLGOALS Blast_tac); |
1913 | 339 |
qed "analz_subset_parts"; |
1839 | 340 |
|
1913 | 341 |
bind_thm ("not_parts_not_analz", analz_subset_parts RS contra_subsetD); |
1839 | 342 |
|
343 |
||
1913 | 344 |
goal thy "parts (analz H) = parts H"; |
2032 | 345 |
by (rtac equalityI 1); |
346 |
by (rtac (analz_subset_parts RS parts_mono RS subset_trans) 1); |
|
1839 | 347 |
by (Simp_tac 1); |
2891 | 348 |
by (blast_tac (!claset addIs [analz_increasing RS parts_mono RS subsetD]) 1); |
1913 | 349 |
qed "parts_analz"; |
350 |
Addsimps [parts_analz]; |
|
1839 | 351 |
|
1913 | 352 |
goal thy "analz (parts H) = parts H"; |
1885 | 353 |
by (Auto_tac()); |
2032 | 354 |
by (etac analz.induct 1); |
1885 | 355 |
by (Auto_tac()); |
1913 | 356 |
qed "analz_parts"; |
357 |
Addsimps [analz_parts]; |
|
1885 | 358 |
|
1839 | 359 |
(*Monotonicity; Lemma 1 of Lowe*) |
1913 | 360 |
goalw thy analz.defs "!!G H. G<=H ==> analz(G) <= analz(H)"; |
1839 | 361 |
by (rtac lfp_mono 1); |
362 |
by (REPEAT (ares_tac basic_monos 1)); |
|
1913 | 363 |
qed "analz_mono"; |
1839 | 364 |
|
2373 | 365 |
val analz_insertI = impOfSubs (subset_insertI RS analz_mono); |
366 |
||
1839 | 367 |
(** General equational properties **) |
368 |
||
1913 | 369 |
goal thy "analz{} = {}"; |
1839 | 370 |
by (Step_tac 1); |
2032 | 371 |
by (etac analz.induct 1); |
2891 | 372 |
by (ALLGOALS Blast_tac); |
1913 | 373 |
qed "analz_empty"; |
374 |
Addsimps [analz_empty]; |
|
1839 | 375 |
|
1913 | 376 |
(*Converse fails: we can analz more from the union than from the |
1839 | 377 |
separate parts, as a key in one might decrypt a message in the other*) |
1913 | 378 |
goal thy "analz(G) Un analz(H) <= analz(G Un H)"; |
379 |
by (REPEAT (ares_tac [Un_least, analz_mono, Un_upper1, Un_upper2] 1)); |
|
380 |
qed "analz_Un"; |
|
1839 | 381 |
|
1913 | 382 |
goal thy "insert X (analz H) <= analz(insert X H)"; |
2922 | 383 |
by (blast_tac (!claset addIs [impOfSubs analz_mono]) 1); |
1913 | 384 |
qed "analz_insert"; |
1839 | 385 |
|
386 |
(** Rewrite rules for pulling out atomic messages **) |
|
387 |
||
2373 | 388 |
fun analz_tac i = |
389 |
EVERY [rtac ([subsetI, analz_insert] MRS equalityI) i, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
390 |
etac analz.induct i, |
3102 | 391 |
REPEAT (Blast_tac i)]; |
2373 | 392 |
|
1913 | 393 |
goal thy "analz (insert (Agent agt) H) = insert (Agent agt) (analz H)"; |
2373 | 394 |
by (analz_tac 1); |
1913 | 395 |
qed "analz_insert_Agent"; |
1839 | 396 |
|
1913 | 397 |
goal thy "analz (insert (Nonce N) H) = insert (Nonce N) (analz H)"; |
2373 | 398 |
by (analz_tac 1); |
1913 | 399 |
qed "analz_insert_Nonce"; |
1839 | 400 |
|
3668 | 401 |
goal thy "analz (insert (Number N) H) = insert (Number N) (analz H)"; |
402 |
by (analz_tac 1); |
|
403 |
qed "analz_insert_Number"; |
|
404 |
||
2373 | 405 |
goal thy "analz (insert (Hash X) H) = insert (Hash X) (analz H)"; |
406 |
by (analz_tac 1); |
|
407 |
qed "analz_insert_Hash"; |
|
408 |
||
1839 | 409 |
(*Can only pull out Keys if they are not needed to decrypt the rest*) |
410 |
goalw thy [keysFor_def] |
|
1913 | 411 |
"!!K. K ~: keysFor (analz H) ==> \ |
412 |
\ analz (insert (Key K) H) = insert (Key K) (analz H)"; |
|
2373 | 413 |
by (analz_tac 1); |
1913 | 414 |
qed "analz_insert_Key"; |
1839 | 415 |
|
1913 | 416 |
goal thy "analz (insert {|X,Y|} H) = \ |
417 |
\ insert {|X,Y|} (analz (insert X (insert Y H)))"; |
|
2032 | 418 |
by (rtac equalityI 1); |
419 |
by (rtac subsetI 1); |
|
420 |
by (etac analz.induct 1); |
|
1885 | 421 |
by (Auto_tac()); |
2032 | 422 |
by (etac analz.induct 1); |
2922 | 423 |
by (ALLGOALS (blast_tac (!claset addIs [analz.Fst, analz.Snd]))); |
1913 | 424 |
qed "analz_insert_MPair"; |
1885 | 425 |
|
426 |
(*Can pull out enCrypted message if the Key is not known*) |
|
1913 | 427 |
goal thy "!!H. Key (invKey K) ~: analz H ==> \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
428 |
\ analz (insert (Crypt K X) H) = \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
429 |
\ insert (Crypt K X) (analz H)"; |
2373 | 430 |
by (analz_tac 1); |
1913 | 431 |
qed "analz_insert_Crypt"; |
1839 | 432 |
|
1913 | 433 |
goal thy "!!H. Key (invKey K) : analz H ==> \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
434 |
\ analz (insert (Crypt K X) H) <= \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
435 |
\ insert (Crypt K X) (analz (insert X H))"; |
2032 | 436 |
by (rtac subsetI 1); |
1913 | 437 |
by (eres_inst_tac [("za","x")] analz.induct 1); |
3102 | 438 |
by (ALLGOALS (Blast_tac)); |
1839 | 439 |
val lemma1 = result(); |
440 |
||
1913 | 441 |
goal thy "!!H. Key (invKey K) : analz H ==> \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
442 |
\ insert (Crypt K X) (analz (insert X H)) <= \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
443 |
\ analz (insert (Crypt K X) H)"; |
1839 | 444 |
by (Auto_tac()); |
1913 | 445 |
by (eres_inst_tac [("za","x")] analz.induct 1); |
1839 | 446 |
by (Auto_tac()); |
3449 | 447 |
by (blast_tac (!claset addIs [analz_insertI, analz.Decrypt]) 1); |
1839 | 448 |
val lemma2 = result(); |
449 |
||
1913 | 450 |
goal thy "!!H. Key (invKey K) : analz H ==> \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
451 |
\ analz (insert (Crypt K X) H) = \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
452 |
\ insert (Crypt K X) (analz (insert X H))"; |
1839 | 453 |
by (REPEAT (ares_tac [equalityI, lemma1, lemma2] 1)); |
1913 | 454 |
qed "analz_insert_Decrypt"; |
1839 | 455 |
|
1885 | 456 |
(*Case analysis: either the message is secure, or it is not! |
1946 | 457 |
Effective, but can cause subgoals to blow up! |
1885 | 458 |
Use with expand_if; apparently split_tac does not cope with patterns |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
459 |
such as "analz (insert (Crypt K X) H)" *) |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
460 |
goal thy "analz (insert (Crypt K X) H) = \ |
2154 | 461 |
\ (if (Key (invKey K) : analz H) \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
462 |
\ then insert (Crypt K X) (analz (insert X H)) \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
463 |
\ else insert (Crypt K X) (analz H))"; |
2102 | 464 |
by (case_tac "Key (invKey K) : analz H " 1); |
1913 | 465 |
by (ALLGOALS (asm_simp_tac (!simpset addsimps [analz_insert_Crypt, |
2032 | 466 |
analz_insert_Decrypt]))); |
1913 | 467 |
qed "analz_Crypt_if"; |
1885 | 468 |
|
3668 | 469 |
Addsimps [analz_insert_Agent, analz_insert_Nonce, |
470 |
analz_insert_Number, analz_insert_Key, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
471 |
analz_insert_Hash, analz_insert_MPair, analz_Crypt_if]; |
1839 | 472 |
|
473 |
(*This rule supposes "for the sake of argument" that we have the key.*) |
|
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
474 |
goal thy "analz (insert (Crypt K X) H) <= \ |
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
475 |
\ insert (Crypt K X) (analz (insert X H))"; |
2032 | 476 |
by (rtac subsetI 1); |
477 |
by (etac analz.induct 1); |
|
1839 | 478 |
by (Auto_tac()); |
1913 | 479 |
qed "analz_insert_Crypt_subset"; |
1839 | 480 |
|
481 |
||
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
482 |
goal thy "analz (Key``N) = Key``N"; |
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
483 |
by (Auto_tac()); |
2032 | 484 |
by (etac analz.induct 1); |
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
485 |
by (Auto_tac()); |
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
486 |
qed "analz_image_Key"; |
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
487 |
|
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
488 |
Addsimps [analz_image_Key]; |
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
489 |
|
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2011
diff
changeset
|
490 |
|
1839 | 491 |
(** Idempotence and transitivity **) |
492 |
||
1913 | 493 |
goal thy "!!H. X: analz (analz H) ==> X: analz H"; |
2032 | 494 |
by (etac analz.induct 1); |
2891 | 495 |
by (ALLGOALS Blast_tac); |
2922 | 496 |
qed "analz_analzD"; |
497 |
AddSDs [analz_analzD]; |
|
1839 | 498 |
|
1913 | 499 |
goal thy "analz (analz H) = analz H"; |
2891 | 500 |
by (Blast_tac 1); |
1913 | 501 |
qed "analz_idem"; |
502 |
Addsimps [analz_idem]; |
|
1839 | 503 |
|
1913 | 504 |
goal thy "!!H. [| X: analz G; G <= analz H |] ==> X: analz H"; |
505 |
by (dtac analz_mono 1); |
|
2891 | 506 |
by (Blast_tac 1); |
1913 | 507 |
qed "analz_trans"; |
1839 | 508 |
|
509 |
(*Cut; Lemma 2 of Lowe*) |
|
1998
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
510 |
goal thy "!!H. [| Y: analz (insert X H); X: analz H |] ==> Y: analz H"; |
2032 | 511 |
by (etac analz_trans 1); |
2891 | 512 |
by (Blast_tac 1); |
1913 | 513 |
qed "analz_cut"; |
1839 | 514 |
|
515 |
(*Cut can be proved easily by induction on |
|
1913 | 516 |
"!!H. Y: analz (insert X H) ==> X: analz H --> Y: analz H" |
1839 | 517 |
*) |
518 |
||
3449 | 519 |
(*This rewrite rule helps in the simplification of messages that involve |
520 |
the forwarding of unknown components (X). Without it, removing occurrences |
|
521 |
of X can be very complicated. *) |
|
3431 | 522 |
goal thy "!!H. X: analz H ==> analz (insert X H) = analz H"; |
523 |
by (blast_tac (!claset addIs [analz_cut, analz_insertI]) 1); |
|
524 |
qed "analz_insert_eq"; |
|
525 |
||
1885 | 526 |
|
1913 | 527 |
(** A congruence rule for "analz" **) |
1885 | 528 |
|
1913 | 529 |
goal thy "!!H. [| analz G <= analz G'; analz H <= analz H' \ |
530 |
\ |] ==> analz (G Un H) <= analz (G' Un H')"; |
|
1885 | 531 |
by (Step_tac 1); |
2032 | 532 |
by (etac analz.induct 1); |
1913 | 533 |
by (ALLGOALS (best_tac (!claset addIs [analz_mono RS subsetD]))); |
534 |
qed "analz_subset_cong"; |
|
1885 | 535 |
|
1913 | 536 |
goal thy "!!H. [| analz G = analz G'; analz H = analz H' \ |
537 |
\ |] ==> analz (G Un H) = analz (G' Un H')"; |
|
538 |
by (REPEAT_FIRST (ares_tac [equalityI, analz_subset_cong] |
|
2032 | 539 |
ORELSE' etac equalityE)); |
1913 | 540 |
qed "analz_cong"; |
1885 | 541 |
|
542 |
||
1913 | 543 |
goal thy "!!H. analz H = analz H' ==> analz(insert X H) = analz(insert X H')"; |
3583
5a47b869d16a
Had to remove {x.x=a} = a from !simpset in one proof.
nipkow
parents:
3519
diff
changeset
|
544 |
by (asm_simp_tac (!simpset addsimps [insert_def] delsimps [singleton_conv] |
2032 | 545 |
setloop (rtac analz_cong)) 1); |
1913 | 546 |
qed "analz_insert_cong"; |
1885 | 547 |
|
1913 | 548 |
(*If there are no pairs or encryptions then analz does nothing*) |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
549 |
goal thy "!!H. [| ALL X Y. {|X,Y|} ~: H; ALL X K. Crypt K X ~: H |] ==> \ |
1913 | 550 |
\ analz H = H"; |
1839 | 551 |
by (Step_tac 1); |
2032 | 552 |
by (etac analz.induct 1); |
2891 | 553 |
by (ALLGOALS Blast_tac); |
1913 | 554 |
qed "analz_trivial"; |
1839 | 555 |
|
556 |
(*Helps to prove Fake cases*) |
|
1913 | 557 |
goal thy "!!X. X: analz (UN i. analz (H i)) ==> X: analz (UN i. H i)"; |
2032 | 558 |
by (etac analz.induct 1); |
2922 | 559 |
by (ALLGOALS (blast_tac (!claset addIs [impOfSubs analz_mono]))); |
1839 | 560 |
val lemma = result(); |
561 |
||
1913 | 562 |
goal thy "analz (UN i. analz (H i)) = analz (UN i. H i)"; |
2922 | 563 |
by (blast_tac (!claset addIs [lemma, impOfSubs analz_mono]) 1); |
1913 | 564 |
qed "analz_UN_analz"; |
565 |
Addsimps [analz_UN_analz]; |
|
1839 | 566 |
|
567 |
||
1913 | 568 |
(**** Inductive relation "synth" ****) |
1839 | 569 |
|
1913 | 570 |
AddIs synth.intrs; |
1839 | 571 |
|
2011 | 572 |
(*Can only produce a nonce or key if it is already known, |
573 |
but can synth a pair or encryption from its components...*) |
|
3668 | 574 |
val mk_cases = synth.mk_cases (atomic.simps @ msg.simps); |
2011 | 575 |
|
3668 | 576 |
(*NO Agent_synth, as any Agent name can be synthesized. Ditto for Number*) |
2011 | 577 |
val Nonce_synth = mk_cases "Nonce n : synth H"; |
578 |
val Key_synth = mk_cases "Key K : synth H"; |
|
2373 | 579 |
val Hash_synth = mk_cases "Hash X : synth H"; |
2011 | 580 |
val MPair_synth = mk_cases "{|X,Y|} : synth H"; |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
581 |
val Crypt_synth = mk_cases "Crypt K X : synth H"; |
2011 | 582 |
|
2373 | 583 |
AddSEs [Nonce_synth, Key_synth, Hash_synth, MPair_synth, Crypt_synth]; |
2011 | 584 |
|
1913 | 585 |
goal thy "H <= synth(H)"; |
2891 | 586 |
by (Blast_tac 1); |
1913 | 587 |
qed "synth_increasing"; |
1839 | 588 |
|
589 |
(*Monotonicity*) |
|
1913 | 590 |
goalw thy synth.defs "!!G H. G<=H ==> synth(G) <= synth(H)"; |
1839 | 591 |
by (rtac lfp_mono 1); |
592 |
by (REPEAT (ares_tac basic_monos 1)); |
|
1913 | 593 |
qed "synth_mono"; |
1839 | 594 |
|
595 |
(** Unions **) |
|
596 |
||
1913 | 597 |
(*Converse fails: we can synth more from the union than from the |
1839 | 598 |
separate parts, building a compound message using elements of each.*) |
1913 | 599 |
goal thy "synth(G) Un synth(H) <= synth(G Un H)"; |
600 |
by (REPEAT (ares_tac [Un_least, synth_mono, Un_upper1, Un_upper2] 1)); |
|
601 |
qed "synth_Un"; |
|
1839 | 602 |
|
1913 | 603 |
goal thy "insert X (synth H) <= synth(insert X H)"; |
2922 | 604 |
by (blast_tac (!claset addIs [impOfSubs synth_mono]) 1); |
1913 | 605 |
qed "synth_insert"; |
1885 | 606 |
|
1839 | 607 |
(** Idempotence and transitivity **) |
608 |
||
1913 | 609 |
goal thy "!!H. X: synth (synth H) ==> X: synth H"; |
2032 | 610 |
by (etac synth.induct 1); |
2891 | 611 |
by (ALLGOALS Blast_tac); |
2922 | 612 |
qed "synth_synthD"; |
613 |
AddSDs [synth_synthD]; |
|
1839 | 614 |
|
1913 | 615 |
goal thy "synth (synth H) = synth H"; |
2891 | 616 |
by (Blast_tac 1); |
1913 | 617 |
qed "synth_idem"; |
1839 | 618 |
|
1913 | 619 |
goal thy "!!H. [| X: synth G; G <= synth H |] ==> X: synth H"; |
620 |
by (dtac synth_mono 1); |
|
2891 | 621 |
by (Blast_tac 1); |
1913 | 622 |
qed "synth_trans"; |
1839 | 623 |
|
624 |
(*Cut; Lemma 2 of Lowe*) |
|
1998
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
625 |
goal thy "!!H. [| Y: synth (insert X H); X: synth H |] ==> Y: synth H"; |
2032 | 626 |
by (etac synth_trans 1); |
2891 | 627 |
by (Blast_tac 1); |
1913 | 628 |
qed "synth_cut"; |
1839 | 629 |
|
1946 | 630 |
goal thy "Agent A : synth H"; |
2891 | 631 |
by (Blast_tac 1); |
1946 | 632 |
qed "Agent_synth"; |
633 |
||
3668 | 634 |
goal thy "Number n : synth H"; |
635 |
by (Blast_tac 1); |
|
636 |
qed "Number_synth"; |
|
637 |
||
1913 | 638 |
goal thy "(Nonce N : synth H) = (Nonce N : H)"; |
2891 | 639 |
by (Blast_tac 1); |
1913 | 640 |
qed "Nonce_synth_eq"; |
1839 | 641 |
|
1913 | 642 |
goal thy "(Key K : synth H) = (Key K : H)"; |
2891 | 643 |
by (Blast_tac 1); |
1913 | 644 |
qed "Key_synth_eq"; |
1839 | 645 |
|
2373 | 646 |
goal thy "!!K. Key K ~: H ==> (Crypt K X : synth H) = (Crypt K X : H)"; |
2891 | 647 |
by (Blast_tac 1); |
2011 | 648 |
qed "Crypt_synth_eq"; |
649 |
||
3668 | 650 |
Addsimps [Agent_synth, Number_synth, |
651 |
Nonce_synth_eq, Key_synth_eq, Crypt_synth_eq]; |
|
1839 | 652 |
|
653 |
||
654 |
goalw thy [keysFor_def] |
|
1913 | 655 |
"keysFor (synth H) = keysFor H Un invKey``{K. Key K : H}"; |
2891 | 656 |
by (Blast_tac 1); |
1913 | 657 |
qed "keysFor_synth"; |
658 |
Addsimps [keysFor_synth]; |
|
1839 | 659 |
|
660 |
||
1913 | 661 |
(*** Combinations of parts, analz and synth ***) |
1839 | 662 |
|
1913 | 663 |
goal thy "parts (synth H) = parts H Un synth H"; |
2032 | 664 |
by (rtac equalityI 1); |
665 |
by (rtac subsetI 1); |
|
666 |
by (etac parts.induct 1); |
|
1839 | 667 |
by (ALLGOALS |
2922 | 668 |
(blast_tac (!claset addIs ((synth_increasing RS parts_mono RS subsetD) |
2032 | 669 |
::parts.intrs)))); |
1913 | 670 |
qed "parts_synth"; |
671 |
Addsimps [parts_synth]; |
|
1839 | 672 |
|
2373 | 673 |
goal thy "analz (analz G Un H) = analz (G Un H)"; |
674 |
by (REPEAT_FIRST (resolve_tac [equalityI, analz_subset_cong])); |
|
675 |
by (ALLGOALS Simp_tac); |
|
676 |
qed "analz_analz_Un"; |
|
677 |
||
678 |
goal thy "analz (synth G Un H) = analz (G Un H) Un synth G"; |
|
2032 | 679 |
by (rtac equalityI 1); |
680 |
by (rtac subsetI 1); |
|
681 |
by (etac analz.induct 1); |
|
2922 | 682 |
by (blast_tac (!claset addIs [impOfSubs analz_mono]) 5); |
683 |
by (ALLGOALS (blast_tac (!claset addIs analz.intrs))); |
|
2373 | 684 |
qed "analz_synth_Un"; |
685 |
||
686 |
goal thy "analz (synth H) = analz H Un synth H"; |
|
687 |
by (cut_inst_tac [("H","{}")] analz_synth_Un 1); |
|
688 |
by (Full_simp_tac 1); |
|
1913 | 689 |
qed "analz_synth"; |
2373 | 690 |
Addsimps [analz_analz_Un, analz_synth_Un, analz_synth]; |
1839 | 691 |
|
2032 | 692 |
(*Hard to prove; still needed now that there's only one Spy?*) |
1913 | 693 |
goal thy "analz (UN i. synth (H i)) = \ |
694 |
\ analz (UN i. H i) Un (UN i. synth (H i))"; |
|
2032 | 695 |
by (rtac equalityI 1); |
696 |
by (rtac subsetI 1); |
|
697 |
by (etac analz.induct 1); |
|
2922 | 698 |
by (blast_tac |
699 |
(!claset addIs [impOfSubs synth_increasing, |
|
2032 | 700 |
impOfSubs analz_mono]) 5); |
2891 | 701 |
by (Blast_tac 1); |
702 |
by (blast_tac (!claset addIs [analz.Inj RS analz.Fst]) 1); |
|
703 |
by (blast_tac (!claset addIs [analz.Inj RS analz.Snd]) 1); |
|
704 |
by (blast_tac (!claset addIs [analz.Decrypt]) 1); |
|
1913 | 705 |
qed "analz_UN1_synth"; |
706 |
Addsimps [analz_UN1_synth]; |
|
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
707 |
|
1946 | 708 |
|
709 |
(** For reasoning about the Fake rule in traces **) |
|
710 |
||
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
711 |
goal thy "!!Y. X: G ==> parts(insert X H) <= parts G Un parts H"; |
2032 | 712 |
by (rtac ([parts_mono, parts_Un_subset2] MRS subset_trans) 1); |
2891 | 713 |
by (Blast_tac 1); |
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
714 |
qed "parts_insert_subset_Un"; |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
715 |
|
1946 | 716 |
(*More specifically for Fake*) |
717 |
goal thy "!!H. X: synth (analz G) ==> \ |
|
718 |
\ parts (insert X H) <= synth (analz G) Un parts G Un parts H"; |
|
2032 | 719 |
by (dtac parts_insert_subset_Un 1); |
1946 | 720 |
by (Full_simp_tac 1); |
2891 | 721 |
by (Blast_tac 1); |
1946 | 722 |
qed "Fake_parts_insert"; |
723 |
||
2061 | 724 |
goal thy |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
725 |
"!!H. [| Crypt K Y : parts (insert X H); X: synth (analz G); \ |
2061 | 726 |
\ Key K ~: analz G |] \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
727 |
\ ==> Crypt K Y : parts G Un parts H"; |
2061 | 728 |
by (dtac (impOfSubs Fake_parts_insert) 1); |
2170 | 729 |
by (assume_tac 1); |
3102 | 730 |
by (blast_tac (!claset addDs [impOfSubs analz_subset_parts]) 1); |
2061 | 731 |
qed "Crypt_Fake_parts_insert"; |
732 |
||
2373 | 733 |
goal thy "!!H. X: synth (analz G) ==> \ |
734 |
\ analz (insert X H) <= synth (analz G) Un analz (G Un H)"; |
|
735 |
by (rtac subsetI 1); |
|
736 |
by (subgoal_tac "x : analz (synth (analz G) Un H)" 1); |
|
2922 | 737 |
by (blast_tac (!claset addIs [impOfSubs analz_mono, |
738 |
impOfSubs (analz_mono RS synth_mono)]) 2); |
|
2373 | 739 |
by (Full_simp_tac 1); |
2891 | 740 |
by (Blast_tac 1); |
2373 | 741 |
qed "Fake_analz_insert"; |
742 |
||
2011 | 743 |
goal thy "(X: analz H & X: parts H) = (X: analz H)"; |
2891 | 744 |
by (blast_tac (!claset addIs [impOfSubs analz_subset_parts]) 1); |
2011 | 745 |
val analz_conj_parts = result(); |
746 |
||
747 |
goal thy "(X: analz H | X: parts H) = (X: parts H)"; |
|
2891 | 748 |
by (blast_tac (!claset addIs [impOfSubs analz_subset_parts]) 1); |
2011 | 749 |
val analz_disj_parts = result(); |
750 |
||
751 |
AddIffs [analz_conj_parts, analz_disj_parts]; |
|
752 |
||
1998
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
753 |
(*Without this equation, other rules for synth and analz would yield |
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
754 |
redundant cases*) |
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
755 |
goal thy "({|X,Y|} : synth (analz H)) = \ |
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
756 |
\ (X : synth (analz H) & Y : synth (analz H))"; |
2891 | 757 |
by (Blast_tac 1); |
1998
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
758 |
qed "MPair_synth_analz"; |
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
759 |
|
f8230821f1e8
Reordering of premises for cut theorems, and new law MPair_synth_analz
paulson
parents:
1994
diff
changeset
|
760 |
AddIffs [MPair_synth_analz]; |
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
761 |
|
2154 | 762 |
goal thy "!!K. [| Key K : analz H; Key (invKey K) : analz H |] \ |
2284
80ebd1a213fd
Swapped arguments of Crypt (for clarity and because it is conventional)
paulson
parents:
2170
diff
changeset
|
763 |
\ ==> (Crypt K X : synth (analz H)) = (X : synth (analz H))"; |
2891 | 764 |
by (Blast_tac 1); |
2154 | 765 |
qed "Crypt_synth_analz"; |
766 |
||
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
767 |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
768 |
goal thy "!!K. X ~: synth (analz H) \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
769 |
\ ==> (Hash{|X,Y|} : synth (analz H)) = (Hash{|X,Y|} : analz H)"; |
2891 | 770 |
by (Blast_tac 1); |
2373 | 771 |
qed "Hash_synth_analz"; |
772 |
Addsimps [Hash_synth_analz]; |
|
773 |
||
774 |
||
2484 | 775 |
(**** HPair: a combination of Hash and MPair ****) |
776 |
||
777 |
(*** Freeness ***) |
|
778 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
779 |
goalw thy [HPair_def] "Agent A ~= Hash[X] Y"; |
2484 | 780 |
by (Simp_tac 1); |
781 |
qed "Agent_neq_HPair"; |
|
782 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
783 |
goalw thy [HPair_def] "Nonce N ~= Hash[X] Y"; |
2484 | 784 |
by (Simp_tac 1); |
785 |
qed "Nonce_neq_HPair"; |
|
786 |
||
3668 | 787 |
goalw thy [HPair_def] "Number N ~= Hash[X] Y"; |
788 |
by (Simp_tac 1); |
|
789 |
qed "Number_neq_HPair"; |
|
790 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
791 |
goalw thy [HPair_def] "Key K ~= Hash[X] Y"; |
2484 | 792 |
by (Simp_tac 1); |
793 |
qed "Key_neq_HPair"; |
|
794 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
795 |
goalw thy [HPair_def] "Hash Z ~= Hash[X] Y"; |
2484 | 796 |
by (Simp_tac 1); |
797 |
qed "Hash_neq_HPair"; |
|
798 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
799 |
goalw thy [HPair_def] "Crypt K X' ~= Hash[X] Y"; |
2484 | 800 |
by (Simp_tac 1); |
801 |
qed "Crypt_neq_HPair"; |
|
802 |
||
3668 | 803 |
val HPair_neqs = [Agent_neq_HPair, Nonce_neq_HPair, Number_neq_HPair, |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
804 |
Key_neq_HPair, Hash_neq_HPair, Crypt_neq_HPair]; |
2484 | 805 |
|
806 |
AddIffs HPair_neqs; |
|
807 |
AddIffs (HPair_neqs RL [not_sym]); |
|
808 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
809 |
goalw thy [HPair_def] "(Hash[X'] Y' = Hash[X] Y) = (X' = X & Y'=Y)"; |
2484 | 810 |
by (Simp_tac 1); |
811 |
qed "HPair_eq"; |
|
812 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
813 |
goalw thy [HPair_def] "({|X',Y'|} = Hash[X] Y) = (X' = Hash{|X,Y|} & Y'=Y)"; |
2484 | 814 |
by (Simp_tac 1); |
815 |
qed "MPair_eq_HPair"; |
|
816 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
817 |
goalw thy [HPair_def] "(Hash[X] Y = {|X',Y'|}) = (X' = Hash{|X,Y|} & Y'=Y)"; |
2484 | 818 |
by (Auto_tac()); |
819 |
qed "HPair_eq_MPair"; |
|
820 |
||
821 |
AddIffs [HPair_eq, MPair_eq_HPair, HPair_eq_MPair]; |
|
822 |
||
823 |
||
824 |
(*** Specialized laws, proved in terms of those for Hash and MPair ***) |
|
825 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
826 |
goalw thy [HPair_def] "keysFor (insert (Hash[X] Y) H) = keysFor H"; |
2484 | 827 |
by (Simp_tac 1); |
828 |
qed "keysFor_insert_HPair"; |
|
829 |
||
830 |
goalw thy [HPair_def] |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
831 |
"parts (insert (Hash[X] Y) H) = \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
832 |
\ insert (Hash[X] Y) (insert (Hash{|X,Y|}) (parts (insert Y H)))"; |
2484 | 833 |
by (Simp_tac 1); |
834 |
qed "parts_insert_HPair"; |
|
835 |
||
836 |
goalw thy [HPair_def] |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
837 |
"analz (insert (Hash[X] Y) H) = \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
838 |
\ insert (Hash[X] Y) (insert (Hash{|X,Y|}) (analz (insert Y H)))"; |
2484 | 839 |
by (Simp_tac 1); |
840 |
qed "analz_insert_HPair"; |
|
841 |
||
842 |
goalw thy [HPair_def] "!!H. X ~: synth (analz H) \ |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
843 |
\ ==> (Hash[X] Y : synth (analz H)) = \ |
2484 | 844 |
\ (Hash {|X, Y|} : analz H & Y : synth (analz H))"; |
845 |
by (Simp_tac 1); |
|
2891 | 846 |
by (Blast_tac 1); |
2484 | 847 |
qed "HPair_synth_analz"; |
848 |
||
849 |
Addsimps [keysFor_insert_HPair, parts_insert_HPair, analz_insert_HPair, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
850 |
HPair_synth_analz, HPair_synth_analz]; |
2484 | 851 |
|
852 |
||
1929
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
853 |
(*We do NOT want Crypt... messages broken up in protocols!!*) |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
854 |
Delrules partsEs; |
f0839bab4b00
Working version of NS, messages 1-3, WITH INTERLEAVING
paulson
parents:
1913
diff
changeset
|
855 |
|
2327 | 856 |
|
857 |
(** Rewrites to push in Key and Crypt messages, so that other messages can |
|
858 |
be pulled out using the analz_insert rules **) |
|
859 |
||
860 |
fun insComm thy x y = read_instantiate_sg (sign_of thy) [("x",x), ("y",y)] |
|
861 |
insert_commute; |
|
862 |
||
863 |
val pushKeys = map (insComm thy "Key ?K") |
|
3668 | 864 |
["Agent ?C", "Nonce ?N", "Number ?N", |
865 |
"Hash ?X", "MPair ?X ?Y", "Crypt ?X ?K'"]; |
|
2327 | 866 |
|
867 |
val pushCrypts = map (insComm thy "Crypt ?X ?K") |
|
3668 | 868 |
["Agent ?C", "Nonce ?N", "Number ?N", |
869 |
"Hash ?X'", "MPair ?X' ?Y"]; |
|
2327 | 870 |
|
871 |
(*Cannot be added with Addsimps -- we don't always want to re-order messages*) |
|
872 |
val pushes = pushKeys@pushCrypts; |
|
873 |
||
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
874 |
|
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
875 |
(*** Tactics useful for many protocol proofs ***) |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
876 |
|
3470 | 877 |
(*Prove base case (subgoal i) and simplify others. A typical base case |
878 |
concerns Crypt K X ~: Key``shrK``lost and cannot be proved by rewriting |
|
879 |
alone.*) |
|
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
880 |
fun prove_simple_subgoals_tac i = |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
881 |
fast_tac (!claset addss (!simpset)) i THEN |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
882 |
ALLGOALS Asm_simp_tac; |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
883 |
|
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
884 |
fun Fake_parts_insert_tac i = |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
885 |
blast_tac (!claset addDs [impOfSubs analz_subset_parts, |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
886 |
impOfSubs Fake_parts_insert]) i; |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
887 |
|
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
888 |
(*Apply rules to break down assumptions of the form |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
889 |
Y : parts(insert X H) and Y : analz(insert X H) |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
3102
diff
changeset
|
890 |
*) |
2373 | 891 |
val Fake_insert_tac = |
892 |
dresolve_tac [impOfSubs Fake_analz_insert, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
893 |
impOfSubs Fake_parts_insert] THEN' |
2373 | 894 |
eresolve_tac [asm_rl, synth.Inj]; |
895 |
||
3449 | 896 |
(*Analysis of Fake cases. Also works for messages that forward unknown parts, |
897 |
but this application is no longer necessary if analz_insert_eq is used. |
|
2327 | 898 |
Abstraction over i is ESSENTIAL: it delays the dereferencing of claset |
899 |
DEPENDS UPON "X" REFERRING TO THE FRADULENT MESSAGE *) |
|
900 |
fun spy_analz_tac i = |
|
2373 | 901 |
DETERM |
902 |
(SELECT_GOAL |
|
903 |
(EVERY |
|
904 |
[ (*push in occurrences of X...*) |
|
905 |
(REPEAT o CHANGED) |
|
906 |
(res_inst_tac [("x1","X")] (insert_commute RS ssubst) 1), |
|
907 |
(*...allowing further simplifications*) |
|
908 |
simp_tac (!simpset setloop split_tac [expand_if]) 1, |
|
3476
1be4fee7606b
spy_analz_tac: Restored iffI to the list of rules used to break down
paulson
parents:
3470
diff
changeset
|
909 |
REPEAT (FIRSTGOAL (resolve_tac [allI,impI,notI,conjI,iffI])), |
2373 | 910 |
DEPTH_SOLVE |
911 |
(REPEAT (Fake_insert_tac 1) THEN Asm_full_simp_tac 1 |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
912 |
THEN |
3102 | 913 |
IF_UNSOLVED (Blast.depth_tac |
3650
282ffdc91884
Replacing impOfSubs analz_mono by analz_insertI should improve convergence
paulson
parents:
3583
diff
changeset
|
914 |
(!claset addIs [analz_insertI, |
3668 | 915 |
impOfSubs analz_subset_parts]) 4 1)) |
2373 | 916 |
]) i); |
2327 | 917 |
|
2415 | 918 |
(** Useful in many uniqueness proofs **) |
2327 | 919 |
fun ex_strip_tac i = REPEAT (swap_res_tac [exI, conjI] i) THEN |
920 |
assume_tac (i+1); |
|
921 |
||
2415 | 922 |
(*Apply the EX-ALL quantifification to prove uniqueness theorems in |
923 |
their standard form*) |
|
924 |
fun prove_unique_tac lemma = |
|
925 |
EVERY' [dtac lemma, |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
926 |
REPEAT o (mp_tac ORELSE' eresolve_tac [asm_rl,exE]), |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
927 |
(*Duplicate the assumption*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
928 |
forw_inst_tac [("psi", "ALL C.?P(C)")] asm_rl, |
3102 | 929 |
Blast.depth_tac (!claset addSDs [spec]) 0]; |
2415 | 930 |
|
2373 | 931 |
|
932 |
(*Needed occasionally with spy_analz_tac, e.g. in analz_insert_Key_newK*) |
|
933 |
goal Set.thy "A Un (B Un A) = B Un A"; |
|
2891 | 934 |
by (Blast_tac 1); |
2373 | 935 |
val Un_absorb3 = result(); |
936 |
Addsimps [Un_absorb3]; |
|
3514
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
937 |
|
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
938 |
(*By default only o_apply is built-in. But in the presence of eta-expansion |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
939 |
this means that some terms displayed as (f o g) will be rewritten, and others |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
940 |
will not!*) |
eb16b8e8d872
Moved some declarations to Message from Public and Shared
paulson
parents:
3476
diff
changeset
|
941 |
Addsimps [o_def]; |