[STATEMENT]
lemma unhindered_saturate1: \<comment> \<open>Lemma 6.10\<close>
  assumes unhindered: "\<not> hindered \<Gamma>"
  and a: "a \<in> A \<Gamma>"
  shows "\<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
from a A_vertex
[PROOF STATE]
proof (chain)
picking this:
a \<in> A \<Gamma>
A \<Gamma> \<subseteq> \<^bold>V
[PROOF STEP]
have a_vertex: "vertex \<Gamma> a"
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
A \<Gamma> \<subseteq> \<^bold>V

goal (1 subgoal):
 1. vertex \<Gamma> a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vertex \<Gamma> a

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
from unhindered
[PROOF STATE]
proof (chain)
picking this:
\<not> hindered \<Gamma>
[PROOF STEP]
have "\<not> hindrance \<Gamma> zero_current"
[PROOF STATE]
proof (prove)
using this:
\<not> hindered \<Gamma>

goal (1 subgoal):
 1. \<not> hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
by(auto intro!: hindered.intros simp add: )
[PROOF STATE]
proof (state)
this:
\<not> hindrance \<Gamma> (\<lambda>_. 0)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
have a_\<E>: "a \<in> \<E> (A \<Gamma>)" if "weight \<Gamma> a > 0"
[PROOF STATE]
proof (prove)
using this:
\<not> hindrance \<Gamma> (\<lambda>_. 0)

goal (1 subgoal):
 1. a \<in> \<E> (A \<Gamma>)
[PROOF STEP]
proof(rule contrapos_np)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<notin> \<E> (A \<Gamma>) \<Longrightarrow> hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
assume "a \<notin> \<E> (A \<Gamma>)"
[PROOF STATE]
proof (state)
this:
a \<notin> \<E> (A \<Gamma>)

goal (1 subgoal):
 1. a \<notin> \<E> (A \<Gamma>) \<Longrightarrow> hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
with a
[PROOF STATE]
proof (chain)
picking this:
a \<in> A \<Gamma>
a \<notin> \<E> (A \<Gamma>)
[PROOF STEP]
have "\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma>) a"
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
a \<notin> \<E> (A \<Gamma>)

goal (1 subgoal):
 1. \<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma>) a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma>) a

goal (1 subgoal):
 1. a \<notin> \<E> (A \<Gamma>) \<Longrightarrow> hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
hence "\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma> \<union> {x. weight \<Gamma> x \<le> 0}) a"
[PROOF STATE]
proof (prove)
using this:
\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma>) a

goal (1 subgoal):
 1. \<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma> \<union> {x. weight \<Gamma> x \<le> 0}) a
[PROOF STEP]
by(rule contrapos_nn)(erule essential_mono; simp)
[PROOF STATE]
proof (state)
this:
\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma> \<union> {x. weight \<Gamma> x \<le> 0}) a

goal (1 subgoal):
 1. a \<notin> \<E> (A \<Gamma>) \<Longrightarrow> hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
with a that
[PROOF STATE]
proof (chain)
picking this:
a \<in> A \<Gamma>
0 < weight \<Gamma> a
\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma> \<union> {x. weight \<Gamma> x \<le> 0}) a
[PROOF STEP]
show "hindrance \<Gamma> zero_current"
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
0 < weight \<Gamma> a
\<not> essential \<Gamma> (B \<Gamma>) (A \<Gamma> \<union> {x. weight \<Gamma> x \<le> 0}) a

goal (1 subgoal):
 1. hindrance \<Gamma> (\<lambda>_. 0)
[PROOF STEP]
by(auto intro: hindrance)
[PROOF STATE]
proof (state)
this:
hindrance \<Gamma> (\<lambda>_. 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < weight \<Gamma> a \<Longrightarrow> a \<in> \<E> (A \<Gamma>)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
define F where "F = (\<lambda>(\<epsilon>, h :: 'v current). plus_current \<epsilon> h)"
[PROOF STATE]
proof (state)
this:
F = (\<lambda>(\<epsilon>, h). plus_current \<epsilon> h)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have F_simps: "F (\<epsilon>, h) = plus_current \<epsilon> h" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F (\<epsilon>, h) = plus_current \<epsilon> h
[PROOF STEP]
by(simp add: F_def)
[PROOF STATE]
proof (state)
this:
F (?\<epsilon>, ?h) = plus_current ?\<epsilon> ?h

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
define Fld where "Fld = {(\<epsilon>, h).
     current \<Gamma> \<epsilon> \<and> (\<forall>x. x \<noteq> a \<longrightarrow> d_OUT \<epsilon> x = 0) \<and>
     current (\<Gamma> \<ominus> \<epsilon>) h \<and> wave (\<Gamma> \<ominus> \<epsilon>) h \<and>
     \<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))}"
[PROOF STATE]
proof (state)
this:
Fld = {(\<epsilon>, h). current \<Gamma> \<epsilon> \<and> (\<forall>x. x \<noteq> a \<longrightarrow> d_OUT \<epsilon> x = 0) \<and> current (\<Gamma> \<ominus> \<epsilon>) h \<and> wave (\<Gamma> \<ominus> \<epsilon>) h \<and> \<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))}

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
define leq where "leq = restrict_rel Fld {(f, f'). f \<le> f'}"
[PROOF STATE]
proof (state)
this:
leq = restrict_rel Fld {(f, f'). f \<le> f'}

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have Fld: "Field leq = Fld"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Field leq = Fld
[PROOF STEP]
by(auto simp add: leq_def)
[PROOF STATE]
proof (state)
this:
Field leq = Fld

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have F_I [intro?]: "(\<epsilon>, h) \<in> Field leq"
    if "current \<Gamma> \<epsilon>" and "\<And>x. x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0"
    and "current (\<Gamma> \<ominus> \<epsilon>) h" and "wave (\<Gamma> \<ominus> \<epsilon>) h"
    and "\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))"
    for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> \<epsilon>
?x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> ?x = 0
current (\<Gamma> \<ominus> \<epsilon>) h
wave (\<Gamma> \<ominus> \<epsilon>) h
\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))

goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
by(simp add: Fld Fld_def)
[PROOF STATE]
proof (state)
this:
\<lbrakk>current \<Gamma> ?\<epsilon>; \<And>x. x \<noteq> a \<Longrightarrow> d_OUT ?\<epsilon> x = 0; current (\<Gamma> \<ominus> ?\<epsilon>) ?h; wave (\<Gamma> \<ominus> ?\<epsilon>) ?h; \<not> hindered (\<Gamma> \<ominus> F (?\<epsilon>, ?h))\<rbrakk> \<Longrightarrow> (?\<epsilon>, ?h) \<in> Field leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have \<epsilon>_curr: "current \<Gamma> \<epsilon>" if "(\<epsilon>, h) \<in> Field leq" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> \<epsilon>
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. current \<Gamma> \<epsilon>
[PROOF STEP]
by(simp add: Fld Fld_def)
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> Field leq \<Longrightarrow> current \<Gamma> ?\<epsilon>

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have OUT_\<epsilon>: "\<And>x. x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0" if "(\<epsilon>, h) \<in> Field leq" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0
[PROOF STEP]
by(simp add: Fld Fld_def)
[PROOF STATE]
proof (state)
this:
\<lbrakk>(?\<epsilon>1, ?h1) \<in> Field leq; ?x \<noteq> a\<rbrakk> \<Longrightarrow> d_OUT ?\<epsilon>1 ?x = 0

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have h: "current (\<Gamma> \<ominus> \<epsilon>) h" if "(\<epsilon>, h) \<in> Field leq" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) h
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) h
[PROOF STEP]
by(simp add: Fld Fld_def)
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> Field leq \<Longrightarrow> current (\<Gamma> \<ominus> ?\<epsilon>) ?h

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have h_w: "wave (\<Gamma> \<ominus> \<epsilon>) h" if "(\<epsilon>, h) \<in> Field leq" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<epsilon>) h
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<epsilon>) h
[PROOF STEP]
by(simp add: Fld Fld_def)
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> Field leq \<Longrightarrow> wave (\<Gamma> \<ominus> ?\<epsilon>) ?h

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have unhindered': "\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)" if "\<epsilon>h \<in> Field leq" for \<epsilon>h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<epsilon>h \<in> Field leq

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
by(simp add: Fld Fld_def split: prod.split_asm)
[PROOF STATE]
proof (state)
this:
?\<epsilon>h \<in> Field leq \<Longrightarrow> \<not> hindered (\<Gamma> \<ominus> F ?\<epsilon>h)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have f: "current \<Gamma> (F \<epsilon>h)" if "\<epsilon>h \<in> Field leq" for \<epsilon>h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (F \<epsilon>h)
[PROOF STEP]
using \<epsilon>_curr h that
[PROOF STATE]
proof (prove)
using this:
(?\<epsilon>, ?h) \<in> Field leq \<Longrightarrow> current \<Gamma> ?\<epsilon>
(?\<epsilon>, ?h) \<in> Field leq \<Longrightarrow> current (\<Gamma> \<ominus> ?\<epsilon>) ?h
\<epsilon>h \<in> Field leq

goal (1 subgoal):
 1. current \<Gamma> (F \<epsilon>h)
[PROOF STEP]
by(cases \<epsilon>h)(simp add: F_simps current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
?\<epsilon>h \<in> Field leq \<Longrightarrow> current \<Gamma> (F ?\<epsilon>h)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have out_\<epsilon>: "\<epsilon> (x, y) = 0" if "(\<epsilon>, h) \<in> Field leq" "x \<noteq> a" for \<epsilon> h x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<epsilon> (x, y) = 0
[PROOF STEP]
proof(rule antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<epsilon> (x, y) \<le> 0
 2. 0 \<le> \<epsilon> (x, y)
[PROOF STEP]
have "\<epsilon> (x, y) \<le> d_OUT \<epsilon> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<epsilon> (x, y) \<le> d_OUT \<epsilon> x
[PROOF STEP]
unfolding d_OUT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<epsilon> (x, y) \<le> (\<Sum>\<^sup>+ y. \<epsilon> (x, y))
[PROOF STEP]
by(rule nn_integral_ge_point) simp
[PROOF STATE]
proof (state)
this:
\<epsilon> (x, y) \<le> d_OUT \<epsilon> x

goal (2 subgoals):
 1. \<epsilon> (x, y) \<le> 0
 2. 0 \<le> \<epsilon> (x, y)
[PROOF STEP]
with OUT_\<epsilon>[OF that]
[PROOF STATE]
proof (chain)
picking this:
d_OUT \<epsilon> x = 0
\<epsilon> (x, y) \<le> d_OUT \<epsilon> x
[PROOF STEP]
show "\<epsilon> (x, y) \<le> 0"
[PROOF STATE]
proof (prove)
using this:
d_OUT \<epsilon> x = 0
\<epsilon> (x, y) \<le> d_OUT \<epsilon> x

goal (1 subgoal):
 1. \<epsilon> (x, y) \<le> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<epsilon> (x, y) \<le> 0

goal (1 subgoal):
 1. 0 \<le> \<epsilon> (x, y)
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>(?\<epsilon>, ?h) \<in> Field leq; ?x \<noteq> a\<rbrakk> \<Longrightarrow> ?\<epsilon> (?x, ?y) = 0

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have IN_\<epsilon>: "d_IN \<epsilon> x = \<epsilon> (a, x)" if "(\<epsilon>, h) \<in> Field leq" for \<epsilon> h x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN \<epsilon> x = \<epsilon> (a, x)
[PROOF STEP]
proof(rule trans)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_IN \<epsilon> x = ?s
 2. ?s = \<epsilon> (a, x)
[PROOF STEP]
show "d_IN \<epsilon> x = (\<Sum>\<^sup>+ y. \<epsilon> (y, x) * indicator {a} y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN \<epsilon> x = \<integral>\<^sup>+y\<in>{a}. \<epsilon> (y, x)\<partial>count_space UNIV
[PROOF STEP]
unfolding d_IN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. \<epsilon> (xa, x)) = \<integral>\<^sup>+y\<in>{a}. \<epsilon> (y, x)\<partial>count_space UNIV
[PROOF STEP]
by(rule nn_integral_cong)(simp add: out_\<epsilon>[OF that] split: split_indicator)
[PROOF STATE]
proof (state)
this:
d_IN \<epsilon> x = \<integral>\<^sup>+y\<in>{a}. \<epsilon> (y, x)\<partial>count_space UNIV

goal (1 subgoal):
 1. \<integral>\<^sup>+y\<in>{a}. \<epsilon> (y, x)\<partial>count_space UNIV = \<epsilon> (a, x)
[PROOF STEP]
qed(simp add: max_def \<epsilon>_curr[OF that])
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> Field leq \<Longrightarrow> d_IN ?\<epsilon> ?x = ?\<epsilon> (a, ?x)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have leqI: "((\<epsilon>, h), (\<epsilon>', h')) \<in> leq" if "\<epsilon> \<le> \<epsilon>'" "h \<le> h'" "(\<epsilon>, h) \<in> Field leq" "(\<epsilon>', h') \<in> Field leq" for \<epsilon> h \<epsilon>' h'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<epsilon>, h), \<epsilon>', h') \<in> leq
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<epsilon> \<le> \<epsilon>'
h \<le> h'
(\<epsilon>, h) \<in> Field leq
(\<epsilon>', h') \<in> Field leq

goal (1 subgoal):
 1. ((\<epsilon>, h), \<epsilon>', h') \<in> leq
[PROOF STEP]
unfolding Fld
[PROOF STATE]
proof (prove)
using this:
\<epsilon> \<le> \<epsilon>'
h \<le> h'
(\<epsilon>, h) \<in> Fld
(\<epsilon>', h') \<in> Fld

goal (1 subgoal):
 1. ((\<epsilon>, h), \<epsilon>', h') \<in> leq
[PROOF STEP]
by(simp add: leq_def in_restrict_rel_iff)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?\<epsilon> \<le> ?\<epsilon>'; ?h \<le> ?h'; (?\<epsilon>, ?h) \<in> Field leq; (?\<epsilon>', ?h') \<in> Field leq\<rbrakk> \<Longrightarrow> ((?\<epsilon>, ?h), ?\<epsilon>', ?h') \<in> leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have chain_Field: "Sup M \<in> Field leq" if M: "M \<in> Chains leq" and nempty: "M \<noteq> {}" for M
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> M \<in> Field leq
[PROOF STEP]
unfolding Sup_prod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion> (fst ` M), \<Squnion> (snd ` M)) \<in> Field leq
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
from nempty
[PROOF STATE]
proof (chain)
picking this:
M \<noteq> {}
[PROOF STEP]
obtain \<epsilon> h where in_M: "(\<epsilon>, h) \<in> M"
[PROOF STATE]
proof (prove)
using this:
M \<noteq> {}

goal (1 subgoal):
 1. (\<And>\<epsilon> h. (\<epsilon>, h) \<in> M \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<in> M

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
with M
[PROOF STATE]
proof (chain)
picking this:
M \<in> Chains leq
(\<epsilon>, h) \<in> M
[PROOF STEP]
have Field: "(\<epsilon>, h) \<in> Field leq"
[PROOF STATE]
proof (prove)
using this:
M \<in> Chains leq
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
by(rule Chains_FieldD)
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<in> Field leq

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
from M
[PROOF STATE]
proof (chain)
picking this:
M \<in> Chains leq
[PROOF STEP]
have chain: "Complete_Partial_Order.chain (\<lambda>\<epsilon> \<epsilon>'. (\<epsilon>, \<epsilon>') \<in> leq) M"
[PROOF STATE]
proof (prove)
using this:
M \<in> Chains leq

goal (1 subgoal):
 1. Complete_Partial_Order.chain (\<lambda>\<epsilon> \<epsilon>'. (\<epsilon>, \<epsilon>') \<in> leq) M
[PROOF STEP]
by(intro Chains_into_chain) simp
[PROOF STATE]
proof (state)
this:
Complete_Partial_Order.chain (\<lambda>\<epsilon> \<epsilon>'. (\<epsilon>, \<epsilon>') \<in> leq) M

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
hence chain': "Complete_Partial_Order.chain (\<le>) M"
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<lambda>\<epsilon> \<epsilon>'. (\<epsilon>, \<epsilon>') \<in> leq) M

goal (1 subgoal):
 1. Complete_Partial_Order.chain (\<le>) M
[PROOF STEP]
by(auto simp add: chain_def leq_def in_restrict_rel_iff)
[PROOF STATE]
proof (state)
this:
Complete_Partial_Order.chain (\<le>) M

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
hence chain1: "Complete_Partial_Order.chain (\<le>) (fst ` M)"
      and chain2: "Complete_Partial_Order.chain (\<le>) (snd ` M)"
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) M

goal (1 subgoal):
 1. Complete_Partial_Order.chain (\<le>) (fst ` M) &&& Complete_Partial_Order.chain (\<le>) (snd ` M)
[PROOF STEP]
by(rule chain_imageI; auto)+
[PROOF STATE]
proof (state)
this:
Complete_Partial_Order.chain (\<le>) (fst ` M)
Complete_Partial_Order.chain (\<le>) (snd ` M)

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have outside1: "Sup (fst ` M) (x, y) = 0" if "\<not> edge \<Gamma> x y" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion> (fst ` M)) (x, y) = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<not> edge \<Gamma> x y

goal (1 subgoal):
 1. (\<Squnion> (fst ` M)) (x, y) = 0
[PROOF STEP]
by(auto intro!: SUP_eq_const simp add: nempty dest!: Chains_FieldD[OF M] \<epsilon>_curr currentD_outside)
[PROOF STATE]
proof (state)
this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (fst ` M)) (?x, ?y) = 0

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (fst ` M)) (?x, ?y) = 0
[PROOF STEP]
have "support_flow (Sup (fst ` M)) \<subseteq> \<^bold>E"
[PROOF STATE]
proof (prove)
using this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (fst ` M)) (?x, ?y) = 0

goal (1 subgoal):
 1. support_flow (\<Squnion> (fst ` M)) \<subseteq> \<^bold>E
[PROOF STEP]
by(auto elim!: support_flow.cases intro: ccontr)
[PROOF STATE]
proof (state)
this:
support_flow (\<Squnion> (fst ` M)) \<subseteq> \<^bold>E

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
hence supp_flow1: "countable (support_flow (Sup (fst ` M)))"
[PROOF STATE]
proof (prove)
using this:
support_flow (\<Squnion> (fst ` M)) \<subseteq> \<^bold>E

goal (1 subgoal):
 1. countable (support_flow (\<Squnion> (fst ` M)))
[PROOF STEP]
by(rule countable_subset) simp
[PROOF STATE]
proof (state)
this:
countable (support_flow (\<Squnion> (fst ` M)))

goal (5 subgoals):
 1. current \<Gamma> (\<Squnion> (fst ` M))
 2. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 3. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 5. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
show SM1: "current \<Gamma> (Sup (fst ` M))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (\<Squnion> (fst ` M))
[PROOF STEP]
by(rule current_Sup[OF chain1 _ _ supp_flow1])(auto dest: Chains_FieldD[OF M, THEN \<epsilon>_curr] simp add: nempty)
[PROOF STATE]
proof (state)
this:
current \<Gamma> (\<Squnion> (fst ` M))

goal (4 subgoals):
 1. \<And>x. x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
 2. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 4. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
show OUT1_na: "d_OUT (Sup (fst ` M)) x = 0" if "x \<noteq> a" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<noteq> a

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x = 0
[PROOF STEP]
by(subst d_OUT_Sup[OF chain1 _ supp_flow1])(auto simp add: nempty intro!: SUP_eq_const dest: Chains_FieldD[OF M, THEN OUT_\<epsilon>])
[PROOF STATE]
proof (state)
this:
?x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) ?x = 0

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
interpret SM1: countable_bipartite_web "\<Gamma> \<ominus> Sup (fst ` M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> \<Squnion> (fst ` M))
[PROOF STEP]
using SM1
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (\<Squnion> (fst ` M))

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> \<Squnion> (fst ` M))
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
let ?h = "Sup (snd ` M)"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have outside2: "?h (x, y) = 0" if "\<not> edge \<Gamma> x y" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion> (snd ` M)) (x, y) = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<not> edge \<Gamma> x y

goal (1 subgoal):
 1. (\<Squnion> (snd ` M)) (x, y) = 0
[PROOF STEP]
by(auto intro!: SUP_eq_const simp add: nempty dest!: Chains_FieldD[OF M] h currentD_outside)
[PROOF STATE]
proof (state)
this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (snd ` M)) (?x, ?y) = 0

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (snd ` M)) (?x, ?y) = 0
[PROOF STEP]
have "support_flow ?h \<subseteq> \<^bold>E"
[PROOF STATE]
proof (prove)
using this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (snd ` M)) (?x, ?y) = 0

goal (1 subgoal):
 1. support_flow (\<Squnion> (snd ` M)) \<subseteq> \<^bold>E
[PROOF STEP]
by(auto elim!: support_flow.cases intro: ccontr)
[PROOF STATE]
proof (state)
this:
support_flow (\<Squnion> (snd ` M)) \<subseteq> \<^bold>E

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
hence supp_flow2: "countable (support_flow ?h)"
[PROOF STATE]
proof (prove)
using this:
support_flow (\<Squnion> (snd ` M)) \<subseteq> \<^bold>E

goal (1 subgoal):
 1. countable (support_flow (\<Squnion> (snd ` M)))
[PROOF STEP]
by(rule countable_subset) simp
[PROOF STATE]
proof (state)
this:
countable (support_flow (\<Squnion> (snd ` M)))

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have OUT1: "d_OUT (Sup (fst ` M)) x = (SUP (\<epsilon>, h)\<in>M. d_OUT \<epsilon> x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> x)
[PROOF STEP]
by (subst d_OUT_Sup [OF chain1 _ supp_flow1])
        (simp_all add: nempty split_beta image_comp)
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> ?x)

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have OUT1': "d_OUT (Sup (fst ` M)) x = (if x = a then SUP (\<epsilon>, h)\<in>M. d_OUT \<epsilon> a else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x = (if x = a then \<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> a else 0)
[PROOF STEP]
unfolding OUT1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> x) = (if x = a then \<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> a else 0)
[PROOF STEP]
by(auto intro!: SUP_eq_const simp add: nempty OUT_\<epsilon> dest!: Chains_FieldD[OF M])
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) ?x = (if ?x = a then \<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> a else 0)

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have OUT1_le: "(\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x) \<le> weight \<Gamma> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x) \<le> weight \<Gamma> x
[PROOF STEP]
using currentD_weight_OUT[OF SM1, of x] OUT1[of x]
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x
d_OUT (\<Squnion> (fst ` M)) x = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> x)

goal (1 subgoal):
 1. (\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x) \<le> weight \<Gamma> x
[PROOF STEP]
by(simp add: split_beta)
[PROOF STATE]
proof (state)
this:
(\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) ?x) \<le> weight \<Gamma> ?x

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have OUT1_nonneg: "0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x)
[PROOF STEP]
using in_M
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. 0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x)
[PROOF STEP]
by(rule SUP_upper2)simp
[PROOF STATE]
proof (state)
this:
0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) ?x)

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have IN1: "d_IN (Sup (fst ` M)) x = (SUP (\<epsilon>, h)\<in>M. d_IN \<epsilon> x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<Squnion> (fst ` M)) x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> x)
[PROOF STEP]
by (subst d_IN_Sup [OF chain1 _ supp_flow1])
        (simp_all add: nempty split_beta image_comp)
[PROOF STATE]
proof (state)
this:
d_IN (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> ?x)

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have IN1_le: "(\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x) \<le> weight \<Gamma> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x) \<le> weight \<Gamma> x
[PROOF STEP]
using currentD_weight_IN[OF SM1, of x] IN1[of x]
[PROOF STATE]
proof (prove)
using this:
d_IN (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x
d_IN (\<Squnion> (fst ` M)) x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> x)

goal (1 subgoal):
 1. (\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x) \<le> weight \<Gamma> x
[PROOF STEP]
by(simp add: split_beta)
[PROOF STATE]
proof (state)
this:
(\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) ?x) \<le> weight \<Gamma> ?x

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have IN1_nonneg: "0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x)
[PROOF STEP]
using in_M
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. 0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x)
[PROOF STEP]
by(rule SUP_upper2) simp
[PROOF STATE]
proof (state)
this:
0 \<le> (\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) ?x)

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have IN1': "d_IN (Sup (fst ` M)) x = (SUP (\<epsilon>, h)\<in>M. \<epsilon> (a, x))" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<Squnion> (fst ` M)) x = (\<Squnion>(\<epsilon>, h)\<in>M. \<epsilon> (a, x))
[PROOF STEP]
unfolding IN1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> x) = (\<Squnion>(\<epsilon>, h)\<in>M. \<epsilon> (a, x))
[PROOF STEP]
by(rule SUP_cong[OF refl])(auto dest!: Chains_FieldD[OF M] IN_\<epsilon>)
[PROOF STATE]
proof (state)
this:
d_IN (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. \<epsilon> (a, ?x))

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have directed: "\<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')"
      if mono: "\<And>f g. (\<And>z. f z \<le> g z) \<Longrightarrow> F f \<le> F g" "\<epsilon>k \<in> M" "\<epsilon>k' \<in> M"
      for \<epsilon>k \<epsilon>k' and F :: "_ \<Rightarrow> ennreal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
using chainD[OF chain that(2-3)]
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>k, \<epsilon>k') \<in> leq \<or> (\<epsilon>k', \<epsilon>k) \<in> leq

goal (1 subgoal):
 1. \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<epsilon>k, \<epsilon>k') \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
 2. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
case left
[PROOF STATE]
proof (state)
this:
(\<epsilon>k, \<epsilon>k') \<in> leq

goal (2 subgoals):
 1. (\<epsilon>k, \<epsilon>k') \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
 2. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
hence "snd \<epsilon>k \<le> snd \<epsilon>k'"
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>k, \<epsilon>k') \<in> leq

goal (1 subgoal):
 1. snd \<epsilon>k \<le> snd \<epsilon>k'
[PROOF STEP]
by(simp add: leq_def less_eq_prod_def in_restrict_rel_iff)
[PROOF STATE]
proof (state)
this:
snd \<epsilon>k \<le> snd \<epsilon>k'

goal (2 subgoals):
 1. (\<epsilon>k, \<epsilon>k') \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
 2. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
hence "F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k') + F (fst \<epsilon>k')"
[PROOF STATE]
proof (prove)
using this:
snd \<epsilon>k \<le> snd \<epsilon>k'

goal (1 subgoal):
 1. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k') + F (fst \<epsilon>k')
[PROOF STEP]
by(intro add_right_mono mono)(clarsimp simp add: le_fun_def)
[PROOF STATE]
proof (state)
this:
F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k') + F (fst \<epsilon>k')

goal (2 subgoals):
 1. (\<epsilon>k, \<epsilon>k') \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
 2. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
(\<And>z. ?f z \<le> ?g z) \<Longrightarrow> F ?f \<le> F ?g
\<epsilon>k \<in> M
\<epsilon>k' \<in> M
F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k') + F (fst \<epsilon>k')
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>z. ?f z \<le> ?g z) \<Longrightarrow> F ?f \<le> F ?g
\<epsilon>k \<in> M
\<epsilon>k' \<in> M
F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k') + F (fst \<epsilon>k')

goal (1 subgoal):
 1. \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')

goal (1 subgoal):
 1. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
case right
[PROOF STATE]
proof (state)
this:
(\<epsilon>k', \<epsilon>k) \<in> leq

goal (1 subgoal):
 1. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
hence "fst \<epsilon>k' \<le> fst \<epsilon>k"
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>k', \<epsilon>k) \<in> leq

goal (1 subgoal):
 1. fst \<epsilon>k' \<le> fst \<epsilon>k
[PROOF STEP]
by(simp add: leq_def less_eq_prod_def in_restrict_rel_iff)
[PROOF STATE]
proof (state)
this:
fst \<epsilon>k' \<le> fst \<epsilon>k

goal (1 subgoal):
 1. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
hence "F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k) + F (fst \<epsilon>k)"
[PROOF STATE]
proof (prove)
using this:
fst \<epsilon>k' \<le> fst \<epsilon>k

goal (1 subgoal):
 1. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k) + F (fst \<epsilon>k)
[PROOF STEP]
by(intro add_left_mono mono)(clarsimp simp add: le_fun_def)
[PROOF STATE]
proof (state)
this:
F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k) + F (fst \<epsilon>k)

goal (1 subgoal):
 1. (\<epsilon>k', \<epsilon>k) \<in> leq \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
(\<And>z. ?f z \<le> ?g z) \<Longrightarrow> F ?f \<le> F ?g
\<epsilon>k \<in> M
\<epsilon>k' \<in> M
F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k) + F (fst \<epsilon>k)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>z. ?f z \<le> ?g z) \<Longrightarrow> F ?f \<le> F ?g
\<epsilon>k \<in> M
\<epsilon>k' \<in> M
F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k) + F (fst \<epsilon>k)

goal (1 subgoal):
 1. \<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>\<epsilon>k''\<in>M. F (snd \<epsilon>k) + F (fst \<epsilon>k') \<le> F (snd \<epsilon>k'') + F (fst \<epsilon>k'')

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<And>f g. (\<And>z. f z \<le> g z) \<Longrightarrow> ?F f \<le> ?F g; ?\<epsilon>k \<in> M; ?\<epsilon>k' \<in> M\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. ?F (snd ?\<epsilon>k) + ?F (fst ?\<epsilon>k') \<le> ?F (snd \<epsilon>k'') + ?F (fst \<epsilon>k'')

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have directed_OUT: "\<exists>\<epsilon>k''\<in>M. d_OUT (snd \<epsilon>k) x + d_OUT (fst \<epsilon>k') x \<le> d_OUT (snd \<epsilon>k'') x + d_OUT (fst \<epsilon>k'') x"
      if "\<epsilon>k \<in> M" "\<epsilon>k' \<in> M" for x \<epsilon>k \<epsilon>k'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<epsilon>k''\<in>M. d_OUT (snd \<epsilon>k) x + d_OUT (fst \<epsilon>k') x \<le> d_OUT (snd \<epsilon>k'') x + d_OUT (fst \<epsilon>k'') x
[PROOF STEP]
by(rule directed; rule d_OUT_mono that)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?\<epsilon>k \<in> M; ?\<epsilon>k' \<in> M\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. d_OUT (snd ?\<epsilon>k) ?x + d_OUT (fst ?\<epsilon>k') ?x \<le> d_OUT (snd \<epsilon>k'') ?x + d_OUT (fst \<epsilon>k'') ?x

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have directed_IN: "\<exists>\<epsilon>k''\<in>M. d_IN (snd \<epsilon>k) x + d_IN (fst \<epsilon>k') x \<le> d_IN (snd \<epsilon>k'') x + d_IN (fst \<epsilon>k'') x"
      if "\<epsilon>k \<in> M" "\<epsilon>k' \<in> M" for x \<epsilon>k \<epsilon>k'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<epsilon>k''\<in>M. d_IN (snd \<epsilon>k) x + d_IN (fst \<epsilon>k') x \<le> d_IN (snd \<epsilon>k'') x + d_IN (fst \<epsilon>k'') x
[PROOF STEP]
by(rule directed; rule d_IN_mono that)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?\<epsilon>k \<in> M; ?\<epsilon>k' \<in> M\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>k''\<in>M. d_IN (snd ?\<epsilon>k) ?x + d_IN (fst ?\<epsilon>k') ?x \<le> d_IN (snd \<epsilon>k'') ?x + d_IN (fst \<epsilon>k'') ?x

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
let ?\<Gamma> = "\<Gamma> \<ominus> Sup (fst ` M)"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have hM2: "current ?\<Gamma> h" if \<epsilon>h: "(\<epsilon>, h) \<in> M" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
from \<epsilon>h
[PROOF STATE]
proof (chain)
picking this:
(\<epsilon>, h) \<in> M
[PROOF STEP]
have Field: "(\<epsilon>, h) \<in> Field leq"
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
by(rule Chains_FieldD[OF M])
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<in> Field leq

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<epsilon>, h) \<in> Field leq
[PROOF STEP]
have H: "current (\<Gamma> \<ominus> \<epsilon>) h" and \<epsilon>_curr': "current \<Gamma> \<epsilon>"
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) h &&& current \<Gamma> \<epsilon>
[PROOF STEP]
by(rule h \<epsilon>_curr)+
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon>) h
current \<Gamma> \<epsilon>

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
from \<epsilon>_curr'
[PROOF STATE]
proof (chain)
picking this:
current \<Gamma> \<epsilon>
[PROOF STEP]
interpret \<Gamma>: countable_bipartite_web "\<Gamma> \<ominus> \<epsilon>"
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> \<epsilon>

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> \<epsilon>)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "d_OUT h x \<le> d_OUT ?h x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT h x \<le> d_OUT (\<Squnion> (snd ` M)) x
[PROOF STEP]
using \<epsilon>h
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT h x \<le> d_OUT (\<Squnion> (snd ` M)) x
[PROOF STEP]
by(intro d_OUT_mono)(auto intro: SUP_upper2)
[PROOF STATE]
proof (state)
this:
d_OUT h x \<le> d_OUT (\<Squnion> (snd ` M)) x

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_OUT h x \<le> d_OUT (\<Squnion> (snd ` M)) x

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have OUT: "\<dots> = (SUP h\<in>snd ` M. d_OUT h x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_OUT h x)
[PROOF STEP]
using chain2 _ supp_flow2
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) (snd ` M)
PROP ?psi \<Longrightarrow> PROP ?psi
countable (support_flow (\<Squnion> (snd ` M)))

goal (1 subgoal):
 1. d_OUT (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_OUT h x)
[PROOF STEP]
by(rule d_OUT_Sup)(simp_all add: nempty)
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_OUT h x)

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_OUT h x)

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "\<dots> = \<dots> + (SUP \<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (SUP \<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_OUT h x) = (\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)
[PROOF STEP]
using OUT1_le[of x]
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x) \<le> weight \<Gamma> x

goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_OUT h x) = (\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)
[PROOF STEP]
by (intro ennreal_add_diff_cancel_right[symmetric] neq_top_trans[OF weight_finite, of _ x])
          (simp add: image_comp)
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_OUT h x) = (\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_OUT h x) = (\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "\<dots> = (SUP (\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) - (SUP \<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = (\<Squnion>(\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)
[PROOF STEP]
unfolding split_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = (\<Squnion>p\<in>M. d_OUT (snd p) x + d_OUT (fst p) x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)
[PROOF STEP]
by (subst SUP_add_directed_ennreal[OF directed_OUT])
          (simp_all add: image_comp)
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = (\<Squnion>(\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_OUT h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = (\<Squnion>(\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "(SUP (\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) \<le> weight \<Gamma> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>(\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) \<le> weight \<Gamma> x
[PROOF STEP]
apply(clarsimp dest!: Chains_FieldD[OF M] intro!: SUP_least)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. (a, b) \<in> Field leq \<Longrightarrow> d_OUT b x + d_OUT a x \<le> weight \<Gamma> x
[PROOF STEP]
subgoal premises that for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT h x + d_OUT \<epsilon> x \<le> weight \<Gamma> x
[PROOF STEP]
using currentD_weight_OUT[OF h[OF that], of x] currentD_weight_OUT[OF \<epsilon>_curr[OF that], of x]
             countable_bipartite_web_minus_web[OF \<epsilon>_curr, THEN countable_bipartite_web.currentD_OUT', OF that h[OF that], where x=x]
[PROOF STATE]
proof (prove)
using this:
d_OUT h x \<le> weight (\<Gamma> \<ominus> \<epsilon>) x
d_OUT \<epsilon> x \<le> weight \<Gamma> x
x \<notin> A (\<Gamma> \<ominus> \<epsilon>) \<Longrightarrow> d_OUT h x = 0

goal (1 subgoal):
 1. d_OUT h x + d_OUT \<epsilon> x \<le> weight \<Gamma> x
[PROOF STEP]
by (auto simp add: ennreal_le_minus_iff split: if_split_asm)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<Squnion>(\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) \<le> weight \<Gamma> x

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>(\<epsilon>, k)\<in>M. d_OUT k x + d_OUT \<epsilon> x) \<le> weight \<Gamma> x

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "(SUP \<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = d_OUT (Sup (fst ` M)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = d_OUT (\<Squnion> (fst ` M)) x
[PROOF STEP]
using OUT1
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> ?x)

goal (1 subgoal):
 1. (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = d_OUT (\<Squnion> (fst ` M)) x
[PROOF STEP]
by (simp add: split_beta image_comp)
[PROOF STATE]
proof (state)
this:
(\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) = d_OUT (\<Squnion> (fst ` M)) x

goal (3 subgoals):
 1. \<And>x. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>xa y. xa \<le> y \<Longrightarrow> xa - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) \<le> y - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)) \<Longrightarrow> d_OUT h x \<le> weight \<Gamma> x - d_OUT (\<Squnion> (fst ` M)) x
[PROOF STEP]
show "d_OUT h x \<le> weight ?\<Gamma> x"
[PROOF STATE]
proof (prove)
using this:
(\<And>xa y. xa \<le> y \<Longrightarrow> xa - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) \<le> y - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)) \<Longrightarrow> d_OUT h x \<le> weight \<Gamma> x - d_OUT (\<Squnion> (fst ` M)) x

goal (1 subgoal):
 1. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
[PROOF STEP]
using \<Gamma>.currentD_OUT'[OF h[OF Field], of x] currentD_weight_IN[OF SM1, of x]
[PROOF STATE]
proof (prove)
using this:
(\<And>xa y. xa \<le> y \<Longrightarrow> xa - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x) \<le> y - (\<Squnion>\<epsilon>\<in>fst ` M. d_OUT \<epsilon> x)) \<Longrightarrow> d_OUT h x \<le> weight \<Gamma> x - d_OUT (\<Squnion> (fst ` M)) x
x \<notin> A (\<Gamma> \<ominus> \<epsilon>) \<Longrightarrow> d_OUT h x = 0
d_IN (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
[PROOF STEP]
by(auto simp add: ennreal_minus_mono)
[PROOF STATE]
proof (state)
this:
d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "d_IN h x \<le> d_IN ?h x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN h x \<le> d_IN (\<Squnion> (snd ` M)) x
[PROOF STEP]
using \<epsilon>h
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_IN h x \<le> d_IN (\<Squnion> (snd ` M)) x
[PROOF STEP]
by(intro d_IN_mono)(auto intro: SUP_upper2)
[PROOF STATE]
proof (state)
this:
d_IN h x \<le> d_IN (\<Squnion> (snd ` M)) x

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_IN h x \<le> d_IN (\<Squnion> (snd ` M)) x

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have IN: "\<dots> = (SUP h\<in>snd ` M. d_IN h x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_IN h x)
[PROOF STEP]
using chain2 _ supp_flow2
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) (snd ` M)
PROP ?psi \<Longrightarrow> PROP ?psi
countable (support_flow (\<Squnion> (snd ` M)))

goal (1 subgoal):
 1. d_IN (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_IN h x)
[PROOF STEP]
by(rule d_IN_Sup)(simp_all add: nempty)
[PROOF STATE]
proof (state)
this:
d_IN (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_IN h x)

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_IN (\<Squnion> (snd ` M)) x = (\<Squnion>h\<in>snd ` M. d_IN h x)

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "\<dots> = \<dots> + (SUP \<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (SUP \<epsilon>\<in>fst ` M. d_IN \<epsilon> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_IN h x) = (\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)
[PROOF STEP]
using IN1_le[of x]
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x) \<le> weight \<Gamma> x

goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_IN h x) = (\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)
[PROOF STEP]
by (intro ennreal_add_diff_cancel_right [symmetric] neq_top_trans [OF weight_finite, of _ x])
          (simp add: image_comp)
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_IN h x) = (\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_IN h x) = (\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "\<dots> = (SUP (\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) - (SUP \<epsilon>\<in>fst ` M. d_IN \<epsilon> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = (\<Squnion>(\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)
[PROOF STEP]
unfolding split_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = (\<Squnion>p\<in>M. d_IN (snd p) x + d_IN (fst p) x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)
[PROOF STEP]
by (subst SUP_add_directed_ennreal [OF directed_IN])
          (simp_all add: image_comp)
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = (\<Squnion>(\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>h\<in>snd ` M. d_IN h x) + (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = (\<Squnion>(\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "(SUP (\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) \<le> weight \<Gamma> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>(\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) \<le> weight \<Gamma> x
[PROOF STEP]
apply(clarsimp dest!: Chains_FieldD[OF M] intro!: SUP_least)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. (a, b) \<in> Field leq \<Longrightarrow> d_IN b x + d_IN a x \<le> weight \<Gamma> x
[PROOF STEP]
subgoal premises that for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN h x + d_IN \<epsilon> x \<le> weight \<Gamma> x
[PROOF STEP]
using currentD_weight_OUT[OF h, OF that, where x=x] currentD_weight_IN[OF h, OF that, where x=x]
            countable_bipartite_web_minus_web[OF \<epsilon>_curr, THEN countable_bipartite_web.currentD_OUT', OF that h[OF that], where x=x]
            currentD_OUT'[OF \<epsilon>_curr, OF that, where x=x] currentD_IN[OF \<epsilon>_curr, OF that, of x] currentD_weight_IN[OF \<epsilon>_curr, OF that, where x=x]
[PROOF STATE]
proof (prove)
using this:
d_OUT h x \<le> weight (\<Gamma> \<ominus> \<epsilon>) x
d_IN h x \<le> weight (\<Gamma> \<ominus> \<epsilon>) x
x \<notin> A (\<Gamma> \<ominus> \<epsilon>) \<Longrightarrow> d_OUT h x = 0
x \<notin> A \<Gamma> \<Longrightarrow> d_OUT \<epsilon> x = 0
x \<in> A \<Gamma> \<Longrightarrow> d_IN \<epsilon> x = 0
d_IN \<epsilon> x \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_IN h x + d_IN \<epsilon> x \<le> weight \<Gamma> x
[PROOF STEP]
by (auto simp add: ennreal_le_minus_iff image_comp
                     split: if_split_asm intro: add_increasing2 order_trans [rotated])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<Squnion>(\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) \<le> weight \<Gamma> x

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>(\<epsilon>, k)\<in>M. d_IN k x + d_IN \<epsilon> x) \<le> weight \<Gamma> x

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
have "(SUP \<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = d_IN (Sup (fst ` M)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = d_IN (\<Squnion> (fst ` M)) x
[PROOF STEP]
using IN1
[PROOF STATE]
proof (prove)
using this:
d_IN (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> ?x)

goal (1 subgoal):
 1. (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = d_IN (\<Squnion> (fst ` M)) x
[PROOF STEP]
by (simp add: split_beta image_comp)
[PROOF STATE]
proof (state)
this:
(\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) = d_IN (\<Squnion> (fst ` M)) x

goal (2 subgoals):
 1. \<And>x. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>xa y. xa \<le> y \<Longrightarrow> xa - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) \<le> y - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)) \<Longrightarrow> d_IN h x \<le> weight \<Gamma> x - d_IN (\<Squnion> (fst ` M)) x
[PROOF STEP]
show "d_IN h x \<le> weight ?\<Gamma> x"
[PROOF STATE]
proof (prove)
using this:
(\<And>xa y. xa \<le> y \<Longrightarrow> xa - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) \<le> y - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)) \<Longrightarrow> d_IN h x \<le> weight \<Gamma> x - d_IN (\<Squnion> (fst ` M)) x

goal (1 subgoal):
 1. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
[PROOF STEP]
using currentD_IN[OF h[OF Field], of x] currentD_weight_OUT[OF SM1, of x]
[PROOF STATE]
proof (prove)
using this:
(\<And>xa y. xa \<le> y \<Longrightarrow> xa - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x) \<le> y - (\<Squnion>\<epsilon>\<in>fst ` M. d_IN \<epsilon> x)) \<Longrightarrow> d_IN h x \<le> weight \<Gamma> x - d_IN (\<Squnion> (fst ` M)) x
x \<in> A (\<Gamma> \<ominus> \<epsilon>) \<Longrightarrow> d_IN h x = 0
d_OUT (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
[PROOF STEP]
by(auto simp add: ennreal_minus_mono)
          (auto simp add: ennreal_le_minus_iff add_increasing2)
[PROOF STATE]
proof (state)
this:
d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x

goal (1 subgoal):
 1. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h e = 0
[PROOF STEP]
show "h e = 0" if "e \<notin> \<^bold>E\<^bsub>?\<Gamma>\<^esub>" for e
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h e = 0
[PROOF STEP]
using currentD_outside'[OF H, of e] that
[PROOF STATE]
proof (prove)
using this:
e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> \<Longrightarrow> h e = 0
e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub>

goal (1 subgoal):
 1. h e = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> \<Longrightarrow> h ?e = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> M \<Longrightarrow> current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) ?h

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
from nempty
[PROOF STATE]
proof (chain)
picking this:
M \<noteq> {}
[PROOF STEP]
have "snd ` M \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
M \<noteq> {}

goal (1 subgoal):
 1. snd ` M \<noteq> {}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
snd ` M \<noteq> {}

goal (3 subgoals):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 3. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
from chain2 this _ supp_flow2
[PROOF STATE]
proof (chain)
picking this:
Complete_Partial_Order.chain (\<le>) (snd ` M)
snd ` M \<noteq> {}
PROP ?psi \<Longrightarrow> PROP ?psi
countable (support_flow (\<Squnion> (snd ` M)))
[PROOF STEP]
show current: "current ?\<Gamma> ?h"
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) (snd ` M)
snd ` M \<noteq> {}
PROP ?psi \<Longrightarrow> PROP ?psi
countable (support_flow (\<Squnion> (snd ` M)))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
[PROOF STEP]
by(rule current_Sup)(clarify; rule hM2; simp)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))

goal (2 subgoals):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have wM: "wave ?\<Gamma> h" if "(\<epsilon>, h) \<in> M" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)
 2. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
let ?\<Gamma>' = "\<Gamma> \<ominus> \<epsilon>"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)
 2. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
have subset: "TER\<^bsub>?\<Gamma>'\<^esub> h \<subseteq> TER\<^bsub>?\<Gamma>\<^esub> h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h \<subseteq> TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h
[PROOF STEP]
using currentD_OUT'[OF SM1] currentD_OUT'[OF \<epsilon>_curr[OF Chains_FieldD[OF M that]]] that
[PROOF STATE]
proof (prove)
using this:
?x \<notin> A \<Gamma> \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) ?x = 0
?x \<notin> A \<Gamma> \<Longrightarrow> d_OUT \<epsilon> ?x = 0
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h \<subseteq> TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h
[PROOF STEP]
by(auto 4 7 elim!: SAT.cases intro: SAT.intros elim!: order_trans[rotated] intro: ennreal_minus_mono d_IN_mono intro!: SUP_upper2 split: if_split_asm)
[PROOF STATE]
proof (state)
this:
TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h \<subseteq> TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h

goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)
 2. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
from h_w[OF Chains_FieldD[OF M], OF that]
[PROOF STATE]
proof (chain)
picking this:
wave (\<Gamma> \<ominus> \<epsilon>) h
[PROOF STEP]
have "separating ?\<Gamma>' (TER\<^bsub>?\<Gamma>'\<^esub> h)"
[PROOF STATE]
proof (prove)
using this:
wave (\<Gamma> \<ominus> \<epsilon>) h

goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h)
[PROOF STEP]
by(rule waveD_separating)
[PROOF STATE]
proof (state)
this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h)

goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)
 2. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h)
[PROOF STEP]
show "separating ?\<Gamma> (TER\<^bsub>?\<Gamma>\<^esub> h)"
[PROOF STATE]
proof (prove)
using this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h)

goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)
[PROOF STEP]
using subset
[PROOF STATE]
proof (prove)
using this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h)
TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> h \<subseteq> TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h

goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)
[PROOF STEP]
by(auto intro: separating_weakening)
[PROOF STATE]
proof (state)
this:
separating (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (TER\<^bsub>\<Gamma> \<ominus> \<Squnion> (fst ` M)\<^esub> h)

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
qed(rule hM2[OF that])
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> M \<Longrightarrow> wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) ?h

goal (2 subgoals):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
 2. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
show wave: "wave ?\<Gamma> ?h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
[PROOF STEP]
using chain2 \<open>snd ` M \<noteq> {}\<close> _ supp_flow2
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) (snd ` M)
snd ` M \<noteq> {}
PROP ?psi \<Longrightarrow> PROP ?psi
countable (support_flow (\<Squnion> (snd ` M)))

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
[PROOF STEP]
by(rule wave_lub)(clarify; rule wM; simp)
[PROOF STATE]
proof (state)
this:
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
define f where "f = F (Sup (fst ` M), Sup (snd ` M))"
[PROOF STATE]
proof (state)
this:
f = F (\<Squnion> (fst ` M), \<Squnion> (snd ` M))

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have supp_flow: "countable (support_flow f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable (support_flow f)
[PROOF STEP]
using supp_flow1 supp_flow2 support_flow_plus_current[of "Sup (fst ` M)" ?h]
[PROOF STATE]
proof (prove)
using this:
countable (support_flow (\<Squnion> (fst ` M)))
countable (support_flow (\<Squnion> (snd ` M)))
support_flow (plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M))) \<subseteq> support_flow (\<Squnion> (fst ` M)) \<union> support_flow (\<Squnion> (snd ` M))

goal (1 subgoal):
 1. countable (support_flow f)
[PROOF STEP]
unfolding f_def F_simps
[PROOF STATE]
proof (prove)
using this:
countable (support_flow (\<Squnion> (fst ` M)))
countable (support_flow (\<Squnion> (snd ` M)))
support_flow (plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M))) \<subseteq> support_flow (\<Squnion> (fst ` M)) \<union> support_flow (\<Squnion> (snd ` M))

goal (1 subgoal):
 1. countable (support_flow (plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M))))
[PROOF STEP]
by(blast intro: countable_subset)
[PROOF STATE]
proof (state)
this:
countable (support_flow f)

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have f_alt: "f = Sup ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = (\<Squnion>(\<epsilon>, h)\<in>M. plus_current \<epsilon> h)
[PROOF STEP]
apply (simp add: fun_eq_iff split_def f_def nempty F_def image_comp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a b. (\<Squnion>x\<in>M. fst x (a, b)) + (\<Squnion>x\<in>M. snd x (a, b)) = (\<Squnion>x\<in>M. fst x (a, b) + snd x (a, b))
[PROOF STEP]
apply (subst (1 2) add.commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a b. (\<Squnion>x\<in>M. snd x (a, b)) + (\<Squnion>x\<in>M. fst x (a, b)) = (\<Squnion>x\<in>M. snd x (a, b) + fst x (a, b))
[PROOF STEP]
apply (subst SUP_add_directed_ennreal)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b aa i j. \<lbrakk>i \<in> M; j \<in> M\<rbrakk> \<Longrightarrow> \<exists>k\<in>M. snd i (aa, b) + fst j (aa, b) \<le> snd k (aa, b) + fst k (aa, b)
 2. \<forall>a b. (\<Squnion>x\<in>M. snd x (a, b)) + (\<Squnion>x\<in>M. fst x (a, b)) = (\<Squnion>i\<in>M. snd i (a, b)) + (\<Squnion>i\<in>M. fst i (a, b))
[PROOF STEP]
apply (rule directed)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>b aa i j f g. \<lbrakk>i \<in> M; j \<in> M; \<And>z. f z \<le> g z\<rbrakk> \<Longrightarrow> f (aa, b) \<le> g (aa, b)
 2. \<And>b aa i j. \<lbrakk>i \<in> M; j \<in> M\<rbrakk> \<Longrightarrow> i \<in> M
 3. \<And>b aa i j. \<lbrakk>i \<in> M; j \<in> M\<rbrakk> \<Longrightarrow> j \<in> M
 4. \<forall>a b. (\<Squnion>x\<in>M. snd x (a, b)) + (\<Squnion>x\<in>M. fst x (a, b)) = (\<Squnion>i\<in>M. snd i (a, b)) + (\<Squnion>i\<in>M. fst i (a, b))
[PROOF STEP]
apply (auto dest!: Chains_FieldD [OF M])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
f = (\<Squnion>(\<epsilon>, h)\<in>M. plus_current \<epsilon> h)

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have f_curr: "current \<Gamma> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> f
[PROOF STEP]
unfolding f_def F_simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M)))
[PROOF STEP]
using SM1 current
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (\<Squnion> (fst ` M))
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))

goal (1 subgoal):
 1. current \<Gamma> (plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M)))
[PROOF STEP]
by(rule current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current \<Gamma> f

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have IN_f: "d_IN f x = d_IN (Sup (fst ` M)) x + d_IN (Sup (snd ` M)) x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN f x = d_IN (\<Squnion> (fst ` M)) x + d_IN (\<Squnion> (snd ` M)) x
[PROOF STEP]
unfolding f_def F_simps plus_current_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<lambda>e. (\<Squnion> (fst ` M)) e + (\<Squnion> (snd ` M)) e) x = d_IN (\<Squnion> (fst ` M)) x + d_IN (\<Squnion> (snd ` M)) x
[PROOF STEP]
by(rule d_IN_add SM1 current)+
[PROOF STATE]
proof (state)
this:
d_IN f ?x = d_IN (\<Squnion> (fst ` M)) ?x + d_IN (\<Squnion> (snd ` M)) ?x

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
have OUT_f: "d_OUT f x = d_OUT (Sup (fst ` M)) x + d_OUT (Sup (snd ` M)) x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT f x = d_OUT (\<Squnion> (fst ` M)) x + d_OUT (\<Squnion> (snd ` M)) x
[PROOF STEP]
unfolding f_def F_simps plus_current_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<lambda>e. (\<Squnion> (fst ` M)) e + (\<Squnion> (snd ` M)) e) x = d_OUT (\<Squnion> (fst ` M)) x + d_OUT (\<Squnion> (snd ` M)) x
[PROOF STEP]
by(rule d_OUT_add SM1 current)+
[PROOF STATE]
proof (state)
this:
d_OUT f ?x = d_OUT (\<Squnion> (fst ` M)) ?x + d_OUT (\<Squnion> (snd ` M)) ?x

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (\<Squnion> (fst ` M), \<Squnion> (snd ` M)))
[PROOF STEP]
show "\<not> hindered (\<Gamma> \<ominus> f)" (is "\<not> hindered ?\<Omega>") \<comment> \<open>Assertion 6.11\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
assume hindered: "hindered ?\<Omega>"
[PROOF STATE]
proof (state)
this:
hindered (\<Gamma> \<ominus> f)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
obtain g where g: "current ?\<Omega> g" and g_w: "wave ?\<Omega> g" and hindrance: "hindrance ?\<Omega> g"
[PROOF STATE]
proof (prove)
using this:
hindered (\<Gamma> \<ominus> f)

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>current (\<Gamma> \<ominus> f) g; wave (\<Gamma> \<ominus> f) g; hindrance (\<Gamma> \<ominus> f) g\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> f) g
wave (\<Gamma> \<ominus> f) g
hindrance (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
from hindrance
[PROOF STATE]
proof (chain)
picking this:
hindrance (\<Gamma> \<ominus> f) g
[PROOF STEP]
obtain z where z: "z \<in> A \<Gamma>" and z\<E>: "z \<notin> \<E>\<^bsub>?\<Omega>\<^esub> (TER\<^bsub>?\<Omega>\<^esub> g)"
        and OUT_z: "d_OUT g z < weight ?\<Omega> z"
[PROOF STATE]
proof (prove)
using this:
hindrance (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> A \<Gamma>; z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g); d_OUT g z < weight (\<Gamma> \<ominus> f) z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by cases auto
[PROOF STATE]
proof (state)
this:
z \<in> A \<Gamma>
z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
d_OUT g z < weight (\<Gamma> \<ominus> f) z

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
define \<delta> where "\<delta> = weight ?\<Omega> z - d_OUT g z"
[PROOF STATE]
proof (state)
this:
\<delta> = weight (\<Gamma> \<ominus> f) z - d_OUT g z

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have \<delta>_pos: "\<delta> > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < \<delta>
[PROOF STEP]
using OUT_z
[PROOF STATE]
proof (prove)
using this:
d_OUT g z < weight (\<Gamma> \<ominus> f) z

goal (1 subgoal):
 1. 0 < \<delta>
[PROOF STEP]
by(simp add: \<delta>_def diff_gr0_ennreal del: minus_web_sel)
[PROOF STATE]
proof (state)
this:
0 < \<delta>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < \<delta>
[PROOF STEP]
have \<delta>_finite[simp]: "\<delta> \<noteq> \<top>"
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>

goal (1 subgoal):
 1. \<delta> \<noteq> \<top>
[PROOF STEP]
using z
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>
z \<in> A \<Gamma>

goal (1 subgoal):
 1. \<delta> \<noteq> \<top>
[PROOF STEP]
by(simp_all add: \<delta>_def)
[PROOF STATE]
proof (state)
this:
\<delta> \<noteq> \<top>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have "\<exists>(\<epsilon>, h) \<in> M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>)

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
hence greater: "d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a" if "(\<epsilon>, h) \<in> M" for \<epsilon> h
[PROOF STATE]
proof (prove)
using this:
\<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>)

goal (1 subgoal):
 1. d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
\<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>)
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> M \<Longrightarrow> d_OUT (plus_current ?\<epsilon> ?h) a + \<delta> \<le> d_OUT f a

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
have chain'': "Complete_Partial_Order.chain (\<le>) ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complete_Partial_Order.chain (\<le>) ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)
[PROOF STEP]
using chain'
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) M

goal (1 subgoal):
 1. Complete_Partial_Order.chain (\<le>) ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)
[PROOF STEP]
by(rule chain_imageI)(auto simp add: le_fun_def add_mono)
[PROOF STATE]
proof (state)
this:
Complete_Partial_Order.chain (\<le>) ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
have "d_OUT f a + 0 < d_OUT f a + \<delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT f a + 0 < d_OUT f a + \<delta>
[PROOF STEP]
using currentD_finite_OUT[OF f_curr, of a]
[PROOF STATE]
proof (prove)
using this:
d_OUT f a \<noteq> \<top>

goal (1 subgoal):
 1. d_OUT f a + 0 < d_OUT f a + \<delta>
[PROOF STEP]
by (simp add: \<delta>_pos)
[PROOF STATE]
proof (state)
this:
d_OUT f a + 0 < d_OUT f a + \<delta>

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_OUT f a + 0 < d_OUT f a + \<delta>

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
have "d_OUT f a + \<delta> = (SUP (\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT f a + \<delta> = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta>
[PROOF STEP]
using chain'' nempty supp_flow
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)
M \<noteq> {}
countable (support_flow f)

goal (1 subgoal):
 1. d_OUT f a + \<delta> = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta>
[PROOF STEP]
unfolding f_alt
[PROOF STATE]
proof (prove)
using this:
Complete_Partial_Order.chain (\<le>) ((\<lambda>(\<epsilon>, h). plus_current \<epsilon> h) ` M)
M \<noteq> {}
countable (support_flow (\<Squnion>(x, y)\<in>M. plus_current x y))

goal (1 subgoal):
 1. d_OUT (\<Squnion>(x, y)\<in>M. plus_current x y) a + \<delta> = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta>
[PROOF STEP]
by (subst d_OUT_Sup)
            (simp_all add: plus_current_def [abs_def] split_def image_comp)
[PROOF STATE]
proof (state)
this:
d_OUT f a + \<delta> = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta>

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_OUT f a + \<delta> = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta>

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
have "\<dots> \<le> d_OUT f a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta> \<le> d_OUT f a
[PROOF STEP]
unfolding ennreal_SUP_add_left[symmetric, OF nempty]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>i\<in>M. (case i of (\<epsilon>, h) \<Rightarrow> d_OUT (plus_current \<epsilon> h) a) + \<delta>) \<le> d_OUT f a
[PROOF STEP]
proof(rule SUP_least, clarify)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>aa b. (aa, b) \<in> M \<Longrightarrow> d_OUT (plus_current aa b) a + \<delta> \<le> d_OUT f a
[PROOF STEP]
show "d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a" if "(\<epsilon>, h) \<in> M" for \<epsilon> h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a
[PROOF STEP]
using greater[OF that] currentD_finite_OUT[OF Chains_FieldD[OF M that, THEN f], of a]
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a
d_OUT (F (\<epsilon>, h)) a \<noteq> \<top>

goal (1 subgoal):
 1. d_OUT (plus_current \<epsilon> h) a + \<delta> \<le> d_OUT f a
[PROOF STEP]
by(auto simp add: ennreal_le_minus_iff add.commute F_def)
[PROOF STATE]
proof (state)
this:
(?\<epsilon>, ?h) \<in> M \<Longrightarrow> d_OUT (plus_current ?\<epsilon> ?h) a + \<delta> \<le> d_OUT f a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Squnion>(\<epsilon>, h)\<in>M. d_OUT (plus_current \<epsilon> h) a) + \<delta> \<le> d_OUT f a

goal (1 subgoal):
 1. \<not> (\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>) \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
d_OUT f a + 0 < d_OUT f a
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
d_OUT f a + 0 < d_OUT f a

goal (1 subgoal):
 1. False
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>
[PROOF STEP]
obtain \<epsilon> h where hM: "(\<epsilon>, h) \<in> M" and close: "d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>"
[PROOF STATE]
proof (prove)
using this:
\<exists>(\<epsilon>, h)\<in>M. d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>

goal (1 subgoal):
 1. (\<And>\<epsilon> h. \<lbrakk>(\<epsilon>, h) \<in> M; d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<in> M
d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have Field: "(\<epsilon>, h) \<in> Field leq"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
using hM
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
by(rule Chains_FieldD[OF M])
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<epsilon>, h) \<in> Field leq
[PROOF STEP]
have \<epsilon>: "current \<Gamma> \<epsilon>"
        and unhindered_h: "\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))"
        and h_curr: "current (\<Gamma> \<ominus> \<epsilon>) h"
        and h_w: "wave (\<Gamma> \<ominus> \<epsilon>) h"
        and OUT_\<epsilon>: "x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0" for x
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. (current \<Gamma> \<epsilon> &&& \<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))) &&& current (\<Gamma> \<ominus> \<epsilon>) h &&& wave (\<Gamma> \<ominus> \<epsilon>) h &&& (x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0)
[PROOF STEP]
by(rule \<epsilon>_curr OUT_\<epsilon> h h_w unhindered')+
[PROOF STATE]
proof (state)
this:
current \<Gamma> \<epsilon>
\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))
current (\<Gamma> \<ominus> \<epsilon>) h
wave (\<Gamma> \<ominus> \<epsilon>) h
?x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> ?x = 0

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
let ?\<epsilon>h = "plus_current \<epsilon> h"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have \<epsilon>h_curr: "current \<Gamma> ?\<epsilon>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (plus_current \<epsilon> h)
[PROOF STEP]
using Field
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. current \<Gamma> (plus_current \<epsilon> h)
[PROOF STEP]
unfolding F_simps[symmetric]
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. current \<Gamma> (F (\<epsilon>, h))
[PROOF STEP]
by(rule f)
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current \<epsilon> h)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
interpret h: countable_bipartite_web "\<Gamma> \<ominus> \<epsilon>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> \<epsilon>)
[PROOF STEP]
using \<epsilon>
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> \<epsilon>

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> \<epsilon>)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
interpret \<epsilon>h: countable_bipartite_web "\<Gamma> \<ominus> ?\<epsilon>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> plus_current \<epsilon> h)
[PROOF STEP]
using \<epsilon>h_curr
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (plus_current \<epsilon> h)

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> plus_current \<epsilon> h)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
note [simp del] = minus_web_sel(2)
        and [simp] = weight_minus_web[OF \<epsilon>h_curr] weight_minus_web[OF SM1, simplified]
[PROOF STATE]
proof (state)
this:
weight (?\<Gamma> \<ominus> ?f) ?x = (if ?x \<in> A ?\<Gamma> then weight ?\<Gamma> ?x - d_OUT ?f ?x else weight ?\<Gamma> ?x + d_OUT ?f ?x - d_IN ?f ?x)
weight (\<Gamma> \<ominus> plus_current \<epsilon> h) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT (plus_current \<epsilon> h) ?x else weight \<Gamma> ?x - d_IN (plus_current \<epsilon> h) ?x)
weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT (\<Squnion> (fst ` M)) ?x else weight \<Gamma> ?x - d_IN (\<Squnion> (fst ` M)) ?x)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
define k where "k e = Sup (fst ` M) e - \<epsilon> e" for e
[PROOF STATE]
proof (state)
this:
k ?e = (\<Squnion> (fst ` M)) ?e - \<epsilon> ?e

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have k_simps: "k (x, y) = Sup (fst ` M) (x, y) - \<epsilon> (x, y)" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k (x, y) = (\<Squnion> (fst ` M)) (x, y) - \<epsilon> (x, y)
[PROOF STEP]
by(simp add: k_def)
[PROOF STATE]
proof (state)
this:
k (?x, ?y) = (\<Squnion> (fst ` M)) (?x, ?y) - \<epsilon> (?x, ?y)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have k_alt: "k (x, y) = (if x = a \<and> edge \<Gamma> x y then Sup (fst ` M) (a, y) - \<epsilon> (a, y) else 0)" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k (x, y) = (if x = a \<and> edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
by (cases "x = a")
          (auto simp add: k_simps out_\<epsilon> [OF Field] currentD_outside [OF \<epsilon>] image_comp
           intro!: SUP_eq_const [OF nempty] dest!: Chains_FieldD [OF M]
           intro: currentD_outside [OF \<epsilon>_curr] out_\<epsilon>)
[PROOF STATE]
proof (state)
this:
k (?x, ?y) = (if ?x = a \<and> edge \<Gamma> ?x ?y then (\<Squnion> (fst ` M)) (a, ?y) - \<epsilon> (a, ?y) else 0)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have OUT_k: "d_OUT k x = (if x = a then d_OUT (Sup (fst ` M)) a - d_OUT \<epsilon> a else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
have "d_OUT k x = (if x = a then (\<Sum>\<^sup>+ y. Sup (fst ` M) (a, y) - \<epsilon> (a, y)) else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT k x = (if x = a then \<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
using currentD_outside[OF SM1] currentD_outside[OF \<epsilon>]
[PROOF STATE]
proof (prove)
using this:
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (fst ` M)) (?x, ?y) = 0
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> \<epsilon> (?x, ?y) = 0

goal (1 subgoal):
 1. d_OUT k x = (if x = a then \<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
by(auto simp add: k_alt d_OUT_def intro!: nn_integral_cong)
[PROOF STATE]
proof (state)
this:
d_OUT k x = (if x = a then \<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)

goal (1 subgoal):
 1. d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_OUT k x = (if x = a then \<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)

goal (1 subgoal):
 1. d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
have "(\<Sum>\<^sup>+ y. Sup (fst ` M) (a, y) - \<epsilon> (a, y)) = d_OUT (Sup (fst `M)) a - d_OUT \<epsilon> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y)) = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
using currentD_finite_OUT[OF \<epsilon>, of a] hM
[PROOF STATE]
proof (prove)
using this:
d_OUT \<epsilon> a \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y)) = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
unfolding d_OUT_def
[PROOF STATE]
proof (prove)
using this:
(\<Sum>\<^sup>+ y. \<epsilon> (a, y)) \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y)) = (\<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y)) - (\<Sum>\<^sup>+ y. \<epsilon> (a, y))
[PROOF STEP]
by(subst nn_integral_diff[symmetric])(auto simp add: AE_count_space intro!: SUP_upper2)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ y. (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y)) = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a

goal (1 subgoal):
 1. d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)

goal (1 subgoal):
 1. d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
d_OUT k x = (if x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
d_OUT k ?x = (if ?x = a then d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a else 0)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have IN_k: "d_IN k y = (if edge \<Gamma> a y then Sup (fst ` M) (a, y) - \<epsilon> (a, y) else 0)" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
have "d_IN k y = (\<Sum>\<^sup>+ x. (if edge \<Gamma> x y then Sup (fst ` M) (a, y) - \<epsilon> (a, y) else 0) * indicator {a} x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN k y = \<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV
[PROOF STEP]
unfolding d_IN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ x. k (x, y)) = \<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV
[PROOF STEP]
by(rule nn_integral_cong)(auto simp add: k_alt outgoing_def split: split_indicator)
[PROOF STATE]
proof (state)
this:
d_IN k y = \<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV

goal (1 subgoal):
 1. d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_IN k y = \<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV

goal (1 subgoal):
 1. d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
have "\<dots> = (if edge \<Gamma> a y then Sup (fst ` M) (a, y) - \<epsilon> (a, y) else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
using hM
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. \<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
by(auto simp add: max_def intro!: SUP_upper2)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>{a}. (if edge \<Gamma> x y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)\<partial>count_space UNIV = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)

goal (1 subgoal):
 1. d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)

goal (1 subgoal):
 1. d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
d_IN k y = (if edge \<Gamma> a y then (\<Squnion> (fst ` M)) (a, y) - \<epsilon> (a, y) else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
d_IN k ?y = (if edge \<Gamma> a ?y then (\<Squnion> (fst ` M)) (a, ?y) - \<epsilon> (a, ?y) else 0)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have OUT_\<epsilon>h: "d_OUT ?\<epsilon>h x = d_OUT \<epsilon> x + d_OUT h x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (plus_current \<epsilon> h) x = d_OUT \<epsilon> x + d_OUT h x
[PROOF STEP]
unfolding plus_current_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<lambda>e. \<epsilon> e + h e) x = d_OUT \<epsilon> x + d_OUT h x
[PROOF STEP]
by(rule d_OUT_add)+
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current \<epsilon> h) ?x = d_OUT \<epsilon> ?x + d_OUT h ?x

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have IN_\<epsilon>h: "d_IN ?\<epsilon>h x = d_IN \<epsilon> x + d_IN h x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (plus_current \<epsilon> h) x = d_IN \<epsilon> x + d_IN h x
[PROOF STEP]
unfolding plus_current_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<lambda>e. \<epsilon> e + h e) x = d_IN \<epsilon> x + d_IN h x
[PROOF STEP]
by(rule d_IN_add)+
[PROOF STATE]
proof (state)
this:
d_IN (plus_current \<epsilon> h) ?x = d_IN \<epsilon> ?x + d_IN h ?x

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have OUT1_le': "d_OUT (Sup (fst`M)) x \<le> weight \<Gamma> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x
[PROOF STEP]
using OUT1_le[of x]
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x) \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x
[PROOF STEP]
unfolding OUT1
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>\<epsilon>h\<in>M. d_OUT (fst \<epsilon>h) x) \<le> weight \<Gamma> x

goal (1 subgoal):
 1. (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> x) \<le> weight \<Gamma> x
[PROOF STEP]
by (simp add: split_beta')
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) ?x \<le> weight \<Gamma> ?x

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have k: "current (\<Gamma> \<ominus> ?\<epsilon>h) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> plus_current \<epsilon> h) k
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. d_OUT k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 2. \<And>x. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. d_OUT k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 2. \<And>x. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
show "d_OUT k x \<le> weight (\<Gamma> \<ominus> ?\<epsilon>h) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
[PROOF STEP]
using a OUT1_na[of x] currentD_weight_OUT[OF hM2[OF hM], of x] currentD_weight_IN[OF \<epsilon>h_curr, of x]
            currentD_weight_IN[OF \<epsilon>, of x] OUT1_le'[of x]
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) x = 0
d_OUT h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
d_IN (plus_current \<epsilon> h) x \<le> weight \<Gamma> x
d_IN \<epsilon> x \<le> weight \<Gamma> x
d_OUT (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_OUT k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
[PROOF STEP]
apply(auto simp add: diff_add_eq_diff_diff_swap_ennreal diff_add_assoc2_ennreal[symmetric]
                               OUT_k OUT_\<epsilon> OUT_\<epsilon>h IN_\<epsilon>h currentD_OUT'[OF \<epsilon>] IN_\<epsilon>[OF Field] h.currentD_OUT'[OF h_curr])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A \<Gamma>; d_OUT h a \<le> weight \<Gamma> a - d_OUT (\<Squnion> (fst ` M)) a; \<epsilon> (a, a) + d_IN h a \<le> weight \<Gamma> a; \<epsilon> (a, a) \<le> weight \<Gamma> a; d_OUT (\<Squnion> (fst ` M)) a \<le> weight \<Gamma> a; x = a\<rbrakk> \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a \<le> weight \<Gamma> a - d_OUT \<epsilon> a - d_OUT h a
[PROOF STEP]
apply(subst diff_diff_commute_ennreal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A \<Gamma>; d_OUT h a \<le> weight \<Gamma> a - d_OUT (\<Squnion> (fst ` M)) a; \<epsilon> (a, a) + d_IN h a \<le> weight \<Gamma> a; \<epsilon> (a, a) \<le> weight \<Gamma> a; d_OUT (\<Squnion> (fst ` M)) a \<le> weight \<Gamma> a; x = a\<rbrakk> \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a \<le> weight \<Gamma> a - d_OUT h a - d_OUT \<epsilon> a
[PROOF STEP]
apply(intro ennreal_minus_mono)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<in> A \<Gamma>; d_OUT h a \<le> weight \<Gamma> a - d_OUT (\<Squnion> (fst ` M)) a; \<epsilon> (a, a) + d_IN h a \<le> weight \<Gamma> a; \<epsilon> (a, a) \<le> weight \<Gamma> a; d_OUT (\<Squnion> (fst ` M)) a \<le> weight \<Gamma> a; x = a\<rbrakk> \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a \<le> weight \<Gamma> a - d_OUT h a
 2. \<lbrakk>a \<in> A \<Gamma>; d_OUT h a \<le> weight \<Gamma> a - d_OUT (\<Squnion> (fst ` M)) a; \<epsilon> (a, a) + d_IN h a \<le> weight \<Gamma> a; \<epsilon> (a, a) \<le> weight \<Gamma> a; d_OUT (\<Squnion> (fst ` M)) a \<le> weight \<Gamma> a; x = a\<rbrakk> \<Longrightarrow> d_OUT \<epsilon> a \<le> d_OUT \<epsilon> a
[PROOF STEP]
apply(auto simp add: ennreal_le_minus_iff ac_simps less_imp_le OUT1)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
d_OUT k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x

goal (2 subgoals):
 1. \<And>x. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
have *: "(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (Sup (fst`M)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x
[PROOF STEP]
unfolding IN1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>xa\<in>M. fst xa (a, x)) \<le> (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> x)
[PROOF STEP]
by (intro SUP_subset_mono) (auto simp: split_beta' d_IN_ge_point)
[PROOF STATE]
proof (state)
this:
(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x

goal (2 subgoals):
 1. \<And>x. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x

goal (2 subgoals):
 1. \<And>x. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
have "\<dots> \<le> weight \<Gamma> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x
[PROOF STEP]
using IN1_le[of x] IN1
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>\<epsilon>h\<in>M. d_IN (fst \<epsilon>h) x) \<le> weight \<Gamma> x
d_IN (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> ?x)

goal (1 subgoal):
 1. d_IN (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x
[PROOF STEP]
by (simp add: split_beta')
[PROOF STATE]
proof (state)
this:
d_IN (\<Squnion> (fst ` M)) x \<le> weight \<Gamma> x

goal (2 subgoals):
 1. \<And>x. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> weight \<Gamma> x
[PROOF STEP]
show "d_IN k x \<le> weight (\<Gamma> \<ominus> ?\<epsilon>h) x"
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
[PROOF STEP]
using currentD_weight_IN[OF \<epsilon>h_curr, of x] currentD_weight_OUT[OF \<epsilon>h_curr, of x]
            currentD_weight_IN[OF hM2[OF hM], of x] IN_\<epsilon>[OF Field, of x] *
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> weight \<Gamma> x
d_IN (plus_current \<epsilon> h) x \<le> weight \<Gamma> x
d_OUT (plus_current \<epsilon> h) x \<le> weight \<Gamma> x
d_IN h x \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) x
d_IN \<epsilon> x = \<epsilon> (a, x)
(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x

goal (1 subgoal):
 1. d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x
[PROOF STEP]
apply (auto simp add: IN_k outgoing_def IN_\<epsilon>h IN_\<epsilon> A_in diff_add_eq_diff_diff_swap_ennreal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> weight \<Gamma> x; \<epsilon> (a, x) + d_IN h x \<le> weight \<Gamma> x; d_OUT (plus_current \<epsilon> h) x \<le> weight \<Gamma> x; d_IN h x \<le> weight \<Gamma> x - d_IN (\<Squnion> (fst ` M)) x; d_IN \<epsilon> x = \<epsilon> (a, x); (\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x; edge \<Gamma> a x; x \<notin> A \<Gamma>\<rbrakk> \<Longrightarrow> (\<Squnion>xa\<in>fst ` M. xa (a, x)) - \<epsilon> (a, x) \<le> weight \<Gamma> x - \<epsilon> (a, x) - d_IN h x
[PROOF STEP]
apply (subst diff_diff_commute_ennreal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> weight \<Gamma> x; \<epsilon> (a, x) + d_IN h x \<le> weight \<Gamma> x; d_OUT (plus_current \<epsilon> h) x \<le> weight \<Gamma> x; d_IN h x \<le> weight \<Gamma> x - d_IN (\<Squnion> (fst ` M)) x; d_IN \<epsilon> x = \<epsilon> (a, x); (\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x; edge \<Gamma> a x; x \<notin> A \<Gamma>\<rbrakk> \<Longrightarrow> (\<Squnion>xa\<in>fst ` M. xa (a, x)) - \<epsilon> (a, x) \<le> weight \<Gamma> x - d_IN h x - \<epsilon> (a, x)
[PROOF STEP]
apply (intro ennreal_minus_mono[OF _ order_refl])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<Squnion>xa\<in>M. fst xa (a, x)) \<le> weight \<Gamma> x; \<epsilon> (a, x) + d_IN h x \<le> weight \<Gamma> x; d_OUT (plus_current \<epsilon> h) x \<le> weight \<Gamma> x; d_IN h x \<le> weight \<Gamma> x - d_IN (\<Squnion> (fst ` M)) x; d_IN \<epsilon> x = \<epsilon> (a, x); (\<Squnion>xa\<in>M. fst xa (a, x)) \<le> d_IN (\<Squnion> (fst ` M)) x; edge \<Gamma> a x; x \<notin> A \<Gamma>\<rbrakk> \<Longrightarrow> (\<Squnion>xa\<in>fst ` M. xa (a, x)) \<le> weight \<Gamma> x - d_IN h x
[PROOF STEP]
apply (auto simp add: ennreal_le_minus_iff ac_simps image_comp intro: order_trans add_mono)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
d_IN k x \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h) x

goal (1 subgoal):
 1. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k e = 0
[PROOF STEP]
show "k e = 0" if "e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> ?\<epsilon>h\<^esub>" for e
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k e = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub>

goal (1 subgoal):
 1. k e = 0
[PROOF STEP]
by (cases e) (simp add: k_alt)
[PROOF STATE]
proof (state)
this:
?e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h\<^esub> \<Longrightarrow> k ?e = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> plus_current \<epsilon> h) k

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
define q where "q = (\<Sum>\<^sup>+ y\<in>B (\<Gamma> \<ominus> ?\<epsilon>h). d_IN k y - d_OUT k y)"
[PROOF STATE]
proof (state)
this:
q = (\<Sum>\<^sup>+ y\<in>B (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have q_alt: "q = (\<Sum>\<^sup>+ y\<in>- A (\<Gamma> \<ominus> ?\<epsilon>h). d_IN k y - d_OUT k y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q = (\<Sum>\<^sup>+ y\<in>- A (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y)
[PROOF STEP]
using disjoint
[PROOF STATE]
proof (prove)
using this:
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. q = (\<Sum>\<^sup>+ y\<in>- A (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y)
[PROOF STEP]
by(auto simp add: q_def nn_integral_count_space_indicator currentD_outside_OUT[OF k] currentD_outside_IN[OF k] not_vertex split: split_indicator intro!: nn_integral_cong)
[PROOF STATE]
proof (state)
this:
q = (\<Sum>\<^sup>+ y\<in>- A (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have q_simps: "q = d_OUT (Sup (fst ` M)) a - d_OUT \<epsilon> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
have "q = (\<Sum>\<^sup>+ y. d_IN k y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q = integral\<^sup>N (count_space UNIV) (d_IN k)
[PROOF STEP]
using a IN1 OUT1 OUT1_na
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
d_IN (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> ?x)
d_OUT (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> ?x)
?x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) ?x = 0

goal (1 subgoal):
 1. q = integral\<^sup>N (count_space UNIV) (d_IN k)
[PROOF STEP]
unfolding q_alt
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
d_IN (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_IN \<epsilon> ?x)
d_OUT (\<Squnion> (fst ` M)) ?x = (\<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> ?x)
?x \<noteq> a \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) ?x = 0

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ y\<in>- A (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y) = integral\<^sup>N (count_space UNIV) (d_IN k)
[PROOF STEP]
by(auto simp add: nn_integral_count_space_indicator OUT_k IN_\<epsilon>[OF Field] OUT_\<epsilon> currentD_outside[OF \<epsilon>] outgoing_def no_loop A_in IN_k intro!: nn_integral_cong split: split_indicator)
[PROOF STATE]
proof (state)
this:
q = integral\<^sup>N (count_space UNIV) (d_IN k)

goal (1 subgoal):
 1. q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
q = integral\<^sup>N (count_space UNIV) (d_IN k)

goal (1 subgoal):
 1. q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
have "\<dots> = d_OUT (Sup (fst ` M)) a - d_OUT \<epsilon> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>N (count_space UNIV) (d_IN k) = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
using currentD_finite_OUT[OF \<epsilon>, of a] hM currentD_outside[OF SM1] currentD_outside[OF \<epsilon>]
[PROOF STATE]
proof (prove)
using this:
d_OUT \<epsilon> a \<noteq> \<top>
(\<epsilon>, h) \<in> M
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> (\<Squnion> (fst ` M)) (?x, ?y) = 0
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> \<epsilon> (?x, ?y) = 0

goal (1 subgoal):
 1. integral\<^sup>N (count_space UNIV) (d_IN k) = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
by(subst d_OUT_diff[symmetric])(auto simp add: d_OUT_def IN_k intro!: SUP_upper2 nn_integral_cong)
[PROOF STATE]
proof (state)
this:
integral\<^sup>N (count_space UNIV) (d_IN k) = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a

goal (1 subgoal):
 1. q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a

goal (1 subgoal):
 1. q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
q = d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have q_finite: "q \<noteq> \<top>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q \<noteq> \<top>
[PROOF STEP]
using currentD_finite_OUT[OF SM1, of a]
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) a \<noteq> \<top>

goal (1 subgoal):
 1. q \<noteq> \<top>
[PROOF STEP]
by(simp add: q_simps)
[PROOF STATE]
proof (state)
this:
q \<noteq> \<top>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have q_nonneg: "0 \<le> q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> q
[PROOF STEP]
using hM
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. 0 \<le> q
[PROOF STEP]
by(auto simp add: q_simps intro!: d_OUT_mono SUP_upper2)
[PROOF STATE]
proof (state)
this:
0 \<le> q

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have q_less_\<delta>: "q < \<delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q < \<delta>
[PROOF STEP]
using close
[PROOF STATE]
proof (prove)
using this:
d_OUT f a < d_OUT (plus_current \<epsilon> h) a + \<delta>

goal (1 subgoal):
 1. q < \<delta>
[PROOF STEP]
unfolding q_simps \<delta>_def OUT_\<epsilon>h OUT_f
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z)

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z) \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
let ?F = "d_OUT (Sup (fst`M)) a" and ?S = "d_OUT (Sup (snd`M)) a"
          and ?\<epsilon> = "d_OUT \<epsilon> a" and ?h = "d_OUT h a" and ?w = "weight (\<Gamma> \<ominus> f) z - d_OUT g z"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z) \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
have "?F + ?h \<le> ?F + ?S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT h a \<le> d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a
[PROOF STEP]
using hM
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT h a \<le> d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a
[PROOF STEP]
by (auto intro!: add_mono d_OUT_mono SUP_upper2)
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) a + d_OUT h a \<le> d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z) \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) a + d_OUT h a \<le> d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z) \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
assume "?F + ?S < ?\<epsilon> + ?h + ?w"
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z)

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z) \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
d_OUT (\<Squnion> (fst ` M)) a + d_OUT h a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z)
[PROOF STEP]
have "?h + ?F < ?h + (?w + ?\<epsilon>)"
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) a + d_OUT h a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z)

goal (1 subgoal):
 1. d_OUT h a + d_OUT (\<Squnion> (fst ` M)) a < d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z + d_OUT \<epsilon> a)
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
d_OUT h a + d_OUT (\<Squnion> (fst ` M)) a < d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z + d_OUT \<epsilon> a)

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a + d_OUT (\<Squnion> (snd ` M)) a < d_OUT \<epsilon> a + d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z) \<Longrightarrow> d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d_OUT h a + d_OUT (\<Squnion> (fst ` M)) a < d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z + d_OUT \<epsilon> a)
[PROOF STEP]
show "?F - ?\<epsilon> < ?w"
[PROOF STATE]
proof (prove)
using this:
d_OUT h a + d_OUT (\<Squnion> (fst ` M)) a < d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z + d_OUT \<epsilon> a)

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
using currentD_finite_OUT[OF \<epsilon>, of a] hM
[PROOF STATE]
proof (prove)
using this:
d_OUT h a + d_OUT (\<Squnion> (fst ` M)) a < d_OUT h a + (weight (\<Gamma> \<ominus> f) z - d_OUT g z + d_OUT \<epsilon> a)
d_OUT \<epsilon> a \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
unfolding ennreal_add_left_cancel_less
[PROOF STATE]
proof (prove)
using this:
d_OUT h a \<noteq> \<infinity> \<and> d_OUT (\<Squnion> (fst ` M)) a < weight (\<Gamma> \<ominus> f) z - d_OUT g z + d_OUT \<epsilon> a
d_OUT \<epsilon> a \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z
[PROOF STEP]
by (subst minus_less_iff_ennreal) (auto intro!: d_OUT_mono SUP_upper2 simp: less_top)
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) a - d_OUT \<epsilon> a < weight (\<Gamma> \<ominus> f) z - d_OUT g z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
q < \<delta>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
define g' where "g' = plus_current g (Sup (snd ` M) - h)"
[PROOF STATE]
proof (state)
this:
g' = plus_current g (\<Squnion> (snd ` M) - h)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have g'_simps: "g' e = g e + Sup (snd ` M) e - h e" for e
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g' e = g e + (\<Squnion> (snd ` M)) e - h e
[PROOF STEP]
using hM
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. g' e = g e + (\<Squnion> (snd ` M)) e - h e
[PROOF STEP]
by(auto simp add: g'_def intro!: add_diff_eq_ennreal intro: SUP_upper2)
[PROOF STATE]
proof (state)
this:
g' ?e = g ?e + (\<Squnion> (snd ` M)) ?e - h ?e

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have OUT_g': "d_OUT g' x = d_OUT g x + (d_OUT (Sup (snd ` M)) x - d_OUT h x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT g' x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
unfolding g'_simps[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<lambda>e. g e + (\<Squnion> (snd ` M)) e - h e) x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
using \<epsilon>h.currentD_finite_OUT[OF k] hM h.currentD_finite_OUT[OF h_curr] hM
[PROOF STATE]
proof (prove)
using this:
d_OUT k ?x \<noteq> \<top>
(\<epsilon>, h) \<in> M
d_OUT h ?x \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT (\<lambda>e. g e + (\<Squnion> (snd ` M)) e - h e) x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
apply(subst d_OUT_diff)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>y. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; (\<epsilon>, h) \<in> M; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> h (x, y) \<le> g (x, y) + (\<Squnion> (snd ` M)) (x, y)
 2. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; (\<epsilon>, h) \<in> M; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_OUT h x \<noteq> \<top>
 3. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; (\<epsilon>, h) \<in> M; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_OUT (\<lambda>e. g e + (\<Squnion> (snd ` M)) e) x - d_OUT h x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
apply(auto simp add: add_diff_eq_ennreal[symmetric] k_simps intro: add_increasing intro!: SUP_upper2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_OUT (\<lambda>e. g e + (\<Squnion>x\<in>snd ` M. x e)) x - d_OUT h x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
apply(subst d_OUT_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_OUT g x + d_OUT (\<lambda>e. \<Squnion>x\<in>snd ` M. x e) x - d_OUT h x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
apply(auto simp add: add_diff_eq_ennreal[symmetric] k_simps intro: add_increasing intro!:)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_OUT g x + d_OUT (\<lambda>e. \<Squnion>x\<in>snd ` M. x e) x - d_OUT h x = d_OUT g x + (d_OUT (\<Squnion> (snd ` M)) x - d_OUT h x)
[PROOF STEP]
apply(simp add: add_diff_eq_ennreal SUP_apply[abs_def])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_OUT k x \<noteq> \<top>; \<And>x. d_OUT h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_OUT g x + d_OUT (\<lambda>e. \<Squnion>x\<in>snd ` M. x e) x - d_OUT h x = d_OUT g x + (d_OUT (\<lambda>x. \<Squnion>y\<in>M. snd y x) x - d_OUT h x)
[PROOF STEP]
apply(auto simp add: g'_def image_comp intro!: add_diff_eq_ennreal[symmetric] d_OUT_mono intro: SUP_upper2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
d_OUT g' ?x = d_OUT g ?x + (d_OUT (\<Squnion> (snd ` M)) ?x - d_OUT h ?x)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have IN_g': "d_IN g' x = d_IN g x + (d_IN (Sup (snd ` M)) x - d_IN h x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN g' x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
unfolding g'_simps[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<lambda>e. g e + (\<Squnion> (snd ` M)) e - h e) x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
using \<epsilon>h.currentD_finite_IN[OF k] hM h.currentD_finite_IN[OF h_curr] hM
[PROOF STATE]
proof (prove)
using this:
d_IN k ?x \<noteq> \<top>
(\<epsilon>, h) \<in> M
d_IN h ?x \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_IN (\<lambda>e. g e + (\<Squnion> (snd ` M)) e - h e) x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
apply(subst d_IN_diff)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa. \<lbrakk>\<And>x. d_IN k x \<noteq> \<top>; (\<epsilon>, h) \<in> M; \<And>x. d_IN h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> h (xa, x) \<le> g (xa, x) + (\<Squnion> (snd ` M)) (xa, x)
 2. \<lbrakk>\<And>x. d_IN k x \<noteq> \<top>; (\<epsilon>, h) \<in> M; \<And>x. d_IN h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_IN h x \<noteq> \<top>
 3. \<lbrakk>\<And>x. d_IN k x \<noteq> \<top>; (\<epsilon>, h) \<in> M; \<And>x. d_IN h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_IN (\<lambda>e. g e + (\<Squnion> (snd ` M)) e) x - d_IN h x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
apply(auto simp add: add_diff_eq_ennreal[symmetric] k_simps intro: add_increasing intro!: SUP_upper2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_IN k x \<noteq> \<top>; \<And>x. d_IN h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_IN (\<lambda>e. g e + (\<Squnion>x\<in>snd ` M. x e)) x - d_IN h x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
apply(subst d_IN_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_IN k x \<noteq> \<top>; \<And>x. d_IN h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_IN g x + d_IN (\<lambda>e. \<Squnion>x\<in>snd ` M. x e) x - d_IN h x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
apply(auto simp add: add_diff_eq_ennreal[symmetric] k_simps intro: add_increasing intro!: SUP_upper)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. d_IN k x \<noteq> \<top>; \<And>x. d_IN h x \<noteq> \<top>; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_IN g x + d_IN (\<lambda>e. \<Squnion>x\<in>snd ` M. x e) x - d_IN h x = d_IN g x + (d_IN (\<Squnion> (snd ` M)) x - d_IN h x)
[PROOF STEP]
apply(auto simp add: g'_def SUP_apply[abs_def] image_comp intro!: add_diff_eq_ennreal[symmetric] d_IN_mono intro: SUP_upper2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
d_IN g' ?x = d_IN g ?x + (d_IN (\<Squnion> (snd ` M)) ?x - d_IN h ?x)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have h': "current (\<Gamma> \<ominus> Sup (fst ` M)) h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
using hM
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h
[PROOF STEP]
by(rule hM2)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
let ?\<Gamma> = "\<Gamma> \<ominus> ?\<epsilon>h \<ominus> k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
interpret \<Gamma>: web ?\<Gamma>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. web (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k)
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> plus_current \<epsilon> h) k

goal (1 subgoal):
 1. web (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k)
[PROOF STEP]
by(rule \<epsilon>h.web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
note [simp] = \<epsilon>h.weight_minus_web[OF k] h.weight_minus_web[OF h_curr]
        weight_minus_web[OF f_curr] SM1.weight_minus_web[OF h', simplified]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) ?x = (if ?x \<in> A (\<Gamma> \<ominus> plus_current \<epsilon> h) then weight (\<Gamma> \<ominus> plus_current \<epsilon> h) ?x - d_OUT k ?x else weight (\<Gamma> \<ominus> plus_current \<epsilon> h) ?x - d_IN k ?x)
weight (\<Gamma> \<ominus> \<epsilon> \<ominus> h) ?x = (if ?x \<in> A (\<Gamma> \<ominus> \<epsilon>) then weight (\<Gamma> \<ominus> \<epsilon>) ?x - d_OUT h ?x else weight (\<Gamma> \<ominus> \<epsilon>) ?x - d_IN h ?x)
weight (\<Gamma> \<ominus> f) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT f ?x else weight \<Gamma> ?x - d_IN f ?x)
weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) ?x = (if ?x \<in> A \<Gamma> then weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) ?x - d_OUT h ?x else weight (\<Gamma> \<ominus> \<Squnion> (fst ` M)) ?x - d_IN h ?x)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
interpret \<Omega>: countable_bipartite_web "\<Gamma> \<ominus> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> f)
[PROOF STEP]
using f_curr
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> f

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> f)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have *: "\<Gamma> \<ominus> f = \<Gamma> \<ominus> Sup (fst ` M) \<ominus> Sup (snd ` M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Gamma> \<ominus> f = \<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)
[PROOF STEP]
unfolding f_def F_simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Gamma> \<ominus> plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M)) = \<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)
[PROOF STEP]
using SM1 current
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (\<Squnion> (fst ` M))
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))

goal (1 subgoal):
 1. \<Gamma> \<ominus> plus_current (\<Squnion> (fst ` M)) (\<Squnion> (snd ` M)) = \<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)
[PROOF STEP]
by(rule minus_plus_current)
[PROOF STATE]
proof (state)
this:
\<Gamma> \<ominus> f = \<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have OUT_\<epsilon>k: "d_OUT (Sup (fst ` M)) x = d_OUT \<epsilon> x + d_OUT k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x = d_OUT \<epsilon> x + d_OUT k x
[PROOF STEP]
using OUT1'[of x] currentD_finite_OUT[OF \<epsilon>] hM
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) x = (if x = a then \<Squnion>(\<epsilon>, h)\<in>M. d_OUT \<epsilon> a else 0)
d_OUT \<epsilon> ?x \<noteq> \<top>
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. d_OUT (\<Squnion> (fst ` M)) x = d_OUT \<epsilon> x + d_OUT k x
[PROOF STEP]
by(auto simp add: OUT_k OUT_\<epsilon> add_diff_self_ennreal SUP_upper2)
[PROOF STATE]
proof (state)
this:
d_OUT (\<Squnion> (fst ` M)) ?x = d_OUT \<epsilon> ?x + d_OUT k ?x

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have IN_\<epsilon>k: "d_IN (Sup (fst ` M)) x = d_IN \<epsilon> x + d_IN k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (\<Squnion> (fst ` M)) x = d_IN \<epsilon> x + d_IN k x
[PROOF STEP]
using IN1'[of x] currentD_finite_IN[OF \<epsilon>] currentD_outside[OF \<epsilon>] currentD_outside[OF \<epsilon>_curr]
[PROOF STATE]
proof (prove)
using this:
d_IN (\<Squnion> (fst ` M)) x = (\<Squnion>(\<epsilon>, h)\<in>M. \<epsilon> (a, x))
d_IN \<epsilon> ?x \<noteq> \<top>
\<not> edge \<Gamma> ?x ?y \<Longrightarrow> \<epsilon> (?x, ?y) = 0
\<lbrakk>(?f, ?h1) \<in> Field leq; \<not> edge \<Gamma> ?x ?y\<rbrakk> \<Longrightarrow> ?f (?x, ?y) = 0

goal (1 subgoal):
 1. d_IN (\<Squnion> (fst ` M)) x = d_IN \<epsilon> x + d_IN k x
[PROOF STEP]
by(auto simp add: IN_k IN_\<epsilon>[OF Field] add_diff_self_ennreal split_beta nempty image_comp
                dest!: Chains_FieldD[OF M] intro!: SUP_eq_const intro: SUP_upper2[OF hM])
[PROOF STATE]
proof (state)
this:
d_IN (\<Squnion> (fst ` M)) ?x = d_IN \<epsilon> ?x + d_IN k ?x

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have **: "?\<Gamma> = \<Gamma> \<ominus> Sup (fst ` M) \<ominus> h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k = \<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h
[PROOF STEP]
proof(rule web.equality)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. edge (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = edge (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 2. weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 3. A (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = A (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 4. B (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = B (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 5. web.more (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = web.more (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
[PROOF STEP]
show "weight ?\<Gamma> = weight (\<Gamma> \<ominus> Sup (fst ` M) \<ominus> h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
[PROOF STEP]
using OUT_\<epsilon>k OUT_\<epsilon>h currentD_finite_OUT[OF \<epsilon>] IN_\<epsilon>k IN_\<epsilon>h currentD_finite_IN[OF \<epsilon>]
[PROOF STATE]
proof (prove)
using this:
d_OUT (\<Squnion> (fst ` M)) ?x = d_OUT \<epsilon> ?x + d_OUT k ?x
d_OUT (plus_current \<epsilon> h) ?x = d_OUT \<epsilon> ?x + d_OUT h ?x
d_OUT \<epsilon> ?x \<noteq> \<top>
d_IN (\<Squnion> (fst ` M)) ?x = d_IN \<epsilon> ?x + d_IN k ?x
d_IN (plus_current \<epsilon> h) ?x = d_IN \<epsilon> ?x + d_IN h ?x
d_IN \<epsilon> ?x \<noteq> \<top>

goal (1 subgoal):
 1. weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
[PROOF STEP]
by(auto simp add: diff_add_eq_diff_diff_swap_ennreal diff_diff_commute_ennreal)
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)

goal (4 subgoals):
 1. edge (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = edge (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 2. A (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = A (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 3. B (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = B (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
 4. web.more (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) = web.more (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h)
[PROOF STEP]
qed simp_all
[PROOF STATE]
proof (state)
this:
\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k = \<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have g'_alt: "g' = plus_current (Sup (snd ` M)) g - h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g' = plus_current (\<Squnion> (snd ` M)) g - h
[PROOF STEP]
by(simp add: fun_eq_iff g'_simps add_diff_eq_ennreal add.commute)
[PROOF STATE]
proof (state)
this:
g' = plus_current (\<Squnion> (snd ` M)) g - h

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have "current (\<Gamma> \<ominus> Sup (fst ` M)) (plus_current (Sup (snd ` M)) g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
using current g
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
current (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
current (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)) g

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
by(rule SM1.current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
hence g': "current ?\<Gamma> g'"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g'
[PROOF STEP]
unfolding * ** g'_alt
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) (plus_current (\<Squnion> (snd ` M)) g - h)
[PROOF STEP]
using hM2[OF hM]
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) (plus_current (\<Squnion> (snd ` M)) g - h)
[PROOF STEP]
by(rule SM1.current_minus)(auto intro!: add_increasing2 SUP_upper2 hM)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g'

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have "wave (\<Gamma> \<ominus> Sup (fst ` M)) (plus_current (Sup (snd ` M)) g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
using current wave g g_w
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
current (\<Gamma> \<ominus> f) g
wave (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (\<Squnion> (snd ` M))
current (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)) g
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> \<Squnion> (snd ` M)) g

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
by(rule SM1.wave_plus_current_minus)
[PROOF STATE]
proof (state)
this:
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
[PROOF STEP]
have g'_w: "wave ?\<Gamma> g'"
[PROOF STATE]
proof (prove)
using this:
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g'
[PROOF STEP]
unfolding * ** g'_alt
[PROOF STATE]
proof (prove)
using this:
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) (plus_current (\<Squnion> (snd ` M)) g - h)
[PROOF STEP]
using hM2[OF hM]
[PROOF STATE]
proof (prove)
using this:
wave (\<Gamma> \<ominus> \<Squnion> (fst ` M)) (plus_current (\<Squnion> (snd ` M)) g)
current (\<Gamma> \<ominus> \<Squnion> (fst ` M)) h

goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) (plus_current (\<Squnion> (snd ` M)) g - h)
[PROOF STEP]
by(rule SM1.wave_minus)(auto intro!: add_increasing2 SUP_upper2 hM)
[PROOF STATE]
proof (state)
this:
wave (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g'

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
have "hindrance_by ?\<Gamma> g' q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hindrance_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g' q
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. ?a \<in> A (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k)
 2. ?a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
 3. d_OUT g' ?a < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) ?a
 4. q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) ?a - d_OUT g' ?a
[PROOF STEP]
show "z \<in> A ?\<Gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> A (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k)
[PROOF STEP]
using z
[PROOF STATE]
proof (prove)
using this:
z \<in> A \<Gamma>

goal (1 subgoal):
 1. z \<in> A (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z \<in> A (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k)

goal (3 subgoals):
 1. z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
 2. d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z
 3. q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
show "z \<notin> \<E>\<^bsub>?\<Gamma>\<^esub> (TER\<^bsub>?\<Gamma>\<^esub> g')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
assume "z \<in> \<E>\<^bsub>?\<Gamma>\<^esub> (TER\<^bsub>?\<Gamma>\<^esub> g')"
[PROOF STATE]
proof (state)
this:
z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
hence OUT_z: "d_OUT g' z = 0"
            and ess: "essential ?\<Gamma> (B \<Gamma>) (TER\<^bsub>?\<Gamma>\<^esub> g') z"
[PROOF STATE]
proof (prove)
using this:
z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (1 subgoal):
 1. d_OUT g' z = 0 &&& essential (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') z
[PROOF STEP]
by(simp_all add: SINK.simps)
[PROOF STATE]
proof (state)
this:
d_OUT g' z = 0
essential (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') z

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
from ess
[PROOF STATE]
proof (chain)
picking this:
essential (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') z
[PROOF STEP]
obtain p y where p: "path \<Gamma> z p y" and y: "y \<in> B \<Gamma>"
            and bypass: "\<And>z. z \<in> set p \<Longrightarrow> z \<notin> RF (TER\<^bsub>?\<Gamma>\<^esub> g')"
[PROOF STATE]
proof (prove)
using this:
essential (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') z

goal (1 subgoal):
 1. (\<And>p y. \<lbrakk>path \<Gamma> z p y; y \<in> B \<Gamma>; \<And>z. z \<in> set p \<Longrightarrow> z \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(rule essentialE_RF) auto
[PROOF STATE]
proof (state)
this:
path \<Gamma> z p y
y \<in> B \<Gamma>
?z \<in> set p \<Longrightarrow> ?z \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
from y
[PROOF STATE]
proof (chain)
picking this:
y \<in> B \<Gamma>
[PROOF STEP]
have y': "y \<notin> A \<Gamma>"
[PROOF STATE]
proof (prove)
using this:
y \<in> B \<Gamma>

goal (1 subgoal):
 1. y \<notin> A \<Gamma>
[PROOF STEP]
using disjoint
[PROOF STATE]
proof (prove)
using this:
y \<in> B \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. y \<notin> A \<Gamma>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<notin> A \<Gamma>

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
from p z y
[PROOF STATE]
proof (chain)
picking this:
path \<Gamma> z p y
z \<in> A \<Gamma>
y \<in> B \<Gamma>
[PROOF STEP]
obtain py: "p = [y]" and edge: "edge \<Gamma> z y"
[PROOF STATE]
proof (prove)
using this:
path \<Gamma> z p y
z \<in> A \<Gamma>
y \<in> B \<Gamma>

goal (1 subgoal):
 1. (\<lbrakk>p = [y]; edge \<Gamma> z y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using disjoint
[PROOF STATE]
proof (prove)
using this:
path \<Gamma> z p y
z \<in> A \<Gamma>
y \<in> B \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. (\<lbrakk>p = [y]; edge \<Gamma> z y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(cases)(auto 4 3 elim: rtrancl_path.cases dest: bipartite_E)
[PROOF STATE]
proof (state)
this:
p = [y]
edge \<Gamma> z y

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
hence yRF: "y \<notin> RF (TER\<^bsub>?\<Gamma>\<^esub> g')"
[PROOF STATE]
proof (prove)
using this:
p = [y]
edge \<Gamma> z y

goal (1 subgoal):
 1. y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
[PROOF STEP]
using bypass[of y]
[PROOF STATE]
proof (prove)
using this:
p = [y]
edge \<Gamma> z y
y \<in> set p \<Longrightarrow> y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (1 subgoal):
 1. y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
with wave_not_RF_IN_zero[OF g' g'_w, of y]
[PROOF STATE]
proof (chain)
picking this:
y \<notin> RF\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> d_IN g' y = 0
y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
[PROOF STEP]
have IN_g'_y: "d_IN g' y = 0"
[PROOF STATE]
proof (prove)
using this:
y \<notin> RF\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> d_IN g' y = 0
y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (1 subgoal):
 1. d_IN g' y = 0
[PROOF STEP]
by(auto intro: roofed_greaterI)
[PROOF STATE]
proof (state)
this:
d_IN g' y = 0

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
with yRF y y'
[PROOF STATE]
proof (chain)
picking this:
y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
y \<in> B \<Gamma>
y \<notin> A \<Gamma>
d_IN g' y = 0
[PROOF STEP]
have w_y: "weight ?\<Gamma> y > 0"
[PROOF STATE]
proof (prove)
using this:
y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
y \<in> B \<Gamma>
y \<notin> A \<Gamma>
d_IN g' y = 0

goal (1 subgoal):
 1. 0 < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) y
[PROOF STEP]
using currentD_OUT[OF g', of y]
[PROOF STATE]
proof (prove)
using this:
y \<notin> RF (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')
y \<in> B \<Gamma>
y \<notin> A \<Gamma>
d_IN g' y = 0
y \<in> B (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) \<Longrightarrow> d_OUT g' y = 0

goal (1 subgoal):
 1. 0 < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) y
[PROOF STEP]
by(auto simp add: RF_in_B currentD_SAT[OF g'] SINK.simps zero_less_iff_neq_zero)
[PROOF STATE]
proof (state)
this:
0 < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) y

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
have "y \<notin> SAT (\<Gamma> \<ominus> f) g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<notin> SAT (\<Gamma> \<ominus> f) g
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y \<in> SAT (\<Gamma> \<ominus> f) g \<Longrightarrow> False
[PROOF STEP]
assume "y \<in> SAT (\<Gamma> \<ominus> f) g"
[PROOF STATE]
proof (state)
this:
y \<in> SAT (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. y \<in> SAT (\<Gamma> \<ominus> f) g \<Longrightarrow> False
[PROOF STEP]
with y disjoint
[PROOF STATE]
proof (chain)
picking this:
y \<in> B \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}
y \<in> SAT (\<Gamma> \<ominus> f) g
[PROOF STEP]
have IN_g_y: "d_IN g y = weight (\<Gamma> \<ominus> f) y"
[PROOF STATE]
proof (prove)
using this:
y \<in> B \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}
y \<in> SAT (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. d_IN g y = weight (\<Gamma> \<ominus> f) y
[PROOF STEP]
by(auto simp add: currentD_SAT[OF g])
[PROOF STATE]
proof (state)
this:
d_IN g y = weight (\<Gamma> \<ominus> f) y

goal (1 subgoal):
 1. y \<in> SAT (\<Gamma> \<ominus> f) g \<Longrightarrow> False
[PROOF STEP]
have "0 < weight \<Gamma> y - d_IN (\<Squnion>x\<in>M. fst x) y - d_IN h y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y
[PROOF STEP]
using y' w_y
[PROOF STATE]
proof (prove)
using this:
y \<notin> A \<Gamma>
0 < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) y

goal (1 subgoal):
 1. 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y
[PROOF STEP]
unfolding **
[PROOF STATE]
proof (prove)
using this:
y \<notin> A \<Gamma>
0 < weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) y

goal (1 subgoal):
 1. 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y

goal (1 subgoal):
 1. y \<in> SAT (\<Gamma> \<ominus> f) g \<Longrightarrow> False
[PROOF STEP]
have "d_IN g' y > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < d_IN g' y
[PROOF STEP]
using y' w_y hM
[PROOF STATE]
proof (prove)
using this:
y \<notin> A \<Gamma>
0 < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) y
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. 0 < d_IN g' y
[PROOF STEP]
unfolding **
[PROOF STATE]
proof (prove)
using this:
y \<notin> A \<Gamma>
0 < weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) y
(\<epsilon>, h) \<in> M

goal (1 subgoal):
 1. 0 < d_IN g' y
[PROOF STEP]
apply(simp add: IN_g' IN_f IN_g_y diff_add_eq_diff_diff_swap_ennreal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>y \<notin> A \<Gamma>; 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN (\<Squnion> (snd ` M)) y + (d_IN (\<Squnion> (snd ` M)) y - d_IN h y)
[PROOF STEP]
apply(subst add_diff_eq_ennreal)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>y \<notin> A \<Gamma>; 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> d_IN h y \<le> d_IN (\<Squnion> (snd ` M)) y
 2. \<lbrakk>y \<notin> A \<Gamma>; 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN h y; (\<epsilon>, h) \<in> M\<rbrakk> \<Longrightarrow> 0 < weight \<Gamma> y - d_IN (\<Squnion> (fst ` M)) y - d_IN (\<Squnion> (snd ` M)) y + d_IN (\<Squnion> (snd ` M)) y - d_IN h y
[PROOF STEP]
apply(auto intro!: SUP_upper2 d_IN_mono simp: diff_add_self_ennreal diff_gt_0_iff_gt_ennreal)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
0 < d_IN g' y

goal (1 subgoal):
 1. y \<in> SAT (\<Gamma> \<ominus> f) g \<Longrightarrow> False
[PROOF STEP]
with IN_g'_y
[PROOF STATE]
proof (chain)
picking this:
d_IN g' y = 0
0 < d_IN g' y
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
d_IN g' y = 0
0 < d_IN g' y

goal (1 subgoal):
 1. False
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
y \<notin> SAT (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<notin> SAT (\<Gamma> \<ominus> f) g
[PROOF STEP]
have "y \<notin> TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g"
[PROOF STATE]
proof (prove)
using this:
y \<notin> SAT (\<Gamma> \<ominus> f) g

goal (1 subgoal):
 1. y \<notin> TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y \<notin> TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
with p y py
[PROOF STATE]
proof (chain)
picking this:
path \<Gamma> z p y
y \<in> B \<Gamma>
p = [y]
y \<notin> TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g
[PROOF STEP]
have "essential \<Gamma> (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g) z"
[PROOF STATE]
proof (prove)
using this:
path \<Gamma> z p y
y \<in> B \<Gamma>
p = [y]
y \<notin> TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g

goal (1 subgoal):
 1. essential \<Gamma> (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g) z
[PROOF STEP]
by(auto intro: essentialI)
[PROOF STATE]
proof (state)
this:
essential \<Gamma> (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g) z

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
essential \<Gamma> (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g) z

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
with z waveD_separating[OF g_w, THEN separating_RF_A]
[PROOF STATE]
proof (chain)
picking this:
z \<in> A \<Gamma>
A (\<Gamma> \<ominus> f) \<subseteq> RF\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
essential \<Gamma> (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g) z
[PROOF STEP]
have "z \<in> \<E>\<^bsub>?\<Omega>\<^esub> (TER\<^bsub>?\<Omega>\<^esub> g)"
[PROOF STATE]
proof (prove)
using this:
z \<in> A \<Gamma>
A (\<Gamma> \<ominus> f) \<subseteq> RF\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
essential \<Gamma> (B \<Gamma>) (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g) z

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
[PROOF STEP]
by(auto simp add: RF_in_essential)
[PROOF STATE]
proof (state)
this:
z \<in> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)

goal (1 subgoal):
 1. z \<in> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g') \<Longrightarrow> False
[PROOF STEP]
with z\<E>
[PROOF STATE]
proof (chain)
picking this:
z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
z \<in> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)
z \<in> \<E>\<^bsub>\<Gamma> \<ominus> f\<^esub> (TER\<^bsub>\<Gamma> \<ominus> f\<^esub> g)

goal (1 subgoal):
 1. False
[PROOF STEP]
by contradiction
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
z \<notin> \<E>\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k\<^esub> g')

goal (2 subgoals):
 1. d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z
 2. q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
have "\<delta> \<le> weight ?\<Gamma> z - d_OUT g' z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<delta> \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
unfolding ** OUT_g'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<delta> \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) z - (d_OUT g z + (d_OUT (\<Squnion> (snd ` M)) z - d_OUT h z))
[PROOF STEP]
using z
[PROOF STATE]
proof (prove)
using this:
z \<in> A \<Gamma>

goal (1 subgoal):
 1. \<delta> \<le> weight (\<Gamma> \<ominus> \<Squnion> (fst ` M) \<ominus> h) z - (d_OUT g z + (d_OUT (\<Squnion> (snd ` M)) z - d_OUT h z))
[PROOF STEP]
apply (simp add: \<delta>_def OUT_f diff_add_eq_diff_diff_swap_ennreal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> A \<Gamma> \<Longrightarrow> weight \<Gamma> z - d_OUT (\<Squnion> (fst ` M)) z - d_OUT (\<Squnion> (snd ` M)) z - d_OUT g z \<le> weight \<Gamma> z - d_OUT (\<Squnion> (fst ` M)) z - d_OUT h z - d_OUT g z - (d_OUT (\<Squnion> (snd ` M)) z - d_OUT h z)
[PROOF STEP]
apply (subst (5) diff_diff_commute_ennreal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> A \<Gamma> \<Longrightarrow> weight \<Gamma> z - d_OUT (\<Squnion> (fst ` M)) z - d_OUT (\<Squnion> (snd ` M)) z - d_OUT g z \<le> weight \<Gamma> z - d_OUT (\<Squnion> (fst ` M)) z - d_OUT h z - (d_OUT (\<Squnion> (snd ` M)) z - d_OUT h z) - d_OUT g z
[PROOF STEP]
apply (rule ennreal_minus_mono[OF _ order_refl])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> A \<Gamma> \<Longrightarrow> weight \<Gamma> z - d_OUT (\<Squnion> (fst ` M)) z - d_OUT (\<Squnion> (snd ` M)) z \<le> weight \<Gamma> z - d_OUT (\<Squnion> (fst ` M)) z - d_OUT h z - (d_OUT (\<Squnion> (snd ` M)) z - d_OUT h z)
[PROOF STEP]
apply (auto simp add: ac_simps diff_add_eq_diff_diff_swap_ennreal[symmetric] add_diff_self_ennreal image_comp
                      intro!: ennreal_minus_mono[OF order_refl] SUP_upper2[OF hM] d_OUT_mono)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<delta> \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z

goal (2 subgoals):
 1. d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z
 2. q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<delta> \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
show q_z: "q < weight ?\<Gamma> z - d_OUT g' z"
[PROOF STATE]
proof (prove)
using this:
\<delta> \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z

goal (1 subgoal):
 1. q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
using q_less_\<delta>
[PROOF STATE]
proof (prove)
using this:
\<delta> \<le> weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
q < \<delta>

goal (1 subgoal):
 1. q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z

goal (1 subgoal):
 1. d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
[PROOF STEP]
show "d_OUT g' z < weight ?\<Gamma> z"
[PROOF STATE]
proof (prove)
using this:
q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z

goal (1 subgoal):
 1. d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z
[PROOF STEP]
using q_nonneg z
[PROOF STATE]
proof (prove)
using this:
q < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z - d_OUT g' z
0 \<le> q
z \<in> A \<Gamma>

goal (1 subgoal):
 1. d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z
[PROOF STEP]
by(auto simp add: less_diff_eq_ennreal less_top[symmetric] ac_simps \<Gamma>.currentD_finite_OUT[OF g']
                  intro: le_less_trans[rotated] add_increasing)
[PROOF STATE]
proof (state)
this:
d_OUT g' z < weight (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
hindrance_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g' q

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hindrance_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g' q
[PROOF STEP]
have hindered_by: "hindered_by (\<Gamma> \<ominus> ?\<epsilon>h \<ominus> k) q"
[PROOF STATE]
proof (prove)
using this:
hindrance_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g' q

goal (1 subgoal):
 1. hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) q
[PROOF STEP]
using g' g'_w
[PROOF STATE]
proof (prove)
using this:
hindrance_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g' q
current (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g'
wave (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) g'

goal (1 subgoal):
 1. hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) q
[PROOF STEP]
by(rule hindered_by.intros)
[PROOF STATE]
proof (state)
this:
hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) q

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) q
[PROOF STEP]
have "hindered (\<Gamma> \<ominus> ?\<epsilon>h)"
[PROOF STATE]
proof (prove)
using this:
hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) q

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)
[PROOF STEP]
using q_finite
[PROOF STATE]
proof (prove)
using this:
hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) q
q \<noteq> \<top>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)
[PROOF STEP]
unfolding q_def
[PROOF STATE]
proof (prove)
using this:
hindered_by (\<Gamma> \<ominus> plus_current \<epsilon> h \<ominus> k) (\<Sum>\<^sup>+ y\<in>B (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y)
(\<Sum>\<^sup>+ y\<in>B (\<Gamma> \<ominus> plus_current \<epsilon> h). d_IN k y - d_OUT k y) \<noteq> \<top>

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)
[PROOF STEP]
by -(rule \<epsilon>h.hindered_reduce_current[OF k])
[PROOF STATE]
proof (state)
this:
hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> f) \<Longrightarrow> False
[PROOF STEP]
with unhindered_h
[PROOF STATE]
proof (chain)
picking this:
\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))
hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))
hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)

goal (1 subgoal):
 1. False
[PROOF STEP]
unfolding F_simps
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)
hindered (\<Gamma> \<ominus> plus_current \<epsilon> h)

goal (1 subgoal):
 1. False
[PROOF STEP]
by contradiction
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> hindered (\<Gamma> \<ominus> f)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?M \<in> Chains leq; ?M \<noteq> {}\<rbrakk> \<Longrightarrow> \<Squnion> ?M \<in> Field leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
define sat where "sat =
    (\<lambda>(\<epsilon>, h).
      let
        f = F (\<epsilon>, h);
        k = SOME k. current (\<Gamma> \<ominus> f) k \<and> wave (\<Gamma> \<ominus> f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> f) k' \<and> wave (\<Gamma> \<ominus> f) k' \<and> k \<le> k' \<longrightarrow> k = k')
      in
        if d_OUT (plus_current f k) a < weight \<Gamma> a then
          let
            \<Omega> = \<Gamma> \<ominus> f \<ominus> k;
            y = SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> weight \<Omega> y > 0;
            \<delta> = SOME \<delta>. \<delta> > 0 \<and> \<delta> < enn2real (min (weight \<Omega> a) (weight \<Omega> y)) \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)
          in
            (plus_current \<epsilon> (zero_current((a, y) := \<delta>)), plus_current h k)
        else (\<epsilon>, h))"
[PROOF STATE]
proof (state)
this:
sat = (\<lambda>(\<epsilon>, h). let f = F (\<epsilon>, h); k = SOME k. current (\<Gamma> \<ominus> f) k \<and> wave (\<Gamma> \<ominus> f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> f) k' \<and> wave (\<Gamma> \<ominus> f) k' \<and> k \<le> k' \<longrightarrow> k = k') in if d_OUT (plus_current f k) a < weight \<Gamma> a then let \<Omega> = \<Gamma> \<ominus> f \<ominus> k; y = SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y; x = SOME \<delta>. 0 < \<delta> \<and> \<delta> < enn2real (min (weight \<Omega> a) (weight \<Omega> y)) \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>) in (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal x)), plus_current h k) else (\<epsilon>, h))

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have zero: "(zero_current, zero_current) \<in> Field leq"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>_. 0, \<lambda>_. 0) \<in> Field leq
[PROOF STEP]
by(rule F_I)(simp_all add: unhindered  F_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>_. 0, \<lambda>_. 0) \<in> Field leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have a_TER: "a \<in> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k"
    if that: "\<epsilon>h \<in> Field leq"
    and k: "current (\<Gamma> \<ominus> F \<epsilon>h) k" and k_w: "wave (\<Gamma> \<ominus> F \<epsilon>h) k"
    and less: "d_OUT (plus_current (F \<epsilon>h) k) a < weight \<Gamma> a" for \<epsilon>h k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k

goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
hence \<E>: "a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k)"
[PROOF STATE]
proof (prove)
using this:
a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k

goal (1 subgoal):
 1. a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k)

goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
\<epsilon>h \<in> Field leq
[PROOF STEP]
have f: "current \<Gamma> (F \<epsilon>h)" and unhindered: "\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)"
[PROOF STATE]
proof (prove)
using this:
\<epsilon>h \<in> Field leq

goal (1 subgoal):
 1. current \<Gamma> (F \<epsilon>h) &&& \<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
by(cases \<epsilon>h; simp add: f unhindered'; fail)+
[PROOF STATE]
proof (state)
this:
current \<Gamma> (F \<epsilon>h)
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)

goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
from less
[PROOF STATE]
proof (chain)
picking this:
d_OUT (plus_current (F \<epsilon>h) k) a < weight \<Gamma> a
[PROOF STEP]
have "d_OUT k a < weight (\<Gamma> \<ominus> F \<epsilon>h) a"
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F \<epsilon>h) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. d_OUT k a < weight (\<Gamma> \<ominus> F \<epsilon>h) a
[PROOF STEP]
using a currentD_finite_OUT[OF f, of a]
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F \<epsilon>h) k) a < weight \<Gamma> a
a \<in> A \<Gamma>
d_OUT (F \<epsilon>h) a \<noteq> \<top>

goal (1 subgoal):
 1. d_OUT k a < weight (\<Gamma> \<ominus> F \<epsilon>h) a
[PROOF STEP]
by(simp add: d_OUT_def nn_integral_add less_diff_eq_ennreal add.commute less_top[symmetric])
[PROOF STATE]
proof (state)
this:
d_OUT k a < weight (\<Gamma> \<ominus> F \<epsilon>h) a

goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
with _ \<E>
[PROOF STATE]
proof (chain)
picking this:
PROP ?psi \<Longrightarrow> PROP ?psi
a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k)
d_OUT k a < weight (\<Gamma> \<ominus> F \<epsilon>h) a
[PROOF STEP]
have "hindrance (\<Gamma> \<ominus> F \<epsilon>h) k"
[PROOF STATE]
proof (prove)
using this:
PROP ?psi \<Longrightarrow> PROP ?psi
a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k)
d_OUT k a < weight (\<Gamma> \<ominus> F \<epsilon>h) a

goal (1 subgoal):
 1. hindrance (\<Gamma> \<ominus> F \<epsilon>h) k
[PROOF STEP]
by(rule hindrance)(simp add: a)
[PROOF STATE]
proof (state)
this:
hindrance (\<Gamma> \<ominus> F \<epsilon>h) k

goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hindrance (\<Gamma> \<ominus> F \<epsilon>h) k
[PROOF STEP]
have "hindered (\<Gamma> \<ominus> F \<epsilon>h)"
[PROOF STATE]
proof (prove)
using this:
hindrance (\<Gamma> \<ominus> F \<epsilon>h) k

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
using k k_w
[PROOF STATE]
proof (prove)
using this:
hindrance (\<Gamma> \<ominus> F \<epsilon>h) k
current (\<Gamma> \<ominus> F \<epsilon>h) k
wave (\<Gamma> \<ominus> F \<epsilon>h) k

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
hindered (\<Gamma> \<ominus> F \<epsilon>h)

goal (1 subgoal):
 1. a \<notin> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k \<Longrightarrow> False
[PROOF STEP]
with unhindered
[PROOF STATE]
proof (chain)
picking this:
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)
hindered (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)
hindered (\<Gamma> \<ominus> F \<epsilon>h)

goal (1 subgoal):
 1. False
[PROOF STEP]
by contradiction
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?\<epsilon>h \<in> Field leq; current (\<Gamma> \<ominus> F ?\<epsilon>h) ?k; wave (\<Gamma> \<ominus> F ?\<epsilon>h) ?k; d_OUT (plus_current (F ?\<epsilon>h) ?k) a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> a \<in> TER\<^bsub>\<Gamma> \<ominus> F ?\<epsilon>h\<^esub> ?k

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
note minus_web_sel(2)[simp del]
[PROOF STATE]
proof (state)
this:
weight (?\<Gamma> \<ominus> ?f) ?x = (if ?x \<in> A ?\<Gamma> then weight ?\<Gamma> ?x - d_OUT ?f ?x else weight ?\<Gamma> ?x + d_OUT ?f ?x - d_IN ?f ?x)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
let ?P_y = "\<lambda>\<epsilon>h k y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y > 0"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have Ex_y: "Ex (?P_y \<epsilon>h k)"
    if that: "\<epsilon>h \<in> Field leq"
    and k: "current (\<Gamma> \<ominus> F \<epsilon>h) k" and k_w: "wave (\<Gamma> \<ominus> F \<epsilon>h) k"
    and less: "d_OUT (plus_current (F \<epsilon>h) k) a < weight \<Gamma> a" for \<epsilon>h k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
let ?\<Omega> = "\<Gamma> \<ominus> F \<epsilon>h \<ominus> k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
assume *: "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y

goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
interpret \<Gamma>: countable_bipartite_web "\<Gamma> \<ominus> F \<epsilon>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
using f[OF that]
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (F \<epsilon>h)

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F \<epsilon>h)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
note [simp] = weight_minus_web[OF f[OF that]] \<Gamma>.weight_minus_web[OF k]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> F \<epsilon>h) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT (F \<epsilon>h) ?x else weight \<Gamma> ?x - d_IN (F \<epsilon>h) ?x)
weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) ?x = (if ?x \<in> A (\<Gamma> \<ominus> F \<epsilon>h) then weight (\<Gamma> \<ominus> F \<epsilon>h) ?x - d_OUT k ?x else weight (\<Gamma> \<ominus> F \<epsilon>h) ?x - d_IN k ?x)

goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
have "hindrance ?\<Omega> zero_current"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hindrance (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) (\<lambda>_. 0)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?a \<in> A (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
 2. ?a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
 3. d_OUT (\<lambda>_. 0) ?a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) ?a
[PROOF STEP]
show "a \<in> A ?\<Omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> A (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>

goal (1 subgoal):
 1. a \<in> A (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a \<in> A (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)

goal (2 subgoals):
 1. a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
 2. d_OUT (\<lambda>_. 0) a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a
[PROOF STEP]
show "a \<notin> \<E>\<^bsub>?\<Omega>\<^esub> (TER\<^bsub>?\<Omega>\<^esub> zero_current)" (is "a \<notin> \<E>\<^bsub>_\<^esub> ?TER")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0)) \<Longrightarrow> False
[PROOF STEP]
assume "a \<in> \<E>\<^bsub>?\<Omega>\<^esub> ?TER"
[PROOF STATE]
proof (state)
this:
a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0)) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
[PROOF STEP]
obtain p y where p: "path ?\<Omega> a p y" and y: "y \<in> B ?\<Omega>"
          and bypass: "\<And>z. z \<in> set p \<Longrightarrow> z \<notin> RF\<^bsub>?\<Omega>\<^esub> ?TER"
[PROOF STATE]
proof (prove)
using this:
a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. (\<And>p y. \<lbrakk>path (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a p y; y \<in> B (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k); \<And>z. z \<in> set p \<Longrightarrow> z \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(rule \<E>_E_RF)(auto)
[PROOF STATE]
proof (state)
this:
path (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a p y
y \<in> B (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
?z \<in> set p \<Longrightarrow> ?z \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0)) \<Longrightarrow> False
[PROOF STEP]
from a p y disjoint
[PROOF STATE]
proof (chain)
picking this:
a \<in> A \<Gamma>
path (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a p y
y \<in> B (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
A \<Gamma> \<inter> B \<Gamma> = {}
[PROOF STEP]
have Nil: "p \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
path (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a p y
y \<in> B (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. p \<noteq> []
[PROOF STEP]
by(auto simp add: rtrancl_path_simps)
[PROOF STATE]
proof (state)
this:
p \<noteq> []

goal (1 subgoal):
 1. a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0)) \<Longrightarrow> False
[PROOF STEP]
hence "edge ?\<Omega> a (p ! 0)" "p ! 0 \<notin> RF\<^bsub>?\<Omega>\<^esub> ?TER"
[PROOF STATE]
proof (prove)
using this:
p \<noteq> []

goal (1 subgoal):
 1. edge (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a (p ! 0) &&& p ! 0 \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
[PROOF STEP]
using rtrancl_path_nth[OF p, of 0] bypass
[PROOF STATE]
proof (prove)
using this:
p \<noteq> []
0 < length p \<Longrightarrow> edge (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) ((a # p) ! 0) (p ! 0)
?z \<in> set p \<Longrightarrow> ?z \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. edge (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a (p ! 0) &&& p ! 0 \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
edge (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a (p ! 0)
p ! 0 \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. a \<in> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0)) \<Longrightarrow> False
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
\<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y
edge (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a (p ! 0)
p ! 0 \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y
edge (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a (p ! 0)
p ! 0 \<notin> RF\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. False
[PROOF STEP]
by(auto simp add: not_less outgoing_def intro: roofed_greaterI)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a \<notin> \<E>\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> (\<lambda>_. 0))

goal (1 subgoal):
 1. d_OUT (\<lambda>_. 0) a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a
[PROOF STEP]
have "d_OUT (plus_current (F \<epsilon>h) k) x = d_OUT (F \<epsilon>h) x + d_OUT k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (plus_current (F \<epsilon>h) k) x = d_OUT (F \<epsilon>h) x + d_OUT k x
[PROOF STEP]
by(simp add: d_OUT_def nn_integral_add)
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F \<epsilon>h) k) ?x = d_OUT (F \<epsilon>h) ?x + d_OUT k ?x

goal (1 subgoal):
 1. d_OUT (\<lambda>_. 0) a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d_OUT (plus_current (F \<epsilon>h) k) ?x = d_OUT (F \<epsilon>h) ?x + d_OUT k ?x
[PROOF STEP]
show "d_OUT zero_current a < weight ?\<Omega> a"
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F \<epsilon>h) k) ?x = d_OUT (F \<epsilon>h) ?x + d_OUT k ?x

goal (1 subgoal):
 1. d_OUT (\<lambda>_. 0) a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a
[PROOF STEP]
using less a_TER[OF that k k_w less] a
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F \<epsilon>h) k) ?x = d_OUT (F \<epsilon>h) ?x + d_OUT k ?x
d_OUT (plus_current (F \<epsilon>h) k) a < weight \<Gamma> a
a \<in> TER\<^bsub>\<Gamma> \<ominus> F \<epsilon>h\<^esub> k
a \<in> A \<Gamma>

goal (1 subgoal):
 1. d_OUT (\<lambda>_. 0) a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a
[PROOF STEP]
by(simp add: SINK.simps diff_gr0_ennreal)
[PROOF STATE]
proof (state)
this:
d_OUT (\<lambda>_. 0) a < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
hindrance (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) (\<lambda>_. 0)

goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
hence "hindered ?\<Omega>"
[PROOF STATE]
proof (prove)
using this:
hindrance (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) (\<lambda>_. 0)

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
[PROOF STEP]
by(auto intro!: hindered.intros order_trans[OF currentD_weight_OUT[OF k]] order_trans[OF currentD_weight_IN[OF k]])
[PROOF STATE]
proof (state)
this:
hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)

goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)

goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
have "\<not> hindered ?\<Omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
[PROOF STEP]
using unhindered'[OF that] k k_w
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h)
current (\<Gamma> \<ominus> F \<epsilon>h) k
wave (\<Gamma> \<ominus> F \<epsilon>h) k

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
[PROOF STEP]
by(rule \<Gamma>.unhindered_minus_web)
[PROOF STATE]
proof (state)
this:
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)

goal (1 subgoal):
 1. \<nexists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F \<epsilon>h \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k) y \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)
\<not> hindered (\<Gamma> \<ominus> F \<epsilon>h \<ominus> k)

goal (1 subgoal):
 1. False
[PROOF STEP]
by contradiction
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?\<epsilon>h \<in> Field leq; current (\<Gamma> \<ominus> F ?\<epsilon>h) ?k; wave (\<Gamma> \<ominus> F ?\<epsilon>h) ?k; d_OUT (plus_current (F ?\<epsilon>h) ?k) a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F ?\<epsilon>h \<ominus> ?k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F ?\<epsilon>h \<ominus> ?k) y

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have increasing: "\<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq" if "\<epsilon>h \<in> Field leq" for \<epsilon>h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
proof(cases \<epsilon>h)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
case (Pair \<epsilon> h)
[PROOF STATE]
proof (state)
this:
\<epsilon>h = (\<epsilon>, h)

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
\<epsilon>h \<in> Field leq
\<epsilon>h = (\<epsilon>, h)
[PROOF STEP]
have that: "(\<epsilon>, h) \<in> Field leq"
[PROOF STATE]
proof (prove)
using this:
\<epsilon>h \<in> Field leq
\<epsilon>h = (\<epsilon>, h)

goal (1 subgoal):
 1. (\<epsilon>, h) \<in> Field leq
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have f: "current \<Gamma> (F (\<epsilon>, h))" and unhindered: "\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))"
      and \<epsilon>: "current \<Gamma> \<epsilon>"
      and h: "current (\<Gamma> \<ominus> \<epsilon>) h" and h_w: "wave (\<Gamma> \<ominus> \<epsilon>) h" and OUT_\<epsilon>: "x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (current \<Gamma> (F (\<epsilon>, h)) &&& \<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h)) &&& current \<Gamma> \<epsilon>) &&& current (\<Gamma> \<ominus> \<epsilon>) h &&& wave (\<Gamma> \<ominus> \<epsilon>) h &&& (x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq

goal (1 subgoal):
 1. (current \<Gamma> (F (\<epsilon>, h)) &&& \<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h)) &&& current \<Gamma> \<epsilon>) &&& current (\<Gamma> \<ominus> \<epsilon>) h &&& wave (\<Gamma> \<ominus> \<epsilon>) h &&& (x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> x = 0)
[PROOF STEP]
by(rule f unhindered' \<epsilon>_curr OUT_\<epsilon> h h_w)+
[PROOF STATE]
proof (state)
this:
current \<Gamma> (F (\<epsilon>, h))
\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))
current \<Gamma> \<epsilon>
current (\<Gamma> \<ominus> \<epsilon>) h
wave (\<Gamma> \<ominus> \<epsilon>) h
?x \<noteq> a \<Longrightarrow> d_OUT \<epsilon> ?x = 0

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
interpret \<Gamma>: countable_bipartite_web "\<Gamma> \<ominus> F (\<epsilon>, h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F (\<epsilon>, h))
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (F (\<epsilon>, h))

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F (\<epsilon>, h))
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
note [simp] = weight_minus_web[OF f]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> F (\<epsilon>, h)) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT (F (\<epsilon>, h)) ?x else weight \<Gamma> ?x - d_IN (F (\<epsilon>, h)) ?x)

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?P_k = "\<lambda>k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
define k where "k = Eps ?P_k"
[PROOF STATE]
proof (state)
this:
k = (SOME k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k'))

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have "Ex ?P_k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')
[PROOF STEP]
by(intro ex_maximal_wave)(simp_all)
[PROOF STATE]
proof (state)
this:
\<exists>k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence "?P_k k"
[PROOF STATE]
proof (prove)
using this:
\<exists>k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')
[PROOF STEP]
unfolding k_def
[PROOF STATE]
proof (prove)
using this:
\<exists>k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> F (\<epsilon>, h)) (SOME k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')) \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) (SOME k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')) \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> (SOME k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')) \<le> k' \<longrightarrow> (SOME k. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')) = k')
[PROOF STEP]
by(rule someI_ex)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence k: "current (\<Gamma> \<ominus> F (\<epsilon>, h)) k" and k_w: "wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k"
      and maximal: "\<And>k'. \<lbrakk> current (\<Gamma> \<ominus> F (\<epsilon>, h)) k'; wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k'; k \<le> k' \<rbrakk> \<Longrightarrow> k = k'"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> F (\<epsilon>, h)) k &&& wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k &&& (\<And>k'. \<lbrakk>current (\<Gamma> \<ominus> F (\<epsilon>, h)) k'; wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k'; k \<le> k'\<rbrakk> \<Longrightarrow> k = k')
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k
wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k
\<lbrakk>current (\<Gamma> \<ominus> F (\<epsilon>, h)) ?k'; wave (\<Gamma> \<ominus> F (\<epsilon>, h)) ?k'; k \<le> ?k'\<rbrakk> \<Longrightarrow> k = ?k'

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
note [simp] = \<Gamma>.weight_minus_web[OF k]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k) ?x = (if ?x \<in> A (\<Gamma> \<ominus> F (\<epsilon>, h)) then weight (\<Gamma> \<ominus> F (\<epsilon>, h)) ?x - d_OUT k ?x else weight (\<Gamma> \<ominus> F (\<epsilon>, h)) ?x - d_IN k ?x)

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?fk = "plus_current (F (\<epsilon>, h)) k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have IN_fk: "d_IN ?fk x = d_IN (F (\<epsilon>, h)) x + d_IN k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (plus_current (F (\<epsilon>, h)) k) x = d_IN (F (\<epsilon>, h)) x + d_IN k x
[PROOF STEP]
by(simp add: d_IN_def nn_integral_add)
[PROOF STATE]
proof (state)
this:
d_IN (plus_current (F (\<epsilon>, h)) k) ?x = d_IN (F (\<epsilon>, h)) ?x + d_IN k ?x

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have OUT_fk: "d_OUT ?fk x = d_OUT (F (\<epsilon>, h)) x + d_OUT k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) x = d_OUT (F (\<epsilon>, h)) x + d_OUT k x
[PROOF STEP]
by(simp add: d_OUT_def nn_integral_add)
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F (\<epsilon>, h)) k) ?x = d_OUT (F (\<epsilon>, h)) ?x + d_OUT k ?x

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have fk: "current \<Gamma> ?fk"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (plus_current (F (\<epsilon>, h)) k)
[PROOF STEP]
using f k
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (F (\<epsilon>, h))
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k

goal (1 subgoal):
 1. current \<Gamma> (plus_current (F (\<epsilon>, h)) k)
[PROOF STEP]
by(rule current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current (F (\<epsilon>, h)) k)

goal (1 subgoal):
 1. \<And>a b. \<epsilon>h = (a, b) \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
proof(cases "d_OUT ?fk a < weight \<Gamma> a")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
case less: True
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
define \<Omega> where "\<Omega> = \<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k"
[PROOF STATE]
proof (state)
this:
\<Omega> = \<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have B_\<Omega> [simp]: "B \<Omega> = B \<Gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<Omega> = B \<Gamma>
[PROOF STEP]
by(simp add: \<Omega>_def)
[PROOF STATE]
proof (state)
this:
B \<Omega> = B \<Gamma>

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have loose: "loose \<Omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. loose \<Omega>
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. loose (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k)
[PROOF STEP]
using unhindered k k_w maximal
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> F (\<epsilon>, h))
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k
wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k
\<lbrakk>current (\<Gamma> \<ominus> F (\<epsilon>, h)) ?k'; wave (\<Gamma> \<ominus> F (\<epsilon>, h)) ?k'; k \<le> ?k'\<rbrakk> \<Longrightarrow> k = ?k'

goal (1 subgoal):
 1. loose (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k)
[PROOF STEP]
by(rule \<Gamma>.loose_minus_web)
[PROOF STATE]
proof (state)
this:
loose \<Omega>

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
interpret \<Omega>: countable_bipartite_web \<Omega>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web \<Omega>
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k

goal (1 subgoal):
 1. countable_bipartite_web \<Omega>
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k)
[PROOF STEP]
by(rule \<Gamma>.countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have a_\<E>: "a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
[PROOF STEP]
using that k k_w less
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k
wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k
d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
[PROOF STEP]
by(rule a_TER)
[PROOF STATE]
proof (state)
this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
[PROOF STEP]
have weight_\<Omega>_a: "weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a"
[PROOF STATE]
proof (prove)
using this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k

goal (1 subgoal):
 1. weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a
[PROOF STEP]
using a disjoint
[PROOF STATE]
proof (prove)
using this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
a \<in> A \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a
[PROOF STEP]
by(auto simp add: roofed_circ_def \<Omega>_def SINK.simps)
[PROOF STATE]
proof (state)
this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a
[PROOF STEP]
have weight_a: "0 < weight \<Omega> a"
[PROOF STATE]
proof (prove)
using this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a

goal (1 subgoal):
 1. 0 < weight \<Omega> a
[PROOF STEP]
using less a_\<E>
[PROOF STATE]
proof (prove)
using this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a
d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k

goal (1 subgoal):
 1. 0 < weight \<Omega> a
[PROOF STEP]
by(simp add: OUT_fk SINK.simps diff_gr0_ennreal)
[PROOF STATE]
proof (state)
this:
0 < weight \<Omega> a

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?P_y = "\<lambda>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> weight \<Omega> y > 0"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
define y where "y = Eps ?P_y"
[PROOF STATE]
proof (state)
this:
y = (SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have "Ex ?P_y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y
[PROOF STEP]
using that k k_w less
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k
wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k
d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
using this:
(\<epsilon>, h) \<in> Field leq
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k
wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k
d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k) y
[PROOF STEP]
by(rule Ex_y)
[PROOF STATE]
proof (state)
this:
\<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence "?P_y y"
[PROOF STATE]
proof (prove)
using this:
\<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y
[PROOF STEP]
unfolding y_def
[PROOF STATE]
proof (prove)
using this:
\<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. (SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y) \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> (SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y)
[PROOF STEP]
by(rule someI_ex)
[PROOF STATE]
proof (state)
this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence y_OUT: "y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a" and weight_y: "weight \<Omega> y > 0"
[PROOF STATE]
proof (prove)
using this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a &&& 0 < weight \<Omega> y
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a
0 < weight \<Omega> y

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
from y_OUT
[PROOF STATE]
proof (chain)
picking this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a
[PROOF STEP]
have y_B: "y \<in> B \<Omega>"
[PROOF STATE]
proof (prove)
using this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a

goal (1 subgoal):
 1. y \<in> B \<Omega>
[PROOF STEP]
by(auto simp add: outgoing_def \<Omega>_def dest: bipartite_E)
[PROOF STATE]
proof (state)
this:
y \<in> B \<Omega>

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
with weight_y
[PROOF STATE]
proof (chain)
picking this:
0 < weight \<Omega> y
y \<in> B \<Omega>
[PROOF STEP]
have yRF: "y \<notin> RF\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k)"
[PROOF STATE]
proof (prove)
using this:
0 < weight \<Omega> y
y \<in> B \<Omega>

goal (1 subgoal):
 1. y \<notin> RF\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k)
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
using this:
0 < weight (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k) y
y \<in> B (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k)

goal (1 subgoal):
 1. y \<notin> RF\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k)
[PROOF STEP]
using currentD_OUT[OF k, of y] disjoint
[PROOF STATE]
proof (prove)
using this:
0 < weight (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k) y
y \<in> B (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k)
y \<in> B (\<Gamma> \<ominus> F (\<epsilon>, h)) \<Longrightarrow> d_OUT k y = 0
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. y \<notin> RF\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k)
[PROOF STEP]
by(auto split: if_split_asm simp add: SINK.simps currentD_SAT[OF k] roofed_circ_def RF_in_B \<Gamma>.currentD_finite_IN[OF k])
[PROOF STATE]
proof (state)
this:
y \<notin> RF\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence IN_k_y: "d_IN k y = 0"
[PROOF STATE]
proof (prove)
using this:
y \<notin> RF\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> (TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k)

goal (1 subgoal):
 1. d_IN k y = 0
[PROOF STEP]
by(rule wave_not_RF_IN_zero[OF k k_w])
[PROOF STATE]
proof (state)
this:
d_IN k y = 0

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
define bound where "bound = enn2real (min (weight \<Omega> a) (weight \<Omega> y))"
[PROOF STATE]
proof (state)
this:
bound = enn2real (min (weight \<Omega> a) (weight \<Omega> y))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have bound_pos: "bound > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < bound
[PROOF STEP]
using weight_y weight_a
[PROOF STATE]
proof (prove)
using this:
0 < weight \<Omega> y
0 < weight \<Omega> a

goal (1 subgoal):
 1. 0 < bound
[PROOF STEP]
using \<Omega>.weight_finite
[PROOF STATE]
proof (prove)
using this:
0 < weight \<Omega> y
0 < weight \<Omega> a
weight \<Omega> ?x \<noteq> \<top>

goal (1 subgoal):
 1. 0 < bound
[PROOF STEP]
by(cases "weight \<Omega> a" "weight \<Omega> y" rule: ennreal2_cases)
          (simp_all add: bound_def min_def split: if_split_asm)
[PROOF STATE]
proof (state)
this:
0 < bound

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?P_\<delta> = "\<lambda>\<delta>. \<delta> > 0 \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
define \<delta> where "\<delta> = Eps ?P_\<delta>"
[PROOF STATE]
proof (state)
this:
\<delta> = (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?\<Omega> = "reduce_weight \<Omega> y \<delta>"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
from \<Omega>.unhinder[OF loose _ weight_y bound_pos] y_B disjoint
[PROOF STATE]
proof (chain)
picking this:
y \<in> B \<Omega> \<Longrightarrow> \<exists>\<epsilon>>0. \<epsilon> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<epsilon>)
y \<in> B \<Omega>
A \<Gamma> \<inter> B \<Gamma> = {}
[PROOF STEP]
have "Ex ?P_\<delta>"
[PROOF STATE]
proof (prove)
using this:
y \<in> B \<Omega> \<Longrightarrow> \<exists>\<epsilon>>0. \<epsilon> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<epsilon>)
y \<in> B \<Omega>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. \<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
by(auto simp add: \<Omega>_def)
[PROOF STATE]
proof (state)
this:
\<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence "?P_\<delta> \<delta>"
[PROOF STATE]
proof (prove)
using this:
\<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
unfolding \<delta>_def
[PROOF STATE]
proof (prove)
using this:
\<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. 0 < (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)) \<and> (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)) < bound \<and> \<not> hindered (reduce_weight \<Omega> y (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)))
[PROOF STEP]
by(rule someI_ex)
[PROOF STATE]
proof (state)
this:
0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence \<delta>_pos: "0 < \<delta>" and \<delta>_le_bound: "\<delta> < bound" and unhindered': "\<not> hindered ?\<Omega>"
[PROOF STATE]
proof (prove)
using this:
0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. 0 < \<delta> &&& \<delta> < bound &&& \<not> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
0 < \<delta>
\<delta> < bound
\<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
from \<delta>_pos
[PROOF STATE]
proof (chain)
picking this:
0 < \<delta>
[PROOF STEP]
have \<delta>_nonneg: "0 \<le> \<delta>"
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>

goal (1 subgoal):
 1. 0 \<le> \<delta>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> \<delta>

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
from \<delta>_le_bound \<delta>_pos
[PROOF STATE]
proof (chain)
picking this:
\<delta> < bound
0 < \<delta>
[PROOF STEP]
have \<delta>_le_a: "\<delta> < weight \<Omega> a" and \<delta>_le_y: "\<delta> < weight \<Omega> y"
[PROOF STATE]
proof (prove)
using this:
\<delta> < bound
0 < \<delta>

goal (1 subgoal):
 1. ennreal \<delta> < weight \<Omega> a &&& ennreal \<delta> < weight \<Omega> y
[PROOF STEP]
by(cases "weight \<Omega> a" "weight \<Omega> y" rule: ennreal2_cases;
           simp add: bound_def min_def ennreal_less_iff split: if_split_asm)+
[PROOF STATE]
proof (state)
this:
ennreal \<delta> < weight \<Omega> a
ennreal \<delta> < weight \<Omega> y

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?\<Gamma> = "\<Gamma> \<ominus> ?fk"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
interpret \<Gamma>': countable_bipartite_web ?\<Gamma>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web fk)+
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
note [simp] = weight_minus_web[OF fk]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT (plus_current (F (\<epsilon>, h)) k) ?x else weight \<Gamma> ?x - d_IN (plus_current (F (\<epsilon>, h)) k) ?x)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?g = "zero_current((a, y) := \<delta>)"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have OUT_g: "d_OUT ?g x = (if x = a then \<delta> else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = ennreal (if x = a then \<delta> else 0)
[PROOF STEP]
proof(rule trans)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = ?s
 2. ?s = ennreal (if x = a then \<delta> else 0)
[PROOF STEP]
show "d_OUT ?g x = (\<Sum>\<^sup>+ z. (if x = a then \<delta> else 0) * indicator {y} z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = (\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa))
[PROOF STEP]
unfolding d_OUT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ ya. ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) (x, ya)) = (\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa))
[PROOF STEP]
by(rule nn_integral_cong) simp
[PROOF STATE]
proof (state)
this:
d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = (\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa))

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa)) = ennreal (if x = a then \<delta> else 0)
[PROOF STEP]
show "\<dots> = (if x = a then \<delta> else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa)) = ennreal (if x = a then \<delta> else 0)
[PROOF STEP]
using \<delta>_pos
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa)) = ennreal (if x = a then \<delta> else 0)
[PROOF STEP]
by(simp add: max_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ xa. ennreal ((if x = a then \<delta> else 0) * indicat_real {y} xa)) = ennreal (if x = a then \<delta> else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) ?x = ennreal (if ?x = a then \<delta> else 0)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have IN_g: "d_IN ?g x = (if x = y then \<delta> else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = ennreal (if x = y then \<delta> else 0)
[PROOF STEP]
proof(rule trans)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = ?s
 2. ?s = ennreal (if x = y then \<delta> else 0)
[PROOF STEP]
show "d_IN ?g x = (\<Sum>\<^sup>+ z. (if x = y then \<delta> else 0) * indicator {a} z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = (\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa))
[PROOF STEP]
unfolding d_IN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) (xa, x)) = (\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa))
[PROOF STEP]
by(rule nn_integral_cong) simp
[PROOF STATE]
proof (state)
this:
d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x = (\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa))

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa)) = ennreal (if x = y then \<delta> else 0)
[PROOF STEP]
show "\<dots> = (if x = y then \<delta> else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa)) = ennreal (if x = y then \<delta> else 0)
[PROOF STEP]
using \<delta>_pos
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa)) = ennreal (if x = y then \<delta> else 0)
[PROOF STEP]
by(simp add: max_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ xa. ennreal ((if x = y then \<delta> else 0) * indicat_real {a} xa)) = ennreal (if x = y then \<delta> else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) ?x = ennreal (if ?x = y then \<delta> else 0)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have g: "current ?\<Gamma> ?g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 2. \<And>x. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 3. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k\<^esub> \<Longrightarrow> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e = 0
[PROOF STEP]
show "d_OUT ?g x \<le> weight ?\<Gamma> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
proof(cases "x = a")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 2. x \<noteq> a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> a

goal (2 subgoals):
 1. x = a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 2. x \<noteq> a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<noteq> a

goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
using currentD_weight_OUT[OF fk, of x] currentD_weight_IN[OF fk, of x]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> a
d_OUT (plus_current (F (\<epsilon>, h)) k) x \<le> weight \<Gamma> x
d_IN (plus_current (F (\<epsilon>, h)) k) x \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
by(auto simp add: OUT_g zero_ennreal_def[symmetric])
[PROOF STATE]
proof (state)
this:
d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x

goal (1 subgoal):
 1. x = a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = a

goal (1 subgoal):
 1. x = a \<Longrightarrow> d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = a

goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
using \<delta>_le_a a a_\<E> \<delta>_pos
[PROOF STATE]
proof (prove)
using this:
x = a
ennreal \<delta> < weight \<Omega> a
a \<in> A \<Gamma>
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
0 < \<delta>

goal (1 subgoal):
 1. d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
unfolding OUT_g
[PROOF STATE]
proof (prove)
using this:
x = a
ennreal \<delta> < weight \<Omega> a
a \<in> A \<Gamma>
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
0 < \<delta>

goal (1 subgoal):
 1. ennreal (if x = a then \<delta> else 0) \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
by(simp add: OUT_g \<Omega>_def SINK.simps OUT_fk split: if_split_asm)
[PROOF STATE]
proof (state)
this:
d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
d_OUT ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) ?x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ?x

goal (2 subgoals):
 1. \<And>x. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 2. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k\<^esub> \<Longrightarrow> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e = 0
[PROOF STEP]
show "d_IN ?g x \<le> weight ?\<Gamma> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
proof(cases "x = y")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 2. x \<noteq> y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> y

goal (2 subgoals):
 1. x = y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
 2. x \<noteq> y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<noteq> y

goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
using currentD_weight_OUT[OF fk, of x] currentD_weight_IN[OF fk, of x]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> y
d_OUT (plus_current (F (\<epsilon>, h)) k) x \<le> weight \<Gamma> x
d_IN (plus_current (F (\<epsilon>, h)) k) x \<le> weight \<Gamma> x

goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
by(auto simp add: IN_g zero_ennreal_def[symmetric])
[PROOF STATE]
proof (state)
this:
d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x

goal (1 subgoal):
 1. x = y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = y

goal (1 subgoal):
 1. x = y \<Longrightarrow> d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = y

goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
using \<delta>_le_y y_B a_\<E> \<delta>_pos currentD_OUT[OF k, of y] IN_k_y
[PROOF STATE]
proof (prove)
using this:
x = y
ennreal \<delta> < weight \<Omega> y
y \<in> B \<Omega>
a \<in> TER\<^bsub>\<Gamma> \<ominus> F (\<epsilon>, h)\<^esub> k
0 < \<delta>
y \<in> B (\<Gamma> \<ominus> F (\<epsilon>, h)) \<Longrightarrow> d_OUT k y = 0
d_IN k y = 0

goal (1 subgoal):
 1. d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x
[PROOF STEP]
by(simp add: OUT_g \<Omega>_def SINK.simps OUT_fk IN_fk IN_g split: if_split_asm)
[PROOF STATE]
proof (state)
this:
d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
d_IN ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) ?x \<le> weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ?x

goal (1 subgoal):
 1. \<And>e. e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k\<^esub> \<Longrightarrow> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e = 0
[PROOF STEP]
show "?g e = 0" if "e \<notin> \<^bold>E\<^bsub>?\<Gamma>\<^esub>" for e
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e = 0
[PROOF STEP]
using y_OUT that
[PROOF STATE]
proof (prove)
using this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a
e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k\<^esub>

goal (1 subgoal):
 1. ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e = 0
[PROOF STEP]
by(auto simp add: \<Omega>_def outgoing_def)
[PROOF STATE]
proof (state)
this:
?e \<notin> \<^bold>E\<^bsub>\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k\<^esub> \<Longrightarrow> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) ?e = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
interpret \<Gamma>'': web "\<Gamma> \<ominus> ?fk \<ominus> ?g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. web (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
using g
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. web (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
by(rule \<Gamma>'.web_minus_web)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?\<epsilon>' = "plus_current \<epsilon> (zero_current((a, y) := \<delta>))"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
let ?h' = "plus_current h k"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have F': "F (?\<epsilon>', ?h') = plus_current (plus_current (F (\<epsilon>, h)) k) (zero_current((a, y) := \<delta>))" (is "_ = ?f'")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k) = plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
by(auto simp add: F_simps fun_eq_iff add_ac)
[PROOF STATE]
proof (state)
this:
F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k) = plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have sat: "sat (\<epsilon>, h) = (?\<epsilon>', ?h')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat (\<epsilon>, h) = (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
[PROOF STEP]
using less
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. sat (\<epsilon>, h) = (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
[PROOF STEP]
by(simp add: sat_def k_def \<Omega>_def Let_def y_def bound_def \<delta>_def)
[PROOF STATE]
proof (state)
this:
sat (\<epsilon>, h) = (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have le: "(\<epsilon>, h) \<le> (?\<epsilon>', ?h')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<epsilon>, h) \<le> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
[PROOF STEP]
using \<delta>_pos
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>

goal (1 subgoal):
 1. (\<epsilon>, h) \<le> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
[PROOF STEP]
by(auto simp add: le_fun_def add_increasing2 add_increasing)
[PROOF STATE]
proof (state)
this:
(\<epsilon>, h) \<le> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have "current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
using g
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
by(rule current_weight_mono)(auto simp add: weight_minus_web[OF \<epsilon>] intro!: ennreal_minus_mono d_OUT_mono d_IN_mono, simp_all add: F_def add_increasing2)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
with \<epsilon>
[PROOF STATE]
proof (chain)
picking this:
current \<Gamma> \<epsilon>
current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
have \<epsilon>': "current \<Gamma> ?\<epsilon>'"
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> \<epsilon>
current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
by(rule current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have eq_0: "d_OUT ?\<epsilon>' x = 0" if "x \<noteq> a" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) x = 0
[PROOF STEP]
unfolding plus_current_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<lambda>e. \<epsilon> e + ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e) x = 0
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<noteq> a

goal (1 subgoal):
 1. d_OUT (\<lambda>e. \<epsilon> e + ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) e) x = 0
[PROOF STEP]
by(subst d_OUT_add)(simp_all add: \<delta>_nonneg d_OUT_fun_upd OUT_\<epsilon>)
[PROOF STATE]
proof (state)
this:
?x \<noteq> a \<Longrightarrow> d_OUT (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) ?x = 0

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?x \<noteq> a \<Longrightarrow> d_OUT (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) ?x = 0

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
from \<epsilon>'
[PROOF STATE]
proof (chain)
picking this:
current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
interpret \<epsilon>': countable_bipartite_web "\<Gamma> \<ominus> ?\<epsilon>'"
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
from \<epsilon>
[PROOF STATE]
proof (chain)
picking this:
current \<Gamma> \<epsilon>
[PROOF STEP]
interpret \<epsilon>: countable_bipartite_web "\<Gamma> \<ominus> \<epsilon>"
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> \<epsilon>

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> \<epsilon>)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have g': "current (\<Gamma> \<ominus> \<epsilon>) ?g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
using g
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
apply(rule current_weight_mono)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. edge (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) = edge (\<Gamma> \<ominus> \<epsilon>)
 2. A (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) = A (\<Gamma> \<ominus> \<epsilon>)
 3. B (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) = B (\<Gamma> \<ominus> \<epsilon>)
 4. \<And>x. weight (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) x \<le> weight (\<Gamma> \<ominus> \<epsilon>) x
[PROOF STEP]
apply(auto simp add: weight_minus_web[OF \<epsilon>] intro!: ennreal_minus_mono d_OUT_mono d_IN_mono)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. x \<in> A \<Gamma> \<Longrightarrow> \<epsilon> (x, y) \<le> F (\<epsilon>, h) (x, y) + k (x, y)
 2. \<And>x xa. x \<notin> A \<Gamma> \<Longrightarrow> \<epsilon> (xa, x) \<le> F (\<epsilon>, h) (xa, x) + k (xa, x)
[PROOF STEP]
apply(simp_all add: F_def add_increasing2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have k': "current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k
[PROOF STEP]
unfolding F_simps minus_plus_current[OF \<epsilon> h]
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
current (\<Gamma> \<ominus> \<epsilon>) h
current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k
[PROOF STEP]
have "current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) h
current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)
[PROOF STEP]
by(rule \<epsilon>.current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
hence "current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ?g)"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
using g
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)
current (\<Gamma> \<ominus> plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
unfolding minus_plus_current[OF f k]
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)
current (\<Gamma> \<ominus> F (\<epsilon>, h) \<ominus> k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
unfolding F_simps minus_plus_current[OF \<epsilon> h] \<epsilon>.minus_plus_current[OF h k', symmetric]
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current h k)
current (\<Gamma> \<ominus> \<epsilon> \<ominus> plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
by(rule \<epsilon>.current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
[PROOF STEP]
have "current (\<Gamma> \<ominus> \<epsilon> \<ominus> ?g) (plus_current (plus_current h k) ?g - ?g)"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon> \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>)) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) - (\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
using g'
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon>) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
current (\<Gamma> \<ominus> \<epsilon>) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> \<epsilon> \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>)) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) - (\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
by(rule \<epsilon>.current_minus)(auto simp add: add_increasing)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> \<epsilon> \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>)) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) - (\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
current (\<Gamma> \<ominus> \<epsilon> \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>)) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) - (\<lambda>_. 0)((a, y) := ennreal \<delta>))
[PROOF STEP]
have h'': "current (\<Gamma> \<ominus> ?\<epsilon>') ?h'"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon> \<ominus> (\<lambda>_. 0)((a, y) := ennreal \<delta>)) (plus_current (plus_current h k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)) - (\<lambda>_. 0)((a, y) := ennreal \<delta>))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
by(rule arg_cong2[where f=current, THEN iffD1, rotated -1])
          (simp_all add: minus_plus_current[OF \<epsilon> g'] fun_eq_iff add_diff_eq_ennreal[symmetric])
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have "wave (\<Gamma> \<ominus> ?\<epsilon>') ?h'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wave (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k))
 2. current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
have "separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))
[PROOF STEP]
using k k_w
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F (\<epsilon>, h)) k
wave (\<Gamma> \<ominus> F (\<epsilon>, h)) k

goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))
[PROOF STEP]
unfolding F_simps minus_plus_current[OF \<epsilon> h]
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k
wave (\<Gamma> \<ominus> \<epsilon> \<ominus> h) k

goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))
[PROOF STEP]
by(intro waveD_separating \<epsilon>.wave_plus_current_minus[OF h h_w])
[PROOF STATE]
proof (state)
this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))

goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k))
 2. current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))

goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k))
 2. current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
have "TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k) \<subseteq> TER\<^bsub>\<Gamma> \<ominus> ?\<epsilon>'\<^esub> (plus_current h k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k) \<subseteq> TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k)
[PROOF STEP]
by(auto 4 4 simp add: SAT.simps weight_minus_web[OF \<epsilon>] weight_minus_web[OF \<epsilon>'] split: if_split_asm elim: order_trans[rotated] intro!: ennreal_minus_mono d_IN_mono add_increasing2 \<delta>_nonneg)
[PROOF STATE]
proof (state)
this:
TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k) \<subseteq> TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k)

goal (2 subgoals):
 1. separating (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k))
 2. current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))
TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k) \<subseteq> TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k)
[PROOF STEP]
show sep: "separating (\<Gamma> \<ominus> ?\<epsilon>') (TER\<^bsub>\<Gamma> \<ominus> ?\<epsilon>'\<^esub> ?h')"
[PROOF STATE]
proof (prove)
using this:
separating (\<Gamma> \<ominus> \<epsilon>) (TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k))
TER\<^bsub>\<Gamma> \<ominus> \<epsilon>\<^esub> (plus_current h k) \<subseteq> TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k)

goal (1 subgoal):
 1. separating (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k))
[PROOF STEP]
by(simp add: minus_plus_current[OF \<epsilon> g'] separating_weakening)
[PROOF STATE]
proof (state)
this:
separating (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (TER\<^bsub>\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))\<^esub> (plus_current h k))

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
[PROOF STEP]
qed(rule h'')
[PROOF STATE]
proof (state)
this:
wave (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
wave (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have "\<not> hindered (\<Gamma> \<ominus> F (?\<epsilon>', ?h'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
[PROOF STEP]
using unhindered'
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
[PROOF STEP]
proof(rule contrapos_nn)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
assume "hindered (\<Gamma> \<ominus> F (?\<epsilon>', ?h'))"
[PROOF STATE]
proof (state)
this:
hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))

goal (1 subgoal):
 1. hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
thus "hindered ?\<Omega>"
[PROOF STATE]
proof (prove)
using this:
hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))

goal (1 subgoal):
 1. hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
proof(rule hindered_mono_web[rotated -1])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. edge (reduce_weight \<Omega> y \<delta>) = edge (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 2. A (reduce_weight \<Omega> y \<delta>) = A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 3. B (reduce_weight \<Omega> y \<delta>) = B (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 4. \<And>x. x \<notin> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> weight (reduce_weight \<Omega> y \<delta>) x = weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) x
 5. \<And>aa. aa \<in> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) aa \<le> weight (reduce_weight \<Omega> y \<delta>) aa
[PROOF STEP]
show "weight ?\<Omega> z = weight (\<Gamma> \<ominus> F (?\<epsilon>', ?h')) z" if "z \<notin> A (\<Gamma> \<ominus> F (?\<epsilon>', ?h'))" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weight (reduce_weight \<Omega> y \<delta>) z = weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) z
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
z \<notin> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))

goal (1 subgoal):
 1. weight (reduce_weight \<Omega> y \<delta>) z = weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) z
[PROOF STEP]
unfolding F'
[PROOF STATE]
proof (prove)
using this:
z \<notin> A (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))

goal (1 subgoal):
 1. weight (reduce_weight \<Omega> y \<delta>) z = weight (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) z
[PROOF STEP]
apply(cases "z = y")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>z \<notin> A (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))); z = y\<rbrakk> \<Longrightarrow> weight (reduce_weight \<Omega> y \<delta>) z = weight (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) z
 2. \<lbrakk>z \<notin> A (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))); z \<noteq> y\<rbrakk> \<Longrightarrow> weight (reduce_weight \<Omega> y \<delta>) z = weight (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) z
[PROOF STEP]
apply(simp_all add: \<Omega>_def minus_plus_current[OF fk g] \<Gamma>'.weight_minus_web[OF g] IN_g)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>y \<notin> A \<Gamma>; z = y\<rbrakk> \<Longrightarrow> weight \<Gamma> y - d_IN (F (\<epsilon>, h)) y - d_IN k y - ennreal \<delta> = weight \<Gamma> y - d_IN (plus_current (F (\<epsilon>, h)) k) y - ennreal \<delta>
 2. \<lbrakk>z \<notin> A \<Gamma>; z \<noteq> y\<rbrakk> \<Longrightarrow> weight \<Gamma> z - d_IN (F (\<epsilon>, h)) z - d_IN k z = weight \<Gamma> z - d_IN (plus_current (F (\<epsilon>, h)) k) z
[PROOF STEP]
apply(simp_all add: plus_current_def d_IN_add diff_add_eq_diff_diff_swap_ennreal currentD_finite_IN[OF f])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
?z \<notin> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> weight (reduce_weight \<Omega> y \<delta>) ?z = weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) ?z

goal (4 subgoals):
 1. edge (reduce_weight \<Omega> y \<delta>) = edge (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 2. A (reduce_weight \<Omega> y \<delta>) = A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 3. B (reduce_weight \<Omega> y \<delta>) = B (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 4. \<And>aa. aa \<in> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) aa \<le> weight (reduce_weight \<Omega> y \<delta>) aa
[PROOF STEP]
have "y \<noteq> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<noteq> a
[PROOF STEP]
using y_B a disjoint
[PROOF STATE]
proof (prove)
using this:
y \<in> B \<Omega>
a \<in> A \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. y \<noteq> a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y \<noteq> a

goal (4 subgoals):
 1. edge (reduce_weight \<Omega> y \<delta>) = edge (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 2. A (reduce_weight \<Omega> y \<delta>) = A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 3. B (reduce_weight \<Omega> y \<delta>) = B (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 4. \<And>aa. aa \<in> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) aa \<le> weight (reduce_weight \<Omega> y \<delta>) aa
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<noteq> a
[PROOF STEP]
show "weight (\<Gamma> \<ominus> F (?\<epsilon>', ?h')) z \<le> weight ?\<Omega> z" if "z \<in> A (\<Gamma> \<ominus> F (?\<epsilon>', ?h'))" for z
[PROOF STATE]
proof (prove)
using this:
y \<noteq> a

goal (1 subgoal):
 1. weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) z \<le> weight (reduce_weight \<Omega> y \<delta>) z
[PROOF STEP]
using that y_B disjoint \<delta>_nonneg
[PROOF STATE]
proof (prove)
using this:
y \<noteq> a
z \<in> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
y \<in> B \<Omega>
A \<Gamma> \<inter> B \<Gamma> = {}
0 \<le> \<delta>

goal (1 subgoal):
 1. weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) z \<le> weight (reduce_weight \<Omega> y \<delta>) z
[PROOF STEP]
unfolding F'
[PROOF STATE]
proof (prove)
using this:
y \<noteq> a
z \<in> A (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
y \<in> B \<Omega>
A \<Gamma> \<inter> B \<Gamma> = {}
0 \<le> \<delta>

goal (1 subgoal):
 1. weight (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) z \<le> weight (reduce_weight \<Omega> y \<delta>) z
[PROOF STEP]
apply(cases "z = a")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>y \<noteq> a; z \<in> A (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))); y \<in> B \<Omega>; A \<Gamma> \<inter> B \<Gamma> = {}; 0 \<le> \<delta>; z = a\<rbrakk> \<Longrightarrow> weight (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) z \<le> weight (reduce_weight \<Omega> y \<delta>) z
 2. \<lbrakk>y \<noteq> a; z \<in> A (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))); y \<in> B \<Omega>; A \<Gamma> \<inter> B \<Gamma> = {}; 0 \<le> \<delta>; z \<noteq> a\<rbrakk> \<Longrightarrow> weight (\<Gamma> \<ominus> plus_current (plus_current (F (\<epsilon>, h)) k) ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) z \<le> weight (reduce_weight \<Omega> y \<delta>) z
[PROOF STEP]
apply(simp_all add: \<Omega>_def minus_plus_current[OF fk g] \<Gamma>'.weight_minus_web[OF g] OUT_g)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>y \<noteq> a; a \<in> A \<Gamma>; y \<in> B \<Gamma>; A \<Gamma> \<inter> B \<Gamma> = {}; 0 \<le> \<delta>; z = a\<rbrakk> \<Longrightarrow> weight \<Gamma> a - d_OUT (plus_current (F (\<epsilon>, h)) k) a - ennreal \<delta> \<le> weight \<Gamma> a - d_OUT (F (\<epsilon>, h)) a - d_OUT k a
 2. \<lbrakk>y \<noteq> a; z \<in> A \<Gamma>; y \<in> B \<Gamma>; A \<Gamma> \<inter> B \<Gamma> = {}; 0 \<le> \<delta>; z \<noteq> a\<rbrakk> \<Longrightarrow> (y = z \<longrightarrow> weight \<Gamma> z - d_OUT (plus_current (F (\<epsilon>, h)) k) z \<le> weight \<Gamma> z - d_OUT (F (\<epsilon>, h)) z - d_OUT k z - ennreal \<delta>) \<and> (y \<noteq> z \<longrightarrow> weight \<Gamma> z - d_OUT (plus_current (F (\<epsilon>, h)) k) z \<le> weight \<Gamma> z - d_OUT (F (\<epsilon>, h)) z - d_OUT k z)
[PROOF STEP]
apply(auto simp add: plus_current_def d_OUT_add diff_add_eq_diff_diff_swap_ennreal currentD_finite_OUT[OF f])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
?z \<in> A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) \<Longrightarrow> weight (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)) ?z \<le> weight (reduce_weight \<Omega> y \<delta>) ?z

goal (3 subgoals):
 1. edge (reduce_weight \<Omega> y \<delta>) = edge (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 2. A (reduce_weight \<Omega> y \<delta>) = A (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
 3. B (reduce_weight \<Omega> y \<delta>) = B (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
[PROOF STEP]
qed(simp_all add: \<Omega>_def)
[PROOF STATE]
proof (state)
this:
hindered (reduce_weight \<Omega> y \<delta>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
?x \<noteq> a \<Longrightarrow> d_OUT (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) ?x = 0
current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
wave (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
\<not> hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))
[PROOF STEP]
have "(?\<epsilon>', ?h') \<in> Field leq"
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)))
?x \<noteq> a \<Longrightarrow> d_OUT (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) ?x = 0
current (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
wave (\<Gamma> \<ominus> plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>))) (plus_current h k)
\<not> hindered (\<Gamma> \<ominus> F (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k))

goal (1 subgoal):
 1. (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k) \<in> Field leq
[PROOF STEP]
by-(rule F_I)
[PROOF STATE]
proof (state)
this:
(plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k) \<in> Field leq

goal (2 subgoals):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
 2. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
with Pair le sat that
[PROOF STATE]
proof (chain)
picking this:
\<epsilon>h = (\<epsilon>, h)
(\<epsilon>, h) \<le> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
sat (\<epsilon>, h) = (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
(\<epsilon>, h) \<in> Field leq
(plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k) \<in> Field leq
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<epsilon>h = (\<epsilon>, h)
(\<epsilon>, h) \<le> (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
sat (\<epsilon>, h) = (plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k)
(\<epsilon>, h) \<in> Field leq
(plus_current \<epsilon> ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current h k) \<in> Field leq

goal (1 subgoal):
 1. \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
\<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq

goal (1 subgoal):
 1. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
with currentD_weight_OUT[OF fk, of a]
[PROOF STATE]
proof (chain)
picking this:
d_OUT (plus_current (F (\<epsilon>, h)) k) a \<le> weight \<Gamma> a
\<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a
[PROOF STEP]
have "d_OUT ?fk a = weight \<Gamma> a"
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F (\<epsilon>, h)) k) a \<le> weight \<Gamma> a
\<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. d_OUT (plus_current (F (\<epsilon>, h)) k) a = weight \<Gamma> a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F (\<epsilon>, h)) k) a = weight \<Gamma> a

goal (1 subgoal):
 1. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
have "sat \<epsilon>h = \<epsilon>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat \<epsilon>h = \<epsilon>h
[PROOF STEP]
using False Pair
[PROOF STATE]
proof (prove)
using this:
\<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a
\<epsilon>h = (\<epsilon>, h)

goal (1 subgoal):
 1. sat \<epsilon>h = \<epsilon>h
[PROOF STEP]
by(simp add: sat_def k_def)
[PROOF STATE]
proof (state)
this:
sat \<epsilon>h = \<epsilon>h

goal (1 subgoal):
 1. \<not> d_OUT (plus_current (F (\<epsilon>, h)) k) a < weight \<Gamma> a \<Longrightarrow> \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
sat \<epsilon>h = \<epsilon>h

goal (1 subgoal):
 1. \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
using that Pair
[PROOF STATE]
proof (prove)
using this:
sat \<epsilon>h = \<epsilon>h
(\<epsilon>, h) \<in> Field leq
\<epsilon>h = (\<epsilon>, h)

goal (1 subgoal):
 1. \<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
\<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<epsilon>h \<le> sat \<epsilon>h \<and> sat \<epsilon>h \<in> Field leq

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?\<epsilon>h \<in> Field leq \<Longrightarrow> ?\<epsilon>h \<le> sat ?\<epsilon>h \<and> sat ?\<epsilon>h \<in> Field leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have "bourbaki_witt_fixpoint Sup leq sat"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bourbaki_witt_fixpoint Sup leq sat
[PROOF STEP]
using increasing chain_Field
[PROOF STATE]
proof (prove)
using this:
?\<epsilon>h \<in> Field leq \<Longrightarrow> ?\<epsilon>h \<le> sat ?\<epsilon>h \<and> sat ?\<epsilon>h \<in> Field leq
\<lbrakk>?M \<in> Chains leq; ?M \<noteq> {}\<rbrakk> \<Longrightarrow> \<Squnion> ?M \<in> Field leq

goal (1 subgoal):
 1. bourbaki_witt_fixpoint Sup leq sat
[PROOF STEP]
unfolding leq_def
[PROOF STATE]
proof (prove)
using this:
?\<epsilon>h \<in> Field (restrict_rel Fld {(x, y). x \<le> y}) \<Longrightarrow> ?\<epsilon>h \<le> sat ?\<epsilon>h \<and> sat ?\<epsilon>h \<in> Field (restrict_rel Fld {(x, y). x \<le> y})
\<lbrakk>?M \<in> Chains (restrict_rel Fld {(x, y). x \<le> y}); ?M \<noteq> {}\<rbrakk> \<Longrightarrow> \<Squnion> ?M \<in> Field (restrict_rel Fld {(x, y). x \<le> y})

goal (1 subgoal):
 1. bourbaki_witt_fixpoint Sup (restrict_rel Fld {(x, y). x \<le> y}) sat
[PROOF STEP]
by(intro bourbaki_witt_fixpoint_restrict_rel)(auto intro: Sup_upper Sup_least)
[PROOF STATE]
proof (state)
this:
bourbaki_witt_fixpoint Sup leq sat

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bourbaki_witt_fixpoint Sup leq sat
[PROOF STEP]
interpret bourbaki_witt_fixpoint Sup leq sat
[PROOF STATE]
proof (prove)
using this:
bourbaki_witt_fixpoint Sup leq sat

goal (1 subgoal):
 1. bourbaki_witt_fixpoint Sup leq sat
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
define f where "f = fixp_above (zero_current, zero_current)"
[PROOF STATE]
proof (state)
this:
f = fixp_above (\<lambda>_. 0, \<lambda>_. 0)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have Field: "f \<in> Field leq"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> Field leq
[PROOF STEP]
using fixp_above_Field[OF zero]
[PROOF STATE]
proof (prove)
using this:
fixp_above (\<lambda>_. 0, \<lambda>_. 0) \<in> Field leq

goal (1 subgoal):
 1. f \<in> Field leq
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
fixp_above (\<lambda>_. 0, \<lambda>_. 0) \<in> Field leq

goal (1 subgoal):
 1. fixp_above (\<lambda>_. 0, \<lambda>_. 0) \<in> Field leq
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
f \<in> Field leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> Field leq
[PROOF STEP]
have f: "current \<Gamma> (F f)" and unhindered: "\<not> hindered (\<Gamma> \<ominus> F f)"
[PROOF STATE]
proof (prove)
using this:
f \<in> Field leq

goal (1 subgoal):
 1. current \<Gamma> (F f) &&& \<not> hindered (\<Gamma> \<ominus> F f)
[PROOF STEP]
by(cases f; simp add: f unhindered'; fail)+
[PROOF STATE]
proof (state)
this:
current \<Gamma> (F f)
\<not> hindered (\<Gamma> \<ominus> F f)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
interpret \<Gamma>: countable_bipartite_web "\<Gamma> \<ominus> F f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F f)
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (F f)

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F f)
[PROOF STEP]
by(rule countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
note [simp] = weight_minus_web[OF f]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> F f) ?x = (if ?x \<in> A \<Gamma> then weight \<Gamma> ?x - d_OUT (F f) ?x else weight \<Gamma> ?x - d_IN (F f) ?x)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have Field': "(fst f, snd f) \<in> Field leq"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fst f, snd f) \<in> Field leq
[PROOF STEP]
using Field
[PROOF STATE]
proof (prove)
using this:
f \<in> Field leq

goal (1 subgoal):
 1. (fst f, snd f) \<in> Field leq
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(fst f, snd f) \<in> Field leq

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
let ?P_k = "\<lambda>k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
define k where "k = Eps ?P_k"
[PROOF STATE]
proof (state)
this:
k = (SOME k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k'))

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have "Ex ?P_k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')
[PROOF STEP]
by(intro ex_maximal_wave)(simp_all)
[PROOF STATE]
proof (state)
this:
\<exists>k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
hence "?P_k k"
[PROOF STATE]
proof (prove)
using this:
\<exists>k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')
[PROOF STEP]
unfolding k_def
[PROOF STATE]
proof (prove)
using this:
\<exists>k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> F f) (SOME k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')) \<and> wave (\<Gamma> \<ominus> F f) (SOME k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')) \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> (SOME k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')) \<le> k' \<longrightarrow> (SOME k. current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')) = k')
[PROOF STEP]
by(rule someI_ex)
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
hence k: "current (\<Gamma> \<ominus> F f) k" and k_w: "wave (\<Gamma> \<ominus> F f) k"
    and maximal: "\<And>k'. \<lbrakk> current (\<Gamma> \<ominus> F f) k'; wave (\<Gamma> \<ominus> F f) k'; k \<le> k' \<rbrakk> \<Longrightarrow> k = k'"
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F f) k \<and> wave (\<Gamma> \<ominus> F f) k \<and> (\<forall>k'. current (\<Gamma> \<ominus> F f) k' \<and> wave (\<Gamma> \<ominus> F f) k' \<and> k \<le> k' \<longrightarrow> k = k')

goal (1 subgoal):
 1. current (\<Gamma> \<ominus> F f) k &&& wave (\<Gamma> \<ominus> F f) k &&& (\<And>k'. \<lbrakk>current (\<Gamma> \<ominus> F f) k'; wave (\<Gamma> \<ominus> F f) k'; k \<le> k'\<rbrakk> \<Longrightarrow> k = k')
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
current (\<Gamma> \<ominus> F f) k
wave (\<Gamma> \<ominus> F f) k
\<lbrakk>current (\<Gamma> \<ominus> F f) ?k'; wave (\<Gamma> \<ominus> F f) ?k'; k \<le> ?k'\<rbrakk> \<Longrightarrow> k = ?k'

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
note [simp] = \<Gamma>.weight_minus_web[OF k]
[PROOF STATE]
proof (state)
this:
weight (\<Gamma> \<ominus> F f \<ominus> k) ?x = (if ?x \<in> A (\<Gamma> \<ominus> F f) then weight (\<Gamma> \<ominus> F f) ?x - d_OUT k ?x else weight (\<Gamma> \<ominus> F f) ?x - d_IN k ?x)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
let ?fk = "plus_current (F f) k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have IN_fk: "d_IN ?fk x = d_IN (F f) x + d_IN k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_IN (plus_current (F f) k) x = d_IN (F f) x + d_IN k x
[PROOF STEP]
by(simp add: d_IN_def nn_integral_add)
[PROOF STATE]
proof (state)
this:
d_IN (plus_current (F f) k) ?x = d_IN (F f) ?x + d_IN k ?x

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have OUT_fk: "d_OUT ?fk x = d_OUT (F f) x + d_OUT k x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (plus_current (F f) k) x = d_OUT (F f) x + d_OUT k x
[PROOF STEP]
by(simp add: d_OUT_def nn_integral_add)
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F f) k) ?x = d_OUT (F f) ?x + d_OUT k ?x

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have fk: "current \<Gamma> ?fk"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (plus_current (F f) k)
[PROOF STEP]
using f k
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (F f)
current (\<Gamma> \<ominus> F f) k

goal (1 subgoal):
 1. current \<Gamma> (plus_current (F f) k)
[PROOF STEP]
by(rule current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current (F f) k)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have "d_OUT ?fk a \<ge> weight \<Gamma> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
hence less: "d_OUT ?fk a < weight \<Gamma> a"
[PROOF STATE]
proof (prove)
using this:
\<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a

goal (1 subgoal):
 1. d_OUT (plus_current (F f) k) a < weight \<Gamma> a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F f) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
define \<Omega> where "\<Omega> = \<Gamma> \<ominus> F f \<ominus> k"
[PROOF STATE]
proof (state)
this:
\<Omega> = \<Gamma> \<ominus> F f \<ominus> k

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have B_\<Omega> [simp]: "B \<Omega> = B \<Gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<Omega> = B \<Gamma>
[PROOF STEP]
by(simp add: \<Omega>_def)
[PROOF STATE]
proof (state)
this:
B \<Omega> = B \<Gamma>

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have loose: "loose \<Omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. loose \<Omega>
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. loose (\<Gamma> \<ominus> F f \<ominus> k)
[PROOF STEP]
using unhindered k k_w maximal
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> F f)
current (\<Gamma> \<ominus> F f) k
wave (\<Gamma> \<ominus> F f) k
\<lbrakk>current (\<Gamma> \<ominus> F f) ?k'; wave (\<Gamma> \<ominus> F f) ?k'; k \<le> ?k'\<rbrakk> \<Longrightarrow> k = ?k'

goal (1 subgoal):
 1. loose (\<Gamma> \<ominus> F f \<ominus> k)
[PROOF STEP]
by(rule \<Gamma>.loose_minus_web)
[PROOF STATE]
proof (state)
this:
loose \<Omega>

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
interpret \<Omega>: countable_bipartite_web \<Omega>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable_bipartite_web \<Omega>
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F f) k

goal (1 subgoal):
 1. countable_bipartite_web \<Omega>
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
using this:
current (\<Gamma> \<ominus> F f) k

goal (1 subgoal):
 1. countable_bipartite_web (\<Gamma> \<ominus> F f \<ominus> k)
[PROOF STEP]
by(rule \<Gamma>.countable_bipartite_web_minus_web)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have a_\<E>: "a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k
[PROOF STEP]
using Field k k_w less
[PROOF STATE]
proof (prove)
using this:
f \<in> Field leq
current (\<Gamma> \<ominus> F f) k
wave (\<Gamma> \<ominus> F f) k
d_OUT (plus_current (F f) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k
[PROOF STEP]
by(rule a_TER)
[PROOF STATE]
proof (state)
this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k
[PROOF STEP]
have "weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a"
[PROOF STATE]
proof (prove)
using this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k

goal (1 subgoal):
 1. weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a
[PROOF STEP]
using a disjoint
[PROOF STATE]
proof (prove)
using this:
a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k
a \<in> A \<Gamma>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a
[PROOF STEP]
by(auto simp add: roofed_circ_def \<Omega>_def SINK.simps)
[PROOF STATE]
proof (state)
this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a
[PROOF STEP]
have weight_a: "0 < weight \<Omega> a"
[PROOF STATE]
proof (prove)
using this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a

goal (1 subgoal):
 1. 0 < weight \<Omega> a
[PROOF STEP]
using less a_\<E>
[PROOF STATE]
proof (prove)
using this:
weight \<Omega> a = weight \<Gamma> a - d_OUT (F f) a
d_OUT (plus_current (F f) k) a < weight \<Gamma> a
a \<in> TER\<^bsub>\<Gamma> \<ominus> F f\<^esub> k

goal (1 subgoal):
 1. 0 < weight \<Omega> a
[PROOF STEP]
by(simp add: OUT_fk SINK.simps diff_gr0_ennreal)
[PROOF STATE]
proof (state)
this:
0 < weight \<Omega> a

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
let ?P_y = "\<lambda>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> weight \<Omega> y > 0"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
define y where "y = Eps ?P_y"
[PROOF STATE]
proof (state)
this:
y = (SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y)

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have "Ex ?P_y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y
[PROOF STEP]
using Field k k_w less
[PROOF STATE]
proof (prove)
using this:
f \<in> Field leq
current (\<Gamma> \<ominus> F f) k
wave (\<Gamma> \<ominus> F f) k
d_OUT (plus_current (F f) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y
[PROOF STEP]
unfolding \<Omega>_def
[PROOF STATE]
proof (prove)
using this:
f \<in> Field leq
current (\<Gamma> \<ominus> F f) k
wave (\<Gamma> \<ominus> F f) k
d_OUT (plus_current (F f) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. \<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Gamma> \<ominus> F f \<ominus> k\<^esub> a \<and> 0 < weight (\<Gamma> \<ominus> F f \<ominus> k) y
[PROOF STEP]
by(rule Ex_y)
[PROOF STATE]
proof (state)
this:
\<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
hence "?P_y y"
[PROOF STATE]
proof (prove)
using this:
\<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y
[PROOF STEP]
unfolding y_def
[PROOF STATE]
proof (prove)
using this:
\<exists>y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. (SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y) \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> (SOME y. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y)
[PROOF STEP]
by(rule someI_ex)
[PROOF STATE]
proof (state)
this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
hence "y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a" and weight_y: "weight \<Omega> y > 0"
[PROOF STATE]
proof (prove)
using this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a \<and> 0 < weight \<Omega> y

goal (1 subgoal):
 1. y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a &&& 0 < weight \<Omega> y
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a
0 < weight \<Omega> y

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a
0 < weight \<Omega> y
[PROOF STEP]
have y_B: "y \<in> B \<Omega>"
[PROOF STATE]
proof (prove)
using this:
y \<in> \<^bold>O\<^bold>U\<^bold>T\<^bsub>\<Omega>\<^esub> a
0 < weight \<Omega> y

goal (1 subgoal):
 1. y \<in> B \<Omega>
[PROOF STEP]
by(auto simp add: outgoing_def \<Omega>_def dest: bipartite_E)
[PROOF STATE]
proof (state)
this:
y \<in> B \<Omega>

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
define bound where "bound = enn2real (min (weight \<Omega> a) (weight \<Omega> y))"
[PROOF STATE]
proof (state)
this:
bound = enn2real (min (weight \<Omega> a) (weight \<Omega> y))

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have bound_pos: "bound > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < bound
[PROOF STEP]
using weight_y weight_a \<Omega>.weight_finite
[PROOF STATE]
proof (prove)
using this:
0 < weight \<Omega> y
0 < weight \<Omega> a
weight \<Omega> ?x \<noteq> \<top>

goal (1 subgoal):
 1. 0 < bound
[PROOF STEP]
by(cases "weight \<Omega> a" "weight \<Omega> y" rule: ennreal2_cases)
        (simp_all add: bound_def min_def split: if_split_asm)
[PROOF STATE]
proof (state)
this:
0 < bound

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
let ?P_\<delta> = "\<lambda>\<delta>. \<delta> > 0 \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
define \<delta> where "\<delta> = Eps ?P_\<delta>"
[PROOF STATE]
proof (state)
this:
\<delta> = (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>))

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
from \<Omega>.unhinder[OF loose _ weight_y bound_pos] y_B disjoint
[PROOF STATE]
proof (chain)
picking this:
y \<in> B \<Omega> \<Longrightarrow> \<exists>\<epsilon>>0. \<epsilon> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<epsilon>)
y \<in> B \<Omega>
A \<Gamma> \<inter> B \<Gamma> = {}
[PROOF STEP]
have "Ex ?P_\<delta>"
[PROOF STATE]
proof (prove)
using this:
y \<in> B \<Omega> \<Longrightarrow> \<exists>\<epsilon>>0. \<epsilon> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<epsilon>)
y \<in> B \<Omega>
A \<Gamma> \<inter> B \<Gamma> = {}

goal (1 subgoal):
 1. \<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
by(auto simp add: \<Omega>_def)
[PROOF STATE]
proof (state)
this:
\<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
hence "?P_\<delta> \<delta>"
[PROOF STATE]
proof (prove)
using this:
\<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)
[PROOF STEP]
unfolding \<delta>_def
[PROOF STATE]
proof (prove)
using this:
\<exists>\<delta>>0. \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. 0 < (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)) \<and> (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)) < bound \<and> \<not> hindered (reduce_weight \<Omega> y (SOME \<delta>. 0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)))
[PROOF STEP]
by(rule someI_ex)
[PROOF STATE]
proof (state)
this:
0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
hence \<delta>_pos: "0 < \<delta>"
[PROOF STATE]
proof (prove)
using this:
0 < \<delta> \<and> \<delta> < bound \<and> \<not> hindered (reduce_weight \<Omega> y \<delta>)

goal (1 subgoal):
 1. 0 < \<delta>
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
0 < \<delta>

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
let ?f' = "(plus_current (fst f) (zero_current((a, y) := \<delta>)), plus_current (snd f) k)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have sat: "?f' = sat f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) = sat f
[PROOF STEP]
using less
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F f) k) a < weight \<Gamma> a

goal (1 subgoal):
 1. (plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) = sat f
[PROOF STEP]
by(simp add: sat_def k_def \<Omega>_def Let_def y_def bound_def \<delta>_def split_def)
[PROOF STATE]
proof (state)
this:
(plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) = sat f

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) = sat f

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
have "\<dots> = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat f = f
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sat (fixp_above (\<lambda>_. 0, \<lambda>_. 0)) = fixp_above (\<lambda>_. 0, \<lambda>_. 0)
[PROOF STEP]
using fixp_above_unfold[OF zero]
[PROOF STATE]
proof (prove)
using this:
fixp_above (\<lambda>_. 0, \<lambda>_. 0) = sat (fixp_above (\<lambda>_. 0, \<lambda>_. 0))

goal (1 subgoal):
 1. sat (fixp_above (\<lambda>_. 0, \<lambda>_. 0)) = fixp_above (\<lambda>_. 0, \<lambda>_. 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sat f = f

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) = f
[PROOF STEP]
have "fst ?f' (a, y) = fst f (a, y)"
[PROOF STATE]
proof (prove)
using this:
(plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) = f

goal (1 subgoal):
 1. fst (plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) (a, y) = fst f (a, y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fst (plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) (a, y) = fst f (a, y)

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
hence "\<delta> = 0"
[PROOF STATE]
proof (prove)
using this:
fst (plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) (a, y) = fst f (a, y)

goal (1 subgoal):
 1. \<delta> = 0
[PROOF STEP]
using currentD_finite[OF \<epsilon>_curr[OF Field']] \<delta>_pos
[PROOF STATE]
proof (prove)
using this:
fst (plus_current (fst f) ((\<lambda>_. 0)((a, y) := ennreal \<delta>)), plus_current (snd f) k) (a, y) = fst f (a, y)
fst f ?e \<noteq> \<top>
0 < \<delta>

goal (1 subgoal):
 1. \<delta> = 0
[PROOF STEP]
by(cases "fst f (a, y)") simp_all
[PROOF STATE]
proof (state)
this:
\<delta> = 0

goal (1 subgoal):
 1. \<not> weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a \<Longrightarrow> False
[PROOF STEP]
with \<delta>_pos
[PROOF STATE]
proof (chain)
picking this:
0 < \<delta>
\<delta> = 0
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
0 < \<delta>
\<delta> = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
with currentD_weight_OUT[OF fk, of a]
[PROOF STATE]
proof (chain)
picking this:
d_OUT (plus_current (F f) k) a \<le> weight \<Gamma> a
weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a
[PROOF STEP]
have "d_OUT ?fk a = weight \<Gamma> a"
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F f) k) a \<le> weight \<Gamma> a
weight \<Gamma> a \<le> d_OUT (plus_current (F f) k) a

goal (1 subgoal):
 1. d_OUT (plus_current (F f) k) a = weight \<Gamma> a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F f) k) a = weight \<Gamma> a

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
d_OUT (plus_current (F f) k) a = weight \<Gamma> a

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have "current \<Gamma> ?fk"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. current \<Gamma> (plus_current (F f) k)
[PROOF STEP]
using f k
[PROOF STATE]
proof (prove)
using this:
current \<Gamma> (F f)
current (\<Gamma> \<ominus> F f) k

goal (1 subgoal):
 1. current \<Gamma> (plus_current (F f) k)
[PROOF STEP]
by(rule current_plus_current_minus)
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current (F f) k)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
current \<Gamma> (plus_current (F f) k)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
have "\<not> hindered (\<Gamma> \<ominus> ?fk)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> plus_current (F f) k)
[PROOF STEP]
unfolding minus_plus_current[OF f k]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F f \<ominus> k)
[PROOF STEP]
using unhindered k k_w
[PROOF STATE]
proof (prove)
using this:
\<not> hindered (\<Gamma> \<ominus> F f)
current (\<Gamma> \<ominus> F f) k
wave (\<Gamma> \<ominus> F f) k

goal (1 subgoal):
 1. \<not> hindered (\<Gamma> \<ominus> F f \<ominus> k)
[PROOF STEP]
by(rule \<Gamma>.unhindered_minus_web)
[PROOF STATE]
proof (state)
this:
\<not> hindered (\<Gamma> \<ominus> plus_current (F f) k)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
d_OUT (plus_current (F f) k) a = weight \<Gamma> a
current \<Gamma> (plus_current (F f) k)
\<not> hindered (\<Gamma> \<ominus> plus_current (F f) k)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
d_OUT (plus_current (F f) k) a = weight \<Gamma> a
current \<Gamma> (plus_current (F f) k)
\<not> hindered (\<Gamma> \<ominus> plus_current (F f) k)

goal (1 subgoal):
 1. \<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>f. current \<Gamma> f \<and> d_OUT f a = weight \<Gamma> a \<and> \<not> hindered (\<Gamma> \<ominus> f)

goal:
No subgoals!
[PROOF STEP]
qed