[STATEMENT]
theorem Edelstein_fix:
  fixes S :: "'a::metric_space set"
  assumes S: "compact S" "S \<noteq> {}"
    and gs: "(g ` S) \<subseteq> S"
    and dist: "\<forall>x\<in>S. \<forall>y\<in>S. x \<noteq> y \<longrightarrow> dist (g x) (g y) < dist x y"
  shows "\<exists>!x\<in>S. g x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
let ?D = "(\<lambda>x. (x, x)) ` S"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
have D: "compact ?D" "?D \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact ((\<lambda>x. (x, x)) ` S) &&& (\<lambda>x. (x, x)) ` S \<noteq> {}
[PROOF STEP]
by (rule compact_continuous_image)
       (auto intro!: S continuous_Pair continuous_ident simp: continuous_on_eq_continuous_within)
[PROOF STATE]
proof (state)
this:
compact ((\<lambda>x. (x, x)) ` S)
(\<lambda>x. (x, x)) ` S \<noteq> {}

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
have "\<And>x y e. x \<in> S \<Longrightarrow> y \<in> S \<Longrightarrow> 0 < e \<Longrightarrow> dist y x < e \<Longrightarrow> dist (g y) (g x) < e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y e. \<lbrakk>x \<in> S; y \<in> S; 0 < e; dist y x < e\<rbrakk> \<Longrightarrow> dist (g y) (g x) < e
[PROOF STEP]
using dist
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. \<forall>y\<in>S. x \<noteq> y \<longrightarrow> dist (g x) (g y) < dist x y

goal (1 subgoal):
 1. \<And>x y e. \<lbrakk>x \<in> S; y \<in> S; 0 < e; dist y x < e\<rbrakk> \<Longrightarrow> dist (g y) (g x) < e
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> S; ?y \<in> S; 0 < ?e; dist ?y ?x < ?e\<rbrakk> \<Longrightarrow> dist (g ?y) (g ?x) < ?e

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?x \<in> S; ?y \<in> S; 0 < ?e; dist ?y ?x < ?e\<rbrakk> \<Longrightarrow> dist (g ?y) (g ?x) < ?e
[PROOF STEP]
have "continuous_on S g"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> S; ?y \<in> S; 0 < ?e; dist ?y ?x < ?e\<rbrakk> \<Longrightarrow> dist (g ?y) (g ?x) < ?e

goal (1 subgoal):
 1. continuous_on S g
[PROOF STEP]
by (auto simp: continuous_on_iff)
[PROOF STATE]
proof (state)
this:
continuous_on S g

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_on S g
[PROOF STEP]
have cont: "continuous_on ?D (\<lambda>x. dist ((g \<circ> fst) x) (snd x))"
[PROOF STATE]
proof (prove)
using this:
continuous_on S g

goal (1 subgoal):
 1. continuous_on ((\<lambda>x. (x, x)) ` S) (\<lambda>x. dist ((g \<circ> fst) x) (snd x))
[PROOF STEP]
unfolding continuous_on_eq_continuous_within
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. continuous (at x within S) g

goal (1 subgoal):
 1. \<forall>x\<in>(\<lambda>x. (x, x)) ` S. continuous (at x within (\<lambda>x. (x, x)) ` S) (\<lambda>x. dist ((g \<circ> fst) x) (snd x))
[PROOF STEP]
by (intro continuous_dist ballI continuous_within_compose)
       (auto intro!: continuous_fst continuous_snd continuous_ident simp: image_image)
[PROOF STATE]
proof (state)
this:
continuous_on ((\<lambda>x. (x, x)) ` S) (\<lambda>x. dist ((g \<circ> fst) x) (snd x))

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
obtain a where "a \<in> S" and le: "\<And>x. x \<in> S \<Longrightarrow> dist (g a) a \<le> dist (g x) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> S; \<And>x. x \<in> S \<Longrightarrow> dist (g a) a \<le> dist (g x) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using continuous_attains_inf[OF D cont]
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>(\<lambda>x. (x, x)) ` S. \<forall>y\<in>(\<lambda>x. (x, x)) ` S. dist ((g \<circ> fst) x) (snd x) \<le> dist ((g \<circ> fst) y) (snd y)

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> S; \<And>x. x \<in> S \<Longrightarrow> dist (g a) a \<le> dist (g x) x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<in> S
?x \<in> S \<Longrightarrow> dist (g a) a \<le> dist (g ?x) ?x

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
have "g a = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g a = a
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g a \<noteq> a \<Longrightarrow> False
[PROOF STEP]
assume "g a \<noteq> a"
[PROOF STATE]
proof (state)
this:
g a \<noteq> a

goal (1 subgoal):
 1. g a \<noteq> a \<Longrightarrow> False
[PROOF STEP]
with \<open>a \<in> S\<close> gs
[PROOF STATE]
proof (chain)
picking this:
a \<in> S
g ` S \<subseteq> S
g a \<noteq> a
[PROOF STEP]
have "dist (g (g a)) (g a) < dist (g a) a"
[PROOF STATE]
proof (prove)
using this:
a \<in> S
g ` S \<subseteq> S
g a \<noteq> a

goal (1 subgoal):
 1. dist (g (g a)) (g a) < dist (g a) a
[PROOF STEP]
by (intro dist[rule_format]) auto
[PROOF STATE]
proof (state)
this:
dist (g (g a)) (g a) < dist (g a) a

goal (1 subgoal):
 1. g a \<noteq> a \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
dist (g (g a)) (g a) < dist (g a) a

goal (1 subgoal):
 1. g a \<noteq> a \<Longrightarrow> False
[PROOF STEP]
have "dist (g a) a \<le> dist (g (g a)) (g a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (g a) a \<le> dist (g (g a)) (g a)
[PROOF STEP]
using \<open>a \<in> S\<close> gs
[PROOF STATE]
proof (prove)
using this:
a \<in> S
g ` S \<subseteq> S

goal (1 subgoal):
 1. dist (g a) a \<le> dist (g (g a)) (g a)
[PROOF STEP]
by (intro le) auto
[PROOF STATE]
proof (state)
this:
dist (g a) a \<le> dist (g (g a)) (g a)

goal (1 subgoal):
 1. g a \<noteq> a \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
dist (g (g a)) (g a) < dist (g a) a
dist (g a) a \<le> dist (g (g a)) (g a)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
dist (g (g a)) (g a) < dist (g a) a
dist (g a) a \<le> dist (g (g a)) (g a)

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

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

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
g a = a

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
have "\<And>x. x \<in> S \<Longrightarrow> g x = x \<Longrightarrow> x = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> S; g x = x\<rbrakk> \<Longrightarrow> x = a
[PROOF STEP]
using dist[THEN bspec[where x=a]] \<open>g a = a\<close> and \<open>a\<in>S\<close>
[PROOF STATE]
proof (prove)
using this:
a \<in> S \<Longrightarrow> \<forall>y\<in>S. a \<noteq> y \<longrightarrow> dist (g a) (g y) < dist a y
g a = a
a \<in> S

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> S; g x = x\<rbrakk> \<Longrightarrow> x = a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> S; g ?x = ?x\<rbrakk> \<Longrightarrow> ?x = a

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
g a = a
\<lbrakk>?x \<in> S; g ?x = ?x\<rbrakk> \<Longrightarrow> ?x = a
[PROOF STEP]
show "\<exists>!x\<in>S. g x = x"
[PROOF STATE]
proof (prove)
using this:
g a = a
\<lbrakk>?x \<in> S; g ?x = ?x\<rbrakk> \<Longrightarrow> ?x = a

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
using \<open>a \<in> S\<close>
[PROOF STATE]
proof (prove)
using this:
g a = a
\<lbrakk>?x \<in> S; g ?x = ?x\<rbrakk> \<Longrightarrow> ?x = a
a \<in> S

goal (1 subgoal):
 1. \<exists>!x. x \<in> S \<and> g x = x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>!x. x \<in> S \<and> g x = x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bigo_plus_eq: "\<forall>x. 0 \<le> f x \<Longrightarrow> \<forall>x. 0 \<le> g x \<Longrightarrow> O(f + g) = O(f) + O(g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x\<rbrakk> \<Longrightarrow> O(f + g) = O(f) + O(g)
[PROOF STEP]
apply (rule equalityI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x\<rbrakk> \<Longrightarrow> O(f + g) \<subseteq> O(f) + O(g)
 2. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x\<rbrakk> \<Longrightarrow> O(f) + O(g) \<subseteq> O(f + g)
[PROOF STEP]
apply (rule bigo_plus_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x\<rbrakk> \<Longrightarrow> O(f) + O(g) \<subseteq> O(f + g)
[PROOF STEP]
apply (simp add: bigo_alt_def set_plus_def func_plus)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x\<rbrakk> \<Longrightarrow> {c. \<exists>a. (\<exists>c>0::'b. \<forall>x. \<bar>a x\<bar> \<le> c * f x) \<and> (\<exists>b. (\<exists>c>0::'b. \<forall>x. \<bar>b x\<bar> \<le> c * g x) \<and> c = (\<lambda>x. a x + b x))} \<subseteq> {h. \<exists>c>0::'b. \<forall>x. \<bar>h x\<bar> \<le> c * (f x + g x)}
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<exists>c>0::'b. \<forall>x. \<bar>a x + b x\<bar> \<le> c * (f x + g x)
[PROOF STEP]
apply (rule_tac x = "max c ca" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> (0::'b) < max c ca \<and> (\<forall>x. \<bar>a x + b x\<bar> \<le> max c ca * (f x + g x))
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> (0::'b) < max c ca
 2. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<forall>x. \<bar>a x + b x\<bar> \<le> max c ca * (f x + g x)
[PROOF STEP]
apply (subgoal_tac "c \<le> max c ca")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x; c \<le> max c ca\<rbrakk> \<Longrightarrow> (0::'b) < max c ca
 2. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> c \<le> max c ca
 3. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<forall>x. \<bar>a x + b x\<bar> \<le> max c ca * (f x + g x)
[PROOF STEP]
apply (erule order_less_le_trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x; c \<le> max c ca\<rbrakk> \<Longrightarrow> c \<le> max c ca
 2. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> c \<le> max c ca
 3. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<forall>x. \<bar>a x + b x\<bar> \<le> max c ca * (f x + g x)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> c \<le> max c ca
 2. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<forall>x. \<bar>a x + b x\<bar> \<le> max c ca * (f x + g x)
[PROOF STEP]
apply (rule max.cobounded1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a c b ca. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<forall>x. \<bar>a x + b x\<bar> \<le> max c ca * (f x + g x)
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a c b ca xa. \<lbrakk>\<forall>x. (0::'b) \<le> f x; \<forall>x. (0::'b) \<le> g x; (0::'b) < c; \<forall>x. \<bar>a x\<bar> \<le> c * f x; (0::'b) < ca; \<forall>x. \<bar>b x\<bar> \<le> ca * g x\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> max c ca * (f xa + g xa)
[PROOF STEP]
apply (drule_tac x = "xa" in spec)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> max c ca * (f xa + g xa)
[PROOF STEP]
apply (subgoal_tac "0 \<le> f xa + g xa")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; (0::'b) \<le> f xa + g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> max c ca * (f xa + g xa)
 2. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (simp add: ring_distribs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> max c ca * f xa + max c ca * g xa
 2. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (subgoal_tac "\<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> max c ca * f xa + max c ca * g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 3. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (subgoal_tac "\<bar>a xa\<bar> + \<bar>b xa\<bar> \<le> max c ca * f xa + max c ca * g xa")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>; \<bar>a xa\<bar> + \<bar>b xa\<bar> \<le> max c ca * f xa + max c ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> max c ca * f xa + max c ca * g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>a xa\<bar> + \<bar>b xa\<bar> \<le> max c ca * f xa + max c ca * g xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 4. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>a xa\<bar> + \<bar>b xa\<bar> \<le> max c ca * f xa + max c ca * g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 3. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule add_mono)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>a xa\<bar> \<le> max c ca * f xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 4. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (subgoal_tac "c * f xa \<le> max c ca * f xa")
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>; c * f xa \<le> max c ca * f xa\<rbrakk> \<Longrightarrow> \<bar>a xa\<bar> \<le> max c ca * f xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> c * f xa \<le> max c ca * f xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 4. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 5. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> c * f xa \<le> max c ca * f xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 4. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule mult_right_mono)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> c \<le> max c ca
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 4. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 5. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule max.cobounded1)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 4. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 3. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (subgoal_tac "ca * g xa \<le> max c ca * g xa")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>; ca * g xa \<le> max c ca * g xa\<rbrakk> \<Longrightarrow> \<bar>b xa\<bar> \<le> max c ca * g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> ca * g xa \<le> max c ca * g xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 4. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> ca * g xa \<le> max c ca * g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 3. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule mult_right_mono)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> ca \<le> max c ca
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> (0::'b) \<le> g xa
 3. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 4. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule max.cobounded2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa; \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>\<rbrakk> \<Longrightarrow> (0::'b) \<le> g xa
 2. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 3. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> \<bar>a xa + b xa\<bar> \<le> \<bar>a xa\<bar> + \<bar>b xa\<bar>
 2. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule abs_triangle_ineq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa + g xa
[PROOF STEP]
apply (rule add_nonneg_nonneg)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> f xa
 2. \<And>x a c b ca xa. \<lbrakk>(0::'b) < c; (0::'b) < ca; (0::'b) \<le> f xa; (0::'b) \<le> g xa; \<bar>a xa\<bar> \<le> c * f xa; \<bar>b xa\<bar> \<le> ca * g xa\<rbrakk> \<Longrightarrow> (0::'b) \<le> g xa
[PROOF STEP]
apply assumption+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inf_sub_left [simp]:
  assumes "z \<noteq> \<infinity>\<^sub>h"
  shows "\<infinity>\<^sub>h -\<^sub>h z = \<infinity>\<^sub>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<infinity>\<^sub>h -\<^sub>h z = \<infinity>\<^sub>h
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
z \<noteq> \<infinity>\<^sub>h

goal (1 subgoal):
 1. \<infinity>\<^sub>h -\<^sub>h z = \<infinity>\<^sub>h
[PROOF STEP]
using uminus_inf_iff
[PROOF STATE]
proof (prove)
using this:
z \<noteq> \<infinity>\<^sub>h
(~\<^sub>h ?z = \<infinity>\<^sub>h) = (?z = \<infinity>\<^sub>h)

goal (1 subgoal):
 1. \<infinity>\<^sub>h -\<^sub>h z = \<infinity>\<^sub>h
[PROOF STEP]
using inf_or_of_complex
[PROOF STATE]
proof (prove)
using this:
z \<noteq> \<infinity>\<^sub>h
(~\<^sub>h ?z = \<infinity>\<^sub>h) = (?z = \<infinity>\<^sub>h)
?z = \<infinity>\<^sub>h \<or> (\<exists>x. ?z = of_complex x)

goal (1 subgoal):
 1. \<infinity>\<^sub>h -\<^sub>h z = \<infinity>\<^sub>h
[PROOF STEP]
unfolding sub_def
[PROOF STATE]
proof (prove)
using this:
z \<noteq> \<infinity>\<^sub>h
(~\<^sub>h ?z = \<infinity>\<^sub>h) = (?z = \<infinity>\<^sub>h)
?z = \<infinity>\<^sub>h \<or> (\<exists>x. ?z = of_complex x)

goal (1 subgoal):
 1. (if \<infinity>\<^sub>h = \<infinity>\<^sub>h \<and> z = \<infinity>\<^sub>h then 0\<^sub>h else \<infinity>\<^sub>h +\<^sub>h ~\<^sub>h z) = \<infinity>\<^sub>h
[PROOF STEP]
by force


[STATEMENT]
lemma N_col_list_map: "j < \<b> \<Longrightarrow> col N j = map_vec (\<lambda> x . if (x \<in> (\<B>s ! j)) then 1 else 0) (vec_of_list \<V>s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j < \<b> \<Longrightarrow> col N j = map_vec (\<lambda>x. if x \<in> \<B>s ! j then 1 else 0) (vec_of_list \<V>s)
[PROOF STEP]
by (metis inc_mat_col_list_map blocks_list_length)


[STATEMENT]
lemma floor_frac [simp]: "\<lfloor>frac r\<rfloor> = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>frac r\<rfloor> = 0
[PROOF STEP]
by (simp add: frac_def)


[STATEMENT]
theorem minimalize_offending_overapprox_gives_back_an_offending_flow:
      "\<lbrakk> wf_graph G; is_offending_flows (set ff) G nP; set ff \<subseteq> edges G; distinct ff \<rbrakk>
        \<Longrightarrow>
         (set (minimalize_offending_overapprox ff [] G nP)) \<in> set_offending_flows G nP"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_graph G; is_offending_flows (set ff) G nP; set ff \<subseteq> edges G; distinct ff\<rbrakk> \<Longrightarrow> set (minimalize_offending_overapprox ff [] G nP) \<in> set_offending_flows G nP
[PROOF STEP]
apply(frule(3) minimalize_offending_overapprox_sound)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_graph G; is_offending_flows (set ff) G nP; set ff \<subseteq> edges G; distinct ff; is_offending_flows_min_set (set (minimalize_offending_overapprox ff [] G nP)) G nP\<rbrakk> \<Longrightarrow> set (minimalize_offending_overapprox ff [] G nP) \<in> set_offending_flows G nP
[PROOF STEP]
apply(simp add: set_offending_flows_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>wf_graph G; is_offending_flows (set ff) G nP; set ff \<subseteq> edges G; distinct ff; is_offending_flows_min_set (set (minimalize_offending_overapprox ff [] G nP)) G nP\<rbrakk> \<Longrightarrow> set (minimalize_offending_overapprox ff [] G nP) \<subseteq> edges G
[PROOF STEP]
using minimalize_offending_overapprox_subseteq_input[where keeps="[]", simplified]
[PROOF STATE]
proof (prove)
using this:
set (minimalize_offending_overapprox ?ff [] ?G ?nP) \<subseteq> set ?ff

goal (1 subgoal):
 1. \<lbrakk>wf_graph G; is_offending_flows (set ff) G nP; set ff \<subseteq> edges G; distinct ff; is_offending_flows_min_set (set (minimalize_offending_overapprox ff [] G nP)) G nP\<rbrakk> \<Longrightarrow> set (minimalize_offending_overapprox ff [] G nP) \<subseteq> edges G
[PROOF STEP]
by blast


[STATEMENT]
lemma e_lam_intro2[intro]:
  "\<lbrakk> VFun f \<in> E (ELam x e) \<rho>; v2 \<in> E e ((x,v1)#\<rho>) \<rbrakk>
  \<Longrightarrow> VFun (finsert (v1,v2) f) \<in> E (ELam x e) \<rho>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>VFun f \<in> E (ELam x e) \<rho>; v2 \<in> E e ((x, v1) # \<rho>)\<rbrakk> \<Longrightarrow> VFun (finsert (v1, v2) f) \<in> E (ELam x e) \<rho>
[PROOF STEP]
by auto


[STATEMENT]
lemma member_insert: "member (insert (x :: 'a) xs) = (member xs)(x := True)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. member (DList_Set.insert x xs) = (member xs)(x := True)
[PROOF STEP]
by(transfer)(simp add: fun_eq_iff List.member_def ID_ceq_neq_None equal.equal_eq[OF equal_ceq])


[STATEMENT]
lemma simple_integral_mono:
  assumes "simple_function M f" and "simple_function M g"
  and mono: "\<And> x. x \<in> space M \<Longrightarrow> f x \<le> g x"
  shows "integral\<^sup>S M f \<le> integral\<^sup>S M g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>S M f \<le> integral\<^sup>S M g
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
simple_function M f
simple_function M g
?x \<in> space M \<Longrightarrow> f ?x \<le> g ?x

goal (1 subgoal):
 1. integral\<^sup>S M f \<le> integral\<^sup>S M g
[PROOF STEP]
by (intro simple_integral_mono_AE) auto


[STATEMENT]
lemma limsup_INF_SUP: "limsup f = (INF n. SUP m\<in>{n..}. f m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup f = (INF n. Sup (f ` {n..}))
[PROOF STEP]
unfolding Limsup_def eventually_sequentially
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF P\<in>{P. \<exists>N. \<forall>n\<ge>N. P n}. Sup (f ` Collect P)) = (INF n. Sup (f ` {n..}))
[PROOF STEP]
by (rule INF_eq) (auto simp: atLeast_def intro!: SUP_mono)


[STATEMENT]
lemma countableI': "inj_on (f::'a \<Rightarrow> 'b::countable) S \<Longrightarrow> countable S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f S \<Longrightarrow> countable S
[PROOF STEP]
using comp_inj_on[of f S to_nat]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>inj_on f S; inj_on to_nat (f ` S)\<rbrakk> \<Longrightarrow> inj_on (to_nat \<circ> f) S

goal (1 subgoal):
 1. inj_on f S \<Longrightarrow> countable S
[PROOF STEP]
by (auto intro: countableI)


[STATEMENT]
lemma eval_fds_log_deriv:
  fixes s :: "'a :: dirichlet_series"
  assumes "fds_nth f 1 \<noteq> 0" "s \<bullet> 1 > abs_conv_abscissa f"
           "s \<bullet> 1 > abs_conv_abscissa (fds_deriv f / f)"
  assumes "eval_fds f s \<noteq> 0"
  shows   "eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
have "eval_fds (fds_deriv f / f * f) s = eval_fds (fds_deriv f / f) s * eval_fds f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds (fds_deriv f / f * f) s = eval_fds (fds_deriv f / f) s * eval_fds f s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
fds_nth f 1 \<noteq> (0::'a)
abs_conv_abscissa f < ereal (s \<bullet> (1::'a))
abs_conv_abscissa (fds_deriv f / f) < ereal (s \<bullet> (1::'a))
eval_fds f s \<noteq> (0::'a)

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f * f) s = eval_fds (fds_deriv f / f) s * eval_fds f s
[PROOF STEP]
by (intro eval_fds_mult fds_abs_converges) auto
[PROOF STATE]
proof (state)
this:
eval_fds (fds_deriv f / f * f) s = eval_fds (fds_deriv f / f) s * eval_fds f s

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
eval_fds (fds_deriv f / f * f) s = eval_fds (fds_deriv f / f) s * eval_fds f s

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
have "fds_deriv f / f * f = fds_deriv f * (f * inverse f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_deriv f / f * f = fds_deriv f * (f * inverse f)
[PROOF STEP]
by (simp add: divide_fds_def algebra_simps)
[PROOF STATE]
proof (state)
this:
fds_deriv f / f * f = fds_deriv f * (f * inverse f)

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_deriv f / f * f = fds_deriv f * (f * inverse f)

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
have "f * inverse f = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f * inverse f = 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
fds_nth f 1 \<noteq> (0::'a)
abs_conv_abscissa f < ereal (s \<bullet> (1::'a))
abs_conv_abscissa (fds_deriv f / f) < ereal (s \<bullet> (1::'a))
eval_fds f s \<noteq> (0::'a)

goal (1 subgoal):
 1. f * inverse f = 1
[PROOF STEP]
by (intro fds_right_inverse)
[PROOF STATE]
proof (state)
this:
f * inverse f = 1

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
eval_fds (fds_deriv f * 1) s = eval_fds (fds_deriv f / f) s * eval_fds f s
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
eval_fds (fds_deriv f * 1) s = eval_fds (fds_deriv f / f) s * eval_fds f s

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
eval_fds (fds_deriv f * 1) s = eval_fds (fds_deriv f / f) s * eval_fds f s
fds_nth f 1 \<noteq> (0::'a)
abs_conv_abscissa f < ereal (s \<bullet> (1::'a))
abs_conv_abscissa (fds_deriv f / f) < ereal (s \<bullet> (1::'a))
eval_fds f s \<noteq> (0::'a)

goal (1 subgoal):
 1. eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
eval_fds (fds_deriv f / f) s = eval_fds (fds_deriv f) s / eval_fds f s

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma filter_removeAll: "filter P (removeAll x xs) = removeAll x (filter P xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter P (removeAll x xs) = removeAll x (filter P xs)
[PROOF STEP]
unfolding removeAll_filter_not_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter P (filter ((\<noteq>) x) xs) = filter ((\<noteq>) x) (filter P xs)
[PROOF STEP]
by (auto intro: filter_cong)


[STATEMENT]
lemma blinfun_compose_diff_right: "f o\<^sub>L (g - h) = (f o\<^sub>L g) - (f o\<^sub>L h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f o\<^sub>L g - h = (f o\<^sub>L g) - (f o\<^sub>L h)
[PROOF STEP]
by (auto intro!: blinfun_eqI simp: blinfun.bilinear_simps)


[STATEMENT]
theorem IDFT_IFFT:
  "!!a i. i < 2 ^ k ==> IDFT (2 ^ k) a i = IFFT k a i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i
[PROOF STEP]
proof (induct k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a i. i < 2 ^ 0 \<Longrightarrow> IDFT (2 ^ 0) a i = IFFT 0 a i
 2. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
i < 2 ^ 0

goal (2 subgoals):
 1. \<And>a i. i < 2 ^ 0 \<Longrightarrow> IDFT (2 ^ 0) a i = IFFT 0 a i
 2. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < 2 ^ 0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
i < 2 ^ 0

goal (1 subgoal):
 1. IDFT (2 ^ 0) a i = IFFT 0 a i
[PROOF STEP]
by (simp add: IDFT_def)
[PROOF STATE]
proof (state)
this:
IDFT (2 ^ 0) a i = IFFT 0 a i

goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
?i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) ?a ?i = IFFT k ?a ?i
i < 2 ^ Suc k

goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
assume i: "i < 2 ^ Suc k"
[PROOF STATE]
proof (state)
this:
i < 2 ^ Suc k

goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) a i = IFFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
proof (cases "i < 2 ^ k")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
 2. \<not> i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i < 2 ^ k

goal (2 subgoals):
 1. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
 2. \<not> i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < 2 ^ k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i < 2 ^ k

goal (1 subgoal):
 1. IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < 2 ^ k \<Longrightarrow> IDFT (2 * 2 ^ k) a i = IFFT k (\<lambda>i. a (2 * i)) i + (1 / FFT.root (2 * 2 ^ k)) ^ i * IFFT k (\<lambda>i. a (Suc (2 * i))) i
[PROOF STEP]
apply (simp add: IDFT_lower)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < 2 ^ k \<Longrightarrow> IDFT (2 ^ k) (\<lambda>i. a (2 * i)) i + (1 / FFT.root (2 * 2 ^ k)) ^ i * IDFT (2 ^ k) (\<lambda>i. a (Suc (2 * i))) i = IFFT k (\<lambda>i. a (2 * i)) i + (1 / FFT.root (2 * 2 ^ k)) ^ i * IFFT k (\<lambda>i. a (Suc (2 * i))) i
[PROOF STEP]
apply (simp add: Suc)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i

goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> i < 2 ^ k

goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
from i
[PROOF STATE]
proof (chain)
picking this:
i < 2 ^ Suc k
[PROOF STEP]
have "i - 2 ^ k < 2 ^ k"
[PROOF STATE]
proof (prove)
using this:
i < 2 ^ Suc k

goal (1 subgoal):
 1. i - 2 ^ k < 2 ^ k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
i - 2 ^ k < 2 ^ k

goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
with False i
[PROOF STATE]
proof (chain)
picking this:
\<not> i < 2 ^ k
i < 2 ^ Suc k
i - 2 ^ k < 2 ^ k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> i < 2 ^ k
i < 2 ^ Suc k
i - 2 ^ k < 2 ^ k

goal (1 subgoal):
 1. IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> i < 2 ^ k; i < 2 * 2 ^ k; i - 2 ^ k < 2 ^ k\<rbrakk> \<Longrightarrow> IDFT (2 * 2 ^ k) a i = IFFT k (\<lambda>i. a (2 * i)) (i - 2 ^ k) - (1 / FFT.root (2 * 2 ^ k)) ^ (i - 2 ^ k) * IFFT k (\<lambda>i. a (Suc (2 * i))) (i - 2 ^ k)
[PROOF STEP]
apply (simp add: IDFT_upper)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> i < 2 ^ k; i < 2 * 2 ^ k; i - 2 ^ k < 2 ^ k\<rbrakk> \<Longrightarrow> IDFT (2 ^ k) (\<lambda>i. a (2 * i)) (i - 2 ^ k) - (1 / FFT.root (2 * 2 ^ k)) ^ (i - 2 ^ k) * IDFT (2 ^ k) (\<lambda>i. a (Suc (2 * i))) (i - 2 ^ k) = IFFT k (\<lambda>i. a (2 * i)) (i - 2 ^ k) - (1 / FFT.root (2 * 2 ^ k)) ^ (i - 2 ^ k) * IFFT k (\<lambda>i. a (Suc (2 * i))) (i - 2 ^ k)
[PROOF STEP]
apply (simp add: Suc)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
IDFT (2 ^ Suc k) a i = IFFT (Suc k) a i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem wls_substAbs_vsubstAbs_trans:
assumes "wlsAbs (us,s) A" and "wls (asSort ys) Y" and "freshAbs ys y1 A"
shows "((A $[y1 // y]_ys) $[Y / y1]_ys) = (A $[Y / y]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $[y1 // y]_ys $[Y / y1]_ys = A $[Y / y]_ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wlsAbs (us, s) A
wls (asSort ys) Y
freshAbs ys y1 A

goal (1 subgoal):
 1. A $[y1 // y]_ys $[Y / y1]_ys = A $[Y / y]_ys
[PROOF STEP]
by(simp add: substAbs_vsubstAbs_trans)


[STATEMENT]
lemma convolution_distrib_right :
  fixes   f g h :: "'a::group_add \<Rightarrow> 'b::semiring_0"
  assumes "f \<in> aezfun_set" "g \<in> aezfun_set"
  shows   "convolution (f + g) h = convolution f h + convolution g h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convolution (f + g) h = convolution f h + convolution g h
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
define fg FG where "fg = f + g" and "FG = supp f \<union> supp g"
[PROOF STATE]
proof (state)
this:
fg = f + g
FG = supp f \<union> supp g

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
have fin_FG: "finite FG"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite FG
[PROOF STEP]
using FG_def assms
[PROOF STATE]
proof (prove)
using this:
FG = supp f \<union> supp g
f \<in> aezfun_set
g \<in> aezfun_set

goal (1 subgoal):
 1. finite FG
[PROOF STEP]
unfolding aezfun_set_def
[PROOF STATE]
proof (prove)
using this:
FG = supp f \<union> supp g
f \<in> {f. finite (supp f)}
g \<in> {f. finite (supp f)}

goal (1 subgoal):
 1. finite FG
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
finite FG

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
have fg_aezfun: "fg \<in> aezfun_set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fg \<in> aezfun_set
[PROOF STEP]
using fg_def assms sum_of_aezfun_is_aezfun
[PROOF STATE]
proof (prove)
using this:
fg = f + g
f \<in> aezfun_set
g \<in> aezfun_set
\<lbrakk>?f \<in> aezfun_set; ?g \<in> aezfun_set\<rbrakk> \<Longrightarrow> ?f + ?g \<in> aezfun_set

goal (1 subgoal):
 1. fg \<in> aezfun_set
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
fg \<in> aezfun_set

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
fix x::'a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
have zero_ext_f : "\<And>y. y \<in> FG - supp f \<Longrightarrow> (f y) * h (-y + x) = 0"
  and  zero_ext_g : "\<And>y. y \<in> FG - supp g \<Longrightarrow> (g y) * h (-y + x) = 0"
  and  zero_ext_fg: "\<And>y. y \<in> FG - supp fg \<Longrightarrow> (fg y) * h (-y + x) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y. y \<in> FG - supp f \<Longrightarrow> f y * h (- y + x) = (0::'b)) &&& (\<And>y. y \<in> FG - supp g \<Longrightarrow> g y * h (- y + x) = (0::'b)) &&& (\<And>y. y \<in> FG - supp fg \<Longrightarrow> fg y * h (- y + x) = (0::'b))
[PROOF STEP]
unfolding supp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y. y \<in> FG - {x. f x \<noteq> (0::'b)} \<Longrightarrow> f y * h (- y + x) = (0::'b)) &&& (\<And>y. y \<in> FG - {x. g x \<noteq> (0::'b)} \<Longrightarrow> g y * h (- y + x) = (0::'b)) &&& (\<And>y. y \<in> FG - {x. fg x \<noteq> (0::'b)} \<Longrightarrow> fg y * h (- y + x) = (0::'b))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?y \<in> FG - supp f \<Longrightarrow> f ?y * h (- ?y + x) = (0::'b)
?y \<in> FG - supp g \<Longrightarrow> g ?y * h (- ?y + x) = (0::'b)
?y \<in> FG - supp fg \<Longrightarrow> fg ?y * h (- ?y + x) = (0::'b)

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
f \<in> aezfun_set
g \<in> aezfun_set
[PROOF STEP]
have "convolution fg h x = (\<Sum>y\<in>supp fg. (fg y) * h (-y + x))"
[PROOF STATE]
proof (prove)
using this:
f \<in> aezfun_set
g \<in> aezfun_set

goal (1 subgoal):
 1. convolution fg h x = (\<Sum>y\<in>supp fg. fg y * h (- y + x))
[PROOF STEP]
using fg_aezfun convolution_symm_eq_sum_over_supp_left[of fg h]
[PROOF STATE]
proof (prove)
using this:
f \<in> aezfun_set
g \<in> aezfun_set
fg \<in> aezfun_set
fg \<in> aezfun_set \<Longrightarrow> convolution fg h = (\<lambda>x. \<Sum>y\<in>supp fg. fg y * h (- y + x))

goal (1 subgoal):
 1. convolution fg h x = (\<Sum>y\<in>supp fg. fg y * h (- y + x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
convolution fg h x = (\<Sum>y\<in>supp fg. fg y * h (- y + x))

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
convolution fg h x = (\<Sum>y\<in>supp fg. fg y * h (- y + x))

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
from fg_def FG_def
[PROOF STATE]
proof (chain)
picking this:
fg = f + g
FG = supp f \<union> supp g
[PROOF STEP]
have "\<dots> = (\<Sum>y\<in>FG. (fg y) * h (-y + x))"
[PROOF STATE]
proof (prove)
using this:
fg = f + g
FG = supp f \<union> supp g

goal (1 subgoal):
 1. (\<Sum>y\<in>supp fg. fg y * h (- y + x)) = (\<Sum>y\<in>FG. fg y * h (- y + x))
[PROOF STEP]
using fin_FG supp_sum_subset_union_supp zero_ext_fg
          sum.mono_neutral_left[of FG "supp fg" "(\<lambda>y. (fg y) * h (-y + x))"]
[PROOF STATE]
proof (prove)
using this:
fg = f + g
FG = supp f \<union> supp g
finite FG
supp (?f + ?g) \<subseteq> supp ?f \<union> supp ?g
?y \<in> FG - supp fg \<Longrightarrow> fg ?y * h (- ?y + x) = (0::'b)
\<lbrakk>finite FG; supp fg \<subseteq> FG; \<forall>i\<in>FG - supp fg. fg i * h (- i + x) = (0::'b)\<rbrakk> \<Longrightarrow> (\<Sum>y\<in>supp fg. fg y * h (- y + x)) = (\<Sum>y\<in>FG. fg y * h (- y + x))

goal (1 subgoal):
 1. (\<Sum>y\<in>supp fg. fg y * h (- y + x)) = (\<Sum>y\<in>FG. fg y * h (- y + x))
[PROOF STEP]
by    fast
[PROOF STATE]
proof (state)
this:
(\<Sum>y\<in>supp fg. fg y * h (- y + x)) = (\<Sum>y\<in>FG. fg y * h (- y + x))

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>y\<in>supp fg. fg y * h (- y + x)) = (\<Sum>y\<in>FG. fg y * h (- y + x))

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
from fg_def
[PROOF STATE]
proof (chain)
picking this:
fg = f + g
[PROOF STEP]
have  "\<dots> = (\<Sum>y\<in>FG. (f y) * h (-y + x)) + (\<Sum>y\<in>FG. (g y) * h (-y + x))"
[PROOF STATE]
proof (prove)
using this:
fg = f + g

goal (1 subgoal):
 1. (\<Sum>y\<in>FG. fg y * h (- y + x)) = (\<Sum>y\<in>FG. f y * h (- y + x)) + (\<Sum>y\<in>FG. g y * h (- y + x))
[PROOF STEP]
using sum.distrib
[PROOF STATE]
proof (prove)
using this:
fg = f + g
(\<Sum>x\<in>?A. ?g x + ?h x) = sum ?g ?A + sum ?h ?A

goal (1 subgoal):
 1. (\<Sum>y\<in>FG. fg y * h (- y + x)) = (\<Sum>y\<in>FG. f y * h (- y + x)) + (\<Sum>y\<in>FG. g y * h (- y + x))
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
(\<Sum>y\<in>FG. fg y * h (- y + x)) = (\<Sum>y\<in>FG. f y * h (- y + x)) + (\<Sum>y\<in>FG. g y * h (- y + x))

goal (1 subgoal):
 1. \<And>x. convolution (f + g) h x = (convolution f h + convolution g h) x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
convolution fg h x = (\<Sum>y\<in>FG. f y * h (- y + x)) + (\<Sum>y\<in>FG. g y * h (- y + x))
[PROOF STEP]
show "convolution fg h x = (convolution f h + convolution g h) x"
[PROOF STATE]
proof (prove)
using this:
convolution fg h x = (\<Sum>y\<in>FG. f y * h (- y + x)) + (\<Sum>y\<in>FG. g y * h (- y + x))

goal (1 subgoal):
 1. convolution fg h x = (convolution f h + convolution g h) x
[PROOF STEP]
using assms FG_def fin_FG zero_ext_f zero_ext_g
          sum.mono_neutral_right[of FG "supp f" "(\<lambda>y. (f y) * h (-y + x))"]
          sum.mono_neutral_right[of FG "supp g" "(\<lambda>y. (g y) * h (-y + x))"]
          convolution_symm_eq_sum_over_supp_left[of f h]
          convolution_symm_eq_sum_over_supp_left[of g h]
[PROOF STATE]
proof (prove)
using this:
convolution fg h x = (\<Sum>y\<in>FG. f y * h (- y + x)) + (\<Sum>y\<in>FG. g y * h (- y + x))
f \<in> aezfun_set
g \<in> aezfun_set
FG = supp f \<union> supp g
finite FG
?y \<in> FG - supp f \<Longrightarrow> f ?y * h (- ?y + x) = (0::'b)
?y \<in> FG - supp g \<Longrightarrow> g ?y * h (- ?y + x) = (0::'b)
\<lbrakk>finite FG; supp f \<subseteq> FG; \<forall>i\<in>FG - supp f. f i * h (- i + x) = (0::'b)\<rbrakk> \<Longrightarrow> (\<Sum>y\<in>FG. f y * h (- y + x)) = (\<Sum>y\<in>supp f. f y * h (- y + x))
\<lbrakk>finite FG; supp g \<subseteq> FG; \<forall>i\<in>FG - supp g. g i * h (- i + x) = (0::'b)\<rbrakk> \<Longrightarrow> (\<Sum>y\<in>FG. g y * h (- y + x)) = (\<Sum>y\<in>supp g. g y * h (- y + x))
f \<in> aezfun_set \<Longrightarrow> convolution f h = (\<lambda>x. \<Sum>y\<in>supp f. f y * h (- y + x))
g \<in> aezfun_set \<Longrightarrow> convolution g h = (\<lambda>x. \<Sum>y\<in>supp g. g y * h (- y + x))

goal (1 subgoal):
 1. convolution fg h x = (convolution f h + convolution g h) x
[PROOF STEP]
by    fastforce
[PROOF STATE]
proof (state)
this:
convolution fg h x = (convolution f h + convolution g h) x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in monoid) m_concat_power[simp]: "x \<in> carrier G \<Longrightarrow> m_concat (replicate n x) = x [^] n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier G \<Longrightarrow> m_concat (replicate n x) = x [^] n
[PROOF STEP]
by(induct n, auto simp add:nat_pow_mult1l)


[STATEMENT]
lemma dist_eq_0_iff [simp]: "dist x y = 0 \<longleftrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (local.dist x y = 0) = (x = y)
[PROOF STEP]
using dist_pos[of x y]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> y \<Longrightarrow> 0 < local.dist x y

goal (1 subgoal):
 1. (local.dist x y = 0) = (x = y)
[PROOF STEP]
by (cases "x = y") auto


[STATEMENT]
lemma neighbors_in_E: "v\<in>n u \<Longrightarrow> (u,v)\<in>E\<union>E\<inverse>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> n u \<Longrightarrow> (u, v) \<in> E \<union> E\<inverse>
[PROOF STEP]
using neighbors_adj[of u] E_ss_VxV
[PROOF STATE]
proof (prove)
using this:
n u \<subseteq> adjacent_nodes u
E \<subseteq> V \<times> V

goal (1 subgoal):
 1. v \<in> n u \<Longrightarrow> (u, v) \<in> E \<union> E\<inverse>
[PROOF STEP]
unfolding adjacent_nodes_def
[PROOF STATE]
proof (prove)
using this:
n u \<subseteq> E `` {u} \<union> E\<inverse> `` {u}
E \<subseteq> V \<times> V

goal (1 subgoal):
 1. v \<in> n u \<Longrightarrow> (u, v) \<in> E \<union> E\<inverse>
[PROOF STEP]
by auto


[STATEMENT]
lemma ac_in_res_ring:
  assumes "x \<in> nonzero Q\<^sub>p"
  shows "ac n x \<in> carrier (Zp_res_ring n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ac n x \<in> carrier (residue_ring (p ^ n))
[PROOF STEP]
unfolding ac_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if x = \<zero> then 0 else angular_component x n) \<in> carrier (residue_ring (p ^ n))
[PROOF STEP]
using assms angular_component_closed[of x]
[PROOF STATE]
proof (prove)
using this:
x \<in> nonzero Q\<^sub>p
x \<in> nonzero Q\<^sub>p \<Longrightarrow> angular_component x \<in> carrier Z\<^sub>p

goal (1 subgoal):
 1. (if x = \<zero> then 0 else angular_component x n) \<in> carrier (residue_ring (p ^ n))
[PROOF STEP]
by (simp add: Qp.nonzero_memE(2) residues_closed)


[STATEMENT]
lemma continuous_on_sin_real: "continuous_on {a..b} sin" for a::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {a..b} sin
[PROOF STEP]
using continuous_at_imp_continuous_on isCont_sin
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>?s. isCont ?f x \<Longrightarrow> continuous_on ?s ?f
isCont sin ?x

goal (1 subgoal):
 1. continuous_on {a..b} sin
[PROOF STEP]
by blast


[STATEMENT]
lemma step_n_push_size_new_big [simp]: "\<lbrakk>
  invar (States dir big small);
  (step ^^ n) (States dir (Big.push x big) small) = States dir' big' small'
\<rbrakk> \<Longrightarrow> size_new big' = Suc (size_new big)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>invar (States dir big small); (step ^^ n) (States dir (Big.push x big) small) = States dir' big' small'\<rbrakk> \<Longrightarrow> size_new big' = Suc (size_new big)
[PROOF STEP]
by (metis Big_Proof.size_new_push invar_states.simps invar_push_big step_n_size_new_big)


[STATEMENT]
lemma prv_imp_eqvER:
"\<phi>1 \<in> fmla \<Longrightarrow> \<phi>2 \<in> fmla \<Longrightarrow> prv (eqv \<phi>1 \<phi>2) \<Longrightarrow> prv (imp \<phi>2 \<phi>1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<phi>1 \<in> fmla; \<phi>2 \<in> fmla; prv (eqv \<phi>1 \<phi>2)\<rbrakk> \<Longrightarrow> prv (imp \<phi>2 \<phi>1)
[PROOF STEP]
unfolding eqv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<phi>1 \<in> fmla; \<phi>2 \<in> fmla; prv (cnj (imp \<phi>1 \<phi>2) (imp \<phi>2 \<phi>1))\<rbrakk> \<Longrightarrow> prv (imp \<phi>2 \<phi>1)
[PROOF STEP]
by (meson cnj imp prv_imp_cnjR prv_imp_mp)


[STATEMENT]
lemma  unitarily_equiv_trace:
  assumes "A \<in> carrier_mat n n"
  and "unitarily_equiv A B U"
shows "Complex_Matrix.trace A = Complex_Matrix.trace B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
have "Complex_Matrix.trace A = Complex_Matrix.trace (U * B * (Complex_Matrix.adjoint U))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U)
[PROOF STEP]
using assms unitarily_equiv_eq[of A] unitary_diag_imp_unitarily_equiv[of A]
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
unitarily_equiv A B U
unitarily_equiv A ?B ?U \<Longrightarrow> A = ?U * ?B * Complex_Matrix.adjoint ?U
unitary_diag A ?B ?U \<Longrightarrow> unitarily_equiv A ?B ?U

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace A = Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U)

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace A = Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U)

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
have "... = Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U) = Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B))
[PROOF STEP]
using trace_comm assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> Complex_Matrix.trace (?A * ?B) = Complex_Matrix.trace (?B * ?A)
A \<in> carrier_mat n n
unitarily_equiv A B U

goal (1 subgoal):
 1. Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U) = Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B))
[PROOF STEP]
by (metis adjoint_dim' carrier_matD(2) carrier_matI index_mult_mat(2)
        index_mult_mat(3) unitarily_equiv_carrier(1) unitarily_equiv_carrier(2))
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U) = Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B))

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (U * B * Complex_Matrix.adjoint U) = Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B))

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
have "... = Complex_Matrix.trace B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B)) = Complex_Matrix.trace B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
unitarily_equiv A B U

goal (1 subgoal):
 1. Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B)) = Complex_Matrix.trace B
[PROOF STEP]
by (smt (z3) Complex_Matrix.unitary_def adjoint_dim_col assoc_mult_mat
        carrier_matD(2) carrier_mat_triv index_mult_mat(3) left_mult_one_mat
        unitarily_equivD(1) unitarily_equiv_carrier(1) unitarily_equiv_eq
        unitary_simps(1))
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace (Complex_Matrix.adjoint U * (U * B)) = Complex_Matrix.trace B

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.trace A = Complex_Matrix.trace B

goal (1 subgoal):
 1. Complex_Matrix.trace A = Complex_Matrix.trace B
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Complex_Matrix.trace A = Complex_Matrix.trace B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hcis_zero [simp]: "hcis 0 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hcis 0 = 1
[PROOF STEP]
by transfer (rule cis_zero)


[STATEMENT]
lemma of_int_dirichlet_prod:
  "of_int (dirichlet_prod f g n) = dirichlet_prod (\<lambda>n. of_int (f n)) (\<lambda>n. of_int (g n)) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int (dirichlet_prod f g n) = dirichlet_prod (\<lambda>n. of_int (f n)) (\<lambda>n. of_int (g n)) n
[PROOF STEP]
by (simp add: dirichlet_prod_def)


[STATEMENT]
lemma is_interval_minus_translation'[simp]:
  shows "is_interval ((\<lambda>x. x - c) ` X) = is_interval X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_interval ((\<lambda>x. x - c) ` X) = is_interval X
[PROOF STEP]
using is_interval_translation[of "-c" X]
[PROOF STATE]
proof (prove)
using this:
is_interval ((+) (- c) ` X) = is_interval X

goal (1 subgoal):
 1. is_interval ((\<lambda>x. x - c) ` X) = is_interval X
[PROOF STEP]
by (metis image_cong uminus_add_conv_diff)


[STATEMENT]
lemma lm045:
  "\<Union> {{(fst pair, {y})| y. y \<in> snd pair}| pair. pair \<in> a} =
   {(fst pair, {y})| y pair. y \<in> snd pair & pair \<in> a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> {{(fst pair, {y}) |y. y \<in> snd pair} |pair. pair \<in> a} = {(fst pair, {y}) |y pair. y \<in> snd pair \<and> pair \<in> a}
[PROOF STEP]
by blast


[STATEMENT]
lemma offset_not_aligned:
  "\<lbrakk> is_aligned (p::'a::len word) n; i > 0; i < 2 ^ n; n < LENGTH('a)\<rbrakk> \<Longrightarrow>
   \<not> is_aligned (p + of_nat i) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_aligned p n; 0 < i; i < 2 ^ n; n < LENGTH('a)\<rbrakk> \<Longrightarrow> \<not> is_aligned (p + word_of_nat i) n
[PROOF STEP]
apply (erule is_aligned_add_not_aligned)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < i; i < 2 ^ n; n < LENGTH('a)\<rbrakk> \<Longrightarrow> \<not> is_aligned (word_of_nat i) n
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i n. \<lbrakk>0 < i; i < 2 ^ n; n < LENGTH('a)\<rbrakk> \<Longrightarrow> \<not> 2 ^ n dvd take_bit LENGTH('a) (int i)
[PROOF STEP]
apply (auto simp add: is_aligned_iff_udvd)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i n. \<lbrakk>0 < i; i < 2 ^ n; n < LENGTH('a); 2 ^ n dvd take_bit LENGTH('a) (int i)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (metis (no_types, lifting) le_less_trans less_not_refl2 less_or_eq_imp_le of_nat_eq_0_iff take_bit_eq_0_iff take_bit_nat_eq_self_iff take_bit_of_nat unat_lt2p unat_power_lower)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma hull_mono: "s \<subseteq> t \<Longrightarrow> (S hull s) \<subseteq> (S hull t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s \<subseteq> t \<Longrightarrow> S hull s \<subseteq> S hull t
[PROOF STEP]
unfolding hull_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s \<subseteq> t \<Longrightarrow> \<Inter> {t. S t \<and> s \<subseteq> t} \<subseteq> \<Inter> {ta. S ta \<and> t \<subseteq> ta}
[PROOF STEP]
by blast


[STATEMENT]
lemma affine_hull_face_of_disjoint_rel_interior:
  fixes S :: "'a::euclidean_space set"
  assumes "convex S" "F face_of S" "F \<noteq> S"
  shows "affine hull F \<inter> rel_interior S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. affine hull F \<inter> rel_interior S = {}
[PROOF STEP]
by (meson antisym assms disjnt_def equalityD2 face_of_def subset_of_face_of_affine_hull)


[STATEMENT]
lemma open_Pi'I: "(\<And>i. i \<in> I \<Longrightarrow> open (A i)) \<Longrightarrow> open (Pi' I A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> open (A i)) \<Longrightarrow> open (Pi' I A)
[PROOF STEP]
by (auto intro: generate_topology.Basis simp: open_fmap_def)


[STATEMENT]
lemma going_to_within_union [simp]:
  "f going_to F within (A \<union> B) = sup (f going_to F within A) (f going_to F within B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f going_to F within A \<union> B = sup (f going_to F within A) (f going_to F within B)
[PROOF STEP]
by (simp add: going_to_within_def flip: inf_sup_distrib1)


[STATEMENT]
lemma pushforward_by_permuted_pvar_list:
  assumes "\<sigma> permutes {..< n}"
  assumes "as \<in>  carrier (R\<^bsup>n\<^esup>)"
  shows "poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) as = permute_list \<sigma> as"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) as = permute_list \<sigma> as
[PROOF STEP]
by (metis assms pushforward_by_permutation_of_poly_list
      pushforward_by_pvar_list pvar_list_is_poly_tuple pvar_list_length)


[STATEMENT]
lemma map_list_Cons_if: "
  map_list fs (x # xs) =
  (if (fs = []) then [] else (
    ((hd fs) x) # map_list (tl fs) xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_list fs (x # xs) = (if fs = [] then [] else hd fs x # map_list (tl fs) xs)
[PROOF STEP]
by (case_tac "fs", simp+)


[STATEMENT]
theorem CYK_correct: "CYK S w = yield S w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.CYK S w = local.yield S w
[PROOF STEP]
by(simp add: CYK_def cyk2_eq_cyk cyk_correct)


[STATEMENT]
lemma keys_rbt_joinR: "RBT_Impl.keys (rbt_joinR l a b r) = RBT_Impl.keys l @ a # RBT_Impl.keys r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. keys (rbt_joinR l a b r) = keys l @ a # keys r
[PROOF STEP]
proof (induction l a b r rule: rbt_joinR.induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>l a b r. \<lbrakk>\<And>x21 x22 x23 x24 x25. \<lbrakk>\<not> bheight l \<le> bheight r; l = Branch x21 x22 x23 x24 x25; x21 = R\<rbrakk> \<Longrightarrow> keys (rbt_joinR x25 a b r) = keys x25 @ a # keys r; \<And>x21 x22 x23 x24 x25. \<lbrakk>\<not> bheight l \<le> bheight r; l = Branch x21 x22 x23 x24 x25; x21 = B\<rbrakk> \<Longrightarrow> keys (rbt_joinR x25 a b r) = keys x25 @ a # keys r\<rbrakk> \<Longrightarrow> keys (rbt_joinR l a b r) = keys l @ a # keys r
[PROOF STEP]
case (1 l a b r)
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<not> bheight l \<le> bheight r; l = Branch ?x21.0 ?x22.0 ?x23.0 ?x24.0 ?x25.0; ?x21.0 = R\<rbrakk> \<Longrightarrow> keys (rbt_joinR ?x25.0 a b r) = keys ?x25.0 @ a # keys r
\<lbrakk>\<not> bheight l \<le> bheight r; l = Branch ?x21.0 ?x22.0 ?x23.0 ?x24.0 ?x25.0; ?x21.0 = B\<rbrakk> \<Longrightarrow> keys (rbt_joinR ?x25.0 a b r) = keys ?x25.0 @ a # keys r

goal (1 subgoal):
 1. \<And>l a b r. \<lbrakk>\<And>x21 x22 x23 x24 x25. \<lbrakk>\<not> bheight l \<le> bheight r; l = Branch x21 x22 x23 x24 x25; x21 = R\<rbrakk> \<Longrightarrow> keys (rbt_joinR x25 a b r) = keys x25 @ a # keys r; \<And>x21 x22 x23 x24 x25. \<lbrakk>\<not> bheight l \<le> bheight r; l = Branch x21 x22 x23 x24 x25; x21 = B\<rbrakk> \<Longrightarrow> keys (rbt_joinR x25 a b r) = keys x25 @ a # keys r\<rbrakk> \<Longrightarrow> keys (rbt_joinR l a b r) = keys l @ a # keys r
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<not> bheight l \<le> bheight r; l = Branch ?x21.0 ?x22.0 ?x23.0 ?x24.0 ?x25.0; ?x21.0 = R\<rbrakk> \<Longrightarrow> keys (rbt_joinR ?x25.0 a b r) = keys ?x25.0 @ a # keys r
\<lbrakk>\<not> bheight l \<le> bheight r; l = Branch ?x21.0 ?x22.0 ?x23.0 ?x24.0 ?x25.0; ?x21.0 = B\<rbrakk> \<Longrightarrow> keys (rbt_joinR ?x25.0 a b r) = keys ?x25.0 @ a # keys r

goal (1 subgoal):
 1. keys (rbt_joinR l a b r) = keys l @ a # keys r
[PROOF STEP]
by (force simp: keys_rbt_baliR rbt_joinR.simps[of l a b r]
        split!: RBT_Impl.rbt.splits RBT_Impl.color.splits)
[PROOF STATE]
proof (state)
this:
keys (rbt_joinR l a b r) = keys l @ a # keys r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma agree_UNIV_fst:"\<And>\<nu> \<omega>. Vagree \<nu> \<omega> (Inl ` UNIV) \<Longrightarrow> (fst \<nu>) = (fst \<omega>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<nu> \<omega>. Vagree \<nu> \<omega> (range Inl) \<Longrightarrow> fst \<nu> = fst \<omega>
[PROOF STEP]
unfolding Vagree_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<nu> \<omega>. (\<forall>i. Inl i \<in> range Inl \<longrightarrow> fst \<nu> $ i = fst \<omega> $ i) \<and> (\<forall>i. Inr i \<in> range Inl \<longrightarrow> snd \<nu> $ i = snd \<omega> $ i) \<Longrightarrow> fst \<nu> = fst \<omega>
[PROOF STEP]
by (auto simp add: vec_eq_iff)


[STATEMENT]
lemma confluentpE[elim]:
    assumes "confluentp r"
    assumes "r\<^sup>*\<^sup>* x y1" "r\<^sup>*\<^sup>* x y2"
    obtains z
    where "r\<^sup>*\<^sup>* y1 z" "r\<^sup>*\<^sup>* y2 z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z. \<lbrakk>r\<^sup>*\<^sup>* y1 z; r\<^sup>*\<^sup>* y2 z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
confluentp r
r\<^sup>*\<^sup>* x y1
r\<^sup>*\<^sup>* x y2

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>r\<^sup>*\<^sup>* y1 z; r\<^sup>*\<^sup>* y2 z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding confluentp_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x y1 y2. r\<^sup>*\<^sup>* x y1 \<longrightarrow> r\<^sup>*\<^sup>* x y2 \<longrightarrow> (\<exists>z. r\<^sup>*\<^sup>* y1 z \<and> r\<^sup>*\<^sup>* y2 z)
r\<^sup>*\<^sup>* x y1
r\<^sup>*\<^sup>* x y2

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>r\<^sup>*\<^sup>* y1 z; r\<^sup>*\<^sup>* y2 z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast


[STATEMENT]
lemma has_vector_derivative_at_split:
  "(f has_vector_derivative f') (at x) \<longleftrightarrow>
   (f has_vector_derivative f') (at_left x) \<and>
   (f has_vector_derivative f') (at_right x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_vector_derivative f') (at x) = ((f has_vector_derivative f') (at_left x) \<and> (f has_vector_derivative f') (at_right x))
[PROOF STEP]
using has_derivative_at_split[of f "\<lambda>h. h *\<^sub>R f'" x]
[PROOF STATE]
proof (prove)
using this:
(f has_derivative (\<lambda>h. h *\<^sub>R f')) (at x) = ((f has_derivative (\<lambda>h. h *\<^sub>R f')) (at_left x) \<and> (f has_derivative (\<lambda>h. h *\<^sub>R f')) (at_right x))

goal (1 subgoal):
 1. (f has_vector_derivative f') (at x) = ((f has_vector_derivative f') (at_left x) \<and> (f has_vector_derivative f') (at_right x))
[PROOF STEP]
by (simp add: has_vector_derivative_def)


[STATEMENT]
lemma LPDi_Suc_alt: "LPDi (Suc i) r = (\<Union>s \<in> LPDi i r. LPD s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LPDi (Suc i) r = \<Union> (LPD ` LPDi i r)
[PROOF STEP]
by (induct i arbitrary: r) fastforce+


[STATEMENT]
lemma f_Exec_N_prefix: "
  \<lbrakk> n \<le> length xs; prefix xs ys \<rbrakk> \<Longrightarrow>
  f_Exec_Comp_N trans_fun n xs c =
  f_Exec_Comp_N trans_fun n ys c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n \<le> length xs; prefix xs ys\<rbrakk> \<Longrightarrow> f_Exec_Comp_N trans_fun n xs c = f_Exec_Comp_N trans_fun n ys c
[PROOF STEP]
by (simp add: f_Exec_Comp_N_def prefix_imp_take_eq)


[STATEMENT]
lemma quasiconvexC:
  assumes "quasiconvex C X"
  shows "C \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> C
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
quasiconvex C X

goal (1 subgoal):
 1. 0 \<le> C
[PROOF STEP]
unfolding quasiconvex_def
[PROOF STATE]
proof (prove)
using this:
0 \<le> C \<and> (\<forall>x\<in>X. \<forall>y\<in>X. \<exists>G. geodesic_segment_between G x y \<and> (\<forall>z\<in>G. infdist z X \<le> C))

goal (1 subgoal):
 1. 0 \<le> C
[PROOF STEP]
by auto


[STATEMENT]
lemma derivation_ge_list_all: "derivation_ge D i = list_all (\<lambda> d. fst d \<ge> i) D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. derivation_ge D i = list_all (\<lambda>d. i \<le> fst d) D
[PROOF STEP]
by (simp add: Ball_set derivation_ge_def)


[STATEMENT]
lemma th_3_lm_0: "\<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
assume A1: "c_unfold (length ls) (c_fold ls) = ls"
[PROOF STATE]
proof (state)
this:
c_unfold (length ls) (c_fold ls) = ls

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
assume A2: "ls = a # ls1"
[PROOF STATE]
proof (state)
this:
ls = a # ls1

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
assume A3: "ls1 = aa # list"
[PROOF STATE]
proof (state)
this:
ls1 = aa # list

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from A2
[PROOF STATE]
proof (chain)
picking this:
ls = a # ls1
[PROOF STEP]
have S1: "ls \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
ls = a # ls1

goal (1 subgoal):
 1. ls \<noteq> []
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ls \<noteq> []

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S1
[PROOF STATE]
proof (chain)
picking this:
ls \<noteq> []
[PROOF STEP]
have S2: "c_fold (x#ls) = c_pair x (c_fold ls)"
[PROOF STATE]
proof (prove)
using this:
ls \<noteq> []

goal (1 subgoal):
 1. c_fold (x # ls) = c_pair x (c_fold ls)
[PROOF STEP]
by (rule c_fold_0)
[PROOF STATE]
proof (state)
this:
c_fold (x # ls) = c_pair x (c_fold ls)

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
have S3: "length (x#ls) = Suc (length ls)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (x # ls) = Suc (length ls)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (x # ls) = Suc (length ls)

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S3
[PROOF STATE]
proof (chain)
picking this:
length (x # ls) = Suc (length ls)
[PROOF STEP]
have S4: "c_unfold (length (x # ls)) (c_fold (x # ls)) = c_unfold (Suc (length ls)) (c_fold (x # ls))"
[PROOF STATE]
proof (prove)
using this:
length (x # ls) = Suc (length ls)

goal (1 subgoal):
 1. c_unfold (length (x # ls)) (c_fold (x # ls)) = c_unfold (Suc (length ls)) (c_fold (x # ls))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c_unfold (length (x # ls)) (c_fold (x # ls)) = c_unfold (Suc (length ls)) (c_fold (x # ls))

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from A2
[PROOF STATE]
proof (chain)
picking this:
ls = a # ls1
[PROOF STEP]
have S5: "length ls > 0"
[PROOF STATE]
proof (prove)
using this:
ls = a # ls1

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

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S5
[PROOF STATE]
proof (chain)
picking this:
0 < length ls
[PROOF STEP]
have S6: "c_unfold (Suc (length ls)) (c_fold (x # ls)) = c_fst (c_fold (x # ls))#(c_unfold (length ls) (c_snd (c_fold (x#ls))))"
[PROOF STATE]
proof (prove)
using this:
0 < length ls

goal (1 subgoal):
 1. c_unfold (Suc (length ls)) (c_fold (x # ls)) = c_fst (c_fold (x # ls)) # c_unfold (length ls) (c_snd (c_fold (x # ls)))
[PROOF STEP]
by (rule c_unfold_4)
[PROOF STATE]
proof (state)
this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = c_fst (c_fold (x # ls)) # c_unfold (length ls) (c_snd (c_fold (x # ls)))

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S2
[PROOF STATE]
proof (chain)
picking this:
c_fold (x # ls) = c_pair x (c_fold ls)
[PROOF STEP]
have S7: "c_fst (c_fold (x#ls)) = x"
[PROOF STATE]
proof (prove)
using this:
c_fold (x # ls) = c_pair x (c_fold ls)

goal (1 subgoal):
 1. c_fst (c_fold (x # ls)) = x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c_fst (c_fold (x # ls)) = x

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S2
[PROOF STATE]
proof (chain)
picking this:
c_fold (x # ls) = c_pair x (c_fold ls)
[PROOF STEP]
have S8: "c_snd (c_fold (x#ls)) = c_fold ls"
[PROOF STATE]
proof (prove)
using this:
c_fold (x # ls) = c_pair x (c_fold ls)

goal (1 subgoal):
 1. c_snd (c_fold (x # ls)) = c_fold ls
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c_snd (c_fold (x # ls)) = c_fold ls

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S6 S7 S8
[PROOF STATE]
proof (chain)
picking this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = c_fst (c_fold (x # ls)) # c_unfold (length ls) (c_snd (c_fold (x # ls)))
c_fst (c_fold (x # ls)) = x
c_snd (c_fold (x # ls)) = c_fold ls
[PROOF STEP]
have S9: "c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # (c_unfold (length ls) (c_fold ls))"
[PROOF STATE]
proof (prove)
using this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = c_fst (c_fold (x # ls)) # c_unfold (length ls) (c_snd (c_fold (x # ls)))
c_fst (c_fold (x # ls)) = x
c_snd (c_fold (x # ls)) = c_fold ls

goal (1 subgoal):
 1. c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # c_unfold (length ls) (c_fold ls)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # c_unfold (length ls) (c_fold ls)

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from A1
[PROOF STATE]
proof (chain)
picking this:
c_unfold (length ls) (c_fold ls) = ls
[PROOF STEP]
have S10: "x # (c_unfold (length ls) (c_fold ls)) = x # ls"
[PROOF STATE]
proof (prove)
using this:
c_unfold (length ls) (c_fold ls) = ls

goal (1 subgoal):
 1. x # c_unfold (length ls) (c_fold ls) = x # ls
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x # c_unfold (length ls) (c_fold ls) = x # ls

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
from S9 S10
[PROOF STATE]
proof (chain)
picking this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # c_unfold (length ls) (c_fold ls)
x # c_unfold (length ls) (c_fold ls) = x # ls
[PROOF STEP]
have S11: "c_unfold (Suc (length ls)) (c_fold (x # ls)) = (x # ls)"
[PROOF STATE]
proof (prove)
using this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # c_unfold (length ls) (c_fold ls)
x # c_unfold (length ls) (c_fold ls) = x # ls

goal (1 subgoal):
 1. c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # ls

goal (1 subgoal):
 1. \<lbrakk>c_unfold (length ls) (c_fold ls) = ls; ls = a # ls1; ls1 = aa # list\<rbrakk> \<Longrightarrow> c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
c_unfold (Suc (length ls)) (c_fold (x # ls)) = x # ls

goal (1 subgoal):
 1. c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c_unfold (length (x # ls)) (c_fold (x # ls)) = x # ls

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closure_subset_eq: "closure S \<subseteq> S \<longleftrightarrow> closed S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (closure S \<subseteq> S) = closed S
[PROOF STEP]
using closure_eq[of S] closure_subset[of S]
[PROOF STATE]
proof (prove)
using this:
(closure S = S) = closed S
S \<subseteq> closure S

goal (1 subgoal):
 1. (closure S \<subseteq> S) = closed S
[PROOF STEP]
by simp


[STATEMENT]
lemma dioid_sum_prod:
  fixes f g :: "'a \<Rightarrow> 'b::dioid_one_zero"
  assumes "finite (A :: 'a set)"
  shows "(\<Sum>{f x |x. x \<in> A}) \<cdot> (\<Sum>{g x |x. x \<in> A}) = \<Sum>{f x \<cdot> g y |x y. x \<in> A \<and> y \<in> A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> {f x |x. x \<in> A} \<cdot> \<Sum> {g x |x. x \<in> A} = \<Sum> {f x \<cdot> g y |x y. x \<in> A \<and> y \<in> A}
[PROOF STEP]
by (simp add: assms dioid_sum_prod_var fset_to_im)


[STATEMENT]
lemma Ord_LeastI2_wellorder_ex:
  assumes "\<exists>x. Ord x \<and> P x"
  and "\<And>a. \<lbrakk> P a; \<forall>b. Ord b \<and> P b \<longrightarrow> a \<le> b \<rbrakk> \<Longrightarrow> Q a"
  shows "Q (LEAST i. Ord i \<and> P i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q (LEAST i. Ord i \<and> P i)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<exists>x. Ord x \<and> P x
\<lbrakk>P ?a; \<forall>b. Ord b \<and> P b \<longrightarrow> ?a \<le> b\<rbrakk> \<Longrightarrow> Q ?a

goal (1 subgoal):
 1. Q (LEAST i. Ord i \<and> P i)
[PROOF STEP]
by clarify (blast intro!: Ord_LeastI2_wellorder)


[STATEMENT]
lemma DIM_positive [simp]: "0 < DIM('a::euclidean_space)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < DIM('a)
[PROOF STEP]
by (simp add: card_gt_0_iff)


[STATEMENT]
lemma is_sig_red_Un:
  "is_sig_red sing_reg top_tail (A \<union> B) p \<longleftrightarrow> (is_sig_red sing_reg top_tail A p \<or> is_sig_red sing_reg top_tail B p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_sig_red sing_reg top_tail (A \<union> B) p = (is_sig_red sing_reg top_tail A p \<or> is_sig_red sing_reg top_tail B p)
[PROOF STEP]
by (auto simp: is_sig_red_def sig_red_Un)


[STATEMENT]
lemma iadd_iless_mono: "\<lbrakk> (i::enat) < j; k < l \<rbrakk> \<Longrightarrow> i + k < j + l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; k < l\<rbrakk> \<Longrightarrow> i + k < j + l
[PROOF STEP]
by (case_tac i, case_tac k, case_tac j, case_tac l, simp_all)


[STATEMENT]
lemma build_lin_independent_seq :
  assumes us_V: "set us \<subseteq> V"
  and     indep_us: "lin_independent us"
  shows   "\<exists>ws. set ws \<subseteq> V \<and> lin_independent (ws @ us) \<and> (Span (ws @ us) = V
                \<or> length ws = n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n)
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = 0)
 2. \<And>n. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc n)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = 0)
 2. \<And>n. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc n)
[PROOF STEP]
from indep_us
[PROOF STATE]
proof (chain)
picking this:
R_lin_independent us
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
R_lin_independent us

goal (1 subgoal):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = 0)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = 0)

goal (1 subgoal):
 1. \<And>n. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc n)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc n)
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = m)

goal (1 subgoal):
 1. \<And>n. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc n)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = m)
[PROOF STEP]
obtain ws
    where ws: "set ws \<subseteq> V" "lin_independent (ws @ us)"
              "Span (ws@us) = V \<or> length ws = m"
[PROOF STATE]
proof (prove)
using this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = m)

goal (1 subgoal):
 1. (\<And>ws. \<lbrakk>set ws \<subseteq> V; R_lin_independent (ws @ us); RSpan (ws @ us) = V \<or> length ws = m\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
set ws \<subseteq> V
R_lin_independent (ws @ us)
RSpan (ws @ us) = V \<or> length ws = m

goal (1 subgoal):
 1. \<And>n. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = n) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
proof (cases "V = Span (ws@us)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. V = RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
 2. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
V = RSpan (ws @ us)

goal (2 subgoals):
 1. V = RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
 2. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
with ws
[PROOF STATE]
proof (chain)
picking this:
set ws \<subseteq> V
R_lin_independent (ws @ us)
RSpan (ws @ us) = V \<or> length ws = m
V = RSpan (ws @ us)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
set ws \<subseteq> V
R_lin_independent (ws @ us)
RSpan (ws @ us) = V \<or> length ws = m
V = RSpan (ws @ us)

goal (1 subgoal):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
V \<noteq> RSpan (ws @ us)

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
V \<noteq> RSpan (ws @ us)

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
from ws(1) us_V
[PROOF STATE]
proof (chain)
picking this:
set ws \<subseteq> V
set us \<subseteq> V
[PROOF STEP]
have ws_us_V: "set (ws @ us) \<subseteq> V"
[PROOF STATE]
proof (prove)
using this:
set ws \<subseteq> V
set us \<subseteq> V

goal (1 subgoal):
 1. set (ws @ us) \<subseteq> V
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (ws @ us) \<subseteq> V

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
V \<noteq> RSpan (ws @ us)
set (ws @ us) \<subseteq> V
[PROOF STEP]
have "Span (ws@us) \<subset> V"
[PROOF STATE]
proof (prove)
using this:
V \<noteq> RSpan (ws @ us)
set (ws @ us) \<subseteq> V

goal (1 subgoal):
 1. RSpan (ws @ us) \<subset> V
[PROOF STEP]
using Span_closed
[PROOF STATE]
proof (prove)
using this:
V \<noteq> RSpan (ws @ us)
set (ws @ us) \<subseteq> V
set ?ms \<subseteq> V \<Longrightarrow> RSpan ?ms \<subseteq> V

goal (1 subgoal):
 1. RSpan (ws @ us) \<subset> V
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
RSpan (ws @ us) \<subset> V

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
RSpan (ws @ us) \<subset> V
[PROOF STEP]
obtain w where w: "w \<in> V" "w \<notin> Span (ws@us)"
[PROOF STATE]
proof (prove)
using this:
RSpan (ws @ us) \<subset> V

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<in> V; w \<notin> RSpan (ws @ us)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
w \<in> V
w \<notin> RSpan (ws @ us)

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
define vs where "vs = w # ws"
[PROOF STATE]
proof (state)
this:
vs = w # ws

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
with w ws_us_V ws(2,3)
[PROOF STATE]
proof (chain)
picking this:
w \<in> V
w \<notin> RSpan (ws @ us)
set (ws @ us) \<subseteq> V
R_lin_independent (ws @ us)
RSpan (ws @ us) = V \<or> length ws = m
vs = w # ws
[PROOF STEP]
have  "set (vs @ us) \<subseteq> V" "lin_independent (vs @ us)" "length vs = Suc m"
[PROOF STATE]
proof (prove)
using this:
w \<in> V
w \<notin> RSpan (ws @ us)
set (ws @ us) \<subseteq> V
R_lin_independent (ws @ us)
RSpan (ws @ us) = V \<or> length ws = m
vs = w # ws

goal (1 subgoal):
 1. set (vs @ us) \<subseteq> V &&& R_lin_independent (vs @ us) &&& length vs = Suc m
[PROOF STEP]
using lin_independent_Cons_conditions[of w "ws@us"]
[PROOF STATE]
proof (prove)
using this:
w \<in> V
w \<notin> RSpan (ws @ us)
set (ws @ us) \<subseteq> V
R_lin_independent (ws @ us)
RSpan (ws @ us) = V \<or> length ws = m
vs = w # ws
\<lbrakk>w \<in> V; set (ws @ us) \<subseteq> V; w \<notin> RSpan (ws @ us); R_lin_independent (ws @ us)\<rbrakk> \<Longrightarrow> R_lin_independent (w # ws @ us)

goal (1 subgoal):
 1. set (vs @ us) \<subseteq> V &&& R_lin_independent (vs @ us) &&& length vs = Suc m
[PROOF STEP]
by    auto
[PROOF STATE]
proof (state)
this:
set (vs @ us) \<subseteq> V
R_lin_independent (vs @ us)
length vs = Suc m

goal (1 subgoal):
 1. V \<noteq> RSpan (ws @ us) \<Longrightarrow> \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
set (vs @ us) \<subseteq> V
R_lin_independent (vs @ us)
length vs = Suc m

goal (1 subgoal):
 1. \<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>ws. set ws \<subseteq> V \<and> R_lin_independent (ws @ us) \<and> (RSpan (ws @ us) = V \<or> length ws = Suc m)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fds_shift_divide [simp]:
  "fds_shift (a :: 'a :: {field, nat_power}) (f / g) = fds_shift a f / fds_shift a g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_shift a (f / g) = fds_shift a f / fds_shift a g
[PROOF STEP]
by (simp add: divide_fds_def)