[STATEMENT]
lemma path_lverts_list_merge_supset_xs_notin:
  "\<forall>v \<in> fst ` set ys. a \<notin> set v
    \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs ys) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>v\<in>fst ` set ys. a \<notin> set v \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs ys) a
[PROOF STEP]
proof(induction xs ys taking: cmp rule: Sorting_Algorithms.merge.induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>ys. \<forall>v\<in>fst ` set ys. a \<notin> set v \<Longrightarrow> path_lverts_list [] a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp [] ys) a
 2. \<And>xs. \<forall>v\<in>fst ` set []. a \<notin> set v \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs []) a
 3. \<And>x xs y ys. \<lbrakk>\<lbrakk>compare cmp x y = Greater; \<forall>v\<in>fst ` set ys. a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) ys) a; \<lbrakk>compare cmp x y \<noteq> Greater; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs (y # ys)) a; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a
[PROOF STEP]
case (3 x xs y ys)
[PROOF STATE]
proof (state)
this:
\<lbrakk>compare cmp x y = Greater; \<forall>v\<in>fst ` set ys. a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) ys) a
\<lbrakk>compare cmp x y \<noteq> Greater; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs (y # ys)) a
\<forall>v\<in>fst ` set (y # ys). a \<notin> set v

goal (3 subgoals):
 1. \<And>ys. \<forall>v\<in>fst ` set ys. a \<notin> set v \<Longrightarrow> path_lverts_list [] a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp [] ys) a
 2. \<And>xs. \<forall>v\<in>fst ` set []. a \<notin> set v \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs []) a
 3. \<And>x xs y ys. \<lbrakk>\<lbrakk>compare cmp x y = Greater; \<forall>v\<in>fst ` set ys. a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) ys) a; \<lbrakk>compare cmp x y \<noteq> Greater; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs (y # ys)) a; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a
[PROOF STEP]
obtain v1 e1 where v1_def[simp]: "x = (v1,e1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v1 e1. x = (v1, e1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
x = (v1, e1)

goal (3 subgoals):
 1. \<And>ys. \<forall>v\<in>fst ` set ys. a \<notin> set v \<Longrightarrow> path_lverts_list [] a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp [] ys) a
 2. \<And>xs. \<forall>v\<in>fst ` set []. a \<notin> set v \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs []) a
 3. \<And>x xs y ys. \<lbrakk>\<lbrakk>compare cmp x y = Greater; \<forall>v\<in>fst ` set ys. a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) ys) a; \<lbrakk>compare cmp x y \<noteq> Greater; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs (y # ys)) a; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a
[PROOF STEP]
obtain v2 e2 where "y = (v2,e2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v2 e2. y = (v2, e2) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
y = (v2, e2)

goal (3 subgoals):
 1. \<And>ys. \<forall>v\<in>fst ` set ys. a \<notin> set v \<Longrightarrow> path_lverts_list [] a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp [] ys) a
 2. \<And>xs. \<forall>v\<in>fst ` set []. a \<notin> set v \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs []) a
 3. \<And>x xs y ys. \<lbrakk>\<lbrakk>compare cmp x y = Greater; \<forall>v\<in>fst ` set ys. a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) ys) a; \<lbrakk>compare cmp x y \<noteq> Greater; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs (y # ys)) a; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y = (v2, e2)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
y = (v2, e2)

goal (1 subgoal):
 1. path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a
[PROOF STEP]
using 3
[PROOF STATE]
proof (prove)
using this:
y = (v2, e2)
\<lbrakk>compare cmp x y = Greater; \<forall>v\<in>fst ` set ys. a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) ys) a
\<lbrakk>compare cmp x y \<noteq> Greater; \<forall>v\<in>fst ` set (y # ys). a \<notin> set v\<rbrakk> \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs (y # ys)) a
\<forall>v\<in>fst ` set (y # ys). a \<notin> set v

goal (1 subgoal):
 1. path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a
[PROOF STEP]
by (auto simp: path_lverts_list_def)
[PROOF STATE]
proof (state)
this:
path_lverts_list (x # xs) a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp (x # xs) (y # ys)) a

goal (2 subgoals):
 1. \<And>ys. \<forall>v\<in>fst ` set ys. a \<notin> set v \<Longrightarrow> path_lverts_list [] a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp [] ys) a
 2. \<And>xs. \<forall>v\<in>fst ` set []. a \<notin> set v \<Longrightarrow> path_lverts_list xs a \<subseteq> path_lverts_list (Sorting_Algorithms.merge cmp xs []) a
[PROOF STEP]
qed (auto simp: path_lverts_list_def)


[STATEMENT]
lemma poly_of_int_poly_1 [simp]: "poly (of_int_poly p) 1 = of_int (poly p 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (of_int_poly p) (1::'a) = of_int (poly p 1)
[PROOF STEP]
by (induction p) simp_all


[STATEMENT]
lemma game_ext_eq: "(G = H) = (left_options G = left_options H \<and> right_options G = right_options H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G = H) = (left_options G = left_options H \<and> right_options G = right_options H)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (G = H) = (left_options G = left_options H \<and> right_options G = right_options H)
[PROOF STEP]
have "(G = H) = (Game (left_options G) (right_options G) = Game (left_options H) (right_options H))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G = H) = (Game (left_options G) (right_options G) = Game (left_options H) (right_options H))
[PROOF STEP]
by (simp add: game_split[symmetric])
[PROOF STATE]
proof (state)
this:
(G = H) = (Game (left_options G) (right_options G) = Game (left_options H) (right_options H))

goal (1 subgoal):
 1. (G = H) = (left_options G = left_options H \<and> right_options G = right_options H)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(G = H) = (Game (left_options G) (right_options G) = Game (left_options H) (right_options H))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(G = H) = (Game (left_options G) (right_options G) = Game (left_options H) (right_options H))

goal (1 subgoal):
 1. (G = H) = (left_options G = left_options H \<and> right_options G = right_options H)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(G = H) = (left_options G = left_options H \<and> right_options G = right_options H)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_MkIde_elem_of_img:
    assumes "A \<subseteq> S.Univ" and "S.ide (S.MkIde (elem_of ` A))"
    shows "S.set (S.MkIde (elem_of ` A)) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
have "S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A

goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A

goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
have "arr_of ` elem_of ` A = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arr_of ` elem_of ` A = A
[PROOF STEP]
using assms arr_of_elem_of
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> S.Univ
S.ide (S.MkIde (elem_of ` A))
?t \<in> S.Univ \<Longrightarrow> arr_of (elem_of ?t) = ?t

goal (1 subgoal):
 1. arr_of ` elem_of ` A = A
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
arr_of ` elem_of ` A = A

goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A
arr_of ` elem_of ` A = A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A
arr_of ` elem_of ` A = A

goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
using assms Setp_elem_of_img set_char S.ide_MkIde
[PROOF STATE]
proof (prove)
using this:
S.Dom (S.MkIde (elem_of ` A)) = elem_of ` A
arr_of ` elem_of ` A = A
A \<subseteq> S.Univ
S.ide (S.MkIde (elem_of ` A))
?A \<in> S.set ` Collect S.ide \<Longrightarrow> Setp (elem_of ` ?A)
S.ide ?a \<Longrightarrow> S.set ?a = arr_of ` S.Dom ?a
?A \<in> Collect Setp \<Longrightarrow> S.ide (S.MkIde ?A)

goal (1 subgoal):
 1. S.set (S.MkIde (elem_of ` A)) = A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S.set (S.MkIde (elem_of ` A)) = A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma map_le_trans[trans]: "\<lbrakk> m1 \<subseteq>\<^sub>m m2; m2 \<subseteq>\<^sub>m m3\<rbrakk> \<Longrightarrow> m1 \<subseteq>\<^sub>m m3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>m1 \<subseteq>\<^sub>m m2; m2 \<subseteq>\<^sub>m m3\<rbrakk> \<Longrightarrow> m1 \<subseteq>\<^sub>m m3
[PROOF STEP]
by (auto simp add: map_le_def dom_def)


[STATEMENT]
lemma general_qe' :
  (* Direct substitution F(x) *)
  assumes "F = (\<lambda>x.
               (\<forall>(a,b,c)\<in>set eq . a*x\<^sup>2+b*x+c=0)\<and>
               (\<forall>(a,b,c)\<in>set les. a*x\<^sup>2+b*x+c<0)\<and>
               (\<forall>(a,b,c)\<in>set leq. a*x\<^sup>2+b*x+c\<le>0)\<and>
               (\<forall>(a,b,c)\<in>set neq. a*x\<^sup>2+b*x+c\<noteq>0))"
    (* Substitution of r+\<epsilon> into F *)
  assumes "F\<epsilon> = (\<lambda>r.
         (\<forall>(a,b,c)\<in>set eq.  \<exists>y>r.\<forall>x\<in>{r<..y}. a*x\<^sup>2+b*x+c=0) \<and>
         (\<forall>(a,b,c)\<in>set les. \<exists>y>r.\<forall>x\<in>{r<..y}. a*x\<^sup>2+b*x+c<0) \<and>
         (\<forall>(a,b,c)\<in>set leq. \<exists>y>r.\<forall>x\<in>{r<..y}. a*x\<^sup>2+b*x+c\<le>0) \<and>
         (\<forall>(a,b,c)\<in>set neq. \<exists>y>r.\<forall>x\<in>{r<..y}. a*x\<^sup>2+b*x+c\<noteq>0)
        )"
    (* Substitution of -\<infinity> into F *)
  assumes "F\<^sub>i\<^sub>n\<^sub>f = (
     (\<forall>(a,b,c)\<in>set eq.  \<exists>x. \<forall>y<x. a*y\<^sup>2+b*y+c=0) \<and>
     (\<forall>(a,b,c)\<in>set les. \<exists>x. \<forall>y<x. a*y\<^sup>2+b*y+c<0) \<and>
     (\<forall>(a,b,c)\<in>set leq. \<exists>x. \<forall>y<x. a*y\<^sup>2+b*y+c\<le>0) \<and>
     (\<forall>(a,b,c)\<in>set neq. \<exists>x. \<forall>y<x. a*y\<^sup>2+b*y+c\<noteq>0)
    )"
    (* finds linear or quadratic roots of a polynomial *)
  assumes "roots = (\<lambda>(a,b,c).
     if a=0 \<and> b\<noteq>0 then {-c/b}::real set else
     if a\<noteq>0 \<and> b\<^sup>2-4*a*c\<ge>0 then {(-b+sqrt(b\<^sup>2-4*a*c))/(2*a)}\<union>{(-b-sqrt(b\<^sup>2-4*a*c))/(2*a)} else {})"
    (* all the root of each atom *)
  assumes "A = \<Union>(roots ` (set eq))"
  assumes "B = \<Union>(roots ` (set les))"
  assumes "C = \<Union>(roots ` (set leq))"
  assumes "D = \<Union>(roots ` (set neq))"
    (* Quantifier Elimination *)
  shows "(\<exists>x. F(x)) = (F\<^sub>i\<^sub>n\<^sub>f\<or>(\<exists>r\<in>A. F r)\<or>(\<exists>r\<in>B. F\<epsilon> r)\<or>(\<exists>r\<in>C. F r)\<or>(\<exists>r\<in>D. F\<epsilon> r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
fix X
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
have "(\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union>(roots ` (set X)). x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x)
[PROOF STEP]
proof(induction X)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set []). x)
 2. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set []). x)
 2. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set []). x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set []). x)

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
case (Cons p X)
[PROOF STATE]
proof (state)
this:
(\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x)

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
have h1: "(\<exists>x\<in>F ` \<Union> (roots ` set (p # X)). x) = ((\<exists>x\<in>F ` roots p. x) \<or> (\<exists>x\<in>F ` \<Union> (roots ` set X). x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x\<in>F ` \<Union> (roots ` set (p # X)). x) = ((\<exists>x\<in>F ` roots p. x) \<or> (\<exists>x\<in>F ` \<Union> (roots ` set X). x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>x\<in>F ` \<Union> (roots ` set (p # X)). x) = ((\<exists>x\<in>F ` roots p. x) \<or> (\<exists>x\<in>F ` \<Union> (roots ` set X). x))

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
have h2 :"(case p of (a,b,c) \<Rightarrow> eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` roots p. x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (case p of (a, b, c) \<Rightarrow> eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` roots p. x)
[PROOF STEP]
apply(cases p)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. p = (a, b, c) \<Longrightarrow> (case p of (a, b, c) \<Rightarrow> eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` roots p. x)
[PROOF STEP]
unfolding assms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. p = (a, b, c) \<Longrightarrow> (case p of (a, b, c) \<Rightarrow> eq_fun a b c eq les leq neq) = (\<exists>x\<in>(\<lambda>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) ` (case p of (a, b, c) \<Rightarrow> if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}). x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. p = (a, b, c) \<Longrightarrow> a \<noteq> 0 \<and> 4 * a * c \<le> b\<^sup>2 \<longrightarrow> ((\<forall>(d, e, f)\<in>set eq. d * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + e * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + e * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + e * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + e * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + e * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + e * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + e * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + e * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + f \<noteq> 0)) = ((\<forall>(aa, ba, ca)\<in>set eq. aa * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + ba * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + ca = 0) \<and> (\<forall>(aa, ba, ca)\<in>set les. aa * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + ba * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + ca < 0) \<and> (\<forall>(aa, ba, ca)\<in>set leq. aa * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + ba * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + ca \<le> 0) \<and> (\<forall>(aa, ba, ca)\<in>set neq. aa * ((- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a))\<^sup>2 + ba * (- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a) + ca \<noteq> 0) \<or> (\<forall>(aa, ba, ca)\<in>set eq. aa * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + ba * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + ca = 0) \<and> (\<forall>(aa, ba, ca)\<in>set les. aa * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + ba * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + ca < 0) \<and> (\<forall>(aa, ba, ca)\<in>set leq. aa * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + ba * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + ca \<le> 0) \<and> (\<forall>(aa, ba, ca)\<in>set neq. aa * ((sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a))\<^sup>2 + ba * (sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a) + ca \<noteq> 0))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
(case p of (a, b, c) \<Rightarrow> eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` roots p. x)

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (p # X)). x)
[PROOF STEP]
unfolding h1 Cons[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = ((\<exists>x\<in>F ` roots p. x) \<or> (\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq))
[PROOF STEP]
using h2
[PROOF STATE]
proof (prove)
using this:
(case p of (a, b, c) \<Rightarrow> eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` roots p. x)

goal (1 subgoal):
 1. (\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = ((\<exists>x\<in>F ` roots p. x) \<or> (\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> eq_fun a ba c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set (p # X)). x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set ?X2. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set ?X2). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>(a, b, c)\<in>set ?X2. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set ?X2). x)
[PROOF STEP]
have eq : "\<And>X. (\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x)"
[PROOF STATE]
proof (prove)
using this:
(\<exists>(a, b, c)\<in>set ?X2. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set ?X2). x)

goal (1 subgoal):
 1. \<And>X. (\<exists>(a, b, c)\<in>set X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set X). x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set ?X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set ?X). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set ?X. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set ?X). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
fix X
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
have "(\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union>(roots ` (set X)). x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x)
[PROOF STEP]
proof(induction X)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set []). x)
 2. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set []). x)
 2. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set []). x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>a\<in>set []. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set []). x)

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
case (Cons p X)
[PROOF STATE]
proof (state)
this:
(\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x)

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
have h1: "(\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (p # X)). x) = ((\<exists>x\<in>F\<epsilon> ` roots p. x) \<or> (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (p # X)). x) = ((\<exists>x\<in>F\<epsilon> ` roots p. x) \<or> (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (p # X)). x) = ((\<exists>x\<in>F\<epsilon> ` roots p. x) \<or> (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x))

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
have h2 :"(case p of (a,b,c) \<Rightarrow> les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` roots p. x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (case p of (a, b, c) \<Rightarrow> les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` roots p. x)
[PROOF STEP]
apply(cases p)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. p = (a, b, c) \<Longrightarrow> (case p of (a, b, c) \<Rightarrow> les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` roots p. x)
[PROOF STEP]
unfolding assms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. p = (a, b, c) \<Longrightarrow> (case p of (a, b, c) \<Rightarrow> les_fun a b c eq les leq neq) = (\<exists>x\<in>(\<lambda>r. (\<forall>(a, b, c)\<in>set eq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<noteq> 0)) ` (case p of (a, b, c) \<Rightarrow> if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}). x)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b c. p = (a, b, c) \<Longrightarrow> a \<noteq> 0 \<and> 4 * a * c \<le> b\<^sup>2 \<longrightarrow> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0)) = ((\<forall>(aa, ba, ca)\<in>set eq. \<exists>y>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca = 0) \<and> (\<forall>(aa, ba, ca)\<in>set les. \<exists>y>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca < 0) \<and> (\<forall>(aa, ba, ca)\<in>set leq. \<exists>y>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca \<le> 0) \<and> (\<forall>(aa, ba, ca)\<in>set neq. \<exists>y>(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a). \<forall>x\<in>{(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca \<noteq> 0) \<or> (\<forall>(aa, ba, ca)\<in>set eq. \<exists>y>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca = 0) \<and> (\<forall>(aa, ba, ca)\<in>set les. \<exists>y>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca < 0) \<and> (\<forall>(aa, ba, ca)\<in>set leq. \<exists>y>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca \<le> 0) \<and> (\<forall>(aa, ba, ca)\<in>set neq. \<exists>y>(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a). \<forall>x\<in>{(sqrt (b\<^sup>2 - 4 * a * c) - b) / (2 * a)<..y}. aa * x\<^sup>2 + ba * x + ca \<noteq> 0))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
(case p of (a, b, c) \<Rightarrow> les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` roots p. x)

goal (1 subgoal):
 1. \<And>a X. (\<exists>a\<in>set X. case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x) \<Longrightarrow> (\<exists>a\<in>set (a # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (a # X)). x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (p # X)). x)
[PROOF STEP]
unfolding h1 Cons[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = ((\<exists>x\<in>F\<epsilon> ` roots p. x) \<or> (\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq))
[PROOF STEP]
using h2
[PROOF STATE]
proof (prove)
using this:
(case p of (a, b, c) \<Rightarrow> les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` roots p. x)

goal (1 subgoal):
 1. (\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = ((\<exists>x\<in>F\<epsilon> ` roots p. x) \<or> (\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>a\<in>set (p # X). case a of (a, ba, c) \<Rightarrow> les_fun a ba c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set (p # X)). x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set ?X2. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set ?X2). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>(a, b, c)\<in>set ?X2. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set ?X2). x)
[PROOF STEP]
have les : "\<And>X. (\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x)"
[PROOF STATE]
proof (prove)
using this:
(\<exists>(a, b, c)\<in>set ?X2. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set ?X2). x)

goal (1 subgoal):
 1. \<And>X. (\<exists>(a, b, c)\<in>set X. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set X). x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>(a, b, c)\<in>set ?X. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set ?X). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
have inf : "(\<forall>(a, b, c)\<in>set eq. a = 0 \<and> b = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>(a, b, c)\<in>set eq. a = 0 \<and> b = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
proof(induction eq)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<forall>a\<in>set []. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set []. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
 2. \<And>a eqa. (\<forall>a\<in>set eqa. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eqa. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<Longrightarrow> (\<forall>a\<in>set (a # eqa). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (a # eqa). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (\<forall>a\<in>set []. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set []. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
 2. \<And>a eqa. (\<forall>a\<in>set eqa. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eqa. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<Longrightarrow> (\<forall>a\<in>set (a # eqa). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (a # eqa). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a\<in>set []. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set []. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>a\<in>set []. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set []. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal (1 subgoal):
 1. \<And>a eqa. (\<forall>a\<in>set eqa. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eqa. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<Longrightarrow> (\<forall>a\<in>set (a # eqa). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (a # eqa). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a eqa. (\<forall>a\<in>set eqa. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eqa. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<Longrightarrow> (\<forall>a\<in>set (a # eqa). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (a # eqa). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
case (Cons p eq)
[PROOF STATE]
proof (state)
this:
(\<forall>a\<in>set eq. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal (1 subgoal):
 1. \<And>a eqa. (\<forall>a\<in>set eqa. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eqa. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<Longrightarrow> (\<forall>a\<in>set (a # eqa). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (a # eqa). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<forall>a\<in>set eq. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<forall>a\<in>set eq. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal (1 subgoal):
 1. (\<forall>a\<in>set (p # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (p # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
proof(cases p)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>(\<forall>a\<in>set eq. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0); p = (a, b, c)\<rbrakk> \<Longrightarrow> (\<forall>a\<in>set (p # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (p # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
case (fields a b c)
[PROOF STATE]
proof (state)
this:
p = (a, b, c)

goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>(\<forall>a\<in>set eq. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0); p = (a, b, c)\<rbrakk> \<Longrightarrow> (\<forall>a\<in>set (p # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (p # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a\<in>set (p # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (p # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
unfolding fields
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a\<in>set ((a, b, c) # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set ((a, b, c) # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
using infzeros[of _ a b c] Cons
[PROOF STATE]
proof (prove)
using this:
\<forall>x<?y. a * x\<^sup>2 + b * x + c = 0 \<Longrightarrow> a = 0 \<and> b = 0 \<and> c = 0
(\<forall>a\<in>set eq. case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal (1 subgoal):
 1. (\<forall>a\<in>set ((a, b, c) # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set ((a, b, c) # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>a\<in>set (p # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (p # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>a\<in>set (p # eq). case a of (a, ba, c) \<Rightarrow> a = 0 \<and> ba = 0 \<and> c = 0) = (\<forall>x\<in>set (p # eq). case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>(a, b, c)\<in>set eq. a = 0 \<and> b = 0 \<and> c = 0) = (\<forall>x\<in>set eq. case x of (a, b, c) \<Rightarrow> \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
using qe[of "eq" "les" "leq" "neq"]
[PROOF STATE]
proof (prove)
using this:
(\<exists>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) = ((\<forall>(a, b, c)\<in>set eq. a = 0 \<and> b = 0 \<and> c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<noteq> 0) \<or> (\<exists>(a', b', c')\<in>set eq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set les. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set leq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set neq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0))))

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
using eq[of eq] eq[of leq] les[of les] les[of neq]
[PROOF STATE]
proof (prove)
using this:
(\<exists>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) = ((\<forall>(a, b, c)\<in>set eq. a = 0 \<and> b = 0 \<and> c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<noteq> 0) \<or> (\<exists>(a', b', c')\<in>set eq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set les. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set leq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set neq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0))))
(\<exists>(a, b, c)\<in>set eq. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set eq). x)
(\<exists>(a, b, c)\<in>set leq. eq_fun a b c eq les leq neq) = (\<exists>x\<in>F ` \<Union> (roots ` set leq). x)
(\<exists>(a, b, c)\<in>set les. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set les). x)
(\<exists>(a, b, c)\<in>set neq. les_fun a b c eq les leq neq) = (\<exists>x\<in>F\<epsilon> ` \<Union> (roots ` set neq). x)

goal (1 subgoal):
 1. (\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))
[PROOF STEP]
unfolding inf assms
[PROOF STATE]
proof (prove)
using this:
(\<exists>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) = ((\<forall>(a, b, c)\<in>set eq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<noteq> 0) \<or> (\<exists>(a', b', c')\<in>set eq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set les. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set leq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * (- c' / b')\<^sup>2 + e * (- c' / b') + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. d * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'))\<^sup>2 + e * ((- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')) + f \<noteq> 0))) \<or> (\<exists>(a', b', c')\<in>set neq. (a' = 0 \<and> b' \<noteq> 0) \<and> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>- c' / b'. \<forall>x\<in>{- c' / b'<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> a' \<noteq> 0 \<and> - b'\<^sup>2 + 4 * a' * c' \<le> 0 \<and> ((\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0) \<or> (\<forall>(d, e, f)\<in>set eq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f = 0) \<and> (\<forall>(d, e, f)\<in>set les. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f < 0) \<and> (\<forall>(d, e, f)\<in>set leq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<le> 0) \<and> (\<forall>(d, e, f)\<in>set neq. \<exists>y'>(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a'). \<forall>x\<in>{(- b' + - 1 * sqrt (b'\<^sup>2 - 4 * a' * c')) / (2 * a')<..y'}. d * x\<^sup>2 + e * x + f \<noteq> 0))))
(\<exists>(a, b, c)\<in>set eq. eq_fun a b c eq les leq neq) = (\<exists>x\<in>(\<lambda>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) ` (\<Union>(a, b, c)\<in>set eq. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}). x)
(\<exists>(a, b, c)\<in>set leq. eq_fun a b c eq les leq neq) = (\<exists>x\<in>(\<lambda>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) ` (\<Union>(a, b, c)\<in>set leq. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}). x)
(\<exists>(a, b, c)\<in>set les. les_fun a b c eq les leq neq) = (\<exists>x\<in>(\<lambda>r. (\<forall>(a, b, c)\<in>set eq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<noteq> 0)) ` (\<Union>(a, b, c)\<in>set les. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}). x)
(\<exists>(a, b, c)\<in>set neq. les_fun a b c eq les leq neq) = (\<exists>x\<in>(\<lambda>r. (\<forall>(a, b, c)\<in>set eq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<noteq> 0)) ` (\<Union>(a, b, c)\<in>set neq. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}). x)

goal (1 subgoal):
 1. (\<exists>x. (\<forall>(a, b, c)\<in>set eq. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * x\<^sup>2 + b * x + c \<noteq> 0)) = ((\<forall>(a, b, c)\<in>set eq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>x. \<forall>y<x. a * y\<^sup>2 + b * y + c \<noteq> 0) \<or> (\<exists>r\<in>\<Union>(a, b, c)\<in>set eq. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}. (\<forall>(a, b, c)\<in>set eq. a * r\<^sup>2 + b * r + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * r\<^sup>2 + b * r + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * r\<^sup>2 + b * r + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * r\<^sup>2 + b * r + c \<noteq> 0)) \<or> (\<exists>r\<in>\<Union>(a, b, c)\<in>set les. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}. (\<forall>(a, b, c)\<in>set eq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<noteq> 0)) \<or> (\<exists>r\<in>\<Union>(a, b, c)\<in>set leq. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}. (\<forall>(a, b, c)\<in>set eq. a * r\<^sup>2 + b * r + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. a * r\<^sup>2 + b * r + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. a * r\<^sup>2 + b * r + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. a * r\<^sup>2 + b * r + c \<noteq> 0)) \<or> (\<exists>r\<in>\<Union>(a, b, c)\<in>set neq. if a = 0 \<and> b \<noteq> 0 then {- c / b} else if a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c then {(- b + sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} \<union> {(- b - sqrt (b\<^sup>2 - 4 * a * c)) / (2 * a)} else {}. (\<forall>(a, b, c)\<in>set eq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c = 0) \<and> (\<forall>(a, b, c)\<in>set les. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c < 0) \<and> (\<forall>(a, b, c)\<in>set leq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<le> 0) \<and> (\<forall>(a, b, c)\<in>set neq. \<exists>y>r. \<forall>x\<in>{r<..y}. a * x\<^sup>2 + b * x + c \<noteq> 0)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>x. F x) = (F\<^sub>i\<^sub>n\<^sub>f \<or> (\<exists>r\<in>A. F r) \<or> (\<exists>r\<in>B. F\<epsilon> r) \<or> (\<exists>r\<in>C. F r) \<or> (\<exists>r\<in>D. F\<epsilon> r))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vcard_vunion:
  assumes "vdisjnt A B"
  shows "vcard (A \<union>\<^sub>\<circ> B) = vcard A \<oplus> vcard B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vcard (A \<union>\<^sub>\<circ> B) = vcard A \<oplus> vcard B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
vdisjnt A B

goal (1 subgoal):
 1. vcard (A \<union>\<^sub>\<circ> B) = vcard A \<oplus> vcard B
[PROOF STEP]
by (rule vcard_disjoint_sup)


[STATEMENT]
lemma additiveD:
  "\<lbrakk> additive t; sound P; sound Q \<rbrakk> \<Longrightarrow> t (\<lambda>s. P s + Q s) = (\<lambda>s. t P s + t Q s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Transformers.additive t; sound P; sound Q\<rbrakk> \<Longrightarrow> t (\<lambda>s. P s + Q s) = (\<lambda>s. t P s + t Q s)
[PROOF STEP]
by(simp add:additive_def)


[STATEMENT]
lemma Int_in_lattice: "[|x\<in>L; y\<in>L; lattice L|] ==> x\<inter>y \<in> L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> L; y \<in> L; lattice L\<rbrakk> \<Longrightarrow> x \<inter> y \<in> L
[PROOF STEP]
using Inter_in_lattice [of "{x, y}" L]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>{x, y} \<subseteq> L; lattice L\<rbrakk> \<Longrightarrow> \<Inter> {x, y} \<in> L

goal (1 subgoal):
 1. \<lbrakk>x \<in> L; y \<in> L; lattice L\<rbrakk> \<Longrightarrow> x \<inter> y \<in> L
[PROOF STEP]
by simp


[STATEMENT]
lemma sbintrunc_n_minus1: "(signed_take_bit :: nat \<Rightarrow> int \<Rightarrow> int) n (- 1) = -1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_take_bit n (- 1) = - 1
[PROOF STEP]
by (fact signed_take_bit_of_minus_1)


[STATEMENT]
lemma first_node_eq_hd: "first_node t = hd (inorder t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. first_node t = hd (inorder t)
[PROOF STEP]
using first_node_first_inorder[of t]
[PROOF STATE]
proof (prove)
using this:
\<exists>xs. inorder t = first_node t # xs

goal (1 subgoal):
 1. first_node t = hd (inorder t)
[PROOF STEP]
by auto


[STATEMENT]
lemma bheight_rbtreeify_f: "n \<le> length kvs
  \<Longrightarrow> bheight (fst (rbtreeify_f n kvs)) = plog2 n"
  and bheight_rbtreeify_g: "n \<le> Suc (length kvs)
  \<Longrightarrow> bheight (fst (rbtreeify_g n kvs)) = plog2 n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n \<le> length kvs \<Longrightarrow> bheight (fst (rbtreeify_f n kvs)) = plog2 n) &&& (n \<le> Suc (length kvs) \<Longrightarrow> bheight (fst (rbtreeify_g n kvs)) = plog2 n)
[PROOF STEP]
by(induct n kvs and n kvs rule: rbtreeify_induct) simp_all


[STATEMENT]
lemma size_multiset_add_mset [simp]:
  "size_multiset f (add_mset a M) = Suc (f a) + size_multiset f M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size_multiset f (add_mset a M) = Suc (f a) + size_multiset f M
[PROOF STEP]
unfolding add_mset_add_single[of _ M] size_multiset_union
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size_multiset f M + size_multiset f {#a#} = Suc (f a) + size_multiset f M
[PROOF STEP]
by (auto simp: size_multiset_single)


[STATEMENT]
lemma rev_pow: "rev (x\<^sup>@m) = (rev x)\<^sup>@m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rev (x \<^sup>@ m) = rev x \<^sup>@ m
[PROOF STEP]
by (induct m, simp, simp add: pow_comm)


[STATEMENT]
lemma quotient_rel_set_disjoint:
  "equivp R \<Longrightarrow> C \<in> UNIV // {(x, y). R x y} \<Longrightarrow> rel_set R A B \<Longrightarrow> A \<inter> C = {} \<longleftrightarrow> B \<inter> C = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>equivp R; C \<in> UNIV // {(x, y). R x y}; rel_set R A B\<rbrakk> \<Longrightarrow> (A \<inter> C = {}) = (B \<inter> C = {})
[PROOF STEP]
using in_quotient_imp_closed[of UNIV "{(x, y). R x y}" C]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>equiv UNIV {(x, y). R x y}; C \<in> UNIV // {(x, y). R x y}; ?x \<in> C; (?x, ?y) \<in> {(x, y). R x y}\<rbrakk> \<Longrightarrow> ?y \<in> C

goal (1 subgoal):
 1. \<lbrakk>equivp R; C \<in> UNIV // {(x, y). R x y}; rel_set R A B\<rbrakk> \<Longrightarrow> (A \<inter> C = {}) = (B \<inter> C = {})
[PROOF STEP]
by (auto 0 0 simp: equivp_equiv rel_set_def set_eq_iff elim: equivpE)
     (blast dest: equivp_symp)+


[STATEMENT]
lemma dtor1_o_ctor1: "dtor1 o ctor1 = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dtor1 \<circ> ctor1 = id
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (dtor1 \<circ> ctor1) x = id x
[PROOF STEP]
apply (rule trans[OF o_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. dtor1 (ctor1 x) = id x
[PROOF STEP]
apply (rule trans[OF fun_cong[OF dtor1_def]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. fold1 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2) (ctor1 x) = id x
[PROOF STEP]
apply (rule trans[OF fold1])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. F1map id ctor1 ctor2 (F1map id (fold1 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) (fold2 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) x) = id x
[PROOF STEP]
apply (rule trans[OF F1map_comp_id])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. F1map id (ctor1 \<circ> fold1 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) (ctor2 \<circ> fold2 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) x = id x
[PROOF STEP]
apply (rule trans[OF F1map_congL])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. \<forall>a\<in>F1set2 x. (ctor1 \<circ> fold1 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) a = a
 2. \<And>x. \<forall>a\<in>F1set3 x. (ctor2 \<circ> fold2 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) a = a
 3. \<And>x. x = id x
[PROOF STEP]
apply (rule ballI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x a. a \<in> F1set2 x \<Longrightarrow> (ctor1 \<circ> fold1 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) a = a
 2. \<And>x. \<forall>a\<in>F1set3 x. (ctor2 \<circ> fold2 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) a = a
 3. \<And>x. x = id x
[PROOF STEP]
apply (rule trans[OF fun_cong[OF ctor1_o_fold1] id_apply])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<forall>a\<in>F1set3 x. (ctor2 \<circ> fold2 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) a = a
 2. \<And>x. x = id x
[PROOF STEP]
apply (rule ballI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x a. a \<in> F1set3 x \<Longrightarrow> (ctor2 \<circ> fold2 (F1map id ctor1 ctor2) (F2map id ctor1 ctor2)) a = a
 2. \<And>x. x = id x
[PROOF STEP]
apply (rule trans[OF fun_cong[OF ctor2_o_fold2] id_apply])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x = id x
[PROOF STEP]
apply (rule sym[OF id_apply])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done