[STATEMENT]
theorem zeta_Re_ge_1_nonzero:
  fixes s assumes "Re s \<ge> 1" "s \<noteq> 1"
  shows "zeta s \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zeta s \<noteq> 0
[PROOF STEP]
proof (cases "Re s > 1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
 2. \<not> 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> 1 < Re s

goal (2 subgoals):
 1. 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
 2. \<not> 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
[PROOF STEP]
define a where "a = -Im s"
[PROOF STATE]
proof (state)
this:
a = - Im s

goal (2 subgoals):
 1. 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
 2. \<not> 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
[PROOF STEP]
from False assms
[PROOF STATE]
proof (chain)
picking this:
\<not> 1 < Re s
1 \<le> Re s
s \<noteq> 1
[PROOF STEP]
have s [simp]: "s = 1 - \<i> * a" and a: "a \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<not> 1 < Re s
1 \<le> Re s
s \<noteq> 1

goal (1 subgoal):
 1. s = 1 - \<i> * complex_of_real a &&& a \<noteq> 0
[PROOF STEP]
by (auto simp: complex_eq_iff a_def)
[PROOF STATE]
proof (state)
this:
s = 1 - \<i> * complex_of_real a
a \<noteq> 0

goal (2 subgoals):
 1. 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
 2. \<not> 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zeta s \<noteq> 0
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
assume "zeta s = 0"
[PROOF STATE]
proof (state)
this:
zeta s = 0

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
hence zero: "zeta (1 - \<i> * a) = 0"
[PROOF STATE]
proof (prove)
using this:
zeta s = 0

goal (1 subgoal):
 1. zeta (1 - \<i> * complex_of_real a) = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
zeta (1 - \<i> * complex_of_real a) = 0

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
with zeta_cnj[of "1 - \<i> * a"]
[PROOF STATE]
proof (chain)
picking this:
zeta (cnj (1 - \<i> * complex_of_real a)) = cnj (zeta (1 - \<i> * complex_of_real a))
zeta (1 - \<i> * complex_of_real a) = 0
[PROOF STEP]
have zero': "zeta (1 + \<i> * a) = 0"
[PROOF STATE]
proof (prove)
using this:
zeta (cnj (1 - \<i> * complex_of_real a)) = cnj (zeta (1 - \<i> * complex_of_real a))
zeta (1 - \<i> * complex_of_real a) = 0

goal (1 subgoal):
 1. zeta (1 + \<i> * complex_of_real a) = 0
[PROOF STEP]
by simp

    \<comment> \<open>We define the function $Q(s) = \zeta(s)^2\zeta(s+ia)\zeta(s-ia)$ and its Dirichlet series.
        The objective will be to show that this function is entire and its Dirichlet series
        converges everywhere. Of course, $Q(s)$ has singularities at $1$ and $1\pm ia$, so we
        need to show they can be removed.\<close>
[PROOF STATE]
proof (state)
this:
zeta (1 + \<i> * complex_of_real a) = 0

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
define Q Q_fds
      where "Q = (\<lambda>s. zeta s ^ 2 * zeta (s + \<i> * a) * zeta (s - \<i> * a))"
        and "Q_fds = fds_zeta ^ 2 * fds_shift (\<i> * a) fds_zeta * fds_shift (-\<i> * a) fds_zeta"
[PROOF STATE]
proof (state)
this:
Q = (\<lambda>s. (zeta s)\<^sup>2 * zeta (s + \<i> * complex_of_real a) * zeta (s - \<i> * complex_of_real a))
Q_fds = fds_zeta\<^sup>2 * fds_shift (\<i> * complex_of_real a) fds_zeta * fds_shift (- \<i> * complex_of_real a) fds_zeta

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
let ?sings = "{1, 1 + \<i> * a, 1 - \<i> * a}"

    \<comment> \<open>We show that @{term Q} is locally bounded everywhere. This is the case because the
        poles of $\zeta(s)$ cancel with the zeros of $\zeta(s\pm ia)$ and vice versa.
        This boundedness is then enough to show that @{term Q} has only removable singularities.\<close>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have Q_bigo_1: "Q \<in> O[at s](\<lambda>_. 1)" for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
have Q_eq: "Q = (\<lambda>s. (zeta s * zeta (s + \<i> * a)) * (zeta s * zeta (s - \<i> * a)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q = (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a)))
[PROOF STEP]
by (simp add: Q_def power2_eq_square mult_ac)

      \<comment> \<open>The singularity of $\zeta(s)$ at 1 gets cancelled by the zero of $\zeta(s-ia)$:\<close>
[PROOF STATE]
proof (state)
this:
Q = (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a)))

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
have bigo1: "(\<lambda>s. zeta s * zeta (s - \<i> * a)) \<in> O[at 1](\<lambda>_. 1)"
        if "zeta (1 - \<i> * a) = 0" "a \<noteq> 0" for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
have "(\<lambda>s. zeta (s - \<i> * a) - zeta (1 - \<i> * a)) \<in> O[at 1](\<lambda>s. s - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. zeta (s - \<i> * complex_of_real a) - zeta (1 - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. s - 1)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
zeta (1 - \<i> * complex_of_real a) = 0
a \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>s. zeta (s - \<i> * complex_of_real a) - zeta (1 - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. s - 1)
[PROOF STEP]
by (intro taylor_bigo_linear holomorphic_on_imp_differentiable_at[of _ "-{1 + \<i> * a}"]
                    holomorphic_intros) (auto simp: complex_eq_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta (s - \<i> * complex_of_real a) - zeta (1 - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. s - 1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
hence "(\<lambda>s. zeta s * zeta (s - \<i> * a)) \<in> O[at 1](\<lambda>s. 1 / (s - 1) * (s - 1))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>s. zeta (s - \<i> * complex_of_real a) - zeta (1 - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. s - 1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. 1 / (s - 1) * (s - 1))
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
(\<lambda>s. zeta (s - \<i> * complex_of_real a) - zeta (1 - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. s - 1)
zeta (1 - \<i> * complex_of_real a) = 0
a \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. 1 / (s - 1) * (s - 1))
[PROOF STEP]
by (intro landau_o.big.mult zeta_bigo_at_1) simp_all
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. 1 / (s - 1) * (s - 1))

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>s. 1 / (s - 1) * (s - 1))

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
have "(\<lambda>s. 1 / (s - 1) * (s - 1)) \<in> \<Theta>[at 1](\<lambda>_. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. (1::'a) / (s - (1::'a)) * (s - (1::'a))) \<in> \<Theta>[at (1::'a)](\<lambda>_. 1::'a)
[PROOF STEP]
by (intro bigthetaI_cong) (auto simp: eventually_at_filter)
[PROOF STATE]
proof (state)
this:
(\<lambda>s. (1::?'a1) / (s - (1::?'a1)) * (s - (1::?'a1))) \<in> \<Theta>[at (1::?'a1)](\<lambda>_. 1::?'a1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)

goal:
No subgoals!
[PROOF STEP]
qed

      \<comment> \<open>The analogous result for $\zeta(s) \zeta(s+ia)$:\<close>
[PROOF STATE]
proof (state)
this:
\<lbrakk>zeta (1 - \<i> * complex_of_real ?a) = 0; ?a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real ?a)) \<in> O[at 1](\<lambda>_. 1)

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
have bigo1': "(\<lambda>s. zeta s * zeta (s + \<i> * a)) \<in> O[at 1](\<lambda>_. 1)"
        if "zeta (1 - \<i> * a) = 0" "a \<noteq> 0" for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
using bigo1[of  "-a"] that zeta_cnj[of "1 - \<i> * a"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>zeta (1 - \<i> * complex_of_real (- a)) = 0; - a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real (- a))) \<in> O[at 1](\<lambda>_. 1)
zeta (1 - \<i> * complex_of_real a) = 0
a \<noteq> 0
zeta (cnj (1 - \<i> * complex_of_real a)) = cnj (zeta (1 - \<i> * complex_of_real a))

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
[PROOF STEP]
by simp

      \<comment> \<open>The singularity of $\zeta(s-ia)$ gets cancelled by the zero of $\zeta(s)$:\<close>
[PROOF STATE]
proof (state)
this:
\<lbrakk>zeta (1 - \<i> * complex_of_real ?a) = 0; ?a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real ?a)) \<in> O[at 1](\<lambda>_. 1)

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
have bigo2: "(\<lambda>s. zeta s * zeta (s - \<i> * a)) \<in> O[at (1 + \<i> * a)](\<lambda>_. 1)"
        if "zeta (1 - \<i> * a) = 0" "a \<noteq> 0" for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
have "(\<lambda>s. zeta s * zeta (s - \<i> * a)) \<in> O[filtermap (\<lambda>s. s + \<i> * a) (at 1)](\<lambda>_. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1)](\<lambda>_. 1)
[PROOF STEP]
using bigo1'[of a] that
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>zeta (1 - \<i> * complex_of_real a) = 0; a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) \<in> O[at 1](\<lambda>_. 1)
zeta (1 - \<i> * complex_of_real a) = 0
a \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1)](\<lambda>_. 1)
[PROOF STEP]
by (simp add: mult.commute landau_o.big.in_filtermap_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1)](\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1)](\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
have "filtermap (\<lambda>s. s + \<i> * a) (at 1) = at (1 + \<i> * a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1) = at (1 + \<i> * complex_of_real a)
[PROOF STEP]
using filtermap_at_shift[of "-\<i> * a" 1]
[PROOF STATE]
proof (prove)
using this:
filtermap (\<lambda>x. x - - \<i> * complex_of_real a) (at 1) = at (1 - - \<i> * complex_of_real a)

goal (1 subgoal):
 1. filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1) = at (1 + \<i> * complex_of_real a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
filtermap (\<lambda>s. s + \<i> * complex_of_real a) (at 1) = at (1 + \<i> * complex_of_real a)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) \<in> O[at (1 + \<i> * complex_of_real a)](\<lambda>_. 1)

goal:
No subgoals!
[PROOF STEP]
qed

      \<comment> \<open>Again, the analogous result for $\zeta(s) \zeta(s+ia)$:\<close>
[PROOF STATE]
proof (state)
this:
\<lbrakk>zeta (1 - \<i> * complex_of_real ?a) = 0; ?a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real ?a)) \<in> O[at (1 + \<i> * complex_of_real ?a)](\<lambda>_. 1)

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
have bigo2': "(\<lambda>s. zeta s * zeta (s + \<i> * a)) \<in> O[at (1 - \<i> * a)](\<lambda>_. 1)"
        if "zeta (1 - \<i> * a) = 0" "a \<noteq> 0" for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) \<in> O[at (1 - \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
using bigo2[of "-a"] that zeta_cnj[of "1 - \<i> * a"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>zeta (1 - \<i> * complex_of_real (- a)) = 0; - a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real (- a))) \<in> O[at (1 + \<i> * complex_of_real (- a))](\<lambda>_. 1)
zeta (1 - \<i> * complex_of_real a) = 0
a \<noteq> 0
zeta (cnj (1 - \<i> * complex_of_real a)) = cnj (zeta (1 - \<i> * complex_of_real a))

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) \<in> O[at (1 - \<i> * complex_of_real a)](\<lambda>_. 1)
[PROOF STEP]
by simp

      \<comment> \<open>Now the final case distinction to show $Q(s)\in O(1)$ for all $s\in\mathbb{C}$:\<close>
[PROOF STATE]
proof (state)
this:
\<lbrakk>zeta (1 - \<i> * complex_of_real ?a) = 0; ?a \<noteq> 0\<rbrakk> \<Longrightarrow> (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real ?a)) \<in> O[at (1 - \<i> * complex_of_real ?a)](\<lambda>_. 1)

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
consider "s = 1" | "s = 1 + \<i> * a" | "s = 1 - \<i> * a" | "s \<notin> ?sings"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>s = 1 \<Longrightarrow> thesis; s = 1 + \<i> * complex_of_real a \<Longrightarrow> thesis; s = 1 - \<i> * complex_of_real a \<Longrightarrow> thesis; s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>s = 1 \<Longrightarrow> ?thesis; s = 1 + \<i> * complex_of_real a \<Longrightarrow> ?thesis; s = 1 - \<i> * complex_of_real a \<Longrightarrow> ?thesis; s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>s = 1 \<Longrightarrow> ?thesis; s = 1 + \<i> * complex_of_real a \<Longrightarrow> ?thesis; s = 1 - \<i> * complex_of_real a \<Longrightarrow> ?thesis; s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. s = 1 \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s = 1 + \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 3. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 4. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
s = 1

goal (4 subgoals):
 1. s = 1 \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s = 1 + \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 3. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 4. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
s = 1

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
unfolding Q_eq
[PROOF STATE]
proof (prove)
using this:
s = 1

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a))) \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
using zero zero' a
[PROOF STATE]
proof (prove)
using this:
s = 1
zeta (1 - \<i> * complex_of_real a) = 0
zeta (1 + \<i> * complex_of_real a) = 0
a \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a))) \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
by (auto intro: bigo1 bigo1' landau_o.big.mult_in_1)
[PROOF STATE]
proof (state)
this:
Q \<in> O[at s](\<lambda>_. 1)

goal (3 subgoals):
 1. s = 1 + \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 3. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. s = 1 + \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 3. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
s = 1 + \<i> * complex_of_real a

goal (3 subgoals):
 1. s = 1 + \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 3. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
from a
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> 0
[PROOF STEP]
have "isCont (\<lambda>s. zeta s * zeta (s + \<i> * a)) (1 + \<i> * a)"
[PROOF STATE]
proof (prove)
using this:
a \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) (1 + \<i> * complex_of_real a)
[PROOF STEP]
by (auto intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) (1 + \<i> * complex_of_real a)

goal (3 subgoals):
 1. s = 1 + \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 3. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
with 2
[PROOF STATE]
proof (chain)
picking this:
s = 1 + \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) (1 + \<i> * complex_of_real a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
s = 1 + \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) (1 + \<i> * complex_of_real a)

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
unfolding Q_eq
[PROOF STATE]
proof (prove)
using this:
s = 1 + \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) (1 + \<i> * complex_of_real a)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a))) \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
using zero zero' a
[PROOF STATE]
proof (prove)
using this:
s = 1 + \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a)) (1 + \<i> * complex_of_real a)
zeta (1 - \<i> * complex_of_real a) = 0
zeta (1 + \<i> * complex_of_real a) = 0
a \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a))) \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
by (auto intro: bigo2 landau_o.big.mult_in_1 continuous_imp_bigo_1)
[PROOF STATE]
proof (state)
this:
Q \<in> O[at s](\<lambda>_. 1)

goal (2 subgoals):
 1. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
case 3
[PROOF STATE]
proof (state)
this:
s = 1 - \<i> * complex_of_real a

goal (2 subgoals):
 1. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
from a
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> 0
[PROOF STEP]
have "isCont (\<lambda>s. zeta s * zeta (s - \<i> * a)) (1 - \<i> * a)"
[PROOF STATE]
proof (prove)
using this:
a \<noteq> 0

goal (1 subgoal):
 1. isCont (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) (1 - \<i> * complex_of_real a)
[PROOF STEP]
by (auto intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) (1 - \<i> * complex_of_real a)

goal (2 subgoals):
 1. s = 1 - \<i> * complex_of_real a \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
 2. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
with 3
[PROOF STATE]
proof (chain)
picking this:
s = 1 - \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) (1 - \<i> * complex_of_real a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
s = 1 - \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) (1 - \<i> * complex_of_real a)

goal (1 subgoal):
 1. Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
unfolding Q_eq
[PROOF STATE]
proof (prove)
using this:
s = 1 - \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) (1 - \<i> * complex_of_real a)

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a))) \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
using zero zero' a
[PROOF STATE]
proof (prove)
using this:
s = 1 - \<i> * complex_of_real a
isCont (\<lambda>s. zeta s * zeta (s - \<i> * complex_of_real a)) (1 - \<i> * complex_of_real a)
zeta (1 - \<i> * complex_of_real a) = 0
zeta (1 + \<i> * complex_of_real a) = 0
a \<noteq> 0

goal (1 subgoal):
 1. (\<lambda>s. zeta s * zeta (s + \<i> * complex_of_real a) * (zeta s * zeta (s - \<i> * complex_of_real a))) \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
by (auto intro: bigo2' landau_o.big.mult_in_1 continuous_imp_bigo_1)
[PROOF STATE]
proof (state)
this:
Q \<in> O[at s](\<lambda>_. 1)

goal (1 subgoal):
 1. s \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q \<in> O[at s](\<lambda>_. 1)
[PROOF STEP]
qed (auto intro!: continuous_imp_bigo_1 continuous_intros simp: Q_def complex_eq_iff)
[PROOF STATE]
proof (state)
this:
Q \<in> O[at s](\<lambda>_. 1)

goal:
No subgoals!
[PROOF STEP]
qed

    \<comment> \<open>Thus, we can remove the singularities from @{term Q} and extend it to an entire function.\<close>
[PROOF STATE]
proof (state)
this:
Q \<in> O[at ?s](\<lambda>_. 1)

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have "\<exists>Q'. Q' holomorphic_on UNIV \<and> (\<forall>z\<in>UNIV - ?sings. Q' z = Q z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Q'. Q' holomorphic_on UNIV \<and> (\<forall>z\<in>UNIV - {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a}. Q' z = Q z)
[PROOF STEP]
by (intro removable_singularities Q_bigo_1)
         (auto simp: Q_def complex_eq_iff intro!: holomorphic_intros)
[PROOF STATE]
proof (state)
this:
\<exists>Q'. Q' holomorphic_on UNIV \<and> (\<forall>z\<in>UNIV - {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a}. Q' z = Q z)

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>Q'. Q' holomorphic_on UNIV \<and> (\<forall>z\<in>UNIV - {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a}. Q' z = Q z)
[PROOF STEP]
obtain Q' where Q': "Q' holomorphic_on UNIV" "\<And>z. z \<notin> ?sings \<Longrightarrow> Q' z = Q z"
[PROOF STATE]
proof (prove)
using this:
\<exists>Q'. Q' holomorphic_on UNIV \<and> (\<forall>z\<in>UNIV - {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a}. Q' z = Q z)

goal (1 subgoal):
 1. (\<And>Q'. \<lbrakk>Q' holomorphic_on UNIV; \<And>z. z \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q' z = Q z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast

    \<comment> \<open>@{term Q'} constitutes an analytic continuation of the Dirichlet series of @{term Q}.\<close>
[PROOF STATE]
proof (state)
this:
Q' holomorphic_on UNIV
?z \<notin> {1, 1 + \<i> * complex_of_real a, 1 - \<i> * complex_of_real a} \<Longrightarrow> Q' ?z = Q ?z

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have eval_Q_fds: "eval_fds Q_fds s = Q' s" if "Re s > 1" for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds Q_fds s = Q' s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eval_fds Q_fds s = Q' s
[PROOF STEP]
have "eval_fds Q_fds s = Q s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds Q_fds s = Q s
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
1 < Re s

goal (1 subgoal):
 1. eval_fds Q_fds s = Q s
[PROOF STEP]
by (simp add: Q_fds_def Q_def eval_fds_mult eval_fds_power fds_abs_converges_mult
                      fds_abs_converges_power eval_fds_zeta)
[PROOF STATE]
proof (state)
this:
eval_fds Q_fds s = Q s

goal (1 subgoal):
 1. eval_fds Q_fds s = Q' s
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
eval_fds Q_fds s = Q s

goal (1 subgoal):
 1. eval_fds Q_fds s = Q' s
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
1 < Re s
[PROOF STEP]
have "\<dots> = Q' s"
[PROOF STATE]
proof (prove)
using this:
1 < Re s

goal (1 subgoal):
 1. Q s = Q' s
[PROOF STEP]
by (subst Q') auto
[PROOF STATE]
proof (state)
this:
Q s = Q' s

goal (1 subgoal):
 1. eval_fds Q_fds s = Q' s
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
eval_fds Q_fds s = Q' s
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
eval_fds Q_fds s = Q' s

goal (1 subgoal):
 1. eval_fds Q_fds s = Q' s
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
eval_fds Q_fds s = Q' s

goal:
No subgoals!
[PROOF STEP]
qed

    \<comment> \<open>Since $\zeta(s)$ and $\zeta(s\pm ia)$ are completely multiplicative Dirichlet series,
        the logarithm of their product can be rewritten into the following nice form:\<close>
[PROOF STATE]
proof (state)
this:
1 < Re ?s \<Longrightarrow> eval_fds Q_fds ?s = Q' ?s

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have ln_Q_fds_eq:
      "fds_ln 0 Q_fds = fds (\<lambda>k. of_real (2 * mangoldt k / ln k * (1 + cos (a * ln k))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
note simps = fds_ln_mult[where l' = 0 and l'' = 0] fds_ln_power[where l' = 0]
                   fds_ln_prod[where l' = "\<lambda>_. 0"]
[PROOF STATE]
proof (state)
this:
\<lbrakk>fds_nth ?f 1 \<noteq> (0::?'a1); fds_nth ?g 1 \<noteq> (0::?'a1); (0::?'a1) + (0::?'a1) = ?l\<rbrakk> \<Longrightarrow> fds_ln ?l (?f * ?g) = fds_ln (0::?'a1) ?f + fds_ln (0::?'a1) ?g
\<lbrakk>fds_nth ?f 1 \<noteq> (0::?'a1); ?l = of_nat ?n * (0::?'a1)\<rbrakk> \<Longrightarrow> fds_ln ?l (?f ^ ?n) = of_nat ?n * fds_ln (0::?'a1) ?f
\<lbrakk>\<And>x. x \<in> ?A \<Longrightarrow> fds_nth (?f x) 1 \<noteq> (0::?'b1); (\<Sum>x\<in>?A. (0::?'b1)) = ?l\<rbrakk> \<Longrightarrow> fds_ln ?l (prod ?f ?A) = (\<Sum>x\<in>?A. fds_ln (0::?'b1) (?f x))

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
have "fds_ln 0 Q_fds = 2 * fds_ln 0 fds_zeta + fds_shift (\<i> * a) (fds_ln 0 fds_zeta) +
                               fds_shift (-\<i> * a) (fds_ln 0 fds_zeta)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_ln 0 Q_fds = 2 * fds_ln 0 fds_zeta + fds_shift (\<i> * complex_of_real a) (fds_ln 0 fds_zeta) + fds_shift (- \<i> * complex_of_real a) (fds_ln 0 fds_zeta)
[PROOF STEP]
by (auto simp: Q_fds_def simps)
[PROOF STATE]
proof (state)
this:
fds_ln 0 Q_fds = 2 * fds_ln 0 fds_zeta + fds_shift (\<i> * complex_of_real a) (fds_ln 0 fds_zeta) + fds_shift (- \<i> * complex_of_real a) (fds_ln 0 fds_zeta)

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_ln 0 Q_fds = 2 * fds_ln 0 fds_zeta + fds_shift (\<i> * complex_of_real a) (fds_ln 0 fds_zeta) + fds_shift (- \<i> * complex_of_real a) (fds_ln 0 fds_zeta)

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
have "completely_multiplicative_function (fds_nth (fds_zeta :: complex fds))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. completely_multiplicative_function (fds_nth fds_zeta)
[PROOF STEP]
by standard auto
[PROOF STATE]
proof (state)
this:
completely_multiplicative_function (fds_nth fds_zeta)

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
hence "fds_ln (0 :: complex) fds_zeta = fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))"
[PROOF STATE]
proof (prove)
using this:
completely_multiplicative_function (fds_nth fds_zeta)

goal (1 subgoal):
 1. fds_ln 0 fds_zeta = fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))
[PROOF STEP]
by (subst fds_ln_completely_multiplicative) (auto simp: fds_eq_iff)
[PROOF STATE]
proof (state)
this:
fds_ln 0 fds_zeta = fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_ln 0 fds_zeta = fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
have "2 * \<dots> + fds_shift (\<i> * a) \<dots> + fds_shift (-\<i> * a) \<dots> =
                   fds (\<lambda>k. of_real (2 * mangoldt k / ln k * (1 + cos (a * ln k))))"
        (is "?a = ?b")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
proof (intro fds_eqI, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:
0 < n

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < n
[PROOF STEP]
consider "n = 1" | "n > 1"
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. \<lbrakk>n = 1 \<Longrightarrow> thesis; 1 < n \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 1 < n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
hence "fds_nth ?a n = mangoldt n / ln (real n) * (2 + (n powr (\<i> * a) + n powr (-\<i> * a)))"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 1 < n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = complex_of_real (mangoldt n / ln (real n)) * (2 + (of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a)))
[PROOF STEP]
by cases (auto simp: field_simps scaleR_conv_of_real numeral_fds)
[PROOF STATE]
proof (state)
this:
fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = complex_of_real (mangoldt n / ln (real n)) * (2 + (of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a)))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = complex_of_real (mangoldt n / ln (real n)) * (2 + (of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a)))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
have "n powr (\<i> * a) + n powr (-\<i> * a) = 2 * cos (of_real (a * ln n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a) = 2 * cos (complex_of_real (a * ln (real n)))
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a) = 2 * cos (complex_of_real (a * ln (real n)))
[PROOF STEP]
by (subst cos_exp_eq) (simp_all add: powr_def algebra_simps)
[PROOF STATE]
proof (state)
this:
of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a) = 2 * cos (complex_of_real (a * ln (real n)))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_nat n powr (\<i> * complex_of_real a) + of_nat n powr (- \<i> * complex_of_real a) = 2 * cos (complex_of_real (a * ln (real n)))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
have "mangoldt n / ln (real n) * (2 + \<dots>) =
                     of_real (2 * mangoldt n / ln n * (1 + cos (a * ln n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (mangoldt n / ln (real n)) * (2 + 2 * cos (complex_of_real (a * ln (real n)))) = complex_of_real (2 * mangoldt n / ln (real n) * (1 + cos (a * ln (real n))))
[PROOF STEP]
by (subst cos_of_real) simp_all
[PROOF STATE]
proof (state)
this:
complex_of_real (mangoldt n / ln (real n)) * (2 + 2 * cos (complex_of_real (a * ln (real n)))) = complex_of_real (2 * mangoldt n / ln (real n) * (1 + cos (a * ln (real n))))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = complex_of_real (2 * mangoldt n / ln (real n) * (1 + cos (a * ln (real n))))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = complex_of_real (2 * mangoldt n / ln (real n) * (1 + cos (a * ln (real n))))

goal (1 subgoal):
 1. fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n
[PROOF STEP]
by (simp add: fds_nth_fds')
[PROOF STATE]
proof (state)
this:
fds_nth (2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)))) n = fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
2 * fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n)) + fds_shift (\<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) + fds_shift (- \<i> * complex_of_real a) (fds (\<lambda>n. mangoldt n /\<^sub>R ln (real n))) = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))

goal (1 subgoal):
 1. fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))

goal:
No subgoals!
[PROOF STEP]
qed
    \<comment> \<open>It is then obvious that this logarithm series has non-negative real coefficients.\<close>
[PROOF STATE]
proof (state)
this:
fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_ln 0 Q_fds = fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have "nonneg_dirichlet_series \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nonneg_dirichlet_series (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k))))))
[PROOF STEP]
proof (standard, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n \<in> \<real>\<^sub>\<ge>\<^sub>0
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:
0 < n

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n \<in> \<real>\<^sub>\<ge>\<^sub>0
[PROOF STEP]
from cos_ge_minus_one[of "a * ln n"]
[PROOF STATE]
proof (chain)
picking this:
- 1 \<le> cos (a * ln (real n))
[PROOF STEP]
have "1 + cos (a * ln (real n)) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
- 1 \<le> cos (a * ln (real n))

goal (1 subgoal):
 1. 0 \<le> 1 + cos (a * ln (real n))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 \<le> 1 + cos (a * ln (real n))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n \<in> \<real>\<^sub>\<ge>\<^sub>0
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
0 \<le> 1 + cos (a * ln (real n))

goal (1 subgoal):
 1. fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n \<in> \<real>\<^sub>\<ge>\<^sub>0
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
0 \<le> 1 + cos (a * ln (real n))
0 < n

goal (1 subgoal):
 1. fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n \<in> \<real>\<^sub>\<ge>\<^sub>0
[PROOF STEP]
by (cases "n = 0")
           (auto simp: complex_nonneg_Reals_iff fds_nth_fds' mangoldt_nonneg
                 intro!: divide_nonneg_nonneg mult_nonneg_nonneg)
[PROOF STATE]
proof (state)
this:
fds_nth (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k)))))) n \<in> \<real>\<^sub>\<ge>\<^sub>0

goal:
No subgoals!
[PROOF STEP]
qed
    \<comment> \<open>Therefore, the original series also has non-negative real coefficients.\<close>
[PROOF STATE]
proof (state)
this:
nonneg_dirichlet_series (fds (\<lambda>k. complex_of_real (2 * mangoldt k / ln (real k) * (1 + cos (a * ln (real k))))))

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
nonneg_dirichlet_series (fds_ln 0 Q_fds)
[PROOF STEP]
have nonneg: "nonneg_dirichlet_series Q_fds"
[PROOF STATE]
proof (prove)
using this:
nonneg_dirichlet_series (fds_ln 0 Q_fds)

goal (1 subgoal):
 1. nonneg_dirichlet_series Q_fds
[PROOF STEP]
by (rule nonneg_dirichlet_series_lnD) (auto simp: Q_fds_def)

    \<comment> \<open>By the Pringsheim--Landau theorem, a Dirichlet series with non-negative coefficnets that
        can be analytically continued to the entire complex plane must converge everywhere, i.\,e.\
        its abscissa of (absolute) convergence is $-\infty$:\<close>
[PROOF STATE]
proof (state)
this:
nonneg_dirichlet_series Q_fds

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have abscissa_Q_fds: "abs_conv_abscissa Q_fds \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa Q_fds \<le> 1
[PROOF STEP]
unfolding Q_fds_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa (fds_zeta\<^sup>2 * fds_shift (\<i> * complex_of_real a) fds_zeta * fds_shift (- \<i> * complex_of_real a) fds_zeta) \<le> 1
[PROOF STEP]
by (auto intro!: abs_conv_abscissa_mult_leI abs_conv_abscissa_power_leI)
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa Q_fds \<le> 1

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
with nonneg and eval_Q_fds and \<open>Q' holomorphic_on UNIV\<close>
[PROOF STATE]
proof (chain)
picking this:
nonneg_dirichlet_series Q_fds
1 < Re ?s \<Longrightarrow> eval_fds Q_fds ?s = Q' ?s
Q' holomorphic_on UNIV
abs_conv_abscissa Q_fds \<le> 1
[PROOF STEP]
have abscissa: "abs_conv_abscissa Q_fds = -\<infinity>"
[PROOF STATE]
proof (prove)
using this:
nonneg_dirichlet_series Q_fds
1 < Re ?s \<Longrightarrow> eval_fds Q_fds ?s = Q' ?s
Q' holomorphic_on UNIV
abs_conv_abscissa Q_fds \<le> 1

goal (1 subgoal):
 1. abs_conv_abscissa Q_fds = - \<infinity>
[PROOF STEP]
by (intro entire_continuation_imp_abs_conv_abscissa_MInfty[where c = 1 and g = Q'])
           (auto simp: one_ereal_def)

    \<comment> \<open>This now leads to a contradiction in a very obvious way. If @{term Q_fds} is
        absolutely convergent, then the subseries corresponding to powers of 2 (\i.e.
        we delete all summands $a_n / n ^ s$ where $n$ is not a power of 2 from the sum) is
        also absolutely convergent. We denote this series with $R$.\<close>
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa Q_fds = - \<infinity>

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
define R_fds where "R_fds = fds_primepow_subseries 2 Q_fds"
[PROOF STATE]
proof (state)
this:
R_fds = fds_primepow_subseries 2 Q_fds

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have "conv_abscissa R_fds \<le> abs_conv_abscissa R_fds"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_abscissa R_fds \<le> abs_conv_abscissa R_fds
[PROOF STEP]
by (rule conv_le_abs_conv_abscissa)
[PROOF STATE]
proof (state)
this:
conv_abscissa R_fds \<le> abs_conv_abscissa R_fds

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
conv_abscissa R_fds \<le> abs_conv_abscissa R_fds

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have "abs_conv_abscissa R_fds \<le> abs_conv_abscissa Q_fds"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa R_fds \<le> abs_conv_abscissa Q_fds
[PROOF STEP]
unfolding R_fds_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa (fds_primepow_subseries 2 Q_fds) \<le> abs_conv_abscissa Q_fds
[PROOF STEP]
by (rule abs_conv_abscissa_restrict)
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa R_fds \<le> abs_conv_abscissa Q_fds

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa R_fds \<le> abs_conv_abscissa Q_fds

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have "\<dots> = -\<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa Q_fds = - \<infinity>
[PROOF STEP]
by (simp add: abscissa)
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa Q_fds = - \<infinity>

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
conv_abscissa R_fds \<le> - \<infinity>
[PROOF STEP]
have abscissa': "conv_abscissa R_fds = -\<infinity>"
[PROOF STATE]
proof (prove)
using this:
conv_abscissa R_fds \<le> - \<infinity>

goal (1 subgoal):
 1. conv_abscissa R_fds = - \<infinity>
[PROOF STEP]
by simp

    \<comment> \<open>Since $\zeta(s)$ and $\zeta(s \pm ia)$ have an Euler product expansion for
        $\mathfrak{R}(s) > 1$, we have
          \[R(s) = (1 - 2^{-s})^-2 (1 - 2^{-s+ia})^{-1} (1 - 2^{-s-ia})^{-1}\]
        there, and since $R$ converges everywhere and the right-hand side is holomorphic for
        $\mathfrak{R}(s) > 0$, the equation is also valid for all $s$ with $\mathfrak{R}(s) > 0$
        by analytic continuation.\<close>
[PROOF STATE]
proof (state)
this:
conv_abscissa R_fds = - \<infinity>

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
have eval_R: "eval_fds R_fds s =
                   1 / ((1 - 2 powr -s) ^ 2 * (1 - 2 powr (-s + \<i> * a)) * (1 - 2 powr (-s - \<i> * a)))"
      (is "_ = ?f s") if "Re s > 0" for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds R_fds s = 1 / ((1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eval_fds R_fds s = 1 / ((1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds R_fds s = 1 / ((1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)))
[PROOF STEP]
proof (rule analytic_continuation_open[where f = "eval_fds R_fds"])
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. open ?s
 2. open ?s'
 3. ?s \<noteq> {}
 4. connected ?s'
 5. ?s \<subseteq> ?s'
 6. eval_fds R_fds holomorphic_on ?s'
 7. (\<lambda>b. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a)))) holomorphic_on ?s'
 8. \<And>z. z \<in> ?s \<Longrightarrow> eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
 9. s \<in> ?s'
[PROOF STEP]
show "?f holomorphic_on {s. Re s > 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>b. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a)))) holomorphic_on {s. 0 < Re s}
[PROOF STEP]
by (intro holomorphic_intros) (auto simp: powr_def exp_eq_1 Ln_Reals_eq)
[PROOF STATE]
proof (state)
this:
(\<lambda>b. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a)))) holomorphic_on {s. 0 < Re s}

goal (8 subgoals):
 1. open ?s
 2. open {s. 0 < Re s}
 3. ?s \<noteq> {}
 4. connected {s. 0 < Re s}
 5. ?s \<subseteq> {s. 0 < Re s}
 6. eval_fds R_fds holomorphic_on {s. 0 < Re s}
 7. \<And>z. z \<in> ?s \<Longrightarrow> eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
 8. s \<in> {s. 0 < Re s}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. open ?s
 2. open {s. 0 < Re s}
 3. ?s \<noteq> {}
 4. connected {s. 0 < Re s}
 5. ?s \<subseteq> {s. 0 < Re s}
 6. eval_fds R_fds holomorphic_on {s. 0 < Re s}
 7. \<And>z. z \<in> ?s \<Longrightarrow> eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
 8. s \<in> {s. 0 < Re s}
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. open ?s
 2. open {s. 0 < Re s}
 3. ?s \<noteq> {}
 4. connected {s. 0 < Re s}
 5. ?s \<subseteq> {s. 0 < Re s}
 6. eval_fds R_fds holomorphic_on {s. 0 < Re s}
 7. \<And>z. z \<in> ?s \<Longrightarrow> eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
 8. s \<in> {s. 0 < Re s}
[PROOF STEP]
assume z: "z \<in> {s. Re s > 1}"
[PROOF STATE]
proof (state)
this:
z \<in> {s. 1 < Re s}

goal (8 subgoals):
 1. open ?s
 2. open {s. 0 < Re s}
 3. ?s \<noteq> {}
 4. connected {s. 0 < Re s}
 5. ?s \<subseteq> {s. 0 < Re s}
 6. eval_fds R_fds holomorphic_on {s. 0 < Re s}
 7. \<And>z. z \<in> ?s \<Longrightarrow> eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
 8. s \<in> {s. 0 < Re s}
[PROOF STEP]
have [simp]: "completely_multiplicative_function (fds_nth fds_zeta)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. completely_multiplicative_function (fds_nth fds_zeta)
[PROOF STEP]
by standard auto
[PROOF STATE]
proof (state)
this:
completely_multiplicative_function (fds_nth fds_zeta)

goal (8 subgoals):
 1. open ?s
 2. open {s. 0 < Re s}
 3. ?s \<noteq> {}
 4. connected {s. 0 < Re s}
 5. ?s \<subseteq> {s. 0 < Re s}
 6. eval_fds R_fds holomorphic_on {s. 0 < Re s}
 7. \<And>z. z \<in> ?s \<Longrightarrow> eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
 8. s \<in> {s. 0 < Re s}
[PROOF STEP]
thus "eval_fds R_fds z = ?f z"
[PROOF STATE]
proof (prove)
using this:
completely_multiplicative_function (fds_nth fds_zeta)

goal (1 subgoal):
 1. eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
[PROOF STEP]
using z
[PROOF STATE]
proof (prove)
using this:
completely_multiplicative_function (fds_nth fds_zeta)
z \<in> {s. 1 < Re s}

goal (1 subgoal):
 1. eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))
[PROOF STEP]
by (simp add: R_fds_def Q_fds_def eval_fds_mult eval_fds_power fds_abs_converges_mult
                fds_abs_converges_power fds_primepow_subseries_euler_product_cm divide_simps
                powr_minus powr_diff powr_add fds_abs_summable_zeta)
[PROOF STATE]
proof (state)
this:
eval_fds R_fds z = 1 / ((1 - 2 powr - z)\<^sup>2 * (1 - 2 powr (- z + \<i> * complex_of_real a)) * (1 - 2 powr (- z - \<i> * complex_of_real a)))

goal (7 subgoals):
 1. open {s. 1 < Re s}
 2. open {s. 0 < Re s}
 3. {s. 1 < Re s} \<noteq> {}
 4. connected {s. 0 < Re s}
 5. {s. 1 < Re s} \<subseteq> {s. 0 < Re s}
 6. eval_fds R_fds holomorphic_on {s. 0 < Re s}
 7. s \<in> {s. 0 < Re s}
[PROOF STEP]
qed (insert that abscissa', auto intro!: exI[of _ 2] convex_connected open_halfspace_Re_gt
                                               convex_halfspace_Re_gt holomorphic_intros)
[PROOF STATE]
proof (state)
this:
eval_fds R_fds s = 1 / ((1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)))

goal:
No subgoals!
[PROOF STEP]
qed

    \<comment> \<open>We now clearly have a contradiction: $R(s)$, being entire, is continuous everywhere,
        while the function on the right-hand side clearly has a pole at $0$.\<close>
[PROOF STATE]
proof (state)
this:
0 < Re ?s \<Longrightarrow> eval_fds R_fds ?s = 1 / ((1 - 2 powr - ?s)\<^sup>2 * (1 - 2 powr (- ?s + \<i> * complex_of_real a)) * (1 - 2 powr (- ?s - \<i> * complex_of_real a)))

goal (1 subgoal):
 1. zeta s = 0 \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
proof (rule not_tendsto_and_filterlim_at_infinity)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
have "((\<lambda>b. (1-2 powr - b)\<^sup>2 * (1 - 2 powr (-b+\<i>*a)) * (1 - 2 powr (-b-\<i>*a))) \<longlongrightarrow> 0)
              (at 0 within {s. Re s > 0})"
        (is "filterlim ?f' _ _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>b. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) \<longlongrightarrow> 0) (at 0 within {s. 0 < Re s})
[PROOF STEP]
by (intro tendsto_eq_intros) (auto)
[PROOF STATE]
proof (state)
this:
((\<lambda>b. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) \<longlongrightarrow> 0) (at 0 within {s. 0 < Re s})

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((\<lambda>b. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) \<longlongrightarrow> 0) (at 0 within {s. 0 < Re s})

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
have "eventually (\<lambda>s. s \<in> {s. Re s > 0}) (at 0 within {s. Re s > 0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. s \<in> {s. 0 < Re s}
[PROOF STEP]
by (auto simp: eventually_at_filter)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. s \<in> {s. 0 < Re s}

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
hence "eventually (\<lambda>s. ?f' s \<noteq> 0) (at 0 within {s. Re s > 0})"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. s \<in> {s. 0 < Re s}

goal (1 subgoal):
 1. \<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. (1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)) \<noteq> 0
[PROOF STEP]
by eventually_elim (auto simp: powr_def exp_eq_1 Ln_Reals_eq)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. (1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)) \<noteq> 0

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>b. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) \<longlongrightarrow> 0) (at 0 within {s. 0 < Re s})
\<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. (1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)) \<noteq> 0
[PROOF STEP]
have "filterlim ?f' (at 0) (at 0 within {s. Re s > 0})"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>b. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) \<longlongrightarrow> 0) (at 0 within {s. 0 < Re s})
\<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. (1 - 2 powr - s)\<^sup>2 * (1 - 2 powr (- s + \<i> * complex_of_real a)) * (1 - 2 powr (- s - \<i> * complex_of_real a)) \<noteq> 0

goal (1 subgoal):
 1. LIM b at 0 within {s. 0 < Re s}. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a)) :> at 0
[PROOF STEP]
by (simp add: filterlim_at)
[PROOF STATE]
proof (state)
this:
LIM b at 0 within {s. 0 < Re s}. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a)) :> at 0

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
hence "filterlim ?f at_infinity (at 0 within {s. Re s > 0})" (is ?lim)
[PROOF STATE]
proof (prove)
using this:
LIM b at 0 within {s. 0 < Re s}. (1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a)) :> at 0

goal (1 subgoal):
 1. LIM b at 0 within {s. 0 < Re s}. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) :> at_infinity
[PROOF STEP]
by (intro filterlim_divide_at_infinity[OF tendsto_const]
                     tendsto_mult_filterlim_at_infinity) auto
[PROOF STATE]
proof (state)
this:
LIM b at 0 within {s. 0 < Re s}. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) :> at_infinity

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LIM b at 0 within {s. 0 < Re s}. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) :> at_infinity

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
have ev: "eventually (\<lambda>s. Re s > 0) (at 0 within {s. Re s > 0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. 0 < Re s
[PROOF STEP]
by (auto simp: eventually_at intro!: exI[of _ 1])
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F s in at 0 within {s. 0 < Re s}. 0 < Re s

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
have "?lim \<longleftrightarrow> filterlim (eval_fds R_fds) at_infinity (at 0 within {s. Re s > 0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LIM b at 0 within {s. 0 < Re s}. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) :> at_infinity) = filterlim (eval_fds R_fds) at_infinity (at 0 within {s. 0 < Re s})
[PROOF STEP]
by (intro filterlim_cong refl eventually_mono[OF ev]) (auto simp: eval_R)
[PROOF STATE]
proof (state)
this:
(LIM b at 0 within {s. 0 < Re s}. 1 / ((1 - 2 powr - b)\<^sup>2 * (1 - 2 powr (- b + \<i> * complex_of_real a)) * (1 - 2 powr (- b - \<i> * complex_of_real a))) :> at_infinity) = filterlim (eval_fds R_fds) at_infinity (at 0 within {s. 0 < Re s})

goal (3 subgoals):
 1. ?F \<noteq> bot
 2. (?f \<longlongrightarrow> ?c) ?F
 3. filterlim ?f at_infinity ?F
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
filterlim (eval_fds R_fds) at_infinity (at 0 within {s. 0 < Re s})
[PROOF STEP]
show \<dots>
[PROOF STATE]
proof (prove)
using this:
filterlim (eval_fds R_fds) at_infinity (at 0 within {s. 0 < Re s})

goal (1 subgoal):
 1. filterlim (eval_fds R_fds) at_infinity (at 0 within {s. 0 < Re s})
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
filterlim (eval_fds R_fds) at_infinity (at 0 within {s. 0 < Re s})

goal (2 subgoals):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
 2. (eval_fds R_fds \<longlongrightarrow> ?c) (at 0 within {s. 0 < Re s})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
 2. (eval_fds R_fds \<longlongrightarrow> ?c) (at 0 within {s. 0 < Re s})
[PROOF STEP]
have "continuous (at 0 within {s. Re s > 0}) (eval_fds R_fds)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous (at 0 within {s. 0 < Re s}) (eval_fds R_fds)
[PROOF STEP]
by (intro continuous_intros) (auto simp: abscissa')
[PROOF STATE]
proof (state)
this:
continuous (at 0 within {s. 0 < Re s}) (eval_fds R_fds)

goal (2 subgoals):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
 2. (eval_fds R_fds \<longlongrightarrow> ?c) (at 0 within {s. 0 < Re s})
[PROOF STEP]
thus "((eval_fds R_fds \<longlongrightarrow> eval_fds R_fds 0)) (at 0 within {s. Re s > 0})"
[PROOF STATE]
proof (prove)
using this:
continuous (at 0 within {s. 0 < Re s}) (eval_fds R_fds)

goal (1 subgoal):
 1. (eval_fds R_fds \<longlongrightarrow> eval_fds R_fds 0) (at 0 within {s. 0 < Re s})
[PROOF STEP]
by (auto simp: continuous_within)
[PROOF STATE]
proof (state)
this:
(eval_fds R_fds \<longlongrightarrow> eval_fds R_fds 0) (at 0 within {s. 0 < Re s})

goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
have "0 \<in> {s. Re s \<ge> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<in> {s. 0 \<le> Re s}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<in> {s. 0 \<le> Re s}

goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 \<in> {s. 0 \<le> Re s}

goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
have "{s. Re s \<ge> 0} = closure {s. Re s > 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {s. 0 \<le> Re s} = closure {s. 0 < Re s}
[PROOF STEP]
using closure_halfspace_gt[of "1::complex" 0]
[PROOF STATE]
proof (prove)
using this:
1 \<noteq> 0 \<Longrightarrow> closure {x. 0 < 1 \<bullet> x} = {x. 0 \<le> 1 \<bullet> x}

goal (1 subgoal):
 1. {s. 0 \<le> Re s} = closure {s. 0 < Re s}
[PROOF STEP]
by (simp add: inner_commute)
[PROOF STATE]
proof (state)
this:
{s. 0 \<le> Re s} = closure {s. 0 < Re s}

goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 \<in> closure {s. 0 < Re s}
[PROOF STEP]
have "0 \<in> \<dots>"
[PROOF STATE]
proof (prove)
using this:
0 \<in> closure {s. 0 < Re s}

goal (1 subgoal):
 1. 0 \<in> closure {s. 0 < Re s}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
0 \<in> closure {s. 0 < Re s}

goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
thus "at 0 within {s. Re s > 0} \<noteq> bot"
[PROOF STATE]
proof (prove)
using this:
0 \<in> closure {s. 0 < Re s}

goal (1 subgoal):
 1. at 0 within {s. 0 < Re s} \<noteq> bot
[PROOF STEP]
by (subst at_within_eq_bot_iff) auto
[PROOF STATE]
proof (state)
this:
at 0 within {s. 0 < Re s} \<noteq> bot

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
zeta s \<noteq> 0

goal (1 subgoal):
 1. 1 < Re s \<Longrightarrow> zeta s \<noteq> 0
[PROOF STEP]
qed (fact zeta_Re_gt_1_nonzero)


[STATEMENT]
lemma tendsto_at_botI_sequentially:
  fixes f :: "real \<Rightarrow> 'b::first_countable_topology"
  assumes *: "\<And>X. filterlim X at_bot sequentially \<Longrightarrow> (\<lambda>n. f (X n)) \<longlonglongrightarrow> y"
  shows "(f \<longlongrightarrow> y) at_bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> y) at_bot
[PROOF STEP]
unfolding filterlim_at_bot_mirror
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f (- x)) \<longlongrightarrow> y) at_top
[PROOF STEP]
proof (rule tendsto_at_topI_sequentially)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>X. filterlim X at_top sequentially \<Longrightarrow> (\<lambda>n. f (- X n)) \<longlonglongrightarrow> y
[PROOF STEP]
fix X :: "nat \<Rightarrow> real"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>X. filterlim X at_top sequentially \<Longrightarrow> (\<lambda>n. f (- X n)) \<longlonglongrightarrow> y
[PROOF STEP]
assume "filterlim X at_top sequentially"
[PROOF STATE]
proof (state)
this:
filterlim X at_top sequentially

goal (1 subgoal):
 1. \<And>X. filterlim X at_top sequentially \<Longrightarrow> (\<lambda>n. f (- X n)) \<longlonglongrightarrow> y
[PROOF STEP]
thus "(\<lambda>n. f (-X n)) \<longlonglongrightarrow> y"
[PROOF STATE]
proof (prove)
using this:
filterlim X at_top sequentially

goal (1 subgoal):
 1. (\<lambda>n. f (- X n)) \<longlonglongrightarrow> y
[PROOF STEP]
by (intro *) (auto simp: filterlim_uminus_at_top)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. f (- X n)) \<longlonglongrightarrow> y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mvt_simple:
  fixes f :: "real \<Rightarrow> real"
  assumes "a < b"
    and derf: "\<And>x. \<lbrakk>a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> (f has_derivative f' x) (at x within {a..b})"
  shows "\<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)
[PROOF STEP]
proof (rule mvt)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. ?a < ?b
 2. continuous_on {?a..?b} ?f
 3. \<And>x. \<lbrakk>?a < x; x < ?b\<rbrakk> \<Longrightarrow> (?f has_derivative ?f' x) (at x)
 4. \<And>\<xi>. \<lbrakk>?a < \<xi>; \<xi> < ?b; ?f ?b - ?f ?a = ?f' \<xi> (?b - ?a)\<rbrakk> \<Longrightarrow> \<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)
[PROOF STEP]
have "f differentiable_on {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f differentiable_on {a..b}
[PROOF STEP]
using derf
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>a \<le> ?x; ?x \<le> b\<rbrakk> \<Longrightarrow> (f has_derivative f' ?x) (at ?x within {a..b})

goal (1 subgoal):
 1. f differentiable_on {a..b}
[PROOF STEP]
unfolding differentiable_on_def differentiable_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>a \<le> ?x; ?x \<le> b\<rbrakk> \<Longrightarrow> (f has_derivative f' ?x) (at ?x within {a..b})

goal (1 subgoal):
 1. \<forall>x\<in>{a..b}. \<exists>D. (f has_derivative D) (at x within {a..b})
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
f differentiable_on {a..b}

goal (4 subgoals):
 1. ?a < ?b
 2. continuous_on {?a..?b} ?f
 3. \<And>x. \<lbrakk>?a < x; x < ?b\<rbrakk> \<Longrightarrow> (?f has_derivative ?f' x) (at x)
 4. \<And>\<xi>. \<lbrakk>?a < \<xi>; \<xi> < ?b; ?f ?b - ?f ?a = ?f' \<xi> (?b - ?a)\<rbrakk> \<Longrightarrow> \<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f differentiable_on {a..b}
[PROOF STEP]
show "continuous_on {a..b} f"
[PROOF STATE]
proof (prove)
using this:
f differentiable_on {a..b}

goal (1 subgoal):
 1. continuous_on {a..b} f
[PROOF STEP]
by (rule differentiable_imp_continuous_on)
[PROOF STATE]
proof (state)
this:
continuous_on {a..b} f

goal (3 subgoals):
 1. a < b
 2. \<And>x. \<lbrakk>a < x; x < b\<rbrakk> \<Longrightarrow> (f has_derivative ?f' x) (at x)
 3. \<And>\<xi>. \<lbrakk>a < \<xi>; \<xi> < b; f b - f a = ?f' \<xi> (b - a)\<rbrakk> \<Longrightarrow> \<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)
[PROOF STEP]
show "(f has_derivative f' x) (at x)" if "a < x" "x < b" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_derivative f' x) (at x)
[PROOF STEP]
by (metis at_within_Icc_at derf leI order.asym that)
[PROOF STATE]
proof (state)
this:
\<lbrakk>a < ?x; ?x < b\<rbrakk> \<Longrightarrow> (f has_derivative f' ?x) (at ?x)

goal (2 subgoals):
 1. a < b
 2. \<And>\<xi>. \<lbrakk>a < \<xi>; \<xi> < b; f b - f a = f' \<xi> (b - a)\<rbrakk> \<Longrightarrow> \<exists>x\<in>{a<..<b}. f b - f a = f' x (b - a)
[PROOF STEP]
qed (use assms in auto)


[STATEMENT]
lemma liouville_lambda_divisors_sum:
  "(\<Sum>d | d dvd n. liouville_lambda d) = ind is_square n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>d | d dvd n. liouville_lambda d) = ind is_square n
[PROOF STEP]
proof (rule multiplicative_function_eqI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. multiplicative_function (\<lambda>a. \<Sum>d | d dvd a. liouville_lambda d)
 2. multiplicative_function (ind is_square)
 3. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
show "multiplicative_function (\<lambda>n. (\<Sum>d | d dvd n. liouville_lambda d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicative_function (\<lambda>n. \<Sum>d | d dvd n. liouville_lambda d)
[PROOF STEP]
by (rule liouville_lambda.multiplicative_sum_divisors)
[PROOF STATE]
proof (state)
this:
multiplicative_function (\<lambda>n. \<Sum>d | d dvd n. liouville_lambda d)

goal (2 subgoals):
 1. multiplicative_function (ind is_square)
 2. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
show "multiplicative_function (ind is_square)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicative_function (ind is_square)
[PROOF STEP]
by (rule is_nth_power.multiplicative_function_axioms)
[PROOF STATE]
proof (state)
this:
multiplicative_function (ind is_square)

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
fix p k :: nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
assume pk: "prime p" "k > 0"
[PROOF STATE]
proof (state)
this:
prime p
0 < k

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
hence p_gt_1: "p > 1"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < k

goal (1 subgoal):
 1. 1 < p
[PROOF STEP]
by (simp add: prime_gt_Suc_0_nat)
[PROOF STATE]
proof (state)
this:
1 < p

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
have "(\<Sum>d | d dvd p ^ k. liouville_lambda d) = (\<Sum>d\<in>(\<lambda>i. p ^ i) ` {..k}. liouville_lambda d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>d | d dvd p ^ k. liouville_lambda d) = sum liouville_lambda ((^) p ` {..k})
[PROOF STEP]
using pk
[PROOF STATE]
proof (prove)
using this:
prime p
0 < k

goal (1 subgoal):
 1. (\<Sum>d | d dvd p ^ k. liouville_lambda d) = sum liouville_lambda ((^) p ` {..k})
[PROOF STEP]
by (intro sum.cong refl) (auto intro: le_imp_power_dvd simp: divides_primepow_nat)
[PROOF STATE]
proof (state)
this:
(\<Sum>d | d dvd p ^ k. liouville_lambda d) = sum liouville_lambda ((^) p ` {..k})

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>d | d dvd p ^ k. liouville_lambda d) = sum liouville_lambda ((^) p ` {..k})

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
from pk and p_gt_1
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < k
1 < p
[PROOF STEP]
have "\<dots> = (\<Sum>i\<le>k. liouville_lambda (p ^ i))"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < k
1 < p

goal (1 subgoal):
 1. sum liouville_lambda ((^) p ` {..k}) = (\<Sum>i\<le>k. liouville_lambda (p ^ i))
[PROOF STEP]
by (subst sum.reindex) (auto simp: inj_on_def prime_gt_1_nat)
[PROOF STATE]
proof (state)
this:
sum liouville_lambda ((^) p ` {..k}) = (\<Sum>i\<le>k. liouville_lambda (p ^ i))

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum liouville_lambda ((^) p ` {..k}) = (\<Sum>i\<le>k. liouville_lambda (p ^ i))

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
from pk
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < k
[PROOF STEP]
have "\<dots> = (\<Sum>i\<le>k. (-1) ^ i)"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < k

goal (1 subgoal):
 1. (\<Sum>i\<le>k. liouville_lambda (p ^ i)) = sum ((^) (- (1::'b))) {..k}
[PROOF STEP]
by (intro sum.cong refl) simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<le>k. liouville_lambda (p ^ i)) = sum ((^) (- (1::?'b3))) {..k}

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<le>k. liouville_lambda (p ^ i)) = sum ((^) (- (1::?'b3))) {..k}

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
have "\<dots> = (if even k then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum ((^) (- (1::'b))) {..k} = (if even k then 1::'b else (0::'b))
[PROOF STEP]
by (induction k) auto
[PROOF STATE]
proof (state)
this:
sum ((^) (- (1::?'b4))) {..k} = (if even k then 1::?'b4 else (0::?'b4))

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum ((^) (- (1::?'b4))) {..k} = (if even k then 1::?'b4 else (0::?'b4))

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
from pk
[PROOF STATE]
proof (chain)
picking this:
prime p
0 < k
[PROOF STEP]
have "\<dots> = ind is_square (p ^ k)"
[PROOF STATE]
proof (prove)
using this:
prime p
0 < k

goal (1 subgoal):
 1. (if even k then 1::'b else (0::'b)) = ind is_square (p ^ k)
[PROOF STEP]
by (simp add: is_square.prime_power)
[PROOF STATE]
proof (state)
this:
(if even k then 1::?'b5 else (0::?'b5)) = ind is_square (p ^ k)

goal (1 subgoal):
 1. \<And>p k. \<lbrakk>prime p; 0 < k\<rbrakk> \<Longrightarrow> (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
show "(\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)

goal (1 subgoal):
 1. (\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>d | d dvd p ^ k. liouville_lambda d) = ind is_square (p ^ k)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma splay_bstR: "bst t \<Longrightarrow> splay a t = Node l e r \<Longrightarrow> x \<in> set_tree r \<Longrightarrow> a < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bst t; splay a t = \<langle>l, e, r\<rangle>; x \<in> set_tree r\<rbrakk> \<Longrightarrow> a < x
[PROOF STEP]
by (metis bst_iff_sorted_wrt_less sorted_Cons_iff set_inorder sorted_splay sorted_wrt_append)


[STATEMENT]
lemma (in prob_space) distributed_marginal_eq_joint_simple:
  assumes Px: "simple_function M X"
  assumes Py: "simple_distributed M Y Py"
  assumes Pxy: "simple_distributed M (\<lambda>x. (X x, Y x)) Pxy"
  assumes y: "y \<in> Y`space M"
  shows "Py y = (\<Sum>x\<in>X`space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
note Px = simple_distributedI[OF Px measure_nonneg refl]
[PROOF STATE]
proof (state)
this:
simple_distributed M X (\<lambda>x. prob (X -` {x} \<inter> space M))

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
have "AE y in count_space (Y ` space M). ennreal (Py y) =
       \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE y in count_space (Y ` space M). ennreal (Py y) = \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)
[PROOF STEP]
using sigma_finite_measure_count_space_finite sigma_finite_measure_count_space_finite
      simple_distributed[OF Py] simple_distributed_joint[OF Pxy]
[PROOF STATE]
proof (prove)
using this:
finite ?A \<Longrightarrow> sigma_finite_measure (count_space ?A)
finite ?A \<Longrightarrow> sigma_finite_measure (count_space ?A)
distributed M (count_space (Y ` space M)) Y (\<lambda>x. ennreal (Py x))
distributed M (count_space (X ` space M) \<Otimes>\<^sub>M count_space (Y ` space M)) (\<lambda>x. (X x, Y x)) (\<lambda>x. ennreal (if x \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy x else 0))

goal (1 subgoal):
 1. AE y in count_space (Y ` space M). ennreal (Py y) = \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)
[PROOF STEP]
by (rule distributed_marginal_eq_joint2)
       (auto intro: Py Px simple_distributed_finite)
[PROOF STATE]
proof (state)
this:
AE y in count_space (Y ` space M). ennreal (Py y) = \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
AE y in count_space (Y ` space M). ennreal (Py y) = \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)
[PROOF STEP]
have "ennreal (Py y) =
    (\<Sum>x\<in>X`space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0))"
[PROOF STATE]
proof (prove)
using this:
AE y in count_space (Y ` space M). ennreal (Py y) = \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)

goal (1 subgoal):
 1. ennreal (Py y) = (\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0))
[PROOF STEP]
using y Px[THEN simple_distributed_finite]
[PROOF STATE]
proof (prove)
using this:
AE y in count_space (Y ` space M). ennreal (Py y) = \<integral>\<^sup>+ x. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0) \<partial>count_space (X ` space M)
y \<in> Y ` space M
finite (X ` space M)

goal (1 subgoal):
 1. ennreal (Py y) = (\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0))
[PROOF STEP]
by (auto simp: AE_count_space nn_integral_count_space_finite)
[PROOF STATE]
proof (state)
this:
ennreal (Py y) = (\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0))

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ennreal (Py y) = (\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0))

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
have "\<dots> = (\<Sum>x\<in>X`space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)) = ennreal (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
using Pxy
[PROOF STATE]
proof (prove)
using this:
simple_distributed M (\<lambda>x. (X x, Y x)) Pxy

goal (1 subgoal):
 1. (\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)) = ennreal (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
by (intro sum_ennreal) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>X ` space M. ennreal (if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)) = ennreal (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ennreal (Py y) = ennreal (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal (Py y) = ennreal (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
using simple_distributed_nonneg[OF Py] simple_distributed_nonneg[OF Pxy]
[PROOF STATE]
proof (prove)
using this:
ennreal (Py y) = ennreal (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
0 \<le> Py ?x
0 \<le> Pxy ?x

goal (1 subgoal):
 1. Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)
[PROOF STEP]
by (subst (asm) ennreal_inj) (auto intro!: sum_nonneg)
[PROOF STATE]
proof (state)
this:
Py y = (\<Sum>x\<in>X ` space M. if (x, y) \<in> (\<lambda>x. (X x, Y x)) ` space M then Pxy (x, y) else 0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma permutation_orbit_step:
  assumes "permutation f" shows "orbit f (f s) = orbit f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orbit f (f s) = orbit f s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
permutation f

goal (1 subgoal):
 1. orbit f (f s) = orbit f s
[PROOF STEP]
by (intro self_in_orbit_step permutation_self_in_orbit)


[STATEMENT]
lemma jordan_matrix_dim[simp]:
  "dim_row (jordan_matrix n_as) = sum_list (map fst n_as)"
  "dim_col (jordan_matrix n_as) = sum_list (map fst n_as)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row (jordan_matrix n_as) = sum_list (map fst n_as) &&& dim_col (jordan_matrix n_as) = sum_list (map fst n_as)
[PROOF STEP]
unfolding jordan_matrix_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row (diag_block_mat (map (\<lambda>(x, y). jordan_block x y) n_as)) = sum_list (map fst n_as) &&& dim_col (diag_block_mat (map (\<lambda>(x, y). jordan_block x y) n_as)) = sum_list (map fst n_as)
[PROOF STEP]
by (subst dim_diag_block_mat, auto, (induct n_as, auto simp: Let_def)+)


[STATEMENT]
lemma span_add_eq2: assumes y: "y \<in> span S" shows "x + y \<in> span S \<longleftrightarrow> x \<in> span S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x + y \<in> span S) = (x \<in> span S)
[PROOF STEP]
using span_add_eq[of y S x] y
[PROOF STATE]
proof (prove)
using this:
y \<in> span S \<Longrightarrow> (y + x \<in> span S) = (x \<in> span S)
y \<in> span S

goal (1 subgoal):
 1. (x + y \<in> span S) = (x \<in> span S)
[PROOF STEP]
by (auto simp: ac_simps)


[STATEMENT]
lemma list_all2_list_all3I: "length xs = length ys \<Longrightarrow> list_all2 (case_prod P) (zip xs ys) zs \<Longrightarrow>
  list_all3 P xs ys zs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>length xs = length ys; list_all2 (\<lambda>(x, y). P x y) (zip xs ys) zs\<rbrakk> \<Longrightarrow> list_all3 P xs ys zs
[PROOF STEP]
by (induct xs ys arbitrary: zs rule: list_induct2)
    (auto simp: list_all2_Cons1 intro: list_all3.intros)


[STATEMENT]
lemma build_nfa_impl_state_set: "t \<in> set (build_nfa_impl r (q0, qf, phis)) \<Longrightarrow>
  state_set t \<subseteq> {q0..<q0 + length (build_nfa_impl r (q0, qf, phis))} \<union> {qf}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> set (build_nfa_impl r (q0, qf, phis)) \<Longrightarrow> state_set t \<subseteq> {q0..<q0 + length (build_nfa_impl r (q0, qf, phis))} \<union> {qf}
[PROOF STEP]
by (induction r "(q0, qf, phis)" arbitrary: q0 qf phis t rule: build_nfa_impl.induct)
     (fastforce simp add: build_nfa_impl_state_cnt state_cnt_pos build_nfa_impl_not_Nil
      split: option.splits)+


[STATEMENT]
lemma DERIV_const_ratio_const:
  fixes f :: "real \<Rightarrow> real"
  assumes "a \<noteq> b" and df: "\<And>x. DERIV f x :> k"
  shows "f b - f a = (b - a) * k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
proof (cases a b rule: linorder_cases)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. a < b \<Longrightarrow> f b - f a = (b - a) * k
 2. a = b \<Longrightarrow> f b - f a = (b - a) * k
 3. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
case less
[PROOF STATE]
proof (state)
this:
a < b

goal (3 subgoals):
 1. a < b \<Longrightarrow> f b - f a = (b - a) * k
 2. a = b \<Longrightarrow> f b - f a = (b - a) * k
 3. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
using MVT [OF less] df
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous_on {a..b} ?f; \<And>x. \<lbrakk>a < x; x < b\<rbrakk> \<Longrightarrow> ?f differentiable at x\<rbrakk> \<Longrightarrow> \<exists>l z. a < z \<and> z < b \<and> (?f has_real_derivative l) (at z) \<and> ?f b - ?f a = (b - a) * l
(f has_real_derivative k) (at ?x)

goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
by (metis DERIV_continuous DERIV_unique continuous_at_imp_continuous_on real_differentiable_def)
[PROOF STATE]
proof (state)
this:
f b - f a = (b - a) * k

goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
case greater
[PROOF STATE]
proof (state)
this:
b < a

goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
have  "f a - f b = (a - b) * k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a - f b = (a - b) * k
[PROOF STEP]
using MVT [OF greater] df
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous_on {b..a} ?f; \<And>x. \<lbrakk>b < x; x < a\<rbrakk> \<Longrightarrow> ?f differentiable at x\<rbrakk> \<Longrightarrow> \<exists>l z. b < z \<and> z < a \<and> (?f has_real_derivative l) (at z) \<and> ?f a - ?f b = (a - b) * l
(f has_real_derivative k) (at ?x)

goal (1 subgoal):
 1. f a - f b = (a - b) * k
[PROOF STEP]
by (metis DERIV_continuous DERIV_unique continuous_at_imp_continuous_on real_differentiable_def)
[PROOF STATE]
proof (state)
this:
f a - f b = (a - b) * k

goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f a - f b = (a - b) * k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f a - f b = (a - b) * k

goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
f b - f a = (b - a) * k

goal (1 subgoal):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
qed auto


[STATEMENT]
lemma max_balls_interior'':
  assumes "U \<subseteq> carrier Q\<^sub>p"
  assumes "U \<noteq> carrier Q\<^sub>p"
  assumes "a \<in> interior U"
  shows "\<exists>B \<in> max_balls U. a \<in> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>B\<in>max_balls U. a \<in> B
[PROOF STEP]
using assms(1) assms(2) assms(3) max_balls_interior
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> carrier Q\<^sub>p
U \<noteq> carrier Q\<^sub>p
a \<in> interior U
\<lbrakk>?U \<subseteq> carrier Q\<^sub>p; ?U \<noteq> carrier Q\<^sub>p\<rbrakk> \<Longrightarrow> interior ?U = {x \<in> carrier Q\<^sub>p. \<exists>B\<in>max_balls ?U. x \<in> B}

goal (1 subgoal):
 1. \<exists>B\<in>max_balls U. a \<in> B
[PROOF STEP]
by blast


[STATEMENT]
lemma compute_ofsm_tables_lookup_invar :
  assumes "i < Suc k"
  shows "ofsm_lookup (the (Mapping.lookup (compute_ofsm_tables M k) i)) q = ofsm_table M (\<lambda>q . states M) i q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ofsm_lookup (the (Mapping.lookup (compute_ofsm_tables M k) i)) q = ofsm_table M (\<lambda>q. FSM.states M) i q
[PROOF STEP]
using compute_ofsm_table_list_props(2)[OF assms]
[PROOF STATE]
proof (prove)
using this:
ofsm_lookup (compute_ofsm_table_list ?M k ! i) ?q = ofsm_table ?M (\<lambda>q. FSM.states ?M) i ?q

goal (1 subgoal):
 1. ofsm_lookup (the (Mapping.lookup (compute_ofsm_tables M k) i)) q = ofsm_table M (\<lambda>q. FSM.states M) i q
[PROOF STEP]
unfolding compute_ofsm_tables_entries[OF assms]
[PROOF STATE]
proof (prove)
using this:
ofsm_lookup (compute_ofsm_table_list ?M k ! i) ?q = ofsm_table ?M (\<lambda>q. FSM.states ?M) i ?q

goal (1 subgoal):
 1. ofsm_lookup (compute_ofsm_table_list M k ! i) q = ofsm_table M (\<lambda>q. FSM.states M) i q
[PROOF STEP]
by metis