src/HOL/Auth/NS_Shared.ML
changeset 2050 1b3343fa1278
parent 2045 ae1030e66745
child 2070 84f4572a6b20
equal deleted inserted replaced
2049:d3b93e1765bc 2050:1b3343fa1278
    36 by (etac ns_shared.induct 1);
    36 by (etac ns_shared.induct 1);
    37 by (REPEAT_FIRST
    37 by (REPEAT_FIRST
    38     (best_tac (!claset addIs (impOfSubs (sees_mono RS analz_mono RS synth_mono)
    38     (best_tac (!claset addIs (impOfSubs (sees_mono RS analz_mono RS synth_mono)
    39                               :: ns_shared.intrs))));
    39                               :: ns_shared.intrs))));
    40 qed "ns_shared_mono";
    40 qed "ns_shared_mono";
    41 
       
    42 
       
    43 (*The Spy can see more than anybody else, except for their initial state*)
       
    44 goal thy 
       
    45  "!!evs. evs : ns_shared lost ==> \
       
    46 \     sees lost A evs <= initState lost A Un sees lost Spy evs";
       
    47 by (etac ns_shared.induct 1);
       
    48 by (ALLGOALS (fast_tac (!claset addDs [sees_Says_subset_insert RS subsetD] 
       
    49                                 addss (!simpset))));
       
    50 qed "sees_agent_subset_sees_Spy";
       
    51 
       
    52 
       
    53 (*The Spy can see more than anybody else who's lost their key!*)
       
    54 goal thy 
       
    55  "!!evs. evs : ns_shared lost ==> \
       
    56 \        A: lost --> A ~= Server --> sees lost A evs <= sees lost Spy evs";
       
    57 by (etac ns_shared.induct 1);
       
    58 by (agent.induct_tac "A" 1);
       
    59 by (auto_tac (!claset addDs [sees_Says_subset_insert RS subsetD], (!simpset)));
       
    60 qed_spec_mp "sees_lost_agent_subset_sees_Spy";
       
    61 
    41 
    62 
    42 
    63 (*Nobody sends themselves messages*)
    43 (*Nobody sends themselves messages*)
    64 goal thy "!!evs. evs : ns_shared lost ==> ALL A X. Says A A X ~: set_of_list evs";
    44 goal thy "!!evs. evs : ns_shared lost ==> ALL A X. Says A A X ~: set_of_list evs";
    65 by (etac ns_shared.induct 1);
    45 by (etac ns_shared.induct 1);
   391 
   371 
   392 goal thy 
   372 goal thy 
   393  "!!evs. [| A ~: lost;  B ~: lost;  \
   373  "!!evs. [| A ~: lost;  B ~: lost;  \
   394 \           evs : ns_shared lost;  evt: ns_shared lost |]  \
   374 \           evs : ns_shared lost;  evt: ns_shared lost |]  \
   395 \        ==> Says Server A                                             \
   375 \        ==> Says Server A                                             \
   396 \              (Crypt {|N, Agent B, Key(newK evt),                     \
   376 \              (Crypt {|N, Agent B, Key K,                     \
   397 \                       Crypt {|Key(newK evt), Agent A|} (shrK B)|} (shrK A)) \
   377 \                       Crypt {|Key K, Agent A|} (shrK B)|} (shrK A)) \
   398 \             : set_of_list evs --> \
   378 \             : set_of_list evs --> \
   399 \        Key(newK evt) ~: analz (sees lost Spy evs)";
   379 \        Key K ~: analz (sees lost Spy evs)";
   400 by (etac ns_shared.induct 1);
   380 by (etac ns_shared.induct 1);
   401 by (ALLGOALS 
   381 by (ALLGOALS 
   402     (asm_simp_tac 
   382     (asm_simp_tac 
   403      (!simpset addsimps ([analz_subset_parts RS contra_subsetD,
   383      (!simpset addsimps ([analz_subset_parts RS contra_subsetD,
   404                           analz_insert_Key_newK] @ pushes)
   384                           analz_insert_Key_newK] @ pushes)