[STATEMENT]
lemma lemma_B [rule_format]:
     "\<lbrakk> B \<notin> bad;  evs \<in> bankerb_gets \<rbrakk>
      \<Longrightarrow> Key K \<notin> analz (knows Spy evs) \<longrightarrow>
          Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>)
          \<in> set evs \<longrightarrow>
          Crypt K (Number Ta) \<in> parts (knows Spy evs) \<longrightarrow>
          Says B A (Crypt K (Number Ta)) \<in> set evs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<notin> bad; evs \<in> bankerb_gets\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy evs) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs
[PROOF STEP]
apply (erule bankerb_gets.induct)
[PROOF STATE]
proof (prove)
goal (8 subgoals):
 1. B \<notin> bad \<Longrightarrow> Key K \<notin> analz (knows Spy []) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set [] \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy []) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set []
 2. \<And>evsf Xa Ba. \<lbrakk>B \<notin> bad; evsf \<in> bankerb_gets; Key K \<notin> analz (knows Spy evsf) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsf) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsf; Xa \<in> synth (analz (knows Spy evsf))\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Spy Ba Xa # evsf) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Spy Ba Xa # evsf)
 3. \<And>evsr Aa Ba Xa. \<lbrakk>B \<notin> bad; evsr \<in> bankerb_gets; Key K \<notin> analz (knows Spy evsr) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsr \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsr) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsr; Says Aa Ba Xa \<in> set evsr\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Gets Ba Xa # evsr) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Gets Ba Xa # evsr)
 4. \<And>evs1 Aa Ba. \<lbrakk>B \<notin> bad; evs1 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs1) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs1 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs1) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs1\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)
 5. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs2) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)
 6. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs3) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3; Gets Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evs3; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)
 7. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs4) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)
 8. \<And>evso Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evso \<in> bankerb_gets; Key K \<notin> analz (knows Spy evso) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evso \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evso) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evso; Says Server Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evso; expiredK Tka evso\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)
[PROOF STEP]
apply (frule_tac [8] Oops_parts_knows_Spy)
[PROOF STATE]
proof (prove)
goal (8 subgoals):
 1. B \<notin> bad \<Longrightarrow> Key K \<notin> analz (knows Spy []) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set [] \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy []) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set []
 2. \<And>evsf Xa Ba. \<lbrakk>B \<notin> bad; evsf \<in> bankerb_gets; Key K \<notin> analz (knows Spy evsf) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsf) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsf; Xa \<in> synth (analz (knows Spy evsf))\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Spy Ba Xa # evsf) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Spy Ba Xa # evsf)
 3. \<And>evsr Aa Ba Xa. \<lbrakk>B \<notin> bad; evsr \<in> bankerb_gets; Key K \<notin> analz (knows Spy evsr) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsr \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsr) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsr; Says Aa Ba Xa \<in> set evsr\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Gets Ba Xa # evsr) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Gets Ba Xa # evsr)
 4. \<And>evs1 Aa Ba. \<lbrakk>B \<notin> bad; evs1 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs1) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs1 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs1) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs1\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)
 5. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs2) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)
 6. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs3) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3; Gets Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evs3; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)
 7. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs4) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)
 8. \<And>evso Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evso \<in> bankerb_gets; Key K \<notin> analz (knows Spy evso) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evso \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evso) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evso; Says Server Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evso; expiredK Tka evso; Key Ka \<in> parts (knows Spy evso)\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)
[PROOF STEP]
apply (frule_tac [6] Gets_Server_message_form)
[PROOF STATE]
proof (prove)
goal (9 subgoals):
 1. B \<notin> bad \<Longrightarrow> Key K \<notin> analz (knows Spy []) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set [] \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy []) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set []
 2. \<And>evsf Xa Ba. \<lbrakk>B \<notin> bad; evsf \<in> bankerb_gets; Key K \<notin> analz (knows Spy evsf) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsf) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsf; Xa \<in> synth (analz (knows Spy evsf))\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Spy Ba Xa # evsf) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Spy Ba Xa # evsf)
 3. \<And>evsr Aa Ba Xa. \<lbrakk>B \<notin> bad; evsr \<in> bankerb_gets; Key K \<notin> analz (knows Spy evsr) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsr \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsr) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsr; Says Aa Ba Xa \<in> set evsr\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Gets Ba Xa # evsr) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Gets Ba Xa # evsr)
 4. \<And>evs1 Aa Ba. \<lbrakk>B \<notin> bad; evs1 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs1) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs1 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs1) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs1\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)
 5. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs2) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)
 6. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs3) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3; Gets Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evs3; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3\<rbrakk> \<Longrightarrow> evs3 \<in> bankerb_gets
 7. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs3) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3; Gets Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evs3; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3; Ka \<notin> range shrK \<and> Ticket = Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace> \<or> Ticket \<in> analz (knows Spy evs3)\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)
 8. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs4) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)
 9. \<And>evso Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evso \<in> bankerb_gets; Key K \<notin> analz (knows Spy evso) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evso \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evso) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evso; Says Server Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evso; expiredK Tka evso; Key Ka \<in> parts (knows Spy evso)\<rbrakk> \<Longrightarrow> Key K \<notin> analz (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)
[PROOF STEP]
apply (drule_tac [7] BK3_msg_in_parts_knows_Spy, analz_mono_contra)
[PROOF STATE]
proof (prove)
goal (10 subgoals):
 1. B \<notin> bad \<Longrightarrow> Key K \<notin> analz (knows Spy []) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set [] \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy []) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set []
 2. \<And>evsf Xa Ba. \<lbrakk>B \<notin> bad; evsf \<in> bankerb_gets; Xa \<in> synth (analz (knows Spy evsf)); Key K \<notin> analz (knows Spy evsf); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsf) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsf\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Spy Ba Xa # evsf) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Spy Ba Xa # evsf)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Spy Ba Xa # evsf)
 3. \<And>evsr Aa Ba Xa. \<lbrakk>B \<notin> bad; evsr \<in> bankerb_gets; Says Aa Ba Xa \<in> set evsr; Key K \<notin> analz (knows Spy evsr); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsr \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsr) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsr\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Gets Ba Xa # evsr) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Gets Ba Xa # evsr)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Gets Ba Xa # evsr)
 4. \<And>evs1 Aa Ba. \<lbrakk>B \<notin> bad; evs1 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs1); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs1 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs1) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs1\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)
 5. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2; Key K \<notin> analz (knows Spy evs2); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Server Aa (Crypt (shrK Aa) \<lbrace>Number (CT evs2), Agent Ba, Key Ka, Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace>\<rbrace>) # evs2)
 6. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs3) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3; Gets Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evs3; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3\<rbrakk> \<Longrightarrow> evs3 \<in> bankerb_gets
 7. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Key K \<notin> analz (knows Spy evs3) \<longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3; Ka \<notin> range shrK \<and> Ticket = Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace> \<or> Ticket \<in> analz (knows Spy evs3)\<rbrakk> \<Longrightarrow> evs3 \<in> bankerb_gets
 8. \<And>evs3 Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evs3 \<in> bankerb_gets; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; \<not> expiredK Tka evs3; Ka \<notin> range shrK \<and> Ticket = Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace> \<or> Ticket \<in> analz (knows Spy evs3); Ticket \<in> parts (knows Spy evs3); Key K \<notin> analz (knows Spy evs3); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs3 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs3) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs3\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Aa Ba \<lbrace>Ticket, Crypt Ka \<lbrace>Agent Aa, Number (CT evs3)\<rbrace>\<rbrace> # evs3)
 9. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Says Ba Aa (Crypt Ka (Number Taa)) # evs4)
 10. \<And>evso Aa Tka Ba Ka Ticket. \<lbrakk>B \<notin> bad; evso \<in> bankerb_gets; Says Server Aa (Crypt (shrK Aa) \<lbrace>Number Tka, Agent Ba, Key Ka, Ticket\<rbrace>) \<in> set evso; expiredK Tka evso; Key Ka \<in> parts (knows Spy evso); Key K \<notin> analz (knows Spy evso); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evso \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evso) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evso\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso) \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set (Notes Spy \<lbrace>Number Tka, Key Ka\<rbrace> # evso)
[PROOF STEP]
apply (simp_all (no_asm_simp) add: all_conj_distrib)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>evsf Xa Ba. \<lbrakk>B \<notin> bad; evsf \<in> bankerb_gets; Xa \<in> synth (analz (knows Spy evsf)); Key K \<notin> analz (knows Spy evsf); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsf) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsf\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (insert Xa (knows Spy evsf)) \<longrightarrow> B = Spy \<and> A = Ba \<and> Crypt K (Number Ta) = Xa \<or> Says B A (Crypt K (Number Ta)) \<in> set evsf
 2. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2; Key K \<notin> analz (knows Spy evs2); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2\<rbrakk> \<Longrightarrow> A = Aa \<and> Tk = CT evs2 \<and> B = Ba \<and> K = Ka \<and> X = Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace> \<longrightarrow> Crypt Ka (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says Ba Aa (Crypt Ka (Number Ta)) \<in> set evs2
 3. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> K = Ka \<and> Ta = Taa \<longrightarrow> B = Ba \<and> A = Aa \<or> Says B A (Crypt Ka (Number Taa)) \<in> set evs4
[PROOF STEP]
txt\<open>Fake\<close>
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>evsf Xa Ba. \<lbrakk>B \<notin> bad; evsf \<in> bankerb_gets; Xa \<in> synth (analz (knows Spy evsf)); Key K \<notin> analz (knows Spy evsf); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evsf) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evsf\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evsf \<longrightarrow> Crypt K (Number Ta) \<in> parts (insert Xa (knows Spy evsf)) \<longrightarrow> B = Spy \<and> A = Ba \<and> Crypt K (Number Ta) = Xa \<or> Says B A (Crypt K (Number Ta)) \<in> set evsf
 2. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2; Key K \<notin> analz (knows Spy evs2); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2\<rbrakk> \<Longrightarrow> A = Aa \<and> Tk = CT evs2 \<and> B = Ba \<and> K = Ka \<and> X = Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace> \<longrightarrow> Crypt Ka (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says Ba Aa (Crypt Ka (Number Ta)) \<in> set evs2
 3. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> K = Ka \<and> Ta = Taa \<longrightarrow> B = Ba \<and> A = Aa \<or> Says B A (Crypt Ka (Number Taa)) \<in> set evs4
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2; Key K \<notin> analz (knows Spy evs2); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2\<rbrakk> \<Longrightarrow> A = Aa \<and> Tk = CT evs2 \<and> B = Ba \<and> K = Ka \<and> X = Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace> \<longrightarrow> Crypt Ka (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says Ba Aa (Crypt Ka (Number Ta)) \<in> set evs2
 2. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> K = Ka \<and> Ta = Taa \<longrightarrow> B = Ba \<and> A = Aa \<or> Says B A (Crypt Ka (Number Taa)) \<in> set evs4
[PROOF STEP]
txt\<open>BK2\<close>
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>evs2 Ka Aa Ba. \<lbrakk>B \<notin> bad; evs2 \<in> bankerb_gets; Key Ka \<notin> used evs2; Ka \<in> symKeys; Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2; Key K \<notin> analz (knows Spy evs2); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs2 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs2\<rbrakk> \<Longrightarrow> A = Aa \<and> Tk = CT evs2 \<and> B = Ba \<and> K = Ka \<and> X = Crypt (shrK Ba) \<lbrace>Number (CT evs2), Agent Aa, Key Ka\<rbrace> \<longrightarrow> Crypt Ka (Number Ta) \<in> parts (knows Spy evs2) \<longrightarrow> Says Ba Aa (Crypt Ka (Number Ta)) \<in> set evs2
 2. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> K = Ka \<and> Ta = Taa \<longrightarrow> B = Ba \<and> A = Aa \<or> Says B A (Crypt Ka (Number Taa)) \<in> set evs4
[PROOF STEP]
apply (force dest: Crypt_imp_invKey_keysFor)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> K = Ka \<and> Ta = Taa \<longrightarrow> B = Ba \<and> A = Aa \<or> Says B A (Crypt Ka (Number Taa)) \<in> set evs4
[PROOF STEP]
txt\<open>BK4\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>evs4 Ba Tka Aa Ka Taa. \<lbrakk>B \<notin> bad; evs4 \<in> bankerb_gets; Gets Ba \<lbrace>Crypt (shrK Ba) \<lbrace>Number Tka, Agent Aa, Key Ka\<rbrace>, Crypt Ka \<lbrace>Agent Aa, Number Taa\<rbrace>\<rbrace> \<in> set evs4; \<not> expiredK Tka evs4; \<not> expiredA Taa evs4; Key K \<notin> analz (knows Spy evs4); Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> Crypt K (Number Ta) \<in> parts (knows Spy evs4) \<longrightarrow> Says B A (Crypt K (Number Ta)) \<in> set evs4\<rbrakk> \<Longrightarrow> Says Server A (Crypt (shrK A) \<lbrace>Number Tk, Agent B, Key K, X\<rbrace>) \<in> set evs4 \<longrightarrow> K = Ka \<and> Ta = Taa \<longrightarrow> B = Ba \<and> A = Aa \<or> Says B A (Crypt Ka (Number Taa)) \<in> set evs4
[PROOF STEP]
apply (blast dest: ticket_authentic unique_session_keys
                   Gets_imp_knows_Spy [THEN analz.Inj] Crypt_Spy_analz_bad)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma smc_GRPH_components:
  shows "smc_GRPH \<alpha>\<lparr>Obj\<rparr> = set {\<CC>. digraph \<alpha> \<CC>}"
    and "smc_GRPH \<alpha>\<lparr>Arr\<rparr> = all_dghms \<alpha>"
    and "smc_GRPH \<alpha>\<lparr>Dom\<rparr> = (\<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>)"
    and "smc_GRPH \<alpha>\<lparr>Cod\<rparr> = (\<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>)"
    and "smc_GRPH \<alpha>\<lparr>Comp\<rparr> =
      (\<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>0\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (smc_GRPH \<alpha>\<lparr>Obj\<rparr> = ZFC_in_HOL.set {\<CC>. digraph \<alpha> \<CC>} &&& smc_GRPH \<alpha>\<lparr>Arr\<rparr> = all_dghms \<alpha>) &&& smc_GRPH \<alpha>\<lparr>Dom\<rparr> = (\<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>) &&& smc_GRPH \<alpha>\<lparr>Cod\<rparr> = (\<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>) &&& smc_GRPH \<alpha>\<lparr>Comp\<rparr> = (\<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>)
[PROOF STEP]
unfolding smc_GRPH_def dg_field_simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([ZFC_in_HOL.set (Collect (digraph \<alpha>)), all_dghms \<alpha>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>, \<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>]\<^sub>\<circ>\<lparr>[]\<^sub>\<circ>\<rparr> = ZFC_in_HOL.set {\<CC>. digraph \<alpha> \<CC>} &&& [ZFC_in_HOL.set (Collect (digraph \<alpha>)), all_dghms \<alpha>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>, \<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>]\<^sub>\<circ>\<lparr>1\<^sub>\<nat>\<rparr> = all_dghms \<alpha>) &&& [ZFC_in_HOL.set (Collect (digraph \<alpha>)), all_dghms \<alpha>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>, \<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>]\<^sub>\<circ>\<lparr>2\<^sub>\<nat>\<rparr> = (\<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>) &&& [ZFC_in_HOL.set (Collect (digraph \<alpha>)), all_dghms \<alpha>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>, \<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>]\<^sub>\<circ>\<lparr>3\<^sub>\<nat>\<rparr> = (\<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>) &&& [ZFC_in_HOL.set (Collect (digraph \<alpha>)), all_dghms \<alpha>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomDom\<rparr>, \<lambda>\<FF>\<in>\<^sub>\<circ>all_dghms \<alpha>. \<FF>\<lparr>HomCod\<rparr>, \<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>]\<^sub>\<circ>\<lparr>4\<^sub>\<nat>\<rparr> = (\<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (dg_GRPH \<alpha>). \<GG>\<FF>\<lparr>[]\<^sub>\<circ>\<rparr> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>)
[PROOF STEP]
by (simp_all add: nat_omega_simps)


[STATEMENT]
lemma PO_m3_inv4_ikk_resp: "reach m3 \<subseteq> m3_inv5_ikk_resp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. reach m3 \<subseteq> m3_inv5_ikk_resp
[PROOF STEP]
proof (rule INV_from_Refinement_using_invariants [OF m3_refines_m2])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. Range (R23 \<inter> (m2_inv3a_sesK_compr \<inter> m2_inv3b_sesK_compr_non) \<times> (m3_inv3_sesK_compr \<inter> m3_inv2_ticket \<inter> m3_inv1_lkeysec) \<inter> ?I \<times> ?J) \<subseteq> m3_inv5_ikk_resp
 2. reach m2 \<subseteq> ?I
 3. reach m3 \<subseteq> ?J
[PROOF STEP]
show "Range (R23 \<inter> (m2_inv3a_sesK_compr \<inter> m2_inv3b_sesK_compr_non)
                   \<times> (m3_inv3_sesK_compr \<inter> m3_inv2_ticket \<inter> m3_inv1_lkeysec)
                   \<inter> m2_inv7_ikk_resp \<times> UNIV)
      \<subseteq> m3_inv5_ikk_resp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Range (R23 \<inter> (m2_inv3a_sesK_compr \<inter> m2_inv3b_sesK_compr_non) \<times> (m3_inv3_sesK_compr \<inter> m3_inv2_ticket \<inter> m3_inv1_lkeysec) \<inter> m2_inv7_ikk_resp \<times> UNIV) \<subseteq> m3_inv5_ikk_resp
[PROOF STEP]
by (auto simp add: R23_def R23_pres_def intro!: m3_inv5_ikk_respI)
       (elim m2_inv7_ikk_respE, auto dest: R23_keys_dests)
[PROOF STATE]
proof (state)
this:
Range (R23 \<inter> (m2_inv3a_sesK_compr \<inter> m2_inv3b_sesK_compr_non) \<times> (m3_inv3_sesK_compr \<inter> m3_inv2_ticket \<inter> m3_inv1_lkeysec) \<inter> m2_inv7_ikk_resp \<times> UNIV) \<subseteq> m3_inv5_ikk_resp

goal (2 subgoals):
 1. reach m2 \<subseteq> m2_inv7_ikk_resp
 2. reach m3 \<subseteq> UNIV
[PROOF STEP]
qed auto


[STATEMENT]
lemma "x = (y::unit bounded)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
nitpick [expect = none]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
sorry