[STATEMENT]
lemma negated_euclidean_axiom':
  shows "\<exists> a b c.
           a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not>(poincare_collinear {a, b, c})  \<and>
                \<not>(\<exists> x. x \<in> unit_disc \<and>
                  poincare_distance a x = poincare_distance b x \<and>
                  poincare_distance a x = poincare_distance c x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
let ?a = "of_complex (\<i>/2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
let ?b = "of_complex (-\<i>/2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
let ?c = "of_complex (1/5)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
have "(\<i>/2) \<noteq> (-\<i>/2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<i> / 2 \<noteq> - \<i> / 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<i> / 2 \<noteq> - \<i> / 2

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
hence "?a \<noteq> ?b"
[PROOF STATE]
proof (prove)
using this:
\<i> / 2 \<noteq> - \<i> / 2

goal (1 subgoal):
 1. of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
[PROOF STEP]
by (metis to_complex_of_complex)
[PROOF STATE]
proof (state)
this:
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
have "(\<i>/2) \<noteq> (1/5)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<i> / 2 \<noteq> 1 / 5
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<i> / 2 \<noteq> 1 / 5

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
hence "?a \<noteq> ?c"
[PROOF STATE]
proof (prove)
using this:
\<i> / 2 \<noteq> 1 / 5

goal (1 subgoal):
 1. of_complex (\<i> / 2) \<noteq> of_complex (1 / 5)
[PROOF STEP]
by (metis to_complex_of_complex)
[PROOF STATE]
proof (state)
this:
of_complex (\<i> / 2) \<noteq> of_complex (1 / 5)

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
have "(-\<i>/2) \<noteq> (1/5)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - \<i> / 2 \<noteq> 1 / 5
[PROOF STEP]
by (simp add: minus_equation_iff)
[PROOF STATE]
proof (state)
this:
- \<i> / 2 \<noteq> 1 / 5

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
hence "?b \<noteq> ?c"
[PROOF STATE]
proof (prove)
using this:
- \<i> / 2 \<noteq> 1 / 5

goal (1 subgoal):
 1. of_complex (- \<i> / 2) \<noteq> of_complex (1 / 5)
[PROOF STEP]
by (metis to_complex_of_complex)
[PROOF STATE]
proof (state)
this:
of_complex (- \<i> / 2) \<noteq> of_complex (1 / 5)

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
have "?a \<in> unit_disc" "?b \<in> unit_disc" "?c \<in> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex (\<i> / 2) \<in> unit_disc &&& of_complex (- \<i> / 2) \<in> unit_disc &&& of_complex (1 / 5) \<in> unit_disc
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
have "\<not>(poincare_collinear {?a, ?b, ?c})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}
[PROOF STEP]
unfolding poincare_collinear_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p) \<Longrightarrow> False
[PROOF STEP]
assume " \<not> (\<nexists>p. is_poincare_line p \<and> {?a, ?b, ?c} \<subseteq> circline_set p)"
[PROOF STATE]
proof (state)
this:
\<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p)

goal (1 subgoal):
 1. \<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p)
[PROOF STEP]
obtain p where "is_poincare_line p \<and> {?a, ?b, ?c} \<subseteq> circline_set p"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p)

goal (1 subgoal):
 1. (\<And>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p

goal (1 subgoal):
 1. \<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p) \<Longrightarrow> False
[PROOF STEP]
let ?ab = "poincare_line ?a ?b"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p) \<Longrightarrow> False
[PROOF STEP]
have "p = ?ab"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
[PROOF STEP]
using \<open>is_poincare_line p \<and> {?a, ?b, ?c} \<subseteq> circline_set p\<close>
[PROOF STATE]
proof (prove)
using this:
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p

goal (1 subgoal):
 1. p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
[PROOF STEP]
using unique_poincare_line[of ?a ?b] \<open>?a \<noteq> ?b\<close> \<open>?a \<in> unit_disc\<close> \<open>?b \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p
\<lbrakk>of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2); of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (\<i> / 2) \<in> circline_set ?l; of_complex (- \<i> / 2) \<in> circline_set ?l; is_poincare_line ?l\<rbrakk> \<Longrightarrow> ?l = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc

goal (1 subgoal):
 1. p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))

goal (1 subgoal):
 1. \<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p) \<Longrightarrow> False
[PROOF STEP]
have "?c \<notin> circline_set ?ab"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?c \<notin> circline_set ?ab"
[PROOF STATE]
proof (state)
this:
\<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))

goal (1 subgoal):
 1. \<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))) \<Longrightarrow> False
[PROOF STEP]
have "poincare_between ?a 0\<^sub>h ?b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_between (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2))
[PROOF STEP]
unfolding poincare_between_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex (\<i> / 2) = 0\<^sub>h \<or> 0\<^sub>h = of_complex (- \<i> / 2) \<or> (let cr = cross_ratio (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2)) (inversion 0\<^sub>h) in is_real (to_complex cr) \<and> Re (to_complex cr) < 0)
[PROOF STEP]
using cross_ratio_0inf
[PROOF STATE]
proof (prove)
using this:
?y \<noteq> 0 \<Longrightarrow> cross_ratio (of_complex ?x) 0\<^sub>h (of_complex ?y) \<infinity>\<^sub>h = of_complex (?x / ?y)

goal (1 subgoal):
 1. of_complex (\<i> / 2) = 0\<^sub>h \<or> 0\<^sub>h = of_complex (- \<i> / 2) \<or> (let cr = cross_ratio (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2)) (inversion 0\<^sub>h) in is_real (to_complex cr) \<and> Re (to_complex cr) < 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
poincare_between (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2))

goal (1 subgoal):
 1. \<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))) \<Longrightarrow> False
[PROOF STEP]
hence "0\<^sub>h \<in> circline_set ?ab"
[PROOF STATE]
proof (prove)
using this:
poincare_between (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2))

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
[PROOF STEP]
using \<open>?a \<noteq> ?b\<close> \<open>?a \<in> unit_disc\<close> \<open>?b \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_between (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2))
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
[PROOF STEP]
using poincare_between_poincare_line_uzv zero_in_unit_disc
[PROOF STATE]
proof (prove)
using this:
poincare_between (of_complex (\<i> / 2)) 0\<^sub>h (of_complex (- \<i> / 2))
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
\<lbrakk>?u \<noteq> ?v; ?u \<in> unit_disc; ?v \<in> unit_disc; ?z \<in> unit_disc; poincare_between ?u ?z ?v\<rbrakk> \<Longrightarrow> ?z \<in> circline_set (poincare_line ?u ?v)
0\<^sub>h \<in> unit_disc

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))

goal (1 subgoal):
 1. \<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))) \<Longrightarrow> False
[PROOF STEP]
hence "?ab = poincare_line 0\<^sub>h ?a"
[PROOF STATE]
proof (prove)
using this:
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))

goal (1 subgoal):
 1. poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
[PROOF STEP]
using unique_poincare_line[of ?a ?b] \<open>?a \<noteq> ?b\<close> \<open>?a \<in> unit_disc\<close> \<open>?b \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
\<lbrakk>of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2); of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (\<i> / 2) \<in> circline_set ?l; of_complex (- \<i> / 2) \<in> circline_set ?l; is_poincare_line ?l\<rbrakk> \<Longrightarrow> ?l = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc

goal (1 subgoal):
 1. poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
[PROOF STEP]
using \<open>is_poincare_line p \<and> {?a, ?b, ?c} \<subseteq> circline_set p\<close>
[PROOF STATE]
proof (prove)
using this:
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
\<lbrakk>of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2); of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (\<i> / 2) \<in> circline_set ?l; of_complex (- \<i> / 2) \<in> circline_set ?l; is_poincare_line ?l\<rbrakk> \<Longrightarrow> ?l = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p

goal (1 subgoal):
 1. poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
[PROOF STEP]
using \<open>p = ?ab\<close> poincare_line_circline_set(1) unique_poincare_line
[PROOF STATE]
proof (prove)
using this:
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
\<lbrakk>of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2); of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (\<i> / 2) \<in> circline_set ?l; of_complex (- \<i> / 2) \<in> circline_set ?l; is_poincare_line ?l\<rbrakk> \<Longrightarrow> ?l = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
of_complex (\<i> / 2) \<noteq> of_complex (- \<i> / 2)
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p
p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
?z \<noteq> ?w \<Longrightarrow> ?z \<in> circline_set (poincare_line ?z ?w)
\<lbrakk>?u \<noteq> ?v; ?u \<in> unit_disc; ?v \<in> unit_disc; ?u \<in> circline_set ?l; ?v \<in> circline_set ?l; is_poincare_line ?l\<rbrakk> \<Longrightarrow> ?l = poincare_line ?u ?v

goal (1 subgoal):
 1. poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
[PROOF STEP]
by (metis add.inverse_neutral divide_minus_left of_complex_zero_iff  zero_in_unit_disc)
[PROOF STATE]
proof (state)
this:
poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))

goal (1 subgoal):
 1. \<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))) \<Longrightarrow> False
[PROOF STEP]
hence "(\<i>/2) * cnj(1/5) = cnj(\<i>/2) * (1/5)"
[PROOF STATE]
proof (prove)
using this:
poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))

goal (1 subgoal):
 1. \<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)
[PROOF STEP]
using poincare_collinear_zero_iff[of "(\<i>/2)" "(1/5)"]
[PROOF STATE]
proof (prove)
using this:
poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
\<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<i> / 2 \<noteq> 1 / 5; \<i> / 2 \<noteq> 0; 1 / 5 \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_collinear {0\<^sub>h, of_complex (\<i> / 2), of_complex (1 / 5)} = (\<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5))

goal (1 subgoal):
 1. \<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)
[PROOF STEP]
using \<open>?a \<noteq> ?c\<close> \<open>\<not> ?c \<notin> circline_set ?ab\<close> \<open>?a \<in> unit_disc\<close> \<open>?c \<in> unit_disc\<close> \<open>p = ?ab\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
\<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<i> / 2 \<noteq> 1 / 5; \<i> / 2 \<noteq> 0; 1 / 5 \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_collinear {0\<^sub>h, of_complex (\<i> / 2), of_complex (1 / 5)} = (\<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5))
of_complex (\<i> / 2) \<noteq> of_complex (1 / 5)
\<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
of_complex (\<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc
p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))

goal (1 subgoal):
 1. \<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)
[PROOF STEP]
using \<open>0\<^sub>h \<in> circline_set ?ab\<close> \<open>is_poincare_line p \<and> {?a, ?b, ?c} \<subseteq> circline_set p\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
\<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<i> / 2 \<noteq> 1 / 5; \<i> / 2 \<noteq> 0; 1 / 5 \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_collinear {0\<^sub>h, of_complex (\<i> / 2), of_complex (1 / 5)} = (\<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5))
of_complex (\<i> / 2) \<noteq> of_complex (1 / 5)
\<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
of_complex (\<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc
p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p

goal (1 subgoal):
 1. \<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)
[PROOF STEP]
using poincare_collinear_def
[PROOF STATE]
proof (prove)
using this:
poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)) = poincare_line 0\<^sub>h (of_complex (\<i> / 2))
\<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<i> / 2 \<noteq> 1 / 5; \<i> / 2 \<noteq> 0; 1 / 5 \<noteq> 0\<rbrakk> \<Longrightarrow> poincare_collinear {0\<^sub>h, of_complex (\<i> / 2), of_complex (1 / 5)} = (\<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5))
of_complex (\<i> / 2) \<noteq> of_complex (1 / 5)
\<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
of_complex (\<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc
p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
0\<^sub>h \<in> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p
poincare_collinear ?S = (\<exists>p. is_poincare_line p \<and> ?S \<subseteq> circline_set p)

goal (1 subgoal):
 1. \<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)

goal (1 subgoal):
 1. \<not> of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
\<i> / 2 * cnj (1 / 5) = cnj (\<i> / 2) * (1 / 5)

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))

goal (1 subgoal):
 1. \<not> (\<nexists>p. is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))

goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>p = ?ab\<close> \<open>is_poincare_line p \<and> {?a, ?b, ?c} \<subseteq> circline_set p\<close>
[PROOF STATE]
proof (prove)
using this:
of_complex (1 / 5) \<notin> circline_set (poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2)))
p = poincare_line (of_complex (\<i> / 2)) (of_complex (- \<i> / 2))
is_poincare_line p \<and> {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<subseteq> circline_set p

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
have "\<not>(\<exists> x. x \<in> unit_disc \<and>
                  poincare_distance ?a x = poincare_distance ?b x \<and>
                  poincare_distance ?a x = poincare_distance ?c x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x
[PROOF STEP]
proof(rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x)

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x)
[PROOF STEP]
obtain x where "x \<in> unit_disc" "poincare_distance ?a x = poincare_distance ?b x"
                        "poincare_distance ?a x = poincare_distance ?c x"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> unit_disc; poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x; poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> unit_disc
poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x
poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
let ?x = "to_complex x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
have "poincare_distance_formula' (\<i>/2) ?x = poincare_distance_formula' (-\<i>/2) ?x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (- \<i> / 2) (to_complex x)
[PROOF STEP]
using \<open>poincare_distance ?a x = poincare_distance ?b x\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x

goal (1 subgoal):
 1. poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (- \<i> / 2) (to_complex x)
[PROOF STEP]
using \<open>x \<in> unit_disc\<close> \<open>?a \<in> unit_disc\<close> \<open>?b \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x
x \<in> unit_disc
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc

goal (1 subgoal):
 1. poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (- \<i> / 2) (to_complex x)
[PROOF STEP]
by (metis cosh_dist to_complex_of_complex)
[PROOF STATE]
proof (state)
this:
poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (- \<i> / 2) (to_complex x)

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence "(cmod (\<i> / 2 - ?x))\<^sup>2 = (cmod (- \<i> / 2 - ?x))\<^sup>2"
[PROOF STATE]
proof (prove)
using this:
poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (- \<i> / 2) (to_complex x)

goal (1 subgoal):
 1. (cmod (\<i> / 2 - to_complex x))\<^sup>2 = (cmod (- \<i> / 2 - to_complex x))\<^sup>2
[PROOF STEP]
unfolding poincare_distance_formula'_def
[PROOF STATE]
proof (prove)
using this:
1 + 2 * ((cmod (\<i> / 2 - to_complex x))\<^sup>2 / ((1 - (cmod (\<i> / 2))\<^sup>2) * (1 - (cmod (to_complex x))\<^sup>2))) = 1 + 2 * ((cmod (- \<i> / 2 - to_complex x))\<^sup>2 / ((1 - (cmod (- \<i> / 2))\<^sup>2) * (1 - (cmod (to_complex x))\<^sup>2)))

goal (1 subgoal):
 1. (cmod (\<i> / 2 - to_complex x))\<^sup>2 = (cmod (- \<i> / 2 - to_complex x))\<^sup>2
[PROOF STEP]
apply (simp add:field_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cmod (to_complex x))\<^sup>2 = 1 \<or> cmod (\<i> - to_complex x * 2) = cmod (- \<i> - to_complex x * 2) \<Longrightarrow> cmod (\<i> - to_complex x * 2) = cmod (- \<i> - to_complex x * 2)
[PROOF STEP]
using \<open>x \<in> unit_disc\<close> unit_disc_cmod_square_lt_1
[PROOF STATE]
proof (prove)
using this:
x \<in> unit_disc
?z \<in> unit_disc \<Longrightarrow> (cmod (to_complex ?z))\<^sup>2 < 1

goal (1 subgoal):
 1. (cmod (to_complex x))\<^sup>2 = 1 \<or> cmod (\<i> - to_complex x * 2) = cmod (- \<i> - to_complex x * 2) \<Longrightarrow> cmod (\<i> - to_complex x * 2) = cmod (- \<i> - to_complex x * 2)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(cmod (\<i> / 2 - to_complex x))\<^sup>2 = (cmod (- \<i> / 2 - to_complex x))\<^sup>2

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence "Im ?x = 0"
[PROOF STATE]
proof (prove)
using this:
(cmod (\<i> / 2 - to_complex x))\<^sup>2 = (cmod (- \<i> / 2 - to_complex x))\<^sup>2

goal (1 subgoal):
 1. is_real (to_complex x)
[PROOF STEP]
unfolding cmod_def
[PROOF STATE]
proof (prove)
using this:
(sqrt ((Re (\<i> / 2 - to_complex x))\<^sup>2 + (Im (\<i> / 2 - to_complex x))\<^sup>2))\<^sup>2 = (sqrt ((Re (- \<i> / 2 - to_complex x))\<^sup>2 + (Im (- \<i> / 2 - to_complex x))\<^sup>2))\<^sup>2

goal (1 subgoal):
 1. is_real (to_complex x)
[PROOF STEP]
by (simp add: power2_eq_iff)
[PROOF STATE]
proof (state)
this:
is_real (to_complex x)

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
have "1 - (Re ?x)\<^sup>2 \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 - (Re (to_complex x))\<^sup>2 \<noteq> 0
[PROOF STEP]
using \<open>x \<in> unit_disc\<close> unit_disc_cmod_square_lt_1
[PROOF STATE]
proof (prove)
using this:
x \<in> unit_disc
?z \<in> unit_disc \<Longrightarrow> (cmod (to_complex ?z))\<^sup>2 < 1

goal (1 subgoal):
 1. 1 - (Re (to_complex x))\<^sup>2 \<noteq> 0
[PROOF STEP]
using cmod_power2
[PROOF STATE]
proof (prove)
using this:
x \<in> unit_disc
?z \<in> unit_disc \<Longrightarrow> (cmod (to_complex ?z))\<^sup>2 < 1
(cmod ?z)\<^sup>2 = (Re ?z)\<^sup>2 + (Im ?z)\<^sup>2

goal (1 subgoal):
 1. 1 - (Re (to_complex x))\<^sup>2 \<noteq> 0
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
1 - (Re (to_complex x))\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence "24 - 24 * (Re ?x)\<^sup>2 \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
1 - (Re (to_complex x))\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. 24 - 24 * (Re (to_complex x))\<^sup>2 \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
24 - 24 * (Re (to_complex x))\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
have "poincare_distance_formula' (\<i>/2) ?x = poincare_distance_formula' (1/5) ?x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (1 / 5) (to_complex x)
[PROOF STEP]
using \<open>poincare_distance ?a x = poincare_distance ?c x\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x

goal (1 subgoal):
 1. poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (1 / 5) (to_complex x)
[PROOF STEP]
using \<open>x \<in> unit_disc\<close> \<open>?a \<in> unit_disc\<close> \<open>?c \<in> unit_disc\<close>
[PROOF STATE]
proof (prove)
using this:
poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x
x \<in> unit_disc
of_complex (\<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc

goal (1 subgoal):
 1. poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (1 / 5) (to_complex x)
[PROOF STEP]
by (metis cosh_dist to_complex_of_complex)
[PROOF STATE]
proof (state)
this:
poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (1 / 5) (to_complex x)

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence "(2 + 8 * (Re ?x)\<^sup>2) /(3 - 3 * (Re ?x)\<^sup>2) = 2 * (1 - Re ?x * 5)\<^sup>2 / (24 - 24 * (Re ?x)\<^sup>2)" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
using this:
poincare_distance_formula' (\<i> / 2) (to_complex x) = poincare_distance_formula' (1 / 5) (to_complex x)

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
unfolding poincare_distance_formula'_def
[PROOF STATE]
proof (prove)
using this:
1 + 2 * ((cmod (\<i> / 2 - to_complex x))\<^sup>2 / ((1 - (cmod (\<i> / 2))\<^sup>2) * (1 - (cmod (to_complex x))\<^sup>2))) = 1 + 2 * ((cmod (1 / 5 - to_complex x))\<^sup>2 / ((1 - (cmod (1 / 5))\<^sup>2) * (1 - (cmod (to_complex x))\<^sup>2)))

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
apply (simp add:field_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (cmod (\<i> - to_complex x * 2))\<^sup>2 / (3 - 3 * (cmod (to_complex x))\<^sup>2) = 2 * (cmod (1 - to_complex x * 5))\<^sup>2 / (24 - 24 * (cmod (to_complex x))\<^sup>2) \<Longrightarrow> (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
unfolding cmod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (sqrt ((Re (\<i> - to_complex x * 2))\<^sup>2 + (Im (\<i> - to_complex x * 2))\<^sup>2))\<^sup>2 / (3 - 3 * (sqrt ((Re (to_complex x))\<^sup>2 + (Im (to_complex x))\<^sup>2))\<^sup>2) = 2 * (sqrt ((Re (1 - to_complex x * 5))\<^sup>2 + (Im (1 - to_complex x * 5))\<^sup>2))\<^sup>2 / (24 - 24 * (sqrt ((Re (to_complex x))\<^sup>2 + (Im (to_complex x))\<^sup>2))\<^sup>2) \<Longrightarrow> (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
using \<open>Im ?x = 0\<close>
[PROOF STATE]
proof (prove)
using this:
is_real (to_complex x)

goal (1 subgoal):
 1. 2 * (sqrt ((Re (\<i> - to_complex x * 2))\<^sup>2 + (Im (\<i> - to_complex x * 2))\<^sup>2))\<^sup>2 / (3 - 3 * (sqrt ((Re (to_complex x))\<^sup>2 + (Im (to_complex x))\<^sup>2))\<^sup>2) = 2 * (sqrt ((Re (1 - to_complex x * 5))\<^sup>2 + (Im (1 - to_complex x * 5))\<^sup>2))\<^sup>2 / (24 - 24 * (sqrt ((Re (to_complex x))\<^sup>2 + (Im (to_complex x))\<^sup>2))\<^sup>2) \<Longrightarrow> (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
by (simp add:field_simps)
[PROOF STATE]
proof (state)
this:
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence *: "?lhs * (24 - 24 * (Re ?x)\<^sup>2)  = ?rhs * (24 - 24 * (Re ?x)\<^sup>2) "
[PROOF STATE]
proof (prove)
using this:
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
using \<open>(24 - 24 * (Re ?x)\<^sup>2) \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2)
24 - 24 * (Re (to_complex x))\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2)

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
have "?lhs * (24 - 24 * (Re ?x)\<^sup>2) = (2 + 8 * (Re ?x)\<^sup>2) * 8"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = (2 + 8 * (Re (to_complex x))\<^sup>2) * 8
[PROOF STEP]
using \<open>(24 - 24 * (Re ?x)\<^sup>2) \<noteq> 0\<close> \<open>1 - (Re ?x)\<^sup>2 \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
24 - 24 * (Re (to_complex x))\<^sup>2 \<noteq> 0
1 - (Re (to_complex x))\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = (2 + 8 * (Re (to_complex x))\<^sup>2) * 8
[PROOF STEP]
by (simp add:field_simps)
[PROOF STATE]
proof (state)
this:
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = (2 + 8 * (Re (to_complex x))\<^sup>2) * 8

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
have "?rhs * (24 - 24 * (Re ?x)\<^sup>2) = 2 * (1 - Re ?x * 5)\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2
[PROOF STEP]
using \<open>(24 - 24 * (Re ?x)\<^sup>2) \<noteq> 0\<close> \<open>1 - (Re ?x)\<^sup>2 \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
24 - 24 * (Re (to_complex x))\<^sup>2 \<noteq> 0
1 - (Re (to_complex x))\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2
[PROOF STEP]
by (simp add:field_simps)
[PROOF STATE]
proof (state)
this:
2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence "(2 + 8 * (Re ?x)\<^sup>2) * 8 = 2 * (1 - Re ?x * 5)\<^sup>2"
[PROOF STATE]
proof (prove)
using this:
2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) * 8 = 2 * (1 - Re (to_complex x) * 5)\<^sup>2
[PROOF STEP]
using * \<open>?lhs * (24 - 24 * (Re ?x)\<^sup>2) = (2 + 8 * (Re ?x)\<^sup>2) * 8\<close>
[PROOF STATE]
proof (prove)
using this:
2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = 2 * (1 - Re (to_complex x) * 5)\<^sup>2 / (24 - 24 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2)
(2 + 8 * (Re (to_complex x))\<^sup>2) / (3 - 3 * (Re (to_complex x))\<^sup>2) * (24 - 24 * (Re (to_complex x))\<^sup>2) = (2 + 8 * (Re (to_complex x))\<^sup>2) * 8

goal (1 subgoal):
 1. (2 + 8 * (Re (to_complex x))\<^sup>2) * 8 = 2 * (1 - Re (to_complex x) * 5)\<^sup>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(2 + 8 * (Re (to_complex x))\<^sup>2) * 8 = 2 * (1 - Re (to_complex x) * 5)\<^sup>2

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
hence "7 * (Re ?x)\<^sup>2 + 10 * (Re ?x) + 7 = 0"
[PROOF STATE]
proof (prove)
using this:
(2 + 8 * (Re (to_complex x))\<^sup>2) * 8 = 2 * (1 - Re (to_complex x) * 5)\<^sup>2

goal (1 subgoal):
 1. 7 * (Re (to_complex x))\<^sup>2 + 10 * Re (to_complex x) + 7 = 0
[PROOF STEP]
by (simp add:field_simps comm_ring_1_class.power2_diff)
[PROOF STATE]
proof (state)
this:
7 * (Re (to_complex x))\<^sup>2 + 10 * Re (to_complex x) + 7 = 0

goal (1 subgoal):
 1. \<not> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
7 * (Re (to_complex x))\<^sup>2 + 10 * Re (to_complex x) + 7 = 0

goal (1 subgoal):
 1. False
[PROOF STEP]
using discriminant_iff[of 7 "Re (to_complex x)" 10 7] discrim_def[of 7 10 7]
[PROOF STATE]
proof (prove)
using this:
7 * (Re (to_complex x))\<^sup>2 + 10 * Re (to_complex x) + 7 = 0
7 \<noteq> 0 \<Longrightarrow> (7 * (Re (to_complex x))\<^sup>2 + 10 * Re (to_complex x) + 7 = 0) = (0 \<le> discrim 7 10 7 \<and> (Re (to_complex x) = (- 10 + sqrt (discrim 7 10 7)) / (2 * 7) \<or> Re (to_complex x) = (- 10 - sqrt (discrim 7 10 7)) / (2 * 7)))
discrim 7 10 7 \<equiv> 10\<^sup>2 - 4 * 7 * 7

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc
\<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}
\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
of_complex (\<i> / 2) \<in> unit_disc
of_complex (- \<i> / 2) \<in> unit_disc
of_complex (1 / 5) \<in> unit_disc
\<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}
\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x

goal (1 subgoal):
 1. \<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)
[PROOF STEP]
apply (rule_tac x="?a" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}; \<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x\<rbrakk> \<Longrightarrow> \<exists>b c. of_complex (\<i> / 2) \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {of_complex (\<i> / 2), b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance b x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance c x)
[PROOF STEP]
apply (rule_tac x="?b" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}; \<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x\<rbrakk> \<Longrightarrow> \<exists>c. of_complex (\<i> / 2) \<in> unit_disc \<and> of_complex (- \<i> / 2) \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance c x)
[PROOF STEP]
apply (rule_tac x="?c" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>of_complex (\<i> / 2) \<in> unit_disc; of_complex (- \<i> / 2) \<in> unit_disc; of_complex (1 / 5) \<in> unit_disc; \<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)}; \<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x\<rbrakk> \<Longrightarrow> of_complex (\<i> / 2) \<in> unit_disc \<and> of_complex (- \<i> / 2) \<in> unit_disc \<and> of_complex (1 / 5) \<in> unit_disc \<and> \<not> poincare_collinear {of_complex (\<i> / 2), of_complex (- \<i> / 2), of_complex (1 / 5)} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (- \<i> / 2)) x \<and> poincare_distance (of_complex (\<i> / 2)) x = poincare_distance (of_complex (1 / 5)) x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>a b c. a \<in> unit_disc \<and> b \<in> unit_disc \<and> c \<in> unit_disc \<and> \<not> poincare_collinear {a, b, c} \<and> (\<nexists>x. x \<in> unit_disc \<and> poincare_distance a x = poincare_distance b x \<and> poincare_distance a x = poincare_distance c x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma [code]: "of_rat p = (let (a, b) = quotient_of p in of_int a / of_int b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat p = (let (a, b) = quotient_of p in of_int a / of_int b)
[PROOF STEP]
by (cases p) (simp add: quotient_of_Fract of_rat_rat)


[STATEMENT]
lemma horner_sum_uint_exp_Cons_eq:
  \<open>horner_sum uint (2 ^ LENGTH('a)) (w # ws) =
    concat_bit LENGTH('a) (uint w) (horner_sum uint (2 ^ LENGTH('a)) ws)\<close>
  for ws :: \<open>'a::len word list\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. horner_sum uint (2 ^ LENGTH('a)) (w # ws) = concat_bit LENGTH('a) (uint w) (horner_sum uint (2 ^ LENGTH('a)) ws)
[PROOF STEP]
by (simp add: bintr_uint concat_bit_eq push_bit_eq_mult)


[STATEMENT]
lemma compactin_Int:
   "\<lbrakk>Hausdorff_space X; compactin X S; compactin X T\<rbrakk> \<Longrightarrow> compactin X (S \<inter> T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Hausdorff_space X; compactin X S; compactin X T\<rbrakk> \<Longrightarrow> compactin X (S \<inter> T)
[PROOF STEP]
by (simp add: closed_Int_compactin compactin_imp_closedin)


[STATEMENT]
lemma ed_ou_witness_card:
  shows "card {f. CK_nf_pos (f::ed_ou_witness set \<Rightarrow> ed_ou_witness set)} = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {f. CK_nf_pos f} = 4
[PROOF STEP]
by (rule ed_ou_not_discrete_card[OF ed_ou_witness_ed_ou ed_ou_witness_not_discrete])


[STATEMENT]
lemma hypreal_of_real_isLub_iff:
  "isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y) = isLub (UNIV :: real set) Q Y"  (is "?lhs = ?rhs")
  for Q :: "real set" and Y :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y) = isLub UNIV Q Y
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y) \<Longrightarrow> isLub UNIV Q Y
 2. isLub UNIV Q Y \<Longrightarrow> isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
assume ?lhs
[PROOF STATE]
proof (state)
this:
isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)

goal (2 subgoals):
 1. isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y) \<Longrightarrow> isLub UNIV Q Y
 2. isLub UNIV Q Y \<Longrightarrow> isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
show ?rhs
[PROOF STATE]
proof (prove)
using this:
isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)

goal (1 subgoal):
 1. isLub UNIV Q Y
[PROOF STEP]
by (simp add: isLub_def leastP_def) (metis hypreal_of_real_isUb_iff mem_Collect_eq setge_def star_of_le)
[PROOF STATE]
proof (state)
this:
isLub UNIV Q Y

goal (1 subgoal):
 1. isLub UNIV Q Y \<Longrightarrow> isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isLub UNIV Q Y \<Longrightarrow> isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
assume ?rhs
[PROOF STATE]
proof (state)
this:
isLub UNIV Q Y

goal (1 subgoal):
 1. isLub UNIV Q Y \<Longrightarrow> isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isLub UNIV Q Y
[PROOF STEP]
show ?lhs
[PROOF STATE]
proof (prove)
using this:
isLub UNIV Q Y

goal (1 subgoal):
 1. isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)
[PROOF STEP]
apply (simp add: isLub_def leastP_def hypreal_of_real_isUb_iff setge_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isUb UNIV Q Y \<and> (\<forall>x. isUb UNIV Q x \<longrightarrow> Y \<le> x) \<Longrightarrow> \<forall>x. isUb \<real> (hypreal_of_real ` Q) x \<longrightarrow> hypreal_of_real Y \<le> x
[PROOF STEP]
by (metis SReal_iff hypreal_of_real_isUb_iff isUb_def star_of_le)
[PROOF STATE]
proof (state)
this:
isLub \<real> (hypreal_of_real ` Q) (hypreal_of_real Y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lexord_fusion_code:
  "lexord_fusion g1 g2 s1 s2 \<longleftrightarrow>
  (case generator g1 s1 of
     Done \<Rightarrow> \<not> null_cons g2 s2
   | Skip s1' \<Rightarrow> lexord_fusion g1 g2 s1' s2
   | Yield x s1' \<Rightarrow>
     (case force g2 s2 of
        None \<Rightarrow> False
      | Some (y, s2') \<Rightarrow> x < y \<or> \<not> y < x \<and> lexord_fusion g1 g2 s1' s2'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lexord_fusion g1 g2 s1 s2 = (case generator g1 s1 of Done \<Rightarrow> \<not> null_cons g2 s2 | Skip s1' \<Rightarrow> lexord_fusion g1 g2 s1' s2 | Yield x s1' \<Rightarrow> case force g2 s2 of None \<Rightarrow> False | Some (y, s2') \<Rightarrow> x < y \<or> \<not> y < x \<and> lexord_fusion g1 g2 s1' s2')
[PROOF STEP]
unfolding lexord_fusion_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ord_class.lexordp (unstream g1 s1) (unstream g2 s2) = (case generator g1 s1 of Done \<Rightarrow> \<not> null_cons g2 s2 | Skip s1' \<Rightarrow> ord_class.lexordp (unstream g1 s1') (unstream g2 s2) | Yield x s1' \<Rightarrow> case force g2 s2 of None \<Rightarrow> False | Some (y, s2') \<Rightarrow> x < y \<or> \<not> y < x \<and> ord_class.lexordp (unstream g1 s1') (unstream g2 s2'))
[PROOF STEP]
by(cases "generator g1 s1" "force g2 s2" rule: step.exhaust[case_product option.exhaust])(auto simp add: null_cons_def null_def)


[STATEMENT]
lemma ns_mul_extE:
  assumes "(A, B) \<in> ns_mul_ext ns s"
  obtains A1 A2 B1 B2 where "A = A1 + A2" and "B = B1 + B2"
    and "(A1, B1) \<in> multpw ns"
    and "\<And>b. b \<in># B2 \<Longrightarrow> \<exists>a. a \<in># A2 \<and> (a, b) \<in> s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A1 A2 B1 B2. \<lbrakk>A = A1 + A2; B = B1 + B2; (A1, B1) \<in> multpw ns; \<And>b. b \<in># B2 \<Longrightarrow> \<exists>a. a \<in># A2 \<and> (a, b) \<in> s\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(A, B) \<in> ns_mul_ext ns s

goal (1 subgoal):
 1. (\<And>A1 A2 B1 B2. \<lbrakk>A = A1 + A2; B = B1 + B2; (A1, B1) \<in> multpw ns; \<And>b. b \<in># B2 \<Longrightarrow> \<exists>a. a \<in># A2 \<and> (a, b) \<in> s\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: ns_mul_ext_def multpw_converse elim!: mult2_alt_nsE)


[STATEMENT]
lemma Gamma_Gamma_Beta:
  assumes "x + y \<notin> \<int>\<^sub>\<le>\<^sub>0"
  shows   "Gamma x * Gamma y = Beta x y * Gamma (x + y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gamma x * Gamma y = Beta x y * Gamma (x + y)
[PROOF STEP]
unfolding Beta_altdef
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gamma x * Gamma y = Gamma x * Gamma y * rGamma (x + y) * Gamma (x + y)
[PROOF STEP]
using assms Gamma_eq_zero_iff[of "x+y"]
[PROOF STATE]
proof (prove)
using this:
x + y \<notin> \<int>\<^sub>\<le>\<^sub>0
(Gamma (x + y) = (0::'a)) = (x + y \<in> \<int>\<^sub>\<le>\<^sub>0)

goal (1 subgoal):
 1. Gamma x * Gamma y = Gamma x * Gamma y * rGamma (x + y) * Gamma (x + y)
[PROOF STEP]
by (simp add: rGamma_inverse_Gamma)


[STATEMENT]
lemma infsum_bounded_linear:
  assumes \<open>bounded_linear f\<close>
  assumes \<open>g summable_on S\<close>
  shows \<open>infsum (f \<circ> g) S = f (infsum g S)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infsum (f \<circ> g) S = f (infsum g S)
[PROOF STEP]
apply (rule infsum_comm_additive)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. additive f
 2. isCont f (infsum g S)
 3. g summable_on S
[PROOF STEP]
using assms blinfun_apply_induct blinfun.additive_right
[PROOF STATE]
proof (prove)
using this:
bounded_linear f
g summable_on S
\<lbrakk>?y \<in> {f. bounded_linear f}; \<And>x. ?P (blinfun_apply x)\<rbrakk> \<Longrightarrow> ?P ?y
additive (blinfun_apply ?a)

goal (3 subgoals):
 1. additive f
 2. isCont f (infsum g S)
 3. g summable_on S
[PROOF STEP]
by (auto simp: linear_continuous_within)


[STATEMENT]
lemma lemma1: "Key (invKey K) \<in> analz H \<Longrightarrow>
               analz (insert (Crypt K X) H) \<subseteq>
               insert (Crypt K X) (analz (insert X H))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Key (invKey K) \<in> analz H \<Longrightarrow> analz (insert (Crypt K X) H) \<subseteq> insert (Crypt K X) (analz (insert X H))
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>Key (invKey K) \<in> analz H; x \<in> analz (insert (Crypt K X) H)\<rbrakk> \<Longrightarrow> x \<in> insert (Crypt K X) (analz (insert X H))
[PROOF STEP]
apply (erule_tac x = x in analz.induct, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma UN_derivations_eq_derivable: "(\<Union>{P. derivation P}) = {x. derivable x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (Collect derivation) = Collect derivable
[PROOF STEP]
by (auto simp: derivable_def)


[STATEMENT]
lemma first_less: "rank_invar (t # bq) \<Longrightarrow> \<forall>t' \<in> set bq. rank t < rank t'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t < rank t'
[PROOF STEP]
apply(induct bq arbitrary: t)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>t. rank_invar [t] \<Longrightarrow> \<forall>t'\<in>set []. rank t < rank t'
 2. \<And>a bq t. \<lbrakk>\<And>t. rank_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t < rank t'; rank_invar (t # a # bq)\<rbrakk> \<Longrightarrow> \<forall>t'\<in>set (a # bq). rank t < rank t'
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a bq t. \<lbrakk>\<And>t. rank_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t < rank t'; rank_invar (t # a # bq)\<rbrakk> \<Longrightarrow> \<forall>t'\<in>set (a # bq). rank t < rank t'
[PROOF STEP]
apply (metis order_le_less rank_invar.simps(3) set_ConsD xt1(7))
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma intersection_with_image_gen:
  assumes "A A' Reflect X Y" and
    "B B' Reflect X Y" and
    "\<not> Col A B A'" and
    "Col A B C" and
    "Col A' B' C"
  shows "Col C X Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Col C X Y
[PROOF STEP]
by (smt assms(1) assms(2) assms(3) assms(4) assms(5) image_gen_preserves_inter l10_2_uniqueness l10_4 l10_8 not_col_distincts)


[STATEMENT]
lemma ksup_assoc: "((f::'a \<Rightarrow> 'b set) \<squnion> g) \<squnion> h = f \<squnion> (g \<squnion> h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<squnion> g \<squnion> h = f \<squnion> (g \<squnion> h)
[PROOF STEP]
unfolding sup.assoc
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<squnion> (g \<squnion> h) = f \<squnion> (g \<squnion> h)
[PROOF STEP]
by simp


[STATEMENT]
lemma trace_minus[simp]: "trace (A - B) = (trace A - trace B::_::ab_group_add)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Square_Matrix.trace (A - B) = Square_Matrix.trace A - Square_Matrix.trace B
[PROOF STEP]
by transfer (simp add: sum_subtractf)


[STATEMENT]
lemma Ya_arr:
    assumes g: "C.arr g"
    shows "Y a g = S.mkArr (Hom.set (C.cod g, a)) (Hom.set (C.dom g, a))
                           (\<phi> (C.dom g, a) o Cop.comp g o \<psi> (C.cod g, a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Y a g = S.mkArr (Hom.set (C.cod g, a)) (Hom.set (C.dom g, a)) (S.arr_of \<circ> inl \<circ> (\<cdot>\<^sup>o\<^sup>p) g \<circ> \<psi> (C.cod g, a))
[PROOF STEP]
using ide_apex g Y.Y_ide_arr [of a g "C.dom g" "C.cod g"]
[PROOF STATE]
proof (prove)
using this:
C.ide a
C.arr g
\<lbrakk>C.ide a; \<guillemotleft>g : C.dom g \<rightarrow> C.cod g\<guillemotright>\<rbrakk> \<Longrightarrow> \<guillemotleft>Y a g : Hom.map (C.cod g, a) \<rightarrow>\<^sub>S Hom.map (C.dom g, a)\<guillemotright>
\<lbrakk>C.ide a; \<guillemotleft>g : C.dom g \<rightarrow> C.cod g\<guillemotright>\<rbrakk> \<Longrightarrow> Y a g = S.mkArr (Hom.set (C.cod g, a)) (Hom.set (C.dom g, a)) (S.arr_of \<circ> inl \<circ> (\<cdot>\<^sup>o\<^sup>p) g \<circ> \<psi> (C.cod g, a))

goal (1 subgoal):
 1. Y a g = S.mkArr (Hom.set (C.cod g, a)) (Hom.set (C.dom g, a)) (S.arr_of \<circ> inl \<circ> (\<cdot>\<^sup>o\<^sup>p) g \<circ> \<psi> (C.cod g, a))
[PROOF STEP]
by auto


[STATEMENT]
lemma length_int_gt0: "0 < i ==> length_int i = Suc (length_nat (nat i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < i \<Longrightarrow> length_int i = Suc (length_nat (nat i))
[PROOF STEP]
by (simp add: length_int_def)


[STATEMENT]
lemma msetext_dersh_wf:
  assumes wf_gt: "wfP (\<lambda>x y. gt y x)"
  shows "wfP (\<lambda>xs ys. msetext_dersh gt ys xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wfP (\<lambda>xs ys. msetext_dersh gt ys xs)
[PROOF STEP]
proof (rule wfP_subset, rule wfP_app[of "\<lambda>xs ys. (xs, ys) \<in> mult {(x, y). gt y x}" mset])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. wfP (\<lambda>xs ys. (xs, ys) \<in> mult {(x, y). gt y x})
 2. (\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})
[PROOF STEP]
show "wfP (\<lambda>xs ys. (xs, ys) \<in> mult {(x, y). gt y x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wfP (\<lambda>xs ys. (xs, ys) \<in> mult {(x, y). gt y x})
[PROOF STEP]
using wf_gt
[PROOF STATE]
proof (prove)
using this:
wfP (\<lambda>x y. gt y x)

goal (1 subgoal):
 1. wfP (\<lambda>xs ys. (xs, ys) \<in> mult {(x, y). gt y x})
[PROOF STEP]
unfolding wfP_def
[PROOF STATE]
proof (prove)
using this:
wf {(x, y). gt y x}

goal (1 subgoal):
 1. wf {(xs, ys). (xs, ys) \<in> mult {(x, y). gt y x}}
[PROOF STEP]
by (auto intro: wf_mult)
[PROOF STATE]
proof (state)
this:
wfP (\<lambda>xs ys. (xs, ys) \<in> mult {(x, y). gt y x})

goal (1 subgoal):
 1. (\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})
[PROOF STEP]
show "(\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})
[PROOF STEP]
using msetext_dersh_imp_mult
[PROOF STATE]
proof (prove)
using this:
msetext_dersh ?gt ?ys ?xs \<Longrightarrow> (mset ?xs, mset ?ys) \<in> mult {(x, y). ?gt y x}

goal (1 subgoal):
 1. (\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>xs ys. msetext_dersh gt ys xs) \<le> (\<lambda>x y. (mset x, mset y) \<in> mult {(x, y). gt y x})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma qbs_morphism_pair_iff:
 "f \<in> X \<rightarrow>\<^sub>Q Y \<Otimes>\<^sub>Q Z \<longleftrightarrow> fst \<circ> f \<in> X \<rightarrow>\<^sub>Q Y \<and> snd \<circ> f \<in> X \<rightarrow>\<^sub>Q Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> X \<rightarrow>\<^sub>Q Y \<Otimes>\<^sub>Q Z) = (fst \<circ> f \<in> X \<rightarrow>\<^sub>Q Y \<and> snd \<circ> f \<in> X \<rightarrow>\<^sub>Q Z)
[PROOF STEP]
by(auto intro!: qbs_morphismI qbs_morphism_comp[OF _ fst_qbs_morphism,of f X Y Z ]qbs_morphism_comp[OF _ snd_qbs_morphism,of f X Y Z]
            simp: pair_qbs_Mx_def comp_assoc[symmetric])


[STATEMENT]
lemma pmf_bind_pmf_of_set:
  assumes "A \<noteq> {}" "finite A"
  shows   "pmf (bind_pmf (pmf_of_set A) f) x =
             (\<Sum>xa\<in>A. pmf (f xa) x) / real_of_nat (card A)" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf (local.pmf_of_set A \<bind> f) x = (\<Sum>xa\<in>A. pmf (f xa) x) / real (card A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pmf (local.pmf_of_set A \<bind> f) x = (\<Sum>xa\<in>A. pmf (f xa) x) / real (card A)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> {}
finite A
[PROOF STEP]
have "card A > 0"
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}
finite A

goal (1 subgoal):
 1. 0 < card A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < card A

goal (1 subgoal):
 1. pmf (local.pmf_of_set A \<bind> f) x = (\<Sum>xa\<in>A. pmf (f xa) x) / real (card A)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> {}
finite A
0 < card A
[PROOF STEP]
have "ennreal ?lhs = ennreal ?rhs"
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}
finite A
0 < card A

goal (1 subgoal):
 1. ennreal (pmf (local.pmf_of_set A \<bind> f) x) = ennreal ((\<Sum>xa\<in>A. pmf (f xa) x) / real (card A))
[PROOF STEP]
by (subst ennreal_pmf_bind)
       (simp_all add: nn_integral_pmf_of_set max_def pmf_nonneg divide_ennreal [symmetric]
        sum_nonneg ennreal_of_nat_eq_real_of_nat)
[PROOF STATE]
proof (state)
this:
ennreal (pmf (local.pmf_of_set A \<bind> f) x) = ennreal ((\<Sum>xa\<in>A. pmf (f xa) x) / real (card A))

goal (1 subgoal):
 1. pmf (local.pmf_of_set A \<bind> f) x = (\<Sum>xa\<in>A. pmf (f xa) x) / real (card A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal (pmf (local.pmf_of_set A \<bind> f) x) = ennreal ((\<Sum>xa\<in>A. pmf (f xa) x) / real (card A))

goal (1 subgoal):
 1. pmf (local.pmf_of_set A \<bind> f) x = (\<Sum>xa\<in>A. pmf (f xa) x) / real (card A)
[PROOF STEP]
by (subst (asm) ennreal_inj) (auto intro!: sum_nonneg divide_nonneg_nonneg)
[PROOF STATE]
proof (state)
this:
pmf (local.pmf_of_set A \<bind> f) x = (\<Sum>xa\<in>A. pmf (f xa) x) / real (card A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma jumpF_poly_bot_code:
  "jumpF_poly_bot q p = (if p\<noteq>0 \<and> q\<noteq>0 \<and> degree q>degree p then
          if sgn_neg_inf q * sgn_neg_inf p > 0 then 1/2 else -1/2 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
proof (cases "p\<noteq>0 \<and> q\<noteq>0 \<and> degree q>degree p")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
 2. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q

goal (2 subgoals):
 1. p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
 2. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have ?thesis when "sgn_neg_inf q * sgn_neg_inf p > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have "LIM x at_bot. poly q x / poly p x :> at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_bot. poly q x / poly p x :> at_top
[PROOF STEP]
using poly_divide_filterlim_at_bot[of p q] True that
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>p \<noteq> 0; q \<noteq> 0\<rbrakk> \<Longrightarrow> LIM x at_bot. poly q x / poly p x :> if degree q < degree p then at 0 else if degree q = degree p then nhds (lead_coeff q / lead_coeff p) else if 0 < sgn_neg_inf q * sgn_neg_inf p then at_top else at_bot
p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q
0 < sgn_neg_inf q * sgn_neg_inf p

goal (1 subgoal):
 1. LIM x at_bot. poly q x / poly p x :> at_top
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_bot. poly q x / poly p x :> at_top

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LIM x at_bot. poly q x / poly p x :> at_top
[PROOF STEP]
have "jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1/2"
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> at_top

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1 / 2
[PROOF STEP]
unfolding jumpF_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> at_top

goal (1 subgoal):
 1. (if LIM x at_bot. poly q x / poly p x :> at_top then 1 / 2 else if LIM x at_bot. poly q x / poly p x :> at_bot then - 1 / 2 else 0) = 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1 / 2

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1 / 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1 / 2

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
unfolding jumpF_poly_bot_def
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1 / 2

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
using that True
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 1 / 2
0 < sgn_neg_inf q * sgn_neg_inf p
p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal (2 subgoals):
 1. p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
 2. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal (2 subgoals):
 1. p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
 2. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have ?thesis when "\<not> sgn_neg_inf q * sgn_neg_inf p > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have "LIM x at_bot. poly q x / poly p x :> at_bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_bot. poly q x / poly p x :> at_bot
[PROOF STEP]
using poly_divide_filterlim_at_bot[of p q] True that
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>p \<noteq> 0; q \<noteq> 0\<rbrakk> \<Longrightarrow> LIM x at_bot. poly q x / poly p x :> if degree q < degree p then at 0 else if degree q = degree p then nhds (lead_coeff q / lead_coeff p) else if 0 < sgn_neg_inf q * sgn_neg_inf p then at_top else at_bot
p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q
\<not> 0 < sgn_neg_inf q * sgn_neg_inf p

goal (1 subgoal):
 1. LIM x at_bot. poly q x / poly p x :> at_bot
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_bot. poly q x / poly p x :> at_bot

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LIM x at_bot. poly q x / poly p x :> at_bot
[PROOF STEP]
have "jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1/2"
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> at_bot

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1 / 2
[PROOF STEP]
unfolding jumpF_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> at_bot

goal (1 subgoal):
 1. (if LIM x at_bot. poly q x / poly p x :> at_top then 1 / 2 else if LIM x at_bot. poly q x / poly p x :> at_bot then - 1 / 2 else 0) = - 1 / 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1 / 2

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1 / 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1 / 2

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
unfolding jumpF_poly_bot_def
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1 / 2

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
using that True
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = - 1 / 2
\<not> 0 < sgn_neg_inf q * sgn_neg_inf p
p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> 0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal (2 subgoals):
 1. p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
 2. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
\<not> 0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
\<not> 0 < sgn_neg_inf q * sgn_neg_inf p \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q)

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
define P where "P= (\<not> (LIM x at_bot. poly q x / poly p x :> at_bot)
                      \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top))"
[PROOF STATE]
proof (state)
this:
P = (\<not> (LIM x at_bot. poly q x / poly p x :> at_bot) \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top))

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have P when "p=0 \<or> q=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P
[PROOF STEP]
unfolding P_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (LIM x at_bot. poly q x / poly p x :> at_bot) \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
p = 0 \<or> q = 0

goal (1 subgoal):
 1. \<not> (LIM x at_bot. poly q x / poly p x :> at_bot) \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top)
[PROOF STEP]
by (auto elim!:filterlim_at_bot_nhds filterlim_at_top_nhds)
[PROOF STATE]
proof (state)
this:
p = 0 \<or> q = 0 \<Longrightarrow> P

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
p = 0 \<or> q = 0 \<Longrightarrow> P

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have P when "p\<noteq>0" "q\<noteq>0" "degree p> degree q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P
[PROOF STEP]
have "LIM x at_bot. poly q x / poly p x :> at 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_bot. poly q x / poly p x :> at 0
[PROOF STEP]
using poly_divide_filterlim_at_bot[OF that(1,2)] that(3)
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> if degree q < degree p then at 0 else if degree q = degree p then nhds (lead_coeff q / lead_coeff p) else if 0 < sgn_neg_inf q * sgn_neg_inf p then at_top else at_bot
degree q < degree p

goal (1 subgoal):
 1. LIM x at_bot. poly q x / poly p x :> at 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LIM x at_bot. poly q x / poly p x :> at 0

goal (1 subgoal):
 1. P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LIM x at_bot. poly q x / poly p x :> at 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> at 0

goal (1 subgoal):
 1. P
[PROOF STEP]
unfolding P_def
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> at 0

goal (1 subgoal):
 1. \<not> (LIM x at_bot. poly q x / poly p x :> at_bot) \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top)
[PROOF STEP]
by (auto elim!:filterlim_at_bot_nhds filterlim_at_top_nhds simp:filterlim_at)
[PROOF STATE]
proof (state)
this:
P

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree q < degree p\<rbrakk> \<Longrightarrow> P

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree q < degree p\<rbrakk> \<Longrightarrow> P

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
have P when "p\<noteq>0" "q\<noteq>0" "degree p = degree q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P
[PROOF STEP]
have "((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot
[PROOF STEP]
using poly_divide_filterlim_at_bot[OF that(1,2)]
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> if degree q < degree p then at 0 else if degree q = degree p then nhds (lead_coeff q / lead_coeff p) else if 0 < sgn_neg_inf q * sgn_neg_inf p then at_top else at_bot

goal (1 subgoal):
 1. ((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
LIM x at_bot. poly q x / poly p x :> if degree q < degree p then at 0 else if degree q = degree p then nhds (lead_coeff q / lead_coeff p) else if 0 < sgn_neg_inf q * sgn_neg_inf p then at_top else at_bot
p \<noteq> 0
q \<noteq> 0
degree p = degree q

goal (1 subgoal):
 1. ((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot

goal (1 subgoal):
 1. P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot

goal (1 subgoal):
 1. P
[PROOF STEP]
unfolding P_def
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. poly q x / poly p x) \<longlongrightarrow> lead_coeff q / lead_coeff p) at_bot

goal (1 subgoal):
 1. \<not> (LIM x at_bot. poly q x / poly p x :> at_bot) \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top)
[PROOF STEP]
by (auto elim!:filterlim_at_bot_nhds filterlim_at_top_nhds)
[PROOF STATE]
proof (state)
this:
P

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree p = degree q\<rbrakk> \<Longrightarrow> P

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
p = 0 \<or> q = 0 \<Longrightarrow> P
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree q < degree p\<rbrakk> \<Longrightarrow> P
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree p = degree q\<rbrakk> \<Longrightarrow> P
[PROOF STEP]
have P
[PROOF STATE]
proof (prove)
using this:
p = 0 \<or> q = 0 \<Longrightarrow> P
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree q < degree p\<rbrakk> \<Longrightarrow> P
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree p = degree q\<rbrakk> \<Longrightarrow> P

goal (1 subgoal):
 1. P
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
p = 0 \<or> q = 0 \<Longrightarrow> P
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree q < degree p\<rbrakk> \<Longrightarrow> P
\<lbrakk>p \<noteq> 0; q \<noteq> 0; degree p = degree q\<rbrakk> \<Longrightarrow> P
\<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q)

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

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P
[PROOF STEP]
have "jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0"
[PROOF STATE]
proof (prove)
using this:
P

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0
[PROOF STEP]
unfolding jumpF_def P_def
[PROOF STATE]
proof (prove)
using this:
\<not> (LIM x at_bot. poly q x / poly p x :> at_bot) \<and> \<not> (LIM x at_bot. poly q x / poly p x :> at_top)

goal (1 subgoal):
 1. (if LIM x at_bot. poly q x / poly p x :> at_top then 1 / 2 else if LIM x at_bot. poly q x / poly p x :> at_bot then - 1 / 2 else 0) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0

goal (1 subgoal):
 1. \<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q) \<Longrightarrow> jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0

goal (1 subgoal):
 1. jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
unfolding jumpF_poly_bot_def
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
jumpF (\<lambda>x. poly q x / poly p x) at_bot = 0
\<not> (p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q)

goal (1 subgoal):
 1. jumpF (\<lambda>x. poly q x / poly p x) at_bot = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
jumpF_poly_bot q p = (if p \<noteq> 0 \<and> q \<noteq> 0 \<and> degree p < degree q then if 0 < sgn_neg_inf q * sgn_neg_inf p then 1 / 2 else - 1 / 2 else 0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ereal_distrib_left:
  fixes a b c :: ereal
  assumes "a \<noteq> \<infinity> \<or> b \<noteq> -\<infinity>"
    and "a \<noteq> -\<infinity> \<or> b \<noteq> \<infinity>"
    and "\<bar>c\<bar> \<noteq> \<infinity>"
  shows "c * (a + b) = c * a + c * b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c * (a + b) = c * a + c * b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<noteq> \<infinity> \<or> b \<noteq> - \<infinity>
a \<noteq> - \<infinity> \<or> b \<noteq> \<infinity>
\<bar>c\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. c * (a + b) = c * a + c * b
[PROOF STEP]
by (cases rule: ereal3_cases[of a b c]) (simp_all add: field_simps)


[STATEMENT]
lemma "foldr/cons": "foldr\<cdot>k\<cdot>z\<cdot>(x:xs) = k\<cdot>x\<cdot>(foldr\<cdot>k\<cdot>z\<cdot>xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. foldr\<cdot>k\<cdot>z\<cdot>(x : xs) = k\<cdot>x\<cdot>(foldr\<cdot>k\<cdot>z\<cdot>xs)
[PROOF STEP]
by simp


[STATEMENT]
lemma after_summary_union: "after_summary (M + N) S = after_summary M S + after_summary N S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. after_summary (M + N) S = after_summary M S + after_summary N S
[PROOF STEP]
by (simp add: sum.distrib after_summary_def)


[STATEMENT]
lemma subcocycle_AE:
  fixes u::"nat \<Rightarrow> 'a \<Rightarrow> real"
  assumes "\<And>m n. AE x in M. u (n+m) x \<le> u n x + u m ((T^^n) x)"
          "\<And>n. integrable M (u n)"
  shows "\<exists>w. subcocycle w \<and> (AE x in M. \<forall>n. w n x = u n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>w. subcocycle w \<and> (AE x in M. \<forall>n. w n x = u n x)
[PROOF STEP]
using subcocycle_AE_in_context assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>m n. AE x in M. ?u (n + m) x \<le> ?u n x + ?u m ((T ^^ n) x); \<And>n. integrable M (?u n)\<rbrakk> \<Longrightarrow> \<exists>w. subcocycle w \<and> (AE x in M. \<forall>n. w n x = ?u n x)
AE x in M. u (?n3 + ?m3) x \<le> u ?n3 x + u ?m3 ((T ^^ ?n3) x)
integrable M (u ?n3)

goal (1 subgoal):
 1. \<exists>w. subcocycle w \<and> (AE x in M. \<forall>n. w n x = u n x)
[PROOF STEP]
by blast


[STATEMENT]
lemma arc_linorder_matrix_unique:
  fixes f :: "('a::finite,'b::non_trivial_linorder_stone_relation_algebra_expansion) square"
  shows "matrix_stone_relation_algebra.arc f \<longleftrightarrow> (\<exists>!e . f e = top \<and> (\<forall>d . e \<noteq> d \<longrightarrow> f d = bot))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_stone_relation_algebra.arc f = (\<exists>!e. f e = top \<and> (\<forall>d. e \<noteq> d \<longrightarrow> f d = bot))
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. matrix_stone_relation_algebra.arc f \<Longrightarrow> \<exists>!e. f e = top \<and> (\<forall>d. e \<noteq> d \<longrightarrow> f d = bot)
 2. \<exists>!e. f e = top \<and> (\<forall>d. e \<noteq> d \<longrightarrow> f d = bot) \<Longrightarrow> matrix_stone_relation_algebra.arc f
[PROOF STEP]
apply (metis (no_types, opaque_lifting) arc_linorder_matrix bot_not_top)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!e. f e = top \<and> (\<forall>d. e \<noteq> d \<longrightarrow> f d = bot) \<Longrightarrow> matrix_stone_relation_algebra.arc f
[PROOF STEP]
using arc_linorder_matrix
[PROOF STATE]
proof (prove)
using this:
matrix_stone_relation_algebra.arc ?f = (\<exists>e. ?f e = top \<and> (\<forall>d. e \<noteq> d \<longrightarrow> ?f d = bot))

goal (1 subgoal):
 1. \<exists>!e. f e = top \<and> (\<forall>d. e \<noteq> d \<longrightarrow> f d = bot) \<Longrightarrow> matrix_stone_relation_algebra.arc f
[PROOF STEP]
by blast