[STATEMENT]
lemma twice_field_differentiable_at_add [intro]:
  assumes "f twice_field_differentiable_at x"
      and "g twice_field_differentiable_at x"
    shows "(\<lambda>x. f x + g x) twice_field_differentiable_at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
obtain S S'
   where Df_on_S:  "f field_differentiable_on S" and x_int_S: "x \<in> interior S"
     and Dg_on_S': "g field_differentiable_on S'" and x_int_S': " x \<in> interior S'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>S S'. \<lbrakk>f field_differentiable_on S; x \<in> interior S; g field_differentiable_on S'; x \<in> interior S'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms twice_field_differentiable_at_def
[PROOF STATE]
proof (prove)
using this:
f twice_field_differentiable_at x
g twice_field_differentiable_at x
?f twice_field_differentiable_at ?x \<equiv> \<exists>S. ?f field_differentiable_on S \<and> ?x \<in> interior S \<and> deriv ?f field_differentiable at ?x

goal (1 subgoal):
 1. (\<And>S S'. \<lbrakk>f field_differentiable_on S; x \<in> interior S; g field_differentiable_on S'; x \<in> interior S'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f field_differentiable_on S
x \<in> interior S
g field_differentiable_on S'
x \<in> interior S'

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
let ?T = "interior (S \<inter> S')"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
have x_int_T: "x \<in> interior ?T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> interior (interior (S \<inter> S'))
[PROOF STEP]
by (simp add: x_int_S x_int_S')
[PROOF STATE]
proof (state)
this:
x \<in> interior (interior (S \<inter> S'))

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
have Df_on_T: "f field_differentiable_on ?T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f field_differentiable_on interior (S \<inter> S')
[PROOF STEP]
by (meson Df_on_S field_differentiable_on_subset inf_sup_ord(1) interior_subset)
[PROOF STATE]
proof (state)
this:
f field_differentiable_on interior (S \<inter> S')

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
have  Dg_on_fT: "g field_differentiable_on ?T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g field_differentiable_on interior (S \<inter> S')
[PROOF STEP]
by (meson Dg_on_S' field_differentiable_on_subset interior_subset le_infE)
[PROOF STATE]
proof (state)
this:
g field_differentiable_on interior (S \<inter> S')

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
have "(\<lambda>x. f x + g x) field_differentiable_on ?T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x + g x) field_differentiable_on interior (S \<inter> S')
[PROOF STEP]
unfolding field_differentiable_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>interior (S \<inter> S'). (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
assume x_in_T: "x \<in> ?T"
[PROOF STATE]
proof (state)
this:
x \<in> interior (S \<inter> S')

goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
have "f field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f field_differentiable at x
[PROOF STEP]
by (metis x_in_T Df_on_T at_within_open field_differentiable_on_def open_interior)
[PROOF STATE]
proof (state)
this:
f field_differentiable at x

goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f field_differentiable at x

goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
have "g field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g field_differentiable at x
[PROOF STEP]
by (metis x_in_T Dg_on_fT at_within_open field_differentiable_on_def open_interior)
[PROOF STATE]
proof (state)
this:
g field_differentiable at x

goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
f field_differentiable at x
g field_differentiable at x
[PROOF STEP]
have "(\<lambda>x. f x + g x) field_differentiable at x"
[PROOF STATE]
proof (prove)
using this:
f field_differentiable at x
g field_differentiable at x

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
by (simp add: field_differentiable_add)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x + g x) field_differentiable at x

goal (1 subgoal):
 1. \<And>x. x \<in> interior (S \<inter> S') \<Longrightarrow> (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
show "(\<lambda>x. f x + g x) field_differentiable at x within ?T"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x + g x) field_differentiable at x

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
using field_differentiable_at_within
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x + g x) field_differentiable at x
?f field_differentiable at ?x \<Longrightarrow> ?f field_differentiable at ?x within ?S

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x + g x) field_differentiable at x within interior (S \<inter> S')

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x + g x) field_differentiable_on interior (S \<inter> S')

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x + g x) field_differentiable_on interior (S \<inter> S')

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
have "deriv (\<lambda>x. f x + g x) field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
have "deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x
[PROOF STEP]
by (simp add: assms once_field_differentiable_at)
[PROOF STATE]
proof (state)
this:
deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x

goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x

goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
have "(\<lambda>x. deriv f x + deriv g x) field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. deriv f x + deriv g x) field_differentiable at x
[PROOF STEP]
by (simp add: field_differentiable_add assms deriv_field_differentiable_at)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. deriv f x + deriv g x) field_differentiable at x

goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x
(\<lambda>x. deriv f x + deriv g x) field_differentiable at x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x
(\<lambda>x. deriv f x + deriv g x) field_differentiable at x

goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
using assms DERIV_deriv_iff_field_differentiable
            DERIV_cong_ev[of x x "deriv (\<lambda>x. f x + g x)" "\<lambda>x. deriv f x + deriv g x"]
[PROOF STATE]
proof (prove)
using this:
deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x
(\<lambda>x. deriv f x + deriv g x) field_differentiable at x
f twice_field_differentiable_at x
g twice_field_differentiable_at x
(?f has_field_derivative deriv ?f ?x) (at ?x) = (?f field_differentiable at ?x)
\<lbrakk>x = x; \<forall>\<^sub>F x in nhds x. deriv (\<lambda>x. f x + g x) x = deriv f x + deriv g x; ?u = ?v\<rbrakk> \<Longrightarrow> (deriv (\<lambda>x. f x + g x) has_field_derivative ?u) (at x) = ((\<lambda>x. deriv f x + deriv g x) has_field_derivative ?v) (at x)

goal (1 subgoal):
 1. deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
by (simp add: eventually_deriv_add field_differentiable_def)
[PROOF STATE]
proof (state)
this:
deriv (\<lambda>x. f x + g x) field_differentiable at x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
deriv (\<lambda>x. f x + g x) field_differentiable at x

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f x + g x) field_differentiable_on interior (S \<inter> S')
deriv (\<lambda>x. f x + g x) field_differentiable at x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x + g x) field_differentiable_on interior (S \<inter> S')
deriv (\<lambda>x. f x + g x) field_differentiable at x

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
using twice_field_differentiable_at_def x_int_T
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x + g x) field_differentiable_on interior (S \<inter> S')
deriv (\<lambda>x. f x + g x) field_differentiable at x
?f twice_field_differentiable_at ?x \<equiv> \<exists>S. ?f field_differentiable_on S \<and> ?x \<in> interior S \<and> deriv ?f field_differentiable at ?x
x \<in> interior (interior (S \<inter> S'))

goal (1 subgoal):
 1. (\<lambda>x. f x + g x) twice_field_differentiable_at x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x + g x) twice_field_differentiable_at x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma valid_path_reversepath [simp]: "valid_path(reversepath g) \<longleftrightarrow> valid_path g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_path (reversepath g) = valid_path g
[PROOF STEP]
using valid_path_imp_reverse
[PROOF STATE]
proof (prove)
using this:
valid_path ?g \<Longrightarrow> valid_path (reversepath ?g)

goal (1 subgoal):
 1. valid_path (reversepath g) = valid_path g
[PROOF STEP]
by force


[STATEMENT]
lemma sigma_sets_into_sp: "A \<subseteq> Pow sp \<Longrightarrow> x \<in> sigma_sets sp A \<Longrightarrow> x \<subseteq> sp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<subseteq> Pow sp; x \<in> sigma_sets sp A\<rbrakk> \<Longrightarrow> x \<subseteq> sp
[PROOF STEP]
by (erule sigma_sets.induct, auto)


[STATEMENT]
lemma terms_cases: \<open>t \<in> terms S \<Longrightarrow> t = Fun 0 [] \<or> (\<exists>p \<in> S. t \<in> set (subtermFm p))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> terms S \<Longrightarrow> t = Fun 0 [] \<or> (\<exists>p\<in>S. t \<in> set (subtermFm p))
[PROOF STEP]
unfolding terms_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> (if (\<Union>p\<in>S. set (subtermFm p)) = {} then {Fun 0 []} else \<Union>p\<in>S. set (subtermFm p)) \<Longrightarrow> t = Fun 0 [] \<or> (\<exists>p\<in>S. t \<in> set (subtermFm p))
[PROOF STEP]
by (simp split: if_splits)


[STATEMENT]
lemma open_prod_intro:
  assumes "\<And>x. x \<in> S \<Longrightarrow> \<exists>A B. open A \<and> open B \<and> x \<in> A \<times> B \<and> A \<times> B \<subseteq> S"
  shows "open S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> S \<Longrightarrow> \<exists>A B. open A \<and> open B \<and> ?x \<in> A \<times> B \<and> A \<times> B \<subseteq> S

goal (1 subgoal):
 1. open S
[PROOF STEP]
unfolding open_prod_def
[PROOF STATE]
proof (prove)
using this:
?x \<in> S \<Longrightarrow> \<exists>A B. open A \<and> open B \<and> ?x \<in> A \<times> B \<and> A \<times> B \<subseteq> S

goal (1 subgoal):
 1. \<forall>x\<in>S. \<exists>A B. open A \<and> open B \<and> x \<in> A \<times> B \<and> A \<times> B \<subseteq> S
[PROOF STEP]
by fast


[STATEMENT]
lemma extend_measure_cong:
  assumes "\<Omega> = \<Omega>'" "I = I'" "G = G'" "\<And>i. i \<in> I' \<Longrightarrow> \<mu> i = \<mu>' i"
  shows "extend_measure \<Omega> I G \<mu> = extend_measure \<Omega>' I' G' \<mu>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extend_measure \<Omega> I G \<mu> = extend_measure \<Omega>' I' G' \<mu>'
[PROOF STEP]
unfolding extend_measure_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if (\<exists>\<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G ` I)) \<mu>') \<and> \<not> (\<forall>i\<in>I. \<mu> i = 0) then measure_of \<Omega> (G ` I) (SOME \<mu>'. (\<forall>i\<in>I. \<mu>' (G i) = \<mu> i) \<and> measure_space \<Omega> (sigma_sets \<Omega> (G ` I)) \<mu>') else sigma \<Omega> (G ` I)) = (if (\<exists>\<mu>''. (\<forall>i\<in>I'. \<mu>'' (G' i) = \<mu>' i) \<and> measure_space \<Omega>' (sigma_sets \<Omega>' (G' ` I')) \<mu>'') \<and> \<not> (\<forall>i\<in>I'. \<mu>' i = 0) then measure_of \<Omega>' (G' ` I') (SOME \<mu>''. (\<forall>i\<in>I'. \<mu>'' (G' i) = \<mu>' i) \<and> measure_space \<Omega>' (sigma_sets \<Omega>' (G' ` I')) \<mu>'') else sigma \<Omega>' (G' ` I'))
[PROOF STEP]
by (auto simp add: assms)


[STATEMENT]
lemma xor_left_comm: "x \<oplus> (y \<oplus> z) = y \<oplus> (x \<oplus> z)" if "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<oplus> y \<oplus> z = y \<oplus> x \<oplus> z
[PROOF STEP]
using that xor_assoc xor_comm
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier L
y \<in> carrier L
z \<in> carrier L
\<lbrakk>?x \<in> carrier L; ?y \<in> carrier L; ?z \<in> carrier L\<rbrakk> \<Longrightarrow> (?x \<oplus> ?y) \<oplus> ?z = ?x \<oplus> ?y \<oplus> ?z
\<lbrakk>?x \<in> carrier L; ?y \<in> carrier L\<rbrakk> \<Longrightarrow> ?x \<oplus> ?y = ?y \<oplus> ?x

goal (1 subgoal):
 1. x \<oplus> y \<oplus> z = y \<oplus> x \<oplus> z
[PROOF STEP]
by auto


[STATEMENT]
lemma Qp_pow_ConsI:
  assumes "t \<in> carrier Q\<^sub>p"
  assumes "x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)"
  shows "t#x \<in> carrier (Q\<^sub>p\<^bsup>Suc m\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t # x \<in> carrier (Q\<^sub>p\<^bsup>Suc m\<^esup>)
[PROOF STEP]
using assms cartesian_power_cons[of x Q\<^sub>p m t] Suc_eq_plus1
[PROOF STATE]
proof (prove)
using this:
t \<in> carrier Q\<^sub>p
x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)
\<lbrakk>x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>); t \<in> carrier Q\<^sub>p\<rbrakk> \<Longrightarrow> t # x \<in> carrier (Q\<^sub>p\<^bsup>m + 1\<^esup>)
Suc ?n = ?n + 1

goal (1 subgoal):
 1. t # x \<in> carrier (Q\<^sub>p\<^bsup>Suc m\<^esup>)
[PROOF STEP]
by presburger


[STATEMENT]
lemma irreducible\<^sub>d_square_free:
  fixes p :: "'a :: {comm_semiring_1, semiring_no_zero_divisors} poly"
  shows "irreducible\<^sub>d p \<Longrightarrow> square_free p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. irreducible\<^sub>d p \<Longrightarrow> square_free p
[PROOF STEP]
by (metis degree_0 degree_mult_eq degree_mult_eq_0 irreducible\<^sub>dD(1) irreducible\<^sub>dD(2) irreducible\<^sub>d_dvd_smult irreducible\<^sub>d_smultI less_add_same_cancel2 not_gr_zero square_free_def)


[STATEMENT]
lemma integral_eq_nn_integral:
  assumes [measurable]: "f \<in> borel_measurable M"
  assumes nonneg: "AE x in M. 0 \<le> f x"
  shows "integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
 2. \<not> ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
assume *: "(\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) = \<infinity>"
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<infinity>

goal (2 subgoals):
 1. ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
 2. \<not> ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<infinity>

goal (2 subgoals):
 1. ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
 2. \<not> ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
have "(\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) = (\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M
[PROOF STEP]
using nonneg
[PROOF STATE]
proof (prove)
using this:
AE x in M. 0 \<le> f x

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M
[PROOF STEP]
by (intro nn_integral_cong_AE) auto
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M = \<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M

goal (2 subgoals):
 1. ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
 2. \<not> ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M = \<infinity>
[PROOF STEP]
have "\<not> integrable M f"
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (norm (f x)) \<partial>M = \<infinity>

goal (1 subgoal):
 1. \<not> integrable M f
[PROOF STEP]
by (auto simp: integrable_iff_bounded)
[PROOF STATE]
proof (state)
this:
\<not> integrable M f

goal (2 subgoals):
 1. ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
 2. \<not> ?P \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> integrable M f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> integrable M f

goal (1 subgoal):
 1. integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
by (simp add: * not_integrable_integral_eq)
[PROOF STATE]
proof (state)
this:
integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity> \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity> \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
assume "(\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) \<noteq> \<infinity>"
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity>

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity> \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity>
[PROOF STEP]
have "integrable M f"
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity>

goal (1 subgoal):
 1. integrable M f
[PROOF STEP]
by (cases "\<integral>\<^sup>+ x. ennreal (f x) \<partial>M" rule: ennreal_cases)
       (auto intro!: integrableI_nn_integral_finite assms)
[PROOF STATE]
proof (state)
this:
integrable M f

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (f x) \<partial>M \<noteq> \<infinity> \<Longrightarrow> integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
from nn_integral_eq_integral[OF this] nonneg
[PROOF STATE]
proof (chain)
picking this:
AE x in M. 0 \<le> f x \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = ennreal (integral\<^sup>L M f)
AE x in M. 0 \<le> f x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
AE x in M. 0 \<le> f x \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (f x) \<partial>M = ennreal (integral\<^sup>L M f)
AE x in M. 0 \<le> f x

goal (1 subgoal):
 1. integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)
[PROOF STEP]
by (simp add: integral_nonneg_AE)
[PROOF STATE]
proof (state)
this:
integral\<^sup>L M f = enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subspace_Span_is_findim :
  "\<lbrakk> set vs \<subseteq> V; Subspace W; W \<subseteq> Span vs \<rbrakk> \<Longrightarrow> findim W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set vs \<subseteq> V; Subspace W; W \<subseteq> RSpan vs\<rbrakk> \<Longrightarrow> \<exists>ms. set ms \<subseteq> W \<and> RSpan ms = W
[PROOF STEP]
using finrank_Span subspace_finrank[of "Span vs" W] SubspaceD1[of W]
        VectorSpace.finrank_imp_findim
[PROOF STATE]
proof (prove)
using this:
set ?vs \<subseteq> V \<Longrightarrow> R_finrank (RSpan ?vs)
\<lbrakk>R_finrank (RSpan vs); W \<subseteq> RSpan vs\<rbrakk> \<Longrightarrow> R_finrank W
Subspace W \<Longrightarrow> VectorSpace (\<cdot>) W
\<lbrakk>VectorSpace ?smult ?V; R_scalar_mult.R_finrank UNIV ?smult ?V\<rbrakk> \<Longrightarrow> \<exists>ms. set ms \<subseteq> ?V \<and> R_scalar_mult.RSpan UNIV ?smult ms = ?V

goal (1 subgoal):
 1. \<lbrakk>set vs \<subseteq> V; Subspace W; W \<subseteq> RSpan vs\<rbrakk> \<Longrightarrow> \<exists>ms. set ms \<subseteq> W \<and> RSpan ms = W
[PROOF STEP]
by    auto


[STATEMENT]
lemma divmod_one:
  "divmod (Num.One) (Num.One) = (Numeral1, 0)"
  "divmod (Num.One) (Num.Bit0 x) = (0, Numeral1)"
  "divmod (Num.One) (Num.Bit1 x) = (0, Numeral1)"
  "divmod x (Num.One) = (numeral x, 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (divmod num.One num.One = (Numeral1, 0::'a) &&& divmod num.One (num.Bit0 x) = (0::'b, Numeral1)) &&& divmod num.One (num.Bit1 x) = (0::'c, Numeral1) &&& divmod x num.One = (numeral x, 0::'d)
[PROOF STEP]
unfolding divmod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((Numeral1 div Numeral1, Numeral1 mod Numeral1) = (Numeral1, 0::'a) &&& (Numeral1 div numeral (num.Bit0 x), Numeral1 mod numeral (num.Bit0 x)) = (0::'b, Numeral1)) &&& (Numeral1 div numeral (num.Bit1 x), Numeral1 mod numeral (num.Bit1 x)) = (0::'c, Numeral1) &&& (numeral x div Numeral1, numeral x mod Numeral1) = (numeral x, 0::'d)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma (in product_prob_space) emeasure_PiM_Collect_single:
  assumes X: "i \<in> I" "A \<in> sets (M i)"
  shows "emeasure (Pi\<^sub>M I M) {x\<in>space (Pi\<^sub>M I M). x i \<in> A} = emeasure (M i) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (Pi\<^sub>M I M) {x \<in> space (Pi\<^sub>M I M). x i \<in> A} = emeasure (M i) A
[PROOF STEP]
using emeasure_PiM_Collect[of "{i}" "\<lambda>i. A"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>{i} \<subseteq> I; finite {i}; \<And>ia. ia \<in> {i} \<Longrightarrow> A \<in> M.events ia\<rbrakk> \<Longrightarrow> emeasure (Pi\<^sub>M I M) {x \<in> space (Pi\<^sub>M I M). \<forall>i\<in>{i}. x i \<in> A} = (\<Prod>i\<in>{i}. emeasure (M i) A)
i \<in> I
A \<in> M.events i

goal (1 subgoal):
 1. emeasure (Pi\<^sub>M I M) {x \<in> space (Pi\<^sub>M I M). x i \<in> A} = emeasure (M i) A
[PROOF STEP]
by simp


[STATEMENT]
lemma combining_sys_satisfies_properties_R:
  fixes p:: "real poly"
  fixes qs1 :: "real poly list"
  fixes qs2 :: "real poly list"
  assumes nonzero: "p \<noteq> 0"
  assumes nontriv1: "length qs1 > 0"
  assumes nontriv2: "length qs2 > 0"
  assumes satisfies_properties_sys1: "satisfies_properties_R p qs1 (get_subsets_R (calculate_data_R p qs1)) (get_signs_R (calculate_data_R p qs1)) (get_matrix_R (calculate_data_R p qs1))"
  assumes satisfies_properties_sys2: "satisfies_properties_R p qs2 (get_subsets_R (calculate_data_R p qs2)) (get_signs_R (calculate_data_R p qs2)) (get_matrix_R (calculate_data_R p qs2))"
  shows  "satisfies_properties_R p (qs1@qs2) (get_subsets_R (snd ((combine_systems_R p (qs1,calculate_data_R p qs1) (qs2,calculate_data_R p qs2)))))
  (get_signs_R (snd ((combine_systems_R p (qs1,calculate_data_R p qs1) (qs2,calculate_data_R p qs2)))))
  (get_matrix_R (snd ((combine_systems_R p (qs1,calculate_data_R p qs1) (qs2,calculate_data_R p qs2)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. satisfies_properties_R p (qs1 @ qs2) (get_subsets_R (snd (combine_systems_R p (qs1, calculate_data_R p qs1) (qs2, calculate_data_R p qs2)))) (get_signs_R (snd (combine_systems_R p (qs1, calculate_data_R p qs1) (qs2, calculate_data_R p qs2)))) (get_matrix_R (snd (combine_systems_R p (qs1, calculate_data_R p qs1) (qs2, calculate_data_R p qs2))))
[PROOF STEP]
using combining_sys_satisfies_properties_helper_R[of p qs1 qs2]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>p \<noteq> 0; 0 < length qs1; 0 < length qs2; satisfies_properties_R p qs1 ?subsets1.0 ?signs1.0 ?matrix1.0; satisfies_properties_R p qs2 ?subsets2.0 ?signs2.0 ?matrix2.0\<rbrakk> \<Longrightarrow> satisfies_properties_R p (qs1 @ qs2) (get_subsets_R (snd (combine_systems_R p (qs1, ?matrix1.0, ?subsets1.0, ?signs1.0) (qs2, ?matrix2.0, ?subsets2.0, ?signs2.0)))) (get_signs_R (snd (combine_systems_R p (qs1, ?matrix1.0, ?subsets1.0, ?signs1.0) (qs2, ?matrix2.0, ?subsets2.0, ?signs2.0)))) (get_matrix_R (snd (combine_systems_R p (qs1, ?matrix1.0, ?subsets1.0, ?signs1.0) (qs2, ?matrix2.0, ?subsets2.0, ?signs2.0))))

goal (1 subgoal):
 1. satisfies_properties_R p (qs1 @ qs2) (get_subsets_R (snd (combine_systems_R p (qs1, calculate_data_R p qs1) (qs2, calculate_data_R p qs2)))) (get_signs_R (snd (combine_systems_R p (qs1, calculate_data_R p qs1) (qs2, calculate_data_R p qs2)))) (get_matrix_R (snd (combine_systems_R p (qs1, calculate_data_R p qs1) (qs2, calculate_data_R p qs2))))
[PROOF STEP]
by (metis getter_functions_R nontriv1 nontriv2 nonzero satisfies_properties_sys1 satisfies_properties_sys2)


[STATEMENT]
lemma lemma_st_part_Ex: "x \<in> HFinite \<Longrightarrow> \<exists>t\<in>Reals. \<forall>r \<in> Reals. 0 < r \<longrightarrow> \<bar>x - t\<bar> < r"
  for x :: hypreal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> HFinite \<Longrightarrow> \<exists>t\<in>\<real>. \<forall>r\<in>\<real>. 0 < r \<longrightarrow> \<bar>x - t\<bar> < r
[PROOF STEP]
by (meson isLubD1a lemma_st_part_lub lemma_st_part_major2)


[STATEMENT]
lemma Qp_function_tuple_comp_closed:
  assumes "f \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p"
  assumes "length fs = n"
  assumes "is_function_tuple Q\<^sub>p m fs"
  shows "function_tuple_comp Q\<^sub>p fs f \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) \<rightarrow> carrier Q\<^sub>p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. function_tuple_comp Q\<^sub>p fs f \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) \<rightarrow> carrier Q\<^sub>p
[PROOF STEP]
using assms function_tuple_comp_closed
[PROOF STATE]
proof (prove)
using this:
f \<in> carrier (Q\<^sub>p\<^bsup>n\<^esup>) \<rightarrow> carrier Q\<^sub>p
length fs = n
is_function_tuple Q\<^sub>p m fs
\<lbrakk>?f \<in> carrier (?R\<^bsup>?n\<^esup>) \<rightarrow> carrier ?R; length ?fs = ?n; is_function_tuple ?R ?m ?fs\<rbrakk> \<Longrightarrow> function_tuple_comp ?R ?fs ?f \<in> carrier (?R\<^bsup>?m\<^esup>) \<rightarrow> carrier ?R

goal (1 subgoal):
 1. function_tuple_comp Q\<^sub>p fs f \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>) \<rightarrow> carrier Q\<^sub>p
[PROOF STEP]
by blast


[STATEMENT]
lemma (in flowgraph) ntrp_mon_s:
  assumes A: "((s,c),e,(s',c'))\<in>ntrp fg"
  shows "mon_c fg (add_mset s' c') = mon_c fg (add_mset s c) \<union> fst (\<alpha>nl fg e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mon_c fg (add_mset s' c') = mon_c fg (add_mset s c) \<union> fst (\<alpha>nl fg e)
[PROOF STEP]
using ntr_mon_s[OF gtrp2gtr_s[OF A]]
[PROOF STATE]
proof (prove)
using this:
mon_c fg (add_mset s' c') = mon_c fg (add_mset s c) \<union> fst (\<alpha>n fg (le_rem_s e))

goal (1 subgoal):
 1. mon_c fg (add_mset s' c') = mon_c fg (add_mset s c) \<union> fst (\<alpha>nl fg e)
[PROOF STEP]
by (unfold \<alpha>nl_def)


[STATEMENT]
lemma celcius_to_kelvin: "T\<degree>C = (T *\<^sub>Q kelvin) + (273.15 *\<^sub>Q kelvin)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T\<degree>C = (T *\<^sub>Q kelvin) + ((27315::'a) / (10::'a)\<^sup>2 *\<^sub>Q kelvin)
[PROOF STEP]
by (si_simp)


[STATEMENT]
lemma index_mat_addrow_basic [simp]:
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> addrow a k l A $$ (i,j) = (if k = i then
    ( a * (A $$ (l,j)) + (A $$ (i,j))) else A $$ (i,j))"
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> addrow a i l A $$ (i,j) = (a * (A $$ (l,j)) + (A $$ (i,j)))"
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> k \<noteq> i \<Longrightarrow> addrow a k l A $$ (i,j) = A $$(i,j)"
  "dim_row (addrow a k l A) = dim_row A" "dim_col (addrow a k l A) = dim_col A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> addrow a k l A $$ (i, j) = (if k = i then a * A $$ (l, j) + A $$ (i, j) else A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> addrow a i l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A; k \<noteq> i\<rbrakk> \<Longrightarrow> addrow a k l A $$ (i, j) = A $$ (i, j)) &&& dim_row (addrow a k l A) = dim_row A &&& dim_col (addrow a k l A) = dim_col A
[PROOF STEP]
unfolding mat_addrow_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = i then a * A $$ (l, j) + A $$ (i, j) else A $$ (i, j)) $$ (i, j) = (if k = i then a * A $$ (l, j) + A $$ (i, j) else A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> mat (dim_row A) (dim_col A) (\<lambda>(ia, j). if i = ia then a * A $$ (l, j) + A $$ (ia, j) else A $$ (ia, j)) $$ (i, j) = a * A $$ (l, j) + A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A; k \<noteq> i\<rbrakk> \<Longrightarrow> mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = i then a * A $$ (l, j) + A $$ (i, j) else A $$ (i, j)) $$ (i, j) = A $$ (i, j)) &&& dim_row (mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = i then a * A $$ (l, j) + A $$ (i, j) else A $$ (i, j))) = dim_row A &&& dim_col (mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = i then a * A $$ (l, j) + A $$ (i, j) else A $$ (i, j))) = dim_col A
[PROOF STEP]
by auto


[STATEMENT]
lemma bst_of_list_sort_meaurable [measurable]:
  "(\<lambda>x. bst_of_list (sort_key x xs)) \<in>
     Pi\<^sub>M (set xs) (\<lambda>i. borel::real measure) \<rightarrow>\<^sub>M tree_sigma (count_space A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
note measurable_linorder_from_keys_restrict'[measurable]
[PROOF STATE]
proof (state)
this:
\<lbrakk>finite ?A; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> linorder_from_keys ?A \<in> Pi\<^sub>M ?A (\<lambda>_. borel) \<rightarrow>\<^sub>M count_space (Pow (?B \<times> ?B))

goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
have "(0::real) < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < 1

goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < 1
[PROOF STEP]
have [measurable]: "(\<lambda>x. bst_of_list (insort_wrt (linorder_from_keys (set xs) x) xs))
                      \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel :: real measure) \<rightarrow>\<^sub>M tree_sigma (count_space A)"
[PROOF STATE]
proof (prove)
using this:
0 < 1

goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (insort_wrt (linorder_from_keys (set xs) x) xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
using con_assms
[PROOF STATE]
proof (prove)
using this:
0 < 1
countable A
set xs \<subseteq> A
distinct xs

goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (insort_wrt (linorder_from_keys (set xs) x) xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
by measurable
[PROOF STATE]
proof (state)
this:
(\<lambda>x. bst_of_list (insort_wrt (linorder_from_keys (set xs) x) xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)

goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)
[PROOF STEP]
by (subst insort_wrt_sort_key[symmetric]) (measurable, auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. bst_of_list (sort_key x xs)) \<in> Pi\<^sub>M (set xs) (\<lambda>i. borel) \<rightarrow>\<^sub>M tree_sigma (count_space A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma monotonic: "mono(\<lambda>p x1 x2.
        \<exists>P Q. x1 = P \<and>
              x2 = Q \<and> P \<leadsto>[{(xa, x). p xa x}] Q \<and> Q \<leadsto>[{(xa, x). p xa x}] P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono (\<lambda>p x1 x2. \<exists>P Q. x1 = P \<and> x2 = Q \<and> P \<leadsto>[{(xa, x). p xa x}] Q \<and> Q \<leadsto>[{(xa, x). p xa x}] P)
[PROOF STEP]
apply(rule monoI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. x \<le> y \<Longrightarrow> (\<lambda>x1 x2. \<exists>P Q. x1 = P \<and> x2 = Q \<and> P \<leadsto>[{(xaa, xa). x xaa xa}] Q \<and> Q \<leadsto>[{(xaa, xa). x xaa xa}] P) \<le> (\<lambda>x1 x2. \<exists>P Q. x1 = P \<and> x2 = Q \<and> P \<leadsto>[{(xa, x). y xa x}] Q \<and> Q \<leadsto>[{(xa, x). y xa x}] P)
[PROOF STEP]
by(auto intro: Strong_Early_Sim.monotonic)


[STATEMENT]
lemma alpha_char_eq:
  fixes x y b:: nat
  shows  "(y < x \<and> x * x + y * y = 1 + b * x * y) \<Longrightarrow> (\<exists>m. int y = \<alpha> b m \<and> int x = \<alpha> b (Suc m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y < x \<and> x * x + y * y = 1 + b * x * y \<Longrightarrow> \<exists>m. int y = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
proof (induct y arbitrary: x rule:nat_less_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:
\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma))
n < x \<and> x * x + n * n = 1 + b * x * n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
note pre = \<open>n < x \<and> (x * x + n * n = 1 + b * x * n)\<close>
[PROOF STATE]
proof (state)
this:
n < x \<and> x * x + n * n = 1 + b * x * n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have h0: "int (x * x + n * n) = int (x * x) + int (n * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (x * x + n * n) = int (x * x) + int (n * n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (x * x + n * n) = int (x * x) + int (n * n)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre h0
[PROOF STATE]
proof (chain)
picking this:
n < x \<and> x * x + n * n = 1 + b * x * n
int (x * x + n * n) = int (x * x) + int (n * n)
[PROOF STEP]
have pre1: "int x * int x + int(n * n) = int 1 + int(b * x * n)"
[PROOF STATE]
proof (prove)
using this:
n < x \<and> x * x + n * n = 1 + b * x * n
int (x * x + n * n) = int (x * x) + int (n * n)

goal (1 subgoal):
 1. int x * int x + int (n * n) = int 1 + int (b * x * n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int x * int x + int (n * n) = int 1 + int (b * x * n)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have i0: "int (n * n) = int n * int n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (n * n) = int n * int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (n * n) = int n * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have i1: "int (b * x * n) = int b * int x * int n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (b * x * n) = int b * int x * int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (b * x * n) = int b * int x * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre1 i0 i1
[PROOF STATE]
proof (chain)
picking this:
int x * int x + int (n * n) = int 1 + int (b * x * n)
int (n * n) = int n * int n
int (b * x * n) = int b * int x * int n
[PROOF STEP]
have pre2: "int x * int x + int n * int n = 1 + int b * int x * int n"
[PROOF STATE]
proof (prove)
using this:
int x * int x + int (n * n) = int 1 + int (b * x * n)
int (n * n) = int n * int n
int (b * x * n) = int b * int x * int n

goal (1 subgoal):
 1. int x * int x + int n * int n = 1 + int b * int x * int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int x * int x + int n * int n = 1 + int b * int x * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre2
[PROOF STATE]
proof (chain)
picking this:
int x * int x + int n * int n = 1 + int b * int x * int n
[PROOF STEP]
have j0: "int n * int n - 1 = int b * int x * int n - int x * int x"
[PROOF STATE]
proof (prove)
using this:
int x * int x + int n * int n = 1 + int b * int x * int n

goal (1 subgoal):
 1. int n * int n - 1 = int b * int x * int n - int x * int x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n * int n - 1 = int b * int x * int n - int x * int x

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have j1:"\<dots> = int x * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int b * int x * int n - int x * int x = int x * (int b * int n - int x)
[PROOF STEP]
by (simp add: right_diff_distrib)
[PROOF STATE]
proof (state)
this:
int b * int x * int n - int x * int x = int x * (int b * int n - int x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from j0 j1
[PROOF STATE]
proof (chain)
picking this:
int n * int n - 1 = int b * int x * int n - int x * int x
int b * int x * int n - int x * int x = int x * (int b * int n - int x)
[PROOF STEP]
have pre3:"int n * int n - 1 = int x * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
using this:
int n * int n - 1 = int b * int x * int n - int x * int x
int b * int x * int n - int x * int x = int x * (int b * int n - int x)

goal (1 subgoal):
 1. int n * int n - 1 = int x * (int b * int n - int x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n * int n - 1 = int x * (int b * int n - int x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have k0: "int n * int n - 1 < int n * int n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int n * int n - 1 < int n * int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n * int n - 1 < int n * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre3 k0
[PROOF STATE]
proof (chain)
picking this:
int n * int n - 1 = int x * (int b * int n - int x)
int n * int n - 1 < int n * int n
[PROOF STEP]
have k1:"int n * int n >  int x * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
using this:
int n * int n - 1 = int x * (int b * int n - int x)
int n * int n - 1 < int n * int n

goal (1 subgoal):
 1. int x * (int b * int n - int x) < int n * int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int x * (int b * int n - int x) < int n * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre
[PROOF STATE]
proof (chain)
picking this:
n < x \<and> x * x + n * n = 1 + b * x * n
[PROOF STEP]
have k2: "int n \<le> int x"
[PROOF STATE]
proof (prove)
using this:
n < x \<and> x * x + n * n = 1 + b * x * n

goal (1 subgoal):
 1. int n \<le> int x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n \<le> int x

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from k2
[PROOF STATE]
proof (chain)
picking this:
int n \<le> int x
[PROOF STEP]
have k3: "int x * int n \<ge> int n * int n"
[PROOF STATE]
proof (prove)
using this:
int n \<le> int x

goal (1 subgoal):
 1. int n * int n \<le> int x * int n
[PROOF STEP]
by (simp add: mult_mono)
[PROOF STATE]
proof (state)
this:
int n * int n \<le> int x * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from k1 k3
[PROOF STATE]
proof (chain)
picking this:
int x * (int b * int n - int x) < int n * int n
int n * int n \<le> int x * int n
[PROOF STEP]
have k4: "int x * int n > int x * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
using this:
int x * (int b * int n - int x) < int n * int n
int n * int n \<le> int x * int n

goal (1 subgoal):
 1. int x * (int b * int n - int x) < int x * int n
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int x * (int b * int n - int x) < int x * int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre k4
[PROOF STATE]
proof (chain)
picking this:
n < x \<and> x * x + n * n = 1 + b * x * n
int x * (int b * int n - int x) < int x * int n
[PROOF STEP]
have k5: "int n > int b * int n - int x"
[PROOF STATE]
proof (prove)
using this:
n < x \<and> x * x + n * n = 1 + b * x * n
int x * (int b * int n - int x) < int x * int n

goal (1 subgoal):
 1. int b * int n - int x < int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int b * int n - int x < int n

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre
[PROOF STATE]
proof (chain)
picking this:
n < x \<and> x * x + n * n = 1 + b * x * n
[PROOF STEP]
have l0:"n = 0 \<Longrightarrow> x = 1"
[PROOF STATE]
proof (prove)
using this:
n < x \<and> x * x + n * n = 1 + b * x * n

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

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from l0
[PROOF STATE]
proof (chain)
picking this:
n = 0 \<Longrightarrow> x = 1
[PROOF STEP]
have l1: "n = 0 \<Longrightarrow> x = Suc 0"
[PROOF STATE]
proof (prove)
using this:
n = 0 \<Longrightarrow> x = 1

goal (1 subgoal):
 1. n = 0 \<Longrightarrow> x = Suc 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
n = 0 \<Longrightarrow> x = Suc 0

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from l1
[PROOF STATE]
proof (chain)
picking this:
n = 0 \<Longrightarrow> x = Suc 0
[PROOF STEP]
have l2: "n = 0 \<Longrightarrow> int n = \<alpha> b 0 \<and> int x = \<alpha> b (Suc 0)"
[PROOF STATE]
proof (prove)
using this:
n = 0 \<Longrightarrow> x = Suc 0

goal (1 subgoal):
 1. n = 0 \<Longrightarrow> int n = \<alpha> b 0 \<and> int x = \<alpha> b (Suc 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
n = 0 \<Longrightarrow> int n = \<alpha> b 0 \<and> int x = \<alpha> b (Suc 0)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from l2
[PROOF STATE]
proof (chain)
picking this:
n = 0 \<Longrightarrow> int n = \<alpha> b 0 \<and> int x = \<alpha> b (Suc 0)
[PROOF STEP]
have l3: "n = 0 \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)"
[PROOF STATE]
proof (prove)
using this:
n = 0 \<Longrightarrow> int n = \<alpha> b 0 \<and> int x = \<alpha> b (Suc 0)

goal (1 subgoal):
 1. n = 0 \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
n = 0 \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have m0: "n > 0 \<Longrightarrow> int n * int n - 1 \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 \<le> int n * int n - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> 0 \<le> int n * int n - 1

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from pre3 m0
[PROOF STATE]
proof (chain)
picking this:
int n * int n - 1 = int x * (int b * int n - int x)
0 < n \<Longrightarrow> 0 \<le> int n * int n - 1
[PROOF STEP]
have m1: "n > 0 \<Longrightarrow> int x * (int b * int n - int x) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
int n * int n - 1 = int x * (int b * int n - int x)
0 < n \<Longrightarrow> 0 \<le> int n * int n - 1

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 \<le> int x * (int b * int n - int x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> 0 \<le> int x * (int b * int n - int x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from m1
[PROOF STATE]
proof (chain)
picking this:
0 < n \<Longrightarrow> 0 \<le> int x * (int b * int n - int x)
[PROOF STEP]
have m2: "n > 0 \<Longrightarrow> int b * int n - int x \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
0 < n \<Longrightarrow> 0 \<le> int x * (int b * int n - int x)

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 \<le> int b * int n - int x
[PROOF STEP]
using zero_le_mult_iff
[PROOF STATE]
proof (prove)
using this:
0 < n \<Longrightarrow> 0 \<le> int x * (int b * int n - int x)
((0::?'a) \<le> ?a * ?b) = ((0::?'a) \<le> ?a \<and> (0::?'a) \<le> ?b \<or> ?a \<le> (0::?'a) \<and> ?b \<le> (0::?'a))

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 \<le> int b * int n - int x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> 0 \<le> int b * int n - int x

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from j0
[PROOF STATE]
proof (chain)
picking this:
int n * int n - 1 = int b * int x * int n - int x * int x
[PROOF STEP]
have n0: "int x * int x - int b * int x * int n + int n * int n = 1"
[PROOF STATE]
proof (prove)
using this:
int n * int n - 1 = int b * int x * int n - int x * int x

goal (1 subgoal):
 1. int x * int x - int b * int x * int n + int n * int n = 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int x * int x - int b * int x * int n + int n * int n = 1

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have n1: "(int b * int n - int x) * (int b * int n - int x) = int b * int n * (int b * int n - int x) - int x * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (int b * int n - int x) * (int b * int n - int x) = int b * int n * (int b * int n - int x) - int x * (int b * int n - int x)
[PROOF STEP]
by (simp add: left_diff_distrib)
[PROOF STATE]
proof (state)
this:
(int b * int n - int x) * (int b * int n - int x) = int b * int n * (int b * int n - int x) - int x * (int b * int n - int x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from n1
[PROOF STATE]
proof (chain)
picking this:
(int b * int n - int x) * (int b * int n - int x) = int b * int n * (int b * int n - int x) - int x * (int b * int n - int x)
[PROOF STEP]
have n2: "int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = int n * int n - int x * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
using this:
(int b * int n - int x) * (int b * int n - int x) = int b * int n * (int b * int n - int x) - int x * (int b * int n - int x)

goal (1 subgoal):
 1. int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = int n * int n - int x * (int b * int n - int x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = int n * int n - int x * (int b * int n - int x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from n0 n2 j1
[PROOF STATE]
proof (chain)
picking this:
int x * int x - int b * int x * int n + int n * int n = 1
int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = int n * int n - int x * (int b * int n - int x)
int b * int x * int n - int x * int x = int x * (int b * int n - int x)
[PROOF STEP]
have n3: "int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = 1"
[PROOF STATE]
proof (prove)
using this:
int x * int x - int b * int x * int n + int n * int n = 1
int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = int n * int n - int x * (int b * int n - int x)
int b * int x * int n - int x * int x = int x * (int b * int n - int x)

goal (1 subgoal):
 1. int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = 1
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = 1

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from n3
[PROOF STATE]
proof (chain)
picking this:
int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = 1
[PROOF STEP]
have n4: "int n * int n + (int b * int n - int x) * (int b * int n - int x) = 1 + int b * int n * (int b * int n - int x)"
[PROOF STATE]
proof (prove)
using this:
int n * int n - int b * int n * (int b * int n - int x) + (int b * int n - int x) * (int b * int n - int x) = 1

goal (1 subgoal):
 1. int n * int n + (int b * int n - int x) * (int b * int n - int x) = 1 + int b * int n * (int b * int n - int x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int n * int n + (int b * int n - int x) * (int b * int n - int x) = 1 + int b * int n * (int b * int n - int x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
have n5: "int b * int n = int (b * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int b * int n = int (b * n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int b * int n = int (b * n)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from n5 m2
[PROOF STATE]
proof (chain)
picking this:
int b * int n = int (b * n)
0 < n \<Longrightarrow> 0 \<le> int b * int n - int x
[PROOF STEP]
have n6: "n > 0 \<Longrightarrow> int b * int n - int x = int (b * n - x)"
[PROOF STATE]
proof (prove)
using this:
int b * int n = int (b * n)
0 < n \<Longrightarrow> 0 \<le> int b * int n - int x

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from n4 n6
[PROOF STATE]
proof (chain)
picking this:
int n * int n + (int b * int n - int x) * (int b * int n - int x) = 1 + int b * int n * (int b * int n - int x)
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)
[PROOF STEP]
have n7: "n > 0 \<Longrightarrow> int (n * n + (b * n - x) * (b * n - x)) = int (1 + b * n * (b * n - x))"
[PROOF STATE]
proof (prove)
using this:
int n * int n + (int b * int n - int x) * (int b * int n - int x) = 1 + int b * int n * (int b * int n - int x)
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> int (n * n + (b * n - x) * (b * n - x)) = int (1 + b * n * (b * n - x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> int (n * n + (b * n - x) * (b * n - x)) = int (1 + b * n * (b * n - x))

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from n7
[PROOF STATE]
proof (chain)
picking this:
0 < n \<Longrightarrow> int (n * n + (b * n - x) * (b * n - x)) = int (1 + b * n * (b * n - x))
[PROOF STEP]
have n8: "n > 0 \<Longrightarrow> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)"
[PROOF STATE]
proof (prove)
using this:
0 < n \<Longrightarrow> int (n * n + (b * n - x) * (b * n - x)) = int (1 + b * n * (b * n - x))

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)
[PROOF STEP]
using of_nat_eq_iff
[PROOF STATE]
proof (prove)
using this:
0 < n \<Longrightarrow> int (n * n + (b * n - x) * (b * n - x)) = int (1 + b * n * (b * n - x))
(of_nat ?m = of_nat ?n) = (?m = ?n)

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
note hyp = \<open>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow>
          (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma))\<close>
[PROOF STATE]
proof (state)
this:
\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma))

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from k5 n6 n8
[PROOF STATE]
proof (chain)
picking this:
int b * int n - int x < int n
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)
0 < n \<Longrightarrow> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)
[PROOF STEP]
have o0: "n > 0 \<Longrightarrow> (b * n - x) < n \<and> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)"
[PROOF STATE]
proof (prove)
using this:
int b * int n - int x < int n
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)
0 < n \<Longrightarrow> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> b * n - x < n \<and> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> b * n - x < n \<and> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from o0 hyp
[PROOF STATE]
proof (chain)
picking this:
0 < n \<Longrightarrow> b * n - x < n \<and> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)
\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma))
[PROOF STEP]
have o1: "n > 0 \<Longrightarrow> (\<exists>ma. int (b * n - x) = \<alpha> b ma \<and> int n = \<alpha> b (Suc ma))"
[PROOF STATE]
proof (prove)
using this:
0 < n \<Longrightarrow> b * n - x < n \<and> n * n + (b * n - x) * (b * n - x) = 1 + b * n * (b * n - x)
\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma))

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> \<exists>ma. int (b * n - x) = \<alpha> b ma \<and> int n = \<alpha> b (Suc ma)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < n \<Longrightarrow> \<exists>ma. int (b * n - x) = \<alpha> b ma \<and> int n = \<alpha> b (Suc ma)

goal (1 subgoal):
 1. \<And>n x. \<lbrakk>\<forall>m<n. \<forall>x. m < x \<and> x * x + m * m = 1 + b * x * m \<longrightarrow> (\<exists>ma. int m = \<alpha> b ma \<and> int x = \<alpha> b (Suc ma)); n < x \<and> x * x + n * n = 1 + b * x * n\<rbrakk> \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
from o1 l3 n6
[PROOF STATE]
proof (chain)
picking this:
0 < n \<Longrightarrow> \<exists>ma. int (b * n - x) = \<alpha> b ma \<and> int n = \<alpha> b (Suc ma)
n = 0 \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 < n \<Longrightarrow> \<exists>ma. int (b * n - x) = \<alpha> b ma \<and> int n = \<alpha> b (Suc ma)
n = 0 \<Longrightarrow> \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
0 < n \<Longrightarrow> int b * int n - int x = int (b * n - x)

goal (1 subgoal):
 1. \<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<exists>m. int n = \<alpha> b m \<and> int x = \<alpha> b (Suc m)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LPDi_Times:
  "LPDi i (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j \<le> i. LPDi j r) s \<union> (\<Union>j \<le> i. LPDi j s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LPDi i (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>i. LPDi j r) s \<union> (\<Union>j\<le>i. LPDi j s)
[PROOF STEP]
proof (induct i arbitrary: r s)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>r s. LPDi 0 (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>0. LPDi j r) s \<union> (\<Union>j\<le>0. LPDi j s)
 2. \<And>i r s. (\<And>r s. LPDi i (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>i. LPDi j r) s \<union> (\<Union>j\<le>i. LPDi j s)) \<Longrightarrow> LPDi (Suc i) (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>Suc i. LPDi j r) s \<union> (\<Union>j\<le>Suc i. LPDi j s)
[PROOF STEP]
case (Suc i)
[PROOF STATE]
proof (state)
this:
LPDi i (MTimes ?r ?s) \<subseteq> {MTimes ?r ?s} \<union> MTimesR (\<Union>j\<le>i. LPDi j ?r) ?s \<union> (\<Union>j\<le>i. LPDi j ?s)

goal (2 subgoals):
 1. \<And>r s. LPDi 0 (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>0. LPDi j r) s \<union> (\<Union>j\<le>0. LPDi j s)
 2. \<And>i r s. (\<And>r s. LPDi i (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>i. LPDi j r) s \<union> (\<Union>j\<le>i. LPDi j s)) \<Longrightarrow> LPDi (Suc i) (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>Suc i. LPDi j r) s \<union> (\<Union>j\<le>Suc i. LPDi j s)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LPDi (Suc i) (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>Suc i. LPDi j r) s \<union> (\<Union>j\<le>Suc i. LPDi j s)
[PROOF STEP]
by (fastforce simp: MTimesR_def dest: bspec[of _ _ "Suc _"] dest!: set_mp[OF Suc])
[PROOF STATE]
proof (state)
this:
LPDi (Suc i) (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>Suc i. LPDi j r) s \<union> (\<Union>j\<le>Suc i. LPDi j s)

goal (1 subgoal):
 1. \<And>r s. LPDi 0 (MTimes r s) \<subseteq> {MTimes r s} \<union> MTimesR (\<Union>j\<le>0. LPDi j r) s \<union> (\<Union>j\<le>0. LPDi j s)
[PROOF STEP]
qed simp


[STATEMENT]
lemma parabolic_logarithmic_growth:
  assumes "parabolic_isometry (f::'a::Gromov_hyperbolic_space \<Rightarrow> 'a)" "n \<ge> 1"
  shows "dist x ((f^^n) x) \<le> dist x (f x) + ceiling (log 2 n) * 16 * deltaG(TYPE('a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist x ((f ^^ n) x) \<le> dist x (f x) + real_of_int (\<lceil>log 2 (real n)\<rceil> * 16) * deltaG TYPE('a)
[PROOF STEP]
using dist_le_additive_strength[OF parabolic_isometryD(1)[OF assms(1)] parabolic_fixed_point(2)[OF assms(1)] _ assms(2)]
parabolic_isometryD(3)[OF assms(1)] stable_translation_length_eq_additive_strength[OF parabolic_isometryD(1)[OF assms(1)] parabolic_fixed_point(2)[OF assms(1)]]
[PROOF STATE]
proof (prove)
using this:
0 \<le> additive_strength f (neutral_fixed_point f) \<Longrightarrow> dist ?x ((f ^^ n) ?x) \<le> dist ?x (f ?x) + real n * additive_strength f (neutral_fixed_point f) + real_of_int (\<lceil>log 2 (real n)\<rceil> * 16) * deltaG TYPE('a)
stable_translation_length f = 0
stable_translation_length f = \<bar>additive_strength f (neutral_fixed_point f)\<bar>

goal (1 subgoal):
 1. dist x ((f ^^ n) x) \<le> dist x (f x) + real_of_int (\<lceil>log 2 (real n)\<rceil> * 16) * deltaG TYPE('a)
[PROOF STEP]
by auto


[STATEMENT]
lemma p_inf_pp [simp]:
  "-(x \<sqinter> --y) = -(x \<sqinter> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x \<sqinter> - - y) = - (x \<sqinter> y)
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. - (x \<sqinter> - - y) \<le> - (x \<sqinter> y)
 2. - (x \<sqinter> y) \<le> - (x \<sqinter> - - y)
[PROOF STEP]
apply (simp add: inf.coboundedI2 p_antitone pp_increasing)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x \<sqinter> y) \<le> - (x \<sqinter> - - y)
[PROOF STEP]
using inf_commute p_antitone_iff pp_inf_below_iff
[PROOF STATE]
proof (prove)
using this:
?x \<sqinter> ?y = ?y \<sqinter> ?x
(?x \<le> - ?y) = (?y \<le> - ?x)
(?x \<sqinter> ?y \<le> - ?z) = (- - ?x \<sqinter> ?y \<le> - ?z)

goal (1 subgoal):
 1. - (x \<sqinter> y) \<le> - (x \<sqinter> - - y)
[PROOF STEP]
by auto


[STATEMENT]
lemma trunc_cfs:
  assumes "p \<in> carrier P"
  assumes "n < degree p"
  shows " (trunc p) n = p n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cring_Poly.truncate R p n = p n
[PROOF STEP]
using P_def assms(1) assms(2)
[PROOF STATE]
proof (prove)
using this:
P \<equiv> UP R
p \<in> carrier P
n < deg R p

goal (1 subgoal):
 1. Cring_Poly.truncate R p n = p n
[PROOF STEP]
unfolding truncate_def
[PROOF STATE]
proof (prove)
using this:
P \<equiv> UP R
p \<in> carrier P
n < deg R p

goal (1 subgoal):
 1. (p \<ominus>\<^bsub>UP R\<^esub> leading_term R p) n = p n
[PROOF STEP]
by (smt ltrm_closed ltrm_cfs R.minus_zero R.ring_axioms UP_ring.cfs_minus
      UP_ring_axioms a_minus_def cfs_closed leading_term_def nat_neq_iff ring.ring_simprules(15))


[STATEMENT]
lemma hIm_add: "\<And>x y. hIm (x + y) = hIm x + hIm y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. hIm (x + y) = hIm x + hIm y
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma transform_upper_triangular:
  defines mdef: "M \<equiv> (add_row_to_multiple (-1) [1..<dim_row (N * N\<^sup>T)] 0 (N * N\<^sup>T))"
  shows "upper_triangular (add_multiple_cols 1 0 [1..<dim_col M] M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. upper_triangular (add_multiple_cols 1 0 [1..<dim_col M] M)
[PROOF STEP]
using transform_N_step2_vals(4)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < dim_row (add_row_to_multiple (- 1) [1..<dim_row (N * N\<^sup>T)] 0 (N * N\<^sup>T)); ?j < dim_col (add_row_to_multiple (- 1) [1..<dim_row (N * N\<^sup>T)] 0 (N * N\<^sup>T)); ?i \<noteq> 0; ?i \<noteq> ?j\<rbrakk> \<Longrightarrow> add_multiple_cols 1 0 [1..<dim_col (add_row_to_multiple (- 1) [1..<dim_row (N * N\<^sup>T)] 0 (N * N\<^sup>T))] (add_row_to_multiple (- 1) [1..<dim_row (N * N\<^sup>T)] 0 (N * N\<^sup>T)) $$ (?i, ?j) = 0

goal (1 subgoal):
 1. upper_triangular (add_multiple_cols 1 0 [1..<dim_col M] M)
[PROOF STEP]
by (intro upper_triangularI) (simp add: assms)


[STATEMENT]
lemma admits_triangular_reduction_intro:
  assumes "invertible_mat (U::'a::comm_ring_1 mat)"
    and "U \<in> carrier_mat (dim_col A) (dim_col A)"
    and "lower_triangular (A*U)"
  shows "admits_triangular_reduction A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. admits_triangular_reduction A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
invertible_mat U
U \<in> carrier_mat (dim_col A) (dim_col A)
lower_triangular (A * U)

goal (1 subgoal):
 1. admits_triangular_reduction A
[PROOF STEP]
unfolding admits_triangular_reduction_def
[PROOF STATE]
proof (prove)
using this:
invertible_mat U
U \<in> carrier_mat (dim_col A) (dim_col A)
lower_triangular (A * U)

goal (1 subgoal):
 1. \<exists>U. U \<in> carrier_mat (dim_col A) (dim_col A) \<and> invertible_mat U \<and> lower_triangular (A * U)
[PROOF STEP]
by auto


[STATEMENT]
lemma accept_match:
  fixes ts :: "'d list"
  shows "reaches_on (w_run_sub args) sub (map snd rho) s \<Longrightarrow> i \<le> j \<Longrightarrow> j \<le> length rho \<Longrightarrow> wf_regex r \<Longrightarrow>
  w_accept args (steps (w_step args) rho {0} (i, j)) \<longleftrightarrow> (i, j) \<in> match r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>reaches_on (w_run_sub args) sub (map snd rho) s; i \<le> j; j \<le> length rho; wf_regex r\<rbrakk> \<Longrightarrow> accept (steps step rho {0} (i, j)) = ((i, j) \<in> match r)
[PROOF STEP]
using acc_match acc_is_accept steps_is_run
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>reaches_on (w_run_sub args) sub (map snd ?rho) ?s; ?i \<le> ?j; ?j \<le> length ?rho; wf_regex r\<rbrakk> \<Longrightarrow> wacc ?rho {0} (?i, ?j) = ((?i, ?j) \<in> match r)
wacc ?rho ?q (?i, ?j) = accept (run ?q (sub_bs ?rho (?i, ?j)))
steps step ?rho ?q ?ij = run ?q (sub_bs ?rho ?ij)

goal (1 subgoal):
 1. \<lbrakk>reaches_on (w_run_sub args) sub (map snd rho) s; i \<le> j; j \<le> length rho; wf_regex r\<rbrakk> \<Longrightarrow> accept (steps step rho {0} (i, j)) = ((i, j) \<in> match r)
[PROOF STEP]
by metis


[STATEMENT]
lemma finite_dimensional_vector_space_pair_1_with_overloaded[ud_with]:
  "finite_dimensional_vector_space_pair_1 =
    (
      \<lambda>scale\<^sub>1 basis\<^sub>1 scale\<^sub>2.
        finite_dimensional_vector_space_pair_1_with
          (+) 0 (-) uminus scale\<^sub>1 basis\<^sub>1 (+) 0 (-) uminus scale\<^sub>2
    )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_dimensional_vector_space_pair_1 = (\<lambda>scale\<^sub>1 basis\<^sub>1. finite_dimensional_vector_space_pair_1_with (+) (0::'b) (-) uminus scale\<^sub>1 basis\<^sub>1 (+) (0::'c) (-) uminus)
[PROOF STEP]
unfolding
    finite_dimensional_vector_space_pair_1_def
    finite_dimensional_vector_space_pair_1_with_def
    vector_space_with_overloaded
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>s1 B1 s2. finite_dimensional_vector_space s1 B1 \<and> vector_space_with (+) (0::'c) (-) uminus s2) = (\<lambda>scale\<^sub>1 basis\<^sub>1 scale\<^sub>2. finite_dimensional_vector_space_with (+) (0::'b) (-) uminus scale\<^sub>1 basis\<^sub>1 \<and> vector_space_with (+) (0::'c) (-) uminus scale\<^sub>2)
[PROOF STEP]
by (simp add: finite_dimensional_vector_space_with_overloaded)


[STATEMENT]
lemma  cross_components:
   "(x \<times> y)$1 = x$2 * y$3 - y$2 * x$3" "(x \<times> y)$2 = x$3 * y$1 - y$3 * x$1" "(x \<times> y)$3 = x$1 * y$2 - y$1 * x$2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<times> y) $ 1 = x $ 2 * y $ 3 - y $ 2 * x $ 3 &&& (x \<times> y) $ 2 = x $ 3 * y $ 1 - y $ 3 * x $ 1 &&& (x \<times> y) $ 3 = x $ 1 * y $ 2 - y $ 1 * x $ 2
[PROOF STEP]
by (simp_all add: cross3_def inner_vec_def sum_3 vec_eq_iff algebra_simps)


[STATEMENT]
lemma nasc_seqn:"\<lbrakk>(a::nat) \<in> A; \<not> (\<exists>m. m\<in>A \<and> (\<forall>x\<in>A. x \<le> m))\<rbrakk> \<Longrightarrow>
                               (nasc_seq A a n) < (nasc_seq A a (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; \<nexists>m. m \<in> A \<and> (\<forall>x\<in>A. x \<le> m)\<rbrakk> \<Longrightarrow> nasc_seq A a n < nasc_seq A a (Suc n)
[PROOF STEP]
apply (simp,
       frule nasc_seq_mem [of "a" "A" "n"], simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; \<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. \<not> x \<le> m); nasc_seq A a n \<in> A\<rbrakk> \<Longrightarrow> nasc_seq A a n < (SOME b. b \<in> A \<and> nasc_seq A a n < b)
[PROOF STEP]
apply (simp add: not_le,
       subgoal_tac "\<exists>x\<in>A. (nasc_seq A a n) < x")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<in> A; \<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. m < x); nasc_seq A a n \<in> A; \<exists>x\<in>A. nasc_seq A a n < x\<rbrakk> \<Longrightarrow> nasc_seq A a n < (SOME b. b \<in> A \<and> nasc_seq A a n < b)
 2. \<lbrakk>a \<in> A; \<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. m < x); nasc_seq A a n \<in> A\<rbrakk> \<Longrightarrow> \<exists>x\<in>A. nasc_seq A a n < x
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<in> A; \<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. m < x); nasc_seq A a n \<in> A\<rbrakk> \<Longrightarrow> \<exists>x\<in>A. nasc_seq A a n < x
 2. \<lbrakk>a \<in> A; \<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. m < x); nasc_seq A a n \<in> A; \<exists>x\<in>A. nasc_seq A a n < x\<rbrakk> \<Longrightarrow> nasc_seq A a n < (SOME b. b \<in> A \<and> nasc_seq A a n < b)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; \<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. m < x); nasc_seq A a n \<in> A; \<exists>x\<in>A. nasc_seq A a n < x\<rbrakk> \<Longrightarrow> nasc_seq A a n < (SOME b. b \<in> A \<and> nasc_seq A a n < b)
[PROOF STEP]
apply (thin_tac "\<forall>m. m \<in> A \<longrightarrow> (\<exists>x\<in>A. m < x)",
        rule someI2_ex, blast, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ennreal_suminf_SUP_eq_directed:
  fixes f :: "'a \<Rightarrow> nat \<Rightarrow> ennreal"
  assumes *: "\<And>N i j. i \<in> I \<Longrightarrow> j \<in> I \<Longrightarrow> finite N \<Longrightarrow> \<exists>k\<in>I. \<forall>n\<in>N. f i n \<le> f k n \<and> f j n \<le> f k n"
  shows "(\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
 2. \<not> ?P \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
[PROOF STEP]
assume "I \<noteq> {}"
[PROOF STATE]
proof (state)
this:
I \<noteq> {}

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
 2. \<not> ?P \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
I \<noteq> {}
[PROOF STEP]
obtain i where "i \<in> I"
[PROOF STATE]
proof (prove)
using this:
I \<noteq> {}

goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<in> I

goal (2 subgoals):
 1. ?P \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
 2. \<not> ?P \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?i \<in> I; ?j \<in> I; finite ?N\<rbrakk> \<Longrightarrow> \<exists>k\<in>I. \<forall>n\<in>?N. f ?i n \<le> f k n \<and> f ?j n \<le> f k n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> I; ?j \<in> I; finite ?N\<rbrakk> \<Longrightarrow> \<exists>k\<in>I. \<forall>n\<in>?N. f ?i n \<le> f k n \<and> f ?j n \<le> f k n

goal (1 subgoal):
 1. (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
[PROOF STEP]
by (transfer fixing: I)
       (auto simp: max_absorb2 SUP_upper2[OF \<open>i \<in> I\<close>] suminf_nonneg summable_ereal_pos \<open>I \<noteq> {}\<close>
             intro!: suminf_SUP_eq_directed)
[PROOF STATE]
proof (state)
this:
(\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)

goal (1 subgoal):
 1. \<not> I \<noteq> {} \<Longrightarrow> (\<Sum>n. SUP i\<in>I. f i n) = (SUP i\<in>I. \<Sum>n. f i n)
[PROOF STEP]
qed (simp add: bot_ennreal)


[STATEMENT]
lemma of_rat_mult: "of_rat (a * b) = of_rat a * of_rat b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat (a * b) = of_rat a * of_rat b
[PROOF STEP]
by transfer (simp add: divide_inverse nonzero_inverse_mult_distrib ac_simps)


[STATEMENT]
theorem dfs_code3'_correct:
  fixes succi and succ :: "'a::linorder \<Rightarrow> 'a set"
    and Rv :: "('ai\<times>'a) set"
  assumes V0: "(v0i,src)\<in>Rv"
  assumes VD: "(vdi,tgt)\<in>Rv"
  assumes SUCCI: "(succi,E)\<in>\<langle>Rv\<rangle>succg_rel"
  assumes CGA: "eq_linorder cmpk'"
  assumes CMP: "(cmpk, cmpk') \<in> Rv\<rightarrow>Rv\<rightarrow>comp_res_rel"
  assumes FIN: "finite (E\<^sup>*``{src})"
  shows "dfs_impl3' cmpk succi v0i vdi \<longleftrightarrow> (src,tgt)\<in>E\<^sup>*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
note dfs_impl3'.refine[OF CGA CMP SUCCI VD V0, THEN nres_relD]
[PROOF STATE]
proof (state)
this:
RETURN (dfs_impl3' cmpk succi v0i vdi) \<le> \<Down> bool_rel (dfs E src tgt)

goal (1 subgoal):
 1. dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
RETURN (dfs_impl3' cmpk succi v0i vdi) \<le> \<Down> bool_rel (dfs E src tgt)

goal (1 subgoal):
 1. dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
note dfs_correct[OF FIN]
[PROOF STATE]
proof (state)
this:
dfs E src ?tgt \<le> SPEC (\<lambda>r. r = ((src, ?tgt) \<in> E\<^sup>*))

goal (1 subgoal):
 1. dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
RETURN (dfs_impl3' cmpk succi v0i vdi) \<le> SPEC (\<lambda>r. r = ((src, tgt) \<in> E\<^sup>*))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
RETURN (dfs_impl3' cmpk succi v0i vdi) \<le> SPEC (\<lambda>r. r = ((src, tgt) \<in> E\<^sup>*))

goal (1 subgoal):
 1. dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
by (auto simp: split: dres.split)
[PROOF STATE]
proof (state)
this:
dfs_impl3' cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem VSLuckiestRepeat : "\<forall>xs. eval (VSLuckiestRepeat \<phi>) xs = eval \<phi> xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>xs. eval (VSLuckiestRepeat \<phi>) xs = eval \<phi> xs
[PROOF STEP]
unfolding VSLuckiestRepeat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>xs. eval (repeatAmountOfQuantifiers VSLuckiest \<phi>) xs = eval \<phi> xs
[PROOF STEP]
using repeatAmountOfQuantifiers_eval[OF]
[PROOF STATE]
proof (prove)
using this:
(\<And>xs F. eval F xs = eval (?step F) xs) \<Longrightarrow> eval ?F ?xs = eval (repeatAmountOfQuantifiers ?step ?F) ?xs

goal (1 subgoal):
 1. \<forall>xs. eval (repeatAmountOfQuantifiers VSLuckiest \<phi>) xs = eval \<phi> xs
[PROOF STEP]
using VSLuckiest
[PROOF STATE]
proof (prove)
using this:
(\<And>xs F. eval F xs = eval (?step F) xs) \<Longrightarrow> eval ?F ?xs = eval (repeatAmountOfQuantifiers ?step ?F) ?xs
\<forall>xs. eval (VSLuckiest ?\<phi>) xs = eval ?\<phi> xs

goal (1 subgoal):
 1. \<forall>xs. eval (repeatAmountOfQuantifiers VSLuckiest \<phi>) xs = eval \<phi> xs
[PROOF STEP]
by blast


[STATEMENT]
lemma sym_mod_mult_right_eq: "a * (b symmod c) symmod c = a * b symmod c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * (b symmod c) symmod c = a * b symmod c
[PROOF STEP]
unfolding sym_mod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_mod.inv_M c (a * poly_mod.inv_M c (b mod c) mod c) = poly_mod.inv_M c (a * b mod c)
[PROOF STEP]
by (metis poly_mod.M_def poly_mod.M_inv_M_id mod_mult_right_eq)


[STATEMENT]
lemma butterfly_comp_butterfly[simp]: "butterfly \<psi>1 \<psi>2 o\<^sub>C\<^sub>L butterfly \<psi>3 \<psi>4 = (\<psi>2 \<bullet>\<^sub>C \<psi>3) *\<^sub>C butterfly \<psi>1 \<psi>4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. butterfly \<psi>1 \<psi>2 o\<^sub>C\<^sub>L butterfly \<psi>3 \<psi>4 = (\<psi>2 \<bullet>\<^sub>C \<psi>3) *\<^sub>C butterfly \<psi>1 \<psi>4
[PROOF STEP]
by (simp add: butterfly_comp_cblinfun)


[STATEMENT]
lemma prob_prod_pmf_slice:
  assumes "finite I"
  assumes "i \<in> I"
  shows "measure (measure_pmf (prod_pmf I M)) {\<omega>. P (\<omega> i)} = measure (M i) {\<omega>. P \<omega>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. measure_pmf.prob (prod_pmf I M) {\<omega>. P (\<omega> i)} = measure_pmf.prob (M i) {\<omega>. P \<omega>}
[PROOF STEP]
using prob_prod_pmf'[OF assms(1), where J="{i}" and M="M" and A="\<lambda>_. Collect P"]
[PROOF STATE]
proof (prove)
using this:
{i} \<subseteq> I \<Longrightarrow> measure_pmf.prob (Pi_pmf I ?d M) ({i} \<rightarrow> Collect P) = (\<Prod>i\<in>{i}. measure_pmf.prob (M i) (Collect P))

goal (1 subgoal):
 1. measure_pmf.prob (prod_pmf I M) {\<omega>. P (\<omega> i)} = measure_pmf.prob (M i) {\<omega>. P \<omega>}
[PROOF STEP]
by (simp add:assms Pi_def)


[STATEMENT]
lemma "(x::int) < y ==> x - y < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < y \<Longrightarrow> x - y < 0
[PROOF STEP]
by linarith


[STATEMENT]
lemma f_Equiv_Exec_Stream_expand_shrink_output_eq: "
  \<lbrakk> 0 < k1; 0 < k2;
    equiv_states (localState1 c1) (localState2 c2);
    \<And>input0 m.
       Equiv_Exec
         m equiv_states localState1 localState2
         input_fun1 input_fun2 output_fun1 output_fun2
         trans_fun1 trans_fun2 k1 k2
         (f_Exec_Comp trans_fun1 (map input_fun1 input0 \<odot>\<^sub>f k1) c1)
         (f_Exec_Comp trans_fun2 (map input_fun2 input0 \<odot>\<^sub>f k2) c2) \<rbrakk> \<Longrightarrow>
  (map output_fun1 (
    f_Exec_Comp_Stream trans_fun1 (map input_fun1 input \<odot>\<^sub>f k1) c1)) \<div>\<^sub>f k1 =
  (map output_fun2 (
    f_Exec_Comp_Stream trans_fun2 (map input_fun2 input \<odot>\<^sub>f k2) c2)) \<div>\<^sub>f k2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < k1; 0 < k2; equiv_states (localState1 c1) (localState2 c2); \<And>input0 m. Equiv_Exec m equiv_states localState1 localState2 input_fun1 input_fun2 output_fun1 output_fun2 trans_fun1 trans_fun2 k1 k2 (f_Exec_Comp trans_fun1 (map input_fun1 input0 \<odot> k1) c1) (f_Exec_Comp trans_fun2 (map input_fun2 input0 \<odot> k2) c2)\<rbrakk> \<Longrightarrow> map output_fun1 (f_Exec_Comp_Stream trans_fun1 (map input_fun1 input \<odot> k1) c1) \<div> k1 = map output_fun2 (f_Exec_Comp_Stream trans_fun2 (map input_fun2 input \<odot> k2) c2) \<div> k2
[PROOF STEP]
by (rule f_Equiv_Exec_Stream_expand_shrink_output_set_eq[of k1 k2 equiv_states localState1 _ localState2 _ UNIV], simp+)


[STATEMENT]
lemma cosh_conv_cos: "cosh z = cos (\<i>*z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cosh z = cos (\<i> * z)
[PROOF STEP]
by (simp add: cosh_field_def cos_i_times exp_minus)


[STATEMENT]
lemma fds_nth_logderiv_completely_multiplicative:
  fixes f :: "'a :: {real_normed_field} fds"
  assumes "completely_multiplicative_function (fds_nth f)" "fds_nth f 1 \<noteq> 0"
  shows   "fds_nth (fds_deriv f / f) n = -fds_nth f n * mangoldt n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (fds_deriv f / f) n = - fds_nth f n * mangoldt n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
completely_multiplicative_function (fds_nth f)
fds_nth f 1 \<noteq> (0::'a)

goal (1 subgoal):
 1. fds_nth (fds_deriv f / f) n = - fds_nth f n * mangoldt n
[PROOF STEP]
by (subst fds_logderiv_completely_multiplicative) (simp_all add: fds_nth_fds')


[STATEMENT]
lemma Int_mono2:
  "\<lbrakk>A \<subseteq> C; B \<subseteq> C\<rbrakk> \<Longrightarrow> A Int B \<subseteq> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<subseteq> C; B \<subseteq> C\<rbrakk> \<Longrightarrow> A \<inter> B \<subseteq> C
[PROOF STEP]
by blast


[STATEMENT]
lemma length_append_singleton: "length (xs @ [x]) = Suc (length xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (xs @ [x]) = Suc (length xs)
[PROOF STEP]
by simp


[STATEMENT]
lemma units_of_carrier: "carrier (units_of G) = Units G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (units_of G) = Units G
[PROOF STEP]
by (auto simp: units_of_def)


[STATEMENT]
lemma  invertible_eq_bij:
  fixes m :: "'a::field^'m^'n"
  shows "invertible m \<longleftrightarrow> bij ((*v) m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invertible m = bij ((*v) m)
[PROOF STEP]
using matrix_invertible_gen[OF matrix_vector_mul_linear_gen, of m, simplified matrix_of_matrix_vector_mul]
[PROOF STATE]
proof (prove)
using this:
invertible m = (\<exists>g. Vector_Spaces.linear (*s) (*s) g \<and> (*v) m \<circ> g = id \<and> g \<circ> (*v) m = id)

goal (1 subgoal):
 1. invertible m = bij ((*v) m)
[PROOF STEP]
by (metis bij_betw_def left_right_inverse_eq matrix_vector_mul_linear_gen o_bij
      vec.linear_injective_left_inverse vec.linear_surjective_right_inverse)


[STATEMENT]
lemma prv_nprv2I:
assumes "prv (imp \<phi>1 (imp \<phi>2 \<psi>))" "\<phi>1 \<in> fmla" "\<phi>2 \<in> fmla" "\<psi> \<in> fmla"
shows "nprv {\<phi>1,\<phi>2} \<psi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nprv {\<phi>1, \<phi>2} \<psi>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
prv (imp \<phi>1 (imp \<phi>2 \<psi>))
\<phi>1 \<in> fmla
\<phi>2 \<in> fmla
\<psi> \<in> fmla

goal (1 subgoal):
 1. nprv {\<phi>1, \<phi>2} \<psi>
[PROOF STEP]
unfolding nprv_def
[PROOF STATE]
proof (prove)
using this:
prv (imp \<phi>1 (imp \<phi>2 \<psi>))
\<phi>1 \<in> fmla
\<phi>2 \<in> fmla
\<psi> \<in> fmla

goal (1 subgoal):
 1. prv (imp (scnj {\<phi>1, \<phi>2}) \<psi>)
[PROOF STEP]
by (meson cnj empty_subsetI finite.simps insert_subsetI prv_cnj_imp_monoR2 prv_prv_imp_trans prv_scnj2_imp_cnj scnj)