[STATEMENT]
theorem parallel_constructive_security:
  assumes "constructive_security real1 ideal1 sim1 \<I>_real1 \<I>_inner1 \<I>_common1 bound1 lossless1 w1"
  assumes "constructive_security real2 ideal2 sim2 \<I>_real2 \<I>_inner2 \<I>_common2 bound2 lossless2 w2"
    (* TODO: add symmetric case for lossless1/2 *)
    and lossless_real1 [plossless_intro]: "\<And>\<eta>. lossless2 \<Longrightarrow> lossless_resource (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (real1 \<eta>)"
    and lossless_sim2 [plossless_intro]: "\<And>\<eta>. lossless1 \<Longrightarrow> plossless_converter (\<I>_real2 \<eta>) (\<I>_inner2 \<eta>) (sim2 \<eta>)"
    and lossless_ideal2 [plossless_intro]: "\<And>\<eta>. lossless1 \<Longrightarrow> lossless_resource (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (ideal2 \<eta>)"
  shows "constructive_security (\<lambda>\<eta>. parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) (\<lambda>\<eta>. parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (\<lambda>\<eta>. sim1 \<eta> |\<^sub>= sim2 \<eta>)
    (\<lambda>\<eta>. \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (\<lambda>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<lambda>\<eta>. \<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)
    (\<lambda>\<eta>. min (bound1 \<eta>) (bound2 \<eta>)) (lossless1 \<or> lossless2) (\<lambda>\<eta>. w1 \<eta> |\<^sub>w w2 \<eta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security (\<lambda>\<eta>. parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) (\<lambda>\<eta>. parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (\<lambda>\<eta>. sim1 \<eta> |\<^sub>= sim2 \<eta>) (\<lambda>\<eta>. \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (\<lambda>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<lambda>\<eta>. \<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (\<lambda>\<eta>. min (bound1 \<eta>) (bound2 \<eta>)) (lossless1 \<or> lossless2) (\<lambda>\<eta>. w1 \<eta> |\<^sub>w w2 \<eta>)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<surd>
 2. \<And>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>, \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta> \<turnstile>\<^sub>C sim1 \<eta> |\<^sub>= sim2 \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
interpret sec1: constructive_security real1 ideal1 sim1 \<I>_real1 \<I>_inner1 \<I>_common1 bound1 lossless1 w1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security real1 ideal1 sim1 \<I>_real1 \<I>_inner1 \<I>_common1 bound1 lossless1 w1
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<surd>
 2. \<And>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>, \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta> \<turnstile>\<^sub>C sim1 \<eta> |\<^sub>= sim2 \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
interpret sec2: constructive_security real2 ideal2 sim2 \<I>_real2 \<I>_inner2 \<I>_common2 bound2 lossless2 w2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security real2 ideal2 sim2 \<I>_real2 \<I>_inner2 \<I>_common2 bound2 lossless2 w2
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<surd>
 2. \<And>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<surd>
 3. \<And>\<eta>. \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>, \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta> \<turnstile>\<^sub>C sim1 \<eta> |\<^sub>= sim2 \<eta> \<surd>
 4. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 5. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
show "(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<surd>"
    and "(\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<surd>"
    and "\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>, \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta> \<turnstile>\<^sub>C sim1 \<eta> |\<^sub>= sim2 \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<surd> &&& (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<surd> &&& \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>, \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta> \<turnstile>\<^sub>C sim1 \<eta> |\<^sub>= sim2 \<eta> \<surd>
[PROOF STEP]
by(rule WT_intro)+
[PROOF STATE]
proof (state)
this:
(\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>res parallel_wiring \<rhd> real1 ?\<eta> \<parallel> real2 ?\<eta> \<surd>
(\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_inner2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>res parallel_wiring \<rhd> ideal1 ?\<eta> \<parallel> ideal2 ?\<eta> \<surd>
\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>, \<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_inner2 ?\<eta> \<turnstile>\<^sub>C sim1 ?\<eta> |\<^sub>= sim2 ?\<eta> \<surd>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
fix \<A> :: "security \<Rightarrow> (('a + 'g) + 'b + 'h, ('c + 'i) + 'd + 'j) distinguisher"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
assume WT [WT_intro]: "(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (state)
this:
(\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>g \<A> ?\<eta> \<surd>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
assume bound [interaction_bound]: "interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))" for \<eta>
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (\<A> ?\<eta>) (min (bound1 ?\<eta>) (bound2 ?\<eta>))

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
assume lossless [plossless_intro]: "lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)" for \<eta>
[PROOF STATE]
proof (state)
this:
lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>)) (\<A> ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
let ?\<A> = "\<lambda>\<eta>. absorb (\<A> \<eta>) (parallel_wiring \<odot> parallel_converter (converter_of_resource (real1 \<eta>)) 1\<^sub>C)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have *:"\<I>_uniform (outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)))
     UNIV,(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C
    ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_uniform (outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>))) UNIV,(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring
[PROOF STEP]
by(rule eq_\<I>_comp_cong, rule eq_\<I>_converter_mono)
      (auto simp add: le_\<I>_def intro: parallel_converter2_eq_\<I>_cong eq_\<I>_converter_reflI WT_converter_parallel_converter2
        WT_converter_id sec2.WT_sim parallel_converter2_id_id[symmetric] eq_\<I>_converter_reflI WT_parallel_wiring)
[PROOF STATE]
proof (state)
this:
\<I>_uniform (outs_\<I> ((\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>))) UNIV,(\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>\<^sub>C ((1\<^sub>C |\<^sub>= sim2 ?\<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((1\<^sub>C |\<^sub>= sim2 ?\<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have **: "outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R
    ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim>
    parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>
[PROOF STEP]
unfolding comp_parallel_wiring
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R parallel_wiring \<odot> ((1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= sim2 \<eta> |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>
[PROOF STEP]
by(rule eq_resource_on_trans, rule eq_\<I>_attach_on[where conv'="parallel_wiring \<odot> (1\<^sub>C |\<^sub>= sim2 \<eta> |\<^sub>= 1\<^sub>C)"]
        , (rule WT_intro)+, rule eq_\<I>_comp_cong, rule eq_\<I>_converter_mono)
      (auto simp add: le_\<I>_def attach_compose attach_parallel2 attach_converter_of_resource_conv_parallel_resource
        intro: WT_intro parallel_converter2_eq_\<I>_cong parallel_converter2_id_id eq_\<I>_converter_reflI)
[PROOF STATE]
proof (state)
this:
outs_\<I> ((\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>)) \<turnstile>\<^sub>R ((1\<^sub>C |\<^sub>= sim2 ?\<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<rhd> real1 ?\<eta> \<parallel> ideal2 ?\<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have ideal2:
    "connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) =
     connect (?\<A> \<eta>) (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)
[PROOF STEP]
unfolding distinguish_attach[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)
[PROOF STEP]
proof (rule connect_eq_resource_cong[OF WT, rotated], goal_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<surd>
 2. outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<surd>
 2. outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>
[PROOF STEP]
by(subst attach_compose[symmetric], rule eq_resource_on_trans
          , rule eq_\<I>_attach_on[where conv'="((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring"])
        ((rule WT_intro)+ | intro * | intro ** )+
[PROOF STATE]
proof (state)
this:
outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>

goal (1 subgoal):
 1. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>res (1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<surd>
[PROOF STEP]
qed (rule WT_intro)+
[PROOF STATE]
proof (state)
this:
connect (\<A> ?\<eta>) ((1\<^sub>C |\<^sub>= sim2 ?\<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 ?\<eta> \<parallel> ideal2 ?\<eta>) = connect (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have real2: "connect (\<A> \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (?\<A> \<eta>) (real2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (real2 \<eta>)
[PROOF STEP]
unfolding distinguish_attach[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C) \<rhd> real2 \<eta>)
[PROOF STEP]
by(simp add: attach_compose attach_converter_of_resource_conv_parallel_resource)
[PROOF STATE]
proof (state)
this:
connect (\<A> ?\<eta>) (parallel_wiring \<rhd> real1 ?\<eta> \<parallel> real2 ?\<eta>) = connect (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (real2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "\<I>_real2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g ?\<A> \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_real2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
[PROOF STEP]
by(rule WT_intro)+
[PROOF STATE]
proof (state)
this:
\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "interaction_any_bounded_by (?\<A> \<eta>) (bound2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interaction_any_bounded_by (absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 \<eta>)
[PROOF STEP]
by interaction_bound_converter simp
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "plossless_gpv (\<I>_real2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (?\<A> \<eta>)" if "lossless2" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_gpv (\<I>_real2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C)))
[PROOF STEP]
by(rule plossless_intro WT_intro | simp add: that)+
[PROOF STATE]
proof (state)
this:
lossless2 \<Longrightarrow> plossless_gpv (\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 ?\<eta>)
lossless2 \<Longrightarrow> plossless_gpv (\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))
[PROOF STEP]
have negl2: "negligible (\<lambda>\<eta>. advantage (\<A> \<eta>)
     ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)
     (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))"
[PROOF STATE]
proof (prove)
using this:
\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 ?\<eta>)
lossless2 \<Longrightarrow> plossless_gpv (\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
unfolding advantage_def ideal2 real2
[PROOF STATE]
proof (prove)
using this:
\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 ?\<eta>)
lossless2 \<Longrightarrow> plossless_gpv (\<I>_real2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. \<bar>spmf (connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) True - spmf (connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (converter_of_resource (real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (real2 \<eta>)) True\<bar>)
[PROOF STEP]
by(rule sec2.adv[unfolded advantage_def])
[PROOF STATE]
proof (state)
this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
let ?\<A> = "\<lambda>\<eta>. absorb (\<A> \<eta>) (parallel_wiring \<odot> parallel_converter 1\<^sub>C (converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have ideal1:
    "connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) =
     connect (?\<A> \<eta>) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
have *: "\<I>_uniform ((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+>  outs_\<I> (\<I>_common1 \<eta>) <+>
      outs_\<I> (\<I>_common2 \<eta>)) UNIV,(\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C
    ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_uniform ((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+> outs_\<I> (\<I>_common1 \<eta>) <+> outs_\<I> (\<I>_common2 \<eta>)) UNIV,(\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring
[PROOF STEP]
by(rule eq_\<I>_comp_cong, rule eq_\<I>_converter_mono)
        (auto simp add: le_\<I>_def comp_parallel_wiring' attach_compose attach_parallel2 attach_converter_of_resource_conv_parallel_resource2
          intro: WT_intro parallel_converter2_id_id[symmetric] eq_\<I>_converter_reflI parallel_converter2_eq_\<I>_cong eq_\<I>_converter_mono)
[PROOF STATE]
proof (state)
this:
\<I>_uniform ((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+> outs_\<I> (\<I>_common1 \<eta>) <+> outs_\<I> (\<I>_common2 \<eta>)) UNIV,(\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring

goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
have **:"((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+> outs_\<I> (\<I>_common1 \<eta>) <+> outs_\<I> (\<I>_common2 \<eta>)) \<turnstile>\<^sub>R
    (sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<sim>
    parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd>  sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+> outs_\<I> (\<I>_common1 \<eta>) <+> outs_\<I> (\<I>_common2 \<eta>)) \<turnstile>\<^sub>R (sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>
[PROOF STEP]
unfolding attach_compose[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+> outs_\<I> (\<I>_common1 \<eta>) <+> outs_\<I> (\<I>_common2 \<eta>)) \<turnstile>\<^sub>R ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<sim> (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>))) \<odot> (sim1 \<eta> |\<^sub>= 1\<^sub>C) \<rhd> ideal1 \<eta>
[PROOF STEP]
by(rule eq_resource_on_trans, rule eq_\<I>_attach_on[where conv'="((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring"])
        ((rule WT_intro)+ | intro * | auto simp add: le_\<I>_def comp_parallel_wiring' attach_compose
          attach_parallel2 attach_converter_of_resource_conv_parallel_resource2 intro: WT_intro *)+
[PROOF STATE]
proof (state)
this:
((outs_\<I> (\<I>_real1 \<eta>) <+> outs_\<I> (\<I>_real2 \<eta>)) <+> outs_\<I> (\<I>_common1 \<eta>) <+> outs_\<I> (\<I>_common2 \<eta>)) \<turnstile>\<^sub>R (sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>

goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
unfolding distinguish_attach[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
using WT
[PROOF STATE]
proof (prove)
using this:
(\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>g \<A> ?\<eta> \<surd>

goal (1 subgoal):
 1. connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)
[PROOF STEP]
by(rule connect_eq_resource_cong) (simp add: **, (rule WT_intro)+)
[PROOF STATE]
proof (state)
this:
connect (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
connect (\<A> ?\<eta>) ((sim1 ?\<eta> |\<^sub>= sim2 ?\<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 ?\<eta> \<parallel> ideal2 ?\<eta>) = connect (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (sim1 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have real1:
    "connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) =
     connect (?\<A> \<eta>) (real1 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)
[PROOF STEP]
have **: "\<I>_uniform (outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)))
     UNIV,(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C
      ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_uniform (outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>))) UNIV,(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring
[PROOF STEP]
by(rule eq_\<I>_comp_cong, rule eq_\<I>_converter_mono)
        (auto simp add: le_\<I>_def intro: WT_intro parallel_converter2_eq_\<I>_cong WT_converter_parallel_converter2
          parallel_converter2_id_id[symmetric] eq_\<I>_converter_reflI WT_parallel_wiring)
[PROOF STATE]
proof (state)
this:
\<I>_uniform (outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>))) UNIV,(\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) \<oplus>\<^sub>\<I> (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>\<^sub>C ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<sim> ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring

goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)
[PROOF STEP]
have *: "outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R
    parallel_wiring \<odot> ((1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= sim2 \<eta> |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim>
    parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> real1 \<eta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R parallel_wiring \<odot> ((1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= sim2 \<eta> |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> real1 \<eta>
[PROOF STEP]
by(rule eq_resource_on_trans, rule eq_\<I>_attach_on[where conv'="parallel_wiring \<odot> (1\<^sub>C |\<^sub>= sim2 \<eta> |\<^sub>= 1\<^sub>C)"]
          , (rule WT_intro)+, rule eq_\<I>_comp_cong, rule eq_\<I>_converter_mono)
        (auto simp add: le_\<I>_def attach_compose attach_converter_of_resource_conv_parallel_resource2 attach_parallel2
          intro: WT_intro parallel_converter2_eq_\<I>_cong parallel_converter2_id_id eq_\<I>_converter_reflI)
[PROOF STATE]
proof (state)
this:
outs_\<I> ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R parallel_wiring \<odot> ((1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= sim2 \<eta> |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta> \<sim> parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> real1 \<eta>

goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)
[PROOF STEP]
unfolding distinguish_attach[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> real1 \<eta>)
[PROOF STEP]
using WT
[PROOF STATE]
proof (prove)
using this:
(\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>g \<A> ?\<eta> \<surd>

goal (1 subgoal):
 1. connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)) \<rhd> real1 \<eta>)
[PROOF STEP]
by(rule connect_eq_resource_cong, fold attach_compose)
        (rule eq_resource_on_trans[where res'="((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C) \<odot> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>"]
          , (rule eq_\<I>_attach_on, (intro * ** | subst comp_parallel_wiring | rule eq_\<I>_attach_on | (rule WT_intro eq_\<I>_attach_on)+ )+))
[PROOF STATE]
proof (state)
this:
connect (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
connect (\<A> ?\<eta>) ((1\<^sub>C |\<^sub>= sim2 ?\<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 ?\<eta> \<parallel> ideal2 ?\<eta>) = connect (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (real1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g ?\<A> \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>))) \<surd>
[PROOF STEP]
by(rule WT_intro)+
[PROOF STATE]
proof (state)
this:
\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))) \<surd>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))) \<surd>

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "interaction_any_bounded_by (?\<A> \<eta>) (bound1 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interaction_any_bounded_by (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (bound1 \<eta>)
[PROOF STEP]
by interaction_bound_converter simp
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (bound1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (bound1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "plossless_gpv (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (?\<A> \<eta>)" if "lossless1" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_gpv (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>))))
[PROOF STEP]
by(rule plossless_intro WT_intro | simp add: that)+
[PROOF STATE]
proof (state)
this:
lossless1 \<Longrightarrow> plossless_gpv (\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))))

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (bound1 ?\<eta>)
lossless1 \<Longrightarrow> plossless_gpv (\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))))
[PROOF STEP]
have negl1: "negligible (\<lambda>\<eta>. advantage (\<A> \<eta>)
     ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>)
     ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>))"
[PROOF STATE]
proof (prove)
using this:
\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (bound1 ?\<eta>)
lossless1 \<Longrightarrow> plossless_gpv (\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>))
[PROOF STEP]
unfolding advantage_def ideal1 real1
[PROOF STATE]
proof (prove)
using this:
\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta> \<turnstile>g absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))) \<surd>
interaction_any_bounded_by (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>)))) (bound1 ?\<eta>)
lossless1 \<Longrightarrow> plossless_gpv (\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta>) (absorb (\<A> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 ?\<eta>))))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. \<bar>spmf (connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (sim1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal1 \<eta>)) True - spmf (connect (absorb (\<A> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (sim2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> ideal2 \<eta>)))) (real1 \<eta>)) True\<bar>)
[PROOF STEP]
by(rule sec1.adv[unfolded advantage_def])
[PROOF STATE]
proof (state)
this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>))

goal (2 subgoals):
 1. \<And>\<A>. \<lbrakk>\<And>\<eta>. (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<A> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<A> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<And>\<eta>. lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<A> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
 2. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from negligible_plus[OF negl1 negl2]
[PROOF STATE]
proof (chain)
picking this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) + advantage (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
show "negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>)
         (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))"
[PROOF STATE]
proof (prove)
using this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) + advantage (\<A> \<eta>) ((1\<^sub>C |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
by(rule negligible_mono) (auto simp add: advantage_def intro!: eventuallyI landau_o.big_mono )
[PROOF STATE]
proof (state)
this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<A> \<eta>) ((sim1 \<eta> |\<^sub>= sim2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))

goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
interpret sec1: constructive_security real1 ideal1 sim1 \<I>_real1 \<I>_inner1 \<I>_common1 bound1 lossless1 w1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security real1 ideal1 sim1 \<I>_real1 \<I>_inner1 \<I>_common1 bound1 lossless1 w1
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
interpret sec2: constructive_security real2 ideal2 sim2 \<I>_real2 \<I>_inner2 \<I>_common2 bound2 lossless2 w2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constructive_security real2 ideal2 sim2 \<I>_real2 \<I>_inner2 \<I>_common2 bound2 lossless2 w2
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from sec1.correct
[PROOF STATE]
proof (chain)
picking this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound1 \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless1 \<longrightarrow> plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv \<eta>) (w1 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal1 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))
[PROOF STEP]
obtain cnv1
    where correct1: "\<And>\<D>. \<lbrakk> \<And>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g \<D> \<eta> \<surd>;
      \<And>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound1 \<eta>);
      \<And>\<eta>. lossless1 \<Longrightarrow> plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (\<D> \<eta>) \<rbrakk>
     \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<and>
         negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))"
[PROOF STATE]
proof (prove)
using this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound1 \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless1 \<longrightarrow> plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv \<eta>) (w1 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal1 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))

goal (1 subgoal):
 1. (\<And>cnv1. (\<And>\<D>. \<lbrakk>\<And>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g \<D> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound1 \<eta>); \<And>\<eta>. lossless1 \<Longrightarrow> plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<And>\<eta>. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g ?\<D> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (?\<D> \<eta>) (bound1 \<eta>); \<And>\<eta>. lossless1 \<Longrightarrow> plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (?\<D> \<eta>)\<rbrakk> \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (?\<D> \<eta>) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))

goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from sec2.correct
[PROOF STATE]
proof (chain)
picking this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound2 \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless2 \<longrightarrow> plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv \<eta>) (w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))
[PROOF STEP]
obtain cnv2
    where correct2: "\<And>\<D>. \<lbrakk> \<And>\<eta>. \<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g \<D> \<eta> \<surd>;
      \<And>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound2 \<eta>);
      \<And>\<eta>. lossless2 \<Longrightarrow> plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (\<D> \<eta>) \<rbrakk>
     \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>)) \<and>
         negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))"
[PROOF STATE]
proof (prove)
using this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. \<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound2 \<eta>)) \<longrightarrow> (\<forall>\<eta>. lossless2 \<longrightarrow> plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv \<eta>) (w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))

goal (1 subgoal):
 1. (\<And>cnv2. (\<And>\<D>. \<lbrakk>\<And>\<eta>. \<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g \<D> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (bound2 \<eta>); \<And>\<eta>. lossless2 \<Longrightarrow> plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<And>\<eta>. \<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g ?\<D> \<eta> \<surd>; \<And>\<eta>. interaction_any_bounded_by (?\<D> \<eta>) (bound2 \<eta>); \<And>\<eta>. lossless2 \<Longrightarrow> plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (?\<D> \<eta>)\<rbrakk> \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (?\<D> \<eta>) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))

goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
show "\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow>
       (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow>
       (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow>
       (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and>
       negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
proof(intro exI strip conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
fix \<D> :: "security \<Rightarrow> (('e + 'k) + 'b + 'h, ('f + 'l) + 'd + 'j) distinguisher"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
assume WT_D [rule_format, WT_intro]: "\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>"
      and bound [rule_format, interaction_bound]: "\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))"
      and lossless [rule_format, plossless_intro]: "\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)"
[PROOF STATE]
proof (state)
this:
(\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_inner2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>g \<D> ?\<eta> \<surd>
interaction_any_bounded_by (\<D> ?\<eta>) (min (bound1 ?\<eta>) (bound2 ?\<eta>))
lossless1 \<or> lossless2 \<Longrightarrow> plossless_gpv ((\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_inner2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>)) (\<D> ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
let ?cnv = "\<lambda>\<eta>. cnv1 \<eta> |\<^sub>= cnv2 \<eta>"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
let ?\<D>1 = "\<lambda>\<eta>. absorb (\<D> \<eta>) (parallel_wiring \<odot> parallel_converter 1\<^sub>C (converter_of_resource (ideal2 \<eta>)))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have WT1: "\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g ?\<D>1 \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta> \<turnstile>g absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>))) \<surd>
[PROOF STEP]
by(rule WT_intro)+
[PROOF STATE]
proof (state)
this:
\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta> \<turnstile>g absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 ?\<eta>))) \<surd>

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have bound1: "interaction_any_bounded_by (?\<D>1 \<eta>) (bound1 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interaction_any_bounded_by (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (bound1 \<eta>)
[PROOF STEP]
by interaction_bound simp
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 ?\<eta>)))) (bound1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (?\<D>1 \<eta>)" if lossless1 for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_gpv (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_common1 \<eta>) (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>))))
[PROOF STEP]
by(rule plossless_intro WT_intro | simp add: that)+
[PROOF STATE]
proof (state)
this:
lossless1 \<Longrightarrow> plossless_gpv (\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common1 ?\<eta>) (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 ?\<eta>))))

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from correct1[OF WT1 bound1 this]
[PROOF STATE]
proof (chain)
picking this:
(\<And>\<eta>. lossless1 \<Longrightarrow> lossless1) \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))
[PROOF STEP]
have w1: "wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)"
      and adv1: "negligible (\<lambda>\<eta>. advantage (?\<D>1 \<eta>) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))" for \<eta>
[PROOF STATE]
proof (prove)
using this:
(\<And>\<eta>. lossless1 \<Longrightarrow> lossless1) \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))

goal (1 subgoal):
 1. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>) &&& Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wiring (\<I>_inner1 ?\<eta>) (\<I>_real1 ?\<eta>) (cnv1 ?\<eta>) (w1 ?\<eta>)
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>))

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from w1
[PROOF STATE]
proof (chain)
picking this:
wiring (\<I>_inner1 ?\<eta>) (\<I>_real1 ?\<eta>) (cnv1 ?\<eta>) (w1 ?\<eta>)
[PROOF STEP]
obtain f g where fg: "\<And>\<eta>. w1 \<eta> = (f \<eta>, g \<eta>)"
      and [WT_intro]: "\<And>\<eta>. \<I>_inner1 \<eta>, \<I>_real1 \<eta> \<turnstile>\<^sub>C cnv1 \<eta> \<surd>"
      and eq1: "\<And>\<eta>. \<I>_inner1 \<eta>, \<I>_real1 \<eta> \<turnstile>\<^sub>C cnv1 \<eta> \<sim> map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C"
[PROOF STATE]
proof (prove)
using this:
wiring (\<I>_inner1 ?\<eta>) (\<I>_real1 ?\<eta>) (cnv1 ?\<eta>) (w1 ?\<eta>)

goal (1 subgoal):
 1. (\<And>f g. \<lbrakk>\<And>\<eta>. w1 \<eta> = (f \<eta>, g \<eta>); \<And>\<eta>. \<I>_inner1 \<eta>, \<I>_real1 \<eta> \<turnstile>\<^sub>C cnv1 \<eta> \<surd>; \<And>\<eta>. \<I>_inner1 \<eta>,\<I>_real1 \<eta> \<turnstile>\<^sub>C cnv1 \<eta> \<sim> map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply atomize_elim
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<Longrightarrow> \<exists>f g. (\<forall>\<eta>. w1 \<eta> = (f \<eta>, g \<eta>)) \<and> (\<forall>\<eta>. \<I>_inner1 \<eta>, \<I>_real1 \<eta> \<turnstile>\<^sub>C cnv1 \<eta> \<surd>) \<and> (\<forall>\<eta>. \<I>_inner1 \<eta>,\<I>_real1 \<eta> \<turnstile>\<^sub>C cnv1 \<eta> \<sim> map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C)
[PROOF STEP]
apply(fold all_conj_distrib)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<Longrightarrow> \<exists>f g. \<forall>x. w1 x = (f x, g x) \<and> \<I>_inner1 x, \<I>_real1 x \<turnstile>\<^sub>C cnv1 x \<surd> \<and> \<I>_inner1 x,\<I>_real1 x \<turnstile>\<^sub>C cnv1 x \<sim> map_converter id id (f x) (g x) 1\<^sub>C
[PROOF STEP]
apply(subst choice_iff[symmetric])+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<eta>. wiring (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (cnv1 \<eta>) (w1 \<eta>)) \<Longrightarrow> \<forall>x. \<exists>y ya. w1 x = (y, ya) \<and> \<I>_inner1 x, \<I>_real1 x \<turnstile>\<^sub>C cnv1 x \<surd> \<and> \<I>_inner1 x,\<I>_real1 x \<turnstile>\<^sub>C cnv1 x \<sim> map_converter id id y ya 1\<^sub>C
[PROOF STEP]
apply(fastforce elim!: wiring.cases)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
w1 ?\<eta> = (f ?\<eta>, g ?\<eta>)
\<I>_inner1 ?\<eta>, \<I>_real1 ?\<eta> \<turnstile>\<^sub>C cnv1 ?\<eta> \<surd>
\<I>_inner1 ?\<eta>,\<I>_real1 ?\<eta> \<turnstile>\<^sub>C cnv1 ?\<eta> \<sim> map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have \<I>1: "\<I>_inner1 \<eta> \<le> map_\<I> (f \<eta>) (g \<eta>) (\<I>_real1 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_inner1 \<eta> \<le> map_\<I> (f \<eta>) (g \<eta>) (\<I>_real1 \<eta>)
[PROOF STEP]
using eq_\<I>_converterD_WT1[OF eq1]
[PROOF STATE]
proof (prove)
using this:
\<I>_inner1 ?\<eta>1, \<I>_real1 ?\<eta>1 \<turnstile>\<^sub>C cnv1 ?\<eta>1 \<surd> \<Longrightarrow> \<I>_inner1 ?\<eta>1, \<I>_real1 ?\<eta>1 \<turnstile>\<^sub>C map_converter id id (f ?\<eta>1) (g ?\<eta>1) 1\<^sub>C \<surd>

goal (1 subgoal):
 1. \<I>_inner1 \<eta> \<le> map_\<I> (f \<eta>) (g \<eta>) (\<I>_real1 \<eta>)
[PROOF STEP]
by(rule WT_map_converter_idD)(rule WT_intro)
[PROOF STATE]
proof (state)
this:
\<I>_inner1 ?\<eta> \<le> map_\<I> (f ?\<eta>) (g ?\<eta>) (\<I>_real1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
with WT_converter_id order_refl
[PROOF STATE]
proof (chain)
picking this:
?\<I>, ?\<I> \<turnstile>\<^sub>C 1\<^sub>C \<surd>
?x \<le> ?x
\<I>_inner1 ?\<eta> \<le> map_\<I> (f ?\<eta>) (g ?\<eta>) (\<I>_real1 ?\<eta>)
[PROOF STEP]
have [WT_intro]: "\<I>_inner1 \<eta>, map_\<I> (f \<eta>) (g \<eta>) (\<I>_real1 \<eta>) \<turnstile>\<^sub>C 1\<^sub>C \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
using this:
?\<I>, ?\<I> \<turnstile>\<^sub>C 1\<^sub>C \<surd>
?x \<le> ?x
\<I>_inner1 ?\<eta> \<le> map_\<I> (f ?\<eta>) (g ?\<eta>) (\<I>_real1 ?\<eta>)

goal (1 subgoal):
 1. \<I>_inner1 \<eta>, map_\<I> (f \<eta>) (g \<eta>) (\<I>_real1 \<eta>) \<turnstile>\<^sub>C 1\<^sub>C \<surd>
[PROOF STEP]
by(rule WT_converter_mono)
[PROOF STATE]
proof (state)
this:
\<I>_inner1 ?\<eta>, map_\<I> (f ?\<eta>) (g ?\<eta>) (\<I>_real1 ?\<eta>) \<turnstile>\<^sub>C 1\<^sub>C \<surd>

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have lossless1 [plossless_intro]: "plossless_converter (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_converter (\<I>_inner1 \<eta>) (\<I>_real1 \<eta>) (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C)
[PROOF STEP]
by(rule plossless_map_converter)(rule plossless_intro order_refl \<I>1 WT_intro plossless_converter_mono | simp)+
[PROOF STATE]
proof (state)
this:
plossless_converter (\<I>_inner1 ?\<eta>) (\<I>_real1 ?\<eta>) (map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
let ?\<D>2 = "\<lambda>\<eta>. absorb (\<D> \<eta>) (parallel_wiring \<odot> parallel_converter (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)) 1\<^sub>C)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have WT2: "\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g ?\<D>2 \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta> \<turnstile>g absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>
[PROOF STEP]
by(rule WT_intro | simp)+
[PROOF STATE]
proof (state)
this:
\<I>_inner2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta> \<turnstile>g absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)) \<surd>

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have bound2: "interaction_any_bounded_by (?\<D>2 \<eta>) (bound2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interaction_any_bounded_by (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 \<eta>)
[PROOF STEP]
by interaction_bound simp
[PROOF STATE]
proof (state)
this:
interaction_any_bounded_by (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (bound2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have "plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (?\<D>2 \<eta>)" if lossless2 for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. plossless_gpv (\<I>_inner2 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C)))
[PROOF STEP]
by(rule plossless_intro WT_intro | simp add: that)+
[PROOF STATE]
proof (state)
this:
lossless2 \<Longrightarrow> plossless_gpv (\<I>_inner2 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C)))

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from correct2[OF WT2 bound2 this]
[PROOF STATE]
proof (chain)
picking this:
(\<And>\<eta>. lossless2 \<Longrightarrow> lossless2) \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))
[PROOF STEP]
have w2: "wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>)"
      and adv2: "negligible (\<lambda>\<eta>. advantage (?\<D>2 \<eta>) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))" for \<eta>
[PROOF STATE]
proof (prove)
using this:
(\<And>\<eta>. lossless2 \<Longrightarrow> lossless2) \<Longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))

goal (1 subgoal):
 1. wiring (\<I>_inner2 \<eta>) (\<I>_real2 \<eta>) (cnv2 \<eta>) (w2 \<eta>) &&& Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wiring (\<I>_inner2 ?\<eta>) (\<I>_real2 ?\<eta>) (cnv2 ?\<eta>) (w2 ?\<eta>)
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from w2
[PROOF STATE]
proof (chain)
picking this:
wiring (\<I>_inner2 ?\<eta>) (\<I>_real2 ?\<eta>) (cnv2 ?\<eta>) (w2 ?\<eta>)
[PROOF STEP]
have [WT_intro]: "\<I>_inner2 \<eta>, \<I>_real2 \<eta> \<turnstile>\<^sub>C cnv2 \<eta> \<surd>" for \<eta>
[PROOF STATE]
proof (prove)
using this:
wiring (\<I>_inner2 ?\<eta>) (\<I>_real2 ?\<eta>) (cnv2 ?\<eta>) (w2 ?\<eta>)

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

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have *: "connect (\<D> \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) =
      connect (?\<D>2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
have "outs_\<I> ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R
         ?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<sim>
         (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= (1\<^sub>C |\<^sub>= 1\<^sub>C) \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outs_\<I> ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<sim> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>
[PROOF STEP]
by(rule eq_\<I>_attach_on' WT_intro parallel_converter2_eq_\<I>_cong eq1 eq_\<I>_converter_reflI parallel_converter2_id_id[symmetric])+ simp
[PROOF STATE]
proof (state)
this:
outs_\<I> ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<sim> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>

goal (1 subgoal):
 1. connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
outs_\<I> ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<sim> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>

goal (1 subgoal):
 1. connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
have "(map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= (1\<^sub>C |\<^sub>= 1\<^sub>C) \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> =
        parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) \<parallel> (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> = parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) \<parallel> (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
by(simp add: comp_parallel_wiring' attach_compose attach_parallel2)
[PROOF STATE]
proof (state)
this:
(map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> = parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) \<parallel> (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)

goal (1 subgoal):
 1. connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
outs_\<I> ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<sim> parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) \<parallel> (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
outs_\<I> ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) \<turnstile>\<^sub>R (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta> \<sim> parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) \<parallel> (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)

goal (1 subgoal):
 1. connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)
[PROOF STEP]
by(auto intro!: connect_eq_resource_cong[OF WT_D] intro: WT_intro simp add: distinguish_attach[symmetric] attach_compose attach_converter_of_resource_conv_parallel_resource)
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
connect (\<D> ?\<eta>) ((cnv1 ?\<eta> |\<^sub>= cnv2 ?\<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 ?\<eta> \<parallel> real2 ?\<eta>) = connect (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (cnv2 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have **: "connect (?\<D>2 \<eta>) (ideal2 \<eta>) = connect (?\<D>1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
have "connect (?\<D>2 \<eta>) (ideal2 \<eta>) =
        connect (\<D> \<eta>) (parallel_wiring \<rhd> ((map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C) \<rhd> (real1 \<eta> \<parallel> ideal2 \<eta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)
[PROOF STEP]
by(simp add: distinguish_attach[symmetric] attach_converter_of_resource_conv_parallel_resource attach_compose attach_parallel2)
[PROOF STATE]
proof (state)
this:
connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)

goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)

goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
have "\<dots> = connect (\<D> \<eta>) (parallel_wiring \<rhd> ((cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C) \<rhd> (real1 \<eta> \<parallel> ideal2 \<eta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> (cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)
[PROOF STEP]
unfolding attach_compose[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (parallel_wiring \<odot> ((map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<odot> ((cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)
[PROOF STEP]
using WT_D
[PROOF STATE]
proof (prove)
using this:
(\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_inner2 ?\<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_common2 ?\<eta>) \<turnstile>g \<D> ?\<eta> \<surd>

goal (1 subgoal):
 1. connect (\<D> \<eta>) (parallel_wiring \<odot> ((map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<odot> ((cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C) \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)
[PROOF STEP]
by(rule connect_eq_resource_cong[symmetric])
          (rule eq_\<I>_attach_on' WT_intro eq_\<I>_comp_cong eq_\<I>_converter_reflI parallel_converter2_eq_\<I>_cong eq1 | simp)+
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> (cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)

goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (parallel_wiring \<rhd> (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> (cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>)

goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
have "\<dots> = connect (?\<D>1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (\<D> \<eta>) (parallel_wiring \<rhd> (cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
by(simp add: distinguish_attach[symmetric] attach_converter_of_resource_conv_parallel_resource2 attach_compose attach_parallel2)
[PROOF STATE]
proof (state)
this:
connect (\<D> \<eta>) (parallel_wiring \<rhd> (cnv1 \<eta> |\<^sub>= 1\<^sub>C) |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta> \<parallel> ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)

goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)

goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) = connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
connect (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f ?\<eta>) (g ?\<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 ?\<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 ?\<eta>) = connect (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 ?\<eta>)))) (cnv1 ?\<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
have ***: "connect (?\<D>1 \<eta>) (ideal1 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connect (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) = connect (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>)
[PROOF STEP]
by(auto intro!: connect_eq_resource_cong[OF WT_D] simp add: attach_converter_of_resource_conv_parallel_resource2 distinguish_attach[symmetric] attach_compose intro: WT_intro)
[PROOF STATE]
proof (state)
this:
connect (absorb (\<D> ?\<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 ?\<eta>)))) (ideal1 ?\<eta>) = connect (\<D> ?\<eta>) (parallel_wiring \<rhd> ideal1 ?\<eta> \<parallel> ideal2 ?\<eta>)

goal (2 subgoals):
 1. \<And>\<D> \<eta>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
 2. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
show "wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (?cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)" for \<eta>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
[PROOF STEP]
using w1 w2
[PROOF STATE]
proof (prove)
using this:
wiring (\<I>_inner1 ?\<eta>) (\<I>_real1 ?\<eta>) (cnv1 ?\<eta>) (w1 ?\<eta>)
wiring (\<I>_inner2 ?\<eta>) (\<I>_real2 ?\<eta>) (cnv2 ?\<eta>) (w2 ?\<eta>)

goal (1 subgoal):
 1. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv1 \<eta> |\<^sub>= cnv2 \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)
[PROOF STEP]
by(rule wiring_parallel_converter2)
[PROOF STATE]
proof (state)
this:
wiring (\<I>_inner1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_inner2 ?\<eta>) (\<I>_real1 ?\<eta> \<oplus>\<^sub>\<I> \<I>_real2 ?\<eta>) (cnv1 ?\<eta> |\<^sub>= cnv2 ?\<eta>) (w1 ?\<eta> |\<^sub>w w2 ?\<eta>)

goal (1 subgoal):
 1. \<And>\<D>. \<lbrakk>\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>; \<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>)); \<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)\<rbrakk> \<Longrightarrow> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
from negligible_plus[OF adv1 adv2]
[PROOF STATE]
proof (chain)
picking this:
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) + advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))
[PROOF STEP]
show "negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (?cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))"
[PROOF STATE]
proof (prove)
using this:
Negligible.negligible (\<lambda>\<eta>. advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (1\<^sub>C |\<^sub>\<propto> converter_of_resource (ideal2 \<eta>)))) (ideal1 \<eta>) (cnv1 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) + advantage (absorb (\<D> \<eta>) (parallel_wiring \<odot> (converter_of_resource (map_converter id id (f \<eta>) (g \<eta>) 1\<^sub>C |\<^sub>= 1\<^sub>C \<rhd> real1 \<eta>) |\<^sub>\<propto> 1\<^sub>C))) (ideal2 \<eta>) (cnv2 \<eta> |\<^sub>= 1\<^sub>C \<rhd> real2 \<eta>))

goal (1 subgoal):
 1. Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))
[PROOF STEP]
by(rule negligible_le)(simp add: advantage_def * ** ***)
[PROOF STATE]
proof (state)
this:
Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) ((cnv1 \<eta> |\<^sub>= cnv2 \<eta>) |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>cnv. \<forall>\<D>. (\<forall>\<eta>. (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>) \<turnstile>g \<D> \<eta> \<surd>) \<longrightarrow> (\<forall>\<eta>. interaction_any_bounded_by (\<D> \<eta>) (min (bound1 \<eta>) (bound2 \<eta>))) \<longrightarrow> (\<forall>\<eta>. lossless1 \<or> lossless2 \<longrightarrow> plossless_gpv ((\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) \<oplus>\<^sub>\<I> (\<I>_common1 \<eta> \<oplus>\<^sub>\<I> \<I>_common2 \<eta>)) (\<D> \<eta>)) \<longrightarrow> (\<forall>\<eta>. wiring (\<I>_inner1 \<eta> \<oplus>\<^sub>\<I> \<I>_inner2 \<eta>) (\<I>_real1 \<eta> \<oplus>\<^sub>\<I> \<I>_real2 \<eta>) (cnv \<eta>) (w1 \<eta> |\<^sub>w w2 \<eta>)) \<and> Negligible.negligible (\<lambda>\<eta>. advantage (\<D> \<eta>) (parallel_wiring \<rhd> ideal1 \<eta> \<parallel> ideal2 \<eta>) (cnv \<eta> |\<^sub>= 1\<^sub>C \<rhd> parallel_wiring \<rhd> real1 \<eta> \<parallel> real2 \<eta>))

goal:
No subgoals!
[PROOF STEP]
qed