[STATEMENT]
theorem open_mapping_thm:
  assumes holf: "f holomorphic_on S"
      and S: "open S" and "connected S"
      and "open U" and "U \<subseteq> S"
      and fne: "\<not> f constant_on S"
    shows "open (f ` U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
have *: "open (f ` U)"
          if "U \<noteq> {}" and U: "open U" "connected U" and "f holomorphic_on U" and fneU: "\<And>x. \<exists>y \<in> U. f y \<noteq> x"
          for U
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
proof (clarsimp simp: open_contains_ball)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> U \<Longrightarrow> \<exists>e>0. ball (f x) e \<subseteq> f ` U
[PROOF STEP]
fix \<xi>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> U \<Longrightarrow> \<exists>e>0. ball (f x) e \<subseteq> f ` U
[PROOF STEP]
assume \<xi>: "\<xi> \<in> U"
[PROOF STATE]
proof (state)
this:
\<xi> \<in> U

goal (1 subgoal):
 1. \<And>x. x \<in> U \<Longrightarrow> \<exists>e>0. ball (f x) e \<subseteq> f ` U
[PROOF STEP]
show "\<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
have hol: "(\<lambda>z. f z - f \<xi>) holomorphic_on U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. f z - f \<xi>) holomorphic_on U
[PROOF STEP]
by (rule holomorphic_intros that)+
[PROOF STATE]
proof (state)
this:
(\<lambda>z. f z - f \<xi>) holomorphic_on U

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
obtain s where "0 < s" and sbU: "ball \<xi> s \<subseteq> U"
                 and sne: "\<And>z. z \<in> ball \<xi> s - {\<xi>} \<Longrightarrow> (\<lambda>z. f z - f \<xi>) z \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s. \<lbrakk>0 < s; ball \<xi> s \<subseteq> U; \<And>z. z \<in> ball \<xi> s - {\<xi>} \<Longrightarrow> f z - f \<xi> \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using isolated_zeros [OF hol U \<xi>]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f \<xi> - f \<xi> = 0; ?\<beta> \<in> U; f ?\<beta> - f \<xi> \<noteq> 0; \<And>r. \<lbrakk>0 < r; ball \<xi> r \<subseteq> U; \<And>z. z \<in> ball \<xi> r - {\<xi>} \<Longrightarrow> f z - f \<xi> \<noteq> 0\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>0 < s; ball \<xi> s \<subseteq> U; \<And>z. z \<in> ball \<xi> s - {\<xi>} \<Longrightarrow> f z - f \<xi> \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis fneU right_minus_eq)
[PROOF STATE]
proof (state)
this:
0 < s
ball \<xi> s \<subseteq> U
?z \<in> ball \<xi> s - {\<xi>} \<Longrightarrow> f ?z - f \<xi> \<noteq> 0

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
obtain r where "0 < r" and r: "cball \<xi> r \<subseteq> ball \<xi> s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r. \<lbrakk>0 < r; cball \<xi> r \<subseteq> ball \<xi> s\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>0 < s\<close>
[PROOF STATE]
proof (prove)
using this:
0 < s

goal (1 subgoal):
 1. (\<And>r. \<lbrakk>0 < r; cball \<xi> r \<subseteq> ball \<xi> s\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule_tac r="s/2" in that) auto
[PROOF STATE]
proof (state)
this:
0 < r
cball \<xi> r \<subseteq> ball \<xi> s

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
have "cball \<xi> r \<subseteq> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cball \<xi> r \<subseteq> U
[PROOF STEP]
using sbU r
[PROOF STATE]
proof (prove)
using this:
ball \<xi> s \<subseteq> U
cball \<xi> r \<subseteq> ball \<xi> s

goal (1 subgoal):
 1. cball \<xi> r \<subseteq> U
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
cball \<xi> r \<subseteq> U

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cball \<xi> r \<subseteq> U
[PROOF STEP]
have frsbU: "frontier (cball \<xi> r) \<subseteq> U"
[PROOF STATE]
proof (prove)
using this:
cball \<xi> r \<subseteq> U

goal (1 subgoal):
 1. frontier (cball \<xi> r) \<subseteq> U
[PROOF STEP]
using Diff_subset frontier_def order_trans
[PROOF STATE]
proof (prove)
using this:
cball \<xi> r \<subseteq> U
?A - ?B \<subseteq> ?A
frontier ?S = closure ?S - interior ?S
\<lbrakk>?x \<le> ?y; ?y \<le> ?z\<rbrakk> \<Longrightarrow> ?x \<le> ?z

goal (1 subgoal):
 1. frontier (cball \<xi> r) \<subseteq> U
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
frontier (cball \<xi> r) \<subseteq> U

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
frontier (cball \<xi> r) \<subseteq> U
[PROOF STEP]
have cof: "compact (frontier(cball \<xi> r))"
[PROOF STATE]
proof (prove)
using this:
frontier (cball \<xi> r) \<subseteq> U

goal (1 subgoal):
 1. compact (frontier (cball \<xi> r))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
compact (frontier (cball \<xi> r))

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
have frne: "frontier (cball \<xi> r) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frontier (cball \<xi> r) \<noteq> {}
[PROOF STEP]
using \<open>0 < r\<close>
[PROOF STATE]
proof (prove)
using this:
0 < r

goal (1 subgoal):
 1. frontier (cball \<xi> r) \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
frontier (cball \<xi> r) \<noteq> {}

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
have contfr: "continuous_on (frontier (cball \<xi> r)) (\<lambda>z. norm (f z - f \<xi>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (frontier (cball \<xi> r)) (\<lambda>z. cmod (f z - f \<xi>))
[PROOF STEP]
by (metis continuous_on_norm continuous_on_subset frsbU hol holomorphic_on_imp_continuous_on)
[PROOF STATE]
proof (state)
this:
continuous_on (frontier (cball \<xi> r)) (\<lambda>z. cmod (f z - f \<xi>))

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
obtain w where "norm (\<xi> - w) = r"
                 and w: "(\<And>z. norm (\<xi> - z) = r \<Longrightarrow> norm (f w - f \<xi>) \<le> norm(f z - f \<xi>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>w. \<lbrakk>cmod (\<xi> - w) = r; \<And>z. cmod (\<xi> - z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f z - f \<xi>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using continuous_attains_inf [OF cof frne contfr]
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>frontier (cball \<xi> r). \<forall>y\<in>frontier (cball \<xi> r). cmod (f x - f \<xi>) \<le> cmod (f y - f \<xi>)

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>cmod (\<xi> - w) = r; \<And>z. cmod (\<xi> - z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f z - f \<xi>)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: dist_norm)
[PROOF STATE]
proof (state)
this:
cmod (\<xi> - w) = r
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f ?z - f \<xi>)

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
cmod (\<xi> - w) = r
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f ?z - f \<xi>)

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
define \<epsilon> where "\<epsilon> \<equiv> norm (f w - f \<xi>) / 3"
[PROOF STATE]
proof (state)
this:
\<epsilon> \<equiv> cmod (f w - f \<xi>) / 3

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
cmod (\<xi> - w) = r
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f ?z - f \<xi>)
\<epsilon> \<equiv> cmod (f w - f \<xi>) / 3
[PROOF STEP]
have "0 < \<epsilon>"
[PROOF STATE]
proof (prove)
using this:
cmod (\<xi> - w) = r
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f ?z - f \<xi>)
\<epsilon> \<equiv> cmod (f w - f \<xi>) / 3

goal (1 subgoal):
 1. 0 < \<epsilon>
[PROOF STEP]
using \<open>0 < r\<close> dist_complex_def r sne
[PROOF STATE]
proof (prove)
using this:
cmod (\<xi> - w) = r
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (f w - f \<xi>) \<le> cmod (f ?z - f \<xi>)
\<epsilon> \<equiv> cmod (f w - f \<xi>) / 3
0 < r
dist ?x ?y = cmod (?x - ?y)
cball \<xi> r \<subseteq> ball \<xi> s
?z \<in> ball \<xi> s - {\<xi>} \<Longrightarrow> f ?z - f \<xi> \<noteq> 0

goal (1 subgoal):
 1. 0 < \<epsilon>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < \<epsilon>

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
have "ball (f \<xi>) \<epsilon> \<subseteq> f ` U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ball (f \<xi>) \<epsilon> \<subseteq> f ` U
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
fix \<gamma>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
assume \<gamma>: "\<gamma> \<in> ball (f \<xi>) \<epsilon>"
[PROOF STATE]
proof (state)
this:
\<gamma> \<in> ball (f \<xi>) \<epsilon>

goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
have *: "cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f z)" if "cmod (\<xi> - z) = r" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f z)
[PROOF STEP]
have lt: "cmod (f w - f \<xi>) / 3 < cmod (\<gamma> - f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (f w - f \<xi>) / 3 < cmod (\<gamma> - f z)
[PROOF STEP]
using w [OF that] \<gamma>
[PROOF STATE]
proof (prove)
using this:
cmod (f w - f \<xi>) \<le> cmod (f z - f \<xi>)
\<gamma> \<in> ball (f \<xi>) \<epsilon>

goal (1 subgoal):
 1. cmod (f w - f \<xi>) / 3 < cmod (\<gamma> - f z)
[PROOF STEP]
using dist_triangle2 [of "f \<xi>" "\<gamma>"  "f z"] dist_triangle2 [of "f \<xi>" "f z" \<gamma>]
[PROOF STATE]
proof (prove)
using this:
cmod (f w - f \<xi>) \<le> cmod (f z - f \<xi>)
\<gamma> \<in> ball (f \<xi>) \<epsilon>
dist (f \<xi>) \<gamma> \<le> dist (f \<xi>) (f z) + dist \<gamma> (f z)
dist (f \<xi>) (f z) \<le> dist (f \<xi>) \<gamma> + dist (f z) \<gamma>

goal (1 subgoal):
 1. cmod (f w - f \<xi>) / 3 < cmod (\<gamma> - f z)
[PROOF STEP]
by (simp add: \<epsilon>_def dist_norm norm_minus_commute)
[PROOF STATE]
proof (state)
this:
cmod (f w - f \<xi>) / 3 < cmod (\<gamma> - f z)

goal (1 subgoal):
 1. cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f z)
[PROOF STEP]
by (metis \<epsilon>_def dist_commute dist_norm less_trans lt mem_ball \<gamma>)
[PROOF STATE]
proof (state)
this:
cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f ?z)

goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
have "continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)
[PROOF STEP]
using \<open>cball \<xi> r \<subseteq> U\<close> \<open>f holomorphic_on U\<close>
[PROOF STATE]
proof (prove)
using this:
cball \<xi> r \<subseteq> U
f holomorphic_on U

goal (1 subgoal):
 1. continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)
[PROOF STEP]
by (force intro: continuous_intros continuous_on_subset holomorphic_on_imp_continuous_on)
[PROOF STATE]
proof (state)
this:
continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)

goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)

goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
have "(\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r
[PROOF STEP]
using \<open>cball \<xi> r \<subseteq> U\<close> ball_subset_cball holomorphic_on_subset that(4)
[PROOF STATE]
proof (prove)
using this:
cball \<xi> r \<subseteq> U
ball ?x ?e \<subseteq> cball ?x ?e
\<lbrakk>?f holomorphic_on ?s; ?t \<subseteq> ?s\<rbrakk> \<Longrightarrow> ?f holomorphic_on ?t
f holomorphic_on U

goal (1 subgoal):
 1. (\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r
[PROOF STEP]
by (intro holomorphic_intros) blast
[PROOF STATE]
proof (state)
this:
(\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r

goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)
(\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r
[PROOF STEP]
obtain z where "z \<in> ball \<xi> r" "\<gamma> - f z = 0"
[PROOF STATE]
proof (prove)
using this:
continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)
(\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> ball \<xi> r; \<gamma> - f z = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using "*" \<open>0 < r\<close> holomorphic_contract_to_zero
[PROOF STATE]
proof (prove)
using this:
continuous_on (cball \<xi> r) (\<lambda>z. \<gamma> - f z)
(\<lambda>z. \<gamma> - f z) holomorphic_on ball \<xi> r
cmod (\<xi> - ?z) = r \<Longrightarrow> cmod (\<gamma> - f \<xi>) < cmod (\<gamma> - f ?z)
0 < r
\<lbrakk>continuous_on (cball ?\<xi> ?r) ?f; ?f holomorphic_on ball ?\<xi> ?r; 0 < ?r; \<And>z. cmod (?\<xi> - z) = ?r \<Longrightarrow> cmod (?f ?\<xi>) < cmod (?f z); \<And>z. \<lbrakk>z \<in> ball ?\<xi> ?r; ?f z = 0\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> ball \<xi> r; \<gamma> - f z = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z \<in> ball \<xi> r
\<gamma> - f z = 0

goal (1 subgoal):
 1. \<And>x. x \<in> ball (f \<xi>) \<epsilon> \<Longrightarrow> x \<in> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> ball \<xi> r
\<gamma> - f z = 0
[PROOF STEP]
show "\<gamma> \<in> f ` U"
[PROOF STATE]
proof (prove)
using this:
z \<in> ball \<xi> r
\<gamma> - f z = 0

goal (1 subgoal):
 1. \<gamma> \<in> f ` U
[PROOF STEP]
using \<open>cball \<xi> r \<subseteq> U\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> ball \<xi> r
\<gamma> - f z = 0
cball \<xi> r \<subseteq> U

goal (1 subgoal):
 1. \<gamma> \<in> f ` U
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<gamma> \<in> f ` U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ball (f \<xi>) \<epsilon> \<subseteq> f ` U

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ball (f \<xi>) \<epsilon> \<subseteq> f ` U
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ball (f \<xi>) \<epsilon> \<subseteq> f ` U

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
using  \<open>0 < \<epsilon>\<close>
[PROOF STATE]
proof (prove)
using this:
ball (f \<xi>) \<epsilon> \<subseteq> f ` U
0 < \<epsilon>

goal (1 subgoal):
 1. \<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>e>0. ball (f \<xi>) e \<subseteq> f ` U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?U \<noteq> {}; open ?U; connected ?U; f holomorphic_on ?U; \<And>x. \<exists>y\<in>?U. f y \<noteq> x\<rbrakk> \<Longrightarrow> open (f ` ?U)

goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
have "open (f ` X)" if "X \<in> components U" for X
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
have holfU: "f holomorphic_on U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f holomorphic_on U
[PROOF STEP]
using \<open>U \<subseteq> S\<close> holf holomorphic_on_subset
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> S
f holomorphic_on S
\<lbrakk>?f holomorphic_on ?s; ?t \<subseteq> ?s\<rbrakk> \<Longrightarrow> ?f holomorphic_on ?t

goal (1 subgoal):
 1. f holomorphic_on U
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f holomorphic_on U

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
have "X \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<noteq> {}
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
X \<in> components U

goal (1 subgoal):
 1. X \<noteq> {}
[PROOF STEP]
by (simp add: in_components_nonempty)
[PROOF STATE]
proof (state)
this:
X \<noteq> {}

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
X \<noteq> {}

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
have "open X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open X
[PROOF STEP]
using that \<open>open U\<close> open_components
[PROOF STATE]
proof (prove)
using this:
X \<in> components U
open U
\<lbrakk>open ?u; ?S \<in> components ?u\<rbrakk> \<Longrightarrow> open ?S

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

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
open X

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
have "connected X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected X
[PROOF STEP]
using that in_components_maximal
[PROOF STATE]
proof (prove)
using this:
X \<in> components U
(?c \<in> components ?s) = (?c \<noteq> {} \<and> ?c \<subseteq> ?s \<and> connected ?c \<and> (\<forall>d. d \<noteq> {} \<and> ?c \<subseteq> d \<and> d \<subseteq> ?s \<and> connected d \<longrightarrow> d = ?c))

goal (1 subgoal):
 1. connected X
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
connected X

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
connected X

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
have "f holomorphic_on X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f holomorphic_on X
[PROOF STEP]
by (meson that holfU holomorphic_on_subset in_components_maximal)
[PROOF STATE]
proof (state)
this:
f holomorphic_on X

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f holomorphic_on X

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
have "\<exists>y\<in>X. f y \<noteq> x" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y\<in>X. f y \<noteq> x
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<exists>y\<in>X. f y \<noteq> x) \<Longrightarrow> False
[PROOF STEP]
assume not: "\<not> (\<exists>y\<in>X. f y \<noteq> x)"
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>y\<in>X. f y \<noteq> x)

goal (1 subgoal):
 1. \<not> (\<exists>y\<in>X. f y \<noteq> x) \<Longrightarrow> False
[PROOF STEP]
have "X \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<subseteq> S
[PROOF STEP]
using \<open>U \<subseteq> S\<close> in_components_subset that
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> S
?c \<in> components ?s \<Longrightarrow> ?c \<subseteq> ?s
X \<in> components U

goal (1 subgoal):
 1. X \<subseteq> S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
X \<subseteq> S

goal (1 subgoal):
 1. \<not> (\<exists>y\<in>X. f y \<noteq> x) \<Longrightarrow> False
[PROOF STEP]
obtain w where w: "w \<in> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>w. w \<in> X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>X \<noteq> {}\<close>
[PROOF STATE]
proof (prove)
using this:
X \<noteq> {}

goal (1 subgoal):
 1. (\<And>w. w \<in> X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
w \<in> X

goal (1 subgoal):
 1. \<not> (\<exists>y\<in>X. f y \<noteq> x) \<Longrightarrow> False
[PROOF STEP]
have wis: "w islimpt X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w islimpt X
[PROOF STEP]
using w \<open>open X\<close> interior_eq
[PROOF STATE]
proof (prove)
using this:
w \<in> X
open X
(interior ?S = ?S) = open ?S

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

goal (1 subgoal):
 1. \<not> (\<exists>y\<in>X. f y \<noteq> x) \<Longrightarrow> False
[PROOF STEP]
have hol: "(\<lambda>z. f z - x) holomorphic_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. f z - x) holomorphic_on S
[PROOF STEP]
by (simp add: holf holomorphic_on_diff)
[PROOF STATE]
proof (state)
this:
(\<lambda>z. f z - x) holomorphic_on S

goal (1 subgoal):
 1. \<not> (\<exists>y\<in>X. f y \<noteq> x) \<Longrightarrow> False
[PROOF STEP]
with fne [unfolded constant_on_def]
           analytic_continuation[OF hol S \<open>connected S\<close> \<open>X \<subseteq> S\<close> _ wis] not \<open>X \<subseteq> S\<close> w
[PROOF STATE]
proof (chain)
picking this:
\<nexists>y. \<forall>x\<in>S. f x = y
\<lbrakk>w \<in> S; \<And>z. z \<in> X \<Longrightarrow> f z - x = 0; ?w \<in> S\<rbrakk> \<Longrightarrow> f ?w - x = 0
\<not> (\<exists>y\<in>X. f y \<noteq> x)
X \<subseteq> S
w \<in> X
(\<lambda>z. f z - x) holomorphic_on S
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<nexists>y. \<forall>x\<in>S. f x = y
\<lbrakk>w \<in> S; \<And>z. z \<in> X \<Longrightarrow> f z - x = 0; ?w \<in> S\<rbrakk> \<Longrightarrow> f ?w - x = 0
\<not> (\<exists>y\<in>X. f y \<noteq> x)
X \<subseteq> S
w \<in> X
(\<lambda>z. f z - x) holomorphic_on S

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:
\<exists>y\<in>X. f y \<noteq> ?x

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
X \<noteq> {}
open X
connected X
f holomorphic_on X
\<exists>y\<in>X. f y \<noteq> ?x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
X \<noteq> {}
open X
connected X
f holomorphic_on X
\<exists>y\<in>X. f y \<noteq> ?x

goal (1 subgoal):
 1. open (f ` X)
[PROOF STEP]
by (rule *)
[PROOF STATE]
proof (state)
this:
open (f ` X)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?X \<in> components U \<Longrightarrow> open (f ` ?X)

goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?X \<in> components U \<Longrightarrow> open (f ` ?X)
[PROOF STEP]
have "open (f ` \<Union>(components U))"
[PROOF STATE]
proof (prove)
using this:
?X \<in> components U \<Longrightarrow> open (f ` ?X)

goal (1 subgoal):
 1. open (f ` \<Union> (components U))
[PROOF STEP]
by (metis (no_types, lifting) imageE image_Union open_Union)
[PROOF STATE]
proof (state)
this:
open (f ` \<Union> (components U))

goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
open (f ` \<Union> (components U))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
open (f ` \<Union> (components U))

goal (1 subgoal):
 1. open (f ` U)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
open (f ` U)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in comm_group) generate_eq_finprod_Pi_image:
  assumes "finite gs" "gs \<subseteq> carrier G"
  shows "generate G gs = (\<lambda>x. finprod G x gs) ` Pi gs (\<lambda>a. generate G {a})" (is "?g = ?fp")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
have "(\<lambda>x. finprod G x gs) ` Pi\<^sub>E gs (\<lambda>a. generate G {a})
      = (\<lambda>x. finprod G x gs) ` Pi gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
 2. (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
have "Pi\<^sub>E gs (\<lambda>a. generate G {a}) \<subseteq> Pi gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<Pi> a\<in>gs. generate G {a})

goal (2 subgoals):
 1. (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
 2. (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
thus "(\<lambda>x. finprod G x gs) ` Pi\<^sub>E gs (\<lambda>a. generate G {a})
        \<subseteq> (\<lambda>x. finprod G x gs) ` Pi gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
using this:
(\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
show "(\<lambda>x. finprod G x gs) ` Pi gs (\<lambda>a. generate G {a})
        \<subseteq> (\<lambda>x. finprod G x gs) ` Pi\<^sub>E gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
assume x: "x \<in> (\<lambda>x. finprod G x gs) ` Pi gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
obtain f where f: "x = finprod G f gs" "f \<in> Pi gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
using this:
x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>x = finprod G f gs; f \<in> (\<Pi> a\<in>gs. generate G {a})\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x = finprod G f gs
f \<in> (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x = finprod G f gs
f \<in> (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
have "finprod G f gs = finprod G (restrict f gs) gs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finprod G f gs = finprod G (restrict f gs) gs
[PROOF STEP]
proof(intro finprod_cong)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. gs = gs
 2. (f \<in> gs \<rightarrow> carrier G) = True
 3. \<And>i. i \<in> gs =simp=> f i = restrict f gs i
[PROOF STEP]
have "f g \<in> carrier G" if "g \<in> gs" for g
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f g \<in> carrier G
[PROOF STEP]
using that f(2) mono_generate[of "{g}" gs] generate_incl[OF assms(2)]
[PROOF STATE]
proof (prove)
using this:
g \<in> gs
f \<in> (\<Pi> a\<in>gs. generate G {a})
{g} \<subseteq> gs \<Longrightarrow> generate G {g} \<subseteq> generate G gs
generate G gs \<subseteq> carrier G

goal (1 subgoal):
 1. f g \<in> carrier G
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
?g2 \<in> gs \<Longrightarrow> f ?g2 \<in> carrier G

goal (3 subgoals):
 1. gs = gs
 2. (f \<in> gs \<rightarrow> carrier G) = True
 3. \<And>i. i \<in> gs =simp=> f i = restrict f gs i
[PROOF STEP]
thus "(f \<in> gs \<rightarrow> carrier G) = True"
[PROOF STATE]
proof (prove)
using this:
?g2 \<in> gs \<Longrightarrow> f ?g2 \<in> carrier G

goal (1 subgoal):
 1. (f \<in> gs \<rightarrow> carrier G) = True
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(f \<in> gs \<rightarrow> carrier G) = True

goal (2 subgoals):
 1. gs = gs
 2. \<And>i. i \<in> gs =simp=> f i = restrict f gs i
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
finprod G f gs = finprod G (restrict f gs) gs

goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finprod G f gs = finprod G (restrict f gs) gs

goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
have "restrict f gs \<in> Pi\<^sub>E gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. restrict f gs \<in> (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
using f(2)
[PROOF STATE]
proof (prove)
using this:
f \<in> (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. restrict f gs \<in> (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
restrict f gs \<in> (\<Pi>\<^sub>E a\<in>gs. generate G {a})

goal (1 subgoal):
 1. \<And>x. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<Longrightarrow> x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x = finprod G f gs
f \<in> (\<Pi> a\<in>gs. generate G {a})
finprod G f gs = finprod G (restrict f gs) gs
restrict f gs \<in> (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
show "x \<in> (\<lambda>x. finprod G x gs) ` Pi\<^sub>E gs (\<lambda>a. generate G {a})"
[PROOF STATE]
proof (prove)
using this:
x = finprod G f gs
f \<in> (\<Pi> a\<in>gs. generate G {a})
finprod G f gs = finprod G (restrict f gs) gs
restrict f gs \<in> (\<Pi>\<^sub>E a\<in>gs. generate G {a})

goal (1 subgoal):
 1. x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a}) \<subseteq> (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
with generate_eq_finprod_PiE_image[OF assms]
[PROOF STATE]
proof (chain)
picking this:
generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
(\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a})
(\<lambda>x. finprod G x gs) ` (\<Pi>\<^sub>E a\<in>gs. generate G {a}) = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})

goal (1 subgoal):
 1. generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
generate G gs = (\<lambda>x. finprod G x gs) ` (\<Pi> a\<in>gs. generate G {a})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tendsto_eventually: "eventually (\<lambda>x. f x = l) net \<Longrightarrow> ((\<lambda>x. f x) \<longlongrightarrow> l) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. f x = l \<Longrightarrow> (f \<longlongrightarrow> l) net
[PROOF STEP]
by (rule topological_tendstoI) (auto elim: eventually_mono)


[STATEMENT]
lemma negInf_convert :
  assumes "convert_atom_list var L (xs' @ x # xs) = Some L'"
  assumes "length xs' = var"
  shows "(\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))
         = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
convert_atom_list var L (xs' @ x # xs) = Some L'
length xs' = var

goal (1 subgoal):
 1. (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
proof(induction L arbitrary : L')
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>L'. \<lbrakk>convert_atom_list var [] (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set []. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>a L L'. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
convert_atom_list var [] (xs' @ x # xs) = Some L'
length xs' = var

goal (2 subgoals):
 1. \<And>L'. \<lbrakk>convert_atom_list var [] (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set []. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>a L L'. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
convert_atom_list var [] (xs' @ x # xs) = Some L'
length xs' = var
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
convert_atom_list var [] (xs' @ x # xs) = Some L'
length xs' = var

goal (1 subgoal):
 1. (\<forall>f\<in>set []. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>f\<in>set []. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)

goal (1 subgoal):
 1. \<And>a L L'. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a L L'. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
case (Cons a L)
[PROOF STATE]
proof (state)
this:
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)
convert_atom_list var (a # L) (xs' @ x # xs) = Some L'
length xs' = var

goal (1 subgoal):
 1. \<And>a L L'. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)
convert_atom_list var (a # L) (xs' @ x # xs) = Some L'
length xs' = var
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)
convert_atom_list var (a # L) (xs' @ x # xs) = Some L'
length xs' = var

goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
proof(cases a)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x1. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Less x1\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 4. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
case (Less p)
[PROOF STATE]
proof (state)
this:
a = Less p

goal (4 subgoals):
 1. \<And>x1. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Less x1\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 4. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
have h:  "MPoly_Type.degree p var < 3 \<Longrightarrow>
          eval (substNegInfinity var (Less p)) (xs' @ x # xs) = evalUni
           (substNegInfinityUni
             (LessUni
               (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0))))
           x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Less p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
using convert_substNegInfinity[of var "Less p" xs' x xs, OF _ assms(2)]
[PROOF STATE]
proof (prove)
using this:
convert_atom var (Less p) (xs' @ x # xs) = Some ?A' \<Longrightarrow> eval (substNegInfinity var (Less p)) (xs' @ x # xs) = evalUni (substNegInfinityUni ?A') x

goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Less p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Less p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x

goal (4 subgoals):
 1. \<And>x1. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Less x1\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 4. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using Cons(2)[symmetric] Cons(1)
[PROOF STATE]
proof (prove)
using this:
Some L' = convert_atom_list var (a # L) (xs' @ x # xs)
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)

goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
unfolding Less
[PROOF STATE]
proof (prove)
using this:
Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs)
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)

goal (1 subgoal):
 1. (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases " MPoly_Type.degree p var < 3")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
defer
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases "convert_atom_list var L (xs' @ x # xs)")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = None\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>a. \<lbrakk>Some L' = convert_atom_list var (Less p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Less p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply (simp_all del: substNegInfinity.simps substNegInfinityUni.simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>L' = LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a; length xs' = var \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (eval (substNegInfinity var (Less p)) (xs' @ x # xs) \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x))
[PROOF STEP]
unfolding h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>L' = LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a; length xs' = var \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x))
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
length xs' = var

goal (1 subgoal):
 1. \<And>a. \<lbrakk>L' = LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a; length xs' = var \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (evalUni (substNegInfinityUni (LessUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x))
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
(\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)

goal (3 subgoals):
 1. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
case (Eq p)
[PROOF STATE]
proof (state)
this:
a = Eq p

goal (3 subgoals):
 1. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
have h:  "MPoly_Type.degree p var < 3 \<Longrightarrow>
          eval (substNegInfinity var (Eq p)) (xs' @ x # xs) = evalUni
           (substNegInfinityUni
             (EqUni
               (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0))))
           x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Eq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
using convert_substNegInfinity[of var "Eq p", OF _ assms(2)]
[PROOF STATE]
proof (prove)
using this:
convert_atom var (Eq p) (xs' @ ?x # ?xs) = Some ?A' \<Longrightarrow> eval (substNegInfinity var (Eq p)) (xs' @ ?x # ?xs) = evalUni (substNegInfinityUni ?A') ?x

goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Eq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Eq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x

goal (3 subgoals):
 1. \<And>x2. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Eq x2\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 3. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using Cons(2)[symmetric] Cons(1)
[PROOF STATE]
proof (prove)
using this:
Some L' = convert_atom_list var (a # L) (xs' @ x # xs)
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)

goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
unfolding Eq
[PROOF STATE]
proof (prove)
using this:
Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs)
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)

goal (1 subgoal):
 1. (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases " MPoly_Type.degree p var < 3")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
defer
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases "convert_atom_list var L (xs' @ x # xs)")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = None\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>a. \<lbrakk>Some L' = convert_atom_list var (Eq p # L) (xs' @ x # xs); \<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Eq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply (simp_all del: substNegInfinity.simps substNegInfinityUni.simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>L' = EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a; length xs' = var \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (eval (substNegInfinity var (Eq p)) (xs' @ x # xs) \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (evalUni (substNegInfinityUni (EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x))
[PROOF STEP]
unfolding h assms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>L' = EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a; var = var \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x); MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (evalUni (substNegInfinityUni (EqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set a. evalUni (substNegInfinityUni f) x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)

goal (2 subgoals):
 1. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
case (Leq p)
[PROOF STATE]
proof (state)
this:
a = Leq p

goal (2 subgoals):
 1. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
have h:  "MPoly_Type.degree p var < 3 \<Longrightarrow>
          eval (substNegInfinity var (Leq p)) (xs' @ x # xs) = evalUni
           (substNegInfinityUni
             (LeqUni
               (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0))))
           x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Leq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
using convert_substNegInfinity[of var "Leq p", OF _ assms(2)]
[PROOF STATE]
proof (prove)
using this:
convert_atom var (Leq p) (xs' @ ?x # ?xs) = Some ?A' \<Longrightarrow> eval (substNegInfinity var (Leq p)) (xs' @ ?x # ?xs) = evalUni (substNegInfinityUni ?A') ?x

goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Leq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Leq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x

goal (2 subgoals):
 1. \<And>x3. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Leq x3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using Cons(2)
[PROOF STATE]
proof (prove)
using this:
convert_atom_list var (a # L) (xs' @ x # xs) = Some L'

goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
unfolding Leq
[PROOF STATE]
proof (prove)
using this:
convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'

goal (1 subgoal):
 1. (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases " MPoly_Type.degree p var < 3")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
defer
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases "convert_atom_list var L (xs' @ x # xs)")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = None\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>a. \<lbrakk>convert_atom_list var (Leq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Leq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply (simp_all del: substNegInfinity.simps substNegInfinityUni.simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a = L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (eval (substNegInfinity var (Leq p)) (xs' @ x # xs) \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
unfolding h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a = L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using Cons.IH assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)
convert_atom_list var L (xs' @ x # xs) = Some L'
length xs' = var

goal (1 subgoal):
 1. \<And>a. \<lbrakk>LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a = L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (LeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)

goal (1 subgoal):
 1. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
case (Neq p)
[PROOF STATE]
proof (state)
this:
a = Neq p

goal (1 subgoal):
 1. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
have h:  "MPoly_Type.degree p var < 3 \<Longrightarrow>
          eval (substNegInfinity var (Neq p)) (xs' @ x # xs) = evalUni
           (substNegInfinityUni
             (NeqUni
               (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)),
                insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0))))
           x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Neq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
using convert_substNegInfinity[of var "Neq p", OF _ assms(2)]
[PROOF STATE]
proof (prove)
using this:
convert_atom var (Neq p) (xs' @ ?x # ?xs) = Some ?A' \<Longrightarrow> eval (substNegInfinity var (Neq p)) (xs' @ ?x # ?xs) = evalUni (substNegInfinityUni ?A') ?x

goal (1 subgoal):
 1. MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Neq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
MPoly_Type.degree p var < 3 \<Longrightarrow> eval (substNegInfinity var (Neq p)) (xs' @ x # xs) = evalUni (substNegInfinityUni (NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x

goal (1 subgoal):
 1. \<And>x4. \<lbrakk>\<And>L'. \<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x); convert_atom_list var (a # L) (xs' @ x # xs) = Some L'; length xs' = var; a = Neq x4\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using Cons(2)
[PROOF STATE]
proof (prove)
using this:
convert_atom_list var (a # L) (xs' @ x # xs) = Some L'

goal (1 subgoal):
 1. (\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
unfolding Neq
[PROOF STATE]
proof (prove)
using this:
convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'

goal (1 subgoal):
 1. (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases " MPoly_Type.degree p var < 3")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
defer
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; \<not> MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply(cases "convert_atom_list var L (xs' @ x # xs)")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = None\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
 2. \<And>a. \<lbrakk>convert_atom_list var (Neq p # L) (xs' @ x # xs) = Some L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set (Neq p # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
apply (simp_all del: substNegInfinity.simps substNegInfinityUni.simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a = L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (eval (substNegInfinity var (Neq p)) (xs' @ x # xs) \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
unfolding h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a = L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
using Cons.IH assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>convert_atom_list var L (xs' @ x # xs) = Some ?L'; length xs' = var\<rbrakk> \<Longrightarrow> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set ?L'. evalUni (substNegInfinityUni f) x)
convert_atom_list var L (xs' @ x # xs) = Some L'
length xs' = var

goal (1 subgoal):
 1. \<And>a. \<lbrakk>NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)) # a = L'; MPoly_Type.degree p var < 3; convert_atom_list var L (xs' @ x # xs) = Some a\<rbrakk> \<Longrightarrow> (evalUni (substNegInfinityUni (NeqUni (insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 2), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var (Suc 0)), insertion (nth_default 0 (xs' @ x # xs)) (isolate_variable_sparse p var 0)))) x \<and> (\<forall>f\<in>set L. eval (substNegInfinity var f) (xs' @ x # xs))) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>f\<in>set (a # L). eval (substNegInfinity var f) (xs' @ x # xs)) = (\<forall>f\<in>set L'. evalUni (substNegInfinityUni f) x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_mult_one:
  assumes "subring K R" "polynomial K p"
  shows "poly_mult [ \<one> ] p = p" and "poly_mult p [ \<one> ] = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_mult [\<one>] p = p &&& poly_mult p [\<one>] = p
[PROOF STEP]
using poly_mult_one'[OF polynomial_in_carrier[OF assms]] normalize_polynomial[OF assms(2)]
[PROOF STATE]
proof (prove)
using this:
poly_mult [\<one>] p = local.normalize p
poly_mult p [\<one>] = local.normalize p
local.normalize p = p

goal (1 subgoal):
 1. poly_mult [\<one>] p = p &&& poly_mult p [\<one>] = p
[PROOF STEP]
by auto


[STATEMENT]
lemma factored_char_poly_norm_bound_cof: assumes A: "A \<in> carrier_mat n n"
  and linear_factors: "char_poly A = (\<Prod> (a :: 'a :: {conjugatable_ordered_field, real_normed_field}) \<leftarrow> as. [:- a, 1:])"
  and le_1: "\<And> a. a \<in> set as \<Longrightarrow> norm a \<le> 1"
  and le_N: "\<And> a. a \<in> set as \<Longrightarrow> norm a = 1 \<Longrightarrow> length (filter ((=) a) as) \<le> N"
  shows "\<exists> c1 c2. \<forall> k. norm_bound (A ^\<^sub>m k) (c1 + c2 * of_nat k ^ (N - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>c1 c2. \<forall>k. norm_bound (A ^\<^sub>m k) (c1 + c2 * real k ^ (N - 1))
[PROOF STEP]
by (rule factored_char_poly_norm_bound[OF A linear_factors jordan_nf_exists[OF A linear_factors] le_1 le_N])