[STATEMENT]
lemma Outpts_A_Card_imp_pairK_parts:
     "\<lbrakk> Outpts (Card A) A
         \<lbrace>Key K, Crypt (pairK(A,B)) (Nonce Nb)\<rbrace> \<in> set evs;
         evs \<in> sr \<rbrakk>
     \<Longrightarrow> \<exists> Na. Crypt (pairK(A,B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs; evs \<in> sr\<rbrakk> \<Longrightarrow> \<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs)
[PROOF STEP]
apply (erule rev_mp, erule sr.induct)
[PROOF STATE]
proof (prove)
goal (20 subgoals):
 1. Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set [] \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy []))
 2. \<And>evsF X Ba Aa. \<lbrakk>evsF \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsF \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsF)); X \<in> synth (analz (knows Spy evsF)); illegalUse (Card Ba)\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Spy Aa X # Inputs Spy (Card Ba) X # evsF) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Spy Aa X # Inputs Spy (Card Ba) X # evsF)))
 3. \<And>evsFo Nba Aa Ba. \<lbrakk>evsFo \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsFo \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsFo)); Nonce Nba \<in> analz (knows Spy evsFo); Key (pairK (Aa, Ba)) \<in> knows Spy evsFo\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Notes Spy (Key (sesK (Nba, pairK (Aa, Ba)))) # evsFo) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Notes Spy (Key (sesK (Nba, pairK (Aa, Ba)))) # evsFo)))
 4. \<And>evsR Aa Ba X. \<lbrakk>evsR \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsR \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsR)); Says Aa Ba X \<in> set evsR\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Gets Ba X # evsR) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Gets Ba X # evsR)))
 5. \<And>evs1 Aa Ba. \<lbrakk>evs1 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs1 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs1)); Aa \<noteq> Server\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)))
 6. \<And>evs2 Aa Ba. \<lbrakk>evs2 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs2 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs2)); Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Server Aa \<lbrace>Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>\<rbrace> # evs2) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Server Aa \<lbrace>Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>\<rbrace> # evs2)))
 7. \<And>evs3 Aa Ba Pk Certificate. \<lbrakk>evs3 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs3 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs3)); legalUse Card Aa; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; Gets Aa \<lbrace>Nonce Pk, Certificate\<rbrace> \<in> set evs3\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Inputs Aa (Card Aa) (Agent Aa) # evs3) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Inputs Aa (Card Aa) (Agent Aa) # evs3)))
 8. \<And>evs4 Aa Na. \<lbrakk>evs4 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs4 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs4)); Aa \<noteq> Server; Nonce Na \<notin> used evs4; legalUse Card Aa; Inputs Aa (Card Aa) (Agent Aa) \<in> set evs4\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Outpts (Card Aa) Aa \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Outpts (Card Aa) Aa \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4)))
 9. \<And>evs4F Na Aa. \<lbrakk>evs4F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs4F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs4F)); Nonce Na \<notin> used evs4F; illegalUse (Card Aa); Inputs Spy (Card Aa) (Agent Aa) \<in> set evs4F\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Outpts (Card Aa) Spy \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4F) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Outpts (Card Aa) Spy \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4F)))
 10. \<And>evs5 Aa Na Certificate Ba. \<lbrakk>evs5 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs5 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs5)); Outpts (Card Aa) Aa \<lbrace>Nonce Na, Certificate\<rbrace> \<in> set evs5; \<forall>p q. Certificate \<noteq> \<lbrace>p, q\<rbrace>\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Aa Ba \<lbrace>Agent Aa, Nonce Na\<rbrace> # evs5) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Aa Ba \<lbrace>Agent Aa, Nonce Na\<rbrace> # evs5)))
A total of 20 subgoals...
[PROOF STEP]
apply parts_prepare
[PROOF STATE]
proof (prove)
goal (27 subgoals):
 1. \<And>evsF X Ba Aa. \<lbrakk>evsF \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsF \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsF)); X \<in> synth (analz (knows Spy evsF)); illegalUse (Card Ba)\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Spy Aa X # Inputs Spy (Card Ba) X # evsF) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Spy Aa X # Inputs Spy (Card Ba) X # evsF)))
 2. \<And>evsFo Nba Aa Ba. \<lbrakk>evsFo \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsFo \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsFo)); Nonce Nba \<in> analz (knows Spy evsFo); Key (pairK (Aa, Ba)) \<in> knows Spy evsFo\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Notes Spy (Key (sesK (Nba, pairK (Aa, Ba)))) # evsFo) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Notes Spy (Key (sesK (Nba, pairK (Aa, Ba)))) # evsFo)))
 3. \<And>evsR Aa Ba X. \<lbrakk>evsR \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsR \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsR)); Says Aa Ba X \<in> set evsR\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Gets Ba X # evsR) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Gets Ba X # evsR)))
 4. \<And>evs1 Aa Ba. \<lbrakk>evs1 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs1 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs1)); Aa \<noteq> Server\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> # evs1)))
 5. \<And>evs2 Aa Ba. \<lbrakk>evs2 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs2 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs2)); Gets Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs2\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Server Aa \<lbrace>Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>\<rbrace> # evs2) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Server Aa \<lbrace>Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>\<rbrace> # evs2)))
 6. \<And>evs3 Aa Ba Pk Certificate. \<lbrakk>evs3 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs3 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs3)); legalUse Card Aa; Says Aa Server \<lbrace>Agent Aa, Agent Ba\<rbrace> \<in> set evs3; Gets Aa \<lbrace>Nonce Pk, Certificate\<rbrace> \<in> set evs3\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Inputs Aa (Card Aa) (Agent Aa) # evs3) \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy (Inputs Aa (Card Aa) (Agent Aa) # evs3)))
 7. \<And>evs4 Aa Na. \<lbrakk>evs4 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs4 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs4)); Aa \<noteq> Server; Nonce Na \<notin> used evs4; legalUse Card Aa; Inputs Aa (Card Aa) (Agent Aa) \<in> set evs4\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Outpts (Card Aa) Aa \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Outpts (Card Aa) Aa \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4)))
 8. \<And>evs4F Na Aa. \<lbrakk>evs4F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs4F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs4F)); Nonce Na \<notin> used evs4F; illegalUse (Card Aa); Inputs Spy (Card Aa) (Agent Aa) \<in> set evs4F\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Outpts (Card Aa) Spy \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4F) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Outpts (Card Aa) Spy \<lbrace>Nonce Na, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> # evs4F)))
 9. \<And>evs5 Aa Na Certificate Ba. \<lbrakk>evs5 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs5 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs5)); Outpts (Card Aa) Aa \<lbrace>Nonce Na, Certificate\<rbrace> \<in> set evs5; \<forall>p q. Certificate \<noteq> \<lbrace>p, q\<rbrace>\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Says Aa Ba \<lbrace>Agent Aa, Nonce Na\<rbrace> # evs5) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Says Aa Ba \<lbrace>Agent Aa, Nonce Na\<rbrace> # evs5)))
 10. \<And>evs6 Ba Aa Na. \<lbrakk>evs6 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs6 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs6)); legalUse Card Ba; Gets Ba \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs6\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set (Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> # evs6) \<longrightarrow> (\<exists>Naa. Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy (Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> # evs6)))
A total of 27 subgoals...
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>evsF X Ba. \<lbrakk>evsF \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsF \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evsF)); X \<in> synth (analz (knows Spy evsF)); Card Ba \<in> stolen \<and> Ba \<in> bad \<or> Card Ba \<in> cloned\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evsF \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (insert X (knows Spy evsF)))
 2. \<And>evs7 Nba Ba Ka Aa Na. \<lbrakk>evs7 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7)); Nonce Nba \<notin> used evs7; Card Ba \<notin> stolen; Ba \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7; Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7\<rbrakk> \<Longrightarrow> Ba = Spy \<longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7 \<longrightarrow> (\<exists>Naa. A = Aa \<and> B = Spy \<and> Naa = Na \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7))
 3. \<And>evs7F Nba Ba Ka Aa Na. \<lbrakk>evs7F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7F)); Nonce Nba \<notin> used evs7F; Card Ba \<in> stolen \<and> Ba \<in> bad \<or> Card Ba \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7F; Inputs Spy (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7F\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7F \<longrightarrow> (\<exists>Naa. A = Aa \<and> B = Ba \<and> Naa = Na \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7F))
 4. \<And>evs8 Ba Aa Na Nba Ka Aaa Naa. \<lbrakk>evs8 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8)); Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs8; Outpts (Card Ba) Ba \<lbrace>Nonce Nba, Key (sesK (Nba, pairK (Aaa, Ba))), Crypt (pairK (Aaa, Ba)) \<lbrace>Nonce Naa, Nonce Nba\<rbrace>, Crypt (pairK (Aaa, Ba)) (Nonce Nba)\<rbrace> \<in> set evs8; Ka = sesK (Nba, pairK (Aaa, Ba))\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. A = Aaa \<and> B = Ba \<and> Na = Naa \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8))
 5. \<And>evs10 Aa Ka Nba Ba Na. \<lbrakk>evs10 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10)); Card Aa \<notin> stolen; Aa \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Aa (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10\<rbrakk> \<Longrightarrow> (Aa = Spy \<longrightarrow> A = Spy \<and> K = sesK (Nba, pairK (Spy, Ba)) \<and> A = Spy \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Spy, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10))) \<and> (Aa \<noteq> Spy \<longrightarrow> A = Aa \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10)))
 6. \<And>evs10F Aa Ka Nba Ba Na. \<lbrakk>evs10F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10F)); Card Aa \<in> stolen \<and> Aa \<in> bad \<or> Card Aa \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Spy (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10F\<rbrakk> \<Longrightarrow> A = Aa \<and> A = Spy \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10F))
[PROOF STEP]
apply (blast dest: parts_insertI)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>evs7 Nba Ba Ka Aa Na. \<lbrakk>evs7 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7)); Nonce Nba \<notin> used evs7; Card Ba \<notin> stolen; Ba \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7; Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7\<rbrakk> \<Longrightarrow> Ba = Spy \<longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7 \<longrightarrow> (\<exists>Naa. A = Aa \<and> B = Spy \<and> Naa = Na \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7))
 2. \<And>evs7F Nba Ba Ka Aa Na. \<lbrakk>evs7F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7F)); Nonce Nba \<notin> used evs7F; Card Ba \<in> stolen \<and> Ba \<in> bad \<or> Card Ba \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7F; Inputs Spy (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7F\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7F \<longrightarrow> (\<exists>Naa. A = Aa \<and> B = Ba \<and> Naa = Na \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7F))
 3. \<And>evs8 Ba Aa Na Nba Ka Aaa Naa. \<lbrakk>evs8 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8)); Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs8; Outpts (Card Ba) Ba \<lbrace>Nonce Nba, Key (sesK (Nba, pairK (Aaa, Ba))), Crypt (pairK (Aaa, Ba)) \<lbrace>Nonce Naa, Nonce Nba\<rbrace>, Crypt (pairK (Aaa, Ba)) (Nonce Nba)\<rbrace> \<in> set evs8; Ka = sesK (Nba, pairK (Aaa, Ba))\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. A = Aaa \<and> B = Ba \<and> Na = Naa \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8))
 4. \<And>evs10 Aa Ka Nba Ba Na. \<lbrakk>evs10 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10)); Card Aa \<notin> stolen; Aa \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Aa (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10\<rbrakk> \<Longrightarrow> (Aa = Spy \<longrightarrow> A = Spy \<and> K = sesK (Nba, pairK (Spy, Ba)) \<and> A = Spy \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Spy, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10))) \<and> (Aa \<noteq> Spy \<longrightarrow> A = Aa \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10)))
 5. \<And>evs10F Aa Ka Nba Ba Na. \<lbrakk>evs10F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10F)); Card Aa \<in> stolen \<and> Aa \<in> bad \<or> Card Aa \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Spy (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10F\<rbrakk> \<Longrightarrow> A = Aa \<and> A = Spy \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10F))
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>evs7F Nba Ba Ka Aa Na. \<lbrakk>evs7F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7F)); Nonce Nba \<notin> used evs7F; Card Ba \<in> stolen \<and> Ba \<in> bad \<or> Card Ba \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7F; Inputs Spy (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7F\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs7F \<longrightarrow> (\<exists>Naa. A = Aa \<and> B = Ba \<and> Naa = Na \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Naa, Nonce Nb\<rbrace> \<in> parts (knows Spy evs7F))
 2. \<And>evs8 Ba Aa Na Nba Ka Aaa Naa. \<lbrakk>evs8 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8)); Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs8; Outpts (Card Ba) Ba \<lbrace>Nonce Nba, Key (sesK (Nba, pairK (Aaa, Ba))), Crypt (pairK (Aaa, Ba)) \<lbrace>Nonce Naa, Nonce Nba\<rbrace>, Crypt (pairK (Aaa, Ba)) (Nonce Nba)\<rbrace> \<in> set evs8; Ka = sesK (Nba, pairK (Aaa, Ba))\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. A = Aaa \<and> B = Ba \<and> Na = Naa \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8))
 3. \<And>evs10 Aa Ka Nba Ba Na. \<lbrakk>evs10 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10)); Card Aa \<notin> stolen; Aa \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Aa (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10\<rbrakk> \<Longrightarrow> (Aa = Spy \<longrightarrow> A = Spy \<and> K = sesK (Nba, pairK (Spy, Ba)) \<and> A = Spy \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Spy, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10))) \<and> (Aa \<noteq> Spy \<longrightarrow> A = Aa \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10)))
 4. \<And>evs10F Aa Ka Nba Ba Na. \<lbrakk>evs10F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10F)); Card Aa \<in> stolen \<and> Aa \<in> bad \<or> Card Aa \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Spy (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10F\<rbrakk> \<Longrightarrow> A = Aa \<and> A = Spy \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10F))
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>evs8 Ba Aa Na Nba Ka Aaa Naa. \<lbrakk>evs8 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8)); Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs8; Outpts (Card Ba) Ba \<lbrace>Nonce Nba, Key (sesK (Nba, pairK (Aaa, Ba))), Crypt (pairK (Aaa, Ba)) \<lbrace>Nonce Naa, Nonce Nba\<rbrace>, Crypt (pairK (Aaa, Ba)) (Nonce Nba)\<rbrace> \<in> set evs8; Ka = sesK (Nba, pairK (Aaa, Ba))\<rbrakk> \<Longrightarrow> Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs8 \<longrightarrow> (\<exists>Na. A = Aaa \<and> B = Ba \<and> Na = Naa \<and> Nb = Nba \<or> Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs8))
 2. \<And>evs10 Aa Ka Nba Ba Na. \<lbrakk>evs10 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10)); Card Aa \<notin> stolen; Aa \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Aa (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10\<rbrakk> \<Longrightarrow> (Aa = Spy \<longrightarrow> A = Spy \<and> K = sesK (Nba, pairK (Spy, Ba)) \<and> A = Spy \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Spy, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10))) \<and> (Aa \<noteq> Spy \<longrightarrow> A = Aa \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10)))
 3. \<And>evs10F Aa Ka Nba Ba Na. \<lbrakk>evs10F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10F)); Card Aa \<in> stolen \<and> Aa \<in> bad \<or> Card Aa \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Spy (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10F\<rbrakk> \<Longrightarrow> A = Aa \<and> A = Spy \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10F))
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>evs10 Aa Ka Nba Ba Na. \<lbrakk>evs10 \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10 \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10)); Card Aa \<notin> stolen; Aa \<noteq> Server; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Aa (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10\<rbrakk> \<Longrightarrow> (Aa = Spy \<longrightarrow> A = Spy \<and> K = sesK (Nba, pairK (Spy, Ba)) \<and> A = Spy \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Spy, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10))) \<and> (Aa \<noteq> Spy \<longrightarrow> A = Aa \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10)))
 2. \<And>evs10F Aa Ka Nba Ba Na. \<lbrakk>evs10F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10F)); Card Aa \<in> stolen \<and> Aa \<in> bad \<or> Card Aa \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Spy (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10F\<rbrakk> \<Longrightarrow> A = Aa \<and> A = Spy \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10F))
[PROOF STEP]
apply (blast dest: Inputs_imp_knows_Spy_secureM_sr parts.Inj Inputs_A_Card_9 Gets_imp_knows_Spy elim: knows_Spy_partsEs)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>evs10F Aa Ka Nba Ba Na. \<lbrakk>evs10F \<in> sr; Outpts (Card A) A \<lbrace>Key K, Crypt (pairK (A, B)) (Nonce Nb)\<rbrace> \<in> set evs10F \<longrightarrow> (\<exists>Na. Crypt (pairK (A, B)) \<lbrace>Nonce Na, Nonce Nb\<rbrace> \<in> parts (knows Spy evs10F)); Card Aa \<in> stolen \<and> Aa \<in> bad \<or> Card Aa \<in> cloned; Ka = sesK (Nba, pairK (Aa, Ba)); Inputs Spy (Card Aa) \<lbrace>Agent Ba, Nonce Na, Nonce Nba, Nonce (Pairkey (Aa, Ba)), Crypt (shrK Aa) \<lbrace>Nonce (Pairkey (Aa, Ba)), Agent Ba\<rbrace>, Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace>, Crypt (crdK (Card Aa)) (Nonce Na)\<rbrace> \<in> set evs10F\<rbrakk> \<Longrightarrow> A = Aa \<and> A = Spy \<and> K = sesK (Nba, pairK (Aa, Ba)) \<and> A = Aa \<and> B = Ba \<and> Nb = Nba \<longrightarrow> (\<exists>Na. Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<in> parts (knows Spy evs10F))
[PROOF STEP]
apply (blast dest: Inputs_imp_knows_Spy_secureM_sr [THEN parts.Inj]
                   Inputs_A_Card_9 Gets_imp_knows_Spy
             elim: knows_Spy_partsEs)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "(THE x. x=y) = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (THE x. x = y) = z
[PROOF STEP]
refute [expect = genuine]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (THE x. x = y) = z
[PROOF STEP]
oops


[STATEMENT]
lemma "A4 x a Q (ps,n) \<Longrightarrow> A2 x a Q (ps,n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A4 x a Q (ps, n) \<Longrightarrow> A2 x a Q (ps, n)
[PROOF STEP]
unfolding A4_def A2_def sep_conj_def dollar_def sep_impl_def pointsto_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>xa y. xa ## y \<and> (ps, n) = xa + y \<and> (case xa of (ps, t) \<Rightarrow> x \<in> dom ps \<and> vars a \<subseteq> dom ps \<and> Q (ps(x \<mapsto> paval a ps), t)) \<and> (case y of (s, c) \<Rightarrow> s = 0 \<and> c = 1) \<Longrightarrow> \<exists>xa. (\<exists>xb y. xb ## y \<and> (ps, n) = xb + y \<and> (\<exists>xa. case xb of (s, c) \<Rightarrow> s = [x \<mapsto> xa] \<and> c = 0) \<and> (\<exists>xb ya. xb ## ya \<and> y = xb + ya \<and> (\<forall>h'. xb ## h' \<and> (case h' of (s, c) \<Rightarrow> s = [x \<mapsto> xa] \<and> c = 0) \<longrightarrow> Q (xb + h')) \<and> (case ya of (s, c) \<Rightarrow> s = 0 \<and> c = 1))) \<and> (\<exists>x y. x ## y \<and> (ps, n) = x + y \<and> True \<and> (case y of (ps, n) \<Rightarrow> vars a \<subseteq> dom ps \<and> paval a ps = xa))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b y. \<lbrakk>n = Suc b; ps x = Some y; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), b)\<rbrakk> \<Longrightarrow> \<exists>xa. (\<exists>a ba aa. a ## aa \<and> ps = a + aa \<and> (\<exists>bb. Suc b = ba + bb \<and> (\<exists>xa. a = [x \<mapsto> xa]) \<and> ba = 0 \<and> (\<exists>b. bb = Suc b \<and> (aa ## [x \<mapsto> xa] \<longrightarrow> Q (aa + [x \<mapsto> xa], b))))) \<and> (\<exists>aa ba ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>bb. Suc b = ba + bb) \<and> vars a \<subseteq> dom ab \<and> paval a ab = xa)
[PROOF STEP]
apply(rule exI[where x="paval a ps"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b y. \<lbrakk>n = Suc b; ps x = Some y; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), b)\<rbrakk> \<Longrightarrow> (\<exists>aa ba ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>bb. Suc b = ba + bb \<and> (\<exists>xa. aa = [x \<mapsto> xa]) \<and> ba = 0 \<and> (\<exists>b. bb = Suc b \<and> (ab ## [x \<mapsto> paval a ps] \<longrightarrow> Q (ab + [x \<mapsto> paval a ps], b))))) \<and> (\<exists>aa ba ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>bb. Suc b = ba + bb) \<and> vars a \<subseteq> dom ab \<and> paval a ab = paval a ps)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b y. \<lbrakk>n = Suc b; ps x = Some y; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), b)\<rbrakk> \<Longrightarrow> \<exists>aa ba ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>bb. Suc b = ba + bb \<and> (\<exists>xa. aa = [x \<mapsto> xa]) \<and> ba = 0 \<and> (\<exists>b. bb = Suc b \<and> (ab ## [x \<mapsto> paval a ps] \<longrightarrow> Q (ab + [x \<mapsto> paval a ps], b))))
 2. \<And>b y. \<lbrakk>n = Suc b; ps x = Some y; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), b)\<rbrakk> \<Longrightarrow> \<exists>aa ba ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>bb. Suc b = ba + bb) \<and> vars a \<subseteq> dom ab \<and> paval a ab = paval a ps
[PROOF STEP]
subgoal for n v
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>aa b ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>ba. Suc n = b + ba \<and> (\<exists>xa. aa = [x \<mapsto> xa]) \<and> b = 0 \<and> (\<exists>b. ba = Suc b \<and> (ab ## [x \<mapsto> paval a ps] \<longrightarrow> Q (ab + [x \<mapsto> paval a ps], b))))
[PROOF STEP]
apply(rule exI[where x="[x \<mapsto> v]::partstate"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>b aa. [x \<mapsto> v] ## aa \<and> ps = [x \<mapsto> v] + aa \<and> (\<exists>ba. Suc n = b + ba \<and> (\<exists>xa. [x \<mapsto> v] = [x \<mapsto> xa]) \<and> b = 0 \<and> (\<exists>b. ba = Suc b \<and> (aa ## [x \<mapsto> paval a ps] \<longrightarrow> Q (aa + [x \<mapsto> paval a ps], b))))
[PROOF STEP]
apply(rule exI[where x=0])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>aa. [x \<mapsto> v] ## aa \<and> ps = [x \<mapsto> v] + aa \<and> (\<exists>b. Suc n = 0 + b \<and> (\<exists>xa. [x \<mapsto> v] = [x \<mapsto> xa]) \<and> 0 = 0 \<and> (\<exists>ba. b = Suc ba \<and> (aa ## [x \<mapsto> paval a ps] \<longrightarrow> Q (aa + [x \<mapsto> paval a ps], ba))))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>aa. [x \<mapsto> v] ## aa \<and> ps = [x \<mapsto> v] + aa \<and> (\<exists>xa. [x \<mapsto> v] = [x \<mapsto> xa]) \<and> (aa ## [x \<mapsto> paval a ps] \<longrightarrow> Q (aa + [x \<mapsto> paval a ps], n))
[PROOF STEP]
apply(rule exI[where x="ps(x:=None)"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> [x \<mapsto> v] ## ps(x := None) \<and> ps = [x \<mapsto> v] + ps(x := None) \<and> (\<exists>xa. [x \<mapsto> v] = [x \<mapsto> xa]) \<and> (ps(x := None) ## [x \<mapsto> paval a ps] \<longrightarrow> Q (ps(x := None) + [x \<mapsto> paval a ps], n))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> [x \<mapsto> v] ## ps(x := None)
 2. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> ps = [x \<mapsto> v] + ps(x := None)
 3. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n); ps(x := None) ## [x \<mapsto> paval a ps]\<rbrakk> \<Longrightarrow> Q (ps(x := None) + [x \<mapsto> paval a ps], n)
[PROOF STEP]
unfolding sep_disj_fun_def domain_conv
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> dom [x \<mapsto> v] \<inter> dom (ps(x := None)) = {}
 2. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> ps = [x \<mapsto> v] + ps(x := None)
 3. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n); dom (ps(x := None)) \<inter> dom [x \<mapsto> paval a ps] = {}\<rbrakk> \<Longrightarrow> Q (ps(x := None) + [x \<mapsto> paval a ps], n)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> ps = [x \<mapsto> v] + ps(x := None)
 2. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> Q (ps(x := None) + [x \<mapsto> paval a ps], n)
[PROOF STEP]
unfolding plus_fun_conv
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> ps = [x \<mapsto> v] ++ ps(x := None)
 2. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> Q (ps(x := None) ++ [x \<mapsto> paval a ps], n)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> ps = [x \<mapsto> v] ++ ps(x := None)
[PROOF STEP]
by (simp add: map_add_upd_left map_upd_triv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b y. \<lbrakk>n = Suc b; ps x = Some y; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), b)\<rbrakk> \<Longrightarrow> \<exists>aa ba ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>bb. Suc b = ba + bb) \<and> vars a \<subseteq> dom ab \<and> paval a ab = paval a ps
[PROOF STEP]
subgoal for n v
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>aa b ab. aa ## ab \<and> ps = aa + ab \<and> (\<exists>ba. Suc n = b + ba) \<and> vars a \<subseteq> dom ab \<and> paval a ab = paval a ps
[PROOF STEP]
apply(rule exI[where x=0])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>b aa. 0 ## aa \<and> ps = 0 + aa \<and> (\<exists>ba. Suc n = b + ba) \<and> vars a \<subseteq> dom aa \<and> paval a aa = paval a ps
[PROOF STEP]
apply(rule exI[where x=n])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> \<exists>aa. 0 ## aa \<and> ps = 0 + aa \<and> (\<exists>b. Suc n = n + b) \<and> vars a \<subseteq> dom aa \<and> paval a aa = paval a ps
[PROOF STEP]
apply(rule exI[where x=ps])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = Suc n; ps x = Some v; vars a \<subseteq> dom ps; Q (ps(x \<mapsto> paval a ps), n)\<rbrakk> \<Longrightarrow> 0 ## ps \<and> ps = 0 + ps \<and> (\<exists>b. Suc n = n + b) \<and> vars a \<subseteq> dom ps \<and> paval a ps = paval a ps
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Outpts_B_Card_unique_key:
     "\<lbrakk> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key SK, Cert1, Cert2\<rbrace> \<in> set evs;
      Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs;
       evs \<in> srb \<rbrakk> \<Longrightarrow> B=B' \<and> A=A' \<and> Nb=Nb' \<and> Cert1=Cert1' \<and> Cert2=Cert2'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key SK, Cert1, Cert2\<rbrace> \<in> set evs; Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs; evs \<in> srb\<rbrakk> \<Longrightarrow> B = B' \<and> A = A' \<and> Nb = Nb' \<and> Cert1 = Cert1' \<and> Cert2 = Cert2'
[PROOF STEP]
apply (erule rev_mp, erule rev_mp, erule srb.induct, simp_all)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>evs7 Nba Ba K Aa Na. \<lbrakk>evs7 \<in> srb; Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs7 \<longrightarrow> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key SK, Cert1, Cert2\<rbrace> \<in> set evs7 \<longrightarrow> B = B' \<and> A = A' \<and> Nb = Nb' \<and> Cert1 = Cert1' \<and> Cert2 = Cert2'; Nonce Nba \<notin> used evs7; Card Ba \<notin> stolen; Ba \<noteq> Server; K = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7; Inputs Ba (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7\<rbrakk> \<Longrightarrow> (B' = Ba \<and> Nb' = Nba \<and> A' = Aa \<and> SK = sesK (Nba, pairK (Aa, Ba)) \<and> Cert1' = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2' = Crypt (pairK (Aa, Ba)) (Nonce Nba) \<longrightarrow> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key (sesK (Nba, pairK (Aa, Ba))), Cert1, Cert2\<rbrace> \<in> set evs7 \<longrightarrow> B = Ba \<and> A = Aa \<and> Nb = Nba \<and> Cert1 = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2 = Crypt (pairK (Aa, Ba)) (Nonce Nba)) \<and> (Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs7 \<longrightarrow> B = Ba \<and> Nb = Nba \<and> A = Aa \<and> SK = sesK (Nba, pairK (Aa, Ba)) \<and> Cert1 = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2 = Crypt (pairK (Aa, Ba)) (Nonce Nba) \<longrightarrow> Ba = B' \<and> Aa = A' \<and> Nba = Nb' \<and> Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> = Cert1' \<and> Crypt (pairK (Aa, Ba)) (Nonce Nba) = Cert2')
 2. \<And>evs7F Nba Ba K Aa Na. \<lbrakk>evs7F \<in> srb; Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs7F \<longrightarrow> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key SK, Cert1, Cert2\<rbrace> \<in> set evs7F \<longrightarrow> B = B' \<and> A = A' \<and> Nb = Nb' \<and> Cert1 = Cert1' \<and> Cert2 = Cert2'; Nonce Nba \<notin> used evs7F; Card Ba \<in> stolen \<and> Ba \<in> bad \<or> Card Ba \<in> cloned; K = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7F; Inputs Spy (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7F\<rbrakk> \<Longrightarrow> (B' = Ba \<and> B' = Spy \<and> Nb' = Nba \<and> A' = Aa \<and> SK = sesK (Nba, pairK (Aa, Ba)) \<and> Cert1' = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2' = Crypt (pairK (Aa, Ba)) (Nonce Nba) \<longrightarrow> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key (sesK (Nba, pairK (Aa, Ba))), Cert1, Cert2\<rbrace> \<in> set evs7F \<longrightarrow> B = Ba \<and> A = Aa \<and> Nb = Nba \<and> Cert1 = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2 = Crypt (pairK (Aa, Ba)) (Nonce Nba)) \<and> (Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs7F \<longrightarrow> B = Ba \<and> B = Spy \<and> Nb = Nba \<and> A = Aa \<and> SK = sesK (Nba, pairK (Aa, Ba)) \<and> Cert1 = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2 = Crypt (pairK (Aa, Ba)) (Nonce Nba) \<longrightarrow> Ba = B' \<and> Aa = A' \<and> Nba = Nb' \<and> Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> = Cert1' \<and> Crypt (pairK (Aa, Ba)) (Nonce Nba) = Cert2')
[PROOF STEP]
apply (fastforce dest: Outpts_parts_used)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>evs7F Nba Ba K Aa Na. \<lbrakk>evs7F \<in> srb; Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs7F \<longrightarrow> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key SK, Cert1, Cert2\<rbrace> \<in> set evs7F \<longrightarrow> B = B' \<and> A = A' \<and> Nb = Nb' \<and> Cert1 = Cert1' \<and> Cert2 = Cert2'; Nonce Nba \<notin> used evs7F; Card Ba \<in> stolen \<and> Ba \<in> bad \<or> Card Ba \<in> cloned; K = sesK (Nba, pairK (Aa, Ba)); Key (sesK (Nba, pairK (Aa, Ba))) \<notin> used evs7F; Inputs Spy (Card Ba) \<lbrace>Agent Aa, Nonce Na\<rbrace> \<in> set evs7F\<rbrakk> \<Longrightarrow> (B' = Ba \<and> B' = Spy \<and> Nb' = Nba \<and> A' = Aa \<and> SK = sesK (Nba, pairK (Aa, Ba)) \<and> Cert1' = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2' = Crypt (pairK (Aa, Ba)) (Nonce Nba) \<longrightarrow> Outpts (Card B) B \<lbrace>Nonce Nb, Agent A, Key (sesK (Nba, pairK (Aa, Ba))), Cert1, Cert2\<rbrace> \<in> set evs7F \<longrightarrow> B = Ba \<and> A = Aa \<and> Nb = Nba \<and> Cert1 = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2 = Crypt (pairK (Aa, Ba)) (Nonce Nba)) \<and> (Outpts (Card B') B' \<lbrace>Nonce Nb', Agent A', Key SK, Cert1', Cert2'\<rbrace> \<in> set evs7F \<longrightarrow> B = Ba \<and> B = Spy \<and> Nb = Nba \<and> A = Aa \<and> SK = sesK (Nba, pairK (Aa, Ba)) \<and> Cert1 = Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> \<and> Cert2 = Crypt (pairK (Aa, Ba)) (Nonce Nba) \<longrightarrow> Ba = B' \<and> Aa = A' \<and> Nba = Nb' \<and> Crypt (pairK (Aa, Ba)) \<lbrace>Nonce Na, Nonce Nba\<rbrace> = Cert1' \<and> Crypt (pairK (Aa, Ba)) (Nonce Nba) = Cert2')
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done