[STATEMENT]
lemma le_onorm:
  assumes "bounded_linear f"
  shows "norm (f x) / norm x \<le> onorm f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
interpret f: bounded_linear f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_linear f
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
obtain b where "0 \<le> b" and "\<forall>x. norm (f x) \<le> norm x * b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>b. \<lbrakk>0 \<le> b; \<forall>x. norm (f x) \<le> norm x * b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using f.nonneg_bounded
[PROOF STATE]
proof (prove)
using this:
\<exists>K\<ge>0. \<forall>x. norm (f x) \<le> norm x * K

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>0 \<le> b; \<forall>x. norm (f x) \<le> norm x * b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> b
\<forall>x. norm (f x) \<le> norm x * b

goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> b
\<forall>x. norm (f x) \<le> norm x * b
[PROOF STEP]
have "\<forall>x. norm (f x) / norm x \<le> b"
[PROOF STATE]
proof (prove)
using this:
0 \<le> b
\<forall>x. norm (f x) \<le> norm x * b

goal (1 subgoal):
 1. \<forall>x. norm (f x) / norm x \<le> b
[PROOF STEP]
by (clarify, case_tac "x = 0",
      simp_all add: f.zero pos_divide_le_eq mult.commute)
[PROOF STATE]
proof (state)
this:
\<forall>x. norm (f x) / norm x \<le> b

goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. norm (f x) / norm x \<le> b
[PROOF STEP]
have "bdd_above (range (\<lambda>x. norm (f x) / norm x))"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. norm (f x) / norm x \<le> b

goal (1 subgoal):
 1. bdd_above (range (\<lambda>x. norm (f x) / norm x))
[PROOF STEP]
unfolding bdd_above_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x. norm (f x) / norm x \<le> b

goal (1 subgoal):
 1. \<exists>M. \<forall>x\<in>range (\<lambda>x. norm (f x) / norm x). x \<le> M
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
bdd_above (range (\<lambda>x. norm (f x) / norm x))

goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
with UNIV_I
[PROOF STATE]
proof (chain)
picking this:
?x \<in> UNIV
bdd_above (range (\<lambda>x. norm (f x) / norm x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> UNIV
bdd_above (range (\<lambda>x. norm (f x) / norm x))

goal (1 subgoal):
 1. norm (f x) / norm x \<le> onorm f
[PROOF STEP]
unfolding onorm_def
[PROOF STATE]
proof (prove)
using this:
?x \<in> UNIV
bdd_above (range (\<lambda>x. norm (f x) / norm x))

goal (1 subgoal):
 1. norm (f x) / norm x \<le> (SUP x. norm (f x) / norm x)
[PROOF STEP]
by (rule cSUP_upper)
[PROOF STATE]
proof (state)
this:
norm (f x) / norm x \<le> onorm f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma locate_pred_ex:
assumes "\<And> a. a \<in> set al \<Longrightarrow> 0 < f a"
and "i < lsum f al"
shows "\<exists> n_j. locate_pred f al i n_j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n_j. locate_pred f al i n_j
[PROOF STEP]
using assms less_lsum_nchotomy
[PROOF STATE]
proof (prove)
using this:
?a \<in> set al \<Longrightarrow> 0 < f ?a
i < lsum f al
\<lbrakk>\<And>a. a \<in> set ?al \<Longrightarrow> 0 < ?f a; ?i < lsum ?f ?al\<rbrakk> \<Longrightarrow> \<exists>n j. n < length ?al \<and> j < ?f (?al ! n) \<and> ?i = lsum ?f (take n ?al) + j

goal (1 subgoal):
 1. \<exists>n_j. locate_pred f al i n_j
[PROOF STEP]
unfolding locate_pred_def
[PROOF STATE]
proof (prove)
using this:
?a \<in> set al \<Longrightarrow> 0 < f ?a
i < lsum f al
\<lbrakk>\<And>a. a \<in> set ?al \<Longrightarrow> 0 < ?f a; ?i < lsum ?f ?al\<rbrakk> \<Longrightarrow> \<exists>n j. n < length ?al \<and> j < ?f (?al ! n) \<and> ?i = lsum ?f (take n ?al) + j

goal (1 subgoal):
 1. \<exists>n_j. fst n_j < length al \<and> snd n_j < f (al ! fst n_j) \<and> i = lsum f (take (fst n_j) al) + snd n_j
[PROOF STEP]
by force


[STATEMENT]
lemma (in pbinop) fbinop_vcard:
  assumes "x \<in>\<^sub>\<circ> \<D>\<^sub>\<circ> f"
  shows "vcard x = 2\<^sub>\<nat>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vcard x = 2\<^sub>\<nat>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. vcard x = 2\<^sub>\<nat>
[PROOF STEP]
from assms dom.fbrelation_axioms
[PROOF STATE]
proof (chain)
picking this:
x \<in>\<^sub>\<circ> \<D>\<^sub>\<circ> f
fbrelation (\<D>\<^sub>\<circ> f)
[PROOF STEP]
obtain a b where x_def: "x = [a, b]\<^sub>\<circ>"
[PROOF STATE]
proof (prove)
using this:
x \<in>\<^sub>\<circ> \<D>\<^sub>\<circ> f
fbrelation (\<D>\<^sub>\<circ> f)

goal (1 subgoal):
 1. (\<And>a b. x = [a, b]\<^sub>\<circ> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x = [a, b]\<^sub>\<circ>

goal (1 subgoal):
 1. vcard x = 2\<^sub>\<nat>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vcard x = 2\<^sub>\<nat>
[PROOF STEP]
by (auto simp: x_def nat_omega_simps)
[PROOF STATE]
proof (state)
this:
vcard x = 2\<^sub>\<nat>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma RepFun_cong [cong]:
    "\<lbrakk> A=B;  \<And>x. x \<^bold>\<in> B \<Longrightarrow> f(x)=g(x) \<rbrakk>  \<Longrightarrow> RepFun A f = RepFun B g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A = B; \<And>x. x \<^bold>\<in> B \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> RepFun A f = RepFun B g
[PROOF STEP]
by (simp add: RepFun_def)


[STATEMENT]
lemma discrete_topology_unique_alt:
  "discrete_topology U = X \<longleftrightarrow> topspace X \<subseteq> U \<and> (\<forall>x \<in> U. openin X {x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (discrete_topology U = X) = (topspace X \<subseteq> U \<and> (\<forall>x\<in>U. openin X {x}))
[PROOF STEP]
using openin_subset
[PROOF STATE]
proof (prove)
using this:
openin ?U ?S \<Longrightarrow> ?S \<subseteq> topspace ?U

goal (1 subgoal):
 1. (discrete_topology U = X) = (topspace X \<subseteq> U \<and> (\<forall>x\<in>U. openin X {x}))
[PROOF STEP]
by (auto simp: discrete_topology_unique)


[STATEMENT]
lemma open_map_fst: "open_map (prod_topology X Y) X fst"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open_map (prod_topology X Y) X fst
[PROOF STEP]
unfolding open_map_def openin_prod_topology_alt
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>U. (\<forall>x y. (x, y) \<in> U \<longrightarrow> (\<exists>Ua V. openin X Ua \<and> openin Y V \<and> x \<in> Ua \<and> y \<in> V \<and> Ua \<times> V \<subseteq> U)) \<longrightarrow> openin X (fst ` U)
[PROOF STEP]
by (force simp: openin_subopen [of X "fst ` _"] intro: subset_fst_imageI)


[STATEMENT]
theorem (in dcharacter) prime_nonprincipal_is_primitive:
  assumes "prime n"
  assumes "\<chi> \<noteq> principal_dchar n"
  shows   "primitive_dchar n \<chi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
fix m
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
assume "induced_modulus m"
[PROOF STATE]
proof (state)
this:
induced_modulus m

goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
induced_modulus m
[PROOF STEP]
have "m = n"
[PROOF STATE]
proof (prove)
using this:
induced_modulus m

goal (1 subgoal):
 1. m = n
[PROOF STEP]
using assms prime_nat_iff induced_modulus_def
          one_induced_iff_principal
[PROOF STATE]
proof (prove)
using this:
induced_modulus m
prime n
\<chi> \<noteq> principal_dchar n
prime ?n = (1 < ?n \<and> (\<forall>m. m dvd ?n \<longrightarrow> m = 1 \<or> m = ?n))
induced_modulus ?d = (?d dvd n \<and> (\<forall>a. coprime a n \<and> [a = 1] (mod ?d) \<longrightarrow> \<chi> a = 1))
induced_modulus 1 = (\<chi> = principal_dchar n)

goal (1 subgoal):
 1. m = n
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m = n

goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
induced_modulus ?m3 \<Longrightarrow> ?m3 = n

goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
induced_modulus ?m3 \<Longrightarrow> ?m3 = n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
induced_modulus ?m3 \<Longrightarrow> ?m3 = n

goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
using primitive_dchar_iff
[PROOF STATE]
proof (prove)
using this:
induced_modulus ?m3 \<Longrightarrow> ?m3 = n
primitive_dchar n \<chi> = (\<not> (\<exists>d<n. induced_modulus d))

goal (1 subgoal):
 1. primitive_dchar n \<chi>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
primitive_dchar n \<chi>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rGamma_series_minus_of_nat:
  "eventually (\<lambda>n. rGamma_series (- of_nat k) n = 0) sequentially"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. rGamma_series (- of_nat k) n = (0::'a)
[PROOF STEP]
using eventually_ge_at_top[of k]
[PROOF STATE]
proof (prove)
using this:
eventually ((\<le>) k) sequentially

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. rGamma_series (- of_nat k) n = (0::'a)
[PROOF STEP]
by eventually_elim (auto simp: rGamma_series_def pochhammer_of_nat_eq_0_iff)


[STATEMENT]
lemma rel_mset_split:
  assumes rel: "rel_mset rel (X1+X2) Y"
  shows "\<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
obtain xs1 where xs1: "mset xs1 = X1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>xs1. mset xs1 = X1 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ex_mset
[PROOF STATE]
proof (prove)
using this:
\<exists>xs. mset xs = ?X

goal (1 subgoal):
 1. (\<And>xs1. mset xs1 = X1 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset xs1 = X1

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
obtain xs2 where xs2: "mset xs2 = X2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>xs2. mset xs2 = X2 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ex_mset
[PROOF STATE]
proof (prove)
using this:
\<exists>xs. mset xs = ?X

goal (1 subgoal):
 1. (\<And>xs2. mset xs2 = X2 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset xs2 = X2

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
from xs1 xs2
[PROOF STATE]
proof (chain)
picking this:
mset xs1 = X1
mset xs2 = X2
[PROOF STEP]
have "mset (xs1 @ xs2) = X1 + X2"
[PROOF STATE]
proof (prove)
using this:
mset xs1 = X1
mset xs2 = X2

goal (1 subgoal):
 1. mset (xs1 @ xs2) = X1 + X2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset (xs1 @ xs2) = X1 + X2

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
from rel_mset_free[OF rel this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>ys. mset ys = Y \<and> list_all2 rel (xs1 @ xs2) ys
[PROOF STEP]
obtain ys
    where ys: "mset ys = Y" "list_all2 rel (xs1 @ xs2) ys"
[PROOF STATE]
proof (prove)
using this:
\<exists>ys. mset ys = Y \<and> list_all2 rel (xs1 @ xs2) ys

goal (1 subgoal):
 1. (\<And>ys. \<lbrakk>mset ys = Y; list_all2 rel (xs1 @ xs2) ys\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset ys = Y
list_all2 rel (xs1 @ xs2) ys

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
mset ys = Y
list_all2 rel (xs1 @ xs2) ys
[PROOF STEP]
obtain ys1 ys2
    where ys12: "ys = ys1 @ ys2"
      and xs1ys1: "list_all2 rel xs1 ys1"
      and xs2ys2: "list_all2 rel xs2 ys2"
[PROOF STATE]
proof (prove)
using this:
mset ys = Y
list_all2 rel (xs1 @ xs2) ys

goal (1 subgoal):
 1. (\<And>ys1 ys2. \<lbrakk>ys = ys1 @ ys2; list_all2 rel xs1 ys1; list_all2 rel xs2 ys2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using list_all2_append1
[PROOF STATE]
proof (prove)
using this:
mset ys = Y
list_all2 rel (xs1 @ xs2) ys
list_all2 ?P (?xs @ ?ys) ?zs = (\<exists>us vs. ?zs = us @ vs \<and> length us = length ?xs \<and> length vs = length ?ys \<and> list_all2 ?P ?xs us \<and> list_all2 ?P ?ys vs)

goal (1 subgoal):
 1. (\<And>ys1 ys2. \<lbrakk>ys = ys1 @ ys2; list_all2 rel xs1 ys1; list_all2 rel xs2 ys2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
ys = ys1 @ ys2
list_all2 rel xs1 ys1
list_all2 rel xs2 ys2

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
from ys12 ys
[PROOF STATE]
proof (chain)
picking this:
ys = ys1 @ ys2
mset ys = Y
list_all2 rel (xs1 @ xs2) ys
[PROOF STEP]
have "Y = mset ys1 + mset ys2"
[PROOF STATE]
proof (prove)
using this:
ys = ys1 @ ys2
mset ys = Y
list_all2 rel (xs1 @ xs2) ys

goal (1 subgoal):
 1. Y = mset ys1 + mset ys2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Y = mset ys1 + mset ys2

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Y = mset ys1 + mset ys2

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
from xs1 xs1ys1
[PROOF STATE]
proof (chain)
picking this:
mset xs1 = X1
list_all2 rel xs1 ys1
[PROOF STEP]
have "rel_mset rel X1 (mset ys1)"
[PROOF STATE]
proof (prove)
using this:
mset xs1 = X1
list_all2 rel xs1 ys1

goal (1 subgoal):
 1. rel_mset rel X1 (mset ys1)
[PROOF STEP]
unfolding rel_mset_def
[PROOF STATE]
proof (prove)
using this:
mset xs1 = X1
list_all2 rel xs1 ys1

goal (1 subgoal):
 1. \<exists>xs ys. mset xs = X1 \<and> mset ys = mset ys1 \<and> list_all2 rel xs ys
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_mset rel X1 (mset ys1)

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
rel_mset rel X1 (mset ys1)

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
from xs2 xs2ys2
[PROOF STATE]
proof (chain)
picking this:
mset xs2 = X2
list_all2 rel xs2 ys2
[PROOF STEP]
have "rel_mset rel X2 (mset ys2)"
[PROOF STATE]
proof (prove)
using this:
mset xs2 = X2
list_all2 rel xs2 ys2

goal (1 subgoal):
 1. rel_mset rel X2 (mset ys2)
[PROOF STEP]
unfolding rel_mset_def
[PROOF STATE]
proof (prove)
using this:
mset xs2 = X2
list_all2 rel xs2 ys2

goal (1 subgoal):
 1. \<exists>xs ys. mset xs = X2 \<and> mset ys = mset ys2 \<and> list_all2 rel xs ys
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_mset rel X2 (mset ys2)

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Y = mset ys1 + mset ys2
rel_mset rel X1 (mset ys1)
rel_mset rel X2 (mset ys2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Y = mset ys1 + mset ys2
rel_mset rel X1 (mset ys1)
rel_mset rel X2 (mset ys2)

goal (1 subgoal):
 1. \<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2
[PROOF STEP]
by (subst exI[of _ "mset ys1"], subst exI[of _ "mset ys2"],auto)
[PROOF STATE]
proof (state)
this:
\<exists>Y1 Y2. Y = Y1 + Y2 \<and> rel_mset rel X1 Y1 \<and> rel_mset rel X2 Y2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem sup_state_opt_trans [trans]:
  "\<lbrakk>G \<turnstile> a <=' b; G \<turnstile> b <=' c\<rbrakk> \<Longrightarrow> G \<turnstile> a <=' c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<turnstile> a <=' b; G \<turnstile> b <=' c\<rbrakk> \<Longrightarrow> G \<turnstile> a <=' c
[PROOF STEP]
by (auto intro: sup_state_trans
           simp add: sup_state_opt_def Opt.le_def lesub_def
           split: option.splits)


[STATEMENT]
lemma Proj_range[simp]: "Proj S *\<^sub>S top = S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Proj S *\<^sub>S \<top> = S
[PROOF STEP]
proof transfer
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>S. closed_csubspace S \<Longrightarrow> closure (range (projection S)) = S
[PROOF STEP]
fix S :: \<open>'a set\<close>
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>S. closed_csubspace S \<Longrightarrow> closure (range (projection S)) = S
[PROOF STEP]
assume \<open>closed_csubspace S\<close>
[PROOF STATE]
proof (state)
this:
closed_csubspace S

goal (1 subgoal):
 1. \<And>S. closed_csubspace S \<Longrightarrow> closure (range (projection S)) = S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
closed_csubspace S
[PROOF STEP]
have "closure (range (projection S)) \<subseteq> S"
[PROOF STATE]
proof (prove)
using this:
closed_csubspace S

goal (1 subgoal):
 1. closure (range (projection S)) \<subseteq> S
[PROOF STEP]
by (metis closed_csubspace.closed closed_csubspace.subspace closure_closed complex_vector.subspace_0 csubspace_is_convex dual_order.eq_iff insert_absorb insert_not_empty projection_image)
[PROOF STATE]
proof (state)
this:
closure (range (projection S)) \<subseteq> S

goal (1 subgoal):
 1. \<And>S. closed_csubspace S \<Longrightarrow> closure (range (projection S)) = S
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
closure (range (projection S)) \<subseteq> S

goal (1 subgoal):
 1. \<And>S. closed_csubspace S \<Longrightarrow> closure (range (projection S)) = S
[PROOF STEP]
have "S \<subseteq> closure (range (projection S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<subseteq> closure (range (projection S))
[PROOF STEP]
using \<open>closed_csubspace S\<close>
[PROOF STATE]
proof (prove)
using this:
closed_csubspace S

goal (1 subgoal):
 1. S \<subseteq> closure (range (projection S))
[PROOF STEP]
by (metis closed_csubspace_def closure_subset csubspace_is_convex equals0D projection_image subset_iff)
[PROOF STATE]
proof (state)
this:
S \<subseteq> closure (range (projection S))

goal (1 subgoal):
 1. \<And>S. closed_csubspace S \<Longrightarrow> closure (range (projection S)) = S
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
closure (range (projection S)) \<subseteq> S
S \<subseteq> closure (range (projection S))
[PROOF STEP]
show \<open>closure (range (projection S)) = S\<close>
[PROOF STATE]
proof (prove)
using this:
closure (range (projection S)) \<subseteq> S
S \<subseteq> closure (range (projection S))

goal (1 subgoal):
 1. closure (range (projection S)) = S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
closure (range (projection S)) = S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_derivative_vec[derivative_intros]:
  assumes "\<And>i. ((\<lambda>x. f i x) has_derivative (\<lambda>h. f' i h)) F"
  shows "((\<lambda>x. \<chi> i. f i x) has_derivative (\<lambda>h. \<chi> i. f' i h)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. f i x) has_derivative (\<lambda>h. \<chi>i. f' i h)) F
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. f i x) has_derivative (\<lambda>h. \<chi>i. f' i h)) F
[PROOF STEP]
have *: "(\<chi> i. f i x) = (\<Sum>i\<in>UNIV. axis i (f i x))" "(\<chi> i. f' i x) = (\<Sum>i\<in>UNIV. axis i (f' i x))" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>i. f i x) = (\<Sum>i\<in>UNIV. axis i (f i x)) &&& (\<chi>i. f' i x) = (\<Sum>i\<in>UNIV. axis i (f' i x))
[PROOF STEP]
by (simp_all add: axis_def sum.If_cases vec_eq_iff)
[PROOF STATE]
proof (state)
this:
(\<chi>i. f i ?x) = (\<Sum>i\<in>UNIV. axis i (f i ?x))
(\<chi>i. f' i ?x) = (\<Sum>i\<in>UNIV. axis i (f' i ?x))

goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. f i x) has_derivative (\<lambda>h. \<chi>i. f' i h)) F
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. f i x) has_derivative (\<lambda>h. \<chi>i. f' i h)) F
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<Sum>i\<in>UNIV. axis i (f i x)) has_derivative (\<lambda>h. \<Sum>i\<in>UNIV. axis i (f' i h))) F
[PROOF STEP]
by (intro has_derivative_sum bounded_linear.has_derivative[OF bounded_linear_axis] assms)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. \<chi>i. f i x) has_derivative (\<lambda>h. \<chi>i. f' i h)) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem closure_sound_complete:
assumes result: "closure as (init r,init s) = Some(ws,R)"
and atoms: "set as = atoms r \<union> atoms s"
shows "ws = [] \<longleftrightarrow> lang r = lang s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ws = []) = (lang r = lang s)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (ws = []) = (lang r = lang s)
[PROOF STEP]
have leq: "(lang r = lang s) =
  (\<forall>(r',s') \<in> {((r0,s0),(delta a r0,delta a s0))| r0 s0 a. a : set as}^* `` {(init r,init s)}.
    final r' = final s')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (lang r = lang s) = (\<forall>(r', s')\<in>{((r0, s0), delta a r0, delta a s0) |r0 s0 a. a \<in> set as}\<^sup>* `` {(init r, init s)}. final r' = final s')
[PROOF STEP]
by (simp add: atoms rtrancl_fold_product Ball_def lang_eq_ext_Nil_fold_Deriv imp_ex
      L_deltas L_init final_iff_Nil del: Un_iff)
[PROOF STATE]
proof (state)
this:
(lang r = lang s) = (\<forall>(r', s')\<in>{((r0, s0), delta a r0, delta a s0) |r0 s0 a. a \<in> set as}\<^sup>* `` {(init r, init s)}. final r' = final s')

goal (1 subgoal):
 1. (ws = []) = (lang r = lang s)
[PROOF STEP]
have "{(x,y). y \<in> set ((\<lambda>(p,q). map (\<lambda>a. (delta a p, delta a q)) as) x)} =
    {((r,s), delta a r, delta a s) |r s a. a \<in> set as}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)} = {((r, s), delta a r, delta a s) |r s a. a \<in> set as}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)} = {((r, s), delta a r, delta a s) |r s a. a \<in> set as}

goal (1 subgoal):
 1. (ws = []) = (lang r = lang s)
[PROOF STEP]
with atoms rtrancl_while_Some[OF result[unfolded closure_def]]
[PROOF STATE]
proof (chain)
picking this:
set as = atoms r \<union> atoms s
if ws = [] then R = {(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)}\<^sup>* `` {(init r, init s)} \<and> (\<forall>z\<in>R. case z of (p, q) \<Rightarrow> final p = final q) else \<not> (case hd ws of (p, q) \<Rightarrow> final p = final q) \<and> hd ws \<in> {(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)}\<^sup>* `` {(init r, init s)}
{(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)} = {((r, s), delta a r, delta a s) |r s a. a \<in> set as}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
set as = atoms r \<union> atoms s
if ws = [] then R = {(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)}\<^sup>* `` {(init r, init s)} \<and> (\<forall>z\<in>R. case z of (p, q) \<Rightarrow> final p = final q) else \<not> (case hd ws of (p, q) \<Rightarrow> final p = final q) \<and> hd ws \<in> {(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)}\<^sup>* `` {(init r, init s)}
{(x, y). y \<in> set (case x of (p, q) \<Rightarrow> map (\<lambda>a. (delta a p, delta a q)) as)} = {((r, s), delta a r, delta a s) |r s a. a \<in> set as}

goal (1 subgoal):
 1. (ws = []) = (lang r = lang s)
[PROOF STEP]
by (auto simp add: leq Ball_def split: if_splits)
[PROOF STATE]
proof (state)
this:
(ws = []) = (lang r = lang s)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma l7_9:
  assumes "A Midpoint P X" and
    "A Midpoint Q X"
  shows "P = Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P = Q
[PROOF STEP]
using assms(1) assms(2) l7_2 symmetric_point_uniqueness
[PROOF STATE]
proof (prove)
using this:
A Midpoint P X
A Midpoint Q X
?M Midpoint ?A ?B \<Longrightarrow> ?M Midpoint ?B ?A
\<lbrakk>?P Midpoint ?A ?P1.0; ?P Midpoint ?A ?P2.0\<rbrakk> \<Longrightarrow> ?P1.0 = ?P2.0

goal (1 subgoal):
 1. P = Q
[PROOF STEP]
by blast


[STATEMENT]
lemma fun_point_Union_set_eq:
  "fun_point_Union (set fs) = fun_point_Union_list fs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fun_point_Union (set fs) = fun_point_Union_list fs
[PROOF STEP]
unfolding fun_point_Union_def fun_point_Union_list_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Union>f\<in>set fs. f x) = (\<lambda>x. \<Union> (set (map (\<lambda>f. f x) fs)))
[PROOF STEP]
by simp


[STATEMENT]
lemma base_dimension_types [simp]:
  "is_BaseDim QD(Length)" "is_BaseDim QD(Mass)" "is_BaseDim QD(Time)" "is_BaseDim QD(Current)"
  "is_BaseDim QD(Temperature)" "is_BaseDim QD(Amount)" "is_BaseDim QD(Intensity)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (is_BaseDim QD(L) &&& is_BaseDim QD(M) &&& is_BaseDim QD(T)) &&& (is_BaseDim QD(I) &&& is_BaseDim QD(\<Theta>)) &&& is_BaseDim QD(N) &&& is_BaseDim QD(J)
[PROOF STEP]
by (simp_all add: is_BaseDim)


[STATEMENT]
lemma (in Ring) ring_times_x_0:"x \<in> carrier R \<Longrightarrow>  x \<cdot>\<^sub>r \<zero> = \<zero>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier R \<Longrightarrow> x \<cdot>\<^sub>r \<zero> = \<zero>
[PROOF STEP]
apply (cut_tac ring_zero)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier R; \<zero> \<in> carrier R\<rbrakk> \<Longrightarrow> x \<cdot>\<^sub>r \<zero> = \<zero>
[PROOF STEP]
apply (subst ring_tOp_commute, assumption+, simp add:ring_zero)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier R \<Longrightarrow> \<zero> \<cdot>\<^sub>r x = \<zero>
[PROOF STEP]
apply (simp add:ring_times_0_x)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma sign_changes_number_rootat: "sign_changes_inf (map real_of_rat_poly ps)
  =  sign_changes_number_rootat ps" (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
have "?l = length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1
[PROOF STEP]
unfolding sign_changes_inf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (remdups_adj (list_neq (map poly_inf (map real_of_rat_poly ps)) 0)) - 1 = length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1
[PROOF STEP]
unfolding map_map o_def real_of_rat_sgn poly_number_rootat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (remdups_adj (list_neq (map (\<lambda>x. real_of_rat (poly_number_rootat x)) ps) 0)) - 1 = length (remdups_adj (list_neq (map (\<lambda>x. real_of_rat (poly_number_rootat x)) ps) 0)) - 1
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
sign_changes_inf (map real_of_rat_poly ps) = length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1

goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sign_changes_inf (map real_of_rat_poly ps) = length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1

goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
have "\<dots> = ?r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1 = sign_changes_number_rootat ps
[PROOF STEP]
unfolding sign_changes_number_rootat_def real_of_rat_list_neq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (remdups_adj (map real_of_rat (list_neq (map poly_number_rootat ps) 0))) - 1 = length (remdups_adj (list_neq (map poly_number_rootat ps) 0)) - 1
[PROOF STEP]
unfolding real_of_rat_remdups_adj
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (map real_of_rat (remdups_adj (list_neq (map poly_number_rootat ps) 0))) - 1 = length (remdups_adj (list_neq (map poly_number_rootat ps) 0)) - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (remdups_adj (list_neq (map real_of_rat (map poly_number_rootat ps)) 0)) - 1 = sign_changes_number_rootat ps

goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps

goal (1 subgoal):
 1. sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sign_changes_inf (map real_of_rat_poly ps) = sign_changes_number_rootat ps

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ennreal_of_enat_inj[simp]: "ennreal_of_enat i = ennreal_of_enat j \<longleftrightarrow> i = j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ennreal_of_enat i = ennreal_of_enat j) = (i = j)
[PROOF STEP]
by (cases i j rule: enat.exhaust[case_product enat.exhaust]) auto


[STATEMENT]
lemma sub_map_finer_than_commute:
  "subtopology (map_topology f T) X finer_than map_topology f (subtopology T (f -` X))"
  if "openin T (f -` X)"\<comment> \<open>this is more or less the condition from
    \<^url>\<open>https://math.stackexchange.com/questions/705840/quotient-topology-vs-subspace-topology\<close>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subtopology (map_topology f T) X finer_than map_topology f (subtopology T (f -` X))
[PROOF STEP]
unfolding finer_than_def continuous_map_alt
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>U. openin (map_topology f (subtopology T (f -` X))) U \<longrightarrow> openin (subtopology (map_topology f T) X) ((\<lambda>x. x) -` U \<inter> topspace (subtopology (map_topology f T) X))) \<and> (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
proof (rule conjI, clarsimp)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
fix U
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
assume "openin (map_topology f (subtopology T (f -` X))) U"
[PROOF STATE]
proof (state)
this:
openin (map_topology f (subtopology T (f -` X))) U

goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
openin (map_topology f (subtopology T (f -` X))) U
[PROOF STEP]
obtain W where W: "U \<subseteq> f ` (topspace T \<inter> f -` X)" "openin T W" "f -` U \<inter> (topspace T \<inter> f -` X) = W \<inter> f -` X"
[PROOF STATE]
proof (prove)
using this:
openin (map_topology f (subtopology T (f -` X))) U

goal (1 subgoal):
 1. (\<And>W. \<lbrakk>U \<subseteq> f ` (topspace T \<inter> f -` X); openin T W; f -` U \<inter> (topspace T \<inter> f -` X) = W \<inter> f -` X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: topspace_subtopology openin_subtopology openin_map_topology)
[PROOF STATE]
proof (state)
this:
U \<subseteq> f ` (topspace T \<inter> f -` X)
openin T W
f -` U \<inter> (topspace T \<inter> f -` X) = W \<inter> f -` X

goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
have "(f -` f ` W \<inter> f -` X) \<inter> topspace T = W \<inter> topspace T \<inter> f -` X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f -` f ` W \<inter> f -` X \<inter> topspace T = W \<inter> topspace T \<inter> f -` X
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xc. \<lbrakk>x \<in> topspace T; f xc \<in> X; f x = f xc; xc \<in> W\<rbrakk> \<Longrightarrow> x \<in> W
[PROOF STEP]
by (metis Int_iff W(3) vimage_eq)
[PROOF STATE]
proof (state)
this:
f -` f ` W \<inter> f -` X \<inter> topspace T = W \<inter> topspace T \<inter> f -` X

goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f -` f ` W \<inter> f -` X \<inter> topspace T = W \<inter> topspace T \<inter> f -` X

goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
have "openin T \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin T (W \<inter> topspace T \<inter> f -` X)
[PROOF STEP]
by (auto intro!: W that)
[PROOF STATE]
proof (state)
this:
openin T (W \<inter> topspace T \<inter> f -` X)

goal (2 subgoals):
 1. \<And>U. openin (map_topology f (subtopology T (f -` X))) U \<Longrightarrow> openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
 2. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
openin T (f -` f ` W \<inter> f -` X \<inter> topspace T)
[PROOF STEP]
show "openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))"
[PROOF STATE]
proof (prove)
using this:
openin T (f -` f ` W \<inter> f -` X \<inter> topspace T)

goal (1 subgoal):
 1. openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
[PROOF STEP]
using W
[PROOF STATE]
proof (prove)
using this:
openin T (f -` f ` W \<inter> f -` X \<inter> topspace T)
U \<subseteq> f ` (topspace T \<inter> f -` X)
openin T W
f -` U \<inter> (topspace T \<inter> f -` X) = W \<inter> f -` X

goal (1 subgoal):
 1. openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))
[PROOF STEP]
unfolding topspace_subtopology topspace_map_topology openin_subtopology openin_map_topology
[PROOF STATE]
proof (prove)
using this:
openin T (f -` f ` W \<inter> f -` X \<inter> topspace T)
U \<subseteq> f ` (topspace T \<inter> f -` X)
openin T W
f -` U \<inter> (topspace T \<inter> f -` X) = W \<inter> f -` X

goal (1 subgoal):
 1. \<exists>Ta. (Ta \<subseteq> f ` topspace T \<and> openin T (f -` Ta \<inter> topspace T)) \<and> U \<inter> (f ` topspace T \<inter> X) = Ta \<inter> X
[PROOF STEP]
by (intro exI[where x="(f ` W \<inter> X)"]) auto
[PROOF STATE]
proof (state)
this:
openin (subtopology (map_topology f T) X) (U \<inter> (f ` topspace T \<inter> X))

goal (1 subgoal):
 1. (\<lambda>x. x) ` topspace (subtopology (map_topology f T) X) \<subseteq> topspace (map_topology f (subtopology T (f -` X)))
[PROOF STEP]
qed auto


[STATEMENT]
lemma removeAll_map:
  assumes "\<forall> x y. x \<noteq> y \<longrightarrow> f x \<noteq> f y"
  shows "removeAll (f x) (map f a) = map f (removeAll x a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. removeAll (f x) (map f a) = map f (removeAll x a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. x \<noteq> y \<longrightarrow> f x \<noteq> f y

goal (1 subgoal):
 1. removeAll (f x) (map f a) = map f (removeAll x a)
[PROOF STEP]
by (induct a arbitrary: x) auto


[STATEMENT]
lemma remove:
  assumes "a \<in> A"
  shows "F A = a \<^bold>* F (A - {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F A = a \<^bold>* F (A - {a})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. F A = a \<^bold>* F (A - {a})
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
[PROOF STEP]
obtain B where "A = insert a B" and "a \<notin> B"
[PROOF STATE]
proof (prove)
using this:
a \<in> A

goal (1 subgoal):
 1. (\<And>B. \<lbrakk>A = insert a B; a \<notin> B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (blast dest: mk_disjoint_insert)
[PROOF STATE]
proof (state)
this:
A = insert a B
a \<notin> B

goal (1 subgoal):
 1. F A = a \<^bold>* F (A - {a})
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
A = insert a B
a \<notin> B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a \<in> A
A = insert a B
a \<notin> B

goal (1 subgoal):
 1. F A = a \<^bold>* F (A - {a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
F A = a \<^bold>* F (A - {a})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma add_row_to_multiple_index_change_bounds:
  assumes "i < dim_row A" and "j < dim_col A" and "i \<ge> low" and "i < up"  and "l < low \<or> l \<ge> up"
    and "l < dim_row A"
  shows "add_row_to_multiple a [low..<up] l A $$ (i,j) = (a * A$$(l, j)) + A$$(i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
have d: "distinct [low..<up]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct [low..<up]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
distinct [low..<up]

goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
have iin: "i \<in> set [low..<up]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<in> set [low..<up]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
i < dim_row A
j < dim_col A
low \<le> i
i < up
l < low \<or> up \<le> l
l < dim_row A

goal (1 subgoal):
 1. i \<in> set [low..<up]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i \<in> set [low..<up]

goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
have lnin: "l \<notin> set [low..<up]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l \<notin> set [low..<up]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
i < dim_row A
j < dim_col A
low \<le> i
i < up
l < low \<or> up \<le> l
l < dim_row A

goal (1 subgoal):
 1. l \<notin> set [low..<up]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l \<notin> set [low..<up]

goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
l \<notin> set [low..<up]

goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
using add_row_to_multiple_index_change d iin assms
[PROOF STATE]
proof (prove)
using this:
l \<notin> set [low..<up]
\<lbrakk>?i < dim_row ?A; ?j < dim_col ?A; ?i \<in> set ?ks; distinct ?ks; ?l \<notin> set ?ks; ?l < dim_row ?A\<rbrakk> \<Longrightarrow> add_row_to_multiple ?a ?ks ?l ?A $$ (?i, ?j) = ?a * ?A $$ (?l, ?j) + ?A $$ (?i, ?j)
distinct [low..<up]
i \<in> set [low..<up]
i < dim_row A
j < dim_col A
low \<le> i
i < up
l < low \<or> up \<le> l
l < dim_row A

goal (1 subgoal):
 1. add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
add_row_to_multiple a [low..<up] l A $$ (i, j) = a * A $$ (l, j) + A $$ (i, j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma indets_sum_subset: "indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
proof (cases "finite A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
 2. infinite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
finite A

goal (2 subgoals):
 1. finite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
 2. infinite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
proof (induct A)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. indets (sum f {}) \<subseteq> (\<Union>a\<in>{}. indets (f a))
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. indets (sum f {}) \<subseteq> (\<Union>a\<in>{}. indets (f a))
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indets (sum f {}) \<subseteq> (\<Union>a\<in>{}. indets (f a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
indets (sum f {}) \<subseteq> (\<Union>a\<in>{}. indets (f a))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
case (insert a A)
[PROOF STATE]
proof (state)
this:
finite A
a \<notin> A
indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
have "indets (sum f (insert a A)) \<subseteq> indets (f a) \<union> indets (sum f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indets (sum f (insert a A)) \<subseteq> indets (f a) \<union> indets (sum f A)
[PROOF STEP]
by (simp only: comm_monoid_add_class.sum.insert[OF insert(1) insert(2)] indets_plus_subset)
[PROOF STATE]
proof (state)
this:
indets (sum f (insert a A)) \<subseteq> indets (f a) \<union> indets (sum f A)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
indets (sum f (insert a A)) \<subseteq> indets (f a) \<union> indets (sum f A)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
have "... \<subseteq> indets (f a) \<union> (\<Union>a\<in>A. indets (f a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indets (f a) \<union> indets (sum f A) \<subseteq> indets (f a) \<union> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
using insert(3)
[PROOF STATE]
proof (prove)
using this:
indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))

goal (1 subgoal):
 1. indets (f a) \<union> indets (sum f A) \<subseteq> indets (f a) \<union> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
indets (f a) \<union> indets (sum f A) \<subseteq> indets (f a) \<union> (\<Union>a\<in>A. indets (f a))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
indets (f a) \<union> indets (sum f A) \<subseteq> indets (f a) \<union> (\<Union>a\<in>A. indets (f a))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
have "... = (\<Union>a\<in>insert a A. indets (f a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indets (f a) \<union> (\<Union>a\<in>A. indets (f a)) = (\<Union>a\<in>insert a A. indets (f a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
indets (f a) \<union> (\<Union>a\<in>A. indets (f a)) = (\<Union>a\<in>insert a A. indets (f a))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; indets (sum f F) \<subseteq> (\<Union>a\<in>F. indets (f a))\<rbrakk> \<Longrightarrow> indets (sum f (insert x F)) \<subseteq> (\<Union>a\<in>insert x F. indets (f a))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
indets (sum f (insert a A)) \<subseteq> (\<Union>a\<in>insert a A. indets (f a))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
indets (sum f (insert a A)) \<subseteq> (\<Union>a\<in>insert a A. indets (f a))

goal (1 subgoal):
 1. indets (sum f (insert a A)) \<subseteq> (\<Union>a\<in>insert a A. indets (f a))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
indets (sum f (insert a A)) \<subseteq> (\<Union>a\<in>insert a A. indets (f a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))

goal (1 subgoal):
 1. infinite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infinite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
infinite A

goal (1 subgoal):
 1. infinite A \<Longrightarrow> indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
infinite A

goal (1 subgoal):
 1. indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
indets (sum f A) \<subseteq> (\<Union>a\<in>A. indets (f a))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma canon_ang_plus_pi1:
  assumes "0 < \<alpha>" and "\<alpha> \<le> 2*pi"
  shows "\<downharpoonright>\<alpha> + pi\<downharpoonleft> = \<alpha> - pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<downharpoonright>\<alpha> + pi\<downharpoonleft> = \<alpha> - pi
[PROOF STEP]
proof (rule canon_ang_eqI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>x. \<alpha> - pi - (\<alpha> + pi) = 2 * real_of_int x * pi
 2. - pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi
[PROOF STEP]
show "\<exists> x::int. \<alpha> - pi - (\<alpha> + pi) = 2 * x * pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. \<alpha> - pi - (\<alpha> + pi) = 2 * real_of_int x * pi
[PROOF STEP]
by (rule_tac x="-1" in exI) auto
[PROOF STATE]
proof (state)
this:
\<exists>x. \<alpha> - pi - (\<alpha> + pi) = 2 * real_of_int x * pi

goal (1 subgoal):
 1. - pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi
[PROOF STEP]
show "- pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < \<alpha>
\<alpha> \<le> 2 * pi

goal (1 subgoal):
 1. - pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- pi < \<alpha> - pi \<and> \<alpha> - pi \<le> pi

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma convert_aNeg :
  assumes "convert_atom var A (xs'@x#xs) = Some(A')"
  assumes "length xs' = var"
  shows "aEval (aNeg A) (xs'@x#xs) = aEvalUni (aNegUni A') x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
have "aEval (aNeg A) (xs'@x#xs) = (\<not> aEval A (xs'@x#xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = (\<not> aEval A (xs' @ x # xs))
[PROOF STEP]
using aNeg_aEval[of A "(xs'@x#xs)"]
[PROOF STATE]
proof (prove)
using this:
aEval A (xs' @ x # xs) = (\<not> aEval (aNeg A) (xs' @ x # xs))

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = (\<not> aEval A (xs' @ x # xs))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aEval (aNeg A) (xs' @ x # xs) = (\<not> aEval A (xs' @ x # xs))

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
aEval (aNeg A) (xs' @ x # xs) = (\<not> aEval A (xs' @ x # xs))

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
have "... = (\<not> aEvalUni A' x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> aEval A (xs' @ x # xs)) = (\<not> aEvalUni A' x)
[PROOF STEP]
using assms aEval_aEvalUni
[PROOF STATE]
proof (prove)
using this:
convert_atom var A (xs' @ x # xs) = Some A'
length xs' = var
\<lbrakk>convert_atom ?var ?a (?xs' @ ?x # ?xs) = Some ?a'; length ?xs' = ?var\<rbrakk> \<Longrightarrow> aEval ?a (?xs' @ ?x # ?xs) = aEvalUni ?a' ?x

goal (1 subgoal):
 1. (\<not> aEval A (xs' @ x # xs)) = (\<not> aEvalUni A' x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<not> aEval A (xs' @ x # xs)) = (\<not> aEvalUni A' x)

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<not> aEval A (xs' @ x # xs)) = (\<not> aEvalUni A' x)

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
have "... = aEvalUni (aNegUni A') x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> aEvalUni A' x) = aEvalUni (aNegUni A') x
[PROOF STEP]
by(cases A')(auto)
[PROOF STATE]
proof (state)
this:
(\<not> aEvalUni A' x) = aEvalUni (aNegUni A') x

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x

goal (1 subgoal):
 1. aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
aEval (aNeg A) (xs' @ x # xs) = aEvalUni (aNegUni A') x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma one_in_complex_cone [simp, intro]: "a \<le> 0 \<Longrightarrow> 0 \<le> b \<Longrightarrow> 1 \<in> complex_cone a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> 0; 0 \<le> b\<rbrakk> \<Longrightarrow> 1 \<in> complex_cone a b
[PROOF STEP]
using nonneg_of_real_in_complex_cone[of 1]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> 1; ?a \<le> 0; 0 \<le> ?b\<rbrakk> \<Longrightarrow> complex_of_real 1 \<in> complex_cone ?a ?b

goal (1 subgoal):
 1. \<lbrakk>a \<le> 0; 0 \<le> b\<rbrakk> \<Longrightarrow> 1 \<in> complex_cone a b
[PROOF STEP]
by (simp del: nonneg_of_real_in_complex_cone)


[STATEMENT]
lemma degeneralize_nodes_empty:
      assumes "condition\<^sub>1 A = []"
      shows "b.nodes (degeneralize A) = a.nodes A \<times> {0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b.nodes' (degeneralize A) = a.nodes' A \<times> {0}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
condition\<^sub>1 A = []

goal (1 subgoal):
 1. b.nodes' (degeneralize A) = a.nodes' A \<times> {0}
[PROOF STEP]
unfolding b.nodes_alt_def
[PROOF STATE]
proof (prove)
using this:
condition\<^sub>1 A = []

goal (1 subgoal):
 1. \<Union> (b.reachable' (degeneralize A) ` {p. p = initial\<^sub>2 (degeneralize A)}) = a.nodes' A \<times> {0}
[PROOF STEP]
by auto


[STATEMENT]
lemma msubstpos_nb:
  assumes lp: "islin p"
    and tnb: "tmbound0 t"
  shows "bound0 (msubstpos p c t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bound0 (msubstpos p c t)
[PROOF STEP]
using lp tnb
[PROOF STATE]
proof (prove)
using this:
islin p
tmbound0 t

goal (1 subgoal):
 1. bound0 (msubstpos p c t)
[PROOF STEP]
by (induct p c t rule: msubstpos.induct)
    (auto simp add: msubsteq2_nb msubstltpos_nb msubstlepos_nb)


[STATEMENT]
lemma aux3:
  fixes a b :: int
  assumes "b = t * b\<^sub>0 + s * a\<^sub>0" "q = a div b" "b > 0"
  shows "t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a
[PROOF STEP]
have "t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * b
[PROOF STEP]
unfolding \<open>b = _\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * (t * b\<^sub>0 + s * a\<^sub>0)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * b

goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * b

goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a
[PROOF STEP]
using \<open>b > 0\<close>
[PROOF STATE]
proof (prove)
using this:
t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) = q * b
0 < b

goal (1 subgoal):
 1. t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a
[PROOF STEP]
by (simp add: algebra_simps \<open>q = _\<close>)
       (smt Euclidean_Division.pos_mod_sign cancel_div_mod_rules(1) mult.commute)
[PROOF STATE]
proof (state)
this:
t * (b\<^sub>0 * q) + s * (a\<^sub>0 * q) \<le> a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma in_set_permutationss:
  assumes "distincts xss"
  shows "yss \<in> set (permutationss xss) \<longleftrightarrow> distincts yss \<and> map set xss = map set yss"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
assume A: "list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)"
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)
[PROOF STEP]
have "length yss = length xss"
[PROOF STATE]
proof (prove)
using this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)

goal (1 subgoal):
 1. length yss = length xss
[PROOF STEP]
by (auto simp: list_all2_lengthD)
[PROOF STATE]
proof (state)
this:
length yss = length xss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length yss = length xss
[PROOF STEP]
have "\<Union>(sset xss) = \<Union>(sset yss)" "distincts yss" "map set xss = map set yss"
[PROOF STATE]
proof (prove)
using this:
length yss = length xss

goal (1 subgoal):
 1. \<Union> (sset xss) = \<Union> (sset yss) &&& distincts yss &&& map set xss = map set yss
[PROOF STEP]
using A assms
[PROOF STATE]
proof (prove)
using this:
length yss = length xss
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)
distincts xss

goal (1 subgoal):
 1. \<Union> (sset xss) = \<Union> (sset yss) &&& distincts yss &&& map set xss = map set yss
[PROOF STEP]
by (induct yss xss rule: list_induct2) (auto simp: distincts_Cons in_set_permutations)
[PROOF STATE]
proof (state)
this:
\<Union> (sset xss) = \<Union> (sset yss)
distincts yss
map set xss = map set yss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> \<Union> (sset xss) = \<Union> (sset yss)
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> distincts yss
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> map set xss = map set yss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
note X = this
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> \<Union> (sset xss) = \<Union> (sset yss)
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> distincts yss
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> map set xss = map set yss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> \<Union> (sset xss) = \<Union> (sset yss)
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> distincts yss
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss) \<Longrightarrow> map set xss = map set yss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
assume A: "distincts yss" "map set xss = map set yss"
[PROOF STATE]
proof (state)
this:
distincts yss
map set xss = map set yss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
distincts yss
map set xss = map set yss
[PROOF STEP]
have "length yss = length xss"
[PROOF STATE]
proof (prove)
using this:
distincts yss
map set xss = map set yss

goal (1 subgoal):
 1. length yss = length xss
[PROOF STEP]
by (auto dest: map_eq_imp_length_eq)
[PROOF STATE]
proof (state)
this:
length yss = length xss

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length yss = length xss
[PROOF STEP]
have "list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)"
[PROOF STATE]
proof (prove)
using this:
length yss = length xss

goal (1 subgoal):
 1. list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)
[PROOF STEP]
using A assms
[PROOF STATE]
proof (prove)
using this:
length yss = length xss
distincts yss
map set xss = map set yss
distincts xss

goal (1 subgoal):
 1. list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)
[PROOF STEP]
by (induct yss xss rule: list_induct2) (auto simp: in_set_permutations distincts_Cons)
[PROOF STATE]
proof (state)
this:
list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>distincts yss; map set xss = map set yss\<rbrakk> \<Longrightarrow> list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
note Y = this
[PROOF STATE]
proof (state)
this:
\<lbrakk>distincts yss; map set xss = map set yss\<rbrakk> \<Longrightarrow> list_all2 (\<lambda>x ys. x \<in> set ys) yss (map permutations xss)

goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
show "?thesis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
unfolding permutationss_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (yss \<in> set ((product_lists \<circ> map permutations) xss)) = (distincts yss \<and> map set xss = map set yss)
[PROOF STEP]
by (auto simp: product_lists_set intro: X Y)
[PROOF STATE]
proof (state)
this:
(yss \<in> set (permutationss xss)) = (distincts yss \<and> map set xss = map set yss)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_walk_hd_tl:
  assumes "is_walk (y # ys)"
  assumes "{x, y} \<in> E"
  shows "is_walk (x # y # ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_walk (x # y # ys)
[PROOF STEP]
proof (intro is_walkI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. set (x # y # ys) \<subseteq> V
 2. set (walk_edges (x # y # ys)) \<subseteq> E
 3. x # y # ys \<noteq> []
[PROOF STEP]
show "set (x # y # ys) \<subseteq> V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (x # y # ys) \<subseteq> V
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_walk (y # ys)
{x, y} \<in> E

goal (1 subgoal):
 1. set (x # y # ys) \<subseteq> V
[PROOF STEP]
by (simp add: is_walk_def wellformed_alt_fst)
[PROOF STATE]
proof (state)
this:
set (x # y # ys) \<subseteq> V

goal (2 subgoals):
 1. set (walk_edges (x # y # ys)) \<subseteq> E
 2. x # y # ys \<noteq> []
[PROOF STEP]
show "set (walk_edges (x # y # ys)) \<subseteq> E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (walk_edges (x # y # ys)) \<subseteq> E
[PROOF STEP]
using walk_edges.simps assms is_walk_def
[PROOF STATE]
proof (prove)
using this:
walk_edges [] = []
walk_edges [?x] = []
walk_edges (?x # ?y # ?ys) = {?x, ?y} # walk_edges (?y # ?ys)
is_walk (y # ys)
{x, y} \<in> E
is_walk ?xs \<equiv> set ?xs \<subseteq> V \<and> set (walk_edges ?xs) \<subseteq> E \<and> ?xs \<noteq> []

goal (1 subgoal):
 1. set (walk_edges (x # y # ys)) \<subseteq> E
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (walk_edges (x # y # ys)) \<subseteq> E

goal (1 subgoal):
 1. x # y # ys \<noteq> []
[PROOF STEP]
show "x # y # ys \<noteq> []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x # y # ys \<noteq> []
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x # y # ys \<noteq> []

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_mapping_nat_le_0 [simp]: "(m :: nat \<Rightarrow>\<^sub>0 nat) \<le> 0 \<longleftrightarrow> m = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (m \<le> 0) = (m = 0)
[PROOF STEP]
unfolding less_eq_poly_mapping_def poly_mapping_eq_iff less_fun_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_fun lookup (map_fun lookup id) (\<lambda>f g. (\<exists>k. f k < g k \<and> (\<forall>k'<k. f k' = g k')) \<or> f = g) m 0 = (lookup m = lookup 0)
[PROOF STEP]
by auto


[STATEMENT]
lemma fds_exp_1 [simp]: "fds_exp 1 = fds_const (exp 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_exp 1 = fds_const (exp (1::'a))
[PROOF STEP]
using fds_exp_const[of 1]
[PROOF STATE]
proof (prove)
using this:
fds_exp (fds_const (1::?'b1)) = fds_const (exp (1::?'b1))

goal (1 subgoal):
 1. fds_exp 1 = fds_const (exp (1::'a))
[PROOF STEP]
by (simp del: fds_exp_const)


[STATEMENT]
lemma inverse_ennreal_unique:
  assumes "a * (b :: ennreal) = 1"
  shows   "b = inverse a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b = inverse a
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a * b = 1

goal (1 subgoal):
 1. b = inverse a
[PROOF STEP]
by (metis divide_ennreal_def ennreal_inverse_1 ennreal_top_eq_mult_iff mult.comm_neutral
        mult_divide_eq_ennreal mult_eq_0_iff semiring_normalization_rules(7))


[STATEMENT]
lemma uminus_of_uminus_id[simp]: "- (- (x :: 'v literal)) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (- x) = x
[PROOF STEP]
by (simp add: uminus_literal_def)


[STATEMENT]
lemma update_Some_unfold:
  "map_of (update k v al) x = Some y \<longleftrightarrow>
    x = k \<and> v = y \<or> x \<noteq> k \<and> map_of al x = Some y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map_of (update k v al) x = Some y) = (x = k \<and> v = y \<or> x \<noteq> k \<and> map_of al x = Some y)
[PROOF STEP]
by (simp add: update_conv' map_upd_Some_unfold)


[STATEMENT]
lemma fls_integral_sub [simp]: "fls_integral (f-g) = fls_integral f - fls_integral g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_integral (f - g) = fls_integral f - fls_integral g
[PROOF STEP]
by (intro fls_eqI) (simp add: algebra_simps)


[STATEMENT]
lemma spEdges_ss_E: "spEdges \<subseteq> E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. spEdges \<subseteq> E
[PROOF STEP]
using isPath_edgeset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>isPath ?u ?p ?v; ?e \<in> set ?p\<rbrakk> \<Longrightarrow> ?e \<in> E

goal (1 subgoal):
 1. spEdges \<subseteq> E
[PROOF STEP]
unfolding spEdges_def isShortestPath_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>isPath ?u ?p ?v; ?e \<in> set ?p\<rbrakk> \<Longrightarrow> ?e \<in> E

goal (1 subgoal):
 1. {e. \<exists>p. e \<in> set p \<and> isPath s p t \<and> (\<forall>p'. isPath s p' t \<longrightarrow> length p \<le> length p')} \<subseteq> E
[PROOF STEP]
by auto


[STATEMENT]
lemma wf_tuple_Suc_fvi_SomeI: "0 \<in> MFOTL.fvi b \<phi> \<Longrightarrow> wf_tuple n (MFOTL.fvi (Suc b) \<phi>) v \<Longrightarrow>
  wf_tuple (Suc n) (MFOTL.fvi b \<phi>) (Some x # v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<in> MFOTL.fvi b \<phi>; wf_tuple n (MFOTL.fvi (Suc b) \<phi>) v\<rbrakk> \<Longrightarrow> wf_tuple (Suc n) (MFOTL.fvi b \<phi>) (Some x # v)
[PROOF STEP]
unfolding wf_tuple_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<in> MFOTL.fvi b \<phi>; length v = n \<and> (\<forall>i<n. (v ! i = None) = (i \<notin> MFOTL.fvi (Suc b) \<phi>))\<rbrakk> \<Longrightarrow> length (Some x # v) = Suc n \<and> (\<forall>i<Suc n. ((Some x # v) ! i = None) = (i \<notin> MFOTL.fvi b \<phi>))
[PROOF STEP]
by (auto simp: fvi_Suc less_Suc_eq_0_disj)


[STATEMENT]
lemma of_rat_lec_zero: "of_rat_lec 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat_lec 0 = 0
[PROOF STEP]
unfolding zero_le_constraint_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_rat_lec (Le_Constraint Leq_Rel 0 0) = Le_Constraint Leq_Rel 0 0
[PROOF STEP]
by simp


[STATEMENT]
lemma list_length_hint2:
assumes "length x  = Suc 0"
shows    "[hd x] = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [hd x] = x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length x = Suc 0

goal (1 subgoal):
 1. [hd x] = x
[PROOF STEP]
by (metis Zero_neq_Suc list.sel(1) length_Suc_conv neq_Nil_conv)


[STATEMENT]
lemma map2_Cons_Cons: "
  map2 f (x # xs) (y # ys) =
  (f x y) # map2 f xs ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. List2.map2 f (x # xs) (y # ys) = f x y # List2.map2 f xs ys
[PROOF STEP]
by simp


[STATEMENT]
lemma Null_notin_list [simp,intro]: "islist p h \<Longrightarrow> Null \<notin> set (list p h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. islist p h \<Longrightarrow> Null \<notin> set (list p h)
[PROOF STEP]
apply (clarsimp simp add: list_def islist_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ps. \<lbrakk>List p h ps; Null \<in> set (THE ps. List p h ps)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (frule List_unique1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ps. \<lbrakk>List p h ps; Null \<in> set (THE ps. List p h ps); \<exists>!as. List p h as\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (drule (1) the1_equality)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ps. \<lbrakk>List p h ps; Null \<in> set (THE ps. List p h ps); (THE as. List p h as) = ps\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma map_of_binop[simp]: "rsorted (map fst xs) \<Longrightarrow> rsorted (map fst ys) \<Longrightarrow>
  distinct (map fst xs) \<Longrightarrow> distinct (map fst ys) \<Longrightarrow>
  map_of (binop f z1 z2 xs ys) i =
  (case map_of xs i of
    Some x \<Rightarrow> Some (f x (case map_of ys i of Some x \<Rightarrow> x | None \<Rightarrow> z2))
  | None \<Rightarrow> (case map_of ys i of Some y \<Rightarrow> Some (f z1 y) | None \<Rightarrow> None))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rsorted (map fst xs); rsorted (map fst ys); distinct (map fst xs); distinct (map fst ys)\<rbrakk> \<Longrightarrow> map_of (binop f z1 z2 xs ys) i = (case map_of xs i of None \<Rightarrow> case map_of ys i of None \<Rightarrow> None | Some y \<Rightarrow> Some (f z1 y) | Some x \<Rightarrow> Some (f x (the_default z2 (map_of ys i))))
[PROOF STEP]
by (induct f z1 z2 xs ys rule: binop.induct)
    (auto split: option.split option.split_asm simp: sorted_append)


[STATEMENT]
lemma normalized_delete_min:
  "normalized (delete_min xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normalized (delete_min xs)
[PROOF STEP]
by (cases "find_min xs")
    (auto simp add: delete_min_def normalized_normalize split: bintree.split)


[STATEMENT]
lemma lift_by0 [simp]: "lift x 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lift x 0 = 0
[PROOF STEP]
by (simp add: lift_def)


[STATEMENT]
lemma subst_pp_id:
  assumes "\<And>x. x \<in> keys t \<Longrightarrow> f x = monomial 1 (Poly_Mapping.single x 1)"
  shows "subst_pp f t = monomial 1 t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subst_pp f t = monomial (1::'b) t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. subst_pp f t = monomial (1::'b) t
[PROOF STEP]
have "subst_pp f t = (\<Prod>x\<in>keys t. monomial 1 (Poly_Mapping.single x (lookup t x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subst_pp f t = (\<Prod>x\<in>keys t. monomial (1::'b) (monomial (lookup t x) x))
[PROOF STEP]
proof (simp only: subst_pp_def, rule prod.cong, fact refl)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> keys t \<Longrightarrow> f x ^ lookup t x = monomial (1::'b) (monomial (lookup t x) x)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> keys t \<Longrightarrow> f x ^ lookup t x = monomial (1::'b) (monomial (lookup t x) x)
[PROOF STEP]
assume "x \<in> keys t"
[PROOF STATE]
proof (state)
this:
x \<in> keys t

goal (1 subgoal):
 1. \<And>x. x \<in> keys t \<Longrightarrow> f x ^ lookup t x = monomial (1::'b) (monomial (lookup t x) x)
[PROOF STEP]
thus "f x ^ lookup t x = monomial 1 (Poly_Mapping.single x (lookup t x))"
[PROOF STATE]
proof (prove)
using this:
x \<in> keys t

goal (1 subgoal):
 1. f x ^ lookup t x = monomial (1::'b) (monomial (lookup t x) x)
[PROOF STEP]
by (simp add: assms monomial_single_power)
[PROOF STATE]
proof (state)
this:
f x ^ lookup t x = monomial (1::'b) (monomial (lookup t x) x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
subst_pp f t = (\<Prod>x\<in>keys t. monomial (1::'b) (monomial (lookup t x) x))

goal (1 subgoal):
 1. subst_pp f t = monomial (1::'b) t
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
subst_pp f t = (\<Prod>x\<in>keys t. monomial (1::'b) (monomial (lookup t x) x))

goal (1 subgoal):
 1. subst_pp f t = monomial (1::'b) t
[PROOF STEP]
have "... = monomial 1 t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>x\<in>keys t. monomial (1::'b) (monomial (lookup t x) x)) = monomial (1::'b) t
[PROOF STEP]
by (simp add: punit.monomial_prod_sum[symmetric] poly_mapping_sum_monomials)
[PROOF STATE]
proof (state)
this:
(\<Prod>x\<in>keys t. monomial (1::'b) (monomial (lookup t x) x)) = monomial (1::'b) t

goal (1 subgoal):
 1. subst_pp f t = monomial (1::'b) t
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
subst_pp f t = monomial (1::'b) t
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
subst_pp f t = monomial (1::'b) t

goal (1 subgoal):
 1. subst_pp f t = monomial (1::'b) t
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
subst_pp f t = monomial (1::'b) t

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hsize_chop: "is_App t \<Longrightarrow> (Suc (hsize (chop t))) = hsize t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_App t \<Longrightarrow> Suc (hsize (chop t)) = hsize t
[PROOF STEP]
unfolding hsize_args[of t, symmetric] chop_def hsize_apps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_App t \<Longrightarrow> Suc (hsize (hd (args t)) + sum_list (map hsize (tl (args t)))) = 1 + sum_list (map hsize (args t))
[PROOF STEP]
by (metis Nil_is_map_conv args_Nil_iff_is_Hd list.exhaust_sel list.map_sel(1) map_tl plus_1_eq_Suc sum_list.Cons)


[STATEMENT]
lemma union_ts_iff [simp]: "(c \<in> (A \<Rightarrow>\<union> B) k) = (c \<in> A k \<or>  c \<in> B k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c \<in> (A \<Rightarrow>\<union> B) k) = (c \<in> A k \<or> c \<in> B k)
[PROOF STEP]
by (unfold union_ts_def) blast


[STATEMENT]
lemma openin_subtopology_empty:
   "openin (subtopology U {}) S \<longleftrightarrow> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (subtopology U {}) S = (S = {})
[PROOF STEP]
by (metis Int_empty_right openin_empty openin_subtopology)


[STATEMENT]
lemma separation:
  assumes "y * x \<le> x * y\<^sup>\<circ>"
    shows "(x \<squnion> y)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<squnion> y)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (x \<squnion> y)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ>
[PROOF STEP]
have "y\<^sup>\<circ> * x * y\<^sup>\<circ> \<le> x * y\<^sup>\<circ> \<squnion> y\<^sup>\<circ> * bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<circ> * x * y\<^sup>\<circ> \<le> x * y\<^sup>\<circ> \<squnion> y\<^sup>\<circ> * bot
[PROOF STEP]
by (metis assms circ_simulate_left_plus_1 circ_transitive_equal mult_assoc mult_left_isotone)
[PROOF STATE]
proof (state)
this:
y\<^sup>\<circ> * x * y\<^sup>\<circ> \<le> x * y\<^sup>\<circ> \<squnion> y\<^sup>\<circ> * bot

goal (1 subgoal):
 1. (x \<squnion> y)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ>
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
y\<^sup>\<circ> * x * y\<^sup>\<circ> \<le> x * y\<^sup>\<circ> \<squnion> y\<^sup>\<circ> * bot

goal (1 subgoal):
 1. (x \<squnion> y)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ>
[PROOF STEP]
by (metis sup_commute circ_sup_1 circ_simulate_right circ_sub_dist_3 le_iff_sup mult_assoc mult_left_zero zero_right_mult_decreasing)
[PROOF STATE]
proof (state)
this:
(x \<squnion> y)\<^sup>\<circ> = x\<^sup>\<circ> * y\<^sup>\<circ>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_upto_cong [cong]:
  "(\<And>n. n > 0 \<Longrightarrow> f n = f' n) \<Longrightarrow> n = n' \<Longrightarrow> sum_upto f n = sum_upto f' n'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>n. 0 < n \<Longrightarrow> f n = f' n; n = n'\<rbrakk> \<Longrightarrow> sum_upto f n = sum_upto f' n'
[PROOF STEP]
by (simp add: sum_upto_def)


[STATEMENT]
lemma wnf_lemma_3:
  "((-x \<squnion> -z) \<sqinter> (--x \<squnion> -y)) \<squnion> --x = --x \<squnion> -y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- x \<squnion> - z) \<sqinter> (- - x \<squnion> - y) \<squnion> - - x = - - x \<squnion> - y
[PROOF STEP]
by (metis case_duality case_duality_2 double_negation sub_commutative wnf_lemma_2)


[STATEMENT]
lemma integer_encode_eq: "(int_encode \<circ> int_of_integer) x = (int_encode \<circ> int_of_integer) y \<longleftrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((int_encode \<circ> int_of_integer) x = (int_encode \<circ> int_of_integer) y) = (x = y)
[PROOF STEP]
using int_encode_eq integer_eq_iff
[PROOF STATE]
proof (prove)
using this:
(int_encode ?x = int_encode ?y) = (?x = ?y)
(?k = ?l) = (int_of_integer ?k = int_of_integer ?l)

goal (1 subgoal):
 1. ((int_encode \<circ> int_of_integer) x = (int_encode \<circ> int_of_integer) y) = (x = y)
[PROOF STEP]
by auto


[STATEMENT]
theorem euler_maclaurin_strong_int:
  assumes ab: "a \<le> b"
  defines "S \<equiv> (\<Sum>k=a..b. f (of_int k))"
  shows "S = F (of_int b) + C + T (of_int b) - EM_remainder N (fs N) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b
[PROOF STEP]
have "S = F (of_int b) + T (of_int b) + - (C' - EM_remainder' N (fs N) (of_int a) (of_int b)) + C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S = F (real_of_int b) + T (real_of_int b) + - (C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b)) + C
[PROOF STEP]
using euler_maclaurin_strong_int_aux[OF ab]
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k = a..b. f (real_of_int k)) - F (real_of_int b) - T (real_of_int b) = EM_remainder' N (fs N) (real_of_int a) (real_of_int b) + (C - C')

goal (1 subgoal):
 1. S = F (real_of_int b) + T (real_of_int b) + - (C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b)) + C
[PROOF STEP]
by (simp add: algebra_simps S_def)
[PROOF STATE]
proof (state)
this:
S = F (real_of_int b) + T (real_of_int b) + - (C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b)) + C

goal (1 subgoal):
 1. S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
S = F (real_of_int b) + T (real_of_int b) + - (C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b)) + C

goal (1 subgoal):
 1. S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b
[PROOF STEP]
have "C' - EM_remainder' N (fs N) (of_int a) (of_int b) = EM_remainder N (fs N) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b) = EM_remainder N (fs N) b
[PROOF STEP]
using ab
[PROOF STATE]
proof (prove)
using this:
a \<le> b

goal (1 subgoal):
 1. C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b) = EM_remainder N (fs N) b
[PROOF STEP]
by (rule EM_remainder_limit(1) [symmetric])
[PROOF STATE]
proof (state)
this:
C' - EM_remainder' N (fs N) (real_of_int a) (real_of_int b) = EM_remainder N (fs N) b

goal (1 subgoal):
 1. S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
S = F (real_of_int b) + T (real_of_int b) + - EM_remainder N (fs N) b + C
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S = F (real_of_int b) + T (real_of_int b) + - EM_remainder N (fs N) b + C

goal (1 subgoal):
 1. S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
S = F (real_of_int b) + C + T (real_of_int b) - EM_remainder N (fs N) b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma uniform_limit_at_iff:
  "uniform_limit S f l (at x) \<longleftrightarrow>
    (\<forall>e>0. \<exists>d>0. \<forall>z. 0 < dist z x \<and> dist z x < d \<longrightarrow> (\<forall>x\<in>S. dist (f z x) (l x) < e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uniform_limit S f l (at x) = (\<forall>e>0. \<exists>d>0. \<forall>z. 0 < dist z x \<and> dist z x < d \<longrightarrow> (\<forall>x\<in>S. dist (f z x) (l x) < e))
[PROOF STEP]
unfolding uniform_limit_iff eventually_at
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>e>0. \<exists>d>0. \<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < d \<longrightarrow> (\<forall>x\<in>S. dist (f xa x) (l x) < e)) = (\<forall>e>0. \<exists>d>0. \<forall>z. 0 < dist z x \<and> dist z x < d \<longrightarrow> (\<forall>x\<in>S. dist (f z x) (l x) < e))
[PROOF STEP]
by simp


[STATEMENT]
lemma T_Tn_T_compose:
  "T ((T^^n) x) = (T^^(Suc n)) x"
  "(T^^n) (T x) = (T^^(Suc n)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T ((T ^^ n) x) = (T ^^ Suc n) x &&& (T ^^ n) (T x) = (T ^^ Suc n) x
[PROOF STEP]
by (auto simp add: funpow_swap1)


[STATEMENT]
theorem is_sup_related [elim?]: "x \<sqsubseteq> y \<Longrightarrow> is_sup x y y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqsubseteq> y \<Longrightarrow> is_sup x y y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<sqsubseteq> y \<Longrightarrow> is_sup x y y
[PROOF STEP]
assume "x \<sqsubseteq> y"
[PROOF STATE]
proof (state)
this:
x \<sqsubseteq> y

goal (1 subgoal):
 1. x \<sqsubseteq> y \<Longrightarrow> is_sup x y y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_sup x y y
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. x \<sqsubseteq> y
 2. y \<sqsubseteq> y
 3. \<And>z. \<lbrakk>x \<sqsubseteq> z; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> y \<sqsubseteq> z
[PROOF STEP]
show "x \<sqsubseteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqsubseteq> y
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
x \<sqsubseteq> y

goal (2 subgoals):
 1. y \<sqsubseteq> y
 2. \<And>z. \<lbrakk>x \<sqsubseteq> z; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> y \<sqsubseteq> z
[PROOF STEP]
show "y \<sqsubseteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<sqsubseteq> y
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
y \<sqsubseteq> y

goal (1 subgoal):
 1. \<And>z. \<lbrakk>x \<sqsubseteq> z; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> y \<sqsubseteq> z
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>z. \<lbrakk>x \<sqsubseteq> z; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> y \<sqsubseteq> z
[PROOF STEP]
assume "x \<sqsubseteq> z" and "y \<sqsubseteq> z"
[PROOF STATE]
proof (state)
this:
x \<sqsubseteq> z
y \<sqsubseteq> z

goal (1 subgoal):
 1. \<And>z. \<lbrakk>x \<sqsubseteq> z; y \<sqsubseteq> z\<rbrakk> \<Longrightarrow> y \<sqsubseteq> z
[PROOF STEP]
show "y \<sqsubseteq> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<sqsubseteq> z
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
y \<sqsubseteq> z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
is_sup x y y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Set_project_set [code]:
  "Set_project (set xs) a = set (List.map_filter (\<lambda>(a', b). if a = a' then Some b else None) xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Set_project (set xs) a = set (List.map_filter (\<lambda>(a', b). if a = a' then \<lfloor>b\<rfloor> else None) xs)
[PROOF STEP]
by(auto simp add: Set_project_def map_filter_def intro: rev_image_eqI split: if_split_asm)


[STATEMENT]
lemma lenlex_conv:
    "lenlex r = {(xs,ys). length xs < length ys \<or>
                 length xs = length ys \<and> (xs, ys) \<in> lex r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lenlex r = {(xs, ys). length xs < length ys \<or> length xs = length ys \<and> (xs, ys) \<in> lex r}
[PROOF STEP]
by (auto simp add: lenlex_def Id_on_def lex_prod_def inv_image_def)


[STATEMENT]
lemma distinct_entries:
  "rbt_sorted t \<Longrightarrow> distinct (map fst (entries t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_sorted t \<Longrightarrow> distinct (map fst (entries t))
[PROOF STEP]
by (induct t) (force simp: sorted_append rbt_ord_props dest!: entry_in_tree_keys)+


[STATEMENT]
lemma (in deutsch) deutsch_transform_dim [simp]:
  shows "dim_row U\<^sub>f = 4" and "dim_col U\<^sub>f = 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row U\<^sub>f = 4 &&& dim_col U\<^sub>f = 4
[PROOF STEP]
by (auto simp add: deutsch_transform_def mat_of_cols_list_def)


[STATEMENT]
lemma degree_slist_zero:
  "degree_slist xs = n \<Longrightarrow> n \<le> j \<Longrightarrow> pdevs_apply (Pdevs xs) j = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>degree_slist xs = n; n \<le> j\<rbrakk> \<Longrightarrow> pdevs_apply (Pdevs xs) j = (0::'a)
[PROOF STEP]
proof (transfer, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xs n j. \<lbrakk>distinct (map fst xs) \<and> sorted (rev (map fst xs)); degree_list xs = n; n \<le> j\<rbrakk> \<Longrightarrow> Pdevs_raw xs j = (0::'a)
[PROOF STEP]
case (1 xs n j)
[PROOF STATE]
proof (state)
this:
distinct (map fst xs) \<and> sorted (rev (map fst xs))
degree_list xs = n
n \<le> j

goal (1 subgoal):
 1. \<And>xs n j. \<lbrakk>distinct (map fst xs) \<and> sorted (rev (map fst xs)); degree_list xs = n; n \<le> j\<rbrakk> \<Longrightarrow> Pdevs_raw xs j = (0::'a)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
distinct (map fst xs) \<and> sorted (rev (map fst xs))
degree_list xs = n
n \<le> j

goal (1 subgoal):
 1. Pdevs_raw xs j = (0::'a)
[PROOF STEP]
by (induct xs)
      (auto simp: Pdevs_raw_def sorted_append split: if_split_asm option.split)
[PROOF STATE]
proof (state)
this:
Pdevs_raw xs j = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma if_then_else_ref: "X \<subseteq> X' \<Longrightarrow> Y \<subseteq> Y' \<Longrightarrow> IF P THEN X ELSE Y FI \<subseteq> IF P THEN X' ELSE Y' FI"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<subseteq> X'; Y \<subseteq> Y'\<rbrakk> \<Longrightarrow> IF P THEN X ELSE Y FI \<subseteq> IF P THEN X' ELSE Y' FI
[PROOF STEP]
by (auto simp: rel_kat.ifthenelse_def)


[STATEMENT]
lemma toplevel_summands_flatten:
  "\<lbrakk>X \<noteq> {}; finite X; \<forall>x \<in> X. \<not>(\<exists>r s. x = Plus r s)\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<noteq> {}; finite X; \<forall>x\<in>X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = X
[PROOF STEP]
using toplevel_summands_PLUS_strong[of "sorted_list_of_set X"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>flatten (\<noteq>) X []; flatten (list_all (\<lambda>x. \<nexists>r s. x = Plus r s)) X\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = flatten set X

goal (1 subgoal):
 1. \<lbrakk>X \<noteq> {}; finite X; \<forall>x\<in>X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = X
[PROOF STEP]
unfolding list_all_iff
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>flatten (\<noteq>) X []; \<forall>x\<in>flatten set X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = flatten set X

goal (1 subgoal):
 1. \<lbrakk>X \<noteq> {}; finite X; \<forall>x\<in>X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = X
[PROOF STEP]
by fastforce


[STATEMENT]
theorem goedel_first:
assumes "\<omega>consistent"
shows "\<not> prv \<phi>G \<and> \<not> prv (neg \<phi>G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> prv \<phi>G \<and> \<not> prv (neg \<phi>G)
[PROOF STEP]
using assms goedel_first_theEasyHalf goedel_first_theHardHalf \<omega>consistent_implies_consistent
[PROOF STATE]
proof (prove)
using this:
\<omega>consistent
consistent \<Longrightarrow> \<not> prv \<phi>G
\<omega>consistent \<Longrightarrow> \<not> prv (neg \<phi>G)
\<omega>consistent \<Longrightarrow> consistent

goal (1 subgoal):
 1. \<not> prv \<phi>G \<and> \<not> prv (neg \<phi>G)
[PROOF STEP]
by blast


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

goal (1 subgoal):
 1. z :\<^sub>h 0\<^sub>h = \<infinity>\<^sub>h
[PROOF STEP]
unfolding divide_def
[PROOF STATE]
proof (prove)
using this:
z \<noteq> 0\<^sub>h

goal (1 subgoal):
 1. z *\<^sub>h reciprocal 0\<^sub>h = \<infinity>\<^sub>h
[PROOF STEP]
by simp


[STATEMENT]
lemma triangle_set_power_set_ss: "uwellformed G \<Longrightarrow> triangle_set G \<subseteq> Pow (uverts G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uwellformed G \<Longrightarrow> triangle_set G \<subseteq> Pow (uverts G)
[PROOF STEP]
by (auto simp add: triangle_set_def triangle_in_graph_def uwellformed_alt_fst uwellformed_alt_snd)


[STATEMENT]
lemma coreflexive_comp_linorder_matrix:
  fixes f g :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  assumes "matrix_idempotent_semiring.coreflexive f"
    shows "(f \<odot> g) (i,j) = f (i,i) \<sqinter> g (i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
have 1: "\<forall>k . i \<noteq> k \<longrightarrow> f (i,k) = bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>k. i \<noteq> k \<longrightarrow> f (i, k) = bot
[PROOF STEP]
using assms coreflexive_linorder_matrix
[PROOF STATE]
proof (prove)
using this:
matrix_idempotent_semiring.coreflexive f
matrix_idempotent_semiring.coreflexive ?f = (\<forall>i j. i \<noteq> j \<longrightarrow> ?f (i, j) = bot)

goal (1 subgoal):
 1. \<forall>k. i \<noteq> k \<longrightarrow> f (i, k) = bot
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>k. i \<noteq> k \<longrightarrow> f (i, k) = bot

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
have "(\<Squnion>\<^sub>k f (i,k)) = f (i,i) \<squnion> (\<Squnion>\<^bsub>k\<in>UNIV-{i}\<^esub> f (i,k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i) \<squnion> sup_monoid.sum (\<lambda>k. f (i, k)) (UNIV - {i})
[PROOF STEP]
by (metis (no_types) UNIV_def brouwer.inf_bot_right finite_UNIV insert_def sup_monoid.sum.insert_remove)
[PROOF STATE]
proof (state)
this:
sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i) \<squnion> sup_monoid.sum (\<lambda>k. f (i, k)) (UNIV - {i})

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
hence 2: "(\<Squnion>\<^sub>k f (i,k)) = f (i,i)"
[PROOF STATE]
proof (prove)
using this:
sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i) \<squnion> sup_monoid.sum (\<lambda>k. f (i, k)) (UNIV - {i})

goal (1 subgoal):
 1. sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i)
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i) \<squnion> sup_monoid.sum (\<lambda>k. f (i, k)) (UNIV - {i})
\<forall>k. i \<noteq> k \<longrightarrow> f (i, k) = bot

goal (1 subgoal):
 1. sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i)
[PROOF STEP]
by (metis (no_types) linorder_finite_sup_selective sup_not_bot)
[PROOF STATE]
proof (state)
this:
sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i)

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
have "(f \<odot> g) (i,j) = (f \<odot> mtop \<otimes> g) (i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<odot> g) (i, j) = (f \<odot> mtop \<otimes> g) (i, j)
[PROOF STEP]
by (metis assms matrix_stone_relation_algebra.coreflexive_comp_top_inf)
[PROOF STATE]
proof (state)
this:
(f \<odot> g) (i, j) = (f \<odot> mtop \<otimes> g) (i, j)

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(f \<odot> g) (i, j) = (f \<odot> mtop \<otimes> g) (i, j)

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
have "... = (\<Squnion>\<^sub>k f (i,k)) \<sqinter> g (i,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<odot> mtop \<otimes> g) (i, j) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} \<sqinter> g (i, j)
[PROOF STEP]
by (metis inf_matrix_def comp_top_linorder_matrix)
[PROOF STATE]
proof (state)
this:
(f \<odot> mtop \<otimes> g) (i, j) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} \<sqinter> g (i, j)

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(f \<odot> g) (i, j) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} \<sqinter> g (i, j)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(f \<odot> g) (i, j) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} \<sqinter> g (i, j)

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
(f \<odot> g) (i, j) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} \<sqinter> g (i, j)
sup_monoid.sum (\<lambda>k. f (i, k)) {k. True} = f (i, i)

goal (1 subgoal):
 1. (f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(f \<odot> g) (i, j) = f (i, i) \<sqinter> g (i, j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma edge_is_card2:
  assumes "e \<in> edge_set"
  shows "card e = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card e = 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card e = 2
[PROOF STEP]
obtain u v where eq: "e = {u, v}" and "adj u v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>u v. \<lbrakk>e = {u, v}; adj u v\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms edge_set_def
[PROOF STATE]
proof (prove)
using this:
e \<in> edge_set
edge_set \<equiv> {{u, v} |u v. adj u v}

goal (1 subgoal):
 1. (\<And>u v. \<lbrakk>e = {u, v}; adj u v\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
e = {u, v}
adj u v

goal (1 subgoal):
 1. card e = 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
e = {u, v}
adj u v
[PROOF STEP]
have "u \<noteq> v"
[PROOF STATE]
proof (prove)
using this:
e = {u, v}
adj u v

goal (1 subgoal):
 1. u \<noteq> v
[PROOF STEP]
using irrefl_alt
[PROOF STATE]
proof (prove)
using this:
e = {u, v}
adj u v
adj ?u ?v \<Longrightarrow> ?u \<noteq> ?v

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

goal (1 subgoal):
 1. card e = 2
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
u \<noteq> v

goal (1 subgoal):
 1. card e = 2
[PROOF STEP]
using eq
[PROOF STATE]
proof (prove)
using this:
u \<noteq> v
e = {u, v}

goal (1 subgoal):
 1. card e = 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card e = 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma monomials_of_p_mult_finite:
  assumes "finite (monomials_of R P)"
  shows "finite (monomials_of R (P \<Otimes> i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (monomials_of R (P \<Otimes> i))
[PROOF STEP]
using assms monomials_of_p_mult'[of P i]
[PROOF STATE]
proof (prove)
using this:
finite (monomials_of R P)
monomials_of R (P \<Otimes> i) = add_mset i ` monomials_of R P

goal (1 subgoal):
 1. finite (monomials_of R (P \<Otimes> i))
[PROOF STEP]
by simp


[STATEMENT]
lemma map_sq_matrix_smult: "c *\<^sub>S map_sq_matrix f A = map_sq_matrix (\<lambda>x. c * f x) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c *\<^sub>S map_sq_matrix f A = map_sq_matrix (\<lambda>x. c * f x) A
[PROOF STEP]
by transfer simp