author | paulson |
Tue, 01 Jul 1997 17:36:42 +0200 | |
changeset 3479 | 2aacd6f10654 |
parent 3472 | fb3c38c88c08 |
child 3512 | 9dcb4daa15e8 |
permissions | -rw-r--r-- |
2320 | 1 |
(* Title: HOL/Auth/Shared |
1934 | 2 |
ID: $Id$ |
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1996 University of Cambridge |
|
5 |
||
6 |
Theory of Shared Keys (common to all symmetric-key protocols) |
|
7 |
||
3472
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
8 |
Server keys; initial states of agents; freshness; function "sees" |
2032 | 9 |
*) |
10 |
||
1934 | 11 |
|
12 |
open Shared; |
|
13 |
||
1964 | 14 |
(*Holds because Friend is injective: thus cannot prove for all f*) |
15 |
goal thy "(Friend x : Friend``A) = (x:A)"; |
|
16 |
by (Auto_tac()); |
|
17 |
qed "Friend_image_eq"; |
|
18 |
Addsimps [Friend_image_eq]; |
|
19 |
||
1934 | 20 |
Addsimps [Un_insert_left, Un_insert_right]; |
21 |
||
22 |
(*By default only o_apply is built-in. But in the presence of eta-expansion |
|
23 |
this means that some terms displayed as (f o g) will be rewritten, and others |
|
24 |
will not!*) |
|
25 |
Addsimps [o_def]; |
|
26 |
||
3472
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
27 |
(*** Basic properties of shrK ***) |
1934 | 28 |
|
3472
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
29 |
(*Injectiveness: Agents' long-term keys are distinct.*) |
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
30 |
AddIffs [inj_shrK RS inj_eq]; |
2376
f5c61fd9b9b6
Temporary additions (random) for the nested Otway-Rees protocol
paulson
parents:
2320
diff
changeset
|
31 |
|
3472
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
32 |
(* invKey(shrK A) = shrK A *) |
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
33 |
Addsimps [rewrite_rule [isSymKey_def] isSym_keys]; |
2320 | 34 |
|
1934 | 35 |
(** Rewrites should not refer to initState(Friend i) |
36 |
-- not in normal form! **) |
|
37 |
||
2032 | 38 |
goalw thy [keysFor_def] "keysFor (parts (initState lost C)) = {}"; |
1934 | 39 |
by (agent.induct_tac "C" 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
40 |
by (Auto_tac ()); |
1934 | 41 |
qed "keysFor_parts_initState"; |
42 |
Addsimps [keysFor_parts_initState]; |
|
43 |
||
44 |
goalw thy [keysFor_def] "keysFor (Key``E) = {}"; |
|
45 |
by (Auto_tac ()); |
|
46 |
qed "keysFor_image_Key"; |
|
47 |
Addsimps [keysFor_image_Key]; |
|
48 |
||
2032 | 49 |
|
50 |
(*** Function "sees" ***) |
|
51 |
||
52 |
goal thy |
|
53 |
"!!evs. lost' <= lost ==> sees lost' A evs <= sees lost A evs"; |
|
54 |
by (list.induct_tac "evs" 1); |
|
55 |
by (agent.induct_tac "A" 1); |
|
56 |
by (event.induct_tac "a" 2); |
|
57 |
by (Auto_tac ()); |
|
58 |
qed "sees_mono"; |
|
59 |
||
1964 | 60 |
(*Agents see their own shared keys!*) |
2032 | 61 |
goal thy "A ~= Spy --> Key (shrK A) : sees lost A evs"; |
1934 | 62 |
by (list.induct_tac "evs" 1); |
63 |
by (agent.induct_tac "A" 1); |
|
2032 | 64 |
by (Auto_tac ()); |
65 |
qed_spec_mp "sees_own_shrK"; |
|
1934 | 66 |
|
2032 | 67 |
(*Spy sees shared keys of lost agents!*) |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
68 |
goal thy "!!A. A: lost ==> Key (shrK A) : sees lost Spy evs"; |
2032 | 69 |
by (list.induct_tac "evs" 1); |
70 |
by (Auto_tac()); |
|
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
71 |
qed "Spy_sees_lost"; |
1934 | 72 |
|
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
73 |
AddSIs [sees_own_shrK, Spy_sees_lost]; |
2032 | 74 |
|
75 |
(** Specialized rewrite rules for (sees lost A (Says...#evs)) **) |
|
2026
0df5a96bf77e
Last working version prior to introduction of "lost"
paulson
parents:
2012
diff
changeset
|
76 |
|
2078 | 77 |
goal thy "sees lost B (Says A B X # evs) = insert X (sees lost B evs)"; |
1934 | 78 |
by (Simp_tac 1); |
79 |
qed "sees_own"; |
|
80 |
||
2078 | 81 |
goal thy "!!A. Server ~= B ==> \ |
82 |
\ sees lost Server (Says A B X # evs) = sees lost Server evs"; |
|
1934 | 83 |
by (Asm_simp_tac 1); |
84 |
qed "sees_Server"; |
|
85 |
||
2078 | 86 |
goal thy "!!A. Friend i ~= B ==> \ |
87 |
\ sees lost (Friend i) (Says A B X # evs) = sees lost (Friend i) evs"; |
|
1934 | 88 |
by (Asm_simp_tac 1); |
89 |
qed "sees_Friend"; |
|
90 |
||
2032 | 91 |
goal thy "sees lost Spy (Says A B X # evs) = insert X (sees lost Spy evs)"; |
1934 | 92 |
by (Simp_tac 1); |
2032 | 93 |
qed "sees_Spy"; |
1934 | 94 |
|
2032 | 95 |
goal thy "sees lost A (Says A' B X # evs) <= insert X (sees lost A evs)"; |
1934 | 96 |
by (simp_tac (!simpset setloop split_tac [expand_if]) 1); |
2891 | 97 |
by (Blast_tac 1); |
1934 | 98 |
qed "sees_Says_subset_insert"; |
99 |
||
2032 | 100 |
goal thy "sees lost A evs <= sees lost A (Says A' B X # evs)"; |
1934 | 101 |
by (simp_tac (!simpset setloop split_tac [expand_if]) 1); |
2891 | 102 |
by (Blast_tac 1); |
1934 | 103 |
qed "sees_subset_sees_Says"; |
104 |
||
2132 | 105 |
(*Pushing Unions into parts. One of the agents A is B, and thus sees Y. |
2160 | 106 |
Once used to prove new_keys_not_seen; now obsolete.*) |
2032 | 107 |
goal thy "(UN A. parts (sees lost A (Says B C Y # evs))) = \ |
108 |
\ parts {Y} Un (UN A. parts (sees lost A evs))"; |
|
1934 | 109 |
by (Step_tac 1); |
2132 | 110 |
by (etac rev_mp 1); (*split_tac does not work on assumptions*) |
111 |
by (ALLGOALS |
|
3207 | 112 |
(fast_tac (!claset addss (!simpset addsimps [parts_Un, sees_Cons] |
2891 | 113 |
setloop split_tac [expand_if])))); |
1934 | 114 |
qed "UN_parts_sees_Says"; |
115 |
||
3465 | 116 |
goal thy "Says A B X : set evs --> X : sees lost Spy evs"; |
1934 | 117 |
by (list.induct_tac "evs" 1); |
118 |
by (Auto_tac ()); |
|
2032 | 119 |
qed_spec_mp "Says_imp_sees_Spy"; |
1934 | 120 |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
121 |
(*Use with addSEs to derive contradictions from old Says events containing |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
122 |
items known to be fresh*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
123 |
val sees_Spy_partsEs = make_elim (Says_imp_sees_Spy RS parts.Inj):: partsEs; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
124 |
|
3443 | 125 |
(*For not_lost_tac*) |
126 |
goal thy "!!A. [| Crypt (shrK A) X : analz (sees lost Spy evs); A: lost |] \ |
|
127 |
\ ==> X : analz (sees lost Spy evs)"; |
|
128 |
by (fast_tac (!claset addSDs [analz.Decrypt] addss (!simpset)) 1); |
|
129 |
qed "Crypt_Spy_analz_lost"; |
|
2072 | 130 |
|
3443 | 131 |
(*Prove that the agent is uncompromised by the confidentiality of |
132 |
a component of a message she's said.*) |
|
133 |
fun not_lost_tac s = |
|
134 |
case_tac ("(" ^ s ^ ") : lost") THEN' |
|
135 |
SELECT_GOAL |
|
136 |
(REPEAT_DETERM (dtac (Says_imp_sees_Spy RS analz.Inj) 1) THEN |
|
137 |
REPEAT_DETERM (etac MPair_analz 1) THEN |
|
138 |
THEN_BEST_FIRST |
|
139 |
(dres_inst_tac [("A", s)] Crypt_Spy_analz_lost 1 THEN assume_tac 1) |
|
140 |
(has_fewer_prems 1, size_of_thm) |
|
141 |
(Step_tac 1)); |
|
1934 | 142 |
|
2160 | 143 |
Addsimps [sees_own, sees_Server, sees_Friend, sees_Spy]; |
2032 | 144 |
Delsimps [sees_Cons]; (**** NOTE REMOVAL -- laws above are cleaner ****) |
1934 | 145 |
|
146 |
||
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
147 |
(*** Fresh nonces ***) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
148 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
149 |
goal thy "Nonce N ~: parts (initState lost B)"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
150 |
by (agent.induct_tac "B" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
151 |
by (Auto_tac ()); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
152 |
qed "Nonce_notin_initState"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
153 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
154 |
AddIffs [Nonce_notin_initState]; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
155 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
156 |
goalw thy [used_def] "!!X. X: parts (sees lost B evs) ==> X: used evs"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
157 |
by (etac (impOfSubs parts_mono) 1); |
2891 | 158 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
159 |
qed "usedI"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
160 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
161 |
AddIs [usedI]; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
162 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
163 |
(** Fresh keys never clash with long-term shared keys **) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
164 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
165 |
goal thy "Key (shrK A) : used evs"; |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
166 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
167 |
qed "shrK_in_used"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
168 |
AddIffs [shrK_in_used]; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
169 |
|
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
170 |
(*Used in parts_induct_tac and analz_Fake_tac to distinguish session keys |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
171 |
from long-term shared keys*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
172 |
goal thy "!!K. Key K ~: used evs ==> K ~: range shrK"; |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
173 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
174 |
qed "Key_not_used"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
175 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
176 |
(*A session key cannot clash with a long-term shared key*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
177 |
goal thy "!!K. K ~: range shrK ==> shrK B ~= K"; |
2891 | 178 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
179 |
qed "shrK_neq"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
180 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
181 |
Addsimps [Key_not_used, shrK_neq, shrK_neq RS not_sym]; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
182 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
183 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
184 |
goal thy "used (Says A B X # evs) = parts{X} Un used evs"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
185 |
by (simp_tac (!simpset addsimps [used_def, UN_parts_sees_Says]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
186 |
qed "used_Says"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
187 |
Addsimps [used_Says]; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
188 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
189 |
goal thy "used [] <= used l"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
190 |
by (list.induct_tac "l" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
191 |
by (event.induct_tac "a" 2); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
192 |
by (ALLGOALS Asm_simp_tac); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
193 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
194 |
qed "used_nil_subset"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
195 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
196 |
goal thy "used l <= used (l@l')"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
197 |
by (list.induct_tac "l" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
198 |
by (simp_tac (!simpset addsimps [used_nil_subset]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
199 |
by (event.induct_tac "a" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
200 |
by (Asm_simp_tac 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
201 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
202 |
qed "used_subset_append"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
203 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
204 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
205 |
(*** Supply fresh nonces for possibility theorems. ***) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
206 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
207 |
goalw thy [used_def] "EX N. ALL n. N<=n --> Nonce n ~: used evs"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
208 |
by (list.induct_tac "evs" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
209 |
by (res_inst_tac [("x","0")] exI 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
210 |
by (Step_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
211 |
by (Full_simp_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
212 |
(*Inductive step*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
213 |
by (event.induct_tac "a" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
214 |
by (full_simp_tac (!simpset addsimps [UN_parts_sees_Says]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
215 |
by (msg.induct_tac "msg" 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
216 |
by (ALLGOALS (asm_simp_tac (!simpset addsimps [exI, parts_insert2]))); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
217 |
by (Step_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
218 |
(*MPair case*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
219 |
by (res_inst_tac [("x","Na+Nb")] exI 2); |
2891 | 220 |
by (blast_tac (!claset addSEs [add_leE]) 2); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
221 |
(*Nonce case*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
222 |
by (res_inst_tac [("x","N + Suc nat")] exI 1); |
2637
e9b203f854ae
reflecting my recent changes of the simplifier and classical reasoner
oheimb
parents:
2516
diff
changeset
|
223 |
by (fast_tac (!claset addSEs [add_leE] addaltern trans_tac) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
224 |
val lemma = result(); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
225 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
226 |
goal thy "EX N. Nonce N ~: used evs"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
227 |
by (rtac (lemma RS exE) 1); |
2891 | 228 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
229 |
qed "Nonce_supply1"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
230 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
231 |
goal thy "EX N N'. Nonce N ~: used evs & Nonce N' ~: used evs' & N ~= N'"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
232 |
by (cut_inst_tac [("evs","evs")] lemma 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
233 |
by (cut_inst_tac [("evs","evs'")] lemma 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
234 |
by (Step_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
235 |
by (res_inst_tac [("x","N")] exI 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
236 |
by (res_inst_tac [("x","Suc (N+Na)")] exI 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
237 |
by (asm_simp_tac (!simpset addsimps [less_not_refl2 RS not_sym, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
238 |
le_add2, le_add1, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
239 |
le_eq_less_Suc RS sym]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
240 |
qed "Nonce_supply2"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
241 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
242 |
goal thy "EX N N' N''. Nonce N ~: used evs & Nonce N' ~: used evs' & \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
243 |
\ Nonce N'' ~: used evs'' & N ~= N' & N' ~= N'' & N ~= N''"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
244 |
by (cut_inst_tac [("evs","evs")] lemma 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
245 |
by (cut_inst_tac [("evs","evs'")] lemma 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
246 |
by (cut_inst_tac [("evs","evs''")] lemma 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
247 |
by (Step_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
248 |
by (res_inst_tac [("x","N")] exI 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
249 |
by (res_inst_tac [("x","Suc (N+Na)")] exI 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
250 |
by (res_inst_tac [("x","Suc (Suc (N+Na+Nb))")] exI 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
251 |
by (asm_simp_tac (!simpset addsimps [less_not_refl2 RS not_sym, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
252 |
le_add2, le_add1, |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
253 |
le_eq_less_Suc RS sym]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
254 |
by (rtac (less_trans RS less_not_refl2 RS not_sym) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
255 |
by (stac (le_eq_less_Suc RS sym) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
256 |
by (asm_simp_tac (!simpset addsimps [le_eq_less_Suc RS sym]) 2); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
257 |
by (REPEAT (rtac le_add1 1)); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
258 |
qed "Nonce_supply3"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
259 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
260 |
goal thy "Nonce (@ N. Nonce N ~: used evs) ~: used evs"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
261 |
by (rtac (lemma RS exE) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
262 |
by (rtac selectI 1); |
2891 | 263 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
264 |
qed "Nonce_supply"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
265 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
266 |
(*** Supply fresh keys for possibility theorems. ***) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
267 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
268 |
goal thy "EX K. Key K ~: used evs"; |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
269 |
by (rtac (Finites.emptyI RS Key_supply_ax RS exE) 1); |
2891 | 270 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
271 |
qed "Key_supply1"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
272 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
273 |
goal thy "EX K K'. Key K ~: used evs & Key K' ~: used evs' & K ~= K'"; |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
274 |
by (cut_inst_tac [("evs","evs")] (Finites.emptyI RS Key_supply_ax) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
275 |
by (etac exE 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
276 |
by (cut_inst_tac [("evs","evs'")] |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
277 |
(Finites.emptyI RS Finites.insertI RS Key_supply_ax) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
278 |
by (Auto_tac()); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
279 |
qed "Key_supply2"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
280 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
281 |
goal thy "EX K K' K''. Key K ~: used evs & Key K' ~: used evs' & \ |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
282 |
\ Key K'' ~: used evs'' & K ~= K' & K' ~= K'' & K ~= K''"; |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
283 |
by (cut_inst_tac [("evs","evs")] (Finites.emptyI RS Key_supply_ax) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
284 |
by (etac exE 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
285 |
by (cut_inst_tac [("evs","evs'")] |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
286 |
(Finites.emptyI RS Finites.insertI RS Key_supply_ax) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
287 |
by (etac exE 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
288 |
by (cut_inst_tac [("evs","evs''")] |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
289 |
(Finites.emptyI RS Finites.insertI RS Finites.insertI RS Key_supply_ax) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
290 |
by (Step_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
291 |
by (Full_simp_tac 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
292 |
by (fast_tac (!claset addSEs [allE]) 1); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
293 |
qed "Key_supply3"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
294 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
295 |
goal thy "Key (@ K. Key K ~: used evs) ~: used evs"; |
3414
804c8a178a7f
Modified a few defs and proofs because of the changes to theory Finite.thy.
nipkow
parents:
3207
diff
changeset
|
296 |
by (rtac (Finites.emptyI RS Key_supply_ax RS exE) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
297 |
by (rtac selectI 1); |
2891 | 298 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
299 |
qed "Key_supply"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
300 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
301 |
(*** Tactics for possibility theorems ***) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
302 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
303 |
val possibility_tac = |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
304 |
REPEAT (*omit used_Says so that Nonces, Keys start from different traces!*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
305 |
(ALLGOALS (simp_tac |
2637
e9b203f854ae
reflecting my recent changes of the simplifier and classical reasoner
oheimb
parents:
2516
diff
changeset
|
306 |
(!simpset delsimps [used_Says] setSolver safe_solver)) |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
307 |
THEN |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
308 |
REPEAT_FIRST (eq_assume_tac ORELSE' |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
309 |
resolve_tac [refl, conjI, Nonce_supply, Key_supply])); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
310 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
311 |
(*For harder protocols (such as Recur) where we have to set up some |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
312 |
nonces and keys initially*) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
313 |
val basic_possibility_tac = |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
314 |
REPEAT |
2637
e9b203f854ae
reflecting my recent changes of the simplifier and classical reasoner
oheimb
parents:
2516
diff
changeset
|
315 |
(ALLGOALS (asm_simp_tac (!simpset setSolver safe_solver)) |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
316 |
THEN |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
317 |
REPEAT_FIRST (resolve_tac [refl, conjI])); |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
318 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
319 |
|
2049
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
320 |
(** Power of the Spy **) |
1934 | 321 |
|
2049
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
322 |
(*The Spy can see more than anybody else, except for their initial state*) |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
323 |
goal thy "sees lost A evs <= initState lost A Un sees lost Spy evs"; |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
324 |
by (list.induct_tac "evs" 1); |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
325 |
by (event.induct_tac "a" 2); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
326 |
by (ALLGOALS Asm_simp_tac); |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
327 |
by (ALLGOALS (blast_tac (!claset addDs [sees_Says_subset_insert RS subsetD]))); |
2049
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
328 |
qed "sees_agent_subset_sees_Spy"; |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
329 |
|
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
330 |
(*The Spy can see more than anybody else who's lost their key!*) |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
331 |
goal thy "A: lost --> A ~= Server --> sees lost A evs <= sees lost Spy evs"; |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
332 |
by (list.induct_tac "evs" 1); |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
333 |
by (event.induct_tac "a" 2); |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
334 |
by (agent.induct_tac "A" 1); |
3121
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
335 |
by (ALLGOALS Asm_simp_tac); |
cbb6c0c1c58a
Conversion to use blast_tac (with other improvements)
paulson
parents:
2922
diff
changeset
|
336 |
by (ALLGOALS (blast_tac (!claset addDs [sees_Says_subset_insert RS subsetD]))); |
2049
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
337 |
qed_spec_mp "sees_lost_agent_subset_sees_Spy"; |
d3b93e1765bc
Moved sees_lost_agent_subset_sees_Spy to common file
paulson
parents:
2045
diff
changeset
|
338 |
|
1934 | 339 |
|
2032 | 340 |
(** Simplifying parts (insert X (sees lost A evs)) |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
341 |
= parts {X} Un parts (sees lost A evs) -- since general case loops*) |
2012 | 342 |
|
343 |
val parts_insert_sees = |
|
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
344 |
parts_insert |> read_instantiate_sg (sign_of thy) |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
345 |
[("H", "sees lost A evs")] |
2012 | 346 |
|> standard; |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
347 |
|
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
348 |
|
3472
fb3c38c88c08
Deleted the obsolete operators newK, newN and nPair
paulson
parents:
3465
diff
changeset
|
349 |
(*** Specialized rewriting for analz_insert_freshK ***) |
2320 | 350 |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
351 |
goal thy "!!A. A <= Compl (range shrK) ==> shrK x ~: A"; |
2891 | 352 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
353 |
qed "subset_Compl_range"; |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
354 |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
355 |
goal thy "insert (Key K) H = Key `` {K} Un H"; |
2891 | 356 |
by (Blast_tac 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
357 |
qed "insert_Key_singleton"; |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
358 |
|
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
359 |
goal thy "insert (Key K) (Key``KK Un C) = Key `` (insert K KK) Un C"; |
2891 | 360 |
by (Blast_tac 1); |
361 |
qed "insert_Key_image"; |
|
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
362 |
|
3451
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3443
diff
changeset
|
363 |
(*Reverse the normal simplification of "image" to build up (not break down) |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3443
diff
changeset
|
364 |
the set of keys. Use analz_insert_eq with (Un_upper2 RS analz_mono) to |
d10f100676d8
Made proofs more concise by replacing calls to spy_analz_tac by uses of
paulson
parents:
3443
diff
changeset
|
365 |
erase occurrences of forwarded message components (X).*) |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
366 |
val analz_image_freshK_ss = |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
367 |
!simpset delsimps [image_insert, image_Un] |
3479
2aacd6f10654
Reordered rules in analz_image_freshK_ss to improve clarity
paulson
parents:
3472
diff
changeset
|
368 |
addsimps ([image_insert RS sym, image_Un RS sym, |
2aacd6f10654
Reordered rules in analz_image_freshK_ss to improve clarity
paulson
parents:
3472
diff
changeset
|
369 |
analz_insert_eq, impOfSubs (Un_upper2 RS analz_mono), |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
370 |
insert_Key_singleton, subset_Compl_range, |
3479
2aacd6f10654
Reordered rules in analz_image_freshK_ss to improve clarity
paulson
parents:
3472
diff
changeset
|
371 |
Key_not_used, insert_Key_image, Un_assoc RS sym] |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
372 |
@disj_comms) |
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
373 |
setloop split_tac [expand_if]; |
2045
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
374 |
|
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
375 |
(*Lemma for the trivial direction of the if-and-only-if*) |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
376 |
goal thy |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
377 |
"!!evs. (Key K : analz (Key``nE Un H)) --> (K : nE | Key K : analz H) ==> \ |
ae1030e66745
Removed some dead wood. Transferred lemmas used to prove analz_image_newK
paulson
parents:
2032
diff
changeset
|
378 |
\ (Key K : analz (Key``nE Un H)) = (K : nE | Key K : analz H)"; |
2922 | 379 |
by (blast_tac (!claset addIs [impOfSubs analz_mono]) 1); |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2451
diff
changeset
|
380 |
qed "analz_image_freshK_lemma"; |