[STATEMENT]
lemma soundness_mat_leqb_eqc1:
  assumes "dim_row A = dim_vec b"
  assumes "simplex (mat_leqb_eqc A b c) = Sat X"
  shows "\<exists>x. [A *\<^sub>v x]\<le>b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. [A*\<^sub>vx]\<le>b
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [A*\<^sub>v?x]\<le>b
[PROOF STEP]
define x where x: "x = fst (split_n_m_x (dim_col A) (dim_row A) X)"
[PROOF STATE]
proof (state)
this:
x = fst (split_n_m_x (dim_col A) (dim_row A) X)

goal (1 subgoal):
 1. [A*\<^sub>v?x]\<le>b
[PROOF STEP]
have *: "dim_vec x = dim_col A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec x = dim_col A
[PROOF STEP]
by (simp add: split_i_j_x_def x)
[PROOF STATE]
proof (state)
this:
dim_vec x = dim_col A

goal (1 subgoal):
 1. [A*\<^sub>v?x]\<le>b
[PROOF STEP]
have "\<forall>i<dim_vec b. (A *\<^sub>v x) $ i \<le> b $ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<dim_vec b. (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
proof (standard, standard)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i < dim_vec b \<Longrightarrow> (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i < dim_vec b \<Longrightarrow> (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
assume "i < dim_vec b"
[PROOF STATE]
proof (state)
this:
i < dim_vec b

goal (1 subgoal):
 1. \<And>i. i < dim_vec b \<Longrightarrow> (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
have "row A i \<bullet> x \<le> b$i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row A i \<bullet> x \<le> b $ i
[PROOF STEP]
using mat_x_leq_vec_sol[of A b X i]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<langle>X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (mat_x_leq_vec A b); i < dim_vec b\<rbrakk> \<Longrightarrow> matrix_to_lpolies A ! i \<lbrace> \<langle>X\<rangle> \<rbrace> \<le> b $ i

goal (1 subgoal):
 1. row A i \<bullet> x \<le> b $ i
[PROOF STEP]
by (metis \<open>i < dim_vec b\<close> assms(1) assms(2) fst_conv split_i_j_x_def x
          index_mult_mat_vec mat_leqb_eqc_split_simplex_correct1 mat_times_vec_leqD(3))
[PROOF STATE]
proof (state)
this:
row A i \<bullet> x \<le> b $ i

goal (1 subgoal):
 1. \<And>i. i < dim_vec b \<Longrightarrow> (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
row A i \<bullet> x \<le> b $ i
[PROOF STEP]
show "(A *\<^sub>v x) $ i \<le> b $ i"
[PROOF STATE]
proof (prove)
using this:
row A i \<bullet> x \<le> b $ i

goal (1 subgoal):
 1. (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
by (simp add: \<open>i < dim_vec b\<close> assms(1))
[PROOF STATE]
proof (state)
this:
(A *\<^sub>v x) $ i \<le> b $ i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>i<dim_vec b. (A *\<^sub>v x) $ i \<le> b $ i

goal (1 subgoal):
 1. [A*\<^sub>v?x]\<le>b
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<dim_vec b. (A *\<^sub>v x) $ i \<le> b $ i
[PROOF STEP]
show "[A *\<^sub>v x]\<le>b"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<dim_vec b. (A *\<^sub>v x) $ i \<le> b $ i

goal (1 subgoal):
 1. [A*\<^sub>vx]\<le>b
[PROOF STEP]
using mat_times_vec_leqI[of A b x, OF assms(1) *[symmetric]]
[PROOF STATE]
proof (prove)
using this:
\<forall>i<dim_vec b. (A *\<^sub>v x) $ i \<le> b $ i
(\<And>i. i < dim_vec b \<Longrightarrow> (A *\<^sub>v x) $ i \<le> b $ i) \<Longrightarrow> [A*\<^sub>vx]\<le>b

goal (1 subgoal):
 1. [A*\<^sub>vx]\<le>b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[A*\<^sub>vx]\<le>b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subst_lcnj[simp]:
  "set \<phi>s \<subseteq> fmla \<Longrightarrow> t \<in> trm \<Longrightarrow> x \<in> var \<Longrightarrow>
 subst (lcnj \<phi>s) t x = lcnj (map (\<lambda>\<phi>. subst \<phi> t x) \<phi>s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set \<phi>s \<subseteq> fmla; t \<in> trm; x \<in> var\<rbrakk> \<Longrightarrow> subst (lcnj \<phi>s) t x = lcnj (map (\<lambda>\<phi>. subst \<phi> t x) \<phi>s)
[PROOF STEP]
by(induct \<phi>s) auto


[STATEMENT]
lemma arg_div_2kpi:
  assumes "z1 \<noteq> 0" and "z2 \<noteq> 0"
  shows "\<exists> k::int. Arg (z1 / z2) = Arg z1 - Arg z2 + 2*k*pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi
[PROOF STEP]
obtain x1 where "Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x1. Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms arg_mult_2kpi[of z1 "1/z2"]
[PROOF STATE]
proof (prove)
using this:
z1 \<noteq> 0
z2 \<noteq> 0
z1 * (1 / z2) \<noteq> 0 \<Longrightarrow> \<exists>x. Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x * pi

goal (1 subgoal):
 1. (\<And>x1. Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi

goal (1 subgoal):
 1. \<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi

goal (1 subgoal):
 1. \<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi
[PROOF STEP]
obtain x2 where "Arg (1 / z2) = - Arg z2 + 2 * real_of_int x2 * pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x2. Arg (1 / z2) = - Arg z2 + 2 * real_of_int x2 * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms arg_inv_2kpi[of z2]
[PROOF STATE]
proof (prove)
using this:
z1 \<noteq> 0
z2 \<noteq> 0
z2 \<noteq> 0 \<Longrightarrow> \<exists>x. Arg (1 / z2) = - Arg z2 + 2 * real_of_int x * pi

goal (1 subgoal):
 1. (\<And>x2. Arg (1 / z2) = - Arg z2 + 2 * real_of_int x2 * pi \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Arg (1 / z2) = - Arg z2 + 2 * real_of_int x2 * pi

goal (1 subgoal):
 1. \<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi
Arg (1 / z2) = - Arg z2 + 2 * real_of_int x2 * pi
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Arg (z1 * (1 / z2)) = Arg z1 + Arg (1 / z2) + 2 * real_of_int x1 * pi
Arg (1 / z2) = - Arg z2 + 2 * real_of_int x2 * pi

goal (1 subgoal):
 1. \<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi
[PROOF STEP]
by (rule_tac x="x1 + x2" in exI, simp add: field_simps)
[PROOF STATE]
proof (state)
this:
\<exists>x. Arg (z1 / z2) = Arg z1 - Arg z2 + 2 * real_of_int x * pi

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tabulate_fold: "tabulate xs f = List.fold (\<lambda>k m. update k (f k) m) xs empty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tabulate xs f = List.fold (\<lambda>k. update k (f k)) xs Mapping.empty
[PROOF STEP]
proof transfer
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xs f. map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
fix f :: "'a \<Rightarrow> 'b" and xs
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xs f. map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
have "map_of (List.map (\<lambda>k. (k, f k)) xs) = foldr (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_of (list.map (\<lambda>k. (k, f k)) xs) = foldr (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
by (simp add: foldr_map comp_def map_of_foldr)
[PROOF STATE]
proof (state)
this:
map_of (list.map (\<lambda>k. (k, f k)) xs) = foldr (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty

goal (1 subgoal):
 1. \<And>xs f. map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
map_of (list.map (\<lambda>k. (k, f k)) xs) = foldr (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty

goal (1 subgoal):
 1. \<And>xs f. map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
have "foldr (\<lambda>k m. m(k \<mapsto> f k)) xs = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. foldr (\<lambda>k m. m(k \<mapsto> f k)) xs = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs
[PROOF STEP]
by (rule foldr_fold) (simp add: fun_eq_iff)
[PROOF STATE]
proof (state)
this:
foldr (\<lambda>k m. m(k \<mapsto> f k)) xs = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs

goal (1 subgoal):
 1. \<And>xs f. map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
map_of (list.map (\<lambda>k. (k, f k)) xs) = foldr (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
foldr (\<lambda>k m. m(k \<mapsto> f k)) xs = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs
[PROOF STEP]
show "map_of (List.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty"
[PROOF STATE]
proof (prove)
using this:
map_of (list.map (\<lambda>k. (k, f k)) xs) = foldr (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
foldr (\<lambda>k m. m(k \<mapsto> f k)) xs = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs

goal (1 subgoal):
 1. map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map_of (list.map (\<lambda>k. (k, f k)) xs) = List.fold (\<lambda>k m. m(k \<mapsto> f k)) xs Map.empty

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_permutation_bij_restrict1:
  assumes "bij_betw f A A"
  shows   "bij (restrict1 f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij (restrict1 f A)
[PROOF STEP]
proof (rule bijI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj (restrict1 f A)
 2. surj (restrict1 f A)
[PROOF STEP]
have bij_f: "inj_on f A" "f`A = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f A &&& f ` A = A
[PROOF STEP]
using iffD1[OF bij_betw_def, OF assms]
[PROOF STATE]
proof (prove)
using this:
inj_on f A \<and> f ` A = A

goal (1 subgoal):
 1. inj_on f A &&& f ` A = A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inj_on f A
f ` A = A

goal (2 subgoals):
 1. inj (restrict1 f A)
 2. surj (restrict1 f A)
[PROOF STEP]
show "inj (restrict1 f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj (restrict1 f A)
[PROOF STEP]
proof (rule injI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. restrict1 f A x = restrict1 f A y \<Longrightarrow> x = y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. restrict1 f A x = restrict1 f A y \<Longrightarrow> x = y
[PROOF STEP]
show "restrict1 f A x = restrict1 f A y \<Longrightarrow> x=y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. restrict1 f A x = restrict1 f A y \<Longrightarrow> x = y
[PROOF STEP]
using inj_onD bij_f
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>inj_on ?f ?A; ?f ?x = ?f ?y; ?x \<in> ?A; ?y \<in> ?A\<rbrakk> \<Longrightarrow> ?x = ?y
inj_on f A
f ` A = A

goal (1 subgoal):
 1. restrict1 f A x = restrict1 f A y \<Longrightarrow> x = y
[PROOF STEP]
by (cases "x\<in>A" "y\<in>A" rule: two_cases) auto
[PROOF STATE]
proof (state)
this:
restrict1 f A x = restrict1 f A y \<Longrightarrow> x = y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj (restrict1 f A)

goal (1 subgoal):
 1. surj (restrict1 f A)
[PROOF STEP]
show "surj (restrict1 f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. surj (restrict1 f A)
[PROOF STEP]
proof (rule surjI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. restrict1 f A (?f x) = x
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. restrict1 f A (?f x) = x
[PROOF STEP]
define y where "y \<equiv> restrict1 (the_inv_into A f) A x"
[PROOF STATE]
proof (state)
this:
y \<equiv> restrict1 (the_inv_into A f) A x

goal (1 subgoal):
 1. \<And>x. restrict1 f A (?f x) = x
[PROOF STEP]
thus "restrict1 f A y = x"
[PROOF STATE]
proof (prove)
using this:
y \<equiv> restrict1 (the_inv_into A f) A x

goal (1 subgoal):
 1. restrict1 f A y = x
[PROOF STEP]
using the_inv_into_into[of f] bij_f f_the_inv_into_f[of f]
[PROOF STATE]
proof (prove)
using this:
y \<equiv> restrict1 (the_inv_into A f) A x
\<lbrakk>inj_on f ?A; ?x \<in> f ` ?A; ?A \<subseteq> ?B\<rbrakk> \<Longrightarrow> the_inv_into ?A f ?x \<in> ?B
inj_on f A
f ` A = A
\<lbrakk>inj_on f ?A; ?y \<in> f ` ?A\<rbrakk> \<Longrightarrow> f (the_inv_into ?A f ?y) = ?y

goal (1 subgoal):
 1. restrict1 f A y = x
[PROOF STEP]
by (cases "x\<in>A") auto
[PROOF STATE]
proof (state)
this:
restrict1 f A y = x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
surj (restrict1 f A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma compact_imp_bounded:
  assumes "compact U"
  shows "bounded U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded U
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bounded U
[PROOF STEP]
have "compact U" "\<forall>x\<in>U. open (ball x 1)" "U \<subseteq> (\<Union>x\<in>U. ball x 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact U &&& \<forall>x\<in>U. open (ball x 1) &&& U \<subseteq> (\<Union>x\<in>U. ball x 1)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
compact U

goal (1 subgoal):
 1. compact U &&& \<forall>x\<in>U. open (ball x 1) &&& U \<subseteq> (\<Union>x\<in>U. ball x 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
compact U
\<forall>x\<in>U. open (ball x 1)
U \<subseteq> (\<Union>x\<in>U. ball x 1)

goal (1 subgoal):
 1. bounded U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
compact U
\<forall>x\<in>U. open (ball x 1)
U \<subseteq> (\<Union>x\<in>U. ball x 1)
[PROOF STEP]
obtain D where D: "D \<subseteq> U" "finite D" "U \<subseteq> (\<Union>x\<in>D. ball x 1)"
[PROOF STATE]
proof (prove)
using this:
compact U
\<forall>x\<in>U. open (ball x 1)
U \<subseteq> (\<Union>x\<in>U. ball x 1)

goal (1 subgoal):
 1. (\<And>D. \<lbrakk>D \<subseteq> U; finite D; U \<subseteq> (\<Union>x\<in>D. ball x 1)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis compactE_image)
[PROOF STATE]
proof (state)
this:
D \<subseteq> U
finite D
U \<subseteq> (\<Union>x\<in>D. ball x 1)

goal (1 subgoal):
 1. bounded U
[PROOF STEP]
from \<open>finite D\<close>
[PROOF STATE]
proof (chain)
picking this:
finite D
[PROOF STEP]
have "bounded (\<Union>x\<in>D. ball x 1)"
[PROOF STATE]
proof (prove)
using this:
finite D

goal (1 subgoal):
 1. bounded (\<Union>x\<in>D. ball x 1)
[PROOF STEP]
by (simp add: bounded_UN)
[PROOF STATE]
proof (state)
this:
bounded (\<Union>x\<in>D. ball x 1)

goal (1 subgoal):
 1. bounded U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bounded (\<Union>x\<in>D. ball x 1)
[PROOF STEP]
show "bounded U"
[PROOF STATE]
proof (prove)
using this:
bounded (\<Union>x\<in>D. ball x 1)

goal (1 subgoal):
 1. bounded U
[PROOF STEP]
using \<open>U \<subseteq> (\<Union>x\<in>D. ball x 1)\<close>
[PROOF STATE]
proof (prove)
using this:
bounded (\<Union>x\<in>D. ball x 1)
U \<subseteq> (\<Union>x\<in>D. ball x 1)

goal (1 subgoal):
 1. bounded U
[PROOF STEP]
by (rule bounded_subset)
[PROOF STATE]
proof (state)
this:
bounded U

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma variant_variable_fresh:
  assumes "finite S"
  shows "fst (variant_variable s S) \<notin> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (variant_variable s S) \<notin> S
[PROOF STEP]
apply (cases s)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1. s = Free x1 \<Longrightarrow> fst (variant_variable s S) \<notin> S
 2. \<And>x2. s = Var x2 \<Longrightarrow> fst (variant_variable s S) \<notin> S
[PROOF STEP]
using assms fresh_name'_fresh
[PROOF STATE]
proof (prove)
using this:
finite S
finite ?S \<Longrightarrow> fresh_name' ?S \<notin> ?S

goal (2 subgoals):
 1. \<And>x1. s = Free x1 \<Longrightarrow> fst (variant_variable s S) \<notin> S
 2. \<And>x2. s = Var x2 \<Longrightarrow> fst (variant_variable s S) \<notin> S
[PROOF STEP]
apply (metis finite_imageI fstI name.simps(1) rev_image_eqI variant_variable.simps(1))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x2. s = Var x2 \<Longrightarrow> fst (variant_variable s S) \<notin> S
[PROOF STEP]
using assms fresh_name'_fresh
[PROOF STATE]
proof (prove)
using this:
finite S
finite ?S \<Longrightarrow> fresh_name' ?S \<notin> ?S

goal (1 subgoal):
 1. \<And>x2. s = Var x2 \<Longrightarrow> fst (variant_variable s S) \<notin> S
[PROOF STEP]
by (metis (no_types, opaque_lifting) finite_imageI fst_conv image_iff name.simps(2) surj_pair variant_variable.simps(2))


[STATEMENT]
lemma ex1_poincare_line_general:
  assumes "u \<noteq> v" "u \<noteq> inversion v"
  shows "\<exists>! l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>!l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l
[PROOF STEP]
proof (rule ex1I)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. is_poincare_line ?a \<and> u \<in> circline_set ?a \<and> v \<in> circline_set ?a
 2. \<And>l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l \<Longrightarrow> l = ?a
[PROOF STEP]
let ?l = "poincare_line u v"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. is_poincare_line ?a \<and> u \<in> circline_set ?a \<and> v \<in> circline_set ?a
 2. \<And>l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l \<Longrightarrow> l = ?a
[PROOF STEP]
show "is_poincare_line ?l \<and> u \<in> circline_set ?l \<and> v \<in> circline_set ?l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_poincare_line (poincare_line u v) \<and> u \<in> circline_set (poincare_line u v) \<and> v \<in> circline_set (poincare_line u v)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<noteq> v
u \<noteq> inversion v

goal (1 subgoal):
 1. is_poincare_line (poincare_line u v) \<and> u \<in> circline_set (poincare_line u v) \<and> v \<in> circline_set (poincare_line u v)
[PROOF STEP]
unfolding circline_set_def
[PROOF STATE]
proof (prove)
using this:
u \<noteq> v
u \<noteq> inversion v

goal (1 subgoal):
 1. is_poincare_line (poincare_line u v) \<and> u \<in> Collect (on_circline (poincare_line u v)) \<and> v \<in> Collect (on_circline (poincare_line u v))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_poincare_line (poincare_line u v) \<and> u \<in> circline_set (poincare_line u v) \<and> v \<in> circline_set (poincare_line u v)

goal (1 subgoal):
 1. \<And>l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l \<Longrightarrow> l = poincare_line u v
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l \<Longrightarrow> l = poincare_line u v
[PROOF STEP]
fix l
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l \<Longrightarrow> l = poincare_line u v
[PROOF STEP]
assume "is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l"
[PROOF STATE]
proof (state)
this:
is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l

goal (1 subgoal):
 1. \<And>l. is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l \<Longrightarrow> l = poincare_line u v
[PROOF STEP]
thus "l = poincare_line u v"
[PROOF STATE]
proof (prove)
using this:
is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l

goal (1 subgoal):
 1. l = poincare_line u v
[PROOF STEP]
using unique_poincare_line_general assms
[PROOF STATE]
proof (prove)
using this:
is_poincare_line l \<and> u \<in> circline_set l \<and> v \<in> circline_set l
\<lbrakk>?u \<noteq> ?v; ?u \<noteq> inversion ?v; ?u \<in> circline_set ?l; ?v \<in> circline_set ?l; is_poincare_line ?l\<rbrakk> \<Longrightarrow> ?l = poincare_line ?u ?v
u \<noteq> v
u \<noteq> inversion v

goal (1 subgoal):
 1. l = poincare_line u v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l = poincare_line u v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma balance_inv2:
  assumes "inv2 l" "inv2 r" "bheight l = bheight r"
  shows "inv2 (balance l k v r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv2 (balance l k v r)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
inv2 l
inv2 r
bheight l = bheight r

goal (1 subgoal):
 1. inv2 (balance l k v r)
[PROOF STEP]
by (induct l k v r rule: balance.induct) auto


[STATEMENT]
lemma wf_darcs_alt: "wf_darcs t \<longleftrightarrow> (\<forall>x. count (darcs_mset t) x \<le> 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf_darcs t = (\<forall>x. count (darcs_mset t) x \<le> 1)
[PROOF STEP]
unfolding wf_darcs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>#darcs_mset t. count (darcs_mset t) x = 1) = (\<forall>x. count (darcs_mset t) x \<le> 1)
[PROOF STEP]
by (metis count_greater_eq_one_iff dual_order.eq_iff linorder_le_cases)


[STATEMENT]
lemma sortedB: "sorted (list_of_B (heap_of_B xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted (list_of_B (heap_of_B xs))
[PROOF STEP]
by (simp add: heap_of_B_def braun_heapify heap_heapify sorted_list_of_B)


[STATEMENT]
lemma (in Order) le_antisym:"\<lbrakk>a \<in> carrier D; b \<in> carrier D;
      a \<preceq> b; b \<preceq> a \<rbrakk> \<Longrightarrow> a = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier D; b \<in> carrier D; a \<preceq> b; b \<preceq> a\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
apply (unfold ole_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier D; b \<in> carrier D; (a, b) \<in> rel D; (b, a) \<in> rel D\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
apply (rule antisym)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>a \<in> carrier D; b \<in> carrier D; (a, b) \<in> rel D; (b, a) \<in> rel D\<rbrakk> \<Longrightarrow> a \<in> carrier D
 2. \<lbrakk>a \<in> carrier D; b \<in> carrier D; (a, b) \<in> rel D; (b, a) \<in> rel D\<rbrakk> \<Longrightarrow> b \<in> carrier D
 3. \<lbrakk>a \<in> carrier D; b \<in> carrier D; (a, b) \<in> rel D; (b, a) \<in> rel D\<rbrakk> \<Longrightarrow> (a, b) \<in> rel D
 4. \<lbrakk>a \<in> carrier D; b \<in> carrier D; (a, b) \<in> rel D; (b, a) \<in> rel D\<rbrakk> \<Longrightarrow> (b, a) \<in> rel D
[PROOF STEP]
apply assumption+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma subset_iT_Div_Int: "A \<subseteq> B \<Longrightarrow> (A \<inter> B) \<oslash> k = (A \<oslash> k) \<inter> (B \<oslash> k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> B \<Longrightarrow> A \<inter> B \<oslash> k = (A \<oslash> k) \<inter> (B \<oslash> k)
[PROOF STEP]
by (simp add: iT_Div_def subset_image_Int)


[STATEMENT]
lemma gen_boolean_algebra_elem_uni_of_atoms:
  assumes "finite Xs"
  assumes "S = \<Union> Xs"
  assumes "X \<in> gen_boolean_algebra S Xs"
  shows "X = \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X = \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. X \<subseteq> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
 2. \<Union> {a \<in> atoms_of Xs. a \<subseteq> X} \<subseteq> X
[PROOF STEP]
show "X \<subseteq> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<subseteq> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> X \<Longrightarrow> x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> X \<Longrightarrow> x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
assume A: "x \<in> X"
[PROOF STATE]
proof (state)
this:
x \<in> X

goal (1 subgoal):
 1. \<And>x. x \<in> X \<Longrightarrow> x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> X
[PROOF STEP]
have "point_to_atom Xs x \<in> atoms_of Xs"
[PROOF STATE]
proof (prove)
using this:
x \<in> X

goal (1 subgoal):
 1. point_to_atom Xs x \<in> atoms_of Xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> X
finite Xs
S = \<Union> Xs
X \<in> gen_boolean_algebra S Xs

goal (1 subgoal):
 1. point_to_atom Xs x \<in> atoms_of Xs
[PROOF STEP]
by (meson gen_boolean_algebra_subset point_to_atom_closed subsetD)
[PROOF STATE]
proof (state)
this:
point_to_atom Xs x \<in> atoms_of Xs

goal (1 subgoal):
 1. \<And>x. x \<in> X \<Longrightarrow> x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
point_to_atom Xs x \<in> atoms_of Xs
[PROOF STEP]
show "x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}"
[PROOF STATE]
proof (prove)
using this:
point_to_atom Xs x \<in> atoms_of Xs

goal (1 subgoal):
 1. x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}
[PROOF STEP]
by (smt A IntI Union_iff assms(1) assms(2) assms(3) empty_iff finite_algebra_atoms_are_minimal gen_boolean_algebra.universe gen_boolean_algebra_subset mem_Collect_eq point_in_atom_of_type point_to_atom_def subsetD)
[PROOF STATE]
proof (state)
this:
x \<in> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
X \<subseteq> \<Union> {a \<in> atoms_of Xs. a \<subseteq> X}

goal (1 subgoal):
 1. \<Union> {a \<in> atoms_of Xs. a \<subseteq> X} \<subseteq> X
[PROOF STEP]
show "\<Union> {a \<in> atoms_of Xs. a \<subseteq> X} \<subseteq> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> {a \<in> atoms_of Xs. a \<subseteq> X} \<subseteq> X
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Union> {a \<in> atoms_of Xs. a \<subseteq> X} \<subseteq> X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma size_Diff_singleton_if: "size (A - {#x#}) = (if x \<in># A then size A - 1 else size A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size (A - {#x#}) = (if x \<in># A then size A - 1 else size A)
[PROOF STEP]
by (simp add: diff_single_trivial size_Diff_singleton)


[STATEMENT]
lemma csqrt_inverse:
  assumes "z \<notin> \<real>\<^sub>\<le>\<^sub>0"
    shows "csqrt (inverse z) = inverse (csqrt z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. csqrt (inverse z) = inverse (csqrt z)
[PROOF STEP]
proof (cases "z=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z = 0 \<Longrightarrow> csqrt (inverse z) = inverse (csqrt z)
 2. z \<noteq> 0 \<Longrightarrow> csqrt (inverse z) = inverse (csqrt z)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
z \<noteq> 0

goal (2 subgoals):
 1. z = 0 \<Longrightarrow> csqrt (inverse z) = inverse (csqrt z)
 2. z \<noteq> 0 \<Longrightarrow> csqrt (inverse z) = inverse (csqrt z)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z \<noteq> 0

goal (1 subgoal):
 1. csqrt (inverse z) = inverse (csqrt z)
[PROOF STEP]
using assms csqrt_exp_Ln Ln_inverse exp_minus
[PROOF STATE]
proof (prove)
using this:
z \<noteq> 0
z \<notin> \<real>\<^sub>\<le>\<^sub>0
?z \<noteq> 0 \<Longrightarrow> csqrt ?z = exp (Ln ?z / 2)
?z \<notin> \<real>\<^sub>\<le>\<^sub>0 \<Longrightarrow> Ln (inverse ?z) = - Ln ?z
exp (- ?x) = inverse (exp ?x)

goal (1 subgoal):
 1. csqrt (inverse z) = inverse (csqrt z)
[PROOF STEP]
by (simp add: csqrt_exp_Ln Ln_inverse exp_minus)
[PROOF STATE]
proof (state)
this:
csqrt (inverse z) = inverse (csqrt z)

goal (1 subgoal):
 1. z = 0 \<Longrightarrow> csqrt (inverse z) = inverse (csqrt z)
[PROOF STEP]
qed auto


[STATEMENT]
lemma suffixes_append:
  "suffixes (xs @ ys) = suffixes ys @ map (\<lambda>xs'. xs' @ ys) (tl (suffixes xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. suffixes (xs @ ys) = suffixes ys @ map (\<lambda>xs'. xs' @ ys) (tl (suffixes xs))
[PROOF STEP]
proof (induction ys rule: rev_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. suffixes (xs @ []) = suffixes [] @ map (\<lambda>xs'. xs' @ []) (tl (suffixes xs))
 2. \<And>x xsa. suffixes (xs @ xsa) = suffixes xsa @ map (\<lambda>xs'. xs' @ xsa) (tl (suffixes xs)) \<Longrightarrow> suffixes (xs @ xsa @ [x]) = suffixes (xsa @ [x]) @ map (\<lambda>xs'. xs' @ xsa @ [x]) (tl (suffixes xs))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. suffixes (xs @ []) = suffixes [] @ map (\<lambda>xs'. xs' @ []) (tl (suffixes xs))
 2. \<And>x xsa. suffixes (xs @ xsa) = suffixes xsa @ map (\<lambda>xs'. xs' @ xsa) (tl (suffixes xs)) \<Longrightarrow> suffixes (xs @ xsa @ [x]) = suffixes (xsa @ [x]) @ map (\<lambda>xs'. xs' @ xsa @ [x]) (tl (suffixes xs))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. suffixes (xs @ []) = suffixes [] @ map (\<lambda>xs'. xs' @ []) (tl (suffixes xs))
[PROOF STEP]
by (cases xs rule: rev_cases) auto
[PROOF STATE]
proof (state)
this:
suffixes (xs @ []) = suffixes [] @ map (\<lambda>xs'. xs' @ []) (tl (suffixes xs))

goal (1 subgoal):
 1. \<And>x xsa. suffixes (xs @ xsa) = suffixes xsa @ map (\<lambda>xs'. xs' @ xsa) (tl (suffixes xs)) \<Longrightarrow> suffixes (xs @ xsa @ [x]) = suffixes (xsa @ [x]) @ map (\<lambda>xs'. xs' @ xsa @ [x]) (tl (suffixes xs))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xsa. suffixes (xs @ xsa) = suffixes xsa @ map (\<lambda>xs'. xs' @ xsa) (tl (suffixes xs)) \<Longrightarrow> suffixes (xs @ xsa @ [x]) = suffixes (xsa @ [x]) @ map (\<lambda>xs'. xs' @ xsa @ [x]) (tl (suffixes xs))
[PROOF STEP]
case (snoc y ys)
[PROOF STATE]
proof (state)
this:
suffixes (xs @ ys) = suffixes ys @ map (\<lambda>xs'. xs' @ ys) (tl (suffixes xs))

goal (1 subgoal):
 1. \<And>x xsa. suffixes (xs @ xsa) = suffixes xsa @ map (\<lambda>xs'. xs' @ xsa) (tl (suffixes xs)) \<Longrightarrow> suffixes (xs @ xsa @ [x]) = suffixes (xsa @ [x]) @ map (\<lambda>xs'. xs' @ xsa @ [x]) (tl (suffixes xs))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. suffixes (xs @ ys @ [y]) = suffixes (ys @ [y]) @ map (\<lambda>xs'. xs' @ ys @ [y]) (tl (suffixes xs))
[PROOF STEP]
by (simp only: append.assoc [symmetric] suffixes_snoc snoc.IH) simp
[PROOF STATE]
proof (state)
this:
suffixes (xs @ ys @ [y]) = suffixes (ys @ [y]) @ map (\<lambda>xs'. xs' @ ys @ [y]) (tl (suffixes xs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma zero_less_dist_iff: "0 < dist x y \<longleftrightarrow> x \<noteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < dist x y) = (x \<noteq> y)
[PROOF STEP]
by (simp add: less_le)


[STATEMENT]
lemma \<alpha>_inner:
  "inner_prod \<alpha> \<alpha> = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod \<alpha> \<alpha> = 1
[PROOF STEP]
apply (simp add: scalar_prod_def \<alpha>_eval)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<N. complex_of_real (if f i then 0 else 1 / sqrt (real (N - M))) * complex_of_real (if f i then 0 else 1 / sqrt (real (N - M)))) = 1
[PROOF STEP]
apply (subst sum.mono_neutral_cong_right[of "{0..<N}" "{0..<N}-{i. i < N \<and> f i}"])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. finite {0..<N}
 2. {0..<N} - {i. i < N \<and> f i} \<subseteq> {0..<N}
 3. \<forall>i\<in>{0..<N} - ({0..<N} - {i. i < N \<and> f i}). complex_of_real (if f i then 0 else 1 / sqrt (real (N - M))) * complex_of_real (if f i then 0 else 1 / sqrt (real (N - M))) = 0
 4. \<And>x. x \<in> {0..<N} - {i. i < N \<and> f i} \<Longrightarrow> complex_of_real (if f x then 0 else 1 / sqrt (real (N - M))) * complex_of_real (if f x then 0 else 1 / sqrt (real (N - M))) = ?h6 x
 5. sum ?h6 ({0..<N} - {i. i < N \<and> f i}) = 1
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (card ({0..<N} - {i. i < N \<and> f i})) = complex_of_real (sqrt (real (N - M))) * complex_of_real (sqrt (real (N - M)))
[PROOF STEP]
apply (subgoal_tac "card ({0..<N} - {i. i < N \<and> f i}) = N - M")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. card ({0..<N} - {i. i < N \<and> f i}) = N - M \<Longrightarrow> of_nat (card ({0..<N} - {i. i < N \<and> f i})) = complex_of_real (sqrt (real (N - M))) * complex_of_real (sqrt (real (N - M)))
 2. card ({0..<N} - {i. i < N \<and> f i}) = N - M
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card ({0..<N} - {i. i < N \<and> f i}) = N - M \<Longrightarrow> of_nat (card ({0..<N} - {i. i < N \<and> f i})) = complex_of_real (sqrt (real (N - M))) * complex_of_real (sqrt (real (N - M)))
[PROOF STEP]
by (metis of_nat_0_le_iff of_real_of_nat_eq of_real_power power2_eq_square real_sqrt_pow2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card ({0..<N} - {i. i < N \<and> f i}) = N - M
[PROOF STEP]
unfolding N_def M_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card ({0..<2 ^ n} - {i. i < 2 ^ n \<and> f i}) = 2 ^ n - card {i. i < 2 ^ n \<and> f i}
[PROOF STEP]
by (metis (no_types, lifting) atLeastLessThan_iff card.infinite card_Diff_subset card_atLeastLessThan diff_zero dimM(1) mem_Collect_eq neq0_conv subsetI zero_order(1))


[STATEMENT]
lemma AE_iff_null:
  assumes "{x\<in>space M. \<not> P x} \<in> sets M" (is "?P \<in> sets M")
  shows "(AE x in M. P x) \<longleftrightarrow> {x\<in>space M. \<not> P x} \<in> null_sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. almost_everywhere M P = ({x \<in> space M. \<not> P x} \<in> null_sets M)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. almost_everywhere M P \<Longrightarrow> {x \<in> space M. \<not> P x} \<in> null_sets M
 2. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
assume "AE x in M. P x"
[PROOF STATE]
proof (state)
this:
almost_everywhere M P

goal (2 subgoals):
 1. almost_everywhere M P \<Longrightarrow> {x \<in> space M. \<not> P x} \<in> null_sets M
 2. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
almost_everywhere M P
[PROOF STEP]
obtain N where N: "N \<in> sets M" "?P \<subseteq> N" "emeasure M N = 0"
[PROOF STATE]
proof (prove)
using this:
almost_everywhere M P

goal (1 subgoal):
 1. (\<And>N. \<lbrakk>N \<in> sets M; {x \<in> space M. \<not> P x} \<subseteq> N; emeasure M N = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding eventually_ae_filter
[PROOF STATE]
proof (prove)
using this:
Bex (null_sets M) ((\<subseteq>) {x \<in> space M. \<not> P x})

goal (1 subgoal):
 1. (\<And>N. \<lbrakk>N \<in> sets M; {x \<in> space M. \<not> P x} \<subseteq> N; emeasure M N = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
N \<in> sets M
{x \<in> space M. \<not> P x} \<subseteq> N
emeasure M N = 0

goal (2 subgoals):
 1. almost_everywhere M P \<Longrightarrow> {x \<in> space M. \<not> P x} \<in> null_sets M
 2. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
have "emeasure M ?P \<le> emeasure M N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M {x \<in> space M. \<not> P x} \<le> emeasure M N
[PROOF STEP]
using assms N(1,2)
[PROOF STATE]
proof (prove)
using this:
{x \<in> space M. \<not> P x} \<in> sets M
N \<in> sets M
{x \<in> space M. \<not> P x} \<subseteq> N

goal (1 subgoal):
 1. emeasure M {x \<in> space M. \<not> P x} \<le> emeasure M N
[PROOF STEP]
by (auto intro: emeasure_mono)
[PROOF STATE]
proof (state)
this:
emeasure M {x \<in> space M. \<not> P x} \<le> emeasure M N

goal (2 subgoals):
 1. almost_everywhere M P \<Longrightarrow> {x \<in> space M. \<not> P x} \<in> null_sets M
 2. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
emeasure M {x \<in> space M. \<not> P x} \<le> emeasure M N
[PROOF STEP]
have "emeasure M ?P = 0"
[PROOF STATE]
proof (prove)
using this:
emeasure M {x \<in> space M. \<not> P x} \<le> emeasure M N

goal (1 subgoal):
 1. emeasure M {x \<in> space M. \<not> P x} = 0
[PROOF STEP]
unfolding \<open>emeasure M N = 0\<close>
[PROOF STATE]
proof (prove)
using this:
emeasure M {x \<in> space M. \<not> P x} \<le> 0

goal (1 subgoal):
 1. emeasure M {x \<in> space M. \<not> P x} = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
emeasure M {x \<in> space M. \<not> P x} = 0

goal (2 subgoals):
 1. almost_everywhere M P \<Longrightarrow> {x \<in> space M. \<not> P x} \<in> null_sets M
 2. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
emeasure M {x \<in> space M. \<not> P x} = 0
[PROOF STEP]
show "?P \<in> null_sets M"
[PROOF STATE]
proof (prove)
using this:
emeasure M {x \<in> space M. \<not> P x} = 0

goal (1 subgoal):
 1. {x \<in> space M. \<not> P x} \<in> null_sets M
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
emeasure M {x \<in> space M. \<not> P x} = 0
{x \<in> space M. \<not> P x} \<in> sets M

goal (1 subgoal):
 1. {x \<in> space M. \<not> P x} \<in> null_sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x \<in> space M. \<not> P x} \<in> null_sets M

goal (1 subgoal):
 1. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
assume "?P \<in> null_sets M"
[PROOF STATE]
proof (state)
this:
{x \<in> space M. \<not> P x} \<in> null_sets M

goal (1 subgoal):
 1. {x \<in> space M. \<not> P x} \<in> null_sets M \<Longrightarrow> almost_everywhere M P
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
{x \<in> space M. \<not> P x} \<in> sets M
{x \<in> space M. \<not> P x} \<in> null_sets M
[PROOF STEP]
show "AE x in M. P x"
[PROOF STATE]
proof (prove)
using this:
{x \<in> space M. \<not> P x} \<in> sets M
{x \<in> space M. \<not> P x} \<in> null_sets M

goal (1 subgoal):
 1. almost_everywhere M P
[PROOF STEP]
by (auto intro: AE_I')
[PROOF STATE]
proof (state)
this:
almost_everywhere M P

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma binomial_Suc_n [simp]: "Suc n choose n = Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc n choose n = Suc n
[PROOF STEP]
by (induct n) simp_all


[STATEMENT]
lemma edge_vertices_not_equal:
  assumes "{x,y} \<in> E"
  shows "x \<noteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> y
[PROOF STEP]
using assms two_edges
[PROOF STATE]
proof (prove)
using this:
{x, y} \<in> E
?e \<in> E \<Longrightarrow> card ?e = 2

goal (1 subgoal):
 1. x \<noteq> y
[PROOF STEP]
by fastforce


[STATEMENT]
lemma directed_eq_rtrancl_Image: "directed_towards A r = (r\<^sup>*)\<inverse> `` A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. directed_towards A r = (r\<^sup>*)\<inverse> `` A
[PROOF STEP]
unfolding set_eq_iff directed_eq_rtrancl Image_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. (\<exists>a\<in>A. (x, a) \<in> r\<^sup>*) = (\<exists>xa\<in>A. (xa, x) \<in> (r\<^sup>*)\<inverse>)
[PROOF STEP]
by simp


[STATEMENT]
lemma set_times_plus_distrib2: "a *o (B + C) = (a *o B) + (a *o C)"
  for a :: "'a::semiring"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *o (B + C) = a *o B + a *o C
[PROOF STEP]
by (auto simp: set_plus_def elt_set_times_def; metis distrib_left)


[STATEMENT]
lemma gval_foldr_true:
  "(gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g \<in> set G. gval g s = true)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true)
[PROOF STEP]
proof(induct G)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (gval (foldr gAnd [] (Bc True)) s = true) = (\<forall>g\<in>set []. gval g s = true)
 2. \<And>a G. (gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true) \<Longrightarrow> (gval (foldr gAnd (a # G) (Bc True)) s = true) = (\<forall>g\<in>set (a # G). gval g s = true)
[PROOF STEP]
case (Cons a G)
[PROOF STATE]
proof (state)
this:
(gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true)

goal (2 subgoals):
 1. (gval (foldr gAnd [] (Bc True)) s = true) = (\<forall>g\<in>set []. gval g s = true)
 2. \<And>a G. (gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true) \<Longrightarrow> (gval (foldr gAnd (a # G) (Bc True)) s = true) = (\<forall>g\<in>set (a # G). gval g s = true)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true)

goal (1 subgoal):
 1. (gval (foldr gAnd (a # G) (Bc True)) s = true) = (\<forall>g\<in>set (a # G). gval g s = true)
[PROOF STEP]
apply (simp only: foldr.simps comp_def gval_gAnd maybe_and_true)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (gval (foldr gAnd G (Bc True)) s = true) = (\<forall>g\<in>set G. gval g s = true) \<Longrightarrow> (gval a s = true \<and> (\<forall>g\<in>set G. gval g s = true)) = (\<forall>g\<in>set (a # G). gval g s = true)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(gval (foldr gAnd (a # G) (Bc True)) s = true) = (\<forall>g\<in>set (a # G). gval g s = true)

goal (1 subgoal):
 1. (gval (foldr gAnd [] (Bc True)) s = true) = (\<forall>g\<in>set []. gval g s = true)
[PROOF STEP]
qed auto


[STATEMENT]
lemma coin_setD: "pair \<in> \<CC> g h \<Longrightarrow> g (fst pair) = h (snd pair)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pair \<in> \<CC> g h \<Longrightarrow> g (fst pair) = h (snd pair)
[PROOF STEP]
unfolding coincidence_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pair \<in> {(r, s). g r = h s} \<Longrightarrow> g (fst pair) = h (snd pair)
[PROOF STEP]
by force


[STATEMENT]
lemma changes_itv_smods_ext_geq_0:
  assumes "a<b" "poly p a\<noteq>0" "poly p b \<noteq>0"
  shows "changes_itv_smods_ext a b p (pderiv p) \<ge>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> changes_itv_smods_ext a b p (pderiv p)
[PROOF STEP]
using sturm_ext_interval[OF assms]
[PROOF STATE]
proof (prove)
using this:
int (proots_count p {x. a < x \<and> x < b}) = changes_itv_smods_ext a b p (pderiv p)

goal (1 subgoal):
 1. 0 \<le> changes_itv_smods_ext a b p (pderiv p)
[PROOF STEP]
by auto


[STATEMENT]
lemma sums_sum: "(\<And>i. i \<in> I \<Longrightarrow> (f i) sums (x i)) \<Longrightarrow> (\<lambda>n. \<Sum>i\<in>I. f i n) sums (\<Sum>i\<in>I. x i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> f i sums x i) \<Longrightarrow> (\<lambda>n. \<Sum>i\<in>I. f i n) sums sum x I
[PROOF STEP]
by (induct I rule: infinite_finite_induct) (auto intro!: sums_add)


[STATEMENT]
lemma hcomplexpow_0 [simp]: "z ^ 0 = 1"
  for z :: hcomplex
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z ^ 0 = 1
[PROOF STEP]
by (rule power_0)


[STATEMENT]
lemma lemma_4_8_iii: "(a l\<rightarrow> b) l\<rightarrow> (b l\<rightarrow> a) = b l\<rightarrow> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a l\<rightarrow> b) l\<rightarrow> b l\<rightarrow> a = b l\<rightarrow> a
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (a l\<rightarrow> b) l\<rightarrow> b l\<rightarrow> a \<le> b l\<rightarrow> a
 2. b l\<rightarrow> a \<le> (a l\<rightarrow> b) l\<rightarrow> b l\<rightarrow> a
[PROOF STEP]
apply (cut_tac a = a and b = b in lemma_4_5_i)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (a l\<rightarrow> b) \<squnion>1 (b l\<rightarrow> a) = (1::'a) \<Longrightarrow> (a l\<rightarrow> b) l\<rightarrow> b l\<rightarrow> a \<le> b l\<rightarrow> a
 2. b l\<rightarrow> a \<le> (a l\<rightarrow> b) l\<rightarrow> b l\<rightarrow> a
[PROOF STEP]
apply (unfold sup1_def right_lesseq, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (b l\<rightarrow> a) r\<rightarrow> (a l\<rightarrow> b) l\<rightarrow> b l\<rightarrow> a = (1::'a)
[PROOF STEP]
by (simp add: lemma_2_5_9_a)


[STATEMENT]
lemma order_greater_eq_two_iff:
  "order f a \<ge> 2 \<longleftrightarrow> a \<in> affected f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 \<le> order f a) = (a \<in> affected f)
[PROOF STEP]
using order_eq_one_iff [of f a]
[PROOF STATE]
proof (prove)
using this:
(order f a = Suc 0) = (a \<notin> affected f)

goal (1 subgoal):
 1. (2 \<le> order f a) = (a \<in> affected f)
[PROOF STEP]
apply (auto simp add: neq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> affected f; order f a = 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
using order_greater_zero [of f a]
[PROOF STATE]
proof (prove)
using this:
0 < order f a

goal (1 subgoal):
 1. \<lbrakk>a \<in> affected f; order f a = 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma poly_card_roots:
  "card {x::real. poly p x = 0} = count_roots p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {x. poly p x = 0} = count_roots p
[PROOF STEP]
using count_roots_correct
[PROOF STATE]
proof (prove)
using this:
count_roots ?p = card {x. poly ?p x = 0}

goal (1 subgoal):
 1. card {x. poly p x = 0} = count_roots p
[PROOF STEP]
by simp


[STATEMENT]
lemma Lp_zero_space:
  assumes "p > (0::real)"
  shows "zero_space\<^sub>N (\<LL> p M) = {f \<in> borel_measurable M. AE x in M. f x = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zero_space\<^sub>N (\<LL> (ennreal p) M) = {f \<in> borel_measurable M. AE x in M. f x = 0}
[PROOF STEP]
proof (auto)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> x \<in> borel_measurable M
 2. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 3. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
fix f
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> x \<in> borel_measurable M
 2. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 3. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
assume H: "f \<in> zero_space\<^sub>N (\<LL> p M)"
[PROOF STATE]
proof (state)
this:
f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)

goal (3 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> x \<in> borel_measurable M
 2. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 3. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
have *: "f \<in> {f \<in> borel_measurable M. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)}"
[PROOF STATE]
proof (prove)
using this:
f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)

goal (1 subgoal):
 1. f \<in> {f \<in> borel_measurable M. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)}
[PROOF STEP]
using Lp_space[OF assms] zero_spaceN_subset_spaceN
[PROOF STATE]
proof (prove)
using this:
f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
space\<^sub>N (\<LL> (ennreal p) ?M) = {f \<in> borel_measurable ?M. integrable ?M (\<lambda>x. \<bar>f x\<bar> powr p)}
zero_space\<^sub>N ?N \<subseteq> space\<^sub>N ?N

goal (1 subgoal):
 1. f \<in> {f \<in> borel_measurable M. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<in> {f \<in> borel_measurable M. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)}

goal (3 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> x \<in> borel_measurable M
 2. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 3. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> {f \<in> borel_measurable M. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)}
[PROOF STEP]
show "f \<in> borel_measurable M"
[PROOF STATE]
proof (prove)
using this:
f \<in> {f \<in> borel_measurable M. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)}

goal (1 subgoal):
 1. f \<in> borel_measurable M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<in> borel_measurable M

goal (2 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 2. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
have "eNorm (\<LL> p M) f = (\<integral>x. \<bar>f x\<bar> powr p \<partial>M) powr (1/p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
by (cases "p \<le> 1", insert * \<open>p > 0\<close>, auto simp add: Lp_le_1(1) Lp(1))
[PROOF STATE]
proof (state)
this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))

goal (2 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 2. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
have "(\<integral>x. \<bar>f x\<bar> powr p \<partial>M) = 0"
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))

goal (1 subgoal):
 1. LINT x|M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
using H
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)

goal (1 subgoal):
 1. LINT x|M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
unfolding zero_space\<^sub>N_def
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
f \<in> {f. eNorm (\<LL> (ennreal p) M) f = 0}

goal (1 subgoal):
 1. LINT x|M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LINT x|M. \<bar>f x\<bar> powr p = 0

goal (2 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 2. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LINT x|M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
have "AE x in M. \<bar>f x\<bar> powr p = 0"
[PROOF STATE]
proof (prove)
using this:
LINT x|M. \<bar>f x\<bar> powr p = 0

goal (1 subgoal):
 1. AE x in M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
by (subst integral_nonneg_eq_0_iff_AE[symmetric], insert *, auto)
[PROOF STATE]
proof (state)
this:
AE x in M. \<bar>f x\<bar> powr p = 0

goal (2 subgoals):
 1. \<And>x. x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M) \<Longrightarrow> AE xa in M. x xa = 0
 2. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
AE x in M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
show "AE x in M. f x = 0"
[PROOF STATE]
proof (prove)
using this:
AE x in M. \<bar>f x\<bar> powr p = 0

goal (1 subgoal):
 1. AE x in M. f x = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. f x = 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
fix f::"'a \<Rightarrow> real"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
assume H [measurable]: "f \<in> borel_measurable M" "AE x in M. f x = 0"
[PROOF STATE]
proof (state)
this:
f \<in> borel_measurable M
AE x in M. f x = 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> borel_measurable M
AE x in M. f x = 0
[PROOF STEP]
have *: "AE x in M. \<bar>f x\<bar> powr p = 0"
[PROOF STATE]
proof (prove)
using this:
f \<in> borel_measurable M
AE x in M. f x = 0

goal (1 subgoal):
 1. AE x in M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. \<bar>f x\<bar> powr p = 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
have "integrable M (\<lambda>x. \<bar>f x\<bar> powr p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
[PROOF STEP]
using integrable_cong_AE[OF _ _ *]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(\<lambda>x. \<bar>f x\<bar> powr p) \<in> borel_measurable M; (\<lambda>x. 0) \<in> borel_measurable M\<rbrakk> \<Longrightarrow> integrable M (\<lambda>x. \<bar>f x\<bar> powr p) = integrable M (\<lambda>x. 0)

goal (1 subgoal):
 1. integrable M (\<lambda>x. \<bar>f x\<bar> powr p)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
integrable M (\<lambda>x. \<bar>f x\<bar> powr p)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
have **: "(\<integral>x. \<bar>f x\<bar> powr p \<partial>M) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
using integral_cong_AE[OF _ _ *]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(\<lambda>x. \<bar>f x\<bar> powr p) \<in> borel_measurable M; (\<lambda>x. 0) \<in> borel_measurable M\<rbrakk> \<Longrightarrow> LINT x|M. \<bar>f x\<bar> powr p = LINT x|M. 0

goal (1 subgoal):
 1. LINT x|M. \<bar>f x\<bar> powr p = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LINT x|M. \<bar>f x\<bar> powr p = 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
have "eNorm (\<LL> p M) f = (\<integral>x. \<bar>f x\<bar> powr p \<partial>M) powr (1/p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
by (cases "p \<le> 1", insert H(1) \<open>integrable M (\<lambda>x. \<bar>f x\<bar> powr p)\<close> \<open>p > 0\<close>, auto simp add: Lp_le_1(1) Lp(1))
[PROOF STATE]
proof (state)
this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
[PROOF STEP]
have "eNorm (\<LL> p M) f = 0"
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))

goal (1 subgoal):
 1. eNorm (\<LL> (ennreal p) M) f = 0
[PROOF STEP]
using **
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr p) powr (1 / p))
LINT x|M. \<bar>f x\<bar> powr p = 0

goal (1 subgoal):
 1. eNorm (\<LL> (ennreal p) M) f = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
eNorm (\<LL> (ennreal p) M) f = 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> borel_measurable M; AE xa in M. x xa = 0\<rbrakk> \<Longrightarrow> x \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
eNorm (\<LL> (ennreal p) M) f = 0
[PROOF STEP]
show "f \<in> zero_space\<^sub>N (\<LL> p M)"
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = 0

goal (1 subgoal):
 1. f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
using zero_spaceN_iff
[PROOF STATE]
proof (prove)
using this:
eNorm (\<LL> (ennreal p) M) f = 0
(?x \<in> zero_space\<^sub>N ?N) = (eNorm ?N ?x = 0)

goal (1 subgoal):
 1. f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f \<in> zero_space\<^sub>N (\<LL> (ennreal p) M)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma [code abstract]: "list_of_oalist_ntm (oalist_of_list_ntm xs) = sort_oalist_ko_ntm xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_of_oalist_ntm (oalist_of_list_ntm xs) = sort_oalist_ko_ntm xs
[PROOF STEP]
by (simp add: list_of_oalist_OAlist_ntm oalist_of_list_ntm_def)


[STATEMENT]
lemma Lim_norm_ubound:
  fixes f :: "'a \<Rightarrow> 'b::real_normed_vector"
  assumes "\<not>(trivial_limit net)" "(f \<longlongrightarrow> l) net" "eventually (\<lambda>x. norm(f x) \<le> e) net"
  shows "norm(l) \<le> e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm l \<le> e
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
net \<noteq> bot
(f \<longlongrightarrow> l) net
\<forall>\<^sub>F x in net. norm (f x) \<le> e

goal (1 subgoal):
 1. norm l \<le> e
[PROOF STEP]
by (fast intro: tendsto_le tendsto_intros)


[STATEMENT]
lemma gen_analz_insert_eq [rule_format]:
     "X \<in> analz H ==> \<forall>G. H \<subseteq> G --> analz (insert X G) = analz G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<in> analz H \<Longrightarrow> \<forall>G. H \<subseteq> G \<longrightarrow> analz (insert X G) = analz G
[PROOF STEP]
by (blast intro: analz_cut analz_insertI analz_mono [THEN [2] rev_subsetD])


[STATEMENT]
lemma all_total_JN: "(!!i. i\<in>I ==> all_total (F i)) ==> all_total(\<Squnion>i\<in>I. F i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> all_total (F i)) \<Longrightarrow> all_total (JOIN I F)
[PROOF STEP]
by (simp add: all_total_iff_totalize totalize_JN [symmetric])


[STATEMENT]
lemma urel64_normalize:
assumes x: "urel64 x y"
shows "urel64 (if x = 0 then 0 else 1) (if y = 0 then 0 else 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel64 (if x = 0 then 0 else 1) (if y = 0 then 0 else 1)
[PROOF STEP]
unfolding urel64_eq[OF x urel64_0]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. urel64 (if y = 0 then 0 else 1) (if y = 0 then 0 else 1)
[PROOF STEP]
using urel64_0 urel64_1
[PROOF STATE]
proof (prove)
using this:
urel64 0 0
urel64 1 1

goal (1 subgoal):
 1. urel64 (if y = 0 then 0 else 1) (if y = 0 then 0 else 1)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in Group) genby_set_lconjby_set_rconjby_closed:
  fixes   A :: "'g set"
  defines "S \<equiv> (\<Union>g\<in>G. lconjby g ` A)"
  assumes "g\<in>G" "x \<in> \<langle>S\<rangle>"
  shows   "rconjby g x \<in> \<langle>S\<rangle>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rconjby g x \<in> \<langle>S\<rangle>
[PROOF STEP]
using   assms uminus_closed genby_set_lconjby_set_lconjby_closed
[PROOF STATE]
proof (prove)
using this:
S \<equiv> \<Union>g\<in>G. lconjby g ` A
g \<in> G
x \<in> \<langle>S\<rangle>
?g \<in> G \<Longrightarrow> - ?g \<in> G
\<lbrakk>?g \<in> G; ?x \<in> \<langle>\<Union>g\<in>G. lconjby g ` ?A\<rangle>\<rbrakk> \<Longrightarrow> lconjby ?g ?x \<in> \<langle>\<Union>g\<in>G. lconjby g ` ?A\<rangle>

goal (1 subgoal):
 1. rconjby g x \<in> \<langle>S\<rangle>
[PROOF STEP]
by      fastforce


[STATEMENT]
lemma infimum_pair: "a \<in> infimum {x . x = b \<or> x = c} = (a = b \<sqinter> c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<in> infimum {x. x = b \<or> x = c}) = (a = b \<sqinter> c)
[PROOF STEP]
apply (simp add: infimum_def lower_bound_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<forall>x. (x = b \<longrightarrow> a \<le> b) \<and> (x = c \<longrightarrow> a \<le> c)) \<and> (\<forall>x. (\<forall>xa. (xa = b \<longrightarrow> x \<le> b) \<and> (xa = c \<longrightarrow> x \<le> c)) \<longrightarrow> x \<le> a)) = (a = b \<sqinter> c)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>\<forall>x. (x = b \<longrightarrow> a \<le> b) \<and> (x = c \<longrightarrow> a \<le> c); \<forall>x. (\<forall>xa. (xa = b \<longrightarrow> x \<le> b) \<and> (xa = c \<longrightarrow> x \<le> c)) \<longrightarrow> x \<le> a\<rbrakk> \<Longrightarrow> a = b \<sqinter> c
 2. \<And>x. a = b \<sqinter> c \<Longrightarrow> b \<sqinter> c \<le> b
 3. \<And>x. a = b \<sqinter> c \<Longrightarrow> b \<sqinter> c \<le> c
 4. \<And>x. \<lbrakk>a = b \<sqinter> c; \<forall>xa. (xa = b \<longrightarrow> x \<le> b) \<and> (xa = c \<longrightarrow> x \<le> c)\<rbrakk> \<Longrightarrow> x \<le> b \<sqinter> c
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>\<forall>x. (x = b \<longrightarrow> a \<le> b) \<and> (x = c \<longrightarrow> a \<le> c); \<forall>x. (\<forall>xa. (xa = b \<longrightarrow> x \<le> b) \<and> (xa = c \<longrightarrow> x \<le> c)) \<longrightarrow> x \<le> a\<rbrakk> \<Longrightarrow> a \<le> b \<sqinter> c
 2. \<lbrakk>\<forall>x. (x = b \<longrightarrow> a \<le> b) \<and> (x = c \<longrightarrow> a \<le> c); \<forall>x. (\<forall>xa. (xa = b \<longrightarrow> x \<le> b) \<and> (xa = c \<longrightarrow> x \<le> c)) \<longrightarrow> x \<le> a\<rbrakk> \<Longrightarrow> b \<sqinter> c \<le> a
 3. \<And>x. a = b \<sqinter> c \<Longrightarrow> b \<sqinter> c \<le> b
 4. \<And>x. a = b \<sqinter> c \<Longrightarrow> b \<sqinter> c \<le> c
 5. \<And>x. \<lbrakk>a = b \<sqinter> c; \<forall>xa. (xa = b \<longrightarrow> x \<le> b) \<and> (xa = c \<longrightarrow> x \<le> c)\<rbrakk> \<Longrightarrow> x \<le> b \<sqinter> c
[PROOF STEP]
by simp_all


[STATEMENT]
lemma id_continuous:
  fixes T (structure)
  shows "continuous id T T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous id T T
[PROOF STEP]
proof(rule continuousI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. id \<in> carrier \<rightarrow> carrier
 2. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
show "id \<in> carrier \<rightarrow> carrier"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. id \<in> carrier \<rightarrow> carrier
[PROOF STEP]
by (auto intro: funcsetI)
[PROOF STATE]
proof (state)
this:
id \<in> carrier \<rightarrow> carrier

goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
interpret T: carrier T
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
fix m
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
assume mopen: "m open"
[PROOF STATE]
proof (state)
this:
m open

goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
hence "m \<subseteq> carrier"
[PROOF STATE]
proof (prove)
using this:
m open

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

goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
hence "carrier \<inter> m = m"
[PROOF STATE]
proof (prove)
using this:
m \<subseteq> carrier

goal (1 subgoal):
 1. carrier \<inter> m = m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
carrier \<inter> m = m

goal (1 subgoal):
 1. \<And>m. m open \<Longrightarrow> carrier \<inter> id -` m open
[PROOF STEP]
thus "carr T \<inter> id -` m open"
[PROOF STATE]
proof (prove)
using this:
carrier \<inter> m = m

goal (1 subgoal):
 1. carrier \<inter> id -` m open
[PROOF STEP]
using mopen
[PROOF STATE]
proof (prove)
using this:
carrier \<inter> m = m
m open

goal (1 subgoal):
 1. carrier \<inter> id -` m open
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
carrier \<inter> id -` m open

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_times_plus_distrib2: "a *o (B + C) = (a *o B) + (a *o C)"
  for a :: "'a::semiring"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *o (B + C) = a *o B + a *o C
[PROOF STEP]
by (auto simp: set_plus_def elt_set_times_def; metis distrib_left)


[STATEMENT]
lemma distinct_length_filter: "distinct xs \<Longrightarrow> length (filter P xs) = card ({x. P x} Int set xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct xs \<Longrightarrow> length (filter P xs) = card ({x. P x} \<inter> set xs)
[PROOF STEP]
by (induct xs) (auto)


[STATEMENT]
lemma union_part_equivp:
  "part_equiv R \<Longrightarrow> part_equiv (per_union R a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. part_equiv R \<Longrightarrow> part_equiv (per_union R a b)
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. part_equiv R \<Longrightarrow> sym (per_union R a b)
 2. part_equiv R \<Longrightarrow> trans (per_union R a b)
[PROOF STEP]
unfolding per_union_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. part_equiv R \<Longrightarrow> sym (R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R})
 2. part_equiv R \<Longrightarrow> trans (R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R})
[PROOF STEP]
apply (rule symI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>aa ba. \<lbrakk>part_equiv R; (aa, ba) \<in> R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R}\<rbrakk> \<Longrightarrow> (ba, aa) \<in> R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R}
 2. part_equiv R \<Longrightarrow> trans (R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R})
[PROOF STEP]
apply (auto dest: part_equiv_sym) []
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. part_equiv R \<Longrightarrow> trans (R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R})
[PROOF STEP]
apply (rule transI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>part_equiv R; (x, y) \<in> R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R}; (y, z) \<in> R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R}\<rbrakk> \<Longrightarrow> (x, z) \<in> R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R}
[PROOF STEP]
apply (auto dest: part_equiv_trans part_equiv_trans_sym)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma necessity:
  assumes "(\<forall>(A::'a mat). admits_diagonal_reduction A)"
  shows "(\<forall>(A::'a mat). admits_triangular_reduction A)"
 and "\<forall>a b c::'a. ideal_generated{a,b,c} = ideal_generated{1}
  \<longrightarrow> (\<exists>p q. ideal_generated {p*a,p*b+q*c} = ideal_generated {1})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>A. admits_triangular_reduction A &&& \<forall>a b c. ideal_generated {a, b, c} = ideal_generated {1::'a} \<longrightarrow> (\<exists>p q. ideal_generated {p * a, p * b + q * c} = ideal_generated {1::'a})
[PROOF STEP]
using necessity_D' admits_diagonal_imp_admits_triangular assms
[PROOF STATE]
proof (prove)
using this:
\<forall>A. admits_diagonal_reduction A \<Longrightarrow> \<forall>a b c. ideal_generated {a, b, c} = ideal_generated {1::'a} \<longrightarrow> (\<exists>p q. ideal_generated {p * a, p * b + q * c} = ideal_generated {1::'a})
Ball (carrier_mat 1 2) admits_diagonal_reduction \<Longrightarrow> All admits_triangular_reduction
\<forall>A. admits_diagonal_reduction A

goal (1 subgoal):
 1. \<forall>A. admits_triangular_reduction A &&& \<forall>a b c. ideal_generated {a, b, c} = ideal_generated {1::'a} \<longrightarrow> (\<exists>p q. ideal_generated {p * a, p * b + q * c} = ideal_generated {1::'a})
[PROOF STEP]
by blast+


[STATEMENT]
lemma integrable_setdiff:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach"
  assumes "(f has_integral i) S" "(f has_integral j) T" "negligible (T - S)"
  shows "f integrable_on (S - T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f integrable_on S - T
[PROOF STEP]
using has_integral_setdiff [OF assms]
[PROOF STATE]
proof (prove)
using this:
(f has_integral i - j) (S - T)

goal (1 subgoal):
 1. f integrable_on S - T
[PROOF STEP]
by (simp add: has_integral_iff)


[STATEMENT]
lemma monom_pCons_0_monom:
  "monom (pCons 0 (monom a n)) d = map_poly (pCons 0) (monom (monom a n) d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monom (pCons (0::'a) (monom a n)) d = map_poly (pCons (0::'a)) (monom (monom a n) d)
[PROOF STEP]
apply (induct d)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. monom (pCons (0::'a) (monom a n)) 0 = map_poly (pCons (0::'a)) (monom (monom a n) 0)
 2. \<And>d. monom (pCons (0::'a) (monom a n)) d = map_poly (pCons (0::'a)) (monom (monom a n) d) \<Longrightarrow> monom (pCons (0::'a) (monom a n)) (Suc d) = map_poly (pCons (0::'a)) (monom (monom a n) (Suc d))
[PROOF STEP]
unfolding monom_0
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. [:pCons (0::'a) (monom a n):] = map_poly (pCons (0::'a)) [:monom a n:]
 2. \<And>d. monom (pCons (0::'a) (monom a n)) d = map_poly (pCons (0::'a)) (monom (monom a n) d) \<Longrightarrow> monom (pCons (0::'a) (monom a n)) (Suc d) = map_poly (pCons (0::'a)) (monom (monom a n) (Suc d))
[PROOF STEP]
unfolding map_poly_simps
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. [:pCons (0::'a) (monom a n):] = (if monom a n = 0 \<and> 0 = 0 then 0 else pCons (pCons (0::'a) (monom a n)) (map_poly (pCons (0::'a)) 0))
 2. \<And>d. monom (pCons (0::'a) (monom a n)) d = map_poly (pCons (0::'a)) (monom (monom a n) d) \<Longrightarrow> monom (pCons (0::'a) (monom a n)) (Suc d) = map_poly (pCons (0::'a)) (monom (monom a n) (Suc d))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>d. monom (pCons (0::'a) (monom a n)) d = map_poly (pCons (0::'a)) (monom (monom a n) d) \<Longrightarrow> monom (pCons (0::'a) (monom a n)) (Suc d) = map_poly (pCons (0::'a)) (monom (monom a n) (Suc d))
[PROOF STEP]
unfolding monom_Suc map_poly_simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>d. monom (pCons (0::'a) (monom a n)) d = map_poly (pCons (0::'a)) (monom (monom a n) d) \<Longrightarrow> pCons 0 (monom (pCons (0::'a) (monom a n)) d) = (if 0 = 0 \<and> monom (monom a n) d = 0 then 0 else pCons [:0::'a:] (map_poly (pCons (0::'a)) (monom (monom a n) d)))
[PROOF STEP]
by auto


[STATEMENT]
lemma sin_cos_sqrt: "0 \<le> sin x \<Longrightarrow> sin x = sqrt (1 - (cos(x) ^ 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> sin x \<Longrightarrow> sin x = sqrt (1 - (cos x)\<^sup>2)
[PROOF STEP]
using sin_squared_eq real_sqrt_unique
[PROOF STATE]
proof (prove)
using this:
(sin ?x)\<^sup>2 = (1::?'a) - (cos ?x)\<^sup>2
\<lbrakk>?y\<^sup>2 = ?x; 0 \<le> ?y\<rbrakk> \<Longrightarrow> sqrt ?x = ?y

goal (1 subgoal):
 1. 0 \<le> sin x \<Longrightarrow> sin x = sqrt (1 - (cos x)\<^sup>2)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma sums_sum: "(\<And>i. i \<in> I \<Longrightarrow> (f i) sums (x i)) \<Longrightarrow> (\<lambda>n. \<Sum>i\<in>I. f i n) sums (\<Sum>i\<in>I. x i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> f i sums x i) \<Longrightarrow> (\<lambda>n. \<Sum>i\<in>I. f i n) sums sum x I
[PROOF STEP]
by (induct I rule: infinite_finite_induct) (auto intro!: sums_add)


[STATEMENT]
lemma sq_norm_zero_vec[simp]: "\<parallel>0\<^sub>v n :: 'a :: conjugatable_ring vec\<parallel>\<^sup>2 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<parallel>0\<^sub>v n\<parallel>\<^sup>2 = (0::'a)
[PROOF STEP]
by (simp add: sq_norm_vec_as_cscalar_prod)


[STATEMENT]
lemma UN_binaryset_eq: "(\<Union>i. binaryset A B i) = A \<union> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (range (binaryset A B)) = A \<union> B
[PROOF STEP]
by (simp add: range_binaryset_eq cong del: SUP_cong_simp)


[STATEMENT]
lemma multiple_rep_number:
  assumes "n > 0"
  shows "constant_rep_design \<V> (multiple_blocks n) (\<r> * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constant_rep_design \<V> (multiple_blocks n) (\<r> * n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. constant_rep_design \<V> (multiple_blocks n) (\<r> * n)
[PROOF STEP]
interpret d: proper_design \<V> "(multiple_blocks n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proper_design \<V> (multiple_blocks n)
[PROOF STEP]
using multiple_proper_design
[PROOF STATE]
proof (prove)
using this:
0 < ?n \<Longrightarrow> proper_design \<V> (multiple_blocks ?n)

goal (1 subgoal):
 1. proper_design \<V> (multiple_blocks n)
[PROOF STEP]
by (simp add: assms)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. constant_rep_design \<V> (multiple_blocks n) (\<r> * n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. constant_rep_design \<V> (multiple_blocks n) (\<r> * n)
[PROOF STEP]
using multiple_point_rep_num
[PROOF STATE]
proof (prove)
using this:
multiple_blocks ?n rep ?x = \<B> rep ?x * ?n

goal (1 subgoal):
 1. constant_rep_design \<V> (multiple_blocks n) (\<r> * n)
[PROOF STEP]
by (unfold_locales) (simp_all)
[PROOF STATE]
proof (state)
this:
constant_rep_design \<V> (multiple_blocks n) (\<r> * n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_on_Cons:
  shows "sorted_on r (x # xs) \<longleftrightarrow> (x \<in> Field r \<and> sorted_on r xs \<and> (\<forall>y\<in>set xs. (x, y) \<in> r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted_on r (x # xs) = (x \<in> Field r \<and> sorted_on r xs \<and> (\<forall>y\<in>set xs. (x, y) \<in> r))
[PROOF STEP]
using \<open>Linear_order r\<close>
[PROOF STATE]
proof (prove)
using this:
Linear_order r

goal (1 subgoal):
 1. sorted_on r (x # xs) = (x \<in> Field r \<and> sorted_on r xs \<and> (\<forall>y\<in>set xs. (x, y) \<in> r))
[PROOF STEP]
unfolding order_on_defs
[PROOF STATE]
proof (prove)
using this:
((Refl r \<and> trans r) \<and> antisym r) \<and> Total r

goal (1 subgoal):
 1. sorted_on r (x # xs) = (x \<in> Field r \<and> sorted_on r xs \<and> (\<forall>y\<in>set xs. (x, y) \<in> r))
[PROOF STEP]
by (induct xs arbitrary: x) (auto elim: transE)


[STATEMENT]
lemma (in wf_sub_rel_of) sp_one :
  shows "subpath g v1 [e] v2 subs \<longleftrightarrow> sub_rel_of g subs
                                    \<and> (v1 = src e \<or> (v1,src e) \<in> subs)
                                    \<and> e \<in> edges g
                                    \<and> (tgt e = v2 \<or> (tgt e,v2) \<in> subs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SubRel.subpath g v1 [e] v2 subs = (sub_rel_of g subs \<and> (v1 = src e \<or> (v1, src e) \<in> subs) \<and> e \<in> edges g \<and> (tgt e = v2 \<or> (tgt e, v2) \<in> subs))
[PROOF STEP]
using sp_one wf_sub_rel.trancl_eq[OF wf_sub_rel]
[PROOF STATE]
proof (prove)
using this:
SubRel.subpath ?g ?v1.0 [?e] ?v2.0 ?subs = (sub_rel_of ?g ?subs \<and> (?v1.0 = src ?e \<or> (?v1.0, src ?e) \<in> ?subs\<^sup>+) \<and> ?e \<in> edges ?g \<and> (tgt ?e = ?v2.0 \<or> (tgt ?e, ?v2.0) \<in> ?subs\<^sup>+))
subs\<^sup>+ = subs

goal (1 subgoal):
 1. SubRel.subpath g v1 [e] v2 subs = (sub_rel_of g subs \<and> (v1 = src e \<or> (v1, src e) \<in> subs) \<and> e \<in> edges g \<and> (tgt e = v2 \<or> (tgt e, v2) \<in> subs))
[PROOF STEP]
by fast


[STATEMENT]
lemma isomorphic_group_homology_group_prod_retract:
  assumes "S = {} \<or> S retract_of_space X"
  shows "homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S"
        (is "?lhs \<cong> ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
obtain \<H> \<K> where
    "subgroup \<H> (homology_group p X)"
    "subgroup \<K> (homology_group p X)"
   and 1: "(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y)
    \<in> iso (DirProd (subgroup_generated (homology_group p X) \<H>) (subgroup_generated (homology_group p X) \<K>))
          (homology_group p X)"
    "(hom_induced p (subtopology X S) {} X {} id)
    \<in> iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)"
    "(hom_induced p X {} X S id)
    \<in> iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using group_isomorphisms_homology_group_prod_retract [OF assms]
[PROOF STATE]
proof (prove)
using this:
(\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group ?p X); subgroup \<K> (homology_group ?p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group ?p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group ?p X) \<H> \<times>\<times> subgroup_generated (homology_group ?p X) \<K>) (homology_group ?p X); hom_induced ?p (subtopology X S) {} X {} id \<in> Group.iso (homology_group ?p (subtopology X S)) (subgroup_generated (homology_group ?p X) \<H>); hom_induced ?p X {} X S id \<in> Group.iso (subgroup_generated (homology_group ?p X) \<K>) (relative_homology_group ?p X S)\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>\<H> \<K>. \<lbrakk>subgroup \<H> (homology_group p X); subgroup \<K> (homology_group p X); (\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X); hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>); hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
subgroup \<H> (homology_group p X)
subgroup \<K> (homology_group p X)
(\<lambda>(x, y). x \<otimes>\<^bsub>homology_group p X\<^esub> y) \<in> Group.iso (subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>) (homology_group p X)
hom_induced p (subtopology X S) {} X {} id \<in> Group.iso (homology_group p (subtopology X S)) (subgroup_generated (homology_group p X) \<H>)
hom_induced p X {} X S id \<in> Group.iso (subgroup_generated (homology_group p X) \<K>) (relative_homology_group p X S)

goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
have "?lhs \<cong> subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homology_group p X \<cong> subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>
[PROOF STEP]
by (meson DirProd_group 1 abelian_homology_group comm_group_def group.abelian_subgroup_generated group.iso_sym is_isoI)
[PROOF STATE]
proof (state)
this:
homology_group p X \<cong> subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>

goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
homology_group p X \<cong> subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K>

goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
have "\<dots> \<cong> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K> \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
by (meson "1"(2) "1"(3) abelian_homology_group comm_group_def group.DirProd_iso_trans group.abelian_subgroup_generated group.iso_sym is_isoI)
[PROOF STATE]
proof (state)
this:
subgroup_generated (homology_group p X) \<H> \<times>\<times> subgroup_generated (homology_group p X) \<K> \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S

goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S

goal (1 subgoal):
 1. homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
homology_group p X \<cong> homology_group p (subtopology X S) \<times>\<times> relative_homology_group p X S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma det_cols_mul:
  assumes A: "A \<in> carrier_mat n m"
    and B: "B \<in> carrier_mat m n"
  shows "det (A*B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i).
       (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
let ?V="{0..<n}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
let ?U = "{0..<m}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
let ?F = " {f. (\<forall>i\<in> {0..<n}. f i \<in> ?U) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i)}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
let ?g = "\<lambda>f. det (mat\<^sub>r n n (\<lambda> i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i)))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
have fm: "finite {0..<m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {0..<m}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {0..<m}

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
have fn: "finite {0..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {0..<n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {0..<n}

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
have det_rw: "det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i))) =
    (prod (\<lambda>i. B $$ (f i, i)) {0..<n}) * det (mat\<^sub>r n n (\<lambda>i. col A (f i)))"
    if  f: "(\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i)" for f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i))) = (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i)))
[PROOF STEP]
by (rule det_rows_mul, insert A col_dim, auto)
[PROOF STATE]
proof (state)
this:
(\<forall>i\<in>{0..<n}. ?f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> ?f i = i) \<Longrightarrow> Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (?f i, i) \<cdot>\<^sub>v col A (?f i))) = (\<Prod>i = 0..<n. B $$ (?f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (?f i)))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
have "det (A*B) = det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a::comm_ring_1) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v Matrix.col A k) ?U))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Determinant.det (A * B) = Determinant.det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v col A k) {0..<m}))
[PROOF STEP]
by (rule det_mul_finsum_alt[OF A B])
[PROOF STATE]
proof (state)
this:
Determinant.det (A * B) = Determinant.det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v col A k) {0..<m}))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Determinant.det (A * B) = Determinant.det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v col A k) {0..<m}))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
have "... = sum ?g ?F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Determinant.det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v col A k) {0..<m})) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i))))
[PROOF STEP]
by (rule det_linear_rows_sum[OF fm], auto simp add: A)
[PROOF STATE]
proof (state)
this:
Determinant.det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v col A k) {0..<m})) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i))))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Determinant.det (mat\<^sub>r n n (\<lambda>i. finsum_vec TYPE('a) n (\<lambda>k. B $$ (k, i) \<cdot>\<^sub>v col A k) {0..<m})) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i))))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
have "... = (\<Sum>f\<in>?F. prod (\<lambda>i. B $$ (f i, i)) {0..<n} * det (mat\<^sub>r n n (\<lambda>i. col A (f i))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i)))) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
using det_rw
[PROOF STATE]
proof (prove)
using this:
(\<forall>i\<in>{0..<n}. ?f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> ?f i = i) \<Longrightarrow> Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (?f i, i) \<cdot>\<^sub>v col A (?f i))) = (\<Prod>i = 0..<n. B $$ (?f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (?f i)))

goal (1 subgoal):
 1. (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i)))) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). Determinant.det (mat\<^sub>r n n (\<lambda>i. B $$ (f i, i) \<cdot>\<^sub>v col A (f i)))) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))

goal (1 subgoal):
 1. Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Determinant.det (A * B) = (\<Sum>f | (\<forall>i\<in>{0..<n}. f i \<in> {0..<m}) \<and> (\<forall>i. i \<notin> {0..<n} \<longrightarrow> f i = i). (\<Prod>i = 0..<n. B $$ (f i, i)) * Determinant.det (mat\<^sub>r n n (\<lambda>i. col A (f i))))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lcm_mult_distrib_nat: "(k :: nat) * lcm m n = lcm (k * m) (k * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k * lcm m n = lcm (k * m) (k * n)
[PROOF STEP]
by (simp add: lcm_mult_left)


[STATEMENT]
lemma lim_gf_G: "((\<lambda>z. ennreal (gf_G x y z)) \<longlongrightarrow> G x y) (at_left (1::real))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>z. ennreal (gf_G x y z)) \<longlongrightarrow> G x y) (at_left 1)
[PROOF STEP]
unfolding gf_G_def G_eq_suminf real_scaleR_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>z. ennreal (\<Sum>n. p x y n * z ^ n)) \<longlongrightarrow> (\<Sum>i. ennreal (p x y i))) (at_left 1)
[PROOF STEP]
by (intro power_series_tendsto_at_left p_nonneg p_le_1 summable_power_series)


[STATEMENT]
lemma abs_summable_sum:
  assumes "\<And>x. x \<in> A \<Longrightarrow> f x abs_summable_on B"
  shows   "(\<lambda>y. \<Sum>x\<in>A. f x y) abs_summable_on B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>y. \<Sum>x\<in>A. f x y) abs_summable_on B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> f ?x abs_summable_on B

goal (1 subgoal):
 1. (\<lambda>y. \<Sum>x\<in>A. f x y) abs_summable_on B
[PROOF STEP]
unfolding abs_summable_on_def
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> integrable (count_space B) (f ?x)

goal (1 subgoal):
 1. integrable (count_space B) (\<lambda>y. \<Sum>x\<in>A. f x y)
[PROOF STEP]
by (intro Bochner_Integration.integrable_sum)


[STATEMENT]
theorem demonic_sup_inf:
  "[:Q \<squnion> Q':] = [:Q:] \<sqinter> [:Q':]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [: Q \<squnion> Q' :] = [: Q :] \<sqinter> [: Q' :]
[PROOF STEP]
by (simp add: fun_eq_iff sup_fun_def inf_fun_def demonic_def, blast)


[STATEMENT]
lemma forall_4: "(\<forall> i::4. P i) \<longleftrightarrow> P 1 \<and> P 2 \<and> P 3 \<and> P 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>i. P i) = (P 1 \<and> P 2 \<and> P 3 \<and> P 4)
[PROOF STEP]
by (metis exhaust_4)


[STATEMENT]
lemma hball_One [simp]: "(\<forall>x\<^bold>\<in>1. P x) = P 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. HBall 1 P = P 0
[PROOF STEP]
by (simp add: One_hf_eq_succ)


[STATEMENT]
lemma star_zero [simp]: "0\<^sup>\<star> = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a)\<^sup>\<star> = (1::'a)
[PROOF STEP]
by (metis add_zeror star2 star_one)


[STATEMENT]
lemma lm02: "trivial X = (X={} \<or> card X=1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial X = (X = {} \<or> card X = 1)
[PROOF STEP]
using cardinalityOneTheElemIdentity order_refl subset_singletonD trivial_def trivial_empty
[PROOF STATE]
proof (prove)
using this:
(card ?X = 1) = (?X = {the_elem ?X})
?x \<le> ?x
?A \<subseteq> {?x} \<Longrightarrow> ?A = {} \<or> ?A = {?x}
trivial ?x = (?x \<subseteq> {the_elem ?x})
trivial {}

goal (1 subgoal):
 1. trivial X = (X = {} \<or> card X = 1)
[PROOF STEP]
by (metis(no_types))


[STATEMENT]
theorem Goedel_I': "\<exists>\<phi>. \<not> {} \<turnstile> \<phi> \<and> \<not> {} \<turnstile> Neg \<phi> \<and> isTrue \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<phi>. \<not> {} \<turnstile> \<phi> \<and> \<not> {} \<turnstile> Neg \<phi> \<and> isTrue \<phi>
[PROOF STEP]
by (meson Iff_MP2_same g1'.goedel_first_classic_strong[OF consistent] neg_Neg)


[STATEMENT]
lemma meet_join_distrib2: "(y \<squnion> z) \<sqinter> x = (y \<sqinter> x) \<squnion> (z \<sqinter> x)"
  if [simp]: "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y \<squnion> z) \<sqinter> x = y \<sqinter> x \<squnion> z \<sqinter> x
[PROOF STEP]
by (simp add: meet_comm meet_join_distrib1)


[STATEMENT]
lemma rel2p_comp: "rel2p A OO rel2p B = rel2p (A O B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel2p A OO rel2p B = rel2p (A O B)
[PROOF STEP]
by (auto simp: rel2p_def[abs_def] intro!: ext)