[STATEMENT]
theorem hahn_decomposition:
  shows "\<exists> M1 M2. hahn_space_decomp M1 M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
proof (cases "\<forall>E \<in> sets M. \<mu> E < \<infinity>")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>E\<in>sets M. \<mu> E < \<infinity> \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
 2. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>E\<in>sets M. \<mu> E < \<infinity>

goal (2 subgoals):
 1. \<forall>E\<in>sets M. \<mu> E < \<infinity> \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
 2. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>E\<in>sets M. \<mu> E < \<infinity>

goal (1 subgoal):
 1. \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
using hahn_decomp_finite
[PROOF STATE]
proof (prove)
using this:
\<forall>E\<in>sets M. \<mu> E < \<infinity>
\<forall>E\<in>sets M. \<mu> E < \<infinity> \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2

goal (1 subgoal):
 1. \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>M1 M2. hahn_space_decomp M1 M2

goal (1 subgoal):
 1. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>)

goal (1 subgoal):
 1. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
define m where "m = (\<lambda>A . - \<mu> A)"
[PROOF STATE]
proof (state)
this:
m = (\<lambda>A. - \<mu> A)

goal (1 subgoal):
 1. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
have "\<exists> M1 M2. signed_measure_space.hahn_space_decomp M m M1 M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>M1 M2. signed_measure_space.hahn_space_decomp M m M1 M2
[PROOF STEP]
proof (rule signed_measure_space.hahn_decomp_finite)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. signed_measure_space M m
 2. \<forall>E\<in>sets M. m E < \<infinity>
[PROOF STEP]
show "signed_measure_space M m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_measure_space M m
[PROOF STEP]
using signed_measure_minus sgn_meas \<open>m = (\<lambda>A . - \<mu> A)\<close>
[PROOF STATE]
proof (prove)
using this:
signed_measure ?M ?\<mu> \<Longrightarrow> signed_measure ?M (\<lambda>A. - ?\<mu> A)
signed_measure M \<mu>
m = (\<lambda>A. - \<mu> A)

goal (1 subgoal):
 1. signed_measure_space M m
[PROOF STEP]
by (unfold_locales, simp)
[PROOF STATE]
proof (state)
this:
signed_measure_space M m

goal (1 subgoal):
 1. \<forall>E\<in>sets M. m E < \<infinity>
[PROOF STEP]
show "\<forall>E\<in>sets M. m E < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>E\<in>sets M. m E < \<infinity>
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>E. E \<in> sets M \<Longrightarrow> m E < \<infinity>
[PROOF STEP]
fix E
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>E. E \<in> sets M \<Longrightarrow> m E < \<infinity>
[PROOF STEP]
assume "E \<in> sets M"
[PROOF STATE]
proof (state)
this:
E \<in> sets M

goal (1 subgoal):
 1. \<And>E. E \<in> sets M \<Longrightarrow> m E < \<infinity>
[PROOF STEP]
show "m E < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m E < \<infinity>
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. m E \<noteq> \<infinity>
[PROOF STEP]
show "m E \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m E \<noteq> \<infinity>
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
assume "\<not> m E \<noteq> \<infinity>"
[PROOF STATE]
proof (state)
this:
\<not> m E \<noteq> \<infinity>

goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
have "m E = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m E = \<infinity>
[PROOF STEP]
using \<open>\<not> m E \<noteq> \<infinity>\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> m E \<noteq> \<infinity>

goal (1 subgoal):
 1. m E = \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
m E = \<infinity>

goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
have "signed_measure M m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_measure M m
[PROOF STEP]
using \<open>signed_measure_space M m\<close> signed_measure_space_def
[PROOF STATE]
proof (prove)
using this:
signed_measure_space M m
signed_measure_space ?M ?\<mu> \<equiv> signed_measure ?M ?\<mu>

goal (1 subgoal):
 1. signed_measure M m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
signed_measure M m

goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
signed_measure M m

goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
have "m E = - \<mu> E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m E = - \<mu> E
[PROOF STEP]
using \<open>m = (\<lambda>A . - \<mu> A)\<close>
[PROOF STATE]
proof (prove)
using this:
m = (\<lambda>A. - \<mu> A)

goal (1 subgoal):
 1. m E = - \<mu> E
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
m E = - \<mu> E

goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m E = - \<mu> E
[PROOF STEP]
have "\<infinity> \<notin> range m"
[PROOF STATE]
proof (prove)
using this:
m E = - \<mu> E

goal (1 subgoal):
 1. \<infinity> \<notin> range m
[PROOF STEP]
using \<open>signed_measure M m\<close>
[PROOF STATE]
proof (prove)
using this:
m E = - \<mu> E
signed_measure M m

goal (1 subgoal):
 1. \<infinity> \<notin> range m
[PROOF STEP]
by (metis (no_types, lifting) False ereal_less_PInfty
                ereal_uminus_eq_reorder image_iff inf_range m_def rangeI)
[PROOF STATE]
proof (state)
this:
\<infinity> \<notin> range m

goal (1 subgoal):
 1. \<not> m E \<noteq> \<infinity> \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>m E = \<infinity>\<close> \<open>\<infinity> \<notin> range m\<close>
[PROOF STATE]
proof (prove)
using this:
m E = \<infinity>
\<infinity> \<notin> range m

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
m E \<noteq> \<infinity>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
m E < \<infinity>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>E\<in>sets M. m E < \<infinity>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>M1 M2. signed_measure_space.hahn_space_decomp M m M1 M2

goal (1 subgoal):
 1. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
hence "\<exists> M1 M2. (neg_meas_set M1) \<and> (pos_meas_set M2) \<and> (space M = M1 \<union> M2) \<and>
    (M1 \<inter> M2 = {})"
[PROOF STATE]
proof (prove)
using this:
\<exists>M1 M2. signed_measure_space.hahn_space_decomp M m M1 M2

goal (1 subgoal):
 1. \<exists>M1 M2. neg_meas_set M1 \<and> pos_meas_set M2 \<and> space M = M1 \<union> M2 \<and> M1 \<inter> M2 = {}
[PROOF STEP]
using pos_meas_set_opp neg_meas_set_opp
[PROOF STATE]
proof (prove)
using this:
\<exists>M1 M2. signed_measure_space.hahn_space_decomp M m M1 M2
signed_measure_space.pos_meas_set M (\<lambda>A. - \<mu> A) ?A \<Longrightarrow> neg_meas_set ?A
signed_measure_space.neg_meas_set M (\<lambda>A. - \<mu> A) ?A \<Longrightarrow> pos_meas_set ?A

goal (1 subgoal):
 1. \<exists>M1 M2. neg_meas_set M1 \<and> pos_meas_set M2 \<and> space M = M1 \<union> M2 \<and> M1 \<inter> M2 = {}
[PROOF STEP]
unfolding m_def
[PROOF STATE]
proof (prove)
using this:
\<exists>M1 M2. signed_measure_space.hahn_space_decomp M (\<lambda>A. - \<mu> A) M1 M2
signed_measure_space.pos_meas_set M (\<lambda>A. - \<mu> A) ?A \<Longrightarrow> neg_meas_set ?A
signed_measure_space.neg_meas_set M (\<lambda>A. - \<mu> A) ?A \<Longrightarrow> pos_meas_set ?A

goal (1 subgoal):
 1. \<exists>M1 M2. neg_meas_set M1 \<and> pos_meas_set M2 \<and> space M = M1 \<union> M2 \<and> M1 \<inter> M2 = {}
[PROOF STEP]
by (metis sgn_meas signed_measure_minus signed_measure_space_def
        signed_measure_space.hahn_space_decomp_def)
[PROOF STATE]
proof (state)
this:
\<exists>M1 M2. neg_meas_set M1 \<and> pos_meas_set M2 \<and> space M = M1 \<union> M2 \<and> M1 \<inter> M2 = {}

goal (1 subgoal):
 1. \<not> (\<forall>E\<in>sets M. \<mu> E < \<infinity>) \<Longrightarrow> \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>M1 M2. neg_meas_set M1 \<and> pos_meas_set M2 \<and> space M = M1 \<union> M2 \<and> M1 \<inter> M2 = {}

goal (1 subgoal):
 1. \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
using hahn_space_decomp_def
[PROOF STATE]
proof (prove)
using this:
\<exists>M1 M2. neg_meas_set M1 \<and> pos_meas_set M2 \<and> space M = M1 \<union> M2 \<and> M1 \<inter> M2 = {}
hahn_space_decomp ?M1.0 ?M2.0 \<equiv> pos_meas_set ?M1.0 \<and> neg_meas_set ?M2.0 \<and> space M = ?M1.0 \<union> ?M2.0 \<and> ?M1.0 \<inter> ?M2.0 = {}

goal (1 subgoal):
 1. \<exists>M1 M2. hahn_space_decomp M1 M2
[PROOF STEP]
by (metis inf_commute sup_commute)
[PROOF STATE]
proof (state)
this:
\<exists>M1 M2. hahn_space_decomp M1 M2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma restrict_shared_fuse: "S \<ominus>\<^bsub>A\<^esub> L \<ominus>\<^bsub>B\<^esub> M = (S \<ominus>\<^bsub>(A \<union> B)\<^esub> (L \<union> M))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<ominus>\<^bsub>A\<^esub> L \<ominus>\<^bsub>B\<^esub> M = S \<ominus>\<^bsub>(A \<union> B)\<^esub> L \<union> M
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (S \<ominus>\<^bsub>A\<^esub> L \<ominus>\<^bsub>B\<^esub> M) x = (S \<ominus>\<^bsub>(A \<union> B)\<^esub> L \<union> M) x
[PROOF STEP]
apply (auto simp add: restrict_shared_def split: option.splits if_split_asm)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma not_iT_Div_Int: "\<not> (\<forall> k A B. (A \<inter> B) \<oslash> k = (A \<oslash> k) \<inter> (B \<oslash> k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (\<forall>k A B. A \<inter> B \<oslash> k = (A \<oslash> k) \<inter> (B \<oslash> k))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k A B. A \<inter> B \<oslash> k \<noteq> (A \<oslash> k) \<inter> (B \<oslash> k)
[PROOF STEP]
apply (
  rule_tac x=3 in exI,
  rule_tac x="{0}" in exI,
  rule_tac x="{1}" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0} \<inter> {1} \<oslash> 3 \<noteq> ({0} \<oslash> 3) \<inter> ({1} \<oslash> 3)
[PROOF STEP]
by (simp add: iT_Div_def)


[STATEMENT]
lemma InitState_States_notmem [simp]:
    "\<lbrakk> B \<in> SAs A; C \<in> SAs A; B \<noteq> C \<rbrakk> \<Longrightarrow> InitState B \<notin> States C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<in> SAs A; C \<in> SAs A; B \<noteq> C\<rbrakk> \<Longrightarrow> InitState B \<notin> States C
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<in> SAs A; C \<in> SAs A; B \<noteq> C; InitState B \<in> States C\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (cut_tac HA=A in MutuallyDistinct_HA)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<in> SAs A; C \<in> SAs A; B \<noteq> C; InitState B \<in> States C; MutuallyDistinct (SAs A)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (unfold MutuallyDistinct_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<in> SAs A; C \<in> SAs A; B \<noteq> C; InitState B \<in> States C; \<forall>a\<in>SAs A. \<forall>b\<in>SAs A. a \<noteq> b \<longrightarrow> States a \<inter> States b = {}\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma HFinite_st_Infinitesimal_add: "x \<in> HFinite \<Longrightarrow> \<exists>e \<in> Infinitesimal. x = st(x) + e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> HFinite \<Longrightarrow> \<exists>e\<in>Infinitesimal. x = st x + e
[PROOF STEP]
by (blast dest!: st_approx_self [THEN approx_sym] bex_Infinitesimal_iff2 [THEN iffD2])


[STATEMENT]
lemma Gromov_converging_at_infinity_quasi_isometry:
  fixes f::"'a::Gromov_hyperbolic_space_geodesic \<Rightarrow> 'b::Gromov_hyperbolic_space_geodesic"
  assumes "lambda C-quasi_isometry f"
  shows "Gromov_converging_at_boundary (\<lambda>n. f (u n)) \<longleftrightarrow> Gromov_converging_at_boundary u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n)) = Gromov_converging_at_boundary u
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n)) \<Longrightarrow> Gromov_converging_at_boundary u
 2. Gromov_converging_at_boundary u \<Longrightarrow> Gromov_converging_at_boundary (\<lambda>n. f (u n))
[PROOF STEP]
assume "Gromov_converging_at_boundary u"
[PROOF STATE]
proof (state)
this:
Gromov_converging_at_boundary u

goal (2 subgoals):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n)) \<Longrightarrow> Gromov_converging_at_boundary u
 2. Gromov_converging_at_boundary u \<Longrightarrow> Gromov_converging_at_boundary (\<lambda>n. f (u n))
[PROOF STEP]
show "Gromov_converging_at_boundary (\<lambda>n. f (u n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n))
[PROOF STEP]
proof (rule Gromov_converging_at_boundaryI[of "f (basepoint)"])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
have "lambda \<ge> 1" "C \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> lambda &&& 0 \<le> C
[PROOF STEP]
using quasi_isometry_onD[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> dist (f ?x) (f ?y) \<le> lambda * dist ?x ?y + C
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * dist ?x ?y - C \<le> dist (f ?x) (f ?y)
1 \<le> lambda
0 \<le> C

goal (1 subgoal):
 1. 1 \<le> lambda &&& 0 \<le> C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 \<le> lambda
0 \<le> C

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
define D where "D = 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
[PROOF STATE]
proof (state)
this:
D = 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
fix M::real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
obtain M2::real where M2: "M = M2/lambda - D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>M2. M = M2 / lambda - D \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
1 \<le> lambda

goal (1 subgoal):
 1. (\<And>M2. M = M2 / lambda - D \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
M = M2 / lambda - D

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
obtain N where N: "\<And>m n. m \<ge> N \<Longrightarrow> n \<ge> N \<Longrightarrow> Gromov_product_at basepoint (u m) (u n) \<ge> M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>N. (\<And>m n. \<lbrakk>N \<le> m; N \<le> n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at basepoint (u m) (u n)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>Gromov_converging_at_boundary u\<close>
[PROOF STATE]
proof (prove)
using this:
Gromov_converging_at_boundary u

goal (1 subgoal):
 1. (\<And>N. (\<And>m n. \<lbrakk>N \<le> m; N \<le> n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at basepoint (u m) (u n)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding Gromov_converging_at_boundary_def
[PROOF STATE]
proof (prove)
using this:
\<forall>a M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at a (u m) (u n)

goal (1 subgoal):
 1. (\<And>N. (\<And>m n. \<lbrakk>N \<le> m; N \<le> n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at basepoint (u m) (u n)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at basepoint (u ?m) (u ?n)

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
have "Gromov_product_at (f basepoint) (f (u m)) (f (u n)) \<ge> M" if "m \<ge> N" "n \<ge> N" for m n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
have "M \<le> Gromov_product_at basepoint (u m) (u n)/lambda - D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n) / lambda - D
[PROOF STEP]
unfolding M2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M2 / lambda - D \<le> Gromov_product_at basepoint (u m) (u n) / lambda - D
[PROOF STEP]
using N[OF that] \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
M2 \<le> Gromov_product_at basepoint (u m) (u n)
1 \<le> lambda

goal (1 subgoal):
 1. M2 / lambda - D \<le> Gromov_product_at basepoint (u m) (u n) / lambda - D
[PROOF STEP]
by (auto simp add: divide_simps)
[PROOF STATE]
proof (state)
this:
M \<le> Gromov_product_at basepoint (u m) (u n) / lambda - D

goal (1 subgoal):
 1. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
M \<le> Gromov_product_at basepoint (u m) (u n) / lambda - D

goal (1 subgoal):
 1. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
have "... \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at basepoint (u m) (u n) / lambda - D \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at basepoint (u m) (u n) / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
by (rule Gromov_product_at_quasi_isometry[OF assms(1)])
[PROOF STATE]
proof (state)
this:
Gromov_product_at basepoint (u m) (u n) / lambda - D \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal (1 subgoal):
 1. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal (1 subgoal):
 1. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at (f basepoint) (f (u ?m)) (f (u ?n))

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at (f basepoint) (f (u ?m)) (f (u ?n))
[PROOF STEP]
show "\<exists>N. \<forall>n \<ge> N. \<forall>m \<ge> N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at (f basepoint) (f (u ?m)) (f (u ?n))

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
unfolding comp_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at (f basepoint) (f (u ?m)) (f (u ?n))

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Gromov_converging_at_boundary (\<lambda>n. f (u n))

goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n)) \<Longrightarrow> Gromov_converging_at_boundary u
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n)) \<Longrightarrow> Gromov_converging_at_boundary u
[PROOF STEP]
assume "Gromov_converging_at_boundary (\<lambda>n. f (u n))"
[PROOF STATE]
proof (state)
this:
Gromov_converging_at_boundary (\<lambda>n. f (u n))

goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. f (u n)) \<Longrightarrow> Gromov_converging_at_boundary u
[PROOF STEP]
show "Gromov_converging_at_boundary u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_converging_at_boundary u
[PROOF STEP]
proof (rule Gromov_converging_at_boundaryI[of "basepoint"])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
have "lambda \<ge> 1" "C \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> lambda &&& 0 \<le> C
[PROOF STEP]
using quasi_isometry_onD[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> dist (f ?x) (f ?y) \<le> lambda * dist ?x ?y + C
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * dist ?x ?y - C \<le> dist (f ?x) (f ?y)
1 \<le> lambda
0 \<le> C

goal (1 subgoal):
 1. 1 \<le> lambda &&& 0 \<le> C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 \<le> lambda
0 \<le> C

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
define D where "D = 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
[PROOF STATE]
proof (state)
this:
D = 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
fix M::real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
define M2 where "M2 = lambda * M + D"
[PROOF STATE]
proof (state)
this:
M2 = lambda * M + D

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
have M2: "M = (M2 - D)/lambda"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = (M2 - D) / lambda
[PROOF STEP]
unfolding M2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = (lambda * M + D - D) / lambda
[PROOF STEP]
using \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
1 \<le> lambda

goal (1 subgoal):
 1. M = (lambda * M + D - D) / lambda
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
M = (M2 - D) / lambda

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
obtain N where N: "\<And>m n. m \<ge> N \<Longrightarrow> n \<ge> N \<Longrightarrow> Gromov_product_at (f basepoint) (f (u m)) (f (u n)) \<ge> M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>N. (\<And>m n. \<lbrakk>N \<le> m; N \<le> n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>Gromov_converging_at_boundary (\<lambda>n. f (u n))\<close>
[PROOF STATE]
proof (prove)
using this:
Gromov_converging_at_boundary (\<lambda>n. f (u n))

goal (1 subgoal):
 1. (\<And>N. (\<And>m n. \<lbrakk>N \<le> m; N \<le> n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding Gromov_converging_at_boundary_def
[PROOF STATE]
proof (prove)
using this:
\<forall>a M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at a (f (u m)) (f (u n))

goal (1 subgoal):
 1. (\<And>N. (\<And>m n. \<lbrakk>N \<le> m; N \<le> n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M2 \<le> Gromov_product_at (f basepoint) (f (u ?m)) (f (u ?n))

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
have "Gromov_product_at basepoint (u m) (u n) \<ge> M" if "m \<ge> N" "n \<ge> N" for m n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
have "M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
using N[OF that]
[PROOF STATE]
proof (prove)
using this:
M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal (1 subgoal):
 1. M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
M2 \<le> Gromov_product_at (f basepoint) (f (u m)) (f (u n))

goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
have "... \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at (f basepoint) (f (u m)) (f (u n)) \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at (f basepoint) (f (u m)) (f (u n)) \<le> lambda * Gromov_product_at basepoint (u m) (u n) + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
by (rule Gromov_product_at_quasi_isometry[OF assms(1)])
[PROOF STATE]
proof (state)
this:
Gromov_product_at (f basepoint) (f (u m)) (f (u n)) \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D

goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
M2 \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D
[PROOF STEP]
show "M \<le> Gromov_product_at basepoint (u m) (u n)"
[PROOF STATE]
proof (prove)
using this:
M2 \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D

goal (1 subgoal):
 1. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
unfolding M2
[PROOF STATE]
proof (prove)
using this:
M2 \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D

goal (1 subgoal):
 1. (M2 - D) / lambda \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
using \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
M2 \<le> lambda * Gromov_product_at basepoint (u m) (u n) + D
1 \<le> lambda

goal (1 subgoal):
 1. (M2 - D) / lambda \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
M \<le> Gromov_product_at basepoint (u m) (u n)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at basepoint (u ?m) (u ?n)

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at basepoint (u ?m) (u ?n)
[PROOF STEP]
show "\<exists>N. \<forall>n \<ge> N. \<forall>m \<ge> N. Gromov_product_at basepoint (u m) (u n) \<ge> M"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>N \<le> ?m; N \<le> ?n\<rbrakk> \<Longrightarrow> M \<le> Gromov_product_at basepoint (u ?m) (u ?n)

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint (u m) (u n)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Gromov_converging_at_boundary u

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cong_cong_mod_nat: "[a = b] (mod m) \<longleftrightarrow> [a mod m = b mod m] (mod m)"
  for a b :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [a = b] (mod m) = [a mod m = b mod m] (mod m)
[PROOF STEP]
by simp


[STATEMENT]
lemma decomposition: "\<exists>X. X = - (g ` (- (f ` X)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>X. X = - g ` (- f ` X)
[PROOF STEP]
apply (rule exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ?X = - g ` (- f ` ?X)
[PROOF STEP]
apply (rule lfp_unfold)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono (\<lambda>a. - g ` (- f ` a))
[PROOF STEP]
apply (rule monoI, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma remove_is_empty_imp_mul: assumes "M -s dm r {#\<alpha>#} = {#}" shows "(M,{#\<alpha>#}) \<in> mul r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> mul r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> mul r
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
M -s r \<down>m {#\<alpha>#} = {#}
[PROOF STEP]
have C: "set_mset M \<subseteq> dm r {#\<alpha>#}"
[PROOF STATE]
proof (prove)
using this:
M -s r \<down>m {#\<alpha>#} = {#}

goal (1 subgoal):
 1. set_mset M \<subseteq> r \<down>m {#\<alpha>#}
[PROOF STEP]
by (metis remove_empty_implies_subset)
[PROOF STATE]
proof (state)
this:
set_mset M \<subseteq> r \<down>m {#\<alpha>#}

goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> mul r
[PROOF STEP]
have "M = {#}+M" and "{#\<alpha>#}={#}+{#\<alpha>#}" and "{#\<alpha>#} \<noteq> {#}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = {#} + M &&& {#\<alpha>#} = {#} + {#\<alpha>#} &&& {#\<alpha>#} \<noteq> {#}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M = {#} + M
{#\<alpha>#} = {#} + {#\<alpha>#}
{#\<alpha>#} \<noteq> {#}

goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> mul r
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
M = {#} + M
{#\<alpha>#} = {#} + {#\<alpha>#}
{#\<alpha>#} \<noteq> {#}

goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> mul r
[PROOF STEP]
using C
[PROOF STATE]
proof (prove)
using this:
M = {#} + M
{#\<alpha>#} = {#} + {#\<alpha>#}
{#\<alpha>#} \<noteq> {#}
set_mset M \<subseteq> r \<down>m {#\<alpha>#}

goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> mul r
[PROOF STEP]
unfolding mul_def
[PROOF STATE]
proof (prove)
using this:
M = {#} + M
{#\<alpha>#} = {#} + {#\<alpha>#}
{#\<alpha>#} \<noteq> {#}
set_mset M \<subseteq> r \<down>m {#\<alpha>#}

goal (1 subgoal):
 1. (M, {#\<alpha>#}) \<in> {(M, N). \<exists>I J K. M = I + K \<and> N = I + J \<and> set_mset K \<subseteq> r \<down>m J \<and> J \<noteq> {#}}
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
(M, {#\<alpha>#}) \<in> mul r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma monomial_adds_nat_iff: "monomial p i adds c \<longleftrightarrow> lookup c i \<ge> p" for p::"nat"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (monomial p i adds c) = (p \<le> lookup c i)
[PROOF STEP]
apply (auto simp: adds_def lookup_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<le> lookup c i \<Longrightarrow> \<exists>k. c = monomial p i + k
[PROOF STEP]
by (metis add.left_commute nat_le_iff_add remove_key_sum single_add)


[STATEMENT]
lemma (in Corps) OstrowskiTr3:"\<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K;
      0 \<le> (v t); v s < 0\<rbrakk>  \<Longrightarrow> 0 < (v (t \<cdot>\<^sub>r (( s \<plusminus> t)\<^bsup>\<hyphen>K\<^esup>)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v t; v s < 0\<rbrakk> \<Longrightarrow> 0 < v (t \<cdot>\<^sub>r (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup>)
[PROOF STEP]
apply (frule aless_le_trans[of "v s" "0" "v t"], assumption+,
       cut_tac field_is_ring, frule Ring.ring_is_ag[of "K"],
       frule aGroup.ag_pOp_closed[of "K" "s" "t"], assumption+,
       frule OstrowskiTr1[of v t s], assumption+,
       frule value_less_eq[THEN sym, of v s t], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v t; v s < 0; v s < v t; Ring K; aGroup K; s \<plusminus> t \<in> carrier K; t \<plusminus> s \<noteq> \<zero>; v (s \<plusminus> t) = v s\<rbrakk> \<Longrightarrow> 0 < v (t \<cdot>\<^sub>r (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup>)
[PROOF STEP]
apply (simp add:aGroup.ag_pOp_commute[of K t s],
       cut_tac invf_closed1[of "s \<plusminus> t"], simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v t; v s < 0; v s < v t; Ring K; aGroup K; s \<plusminus> t \<in> carrier K; s \<plusminus> t \<noteq> \<zero>; v (s \<plusminus> t) = v s; (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup> \<in> carrier K \<and> (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup> \<noteq> \<zero>\<rbrakk> \<Longrightarrow> 0 < v (t \<cdot>\<^sub>r (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup>)
 2. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v t; v s < 0; v s < v t; Ring K; aGroup K; s \<plusminus> t \<in> carrier K; s \<plusminus> t \<noteq> \<zero>; v (s \<plusminus> t) = v s\<rbrakk> \<Longrightarrow> s \<plusminus> t \<in> carrier K - {\<zero>}
[PROOF STEP]
apply (
       erule conjE, simp add:val_t2p[of v], simp add:value_of_inv)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v t; v s < 0; v s < v t; Ring K; aGroup K; s \<plusminus> t \<in> carrier K; s \<plusminus> t \<noteq> \<zero>; v (s \<plusminus> t) = v s; (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup> \<in> carrier K; (s \<plusminus> t)\<^bsup>\<hyphen> K\<^esup> \<noteq> \<zero>\<rbrakk> \<Longrightarrow> 0 < v t + - v s
 2. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v t; v s < 0; v s < v t; Ring K; aGroup K; s \<plusminus> t \<in> carrier K; s \<plusminus> t \<noteq> \<zero>; v (s \<plusminus> t) = v s\<rbrakk> \<Longrightarrow> s \<plusminus> t \<in> carrier K - {\<zero>}
[PROOF STEP]
apply (cut_tac aless_diff_poss[of "v s" "v t"],
              simp add:diff_ant_def, simp+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma take_bit_drop_bit:
  "take_bit m (drop_bit n a) = drop_bit n (take_bit (m + n) a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_bit m (drop_bit n a) = drop_bit n (take_bit (m + n) a)
[PROOF STEP]
by (simp add: drop_bit_eq_div take_bit_eq_mod ac_simps div_exp_mod_exp_eq)


[STATEMENT]
lemma star_subset_lists: "A \<subseteq> lists S \<Longrightarrow> star A \<subseteq> lists S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> lists S \<Longrightarrow> star A \<subseteq> lists S
[PROOF STEP]
unfolding star_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> lists S \<Longrightarrow> \<Union> (range ((^^) A)) \<subseteq> lists S
[PROOF STEP]
by(blast dest: lang_pow_subset_lists)


[STATEMENT]
lemma wcount_add_mset:
  "wcount f (add_mset x M) a = (if x = a then Suc (f a) else 0) + wcount f M a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wcount f (add_mset x M) a = (if x = a then Suc (f a) else 0) + wcount f M a
[PROOF STEP]
unfolding add_mset_add_single[of _ M] wcount_union
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wcount f M a + wcount f {#x#} a = (if x = a then Suc (f a) else 0) + wcount f M a
[PROOF STEP]
by (auto simp: wcount_def)


[STATEMENT]
lemma RDirProd_hom1:
  shows "(\<lambda>a. (a, a)) \<in> ring_hom R (RDirProd R R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a. (a, a)) \<in> ring_hom R (RDirProd R R)
[PROOF STEP]
by (auto simp add: ring_hom_def RDirProd_def DirProd_def monoid.defs)


[STATEMENT]
lemma \<dd>_TIMES[simp]: "\<dd> (TIMES xs) a = (let n = length (takeWhile \<oo> xs)
  in PLUS (map (\<lambda>zs. TIMES (\<dd> (hd zs) a # tl zs)) (take (Suc n) (tails (xs @ [One])))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<dd> (TIMES xs) a = (let n = length (takeWhile \<oo> xs) in PLUS (map (\<lambda>zs. TIMES (\<dd> (hd zs) a # tl zs)) (take (Suc n) (tails (xs @ [One])))))
[PROOF STEP]
unfolding TIMES_def \<dd>_foldr_Times
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (let n = length (takeWhile \<oo> xs) in PLUS (map (\<lambda>zs. foldr Times (\<dd> (hd zs) a # tl zs) One) (take (Suc n) (tails (xs @ [One]))))) = (let n = length (takeWhile \<oo> xs) in PLUS (map (\<lambda>zs. foldr Times (\<dd> (hd zs) a # tl zs) One) (take (Suc n) (tails (xs @ [One])))))
[PROOF STEP]
by simp