[STATEMENT]
lemma partial_summation_integrable_sum_upto_strong:
        "(\<lambda>t. A t * f' t) integrable_on {0..x}"
  and partial_summation_sum_upto_strong':
        "sum_upto (\<lambda>n. a n * f n) x =
            A x * f x - integral {0..x} (\<lambda>t. A t * f' t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>t. A t * f' t) integrable_on {0..x} &&& sum_upto (\<lambda>n. a n * f (real n)) x = A x * f x - integral {0..x} (\<lambda>t. A t * f' t)
[PROOF STEP]
using partial_summation_sum_upto_strong
[PROOF STATE]
proof (prove)
using this:
((\<lambda>t. A t * f' t) has_integral A x * f x - sum_upto (\<lambda>n. a n * f (real n)) x) {0..x}

goal (1 subgoal):
 1. (\<lambda>t. A t * f' t) integrable_on {0..x} &&& sum_upto (\<lambda>n. a n * f (real n)) x = A x * f x - integral {0..x} (\<lambda>t. A t * f' t)
[PROOF STEP]
by (simp_all add: has_integral_iff algebra_simps)


[STATEMENT]
lemma VInter_Inter: "\<Inter>\<^sub>\<circ> A = set (\<Inter> (elts ` (elts A)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Inter>\<^sub>\<circ> A = set (\<Inter> (elts ` elts A))
[PROOF STEP]
by (simp add: Inf_V_def ext)


[STATEMENT]
lemma norm_smult: "norm ((a :: real) *s x) = abs a * norm x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (a *s x) = \<bar>a\<bar> * norm x
[PROOF STEP]
unfolding norm_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L2_set (\<lambda>i. norm ((a *s x) $h i)) UNIV = \<bar>a\<bar> * L2_set (\<lambda>i. norm (x $h i)) UNIV
[PROOF STEP]
by (metis norm_scaleR norm_vec_def scalar_mult_eq_scaleR)


[STATEMENT]
lemma dnf_ltln_of_dnf_min_dnf:
  "dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
have 1: "finite (And\<^sub>n ` fset ` min_dnf \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (And\<^sub>n ` fset ` min_dnf \<phi>)
[PROOF STEP]
using min_dnf_finite
[PROOF STATE]
proof (prove)
using this:
finite (min_dnf ?\<phi>)

goal (1 subgoal):
 1. finite (And\<^sub>n ` fset ` min_dnf \<phi>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite (And\<^sub>n ` fset ` min_dnf \<phi>)

goal (1 subgoal):
 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
have 2: "inj_on And\<^sub>n (fset ` min_dnf \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on And\<^sub>n (fset ` min_dnf \<phi>)
[PROOF STEP]
by (metis (mono_tags, lifting) And\<^sub>n_inj f_inv_into_f fset inj_onI inj_on_contraD)
[PROOF STATE]
proof (state)
this:
inj_on And\<^sub>n (fset ` min_dnf \<phi>)

goal (1 subgoal):
 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
have 3: "inj_on fset (min_dnf \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on fset (min_dnf \<phi>)
[PROOF STEP]
by (meson fset_inject inj_onI)
[PROOF STATE]
proof (state)
this:
inj_on fset (min_dnf \<phi>)

goal (1 subgoal):
 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
unfolding ltln_of_dnf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dnf (Or\<^sub>n (And\<^sub>n ` fset ` min_dnf \<phi>)) = min_dnf \<phi>
[PROOF STEP]
unfolding Or\<^sub>n_dnf[OF 1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Set.fold (\<lambda>\<phi>. (\<union>) (dnf \<phi>)) {} (And\<^sub>n ` fset ` min_dnf \<phi>) = min_dnf \<phi>
[PROOF STEP]
unfolding fold_image[OF 2]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Set.fold ((\<lambda>\<phi>. (\<union>) (dnf \<phi>)) \<circ> And\<^sub>n) {} (fset ` min_dnf \<phi>) = min_dnf \<phi>
[PROOF STEP]
unfolding fold_image[OF 3]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Set.fold ((\<lambda>\<phi>. (\<union>) (dnf \<phi>)) \<circ> And\<^sub>n \<circ> fset) {} (min_dnf \<phi>) = min_dnf \<phi>
[PROOF STEP]
unfolding comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Set.fold (\<lambda>x. (\<union>) (dnf (And\<^sub>n (fset x)))) {} (min_dnf \<phi>) = min_dnf \<phi>
[PROOF STEP]
unfolding And\<^sub>n_dnf[OF finite_fset]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Set.fold (\<lambda>x. (\<union>) (Finite_Set.fold (\<lambda>\<phi>. (\<otimes>) (dnf \<phi>)) {{||}} (fset x))) {} (min_dnf \<phi>) = min_dnf \<phi>
[PROOF STEP]
by (metis fold_union_fold_product min_dnf_finite min_dnf_atoms_dnf)
[PROOF STATE]
proof (state)
this:
dnf (ltln_of_dnf (min_dnf \<phi>)) = min_dnf \<phi>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Ring) mprod_expR_mem:"\<lbrakk> e \<in> {j. j \<le> n} \<rightarrow> {j. (0::nat) \<le> j};
       f \<in> {j. j \<le> n} \<rightarrow> carrier R\<rbrakk>   \<Longrightarrow>  mprod_expR R e f n \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<in> {j. j \<le> n} \<rightarrow> {j. 0 \<le> j}; f \<in> {j. j \<le> n} \<rightarrow> carrier R\<rbrakk> \<Longrightarrow> mprod_expR R e f n \<in> carrier R
[PROOF STEP]
apply (simp add:mprod_expR_memTr)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma mon_hom_boundary_inclusion:
  assumes "homotopic_with (\<lambda>x. True) X X id f" and "f ` (topspace X) \<subseteq> S"
  shows "(hom_boundary p X S) \<in> mon
             (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_boundary p X S \<in> mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hom_boundary p X S \<in> mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))
[PROOF STEP]
have "(hom_induced p (subtopology X S) {} X {} id)
      \<in> epi (homology_group p (subtopology X S)) (homology_group p X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p (subtopology X S) {} X {} id \<in> epi (homology_group p (subtopology X S)) (homology_group p X)
[PROOF STEP]
by (metis assms epi_hom_induced_inclusion)
[PROOF STATE]
proof (state)
this:
hom_induced p (subtopology X S) {} X {} id \<in> epi (homology_group p (subtopology X S)) (homology_group p X)

goal (1 subgoal):
 1. hom_boundary p X S \<in> mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hom_induced p (subtopology X S) {} X {} id \<in> epi (homology_group p (subtopology X S)) (homology_group p X)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
hom_induced p (subtopology X S) {} X {} id \<in> epi (homology_group p (subtopology X S)) (homology_group p X)

goal (1 subgoal):
 1. hom_boundary p X S \<in> mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))
[PROOF STEP]
using homology_exactness_axiom_3 [of p X S] homology_exactness_axiom_1 [of p X S]
[PROOF STATE]
proof (prove)
using this:
hom_induced p (subtopology X S) {} X {} id \<in> epi (homology_group p (subtopology X S)) (homology_group p X)
exact_seq ([relative_homology_group p X S, homology_group p X, homology_group p (subtopology X S)], [hom_induced p X {} X S id, hom_induced p (subtopology X S) {} X {} id])
exact_seq ([homology_group (p - 1) (subtopology X S), relative_homology_group p X S, homology_group p X], [hom_boundary p X S, hom_induced p X {} X S id])

goal (1 subgoal):
 1. hom_boundary p X S \<in> mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))
[PROOF STEP]
apply (simp add: mon_def epi_def hom_boundary_hom)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>hom_induced p (subtopology X S) {} X {} id ` carrier (homology_group p (subtopology X S)) = carrier (homology_group p X); group_hom (homology_group p (subtopology X S)) (homology_group p X) (hom_induced p (subtopology X S) {} X {} id) \<and> kernel (homology_group p X) (relative_homology_group p X S) (hom_induced p X {} X S id) = carrier (homology_group p X); group_hom (homology_group p X) (relative_homology_group p X S) (hom_induced p X {} X S id) \<and> kernel (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S)) (hom_boundary p X S) = hom_induced p X {} X S id ` carrier (homology_group p X)\<rbrakk> \<Longrightarrow> inj_on (hom_boundary p X S) (carrier (relative_homology_group p X S))
[PROOF STEP]
by (metis (no_types, opaque_lifting) group_hom.trivial_hom_iff group_hom.trivial_ker_imp_inj group_hom_axioms_def group_hom_def group_relative_homology_group hom_boundary_hom)
[PROOF STATE]
proof (state)
this:
hom_boundary p X S \<in> mon (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma star_plus:
  "y\<^sup>\<star> * y = y * y\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<star> * y = y\<^sup>+
[PROOF STEP]
proof (rule order.antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. y\<^sup>\<star> * y \<le> y\<^sup>+
 2. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
show "y\<^sup>\<star> * y \<le> y * y\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<star> * y \<le> y\<^sup>+
[PROOF STEP]
by (simp add: star.circ_plus_sub)
[PROOF STATE]
proof (state)
this:
y\<^sup>\<star> * y \<le> y\<^sup>+

goal (1 subgoal):
 1. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
have "y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y
[PROOF STEP]
by (simp add: mult_left_isotone star.right_plus_below_circ)
[PROOF STATE]
proof (state)
this:
y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y

goal (1 subgoal):
 1. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
hence "y \<squnion> y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y"
[PROOF STATE]
proof (prove)
using this:
y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y

goal (1 subgoal):
 1. y \<squnion> y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y
[PROOF STEP]
by (simp add: star.circ_mult_increasing_2)
[PROOF STATE]
proof (state)
this:
y \<squnion> y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y

goal (1 subgoal):
 1. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
thus "y * y\<^sup>\<star> \<le> y\<^sup>\<star> * y"
[PROOF STATE]
proof (prove)
using this:
y \<squnion> y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y

goal (1 subgoal):
 1. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
using star_right_induct
[PROOF STATE]
proof (prove)
using this:
y \<squnion> y\<^sup>\<star> * y * y \<le> y\<^sup>\<star> * y
?z \<squnion> ?x * ?y \<le> ?x \<longrightarrow> ?z * ?y\<^sup>\<star> \<le> ?x

goal (1 subgoal):
 1. y\<^sup>+ \<le> y\<^sup>\<star> * y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y\<^sup>+ \<le> y\<^sup>\<star> * y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma project_Stable_I:
     "extend h F\<squnion>G \<in> Stable (extend_set h A)
      ==> F\<squnion>project h (reachable (extend h F\<squnion>G)) G \<in> Stable A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extend h F \<squnion> G \<in> Stable (extend_set h A) \<Longrightarrow> F \<squnion> project h (reachable (extend h F \<squnion> G)) G \<in> Stable A
[PROOF STEP]
apply (unfold Stable_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extend h F \<squnion> G \<in> extend_set h A Co extend_set h A \<Longrightarrow> F \<squnion> project h (reachable (extend h F \<squnion> G)) G \<in> A Co A
[PROOF STEP]
apply (simp (no_asm_simp) add: project_Constrains_I)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ex_distrib_and: "(\<exists>\<^sub>Ax. P x \<and>\<^sub>A Q) = (\<exists>\<^sub>Ax. P x) \<and>\<^sub>A Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>\<^sub>Ax. P x \<and>\<^sub>A Q) = (\<exists>\<^sub>Ax. P x) \<and>\<^sub>A Q
[PROOF STEP]
unfolding ex_assn_def inf_assn_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_assn (\<lambda>h. \<exists>x. h \<Turnstile> Abs_assn (\<lambda>h. h \<Turnstile> P x \<and> h \<Turnstile> Q)) = Abs_assn (\<lambda>h. h \<Turnstile> Abs_assn (\<lambda>h. \<exists>x. h \<Turnstile> P x) \<and> h \<Turnstile> Q)
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h. (h \<Turnstile> Abs_assn (\<lambda>h. \<exists>x. h \<Turnstile> P x) \<and> h \<Turnstile> Q) = (h \<Turnstile> Abs_assn (\<lambda>h. \<exists>x. h \<Turnstile> Abs_assn (\<lambda>h. h \<Turnstile> P x \<and> h \<Turnstile> Q)))
[PROOF STEP]
apply (simp add: Abs_assn_inverse)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma mult_right_inj: "0 < n \<Longrightarrow> inj (\<lambda>x. x * (n::nat))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> inj (\<lambda>x. x * n)
[PROOF STEP]
by (simp add: inj_on_def)


[STATEMENT]
lemma lir_fps:
  fixes f g :: "nat \<Rightarrow> 'a :: field" and cs :: "'a list"
  defines "N \<equiv> length cs - 1"
  assumes cs: "cs \<noteq> []"
  assumes "\<And>n. n \<ge> m \<Longrightarrow> (\<Sum>k\<le>N. cs ! k * f (n + k)) = g (n + N)"
  assumes cN: "last cs \<noteq> 0"
  shows   "Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) /
              fps_of_poly (lr_fps_denominator cs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
define p and q
    where "p = Poly [(\<Sum>i\<le>min N k. cs ! (N - i) * f (k - i)) - g k. k \<leftarrow> [0..<N+m]]"
      and "q = Poly (map (\<lambda>k. cs ! (N - k)) [0..<Suc N])"
[PROOF STATE]
proof (state)
this:
p = Poly (map (\<lambda>k. (\<Sum>i\<le>min N k. cs ! (N - i) * f (k - i)) - g k) [0..<N + m])
q = Poly (map (\<lambda>k. cs ! (N - k)) [0..<Suc N])

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
N \<equiv> length cs - 1
cs \<noteq> []
m \<le> ?n \<Longrightarrow> (\<Sum>k\<le>N. cs ! k * f (?n + k)) = g (?n + N)
last cs \<noteq> (0::'a)
[PROOF STEP]
have "Abs_fps f = (fps_of_poly p + Abs_fps g) / fps_of_poly q"
[PROOF STATE]
proof (prove)
using this:
N \<equiv> length cs - 1
cs \<noteq> []
m \<le> ?n \<Longrightarrow> (\<Sum>k\<le>N. cs ! k * f (?n + k)) = g (?n + N)
last cs \<noteq> (0::'a)

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly p + Abs_fps g) / fps_of_poly q
[PROOF STEP]
unfolding p_def q_def
[PROOF STATE]
proof (prove)
using this:
N \<equiv> length cs - 1
cs \<noteq> []
m \<le> ?n \<Longrightarrow> (\<Sum>k\<le>N. cs ! k * f (?n + k)) = g (?n + N)
last cs \<noteq> (0::'a)

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (Poly (map (\<lambda>k. (\<Sum>i\<le>min N k. cs ! (N - i) * f (k - i)) - g k) [0..<N + m])) + Abs_fps g) / fps_of_poly (Poly (map (\<lambda>k. cs ! (N - k)) [0..<Suc N]))
[PROOF STEP]
by (intro lir_fps_aux) (simp_all add: last_conv_nth)
[PROOF STATE]
proof (state)
this:
Abs_fps f = (fps_of_poly p + Abs_fps g) / fps_of_poly q

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Abs_fps f = (fps_of_poly p + Abs_fps g) / fps_of_poly q

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
have "p = lir_fps_numerator m cs f g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = lir_fps_numerator m cs f g
[PROOF STEP]
unfolding p_def lir_fps_numerator_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Poly (map (\<lambda>k. (\<Sum>i\<le>min N k. cs ! (N - i) * f (k - i)) - g k) [0..<N + m]) = (let N = length cs - 1 in Poly (map (\<lambda>k. (\<Sum>i\<le>min N k. cs ! (N - i) * f (k - i)) - g k) [0..<N + m]))
[PROOF STEP]
by (auto simp: Let_def N_def)
[PROOF STATE]
proof (state)
this:
p = lir_fps_numerator m cs f g

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
p = lir_fps_numerator m cs f g

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
from cN
[PROOF STATE]
proof (chain)
picking this:
last cs \<noteq> (0::'a)
[PROOF STEP]
have "q = lr_fps_denominator cs"
[PROOF STATE]
proof (prove)
using this:
last cs \<noteq> (0::'a)

goal (1 subgoal):
 1. q = lr_fps_denominator cs
[PROOF STEP]
unfolding q_def lr_fps_denominator_def
[PROOF STATE]
proof (prove)
using this:
last cs \<noteq> (0::'a)

goal (1 subgoal):
 1. Poly (map (\<lambda>k. cs ! (N - k)) [0..<Suc N]) = Poly (rev cs)
[PROOF STEP]
by (intro poly_eqI)
       (auto simp add: nth_default_def rev_nth N_def not_less cs simp del: upt_Suc)
[PROOF STATE]
proof (state)
this:
q = lr_fps_denominator cs

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)

goal (1 subgoal):
 1. Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Abs_fps f = (fps_of_poly (lir_fps_numerator m cs f g) + Abs_fps g) / fps_of_poly (lr_fps_denominator cs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integer_of_char_code [code]:
  "integer_of_char (Char b0 b1 b2 b3 b4 b5 b6 b7) =
    ((((((of_bool b7 * 2 + of_bool b6) * 2 +
      of_bool b5) * 2 + of_bool b4) * 2 +
        of_bool b3) * 2 + of_bool b2) * 2 +
          of_bool b1) * 2 + of_bool b0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integer_of_char (Char b0 b1 b2 b3 b4 b5 b6 b7) = ((((((of_bool b7 * 2 + of_bool b6) * 2 + of_bool b5) * 2 + of_bool b4) * 2 + of_bool b3) * 2 + of_bool b2) * 2 + of_bool b1) * 2 + of_bool b0
[PROOF STEP]
by (simp add: integer_of_char_def of_char_def)


[STATEMENT]
lemma p_mult_function_val:
  assumes "f \<in> carrier (SA m)"
  assumes "x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)"
  shows "val ((\<pp> \<odot>\<^bsub>SA m\<^esub>f) x) = val (f x) + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. val ((\<pp> \<odot>\<^bsub>SA m\<^esub> f) x) = val (f x) + 1
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. val ((\<pp> \<odot>\<^bsub>SA m\<^esub> f) x) = val (f x) + 1
[PROOF STEP]
have 0: "(\<pp>\<odot>\<^bsub>SA m\<^esub>f) x = \<pp>\<otimes>(f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<pp> \<odot>\<^bsub>SA m\<^esub> f) x = \<pp> \<otimes> f x
[PROOF STEP]
using Qp.int_inc_closed SA_smult_formula assms(1) assms(2)
[PROOF STATE]
proof (prove)
using this:
[?n] \<cdot> \<one> \<in> carrier Q\<^sub>p
\<lbrakk>?h \<in> carrier (SA ?n); ?q \<in> carrier Q\<^sub>p; ?a \<in> carrier (Q\<^sub>p\<^bsup>?n\<^esup>)\<rbrakk> \<Longrightarrow> (?q \<odot>\<^bsub>SA ?n\<^esub> ?h) ?a = ?q \<otimes> ?h ?a
f \<in> carrier (SA m)
x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)

goal (1 subgoal):
 1. (\<pp> \<odot>\<^bsub>SA m\<^esub> f) x = \<pp> \<otimes> f x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<pp> \<odot>\<^bsub>SA m\<^esub> f) x = \<pp> \<otimes> f x

goal (1 subgoal):
 1. val ((\<pp> \<odot>\<^bsub>SA m\<^esub> f) x) = val (f x) + 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. val ((\<pp> \<odot>\<^bsub>SA m\<^esub> f) x) = val (f x) + 1
[PROOF STEP]
unfolding 0
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. val (\<pp> \<otimes> f x) = val (f x) + 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f \<in> carrier (SA m)
x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)

goal (1 subgoal):
 1. val (\<pp> \<otimes> f x) = val (f x) + 1
[PROOF STEP]
by (metis Qp.function_ring_car_memE Qp.int_inc_closed Qp.m_comm SA_car semialg_functions_memE(2) val_mult val_p)
[PROOF STATE]
proof (state)
this:
val ((\<pp> \<odot>\<^bsub>SA m\<^esub> f) x) = val (f x) + 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dim_row_append_rows[simp]:
  shows "dim_row (A @\<^sub>r B) = dim_row A + dim_row B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row (A @\<^sub>r B) = dim_row A + dim_row B
[PROOF STEP]
by (simp add: append_rows_def)


[STATEMENT]
lemma merge1_dom_children_fcard_gt1:
  assumes "dom_children (Node r (Abs_fset (children_deg1 ys))) T"
      and "is_subtree (Node r ys) t"
      and "merge1 (Node r ys) = Node r xs"
      and "fcard xs > 1"
    shows "dom_children (Node r (Abs_fset (children_deg1 xs))) T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dom_children (Node r (Abs_fset (children_deg1 xs))) T
[PROOF STEP]
unfolding dom_children_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>t\<in>fst ` fset (sucs (Node r (Abs_fset (children_deg1 xs)))). \<forall>x\<in>dverts t. \<exists>r\<in>set (dtree.root (Node r (Abs_fset (children_deg1 xs)))) \<union> path_lverts t (hd x). r \<rightarrow>\<^bsub>T\<^esub> hd x
[PROOF STEP]
using merge1_dom_children_fcard_gt1_aux[OF assms] children_deg1_fset_id[of xs]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>max_deg ?t2.0 \<le> 1; ?t2.0 \<in> fst ` fset xs; ?x \<in> dverts ?t2.0\<rbrakk> \<Longrightarrow> \<exists>v\<in>set r \<union> path_lverts ?t2.0 (hd ?x). v \<rightarrow>\<^bsub>T\<^esub> hd ?x
fset (Abs_fset (children_deg1 xs)) = children_deg1 xs

goal (1 subgoal):
 1. \<forall>t\<in>fst ` fset (sucs (Node r (Abs_fset (children_deg1 xs)))). \<forall>x\<in>dverts t. \<exists>r\<in>set (dtree.root (Node r (Abs_fset (children_deg1 xs)))) \<union> path_lverts t (hd x). r \<rightarrow>\<^bsub>T\<^esub> hd x
[PROOF STEP]
by fastforce


[STATEMENT]
lemma beukers_nn_integral1_finite: "beukers_nn_integral1 r s < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. beukers_nn_integral1 r s < \<infinity>
[PROOF STEP]
using beukers_nn_integral1_different[of r s] beukers_nn_integral1_different[of s r]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>r \<le> s; r < s\<rbrakk> \<Longrightarrow> beukers_nn_integral1 s r = ennreal ((\<Sum>k\<in>{r<..s}. 1 / real (k\<^sup>2)) / real (s - r))
\<lbrakk>s \<le> r; s < r\<rbrakk> \<Longrightarrow> beukers_nn_integral1 r s = ennreal ((\<Sum>k\<in>{s<..r}. 1 / real (k\<^sup>2)) / real (r - s))

goal (1 subgoal):
 1. beukers_nn_integral1 r s < \<infinity>
[PROOF STEP]
by (cases r s rule: linorder_cases)
     (simp_all add: beukers_nn_integral1_same beukers_nn_integral1_swap)


[STATEMENT]
lemma (in aGroup) pOp_cancel_l:"\<lbrakk>a \<in> carrier A; b \<in> carrier A; c \<in> carrier A;                    c \<plusminus> a =  c \<plusminus> b \<rbrakk> \<Longrightarrow> a = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier A; b \<in> carrier A; c \<in> carrier A; c \<plusminus> a = c \<plusminus> b\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
apply (frule ag_mOp_closed[of "c"],
       frule aassoc[of "-\<^sub>a c" "c" "a"], assumption+,
       simp only:l_m l_zero)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>-\<^sub>a c \<plusminus> (c \<plusminus> b) \<in> carrier A; b \<in> carrier A; c \<in> carrier A; c \<plusminus> (-\<^sub>a c \<plusminus> (c \<plusminus> b)) = c \<plusminus> b; -\<^sub>a c \<in> carrier A; a = -\<^sub>a c \<plusminus> (c \<plusminus> b)\<rbrakk> \<Longrightarrow> -\<^sub>a c \<plusminus> (c \<plusminus> b) = b
[PROOF STEP]
apply (simp only:aassoc[THEN sym, of "-\<^sub>a c" "c" "b"],
        simp only:l_m l_zero)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cos_n_hRe_hcis_hcpow_n: "( *f* cos) (hypreal_of_hypnat n * a) = hRe (hcis a pow n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (*f* cos) (hypreal_of_hypnat n * a) = hRe (hcis a pow n)
[PROOF STEP]
by (simp add: NSDeMoivre_ext)


[STATEMENT]
lemma wca_on_warp_on: \<comment> \<open>\citet[T.3 part]{Sen:1970}\<close>
  shows "wca_on A f \<longleftrightarrow> warp_on A f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wca_on A f = warp_on A f
[PROOF STEP]
unfolding %invisible warp_on_def wca_on_def rsp_on_def rwp_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>(x, y)\<in>{(x, y). \<exists>B\<subseteq>A. x \<in> B \<and> y \<in> f B}. \<forall>B\<subseteq>A. x \<in> f B \<and> y \<in> B \<longrightarrow> y \<in> f B) = (\<forall>(x, y)\<in>{(x, y). \<exists>B\<subseteq>A. x \<in> Rf f B \<and> y \<in> f B}. (y, x) \<notin> {(x, y). \<exists>B\<subseteq>A. x \<in> B \<and> y \<in> f B})
[PROOF STEP]
by blast


[STATEMENT]
lemma (in category) inv_af_Yoneda_map_v11:
  assumes "\<FF> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "v11 ((af_Yoneda_map \<alpha> \<FF> \<GG>)\<inverse>\<^sub>\<circ>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v11 ((af_Yoneda_map \<alpha> \<FF> \<GG>)\<inverse>\<^sub>\<circ>)
[PROOF STEP]
using cat_af_Yoneda_Lemma(1)[OF assms]
[PROOF STATE]
proof (prove)
using this:
v11 (af_Yoneda_map \<alpha> \<FF> \<GG>)

goal (1 subgoal):
 1. v11 ((af_Yoneda_map \<alpha> \<FF> \<GG>)\<inverse>\<^sub>\<circ>)
[PROOF STEP]
by (simp add: v11.v11_vconverse)


[STATEMENT]
lemma Hd_transitive:
  "Hd = Hd * Hd"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Hd = Hd * Hd
[PROOF STEP]
by (simp add: Hd_least Hd_total order.antisym coreflexive_transitive total_mult_closed)


[STATEMENT]
theorem Theorem1: "\<lfloor>\<P> \<G>\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>\<G>\<^bold>\<in>\<P>\<rfloor>
[PROOF STEP]
unfolding G_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>\<lambda>x w. \<forall>xa. (xa\<^bold>\<in>\<P> \<^bold>\<rightarrow> xa x) w\<^bold>\<in>\<P>\<rfloor>
[PROOF STEP]
using Axiom2 axM
[PROOF STATE]
proof (prove)
using this:
\<lfloor>\<lambda>w. \<forall>x. (\<^bold>\<box>(\<lambda>v. (\<forall>xa. (xa\<^bold>\<in>x \<^bold>\<rightarrow> xa\<^bold>\<in>\<P>) v) \<longrightarrow> \<lambda>xa w. \<forall>xb. (xb\<^bold>\<in>x \<^bold>\<rightarrow> xb xa) w\<^bold>\<in>\<P> v)) w\<rfloor>
\<lfloor>\<lambda>w. \<forall>x. (\<^bold>\<box>x \<^bold>\<rightarrow> x) w\<rfloor>

goal (1 subgoal):
 1. \<lfloor>\<lambda>x w. \<forall>xa. (xa\<^bold>\<in>\<P> \<^bold>\<rightarrow> xa x) w\<^bold>\<in>\<P>\<rfloor>
[PROOF STEP]
by blast


[STATEMENT]
lemma finite_Sup_fun:
  "Sup (A::('a::finite \<Rightarrow> 'b::finite_lattice_complete) set) =
    Finite_Set.fold sup bot A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup A = Finite_Set.fold sup bot A
[PROOF STEP]
by (metis Sup_fold_sup finite)


[STATEMENT]
lemma replicate_mset_eq_empty_iff [simp]: "replicate_mset n a = {#} \<longleftrightarrow> n = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (replicate_mset n a = {#}) = (n = 0)
[PROOF STEP]
by (induct n) simp_all


[STATEMENT]
lemma row_space_eq_phull:
  assumes "Keys (set ps) \<subseteq> set ts"
  shows "row_to_poly ts ` row_space (polys_to_mat ts ps) = phull (set ps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row_to_poly ts ` row_space (polys_to_mat ts ps) = phull (set ps)
[PROOF STEP]
by (rule, rule row_space_subset_phull, fact, rule phull_subset_row_space, fact)


[STATEMENT]
lemma weight_spmf_def: "weight_spmf p = measure (measure_spmf p) UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weight_spmf p = Sigma_Algebra.measure (measure_spmf p) UNIV
[PROOF STEP]
by(simp add: space_measure_spmf)


[STATEMENT]
lemma Cd_XD_gfp_F_card:
  assumes "d \<in> ds"
  shows "card (Cd d (fst XD_XH)) \<le> card (Cd d (fst (gfp_F ds)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (Cd d (fst XD_XH)) \<le> card (Cd d (fst (gfp_F ds)))
[PROOF STEP]
using %invisible assms Cd_lad XD_XH_gfp_F(1)[OF \<open>stable_pair_on ds XD_XH\<close>]
[PROOF STATE]
proof (prove)
using this:
d \<in> ds
lad_on ?X (Cd ?d)
fst XD_XH \<subseteq> fst (gfp_F ds)

goal (1 subgoal):
 1. card (Cd d (fst XD_XH)) \<le> card (Cd d (fst (gfp_F ds)))
[PROOF STEP]
unfolding lad_on_def
[PROOF STATE]
proof (prove)
using this:
d \<in> ds
\<forall>B\<subseteq>?X. \<forall>C\<subseteq>B. card (Cd ?d C) \<le> card (Cd ?d B)
fst XD_XH \<subseteq> fst (gfp_F ds)

goal (1 subgoal):
 1. card (Cd d (fst XD_XH)) \<le> card (Cd d (fst (gfp_F ds)))
[PROOF STEP]
by blast


[STATEMENT]
lemma shift1_degree: "degree (shift1 p) = 1 + degree p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Polynomial_Expression.degree (shift1 p) = 1 + Polynomial_Expression.degree p
[PROOF STEP]
by (simp add: shift1_def)


[STATEMENT]
lemma all_edges_list_I: "P (list_graph_to_graph G) = Pl G \<Longrightarrow>
    (\<forall>(e1, e2)\<in> (edges (list_graph_to_graph G)). P (list_graph_to_graph G) e1 e2) = (\<forall>(e1, e2)\<in>set (edgesL G). Pl G e1 e2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (list_graph_to_graph G) = Pl G \<Longrightarrow> (\<forall>(e1, e2)\<in>edges (list_graph_to_graph G). P (list_graph_to_graph G) e1 e2) = (\<forall>(e1, e2)\<in>set (edgesL G). Pl G e1 e2)
[PROOF STEP]
unfolding list_graph_to_graph_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<lparr>nodes = set (nodesL G), edges = set (edgesL G)\<rparr> = Pl G \<Longrightarrow> (\<forall>(e1, e2)\<in>edges \<lparr>nodes = set (nodesL G), edges = set (edgesL G)\<rparr>. P \<lparr>nodes = set (nodesL G), edges = set (edgesL G)\<rparr> e1 e2) = (\<forall>(e1, e2)\<in>set (edgesL G). Pl G e1 e2)
[PROOF STEP]
by simp


[STATEMENT]
lemma vertices_conv_Union_edges:
 "\<V>(f::face) = (\<Union>(a,b)\<in>\<E> f. {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<V> f = (\<Union>\<^bsub>(a, b)\<in>\<E> f\<^esub> {a})
[PROOF STEP]
apply(induct f)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a x2a. \<V> (Face x1a x2a) = (\<Union>\<^bsub>a\<in>\<E> (Face x1a x2a)\<^esub> case a of (a, b) \<Rightarrow> {a})
[PROOF STEP]
apply(simp add:vertices_face_def edges_face_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1a x2a. set x1a = (\<Union>\<^bsub>x\<in>{(a, Face x1a x2a \<bullet> a) |a. a \<in> set x1a}\<^esub> case x of (a, b) \<Rightarrow> {a})
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma integer_of_char_code [code]:
  "integer_of_char (Char b0 b1 b2 b3 b4 b5 b6 b7) =
    ((((((of_bool b7 * 2 + of_bool b6) * 2 +
      of_bool b5) * 2 + of_bool b4) * 2 +
        of_bool b3) * 2 + of_bool b2) * 2 +
          of_bool b1) * 2 + of_bool b0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integer_of_char (Char b0 b1 b2 b3 b4 b5 b6 b7) = ((((((of_bool b7 * 2 + of_bool b6) * 2 + of_bool b5) * 2 + of_bool b4) * 2 + of_bool b3) * 2 + of_bool b2) * 2 + of_bool b1) * 2 + of_bool b0
[PROOF STEP]
by (simp add: integer_of_char_def of_char_def)


[STATEMENT]
lemma continuous_map_Euclidean_space_add [continuous_intros]:
   "\<lbrakk>continuous_map X (Euclidean_space n) f; continuous_map X (Euclidean_space n) g\<rbrakk>
    \<Longrightarrow> continuous_map X (Euclidean_space n) (\<lambda>x i. f x i + g x i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X (Euclidean_space n) f; continuous_map X (Euclidean_space n) g\<rbrakk> \<Longrightarrow> continuous_map X (Euclidean_space n) (\<lambda>x i. f x i + g x i)
[PROOF STEP]
unfolding Euclidean_space_def continuous_map_in_subtopology
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X (powertop_real UNIV) f \<and> f ` topspace X \<subseteq> {x. \<forall>i\<ge>n. x i = 0}; continuous_map X (powertop_real UNIV) g \<and> g ` topspace X \<subseteq> {x. \<forall>i\<ge>n. x i = 0}\<rbrakk> \<Longrightarrow> continuous_map X (powertop_real UNIV) (\<lambda>x i. f x i + g x i) \<and> (\<lambda>x i. f x i + g x i) ` topspace X \<subseteq> {x. \<forall>i\<ge>n. x i = 0}
[PROOF STEP]
by (fastforce simp add: continuous_map_componentwise_UNIV continuous_map_add)


[STATEMENT]
lemma dverts_root_or_suc: "v \<in> dverts t \<Longrightarrow> v = root t \<or> (\<exists>(t,e) \<in> fset (sucs t).v \<in> dverts t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> dverts t \<Longrightarrow> v = dtree.root t \<or> (\<exists>(t, e)\<in>fset (sucs t). v \<in> dverts t)
[PROOF STEP]
using dverts_root_or_child[of v "root t" "sucs t"]
[PROOF STATE]
proof (prove)
using this:
v \<in> dverts (Node (dtree.root t) (sucs t)) \<Longrightarrow> v = dtree.root t \<or> v \<in> (\<Union>(t, e)\<in>fset (sucs t). dverts t)

goal (1 subgoal):
 1. v \<in> dverts t \<Longrightarrow> v = dtree.root t \<or> (\<exists>(t, e)\<in>fset (sucs t). v \<in> dverts t)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in normed_vectorspace_with_fn_norm) fn_norm_leastB:
  assumes "continuous V f norm"
  assumes b: "\<And>b. b \<in> B V f \<Longrightarrow> b \<le> y"
  shows "\<parallel>f\<parallel>\<hyphen>V \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<parallel>f\<parallel>\<hyphen>V \<le> y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<parallel>f\<parallel>\<hyphen>V \<le> y
[PROOF STEP]
interpret continuous V f norm
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Function_Norm.continuous V f norm
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<parallel>f\<parallel>\<hyphen>V \<le> y
[PROOF STEP]
have "lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)
[PROOF STEP]
using \<open>continuous V f norm\<close>
[PROOF STATE]
proof (prove)
using this:
Function_Norm.continuous V f norm

goal (1 subgoal):
 1. lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)
[PROOF STEP]
by (rule fn_norm_works)
[PROOF STATE]
proof (state)
this:
lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)

goal (1 subgoal):
 1. \<parallel>f\<parallel>\<hyphen>V \<le> y
[PROOF STEP]
from this and b
[PROOF STATE]
proof (chain)
picking this:
lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)
?b \<in> B V f \<Longrightarrow> ?b \<le> y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
lub (B V f) (\<parallel>f\<parallel>\<hyphen>V)
?b \<in> B V f \<Longrightarrow> ?b \<le> y

goal (1 subgoal):
 1. \<parallel>f\<parallel>\<hyphen>V \<le> y
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<parallel>f\<parallel>\<hyphen>V \<le> y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rsquarefree_imp_distinct_roots:
  assumes "rsquarefree p" and "mset xs = poly_roots p"
  shows   "distinct xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct xs
[PROOF STEP]
proof (cases "p = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p = 0 \<Longrightarrow> distinct xs
 2. p \<noteq> 0 \<Longrightarrow> distinct xs
[PROOF STEP]
case [simp]: False
[PROOF STATE]
proof (state)
this:
p \<noteq> 0

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> distinct xs
 2. p \<noteq> 0 \<Longrightarrow> distinct xs
[PROOF STEP]
have *: "mset xs = mset_set {x. poly p x = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset xs = mset_set {x. poly p x = (0::'a)}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
rsquarefree p
mset xs = poly_roots p

goal (1 subgoal):
 1. mset xs = mset_set {x. poly p x = (0::'a)}
[PROOF STEP]
by (simp add: rsquarefree_poly_roots_eq)
[PROOF STATE]
proof (state)
this:
mset xs = mset_set {x. poly p x = (0::'a)}

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> distinct xs
 2. p \<noteq> 0 \<Longrightarrow> distinct xs
[PROOF STEP]
hence "set_mset (mset xs) = set_mset (mset_set {x. poly p x = 0})"
[PROOF STATE]
proof (prove)
using this:
mset xs = mset_set {x. poly p x = (0::'a)}

goal (1 subgoal):
 1. set_mset (mset xs) = set_mset (mset_set {x. poly p x = (0::'a)})
[PROOF STEP]
by (simp only: )
[PROOF STATE]
proof (state)
this:
set_mset (mset xs) = set_mset (mset_set {x. poly p x = (0::'a)})

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> distinct xs
 2. p \<noteq> 0 \<Longrightarrow> distinct xs
[PROOF STEP]
hence [simp]: "set xs = {x. poly p x = 0}"
[PROOF STATE]
proof (prove)
using this:
set_mset (mset xs) = set_mset (mset_set {x. poly p x = (0::'a)})

goal (1 subgoal):
 1. set xs = {x. poly p x = (0::'a)}
[PROOF STEP]
by (simp add: poly_roots_finite)
[PROOF STATE]
proof (state)
this:
set xs = {x. poly p x = (0::'a)}

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> distinct xs
 2. p \<noteq> 0 \<Longrightarrow> distinct xs
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
mset xs = mset_set {x. poly p x = (0::'a)}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
mset xs = mset_set {x. poly p x = (0::'a)}

goal (1 subgoal):
 1. distinct xs
[PROOF STEP]
by (subst distinct_count_atmost_1) (auto simp: poly_roots_finite)
[PROOF STATE]
proof (state)
this:
distinct xs

goal (1 subgoal):
 1. p = 0 \<Longrightarrow> distinct xs
[PROOF STEP]
qed (use assms in auto)


[STATEMENT]
lemma sum_poly_horner_expand:
  "(\<Sum>k<(numeral n::nat). f k * x^k) = f 0 + (\<Sum>k<pred_numeral n. f (k+1) * x^k) * x"
  "(\<Sum>k<Suc 0. f k * x^k) = (f 0 :: 'a :: semiring_1)"
  "(\<Sum>k<(0::nat). f k * x^k) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x &&& (\<Sum>k<Suc 0. f k * x ^ k) = f 0 &&& (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
fix m :: nat
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
have "(\<Sum>k<Suc m. f k * x^k) = f 0 + (\<Sum>k=Suc 0..<Suc m. f k * x^k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k = Suc 0..<Suc m. f k * x ^ k)
[PROOF STEP]
by (subst atLeast0LessThan [symmetric], subst sum.atLeast_Suc_lessThan) simp_all
[PROOF STATE]
proof (state)
this:
(\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k = Suc 0..<Suc m. f k * x ^ k)

goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k = Suc 0..<Suc m. f k * x ^ k)

goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
have "(\<Sum>k=Suc 0..<Suc m. f k * x^k) = (\<Sum>k<m. f (k+1) * x^k) * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k = Suc 0..<Suc m. f k * x ^ k) = (\<Sum>k<m. f (k + 1) * x ^ k) * x
[PROOF STEP]
by (subst sum.shift_bounds_Suc_ivl)
         (simp add: sum_distrib_right algebra_simps atLeast0LessThan power_commutes)
[PROOF STATE]
proof (state)
this:
(\<Sum>k = Suc 0..<Suc m. f k * x ^ k) = (\<Sum>k<m. f (k + 1) * x ^ k) * x

goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k<m. f (k + 1) * x ^ k) * x
[PROOF STEP]
have "(\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k<m. f (k + 1) * x ^ k) * x"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k<m. f (k + 1) * x ^ k) * x

goal (1 subgoal):
 1. (\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k<m. f (k + 1) * x ^ k) * x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>k<Suc m. f k * x ^ k) = f 0 + (\<Sum>k<m. f (k + 1) * x ^ k) * x

goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(\<Sum>k<Suc ?m2. f k * x ^ k) = f 0 + (\<Sum>k<?m2. f (k + 1) * x ^ k) * x

goal (3 subgoals):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
 2. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 3. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
from this[of "pred_numeral n"]
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>k<Suc (pred_numeral n). f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
[PROOF STEP]
show "(\<Sum>k<numeral n. f k * x^k) = f 0 + (\<Sum>k<pred_numeral n. f (k+1) * x^k) * x"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k<Suc (pred_numeral n). f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x

goal (1 subgoal):
 1. (\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x
[PROOF STEP]
by (simp add: numeral_eq_Suc)
[PROOF STATE]
proof (state)
this:
(\<Sum>k<numeral n. f k * x ^ k) = f 0 + (\<Sum>k<pred_numeral n. f (k + 1) * x ^ k) * x

goal (2 subgoals):
 1. (\<Sum>k<Suc 0. f k * x ^ k) = f 0
 2. (\<Sum>k<0. f k * x ^ k) = (0::'a)
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma homeomorphic_rel_interiors_same_dimension:
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
  assumes "S homeomorphic T" and aff: "aff_dim S = aff_dim T"
  shows "(rel_interior S) homeomorphic (rel_interior T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_interior S homeomorphic rel_interior T
[PROOF STEP]
using assms [unfolded homeomorphic_minimal]
[PROOF STATE]
proof (prove)
using this:
\<exists>f g. (\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x) \<and> (\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y) \<and> continuous_on S f \<and> continuous_on T g
aff_dim S = aff_dim T

goal (1 subgoal):
 1. rel_interior S homeomorphic rel_interior T
[PROOF STEP]
unfolding homeomorphic_def
[PROOF STATE]
proof (prove)
using this:
\<exists>f g. (\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x) \<and> (\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y) \<and> continuous_on S f \<and> continuous_on T g
aff_dim S = aff_dim T

goal (1 subgoal):
 1. \<exists>f g. homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
proof (clarify elim!: ex_forward)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f g. \<lbrakk>aff_dim S = aff_dim T; \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
fix f g
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f g. \<lbrakk>aff_dim S = aff_dim T; \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
assume S: "\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x" and T: "\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y"
     and contf: "continuous_on S f" and contg: "continuous_on T g"
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
continuous_on S f
continuous_on T g

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>aff_dim S = aff_dim T; \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
continuous_on S f
continuous_on T g
[PROOF STEP]
have fST: "f ` S = T" and gTS: "g ` T = S" and "inj_on f S" "inj_on g T"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
continuous_on S f
continuous_on T g

goal (1 subgoal):
 1. f ` S = T &&& g ` T = S &&& inj_on f S &&& inj_on g T
[PROOF STEP]
by (auto simp: inj_on_def intro: rev_image_eqI) metis+
[PROOF STATE]
proof (state)
this:
f ` S = T
g ` T = S
inj_on f S
inj_on g T

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>aff_dim S = aff_dim T; \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
have fim: "f ` rel_interior S \<subseteq> rel_interior T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> rel_interior T
[PROOF STEP]
by (metis \<open>inj_on f S\<close> aff contf continuous_image_subset_rel_interior fST order_refl)
[PROOF STATE]
proof (state)
this:
f ` rel_interior S \<subseteq> rel_interior T

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>aff_dim S = aff_dim T; \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
have gim: "g ` rel_interior T \<subseteq> rel_interior S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` rel_interior T \<subseteq> rel_interior S
[PROOF STEP]
by (metis \<open>inj_on g T\<close> aff contg continuous_image_subset_rel_interior gTS order_refl)
[PROOF STATE]
proof (state)
this:
g ` rel_interior T \<subseteq> rel_interior S

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>aff_dim S = aff_dim T; \<forall>x\<in>S. f x \<in> T \<and> g (f x) = x; \<forall>y\<in>T. g y \<in> S \<and> f (g y) = y; continuous_on S f; continuous_on T g\<rbrakk> \<Longrightarrow> homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
show "homeomorphism (rel_interior S) (rel_interior T) f g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphism (rel_interior S) (rel_interior T) f g
[PROOF STEP]
unfolding homeomorphism_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>rel_interior S. g (f x) = x) \<and> f ` rel_interior S = rel_interior T \<and> continuous_on (rel_interior S) f \<and> (\<forall>y\<in>rel_interior T. f (g y) = y) \<and> g ` rel_interior T = rel_interior S \<and> continuous_on (rel_interior T) g
[PROOF STEP]
proof (intro conjI ballI)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> g (f x) = x
 2. f ` rel_interior S = rel_interior T
 3. continuous_on (rel_interior S) f
 4. \<And>y. y \<in> rel_interior T \<Longrightarrow> f (g y) = y
 5. g ` rel_interior T = rel_interior S
 6. continuous_on (rel_interior T) g
[PROOF STEP]
show gf: "\<And>x. x \<in> rel_interior S \<Longrightarrow> g (f x) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> g (f x) = x
[PROOF STEP]
using S rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>S. f x \<in> T \<and> g (f x) = x
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> g (f x) = x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?x \<in> rel_interior S \<Longrightarrow> g (f ?x) = ?x

goal (5 subgoals):
 1. f ` rel_interior S = rel_interior T
 2. continuous_on (rel_interior S) f
 3. \<And>y. y \<in> rel_interior T \<Longrightarrow> f (g y) = y
 4. g ` rel_interior T = rel_interior S
 5. continuous_on (rel_interior T) g
[PROOF STEP]
show fg: "\<And>y. y \<in> rel_interior T \<Longrightarrow> f (g y) = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. y \<in> rel_interior T \<Longrightarrow> f (g y) = y
[PROOF STEP]
using T mem_rel_interior_ball
[PROOF STATE]
proof (prove)
using this:
\<forall>y\<in>T. g y \<in> S \<and> f (g y) = y
(?x \<in> rel_interior ?S) = (?x \<in> ?S \<and> (\<exists>e>0. ball ?x e \<inter> affine hull ?S \<subseteq> ?S))

goal (1 subgoal):
 1. \<And>y. y \<in> rel_interior T \<Longrightarrow> f (g y) = y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?y \<in> rel_interior T \<Longrightarrow> f (g ?y) = ?y

goal (4 subgoals):
 1. f ` rel_interior S = rel_interior T
 2. continuous_on (rel_interior S) f
 3. g ` rel_interior T = rel_interior S
 4. continuous_on (rel_interior T) g
[PROOF STEP]
have "rel_interior T \<subseteq> f ` rel_interior S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_interior T \<subseteq> f ` rel_interior S
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior T \<Longrightarrow> x \<in> f ` rel_interior S
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior T \<Longrightarrow> x \<in> f ` rel_interior S
[PROOF STEP]
assume "x \<in> rel_interior T"
[PROOF STATE]
proof (state)
this:
x \<in> rel_interior T

goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior T \<Longrightarrow> x \<in> f ` rel_interior S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> rel_interior T
[PROOF STEP]
have "g x \<in> rel_interior S"
[PROOF STATE]
proof (prove)
using this:
x \<in> rel_interior T

goal (1 subgoal):
 1. g x \<in> rel_interior S
[PROOF STEP]
using gim
[PROOF STATE]
proof (prove)
using this:
x \<in> rel_interior T
g ` rel_interior T \<subseteq> rel_interior S

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

goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior T \<Longrightarrow> x \<in> f ` rel_interior S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g x \<in> rel_interior S
[PROOF STEP]
show "x \<in> f ` rel_interior S"
[PROOF STATE]
proof (prove)
using this:
g x \<in> rel_interior S

goal (1 subgoal):
 1. x \<in> f ` rel_interior S
[PROOF STEP]
by (metis fg \<open>x \<in> rel_interior T\<close> imageI)
[PROOF STATE]
proof (state)
this:
x \<in> f ` rel_interior S

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rel_interior T \<subseteq> f ` rel_interior S

goal (4 subgoals):
 1. f ` rel_interior S = rel_interior T
 2. continuous_on (rel_interior S) f
 3. g ` rel_interior T = rel_interior S
 4. continuous_on (rel_interior T) g
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
rel_interior T \<subseteq> f ` rel_interior S

goal (4 subgoals):
 1. f ` rel_interior S = rel_interior T
 2. continuous_on (rel_interior S) f
 3. g ` rel_interior T = rel_interior S
 4. continuous_on (rel_interior T) g
[PROOF STEP]
have "f ` rel_interior S \<subseteq> rel_interior T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> rel_interior T
[PROOF STEP]
by (metis \<open>inj_on f S\<close> aff contf continuous_image_subset_rel_interior fST order_refl)
[PROOF STATE]
proof (state)
this:
f ` rel_interior S \<subseteq> rel_interior T

goal (4 subgoals):
 1. f ` rel_interior S = rel_interior T
 2. continuous_on (rel_interior S) f
 3. g ` rel_interior T = rel_interior S
 4. continuous_on (rel_interior T) g
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
rel_interior T \<subseteq> f ` rel_interior S
f ` rel_interior S \<subseteq> rel_interior T
[PROOF STEP]
show "f ` rel_interior S = rel_interior T"
[PROOF STATE]
proof (prove)
using this:
rel_interior T \<subseteq> f ` rel_interior S
f ` rel_interior S \<subseteq> rel_interior T

goal (1 subgoal):
 1. f ` rel_interior S = rel_interior T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` rel_interior S = rel_interior T

goal (3 subgoals):
 1. continuous_on (rel_interior S) f
 2. g ` rel_interior T = rel_interior S
 3. continuous_on (rel_interior T) g
[PROOF STEP]
show "continuous_on (rel_interior S) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (rel_interior S) f
[PROOF STEP]
using contf continuous_on_subset rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
continuous_on S f
\<lbrakk>continuous_on ?s ?f; ?t \<subseteq> ?s\<rbrakk> \<Longrightarrow> continuous_on ?t ?f
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. continuous_on (rel_interior S) f
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
continuous_on (rel_interior S) f

goal (2 subgoals):
 1. g ` rel_interior T = rel_interior S
 2. continuous_on (rel_interior T) g
[PROOF STEP]
have "rel_interior S \<subseteq> g ` rel_interior T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_interior S \<subseteq> g ` rel_interior T
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> x \<in> g ` rel_interior T
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> x \<in> g ` rel_interior T
[PROOF STEP]
assume "x \<in> rel_interior S"
[PROOF STATE]
proof (state)
this:
x \<in> rel_interior S

goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> x \<in> g ` rel_interior T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> rel_interior S
[PROOF STEP]
have "f x \<in> rel_interior T"
[PROOF STATE]
proof (prove)
using this:
x \<in> rel_interior S

goal (1 subgoal):
 1. f x \<in> rel_interior T
[PROOF STEP]
using fim
[PROOF STATE]
proof (prove)
using this:
x \<in> rel_interior S
f ` rel_interior S \<subseteq> rel_interior T

goal (1 subgoal):
 1. f x \<in> rel_interior T
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f x \<in> rel_interior T

goal (1 subgoal):
 1. \<And>x. x \<in> rel_interior S \<Longrightarrow> x \<in> g ` rel_interior T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f x \<in> rel_interior T
[PROOF STEP]
show "x \<in> g ` rel_interior T"
[PROOF STATE]
proof (prove)
using this:
f x \<in> rel_interior T

goal (1 subgoal):
 1. x \<in> g ` rel_interior T
[PROOF STEP]
by (metis gf \<open>x \<in> rel_interior S\<close> imageI)
[PROOF STATE]
proof (state)
this:
x \<in> g ` rel_interior T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
rel_interior S \<subseteq> g ` rel_interior T

goal (2 subgoals):
 1. g ` rel_interior T = rel_interior S
 2. continuous_on (rel_interior T) g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rel_interior S \<subseteq> g ` rel_interior T
[PROOF STEP]
show "g ` rel_interior T = rel_interior S"
[PROOF STATE]
proof (prove)
using this:
rel_interior S \<subseteq> g ` rel_interior T

goal (1 subgoal):
 1. g ` rel_interior T = rel_interior S
[PROOF STEP]
using gim
[PROOF STATE]
proof (prove)
using this:
rel_interior S \<subseteq> g ` rel_interior T
g ` rel_interior T \<subseteq> rel_interior S

goal (1 subgoal):
 1. g ` rel_interior T = rel_interior S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
g ` rel_interior T = rel_interior S

goal (1 subgoal):
 1. continuous_on (rel_interior T) g
[PROOF STEP]
show "continuous_on (rel_interior T) g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (rel_interior T) g
[PROOF STEP]
using contg continuous_on_subset rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
continuous_on T g
\<lbrakk>continuous_on ?s ?f; ?t \<subseteq> ?s\<rbrakk> \<Longrightarrow> continuous_on ?t ?f
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. continuous_on (rel_interior T) g
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
continuous_on (rel_interior T) g

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
homeomorphism (rel_interior S) (rel_interior T) f g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma map_iterator_dom_foldli_conv :
  "map_iterator_dom (foldli kvs) = foldli (map fst kvs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_iterator_dom (foldli kvs) = foldli (map fst kvs)
[PROOF STEP]
unfolding map_iterator_dom_def set_iterator_image_foldli_conv
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. foldli (map fst kvs) = foldli (map fst kvs)
[PROOF STEP]
by simp


[STATEMENT]
lemma quotient_of_eq: "quotient_of (Fract a b) = (p, q) \<Longrightarrow> Fract p q = Fract a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. quotient_of (Fract a b) = (p, q) \<Longrightarrow> Fract p q = Fract a b
[PROOF STEP]
by (simp add: quotient_of_Fract normalize_eq)


[STATEMENT]
lemma poly_nth_root_0[simp]: "poly_nth_root p = 0 \<longleftrightarrow> p = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (local.poly_nth_root p = 0) = (p = 0)
[PROOF STEP]
unfolding poly_nth_root_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<circ>\<^sub>p monom (1::'a) n = 0) = (p = 0)
[PROOF STEP]
by (rule pcompose_eq_0, insert n, auto simp: degree_monom_eq)


[STATEMENT]
lemma list_ranI: "\<lbrakk> i < List.length xs; xs ! i = Some b \<rbrakk> \<Longrightarrow> b \<in> list_ran xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < length xs; xs ! i = Some b\<rbrakk> \<Longrightarrow> b \<in> list_ran xs
[PROOF STEP]
unfolding list_ran_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < length xs; xs ! i = Some b\<rbrakk> \<Longrightarrow> b \<in> {e. Some e \<in> set xs}
[PROOF STEP]
by (drule sym, simp)


[STATEMENT]
lemma interior_closed_segment_ge2:
  fixes a :: "'a::euclidean_space"
  assumes "2 \<le> DIM('a)"
    shows  "interior(closed_segment a b) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interior (closed_segment a b) = {}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
2 \<le> DIM('a)

goal (1 subgoal):
 1. interior (closed_segment a b) = {}
[PROOF STEP]
unfolding segment_convex_hull
[PROOF STATE]
proof (prove)
using this:
2 \<le> DIM('a)

goal (1 subgoal):
 1. interior (convex hull {a, b}) = {}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 \<le> DIM('a) \<Longrightarrow> interior (convex hull {a, b}) = {}
[PROOF STEP]
have "card {a, b} \<le> DIM('a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {a, b} \<le> DIM('a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
2 \<le> DIM('a)

goal (1 subgoal):
 1. card {a, b} \<le> DIM('a)
[PROOF STEP]
by (simp add: card_insert_if linear not_less_eq_eq numeral_2_eq_2)
[PROOF STATE]
proof (state)
this:
card {a, b} \<le> DIM('a)

goal (1 subgoal):
 1. 2 \<le> DIM('a) \<Longrightarrow> interior (convex hull {a, b}) = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card {a, b} \<le> DIM('a)
[PROOF STEP]
show "interior (convex hull {a, b}) = {}"
[PROOF STATE]
proof (prove)
using this:
card {a, b} \<le> DIM('a)

goal (1 subgoal):
 1. interior (convex hull {a, b}) = {}
[PROOF STEP]
by (metis empty_interior_convex_hull finite.insertI finite.emptyI)
[PROOF STATE]
proof (state)
this:
interior (convex hull {a, b}) = {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gcd_mult_left_right_cancel:
  "gcd (a * c) b = gcd a b" if "coprime b c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd (a * c) b = gcd a b
[PROOF STEP]
using that gcd_mult_left_left_cancel [of b c a]
[PROOF STATE]
proof (prove)
using this:
coprime b c
coprime b c \<Longrightarrow> gcd (c * a) b = gcd a b

goal (1 subgoal):
 1. gcd (a * c) b = gcd a b
[PROOF STEP]
by (simp add: ac_simps)


[STATEMENT]
lemma fv_fo_fmla_list_set: "set (fv_fo_fmla_list \<phi>) = fv_fo_fmla \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (fv_fo_fmla_list \<phi>) = fv_fo_fmla \<phi>
[PROOF STEP]
unfolding fv_fo_fmla_list_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (remdups_adj (sort (fv_fo_fmla_list_rec \<phi>))) = fv_fo_fmla \<phi>
[PROOF STEP]
by (induction \<phi> rule: fv_fo_fmla.induct) (auto simp: fv_fo_terms_set_list fv_fo_term_set_list)


[STATEMENT]
lemma finite_imp_card_of_natLeq_on:
assumes "finite A"
shows "|A| =o natLeq_on (card A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |A| =o natLeq_on (card A)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. |A| =o natLeq_on (card A)
[PROOF STEP]
obtain h where "bij_betw h A {0 ..< card A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h. bij_betw h A {0..<card A} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms ex_bij_betw_finite_nat
[PROOF STATE]
proof (prove)
using this:
finite A
finite ?M \<Longrightarrow> \<exists>h. bij_betw h ?M {0..<card ?M}

goal (1 subgoal):
 1. (\<And>h. bij_betw h A {0..<card A} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
bij_betw h A {0..<card A}

goal (1 subgoal):
 1. |A| =o natLeq_on (card A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
bij_betw h A {0..<card A}

goal (1 subgoal):
 1. |A| =o natLeq_on (card A)
[PROOF STEP]
using card_of_ordIso card_of_less ordIso_equivalence
[PROOF STATE]
proof (prove)
using this:
bij_betw h A {0..<card A}
(\<exists>f. bij_betw f ?A ?B) = (|?A| =o |?B|)
|{0..<?n}| =o natLeq_on ?n
\<lbrakk>?r =o ?r'; ?r' =o ?r''\<rbrakk> \<Longrightarrow> ?r =o ?r''
Well_order ?r \<Longrightarrow> ?r =o ?r
?r =o ?r' \<Longrightarrow> ?r' =o ?r

goal (1 subgoal):
 1. |A| =o natLeq_on (card A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
|A| =o natLeq_on (card A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma add_all_cols_to_first:
  assumes "i < dim_row (M)"
  assumes "j < dim_col (M)"
  shows "j \<noteq> 0 \<Longrightarrow> add_multiple_cols 1 0 [1..<dim_col M] M $$ (i, j)  = M $$ (i, j)"
  and "j = 0 \<Longrightarrow> add_multiple_cols 1 0 [1..<dim_col M] M $$ (i, j) = (\<Sum>l = 1..<dim_col M.  M $$(i,l)) + M$$(i,0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (j \<noteq> 0 \<Longrightarrow> add_multiple_cols (1::'a) 0 [1..<dim_col M] M $$ (i, j) = M $$ (i, j)) &&& (j = 0 \<Longrightarrow> add_multiple_cols (1::'a) 0 [1..<dim_col M] M $$ (i, j) = (\<Sum>l = 1..<dim_col M. M $$ (i, l)) + M $$ (i, 0))
[PROOF STEP]
using assms add_multiple_cols_index_eq_bounds[of "i" "M" "j" "1" "dim_col M" "1"] assms
[PROOF STATE]
proof (prove)
using this:
i < dim_row M
j < dim_col M
\<lbrakk>i < dim_row M; j < dim_col M; j < 1 \<or> dim_col M \<le> j; dim_col M \<le> dim_col M\<rbrakk> \<Longrightarrow> add_multiple_cols (1::'a) j [1..<dim_col M] M $$ (i, j) = (\<Sum>l = 1..<dim_col M. (1::'a) * M $$ (i, l)) + M $$ (i, j)
i < dim_row M
j < dim_col M

goal (1 subgoal):
 1. (j \<noteq> 0 \<Longrightarrow> add_multiple_cols (1::'a) 0 [1..<dim_col M] M $$ (i, j) = M $$ (i, j)) &&& (j = 0 \<Longrightarrow> add_multiple_cols (1::'a) 0 [1..<dim_col M] M $$ (i, j) = (\<Sum>l = 1..<dim_col M. M $$ (i, l)) + M $$ (i, 0))
[PROOF STEP]
by (simp_all)


[STATEMENT]
lemma upper_dim_implies_per2__col:
  assumes "upper_dim_axiom"
  shows "\<forall> A B C X. (Per A X C \<and> X \<noteq> C \<and> Per B X C) \<longrightarrow> Col A B X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
fix A B C X
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
assume "Per A X C \<and> X \<noteq> C \<and> Per B X C"
[PROOF STATE]
proof (state)
this:
Per A X C \<and> X \<noteq> C \<and> Per B X C

goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Per A X C \<and> X \<noteq> C \<and> Per B X C

goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Per A X C \<and> X \<noteq> C \<and> Per B X C
[PROOF STEP]
obtain C' where "X Midpoint C C' \<and> Cong A C A C'"
[PROOF STATE]
proof (prove)
using this:
Per A X C \<and> X \<noteq> C \<and> Per B X C

goal (1 subgoal):
 1. (\<And>C'. X Midpoint C C' \<and> Cong A C A C' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Per_def
[PROOF STATE]
proof (prove)
using this:
Per A X C \<and> X \<noteq> C \<and> Per B X C
Per ?A ?B ?C \<equiv> \<exists>C'. ?B Midpoint ?C C' \<and> Cong ?A ?C ?A C'

goal (1 subgoal):
 1. (\<And>C'. X Midpoint C C' \<and> Cong A C A C' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
X Midpoint C C' \<and> Cong A C A C'

goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Per A X C \<and> X \<noteq> C \<and> Per B X C
X Midpoint C C' \<and> Cong A C A C'
[PROOF STEP]
have "Col A B X"
[PROOF STATE]
proof (prove)
using this:
Per A X C \<and> X \<noteq> C \<and> Per B X C
X Midpoint C C' \<and> Cong A C A C'

goal (1 subgoal):
 1. Col A B X
[PROOF STEP]
by (smt Col_def assms midpoint_cong midpoint_distinct_2 not_cong_2134 per_double_cong upper_dim_axiom_def)
[PROOF STATE]
proof (state)
this:
Col A B X

goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
Per ?A2 ?X2 ?C2 \<and> ?X2 \<noteq> ?C2 \<and> Per ?B2 ?X2 ?C2 \<Longrightarrow> Col ?A2 ?B2 ?X2

goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Per ?A2 ?X2 ?C2 \<and> ?X2 \<noteq> ?C2 \<and> Per ?B2 ?X2 ?C2 \<Longrightarrow> Col ?A2 ?B2 ?X2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Per ?A2 ?X2 ?C2 \<and> ?X2 \<noteq> ?C2 \<and> Per ?B2 ?X2 ?C2 \<Longrightarrow> Col ?A2 ?B2 ?X2

goal (1 subgoal):
 1. \<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>A B C X. Per A X C \<and> X \<noteq> C \<and> Per B X C \<longrightarrow> Col A B X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma infinite_Collection:
  assumes a1:"infinite X"
  and     a2:"\<forall>b\<in>X. P(b)"
  shows "infinite {b\<in>X. P(b)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite {b \<in> X. P b}
[PROOF STEP]
using a1 a2
[PROOF STATE]
proof (prove)
using this:
infinite X
\<forall>b\<in>X. P b

goal (1 subgoal):
 1. infinite {b \<in> X. P b}
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>infinite X; \<forall>b\<in>X. P b; finite {b \<in> X. P b}\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (subgoal_tac "infinite (X - {b\<in>X. P b})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>infinite X; \<forall>b\<in>X. P b; finite {b \<in> X. P b}; infinite (X - {b \<in> X. P b})\<rbrakk> \<Longrightarrow> False
 2. \<lbrakk>infinite X; \<forall>b\<in>X. P b; finite {b \<in> X. P b}\<rbrakk> \<Longrightarrow> infinite (X - {b \<in> X. P b})
[PROOF STEP]
apply (simp add: set_diff_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>infinite X; \<forall>b\<in>X. P b; finite {b \<in> X. P b}\<rbrakk> \<Longrightarrow> infinite (X - {b \<in> X. P b})
[PROOF STEP]
apply (simp add: Diff_infinite_finite)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma pderiv_eval_deriv_monom:
  assumes "a \<in> carrier R"
  assumes "b \<in> carrier R"
  shows "to_fun (pderiv (monom P a n)) b = deriv (monom P a n) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_fun (pderiv (monom P a n)) b = deriv (monom P a n) b
[PROOF STEP]
using deriv_monom assms pderiv_monom
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> carrier R; ?b \<in> carrier R\<rbrakk> \<Longrightarrow> deriv (monom P ?a ?n) ?b = [?n] \<cdot> ?a \<otimes> ?b [^] (?n - 1)
a \<in> carrier R
b \<in> carrier R
?a \<in> carrier R \<Longrightarrow> pderiv (monom P ?a ?n) = monom P ([?n] \<cdot> ?a) (?n - 1)

goal (1 subgoal):
 1. to_fun (pderiv (monom P a n)) b = deriv (monom P a n) b
[PROOF STEP]
by (simp add: P_def UP_cring.to_fun_monom UP_cring_axioms)


[STATEMENT]
lemma (in linorder_topology) at_left_eq:
  "y < x \<Longrightarrow> at_left x = (INF a\<in>{..< x}. principal {a <..< x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y < x \<Longrightarrow> at_left x = (INF a\<in>{..<x}. principal {a<..<x})
[PROOF STEP]
by (subst at_within_order)
     (auto simp: greaterThan_Int_greaterThan greaterThanLessThan_eq[symmetric] min.absorb2 INF_constant
           intro!: INF_lower2 inf_absorb2)


[STATEMENT]
lemma zero_Integer_neq_bottom [simp]: "(0::Integer) \<noteq> \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<noteq> \<bottom>
[PROOF STEP]
by (simp add: zero_Integer_def)


[STATEMENT]
lemma Ex1_unfold[nitpick_unfold]: "Ex1 P \<equiv> \<exists>x. {x. P x} = {x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ex1 P \<equiv> \<exists>x. {x. P x} = {x}
[PROOF STEP]
apply (rule eq_reflection)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ex1 P = (\<exists>x. {x. P x} = {x})
[PROOF STEP]
apply (simp add: Ex1_def set_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)) = (\<exists>x. \<forall>xa. P xa = (xa = x))
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x) \<Longrightarrow> \<exists>x. \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (erule exE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x) \<Longrightarrow> \<exists>x. \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> \<exists>x. \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (rule_tac x = x in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (rule allI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (rename_tac y)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> P y = (y = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (erule_tac x = y in allE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>P x; P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> P y = (y = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
by auto


[STATEMENT]
lemma less_le_trans:
  assumes "x <\<^sub>a y" and "y \<le>\<^sub>a z"
  shows "x <\<^sub>a z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x <\<^sub>a z
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x <\<^sub>a y
y \<le>\<^sub>a z

goal (1 subgoal):
 1. x <\<^sub>a z
[PROOF STEP]
by (auto simp: less_le_not_le intro: order_trans)


[STATEMENT]
lemma unforwarded_non_volatile_reads_antimono:
 "\<And>W W'. W \<subseteq> W' \<Longrightarrow> unforwarded_non_volatile_reads xs W' \<subseteq> unforwarded_non_volatile_reads xs W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>W W'. W \<subseteq> W' \<Longrightarrow> unforwarded_non_volatile_reads xs W' \<subseteq> unforwarded_non_volatile_reads xs W
[PROOF STEP]
apply (induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>W W'. W \<subseteq> W' \<Longrightarrow> unforwarded_non_volatile_reads [] W' \<subseteq> unforwarded_non_volatile_reads [] W
 2. \<And>a xs W W'. \<lbrakk>\<And>W W'. W \<subseteq> W' \<Longrightarrow> unforwarded_non_volatile_reads xs W' \<subseteq> unforwarded_non_volatile_reads xs W; W \<subseteq> W'\<rbrakk> \<Longrightarrow> unforwarded_non_volatile_reads (a # xs) W' \<subseteq> unforwarded_non_volatile_reads (a # xs) W
[PROOF STEP]
apply (auto split: memref.splits dest: insert_monoD)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma vsubset_vsingleton_right: "A \<subseteq>\<^sub>\<circ> set {a} \<longleftrightarrow> A = set {a} \<or> A = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<subseteq>\<^sub>\<circ> set {a}) = (A = set {a} \<or> A = 0)
[PROOF STEP]
by (auto intro!: vsubset_antisym)


[STATEMENT]
lemma Nset2_prep1:"\<lbrakk>finite A; card A = Suc (Suc n) \<rbrakk> \<Longrightarrow> \<exists>x. x\<in>A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; card A = Suc (Suc n)\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> A
[PROOF STEP]
apply (frule card_nonzero[of "A"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>finite A; card A = Suc (Suc n)\<rbrakk> \<Longrightarrow> card A \<noteq> 0
 2. \<lbrakk>finite A; card A = Suc (Suc n); A \<noteq> {}\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> A
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; card A = Suc (Suc n); A \<noteq> {}\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> A
[PROOF STEP]
apply (simp add:nonempty_ex)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma real_of_nat_div4: "real (n div x) \<le> real n / real x" for n x :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (n div x) \<le> real n / real x
[PROOF STEP]
using real_of_nat_div2 [of n x]
[PROOF STATE]
proof (prove)
using this:
0 \<le> real n / real x - real (n div x)

goal (1 subgoal):
 1. real (n div x) \<le> real n / real x
[PROOF STEP]
by simp


[STATEMENT]
lemma agree_comm: "agree x x' = agree x' x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. agree x x' = agree x' x
[PROOF STEP]
unfolding agree_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>v. v \<in> fmdom' x \<and> v \<in> fmdom' x' \<longrightarrow> fmlookup x v = fmlookup x' v) = (\<forall>v. v \<in> fmdom' x' \<and> v \<in> fmdom' x \<longrightarrow> fmlookup x' v = fmlookup x v)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma sumhr_minus_one_realpow_zero [simp]: "\<And>N. sumhr (0, N + N, \<lambda>i. (-1) ^ (i + 1)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>N. sumhr (0, N + N, \<lambda>i. (- 1) ^ (i + 1)) = 0
[PROOF STEP]
unfolding sumhr_app
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>N. (*f2* (\<lambda>m n. \<Sum>i = m..<n. (- 1) ^ (i + 1))) 0 (N + N) = 0
[PROOF STEP]
by transfer (induct_tac N, auto)


[STATEMENT]
theorem newman':
  assumes wf: "wfP (R\<inverse>\<inverse>)"
  and lc: "\<And>a b c. R a b \<Longrightarrow> R a c \<Longrightarrow>
    \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d"
  shows "\<And>b c. R\<^sup>*\<^sup>* a b \<Longrightarrow> R\<^sup>*\<^sup>* a c \<Longrightarrow>
    \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b c. \<lbrakk>R\<^sup>*\<^sup>* a b; R\<^sup>*\<^sup>* a c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
using wf
[PROOF STATE]
proof (prove)
using this:
wfP R\<inverse>\<inverse>

goal (1 subgoal):
 1. \<And>b c. \<lbrakk>R\<^sup>*\<^sup>* a b; R\<^sup>*\<^sup>* a c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
proof induct
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x b c. \<lbrakk>\<And>y b c. \<lbrakk>R\<inverse>\<inverse> y x; R\<^sup>*\<^sup>* y b; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d; R\<^sup>*\<^sup>* x b; R\<^sup>*\<^sup>* x c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
case (less x b c)
[PROOF STATE]
proof (state)
this:
\<lbrakk>R\<inverse>\<inverse> ?y x; R\<^sup>*\<^sup>* ?y ?b; R\<^sup>*\<^sup>* ?y ?c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* ?b d \<and> R\<^sup>*\<^sup>* ?c d
R\<^sup>*\<^sup>* x b
R\<^sup>*\<^sup>* x c

goal (1 subgoal):
 1. \<And>x b c. \<lbrakk>\<And>y b c. \<lbrakk>R\<inverse>\<inverse> y x; R\<^sup>*\<^sup>* y b; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d; R\<^sup>*\<^sup>* x b; R\<^sup>*\<^sup>* x c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
note IH = \<open>\<And>y b c. \<lbrakk>R\<inverse>\<inverse> y x; R\<^sup>*\<^sup>* y b; R\<^sup>*\<^sup>* y c\<rbrakk>
                     \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d\<close>
[PROOF STATE]
proof (state)
this:
\<lbrakk>R\<inverse>\<inverse> ?y x; R\<^sup>*\<^sup>* ?y ?b; R\<^sup>*\<^sup>* ?y ?c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* ?b d \<and> R\<^sup>*\<^sup>* ?c d

goal (1 subgoal):
 1. \<And>x b c. \<lbrakk>\<And>y b c. \<lbrakk>R\<inverse>\<inverse> y x; R\<^sup>*\<^sup>* y b; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d; R\<^sup>*\<^sup>* x b; R\<^sup>*\<^sup>* x c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
have xc: "R\<^sup>*\<^sup>* x c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R\<^sup>*\<^sup>* x c
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* x c

goal (1 subgoal):
 1. \<And>x b c. \<lbrakk>\<And>y b c. \<lbrakk>R\<inverse>\<inverse> y x; R\<^sup>*\<^sup>* y b; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d; R\<^sup>*\<^sup>* x b; R\<^sup>*\<^sup>* x c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
have xb: "R\<^sup>*\<^sup>* x b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R\<^sup>*\<^sup>* x b
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* x b

goal (1 subgoal):
 1. \<And>x b c. \<lbrakk>\<And>y b c. \<lbrakk>R\<inverse>\<inverse> y x; R\<^sup>*\<^sup>* y b; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d; R\<^sup>*\<^sup>* x b; R\<^sup>*\<^sup>* x c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* x b

goal (1 subgoal):
 1. \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
proof (rule converse_rtranclpE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = b \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
 2. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
assume "x = b"
[PROOF STATE]
proof (state)
this:
x = b

goal (2 subgoals):
 1. x = b \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
 2. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
with xc
[PROOF STATE]
proof (chain)
picking this:
R\<^sup>*\<^sup>* x c
x = b
[PROOF STEP]
have "R\<^sup>*\<^sup>* b c"
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* x c
x = b

goal (1 subgoal):
 1. R\<^sup>*\<^sup>* b c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* b c

goal (2 subgoals):
 1. x = b \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
 2. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* b c

goal (1 subgoal):
 1. \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
\<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
assume xy: "R x y"
[PROOF STATE]
proof (state)
this:
R x y

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
assume yb: "R\<^sup>*\<^sup>* y b"
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* y b

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y b\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
from xc
[PROOF STATE]
proof (chain)
picking this:
R\<^sup>*\<^sup>* x c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* x c

goal (1 subgoal):
 1. \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
proof (rule converse_rtranclpE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = c \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
 2. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
assume "x = c"
[PROOF STATE]
proof (state)
this:
x = c

goal (2 subgoals):
 1. x = c \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
 2. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
with xb
[PROOF STATE]
proof (chain)
picking this:
R\<^sup>*\<^sup>* x b
x = c
[PROOF STEP]
have "R\<^sup>*\<^sup>* c b"
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* x b
x = c

goal (1 subgoal):
 1. R\<^sup>*\<^sup>* c b
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* c b

goal (2 subgoals):
 1. x = c \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
 2. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* c b

goal (1 subgoal):
 1. \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
\<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
fix y'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
assume y'c: "R\<^sup>*\<^sup>* y' c"
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* y' c

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
assume xy': "R x y'"
[PROOF STATE]
proof (state)
this:
R x y'

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
with xy
[PROOF STATE]
proof (chain)
picking this:
R x y
R x y'
[PROOF STEP]
obtain u where u: "R\<^sup>*\<^sup>* y u" "R\<^sup>*\<^sup>* y' u"
[PROOF STATE]
proof (prove)
using this:
R x y
R x y'

goal (1 subgoal):
 1. (\<And>u. \<lbrakk>R\<^sup>*\<^sup>* y u; R\<^sup>*\<^sup>* y' u\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (blast dest: lc)
[PROOF STATE]
proof (state)
this:
R\<^sup>*\<^sup>* y u
R\<^sup>*\<^sup>* y' u

goal (1 subgoal):
 1. \<And>y. \<lbrakk>R x y; R\<^sup>*\<^sup>* y c\<rbrakk> \<Longrightarrow> \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
from yb u y'c
[PROOF STATE]
proof (chain)
picking this:
R\<^sup>*\<^sup>* y b
R\<^sup>*\<^sup>* y u
R\<^sup>*\<^sup>* y' u
R\<^sup>*\<^sup>* y' c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
R\<^sup>*\<^sup>* y b
R\<^sup>*\<^sup>* y u
R\<^sup>*\<^sup>* y' u
R\<^sup>*\<^sup>* y' c

goal (1 subgoal):
 1. \<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d
[PROOF STEP]
by (blast del: rtranclp.rtrancl_refl
            intro: rtranclp_trans
            dest: IH [OF conversepI, OF xy] IH [OF conversepI, OF xy'])
[PROOF STATE]
proof (state)
this:
\<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>d. R\<^sup>*\<^sup>* b d \<and> R\<^sup>*\<^sup>* c d

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lift_None: "(lift h inp i = None) = (inp i = None)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (lift h inp i = None) = (inp i = None)
[PROOF STEP]
unfolding lift_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((case inp i of None \<Rightarrow> None | Some v \<Rightarrow> Some (h v)) = None) = (inp i = None)
[PROOF STEP]
by (cases "inp i", auto)


[STATEMENT]
lemma LIMSEQ_powa:
   "1 \<le> a \<Longrightarrow> (\<lambda>n. a pow\<^sub>\<rat> (incseq_of x n)) \<longlonglongrightarrow> a powa x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> a \<Longrightarrow> (\<lambda>n. a pow\<^sub>\<rat> incseq_of x n) \<longlonglongrightarrow> a powa x
[PROOF STEP]
unfolding powa_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> a \<Longrightarrow> (\<lambda>n. a pow\<^sub>\<rat> incseq_of x n) \<longlonglongrightarrow> (THE y. (\<lambda>n. a pow\<^sub>\<rat> incseq_of x n) \<longlonglongrightarrow> y)
[PROOF STEP]
by (erule theI' [OF LIMSEQ_powrat_incseq_of_ex1])


[STATEMENT]
theorem wls_psubst_subst_compose_freshEnv:
assumes "wlsEnv rho" and "wls s X" and "wls (asSort ys) Y"
and "freshEnv ys y rho"
shows "((X #[Y / y]_ys) #[rho]) = ((X #[rho]) #[(Y #[rho]) / y]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X #[Y / y]_ys #[rho] = X #[rho] #[Y #[rho] / y]_ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wlsEnv rho
wls s X
wls (asSort ys) Y
freshEnv ys y rho

goal (1 subgoal):
 1. X #[Y / y]_ys #[rho] = X #[rho] #[Y #[rho] / y]_ys
[PROOF STEP]
by (simp add: psubst_subst_compose_freshEnv)


[STATEMENT]
lemma dirichlet_prod_moebius_commute:
  "dirichlet_prod f moebius_mu = dirichlet_prod moebius_mu f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dirichlet_prod f moebius_mu = dirichlet_prod moebius_mu f
[PROOF STEP]
by (subst dirichlet_prod_def, subst dirichlet_prod_altdef1) (simp add: moebius_commute)


[STATEMENT]
lemma fls_integral_X_inv_power:
  assumes "n \<ge> 2"
  shows
    "fls_integral (fls_X_inv ^ n :: 'a :: {ring_1,inverse} fls) =
      fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n-1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_integral (fls_X_inv ^ n) = fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)
[PROOF STEP]
proof (rule fls_eqI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. fls_integral (fls_X_inv ^ n) $$ x = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ x
[PROOF STEP]
fix k
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. fls_integral (fls_X_inv ^ n) $$ x = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ x
[PROOF STEP]
show
    "fls_integral (fls_X_inv ^ n :: 'a fls) $$ k=
      (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n-1)) $$ k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
proof (cases "k=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. k = 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
 2. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
k = 0

goal (2 subgoals):
 1. k = 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
 2. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
2 \<le> n
k = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
2 \<le> n
k = 0

goal (1 subgoal):
 1. fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k

goal (1 subgoal):
 1. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
k \<noteq> 0

goal (1 subgoal):
 1. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
2 \<le> n
[PROOF STEP]
have "int (n-1) = int n - 1"
[PROOF STATE]
proof (prove)
using this:
2 \<le> n

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

goal (1 subgoal):
 1. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
hence
      "(fls_const (inverse (of_int (1 - int n))) * (fls_X_inv:: 'a fls) ^ (n-1)) $$ k =
      (if k = 1 - int n then inverse (of_int k) else 0)"
[PROOF STATE]
proof (prove)
using this:
int (n - 1) = int n - 1

goal (1 subgoal):
 1. (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k = (if k = 1 - int n then inverse (of_int k) else (0::'a))
[PROOF STEP]
by (simp add: fls_X_inv_power_times_conv_shift(2))
[PROOF STATE]
proof (state)
this:
(fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k = (if k = 1 - int n then inverse (of_int k) else (0::'a))

goal (1 subgoal):
 1. k \<noteq> 0 \<Longrightarrow> fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
with False
[PROOF STATE]
proof (chain)
picking this:
k \<noteq> 0
(fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k = (if k = 1 - int n then inverse (of_int k) else (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0
(fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k = (if k = 1 - int n then inverse (of_int k) else (0::'a))

goal (1 subgoal):
 1. fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fls_integral (fls_X_inv ^ n) $$ k = (fls_const (inverse (of_int (1 - int n))) * fls_X_inv ^ (n - 1)) $$ k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma SUP_divide_ennreal: "(SUP i\<in>I. f i) / c = (SUP i\<in>I. f i / c ::ennreal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (f ` I) / c = (SUP i\<in>I. f i / c)
[PROOF STEP]
using SUP_mult_right_ennreal
[PROOF STATE]
proof (prove)
using this:
Sup (?f ` ?I) * ?c = (SUP i\<in>?I. ?f i * ?c)

goal (1 subgoal):
 1. Sup (f ` I) / c = (SUP i\<in>I. f i / c)
[PROOF STEP]
by (simp add: divide_ennreal_def)


[STATEMENT]
lemma clauseOrderIrrelevant:
  shows "equivalentFormulae (F1 @ F @ F' @ F2) (F1 @ F' @ F @ F2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equivalentFormulae (F1 @ F @ F' @ F2) (F1 @ F' @ F @ F2)
[PROOF STEP]
unfolding equivalentFormulae_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>valuation. model valuation (F1 @ F @ F' @ F2) = model valuation (F1 @ F' @ F @ F2)
[PROOF STEP]
by (auto simp add: formulaTrueIffAllClausesAreTrue)


[STATEMENT]
lemma dvd_sym_div_mult_left [simp]:
  "b * (a symdiv b) = a" if "b > 0" "b dvd a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b * (a symdiv b) = a
[PROOF STEP]
using dvd_sym_div_mult_right[OF that]
[PROOF STATE]
proof (prove)
using this:
a symdiv b * b = a

goal (1 subgoal):
 1. b * (a symdiv b) = a
[PROOF STEP]
by (simp add: ac_simps)


[STATEMENT]
lemma Ex1_unfold[nitpick_unfold]: "Ex1 P \<equiv> \<exists>x. {x. P x} = {x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ex1 P \<equiv> \<exists>x. {x. P x} = {x}
[PROOF STEP]
apply (rule eq_reflection)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ex1 P = (\<exists>x. {x. P x} = {x})
[PROOF STEP]
apply (simp add: Ex1_def set_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)) = (\<exists>x. \<forall>xa. P xa = (xa = x))
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x) \<Longrightarrow> \<exists>x. \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (erule exE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x) \<Longrightarrow> \<exists>x. \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> \<exists>x. \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (rule_tac x = x in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> \<forall>xa. P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (rule allI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> P xa = (xa = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (rename_tac y)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>P x; \<forall>y. P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> P y = (y = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
apply (erule_tac x = y in allE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>P x; P y \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> P y = (y = x)
 2. \<exists>x. \<forall>xa. P xa = (xa = x) \<Longrightarrow> \<exists>x. P x \<and> (\<forall>y. P y \<longrightarrow> y = x)
[PROOF STEP]
by auto