[STATEMENT]
lemma aux4_lm0241_prod_one:
  fixes f::"(nat \<Rightarrow> nat)"
  assumes "(\<forall>x. (1 \<ge> f x))"
  shows "(\<Prod>k \<le> n. (f k)) = 1 \<longrightarrow> (\<forall>k. k \<le> n \<longrightarrow> f k = 1)" (is "?P \<longrightarrow> ?Q")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)) \<Longrightarrow> False
[PROOF STEP]
assume assm:"\<not>(?P \<longrightarrow> ?Q)"
[PROOF STATE]
proof (state)
this:
\<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1))

goal (1 subgoal):
 1. \<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)) \<Longrightarrow> False
[PROOF STEP]
hence f_zero:"\<exists>r. r \<le> n \<and> f r \<noteq> 1"
[PROOF STATE]
proof (prove)
using this:
\<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1))

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

goal (1 subgoal):
 1. \<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>r\<le>n. f r \<noteq> 1
[PROOF STEP]
obtain r where "f r \<noteq> 1"  and "r \<le> n"
[PROOF STATE]
proof (prove)
using this:
\<exists>r\<le>n. f r \<noteq> 1

goal (1 subgoal):
 1. (\<And>r. \<lbrakk>f r \<noteq> 1; r \<le> n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f r \<noteq> 1
r \<le> n

goal (1 subgoal):
 1. \<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)) \<Longrightarrow> False
[PROOF STEP]
hence "f r = 0"
[PROOF STATE]
proof (prove)
using this:
f r \<noteq> 1
r \<le> n

goal (1 subgoal):
 1. f r = 0
[PROOF STEP]
using assms le_antisym not_less
[PROOF STATE]
proof (prove)
using this:
f r \<noteq> 1
r \<le> n
\<forall>x. f x \<le> 1
\<lbrakk>?m \<le> ?n; ?n \<le> ?m\<rbrakk> \<Longrightarrow> ?m = ?n
(\<not> ?x < ?y) = (?y \<le> ?x)

goal (1 subgoal):
 1. f r = 0
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f r = 0

goal (1 subgoal):
 1. \<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)) \<Longrightarrow> False
[PROOF STEP]
hence contr:"(\<Prod>k \<le> n. f k) = 0"
[PROOF STATE]
proof (prove)
using this:
f r = 0

goal (1 subgoal):
 1. prod f {..n} = 0
[PROOF STEP]
using \<open>r \<le> n\<close>
[PROOF STATE]
proof (prove)
using this:
f r = 0
r \<le> n

goal (1 subgoal):
 1. prod f {..n} = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
prod f {..n} = 0

goal (1 subgoal):
 1. \<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1)) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
prod f {..n} = 0
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
prod f {..n} = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
using assm contr
[PROOF STATE]
proof (prove)
using this:
prod f {..n} = 0
\<not> (prod f {..n} = 1 \<longrightarrow> (\<forall>k\<le>n. f k = 1))
prod f {..n} = 0

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem head_not_nil [simp]:
    "(head S \<noteq> nil) = (head S = hd S \<and> tail S = tl S \<and> hd S \<noteq> nil \<and> S \<noteq> [])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (head S \<noteq> nil) = (head S = hd S \<and> tail S = tl S \<and> hd S \<noteq> nil \<and> S \<noteq> [])
[PROOF STEP]
by (simp add: head_def tail_def)


[STATEMENT]
lemma LIMSEQ_realpow_zero:
  fixes x :: real
  assumes "0 \<le> x" "x < 1"
  shows "(\<lambda>n. x ^ n) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
proof (cases "x = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> 0

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
with \<open>0 \<le> x\<close>
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x
x \<noteq> 0
[PROOF STEP]
have x0: "0 < x"
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<noteq> 0

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

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < x
[PROOF STEP]
have "1 < inverse x"
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. 1 < inverse x
[PROOF STEP]
using \<open>x < 1\<close>
[PROOF STATE]
proof (prove)
using this:
0 < x
x < 1

goal (1 subgoal):
 1. 1 < inverse x
[PROOF STEP]
by (rule one_less_inverse)
[PROOF STATE]
proof (state)
this:
1 < inverse x

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 < inverse x
[PROOF STEP]
have "(\<lambda>n. inverse (inverse x ^ n)) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
using this:
1 < inverse x

goal (1 subgoal):
 1. (\<lambda>n. inverse (inverse x ^ n)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (rule LIMSEQ_inverse_realpow_zero)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. inverse (inverse x ^ n)) \<longlonglongrightarrow> 0

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. inverse (inverse x ^ n)) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. inverse (inverse x ^ n)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
by (simp add: power_inverse)
[PROOF STATE]
proof (state)
this:
(^) x \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = 0

goal (1 subgoal):
 1. x = 0 \<Longrightarrow> (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (^) x \<longlonglongrightarrow> 0
[PROOF STEP]
by (rule LIMSEQ_imp_Suc) (simp add: True)
[PROOF STATE]
proof (state)
this:
(^) x \<longlonglongrightarrow> 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma stable_translation_length_inv:
  assumes "isometry f"
  shows "stable_translation_length (inv f) = stable_translation_length f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
have *: "dist basepoint (((inv f)^^n) basepoint) = dist basepoint ((f^^n) basepoint)" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
have "basepoint = (f^^n) (((inv f)^^n) basepoint)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. basepoint = (f ^^ n) ((inv f ^^ n) basepoint)
[PROOF STEP]
by (metis assms comp_apply fn_o_inv_fn_is_id isometry_inverse(2))
[PROOF STATE]
proof (state)
this:
basepoint = (f ^^ n) ((inv f ^^ n) basepoint)

goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
basepoint = (f ^^ n) ((inv f ^^ n) basepoint)
[PROOF STEP]
have "dist basepoint ((f^^n) basepoint) = dist ((f^^n) (((inv f)^^n) basepoint)) ((f^^n) basepoint)"
[PROOF STATE]
proof (prove)
using this:
basepoint = (f ^^ n) ((inv f ^^ n) basepoint)

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

goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist basepoint ((f ^^ n) basepoint) = dist ((f ^^ n) ((inv f ^^ n) basepoint)) ((f ^^ n) basepoint)

goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
have "... = dist (((inv f)^^n) basepoint) basepoint"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((f ^^ n) ((inv f ^^ n) basepoint)) ((f ^^ n) basepoint) = dist ((inv f ^^ n) basepoint) basepoint
[PROOF STEP]
unfolding isometryD(2)[OF isometry_iterates[OF assms]]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist ((inv f ^^ n) basepoint) basepoint = dist ((inv f ^^ n) basepoint) basepoint
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dist ((f ^^ n) ((inv f ^^ n) basepoint)) ((f ^^ n) basepoint) = dist ((inv f ^^ n) basepoint) basepoint

goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
dist basepoint ((f ^^ n) basepoint) = dist ((inv f ^^ n) basepoint) basepoint
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
dist basepoint ((f ^^ n) basepoint) = dist ((inv f ^^ n) basepoint) basepoint

goal (1 subgoal):
 1. dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)
[PROOF STEP]
by (simp add: dist_commute)
[PROOF STATE]
proof (state)
this:
dist basepoint ((inv f ^^ n) basepoint) = dist basepoint ((f ^^ n) basepoint)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
dist basepoint ((inv f ^^ ?n) basepoint) = dist basepoint ((f ^^ ?n) basepoint)

goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
have "(\<lambda>n. dist basepoint ((f^^n) basepoint)/n) \<longlonglongrightarrow> stable_translation_length f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f
[PROOF STEP]
using stable_translation_length_as_pointwise_limit[OF isometryD(4)[OF assms]]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist ?x ((f ^^ n) ?x) / real n) \<longlonglongrightarrow> stable_translation_length f

goal (1 subgoal):
 1. (\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f

goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f

goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
have "(\<lambda>n. dist basepoint ((f^^n) basepoint)/n) \<longlonglongrightarrow> stable_translation_length (inv f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)
[PROOF STEP]
unfolding *[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. dist basepoint ((inv f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)
[PROOF STEP]
using stable_translation_length_as_pointwise_limit[OF isometryD(4)[OF isometry_inverse(1)[OF assms]]]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist ?x ((inv f ^^ n) ?x) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)

goal (1 subgoal):
 1. (\<lambda>n. dist basepoint ((inv f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)

goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)

goal (1 subgoal):
 1. stable_translation_length (inv f) = stable_translation_length f
[PROOF STEP]
using LIMSEQ_unique
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length f
(\<lambda>n. dist basepoint ((f ^^ n) basepoint) / real n) \<longlonglongrightarrow> stable_translation_length (inv f)
\<lbrakk>?X \<longlonglongrightarrow> ?a; ?X \<longlonglongrightarrow> ?b\<rbrakk> \<Longrightarrow> ?a = ?b

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pochhammer_poly_altdef: "pochhammer_poly n = (\<Prod>i<n. [:of_nat i,1:])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer_poly n = (\<Prod>i<n. [:of_nat i, 1::'a:])
[PROOF STEP]
by (induction n) (simp_all add: pochhammer_poly_Suc)


[STATEMENT]
lemma relcomp_trans_1[trans]:
    assumes "(f, g) \<in> A\<^sub>1"
    assumes "(g, h) \<in> A\<^sub>2"
    shows "(f, h) \<in> A\<^sub>1 O A\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f, h) \<in> A\<^sub>1 O A\<^sub>2
[PROOF STEP]
using relcompI assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(?a, ?b) \<in> ?r; (?b, ?c) \<in> ?s\<rbrakk> \<Longrightarrow> (?a, ?c) \<in> ?r O ?s
(f, g) \<in> A\<^sub>1
(g, h) \<in> A\<^sub>2

goal (1 subgoal):
 1. (f, h) \<in> A\<^sub>1 O A\<^sub>2
[PROOF STEP]
by this


[STATEMENT]
lemma one_le_of_rat_iff [simp]: "1 \<le> (of_rat r :: 'a::linordered_field) \<longleftrightarrow> 1 \<le> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((1::'a) \<le> of_rat r) = (1 \<le> r)
[PROOF STEP]
using of_rat_less_eq [of 1 r]
[PROOF STATE]
proof (prove)
using this:
(of_rat 1 \<le> of_rat r) = (1 \<le> r)

goal (1 subgoal):
 1. ((1::'a) \<le> of_rat r) = (1 \<le> r)
[PROOF STEP]
by simp


[STATEMENT]
lemma size_mset_tree_upper: "tree_invar t \<Longrightarrow>
  size (tree_to_multiset t) \<le> (2::nat)^(Suc (rank t)) - (1::nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tree_invar t \<Longrightarrow> size (tree_to_multiset t) \<le> 2 ^ Suc (rank t) - 1
[PROOF STEP]
apply (cases t)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2 x3 x4. \<lbrakk>tree_invar t; t = Node x1 x2 x3 x4\<rbrakk> \<Longrightarrow> size (tree_to_multiset t) \<le> 2 ^ Suc (rank t) - 1
[PROOF STEP]
by (simp only: tree_rank_estimate_upper SkewBinomialTree.sel(3))


[STATEMENT]
lemma coprime_fib_Suc_nat: "coprime (fib n) (fib (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coprime (fib n) (fib (Suc n))
[PROOF STEP]
apply (induct n rule: fib.induct)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. coprime (fib 0) (fib (Suc 0))
 2. coprime (fib (Suc 0)) (fib (Suc (Suc 0)))
 3. \<And>n. \<lbrakk>coprime (fib (Suc n)) (fib (Suc (Suc n))); coprime (fib n) (fib (Suc n))\<rbrakk> \<Longrightarrow> coprime (fib (Suc (Suc n))) (fib (Suc (Suc (Suc n))))
[PROOF STEP]
apply (simp_all add: coprime_iff_gcd_eq_1 algebra_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>gcd (fib (Suc n)) (fib n + fib (Suc n)) = Suc 0; gcd (fib n) (fib (Suc n)) = Suc 0\<rbrakk> \<Longrightarrow> gcd (fib n + fib (Suc n)) (fib n + (fib (Suc n) + fib (Suc n))) = Suc 0
[PROOF STEP]
apply (simp add: add.assoc [symmetric])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma unique_x_axis_poincare_distance_negative:
  assumes "d \<ge> 0"
  shows "\<exists>! z. is_real z \<and> Re z \<le> 0 \<and> Re z > -1 \<and>
              poincare_distance 0\<^sub>h (of_complex z) = d" (is "\<exists>! z. ?P z")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
let ?z = "(1 - exp d) / (1 + exp d)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
have "?P ?z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d
[PROOF STEP]
using ex_x_axis_poincare_distance_negative'[OF assms]
[PROOF STATE]
proof (prove)
using this:
let x = (1 - exp d) / (1 + exp d) in is_real (cor x) \<and> Re (cor x) \<le> 0 \<and> - 1 < Re (cor x) \<and> of_complex (cor x) \<in> unit_disc \<and> of_complex (cor x) \<in> circline_set x_axis \<and> poincare_distance 0\<^sub>h (of_complex (cor x)) = d

goal (1 subgoal):
 1. is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d
[PROOF STEP]
unfolding Let_def
[PROOF STATE]
proof (prove)
using this:
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> of_complex (cor ((1 - exp d) / (1 + exp d))) \<in> unit_disc \<and> of_complex (cor ((1 - exp d) / (1 + exp d))) \<in> circline_set x_axis \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d

goal (1 subgoal):
 1. is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d

goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d

goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
have "\<forall> z'. ?P z' \<longrightarrow> z' = ?z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
let ?g = "\<lambda> x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
let ?A = "{x. is_real x \<and> Re x > -1 \<and> Re x \<le> 0}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
have "inj_on (poincare_distance 0\<^sub>h \<circ> of_complex) ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (poincare_distance 0\<^sub>h \<circ> of_complex) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
[PROOF STEP]
proof (rule comp_inj_on)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on of_complex {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
 2. inj_on (poincare_distance 0\<^sub>h) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
show "inj_on of_complex ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on of_complex {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
[PROOF STEP]
using of_complex_inj
[PROOF STATE]
proof (prove)
using this:
of_complex ?x = of_complex ?y \<Longrightarrow> ?x = ?y

goal (1 subgoal):
 1. inj_on of_complex {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
using this:
of_complex ?x = of_complex ?y \<Longrightarrow> ?x = ?y

goal (1 subgoal):
 1. \<forall>x\<in>{x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. \<forall>y\<in>{x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. of_complex x = of_complex y \<longrightarrow> x = y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inj_on of_complex {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. inj_on (poincare_distance 0\<^sub>h) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (poincare_distance 0\<^sub>h) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
show "inj_on (poincare_distance 0\<^sub>h) (of_complex ` ?A)" (is "inj_on ?f (of_complex ` ?A)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (poincare_distance 0\<^sub>h) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
proof (subst inj_on_cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} \<Longrightarrow> poincare_distance 0\<^sub>h a = ?g a
 2. inj_on ?g (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
have *: "of_complex ` ?A =
                 {z. z \<in> unit_disc \<and> z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}" (is "_ = ?B")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} = {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}
[PROOF STEP]
by (auto simp add: cmod_eq_Re circline_set_x_axis)
[PROOF STATE]
proof (state)
this:
of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} = {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}

goal (2 subgoals):
 1. \<And>a. a \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} \<Longrightarrow> poincare_distance 0\<^sub>h a = ?g a
 2. inj_on ?g (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a. a \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} \<Longrightarrow> poincare_distance 0\<^sub>h a = ?g a
 2. inj_on ?g (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
assume "x \<in> of_complex ` ?A"
[PROOF STATE]
proof (state)
this:
x \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (2 subgoals):
 1. \<And>a. a \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} \<Longrightarrow> poincare_distance 0\<^sub>h a = ?g a
 2. inj_on ?g (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
hence "x \<in> ?B"
[PROOF STATE]
proof (prove)
using this:
x \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. x \<in> {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
x \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} = {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}

goal (1 subgoal):
 1. x \<in> {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<in> {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}

goal (2 subgoals):
 1. \<And>a. a \<in> of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} \<Longrightarrow> poincare_distance 0\<^sub>h a = ?g a
 2. inj_on ?g (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
thus "poincare_distance 0\<^sub>h x = (?g \<circ> to_complex) x"
[PROOF STATE]
proof (prove)
using this:
x \<in> {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}

goal (1 subgoal):
 1. poincare_distance 0\<^sub>h x = ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) x
[PROOF STEP]
using poincare_distance_zero_x_axis
[PROOF STATE]
proof (prove)
using this:
x \<in> {z \<in> unit_disc. z \<in> circline_set x_axis \<and> Re (to_complex z) \<le> 0}
\<lbrakk>?x \<in> unit_disc; ?x \<in> circline_set x_axis\<rbrakk> \<Longrightarrow> poincare_distance 0\<^sub>h ?x = (let x' = to_complex ?x in \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>)

goal (1 subgoal):
 1. poincare_distance 0\<^sub>h x = ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) x
[PROOF STEP]
by (simp add: Let_def)
[PROOF STATE]
proof (state)
this:
poincare_distance 0\<^sub>h x = ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) x

goal (1 subgoal):
 1. inj_on ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
have *: "to_complex ` of_complex ` ?A = ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} = {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
[PROOF STEP]
by (auto simp add: image_iff)
[PROOF STATE]
proof (state)
this:
to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} = {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. inj_on ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
show "inj_on (?g \<circ> to_complex) (of_complex ` ?A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
proof (rule comp_inj_on)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on to_complex (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
 2. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
show "inj_on to_complex (of_complex ` ?A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on to_complex (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. \<forall>y\<in>of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. to_complex x = to_complex y \<longrightarrow> x = y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inj_on to_complex (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})

goal (1 subgoal):
 1. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
have "inj_on ?g ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>{x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. \<forall>y\<in>{x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar> \<longrightarrow> x = y
[PROOF STEP]
proof(safe)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
assume hh: "is_real x" "is_real y" "- 1 < Re x" "Re x \<le> 0"
              "- 1 < Re y" "Re y \<le> 0" "\<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>"
[PROOF STATE]
proof (state)
this:
is_real x
is_real y
- 1 < Re x
Re x \<le> 0
- 1 < Re y
Re y \<le> 0
\<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "is_real ((1 - x)/(1 + x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_real ((1 - x) / (1 + x))
[PROOF STEP]
using \<open>is_real x\<close> div_reals[of "1-x" "1+x"]
[PROOF STATE]
proof (prove)
using this:
is_real x
\<lbrakk>is_real (1 - x); is_real (1 + x)\<rbrakk> \<Longrightarrow> is_real ((1 - x) / (1 + x))

goal (1 subgoal):
 1. is_real ((1 - x) / (1 + x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_real ((1 - x) / (1 + x))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "is_real ((1 - y)/(1 + y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_real ((1 - y) / (1 + y))
[PROOF STEP]
using \<open>is_real y\<close> div_reals[of "1-y" "1+y"]
[PROOF STATE]
proof (prove)
using this:
is_real y
\<lbrakk>is_real (1 - y); is_real (1 + y)\<rbrakk> \<Longrightarrow> is_real ((1 - y) / (1 + y))

goal (1 subgoal):
 1. is_real ((1 - y) / (1 + y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_real ((1 - y) / (1 + y))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "Re (1 + x) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Re (1 + x)
[PROOF STEP]
using \<open>- 1 < Re x\<close>
[PROOF STATE]
proof (prove)
using this:
- 1 < Re x

goal (1 subgoal):
 1. 0 < Re (1 + x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < Re (1 + x)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "1 + x \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
0 < Re (1 + x)

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

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "Re (1 - x) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> Re (1 - x)
[PROOF STEP]
using \<open>Re x \<le> 0\<close>
[PROOF STATE]
proof (prove)
using this:
Re x \<le> 0

goal (1 subgoal):
 1. 0 \<le> Re (1 - x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> Re (1 - x)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "Re ((1 - x)/(1 + x)) > 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> Re (1 - x)

goal (1 subgoal):
 1. 0 < Re ((1 - x) / (1 + x))
[PROOF STEP]
using Re_divide_real \<open>0 < Re (1 + x)\<close> complex_eq_if_Re_eq hh(1) hh(4)
[PROOF STATE]
proof (prove)
using this:
0 \<le> Re (1 - x)
\<lbrakk>is_real ?b; ?b \<noteq> 0\<rbrakk> \<Longrightarrow> Re (?a / ?b) = Re ?a / Re ?b
0 < Re (1 + x)
\<lbrakk>is_real ?z1.0; is_real ?z2.0\<rbrakk> \<Longrightarrow> (?z1.0 = ?z2.0) = (Re ?z1.0 = Re ?z2.0)
is_real x
Re x \<le> 0

goal (1 subgoal):
 1. 0 < Re ((1 - x) / (1 + x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < Re ((1 - x) / (1 + x))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "Re(1 - x) \<ge> Re ( 1 + x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re (1 + x) \<le> Re (1 - x)
[PROOF STEP]
using hh
[PROOF STATE]
proof (prove)
using this:
is_real x
is_real y
- 1 < Re x
Re x \<le> 0
- 1 < Re y
Re y \<le> 0
\<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>

goal (1 subgoal):
 1. Re (1 + x) \<le> Re (1 - x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Re (1 + x) \<le> Re (1 - x)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "Re ((1 - x)/(1 + x)) \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
Re (1 + x) \<le> Re (1 - x)

goal (1 subgoal):
 1. 1 \<le> Re ((1 - x) / (1 + x))
[PROOF STEP]
using \<open>Re (1 + x) > 0\<close> \<open>is_real ((1 - x)/(1 + x))\<close>
[PROOF STATE]
proof (prove)
using this:
Re (1 + x) \<le> Re (1 - x)
0 < Re (1 + x)
is_real ((1 - x) / (1 + x))

goal (1 subgoal):
 1. 1 \<le> Re ((1 - x) / (1 + x))
[PROOF STEP]
by (smt Re_divide_real arg_0_iff hh(1) le_divide_eq_1_pos one_complex.simps(2) plus_complex.simps(2))
[PROOF STATE]
proof (state)
this:
1 \<le> Re ((1 - x) / (1 + x))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "Re (1 + y) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Re (1 + y)
[PROOF STEP]
using \<open>- 1 < Re y\<close>
[PROOF STATE]
proof (prove)
using this:
- 1 < Re y

goal (1 subgoal):
 1. 0 < Re (1 + y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < Re (1 + y)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "1 + y \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
0 < Re (1 + y)

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

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "Re (1 - y) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> Re (1 - y)
[PROOF STEP]
using \<open>Re y \<le> 0\<close>
[PROOF STATE]
proof (prove)
using this:
Re y \<le> 0

goal (1 subgoal):
 1. 0 \<le> Re (1 - y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> Re (1 - y)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "Re ((1 - y)/(1 + y)) > 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> Re (1 - y)

goal (1 subgoal):
 1. 0 < Re ((1 - y) / (1 + y))
[PROOF STEP]
using Re_divide_real \<open>0 < Re (1 + y)\<close> complex_eq_if_Re_eq hh
[PROOF STATE]
proof (prove)
using this:
0 \<le> Re (1 - y)
\<lbrakk>is_real ?b; ?b \<noteq> 0\<rbrakk> \<Longrightarrow> Re (?a / ?b) = Re ?a / Re ?b
0 < Re (1 + y)
\<lbrakk>is_real ?z1.0; is_real ?z2.0\<rbrakk> \<Longrightarrow> (?z1.0 = ?z2.0) = (Re ?z1.0 = Re ?z2.0)
is_real x
is_real y
- 1 < Re x
Re x \<le> 0
- 1 < Re y
Re y \<le> 0
\<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>

goal (1 subgoal):
 1. 0 < Re ((1 - y) / (1 + y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < Re ((1 - y) / (1 + y))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "Re(1 - y) \<ge> Re ( 1 + y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re (1 + y) \<le> Re (1 - y)
[PROOF STEP]
using hh
[PROOF STATE]
proof (prove)
using this:
is_real x
is_real y
- 1 < Re x
Re x \<le> 0
- 1 < Re y
Re y \<le> 0
\<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>

goal (1 subgoal):
 1. Re (1 + y) \<le> Re (1 - y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Re (1 + y) \<le> Re (1 - y)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "Re ((1 - y)/(1 + y)) \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
Re (1 + y) \<le> Re (1 - y)

goal (1 subgoal):
 1. 1 \<le> Re ((1 - y) / (1 + y))
[PROOF STEP]
using \<open>Re (1 + y) > 0\<close> \<open>is_real ((1 - y)/(1 + y))\<close>
[PROOF STATE]
proof (prove)
using this:
Re (1 + y) \<le> Re (1 - y)
0 < Re (1 + y)
is_real ((1 - y) / (1 + y))

goal (1 subgoal):
 1. 1 \<le> Re ((1 - y) / (1 + y))
[PROOF STEP]
by (smt Re_divide_real arg_0_iff hh le_divide_eq_1_pos one_complex.simps(2) plus_complex.simps(2))
[PROOF STATE]
proof (state)
this:
1 \<le> Re ((1 - y) / (1 + y))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "ln (Re ((1 - x) / (1 + x))) = ln (Re ((1 - y) / (1 + y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ln (Re ((1 - x) / (1 + x))) = ln (Re ((1 - y) / (1 + y)))
[PROOF STEP]
using \<open>Re ((1 - y)/(1 + y)) \<ge> 1\<close> \<open>Re ((1 - x)/(1 + x)) \<ge> 1\<close> hh
[PROOF STATE]
proof (prove)
using this:
1 \<le> Re ((1 - y) / (1 + y))
1 \<le> Re ((1 - x) / (1 + x))
is_real x
is_real y
- 1 < Re x
Re x \<le> 0
- 1 < Re y
Re y \<le> 0
\<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>

goal (1 subgoal):
 1. ln (Re ((1 - x) / (1 + x))) = ln (Re ((1 - y) / (1 + y)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ln (Re ((1 - x) / (1 + x))) = ln (Re ((1 - y) / (1 + y)))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))"
[PROOF STATE]
proof (prove)
using this:
ln (Re ((1 - x) / (1 + x))) = ln (Re ((1 - y) / (1 + y)))

goal (1 subgoal):
 1. Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))
[PROOF STEP]
using \<open>Re ((1 - y)/(1 + y)) > 0\<close> \<open>Re ((1 - x)/(1 + x)) > 0\<close>
[PROOF STATE]
proof (prove)
using this:
ln (Re ((1 - x) / (1 + x))) = ln (Re ((1 - y) / (1 + y)))
0 < Re ((1 - y) / (1 + y))
0 < Re ((1 - x) / (1 + x))

goal (1 subgoal):
 1. Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "(1 - x) / (1 + x) = (1 - y) / (1 + y)"
[PROOF STATE]
proof (prove)
using this:
Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))

goal (1 subgoal):
 1. (1 - x) / (1 + x) = (1 - y) / (1 + y)
[PROOF STEP]
using \<open>is_real ((1 - y)/(1 + y))\<close> \<open>is_real ((1 - x)/(1 + x))\<close>
[PROOF STATE]
proof (prove)
using this:
Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))
is_real ((1 - y) / (1 + y))
is_real ((1 - x) / (1 + x))

goal (1 subgoal):
 1. (1 - x) / (1 + x) = (1 - y) / (1 + y)
[PROOF STEP]
using complex_eq_if_Re_eq
[PROOF STATE]
proof (prove)
using this:
Re ((1 - x) / (1 + x)) = Re ((1 - y) / (1 + y))
is_real ((1 - y) / (1 + y))
is_real ((1 - x) / (1 + x))
\<lbrakk>is_real ?z1.0; is_real ?z2.0\<rbrakk> \<Longrightarrow> (?z1.0 = ?z2.0) = (Re ?z1.0 = Re ?z2.0)

goal (1 subgoal):
 1. (1 - x) / (1 + x) = (1 - y) / (1 + y)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(1 - x) / (1 + x) = (1 - y) / (1 + y)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "(1 - x) * (1 + y) = (1 - y) * (1 + x)"
[PROOF STATE]
proof (prove)
using this:
(1 - x) / (1 + x) = (1 - y) / (1 + y)

goal (1 subgoal):
 1. (1 - x) * (1 + y) = (1 - y) * (1 + x)
[PROOF STEP]
using \<open>1 + y \<noteq> 0\<close> \<open>1 + x \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
(1 - x) / (1 + x) = (1 - y) / (1 + y)
1 + y \<noteq> 0
1 + x \<noteq> 0

goal (1 subgoal):
 1. (1 - x) * (1 + y) = (1 - y) * (1 + x)
[PROOF STEP]
by (simp add:field_simps)
[PROOF STATE]
proof (state)
this:
(1 - x) * (1 + y) = (1 - y) * (1 + x)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>is_real x; is_real y; - 1 < Re x; Re x \<le> 0; - 1 < Re y; Re y \<le> 0; \<bar>ln (Re ((1 - x) / (1 + x)))\<bar> = \<bar>ln (Re ((1 - y) / (1 + y)))\<bar>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
thus "x = y"
[PROOF STATE]
proof (prove)
using this:
(1 - x) * (1 + y) = (1 - y) * (1 + x)

goal (1 subgoal):
 1. x = y
[PROOF STEP]
by (simp add:field_simps)
[PROOF STATE]
proof (state)
this:
x = y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
thus "inj_on ?g (to_complex ` of_complex ` ?A)"
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0} = {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) (to_complex ` of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on ((\<lambda>x'. \<bar>ln (Re ((1 - x') / (1 + x')))\<bar>) \<circ> to_complex) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (poincare_distance 0\<^sub>h) (of_complex ` {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (poincare_distance 0\<^sub>h \<circ> of_complex) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
inj_on (poincare_distance 0\<^sub>h \<circ> of_complex) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}

goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
using \<open>?P ?z\<close>
[PROOF STATE]
proof (prove)
using this:
inj_on (poincare_distance 0\<^sub>h \<circ> of_complex) {x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d

goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>{x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. \<forall>y\<in>{x. is_real x \<and> - 1 < Re x \<and> Re x \<le> 0}. (poincare_distance 0\<^sub>h \<circ> of_complex) x = (poincare_distance 0\<^sub>h \<circ> of_complex) y \<longrightarrow> x = y
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d

goal (1 subgoal):
 1. \<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))

goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d
\<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
is_real (cor ((1 - exp d) / (1 + exp d))) \<and> Re (cor ((1 - exp d) / (1 + exp d))) \<le> 0 \<and> - 1 < Re (cor ((1 - exp d) / (1 + exp d))) \<and> poincare_distance 0\<^sub>h (of_complex (cor ((1 - exp d) / (1 + exp d)))) = d
\<forall>z'. is_real z' \<and> Re z' \<le> 0 \<and> - 1 < Re z' \<and> poincare_distance 0\<^sub>h (of_complex z') = d \<longrightarrow> z' = cor ((1 - exp d) / (1 + exp d))

goal (1 subgoal):
 1. \<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>!z. is_real z \<and> Re z \<le> 0 \<and> - 1 < Re z \<and> poincare_distance 0\<^sub>h (of_complex z) = d

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vec_of_ell2_timesScalarVec[code]:
  \<comment> \<open>Code equation for multiplying a vector with a complex scalar\<close>
  "vec_of_ell2 (scaleC a \<psi>) = smult_vec a (vec_of_ell2 \<psi>)"
  for \<psi> :: "'a::enum ell2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_of_ell2 (a *\<^sub>C \<psi>) = a \<cdot>\<^sub>v vec_of_ell2 \<psi>
[PROOF STEP]
by (simp add: vec_of_ell2_def vec_of_basis_enum_scaleC)


[STATEMENT]
lemma is_interval_1:
  "is_interval (s::real set) \<longleftrightarrow> (\<forall>a\<in>s. \<forall>b\<in>s. \<forall> x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_interval s = (\<forall>a\<in>s. \<forall>b\<in>s. \<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> s)
[PROOF STEP]
unfolding is_interval_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a\<in>s. \<forall>b\<in>s. \<forall>x. (\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i \<or> b \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> a \<bullet> i) \<longrightarrow> x \<in> s) = (\<forall>a\<in>s. \<forall>b\<in>s. \<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> x \<in> s)
[PROOF STEP]
by auto


[STATEMENT]
lemma nonneg_summable_on_complete:
  fixes f :: \<open>'a \<Rightarrow> 'b :: {complete_linorder, ordered_comm_monoid_add, linorder_topology}\<close>
  assumes \<open>\<And>x. x\<in>A \<Longrightarrow> f x \<ge> 0\<close>
  shows \<open>f summable_on A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f summable_on A
[PROOF STEP]
using assms nonneg_bdd_above_summable_on
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> (0::'b) \<le> f ?x
\<lbrakk>\<And>x. x \<in> ?A \<Longrightarrow> (0::?'b) \<le> ?f x; bdd_above (sum ?f ` {F. F \<subseteq> ?A \<and> finite F})\<rbrakk> \<Longrightarrow> ?f summable_on ?A

goal (1 subgoal):
 1. f summable_on A
[PROOF STEP]
by blast


[STATEMENT]
lemma inverse_split:
  assumes "a \<in> carrier G" and "b \<in> carrier G"
  shows "inv (a \<otimes> b) = inv a \<otimes> inv b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv (a \<otimes> b) = inv a \<otimes> inv b
[PROOF STEP]
by (simp add:  assms comm_group.inv_mult cyclic_group_commute group_comm_groupI)


[STATEMENT]
lemma scene_union_inter_distrib:
  assumes "a \<in> scene_space" "b \<in> scene_space" "c \<in> scene_space"
  shows "a \<squnion>\<^sub>S b \<sqinter>\<^sub>S c = (a \<squnion>\<^sub>S b) \<sqinter>\<^sub>S (a \<squnion>\<^sub>S c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<squnion>\<^sub>S b \<sqinter>\<^sub>S c = (a \<squnion>\<^sub>S b) \<sqinter>\<^sub>S (a \<squnion>\<^sub>S c)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<in> scene_space
b \<in> scene_space
c \<in> scene_space

goal (1 subgoal):
 1. a \<squnion>\<^sub>S b \<sqinter>\<^sub>S c = (a \<squnion>\<^sub>S b) \<sqinter>\<^sub>S (a \<squnion>\<^sub>S c)
[PROOF STEP]
by (auto simp add: scene_space_vars_decomp_iff scene_inter_distrib_lemma)


[STATEMENT]
lemma std_normal_moment_even:
  "has_bochner_integral lborel (\<lambda>x. std_normal_density x * x ^ (2 * k)) (fact (2 * k) / (2^k * fact k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_bochner_integral lborel (\<lambda>x. std_normal_density x * x ^ (2 * k)) (fact (2 * k) / (2 ^ k * fact k))
[PROOF STEP]
using normal_moment_even[of 1 0 k]
[PROOF STATE]
proof (prove)
using this:
0 < 1 \<Longrightarrow> has_bochner_integral lborel (\<lambda>x. std_normal_density x * (x - 0) ^ (2 * k)) (fact (2 * k) / ((2 / 1\<^sup>2) ^ k * fact k))

goal (1 subgoal):
 1. has_bochner_integral lborel (\<lambda>x. std_normal_density x * x ^ (2 * k)) (fact (2 * k) / (2 ^ k * fact k))
[PROOF STEP]
by simp


[STATEMENT]
theorem wfTransitionRelation:
  fixes decisionVars :: "Variable set" and F0 :: "Formula"
  assumes "finite decisionVars" and "isInitialState state0 F0" and
  *: "\<exists> learnL::(Formula \<times> Formula) set.
        wf learnL \<and>
        (\<forall> stateA stateB. appliedLearn stateA stateB  \<longrightarrow> (getF stateB, getF stateA) \<in> learnL)"
  shows "wf {(stateB, stateA).
             (state0, stateA) \<in> transitionRelation decisionVars \<and> (transition stateA stateB decisionVars)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
(*----------------------------------------------------------------------------*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
\<exists>learnL. wf learnL \<and> (\<forall>stateA stateB. appliedLearn stateA stateB \<longrightarrow> (getF stateB, getF stateA) \<in> learnL)
[PROOF STEP]
obtain learnL::"(Formula \<times> Formula) set"
    where
    "wf learnL" and
    **: "\<forall> stateA stateB. appliedLearn stateA stateB  \<longrightarrow> (getF stateB, getF stateA) \<in> learnL"
[PROOF STATE]
proof (prove)
using this:
\<exists>learnL. wf learnL \<and> (\<forall>stateA stateB. appliedLearn stateA stateB \<longrightarrow> (getF stateB, getF stateA) \<in> learnL)

goal (1 subgoal):
 1. (\<And>learnL. \<lbrakk>wf learnL; \<forall>stateA stateB. appliedLearn stateA stateB \<longrightarrow> (getF stateB, getF stateA) \<in> learnL\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
wf learnL
\<forall>stateA stateB. appliedLearn stateA stateB \<longrightarrow> (getF stateB, getF stateA) \<in> learnL

goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
let ?rel = "{(stateB, stateA).
                  (state0, stateA) \<in> transitionRelation decisionVars \<and> (transition stateA stateB decisionVars)}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
let ?rel'= "terminationLess F0 decisionVars learnL"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
have "\<forall>x y. (x, y) \<in> ?rel \<longrightarrow> (x, y) \<in> ?rel'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
fix stateA::State and stateB::State
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
assume "(stateB, stateA) \<in> ?rel"
[PROOF STATE]
proof (state)
this:
(stateB, stateA) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
hence "(stateB, stateA) \<in> ?rel'"
[PROOF STATE]
proof (prove)
using this:
(stateB, stateA) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}

goal (1 subgoal):
 1. (stateB, stateA) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
using \<open>isInitialState state0 F0\<close>
[PROOF STATE]
proof (prove)
using this:
(stateB, stateA) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
isInitialState state0 F0

goal (1 subgoal):
 1. (stateB, stateA) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
using invariantsHoldInValidRunsFromInitialState[of "state0" "F0" "stateA" "decisionVars"]
[PROOF STATE]
proof (prove)
using this:
(stateB, stateA) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
isInitialState state0 F0
\<lbrakk>isInitialState state0 F0; (state0, stateA) \<in> transitionRelation decisionVars\<rbrakk> \<Longrightarrow> invariantsHoldInState stateA F0 decisionVars

goal (1 subgoal):
 1. (stateB, stateA) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
using stateIsDecreasedByValidTransitions[of "stateA" "F0" "decisionVars" "stateB"] **
[PROOF STATE]
proof (prove)
using this:
(stateB, stateA) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
isInitialState state0 F0
\<lbrakk>isInitialState state0 F0; (state0, stateA) \<in> transitionRelation decisionVars\<rbrakk> \<Longrightarrow> invariantsHoldInState stateA F0 decisionVars
\<lbrakk>invariantsHoldInState stateA F0 decisionVars; transition stateA stateB decisionVars; appliedLearn stateA stateB \<longrightarrow> (getF stateB, getF stateA) \<in> ?learnL\<rbrakk> \<Longrightarrow> (stateB, stateA) \<in> terminationLess F0 decisionVars ?learnL
\<forall>stateA stateB. appliedLearn stateA stateB \<longrightarrow> (getF stateB, getF stateA) \<in> learnL

goal (1 subgoal):
 1. (stateB, stateA) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(stateB, stateA) \<in> terminationLess F0 decisionVars learnL

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(?stateB2, ?stateA2) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<Longrightarrow> (?stateB2, ?stateA2) \<in> terminationLess F0 decisionVars learnL

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(?stateB2, ?stateA2) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<Longrightarrow> (?stateB2, ?stateA2) \<in> terminationLess F0 decisionVars learnL

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL

goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL

goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
have "wf ?rel'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf (terminationLess F0 decisionVars learnL)
[PROOF STEP]
using \<open>finite decisionVars\<close> \<open>wf learnL\<close>
[PROOF STATE]
proof (prove)
using this:
finite decisionVars
wf learnL

goal (1 subgoal):
 1. wf (terminationLess F0 decisionVars learnL)
[PROOF STEP]
by (rule wfTerminationLess)
[PROOF STATE]
proof (state)
this:
wf (terminationLess F0 decisionVars learnL)

goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
wf (terminationLess F0 decisionVars learnL)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
wf (terminationLess F0 decisionVars learnL)

goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
using wellFoundedEmbed[of "?rel" "?rel'"]
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL
wf (terminationLess F0 decisionVars learnL)
\<lbrakk>\<forall>x y. (x, y) \<in> {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars} \<longrightarrow> (x, y) \<in> terminationLess F0 decisionVars learnL; wf (terminationLess F0 decisionVars learnL)\<rbrakk> \<Longrightarrow> wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}

goal (1 subgoal):
 1. wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
wf {(stateB, stateA). (state0, stateA) \<in> transitionRelation decisionVars \<and> transition stateA stateB decisionVars}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma xyz: " Suc (Suc (length xs)) = 2 ^ l \<Longrightarrow> length (x # evens_odds True xs) = 2 ^ (l - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (Suc (length xs)) = 2 ^ l \<Longrightarrow> length (x # evens_odds True xs) = 2 ^ (l - 1)
[PROOF STEP]
by (metis (no_types, lifting) Nat.add_0_right Suc_eq_plus1 div2_Suc_Suc div_mult_self2 evens_odds_length length_Cons nat.distinct(1) numeral_2_eq_2 one_div_two_eq_zero plus_1_eq_Suc power_eq_if)


[STATEMENT]
lemma Esigma_properdiv_set:
  assumes "m \<ge> 1"
  shows "Esigma m = (aliquot_sum m) + m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Esigma m = aliquot_sum m + m
[PROOF STEP]
using assms divisor_set properdiv_set proper_divisor_def union_properdiv_set  Esigma_def
        aliquot_sum_def
[PROOF STATE]
proof (prove)
using this:
1 \<le> m
divisor_set ?m = {n. n divisor ?m}
properdiv_set ?m = {n. n properdiv ?m}
?n properdiv ?m \<equiv> 1 \<le> ?n \<and> ?n < ?m \<and> ?n dvd ?m
1 \<le> ?n \<Longrightarrow> divisor_set ?n = properdiv_set ?n \<union> {?n}
Esigma ?n \<equiv> \<Sum> (divisor_set ?n)
aliquot_sum ?n \<equiv> \<Sum> (properdiv_set ?n)

goal (1 subgoal):
 1. Esigma m = aliquot_sum m + m
[PROOF STEP]
by fastforce


[STATEMENT]
lemma union_sub:
  "\<lbrakk>B \<subseteq> A; C \<subseteq> B\<rbrakk> \<Longrightarrow> (A - B) \<union> (B - C) = (A - C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>B \<subseteq> A; C \<subseteq> B\<rbrakk> \<Longrightarrow> A - B \<union> (B - C) = A - C
[PROOF STEP]
by fastforce


[STATEMENT]
lemma valid_countings_a_0: "valid_countings a 0 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_countings a 0 = 1
[PROOF STEP]
by (simp add: valid_countings_set card_V_eq_a cong: conj_cong)


[STATEMENT]
lemma less_sets_UN1: "less_sets (\<Union>\<A>) B \<longleftrightarrow> (\<forall>A\<in>\<A>. A \<lless> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union> \<A> \<lless> B) = (\<forall>A\<in>\<A>. A \<lless> B)
[PROOF STEP]
by (auto simp: less_sets_def)


[STATEMENT]
lemma ideal_kZ: "ideal {k*x|x. x\<in>(UNIV::int set)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ideal {k * x |x. x \<in> UNIV}
[PROOF STEP]
unfolding ideal_def left_ideal_def right_ideal_def subgroup_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((0 \<in> {k * x |x. x \<in> UNIV} \<and> (\<forall>a\<in>{k * x |x. x \<in> UNIV}. \<forall>b\<in>{k * x |x. x \<in> UNIV}. a + b \<in> {k * x |x. x \<in> UNIV}) \<and> (\<forall>a\<in>{k * x |x. x \<in> UNIV}. - a \<in> {k * x |x. x \<in> UNIV})) \<and> (\<forall>x\<in>{k * x |x. x \<in> UNIV}. \<forall>r. r * x \<in> {k * x |x. x \<in> UNIV})) \<and> (0 \<in> {k * x |x. x \<in> UNIV} \<and> (\<forall>a\<in>{k * x |x. x \<in> UNIV}. \<forall>b\<in>{k * x |x. x \<in> UNIV}. a + b \<in> {k * x |x. x \<in> UNIV}) \<and> (\<forall>a\<in>{k * x |x. x \<in> UNIV}. - a \<in> {k * x |x. x \<in> UNIV})) \<and> (\<forall>x\<in>{k * x |x. x \<in> UNIV}. \<forall>r. x * r \<in> {k * x |x. x \<in> UNIV})
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<exists>xb. k * x + k * xa = k * xb
 2. \<And>x. \<exists>xa. - (k * x) = k * xa
 3. \<And>x xa. \<exists>xb. k * x + k * xa = k * xb
 4. \<And>x. \<exists>xa. - (k * x) = k * xa
[PROOF STEP]
apply (metis int_distrib(2))
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. \<exists>xa. - (k * x) = k * xa
 2. \<And>x xa. \<exists>xb. k * x + k * xa = k * xb
 3. \<And>x. \<exists>xa. - (k * x) = k * xa
[PROOF STEP]
apply (metis minus_mult_right)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. \<exists>xb. k * x + k * xa = k * xb
 2. \<And>x. \<exists>xa. - (k * x) = k * xa
[PROOF STEP]
apply (metis int_distrib(2))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<exists>xa. - (k * x) = k * xa
[PROOF STEP]
apply (metis minus_mult_right)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma finitePairSecondRange:
  "(\<forall> pair \<in> R. finite (snd pair)) = (\<forall> y \<in> Range R. finite y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>pair\<in>R. finite (snd pair)) = (\<forall>y\<in>Range R. finite y)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma (in group) order_one_triv_iff:
  shows "(order G = 1) = (carrier G = {\<one>})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (order G = 1) = (carrier G = {\<one>})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. order G = 1 \<Longrightarrow> carrier G = {\<one>}
 2. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
assume order:"order G = 1"
[PROOF STATE]
proof (state)
this:
order G = 1

goal (2 subgoals):
 1. order G = 1 \<Longrightarrow> carrier G = {\<one>}
 2. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
order G = 1
[PROOF STEP]
obtain x where x:"carrier G = {x}"
[PROOF STATE]
proof (prove)
using this:
order G = 1

goal (1 subgoal):
 1. (\<And>x. carrier G = {x} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding order_def
[PROOF STATE]
proof (prove)
using this:
card (carrier G) = 1

goal (1 subgoal):
 1. (\<And>x. carrier G = {x} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add: card_Suc_eq)
[PROOF STATE]
proof (state)
this:
carrier G = {x}

goal (2 subgoals):
 1. order G = 1 \<Longrightarrow> carrier G = {\<one>}
 2. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
hence "\<one> = x"
[PROOF STATE]
proof (prove)
using this:
carrier G = {x}

goal (1 subgoal):
 1. \<one> = x
[PROOF STEP]
using one_closed
[PROOF STATE]
proof (prove)
using this:
carrier G = {x}
\<one> \<in> carrier G

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

goal (2 subgoals):
 1. order G = 1 \<Longrightarrow> carrier G = {\<one>}
 2. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
with x
[PROOF STATE]
proof (chain)
picking this:
carrier G = {x}
\<one> = x
[PROOF STEP]
show "carrier G = {\<one>}"
[PROOF STATE]
proof (prove)
using this:
carrier G = {x}
\<one> = x

goal (1 subgoal):
 1. carrier G = {\<one>}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
carrier G = {\<one>}

goal (1 subgoal):
 1. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
assume "carrier G = {\<one>}"
[PROOF STATE]
proof (state)
this:
carrier G = {\<one>}

goal (1 subgoal):
 1. carrier G = {\<one>} \<Longrightarrow> order G = 1
[PROOF STEP]
thus "order G = 1"
[PROOF STATE]
proof (prove)
using this:
carrier G = {\<one>}

goal (1 subgoal):
 1. order G = 1
[PROOF STEP]
unfolding order_def
[PROOF STATE]
proof (prove)
using this:
carrier G = {\<one>}

goal (1 subgoal):
 1. card (carrier G) = 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
order G = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rref_condition2:
  assumes r: "reduced_row_echelon_form A"
  shows " (\<forall>i. \<not> (is_zero_row i A) \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> 0) = 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. \<not> is_zero_row i A \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (1::'a)
[PROOF STEP]
using r
[PROOF STATE]
proof (prove)
using this:
reduced_row_echelon_form A

goal (1 subgoal):
 1. \<forall>i. \<not> is_zero_row i A \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (1::'a)
[PROOF STEP]
unfolding reduced_row_echelon_form_def'
[PROOF STATE]
proof (prove)
using this:
(\<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j>i. \<not> is_zero_row j A)) \<and> (\<forall>i. \<not> is_zero_row i A \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (1::'a)) \<and> (\<forall>i. i < i + (1::'c) \<and> \<not> is_zero_row i A \<and> \<not> is_zero_row (i + (1::'c)) A \<longrightarrow> (LEAST k. A $ i $ k \<noteq> (0::'a)) < (LEAST k. A $ (i + (1::'c)) $ k \<noteq> (0::'a))) \<and> (\<forall>i. \<not> is_zero_row i A \<longrightarrow> (\<forall>j. i \<noteq> j \<longrightarrow> A $ j $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (0::'a)))

goal (1 subgoal):
 1. \<forall>i. \<not> is_zero_row i A \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (1::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma Least_le_Least:
  fixes x :: "'a :: wellorder"
  assumes "Q x"
  and Q: "\<And>x. Q x \<Longrightarrow> \<exists>y\<le>x. P y"
  shows "Least P \<le> Least Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Least P \<le> Least Q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Least P \<le> Least Q
[PROOF STEP]
obtain f :: "'a \<Rightarrow> 'a" where "\<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>f. \<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Q
[PROOF STATE]
proof (prove)
using this:
Q ?x \<Longrightarrow> \<exists>y\<le>?x. P y

goal (1 subgoal):
 1. (\<And>f. \<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by moura
[PROOF STATE]
proof (state)
this:
\<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a)

goal (1 subgoal):
 1. Least P \<le> Least Q
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a)

goal (1 subgoal):
 1. Least P \<le> Least Q
[PROOF STEP]
have "Q (Least Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q (Least Q)
[PROOF STEP]
using \<open>Q x\<close>
[PROOF STATE]
proof (prove)
using this:
Q x

goal (1 subgoal):
 1. Q (Least Q)
[PROOF STEP]
by(rule LeastI)
[PROOF STATE]
proof (state)
this:
Q (Least Q)

goal (1 subgoal):
 1. Least P \<le> Least Q
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a)
Q (Least Q)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>a. \<not> Q a \<or> f a \<le> a \<and> P (f a)
Q (Least Q)

goal (1 subgoal):
 1. Least P \<le> Least Q
[PROOF STEP]
by (metis (full_types) le_cases le_less less_le_trans not_less_Least)
[PROOF STATE]
proof (state)
this:
Least P \<le> Least Q

goal:
No subgoals!
[PROOF STEP]
qed