[STATEMENT]
lemma pullback_by_permutation_of_poly_list:
  assumes "\<sigma> permutes {..< n}"
  assumes "S \<subseteq> carrier (R\<^bsup>n\<^esup>)"
  shows "poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) =
          permute_list (fun_inv \<sigma>) ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) = permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<subseteq> permute_list (fun_inv \<sigma>) ` S
 2. permute_list (fun_inv \<sigma>) ` S \<subseteq> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
show "poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<subseteq> permute_list (fun_inv \<sigma>) ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<subseteq> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
assume A: " x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))"
[PROOF STATE]
proof (state)
this:
x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))

goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
obtain y where y_def: "y \<in> S \<and> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y"
[PROOF STATE]
proof (prove)
using this:
x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))

goal (1 subgoal):
 1. (\<And>y. y \<in> S \<and> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis assms length_permute_list
           permutation_of_poly_list_is_poly_list poly_pullbackE'(2) pvar_list_is_poly_tuple
           pvar_list_length)
[PROOF STATE]
proof (state)
this:
y \<in> S \<and> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y

goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> S \<and> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y
[PROOF STEP]
have 0: "y = permute_list \<sigma> x"
[PROOF STATE]
proof (prove)
using this:
y \<in> S \<and> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y

goal (1 subgoal):
 1. y = permute_list \<sigma> x
[PROOF STEP]
by (metis A assms length_permute_list
           permutation_of_poly_list_is_poly_list poly_pullbackE'(1) pushforward_by_permuted_pvar_list pvar_list_is_poly_tuple pvar_list_length)
[PROOF STATE]
proof (state)
this:
y = permute_list \<sigma> x

goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
have 1: "length x = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length x = n
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))

goal (1 subgoal):
 1. length x = n
[PROOF STEP]
by (metis "0" length_permute_list poly_tuple_evalE' pvar_list_length y_def)
[PROOF STATE]
proof (state)
this:
length x = n

goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length x = n
[PROOF STEP]
have "{..<length x} = {..<n}"
[PROOF STATE]
proof (prove)
using this:
length x = n

goal (1 subgoal):
 1. {..<length x} = {..<n}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{..<length x} = {..<n}

goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{..<length x} = {..<n}
[PROOF STEP]
have "permute_list (fun_inv \<sigma>) y = x"
[PROOF STATE]
proof (prove)
using this:
{..<length x} = {..<n}

goal (1 subgoal):
 1. permute_list (fun_inv \<sigma>) y = x
[PROOF STEP]
using 0 permutes_inv_o(1)[of \<sigma> "{..< n}"] permute_list_id[of x] permutes_inv[of \<sigma> "{..<n}"]
            assms permute_list_compose[of "(fun_inv \<sigma>)" x \<sigma> ]
[PROOF STATE]
proof (prove)
using this:
{..<length x} = {..<n}
y = permute_list \<sigma> x
\<sigma> permutes {..<n} \<Longrightarrow> \<sigma> \<circ> inv \<sigma> = id
permute_list id x = x
\<sigma> permutes {..<n} \<Longrightarrow> inv \<sigma> permutes {..<n}
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)
fun_inv \<sigma> permutes {..<length x} \<Longrightarrow> permute_list (\<sigma> \<circ> fun_inv \<sigma>) x = permute_list (fun_inv \<sigma>) (permute_list \<sigma> x)

goal (1 subgoal):
 1. permute_list (fun_inv \<sigma>) y = x
[PROOF STEP]
unfolding fun_inv_def
[PROOF STATE]
proof (prove)
using this:
{..<length x} = {..<n}
y = permute_list \<sigma> x
\<sigma> permutes {..<n} \<Longrightarrow> \<sigma> \<circ> inv \<sigma> = id
permute_list id x = x
\<sigma> permutes {..<n} \<Longrightarrow> inv \<sigma> permutes {..<n}
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)
inv \<sigma> permutes {..<length x} \<Longrightarrow> permute_list (\<sigma> \<circ> inv \<sigma>) x = permute_list (inv \<sigma>) (permute_list \<sigma> x)

goal (1 subgoal):
 1. permute_list (inv \<sigma>) y = x
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
permute_list (fun_inv \<sigma>) y = x

goal (1 subgoal):
 1. \<And>x. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<Longrightarrow> x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
permute_list (fun_inv \<sigma>) y = x
[PROOF STEP]
show " x \<in> permute_list (fun_inv \<sigma>) ` S"
[PROOF STATE]
proof (prove)
using this:
permute_list (fun_inv \<sigma>) y = x

goal (1 subgoal):
 1. x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
using y_def
[PROOF STATE]
proof (prove)
using this:
permute_list (fun_inv \<sigma>) y = x
y \<in> S \<and> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y

goal (1 subgoal):
 1. x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> permute_list (fun_inv \<sigma>) ` S

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n)) \<subseteq> permute_list (fun_inv \<sigma>) ` S

goal (1 subgoal):
 1. permute_list (fun_inv \<sigma>) ` S \<subseteq> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
show "permute_list (fun_inv \<sigma>) ` S \<subseteq> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. permute_list (fun_inv \<sigma>) ` S \<subseteq> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
assume A: "x \<in> permute_list (fun_inv \<sigma>) ` S"
[PROOF STATE]
proof (state)
this:
x \<in> permute_list (fun_inv \<sigma>) ` S

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> permute_list (fun_inv \<sigma>) ` S
[PROOF STEP]
obtain y where y_def: "y \<in> S \<and> x = permute_list (fun_inv \<sigma>) y"
[PROOF STATE]
proof (prove)
using this:
x \<in> permute_list (fun_inv \<sigma>) ` S

goal (1 subgoal):
 1. (\<And>y. y \<in> S \<and> x = permute_list (fun_inv \<sigma>) y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> S \<and> x = permute_list (fun_inv \<sigma>) y

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
have 0: "(fun_inv \<sigma>) permutes {..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fun_inv \<sigma> permutes {..<n}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)

goal (1 subgoal):
 1. fun_inv \<sigma> permutes {..<n}
[PROOF STEP]
unfolding fun_inv_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)

goal (1 subgoal):
 1. inv \<sigma> permutes {..<n}
[PROOF STEP]
by (simp add: permutes_inv)
[PROOF STATE]
proof (state)
this:
fun_inv \<sigma> permutes {..<n}

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
have 1: "permute_list \<sigma> x = permute_list \<sigma> (permute_list (fun_inv \<sigma>) y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. permute_list \<sigma> x = permute_list \<sigma> (permute_list (fun_inv \<sigma>) y)
[PROOF STEP]
by (simp add: y_def)
[PROOF STATE]
proof (state)
this:
permute_list \<sigma> x = permute_list \<sigma> (permute_list (fun_inv \<sigma>) y)

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
have 2: "length y = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length y = n
[PROOF STEP]
using y_def A assms cartesian_power_car_memE
[PROOF STATE]
proof (prove)
using this:
y \<in> S \<and> x = permute_list (fun_inv \<sigma>) y
x \<in> permute_list (fun_inv \<sigma>) ` S
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)
?as \<in> carrier (?R\<^bsup>?n\<^esup>) \<Longrightarrow> length ?as = ?n

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

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
have 3: "\<sigma> permutes {..<length y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<sigma> permutes {..<length y}
[PROOF STEP]
by (simp add: "2" assms)
[PROOF STATE]
proof (state)
this:
\<sigma> permutes {..<length y}

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
have 4: "permute_list \<sigma> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. permute_list \<sigma> x = y
[PROOF STEP]
using assms(2) permute_list_id[of y]  permute_list_compose[of \<sigma> y "(fun_inv \<sigma>)" ]
              3 2 1 0 permutes_inv_o(2)[of \<sigma> "{..< n}"]
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> carrier (R\<^bsup>n\<^esup>)
permute_list id y = y
\<sigma> permutes {..<length y} \<Longrightarrow> permute_list (fun_inv \<sigma> \<circ> \<sigma>) y = permute_list \<sigma> (permute_list (fun_inv \<sigma>) y)
\<sigma> permutes {..<length y}
length y = n
permute_list \<sigma> x = permute_list \<sigma> (permute_list (fun_inv \<sigma>) y)
fun_inv \<sigma> permutes {..<n}
\<sigma> permutes {..<n} \<Longrightarrow> inv \<sigma> \<circ> \<sigma> = id

goal (1 subgoal):
 1. permute_list \<sigma> x = y
[PROOF STEP]
unfolding fun_inv_def
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> carrier (R\<^bsup>n\<^esup>)
permute_list id y = y
\<sigma> permutes {..<length y} \<Longrightarrow> permute_list (inv \<sigma> \<circ> \<sigma>) y = permute_list \<sigma> (permute_list (inv \<sigma>) y)
\<sigma> permutes {..<length y}
length y = n
permute_list \<sigma> x = permute_list \<sigma> (permute_list (inv \<sigma>) y)
inv \<sigma> permutes {..<n}
\<sigma> permutes {..<n} \<Longrightarrow> inv \<sigma> \<circ> \<sigma> = id

goal (1 subgoal):
 1. permute_list \<sigma> x = y
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
permute_list \<sigma> x = y

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
have 5: "x \<in> carrier (R\<^bsup>n\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier (R\<^bsup>n\<^esup>)
[PROOF STEP]
apply(rule cartesian_power_car_memI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. length x = n
 2. set x \<subseteq> carrier R
[PROOF STEP]
using A 0 assms
[PROOF STATE]
proof (prove)
using this:
x \<in> permute_list (fun_inv \<sigma>) ` S
fun_inv \<sigma> permutes {..<n}
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)

goal (2 subgoals):
 1. length x = n
 2. set x \<subseteq> carrier R
[PROOF STEP]
apply (metis "2" "4" length_permute_list)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set x \<subseteq> carrier R
[PROOF STEP]
using A 0 assms
[PROOF STATE]
proof (prove)
using this:
x \<in> permute_list (fun_inv \<sigma>) ` S
fun_inv \<sigma> permutes {..<n}
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)

goal (1 subgoal):
 1. set x \<subseteq> carrier R
[PROOF STEP]
by (smt "2" in_set_conv_nth neq0_conv poly_tuple_evalE pushforward_by_pvar_list
           pvar_list_is_poly_tuple pvar_list_length set_permute_list subset_iff y_def)
[PROOF STATE]
proof (state)
this:
x \<in> carrier (R\<^bsup>n\<^esup>)

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier (R\<^bsup>n\<^esup>)
[PROOF STEP]
have 6: "poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y"
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier (R\<^bsup>n\<^esup>)

goal (1 subgoal):
 1. poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y
[PROOF STEP]
using 4  assms pushforward_by_permuted_pvar_list[of \<sigma> n x]
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier (R\<^bsup>n\<^esup>)
permute_list \<sigma> x = y
\<sigma> permutes {..<n}
S \<subseteq> carrier (R\<^bsup>n\<^esup>)
\<lbrakk>\<sigma> permutes {..<n}; x \<in> carrier (R\<^bsup>n\<^esup>)\<rbrakk> \<Longrightarrow> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = permute_list \<sigma> x

goal (1 subgoal):
 1. poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y

goal (1 subgoal):
 1. \<And>x. x \<in> permute_list (fun_inv \<sigma>) ` S \<Longrightarrow> x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y
[PROOF STEP]
show "x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))"
[PROOF STATE]
proof (prove)
using this:
poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y

goal (1 subgoal):
 1. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
using 5 y_def
[PROOF STATE]
proof (prove)
using this:
poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y
x \<in> carrier (R\<^bsup>n\<^esup>)
y \<in> S \<and> x = permute_list (fun_inv \<sigma>) y

goal (1 subgoal):
 1. x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))
[PROOF STEP]
unfolding poly_tuple_pullback_def
[PROOF STATE]
proof (prove)
using this:
poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) x = y
x \<in> carrier (R\<^bsup>n\<^esup>)
y \<in> S \<and> x = permute_list (fun_inv \<sigma>) y

goal (1 subgoal):
 1. x \<in> poly_tuple_eval (permute_list \<sigma> (pvar_list R n)) -` S \<inter> carrier (R\<^bsup>n\<^esup>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
permute_list (fun_inv \<sigma>) ` S \<subseteq> poly_tuple_pullback n S (permute_list \<sigma> (pvar_list R n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma chain_subdiv_chain_pathimg_subset':
  assumes "chain_subdiv_chain one_chain subdiv"
  assumes "(k,\<gamma>)\<in> subdiv"
  shows " \<exists>k' \<gamma>'. (k',\<gamma>')\<in> one_chain \<and> path_image \<gamma> \<subseteq> path_image \<gamma>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k' \<gamma>'. (k', \<gamma>') \<in> one_chain \<and> path_image \<gamma> \<subseteq> path_image \<gamma>'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
chain_subdiv_chain one_chain subdiv
(k, \<gamma>) \<in> subdiv

goal (1 subgoal):
 1. \<exists>k' \<gamma>'. (k', \<gamma>') \<in> one_chain \<and> path_image \<gamma> \<subseteq> path_image \<gamma>'
[PROOF STEP]
unfolding chain_subdiv_chain_def  pairwise_def
[PROOF STATE]
proof (prove)
using this:
\<exists>f. \<Union> (f ` one_chain) = subdiv \<and> (\<forall>c\<in>one_chain. chain_subdiv_path (coeff_cube_to_path c) (f c)) \<and> (\<forall>x\<in>one_chain. \<forall>y\<in>one_chain. x \<noteq> y \<longrightarrow> f x \<inter> f y = {}) \<and> (\<forall>x\<in>one_chain. finite (f x))
(k, \<gamma>) \<in> subdiv

goal (1 subgoal):
 1. \<exists>k' \<gamma>'. (k', \<gamma>') \<in> one_chain \<and> path_image \<gamma> \<subseteq> path_image \<gamma>'
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f a b. \<lbrakk>subdiv = \<Union> (f ` one_chain); (a, b) \<in> one_chain; (k, \<gamma>) \<in> f (a, b); \<forall>c\<in>one_chain. chain_subdiv_path (coeff_cube_to_path c) (f c); \<forall>x\<in>one_chain. \<forall>y\<in>one_chain. x \<noteq> y \<longrightarrow> f x \<inter> f y = {}; \<forall>x\<in>one_chain. finite (f x)\<rbrakk> \<Longrightarrow> \<exists>k' \<gamma>'. (k', \<gamma>') \<in> one_chain \<and> path_image \<gamma> \<subseteq> path_image \<gamma>'
[PROOF STEP]
by (metis chain_subdiv_path.cases coeff_cube_to_path.simps path_image_rec_join path_image_reversepath)


[STATEMENT]
lemma sorted_list_of_set_eq_nil2[simp]:
    assumes "finite A"
    shows "[] = sorted_list_of_set A \<longleftrightarrow> A={}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([] = sorted_list_of_set A) = (A = {})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. ([] = sorted_list_of_set A) = (A = {})
[PROOF STEP]
by (auto dest: sym)


[STATEMENT]
lemma prefix_dropWhile:
  assumes "prefix xs ys"
  shows   "prefix (dropWhile P xs) (dropWhile P ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prefix (dropWhile P xs) (dropWhile P ys)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. prefix (dropWhile P xs) (dropWhile P ys)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
prefix xs ys
[PROOF STEP]
obtain zs where ys: "ys = xs @ zs"
[PROOF STATE]
proof (prove)
using this:
prefix xs ys

goal (1 subgoal):
 1. (\<And>zs. ys = xs @ zs \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: prefix_def)
[PROOF STATE]
proof (state)
this:
ys = xs @ zs

goal (1 subgoal):
 1. prefix (dropWhile P xs) (dropWhile P ys)
[PROOF STEP]
have "prefix (dropWhile P xs) (dropWhile P (xs @ zs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prefix (dropWhile P xs) (dropWhile P (xs @ zs))
[PROOF STEP]
by (induction xs) auto
[PROOF STATE]
proof (state)
this:
prefix (dropWhile P xs) (dropWhile P (xs @ zs))

goal (1 subgoal):
 1. prefix (dropWhile P xs) (dropWhile P ys)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
prefix (dropWhile P xs) (dropWhile P (xs @ zs))

goal (1 subgoal):
 1. prefix (dropWhile P xs) (dropWhile P ys)
[PROOF STEP]
by (simp add: ys)
[PROOF STATE]
proof (state)
this:
prefix (dropWhile P xs) (dropWhile P ys)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cong_le_per2__le:
  assumes "Per A B C" and
    "Per A' B' C'" and
    "Cong A B A' B'" and
    "B C Le B' C'"
  shows "A C Le A' C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A C Le A' C'
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> A C Le A' C'
 2. \<not> ?P \<Longrightarrow> A C Le A' C'
[PROOF STEP]
assume "Cong B C B' C'"
[PROOF STATE]
proof (state)
this:
Cong B C B' C'

goal (2 subgoals):
 1. ?P \<Longrightarrow> A C Le A' C'
 2. \<not> ?P \<Longrightarrow> A C Le A' C'
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Cong B C B' C'

goal (1 subgoal):
 1. A C Le A' C'
[PROOF STEP]
using assms(1) assms(2) assms(3) cong__le l10_12
[PROOF STATE]
proof (prove)
using this:
Cong B C B' C'
Per A B C
Per A' B' C'
Cong A B A' B'
Cong ?A ?B ?C ?D \<Longrightarrow> ?A ?B Le ?C ?D
\<lbrakk>Per ?A ?B ?C; Per ?A' ?B' ?C'; Cong ?A ?B ?A' ?B'; Cong ?B ?C ?B' ?C'\<rbrakk> \<Longrightarrow> Cong ?A ?C ?A' ?C'

goal (1 subgoal):
 1. A C Le A' C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A C Le A' C'

goal (1 subgoal):
 1. \<not> Cong B C B' C' \<Longrightarrow> A C Le A' C'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> Cong B C B' C' \<Longrightarrow> A C Le A' C'
[PROOF STEP]
assume "\<not> Cong B C B' C'"
[PROOF STATE]
proof (state)
this:
\<not> Cong B C B' C'

goal (1 subgoal):
 1. \<not> Cong B C B' C' \<Longrightarrow> A C Le A' C'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> Cong B C B' C'
[PROOF STEP]
have "B C Lt B' C'"
[PROOF STATE]
proof (prove)
using this:
\<not> Cong B C B' C'

goal (1 subgoal):
 1. B C Lt B' C'
[PROOF STEP]
using Lt_def assms(4)
[PROOF STATE]
proof (prove)
using this:
\<not> Cong B C B' C'
?A ?B Lt ?C ?D \<equiv> ?A ?B Le ?C ?D \<and> \<not> Cong ?A ?B ?C ?D
B C Le B' C'

goal (1 subgoal):
 1. B C Lt B' C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B C Lt B' C'

goal (1 subgoal):
 1. \<not> Cong B C B' C' \<Longrightarrow> A C Le A' C'
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
B C Lt B' C'

goal (1 subgoal):
 1. A C Le A' C'
[PROOF STEP]
using assms(1) assms(2) assms(3) cong_lt_per2__lt lt__le
[PROOF STATE]
proof (prove)
using this:
B C Lt B' C'
Per A B C
Per A' B' C'
Cong A B A' B'
\<lbrakk>Per ?A ?B ?C; Per ?A' ?B' ?C'; Cong ?A ?B ?A' ?B'; ?B ?C Lt ?B' ?C'\<rbrakk> \<Longrightarrow> ?A ?C Lt ?A' ?C'
?A ?B Lt ?C ?D \<Longrightarrow> ?A ?B Le ?C ?D

goal (1 subgoal):
 1. A C Le A' C'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A C Le A' C'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma row_to_poly_smult:
  assumes "distinct ts" and "dim_vec r = length ts"
  shows "row_to_poly ts (c \<cdot>\<^sub>v r) = c \<cdot> (row_to_poly ts r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row_to_poly ts (c \<cdot>\<^sub>v r) = c \<cdot> row_to_poly ts r
[PROOF STEP]
proof (rule poly_mapping_eqI, simp only: lookup_map_scale)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) k = c * lookup (row_to_poly ts r) k
[PROOF STEP]
fix t
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) k = c * lookup (row_to_poly ts r) k
[PROOF STEP]
show "lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t" (is "lookup ?l t = c * lookup ?r t")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
proof (cases "t \<in> set ts")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. t \<in> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
 2. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
t \<in> set ts

goal (2 subgoals):
 1. t \<in> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
 2. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t \<in> set ts
[PROOF STEP]
obtain j where j: "j < length ts" and t: "t = ts ! j"
[PROOF STATE]
proof (prove)
using this:
t \<in> set ts

goal (1 subgoal):
 1. (\<And>j. \<lbrakk>j < length ts; t = ts ! j\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis in_set_conv_nth)
[PROOF STATE]
proof (state)
this:
j < length ts
t = ts ! j

goal (2 subgoals):
 1. t \<in> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
 2. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
dim_vec r = length ts
[PROOF STEP]
have dm: "dim_vec (c \<cdot>\<^sub>v r) = length ts"
[PROOF STATE]
proof (prove)
using this:
dim_vec r = length ts

goal (1 subgoal):
 1. dim_vec (c \<cdot>\<^sub>v r) = length ts
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_vec (c \<cdot>\<^sub>v r) = length ts

goal (2 subgoals):
 1. t \<in> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
 2. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
from j
[PROOF STATE]
proof (chain)
picking this:
j < length ts
[PROOF STEP]
have j': "j < dim_vec r"
[PROOF STATE]
proof (prove)
using this:
j < length ts

goal (1 subgoal):
 1. j < dim_vec r
[PROOF STEP]
by (simp only: assms(2))
[PROOF STATE]
proof (state)
this:
j < dim_vec r

goal (2 subgoals):
 1. t \<in> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
 2. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
by (simp add: t lookup_row_to_poly[OF assms j] lookup_row_to_poly[OF assms(1) dm j] index_smult_vec(1)[OF j'])
[PROOF STATE]
proof (state)
this:
lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t

goal (1 subgoal):
 1. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
t \<notin> set ts

goal (1 subgoal):
 1. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
with keys_row_to_poly[of ts "c \<cdot>\<^sub>v r"] keys_row_to_poly[of ts r]
[PROOF STATE]
proof (chain)
picking this:
keys (row_to_poly ts (c \<cdot>\<^sub>v r)) \<subseteq> set ts
keys (row_to_poly ts r) \<subseteq> set ts
t \<notin> set ts
[PROOF STEP]
have
      "t \<notin> keys ?l" and "t \<notin> keys ?r"
[PROOF STATE]
proof (prove)
using this:
keys (row_to_poly ts (c \<cdot>\<^sub>v r)) \<subseteq> set ts
keys (row_to_poly ts r) \<subseteq> set ts
t \<notin> set ts

goal (1 subgoal):
 1. t \<notin> keys (row_to_poly ts (c \<cdot>\<^sub>v r)) &&& t \<notin> keys (row_to_poly ts r)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t \<notin> keys (row_to_poly ts (c \<cdot>\<^sub>v r))
t \<notin> keys (row_to_poly ts r)

goal (1 subgoal):
 1. t \<notin> set ts \<Longrightarrow> lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
t \<notin> keys (row_to_poly ts (c \<cdot>\<^sub>v r))
t \<notin> keys (row_to_poly ts r)

goal (1 subgoal):
 1. lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t
[PROOF STEP]
by (simp add: in_keys_iff)
[PROOF STATE]
proof (state)
this:
lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
lookup (row_to_poly ts (c \<cdot>\<^sub>v r)) t = c * lookup (row_to_poly ts r) t

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma c_f_list_f_is_pr: "c_f_list f \<in> PrimRec2 \<Longrightarrow> f \<in> PrimRec2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c_f_list f \<in> PrimRec2 \<Longrightarrow> f \<in> PrimRec2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c_f_list f \<in> PrimRec2 \<Longrightarrow> f \<in> PrimRec2
[PROOF STEP]
assume A1: "c_f_list f \<in> PrimRec2"
[PROOF STATE]
proof (state)
this:
c_f_list f \<in> PrimRec2

goal (1 subgoal):
 1. c_f_list f \<in> PrimRec2 \<Longrightarrow> f \<in> PrimRec2
[PROOF STEP]
have S1: "f = (\<lambda> y x. c_hd (c_f_list f y x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = (\<lambda>y x. c_hd (c_f_list f y x))
[PROOF STEP]
by (rule c_f_list_to_f)
[PROOF STATE]
proof (state)
this:
f = (\<lambda>y x. c_hd (c_f_list f y x))

goal (1 subgoal):
 1. c_f_list f \<in> PrimRec2 \<Longrightarrow> f \<in> PrimRec2
[PROOF STEP]
from A1 c_hd_is_pr
[PROOF STATE]
proof (chain)
picking this:
c_f_list f \<in> PrimRec2
c_hd \<in> PrimRec1
[PROOF STEP]
have S2: "(\<lambda> y x. c_hd (c_f_list f y x)) \<in> PrimRec2"
[PROOF STATE]
proof (prove)
using this:
c_f_list f \<in> PrimRec2
c_hd \<in> PrimRec1

goal (1 subgoal):
 1. (\<lambda>y x. c_hd (c_f_list f y x)) \<in> PrimRec2
[PROOF STEP]
by prec
[PROOF STATE]
proof (state)
this:
(\<lambda>y x. c_hd (c_f_list f y x)) \<in> PrimRec2

goal (1 subgoal):
 1. c_f_list f \<in> PrimRec2 \<Longrightarrow> f \<in> PrimRec2
[PROOF STEP]
with S1
[PROOF STATE]
proof (chain)
picking this:
f = (\<lambda>y x. c_hd (c_f_list f y x))
(\<lambda>y x. c_hd (c_f_list f y x)) \<in> PrimRec2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f = (\<lambda>y x. c_hd (c_f_list f y x))
(\<lambda>y x. c_hd (c_f_list f y x)) \<in> PrimRec2

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LLL_measure_approx_fs_init:
  "LLL_invariant upw i fs_init \<Longrightarrow> 4 / 3 < \<alpha> \<Longrightarrow> m \<noteq> 0 \<Longrightarrow>
  real (LLL_measure i fs_init) \<le> real m + real (2 * m * m) * log base (real N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>LLL_invariant upw i fs_init; 4 / 3 < \<alpha>; m \<noteq> 0\<rbrakk> \<Longrightarrow> real (LLL_measure i fs_init) \<le> real m + real (2 * m * m) * log base (real N)
[PROOF STEP]
using LLL_measure_approx[OF LLL_inv_imp_w g_bound_fs_init]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>LLL_invariant ?upw1 ?i1 fs_init; 4 / 3 < \<alpha>; m \<noteq> 0\<rbrakk> \<Longrightarrow> real (LLL_measure ?i fs_init) \<le> real m + real (2 * m * m) * log base (real N)

goal (1 subgoal):
 1. \<lbrakk>LLL_invariant upw i fs_init; 4 / 3 < \<alpha>; m \<noteq> 0\<rbrakk> \<Longrightarrow> real (LLL_measure i fs_init) \<le> real m + real (2 * m * m) * log base (real N)
[PROOF STEP]
.


[STATEMENT]
lemma while_sup_sub_sup_one:
  "x \<star> (x \<squnion> y) \<le> x \<star> (1 \<squnion> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<star> x \<squnion> y \<le> x \<star> (1::'a) \<squnion> y
[PROOF STEP]
using semiring.add_right_mono while_left_dist_sup while_below_while_one
[PROOF STATE]
proof (prove)
using this:
?a \<le> ?b \<Longrightarrow> ?a \<squnion> ?c \<le> ?b \<squnion> ?c
?x \<star> ?y \<squnion> ?z = (?x \<star> ?y) \<squnion> (?x \<star> ?z)
?x \<star> ?x \<le> ?x \<star> (1::'a)

goal (1 subgoal):
 1. x \<star> x \<squnion> y \<le> x \<star> (1::'a) \<squnion> y
[PROOF STEP]
by auto


[STATEMENT]
lemma setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t_proj_subset:
  "setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t A"
  "setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj m (proj n A)) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t A &&& setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj m (proj n A)) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A)
[PROOF STEP]
unfolding proj_def setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set (filter (\<lambda>s. has_LabelN n s \<or> has_LabelS s) A)) \<subseteq> \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set A) &&& \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set (filter (\<lambda>s. has_LabelN m s \<or> has_LabelS s) (filter (\<lambda>s. has_LabelN n s \<or> has_LabelS s) A))) \<subseteq> \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set (filter (\<lambda>s. has_LabelN n s \<or> has_LabelS s) A))
[PROOF STEP]
by auto


[STATEMENT]
lemma borel_measurable_vimage_halfspace_component_gt:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  shows "f \<in> borel_measurable (lebesgue_on S) \<longleftrightarrow>
         (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. f x \<bullet> i > a} \<in> sets (lebesgue_on S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> borel_measurable (lebesgue_on S)) = (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. a < f x \<bullet> i} \<in> sets (lebesgue_on S))
[PROOF STEP]
apply (rule trans [OF borel_measurable_iff_halfspace_greater])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>i\<in>Basis. \<forall>a. {w \<in> space (lebesgue_on S). a < f w \<bullet> i} \<in> sets (lebesgue_on S)) = (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. a < f x \<bullet> i} \<in> sets (lebesgue_on S))
[PROOF STEP]
apply (fastforce simp add: space_restrict_space)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cf_bcomp_ArrMap_vdomain[cat_cs_simps]:
  assumes "\<FF> : \<BB>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>" and "\<GG> : \<CC>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
interpret \<FF>: is_functor \<alpha> \<BB>' \<BB> \<FF>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<BB>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
interpret \<GG>: is_functor \<alpha> \<CC>' \<CC> \<GG>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<GG> : \<CC>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(2))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
unfolding cf_bcomp_components
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (\<lambda>f\<in>\<^sub>\<circ>(\<FF>\<lparr>HomDom\<rparr> \<times>\<^sub>C \<GG>\<lparr>HomDom\<rparr>)\<lparr>Arr\<rparr>. \<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<lparr>[]\<^sub>\<circ>\<rparr>\<rparr> \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>\<SS>\<^esub> \<GG>\<lparr>ArrMap\<rparr>\<lparr>f\<lparr>1\<^sub>\<nat>\<rparr>\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
by (simp add: cat_cs_simps)
[PROOF STATE]
proof (state)
this:
\<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LANDAU_PROD_bigo_iff:
  "LANDAU_PROD (bigo at_top) c1 c2 fs \<longleftrightarrow> c1 = 0 \<or> (c2 \<noteq> 0 \<and> nonneg_primfun_list (group_primfuns fs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LANDAU_PROD bigo_at_top c1 c2 fs = (c1 = 0 \<or> c2 \<noteq> 0 \<and> nonneg_primfun_list (group_primfuns fs))
[PROOF STEP]
unfolding LANDAU_PROD_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>_. c1) \<in> O(\<lambda>x. c2 * eval_primfuns fs x)) = (c1 = 0 \<or> c2 \<noteq> 0 \<and> nonneg_primfun_list (group_primfuns fs))
[PROOF STEP]
by (cases "c1 = 0", simp, cases "c2 = 0", simp) (simp_all add: landau_primfuns_iff)


[STATEMENT]
lemma measurable_dens_ctxt_measure_component:
    "x \<in> V \<Longrightarrow> (\<lambda>\<sigma>. \<sigma> x) \<in> measurable (dens_ctxt_measure (V,V',\<Gamma>,\<delta>) \<rho>) (stock_measure (\<Gamma> x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> V \<Longrightarrow> (\<lambda>\<sigma>. \<sigma> x) \<in> dens_ctxt_measure \<Y> \<rho> \<rightarrow>\<^sub>M stock_measure (\<Gamma> x)
[PROOF STEP]
unfolding dens_ctxt_measure_def state_measure'_def state_measure_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> V \<Longrightarrow> (\<lambda>\<sigma>. \<sigma> x) \<in> (case \<Y> of (V, V', \<Gamma>, \<delta>) \<Rightarrow> \<lambda>\<rho>. density (distr (Pi\<^sub>M V (\<lambda>x. stock_measure (\<Gamma> x))) (Pi\<^sub>M (V \<union> V') (\<lambda>x. stock_measure (\<Gamma> x))) (\<lambda>\<sigma>. merge V V' (\<sigma>, \<rho>))) \<delta>) \<rho> \<rightarrow>\<^sub>M stock_measure (\<Gamma> x)
[PROOF STEP]
by (auto intro!: measurable_component_singleton)