src/HOL/SET_Protocol/Message_SET.thy
changeset 45605 a89b4bc311a5
parent 42793 88bee9f6eec7
child 51702 dcfab8e87621
equal deleted inserted replaced
45604:29cf40fe8daf 45605:a89b4bc311a5
   208   The Crypt rule is normally kept UNSAFE to avoid breaking up certificates.*}
   208   The Crypt rule is normally kept UNSAFE to avoid breaking up certificates.*}
   209 
   209 
   210 lemma parts_increasing: "H \<subseteq> parts(H)"
   210 lemma parts_increasing: "H \<subseteq> parts(H)"
   211 by blast
   211 by blast
   212 
   212 
   213 lemmas parts_insertI = subset_insertI [THEN parts_mono, THEN subsetD, standard]
   213 lemmas parts_insertI = subset_insertI [THEN parts_mono, THEN subsetD]
   214 
   214 
   215 lemma parts_empty [simp]: "parts{} = {}"
   215 lemma parts_empty [simp]: "parts{} = {}"
   216 apply safe
   216 apply safe
   217 apply (erule parts.induct, blast+)
   217 apply (erule parts.induct, blast+)
   218 done
   218 done
   422 lemma analz_subset_parts: "analz H \<subseteq> parts H"
   422 lemma analz_subset_parts: "analz H \<subseteq> parts H"
   423 apply (rule subsetI)
   423 apply (rule subsetI)
   424 apply (erule analz.induct, blast+)
   424 apply (erule analz.induct, blast+)
   425 done
   425 done
   426 
   426 
   427 lemmas analz_into_parts = analz_subset_parts [THEN subsetD, standard]
   427 lemmas analz_into_parts = analz_subset_parts [THEN subsetD]
   428 
   428 
   429 lemmas not_parts_not_analz = analz_subset_parts [THEN contra_subsetD, standard]
   429 lemmas not_parts_not_analz = analz_subset_parts [THEN contra_subsetD]
   430 
   430 
   431 
   431 
   432 lemma parts_analz [simp]: "parts (analz H) = parts H"
   432 lemma parts_analz [simp]: "parts (analz H) = parts H"
   433 apply (rule equalityI)
   433 apply (rule equalityI)
   434 apply (rule analz_subset_parts [THEN parts_mono, THEN subset_trans], simp)
   434 apply (rule analz_subset_parts [THEN parts_mono, THEN subset_trans], simp)
   438 lemma analz_parts [simp]: "analz (parts H) = parts H"
   438 lemma analz_parts [simp]: "analz (parts H) = parts H"
   439 apply auto
   439 apply auto
   440 apply (erule analz.induct, auto)
   440 apply (erule analz.induct, auto)
   441 done
   441 done
   442 
   442 
   443 lemmas analz_insertI = subset_insertI [THEN analz_mono, THEN [2] rev_subsetD, standard]
   443 lemmas analz_insertI = subset_insertI [THEN analz_mono, THEN [2] rev_subsetD]
   444 
   444 
   445 subsubsection{*General equational properties*}
   445 subsubsection{*General equational properties*}
   446 
   446 
   447 lemma analz_empty [simp]: "analz{} = {}"
   447 lemma analz_empty [simp]: "analz{} = {}"
   448 apply safe
   448 apply safe
   809 
   809 
   810 
   810 
   811 text{*Rewrites to push in Key and Crypt messages, so that other messages can
   811 text{*Rewrites to push in Key and Crypt messages, so that other messages can
   812     be pulled out using the @{text analz_insert} rules*}
   812     be pulled out using the @{text analz_insert} rules*}
   813 
   813 
   814 lemmas pushKeys [standard] =
   814 lemmas pushKeys =
   815   insert_commute [of "Key K" "Agent C"]
   815   insert_commute [of "Key K" "Agent C"]
   816   insert_commute [of "Key K" "Nonce N"]
   816   insert_commute [of "Key K" "Nonce N"]
   817   insert_commute [of "Key K" "Number N"]
   817   insert_commute [of "Key K" "Number N"]
   818   insert_commute [of "Key K" "Pan PAN"]
   818   insert_commute [of "Key K" "Pan PAN"]
   819   insert_commute [of "Key K" "Hash X"]
   819   insert_commute [of "Key K" "Hash X"]
   820   insert_commute [of "Key K" "MPair X Y"]
   820   insert_commute [of "Key K" "MPair X Y"]
   821   insert_commute [of "Key K" "Crypt X K'"]
   821   insert_commute [of "Key K" "Crypt X K'"]
   822 
   822   for K C N PAN X Y K'
   823 lemmas pushCrypts [standard] =
   823 
       
   824 lemmas pushCrypts =
   824   insert_commute [of "Crypt X K" "Agent C"]
   825   insert_commute [of "Crypt X K" "Agent C"]
   825   insert_commute [of "Crypt X K" "Nonce N"]
   826   insert_commute [of "Crypt X K" "Nonce N"]
   826   insert_commute [of "Crypt X K" "Number N"]
   827   insert_commute [of "Crypt X K" "Number N"]
   827   insert_commute [of "Crypt X K" "Pan PAN"]
   828   insert_commute [of "Crypt X K" "Pan PAN"]
   828   insert_commute [of "Crypt X K" "Hash X'"]
   829   insert_commute [of "Crypt X K" "Hash X'"]
   829   insert_commute [of "Crypt X K" "MPair X' Y"]
   830   insert_commute [of "Crypt X K" "MPair X' Y"]
       
   831   for X K C N PAN X' Y
   830 
   832 
   831 text{*Cannot be added with @{text "[simp]"} -- messages should not always be
   833 text{*Cannot be added with @{text "[simp]"} -- messages should not always be
   832   re-ordered.*}
   834   re-ordered.*}
   833 lemmas pushes = pushKeys pushCrypts
   835 lemmas pushes = pushKeys pushCrypts
   834 
   836