[STATEMENT]
lemma Min_mono':
  assumes "finite A"
  assumes "\<And> (a::'a). a \<in> A \<Longrightarrow> (f::'a \<Rightarrow> eint)  a \<le>  g a"
  shows "Min (f`A) \<le> Min (g `A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min (f ` A) \<le> Min (g ` A)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Min (f ` A) \<le> Min (g ` A)
[PROOF STEP]
have "(\<forall>a \<in>  A. f a \<le> g a) \<longrightarrow> Min (f`A) \<le> Min (g` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)
[PROOF STEP]
apply(rule finite.induct[of A])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. finite A
 2. (\<forall>a\<in>{}. f a \<le> g a) \<longrightarrow> Min (f ` {}) \<le> Min (g ` {})
 3. \<And>A a. \<lbrakk>finite A; (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)\<rbrakk> \<Longrightarrow> (\<forall>a\<in>insert a A. f a \<le> g a) \<longrightarrow> Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
apply (simp add: assms(1))
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<forall>a\<in>{}. f a \<le> g a) \<longrightarrow> Min (f ` {}) \<le> Min (g ` {})
 2. \<And>A a. \<lbrakk>finite A; (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)\<rbrakk> \<Longrightarrow> (\<forall>a\<in>insert a A. f a \<le> g a) \<longrightarrow> Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)\<rbrakk> \<Longrightarrow> (\<forall>a\<in>insert a A. f a \<le> g a) \<longrightarrow> Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A); \<forall>a\<in>insert a A. f a \<le> g a\<rbrakk> \<Longrightarrow> Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
fix A a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A); \<forall>a\<in>insert a A. f a \<le> g a\<rbrakk> \<Longrightarrow> Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
assume F: "finite A" "(\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)"
"\<forall>a\<in>insert a A. f a \<le> g a"
[PROOF STATE]
proof (state)
this:
finite A
(\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)
\<forall>a\<in>insert a A. f a \<le> g a

goal (1 subgoal):
 1. \<And>A a. \<lbrakk>finite A; (\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A); \<forall>a\<in>insert a A. f a \<le> g a\<rbrakk> \<Longrightarrow> Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
show "Min (f ` insert a A) \<le> Min (g ` insert a A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
obtain k where k_def: "k \<in> insert a A \<and> g k = Min (g ` insert a A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k. k \<in> insert a A \<and> g k = Min (g ` insert a A) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A
?a1 \<in> A \<Longrightarrow> f ?a1 \<le> g ?a1

goal (1 subgoal):
 1. (\<And>k. k \<in> insert a A \<and> g k = Min (g ` insert a A) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis (mono_tags, opaque_lifting) F(1) Min_eq_iff finite.insertI finite_imageI image_iff image_is_empty insert_not_empty)
[PROOF STATE]
proof (state)
this:
k \<in> insert a A \<and> g k = Min (g ` insert a A)

goal (1 subgoal):
 1. Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k \<in> insert a A \<and> g k = Min (g ` insert a A)
[PROOF STEP]
have 0: "f k \<le> g k"
[PROOF STATE]
proof (prove)
using this:
k \<in> insert a A \<and> g k = Min (g ` insert a A)

goal (1 subgoal):
 1. f k \<le> g k
[PROOF STEP]
using F(3)
[PROOF STATE]
proof (prove)
using this:
k \<in> insert a A \<and> g k = Min (g ` insert a A)
\<forall>a\<in>insert a A. f a \<le> g a

goal (1 subgoal):
 1. f k \<le> g k
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f k \<le> g k

goal (1 subgoal):
 1. Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
f k \<le> g k

goal (1 subgoal):
 1. Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
using k_def
[PROOF STATE]
proof (prove)
using this:
f k \<le> g k
k \<in> insert a A \<and> g k = Min (g ` insert a A)

goal (1 subgoal):
 1. Min (f ` insert a A) \<le> Min (g ` insert a A)
[PROOF STEP]
by (metis F(1) Min_le dual_order.trans finite.insertI finite_imageI image_eqI)
[PROOF STATE]
proof (state)
this:
Min (f ` insert a A) \<le> Min (g ` insert a A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Min (f ` insert a A) \<le> Min (g ` insert a A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)

goal (1 subgoal):
 1. Min (f ` A) \<le> Min (g ` A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)

goal (1 subgoal):
 1. Min (f ` A) \<le> Min (g ` A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(\<forall>a\<in>A. f a \<le> g a) \<longrightarrow> Min (f ` A) \<le> Min (g ` A)
finite A
?a1 \<in> A \<Longrightarrow> f ?a1 \<le> g ?a1

goal (1 subgoal):
 1. Min (f ` A) \<le> Min (g ` A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Min (f ` A) \<le> Min (g ` A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma relpow_transI: "(x,y) \<in> R^^n \<Longrightarrow> (y,z) \<in> R^^m \<Longrightarrow> (x,z) \<in> R^^(n+m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> R ^^ n; (y, z) \<in> R ^^ m\<rbrakk> \<Longrightarrow> (x, z) \<in> R ^^ (n + m)
[PROOF STEP]
by (simp add: relcomp.intros relpow_add)


[STATEMENT]
lemma isometry_not_elliptic_has_attracting_fixed_point:
  assumes "isometry f"
          "\<not>(elliptic_isometry f)"
  shows "\<exists>xi \<in> Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
define u where "u = (\<lambda>n. dist basepoint ((f^^n) basepoint))"
[PROOF STATE]
proof (state)
this:
u = (\<lambda>n. dist basepoint ((f ^^ n) basepoint))

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have NB: "\<not>(bdd_above (range u))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> bdd_above (range u)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bdd_above (range u) \<Longrightarrow> False
[PROOF STEP]
assume "bdd_above (range u)"
[PROOF STATE]
proof (state)
this:
bdd_above (range u)

goal (1 subgoal):
 1. bdd_above (range u) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bdd_above (range u)
[PROOF STEP]
obtain C where *: "\<And>n. u n \<le> C"
[PROOF STATE]
proof (prove)
using this:
bdd_above (range u)

goal (1 subgoal):
 1. (\<And>C. (\<And>n. u n \<le> C) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding bdd_above_def
[PROOF STATE]
proof (prove)
using this:
\<exists>M. \<forall>x\<in>range u. x \<le> M

goal (1 subgoal):
 1. (\<And>C. (\<And>n. u n \<le> C) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u ?n \<le> C

goal (1 subgoal):
 1. bdd_above (range u) \<Longrightarrow> False
[PROOF STEP]
have "bounded {(f^^n) basepoint|n. True}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded {(f ^^ n) basepoint |n. True}
[PROOF STEP]
unfolding bounded_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x e. \<forall>y\<in>{(f ^^ n) basepoint |n. True}. dist x y \<le> e
[PROOF STEP]
apply (rule exI[of _ basepoint], rule exI[of _ C])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y\<in>{(f ^^ n) basepoint |n. True}. dist basepoint y \<le> C
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
u ?n \<le> C

goal (1 subgoal):
 1. \<forall>y\<in>{(f ^^ n) basepoint |n. True}. dist basepoint y \<le> C
[PROOF STEP]
unfolding u_def
[PROOF STATE]
proof (prove)
using this:
dist basepoint ((f ^^ ?n) basepoint) \<le> C

goal (1 subgoal):
 1. \<forall>y\<in>{(f ^^ n) basepoint |n. True}. dist basepoint y \<le> C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
bounded {(f ^^ n) basepoint |n. True}

goal (1 subgoal):
 1. bdd_above (range u) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bounded {(f ^^ n) basepoint |n. True}
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
bounded {(f ^^ n) basepoint |n. True}

goal (1 subgoal):
 1. False
[PROOF STEP]
using elliptic_isometryI assms
[PROOF STATE]
proof (prove)
using this:
bounded {(f ^^ n) basepoint |n. True}
\<lbrakk>bounded {(?f ^^ n) ?x |n. True}; isometry ?f\<rbrakk> \<Longrightarrow> elliptic_isometry ?f
isometry f
\<not> elliptic_isometry f

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> bdd_above (range u)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have "\<exists>r. \<forall>n. ((\<forall>l \<le> r n. u l \<le> u (r n)) \<and> u (r n) \<ge> 2 * n) \<and> r (Suc n) \<ge> r n + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>r. \<forall>n. ((\<forall>l\<le>r n. u l \<le> u (r n)) \<and> 2 * real n \<le> u (r n)) \<and> r n + 1 \<le> r (Suc n)
[PROOF STEP]
apply (rule dependent_nat_choice)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>x. (\<forall>l\<le>x. u l \<le> u x) \<and> 2 * real 0 \<le> u x
 2. \<And>x n. (\<forall>l\<le>x. u l \<le> u x) \<and> 2 * real n \<le> u x \<Longrightarrow> \<exists>y. ((\<forall>l\<le>y. u l \<le> u y) \<and> 2 * real (Suc n) \<le> u y) \<and> x + 1 \<le> y
[PROOF STEP]
using high_scores[OF NB]
[PROOF STATE]
proof (prove)
using this:
\<exists>n. (\<forall>l\<le>n. u l \<le> u n) \<and> ?C \<le> u n \<and> ?i \<le> n

goal (2 subgoals):
 1. \<exists>x. (\<forall>l\<le>x. u l \<le> u x) \<and> 2 * real 0 \<le> u x
 2. \<And>x n. (\<forall>l\<le>x. u l \<le> u x) \<and> 2 * real n \<le> u x \<Longrightarrow> \<exists>y. ((\<forall>l\<le>y. u l \<le> u y) \<and> 2 * real (Suc n) \<le> u y) \<and> x + 1 \<le> y
[PROOF STEP]
by (auto) blast
[PROOF STATE]
proof (state)
this:
\<exists>r. \<forall>n. ((\<forall>l\<le>r n. u l \<le> u (r n)) \<and> 2 * real n \<le> u (r n)) \<and> r n + 1 \<le> r (Suc n)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>r. \<forall>n. ((\<forall>l\<le>r n. u l \<le> u (r n)) \<and> 2 * real n \<le> u (r n)) \<and> r n + 1 \<le> r (Suc n)
[PROOF STEP]
obtain r::"nat \<Rightarrow> nat" where r: "\<And>n l. l \<le> r n \<Longrightarrow> u l \<le> u (r n)"
                                       "\<And>n. u (r n) \<ge> 2 * n" "\<And>n. r (Suc n) \<ge> r n + 1"
[PROOF STATE]
proof (prove)
using this:
\<exists>r. \<forall>n. ((\<forall>l\<le>r n. u l \<le> u (r n)) \<and> 2 * real n \<le> u (r n)) \<and> r n + 1 \<le> r (Suc n)

goal (1 subgoal):
 1. (\<And>r. \<lbrakk>\<And>n l. l \<le> r n \<Longrightarrow> u l \<le> u (r n); \<And>n. real (2 * n) \<le> u (r n); \<And>n. r n + 1 \<le> r (Suc n)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?l \<le> r ?n \<Longrightarrow> u ?l \<le> u (r ?n)
real (2 * ?n) \<le> u (r ?n)
r ?n + 1 \<le> r (Suc ?n)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?l \<le> r ?n \<Longrightarrow> u ?l \<le> u (r ?n)
real (2 * ?n) \<le> u (r ?n)
r ?n + 1 \<le> r (Suc ?n)
[PROOF STEP]
have "strict_mono r"
[PROOF STATE]
proof (prove)
using this:
?l \<le> r ?n \<Longrightarrow> u ?l \<le> u (r ?n)
real (2 * ?n) \<le> u (r ?n)
r ?n + 1 \<le> r (Suc ?n)

goal (1 subgoal):
 1. strict_mono r
[PROOF STEP]
by (metis Suc_eq_plus1 Suc_le_lessD strict_monoI_Suc)
[PROOF STATE]
proof (state)
this:
strict_mono r

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
strict_mono r
[PROOF STEP]
have "r n \<ge> n" for n
[PROOF STATE]
proof (prove)
using this:
strict_mono r

goal (1 subgoal):
 1. n \<le> r n
[PROOF STEP]
by (simp add: seq_suble)
[PROOF STATE]
proof (state)
this:
?n \<le> r ?n

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have A: "dist ((f^^(r p)) basepoint) ((f^^(r n)) basepoint) \<le> dist basepoint ((f^^(r n)) basepoint)" if "n \<ge> p" for n p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
have "r n \<ge> r p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r p \<le> r n
[PROOF STEP]
using \<open>n \<ge> p\<close> \<open>strict_mono r\<close>
[PROOF STATE]
proof (prove)
using this:
p \<le> n
strict_mono r

goal (1 subgoal):
 1. r p \<le> r n
[PROOF STEP]
by (simp add: strict_mono_less_eq)
[PROOF STATE]
proof (state)
this:
r p \<le> r n

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r p \<le> r n
[PROOF STEP]
have *: "f^^((r n)) = (f^^(r p)) o (f^^(r n - r p))"
[PROOF STATE]
proof (prove)
using this:
r p \<le> r n

goal (1 subgoal):
 1. f ^^ r n = f ^^ r p \<circ> f ^^ (r n - r p)
[PROOF STEP]
unfolding funpow_add[symmetric]
[PROOF STATE]
proof (prove)
using this:
r p \<le> r n

goal (1 subgoal):
 1. f ^^ r n = f ^^ (r p + (r n - r p))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ^^ r n = f ^^ r p \<circ> f ^^ (r n - r p)

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
have "dist ((f^^(r p)) basepoint) ((f^^(r n)) basepoint) = dist ((f^^(r p)) basepoint) ((f^^(r p)) ((f^^(r n - r p)) basepoint))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) = dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint))
[PROOF STEP]
unfolding * comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint)) = dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) = dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint))

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) = dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint))

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
have "... = dist basepoint ((f^^(r n - r p)) basepoint)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint)) = dist basepoint ((f ^^ (r n - r p)) basepoint)
[PROOF STEP]
using isometry_iterates[OF assms(1), of "r p"] isometryD
[PROOF STATE]
proof (prove)
using this:
isometry (f ^^ r p)
isometry ?f \<Longrightarrow> isometry_on UNIV ?f
isometry ?f \<Longrightarrow> dist (?f ?x) (?f ?y) = dist ?x ?y
isometry ?f \<Longrightarrow> surj ?f
isometry ?f \<Longrightarrow> 1-lipschitz_on UNIV ?f
isometry ?f \<Longrightarrow> isUCont ?f
isometry ?f \<Longrightarrow> continuous_on UNIV ?f

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint)) = dist basepoint ((f ^^ (r n - r p)) basepoint)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint)) = dist basepoint ((f ^^ (r n - r p)) basepoint)

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist ((f ^^ r p) basepoint) ((f ^^ r p) ((f ^^ (r n - r p)) basepoint)) = dist basepoint ((f ^^ (r n - r p)) basepoint)

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
have "... \<le> dist basepoint ((f^^(r n)) basepoint)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist basepoint ((f ^^ (r n - r p)) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
using r(1)[of "r n - r p" n]
[PROOF STATE]
proof (prove)
using this:
r n - r p \<le> r n \<Longrightarrow> u (r n - r p) \<le> u (r n)

goal (1 subgoal):
 1. dist basepoint ((f ^^ (r n - r p)) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
unfolding u_def
[PROOF STATE]
proof (prove)
using this:
r n - r p \<le> r n \<Longrightarrow> dist basepoint ((f ^^ (r n - r p)) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. dist basepoint ((f ^^ (r n - r p)) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dist basepoint ((f ^^ (r n - r p)) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?p \<le> ?n \<Longrightarrow> dist ((f ^^ r ?p) basepoint) ((f ^^ r ?n) basepoint) \<le> dist basepoint ((f ^^ r ?n) basepoint)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have *: "Gromov_product_at basepoint ((f^^(r p)) basepoint) ((f^^(r n)) basepoint) \<ge> p" if "n \<ge> p" for n p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
have "2 * Gromov_product_at basepoint ((f^^(r p)) basepoint) ((f^^(r n)) basepoint)
            = dist basepoint ((f^^(r p)) basepoint) + dist basepoint ((f^^(r n)) basepoint)
              - dist ((f^^(r p)) basepoint) ((f^^(r n)) basepoint)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) = dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
unfolding Gromov_product_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * ((dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)) / 2) = dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) = dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) = dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
have "... \<ge> dist basepoint ((f^^(r p)) basepoint)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist basepoint ((f ^^ r p) basepoint) \<le> dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
using A[OF that]
[PROOF STATE]
proof (prove)
using this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. dist basepoint ((f ^^ r p) basepoint) \<le> dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dist basepoint ((f ^^ r p) basepoint) \<le> dist basepoint ((f ^^ r p) basepoint) + dist basepoint ((f ^^ r n) basepoint) - dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
dist basepoint ((f ^^ r p) basepoint) \<le> 2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
show "Gromov_product_at basepoint ((f^^(r p)) basepoint) ((f^^(r n)) basepoint) \<ge> p"
[PROOF STATE]
proof (prove)
using this:
dist basepoint ((f ^^ r p) basepoint) \<le> 2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
using r(2)[of p]
[PROOF STATE]
proof (prove)
using this:
dist basepoint ((f ^^ r p) basepoint) \<le> 2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
real (2 * p) \<le> u (r p)

goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
unfolding u_def
[PROOF STATE]
proof (prove)
using this:
dist basepoint ((f ^^ r p) basepoint) \<le> 2 * Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
real (2 * p) \<le> dist basepoint ((f ^^ r p) basepoint)

goal (1 subgoal):
 1. real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?p \<le> ?n \<Longrightarrow> real ?p \<le> Gromov_product_at basepoint ((f ^^ r ?p) basepoint) ((f ^^ r ?n) basepoint)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have *: "Gromov_product_at basepoint ((f^^(r p)) basepoint) ((f^^(r n)) basepoint) \<ge> N" if "n \<ge> N" "p \<ge> N" for n p N
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real N \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
using *[of n p] *[of p n] that
[PROOF STATE]
proof (prove)
using this:
n \<le> p \<Longrightarrow> real n \<le> Gromov_product_at basepoint ((f ^^ r n) basepoint) ((f ^^ r p) basepoint)
p \<le> n \<Longrightarrow> real p \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
N \<le> n
N \<le> p

goal (1 subgoal):
 1. real N \<le> Gromov_product_at basepoint ((f ^^ r p) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
by (auto simp add: Gromov_product_commute intro: le_cases[of n p])
[PROOF STATE]
proof (state)
this:
\<lbrakk>?N \<le> ?n; ?N \<le> ?p\<rbrakk> \<Longrightarrow> real ?N \<le> Gromov_product_at basepoint ((f ^^ r ?p) basepoint) ((f ^^ r ?n) basepoint)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have "Gromov_converging_at_boundary (\<lambda>n. (f^^(r n)) basepoint)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_converging_at_boundary (\<lambda>n. (f ^^ r n) basepoint)
[PROOF STEP]
apply (rule Gromov_converging_at_boundaryI[of basepoint])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint ((f ^^ r m) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?N \<le> ?n; ?N \<le> ?p\<rbrakk> \<Longrightarrow> real ?N \<le> Gromov_product_at basepoint ((f ^^ r ?p) basepoint) ((f ^^ r ?n) basepoint)

goal (1 subgoal):
 1. \<And>M. \<exists>N. \<forall>n\<ge>N. \<forall>m\<ge>N. M \<le> Gromov_product_at basepoint ((f ^^ r m) basepoint) ((f ^^ r n) basepoint)
[PROOF STEP]
by (meson dual_order.trans real_arch_simple)
[PROOF STATE]
proof (state)
this:
Gromov_converging_at_boundary (\<lambda>n. (f ^^ r n) basepoint)

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
with Gromov_converging_at_boundary_converges[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<in>Gromov_boundary. (\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> x
Gromov_converging_at_boundary (\<lambda>n. (f ^^ r n) basepoint)
[PROOF STEP]
obtain xi where xi: "(\<lambda>n. to_Gromov_completion ((f^^(r n)) basepoint)) \<longlonglongrightarrow> xi" "xi \<in> Gromov_boundary"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>Gromov_boundary. (\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> x
Gromov_converging_at_boundary (\<lambda>n. (f ^^ r n) basepoint)

goal (1 subgoal):
 1. (\<And>xi. \<lbrakk>(\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> xi; xi \<in> Gromov_boundary\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> xi
xi \<in> Gromov_boundary

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> xi
xi \<in> Gromov_boundary
[PROOF STEP]
have *: "(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f^^(r n)) basepoint))) \<longlonglongrightarrow> xi"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> xi
xi \<in> Gromov_boundary

goal (1 subgoal):
 1. (\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> xi
[PROOF STEP]
apply (simp, rule Gromov_converging_at_boundary_bounded_perturbation[of _ _ _ "dist basepoint (f basepoint)"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>(\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> xi; xi \<in> Gromov_boundary\<rbrakk> \<Longrightarrow> dist ((f ^^ r n) basepoint) (f ((f ^^ r n) basepoint)) \<le> dist basepoint (f basepoint)
[PROOF STEP]
by (simp add: assms(1) funpow_swap1 isometryD(2) isometry_iterates)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> xi

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> xi

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have "(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f^^(r n)) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi
[PROOF STEP]
using continuous_on_tendsto_compose[OF Gromov_extension_isometry(2)[OF assms(1)] xi(1)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>xi \<in> UNIV; \<forall>\<^sub>F x in sequentially. to_Gromov_completion ((f ^^ r x) basepoint) \<in> UNIV\<rbrakk> \<Longrightarrow> (\<lambda>x. Gromov_extension f (to_Gromov_completion ((f ^^ r x) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi

goal (1 subgoal):
 1. (\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> xi
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi
[PROOF STEP]
have fxi: "Gromov_extension f xi = xi"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> xi
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi

goal (1 subgoal):
 1. Gromov_extension f xi = xi
[PROOF STEP]
using LIMSEQ_unique
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> xi
(\<lambda>n. Gromov_extension f (to_Gromov_completion ((f ^^ r n) basepoint))) \<longlonglongrightarrow> Gromov_extension f xi
\<lbrakk>?X \<longlonglongrightarrow> ?a; ?X \<longlonglongrightarrow> ?b\<rbrakk> \<Longrightarrow> ?a = ?b

goal (1 subgoal):
 1. Gromov_extension f xi = xi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gromov_extension f xi = xi

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have "Busemann_function_at (to_Gromov_completion ((f^^(r n)) basepoint)) ((f^^(r p)) basepoint) basepoint \<le> 0" if "n \<ge> p" for n p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Busemann_function_at (to_Gromov_completion ((f ^^ r n) basepoint)) ((f ^^ r p) basepoint) basepoint \<le> 0
[PROOF STEP]
unfolding Busemann_function_inner
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) - dist basepoint ((f ^^ r n) basepoint) \<le> 0
[PROOF STEP]
using A[OF that]
[PROOF STATE]
proof (prove)
using this:
dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) \<le> dist basepoint ((f ^^ r n) basepoint)

goal (1 subgoal):
 1. dist ((f ^^ r p) basepoint) ((f ^^ r n) basepoint) - dist basepoint ((f ^^ r n) basepoint) \<le> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?p \<le> ?n \<Longrightarrow> Busemann_function_at (to_Gromov_completion ((f ^^ r ?n) basepoint)) ((f ^^ r ?p) basepoint) basepoint \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?p \<le> ?n \<Longrightarrow> Busemann_function_at (to_Gromov_completion ((f ^^ r ?n) basepoint)) ((f ^^ r ?p) basepoint) basepoint \<le> 0
[PROOF STEP]
have A: "eventually (\<lambda>n. Busemann_function_at (to_Gromov_completion ((f^^(r n)) basepoint)) ((f^^(r p)) basepoint) basepoint \<le> 0) sequentially" for p
[PROOF STATE]
proof (prove)
using this:
?p \<le> ?n \<Longrightarrow> Busemann_function_at (to_Gromov_completion ((f ^^ r ?n) basepoint)) ((f ^^ r ?p) basepoint) basepoint \<le> 0

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. Busemann_function_at (to_Gromov_completion ((f ^^ r n) basepoint)) ((f ^^ r p) basepoint) basepoint \<le> 0
[PROOF STEP]
unfolding eventually_sequentially
[PROOF STATE]
proof (prove)
using this:
?p \<le> ?n \<Longrightarrow> Busemann_function_at (to_Gromov_completion ((f ^^ r ?n) basepoint)) ((f ^^ r ?p) basepoint) basepoint \<le> 0

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. Busemann_function_at (to_Gromov_completion ((f ^^ r n) basepoint)) ((f ^^ r p) basepoint) basepoint \<le> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. Busemann_function_at (to_Gromov_completion ((f ^^ r n) basepoint)) ((f ^^ r ?p) basepoint) basepoint \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have B: "eventually (\<lambda>n. Busemann_function_at (to_Gromov_completion ((f^^(r n)) basepoint)) ((f^^(r p)) basepoint) basepoint \<ge> Busemann_function_at xi ((f^^(r p)) basepoint) basepoint - 2 * deltaG(TYPE('a)) - 1) sequentially" for p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. Busemann_function_at xi ((f ^^ r p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> Busemann_function_at (to_Gromov_completion ((f ^^ r n) basepoint)) ((f ^^ r p) basepoint) basepoint
[PROOF STEP]
by (rule eventually_mono[OF Busemann_function_inside_approx[OF _ xi(1), of 1 "((f^^(r p)) basepoint)" basepoint, simplified]], simp)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> Busemann_function_at (to_Gromov_completion ((f ^^ r n) basepoint)) ((f ^^ r ?p) basepoint) basepoint

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have "eventually (\<lambda>n. Busemann_function_at xi ((f^^(r p)) basepoint) basepoint - 2 * deltaG(TYPE('a)) - 1 \<le> 0) sequentially" for p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. Busemann_function_at xi ((f ^^ r p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0
[PROOF STEP]
by (rule eventually_mono[OF eventually_conj[OF A[of p] B[of p]]], simp)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in sequentially. Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0
[PROOF STEP]
have *: "Busemann_function_at xi ((f^^(r p)) basepoint) basepoint - 2 * deltaG(TYPE('a)) - 1 \<le> 0" for p
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0

goal (1 subgoal):
 1. Busemann_function_at xi ((f ^^ r p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0
[PROOF STEP]
have A: "Busemann_function_at xi ((f^^(r p)) basepoint) basepoint / (r p) - (2 * deltaG(TYPE('a)) + 1) * (1/r p) \<le> 0" if "p \<ge> 1" for p
[PROOF STATE]
proof (prove)
using this:
Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0

goal (1 subgoal):
 1. Busemann_function_at xi ((f ^^ r p) basepoint) basepoint / real (r p) - (2 * deltaG TYPE('a) + 1) * (1 / real (r p)) \<le> 0
[PROOF STEP]
using order_trans[OF that \<open>p \<le> r p\<close>]
[PROOF STATE]
proof (prove)
using this:
Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint - 2 * deltaG TYPE('a) - 1 \<le> 0
1 \<le> r p

goal (1 subgoal):
 1. Busemann_function_at xi ((f ^^ r p) basepoint) basepoint / real (r p) - (2 * deltaG TYPE('a) + 1) * (1 / real (r p)) \<le> 0
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
1 \<le> ?p \<Longrightarrow> Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint / real (r ?p) - (2 * deltaG TYPE('a) + 1) * (1 / real (r ?p)) \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have B: "(\<lambda>p. Busemann_function_at xi ((f^^(p)) basepoint) basepoint / p - (2 * deltaG(TYPE('a)) + 1) * (1/p)) \<longlonglongrightarrow> additive_strength f xi - (2 * deltaG(TYPE('a)) + 1) * 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>p. Busemann_function_at xi ((f ^^ p) basepoint) basepoint / real p - (2 * deltaG TYPE('a) + 1) * (1 / real p)) \<longlonglongrightarrow> additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0
[PROOF STEP]
by (intro tendsto_intros assms fxi)
[PROOF STATE]
proof (state)
this:
(\<lambda>p. Busemann_function_at xi ((f ^^ p) basepoint) basepoint / real p - (2 * deltaG TYPE('a) + 1) * (1 / real p)) \<longlonglongrightarrow> additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
have "additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0 \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0 \<le> 0
[PROOF STEP]
apply (rule LIMSEQ_le_const2[OF LIMSEQ_subseq_LIMSEQ[OF B \<open>strict_mono r\<close>]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. ((\<lambda>p. Busemann_function_at xi ((f ^^ p) basepoint) basepoint / real p - (2 * deltaG TYPE('a) + 1) * (1 / real p)) \<circ> r) n \<le> 0
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
1 \<le> ?p \<Longrightarrow> Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint / real (r ?p) - (2 * deltaG TYPE('a) + 1) * (1 / real (r ?p)) \<le> 0

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. ((\<lambda>p. Busemann_function_at xi ((f ^^ p) basepoint) basepoint / real p - (2 * deltaG TYPE('a) + 1) * (1 / real p)) \<circ> r) n \<le> 0
[PROOF STEP]
unfolding comp_def
[PROOF STATE]
proof (prove)
using this:
1 \<le> ?p \<Longrightarrow> Busemann_function_at xi ((f ^^ r ?p) basepoint) basepoint / real (r ?p) - (2 * deltaG TYPE('a) + 1) * (1 / real (r ?p)) \<le> 0

goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. Busemann_function_at xi ((f ^^ r n) basepoint) basepoint / real (r n) - (2 * deltaG TYPE('a) + 1) * (1 / real (r n)) \<le> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0 \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0 \<le> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0 \<le> 0

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
using xi fxi
[PROOF STATE]
proof (prove)
using this:
additive_strength f xi - (2 * deltaG TYPE('a) + 1) * 0 \<le> 0
(\<lambda>n. to_Gromov_completion ((f ^^ r n) basepoint)) \<longlonglongrightarrow> xi
xi \<in> Gromov_boundary
Gromov_extension f xi = xi

goal (1 subgoal):
 1. \<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>xi\<in>Gromov_boundary. Gromov_extension f xi = xi \<and> additive_strength f xi \<le> 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tc_mult_scalar: "tc (p \<odot> q) = punit.tc p * tc (q::'t \<Rightarrow>\<^sub>0 'b::semiring_no_zero_divisors)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
proof (cases "p = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p = 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
 2. p \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p = 0

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
 2. p \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p = 0

goal (1 subgoal):
 1. tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
by (simp add: tc_def)
[PROOF STATE]
proof (state)
this:
tc (p \<odot> q) = punit.tc p * tc q

goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
p \<noteq> 0

goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
proof (cases "q = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. q = 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
 2. q \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
q = 0

goal (2 subgoals):
 1. q = 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
 2. q \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
q = 0

goal (1 subgoal):
 1. tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
by (simp add: tc_def)
[PROOF STATE]
proof (state)
this:
tc (p \<odot> q) = punit.tc p * tc q

goal (1 subgoal):
 1. q \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. q \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
q \<noteq> 0

goal (1 subgoal):
 1. q \<noteq> 0 \<Longrightarrow> tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
with \<open>p \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
p \<noteq> 0
q \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0
q \<noteq> 0

goal (1 subgoal):
 1. tc (p \<odot> q) = punit.tc p * tc q
[PROOF STEP]
by (simp add: tc_def tt_mult_scalar lookup_mult_scalar_tt_tt)
[PROOF STATE]
proof (state)
this:
tc (p \<odot> q) = punit.tc p * tc q

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
tc (p \<odot> q) = punit.tc p * tc q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_local_ordering_intro:
  assumes "finite X"
    and "\<forall>n < card X. f n \<in> X"
    and "\<forall>x \<in> X. \<exists>n < card X. f n = x"
    and "\<forall>n n' n''. Suc n = n' \<and> Suc n' = n'' \<and> n'' < card X \<longrightarrow> ord (f n) (f n') (f n'')"
  shows "local_ordering f ord X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_ordering f ord X
[PROOF STEP]
unfolding local_ordering_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>n. (finite X \<longrightarrow> n < card X) \<longrightarrow> f n \<in> X) \<and> (\<forall>x\<in>X. \<exists>n. (finite X \<longrightarrow> n < card X) \<and> f n = x) \<and> (\<forall>n. (finite X \<longrightarrow> Suc (Suc n) < card X) \<longrightarrow> ord (f n) (f (Suc n)) (f (Suc (Suc n))))
[PROOF STEP]
by (simp add: assms)


[STATEMENT]
lemma face_of_imp_convex: "T face_of S \<Longrightarrow> convex T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T face_of S \<Longrightarrow> convex T
[PROOF STEP]
using face_of_def
[PROOF STATE]
proof (prove)
using this:
(?T face_of ?S) = (?T \<subseteq> ?S \<and> convex ?T \<and> (\<forall>a\<in>?S. \<forall>b\<in>?S. \<forall>x\<in>?T. x \<in> open_segment a b \<longrightarrow> a \<in> ?T \<and> b \<in> ?T))

goal (1 subgoal):
 1. T face_of S \<Longrightarrow> convex T
[PROOF STEP]
by blast


[STATEMENT]
lemma equiv_subseteq_in_sym:
  "\<lbrakk> r `` X \<subseteq> X;  (x, y) \<in> r; y \<in> X; equiv Y r; X \<subseteq> Y \<rbrakk> \<Longrightarrow> x \<in> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r `` X \<subseteq> X; (x, y) \<in> r; y \<in> X; equiv Y r; X \<subseteq> Y\<rbrakk> \<Longrightarrow> x \<in> X
[PROOF STEP]
unfolding equiv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r `` X \<subseteq> X; (x, y) \<in> r; y \<in> X; refl_on Y r \<and> sym r \<and> trans r; X \<subseteq> Y\<rbrakk> \<Longrightarrow> x \<in> X
[PROOF STEP]
by (auto dest: symD)


[STATEMENT]
lemma DERIV_neg_dec_right:
  fixes f :: "real \<Rightarrow> real"
  shows "DERIV f x :> l \<Longrightarrow> l < 0 \<Longrightarrow> \<exists>d > 0. \<forall>h > 0. h < d \<longrightarrow> f x > f (x + h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f has_real_derivative l) (at x); l < 0\<rbrakk> \<Longrightarrow> \<exists>d>0. \<forall>h>0. h < d \<longrightarrow> f (x + h) < f x
[PROOF STEP]
using has_real_derivative_neg_dec_right
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(?f has_real_derivative ?l) (at ?x within ?S); ?l < 0\<rbrakk> \<Longrightarrow> \<exists>d>0. \<forall>h>0. ?x + h \<in> ?S \<longrightarrow> h < d \<longrightarrow> ?f (?x + h) < ?f ?x

goal (1 subgoal):
 1. \<lbrakk>(f has_real_derivative l) (at x); l < 0\<rbrakk> \<Longrightarrow> \<exists>d>0. \<forall>h>0. h < d \<longrightarrow> f (x + h) < f x
[PROOF STEP]
by blast


[STATEMENT]
lemma det_nonzero_congruence:
  assumes eq:"A * M = B * M" and det:"det (M::'a mat) \<noteq> 0"
  and M: "M \<in> carrier_mat n n" and carr:"A \<in> carrier_mat n n" "B \<in> carrier_mat n n"
  shows "A = B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A = B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A = B
[PROOF STEP]
have "1\<^sub>m n \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1\<^sub>m n \<in> carrier_mat n n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1\<^sub>m n \<in> carrier_mat n n

goal (1 subgoal):
 1. A = B
[PROOF STEP]
from det_non_zero_imp_unit[OF M det] gauss_jordan_check_invertable[OF M this]
[PROOF STATE]
proof (chain)
picking this:
M \<in> Units (ring_mat TYPE('a) n ?b)
(M \<in> Units (ring_mat TYPE('a) n ?b)) = (fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n)
[PROOF STEP]
have gj_fst:"(fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n)"
[PROOF STATE]
proof (prove)
using this:
M \<in> Units (ring_mat TYPE('a) n ?b)
(M \<in> Units (ring_mat TYPE('a) n ?b)) = (fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n)

goal (1 subgoal):
 1. fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n

goal (1 subgoal):
 1. A = B
[PROOF STEP]
define Mi where "Mi = snd (gauss_jordan M (1\<^sub>m n))"
[PROOF STATE]
proof (state)
this:
Mi = snd (gauss_jordan M (1\<^sub>m n))

goal (1 subgoal):
 1. A = B
[PROOF STEP]
with gj_fst
[PROOF STATE]
proof (chain)
picking this:
fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n
Mi = snd (gauss_jordan M (1\<^sub>m n))
[PROOF STEP]
have gj:"gauss_jordan M (1\<^sub>m n) = (1\<^sub>m n, Mi)"
[PROOF STATE]
proof (prove)
using this:
fst (gauss_jordan M (1\<^sub>m n)) = 1\<^sub>m n
Mi = snd (gauss_jordan M (1\<^sub>m n))

goal (1 subgoal):
 1. gauss_jordan M (1\<^sub>m n) = (1\<^sub>m n, Mi)
[PROOF STEP]
unfolding fst_def snd_def
[PROOF STATE]
proof (prove)
using this:
(case gauss_jordan M (1\<^sub>m n) of (x1, x2) \<Rightarrow> x1) = 1\<^sub>m n
Mi = (case gauss_jordan M (1\<^sub>m n) of (x1, x2) \<Rightarrow> x2)

goal (1 subgoal):
 1. gauss_jordan M (1\<^sub>m n) = (1\<^sub>m n, Mi)
[PROOF STEP]
by (auto split:prod.split)
[PROOF STATE]
proof (state)
this:
gauss_jordan M (1\<^sub>m n) = (1\<^sub>m n, Mi)

goal (1 subgoal):
 1. A = B
[PROOF STEP]
from gauss_jordan_compute_inverse(1,3)[OF M gj]
[PROOF STATE]
proof (chain)
picking this:
M * Mi = 1\<^sub>m n
Mi \<in> carrier_mat n n
[PROOF STEP]
have Mi: "Mi \<in> carrier_mat n n" and is1:"M * Mi = 1\<^sub>m n"
[PROOF STATE]
proof (prove)
using this:
M * Mi = 1\<^sub>m n
Mi \<in> carrier_mat n n

goal (1 subgoal):
 1. Mi \<in> carrier_mat n n &&& M * Mi = 1\<^sub>m n
[PROOF STEP]
by metis+
[PROOF STATE]
proof (state)
this:
Mi \<in> carrier_mat n n
M * Mi = 1\<^sub>m n

goal (1 subgoal):
 1. A = B
[PROOF STEP]
from arg_cong[OF eq, of "\<lambda> M. M * Mi"]
[PROOF STATE]
proof (chain)
picking this:
A * M * Mi = B * M * Mi
[PROOF STEP]
show "A = B"
[PROOF STATE]
proof (prove)
using this:
A * M * Mi = B * M * Mi

goal (1 subgoal):
 1. A = B
[PROOF STEP]
unfolding carr[THEN assoc_mult_mat[OF _ M Mi]] is1 carr[THEN right_mult_one_mat]
[PROOF STATE]
proof (prove)
using this:
A = B

goal (1 subgoal):
 1. A = B
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
A = B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma chsh_real:
  fixes A0::real
  assumes "\<bar>A0 * B1\<bar> \<le> 1"
  and "\<bar>A0 * B0\<bar> \<le> 1"
  and "\<bar>A1 * B0\<bar> \<le> 1"
  and "\<bar>A1 * B1\<bar> \<le> 1"
  shows "\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1*B1\<bar> \<le> 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = A0 * B1 * (1 + A1*B0) - A0 * B0 * (1 + A1* B1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)
[PROOF STEP]
by (metis (no_types, opaque_lifting) add_diff_cancel_right calculation diff_add_eq
        group_cancel.sub1 mult.commute mult.right_neutral
        vector_space_over_itself.scale_left_commute
        vector_space_over_itself.scale_right_diff_distrib
        vector_space_over_itself.scale_right_distrib
        vector_space_over_itself.scale_scale)
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)
[PROOF STEP]
have "A0 * B1 - A0 * B0 = A0 * B1 * (1 + A1*B0) - A0 * B0 * (1 + A1* B1)"
[PROOF STATE]
proof (prove)
using this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)

goal (1 subgoal):
 1. A0 * B1 - A0 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
hence "\<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 + A1*B0)\<bar> + \<bar>A0 * B0 * (1 + A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
using this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 + A1 * B0) - A0 * B0 * (1 + A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 + A1 * B0)\<bar> + \<bar>A0 * B0 * (1 + A1 * B1)\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 + A1 * B0)\<bar> + \<bar>A0 * B0 * (1 + A1 * B1)\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 + A1 * B0)\<bar> + \<bar>A0 * B0 * (1 + A1 * B1)\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = \<bar>A0 * B1\<bar> * \<bar>(1 + A1*B0)\<bar> + \<bar>A0 * B0\<bar> * \<bar>(1 + A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1 * (1 + A1 * B0)\<bar> + \<bar>A0 * B0 * (1 + A1 * B1)\<bar> = \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
by (simp add: abs_mult)
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 * (1 + A1 * B0)\<bar> + \<bar>A0 * B0 * (1 + A1 * B1)\<bar> = \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 * (1 + A1 * B0)\<bar> + \<bar>A0 * B0 * (1 + A1 * B1)\<bar> = \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... \<le> \<bar>(1 + A1*B0)\<bar> + \<bar>(1 + A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
have "\<bar>A0 * B1\<bar> * \<bar>(1 + A1*B0)\<bar> \<le> \<bar>(1 + A1*B0)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>
[PROOF STEP]
using assms(1) mult_left_le_one_le[of "\<bar>(1 + A1*B0)\<bar>"]
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> \<le> 1
\<lbrakk>0 \<le> \<bar>1 + A1 * B0\<bar>; 0 \<le> ?y; ?y \<le> 1\<rbrakk> \<Longrightarrow> ?y * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
have "\<bar>A0 * B0\<bar> *\<bar>(1 + A1* B1)\<bar> \<le> \<bar>(1 + A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
using assms mult_left_le_one_le[of "\<bar>(1 + A1*B1)\<bar>"]
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> \<le> 1
\<bar>A0 * B0\<bar> \<le> 1
\<bar>A1 * B0\<bar> \<le> 1
\<bar>A1 * B1\<bar> \<le> 1
\<lbrakk>0 \<le> \<bar>1 + A1 * B1\<bar>; 0 \<le> ?y; ?y \<le> 1\<rbrakk> \<Longrightarrow> ?y * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>
\<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> \<le> \<bar>1 + A1 * B0\<bar>
\<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 + A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 + A1 * B1\<bar> \<le> \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = 1 + A1*B0 + 1 + A1* B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar> = 1 + A1 * B0 + 1 + A1 * B1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> \<le> 1
\<bar>A0 * B0\<bar> \<le> 1
\<bar>A1 * B0\<bar> \<le> 1
\<bar>A1 * B1\<bar> \<le> 1

goal (1 subgoal):
 1. \<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar> = 1 + A1 * B0 + 1 + A1 * B1
[PROOF STEP]
by (simp add: abs_le_iff)
[PROOF STATE]
proof (state)
this:
\<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar> = 1 + A1 * B0 + 1 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>1 + A1 * B0\<bar> + \<bar>1 + A1 * B1\<bar> = 1 + A1 * B0 + 1 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = 2 + A1 * B0 + A1 * B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 + A1 * B0 + 1 + A1 * B1 = 2 + A1 * B0 + A1 * B1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 + A1 * B0 + 1 + A1 * B1 = 2 + A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 + A1 * B0 + A1 * B1
[PROOF STEP]
have pls: "\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 + A1 * B0 + A1 * B1"
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 + A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 + A1 * B0 + A1 * B1
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 + A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 = A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = A0 * B1 * (1 - A1*B0) - A0 * B0 * (1 - A1* B1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)
[PROOF STEP]
have "A0 * (B1 - (B0 - A1 * (B1 * B0)) - A1 * (B1 * B0)) = A0 * (B1 - B0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A0 * (B1 - (B0 - A1 * (B1 * B0)) - A1 * (B1 * B0)) = A0 * (B1 - B0)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
A0 * (B1 - (B0 - A1 * (B1 * B0)) - A1 * (B1 * B0)) = A0 * (B1 - B0)

goal (1 subgoal):
 1. A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A0 * (B1 - (B0 - A1 * (B1 * B0)) - A1 * (B1 * B0)) = A0 * (B1 - B0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A0 * (B1 - (B0 - A1 * (B1 * B0)) - A1 * (B1 * B0)) = A0 * (B1 - B0)

goal (1 subgoal):
 1. A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)
[PROOF STEP]
by (metis (no_types) add.commute calculation diff_diff_add mult.right_neutral
          vector_space_over_itself.scale_left_commute
          vector_space_over_itself.scale_right_diff_distrib vector_space_over_itself.scale_scale)
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 + A0 * B1 * A1 * B0 - A0 * B1 * A1 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)
[PROOF STEP]
have "A0 * B1 - A0 * B0 = A0 * B1 * (1 - A1*B0) - A0 * B0 * (1 - A1* B1)"
[PROOF STATE]
proof (prove)
using this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)

goal (1 subgoal):
 1. A0 * B1 - A0 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
hence "\<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 - A1*B0)\<bar> + \<bar>A0 * B0 * (1 - A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
using this:
A0 * B1 - A0 * B0 = A0 * B1 * (1 - A1 * B0) - A0 * B0 * (1 - A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 - A1 * B0)\<bar> + \<bar>A0 * B0 * (1 - A1 * B1)\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 - A1 * B0)\<bar> + \<bar>A0 * B0 * (1 - A1 * B1)\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> \<bar>A0 * B1 * (1 - A1 * B0)\<bar> + \<bar>A0 * B0 * (1 - A1 * B1)\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = \<bar>A0 * B1\<bar> * \<bar>(1 - A1*B0)\<bar> + \<bar>A0 * B0\<bar> * \<bar>(1 - A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1 * (1 - A1 * B0)\<bar> + \<bar>A0 * B0 * (1 - A1 * B1)\<bar> = \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
by (simp add: abs_mult)
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 * (1 - A1 * B0)\<bar> + \<bar>A0 * B0 * (1 - A1 * B1)\<bar> = \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 * (1 - A1 * B0)\<bar> + \<bar>A0 * B0 * (1 - A1 * B1)\<bar> = \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... \<le> \<bar>(1 - A1*B0)\<bar> + \<bar>(1 - A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
have "\<bar>A0 * B1\<bar> * \<bar>(1 - A1*B0)\<bar> \<le> \<bar>(1 - A1*B0)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>
[PROOF STEP]
using assms(1) mult_left_le_one_le[of "\<bar>(1 - A1*B0)\<bar>"]
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> \<le> 1
\<lbrakk>0 \<le> \<bar>1 - A1 * B0\<bar>; 0 \<le> ?y; ?y \<le> 1\<rbrakk> \<Longrightarrow> ?y * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
have "\<bar>A0 * B0\<bar> *\<bar>(1 - A1* B1)\<bar> \<le> \<bar>(1 - A1* B1)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
using assms mult_left_le_one_le[of "\<bar>(1 - A1*B1)\<bar>"]
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> \<le> 1
\<bar>A0 * B0\<bar> \<le> 1
\<bar>A1 * B0\<bar> \<le> 1
\<bar>A1 * B1\<bar> \<le> 1
\<lbrakk>0 \<le> \<bar>1 - A1 * B1\<bar>; 0 \<le> ?y; ?y \<le> 1\<rbrakk> \<Longrightarrow> ?y * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>
\<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> \<le> \<bar>1 - A1 * B0\<bar>
\<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1\<bar> * \<bar>1 - A1 * B0\<bar> + \<bar>A0 * B0\<bar> * \<bar>1 - A1 * B1\<bar> \<le> \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = 1 - A1*B0 + 1 - A1* B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar> = 1 - A1 * B0 + 1 - A1 * B1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1\<bar> \<le> 1
\<bar>A0 * B0\<bar> \<le> 1
\<bar>A1 * B0\<bar> \<le> 1
\<bar>A1 * B1\<bar> \<le> 1

goal (1 subgoal):
 1. \<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar> = 1 - A1 * B0 + 1 - A1 * B1
[PROOF STEP]
by (simp add: abs_le_iff)
[PROOF STATE]
proof (state)
this:
\<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar> = 1 - A1 * B0 + 1 - A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>1 - A1 * B0\<bar> + \<bar>1 - A1 * B1\<bar> = 1 - A1 * B0 + 1 - A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... = 2 - A1 * B0 - A1 * B1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 - A1 * B0 + 1 - A1 * B1 = 2 - A1 * B0 - A1 * B1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 - A1 * B0 + 1 - A1 * B1 = 2 - A1 * B0 - A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - A1 * B0 - A1 * B1
[PROOF STEP]
have mns: "\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - (A1 * B0 + A1 * B1)"
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - A1 * B0 - A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - (A1 * B0 + A1 * B1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - (A1 * B0 + A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have ls: "\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
proof (cases "0 \<le> A1 * B0 + A1 * B1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
 2. \<not> 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
0 \<le> A1 * B0 + A1 * B1

goal (2 subgoals):
 1. 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
 2. \<not> 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> A1 * B0 + A1 * B1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 \<le> A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
using mns
[PROOF STATE]
proof (prove)
using this:
0 \<le> A1 * B0 + A1 * B1
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - (A1 * B0 + A1 * B1)

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<not> 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> 0 \<le> A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<not> 0 \<le> A1 * B0 + A1 * B1 \<Longrightarrow> \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> 0 \<le> A1 * B0 + A1 * B1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> 0 \<le> A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
using pls
[PROOF STATE]
proof (prove)
using this:
\<not> 0 \<le> A1 * B0 + A1 * B1
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 + A1 * B0 + A1 * B1

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> \<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> \<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> \<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> \<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
have "... \<le> 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
using ls
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1 - A0 * B0\<bar> \<le> 2 - \<bar>A1 * B0 + A1 * B1\<bar>

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0\<bar> + \<bar>A1 * B0 + A1 * B1\<bar> \<le> 2

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2

goal (1 subgoal):
 1. \<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>A0 * B1 - A0 * B0 + A1 * B0 + A1 * B1\<bar> \<le> 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mergesort_by_rel_split_length :
  "length (fst (mergesort_by_rel_split (xs1, xs2) xs)) = length xs1 + (length xs div 2) + (length xs mod 2) \<and>
   length (snd (mergesort_by_rel_split (xs1, xs2) xs)) = length xs2 + (length xs div 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (fst (mergesort_by_rel_split (xs1, xs2) xs)) = length xs1 + length xs div 2 + length xs mod 2 \<and> length (snd (mergesort_by_rel_split (xs1, xs2) xs)) = length xs2 + length xs div 2
[PROOF STEP]
by (induct xs arbitrary: xs1 xs2 rule: list_induct_first2)
   (simp_all)


[STATEMENT]
lemma power_by_squaring: "efficient_funpow (*) (1 :: 'a) = (^)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. efficient_funpow (*) (1::'a) = (^)
[PROOF STEP]
proof (intro ext)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. efficient_funpow (*) (1::'a) x xa = x ^ xa
[PROOF STEP]
fix x :: 'a and n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. efficient_funpow (*) (1::'a) x xa = x ^ xa
[PROOF STEP]
have "efficient_funpow (*) 1 x n = ((*) x ^^ n) 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. efficient_funpow (*) (1::'a) x n = ((*) x ^^ n) (1::'a)
[PROOF STEP]
by (subst efficient_funpow_correct) (simp_all add: mult.assoc)
[PROOF STATE]
proof (state)
this:
efficient_funpow (*) (1::'a) x n = ((*) x ^^ n) (1::'a)

goal (1 subgoal):
 1. \<And>x xa. efficient_funpow (*) (1::'a) x xa = x ^ xa
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
efficient_funpow (*) (1::'a) x n = ((*) x ^^ n) (1::'a)

goal (1 subgoal):
 1. \<And>x xa. efficient_funpow (*) (1::'a) x xa = x ^ xa
[PROOF STEP]
have "\<dots> = x ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((*) x ^^ n) (1::'a) = x ^ n
[PROOF STEP]
by (induction n) simp_all
[PROOF STATE]
proof (state)
this:
((*) x ^^ n) (1::'a) = x ^ n

goal (1 subgoal):
 1. \<And>x xa. efficient_funpow (*) (1::'a) x xa = x ^ xa
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
efficient_funpow (*) (1::'a) x n = x ^ n
[PROOF STEP]
show "efficient_funpow (*) 1 x n = x ^ n"
[PROOF STATE]
proof (prove)
using this:
efficient_funpow (*) (1::'a) x n = x ^ n

goal (1 subgoal):
 1. efficient_funpow (*) (1::'a) x n = x ^ n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
efficient_funpow (*) (1::'a) x n = x ^ n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma isCont_o2: "isCont f a \<Longrightarrow> isCont g (f a) \<Longrightarrow> isCont (\<lambda>x. g (f x)) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>isCont f a; isCont g (f a)\<rbrakk> \<Longrightarrow> isCont (\<lambda>x. g (f x)) a
[PROOF STEP]
unfolding isCont_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<midarrow>a\<rightarrow> f a; g \<midarrow>f a\<rightarrow> g (f a)\<rbrakk> \<Longrightarrow> (\<lambda>x. g (f x)) \<midarrow>a\<rightarrow> g (f a)
[PROOF STEP]
by (rule tendsto_compose)


[STATEMENT]
lemma "rec_BinTree l n (Node x y) = n x y (rec_BinTree l n x) (rec_BinTree l n y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rec_BinTree l n (Node x y) = n x y (rec_BinTree l n x) (rec_BinTree l n y)
[PROOF STEP]
nitpick [card = 1-5, expect = none]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rec_BinTree l n (Node x y) = n x y (rec_BinTree l n x) (rec_BinTree l n y)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Ln'_cis:
  assumes "t \<in> {-pi / 2<..3 / 2 * pi}"
  shows   "Ln' (cis t) = \<i> * t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ln' (cis t) = \<i> * complex_of_real t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Ln' (cis t) = \<i> * complex_of_real t
[PROOF STEP]
have "exp (\<i> * pi / 2) = \<i>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp (\<i> * complex_of_real pi / 2) = \<i>
[PROOF STEP]
by (simp add: exp_eq_polar)
[PROOF STATE]
proof (state)
this:
exp (\<i> * complex_of_real pi / 2) = \<i>

goal (1 subgoal):
 1. Ln' (cis t) = \<i> * complex_of_real t
[PROOF STEP]
hence "Ln (- (\<i> * cis t)) = \<i> * (t - pi / 2)"
[PROOF STATE]
proof (prove)
using this:
exp (\<i> * complex_of_real pi / 2) = \<i>

goal (1 subgoal):
 1. Ln (- (\<i> * cis t)) = \<i> * complex_of_real (t - pi / 2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
exp (\<i> * complex_of_real pi / 2) = \<i>
t \<in> {- pi / 2<..3 / 2 * pi}

goal (1 subgoal):
 1. Ln (- (\<i> * cis t)) = \<i> * complex_of_real (t - pi / 2)
[PROOF STEP]
by (intro Ln_unique) (auto simp: algebra_simps exp_diff cis_conv_exp)
[PROOF STATE]
proof (state)
this:
Ln (- (\<i> * cis t)) = \<i> * complex_of_real (t - pi / 2)

goal (1 subgoal):
 1. Ln' (cis t) = \<i> * complex_of_real t
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Ln (- (\<i> * cis t)) = \<i> * complex_of_real (t - pi / 2)

goal (1 subgoal):
 1. Ln' (cis t) = \<i> * complex_of_real t
[PROOF STEP]
by (simp add: Ln'_def algebra_simps)
[PROOF STATE]
proof (state)
this:
Ln' (cis t) = \<i> * complex_of_real t

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cinner_sup_norm: \<open>norm \<psi> = (SUP \<phi>. cmod (cinner \<phi> \<psi>) / norm \<phi>)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm \<psi> = (SUP \<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)
[PROOF STEP]
proof (rule sym, rule cSup_eq_maximum)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. norm \<psi> \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)
 2. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
have \<open>norm \<psi> = cmod (cinner \<psi> \<psi>) / norm \<psi>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm \<psi> = cmod (\<psi> \<bullet>\<^sub>C \<psi>) / norm \<psi>
[PROOF STEP]
by (metis norm_eq_sqrt_cinner norm_ge_zero real_div_sqrt)
[PROOF STATE]
proof (state)
this:
norm \<psi> = cmod (\<psi> \<bullet>\<^sub>C \<psi>) / norm \<psi>

goal (2 subgoals):
 1. norm \<psi> \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)
 2. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
norm \<psi> = cmod (\<psi> \<bullet>\<^sub>C \<psi>) / norm \<psi>
[PROOF STEP]
show \<open>norm \<psi> \<in> range (\<lambda>\<phi>. cmod (cinner \<phi> \<psi>) / norm \<phi>)\<close>
[PROOF STATE]
proof (prove)
using this:
norm \<psi> = cmod (\<psi> \<bullet>\<^sub>C \<psi>) / norm \<psi>

goal (1 subgoal):
 1. norm \<psi> \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
norm \<psi> \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)

goal (1 subgoal):
 1. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
assume \<open>n \<in> range (\<lambda>\<phi>. cmod (cinner \<phi> \<psi>) / norm \<phi>)\<close>
[PROOF STATE]
proof (state)
this:
n \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)

goal (1 subgoal):
 1. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)
[PROOF STEP]
obtain \<phi> where n\<phi>: \<open>n = cmod (cinner \<phi> \<psi>) / norm \<phi>\<close>
[PROOF STATE]
proof (prove)
using this:
n \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>)

goal (1 subgoal):
 1. (\<And>\<phi>. n = cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n = cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>

goal (1 subgoal):
 1. \<And>x. x \<in> range (\<lambda>\<phi>. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi>) \<Longrightarrow> x \<le> norm \<psi>
[PROOF STEP]
show \<open>n \<le> norm \<psi>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<le> norm \<psi>
[PROOF STEP]
unfolding n\<phi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (\<phi> \<bullet>\<^sub>C \<psi>) / norm \<phi> \<le> norm \<psi>
[PROOF STEP]
by (simp add: complex_inner_class.Cauchy_Schwarz_ineq2 divide_le_eq ordered_field_class.sign_simps(33))
[PROOF STATE]
proof (state)
this:
n \<le> norm \<psi>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rbt_lookup_rbt_baliL: "rbt_sorted l \<Longrightarrow> rbt_sorted r \<Longrightarrow> l |\<guillemotleft> a \<Longrightarrow> a \<guillemotleft>| r \<Longrightarrow>
  rbt_lookup (rbt_baliL l a b r) k =
  (if k < a then rbt_lookup l k else if k = a then Some b else rbt_lookup r k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rbt_sorted l; rbt_sorted r; l |\<guillemotleft> a; a \<guillemotleft>| r\<rbrakk> \<Longrightarrow> rbt_lookup (rbt_baliL l a b r) k = (if k < a then rbt_lookup l k else if k = a then Some b else rbt_lookup r k)
[PROOF STEP]
by (cases "(l,a,b,r)" rule: rbt_baliL.cases) (auto split!: if_splits)


[STATEMENT]
lemma filter_replace2:
 "\<lbrakk> \<not> P x; \<forall>y\<in> set ys. \<not> P y \<rbrakk> \<Longrightarrow>
  filter P (replace x ys xs) = filter P xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs
[PROOF STEP]
apply(cases "x \<in> set xs")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs
 2. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<notin> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<notin> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs
 2. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs
[PROOF STEP]
apply(simp add:replace2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs
[PROOF STEP]
apply(induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set []\<rbrakk> \<Longrightarrow> filter P (replace x ys []) = filter P []
 2. \<And>a xs. \<lbrakk>\<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs; \<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set (a # xs)\<rbrakk> \<Longrightarrow> filter P (replace x ys (a # xs)) = filter P (a # xs)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>\<lbrakk>\<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set xs\<rbrakk> \<Longrightarrow> filter P (replace x ys xs) = filter P xs; \<not> P x; \<forall>y\<in>set ys. \<not> P y; x \<in> set (a # xs)\<rbrakk> \<Longrightarrow> filter P (replace x ys (a # xs)) = filter P (a # xs)
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma is_factorization_of_factor_complex_main:
  assumes "factor_complex_main p = fctrs"
  shows   "is_factorization_of fctrs p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_factorization_of fctrs p
[PROOF STEP]
unfolding is_factorization_of_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interp_factorization fctrs = p \<and> distinct (map fst (snd fctrs))
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. interp_factorization fctrs = p
 2. distinct (map fst (snd fctrs))
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
factor_complex_main p = fctrs
[PROOF STEP]
have "p = Polynomial.smult (fst fctrs) (\<Prod>(x, i)\<leftarrow>snd fctrs. [:- x, 1:] ^ Suc i)"
[PROOF STATE]
proof (prove)
using this:
factor_complex_main p = fctrs

goal (1 subgoal):
 1. p = smult (fst fctrs) (\<Prod>(x, i)\<leftarrow>snd fctrs. [:- x, 1:] ^ Suc i)
[PROOF STEP]
by (intro factor_complex_main) simp_all
[PROOF STATE]
proof (state)
this:
p = smult (fst fctrs) (\<Prod>(x, i)\<leftarrow>snd fctrs. [:- x, 1:] ^ Suc i)

goal (2 subgoals):
 1. interp_factorization fctrs = p
 2. distinct (map fst (snd fctrs))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
p = smult (fst fctrs) (\<Prod>(x, i)\<leftarrow>snd fctrs. [:- x, 1:] ^ Suc i)

goal (2 subgoals):
 1. interp_factorization fctrs = p
 2. distinct (map fst (snd fctrs))
[PROOF STEP]
have "\<dots> = interp_factorization fctrs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smult (fst fctrs) (\<Prod>(x, i)\<leftarrow>snd fctrs. [:- x, 1:] ^ Suc i) = interp_factorization fctrs
[PROOF STEP]
by (simp add: interp_factorization_def case_prod_unfold)
[PROOF STATE]
proof (state)
this:
smult (fst fctrs) (\<Prod>(x, i)\<leftarrow>snd fctrs. [:- x, 1:] ^ Suc i) = interp_factorization fctrs

goal (2 subgoals):
 1. interp_factorization fctrs = p
 2. distinct (map fst (snd fctrs))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
p = interp_factorization fctrs
[PROOF STEP]
show "interp_factorization fctrs = p"
[PROOF STATE]
proof (prove)
using this:
p = interp_factorization fctrs

goal (1 subgoal):
 1. interp_factorization fctrs = p
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
interp_factorization fctrs = p

goal (1 subgoal):
 1. distinct (map fst (snd fctrs))
[PROOF STEP]
show "distinct (map fst (snd fctrs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map fst (snd fctrs))
[PROOF STEP]
unfolding assms[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map fst (snd (factor_complex_main p)))
[PROOF STEP]
by (rule distinct_factor_complex_main)
[PROOF STATE]
proof (state)
this:
distinct (map fst (snd fctrs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ListUpdate_E: "ListUpdateE f xs = ListUpdate f xs (%e x. e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ListUpdateE f xs = ListUpdate f xs (\<lambda>e x. e)
[PROOF STEP]
apply(induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ListUpdateE f [] = ListUpdate f [] (\<lambda>e x. e)
 2. \<And>a xs. ListUpdateE f xs = ListUpdate f xs (\<lambda>e x. e) \<Longrightarrow> ListUpdateE f (a # xs) = ListUpdate f (a # xs) (\<lambda>e x. e)
[PROOF STEP]
apply(simp_all)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs. ListUpdateE f xs = ListUpdate f xs (\<lambda>e x. e) \<Longrightarrow> ListUpdateE f (a # xs) = ListUpdate f (a # xs) (\<lambda>e x. e)
[PROOF STEP]
subgoal for a xs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ListUpdateE f xs = ListUpdate f xs (\<lambda>e x. e) \<Longrightarrow> ListUpdateE f (a # xs) = ListUpdate f (a # xs) (\<lambda>e x. e)
[PROOF STEP]
apply(cases a)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>aa b c. \<lbrakk>ListUpdateE f xs = ListUpdate f xs (\<lambda>e x. e); a = (aa, b, c)\<rbrakk> \<Longrightarrow> ListUpdateE f (a # xs) = ListUpdate f (a # xs) (\<lambda>e x. e)
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Lim_bounded2:
  fixes f :: "nat \<Rightarrow> 'a::linorder_topology"
  assumes lim:"f \<longlonglongrightarrow> l" and ge: "\<forall>n\<ge>N. f n \<ge> C"
  shows "l \<ge> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<le> l
[PROOF STEP]
using ge
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<ge>N. C \<le> f n

goal (1 subgoal):
 1. C \<le> l
[PROOF STEP]
by (intro tendsto_le[OF trivial_limit_sequentially lim tendsto_const])
     (auto simp: eventually_sequentially)


[STATEMENT]
lemma elts_subset_ON: "Ord \<alpha> \<Longrightarrow> elts \<alpha> \<subseteq> ON"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ord \<alpha> \<Longrightarrow> elts \<alpha> \<subseteq> ON
[PROOF STEP]
using Ord_in_Ord
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Ord ?k; ?m \<in> elts ?k\<rbrakk> \<Longrightarrow> Ord ?m

goal (1 subgoal):
 1. Ord \<alpha> \<Longrightarrow> elts \<alpha> \<subseteq> ON
[PROOF STEP]
by blast


[STATEMENT]
lemma min_Length_fMin[simp]: "x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> min (Length \<AA>) (fMin (m1\<^bsup>\<AA>\<^esup>k)) = fMin (m1\<^bsup>\<AA>\<^esup>k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> min (Length \<AA>) (fMin (m1\<^bsup>\<AA>\<^esup>k)) = fMin (m1\<^bsup>\<AA>\<^esup>k)
[PROOF STEP]
using fMin_less_Length[of x m1 \<AA> k]
[PROOF STATE]
proof (prove)
using this:
x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> fMin (m1\<^bsup>\<AA>\<^esup>k) < Length \<AA>

goal (1 subgoal):
 1. x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> min (Length \<AA>) (fMin (m1\<^bsup>\<AA>\<^esup>k)) = fMin (m1\<^bsup>\<AA>\<^esup>k)
[PROOF STEP]
unfolding fMin_def
[PROOF STATE]
proof (prove)
using this:
x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> semilattice_fset.F min (m1\<^bsup>\<AA>\<^esup>k) < Length \<AA>

goal (1 subgoal):
 1. x |\<in>| m1\<^bsup>\<AA>\<^esup>k \<Longrightarrow> min (Length \<AA>) (semilattice_fset.F min (m1\<^bsup>\<AA>\<^esup>k)) = semilattice_fset.F min (m1\<^bsup>\<AA>\<^esup>k)
[PROOF STEP]
by auto


[STATEMENT]
lemma tensor_mat_zero2:
  shows "tensor_mat m1 (0\<^sub>m d2 d2) = 0\<^sub>m d d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tensor_mat m1 (0\<^sub>m d2 d2) = 0\<^sub>m d d
[PROOF STEP]
apply (rule eq_matI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (0\<^sub>m d d); j < dim_col (0\<^sub>m d d)\<rbrakk> \<Longrightarrow> tensor_mat m1 (0\<^sub>m d2 d2) $$ (i, j) = 0\<^sub>m d d $$ (i, j)
 2. dim_row (tensor_mat m1 (0\<^sub>m d2 d2)) = dim_row (0\<^sub>m d d)
 3. dim_col (tensor_mat m1 (0\<^sub>m d2 d2)) = dim_col (0\<^sub>m d d)
[PROOF STEP]
by (auto simp add: tensor_mat_eval)


[STATEMENT]
lemma "A > 1 \<Longrightarrow> (\<lambda>n. ((1 + 1 / sqrt A) / 2) powr real_of_int (2 ^ Suc n)) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < A \<Longrightarrow> (\<lambda>n. ((1 + 1 / sqrt A) / 2) powr real_of_int (2 ^ Suc n)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (real_asymp simp: field_split_simps add_pos_pos)


[STATEMENT]
lemma has_complex_derivative_imp_has_vector_derivative:
  fixes f :: "complex \<Rightarrow> complex"
  assumes "(f has_field_derivative f') (at (of_real a) within (cbox (of_real x) (of_real y)))"
  shows "((f o of_real) has_vector_derivative f') (at a within {x..y})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<circ> complex_of_real has_vector_derivative f') (at a within {x..y})
[PROOF STEP]
using has_derivative_in_compose[of of_real of_real a "{x..y}" f "(*) f'"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(complex_of_real has_derivative complex_of_real) (at a within {x..y}); (f has_derivative (*) f') (at (complex_of_real a) within complex_of_real ` {x..y})\<rbrakk> \<Longrightarrow> ((\<lambda>x. f (complex_of_real x)) has_derivative (\<lambda>x. f' * complex_of_real x)) (at a within {x..y})
(f has_field_derivative f') (at (complex_of_real a) within cbox (complex_of_real x) (complex_of_real y))

goal (1 subgoal):
 1. (f \<circ> complex_of_real has_vector_derivative f') (at a within {x..y})
[PROOF STEP]
by (simp add: scaleR_conv_of_real ac_simps has_vector_derivative_def has_field_derivative_def o_def cbox_complex_of_real)