author | haftmann |
Fri, 09 Mar 2007 08:45:55 +0100 | |
changeset 22424 | 8a5412121687 |
parent 21588 | cd0dc678a205 |
child 22843 | 189e214845dd |
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 |
||
13956 | 10 |
header{*Theory of Agents and Messages for Security Protocols*} |
11 |
||
16417 | 12 |
theory Message imports Main begin |
11189 | 13 |
|
14 |
(*Needed occasionally with spy_analz_tac, e.g. in analz_insert_Key_newK*) |
|
13926 | 15 |
lemma [simp] : "A \<union> (B \<union> A) = B \<union> A" |
11189 | 16 |
by blast |
1839 | 17 |
|
18 |
types |
|
19 |
key = nat |
|
20 |
||
21 |
consts |
|
14126
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
22 |
all_symmetric :: bool --{*true if all keys are symmetric*} |
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
23 |
invKey :: "key=>key" --{*inverse of a symmetric key*} |
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
24 |
|
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
25 |
specification (invKey) |
14181 | 26 |
invKey [simp]: "invKey (invKey K) = K" |
27 |
invKey_symmetric: "all_symmetric --> invKey = id" |
|
14126
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
28 |
by (rule exI [of _ id], auto) |
1839 | 29 |
|
14126
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
30 |
|
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
31 |
text{*The inverse of a symmetric key is itself; that of a public key |
28824746d046
Tidying and replacement of some axioms by specifications
paulson
parents:
13956
diff
changeset
|
32 |
is the private key and vice versa*} |
1839 | 33 |
|
34 |
constdefs |
|
11230
756c5034f08b
misc tidying; changing the predicate isSymKey to the set symKeys
paulson
parents:
11192
diff
changeset
|
35 |
symKeys :: "key set" |
756c5034f08b
misc tidying; changing the predicate isSymKey to the set symKeys
paulson
parents:
11192
diff
changeset
|
36 |
"symKeys == {K. invKey K = K}" |
1839 | 37 |
|
16818 | 38 |
datatype --{*We allow any number of friendly agents*} |
2032 | 39 |
agent = Server | Friend nat | Spy |
1839 | 40 |
|
3668 | 41 |
datatype |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
42 |
msg = Agent agent --{*Agent names*} |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
43 |
| Number nat --{*Ordinary integers, timestamps, ...*} |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
44 |
| Nonce nat --{*Unguessable nonces*} |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
45 |
| Key key --{*Crypto keys*} |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
46 |
| Hash msg --{*Hashing*} |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
47 |
| MPair msg msg --{*Compound messages*} |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
48 |
| Crypt key msg --{*Encryption, public- or shared-key*} |
1839 | 49 |
|
5234 | 50 |
|
16818 | 51 |
text{*Concrete syntax: messages appear as {|A,B,NA|}, etc...*} |
5234 | 52 |
syntax |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
53 |
"@MTuple" :: "['a, args] => 'a * 'b" ("(2{|_,/ _|})") |
1839 | 54 |
|
9686 | 55 |
syntax (xsymbols) |
11189 | 56 |
"@MTuple" :: "['a, args] => 'a * 'b" ("(2\<lbrace>_,/ _\<rbrace>)") |
9686 | 57 |
|
1839 | 58 |
translations |
59 |
"{|x, y, z|}" == "{|x, {|y, z|}|}" |
|
60 |
"{|x, y|}" == "MPair x y" |
|
61 |
||
62 |
||
2484 | 63 |
constdefs |
11189 | 64 |
HPair :: "[msg,msg] => msg" ("(4Hash[_] /_)" [0, 1000]) |
16818 | 65 |
--{*Message Y paired with a MAC computed with the help of X*} |
2516
4d68fbe6378b
Now with Andy Gordon's treatment of freshness to replace newN/K
paulson
parents:
2484
diff
changeset
|
66 |
"Hash[X] Y == {| Hash{|X,Y|}, Y|}" |
2484 | 67 |
|
11189 | 68 |
keysFor :: "msg set => key set" |
16818 | 69 |
--{*Keys useful to decrypt elements of a message set*} |
11192 | 70 |
"keysFor H == invKey ` {K. \<exists>X. Crypt K X \<in> H}" |
1839 | 71 |
|
16818 | 72 |
|
73 |
subsubsection{*Inductive Definition of All Parts" of a Message*} |
|
1839 | 74 |
|
11189 | 75 |
consts parts :: "msg set => msg set" |
1839 | 76 |
inductive "parts H" |
11189 | 77 |
intros |
11192 | 78 |
Inj [intro]: "X \<in> H ==> X \<in> parts H" |
79 |
Fst: "{|X,Y|} \<in> parts H ==> X \<in> parts H" |
|
80 |
Snd: "{|X,Y|} \<in> parts H ==> Y \<in> parts H" |
|
81 |
Body: "Crypt K X \<in> parts H ==> X \<in> parts H" |
|
11189 | 82 |
|
83 |
||
16818 | 84 |
text{*Monotonicity*} |
85 |
lemma parts_mono: "G \<subseteq> H ==> parts(G) \<subseteq> parts(H)" |
|
11189 | 86 |
apply auto |
87 |
apply (erule parts.induct) |
|
16818 | 88 |
apply (blast dest: parts.Fst parts.Snd parts.Body)+ |
11189 | 89 |
done |
1839 | 90 |
|
91 |
||
16818 | 92 |
text{*Equations hold because constructors are injective.*} |
13926 | 93 |
lemma Friend_image_eq [simp]: "(Friend x \<in> Friend`A) = (x:A)" |
94 |
by auto |
|
95 |
||
96 |
lemma Key_image_eq [simp]: "(Key x \<in> Key`A) = (x\<in>A)" |
|
97 |
by auto |
|
98 |
||
99 |
lemma Nonce_Key_image_eq [simp]: "(Nonce x \<notin> Key`A)" |
|
100 |
by auto |
|
101 |
||
102 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
103 |
subsubsection{*Inverse of keys *} |
13926 | 104 |
|
105 |
lemma invKey_eq [simp]: "(invKey K = invKey K') = (K=K')" |
|
106 |
apply safe |
|
107 |
apply (drule_tac f = invKey in arg_cong, simp) |
|
108 |
done |
|
109 |
||
110 |
||
111 |
subsection{*keysFor operator*} |
|
112 |
||
113 |
lemma keysFor_empty [simp]: "keysFor {} = {}" |
|
114 |
by (unfold keysFor_def, blast) |
|
115 |
||
116 |
lemma keysFor_Un [simp]: "keysFor (H \<union> H') = keysFor H \<union> keysFor H'" |
|
117 |
by (unfold keysFor_def, blast) |
|
118 |
||
119 |
lemma keysFor_UN [simp]: "keysFor (\<Union>i\<in>A. H i) = (\<Union>i\<in>A. keysFor (H i))" |
|
120 |
by (unfold keysFor_def, blast) |
|
121 |
||
16818 | 122 |
text{*Monotonicity*} |
123 |
lemma keysFor_mono: "G \<subseteq> H ==> keysFor(G) \<subseteq> keysFor(H)" |
|
13926 | 124 |
by (unfold keysFor_def, blast) |
125 |
||
126 |
lemma keysFor_insert_Agent [simp]: "keysFor (insert (Agent A) H) = keysFor H" |
|
127 |
by (unfold keysFor_def, auto) |
|
128 |
||
129 |
lemma keysFor_insert_Nonce [simp]: "keysFor (insert (Nonce N) H) = keysFor H" |
|
130 |
by (unfold keysFor_def, auto) |
|
131 |
||
132 |
lemma keysFor_insert_Number [simp]: "keysFor (insert (Number N) H) = keysFor H" |
|
133 |
by (unfold keysFor_def, auto) |
|
134 |
||
135 |
lemma keysFor_insert_Key [simp]: "keysFor (insert (Key K) H) = keysFor H" |
|
136 |
by (unfold keysFor_def, auto) |
|
137 |
||
138 |
lemma keysFor_insert_Hash [simp]: "keysFor (insert (Hash X) H) = keysFor H" |
|
139 |
by (unfold keysFor_def, auto) |
|
140 |
||
141 |
lemma keysFor_insert_MPair [simp]: "keysFor (insert {|X,Y|} H) = keysFor H" |
|
142 |
by (unfold keysFor_def, auto) |
|
143 |
||
144 |
lemma keysFor_insert_Crypt [simp]: |
|
145 |
"keysFor (insert (Crypt K X) H) = insert (invKey K) (keysFor H)" |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
146 |
by (unfold keysFor_def, auto) |
13926 | 147 |
|
148 |
lemma keysFor_image_Key [simp]: "keysFor (Key`E) = {}" |
|
149 |
by (unfold keysFor_def, auto) |
|
150 |
||
151 |
lemma Crypt_imp_invKey_keysFor: "Crypt K X \<in> H ==> invKey K \<in> keysFor H" |
|
152 |
by (unfold keysFor_def, blast) |
|
153 |
||
154 |
||
155 |
subsection{*Inductive relation "parts"*} |
|
156 |
||
157 |
lemma MPair_parts: |
|
158 |
"[| {|X,Y|} \<in> parts H; |
|
159 |
[| X \<in> parts H; Y \<in> parts H |] ==> P |] ==> P" |
|
160 |
by (blast dest: parts.Fst parts.Snd) |
|
161 |
||
162 |
declare MPair_parts [elim!] parts.Body [dest!] |
|
163 |
text{*NB These two rules are UNSAFE in the formal sense, as they discard the |
|
164 |
compound message. They work well on THIS FILE. |
|
165 |
@{text MPair_parts} is left as SAFE because it speeds up proofs. |
|
166 |
The Crypt rule is normally kept UNSAFE to avoid breaking up certificates.*} |
|
167 |
||
168 |
lemma parts_increasing: "H \<subseteq> parts(H)" |
|
169 |
by blast |
|
170 |
||
171 |
lemmas parts_insertI = subset_insertI [THEN parts_mono, THEN subsetD, standard] |
|
172 |
||
173 |
lemma parts_empty [simp]: "parts{} = {}" |
|
174 |
apply safe |
|
175 |
apply (erule parts.induct, blast+) |
|
176 |
done |
|
177 |
||
178 |
lemma parts_emptyE [elim!]: "X\<in> parts{} ==> P" |
|
179 |
by simp |
|
180 |
||
16818 | 181 |
text{*WARNING: loops if H = {Y}, therefore must not be repeated!*} |
13926 | 182 |
lemma parts_singleton: "X\<in> parts H ==> \<exists>Y\<in>H. X\<in> parts {Y}" |
183 |
by (erule parts.induct, blast+) |
|
184 |
||
185 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
186 |
subsubsection{*Unions *} |
13926 | 187 |
|
188 |
lemma parts_Un_subset1: "parts(G) \<union> parts(H) \<subseteq> parts(G \<union> H)" |
|
189 |
by (intro Un_least parts_mono Un_upper1 Un_upper2) |
|
190 |
||
191 |
lemma parts_Un_subset2: "parts(G \<union> H) \<subseteq> parts(G) \<union> parts(H)" |
|
192 |
apply (rule subsetI) |
|
193 |
apply (erule parts.induct, blast+) |
|
194 |
done |
|
195 |
||
196 |
lemma parts_Un [simp]: "parts(G \<union> H) = parts(G) \<union> parts(H)" |
|
197 |
by (intro equalityI parts_Un_subset1 parts_Un_subset2) |
|
198 |
||
199 |
lemma parts_insert: "parts (insert X H) = parts {X} \<union> parts H" |
|
200 |
apply (subst insert_is_Un [of _ H]) |
|
201 |
apply (simp only: parts_Un) |
|
202 |
done |
|
203 |
||
16818 | 204 |
text{*TWO inserts to avoid looping. This rewrite is better than nothing. |
205 |
Not suitable for Addsimps: its behaviour can be strange.*} |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
206 |
lemma parts_insert2: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
207 |
"parts (insert X (insert Y H)) = parts {X} \<union> parts {Y} \<union> parts H" |
13926 | 208 |
apply (simp add: Un_assoc) |
209 |
apply (simp add: parts_insert [symmetric]) |
|
210 |
done |
|
211 |
||
212 |
lemma parts_UN_subset1: "(\<Union>x\<in>A. parts(H x)) \<subseteq> parts(\<Union>x\<in>A. H x)" |
|
213 |
by (intro UN_least parts_mono UN_upper) |
|
214 |
||
215 |
lemma parts_UN_subset2: "parts(\<Union>x\<in>A. H x) \<subseteq> (\<Union>x\<in>A. parts(H x))" |
|
216 |
apply (rule subsetI) |
|
217 |
apply (erule parts.induct, blast+) |
|
218 |
done |
|
219 |
||
220 |
lemma parts_UN [simp]: "parts(\<Union>x\<in>A. H x) = (\<Union>x\<in>A. parts(H x))" |
|
221 |
by (intro equalityI parts_UN_subset1 parts_UN_subset2) |
|
222 |
||
16818 | 223 |
text{*Added to simplify arguments to parts, analz and synth. |
224 |
NOTE: the UN versions are no longer used!*} |
|
13926 | 225 |
|
226 |
||
227 |
text{*This allows @{text blast} to simplify occurrences of |
|
228 |
@{term "parts(G\<union>H)"} in the assumption.*} |
|
17729 | 229 |
lemmas in_parts_UnE = parts_Un [THEN equalityD1, THEN subsetD, THEN UnE] |
230 |
declare in_parts_UnE [elim!] |
|
13926 | 231 |
|
232 |
||
233 |
lemma parts_insert_subset: "insert X (parts H) \<subseteq> parts(insert X H)" |
|
234 |
by (blast intro: parts_mono [THEN [2] rev_subsetD]) |
|
235 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
236 |
subsubsection{*Idempotence and transitivity *} |
13926 | 237 |
|
238 |
lemma parts_partsD [dest!]: "X\<in> parts (parts H) ==> X\<in> parts H" |
|
239 |
by (erule parts.induct, blast+) |
|
240 |
||
241 |
lemma parts_idem [simp]: "parts (parts H) = parts H" |
|
242 |
by blast |
|
243 |
||
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
244 |
lemma parts_subset_iff [simp]: "(parts G \<subseteq> parts H) = (G \<subseteq> parts H)" |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
245 |
apply (rule iffI) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
246 |
apply (iprover intro: subset_trans parts_increasing) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
247 |
apply (frule parts_mono, simp) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
248 |
done |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
249 |
|
13926 | 250 |
lemma parts_trans: "[| X\<in> parts G; G \<subseteq> parts H |] ==> X\<in> parts H" |
251 |
by (drule parts_mono, blast) |
|
252 |
||
16818 | 253 |
text{*Cut*} |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
254 |
lemma parts_cut: |
18492 | 255 |
"[| Y\<in> parts (insert X G); X\<in> parts H |] ==> Y\<in> parts (G \<union> H)" |
256 |
by (blast intro: parts_trans) |
|
257 |
||
13926 | 258 |
|
259 |
lemma parts_cut_eq [simp]: "X\<in> parts H ==> parts (insert X H) = parts H" |
|
260 |
by (force dest!: parts_cut intro: parts_insertI) |
|
261 |
||
262 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
263 |
subsubsection{*Rewrite rules for pulling out atomic messages *} |
13926 | 264 |
|
265 |
lemmas parts_insert_eq_I = equalityI [OF subsetI parts_insert_subset] |
|
266 |
||
267 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
268 |
lemma parts_insert_Agent [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
269 |
"parts (insert (Agent agt) H) = insert (Agent agt) (parts H)" |
13926 | 270 |
apply (rule parts_insert_eq_I) |
271 |
apply (erule parts.induct, auto) |
|
272 |
done |
|
273 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
274 |
lemma parts_insert_Nonce [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
275 |
"parts (insert (Nonce N) H) = insert (Nonce N) (parts H)" |
13926 | 276 |
apply (rule parts_insert_eq_I) |
277 |
apply (erule parts.induct, auto) |
|
278 |
done |
|
279 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
280 |
lemma parts_insert_Number [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
281 |
"parts (insert (Number N) H) = insert (Number N) (parts H)" |
13926 | 282 |
apply (rule parts_insert_eq_I) |
283 |
apply (erule parts.induct, auto) |
|
284 |
done |
|
285 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
286 |
lemma parts_insert_Key [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
287 |
"parts (insert (Key K) H) = insert (Key K) (parts H)" |
13926 | 288 |
apply (rule parts_insert_eq_I) |
289 |
apply (erule parts.induct, auto) |
|
290 |
done |
|
291 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
292 |
lemma parts_insert_Hash [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
293 |
"parts (insert (Hash X) H) = insert (Hash X) (parts H)" |
13926 | 294 |
apply (rule parts_insert_eq_I) |
295 |
apply (erule parts.induct, auto) |
|
296 |
done |
|
297 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
298 |
lemma parts_insert_Crypt [simp]: |
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
299 |
"parts (insert (Crypt K X) H) = insert (Crypt K X) (parts (insert X H))" |
13926 | 300 |
apply (rule equalityI) |
301 |
apply (rule subsetI) |
|
302 |
apply (erule parts.induct, auto) |
|
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
303 |
apply (blast intro: parts.Body) |
13926 | 304 |
done |
305 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
306 |
lemma parts_insert_MPair [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
307 |
"parts (insert {|X,Y|} H) = |
13926 | 308 |
insert {|X,Y|} (parts (insert X (insert Y H)))" |
309 |
apply (rule equalityI) |
|
310 |
apply (rule subsetI) |
|
311 |
apply (erule parts.induct, auto) |
|
312 |
apply (blast intro: parts.Fst parts.Snd)+ |
|
313 |
done |
|
314 |
||
315 |
lemma parts_image_Key [simp]: "parts (Key`N) = Key`N" |
|
316 |
apply auto |
|
317 |
apply (erule parts.induct, auto) |
|
318 |
done |
|
319 |
||
320 |
||
16818 | 321 |
text{*In any message, there is an upper bound N on its greatest nonce.*} |
13926 | 322 |
lemma msg_Nonce_supply: "\<exists>N. \<forall>n. N\<le>n --> Nonce n \<notin> parts {msg}" |
323 |
apply (induct_tac "msg") |
|
324 |
apply (simp_all (no_asm_simp) add: exI parts_insert2) |
|
16818 | 325 |
txt{*MPair case: blast works out the necessary sum itself!*} |
22424 | 326 |
prefer 2 apply auto apply (blast elim!: add_leE) |
16818 | 327 |
txt{*Nonce case*} |
328 |
apply (rule_tac x = "N + Suc nat" in exI, auto) |
|
13926 | 329 |
done |
330 |
||
331 |
||
332 |
subsection{*Inductive relation "analz"*} |
|
333 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
334 |
text{*Inductive definition of "analz" -- what can be broken down from a set of |
1839 | 335 |
messages, including keys. A form of downward closure. Pairs can |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
336 |
be taken apart; messages decrypted with known keys. *} |
1839 | 337 |
|
11189 | 338 |
consts analz :: "msg set => msg set" |
1913 | 339 |
inductive "analz H" |
11189 | 340 |
intros |
11192 | 341 |
Inj [intro,simp] : "X \<in> H ==> X \<in> analz H" |
342 |
Fst: "{|X,Y|} \<in> analz H ==> X \<in> analz H" |
|
343 |
Snd: "{|X,Y|} \<in> analz H ==> Y \<in> analz H" |
|
11189 | 344 |
Decrypt [dest]: |
11192 | 345 |
"[|Crypt K X \<in> analz H; Key(invKey K): analz H|] ==> X \<in> analz H" |
1839 | 346 |
|
347 |
||
16818 | 348 |
text{*Monotonicity; Lemma 1 of Lowe's paper*} |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
349 |
lemma analz_mono: "G\<subseteq>H ==> analz(G) \<subseteq> analz(H)" |
11189 | 350 |
apply auto |
351 |
apply (erule analz.induct) |
|
16818 | 352 |
apply (auto dest: analz.Fst analz.Snd) |
11189 | 353 |
done |
354 |
||
13926 | 355 |
text{*Making it safe speeds up proofs*} |
356 |
lemma MPair_analz [elim!]: |
|
357 |
"[| {|X,Y|} \<in> analz H; |
|
358 |
[| X \<in> analz H; Y \<in> analz H |] ==> P |
|
359 |
|] ==> P" |
|
360 |
by (blast dest: analz.Fst analz.Snd) |
|
361 |
||
362 |
lemma analz_increasing: "H \<subseteq> analz(H)" |
|
363 |
by blast |
|
364 |
||
365 |
lemma analz_subset_parts: "analz H \<subseteq> parts H" |
|
366 |
apply (rule subsetI) |
|
367 |
apply (erule analz.induct, blast+) |
|
368 |
done |
|
369 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
370 |
lemmas analz_into_parts = analz_subset_parts [THEN subsetD, standard] |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
371 |
|
13926 | 372 |
lemmas not_parts_not_analz = analz_subset_parts [THEN contra_subsetD, standard] |
373 |
||
374 |
||
375 |
lemma parts_analz [simp]: "parts (analz H) = parts H" |
|
376 |
apply (rule equalityI) |
|
377 |
apply (rule analz_subset_parts [THEN parts_mono, THEN subset_trans], simp) |
|
378 |
apply (blast intro: analz_increasing [THEN parts_mono, THEN subsetD]) |
|
379 |
done |
|
380 |
||
381 |
lemma analz_parts [simp]: "analz (parts H) = parts H" |
|
382 |
apply auto |
|
383 |
apply (erule analz.induct, auto) |
|
384 |
done |
|
385 |
||
386 |
lemmas analz_insertI = subset_insertI [THEN analz_mono, THEN [2] rev_subsetD, standard] |
|
387 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
388 |
subsubsection{*General equational properties *} |
13926 | 389 |
|
390 |
lemma analz_empty [simp]: "analz{} = {}" |
|
391 |
apply safe |
|
392 |
apply (erule analz.induct, blast+) |
|
393 |
done |
|
394 |
||
16818 | 395 |
text{*Converse fails: we can analz more from the union than from the |
396 |
separate parts, as a key in one might decrypt a message in the other*} |
|
13926 | 397 |
lemma analz_Un: "analz(G) \<union> analz(H) \<subseteq> analz(G \<union> H)" |
398 |
by (intro Un_least analz_mono Un_upper1 Un_upper2) |
|
399 |
||
400 |
lemma analz_insert: "insert X (analz H) \<subseteq> analz(insert X H)" |
|
401 |
by (blast intro: analz_mono [THEN [2] rev_subsetD]) |
|
402 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
403 |
subsubsection{*Rewrite rules for pulling out atomic messages *} |
13926 | 404 |
|
405 |
lemmas analz_insert_eq_I = equalityI [OF subsetI analz_insert] |
|
406 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
407 |
lemma analz_insert_Agent [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
408 |
"analz (insert (Agent agt) H) = insert (Agent agt) (analz H)" |
13926 | 409 |
apply (rule analz_insert_eq_I) |
410 |
apply (erule analz.induct, auto) |
|
411 |
done |
|
412 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
413 |
lemma analz_insert_Nonce [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
414 |
"analz (insert (Nonce N) H) = insert (Nonce N) (analz H)" |
13926 | 415 |
apply (rule analz_insert_eq_I) |
416 |
apply (erule analz.induct, auto) |
|
417 |
done |
|
418 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
419 |
lemma analz_insert_Number [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
420 |
"analz (insert (Number N) H) = insert (Number N) (analz H)" |
13926 | 421 |
apply (rule analz_insert_eq_I) |
422 |
apply (erule analz.induct, auto) |
|
423 |
done |
|
424 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
425 |
lemma analz_insert_Hash [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
426 |
"analz (insert (Hash X) H) = insert (Hash X) (analz H)" |
13926 | 427 |
apply (rule analz_insert_eq_I) |
428 |
apply (erule analz.induct, auto) |
|
429 |
done |
|
430 |
||
16818 | 431 |
text{*Can only pull out Keys if they are not needed to decrypt the rest*} |
13926 | 432 |
lemma analz_insert_Key [simp]: |
433 |
"K \<notin> keysFor (analz H) ==> |
|
434 |
analz (insert (Key K) H) = insert (Key K) (analz H)" |
|
435 |
apply (unfold keysFor_def) |
|
436 |
apply (rule analz_insert_eq_I) |
|
437 |
apply (erule analz.induct, auto) |
|
438 |
done |
|
439 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
440 |
lemma analz_insert_MPair [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
441 |
"analz (insert {|X,Y|} H) = |
13926 | 442 |
insert {|X,Y|} (analz (insert X (insert Y H)))" |
443 |
apply (rule equalityI) |
|
444 |
apply (rule subsetI) |
|
445 |
apply (erule analz.induct, auto) |
|
446 |
apply (erule analz.induct) |
|
447 |
apply (blast intro: analz.Fst analz.Snd)+ |
|
448 |
done |
|
449 |
||
16818 | 450 |
text{*Can pull out enCrypted message if the Key is not known*} |
13926 | 451 |
lemma analz_insert_Crypt: |
452 |
"Key (invKey K) \<notin> analz H |
|
453 |
==> analz (insert (Crypt K X) H) = insert (Crypt K X) (analz H)" |
|
454 |
apply (rule analz_insert_eq_I) |
|
455 |
apply (erule analz.induct, auto) |
|
456 |
||
457 |
done |
|
458 |
||
459 |
lemma lemma1: "Key (invKey K) \<in> analz H ==> |
|
460 |
analz (insert (Crypt K X) H) \<subseteq> |
|
461 |
insert (Crypt K X) (analz (insert X H))" |
|
462 |
apply (rule subsetI) |
|
463 |
apply (erule_tac xa = x in analz.induct, auto) |
|
464 |
done |
|
465 |
||
466 |
lemma lemma2: "Key (invKey K) \<in> analz H ==> |
|
467 |
insert (Crypt K X) (analz (insert X H)) \<subseteq> |
|
468 |
analz (insert (Crypt K X) H)" |
|
469 |
apply auto |
|
470 |
apply (erule_tac xa = x in analz.induct, auto) |
|
471 |
apply (blast intro: analz_insertI analz.Decrypt) |
|
472 |
done |
|
473 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
474 |
lemma analz_insert_Decrypt: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
475 |
"Key (invKey K) \<in> analz H ==> |
13926 | 476 |
analz (insert (Crypt K X) H) = |
477 |
insert (Crypt K X) (analz (insert X H))" |
|
478 |
by (intro equalityI lemma1 lemma2) |
|
479 |
||
16818 | 480 |
text{*Case analysis: either the message is secure, or it is not! Effective, |
481 |
but can cause subgoals to blow up! Use with @{text "split_if"}; apparently |
|
482 |
@{text "split_tac"} does not cope with patterns such as @{term"analz (insert |
|
483 |
(Crypt K X) H)"} *} |
|
13926 | 484 |
lemma analz_Crypt_if [simp]: |
485 |
"analz (insert (Crypt K X) H) = |
|
486 |
(if (Key (invKey K) \<in> analz H) |
|
487 |
then insert (Crypt K X) (analz (insert X H)) |
|
488 |
else insert (Crypt K X) (analz H))" |
|
489 |
by (simp add: analz_insert_Crypt analz_insert_Decrypt) |
|
490 |
||
491 |
||
16818 | 492 |
text{*This rule supposes "for the sake of argument" that we have the key.*} |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
493 |
lemma analz_insert_Crypt_subset: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
494 |
"analz (insert (Crypt K X) H) \<subseteq> |
13926 | 495 |
insert (Crypt K X) (analz (insert X H))" |
496 |
apply (rule subsetI) |
|
497 |
apply (erule analz.induct, auto) |
|
498 |
done |
|
499 |
||
500 |
||
501 |
lemma analz_image_Key [simp]: "analz (Key`N) = Key`N" |
|
502 |
apply auto |
|
503 |
apply (erule analz.induct, auto) |
|
504 |
done |
|
505 |
||
506 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
507 |
subsubsection{*Idempotence and transitivity *} |
13926 | 508 |
|
509 |
lemma analz_analzD [dest!]: "X\<in> analz (analz H) ==> X\<in> analz H" |
|
510 |
by (erule analz.induct, blast+) |
|
511 |
||
512 |
lemma analz_idem [simp]: "analz (analz H) = analz H" |
|
513 |
by blast |
|
514 |
||
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
515 |
lemma analz_subset_iff [simp]: "(analz G \<subseteq> analz H) = (G \<subseteq> analz H)" |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
516 |
apply (rule iffI) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
517 |
apply (iprover intro: subset_trans analz_increasing) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
518 |
apply (frule analz_mono, simp) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
519 |
done |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
520 |
|
13926 | 521 |
lemma analz_trans: "[| X\<in> analz G; G \<subseteq> analz H |] ==> X\<in> analz H" |
522 |
by (drule analz_mono, blast) |
|
523 |
||
16818 | 524 |
text{*Cut; Lemma 2 of Lowe*} |
13926 | 525 |
lemma analz_cut: "[| Y\<in> analz (insert X H); X\<in> analz H |] ==> Y\<in> analz H" |
526 |
by (erule analz_trans, blast) |
|
527 |
||
528 |
(*Cut can be proved easily by induction on |
|
529 |
"Y: analz (insert X H) ==> X: analz H --> Y: analz H" |
|
530 |
*) |
|
531 |
||
16818 | 532 |
text{*This rewrite rule helps in the simplification of messages that involve |
13926 | 533 |
the forwarding of unknown components (X). Without it, removing occurrences |
16818 | 534 |
of X can be very complicated. *} |
13926 | 535 |
lemma analz_insert_eq: "X\<in> analz H ==> analz (insert X H) = analz H" |
536 |
by (blast intro: analz_cut analz_insertI) |
|
537 |
||
538 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
539 |
text{*A congruence rule for "analz" *} |
13926 | 540 |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
541 |
lemma analz_subset_cong: |
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
542 |
"[| analz G \<subseteq> analz G'; analz H \<subseteq> analz H' |] |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
543 |
==> analz (G \<union> H) \<subseteq> analz (G' \<union> H')" |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
544 |
apply simp |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
545 |
apply (iprover intro: conjI subset_trans analz_mono Un_upper1 Un_upper2) |
13926 | 546 |
done |
547 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
548 |
lemma analz_cong: |
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
549 |
"[| analz G = analz G'; analz H = analz H' |] |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
550 |
==> analz (G \<union> H) = analz (G' \<union> H')" |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
551 |
by (intro equalityI analz_subset_cong, simp_all) |
13926 | 552 |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
553 |
lemma analz_insert_cong: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
554 |
"analz H = analz H' ==> analz(insert X H) = analz(insert X H')" |
13926 | 555 |
by (force simp only: insert_def intro!: analz_cong) |
556 |
||
16818 | 557 |
text{*If there are no pairs or encryptions then analz does nothing*} |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
558 |
lemma analz_trivial: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
559 |
"[| \<forall>X Y. {|X,Y|} \<notin> H; \<forall>X K. Crypt K X \<notin> H |] ==> analz H = H" |
13926 | 560 |
apply safe |
561 |
apply (erule analz.induct, blast+) |
|
562 |
done |
|
563 |
||
16818 | 564 |
text{*These two are obsolete (with a single Spy) but cost little to prove...*} |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
565 |
lemma analz_UN_analz_lemma: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
566 |
"X\<in> analz (\<Union>i\<in>A. analz (H i)) ==> X\<in> analz (\<Union>i\<in>A. H i)" |
13926 | 567 |
apply (erule analz.induct) |
568 |
apply (blast intro: analz_mono [THEN [2] rev_subsetD])+ |
|
569 |
done |
|
570 |
||
571 |
lemma analz_UN_analz [simp]: "analz (\<Union>i\<in>A. analz (H i)) = analz (\<Union>i\<in>A. H i)" |
|
572 |
by (blast intro: analz_UN_analz_lemma analz_mono [THEN [2] rev_subsetD]) |
|
573 |
||
574 |
||
575 |
subsection{*Inductive relation "synth"*} |
|
576 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
577 |
text{*Inductive definition of "synth" -- what can be built up from a set of |
1839 | 578 |
messages. A form of upward closure. Pairs can be built, messages |
3668 | 579 |
encrypted with known keys. Agent names are public domain. |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
580 |
Numbers can be guessed, but Nonces cannot be. *} |
1839 | 581 |
|
11189 | 582 |
consts synth :: "msg set => msg set" |
1913 | 583 |
inductive "synth H" |
11189 | 584 |
intros |
11192 | 585 |
Inj [intro]: "X \<in> H ==> X \<in> synth H" |
586 |
Agent [intro]: "Agent agt \<in> synth H" |
|
587 |
Number [intro]: "Number n \<in> synth H" |
|
588 |
Hash [intro]: "X \<in> synth H ==> Hash X \<in> synth H" |
|
589 |
MPair [intro]: "[|X \<in> synth H; Y \<in> synth H|] ==> {|X,Y|} \<in> synth H" |
|
590 |
Crypt [intro]: "[|X \<in> synth H; Key(K) \<in> H|] ==> Crypt K X \<in> synth H" |
|
11189 | 591 |
|
16818 | 592 |
text{*Monotonicity*} |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
593 |
lemma synth_mono: "G\<subseteq>H ==> synth(G) \<subseteq> synth(H)" |
16818 | 594 |
by (auto, erule synth.induct, auto) |
11189 | 595 |
|
16818 | 596 |
text{*NO @{text Agent_synth}, as any Agent name can be synthesized. |
597 |
The same holds for @{term Number}*} |
|
11192 | 598 |
inductive_cases Nonce_synth [elim!]: "Nonce n \<in> synth H" |
599 |
inductive_cases Key_synth [elim!]: "Key K \<in> synth H" |
|
600 |
inductive_cases Hash_synth [elim!]: "Hash X \<in> synth H" |
|
601 |
inductive_cases MPair_synth [elim!]: "{|X,Y|} \<in> synth H" |
|
602 |
inductive_cases Crypt_synth [elim!]: "Crypt K X \<in> synth H" |
|
11189 | 603 |
|
13926 | 604 |
|
605 |
lemma synth_increasing: "H \<subseteq> synth(H)" |
|
606 |
by blast |
|
607 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
608 |
subsubsection{*Unions *} |
13926 | 609 |
|
16818 | 610 |
text{*Converse fails: we can synth more from the union than from the |
611 |
separate parts, building a compound message using elements of each.*} |
|
13926 | 612 |
lemma synth_Un: "synth(G) \<union> synth(H) \<subseteq> synth(G \<union> H)" |
613 |
by (intro Un_least synth_mono Un_upper1 Un_upper2) |
|
614 |
||
615 |
lemma synth_insert: "insert X (synth H) \<subseteq> synth(insert X H)" |
|
616 |
by (blast intro: synth_mono [THEN [2] rev_subsetD]) |
|
617 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
618 |
subsubsection{*Idempotence and transitivity *} |
13926 | 619 |
|
620 |
lemma synth_synthD [dest!]: "X\<in> synth (synth H) ==> X\<in> synth H" |
|
621 |
by (erule synth.induct, blast+) |
|
622 |
||
623 |
lemma synth_idem: "synth (synth H) = synth H" |
|
624 |
by blast |
|
625 |
||
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
626 |
lemma synth_subset_iff [simp]: "(synth G \<subseteq> synth H) = (G \<subseteq> synth H)" |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
627 |
apply (rule iffI) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
628 |
apply (iprover intro: subset_trans synth_increasing) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
629 |
apply (frule synth_mono, simp add: synth_idem) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
630 |
done |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
631 |
|
13926 | 632 |
lemma synth_trans: "[| X\<in> synth G; G \<subseteq> synth H |] ==> X\<in> synth H" |
633 |
by (drule synth_mono, blast) |
|
634 |
||
16818 | 635 |
text{*Cut; Lemma 2 of Lowe*} |
13926 | 636 |
lemma synth_cut: "[| Y\<in> synth (insert X H); X\<in> synth H |] ==> Y\<in> synth H" |
637 |
by (erule synth_trans, blast) |
|
638 |
||
639 |
lemma Agent_synth [simp]: "Agent A \<in> synth H" |
|
640 |
by blast |
|
641 |
||
642 |
lemma Number_synth [simp]: "Number n \<in> synth H" |
|
643 |
by blast |
|
644 |
||
645 |
lemma Nonce_synth_eq [simp]: "(Nonce N \<in> synth H) = (Nonce N \<in> H)" |
|
646 |
by blast |
|
647 |
||
648 |
lemma Key_synth_eq [simp]: "(Key K \<in> synth H) = (Key K \<in> H)" |
|
649 |
by blast |
|
650 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
651 |
lemma Crypt_synth_eq [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
652 |
"Key K \<notin> H ==> (Crypt K X \<in> synth H) = (Crypt K X \<in> H)" |
13926 | 653 |
by blast |
654 |
||
655 |
||
656 |
lemma keysFor_synth [simp]: |
|
657 |
"keysFor (synth H) = keysFor H \<union> invKey`{K. Key K \<in> H}" |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
658 |
by (unfold keysFor_def, blast) |
13926 | 659 |
|
660 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
661 |
subsubsection{*Combinations of parts, analz and synth *} |
13926 | 662 |
|
663 |
lemma parts_synth [simp]: "parts (synth H) = parts H \<union> synth H" |
|
664 |
apply (rule equalityI) |
|
665 |
apply (rule subsetI) |
|
666 |
apply (erule parts.induct) |
|
667 |
apply (blast intro: synth_increasing [THEN parts_mono, THEN subsetD] |
|
668 |
parts.Fst parts.Snd parts.Body)+ |
|
669 |
done |
|
670 |
||
671 |
lemma analz_analz_Un [simp]: "analz (analz G \<union> H) = analz (G \<union> H)" |
|
672 |
apply (intro equalityI analz_subset_cong)+ |
|
673 |
apply simp_all |
|
674 |
done |
|
675 |
||
676 |
lemma analz_synth_Un [simp]: "analz (synth G \<union> H) = analz (G \<union> H) \<union> synth G" |
|
677 |
apply (rule equalityI) |
|
678 |
apply (rule subsetI) |
|
679 |
apply (erule analz.induct) |
|
680 |
prefer 5 apply (blast intro: analz_mono [THEN [2] rev_subsetD]) |
|
681 |
apply (blast intro: analz.Fst analz.Snd analz.Decrypt)+ |
|
682 |
done |
|
683 |
||
684 |
lemma analz_synth [simp]: "analz (synth H) = analz H \<union> synth H" |
|
685 |
apply (cut_tac H = "{}" in analz_synth_Un) |
|
686 |
apply (simp (no_asm_use)) |
|
687 |
done |
|
688 |
||
689 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
690 |
subsubsection{*For reasoning about the Fake rule in traces *} |
13926 | 691 |
|
692 |
lemma parts_insert_subset_Un: "X\<in> G ==> parts(insert X H) \<subseteq> parts G \<union> parts H" |
|
693 |
by (rule subset_trans [OF parts_mono parts_Un_subset2], blast) |
|
694 |
||
16818 | 695 |
text{*More specifically for Fake. Very occasionally we could do with a version |
696 |
of the form @{term"parts{X} \<subseteq> synth (analz H) \<union> parts H"} *} |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
697 |
lemma Fake_parts_insert: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
698 |
"X \<in> synth (analz H) ==> |
13926 | 699 |
parts (insert X H) \<subseteq> synth (analz H) \<union> parts H" |
700 |
apply (drule parts_insert_subset_Un) |
|
701 |
apply (simp (no_asm_use)) |
|
702 |
apply blast |
|
703 |
done |
|
704 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
705 |
lemma Fake_parts_insert_in_Un: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
706 |
"[|Z \<in> parts (insert X H); X: synth (analz H)|] |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
707 |
==> Z \<in> synth (analz H) \<union> parts H"; |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
708 |
by (blast dest: Fake_parts_insert [THEN subsetD, dest]) |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
709 |
|
16818 | 710 |
text{*@{term H} is sometimes @{term"Key ` KK \<union> spies evs"}, so can't put |
711 |
@{term "G=H"}.*} |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
712 |
lemma Fake_analz_insert: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
713 |
"X\<in> synth (analz G) ==> |
13926 | 714 |
analz (insert X H) \<subseteq> synth (analz G) \<union> analz (G \<union> H)" |
715 |
apply (rule subsetI) |
|
716 |
apply (subgoal_tac "x \<in> analz (synth (analz G) \<union> H) ") |
|
717 |
prefer 2 apply (blast intro: analz_mono [THEN [2] rev_subsetD] analz_mono [THEN synth_mono, THEN [2] rev_subsetD]) |
|
718 |
apply (simp (no_asm_use)) |
|
719 |
apply blast |
|
720 |
done |
|
721 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
722 |
lemma analz_conj_parts [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
723 |
"(X \<in> analz H & X \<in> parts H) = (X \<in> analz H)" |
14145
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
paulson
parents:
14126
diff
changeset
|
724 |
by (blast intro: analz_subset_parts [THEN subsetD]) |
13926 | 725 |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
726 |
lemma analz_disj_parts [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
727 |
"(X \<in> analz H | X \<in> parts H) = (X \<in> parts H)" |
14145
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
paulson
parents:
14126
diff
changeset
|
728 |
by (blast intro: analz_subset_parts [THEN subsetD]) |
13926 | 729 |
|
16818 | 730 |
text{*Without this equation, other rules for synth and analz would yield |
731 |
redundant cases*} |
|
13926 | 732 |
lemma MPair_synth_analz [iff]: |
733 |
"({|X,Y|} \<in> synth (analz H)) = |
|
734 |
(X \<in> synth (analz H) & Y \<in> synth (analz H))" |
|
735 |
by blast |
|
736 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
737 |
lemma Crypt_synth_analz: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
738 |
"[| Key K \<in> analz H; Key (invKey K) \<in> analz H |] |
13926 | 739 |
==> (Crypt K X \<in> synth (analz H)) = (X \<in> synth (analz H))" |
740 |
by blast |
|
741 |
||
742 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
743 |
lemma Hash_synth_analz [simp]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
744 |
"X \<notin> synth (analz H) |
13926 | 745 |
==> (Hash{|X,Y|} \<in> synth (analz H)) = (Hash{|X,Y|} \<in> analz H)" |
746 |
by blast |
|
747 |
||
748 |
||
749 |
subsection{*HPair: a combination of Hash and MPair*} |
|
750 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
751 |
subsubsection{*Freeness *} |
13926 | 752 |
|
753 |
lemma Agent_neq_HPair: "Agent A ~= Hash[X] Y" |
|
754 |
by (unfold HPair_def, simp) |
|
755 |
||
756 |
lemma Nonce_neq_HPair: "Nonce N ~= Hash[X] Y" |
|
757 |
by (unfold HPair_def, simp) |
|
758 |
||
759 |
lemma Number_neq_HPair: "Number N ~= Hash[X] Y" |
|
760 |
by (unfold HPair_def, simp) |
|
761 |
||
762 |
lemma Key_neq_HPair: "Key K ~= Hash[X] Y" |
|
763 |
by (unfold HPair_def, simp) |
|
764 |
||
765 |
lemma Hash_neq_HPair: "Hash Z ~= Hash[X] Y" |
|
766 |
by (unfold HPair_def, simp) |
|
767 |
||
768 |
lemma Crypt_neq_HPair: "Crypt K X' ~= Hash[X] Y" |
|
769 |
by (unfold HPair_def, simp) |
|
770 |
||
771 |
lemmas HPair_neqs = Agent_neq_HPair Nonce_neq_HPair Number_neq_HPair |
|
772 |
Key_neq_HPair Hash_neq_HPair Crypt_neq_HPair |
|
773 |
||
774 |
declare HPair_neqs [iff] |
|
775 |
declare HPair_neqs [symmetric, iff] |
|
776 |
||
777 |
lemma HPair_eq [iff]: "(Hash[X'] Y' = Hash[X] Y) = (X' = X & Y'=Y)" |
|
778 |
by (simp add: HPair_def) |
|
779 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
780 |
lemma MPair_eq_HPair [iff]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
781 |
"({|X',Y'|} = Hash[X] Y) = (X' = Hash{|X,Y|} & Y'=Y)" |
13926 | 782 |
by (simp add: HPair_def) |
783 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
784 |
lemma HPair_eq_MPair [iff]: |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
785 |
"(Hash[X] Y = {|X',Y'|}) = (X' = Hash{|X,Y|} & Y'=Y)" |
13926 | 786 |
by (auto simp add: HPair_def) |
787 |
||
788 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
789 |
subsubsection{*Specialized laws, proved in terms of those for Hash and MPair *} |
13926 | 790 |
|
791 |
lemma keysFor_insert_HPair [simp]: "keysFor (insert (Hash[X] Y) H) = keysFor H" |
|
792 |
by (simp add: HPair_def) |
|
793 |
||
794 |
lemma parts_insert_HPair [simp]: |
|
795 |
"parts (insert (Hash[X] Y) H) = |
|
796 |
insert (Hash[X] Y) (insert (Hash{|X,Y|}) (parts (insert Y H)))" |
|
797 |
by (simp add: HPair_def) |
|
798 |
||
799 |
lemma analz_insert_HPair [simp]: |
|
800 |
"analz (insert (Hash[X] Y) H) = |
|
801 |
insert (Hash[X] Y) (insert (Hash{|X,Y|}) (analz (insert Y H)))" |
|
802 |
by (simp add: HPair_def) |
|
803 |
||
804 |
lemma HPair_synth_analz [simp]: |
|
805 |
"X \<notin> synth (analz H) |
|
806 |
==> (Hash[X] Y \<in> synth (analz H)) = |
|
807 |
(Hash {|X, Y|} \<in> analz H & Y \<in> synth (analz H))" |
|
808 |
by (simp add: HPair_def) |
|
809 |
||
810 |
||
16818 | 811 |
text{*We do NOT want Crypt... messages broken up in protocols!!*} |
13926 | 812 |
declare parts.Body [rule del] |
813 |
||
814 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
815 |
text{*Rewrites to push in Key and Crypt messages, so that other messages can |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
816 |
be pulled out using the @{text analz_insert} rules*} |
13926 | 817 |
ML |
818 |
{* |
|
819 |
fun insComm x y = inst "x" x (inst "y" y insert_commute); |
|
820 |
||
821 |
bind_thms ("pushKeys", |
|
822 |
map (insComm "Key ?K") |
|
823 |
["Agent ?C", "Nonce ?N", "Number ?N", |
|
824 |
"Hash ?X", "MPair ?X ?Y", "Crypt ?X ?K'"]); |
|
825 |
||
826 |
bind_thms ("pushCrypts", |
|
827 |
map (insComm "Crypt ?X ?K") |
|
828 |
["Agent ?C", "Nonce ?N", "Number ?N", |
|
829 |
"Hash ?X'", "MPair ?X' ?Y"]); |
|
830 |
*} |
|
831 |
||
832 |
text{*Cannot be added with @{text "[simp]"} -- messages should not always be |
|
833 |
re-ordered. *} |
|
834 |
lemmas pushes = pushKeys pushCrypts |
|
835 |
||
836 |
||
837 |
subsection{*Tactics useful for many protocol proofs*} |
|
838 |
ML |
|
839 |
{* |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
840 |
val invKey = thm "invKey" |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
841 |
val keysFor_def = thm "keysFor_def" |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
842 |
val HPair_def = thm "HPair_def" |
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
843 |
val symKeys_def = thm "symKeys_def" |
13926 | 844 |
val parts_mono = thm "parts_mono"; |
845 |
val analz_mono = thm "analz_mono"; |
|
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
846 |
val synth_mono = thm "synth_mono"; |
13926 | 847 |
val analz_increasing = thm "analz_increasing"; |
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
848 |
|
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
849 |
val analz_insertI = thm "analz_insertI"; |
13926 | 850 |
val analz_subset_parts = thm "analz_subset_parts"; |
851 |
val Fake_parts_insert = thm "Fake_parts_insert"; |
|
852 |
val Fake_analz_insert = thm "Fake_analz_insert"; |
|
853 |
val pushes = thms "pushes"; |
|
854 |
||
855 |
||
856 |
(*Prove base case (subgoal i) and simplify others. A typical base case |
|
857 |
concerns Crypt K X \<notin> Key`shrK`bad and cannot be proved by rewriting |
|
858 |
alone.*) |
|
859 |
fun prove_simple_subgoals_tac i = |
|
860 |
force_tac (claset(), simpset() addsimps [image_eq_UN]) i THEN |
|
861 |
ALLGOALS Asm_simp_tac |
|
862 |
||
863 |
(*Analysis of Fake cases. Also works for messages that forward unknown parts, |
|
864 |
but this application is no longer necessary if analz_insert_eq is used. |
|
865 |
Abstraction over i is ESSENTIAL: it delays the dereferencing of claset |
|
866 |
DEPENDS UPON "X" REFERRING TO THE FRADULENT MESSAGE *) |
|
867 |
||
868 |
(*Apply rules to break down assumptions of the form |
|
869 |
Y \<in> parts(insert X H) and Y \<in> analz(insert X H) |
|
870 |
*) |
|
871 |
val Fake_insert_tac = |
|
872 |
dresolve_tac [impOfSubs Fake_analz_insert, |
|
873 |
impOfSubs Fake_parts_insert] THEN' |
|
874 |
eresolve_tac [asm_rl, thm"synth.Inj"]; |
|
875 |
||
876 |
fun Fake_insert_simp_tac ss i = |
|
877 |
REPEAT (Fake_insert_tac i) THEN asm_full_simp_tac ss i; |
|
878 |
||
879 |
fun atomic_spy_analz_tac (cs,ss) = SELECT_GOAL |
|
880 |
(Fake_insert_simp_tac ss 1 |
|
881 |
THEN |
|
882 |
IF_UNSOLVED (Blast.depth_tac |
|
883 |
(cs addIs [analz_insertI, |
|
884 |
impOfSubs analz_subset_parts]) 4 1)) |
|
885 |
||
886 |
(*The explicit claset and simpset arguments help it work with Isar*) |
|
887 |
fun gen_spy_analz_tac (cs,ss) i = |
|
888 |
DETERM |
|
889 |
(SELECT_GOAL |
|
890 |
(EVERY |
|
891 |
[ (*push in occurrences of X...*) |
|
892 |
(REPEAT o CHANGED) |
|
893 |
(res_inst_tac [("x1","X")] (insert_commute RS ssubst) 1), |
|
894 |
(*...allowing further simplifications*) |
|
895 |
simp_tac ss 1, |
|
896 |
REPEAT (FIRSTGOAL (resolve_tac [allI,impI,notI,conjI,iffI])), |
|
897 |
DEPTH_SOLVE (atomic_spy_analz_tac (cs,ss) 1)]) i) |
|
898 |
||
899 |
fun spy_analz_tac i = gen_spy_analz_tac (claset(), simpset()) i |
|
900 |
*} |
|
901 |
||
16818 | 902 |
text{*By default only @{text o_apply} is built-in. But in the presence of |
903 |
eta-expansion this means that some terms displayed as @{term "f o g"} will be |
|
904 |
rewritten, and others will not!*} |
|
13926 | 905 |
declare o_def [simp] |
906 |
||
11189 | 907 |
|
13922 | 908 |
lemma Crypt_notin_image_Key [simp]: "Crypt K X \<notin> Key ` A" |
909 |
by auto |
|
910 |
||
911 |
lemma Hash_notin_image_Key [simp] :"Hash X \<notin> Key ` A" |
|
912 |
by auto |
|
913 |
||
14200
d8598e24f8fa
Removal of the Key_supply axiom (affects many possbility proofs) and minor
paulson
parents:
14181
diff
changeset
|
914 |
lemma synth_analz_mono: "G\<subseteq>H ==> synth (analz(G)) \<subseteq> synth (analz(H))" |
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
915 |
by (iprover intro: synth_mono analz_mono) |
13922 | 916 |
|
917 |
lemma Fake_analz_eq [simp]: |
|
918 |
"X \<in> synth(analz H) ==> synth (analz (insert X H)) = synth (analz H)" |
|
919 |
apply (drule Fake_analz_insert[of _ _ "H"]) |
|
920 |
apply (simp add: synth_increasing[THEN Un_absorb2]) |
|
921 |
apply (drule synth_mono) |
|
922 |
apply (simp add: synth_idem) |
|
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
923 |
apply (rule equalityI) |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
924 |
apply (simp add: ); |
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
925 |
apply (rule synth_analz_mono, blast) |
13922 | 926 |
done |
927 |
||
928 |
text{*Two generalizations of @{text analz_insert_eq}*} |
|
929 |
lemma gen_analz_insert_eq [rule_format]: |
|
930 |
"X \<in> analz H ==> ALL G. H \<subseteq> G --> analz (insert X G) = analz G"; |
|
931 |
by (blast intro: analz_cut analz_insertI analz_mono [THEN [2] rev_subsetD]) |
|
932 |
||
933 |
lemma synth_analz_insert_eq [rule_format]: |
|
934 |
"X \<in> synth (analz H) |
|
935 |
==> ALL G. H \<subseteq> G --> (Key K \<in> analz (insert X G)) = (Key K \<in> analz G)"; |
|
936 |
apply (erule synth.induct) |
|
937 |
apply (simp_all add: gen_analz_insert_eq subset_trans [OF _ subset_insertI]) |
|
938 |
done |
|
939 |
||
940 |
lemma Fake_parts_sing: |
|
13926 | 941 |
"X \<in> synth (analz H) ==> parts{X} \<subseteq> synth (analz H) \<union> parts H"; |
13922 | 942 |
apply (rule subset_trans) |
17689
a04b5b43625e
streamlined theory; conformance to recent publication
paulson
parents:
16818
diff
changeset
|
943 |
apply (erule_tac [2] Fake_parts_insert) |
20648 | 944 |
apply (rule parts_mono, blast) |
13922 | 945 |
done |
946 |
||
14145
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
paulson
parents:
14126
diff
changeset
|
947 |
lemmas Fake_parts_sing_imp_Un = Fake_parts_sing [THEN [2] rev_subsetD] |
2e31b8cc8788
ZhouGollmann: new example (fair non-repudiation protocol)
paulson
parents:
14126
diff
changeset
|
948 |
|
11189 | 949 |
method_setup spy_analz = {* |
11270
a315a3862bb4
better treatment of methods: uses Method.ctxt_args to refer to current
paulson
parents:
11264
diff
changeset
|
950 |
Method.ctxt_args (fn ctxt => |
21588 | 951 |
Method.SIMPLE_METHOD (gen_spy_analz_tac (local_clasimpset_of ctxt) 1)) *} |
11189 | 952 |
"for proving the Fake case when analz is involved" |
1839 | 953 |
|
11264 | 954 |
method_setup atomic_spy_analz = {* |
11270
a315a3862bb4
better treatment of methods: uses Method.ctxt_args to refer to current
paulson
parents:
11264
diff
changeset
|
955 |
Method.ctxt_args (fn ctxt => |
21588 | 956 |
Method.SIMPLE_METHOD (atomic_spy_analz_tac (local_clasimpset_of ctxt) 1)) *} |
11264 | 957 |
"for debugging spy_analz" |
958 |
||
959 |
method_setup Fake_insert_simp = {* |
|
11270
a315a3862bb4
better treatment of methods: uses Method.ctxt_args to refer to current
paulson
parents:
11264
diff
changeset
|
960 |
Method.ctxt_args (fn ctxt => |
21588 | 961 |
Method.SIMPLE_METHOD (Fake_insert_simp_tac (local_simpset_of ctxt) 1)) *} |
11264 | 962 |
"for debugging spy_analz" |
963 |
||
13926 | 964 |
|
1839 | 965 |
end |