src/HOL/Auth/Message.ML
changeset 2154 913b4fc7670a
parent 2102 41a667d2c3fa
child 2170 c5e460f1ebb4
equal deleted inserted replaced
2153:545ac77dab29 2154:913b4fc7670a
   412 
   412 
   413 (*Case analysis: either the message is secure, or it is not!
   413 (*Case analysis: either the message is secure, or it is not!
   414   Effective, but can cause subgoals to blow up!
   414   Effective, but can cause subgoals to blow up!
   415   Use with expand_if;  apparently split_tac does not cope with patterns
   415   Use with expand_if;  apparently split_tac does not cope with patterns
   416   such as "analz (insert (Crypt X K) H)" *)
   416   such as "analz (insert (Crypt X K) H)" *)
   417 goal thy "analz (insert (Crypt X K) H) = \
   417 goal thy "analz (insert (Crypt X K) H) =                \
   418 \         (if (Key (invKey K)  : analz H) then    \
   418 \         (if (Key (invKey K) : analz H)                \
   419 \               insert (Crypt X K) (analz (insert X H)) \
   419 \          then insert (Crypt X K) (analz (insert X H)) \
   420 \          else insert (Crypt X K) (analz H))";
   420 \          else insert (Crypt X K) (analz H))";
   421 by (case_tac "Key (invKey K)  : analz H " 1);
   421 by (case_tac "Key (invKey K)  : analz H " 1);
   422 by (ALLGOALS (asm_simp_tac (!simpset addsimps [analz_insert_Crypt, 
   422 by (ALLGOALS (asm_simp_tac (!simpset addsimps [analz_insert_Crypt, 
   423                                                analz_insert_Decrypt])));
   423                                                analz_insert_Decrypt])));
   424 qed "analz_Crypt_if";
   424 qed "analz_Crypt_if";
   696 by (Fast_tac 1);
   696 by (Fast_tac 1);
   697 qed "MPair_synth_analz";
   697 qed "MPair_synth_analz";
   698 
   698 
   699 AddIffs [MPair_synth_analz];
   699 AddIffs [MPair_synth_analz];
   700 
   700 
       
   701 goal thy "!!K. [| Key K : analz H;  Key (invKey K) : analz H |] \
       
   702 \              ==> (Crypt X K : synth (analz H)) = (X : synth (analz H))";
       
   703 by (Fast_tac 1);
       
   704 qed "Crypt_synth_analz";
       
   705 
   701 
   706 
   702 (*We do NOT want Crypt... messages broken up in protocols!!*)
   707 (*We do NOT want Crypt... messages broken up in protocols!!*)
   703 Delrules partsEs;
   708 Delrules partsEs;
   704 
   709