[STATEMENT]
lemma splice_replicate[simp]: "splice (replicate m x) (replicate n x) = replicate (m+n) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. splice (replicate m x) (replicate n x) = replicate (m + n) x
[PROOF STEP]
proof (induction "replicate m x" "replicate n x" arbitrary: m n rule: splice.induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>m n. [] = replicate m x \<Longrightarrow> splice (replicate m x) (replicate n x) = replicate (m + n) x
 2. \<And>xa xs m n. \<lbrakk>\<And>m na. \<lbrakk>replicate n x = replicate m x; xs = replicate na x\<rbrakk> \<Longrightarrow> splice (replicate m x) (replicate na x) = replicate (m + na) x; xa # xs = replicate m x\<rbrakk> \<Longrightarrow> splice (replicate m x) (replicate n x) = replicate (m + n) x
[PROOF STEP]
case (2 x xs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>replicate n x = replicate ?m x; xs = replicate ?n x\<rbrakk> \<Longrightarrow> splice (replicate ?m x) (replicate ?n x) = replicate (?m + ?n) x
x # xs = replicate m x

goal (2 subgoals):
 1. \<And>m n. [] = replicate m x \<Longrightarrow> splice (replicate m x) (replicate n x) = replicate (m + n) x
 2. \<And>xa xs m n. \<lbrakk>\<And>m na. \<lbrakk>replicate n x = replicate m x; xs = replicate na x\<rbrakk> \<Longrightarrow> splice (replicate m x) (replicate na x) = replicate (m + na) x; xa # xs = replicate m x\<rbrakk> \<Longrightarrow> splice (replicate m x) (replicate n x) = replicate (m + n) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>replicate n x = replicate ?m x; xs = replicate ?n x\<rbrakk> \<Longrightarrow> splice (replicate ?m x) (replicate ?n x) = replicate (?m + ?n) x
x # xs = replicate m x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>replicate n x = replicate ?m x; xs = replicate ?n x\<rbrakk> \<Longrightarrow> splice (replicate ?m x) (replicate ?n x) = replicate (?m + ?n) x
x # xs = replicate m x

goal (1 subgoal):
 1. splice (replicate m x) (replicate n x) = replicate (m + n) x
[PROOF STEP]
by (auto simp add: Cons_replicate_eq dest: gr0_implies_Suc)
[PROOF STATE]
proof (state)
this:
splice (replicate m x) (replicate n x) = replicate (m + n) x

goal (1 subgoal):
 1. \<And>m n. [] = replicate m x \<Longrightarrow> splice (replicate m x) (replicate n x) = replicate (m + n) x
[PROOF STEP]
qed auto


[STATEMENT]
lemma higher_deriv_diff:
  fixes z::complex
  assumes "f holomorphic_on S" "g holomorphic_on S" "open S" "z \<in> S"
    shows "(deriv ^^ n) (\<lambda>w. f w - g w) z = (deriv ^^ n) f z - (deriv ^^ n) g z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ n) (\<lambda>w. f w - g w) z = (deriv ^^ n) f z - (deriv ^^ n) g z
[PROOF STEP]
unfolding diff_conv_add_uminus higher_deriv_add
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ n) (\<lambda>w. f w + - g w) z = (deriv ^^ n) f z + - (deriv ^^ n) g z
[PROOF STEP]
using assms higher_deriv_add higher_deriv_uminus holomorphic_on_minus
[PROOF STATE]
proof (prove)
using this:
f holomorphic_on S
g holomorphic_on S
open S
z \<in> S
\<lbrakk>?f holomorphic_on ?S; ?g holomorphic_on ?S; open ?S; ?z \<in> ?S\<rbrakk> \<Longrightarrow> (deriv ^^ ?n) (\<lambda>w. ?f w + ?g w) ?z = (deriv ^^ ?n) ?f ?z + (deriv ^^ ?n) ?g ?z
\<lbrakk>?f holomorphic_on ?S; open ?S; ?z \<in> ?S\<rbrakk> \<Longrightarrow> (deriv ^^ ?n) (\<lambda>w. - ?f w) ?z = - (deriv ^^ ?n) ?f ?z
?f holomorphic_on ?s \<Longrightarrow> (\<lambda>z. - ?f z) holomorphic_on ?s

goal (1 subgoal):
 1. (deriv ^^ n) (\<lambda>w. f w + - g w) z = (deriv ^^ n) f z + - (deriv ^^ n) g z
[PROOF STEP]
by presburger


[STATEMENT]
lemma heron_step: "t > 0 \<Longrightarrow> (t + n div t) div 2 \<ge> Discrete.sqrt n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
assume "t > 0"
[PROOF STATE]
proof (state)
this:
0 < t

goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
have "Discrete.sqrt n = nat \<lfloor>sqrt n\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Discrete.sqrt n = nat \<lfloor>sqrt (real n)\<rfloor>
[PROOF STEP]
by (rule sqrt_eq_floor_sqrt)
[PROOF STATE]
proof (state)
this:
Discrete.sqrt n = nat \<lfloor>sqrt (real n)\<rfloor>

goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Discrete.sqrt n = nat \<lfloor>sqrt (real n)\<rfloor>

goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
have "\<dots> \<le> nat \<lfloor>(t + n/t) / 2\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat \<lfloor>sqrt (real n)\<rfloor> \<le> nat \<lfloor>(real t + real n / real t) / 2\<rfloor>
[PROOF STEP]
using heron_step_real[of t n] \<open>t > 0\<close>
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < real t; 0 \<le> real n\<rbrakk> \<Longrightarrow> sqrt (real n) \<le> (real t + real n / real t) / 2
0 < t

goal (1 subgoal):
 1. nat \<lfloor>sqrt (real n)\<rfloor> \<le> nat \<lfloor>(real t + real n / real t) / 2\<rfloor>
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
nat \<lfloor>sqrt (real n)\<rfloor> \<le> nat \<lfloor>(real t + real n / real t) / 2\<rfloor>

goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
nat \<lfloor>sqrt (real n)\<rfloor> \<le> nat \<lfloor>(real t + real n / real t) / 2\<rfloor>

goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
have "\<dots> = (t + n div t) div 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat \<lfloor>(real t + real n / real t) / 2\<rfloor> = (t + n div t) div 2
[PROOF STEP]
using heron_step_div_eq_floored[OF \<open>t > 0\<close>]
[PROOF STATE]
proof (prove)
using this:
(t + ?n div t) div 2 = nat \<lfloor>(real t + real ?n / real t) / 2\<rfloor>

goal (1 subgoal):
 1. nat \<lfloor>(real t + real n / real t) / 2\<rfloor> = (t + n div t) div 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
nat \<lfloor>(real t + real n / real t) / 2\<rfloor> = (t + n div t) div 2

goal (1 subgoal):
 1. 0 < t \<Longrightarrow> Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Discrete.sqrt n \<le> (t + n div t) div 2

goal (1 subgoal):
 1. Discrete.sqrt n \<le> (t + n div t) div 2
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Discrete.sqrt n \<le> (t + n div t) div 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma reciprocal_preserve_orientation:
  assumes "0\<^sub>h \<in> disc_compl H"
  shows "pos_oriented (moebius_ocircline moebius_reciprocal H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
have "\<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0\<^sub>h \<in> disc_compl H

goal (1 subgoal):
 1. \<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)

goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
thus "pos_oriented (moebius_ocircline moebius_reciprocal H)"
[PROOF STATE]
proof (prove)
using this:
\<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)

goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
using pos_oriented_circle_inf[of "moebius_ocircline moebius_reciprocal H"]
[PROOF STATE]
proof (prove)
using this:
\<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)
\<infinity>\<^sub>h \<notin> ocircline_set (moebius_ocircline moebius_reciprocal H) \<Longrightarrow> pos_oriented (moebius_ocircline moebius_reciprocal H) = (\<infinity>\<^sub>h \<notin> disc (moebius_ocircline moebius_reciprocal H))

goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
using disc_inter_disc_compl[of "moebius_ocircline moebius_reciprocal H"]
[PROOF STATE]
proof (prove)
using this:
\<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)
\<infinity>\<^sub>h \<notin> ocircline_set (moebius_ocircline moebius_reciprocal H) \<Longrightarrow> pos_oriented (moebius_ocircline moebius_reciprocal H) = (\<infinity>\<^sub>h \<notin> disc (moebius_ocircline moebius_reciprocal H))
disc (moebius_ocircline moebius_reciprocal H) \<inter> disc_compl (moebius_ocircline moebius_reciprocal H) = {}

goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
using disc_compl_inter_ocircline_set[of "moebius_ocircline moebius_reciprocal H"]
[PROOF STATE]
proof (prove)
using this:
\<infinity>\<^sub>h \<in> disc_compl (moebius_ocircline moebius_reciprocal H)
\<infinity>\<^sub>h \<notin> ocircline_set (moebius_ocircline moebius_reciprocal H) \<Longrightarrow> pos_oriented (moebius_ocircline moebius_reciprocal H) = (\<infinity>\<^sub>h \<notin> disc (moebius_ocircline moebius_reciprocal H))
disc (moebius_ocircline moebius_reciprocal H) \<inter> disc_compl (moebius_ocircline moebius_reciprocal H) = {}
disc_compl (moebius_ocircline moebius_reciprocal H) \<inter> ocircline_set (moebius_ocircline moebius_reciprocal H) = {}

goal (1 subgoal):
 1. pos_oriented (moebius_ocircline moebius_reciprocal H)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pos_oriented (moebius_ocircline moebius_reciprocal H)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bdd_above_mono:
  assumes "bdd_above B" and "A \<subseteq> B"
  shows "bdd_above A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.bdd_above A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
local.bdd_above B
A \<subseteq> B

goal (1 subgoal):
 1. local.bdd_above A
[PROOF STEP]
unfolding bdd_def
[PROOF STATE]
proof (prove)
using this:
\<exists>M\<in>UNIV. \<forall>x\<in>B. x \<le>\<^sub>a M
A \<subseteq> B

goal (1 subgoal):
 1. \<exists>M\<in>UNIV. \<forall>x\<in>A. x \<le>\<^sub>a M
[PROOF STEP]
by auto


[STATEMENT]
lemma vec_first_index:
  assumes v: "dim_vec v \<ge> n"
    and i: "i < n"
  shows "(vec_first v n) $ i = v $ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first v n $ i = v $ i
[PROOF STEP]
unfolding vec_first_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec n (($) v) $ i = v $ i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
n \<le> dim_vec v
i < n

goal (1 subgoal):
 1. vec n (($) v) $ i = v $ i
[PROOF STEP]
by simp


[STATEMENT]
lemma foldr_max_sorted:
  assumes "sorted (rev xs)"
  shows "foldr max xs y = (if xs = [] then y else max (xs ! 0) y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
sorted (rev xs)

goal (1 subgoal):
 1. foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
[PROOF STEP]
proof (induct xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. sorted (rev []) \<Longrightarrow> foldr max [] y = (if [] = [] then y else max ([] ! 0) y)
 2. \<And>a xs. \<lbrakk>sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y); sorted (rev (a # xs))\<rbrakk> \<Longrightarrow> foldr max (a # xs) y = (if a # xs = [] then y else max ((a # xs) ! 0) y)
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
sorted (rev (x # xs))

goal (2 subgoals):
 1. sorted (rev []) \<Longrightarrow> foldr max [] y = (if [] = [] then y else max ([] ! 0) y)
 2. \<And>a xs. \<lbrakk>sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y); sorted (rev (a # xs))\<rbrakk> \<Longrightarrow> foldr max (a # xs) y = (if a # xs = [] then y else max ((a # xs) ! 0) y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
sorted (rev (x # xs))
[PROOF STEP]
have "sorted (rev xs)"
[PROOF STATE]
proof (prove)
using this:
sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
sorted (rev (x # xs))

goal (1 subgoal):
 1. sorted (rev xs)
[PROOF STEP]
using sorted_append
[PROOF STATE]
proof (prove)
using this:
sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
sorted (rev (x # xs))
sorted (?xs @ ?ys) = (sorted ?xs \<and> sorted ?ys \<and> (\<forall>x\<in>set ?xs. \<forall>y\<in>set ?ys. x \<le> y))

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

goal (2 subgoals):
 1. sorted (rev []) \<Longrightarrow> foldr max [] y = (if [] = [] then y else max ([] ! 0) y)
 2. \<And>a xs. \<lbrakk>sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y); sorted (rev (a # xs))\<rbrakk> \<Longrightarrow> foldr max (a # xs) y = (if a # xs = [] then y else max ((a # xs) ! 0) y)
[PROOF STEP]
with Cons
[PROOF STATE]
proof (chain)
picking this:
sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
sorted (rev (x # xs))
sorted (rev xs)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
sorted (rev xs) \<Longrightarrow> foldr max xs y = (if xs = [] then y else max (xs ! 0) y)
sorted (rev (x # xs))
sorted (rev xs)

goal (1 subgoal):
 1. foldr max (x # xs) y = (if x # xs = [] then y else max ((x # xs) ! 0) y)
[PROOF STEP]
by (cases xs) (auto simp add: sorted_append max_def)
[PROOF STATE]
proof (state)
this:
foldr max (x # xs) y = (if x # xs = [] then y else max ((x # xs) ! 0) y)

goal (1 subgoal):
 1. sorted (rev []) \<Longrightarrow> foldr max [] y = (if [] = [] then y else max ([] ! 0) y)
[PROOF STEP]
qed simp


[STATEMENT]
lemma finite_Inf_Sup: "\<Sqinter>(Sup ` A) \<le> \<Squnion>(Inf ` {f ` A |f. \<forall>Y\<in>A. f Y \<in> Y})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sqinter> (Sup ` A) \<le> \<Squnion> (Inf ` {f ` A |f. \<forall>Y\<in>A. f Y \<in> Y})
[PROOF STEP]
proof (rule finite_induct [of A "\<lambda>A. \<Sqinter>(Sup ` A) \<le> \<Squnion>(Inf ` {f ` A |f. \<forall>Y\<in>A. f Y \<in> Y})"], simp_all add: finite_UnionD)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
fix x::"'a set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
fix F
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
assume "x \<notin> F"
[PROOF STATE]
proof (state)
this:
x \<notin> F

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
have [simp]: "{\<Squnion>x \<sqinter> b |b . b \<in> Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y} } = {\<Squnion>x \<sqinter> (Inf (f ` F)) |f  . (\<forall>Y\<in>F. f Y \<in> Y)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {\<Squnion> x \<sqinter> b |b. b \<in> Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y}} = {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{\<Squnion> x \<sqinter> b |b. b \<in> Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y}} = {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
define fa where "fa = (\<lambda> (b::'a) f Y . (if Y = x then b else f Y))"
[PROOF STATE]
proof (state)
this:
fa = (\<lambda>b f Y. if Y = x then b else f Y)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
have "\<And>f b. \<forall>Y\<in>F. f Y \<in> Y \<Longrightarrow> b \<in> x \<Longrightarrow> insert b (f ` (F \<inter> {Y. Y \<noteq> x})) = insert (fa b f x) (fa b f ` F) \<and> fa b f x \<in> x \<and> (\<forall>Y\<in>F. fa b f Y \<in> Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> insert b (f ` (F \<inter> {Y. Y \<noteq> x})) = insert (fa b f x) (fa b f ` F) \<and> fa b f x \<in> x \<and> (\<forall>Y\<in>F. fa b f Y \<in> Y)
[PROOF STEP]
by (auto simp add: fa_def)
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<forall>Y\<in>F. ?f Y \<in> Y; ?b \<in> x\<rbrakk> \<Longrightarrow> insert ?b (?f ` (F \<inter> {Y. Y \<noteq> x})) = insert (fa ?b ?f x) (fa ?b ?f ` F) \<and> fa ?b ?f x \<in> x \<and> (\<forall>Y\<in>F. fa ?b ?f Y \<in> Y)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<forall>Y\<in>F. ?f Y \<in> Y; ?b \<in> x\<rbrakk> \<Longrightarrow> insert ?b (?f ` (F \<inter> {Y. Y \<noteq> x})) = insert (fa ?b ?f x) (fa ?b ?f ` F) \<and> fa ?b ?f x \<in> x \<and> (\<forall>Y\<in>F. fa ?b ?f Y \<in> Y)
[PROOF STEP]
have B: "\<And>f b. \<forall>Y\<in>F. f Y \<in> Y \<Longrightarrow> b \<in> x \<Longrightarrow> fa b f ` ({x} \<union> F) \<in> {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>Y\<in>F. ?f Y \<in> Y; ?b \<in> x\<rbrakk> \<Longrightarrow> insert ?b (?f ` (F \<inter> {Y. Y \<noteq> x})) = insert (fa ?b ?f x) (fa ?b ?f ` F) \<and> fa ?b ?f x \<in> x \<and> (\<forall>Y\<in>F. fa ?b ?f Y \<in> Y)

goal (1 subgoal):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> fa b f ` ({x} \<union> F) \<in> {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<forall>Y\<in>F. ?f Y \<in> Y; ?b \<in> x\<rbrakk> \<Longrightarrow> fa ?b ?f ` ({x} \<union> F) \<in> {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
have [simp]: "\<And>f b. \<forall>Y\<in>F. f Y \<in> Y \<Longrightarrow> b \<in> x \<Longrightarrow> b \<sqinter> (\<Sqinter>x\<in>F. f x)  \<le> \<Squnion>(Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> b \<sqinter> \<Sqinter> (f ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
using B
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>Y\<in>F. ?f Y \<in> Y; ?b \<in> x\<rbrakk> \<Longrightarrow> fa ?b ?f ` ({x} \<union> F) \<in> {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)}

goal (1 subgoal):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> b \<sqinter> \<Sqinter> (f ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
apply (rule SUP_upper2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> \<forall>Y\<in>F. ?f1 f b Y \<in> Y
 2. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> ?b1 f b \<in> x
 3. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> b \<sqinter> \<Sqinter> (f ` F) \<le> \<Sqinter> (fa (?b1 f b) (?f1 f b) ` ({x} \<union> F))
[PROOF STEP]
using \<open>x \<notin> F\<close>
[PROOF STATE]
proof (prove)
using this:
x \<notin> F

goal (3 subgoals):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> \<forall>Y\<in>F. ?f1 f b Y \<in> Y
 2. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> ?b1 f b \<in> x
 3. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> b \<sqinter> \<Sqinter> (f ` F) \<le> \<Sqinter> (fa (?b1 f b) (?f1 f b) ` ({x} \<union> F))
[PROOF STEP]
apply (simp_all add: fa_def Inf_union_distrib)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x; x \<notin> F\<rbrakk> \<Longrightarrow> b \<sqinter> \<Sqinter> (f ` F) \<le> b \<and> b \<sqinter> \<Sqinter> (f ` F) \<le> \<Sqinter> (f ` (F \<inter> {xa. xa \<noteq> x}))
[PROOF STEP]
apply (simp add: image_mono Inf_superset_mono inf.coboundedI2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<forall>Y\<in>F. ?f Y \<in> Y; ?b \<in> x\<rbrakk> \<Longrightarrow> ?b \<sqinter> \<Sqinter> (?f ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
assume "\<Sqinter>(Sup ` F) \<le> \<Squnion>(Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})"
[PROOF STATE]
proof (state)
this:
\<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})
[PROOF STEP]
have "\<Squnion>x \<sqinter> \<Sqinter>(Sup ` F) \<le> \<Squnion>x \<sqinter> \<Squnion>(Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})"
[PROOF STATE]
proof (prove)
using this:
\<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})

goal (1 subgoal):
 1. \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})
[PROOF STEP]
using inf.coboundedI2
[PROOF STATE]
proof (prove)
using this:
\<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})
?b \<le> ?c \<Longrightarrow> ?a \<sqinter> ?b \<le> ?c

goal (1 subgoal):
 1. \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
have "... = Sup {\<Squnion>x \<sqinter> (Inf (f ` F)) |f  .  (\<forall>Y\<in>F. f Y \<in> Y)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y}) = \<Squnion> {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y}
[PROOF STEP]
by (simp add: finite_inf_Sup)
[PROOF STATE]
proof (state)
this:
\<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y}) = \<Squnion> {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Squnion> x \<sqinter> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y}) = \<Squnion> {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
have "... = Sup {Sup {Inf (f ` F) \<sqinter> b | b . b \<in> x} |f  .  (\<forall>Y\<in>F. f Y \<in> Y)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y} = \<Squnion> {\<Squnion> {\<Sqinter> (f ` F) \<sqinter> b |b. b \<in> x} |f. \<forall>Y\<in>F. f Y \<in> Y}
[PROOF STEP]
by (subst inf_commute) (simp add: finite_inf_Sup)
[PROOF STATE]
proof (state)
this:
\<Squnion> {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y} = \<Squnion> {\<Squnion> {\<Sqinter> (f ` F) \<sqinter> b |b. b \<in> x} |f. \<forall>Y\<in>F. f Y \<in> Y}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Squnion> {\<Squnion> x \<sqinter> \<Sqinter> (f ` F) |f. \<forall>Y\<in>F. f Y \<in> Y} = \<Squnion> {\<Squnion> {\<Sqinter> (f ` F) \<sqinter> b |b. b \<in> x} |f. \<forall>Y\<in>F. f Y \<in> Y}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
have "... \<le> \<Squnion>(Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> {\<Squnion> {\<Sqinter> (f ` F) \<sqinter> b |b. b \<in> x} |f. \<forall>Y\<in>F. f Y \<in> Y} \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
apply (rule Sup_least, clarsimp)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f b. \<lbrakk>\<forall>Y\<in>F. f Y \<in> Y; b \<in> x\<rbrakk> \<Longrightarrow> \<Sqinter> (f ` F) \<sqinter> b \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
apply (subst inf_commute, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<Squnion> {\<Squnion> {\<Sqinter> (f ` F) \<sqinter> b |b. b \<in> x} |f. \<forall>Y\<in>F. f Y \<in> Y} \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>x \<notin> F; \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {f ` F |f. \<forall>Y\<in>F. f Y \<in> Y})\<rbrakk> \<Longrightarrow> \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
show "\<Squnion>x \<sqinter> \<Sqinter>(Sup ` F) \<le> \<Squnion>(Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})"
[PROOF STATE]
proof (prove)
using this:
\<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})

goal (1 subgoal):
 1. \<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<Squnion> x \<sqinter> \<Sqinter> (Sup ` F) \<le> \<Squnion> (Inf ` {insert (f x) (f ` F) |f. f x \<in> x \<and> (\<forall>Y\<in>F. f Y \<in> Y)})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma numgcdh_pos: assumes gp: "g \<ge> 0" shows "numgcdh t g \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> numgcdh t g
[PROOF STEP]
using gp
[PROOF STATE]
proof (prove)
using this:
0 \<le> g

goal (1 subgoal):
 1. 0 \<le> numgcdh t g
[PROOF STEP]
by (induct t rule: numgcdh.induct) auto


[STATEMENT]
lemma eventually_ln_const:
  assumes "(C::real) > 0"
  shows   "eventually (\<lambda>x. ln (C*x) / ln x > 1/2) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 1 / 2 < ln (C * x) / ln x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 1 / 2 < ln (C * x) / ln x
[PROOF STEP]
from tendstoD[OF tendsto_ln_over_ln[of C 1], of "1/2"] assms
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < C; 0 < 1; 0 < 1 / 2\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in at_top. dist (ln (C * x) / ln (1 * x)) 1 < 1 / 2
0 < C
[PROOF STEP]
have "eventually (\<lambda>x. \<bar>ln (C*x) / ln x - 1\<bar> < 1/2) at_top"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < C; 0 < 1; 0 < 1 / 2\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in at_top. dist (ln (C * x) / ln (1 * x)) 1 < 1 / 2
0 < C

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. \<bar>ln (C * x) / ln x - 1\<bar> < 1 / 2
[PROOF STEP]
by (simp add: dist_real_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. \<bar>ln (C * x) / ln x - 1\<bar> < 1 / 2

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 1 / 2 < ln (C * x) / ln x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. \<bar>ln (C * x) / ln x - 1\<bar> < 1 / 2

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 1 / 2 < ln (C * x) / ln x
[PROOF STEP]
by eventually_elim linarith
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. 1 / 2 < ln (C * x) / ln x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closed_complex_atLeastAtMost: \<open>closed {a::complex .. b}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed {a..b}
[PROOF STEP]
proof (cases \<open>Im a = Im b\<close>)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Im a = Im b \<Longrightarrow> closed {a..b}
 2. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
Im a = Im b

goal (2 subgoals):
 1. Im a = Im b \<Longrightarrow> closed {a..b}
 2. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
have \<open>{a..b} = Im -` {Im a} \<inter> Re -` {Re a..Re b}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a..b} = Im -` {Im a} \<inter> Re -` {Re a..Re b}
[PROOF STEP]
by (auto simp add: less_eq_complex_def intro!: True)
[PROOF STATE]
proof (state)
this:
{a..b} = Im -` {Im a} \<inter> Re -` {Re a..Re b}

goal (2 subgoals):
 1. Im a = Im b \<Longrightarrow> closed {a..b}
 2. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{a..b} = Im -` {Im a} \<inter> Re -` {Re a..Re b}

goal (2 subgoals):
 1. Im a = Im b \<Longrightarrow> closed {a..b}
 2. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
have \<open>closed \<dots>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed (Im -` {Im a} \<inter> Re -` {Re a..Re b})
[PROOF STEP]
by (auto intro!: closed_Int closed_vimage continuous_on_Im continuous_on_Re)
[PROOF STATE]
proof (state)
this:
closed (Im -` {Im a} \<inter> Re -` {Re a..Re b})

goal (2 subgoals):
 1. Im a = Im b \<Longrightarrow> closed {a..b}
 2. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
closed {a..b}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
closed {a..b}

goal (1 subgoal):
 1. closed {a..b}
[PROOF STEP]
by -
[PROOF STATE]
proof (state)
this:
closed {a..b}

goal (1 subgoal):
 1. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
Im a \<noteq> Im b

goal (1 subgoal):
 1. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Im a \<noteq> Im b
[PROOF STEP]
have *: \<open>{a..b} = {}\<close>
[PROOF STATE]
proof (prove)
using this:
Im a \<noteq> Im b

goal (1 subgoal):
 1. {a..b} = {}
[PROOF STEP]
using less_eq_complex_def
[PROOF STATE]
proof (prove)
using this:
Im a \<noteq> Im b
(?x \<le> ?y) = (Re ?x \<le> Re ?y \<and> Im ?x = Im ?y)

goal (1 subgoal):
 1. {a..b} = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{a..b} = {}

goal (1 subgoal):
 1. Im a \<noteq> Im b \<Longrightarrow> closed {a..b}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed {a..b}
[PROOF STEP]
by (simp add: *)
[PROOF STATE]
proof (state)
this:
closed {a..b}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma level_approx:
  fixes f :: "real \<Rightarrow> real" and n::nat
  assumes f: "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f x \<and> f x \<le> 1" and "x \<in> S" "n \<noteq> 0"
  shows "\<bar>f x - (\<Sum>k = Suc 0..n. if k / n \<le> f x then inverse n else 0)\<bar> < inverse n"
        (is "?lhs < _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
have "n * f x \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> real n * f x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> S \<Longrightarrow> 0 \<le> f ?x \<and> f ?x \<le> 1
x \<in> S
n \<noteq> 0

goal (1 subgoal):
 1. 0 \<le> real n * f x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> real n * f x

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> real n * f x
[PROOF STEP]
obtain m::nat where m: "floor(n * f x) = int m"
[PROOF STATE]
proof (prove)
using this:
0 \<le> real n * f x

goal (1 subgoal):
 1. (\<And>m. \<lfloor>real n * f x\<rfloor> = int m \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using nonneg_int_cases zero_le_floor
[PROOF STATE]
proof (prove)
using this:
0 \<le> real n * f x
\<lbrakk>0 \<le> ?k; \<And>n. ?k = int n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
(0 \<le> \<lfloor>?x\<rfloor>) = ((0::?'a) \<le> ?x)

goal (1 subgoal):
 1. (\<And>m. \<lfloor>real n * f x\<rfloor> = int m \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lfloor>real n * f x\<rfloor> = int m

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lfloor>real n * f x\<rfloor> = int m
[PROOF STEP]
have kn: "real k / real n \<le> f x \<longleftrightarrow> k \<le> m" for k
[PROOF STATE]
proof (prove)
using this:
\<lfloor>real n * f x\<rfloor> = int m

goal (1 subgoal):
 1. (real k / real n \<le> f x) = (k \<le> m)
[PROOF STEP]
using \<open>n \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
\<lfloor>real n * f x\<rfloor> = int m
n \<noteq> 0

goal (1 subgoal):
 1. (real k / real n \<le> f x) = (k \<le> m)
[PROOF STEP]
by (simp add: field_split_simps) linarith
[PROOF STATE]
proof (state)
this:
(real ?k / real n \<le> f x) = (?k \<le> m)

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(real ?k / real n \<le> f x) = (?k \<le> m)
[PROOF STEP]
have "Suc n / real n \<le> f x \<longleftrightarrow> Suc n \<le> m"
[PROOF STATE]
proof (prove)
using this:
(real ?k / real n \<le> f x) = (?k \<le> m)

goal (1 subgoal):
 1. (real (Suc n) / real n \<le> f x) = (Suc n \<le> m)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(real (Suc n) / real n \<le> f x) = (Suc n \<le> m)

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
have "real n * f x \<le> real n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real n * f x \<le> real n
[PROOF STEP]
by (simp add: \<open>x \<in> S\<close> f mult_left_le)
[PROOF STATE]
proof (state)
this:
real n * f x \<le> real n

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real n * f x \<le> real n
[PROOF STEP]
have "m \<le> n"
[PROOF STATE]
proof (prove)
using this:
real n * f x \<le> real n

goal (1 subgoal):
 1. m \<le> n
[PROOF STEP]
using m
[PROOF STATE]
proof (prove)
using this:
real n * f x \<le> real n
\<lfloor>real n * f x\<rfloor> = int m

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

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
have "?lhs = \<bar>f x - (\<Sum>k \<in> {Suc 0..n} \<inter> {..m}. inverse n)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> = \<bar>f x - (\<Sum>k\<in>{Suc 0..n} \<inter> {..m}. inverse (real n))\<bar>
[PROOF STEP]
by (subst sum.inter_restrict) (auto simp: kn)
[PROOF STATE]
proof (state)
this:
\<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> = \<bar>f x - (\<Sum>k\<in>{Suc 0..n} \<inter> {..m}. inverse (real n))\<bar>

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> = \<bar>f x - (\<Sum>k\<in>{Suc 0..n} \<inter> {..m}. inverse (real n))\<bar>

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
have "\<dots> < inverse n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k\<in>{Suc 0..n} \<inter> {..m}. inverse (real n))\<bar> < inverse (real n)
[PROOF STEP]
using \<open>m \<le> n\<close> \<open>n \<noteq> 0\<close> m
[PROOF STATE]
proof (prove)
using this:
m \<le> n
n \<noteq> 0
\<lfloor>real n * f x\<rfloor> = int m

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k\<in>{Suc 0..n} \<inter> {..m}. inverse (real n))\<bar> < inverse (real n)
[PROOF STEP]
by (simp add: min_absorb2 field_split_simps) linarith
[PROOF STATE]
proof (state)
this:
\<bar>f x - (\<Sum>k\<in>{Suc 0..n} \<inter> {..m}. inverse (real n))\<bar> < inverse (real n)

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)

goal (1 subgoal):
 1. \<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>f x - (\<Sum>k = Suc 0..n. if real k / real n \<le> f x then inverse (real n) else 0)\<bar> < inverse (real n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma similar_iff_same_jordan_nf: fixes A :: "complex mat"
  assumes A: "A \<in> carrier_mat n n" and B: "B \<in> carrier_mat n n"
  shows "similar_mat A B = (jordan_nf A = jordan_nf B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. similar_mat A B = (jordan_nf A = jordan_nf B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. similar_mat A B \<Longrightarrow> jordan_nf A = jordan_nf B
 2. jordan_nf A = jordan_nf B \<Longrightarrow> similar_mat A B
[PROOF STEP]
show "similar_mat A B \<Longrightarrow> jordan_nf A = jordan_nf B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. similar_mat A B \<Longrightarrow> jordan_nf A = jordan_nf B
[PROOF STEP]
by (intro ext, auto simp: jordan_nf_def, insert similar_mat_trans similar_mat_sym, blast+)
[PROOF STATE]
proof (state)
this:
similar_mat A B \<Longrightarrow> jordan_nf A = jordan_nf B

goal (1 subgoal):
 1. jordan_nf A = jordan_nf B \<Longrightarrow> similar_mat A B
[PROOF STEP]
assume id: "jordan_nf A = jordan_nf B"
[PROOF STATE]
proof (state)
this:
jordan_nf A = jordan_nf B

goal (1 subgoal):
 1. jordan_nf A = jordan_nf B \<Longrightarrow> similar_mat A B
[PROOF STEP]
from char_poly_factorized[OF A]
[PROOF STATE]
proof (chain)
picking this:
\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1:]) \<and> length as = n
[PROOF STEP]
obtain as where "char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1:])"
[PROOF STATE]
proof (prove)
using this:
\<exists>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1:]) \<and> length as = n

goal (1 subgoal):
 1. (\<And>as. char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1:]) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
char_poly A = (\<Prod>a\<leftarrow>as. [:- a, 1:])

goal (1 subgoal):
 1. jordan_nf A = jordan_nf B \<Longrightarrow> similar_mat A B
[PROOF STEP]
from jordan_nf_exists[OF A this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>n_as. jordan_nf A n_as
[PROOF STEP]
obtain n_as where jnfA: "jordan_nf A n_as"
[PROOF STATE]
proof (prove)
using this:
\<exists>n_as. jordan_nf A n_as

goal (1 subgoal):
 1. (\<And>n_as. jordan_nf A n_as \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
jordan_nf A n_as

goal (1 subgoal):
 1. jordan_nf A = jordan_nf B \<Longrightarrow> similar_mat A B
[PROOF STEP]
with id
[PROOF STATE]
proof (chain)
picking this:
jordan_nf A = jordan_nf B
jordan_nf A n_as
[PROOF STEP]
have jnfB: "jordan_nf B n_as"
[PROOF STATE]
proof (prove)
using this:
jordan_nf A = jordan_nf B
jordan_nf A n_as

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

goal (1 subgoal):
 1. jordan_nf A = jordan_nf B \<Longrightarrow> similar_mat A B
[PROOF STEP]
from jnfA jnfB
[PROOF STATE]
proof (chain)
picking this:
jordan_nf A n_as
jordan_nf B n_as
[PROOF STEP]
show "similar_mat A B"
[PROOF STATE]
proof (prove)
using this:
jordan_nf A n_as
jordan_nf B n_as

goal (1 subgoal):
 1. similar_mat A B
[PROOF STEP]
unfolding jordan_nf_def
[PROOF STATE]
proof (prove)
using this:
0 \<notin> fst ` set n_as \<and> similar_mat A (jordan_matrix n_as)
0 \<notin> fst ` set n_as \<and> similar_mat B (jordan_matrix n_as)

goal (1 subgoal):
 1. similar_mat A B
[PROOF STEP]
using similar_mat_trans similar_mat_sym
[PROOF STATE]
proof (prove)
using this:
0 \<notin> fst ` set n_as \<and> similar_mat A (jordan_matrix n_as)
0 \<notin> fst ` set n_as \<and> similar_mat B (jordan_matrix n_as)
\<lbrakk>similar_mat ?A ?B; similar_mat ?B ?C\<rbrakk> \<Longrightarrow> similar_mat ?A ?C
similar_mat ?A ?B \<Longrightarrow> similar_mat ?B ?A

goal (1 subgoal):
 1. similar_mat A B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
similar_mat A B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma agg_sum_commute:
  fixes f :: "('a,'b::aggregation_order) square"
  shows "(\<Sum>\<^sub>k \<Sum>\<^sub>l f (k,l)) = (\<Sum>\<^sub>l \<Sum>\<^sub>k f (k,l))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aggregation.sum_0 (\<lambda>k. aggregation.sum_0 (\<lambda>l. f (k, l)) {l. True}) {k. True} = aggregation.sum_0 (\<lambda>l. aggregation.sum_0 (\<lambda>k. f (k, l)) {k. True}) {l. True}
[PROOF STEP]
by (rule aggregation.sum_0.swap)


[STATEMENT]
lemma finite_top_prod:
  "(top :: ('a::finite_lattice_complete \<times> 'b::finite_lattice_complete)) =
    Sup_fin UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. top = \<Squnion>\<^sub>f\<^sub>i\<^sub>n UNIV
[PROOF STEP]
by (metis Sup_fin.coboundedI UNIV_I top.extremum_uniqueI finite_UNIV)


[STATEMENT]
lemma PosOrd_def2:
  shows "v1 \<sqsubset>val p v2 \<longleftrightarrow>
         pflat_len v1 p > pflat_len v2 p \<and>
         (\<forall>q \<in> Pos v1. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q) \<and>
         (\<forall>q \<in> Pos v2. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v1 \<sqsubset>val p v2 = (pflat_len v2 p < pflat_len v1 p \<and> (\<forall>q\<in>Pos v1. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q) \<and> (\<forall>q\<in>Pos v2. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q))
[PROOF STEP]
unfolding PosOrd_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (pflat_len v2 p < pflat_len v1 p \<and> (\<forall>q\<in>Pos v1 \<union> Pos v2. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q)) = (pflat_len v2 p < pflat_len v1 p \<and> (\<forall>q\<in>Pos v1. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q) \<and> (\<forall>q\<in>Pos v2. q \<sqsubset>lex p \<longrightarrow> pflat_len v1 q = pflat_len v2 q))
[PROOF STEP]
apply(auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma frontier_halfspace_component_ge: "n \<noteq> 0 \<Longrightarrow> frontier {x. c \<le> x \<bullet> n} = plane n c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<noteq> (0::'a) \<Longrightarrow> frontier {x. c \<le> x \<bullet> n} = plane n c
[PROOF STEP]
apply (subst (1) inner_commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<noteq> (0::'a) \<Longrightarrow> frontier {x. c \<le> n \<bullet> x} = plane n c
[PROOF STEP]
apply (subst (2) inner_commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<noteq> (0::'a) \<Longrightarrow> frontier {x. c \<le> n \<bullet> x} = {x. n \<bullet> x = c}
[PROOF STEP]
apply (subst frontier_halfspace_ge[of n c])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. n \<noteq> (0::'a) \<Longrightarrow> n \<noteq> (0::'a) \<or> c \<noteq> 0
 2. n \<noteq> (0::'a) \<Longrightarrow> {x. n \<bullet> x = c} = {x. n \<bullet> x = c}
[PROOF STEP]
by auto


[STATEMENT]
lemma (in cpx_sq_mat) sum_mat_adjoint:
  shows "finite I \<Longrightarrow> (\<And>i. i\<in> I \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow>
    Complex_Matrix.adjoint (sum_mat A I) = sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite I; \<And>i. i \<in> I \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A I) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) I
[PROOF STEP]
proof (induct rule: finite_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A {}) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) {}
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:
?i2 \<in> {} \<Longrightarrow> A ?i2 \<in> fc_mats

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A {}) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) {}
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i2 \<in> {} \<Longrightarrow> A ?i2 \<in> fc_mats
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
?i2 \<in> {} \<Longrightarrow> A ?i2 \<in> fc_mats

goal (1 subgoal):
 1. Complex_Matrix.adjoint (local.sum_mat A {}) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) {}
[PROOF STEP]
using zero_hermitian[of dimR]
[PROOF STATE]
proof (prove)
using this:
?i2 \<in> {} \<Longrightarrow> A ?i2 \<in> fc_mats
hermitian (0\<^sub>m dimR dimR)

goal (1 subgoal):
 1. Complex_Matrix.adjoint (local.sum_mat A {}) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) {}
[PROOF STEP]
by (metis (no_types) dim_eq hermitian_def sum_mat_empty)
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (local.sum_mat A {}) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) {}

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
case (insert x F)
[PROOF STATE]
proof (state)
this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
have "Complex_Matrix.adjoint (sum_mat A (insert x F)) =
    Complex_Matrix.adjoint (A x + sum_mat A F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = Complex_Matrix.adjoint (A x + local.sum_mat A F)
[PROOF STEP]
using insert sum_mat_insert[of A]
[PROOF STATE]
proof (prove)
using this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats
\<lbrakk>A ?x \<in> fc_mats; A ` ?I \<subseteq> fc_mats; finite ?I; ?x \<notin> ?I\<rbrakk> \<Longrightarrow> local.sum_mat A (insert ?x ?I) = A ?x + local.sum_mat A ?I

goal (1 subgoal):
 1. Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = Complex_Matrix.adjoint (A x + local.sum_mat A F)
[PROOF STEP]
by (simp add:  image_subset_iff)
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = Complex_Matrix.adjoint (A x + local.sum_mat A F)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = Complex_Matrix.adjoint (A x + local.sum_mat A F)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
have "... = Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (sum_mat A F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint (A x + local.sum_mat A F) = Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F)
[PROOF STEP]
proof (rule adjoint_add)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A x \<in> carrier_mat ?n ?m
 2. local.sum_mat A F \<in> carrier_mat ?n ?m
[PROOF STEP]
show "A x \<in> carrier_mat dimR dimC"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A x \<in> carrier_mat dimR dimC
[PROOF STEP]
using  insert fc_mats_carrier
[PROOF STATE]
proof (prove)
using this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats
fc_mats = carrier_mat dimR dimC

goal (1 subgoal):
 1. A x \<in> carrier_mat dimR dimC
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A x \<in> carrier_mat dimR dimC

goal (1 subgoal):
 1. local.sum_mat A F \<in> carrier_mat dimR dimC
[PROOF STEP]
show "sum_mat A F \<in> carrier_mat dimR dimC"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.sum_mat A F \<in> carrier_mat dimR dimC
[PROOF STEP]
using  insert fc_mats_carrier sum_mat_carrier[of F]
[PROOF STATE]
proof (prove)
using this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats
fc_mats = carrier_mat dimR dimC
(\<And>i. i \<in> F \<Longrightarrow> ?A i \<in> fc_mats) \<Longrightarrow> local.sum_mat ?A F \<in> carrier_mat dimR dimC

goal (1 subgoal):
 1. local.sum_mat A F \<in> carrier_mat dimR dimC
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local.sum_mat A F \<in> carrier_mat dimR dimC

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (A x + local.sum_mat A F) = Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (A x + local.sum_mat A F) = Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
have "... = Complex_Matrix.adjoint (A x) + sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F) = Complex_Matrix.adjoint (A x) + local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
[PROOF STEP]
using insert
[PROOF STATE]
proof (prove)
using this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats

goal (1 subgoal):
 1. Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F) = Complex_Matrix.adjoint (A x) + local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F) = Complex_Matrix.adjoint (A x) + local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (A x) + Complex_Matrix.adjoint (local.sum_mat A F) = Complex_Matrix.adjoint (A x) + local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
have "... = sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint (A x) + local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
proof (rule sum_mat_insert[symmetric], (auto simp add: insert))
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Complex_Matrix.adjoint (A x) \<in> fc_mats
 2. \<And>i. i \<in> F \<Longrightarrow> Complex_Matrix.adjoint (A i) \<in> fc_mats
[PROOF STEP]
show "Complex_Matrix.adjoint (A x) \<in> fc_mats"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.adjoint (A x) \<in> fc_mats
[PROOF STEP]
using insert fc_mats_carrier dim_eq
[PROOF STATE]
proof (prove)
using this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats
fc_mats = carrier_mat dimR dimC
dimR = dimC

goal (1 subgoal):
 1. Complex_Matrix.adjoint (A x) \<in> fc_mats
[PROOF STEP]
by (simp add: adjoint_dim)
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (A x) \<in> fc_mats

goal (1 subgoal):
 1. \<And>i. i \<in> F \<Longrightarrow> Complex_Matrix.adjoint (A i) \<in> fc_mats
[PROOF STEP]
show "\<And>i. i \<in> F \<Longrightarrow> Complex_Matrix.adjoint (A i) \<in> fc_mats"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> F \<Longrightarrow> Complex_Matrix.adjoint (A i) \<in> fc_mats
[PROOF STEP]
using insert fc_mats_carrier dim_eq
[PROOF STATE]
proof (prove)
using this:
finite F
x \<notin> F
(\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F
?i2 \<in> insert x F \<Longrightarrow> A ?i2 \<in> fc_mats
fc_mats = carrier_mat dimR dimC
dimR = dimC

goal (1 subgoal):
 1. \<And>i. i \<in> F \<Longrightarrow> Complex_Matrix.adjoint (A i) \<in> fc_mats
[PROOF STEP]
by (simp add: adjoint_dim)
[PROOF STATE]
proof (state)
this:
?i2 \<in> F \<Longrightarrow> Complex_Matrix.adjoint (A ?i2) \<in> fc_mats

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (A x) + local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> A i \<in> fc_mats) \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A F) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) F; \<And>i. i \<in> insert x F \<Longrightarrow> A i \<in> fc_mats\<rbrakk> \<Longrightarrow> Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)

goal (1 subgoal):
 1. Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Complex_Matrix.adjoint (local.sum_mat A (insert x F)) = local.sum_mat (\<lambda>i. Complex_Matrix.adjoint (A i)) (insert x F)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ncols_move_matrix_le: "ncols (move_matrix A j i) <= nat((int (ncols A)) + i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ncols (move_matrix A j i) \<le> nat (int (ncols A) + i)
[PROOF STEP]
apply (auto simp add: ncols_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ja ia. \<lbrakk>\<not> int ja < j; \<not> int ia < i; nat (int (ncols A) + i) \<le> ia\<rbrakk> \<Longrightarrow> Rep_matrix A (nat (int ja - j)) (nat (int ia - i)) = (0::'a)
[PROOF STEP]
apply (rule ncols)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ja ia. \<lbrakk>\<not> int ja < j; \<not> int ia < i; nat (int (ncols A) + i) \<le> ia\<rbrakk> \<Longrightarrow> ncols A \<le> nat (int ia - i)
[PROOF STEP]
apply (arith)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma all_nat_less [code_unfold]:
  "(\<forall>m\<le>n::nat. P m) \<longleftrightarrow> (\<forall>m \<in> {0..n}. P m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>m\<le>n. P m) = (\<forall>m\<in>{0..n}. P m)
[PROOF STEP]
by auto


[STATEMENT]
lemma face_of_polyhedron_polyhedron:
  fixes S :: "'a :: euclidean_space set"
  assumes "polyhedron S" "c face_of S" shows "polyhedron c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. polyhedron c
[PROOF STEP]
by (metis assms face_of_imp_eq_affine_Int polyhedron_Int polyhedron_affine_hull polyhedron_imp_convex)


[STATEMENT]
lemma ordinal_of_nat_times_omega [simp]:
"0 < k \<Longrightarrow> ordinal_of_nat k * \<omega> = \<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < k \<Longrightarrow> ordinal_of_nat k * \<omega> = \<omega>
[PROOF STEP]
apply (simp add: omega_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < k \<Longrightarrow> oLimit (\<lambda>n. ordinal_of_nat (k * n)) = oLimit ordinal_of_nat
[PROOF STEP]
apply (rule oLimit_eqI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n. 0 < k \<Longrightarrow> \<exists>m. ordinal_of_nat (k * n) \<le> ordinal_of_nat m
 2. \<And>n. 0 < k \<Longrightarrow> \<exists>m. ordinal_of_nat n \<le> ordinal_of_nat (k * m)
[PROOF STEP]
apply (rule_tac exI, rule order_refl)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. 0 < k \<Longrightarrow> \<exists>m. ordinal_of_nat n \<le> ordinal_of_nat (k * m)
[PROOF STEP]
apply (rule_tac x=n in exI, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma bigo_mult7:
"\<forall>x. f x \<noteq> 0 \<Longrightarrow> O(f * g) \<le> O(f::'a \<Rightarrow> ('b::linordered_field)) * O(g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. f x \<noteq> (0::'b) \<Longrightarrow> O(f * g) \<subseteq> O(f) * O(g)
[PROOF STEP]
by (metis bigo_refl bigo_mult6 set_times_mono3)


[STATEMENT]
lemma inv_rbt_app: "inv2 l \<Longrightarrow> inv2 r \<Longrightarrow> bheight l = bheight r \<Longrightarrow> inv1 l \<Longrightarrow> inv1 r \<Longrightarrow>
  inv2 (rbt_app l r) \<and> bheight (rbt_app l r) = bheight l \<and>
  inv1l (rbt_app l r) \<and> (color_of l = RBT_Impl.B \<and> color_of r = RBT_Impl.B \<longrightarrow> inv1 (rbt_app l r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>inv2 l; inv2 r; bheight l = bheight r; inv1 l; inv1 r\<rbrakk> \<Longrightarrow> inv2 (rbt_app l r) \<and> bheight (rbt_app l r) = bheight l \<and> inv1l (rbt_app l r) \<and> (color_of l = B \<and> color_of r = B \<longrightarrow> inv1 (rbt_app l r))
[PROOF STEP]
by (induct l r rule: rbt_app.induct)
     (auto simp: inv2_rbt_baldL_B inv_rbt_baldL split: RBT_Impl.rbt.splits RBT_Impl.color.splits)


[STATEMENT]
lemma greaterThanAtMost_empty[simp]:
  assumes "l \<le>\<^sub>a k"
  shows "{k<\<^sub>a..\<le>\<^sub>al} = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {k<\<^sub>a..\<le>\<^sub>al} = {}
[PROOF STEP]
using assms atLeastLessThan_empty[OF assms]
[PROOF STATE]
proof (prove)
using this:
l \<le>\<^sub>a k
{k\<le>\<^sub>a..<\<^sub>al} = {}

goal (1 subgoal):
 1. {k<\<^sub>a..\<le>\<^sub>al} = {}
[PROOF STEP]
unfolding
    greaterThanAtMost_eq_atLeastAtMost_diff
    atLeastLessThan_eq_atLeastAtMost_diff
[PROOF STATE]
proof (prove)
using this:
l \<le>\<^sub>a k
{k\<le>\<^sub>a..<\<^sub>al} = {}

goal (1 subgoal):
 1. {k<\<^sub>a..\<le>\<^sub>al} = {}
[PROOF STEP]
using le_less_trans
[PROOF STATE]
proof (prove)
using this:
l \<le>\<^sub>a k
{k\<le>\<^sub>a..<\<^sub>al} = {}
\<lbrakk>?x \<le>\<^sub>a ?y; ?y <\<^sub>a ?z\<rbrakk> \<Longrightarrow> ?x <\<^sub>a ?z

goal (1 subgoal):
 1. {k<\<^sub>a..\<le>\<^sub>al} = {}
[PROOF STEP]
by auto blast


[STATEMENT]
lemma sign_power:
  fixes x::"'a::linordered_idom"
  shows "sign (x^n) = (if n=0 then 1 else if even n then \<bar>sign x\<bar> else sign x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sign (x ^ n) = (if n = 0 then 1 else if even n then \<bar>sign x\<bar> else sign x)
[PROOF STEP]
by (simp add: Sturm_Tarski.sign_def zero_less_power_eq)


[STATEMENT]
lemma uncountable_gcard_ge: "small X \<Longrightarrow> uncountable X \<longleftrightarrow> gcard X \<ge> \<aleph>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small X \<Longrightarrow> uncountable X = (\<omega>1 \<le> gcard X)
[PROOF STEP]
by (simp add: uncountable_gcard csucc_le_Card_iff one_V_def)


[STATEMENT]
lemma Carmichael_number_iff':
  fixes n :: nat
  defines "P \<equiv> prime_factorization n"
  shows "Carmichael_number n \<longleftrightarrow>
           n > 1 \<and> size P \<noteq> 1 \<and> (\<forall>p\<in>#P. count P p = 1 \<and> p - 1 dvd n - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Carmichael_number n = (1 < n \<and> size P \<noteq> 1 \<and> (\<forall>p\<in>#P. count P p = 1 \<and> p - 1 dvd n - 1))
[PROOF STEP]
unfolding Carmichael_number_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n \<noteq> 1 \<and> \<not> prime n \<and> squarefree n \<and> (\<forall>p\<in>#prime_factorization n. p - 1 dvd n - 1)) = (1 < n \<and> size P \<noteq> 1 \<and> (\<forall>p\<in>#P. count P p = 1 \<and> p - 1 dvd n - 1))
[PROOF STEP]
by (cases "n = 0") (auto simp: P_def squarefree_factorial_semiring' count_prime_factorization)


[STATEMENT]
lemma fv_list\<^sub>s\<^sub>s\<^sub>t_is_fv\<^sub>s\<^sub>s\<^sub>t: "fv\<^sub>s\<^sub>s\<^sub>t S = set (fv_list\<^sub>s\<^sub>s\<^sub>t S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fv\<^sub>s\<^sub>s\<^sub>t S = set (fv_list\<^sub>s\<^sub>s\<^sub>t S)
[PROOF STEP]
unfolding fv\<^sub>s\<^sub>s\<^sub>t_def fv_list\<^sub>s\<^sub>s\<^sub>t_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (set (map fv\<^sub>s\<^sub>s\<^sub>t\<^sub>p S)) = set (remdups (concat (map fv_list\<^sub>s\<^sub>s\<^sub>t\<^sub>p S)))
[PROOF STEP]
by (induct S) (simp_all add: fv_list\<^sub>s\<^sub>s\<^sub>t\<^sub>p_is_fv\<^sub>s\<^sub>s\<^sub>t\<^sub>p)


[STATEMENT]
lemma not_residue_primroot_1:
  assumes "n > 2"
  shows   "\<not>residue_primroot n 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> residue_primroot n 1
[PROOF STEP]
using assms totient_gt_1[of n]
[PROOF STATE]
proof (prove)
using this:
2 < n
2 < n \<Longrightarrow> 1 < totient n

goal (1 subgoal):
 1. \<not> residue_primroot n 1
[PROOF STEP]
by (auto simp: residue_primroot_def)


[STATEMENT]
theorem Gromov_hyperbolic_invariant_under_quasi_isometry:
  assumes "quasi_isometric (UNIV::('a::geodesic_space) set) (UNIV::('b::Gromov_hyperbolic_space_geodesic) set)"
  shows "\<exists>delta. Gromov_hyperbolic_subset delta (UNIV::'a set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>delta. Gromov_hyperbolic_subset delta UNIV
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>delta. Gromov_hyperbolic_subset delta UNIV
[PROOF STEP]
obtain C lambda f where f: "lambda C-quasi_isometry_between (UNIV::'a set) (UNIV::'b set) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>lambda C f. lambda C -quasi_isometry_between UNIV UNIV f \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
quasi_isometric UNIV UNIV

goal (1 subgoal):
 1. (\<And>lambda C f. lambda C -quasi_isometry_between UNIV UNIV f \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding quasi_isometric_def
[PROOF STATE]
proof (prove)
using this:
\<exists>lambda C. Ex (lambda C -quasi_isometry_between UNIV UNIV)

goal (1 subgoal):
 1. (\<And>lambda C f. lambda C -quasi_isometry_between UNIV UNIV f \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lambda C -quasi_isometry_between UNIV UNIV f

goal (1 subgoal):
 1. \<exists>delta. Gromov_hyperbolic_subset delta UNIV
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>delta. Gromov_hyperbolic_subset delta UNIV
[PROOF STEP]
using Gromov_hyperbolic_invariant_under_quasi_isometry_explicit[OF quasi_isometry_betweenD(1)[OF f]]
[PROOF STATE]
proof (prove)
using this:
Gromov_hyperbolic_subset (752 * lambda ^ 3 * (C + deltaG TYPE('b))) UNIV

goal (1 subgoal):
 1. \<exists>delta. Gromov_hyperbolic_subset delta UNIV
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>delta. Gromov_hyperbolic_subset delta UNIV

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pochhammer_of_nat_eq_0_lemma: "k > n \<Longrightarrow> pochhammer (- (of_nat n :: 'a:: idom)) k = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < k \<Longrightarrow> pochhammer (- of_nat n) k = (0::'a)
[PROOF STEP]
by (auto simp add: pochhammer_prod)


[STATEMENT]
lemma nth_default_Bernstein_coeffs_01: assumes "degree P \<le> p"
  shows "nth_default 0 (Bernstein_coeffs_01 p P) i =
         inverse (p choose i) * coeff (reciprocal_poly p P \<circ>\<^sub>p [:1, 1:]) (p-i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_default 0 (Bernstein_coeffs_01 p P) i = inverse (real (p choose i)) * coeff (reciprocal_poly p P \<circ>\<^sub>p [:1, 1:]) (p - i)
[PROOF STEP]
apply (cases "p = i")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. p = i \<Longrightarrow> nth_default 0 (Bernstein_coeffs_01 p P) i = inverse (real (p choose i)) * coeff (reciprocal_poly p P \<circ>\<^sub>p [:1, 1:]) (p - i)
 2. p \<noteq> i \<Longrightarrow> nth_default 0 (Bernstein_coeffs_01 p P) i = inverse (real (p choose i)) * coeff (reciprocal_poly p P \<circ>\<^sub>p [:1, 1:]) (p - i)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
degree P \<le> p

goal (2 subgoals):
 1. p = i \<Longrightarrow> nth_default 0 (Bernstein_coeffs_01 p P) i = inverse (real (p choose i)) * coeff (reciprocal_poly p P \<circ>\<^sub>p [:1, 1:]) (p - i)
 2. p \<noteq> i \<Longrightarrow> nth_default 0 (Bernstein_coeffs_01 p P) i = inverse (real (p choose i)) * coeff (reciprocal_poly p P \<circ>\<^sub>p [:1, 1:]) (p - i)
[PROOF STEP]
by (auto simp: Bernstein_coeffs_01_def nth_default_append
                  nth_default_Cons Nitpick.case_nat_unfold binomial_eq_0)


[STATEMENT]
theorem fk_alg_correct:
  assumes "k \<ge> 1"
  assumes "\<epsilon> \<in> {0<..<1}"
  assumes "\<delta> > 0"
  assumes "set as \<subseteq> {..<n}"
  defines "M \<equiv> fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result"
  shows "\<P>(\<omega> in measure_pmf M. \<bar>\<omega> - F k as\<bar> \<le> \<delta> * F k as) \<ge> 1 - of_rat \<epsilon>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 - real_of_rat \<epsilon> \<le> measure_pmf.prob M {\<omega> \<in> space (measure_pmf M). \<bar>\<omega> - F k as\<bar> \<le> \<delta> * F k as}
[PROOF STEP]
unfolding M_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 - real_of_rat \<epsilon> \<le> measure_pmf.prob (fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result) {\<omega> \<in> space (measure_pmf (fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result)). \<bar>\<omega> - F k as\<bar> \<le> \<delta> * F k as}
[PROOF STEP]
using fk_alg_correct'[OF assms(1-4)]
[PROOF STATE]
proof (prove)
using this:
1 - real_of_rat \<epsilon> \<le> measure_pmf.prob (fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result) {\<omega> \<in> space (measure_pmf (fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result)). \<bar>\<omega> - F k as\<bar> \<le> \<delta> * F k as}

goal (1 subgoal):
 1. 1 - real_of_rat \<epsilon> \<le> measure_pmf.prob (fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result) {\<omega> \<in> space (measure_pmf (fold (\<lambda>a state. state \<bind> fk_update a) as (fk_init k \<delta> \<epsilon> n) \<bind> fk_result)). \<bar>\<omega> - F k as\<bar> \<le> \<delta> * F k as}
[PROOF STEP]
by blast


[STATEMENT]
lemma pow_integer_mod_group [simp]:
  fixes m::nat
  shows "pow (integer_mod_group n) x m = (int m * x) mod int n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
[PROOF STEP]
proof (cases "n=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
 2. n \<noteq> 0 \<Longrightarrow> x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
 2. n \<noteq> 0 \<Longrightarrow> x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
[PROOF STEP]
by (induction m) (auto simp: add.commute mod_add_right_eq distrib_left mult.commute)
[PROOF STATE]
proof (state)
this:
x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n

goal (1 subgoal):
 1. n = 0 \<Longrightarrow> x [^]\<^bsub>integer_mod_group n\<^esub> m = int m * x mod int n
[PROOF STEP]
qed (simp add: integer_mod_group_def)


[STATEMENT]
lemma rel_star_def: "X^* = (\<Union>n. rel_dioid.power X n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X\<^sup>* = \<Union> (range (rel_dioid.power X))
[PROOF STEP]
by (simp add: power_is_relpow rtrancl_is_UN_relpow)


[STATEMENT]
lemma vector_smult_assoc: "a *s (b *s x) = ((a::'a::semigroup_mult) * b) *s x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *s (b *s x) = a * b *s x
[PROOF STEP]
by (vector mult.assoc)


[STATEMENT]
lemma prod_emb_Pi:
  assumes "X \<in> (\<Pi> j\<in>J. sets (M j))" "J \<subseteq> K"
  shows "prod_emb K M J (Pi\<^sub>E J X) = (\<Pi>\<^sub>E i\<in>K. if i \<in> J then X i else space (M i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod_emb K M J (Pi\<^sub>E J X) = (\<Pi>\<^sub>E i\<in>K. if i \<in> J then X i else space (M i))
[PROOF STEP]
using assms sets.space_closed
[PROOF STATE]
proof (prove)
using this:
X \<in> (\<Pi> j\<in>J. sets (M j))
J \<subseteq> K
sets ?M \<subseteq> Pow (space ?M)

goal (1 subgoal):
 1. prod_emb K M J (Pi\<^sub>E J X) = (\<Pi>\<^sub>E i\<in>K. if i \<in> J then X i else space (M i))
[PROOF STEP]
by (auto simp: prod_emb_def PiE_iff split: if_split_asm) blast+


[STATEMENT]
lemma tan_of_real: "of_real (tan x) = (tan (of_real x) :: 'a::{real_normed_field,banach})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_real (tan x) = tan (of_real x)
[PROOF STEP]
by (simp add: tan_def sin_of_real cos_of_real)


[STATEMENT]
lemma smooth_on_sqrt: "k-smooth_on S (\<lambda>x. sqrt (f x))"
  if "k-smooth_on S f" "0 \<notin> f ` S" "open S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k-smooth_on S (\<lambda>x. sqrt (f x))
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
k-smooth_on S f
0 \<notin> f ` S
open S

goal (1 subgoal):
 1. k-smooth_on S (\<lambda>x. sqrt (f x))
[PROOF STEP]
by (auto simp: smooth_on_def intro!: higher_differentiable_on_sqrt)


[STATEMENT]
lemma cnj_diff [simp]: "cnj (x - y) = cnj x - cnj y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Octonions.cnj (x - y) = Octonions.cnj x - Octonions.cnj y
[PROOF STEP]
using  octo_eq_iff
[PROOF STATE]
proof (prove)
using this:
(?x = ?y) = (Ree ?x = Ree ?y \<and> Im1 ?x = Im1 ?y \<and> Im2 ?x = Im2 ?y \<and> Im3 ?x = Im3 ?y \<and> Im4 ?x = Im4 ?y \<and> Im5 ?x = Im5 ?y \<and> Im6 ?x = Im6 ?y \<and> Im7 ?x = Im7 ?y)

goal (1 subgoal):
 1. Octonions.cnj (x - y) = Octonions.cnj x - Octonions.cnj y
[PROOF STEP]
by (metis add.commute add_left_cancel cnj_add diff_add_cancel)


[STATEMENT]
lemma finite_res: "\<forall>C \<in> S. finite C \<Longrightarrow> \<forall>C \<in> res S. finite C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>C\<in>S. finite C \<Longrightarrow> \<forall>C\<in>res S. finite C
[PROOF STEP]
unfolding res_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>C\<in>S. finite C \<Longrightarrow> \<forall>C\<in>\<Union>C1\<in>S. \<Union>C2\<in>S. \<Union>L1\<in>C1. \<Union>L2\<in>C2. case (L1, L2) of (i\<^sup>+, a\<^sup>+) \<Rightarrow> {} | (i\<^sup>+, j\<inverse>) \<Rightarrow> if i = j then {C1 - {i\<^sup>+} \<union> (C2 - {j\<inverse>})} else {} | (aa\<inverse>, b) \<Rightarrow> {}. finite C
[PROOF STEP]
by(clarsimp split: literal.splits)


[STATEMENT]
lemma partCompat_partGen:
assumes "sym theta" and "trans theta"
and "partCompat P theta f"
shows "partCompat (partGen P) theta f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. partCompat (partGen P) theta f
[PROOF STEP]
unfolding partCompat_def partGen_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>I\<in>{gen P I |I. I \<in> P}. Resumption_Based.compat I theta f
[PROOF STEP]
using assms partCompat_gen[of theta P f]
[PROOF STATE]
proof (prove)
using this:
sym theta
trans theta
partCompat P theta f
\<lbrakk>sym theta; trans theta; partCompat P theta f; ?I \<in> P\<rbrakk> \<Longrightarrow> Resumption_Based.compat (gen P ?I) theta f

goal (1 subgoal):
 1. \<forall>I\<in>{gen P I |I. I \<in> P}. Resumption_Based.compat I theta f
[PROOF STEP]
by auto