src/HOL/Auth/Guard/Guard.thy
changeset 15236 f289e8ba2bb3
parent 14307 1cbc24648cf7
child 16417 9bc16273c2d4
equal deleted inserted replaced
15235:614a804d7116 15236:f289e8ba2bb3
   208 
   208 
   209 lemmas mem_cnb_minus_substI = mem_cnb_minus [THEN ssubst]
   209 lemmas mem_cnb_minus_substI = mem_cnb_minus [THEN ssubst]
   210 
   210 
   211 lemma cnb_minus [simp]: "x mem l ==> cnb (minus l x) = cnb l - crypt_nb x"
   211 lemma cnb_minus [simp]: "x mem l ==> cnb (minus l x) = cnb l - crypt_nb x"
   212 apply (induct l, auto)
   212 apply (induct l, auto)
   213 by (erule_tac l1=list and x1=x in mem_cnb_minus_substI, simp)
   213 by (erule_tac l1=l and x1=x in mem_cnb_minus_substI, simp)
   214 
   214 
   215 lemma parts_cnb: "Z:parts (set l) ==>
   215 lemma parts_cnb: "Z:parts (set l) ==>
   216 cnb l = (cnb l - crypt_nb Z) + crypt_nb Z"
   216 cnb l = (cnb l - crypt_nb Z) + crypt_nb Z"
   217 by (erule parts.induct, auto simp: in_set_conv_decomp)
   217 by (erule parts.induct, auto simp: in_set_conv_decomp)
   218 
   218 
   225 apply (induct X, simp_all)
   225 apply (induct X, simp_all)
   226 apply (rule_tac x="[Agent agent]" in exI, simp)
   226 apply (rule_tac x="[Agent agent]" in exI, simp)
   227 apply (rule_tac x="[Number nat]" in exI, simp)
   227 apply (rule_tac x="[Number nat]" in exI, simp)
   228 apply (rule_tac x="[Nonce nat]" in exI, simp)
   228 apply (rule_tac x="[Nonce nat]" in exI, simp)
   229 apply (rule_tac x="[Key nat]" in exI, simp)
   229 apply (rule_tac x="[Key nat]" in exI, simp)
   230 apply (rule_tac x="[Hash msg]" in exI, simp)
   230 apply (rule_tac x="[Hash X]" in exI, simp)
   231 apply (clarify, rule_tac x="l@la" in exI, simp)
   231 apply (clarify, rule_tac x="l@la" in exI, simp)
   232 by (clarify, rule_tac x="[Crypt nat msg]" in exI, simp)
   232 by (clarify, rule_tac x="[Crypt nat X]" in exI, simp)
   233 
   233 
   234 lemma kparts_set: "EX l'. kparts (set l) = set l' & cnb l' = cnb l"
   234 lemma kparts_set: "EX l'. kparts (set l) = set l' & cnb l' = cnb l"
   235 apply (induct l)
   235 apply (induct l)
   236 apply (rule_tac x="[]" in exI, simp, clarsimp)
   236 apply (rule_tac x="[]" in exI, simp, clarsimp)
   237 apply (subgoal_tac "EX l.  kparts {a} = set l & cnb l = crypt_nb a", clarify)
   237 apply (subgoal_tac "EX l''.  kparts {a} = set l'' & cnb l'' = crypt_nb a", clarify)
   238 apply (rule_tac x="l@l'" in exI, simp)
   238 apply (rule_tac x="l''@l'" in exI, simp)
   239 apply (rule kparts_insert_substI, simp)
   239 apply (rule kparts_insert_substI, simp)
   240 by (rule kparts_msg_set)
   240 by (rule kparts_msg_set)
   241 
   241 
   242 subsection{*list corresponding to "decrypt"*}
   242 subsection{*list corresponding to "decrypt"*}
   243 
   243