[STATEMENT]
lemma Gromov_product_at_quasi_isometry:
  fixes f::"'a::Gromov_hyperbolic_space_geodesic \<Rightarrow> 'b::Gromov_hyperbolic_space_geodesic"
  assumes "lambda C-quasi_isometry f"
  shows "Gromov_product_at (f x) (f y) (f z) \<ge> Gromov_product_at x y z / lambda - 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
        "Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z) &&& Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "lambda \<ge> 1" "C \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> lambda &&& 0 \<le> C
[PROOF STEP]
using quasi_isometry_onD[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> dist (f ?x) (f ?y) \<le> lambda * dist ?x ?y + C
\<lbrakk>?x \<in> UNIV; ?y \<in> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * dist ?x ?y - C \<le> dist (f ?x) (f ?y)
1 \<le> lambda
0 \<le> C

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

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
define D where "D = 92 * lambda^2 * (C + deltaG(TYPE('b)))"
[PROOF STATE]
proof (state)
this:
D = 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have Dxy: "hausdorff_distance (f`{x--y}) {f x--f y} \<le> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hausdorff_distance (f ` {x--y}) {f x--f y} \<le> D
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hausdorff_distance (f ` {x--y}) {f x--f y} \<le> 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))
[PROOF STEP]
apply (rule geodesic_quasi_isometric_image[OF assms(1)])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. geodesic_segment_between {x--y} x y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hausdorff_distance (f ` {x--y}) {f x--f y} \<le> D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have Dyz: "hausdorff_distance (f`{y--z}) {f y--f z} \<le> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hausdorff_distance (f ` {y--z}) {f y--f z} \<le> D
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hausdorff_distance (f ` {y--z}) {f y--f z} \<le> 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))
[PROOF STEP]
apply (rule geodesic_quasi_isometric_image[OF assms(1)])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. geodesic_segment_between {y--z} y z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hausdorff_distance (f ` {y--z}) {f y--f z} \<le> D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have Dxz: "hausdorff_distance (f`{x--z}) {f x--f z} \<le> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hausdorff_distance (f ` {x--z}) {f x--f z} \<le> D
[PROOF STEP]
unfolding D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hausdorff_distance (f ` {x--z}) {f x--f z} \<le> 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))
[PROOF STEP]
apply (rule geodesic_quasi_isometric_image[OF assms(1)])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. geodesic_segment_between {x--z} x z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hausdorff_distance (f ` {x--z}) {f x--f z} \<le> D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
define E where "E = (lambda * (4 * deltaG(TYPE('a))) + C) + D"
[PROOF STATE]
proof (state)
this:
E = lambda * (4 * deltaG TYPE('a)) + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "E \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> E
[PROOF STEP]
unfolding E_def D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> lambda * (4 * deltaG TYPE('a)) + C + 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))
[PROOF STEP]
using \<open>lambda \<ge> 1\<close> \<open>C \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
1 \<le> lambda
0 \<le> C

goal (1 subgoal):
 1. 0 \<le> lambda * (4 * deltaG TYPE('a)) + C + 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
obtain w where w: "infdist w {x--y} \<le> 4 * deltaG(TYPE('a))"
                    "infdist w {x--z} \<le> 4 * deltaG(TYPE('a))"
                    "infdist w {y--z} \<le> 4 * deltaG(TYPE('a))"
                    "dist w x = Gromov_product_at x y z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>w. \<lbrakk>infdist w {x--y} \<le> 4 * deltaG TYPE('a); infdist w {x--z} \<le> 4 * deltaG TYPE('a); infdist w {y--z} \<le> 4 * deltaG TYPE('a); dist w x = Gromov_product_at x y z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using slim_triangle[of "{x--y}" x y "{x--z}" z "{y--z}"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>geodesic_segment_between {x--y} x y; geodesic_segment_between {x--z} x z; geodesic_segment_between {y--z} y z\<rbrakk> \<Longrightarrow> \<exists>w. infdist w {x--y} \<le> 4 * deltaG TYPE('a) \<and> infdist w {x--z} \<le> 4 * deltaG TYPE('a) \<and> infdist w {y--z} \<le> 4 * deltaG TYPE('a) \<and> dist w x = Gromov_product_at x y z \<and> w \<in> {x--y}

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>infdist w {x--y} \<le> 4 * deltaG TYPE('a); infdist w {x--z} \<le> 4 * deltaG TYPE('a); infdist w {y--z} \<le> 4 * deltaG TYPE('a); dist w x = Gromov_product_at x y z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist w {x--y} \<le> 4 * deltaG TYPE('a)
infdist w {x--z} \<le> 4 * deltaG TYPE('a)
infdist w {y--z} \<le> 4 * deltaG TYPE('a)
dist w x = Gromov_product_at x y z

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "infdist (f w) {f x--f y} \<le> infdist (f w) (f`{x--y}) + hausdorff_distance (f`{x--y}) {f x--f y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infdist (f w) {f x--f y} \<le> infdist (f w) (f ` {x--y}) + hausdorff_distance (f ` {x--y}) {f x--f y}
[PROOF STEP]
by (intro mono_intros quasi_isometry_on_bounded[OF quasi_isometry_on_subset[OF assms(1)], of "{x--y}"], auto)
[PROOF STATE]
proof (state)
this:
infdist (f w) {f x--f y} \<le> infdist (f w) (f ` {x--y}) + hausdorff_distance (f ` {x--y}) {f x--f y}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infdist (f w) {f x--f y} \<le> infdist (f w) (f ` {x--y}) + hausdorff_distance (f ` {x--y}) {f x--f y}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (lambda * infdist w {x--y} + C) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infdist (f w) (f ` {x--y}) + hausdorff_distance (f ` {x--y}) {f x--f y} \<le> lambda * infdist w {x--y} + C + D
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. infdist (f w) (f ` {x--y}) \<le> lambda * infdist w {x--y} + C
 2. hausdorff_distance (f ` {x--y}) {f x--f y} \<le> D
[PROOF STEP]
using quasi_isometry_on_infdist[OF assms(1)] Dxy
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?w \<in> UNIV; ?S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> infdist (f ?w) (f ` ?S) \<le> lambda * infdist ?w ?S + C
\<lbrakk>?w \<in> UNIV; ?S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * infdist ?w ?S - C \<le> infdist (f ?w) (f ` ?S)
hausdorff_distance (f ` {x--y}) {f x--f y} \<le> D

goal (2 subgoals):
 1. infdist (f w) (f ` {x--y}) \<le> lambda * infdist w {x--y} + C
 2. hausdorff_distance (f ` {x--y}) {f x--f y} \<le> D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist (f w) (f ` {x--y}) + hausdorff_distance (f ` {x--y}) {f x--f y} \<le> lambda * infdist w {x--y} + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infdist (f w) (f ` {x--y}) + hausdorff_distance (f ` {x--y}) {f x--f y} \<le> lambda * infdist w {x--y} + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (lambda * (4 * deltaG(TYPE('a))) + C) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lambda * infdist w {x--y} + C + D \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. infdist w {x--y} \<le> 4 * deltaG TYPE('a)
 2. 0 \<le> lambda
[PROOF STEP]
using w \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
infdist w {x--y} \<le> 4 * deltaG TYPE('a)
infdist w {x--z} \<le> 4 * deltaG TYPE('a)
infdist w {y--z} \<le> 4 * deltaG TYPE('a)
dist w x = Gromov_product_at x y z
1 \<le> lambda

goal (2 subgoals):
 1. infdist w {x--y} \<le> 4 * deltaG TYPE('a)
 2. 0 \<le> lambda
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lambda * infdist w {x--y} + C + D \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
infdist (f w) {f x--f y} \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
have Exy: "infdist (f w) {f x--f y} \<le> E"
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f x--f y} \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (1 subgoal):
 1. infdist (f w) {f x--f y} \<le> E
[PROOF STEP]
unfolding E_def
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f x--f y} \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (1 subgoal):
 1. infdist (f w) {f x--f y} \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist (f w) {f x--f y} \<le> E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "infdist (f w) {f y--f z} \<le> infdist (f w) (f`{y--z}) + hausdorff_distance (f`{y--z}) {f y--f z}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infdist (f w) {f y--f z} \<le> infdist (f w) (f ` {y--z}) + hausdorff_distance (f ` {y--z}) {f y--f z}
[PROOF STEP]
by (intro mono_intros quasi_isometry_on_bounded[OF quasi_isometry_on_subset[OF assms(1)], of "{y--z}"], auto)
[PROOF STATE]
proof (state)
this:
infdist (f w) {f y--f z} \<le> infdist (f w) (f ` {y--z}) + hausdorff_distance (f ` {y--z}) {f y--f z}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infdist (f w) {f y--f z} \<le> infdist (f w) (f ` {y--z}) + hausdorff_distance (f ` {y--z}) {f y--f z}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (lambda * infdist w {y--z} + C) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infdist (f w) (f ` {y--z}) + hausdorff_distance (f ` {y--z}) {f y--f z} \<le> lambda * infdist w {y--z} + C + D
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. infdist (f w) (f ` {y--z}) \<le> lambda * infdist w {y--z} + C
 2. hausdorff_distance (f ` {y--z}) {f y--f z} \<le> D
[PROOF STEP]
using quasi_isometry_on_infdist[OF assms(1)] Dyz
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?w \<in> UNIV; ?S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> infdist (f ?w) (f ` ?S) \<le> lambda * infdist ?w ?S + C
\<lbrakk>?w \<in> UNIV; ?S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * infdist ?w ?S - C \<le> infdist (f ?w) (f ` ?S)
hausdorff_distance (f ` {y--z}) {f y--f z} \<le> D

goal (2 subgoals):
 1. infdist (f w) (f ` {y--z}) \<le> lambda * infdist w {y--z} + C
 2. hausdorff_distance (f ` {y--z}) {f y--f z} \<le> D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist (f w) (f ` {y--z}) + hausdorff_distance (f ` {y--z}) {f y--f z} \<le> lambda * infdist w {y--z} + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infdist (f w) (f ` {y--z}) + hausdorff_distance (f ` {y--z}) {f y--f z} \<le> lambda * infdist w {y--z} + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (lambda * (4 * deltaG(TYPE('a))) + C) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lambda * infdist w {y--z} + C + D \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. infdist w {y--z} \<le> 4 * deltaG TYPE('a)
 2. 0 \<le> lambda
[PROOF STEP]
using w \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
infdist w {x--y} \<le> 4 * deltaG TYPE('a)
infdist w {x--z} \<le> 4 * deltaG TYPE('a)
infdist w {y--z} \<le> 4 * deltaG TYPE('a)
dist w x = Gromov_product_at x y z
1 \<le> lambda

goal (2 subgoals):
 1. infdist w {y--z} \<le> 4 * deltaG TYPE('a)
 2. 0 \<le> lambda
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lambda * infdist w {y--z} + C + D \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
infdist (f w) {f y--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
have Eyz: "infdist (f w) {f y--f z} \<le> E"
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f y--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (1 subgoal):
 1. infdist (f w) {f y--f z} \<le> E
[PROOF STEP]
unfolding E_def
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f y--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (1 subgoal):
 1. infdist (f w) {f y--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist (f w) {f y--f z} \<le> E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "infdist (f w) {f x--f z} \<le> infdist (f w) (f`{x--z}) + hausdorff_distance (f`{x--z}) {f x--f z}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infdist (f w) {f x--f z} \<le> infdist (f w) (f ` {x--z}) + hausdorff_distance (f ` {x--z}) {f x--f z}
[PROOF STEP]
by (intro mono_intros quasi_isometry_on_bounded[OF quasi_isometry_on_subset[OF assms(1)], of "{x--z}"], auto)
[PROOF STATE]
proof (state)
this:
infdist (f w) {f x--f z} \<le> infdist (f w) (f ` {x--z}) + hausdorff_distance (f ` {x--z}) {f x--f z}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infdist (f w) {f x--f z} \<le> infdist (f w) (f ` {x--z}) + hausdorff_distance (f ` {x--z}) {f x--f z}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (lambda * infdist w {x--z} + C) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infdist (f w) (f ` {x--z}) + hausdorff_distance (f ` {x--z}) {f x--f z} \<le> lambda * infdist w {x--z} + C + D
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. infdist (f w) (f ` {x--z}) \<le> lambda * infdist w {x--z} + C
 2. hausdorff_distance (f ` {x--z}) {f x--f z} \<le> D
[PROOF STEP]
using quasi_isometry_on_infdist[OF assms(1)] Dxz
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?w \<in> UNIV; ?S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> infdist (f ?w) (f ` ?S) \<le> lambda * infdist ?w ?S + C
\<lbrakk>?w \<in> UNIV; ?S \<subseteq> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * infdist ?w ?S - C \<le> infdist (f ?w) (f ` ?S)
hausdorff_distance (f ` {x--z}) {f x--f z} \<le> D

goal (2 subgoals):
 1. infdist (f w) (f ` {x--z}) \<le> lambda * infdist w {x--z} + C
 2. hausdorff_distance (f ` {x--z}) {f x--f z} \<le> D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist (f w) (f ` {x--z}) + hausdorff_distance (f ` {x--z}) {f x--f z} \<le> lambda * infdist w {x--z} + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infdist (f w) (f ` {x--z}) + hausdorff_distance (f ` {x--z}) {f x--f z} \<le> lambda * infdist w {x--z} + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (lambda * (4 * deltaG(TYPE('a))) + C) + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lambda * infdist w {x--z} + C + D \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. infdist w {x--z} \<le> 4 * deltaG TYPE('a)
 2. 0 \<le> lambda
[PROOF STEP]
using w \<open>lambda \<ge> 1\<close>
[PROOF STATE]
proof (prove)
using this:
infdist w {x--y} \<le> 4 * deltaG TYPE('a)
infdist w {x--z} \<le> 4 * deltaG TYPE('a)
infdist w {y--z} \<le> 4 * deltaG TYPE('a)
dist w x = Gromov_product_at x y z
1 \<le> lambda

goal (2 subgoals):
 1. infdist w {x--z} \<le> 4 * deltaG TYPE('a)
 2. 0 \<le> lambda
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lambda * infdist w {x--z} + C + D \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
infdist (f w) {f x--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
have Exz: "infdist (f w) {f x--f z} \<le> E"
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f x--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (1 subgoal):
 1. infdist (f w) {f x--f z} \<le> E
[PROOF STEP]
unfolding E_def
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f x--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D

goal (1 subgoal):
 1. infdist (f w) {f x--f z} \<le> lambda * (4 * deltaG TYPE('a)) + C + D
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infdist (f w) {f x--f z} \<le> E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "2 * ((1/lambda * dist w x - C)) \<le> 2 * dist (f w) (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (1 / lambda * dist w x - C) \<le> 2 * dist (f w) (f x)
[PROOF STEP]
using quasi_isometry_onD(2)[OF assms(1), of w x]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>w \<in> UNIV; x \<in> UNIV\<rbrakk> \<Longrightarrow> 1 / lambda * dist w x - C \<le> dist (f w) (f x)

goal (1 subgoal):
 1. 2 * (1 / lambda * dist w x - C) \<le> 2 * dist (f w) (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * (1 / lambda * dist w x - C) \<le> 2 * dist (f w) (f x)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * (1 / lambda * dist w x - C) \<le> 2 * dist (f w) (f x)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... = (dist (f w) (f x) + dist (f w) (f y)) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * dist (f w) (f x) = dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * dist (f w) (f x) = dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * dist (f w) (f x) = dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (dist (f x) (f y) + 2 * infdist (f w) {f x--f y}) + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z)) \<le> dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z)
[PROOF STEP]
by (intro geodesic_segment_distance mono_intros, auto)
[PROOF STATE]
proof (state)
this:
dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z)) \<le> dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z)) \<le> dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> 2 * Gromov_product_at (f x) (f y) (f z) + 4 * E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z) \<le> 2 * Gromov_product_at (f x) (f y) (f z) + 4 * E
[PROOF STEP]
unfolding Gromov_product_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z) \<le> 2 * ((dist (f x) (f y) + dist (f x) (f z) - dist (f y) (f z)) / 2) + 4 * E
[PROOF STEP]
using Exy Exz
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f x--f y} \<le> E
infdist (f w) {f x--f z} \<le> E

goal (1 subgoal):
 1. dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z) \<le> 2 * ((dist (f x) (f y) + dist (f x) (f z) - dist (f y) (f z)) / 2) + 4 * E
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
dist (f x) (f y) + 2 * infdist (f w) {f x--f y} + (dist (f x) (f z) + 2 * infdist (f w) {f x--f z}) - dist (f y) (f z) \<le> 2 * Gromov_product_at (f x) (f y) (f z) + 4 * E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 * (1 / lambda * dist w x - C) \<le> 2 * Gromov_product_at (f x) (f y) (f z) + 4 * E
[PROOF STEP]
have *: "Gromov_product_at x y z / lambda - C - 2 * E \<le> Gromov_product_at (f x) (f y) (f z)"
[PROOF STATE]
proof (prove)
using this:
2 * (1 / lambda * dist w x - C) \<le> 2 * Gromov_product_at (f x) (f y) (f z) + 4 * E

goal (1 subgoal):
 1. Gromov_product_at x y z / lambda - C - 2 * E \<le> Gromov_product_at (f x) (f y) (f z)
[PROOF STEP]
unfolding w(4)
[PROOF STATE]
proof (prove)
using this:
2 * (1 / lambda * Gromov_product_at x y z - C) \<le> 2 * Gromov_product_at (f x) (f y) (f z) + 4 * E

goal (1 subgoal):
 1. Gromov_product_at x y z / lambda - C - 2 * E \<le> Gromov_product_at (f x) (f y) (f z)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Gromov_product_at x y z / lambda - C - 2 * E \<le> Gromov_product_at (f x) (f y) (f z)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z}
[PROOF STEP]
using Eyz
[PROOF STATE]
proof (prove)
using this:
infdist (f w) {f y--f z} \<le> E

goal (1 subgoal):
 1. 2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z}

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... = dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z} = dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z})
[PROOF STEP]
unfolding Gromov_product_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * ((dist (f x) (f y) + dist (f x) (f z) - dist (f y) (f z)) / 2) - 2 * infdist (f w) {f y--f z} = dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z})
[PROOF STEP]
by (auto simp add: algebra_simps divide_simps)
[PROOF STATE]
proof (state)
this:
2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z} = dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z})

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 * Gromov_product_at (f x) (f y) (f z) - 2 * infdist (f w) {f y--f z} = dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z})

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> (dist (f w) (f x) + dist (f w) (f y)) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z}) \<le> dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))
[PROOF STEP]
by (intro geodesic_segment_distance mono_intros, auto)
[PROOF STATE]
proof (state)
this:
dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z}) \<le> dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist (f x) (f y) + dist (f x) (f z) - (dist (f y) (f z) + 2 * infdist (f w) {f y--f z}) \<le> dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z))

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... = 2 * dist (f w) (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z)) = 2 * dist (f w) (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z)) = 2 * dist (f w) (f x)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist (f w) (f x) + dist (f w) (f y) + (dist (f w) (f x) + dist (f w) (f z)) - (dist (f w) (f y) + dist (f w) (f z)) = 2 * dist (f w) (f x)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> 2 * (lambda * dist w x + C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * dist (f w) (f x) \<le> 2 * (lambda * dist w x + C)
[PROOF STEP]
using quasi_isometry_onD(1)[OF assms(1), of w x]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>w \<in> UNIV; x \<in> UNIV\<rbrakk> \<Longrightarrow> dist (f w) (f x) \<le> lambda * dist w x + C

goal (1 subgoal):
 1. 2 * dist (f w) (f x) \<le> 2 * (lambda * dist w x + C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * dist (f w) (f x) \<le> 2 * (lambda * dist w x + C)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * (lambda * dist w x + C)
[PROOF STEP]
have "Gromov_product_at (f x) (f y) (f z) \<le> lambda * dist w x + C + E"
[PROOF STATE]
proof (prove)
using this:
2 * Gromov_product_at (f x) (f y) (f z) - 2 * E \<le> 2 * (lambda * dist w x + C)

goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * dist w x + C + E
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * dist w x + C + E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * dist w x + C + E
[PROOF STEP]
have **: "Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + 2 * E"
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * dist w x + C + E

goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + 2 * E
[PROOF STEP]
unfolding w(4)
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + E

goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + 2 * E
[PROOF STEP]
using \<open>E \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + E
0 \<le> E

goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + 2 * E
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + 2 * E

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "C + 2 * E = 3 * 1 * C + 8 * lambda * deltaG(TYPE('a)) + 184 * lambda^2 * C + 184 * lambda^2 * deltaG(TYPE('b))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C + 2 * E = 3 * 1 * C + 8 * lambda * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 184 * lambda\<^sup>2 * deltaG TYPE('b)
[PROOF STEP]
unfolding E_def D_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C + 2 * (lambda * (4 * deltaG TYPE('a)) + C + 92 * lambda\<^sup>2 * (C + deltaG TYPE('b))) = 3 * 1 * C + 8 * lambda * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 184 * lambda\<^sup>2 * deltaG TYPE('b)
[PROOF STEP]
by (auto simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
C + 2 * E = 3 * 1 * C + 8 * lambda * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 184 * lambda\<^sup>2 * deltaG TYPE('b)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
C + 2 * E = 3 * 1 * C + 8 * lambda * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 184 * lambda\<^sup>2 * deltaG TYPE('b)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
have "... \<le> 3 * lambda^2 * C + 187 * lambda^2 * deltaG(TYPE('a)) + 184 * lambda^2 * C + 187 * lambda^2 * deltaG(TYPE('b))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 3 * 1 * C + 8 * lambda * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 184 * lambda\<^sup>2 * deltaG TYPE('b) \<le> 3 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('b)
[PROOF STEP]
apply (intro mono_intros)
[PROOF STATE]
proof (prove)
goal (10 subgoals):
 1. 1 \<le> lambda\<^sup>2
 2. 0 \<le> 3
 3. 0 \<le> C
 4. 8 \<le> 187
 5. 1 \<le> lambda
 6. 0 < 2
 7. 0 \<le> 187
 8. 0 \<le> lambda
 9. 184 \<le> 187
 10. 0 \<le> lambda\<^sup>2
[PROOF STEP]
using \<open>lambda \<ge> 1\<close> \<open>C \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
1 \<le> lambda
0 \<le> C

goal (10 subgoals):
 1. 1 \<le> lambda\<^sup>2
 2. 0 \<le> 3
 3. 0 \<le> C
 4. 8 \<le> 187
 5. 1 \<le> lambda
 6. 0 < 2
 7. 0 \<le> 187
 8. 0 \<le> lambda
 9. 184 \<le> 187
 10. 0 \<le> lambda\<^sup>2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
3 * 1 * C + 8 * lambda * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 184 * lambda\<^sup>2 * deltaG TYPE('b) \<le> 3 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('b)

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
C + 2 * E \<le> 3 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('b)
[PROOF STEP]
have I: "C + 2 * E \<le> 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
[PROOF STATE]
proof (prove)
using this:
C + 2 * E \<le> 3 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('a) + 184 * lambda\<^sup>2 * C + 187 * lambda\<^sup>2 * deltaG TYPE('b)

goal (1 subgoal):
 1. C + 2 * E \<le> 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
by (auto simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
C + 2 * E \<le> 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))

goal (2 subgoals):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
 2. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
show "Gromov_product_at (f x) (f y) (f z) \<ge> Gromov_product_at x y z / lambda - 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
[PROOF STEP]
using * I
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at x y z / lambda - C - 2 * E \<le> Gromov_product_at (f x) (f y) (f z)
C + 2 * E \<le> 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))

goal (1 subgoal):
 1. Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gromov_product_at x y z / lambda - 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b)) \<le> Gromov_product_at (f x) (f y) (f z)

goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
show "Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda^2 * (C + deltaG(TYPE('a)) + deltaG(TYPE('b)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
using ** I
[PROOF STATE]
proof (prove)
using this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + C + 2 * E
C + 2 * E \<le> 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))

goal (1 subgoal):
 1. Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Gromov_product_at (f x) (f y) (f z) \<le> lambda * Gromov_product_at x y z + 187 * lambda\<^sup>2 * (C + deltaG TYPE('a) + deltaG TYPE('b))

goal:
No subgoals!
[PROOF STEP]
qed