[STATEMENT]
theorem (in constructive_security) parallel_resource1:
  assumes WT_res [WT_intro]: "\<And>\<eta>. \<I>_res \<eta> \<turnstile>res res \<eta> \<surd>"
    and lossless_res [plossless_intro]: "\<And>\<eta>. lossless \<Longrightarrow> lossless_resource (\<I>_res \<eta>) (res \<eta>)"
  shows "constructive_security (\<lambda>\<eta>. parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>)
    (\<lambda>\<eta>. parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) sim
    \<I>_real \<I>_ideal (\<lambda>\<eta>. \<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) bound lossless w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security (\<lambda>\<eta>. parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>) (\<lambda>\<eta>. parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) sim \<I>_real \<I>_ideal (\<lambda>\<eta>. \<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) bound lossless w
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
fix \<A> :: "security \<Rightarrow> ('a + 'g + 'e, 'b + 'h + 'f) distinguisher"
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
assume WT [WT_intro]: "\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (state)
this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> (\<I>_res ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) \<turnstile>g \<A> ?\<eta> \<surd>

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
assume bound [interaction_bound]: "interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>)" for \<eta>
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (\<A> ?\<eta>) (bound ?\<eta>)

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
assume lossless [plossless_intro]: "lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)" for \<eta>
[PROOF STATE]
proof (state)
this:
lossless \<Longrightarrow> plossless_gpv (\<I>_real ?\<eta> \<oplus>\<^sub>\<I> (\<I>_res ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>)) (\<A> ?\<eta>)

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
let ?\<A> = "\<lambda>\<eta>. absorb (\<A> \<eta>) (swap_lassocr \<odot> parallel_converter (converter_of_resource (res \<eta>)) 1\<^sub>C)"
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have ideal:
    "connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) =
     connect (?\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
have[intro]: "\<I>_uniform (outs_\<I> (\<I>_real \<eta>) <+> outs_\<I> (\<I>_res \<eta>) <+> outs_\<I> (\<I>_common \<eta>))
     UNIV,\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>\<^sub>C  sim \<eta> |\<^sub>= 1\<^sub>C \<sim> sim \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_uniform (outs_\<I> (\<I>_real \<eta>) <+> outs_\<I> (\<I>_res \<eta>) <+> outs_\<I> (\<I>_common \<eta>)) UNIV,\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>\<^sub>C sim \<eta> |\<^sub>= 1\<^sub>C \<sim> sim \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C
[PROOF STEP]
by(rule eq_\<I>_converter_mono) (auto simp add: le_\<I>_def intro!:
          WT_intro parallel_converter2_id_id[symmetric] parallel_converter2_eq_\<I>_cong eq_\<I>_converter_reflI)
[PROOF STATE]
proof (state)
this:
\<I>_uniform (outs_\<I> (\<I>_real \<eta>) <+> outs_\<I> (\<I>_res \<eta>) <+> outs_\<I> (\<I>_common \<eta>)) UNIV,\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>\<^sub>C sim \<eta> |\<^sub>= 1\<^sub>C \<sim> sim \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C

goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
have *: "outs_\<I> (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) \<turnstile>\<^sub>R  (sim \<eta> |\<^sub>= 1\<^sub>C) \<odot> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<sim>
      swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outs_\<I> (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) \<turnstile>\<^sub>R (sim \<eta> |\<^sub>= 1\<^sub>C) \<odot> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<sim> swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>
[PROOF STEP]
by (rule eq_resource_on_trans[where res'="(sim \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>"],
          rule eq_\<I>_attach_on, (rule  WT_intro)+, rule eq_\<I>_comp_cong)
        (auto simp add: parallel_resource1_wiring_def comp_swap_lassocr attach_compose attach_parallel2
          attach_converter_of_resource_conv_parallel_resource intro!: WT_intro eq_\<I>_converter_reflI)
[PROOF STATE]
proof (state)
this:
outs_\<I> (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) \<turnstile>\<^sub>R (sim \<eta> |\<^sub>= 1\<^sub>C) \<odot> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<sim> swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>

goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
unfolding distinguish_attach[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
using WT
[PROOF STATE]
proof (prove)
using this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> (\<I>_res ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) \<turnstile>g \<A> ?\<eta> \<surd>

goal (1 subgoal):
 1. connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)
[PROOF STEP]
by(rule connect_eq_resource_cong, subst attach_compose[symmetric])
        (intro *, (rule WT_intro)+)
[PROOF STATE]
proof (state)
this:
connect (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
connect (\<A> ?\<eta>) (sim ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res ?\<eta> \<parallel> ideal_resource ?\<eta>) = connect (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource ?\<eta>)

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have real:
    "connect (\<A> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>) =
     connect (?\<A> \<eta>) (real_resource \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (real_resource \<eta>)
[PROOF STEP]
unfolding distinguish_attach[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> real_resource \<eta>)
[PROOF STEP]
by(simp add: attach_compose attach_converter_of_resource_conv_parallel_resource parallel_resource1_wiring_def)
[PROOF STATE]
proof (state)
this:
connect (\<A> ?\<eta>) (parallel_resource1_wiring \<rhd> res ?\<eta> \<parallel> real_resource ?\<eta>) = connect (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (real_resource ?\<eta>)

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have "\<I>_real \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g ?\<A> \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_real \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
[PROOF STEP]
by(rule WT_intro)+
[PROOF STATE]
proof (state)
this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have "interaction_any_bounded_by (?\<A> \<eta>) (bound \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interaction_any_bounded_by (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound \<eta>)
[PROOF STEP]
by interaction_bound_converter simp
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound ?\<eta>)

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound ?\<eta>)

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have "plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (?\<A> \<eta>)" if lossless for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C)))
[PROOF STEP]
by(rule plossless_intro WT_intro | simp add: that)+
[PROOF STATE]
proof (state)
this:
lossless \<Longrightarrow> plossless_gpv (\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (5 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound ?\<eta>)
lossless \<Longrightarrow> plossless_gpv (\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))
[PROOF STEP]
show "negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd>
                        parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>)
                       (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))"
[PROOF STATE]
proof (prove)
using this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound ?\<eta>)
lossless \<Longrightarrow> plossless_gpv (\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
unfolding advantage_def ideal real
[PROOF STATE]
proof (prove)
using this:
\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound ?\<eta>)
lossless \<Longrightarrow> plossless_gpv (\<I>_real ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) (absorb (\<A> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. \<bar>spmf (connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal_resource \<eta>)) True - spmf (connect (absorb (\<A> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (real_resource \<eta>)) True\<bar>)
[PROOF STEP]
by(rule adv[unfolded advantage_def])
[PROOF STATE]
proof (state)
this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) (sim \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))

goal (4 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
from correct
[PROOF STATE]
proof (chain)
picking this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
[PROOF STEP]
obtain cnv
    where correct': "\<And>\<D>. \<lbrakk> \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g \<D> \<eta> \<surd>;
          \<And>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>);
          \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (\<D> \<eta>) \<rbrakk>
          \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and>
              negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))"
[PROOF STATE]
proof (prove)
using this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))

goal (1 subgoal):
 1. (\<And>cnv. (\<And>\<D>. \<lbrakk>\<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g \<D> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g ?\<D> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (?\<D> \<eta>) (bound \<eta>); \<And>\<eta>. lossless \<Longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (?\<D> \<eta>)\<rbrakk> \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (?\<D> \<eta>) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))

goal (4 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
 4. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
show "\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow>
        (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow>
        (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow>
        (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and>
        negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>)
          (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
proof(intro exI conjI strip)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
fix \<D> :: "security \<Rightarrow> ('c + 'g + 'e, 'd + 'h + 'f) distinguisher"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
assume WT_D [rule_format, WT_intro]: "\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>"
      and bound [rule_format, interaction_bound]: "\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)"
      and lossless [rule_format, plossless_intro]: "\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)"
[PROOF STATE]
proof (state)
this:
\<I>_ideal ?\<eta> \<oplus>\<^sub>\<I> (\<I>_res ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) \<turnstile>g \<D> ?\<eta> \<surd>
interaction_any_bounded_by (\<D> ?\<eta>) (bound ?\<eta>)
lossless \<Longrightarrow> plossless_gpv (\<I>_ideal ?\<eta> \<oplus>\<^sub>\<I> (\<I>_res ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>)) (\<D> ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
let ?\<D> = "\<lambda>\<eta>. absorb (\<D> \<eta>) (swap_lassocr \<odot> parallel_converter (converter_of_resource (res \<eta>)) 1\<^sub>C)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have WT': "\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g ?\<D> \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta> \<turnstile>g absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
[PROOF STEP]
by(rule WT_intro)+
[PROOF STATE]
proof (state)
this:
\<I>_ideal ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta> \<turnstile>g absorb (\<D> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have bound': "interaction_any_bounded_by (?\<D> \<eta>) (bound \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interaction_any_bounded_by (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound \<eta>)
[PROOF STEP]
by interaction_bound simp
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<D> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have lossless': "plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (?\<D> \<eta>)" if lossless for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C)))
[PROOF STEP]
by(rule plossless_intro WT_intro that)+
[PROOF STATE]
proof (state)
this:
lossless \<Longrightarrow> plossless_gpv (\<I>_ideal ?\<eta> \<oplus>\<^sub>\<I> \<I>_common ?\<eta>) (absorb (\<D> ?\<eta>) (swap_lassocr \<odot> (converter_of_resource (res ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
from correct'[OF WT' bound' lossless']
[PROOF STATE]
proof (chain)
picking this:
(\<And>\<eta>. lossless \<Longrightarrow> lossless) \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
[PROOF STEP]
have w: "wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)"
      and adv: "negligible (\<lambda>\<eta>. advantage (?\<D> \<eta>) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))"
      for \<eta>
[PROOF STATE]
proof (prove)
using this:
(\<And>\<eta>. lossless \<Longrightarrow> lossless) \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))

goal (1 subgoal):
 1. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>) &&& Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wiring (\<I>_ideal ?\<eta>) (\<I>_real ?\<eta>) (cnv ?\<eta>) (w ?\<eta>)
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (?cnv \<eta>) (w \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
show  "wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)
[PROOF STEP]
by(rule w)
[PROOF STATE]
proof (state)
this:
wiring (\<I>_ideal ?\<eta>) (\<I>_real ?\<eta>) (cnv ?\<eta>) (w ?\<eta>)

goal (1 subgoal):
 1. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
from w
[PROOF STATE]
proof (chain)
picking this:
wiring (\<I>_ideal ?\<eta>) (\<I>_real ?\<eta>) (cnv ?\<eta>) (w ?\<eta>)
[PROOF STEP]
have [WT_intro]: "\<I>_ideal \<eta>, \<I>_real \<eta> \<turnstile>\<^sub>C cnv \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
using this:
wiring (\<I>_ideal ?\<eta>) (\<I>_real ?\<eta>) (cnv ?\<eta>) (w ?\<eta>)

goal (1 subgoal):
 1. \<I>_ideal \<eta>, \<I>_real \<eta> \<turnstile>\<^sub>C cnv \<eta> \<surd>
[PROOF STEP]
by cases
[PROOF STATE]
proof (state)
this:
\<I>_ideal ?\<eta>, \<I>_real ?\<eta> \<turnstile>\<^sub>C cnv ?\<eta> \<surd>

goal (1 subgoal):
 1. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
have "connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) =
      connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
have "connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) =
        connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
by(rule connect_eq_resource_cong[OF WT_D])
          (rule eq_\<I>_attach_on' WT_intro parallel_converter2_eq_\<I>_cong eq_\<I>_converter_reflI parallel_converter2_id_id[symmetric] | simp)+
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)

goal (1 subgoal):
 1. connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)

goal (1 subgoal):
 1. connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
have "\<dots> = connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
[PROOF STEP]
by(simp add: comp_swap_lassocr' attach_compose attach_parallel2)
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))

goal (1 subgoal):
 1. connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>) = connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))

goal (1 subgoal):
 1. connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (swap_lassocr \<rhd> res \<eta> \<parallel> (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>)) = connect (\<D> \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res \<eta> \<parallel> real_resource \<eta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
connect (\<D> ?\<eta>) (swap_lassocr \<rhd> res ?\<eta> \<parallel> (cnv ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource ?\<eta>)) = connect (\<D> ?\<eta>) (cnv ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res ?\<eta> \<parallel> real_resource ?\<eta>)

goal (1 subgoal):
 1. \<And>\<D>. \<lbrakk>\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>); \<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
with adv
[PROOF STATE]
proof (chain)
picking this:
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
connect (\<D> ?\<eta>) (swap_lassocr \<rhd> res ?\<eta> \<parallel> (cnv ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource ?\<eta>)) = connect (\<D> ?\<eta>) (cnv ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res ?\<eta> \<parallel> real_resource ?\<eta>)
[PROOF STEP]
show "negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>)
          (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))"
[PROOF STATE]
proof (prove)
using this:
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (swap_lassocr \<odot> (converter_of_resource (res \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource \<eta>))
connect (\<D> ?\<eta>) (swap_lassocr \<rhd> res ?\<eta> \<parallel> (cnv ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> real_resource ?\<eta>)) = connect (\<D> ?\<eta>) (cnv ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> swap_lassocr \<rhd> res ?\<eta> \<parallel> real_resource ?\<eta>)

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))
[PROOF STEP]
by(simp add: advantage_def distinguish_attach[symmetric] attach_compose attach_converter_of_resource_conv_parallel_resource parallel_resource1_wiring_def)
[PROOF STATE]
proof (state)
this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless \<longrightarrow> plossless_gpv (\<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_ideal \<eta>) (\<I>_real \<eta>) (cnv \<eta>) (w \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta>))

goal (3 subgoals):
 1. \<And>\<eta>. \<I>_real \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> real_resource \<eta> \<surd>
 2. \<And>\<eta>. \<I>_ideal \<eta> \<oplus>\<^sub>\<I> (\<I>_res \<eta> \<oplus>\<^sub>\<I> \<I>_common \<eta>) \<turnstile>res parallel_resource1_wiring \<rhd> res \<eta> \<parallel> ideal_resource \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real \<eta>, \<I>_ideal \<eta> \<turnstile>\<^sub>C sim \<eta> \<surd>
[PROOF STEP]
qed(rule WT_intro)+