[STATEMENT]
lemma eq_union_or:
  "simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
  = simplicial_complex_induced_by_monotone_boolean_function n f
    \<union> simplicial_complex_induced_by_monotone_boolean_function n g"
  (is "?sc n (?bf_or n f g) = ?sc n f \<union> ?sc n g")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) = simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
 2. simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
show "?sc n f \<union> ?sc n g \<subseteq> ?sc n (?bf_or n f g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
fix \<sigma> :: "nat set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
assume "\<sigma> \<in> (?sc n f \<union> ?sc n g)"
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
hence sigma: "\<sigma> \<in> ?sc n f \<or> \<sigma> \<in> ?sc n g"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
have "f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
           \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
proof (cases "\<sigma> \<in> ?sc n f")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
 2. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f

goal (2 subgoals):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
 2. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
from simplicial_complex.simplicial_complex_implies_true [OF True]
[PROOF STATE]
proof (chain)
picking this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
show "f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
           \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f

goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
hence sigmain: "\<sigma> \<in> ?sc n g"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
using sigma
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
from simplicial_complex.simplicial_complex_implies_true [OF sigmain]
[PROOF STATE]
proof (chain)
picking this:
g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
show "f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
           \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
thus "\<sigma> \<in> ?sc n (?bf_or n f g)"
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
using simplicial_complex_induced_by_monotone_boolean_function_def
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
simplicial_complex_induced_by_monotone_boolean_function ?n ?f = {y. \<exists>x. dim_vec x = ?n \<and> ?f x \<and> ceros_of_boolean_input x = y}

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
using bool_fun_or_def sigma
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
simplicial_complex_induced_by_monotone_boolean_function ?n ?f = {y. \<exists>x. dim_vec x = ?n \<and> ?f x \<and> ceros_of_boolean_input x = y}
bool_fun_or ?n ?f ?g \<equiv> \<lambda>x. ?f x \<or> ?g x
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
show "?sc n (?bf_or n f g) \<subseteq> ?sc n f \<union> ?sc n g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
fix \<sigma>::"nat set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
assume sigma: "\<sigma> \<in> ?sc n (?bf_or n f g)"
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
hence "bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
unfolding simplicial_complex.bool_vec_from_simplice_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. bool_fun_or n f g (vec n (\<lambda>i. i \<notin> \<sigma>))
[PROOF STEP]
unfolding simplicial_complex_induced_by_monotone_boolean_function_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> {y. \<exists>x. dim_vec x = n \<and> bool_fun_or n f g x \<and> ceros_of_boolean_input x = y}

goal (1 subgoal):
 1. bool_fun_or n f g (vec n (\<lambda>i. i \<notin> \<sigma>))
[PROOF STEP]
unfolding ceros_of_boolean_input_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> {y. \<exists>x. dim_vec x = n \<and> bool_fun_or n f g x \<and> {xa. xa < dim_vec x \<and> x $ xa = False} = y}

goal (1 subgoal):
 1. bool_fun_or n f g (vec n (\<lambda>i. i \<notin> \<sigma>))
[PROOF STEP]
by auto (smt (verit) dim_vec eq_vecI index_vec)+
[PROOF STATE]
proof (state)
this:
bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
hence "(f (simplicial_complex.bool_vec_from_simplice n \<sigma>))
            \<or> (g (simplicial_complex.bool_vec_from_simplice n \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
unfolding bool_fun_or_def
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
hence "\<sigma> \<in> ?sc n f \<or> \<sigma> \<in> ?sc n g"
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by (smt (z3) sigma bool_fun_or_def mem_Collect_eq
            simplicial_complex_induced_by_monotone_boolean_function_def)
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
thus "\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f
          \<union> simplicial_complex_induced_by_monotone_boolean_function n g"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measurable_lborel_component [measurable]:
assumes "k<n"
shows "(\<lambda>x. x k) \<in> borel_measurable (lborel_f n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x k) \<in> borel_measurable (lborel_f n)
[PROOF STEP]
unfolding lborel_f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x k) \<in> borel_measurable (Pi\<^sub>M {..<n} (\<lambda>b. lborel))
[PROOF STEP]
using assms measurable_PiM_component_rev
[PROOF STATE]
proof (prove)
using this:
k < n
\<lbrakk>?i \<in> ?I; ?f \<in> ?M ?i \<rightarrow>\<^sub>M ?N\<rbrakk> \<Longrightarrow> (\<lambda>x. ?f (x ?i)) \<in> Pi\<^sub>M ?I ?M \<rightarrow>\<^sub>M ?N

goal (1 subgoal):
 1. (\<lambda>x. x k) \<in> borel_measurable (Pi\<^sub>M {..<n} (\<lambda>b. lborel))
[PROOF STEP]
by simp_all


[STATEMENT]
lemma explode_Repl_eq: "explode (Repl A f) = image f (explode A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. explode (Repl A f) = f ` explode A
[PROOF STEP]
by (simp add: explode_def Repl image_def)


[STATEMENT]
lemma generate_topology_Union:
  "(\<And>k. k \<in> I \<Longrightarrow> generate_topology S (K k)) \<Longrightarrow> generate_topology S (\<Union>k\<in>I. K k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k. k \<in> I \<Longrightarrow> generate_topology S (K k)) \<Longrightarrow> generate_topology S (\<Union> (K ` I))
[PROOF STEP]
using generate_topology.UN [of "K ` I"]
[PROOF STATE]
proof (prove)
using this:
(\<And>k. k \<in> K ` I \<Longrightarrow> generate_topology ?S k) \<Longrightarrow> generate_topology ?S (\<Union> (K ` I))

goal (1 subgoal):
 1. (\<And>k. k \<in> I \<Longrightarrow> generate_topology S (K k)) \<Longrightarrow> generate_topology S (\<Union> (K ` I))
[PROOF STEP]
by auto


[STATEMENT]
lemma bounded_norm_comp: "bounded ((\<lambda>x. norm (f x)) ` S) = bounded (f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded ((\<lambda>x. norm (f x)) ` S) = bounded (f ` S)
[PROOF STEP]
by (simp add: bounded_iff)


[STATEMENT]
lemma zle_imp_zless_or_eq:"(n::int) \<le> m \<Longrightarrow> n < m \<or> n = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<le> m \<Longrightarrow> n < m \<or> n = m
[PROOF STEP]
by arith


[STATEMENT]
lemma vec_1[simp]: "vec 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec (1::'a) = 1
[PROOF STEP]
by vector


[STATEMENT]
lemma subspace_span [iff]: "subspace (span S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subspace (span S)
[PROOF STEP]
by (auto simp: subspace_def span_zero span_add span_scale)


[STATEMENT]
lemma mat_mult_assoc:
  assumes wf1: "mat nr n1 m1"
  and wf2: "mat n1 n2 m2"
  and wf3: "mat n2 nc m3"
  shows "mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)" (is "?m12_3 = ?m1_23")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
note wf = wf1 wf2 wf3
[PROOF STATE]
proof (state)
this:
mat nr n1 m1
mat n1 n2 m2
mat n2 nc m3

goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
let ?m12 = "mat_mult nr m1 m2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
let ?m23 = "mat_mult n1 m2 m3"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
mat nr n1 m1
mat n1 n2 m2
mat n2 nc m3
[PROOF STEP]
have
    wf12: "mat nr n2 ?m12" and
    wf23: "mat n1 nc ?m23" and
    wf1_23: "mat nr nc ?m1_23" and
    wf12_3: "mat nr nc ?m12_3"
[PROOF STATE]
proof (prove)
using this:
mat nr n1 m1
mat n1 n2 m2
mat n2 nc m3

goal (1 subgoal):
 1. (mat nr n2 (mat_mult nr m1 m2) &&& mat n1 nc (mat_mult n1 m2 m3)) &&& mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3)) &&& mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mat nr n2 (mat_mult nr m1 m2)
mat n1 nc (mat_mult n1 m2 m3)
mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)

goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
proof (rule mat_col_eqI, unfold col_def)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
assume i: "i < nc"
[PROOF STATE]
proof (state)
this:
i < nc

goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
with wf1_23 wf12_3 wf3
[PROOF STATE]
proof (chain)
picking this:
mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
mat n2 nc m3
i < nc
[PROOF STEP]
have len: "length (?m12_3 ! i) = length (?m1_23 ! i)" and ilen: "i < length m3"
[PROOF STATE]
proof (prove)
using this:
mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
mat n2 nc m3
i < nc

goal (1 subgoal):
 1. length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) = length (mat_mult nr m1 (mat_mult n1 m2 m3) ! i) &&& i < length m3
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
using this:
length (mat_mult nr m1 (mat_mult n1 m2 m3)) = nc \<and> Ball (set (mat_mult nr m1 (mat_mult n1 m2 m3))) (vec nr)
length (mat_mult nr (mat_mult nr m1 m2) m3) = nc \<and> Ball (set (mat_mult nr (mat_mult nr m1 m2) m3)) (vec nr)
length m3 = nc \<and> Ball (set m3) (vec n2)
i < nc

goal (1 subgoal):
 1. length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) = length (mat_mult nr m1 (mat_mult n1 m2 m3) ! i) &&& i < length m3
[PROOF STEP]
by (auto simp: vec_def)
[PROOF STATE]
proof (state)
this:
length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) = length (mat_mult nr m1 (mat_mult n1 m2 m3) ! i)
i < length m3

goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
show "?m12_3 ! i = ?m1_23 ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
proof (rule nth_equalityI[OF len])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
fix j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
assume jlen: "j < length (?m12_3 ! i)"
[PROOF STATE]
proof (state)
this:
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)

goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
with wf12_3 i
[PROOF STATE]
proof (chain)
picking this:
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
i < nc
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)
[PROOF STEP]
have j: "j < nr"
[PROOF STATE]
proof (prove)
using this:
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
i < nc
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)

goal (1 subgoal):
 1. j < nr
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
using this:
length (mat_mult nr (mat_mult nr m1 m2) m3) = nc \<and> Ball (set (mat_mult nr (mat_mult nr m1 m2) m3)) (vec nr)
i < nc
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)

goal (1 subgoal):
 1. j < nr
[PROOF STEP]
by (auto simp: vec_def)
[PROOF STATE]
proof (state)
this:
j < nr

goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
show "?m12_3 ! i ! j = ?m1_23 ! i ! j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 ! i ! j = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! j
[PROOF STEP]
by (unfold mat_mult_index[OF wf12 wf3 j i]
              mat_mult_index[OF wf1 wf23 j i]
              row_mat_mult_index[OF wf1 wf2 j]
              col_mat_mult_index[OF wf2 wf3 i]
              scalar_product_assoc[OF wf2 row[OF wf1 j] col[OF wf3 i]], simp)
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat_mult nr m1 m2) m3 ! i ! j = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! j

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i

goal (2 subgoals):
 1. mat ?nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
[PROOF STEP]
qed (insert wf, auto)
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma value_eq_false: "(value_eq a b = false) = (\<exists>x y. a = Some x \<and> b = Some y \<and> x \<noteq> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (value_eq a b = false) = (\<exists>x y. a = Some x \<and> b = Some y \<and> x \<noteq> y)
[PROOF STEP]
by (cases a; cases b, auto)


[STATEMENT]
lemma mono_addRPD: "mono (addRPD r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono (\<lambda>S. insert r S \<union> (insert r S \<bind> RPD))
[PROOF STEP]
unfolding mono_def Set.bind_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x \<subseteq> y \<longrightarrow> insert r x \<union> {xa. Bex (RPD ` insert r x) ((\<in>) xa)} \<subseteq> insert r y \<union> {x. Bex (RPD ` insert r y) ((\<in>) x)}
[PROOF STEP]
by auto


[STATEMENT]
lemma rank_1_proj_hermitian:
  shows "hermitian (rank_1_proj (v::complex Matrix.vec))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hermitian (rank_1_proj v)
[PROOF STEP]
using rank_1_proj_adjoint
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.adjoint (rank_1_proj ?v) = rank_1_proj ?v

goal (1 subgoal):
 1. hermitian (rank_1_proj v)
[PROOF STEP]
unfolding hermitian_def
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.adjoint (rank_1_proj ?v) = rank_1_proj ?v

goal (1 subgoal):
 1. Complex_Matrix.adjoint (rank_1_proj v) = rank_1_proj v
[PROOF STEP]
by simp


[STATEMENT]
lemma abs_r\<^sub>M_eq_r\<^sub>M [simp]: "\<bar>r\<^sub>M\<bar> = r\<^sub>M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>r\<^sub>M\<bar> = r\<^sub>M
[PROOF STEP]
using abs_r_le_r\<^sub>M
[PROOF STATE]
proof (prove)
using this:
\<bar>r ?sa\<bar> \<le> r\<^sub>M

goal (1 subgoal):
 1. \<bar>r\<^sub>M\<bar> = r\<^sub>M
[PROOF STEP]
by fastforce


[STATEMENT]
lemma from_FSM_product_outputs :
  assumes "q1 \<in> states M" and "q2 \<in> states M"
shows "(outputs (product (from_FSM M q1) (from_FSM M q2))) = (outputs M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FSM.outputs (Product_FSM.product (from_FSM M q1) (from_FSM M q2)) = FSM.outputs M
[PROOF STEP]
by (simp add: assms(1) assms(2))


[STATEMENT]
lemma fcard_fminus1_le: "fcard (A |-| {|x|}) \<le> fcard A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fcard (A |-| {|x|}) \<le> fcard A
[PROOF STEP]
by transfer (rule card_Diff1_le)


[STATEMENT]
lemma recvcap_preserves_InvCapsNonneg:
  assumes "InvCapsNonneg c0"
    and   "next_recvcap' c0 c1 p t"
  shows   "InvCapsNonneg c1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. InvCapsNonneg c1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
InvCapsNonneg c0
next_recvcap' c0 c1 p t

goal (1 subgoal):
 1. InvCapsNonneg c1
[PROOF STEP]
unfolding InvCapsNonneg_def next_recvcap'_def
[PROOF STATE]
proof (prove)
using this:
\<forall>p t. 0 \<le> zcount (c_caps c0 p) t
(p, t) \<in># c_data_msg c0 \<and> c1 = c0\<lparr>c_caps := (c_caps c0)(p := c_caps c0 p + {#t#}\<^sub>z), c_data_msg := remove1_mset (p, t) (c_data_msg c0)\<rparr>

goal (1 subgoal):
 1. \<forall>p t. 0 \<le> zcount (c_caps c1 p) t
[PROOF STEP]
by simp


[STATEMENT]
lemma cball_diff_sphere: "cball a r - sphere a r = ball a r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cball a r - sphere a r = ball a r
[PROOF STEP]
by auto


[STATEMENT]
lemma eventually_floor_less:
  fixes f :: "'a \<Rightarrow> 'b::{order_topology,floor_ceiling}"
  assumes f: "(f \<longlongrightarrow> l) F"
    and l: "l \<notin> \<int>"
  shows "\<forall>\<^sub>F x in F. of_int (floor l) < f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. of_int \<lfloor>l\<rfloor> < f x
[PROOF STEP]
by (intro order_tendstoD[OF f]) (metis Ints_of_int antisym_conv2 floor_correct l)


[STATEMENT]
lemma iT_Plus_empty_iff: "(I \<oplus> k = {}) = (I = {})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (I \<oplus> k = {}) = (I = {})
[PROOF STEP]
by (simp add: iT_Plus_def)


[STATEMENT]
lemma ring_ow_UNIV_axioms: "ring_ow (UNIV::'a::ring set) (+) 0 (-) uminus (*)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ring_ow UNIV (+) (0::'a) (-) uminus (*)
[PROOF STEP]
by (fold ring_ow) (rule ring_class.ring_axioms)


[STATEMENT]
lemma subset_replicate [intro?]: "set (replicate n x) \<subseteq> {x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (replicate n x) \<subseteq> {x}
[PROOF STEP]
by (induct n) auto


[STATEMENT]
lemma ordertype_inc_eq:
  assumes "small A"
    and \<pi>: "\<And>x y. \<lbrakk>x\<in>A; y\<in>A; (x,y) \<in> r\<rbrakk> \<Longrightarrow> (\<pi> x, \<pi> y) \<in> s"
    and r: "wf r" "total_on A r" and "wf s"
  shows "ordertype (\<pi> ` A) s = ordertype A r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordertype (\<pi> ` A) s = ordertype A r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ordertype (\<pi> ` A) s = ordertype A r
[PROOF STEP]
have "ordermap (\<pi> ` A) s (\<pi> x) = ordermap A r x" if "x \<in> A" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordermap (\<pi> ` A) s (\<pi> x) = ordermap A r x
[PROOF STEP]
using assms that
[PROOF STATE]
proof (prove)
using this:
small A
\<lbrakk>?x \<in> A; ?y \<in> A; (?x, ?y) \<in> r\<rbrakk> \<Longrightarrow> (\<pi> ?x, \<pi> ?y) \<in> s
wf r
total_on A r
wf s
x \<in> A

goal (1 subgoal):
 1. ordermap (\<pi> ` A) s (\<pi> x) = ordermap A r x
[PROOF STEP]
by (auto simp: ordermap_inc_eq)
[PROOF STATE]
proof (state)
this:
?x \<in> A \<Longrightarrow> ordermap (\<pi> ` A) s (\<pi> ?x) = ordermap A r ?x

goal (1 subgoal):
 1. ordertype (\<pi> ` A) s = ordertype A r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> A \<Longrightarrow> ordermap (\<pi> ` A) s (\<pi> ?x) = ordermap A r ?x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> ordermap (\<pi> ` A) s (\<pi> ?x) = ordermap A r ?x

goal (1 subgoal):
 1. ordertype (\<pi> ` A) s = ordertype A r
[PROOF STEP]
unfolding ordertype_def
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> ordermap (\<pi> ` A) s (\<pi> ?x) = ordermap A r ?x

goal (1 subgoal):
 1. set (ordermap (\<pi> ` A) s ` \<pi> ` A) = set (ordermap A r ` A)
[PROOF STEP]
by (metis (no_types, lifting) image_cong image_image)
[PROOF STATE]
proof (state)
this:
ordertype (\<pi> ` A) s = ordertype A r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sublist_list_length: "length (sublist_list xs ys) = length ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (sublist_list xs ys) = length ys
[PROOF STEP]
by (induct ys, simp_all)


[STATEMENT]
lemma eventually_frequently_conj: "frequently P F \<Longrightarrow> eventually Q F \<Longrightarrow> frequently (\<lambda>x. P x \<and> Q x) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>frequently P F; eventually Q F\<rbrakk> \<Longrightarrow> \<exists>\<^sub>F x in F. P x \<and> Q x
[PROOF STEP]
unfolding frequently_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> (\<forall>\<^sub>F x in F. \<not> P x); eventually Q F\<rbrakk> \<Longrightarrow> \<not> (\<forall>\<^sub>F x in F. \<not> (P x \<and> Q x))
[PROOF STEP]
apply (erule contrapos_nn)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>eventually Q F; \<forall>\<^sub>F x in F. \<not> (P x \<and> Q x)\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. \<not> P x
[PROOF STEP]
subgoal premises prems
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. \<not> P x
[PROOF STEP]
using prems
[PROOF STATE]
proof (prove)
using this:
eventually Q F
\<forall>\<^sub>F x in F. \<not> (P x \<and> Q x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. \<not> P x
[PROOF STEP]
by eventually_elim auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma DirProds_is_group:
  assumes "\<And>i. i \<in> I \<Longrightarrow> group (G i)"
  shows "group (DirProds G I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group (DirProds G I)
[PROOF STEP]
proof(rule groupI)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<one>\<^bsub>DirProds G I\<^esub> \<in> carrier (DirProds G I)
 3. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 4. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
 5. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
show one_closed: "\<one>\<^bsub>DirProds G I\<^esub> \<in> carrier (DirProds G I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>DirProds G I\<^esub> \<in> carrier (DirProds G I)
[PROOF STEP]
unfolding DirProds_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> \<in> carrier \<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>
[PROOF STEP]
by (simp add: assms group.is_monoid)
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>DirProds G I\<^esub> \<in> carrier (DirProds G I)

goal (4 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
 4. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
 4. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
assume x: "x \<in> carrier (DirProds G I)"
[PROOF STATE]
proof (state)
this:
x \<in> carrier (DirProds G I)

goal (4 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
 4. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
have one_: "\<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>DirProds G I\<^esub> i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>DirProds G I\<^esub> i
[PROOF STEP]
unfolding DirProds_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>G i\<^esub> = \<one>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> \<one>\<^bsub>G ?i\<^esub> = \<one>\<^bsub>DirProds G I\<^esub> ?i

goal (4 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
 4. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
have "\<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
assume i: "i \<in> I"
[PROOF STATE]
proof (state)
this:
i \<in> I

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
interpret group "G i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group (G i)
[PROOF STEP]
using assms[OF i]
[PROOF STATE]
proof (prove)
using this:
Group.group (G i)

goal (1 subgoal):
 1. Group.group (G i)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
have "x i \<in> carrier (G i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x i \<in> carrier (G i)
[PROOF STEP]
using x i comp_in_carr
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier (DirProds G I)
i \<in> I
\<lbrakk>?x \<in> carrier (DirProds ?G ?I); ?i \<in> ?I\<rbrakk> \<Longrightarrow> ?x ?i \<in> carrier (?G ?i)

goal (1 subgoal):
 1. x i \<in> carrier (G i)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
x i \<in> carrier (G i)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
thus "\<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i"
[PROOF STATE]
proof (prove)
using this:
x i \<in> carrier (G i)

goal (1 subgoal):
 1. \<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i
[PROOF STEP]
by(subst one_[OF i, symmetric]; simp)
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>DirProds G I\<^esub> i \<otimes>\<^bsub>G i\<^esub> x i = x i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> ?i \<otimes>\<^bsub>G ?i\<^esub> x ?i = x ?i

goal (4 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
 4. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
with one_ x
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> \<one>\<^bsub>G ?i\<^esub> = \<one>\<^bsub>DirProds G I\<^esub> ?i
x \<in> carrier (DirProds G I)
?i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> ?i \<otimes>\<^bsub>G ?i\<^esub> x ?i = x ?i
[PROOF STEP]
show "\<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x"
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> \<one>\<^bsub>G ?i\<^esub> = \<one>\<^bsub>DirProds G I\<^esub> ?i
x \<in> carrier (DirProds G I)
?i \<in> I \<Longrightarrow> \<one>\<^bsub>DirProds G I\<^esub> ?i \<otimes>\<^bsub>G ?i\<^esub> x ?i = x ?i

goal (1 subgoal):
 1. \<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x
[PROOF STEP]
unfolding DirProds_def
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> \<one>\<^bsub>G ?i\<^esub> = \<one>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> ?i
x \<in> carrier \<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>
?i \<in> I \<Longrightarrow> \<one>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> ?i \<otimes>\<^bsub>G ?i\<^esub> x ?i = x ?i

goal (1 subgoal):
 1. \<one>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> x = x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<one>\<^bsub>DirProds G I\<^esub> \<otimes>\<^bsub>DirProds G I\<^esub> x = x

goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
have "restrict (\<lambda>i. inv\<^bsub>G i\<^esub> (x i)) I \<in> carrier (DirProds G I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier (DirProds G I)
[PROOF STEP]
using x group.inv_closed[OF assms]
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier (DirProds G I)
\<lbrakk>?i1 \<in> I; ?x \<in> carrier (G ?i1)\<rbrakk> \<Longrightarrow> inv\<^bsub>G ?i1\<^esub> ?x \<in> carrier (G ?i1)

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier (DirProds G I)
[PROOF STEP]
unfolding DirProds_def
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier \<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>
\<lbrakk>?i1 \<in> I; ?x \<in> carrier (G ?i1)\<rbrakk> \<Longrightarrow> inv\<^bsub>G ?i1\<^esub> ?x \<in> carrier (G ?i1)

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier \<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier (DirProds G I)

goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier (DirProds G I)

goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
have "restrict (\<lambda>i. inv\<^bsub>G i\<^esub> (x i)) I \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
using x group.l_inv[OF assms]
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier (DirProds G I)
\<lbrakk>?i1 \<in> I; ?x \<in> carrier (G ?i1)\<rbrakk> \<Longrightarrow> inv\<^bsub>G ?i1\<^esub> ?x \<otimes>\<^bsub>G ?i1\<^esub> ?x = \<one>\<^bsub>G ?i1\<^esub>

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
unfolding DirProds_def
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier \<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>
\<lbrakk>?i1 \<in> I; ?x \<in> carrier (G ?i1)\<rbrakk> \<Longrightarrow> inv\<^bsub>G ?i1\<^esub> ?x \<otimes>\<^bsub>G ?i1\<^esub> ?x = \<one>\<^bsub>G ?i1\<^esub>

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> x = \<one>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub>
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>

goal (3 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
 3. \<And>x. x \<in> carrier (DirProds G I) \<Longrightarrow> \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier (DirProds G I)
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
show "\<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<in> carrier (DirProds G I)
(\<lambda>i\<in>I. inv\<^bsub>G i\<^esub> x i) \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>

goal (1 subgoal):
 1. \<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>y\<in>carrier (DirProds G I). y \<otimes>\<^bsub>DirProds G I\<^esub> x = \<one>\<^bsub>DirProds G I\<^esub>

goal (2 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
assume y: "y \<in> carrier (DirProds G I)"
[PROOF STATE]
proof (state)
this:
y \<in> carrier (DirProds G I)

goal (2 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
 2. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
from DirProds_m_closed[OF x y assms]
[PROOF STATE]
proof (chain)
picking this:
(\<And>i. i \<in> I \<Longrightarrow> i \<in> I) \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
[PROOF STEP]
show m_closed: "x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)"
[PROOF STATE]
proof (prove)
using this:
(\<And>i. i \<in> I \<Longrightarrow> i \<in> I) \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)

goal (1 subgoal):
 1. x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<otimes>\<^bsub>DirProds G I\<^esub> y \<in> carrier (DirProds G I)

goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
assume z: "z \<in> carrier (DirProds G I)"
[PROOF STATE]
proof (state)
this:
z \<in> carrier (DirProds G I)

goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
have "\<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i
                    = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
assume i: "i \<in> I"
[PROOF STATE]
proof (state)
this:
i \<in> I

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
have "(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> Group.group (G ?i)

goal (1 subgoal):
 1. (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i
[PROOF STEP]
by (simp add: comp_mult i m_closed z)
[PROOF STATE]
proof (state)
this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
have "\<dots> = x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i
[PROOF STEP]
by (simp add: assms comp_mult i x y)
[PROOF STATE]
proof (state)
this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y) i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
have "\<dots> = x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i)
[PROOF STEP]
using i assms x y z
[PROOF STATE]
proof (prove)
using this:
i \<in> I
?i \<in> I \<Longrightarrow> Group.group (G ?i)
x \<in> carrier (DirProds G I)
y \<in> carrier (DirProds G I)
z \<in> carrier (DirProds G I)

goal (1 subgoal):
 1. x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i)
[PROOF STEP]
by (meson Group.group_def comp_in_carr monoid.m_assoc)
[PROOF STATE]
proof (state)
this:
x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x i \<otimes>\<^bsub>G i\<^esub> y i \<otimes>\<^bsub>G i\<^esub> z i = x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
have "\<dots> = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i) = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
by (simp add: DirProds_def i)
[PROOF STATE]
proof (state)
this:
x i \<otimes>\<^bsub>G i\<^esub> (y i \<otimes>\<^bsub>G i\<^esub> z i) = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
show "(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i
                = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i"
[PROOF STATE]
proof (prove)
using this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i

goal (1 subgoal):
 1. (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) ?i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) ?i

goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>x \<in> carrier (DirProds G I); y \<in> carrier (DirProds G I); z \<in> carrier (DirProds G I)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
thus "x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)"
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z) ?i = (x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)) ?i

goal (1 subgoal):
 1. x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)
[PROOF STEP]
unfolding DirProds_def
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> (x \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> y \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> z) ?i = (x \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> (y \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> z)) ?i

goal (1 subgoal):
 1. x \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> y \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> z = x \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> (y \<otimes>\<^bsub>\<lparr>carrier = Pi\<^sub>E I (carrier \<circ> G), monoid.mult = \<lambda>x y. \<lambda>i\<in>I. x i \<otimes>\<^bsub>G i\<^esub> y i, one = \<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>\<rparr>\<^esub> z)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<otimes>\<^bsub>DirProds G I\<^esub> y \<otimes>\<^bsub>DirProds G I\<^esub> z = x \<otimes>\<^bsub>DirProds G I\<^esub> (y \<otimes>\<^bsub>DirProds G I\<^esub> z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma absolutely_integrable_on_subcbox:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  shows "\<lbrakk>f absolutely_integrable_on S; cbox a b \<subseteq> S\<rbrakk> \<Longrightarrow> f absolutely_integrable_on cbox a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f absolutely_integrable_on S; cbox a b \<subseteq> S\<rbrakk> \<Longrightarrow> f absolutely_integrable_on cbox a b
[PROOF STEP]
by (meson absolutely_integrable_on_def integrable_on_subcbox)


[STATEMENT]
lemma (in gcd_condition_monoid) gcd_cong_l:
  assumes "x \<sim> x'" "x \<in> carrier G"  "x' \<in> carrier G"  "y \<in> carrier G"
  shows "somegcd G x y \<sim> somegcd G x' y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. somegcd G x y \<sim> somegcd G x' y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. somegcd G x y \<sim> somegcd G x' y
[PROOF STEP]
interpret weak_lower_semilattice "division_rel G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weak_lower_semilattice (division_rel G)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. somegcd G x y \<sim> somegcd G x' y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. somegcd G x y \<sim> somegcd G x' y
[PROOF STEP]
using somegcd_meet assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> carrier ?G; ?b \<in> carrier ?G\<rbrakk> \<Longrightarrow> somegcd ?G ?a ?b = ?a \<sqinter>\<^bsub>division_rel ?G\<^esub> ?b
x \<sim> x'
x \<in> carrier G
x' \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. somegcd G x y \<sim> somegcd G x' y
[PROOF STEP]
by (metis eq_object.select_convs(1) meet_cong_l partial_object.select_convs(1))
[PROOF STATE]
proof (state)
this:
somegcd G x y \<sim> somegcd G x' y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma skewlink_mset[simp]: "tree_to_multiset (skewlink e a t1 t2)
  = {# (e,a) #} +  tree_to_multiset t1 + tree_to_multiset t2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tree_to_multiset (skewlink e a t1 t2) = {#(e, a)#} + tree_to_multiset t1 + tree_to_multiset t2
[PROOF STEP]
by (cases t1, cases t2, auto simp add:union_ac)


[STATEMENT]
lemma scalar_matrix_mult_code [code abstract]: "vec_nth (c *k A)  = scalar_matrix_mult_row c A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (c *k A) = scalar_matrix_mult_row c A
[PROOF STEP]
unfolding matrix_scalar_mult_def scalar_matrix_mult_row_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>i j. c * A $ i $ j) = (\<lambda>i. \<chi>j. c * A $ i $ j)
[PROOF STEP]
using vec_lambda_beta
[PROOF STATE]
proof (prove)
using this:
vec_lambda ?g $ ?i = ?g ?i

goal (1 subgoal):
 1. ($) (\<chi>i j. c * A $ i $ j) = (\<lambda>i. \<chi>j. c * A $ i $ j)
[PROOF STEP]
by auto


[STATEMENT]
lemma pmf_of_list_wfI:
  "(\<And>x. x \<in> set (map snd xs) \<Longrightarrow> x \<ge> 0) \<Longrightarrow> sum_list (map snd xs) = 1 \<Longrightarrow> pmf_of_list_wf xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. x \<in> set (map snd xs) \<Longrightarrow> (0::'a) \<le> x; sum_list (map snd xs) = (1::'a)\<rbrakk> \<Longrightarrow> pmf_of_list_wf xs
[PROOF STEP]
unfolding pmf_of_list_wf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. x \<in> set (map snd xs) \<Longrightarrow> (0::'a) \<le> x; sum_list (map snd xs) = (1::'a)\<rbrakk> \<Longrightarrow> Ball (set (map snd xs)) ((\<le>) (0::'a)) \<and> sum_list (map snd xs) = (1::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma currentD_OUT':
  assumes f: "current \<Gamma> f"
  and x: "x \<notin> A \<Gamma>"
  shows "d_OUT f x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT f x = 0
[PROOF STEP]
using currentD_outside_OUT[OF f, of x] x currentD_OUT[OF f, of x] bipartite_V
[PROOF STATE]
proof (prove)
using this:
x \<notin> \<^bold>V \<Longrightarrow> d_OUT f x = 0
x \<notin> A \<Gamma>
x \<in> B \<Gamma> \<Longrightarrow> d_OUT f x = 0
\<^bold>V \<subseteq> A \<Gamma> \<union> B \<Gamma>

goal (1 subgoal):
 1. d_OUT f x = 0
[PROOF STEP]
by auto


[STATEMENT]
lemma inverse_less_imp_less_neg:
  "inverse a < inverse b \<Longrightarrow> b < 0 \<Longrightarrow> b < a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>inverse a < inverse b; b < (0::'a)\<rbrakk> \<Longrightarrow> b < a
[PROOF STEP]
using local.dual_order.strict_iff_order local.inverse_le_imp_le_neg
[PROOF STATE]
proof (prove)
using this:
(?b < ?a) = (?b \<le> ?a \<and> ?a \<noteq> ?b)
\<lbrakk>inverse ?a \<le> inverse ?b; ?b < (0::'a)\<rbrakk> \<Longrightarrow> ?b \<le> ?a

goal (1 subgoal):
 1. \<lbrakk>inverse a < inverse b; b < (0::'a)\<rbrakk> \<Longrightarrow> b < a
[PROOF STEP]
by blast


[STATEMENT]
lemma bibd_exists:
  assumes "dim_col M \<ge> 1" \<comment> \<open>Min one block\<close>
  assumes "\<And> j. j < dim_col M \<Longrightarrow> 1 \<in>$ col M j" \<comment> \<open>no empty blocks \<close>
  assumes "M * (M\<^sup>T) = \<Lambda> \<cdot>\<^sub>m (J\<^sub>m (dim_row M)) + (r - \<Lambda>) \<cdot>\<^sub>m (1\<^sub>m (dim_row M))"
  assumes "((u\<^sub>v (dim_row M)) \<^sub>v* M) = k \<cdot>\<^sub>v (u\<^sub>v (dim_col M))"
  assumes "(r ::nat) \<ge> 0"
  assumes "k \<ge> 2" "k < dim_row M"
  shows "ordered_bibd [0..<dim_row M] (map map_col_to_block (cols M)) k \<Lambda>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordered_bibd [0..<dim_row M] (map map_col_to_block (cols M)) k \<Lambda>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ordered_bibd [0..<dim_row M] (map map_col_to_block (cols M)) k \<Lambda>
[PROOF STEP]
interpret ipbd: ordered_regular_pairwise_balance "[0..<dim_row M]" "(map map_col_to_block (cols M))" \<Lambda> r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordered_regular_pairwise_balance [0..<dim_row M] (map map_col_to_block (cols M)) \<Lambda> r
[PROOF STEP]
using rpbd_exists assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>2 \<le> dim_row M; 1 \<le> dim_col M; \<And>j. j < dim_col M \<Longrightarrow> 1 \<in>$ col M j; M * M\<^sup>T = int ?\<Lambda> \<cdot>\<^sub>m J\<^sub>m (dim_row M) + (int ?r - int ?\<Lambda>) \<cdot>\<^sub>m 1\<^sub>m (dim_row M)\<rbrakk> \<Longrightarrow> ordered_regular_pairwise_balance [0..<dim_row M] (map map_col_to_block (cols M)) ?\<Lambda> ?r
1 \<le> dim_col M
?j < dim_col M \<Longrightarrow> 1 \<in>$ col M ?j
M * M\<^sup>T = int \<Lambda> \<cdot>\<^sub>m J\<^sub>m (dim_row M) + (int r - int \<Lambda>) \<cdot>\<^sub>m 1\<^sub>m (dim_row M)
u\<^sub>v (dim_row M) \<^sub>v* M = int k \<cdot>\<^sub>v u\<^sub>v (dim_col M)
0 \<le> r
2 \<le> k
k < dim_row M

goal (1 subgoal):
 1. ordered_regular_pairwise_balance [0..<dim_row M] (map map_col_to_block (cols M)) \<Lambda> r
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ordered_bibd [0..<dim_row M] (map ipbd.map_col_to_block (cols M)) k \<Lambda>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordered_bibd [0..<dim_row M] (map ipbd.map_col_to_block (cols M)) k \<Lambda>
[PROOF STEP]
using vec_k_impl_uniform_block_size
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>u\<^sub>v (dim_row M) \<^sub>v* M = int ?k \<cdot>\<^sub>v u\<^sub>v (dim_col M); ?bl \<in># image_mset ipbd.map_col_to_block (mset (cols M))\<rbrakk> \<Longrightarrow> card ?bl = ?k

goal (1 subgoal):
 1. ordered_bibd [0..<dim_row M] (map ipbd.map_col_to_block (cols M)) k \<Lambda>
[PROOF STEP]
by (unfold_locales, simp_all add: assms)
[PROOF STATE]
proof (state)
this:
ordered_bibd [0..<dim_row M] (map ipbd.map_col_to_block (cols M)) k \<Lambda>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma BseqD: "Bseq X \<Longrightarrow> \<exists>K. 0 < K \<and> (\<forall>n. norm (X n) \<le> K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Bseq X \<Longrightarrow> \<exists>K>0. \<forall>n. norm (X n) \<le> K
[PROOF STEP]
by (simp add: Bseq_def)


[STATEMENT]
lemma natUnion_ex: "x \<in> natUnion f \<Longrightarrow> \<exists> i. x \<in> f i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> natUnion f \<Longrightarrow> \<exists>i. x \<in> f i
[PROOF STEP]
by (metis (no_types, opaque_lifting) mk_disjoint_insert natUnion_superset natUnion_upperbound
    subsetCE subset_insert)


[STATEMENT]
lemma lexer_correct_None:
  shows "s \<notin> lang r \<longleftrightarrow> lexer r s = None"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s \<notin> lang r) = (lexer r s = None)
[PROOF STEP]
apply(induct s arbitrary: r)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>r. ([] \<notin> lang r) = (lexer r [] = None)
 2. \<And>a s r. (\<And>r. (s \<notin> lang r) = (lexer r s = None)) \<Longrightarrow> (a # s \<notin> lang r) = (lexer r (a # s) = None)
[PROOF STEP]
apply(simp add: nullable_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a s r. (\<And>r. (s \<notin> lang r) = (lexer r s = None)) \<Longrightarrow> (a # s \<notin> lang r) = (lexer r (a # s) = None)
[PROOF STEP]
apply(drule_tac x="deriv a r" in meta_spec)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a s r. (s \<notin> lang (deriv a r)) = (lexer (deriv a r) s = None) \<Longrightarrow> (a # s \<notin> lang r) = (lexer r (a # s) = None)
[PROOF STEP]
apply(auto simp add: lang_deriv Deriv_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma rank_invar_to_set: "rank_invar (t # bq) \<Longrightarrow>
  \<forall> t' \<in> set bq. rank t < rank t'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t < rank t'
[PROOF STEP]
apply(induct bq arbitrary: t)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>t. rank_invar [t] \<Longrightarrow> \<forall>t'\<in>set []. rank t < rank t'
 2. \<And>a bq t. \<lbrakk>\<And>t. rank_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t < rank t'; rank_invar (t # a # bq)\<rbrakk> \<Longrightarrow> \<forall>t'\<in>set (a # bq). rank t < rank t'
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a bq t. \<lbrakk>\<And>t. rank_invar (t # bq) \<Longrightarrow> \<forall>t'\<in>set bq. rank t < rank t'; rank_invar (t # a # bq)\<rbrakk> \<Longrightarrow> \<forall>t'\<in>set (a # bq). rank t < rank t'
[PROOF STEP]
apply (metis nat_less_le rank_invar.simps(3) set_ConsD xt1(7))
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done