[STATEMENT]
lemma has_absolute_integral_change_of_variables_compact_family:
  fixes f :: "real^'m::{finite,wellorder} \<Rightarrow> real^'n" and g :: "real^'m::_ \<Rightarrow> real^'m::_"
  assumes compact: "\<And>n::nat. compact (F n)"
      and der_g: "\<And>x. x \<in> (\<Union>n. F n) \<Longrightarrow> (g has_derivative g' x) (at x within (\<Union>n. F n))"
      and inj: "inj_on g (\<Union>n. F n)"
  shows "((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) absolutely_integrable_on (\<Union>n. F n) \<and>
             integral (\<Union>n. F n) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f(g x)) = b
      \<longleftrightarrow> f absolutely_integrable_on (g ` (\<Union>n. F n)) \<and> integral (g ` (\<Union>n. F n)) f = b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
let ?D = "\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
let ?U = "\<lambda>n. \<Union>m\<le>n. F m"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
let ?lift = "vec::real\<Rightarrow>real^1"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
have F_leb: "F m \<in> sets lebesgue" for m
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F m \<in> sets lebesgue
[PROOF STEP]
by (simp add: compact borel_compact)
[PROOF STATE]
proof (state)
this:
F ?m \<in> sets lebesgue

goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
have iff: "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on (?U n) \<and>
             integral (?U n) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b
         \<longleftrightarrow> f absolutely_integrable_on (g ` (?U n)) \<and> integral (g ` (?U n)) f = b" for n b and f :: "real^'m::_ \<Rightarrow> real^'k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n}) \<and> integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (F ` {..n}) \<and> integral (g ` \<Union> (F ` {..n})) f = b)
[PROOF STEP]
proof (rule has_absolute_integral_change_of_variables_compact)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. compact (\<Union> (F ` {..n}))
 2. \<And>x. x \<in> \<Union> (F ` {..n}) \<Longrightarrow> (g has_derivative g' x) (at x within \<Union> (F ` {..n}))
 3. inj_on g (\<Union> (F ` {..n}))
[PROOF STEP]
show "compact (?U n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact (\<Union> (F ` {..n}))
[PROOF STEP]
by (simp add: compact compact_UN)
[PROOF STATE]
proof (state)
this:
compact (\<Union> (F ` {..n}))

goal (2 subgoals):
 1. \<And>x. x \<in> \<Union> (F ` {..n}) \<Longrightarrow> (g has_derivative g' x) (at x within \<Union> (F ` {..n}))
 2. inj_on g (\<Union> (F ` {..n}))
[PROOF STEP]
show "(g has_derivative g' x) (at x within (?U n))"
      if "x \<in> ?U n" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_derivative g' x) (at x within \<Union> (F ` {..n}))
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> \<Union> (F ` {..n})

goal (1 subgoal):
 1. (g has_derivative g' x) (at x within \<Union> (F ` {..n}))
[PROOF STEP]
by (blast intro!: has_derivative_subset [OF der_g])
[PROOF STATE]
proof (state)
this:
?x \<in> \<Union> (F ` {..n}) \<Longrightarrow> (g has_derivative g' ?x) (at ?x within \<Union> (F ` {..n}))

goal (1 subgoal):
 1. inj_on g (\<Union> (F ` {..n}))
[PROOF STEP]
show "inj_on g (?U n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on g (\<Union> (F ` {..n}))
[PROOF STEP]
using inj
[PROOF STATE]
proof (prove)
using this:
inj_on g (\<Union> (range F))

goal (1 subgoal):
 1. inj_on g (\<Union> (F ` {..n}))
[PROOF STEP]
by (auto simp: inj_on_def)
[PROOF STATE]
proof (state)
this:
inj_on g (\<Union> (F ` {..n}))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) absolutely_integrable_on \<Union> (F ` {..?n1}) \<and> integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) = ?b1) = (?f1 absolutely_integrable_on g ` \<Union> (F ` {..?n1}) \<and> integral (g ` \<Union> (F ` {..?n1})) ?f1 = ?b1)

goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)
[PROOF STEP]
unfolding image_UN
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on (\<Union>x. g ` F x) \<and> integral (\<Union>x. g ` F x) f = b)
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> f absolutely_integrable_on (\<Union>x. g ` F x)
 2. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 4. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
assume DS: "?D absolutely_integrable_on (\<Union>n. F n)"
      and b: "b = integral (\<Union>n. F n) ?D"
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal (4 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> f absolutely_integrable_on (\<Union>x. g ` F x)
 2. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 4. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
have DU: "\<And>n. ?D absolutely_integrable_on (?U n)"
             "(\<lambda>n. integral (?U n) ?D) \<longlonglongrightarrow> integral (\<Union>n. F n) ?D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>n. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})) &&& (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
using integral_countable_UN [OF DS F_leb]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n})
(\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal (1 subgoal):
 1. (\<And>n. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})) &&& (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})
(\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal (4 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> f absolutely_integrable_on (\<Union>x. g ` F x)
 2. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 4. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
with iff
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) absolutely_integrable_on \<Union> (F ` {..?n1}) \<and> integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) = ?b1) = (?f1 absolutely_integrable_on g ` \<Union> (F ` {..?n1}) \<and> integral (g ` \<Union> (F ` {..?n1})) ?f1 = ?b1)
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})
(\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
have fag: "f absolutely_integrable_on g ` (?U n)"
      and fg_int: "integral (\<Union>m\<le>n. g ` F m) f = integral (?U n) ?D" for n
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) absolutely_integrable_on \<Union> (F ` {..?n1}) \<and> integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) = ?b1) = (?f1 absolutely_integrable_on g ` \<Union> (F ` {..?n1}) \<and> integral (g ` \<Union> (F ` {..?n1})) ?f1 = ?b1)
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})
(\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal (1 subgoal):
 1. f absolutely_integrable_on g ` \<Union> (F ` {..n}) &&& integral (\<Union>m\<le>n. g ` F m) f = integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
by (auto simp: image_UN)
[PROOF STATE]
proof (state)
this:
f absolutely_integrable_on g ` \<Union> (F ` {..?n1})
integral (\<Union>m\<le>?n1. g ` F m) f = integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal (4 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> f absolutely_integrable_on (\<Union>x. g ` F x)
 2. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 4. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
let ?h = "\<lambda>x. if x \<in> (\<Union>m. g ` F m) then norm(f x) else 0"
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> f absolutely_integrable_on (\<Union>x. g ` F x)
 2. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 4. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
have "(\<lambda>x. if x \<in> (\<Union>m. g ` F m) then f x else 0) absolutely_integrable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> (\<Union>m. g ` F m) then f x else 0) absolutely_integrable_on UNIV
[PROOF STEP]
proof (rule dominated_convergence_absolutely_integrable)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>k. ?f k absolutely_integrable_on UNIV
 2. ?h integrable_on UNIV
 3. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> (\<Union>m. g ` F m) then f x else 0) \<le> ?h x
 4. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. ?f k x) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)
[PROOF STEP]
show "(\<lambda>x. if x \<in> (\<Union>m\<le>k. g ` F m) then f x else 0) absolutely_integrable_on UNIV" for k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> (\<Union>m\<le>k. g ` F m) then f x else 0) absolutely_integrable_on UNIV
[PROOF STEP]
unfolding absolutely_integrable_restrict_UNIV
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f absolutely_integrable_on (\<Union>m\<le>k. g ` F m)
[PROOF STEP]
using fag
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on g ` \<Union> (F ` {..?n1})

goal (1 subgoal):
 1. f absolutely_integrable_on (\<Union>m\<le>k. g ` F m)
[PROOF STEP]
by (simp add: image_UN)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> (\<Union>m\<le>?k1. g ` F m) then f x else 0) absolutely_integrable_on UNIV

goal (3 subgoals):
 1. ?h integrable_on UNIV
 2. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> (\<Union>m. g ` F m) then f x else 0) \<le> ?h x
 3. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k9 k. g ` F m) then f x else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)
[PROOF STEP]
let ?nf = "\<lambda>n x. if x \<in> (\<Union>m\<le>n. g ` F m) then norm(f x) else 0"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?h integrable_on UNIV
 2. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> (\<Union>m. g ` F m) then f x else 0) \<le> ?h x
 3. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k9 k. g ` F m) then f x else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)
[PROOF STEP]
show "?h integrable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0) integrable_on UNIV
[PROOF STEP]
proof (rule monotone_convergence_increasing [THEN conjunct1])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>k. ?f1 k integrable_on UNIV
 2. \<And>k x. x \<in> UNIV \<Longrightarrow> ?f1 k x \<le> ?f1 (Suc k) x
 3. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. ?f1 k x) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 4. bounded (range (\<lambda>k. integral UNIV (?f1 k)))
[PROOF STEP]
show "?nf k integrable_on UNIV" for k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) integrable_on UNIV
[PROOF STEP]
using fag
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on g ` \<Union> (F ` {..?n1})

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) integrable_on UNIV
[PROOF STEP]
unfolding integrable_restrict_UNIV absolutely_integrable_on_def
[PROOF STATE]
proof (prove)
using this:
f integrable_on g ` \<Union> (F ` {..?n1}) \<and> (\<lambda>x. norm (f x)) integrable_on g ` \<Union> (F ` {..?n1})

goal (1 subgoal):
 1. (\<lambda>x. norm (f x)) integrable_on (\<Union>m\<le>k. g ` F m)
[PROOF STEP]
by (simp add: image_UN)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> (\<Union>m\<le>?k1. g ` F m) then norm (f x) else 0) integrable_on UNIV

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> (\<Union>m\<le>?k1. g ` F m) then norm (f x) else 0) integrable_on UNIV

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
have "(norm \<circ> ?D) absolutely_integrable_on ?U n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})
[PROOF STEP]
by (intro absolutely_integrable_norm DU)
[PROOF STATE]
proof (state)
this:
norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})
[PROOF STEP]
have "integral (g ` ?U n) (norm \<circ> f) = integral (?U n) (norm \<circ> ?D)"
[PROOF STATE]
proof (prove)
using this:
norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})

goal (1 subgoal):
 1. integral (g ` \<Union> (F ` {..n})) (norm \<circ> f) = integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))
[PROOF STEP]
using iff [of n "vec \<circ> norm \<circ> f" "integral (?U n) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (?lift \<circ> norm \<circ> f) (g x))"]
[PROOF STATE]
proof (prove)
using this:
norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) absolutely_integrable_on \<Union> (F ` {..n}) \<and> integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) = integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x))) = (vec \<circ> norm \<circ> f absolutely_integrable_on g ` \<Union> (F ` {..n}) \<and> integral (g ` \<Union> (F ` {..n})) (vec \<circ> norm \<circ> f) = integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)))

goal (1 subgoal):
 1. integral (g ` \<Union> (F ` {..n})) (norm \<circ> f) = integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))
[PROOF STEP]
unfolding absolutely_integrable_on_1_iff integral_on_1_eq
[PROOF STATE]
proof (prove)
using this:
norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n})
((\<lambda>x. (\<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) $ 1) absolutely_integrable_on \<Union> (F ` {..n}) \<and> vec (integral (\<Union> (F ` {..n})) (\<lambda>x. (\<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) $ 1)) = vec (integral (\<Union> (F ` {..n})) (\<lambda>x. (\<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) $ 1))) = ((\<lambda>x. (vec \<circ> norm \<circ> f) x $ 1) absolutely_integrable_on g ` \<Union> (F ` {..n}) \<and> vec (integral (g ` \<Union> (F ` {..n})) (\<lambda>x. (vec \<circ> norm \<circ> f) x $ 1)) = vec (integral (\<Union> (F ` {..n})) (\<lambda>x. (\<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) $ 1)))

goal (1 subgoal):
 1. integral (g ` \<Union> (F ` {..n})) (norm \<circ> f) = integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))
[PROOF STEP]
by (auto simp: o_def)
[PROOF STATE]
proof (state)
this:
integral (g ` \<Union> (F ` {..n})) (norm \<circ> f) = integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f) = integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f) = integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
have "bounded (range (\<lambda>k. integral (?U k) (norm \<circ> ?D)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded (range (\<lambda>k. integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))))
[PROOF STEP]
unfolding bounded_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a. \<forall>x\<in>range (\<lambda>k. integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))). norm x \<le> a
[PROOF STEP]
proof (rule exI, clarify)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x k. k \<in> UNIV \<Longrightarrow> norm (integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))) \<le> ?a
[PROOF STEP]
fix k
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x k. k \<in> UNIV \<Longrightarrow> norm (integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))) \<le> ?a
[PROOF STEP]
show "norm (integral (?U k) (norm \<circ> ?D)) \<le> integral (\<Union>n. F n) (norm \<circ> ?D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))) \<le> integral (\<Union> (range F)) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))
[PROOF STEP]
unfolding integral_restrict_UNIV [of _ "norm \<circ> ?D", symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0)) \<le> integral UNIV (\<lambda>x. if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0)
[PROOF STEP]
proof (rule integral_norm_bound_integral)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV
 2. (\<lambda>x. if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV
 3. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) \<le> (if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0)
[PROOF STEP]
show "(\<lambda>x. if x \<in> \<Union> (F ` {..k}) then (norm \<circ> ?D) x else 0) integrable_on UNIV"
              "(\<lambda>x. if x \<in> (\<Union>n. F n) then (norm \<circ> ?D) x else 0) integrable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV &&& (\<lambda>x. if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV
[PROOF STEP]
using DU(1) DS
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV &&& (\<lambda>x. if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV
[PROOF STEP]
unfolding absolutely_integrable_on_def o_def integrable_restrict_UNIV
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) integrable_on \<Union> (F ` {..?n1}) \<and> (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) integrable_on \<Union> (F ` {..?n1})
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) integrable_on \<Union> (range F) \<and> (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) integrable_on \<Union> (range F)

goal (1 subgoal):
 1. (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) integrable_on \<Union> (F ` {..k}) &&& (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) integrable_on \<Union> (range F)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV
(\<lambda>x. if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) integrable_on UNIV

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (F ` {..k}) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0) \<le> (if x \<in> \<Union> (range F) then (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) x else 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
norm (integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))) \<le> integral (\<Union> (range F)) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
bounded (range (\<lambda>k. integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))))

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>?k10 (Suc k). g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>?k10 k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f) = integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))
bounded (range (\<lambda>k. integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))))
[PROOF STEP]
show "bounded (range (\<lambda>k. integral UNIV (?nf k)))"
[PROOF STATE]
proof (prove)
using this:
integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f) = integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))
bounded (range (\<lambda>k. integral (\<Union> (F ` {..k})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))))

goal (1 subgoal):
 1. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0)))
[PROOF STEP]
by (simp add: integral_restrict_UNIV image_UN [symmetric] o_def)
[PROOF STATE]
proof (state)
this:
bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0)))

goal (2 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>Suc k. g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>Suc k. g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
[PROOF STEP]
show "(\<lambda>k. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0)
              \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
[PROOF STEP]
by (force intro: tendsto_eventually eventually_sequentiallyI)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. if ?x1 \<in> (\<Union>m\<le>k. g ` F m) then norm (f ?x1) else 0) \<longlonglongrightarrow> (if ?x1 \<in> (\<Union>m. g ` F m) then norm (f ?x1) else 0)

goal (1 subgoal):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> (\<Union>m\<le>k. g ` F m) then norm (f x) else 0) \<le> (if x \<in> (\<Union>m\<le>Suc k. g ` F m) then norm (f x) else 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0) integrable_on UNIV

goal (2 subgoals):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> (\<Union>m. g ` F m) then f x else 0) \<le> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k9 k. g ` F m) then f x else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> (\<Union>m. g ` F m) then f x else 0) \<le> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> (\<Union>m\<le>?k9 k. g ` F m) then f x else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)
[PROOF STEP]
show "(\<lambda>k. if x \<in> (\<Union>m\<le>k. g ` F m) then f x else 0)
            \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. if x \<in> (\<Union>m\<le>k. g ` F m) then f x else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>m. g ` F m) then f x else 0)
[PROOF STEP]
proof clarsimp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa xaa. \<lbrakk>xaa \<in> F xa; x = g xaa\<rbrakk> \<Longrightarrow> (\<lambda>k. if \<exists>x\<in>{..k}. g xaa \<in> g ` F x then f (g xaa) else 0) \<longlonglongrightarrow> f (g xaa)
[PROOF STEP]
fix m y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa xaa. \<lbrakk>xaa \<in> F xa; x = g xaa\<rbrakk> \<Longrightarrow> (\<lambda>k. if \<exists>x\<in>{..k}. g xaa \<in> g ` F x then f (g xaa) else 0) \<longlonglongrightarrow> f (g xaa)
[PROOF STEP]
assume "y \<in> F m"
[PROOF STATE]
proof (state)
this:
y \<in> F m

goal (1 subgoal):
 1. \<And>xa xaa. \<lbrakk>xaa \<in> F xa; x = g xaa\<rbrakk> \<Longrightarrow> (\<lambda>k. if \<exists>x\<in>{..k}. g xaa \<in> g ` F x then f (g xaa) else 0) \<longlonglongrightarrow> f (g xaa)
[PROOF STEP]
show "(\<lambda>k. if \<exists>x\<in>{..k}. g y \<in> g ` F x then f (g y) else 0) \<longlonglongrightarrow> f (g y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. if \<exists>x\<in>{..k}. g y \<in> g ` F x then f (g y) else 0) \<longlonglongrightarrow> f (g y)
[PROOF STEP]
using \<open>y \<in> F m\<close>
[PROOF STATE]
proof (prove)
using this:
y \<in> F m

goal (1 subgoal):
 1. (\<lambda>k. if \<exists>x\<in>{..k}. g y \<in> g ` F x then f (g y) else 0) \<longlonglongrightarrow> f (g y)
[PROOF STEP]
by (force intro: tendsto_eventually eventually_sequentiallyI [of m])
[PROOF STATE]
proof (state)
this:
(\<lambda>k. if \<exists>x\<in>{..k}. g y \<in> g ` F x then f (g y) else 0) \<longlonglongrightarrow> f (g y)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>k. if ?x1 \<in> (\<Union>m\<le>k. g ` F m) then f ?x1 else 0) \<longlonglongrightarrow> (if ?x1 \<in> (\<Union>m. g ` F m) then f ?x1 else 0)

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> (\<Union>m. g ` F m) then f x else 0) \<le> (if x \<in> (\<Union>m. g ` F m) then norm (f x) else 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> (\<Union>m. g ` F m) then f x else 0) absolutely_integrable_on UNIV

goal (4 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> f absolutely_integrable_on (\<Union>x. g ` F x)
 2. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 4. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. if x \<in> (\<Union>m. g ` F m) then f x else 0) absolutely_integrable_on UNIV
[PROOF STEP]
show fai: "f absolutely_integrable_on (\<Union>m. g ` F m)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. if x \<in> (\<Union>m. g ` F m) then f x else 0) absolutely_integrable_on UNIV

goal (1 subgoal):
 1. f absolutely_integrable_on (\<Union>m. g ` F m)
[PROOF STEP]
using absolutely_integrable_restrict_UNIV
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. if x \<in> (\<Union>m. g ` F m) then f x else 0) absolutely_integrable_on UNIV
((\<lambda>x. if x \<in> ?S then ?f x else (0::?'b)) absolutely_integrable_on UNIV) = (?f absolutely_integrable_on ?S)

goal (1 subgoal):
 1. f absolutely_integrable_on (\<Union>m. g ` F m)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f absolutely_integrable_on (\<Union>m. g ` F m)

goal (3 subgoals):
 1. \<lbrakk>(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F); b = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))\<rbrakk> \<Longrightarrow> integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 3. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
show "integral ((\<Union>x. g ` F x)) f = integral (\<Union>n. F n) ?D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
proof (rule LIMSEQ_unique)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?X \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f
 2. ?X \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
show "(\<lambda>n. integral (?U n) ?D) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f
[PROOF STEP]
unfolding fg_int [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f
[PROOF STEP]
proof (rule integral_countable_UN [OF fai])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. g ` F m \<in> sets lebesgue
[PROOF STEP]
show "g ` F m \<in> sets lebesgue" for m
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` F m \<in> sets lebesgue
[PROOF STEP]
proof (rule differentiable_image_in_sets_lebesgue [OF F_leb])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. DIM((real, 'm) vec) \<le> DIM((real, 'm) vec)
 2. g differentiable_on F m
[PROOF STEP]
show "g differentiable_on F m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g differentiable_on F m
[PROOF STEP]
by (meson der_g differentiableI UnionI differentiable_on_def differentiable_on_subset rangeI subsetI)
[PROOF STATE]
proof (state)
this:
g differentiable_on F m

goal (1 subgoal):
 1. DIM((real, 'm) vec) \<le> DIM((real, 'm) vec)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
g ` F ?m1 \<in> sets lebesgue

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f

goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
show "(\<lambda>n. integral (?U n) ?D) \<longlonglongrightarrow> integral (\<Union>n. F n) ?D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
by (rule DU)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
integral (\<Union>x. g ` F x) f = integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
assume fs: "f absolutely_integrable_on (\<Union>x. g ` F x)"
      and b: "b = integral ((\<Union>x. g ` F x)) f"
[PROOF STATE]
proof (state)
this:
f absolutely_integrable_on (\<Union>x. g ` F x)
b = integral (\<Union>x. g ` F x) f

goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
have gF_leb: "g ` F m \<in> sets lebesgue" for m
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` F m \<in> sets lebesgue
[PROOF STEP]
proof (rule differentiable_image_in_sets_lebesgue [OF F_leb])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. DIM((real, 'm) vec) \<le> DIM((real, 'm) vec)
 2. g differentiable_on F m
[PROOF STEP]
show "g differentiable_on F m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g differentiable_on F m
[PROOF STEP]
using der_g
[PROOF STATE]
proof (prove)
using this:
?x \<in> \<Union> (range F) \<Longrightarrow> (g has_derivative g' ?x) (at ?x within \<Union> (range F))

goal (1 subgoal):
 1. g differentiable_on F m
[PROOF STEP]
unfolding differentiable_def differentiable_on_def
[PROOF STATE]
proof (prove)
using this:
?x \<in> \<Union> (range F) \<Longrightarrow> (g has_derivative g' ?x) (at ?x within \<Union> (range F))

goal (1 subgoal):
 1. \<forall>x\<in>F m. \<exists>D. (g has_derivative D) (at x within F m)
[PROOF STEP]
by (meson Sup_upper UNIV_I UnionI has_derivative_subset image_eqI)
[PROOF STATE]
proof (state)
this:
g differentiable_on F m

goal (1 subgoal):
 1. DIM((real, 'm) vec) \<le> DIM((real, 'm) vec)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
g ` F ?m1 \<in> sets lebesgue

goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
have fgU: "\<And>n. f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)"
      "(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>n. f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)) &&& (\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f
[PROOF STEP]
using integral_countable_UN [OF fs gF_leb]
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on (\<Union>m\<le>?n. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f

goal (1 subgoal):
 1. (\<And>n. f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)) &&& (\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f absolutely_integrable_on (\<Union>m\<le>?n1. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f

goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
with iff
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) absolutely_integrable_on \<Union> (F ` {..?n1}) \<and> integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) = ?b1) = (?f1 absolutely_integrable_on g ` \<Union> (F ` {..?n1}) \<and> integral (g ` \<Union> (F ` {..?n1})) ?f1 = ?b1)
f absolutely_integrable_on (\<Union>m\<le>?n1. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f
[PROOF STEP]
have DUn: "?D absolutely_integrable_on ?U n"
      and D_int: "integral (?U n) ?D = integral (\<Union>m\<le>n. g ` F m) f" for n
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) absolutely_integrable_on \<Union> (F ` {..?n1}) \<and> integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R ?f1 (g x)) = ?b1) = (?f1 absolutely_integrable_on g ` \<Union> (F ` {..?n1}) \<and> integral (g ` \<Union> (F ` {..?n1})) ?f1 = ?b1)
f absolutely_integrable_on (\<Union>m\<le>?n1. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f

goal (1 subgoal):
 1. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..n}) &&& integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>m\<le>n. g ` F m) f
[PROOF STEP]
by (auto simp: image_UN)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})
integral (\<Union> (F ` {..?n1})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>m\<le>?n1. g ` F m) f

goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
let ?h = "\<lambda>x. if x \<in> (\<Union>n. F n) then norm(?D x) else 0"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
have "(\<lambda>x. if x \<in> (\<Union>n. F n) then ?D x else 0) absolutely_integrable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) absolutely_integrable_on UNIV
[PROOF STEP]
proof (rule dominated_convergence_absolutely_integrable)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>k. ?f k absolutely_integrable_on UNIV
 2. ?h integrable_on UNIV
 3. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<le> ?h x
 4. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. ?f k x) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0)
[PROOF STEP]
show "(\<lambda>x. if x \<in> ?U k then ?D x else 0) absolutely_integrable_on UNIV" for k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) absolutely_integrable_on UNIV
[PROOF STEP]
unfolding absolutely_integrable_restrict_UNIV
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..k})
[PROOF STEP]
using DUn
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})

goal (1 subgoal):
 1. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..k})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> \<Union> (F ` {..?k1}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) absolutely_integrable_on UNIV

goal (3 subgoals):
 1. ?h integrable_on UNIV
 2. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<le> ?h x
 3. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k9 k}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0)
[PROOF STEP]
let ?nD = "\<lambda>n x. if x \<in> ?U n then norm(?D x) else 0"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?h integrable_on UNIV
 2. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<le> ?h x
 3. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k9 k}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0)
[PROOF STEP]
show "?h integrable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) integrable_on UNIV
[PROOF STEP]
proof (rule monotone_convergence_increasing [THEN conjunct1])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>k. ?f1 k integrable_on UNIV
 2. \<And>k x. x \<in> UNIV \<Longrightarrow> ?f1 k x \<le> ?f1 (Suc k) x
 3. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. ?f1 k x) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 4. bounded (range (\<lambda>k. integral UNIV (?f1 k)))
[PROOF STEP]
show "?nD k integrable_on UNIV" for k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) integrable_on UNIV
[PROOF STEP]
using DUn
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (F ` {..?n1})

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) integrable_on UNIV
[PROOF STEP]
unfolding integrable_restrict_UNIV absolutely_integrable_on_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) integrable_on \<Union> (F ` {..?n1}) \<and> (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) integrable_on \<Union> (F ` {..?n1})

goal (1 subgoal):
 1. (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) integrable_on \<Union> (F ` {..k})
[PROOF STEP]
by (simp add: image_UN)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> \<Union> (F ` {..?k1}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) integrable_on UNIV

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> \<Union> (F ` {..?k1}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) integrable_on UNIV

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
fix n::nat
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
have "(norm \<circ> f) absolutely_integrable_on (\<Union>m\<le>n. g ` F m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm \<circ> f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)
[PROOF STEP]
apply (rule absolutely_integrable_norm)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)
[PROOF STEP]
using fgU
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on (\<Union>m\<le>?n1. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f

goal (1 subgoal):
 1. f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
norm \<circ> f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
norm \<circ> f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)
[PROOF STEP]
have "integral (?U n) (norm \<circ> ?D) = integral (g ` ?U n) (norm \<circ> f)"
[PROOF STATE]
proof (prove)
using this:
norm \<circ> f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)

goal (1 subgoal):
 1. integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..n})) (norm \<circ> f)
[PROOF STEP]
using iff [of n "?lift \<circ> norm \<circ> f" "integral (g ` ?U n) (?lift \<circ> norm \<circ> f)"]
[PROOF STATE]
proof (prove)
using this:
norm \<circ> f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) absolutely_integrable_on \<Union> (F ` {..n}) \<and> integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) = integral (g ` \<Union> (F ` {..n})) (vec \<circ> norm \<circ> f)) = (vec \<circ> norm \<circ> f absolutely_integrable_on g ` \<Union> (F ` {..n}) \<and> integral (g ` \<Union> (F ` {..n})) (vec \<circ> norm \<circ> f) = integral (g ` \<Union> (F ` {..n})) (vec \<circ> norm \<circ> f))

goal (1 subgoal):
 1. integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..n})) (norm \<circ> f)
[PROOF STEP]
unfolding absolutely_integrable_on_1_iff integral_on_1_eq image_UN
[PROOF STATE]
proof (prove)
using this:
norm \<circ> f absolutely_integrable_on (\<Union>m\<le>n. g ` F m)
((\<lambda>x. (\<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) $ 1) absolutely_integrable_on \<Union> (F ` {..n}) \<and> vec (integral (\<Union> (F ` {..n})) (\<lambda>x. (\<bar>det (matrix (g' x))\<bar> *\<^sub>R (vec \<circ> norm \<circ> f) (g x)) $ 1)) = vec (integral (\<Union>x\<le>n. g ` F x) (\<lambda>x. (vec \<circ> norm \<circ> f) x $ 1))) = ((\<lambda>x. (vec \<circ> norm \<circ> f) x $ 1) absolutely_integrable_on (\<Union>x\<le>n. g ` F x) \<and> vec (integral (\<Union>x\<le>n. g ` F x) (\<lambda>x. (vec \<circ> norm \<circ> f) x $ 1)) = vec (integral (\<Union>x\<le>n. g ` F x) (\<lambda>x. (vec \<circ> norm \<circ> f) x $ 1)))

goal (1 subgoal):
 1. integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (\<Union>x\<le>n. g ` F x) (norm \<circ> f)
[PROOF STEP]
by (auto simp: o_def)
[PROOF STATE]
proof (state)
this:
integral (\<Union> (F ` {..n})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..n})) (norm \<circ> f)

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f)

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f)

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
have "bounded (range (\<lambda>k. integral (g ` ?U k) (norm \<circ> f)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded (range (\<lambda>k. integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)))
[PROOF STEP]
unfolding bounded_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a. \<forall>x\<in>range (\<lambda>k. integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)). norm x \<le> a
[PROOF STEP]
proof (rule exI, clarify)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x k. k \<in> UNIV \<Longrightarrow> norm (integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)) \<le> ?a
[PROOF STEP]
fix k
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x k. k \<in> UNIV \<Longrightarrow> norm (integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)) \<le> ?a
[PROOF STEP]
show "norm (integral (g ` ?U k) (norm \<circ> f)) \<le> integral (g ` (\<Union>n. F n)) (norm \<circ> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)) \<le> integral (g ` \<Union> (range F)) (norm \<circ> f)
[PROOF STEP]
unfolding integral_restrict_UNIV [of _ "norm \<circ> f", symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (integral UNIV (\<lambda>x. if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0)) \<le> integral UNIV (\<lambda>x. if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0)
[PROOF STEP]
proof (rule integral_norm_bound_integral)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>x. if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0) integrable_on UNIV
 2. (\<lambda>x. if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0) integrable_on UNIV
 3. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0) \<le> (if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0)
[PROOF STEP]
show "(\<lambda>x. if x \<in> g ` ?U k then (norm \<circ> f) x else 0) integrable_on UNIV"
                 "(\<lambda>x. if x \<in> g ` (\<Union>n. F n) then (norm \<circ> f) x else 0) integrable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0) integrable_on UNIV &&& (\<lambda>x. if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0) integrable_on UNIV
[PROOF STEP]
using fgU fs
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on (\<Union>m\<le>?n1. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f
f absolutely_integrable_on (\<Union>x. g ` F x)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0) integrable_on UNIV &&& (\<lambda>x. if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0) integrable_on UNIV
[PROOF STEP]
unfolding absolutely_integrable_on_def o_def integrable_restrict_UNIV
[PROOF STATE]
proof (prove)
using this:
f integrable_on (\<Union>m\<le>?n1. g ` F m) \<and> (\<lambda>x. norm (f x)) integrable_on (\<Union>m\<le>?n1. g ` F m)
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>m. g ` F m) f
f integrable_on (\<Union>x. g ` F x) \<and> (\<lambda>x. norm (f x)) integrable_on (\<Union>x. g ` F x)

goal (1 subgoal):
 1. (\<lambda>x. norm (f x)) integrable_on g ` \<Union> (F ` {..k}) &&& (\<lambda>x. norm (f x)) integrable_on g ` \<Union> (range F)
[PROOF STEP]
by (auto simp: image_UN)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0) integrable_on UNIV
(\<lambda>x. if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0) integrable_on UNIV

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> g ` \<Union> (F ` {..k}) then (norm \<circ> f) x else 0) \<le> (if x \<in> g ` \<Union> (range F) then (norm \<circ> f) x else 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
norm (integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)) \<le> integral (g ` \<Union> (range F)) (norm \<circ> f)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
bounded (range (\<lambda>k. integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)))

goal (3 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..?k10 (Suc k)}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 3. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..?k10 k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f)
bounded (range (\<lambda>k. integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)))
[PROOF STEP]
show "bounded (range (\<lambda>k. integral UNIV (?nD k)))"
[PROOF STATE]
proof (prove)
using this:
integral (\<Union> (F ` {..?n3})) (norm \<circ> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..?n3})) (norm \<circ> f)
bounded (range (\<lambda>k. integral (g ` \<Union> (F ` {..k})) (norm \<circ> f)))

goal (1 subgoal):
 1. bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))
[PROOF STEP]
unfolding integral_restrict_UNIV image_UN [symmetric] o_def
[PROOF STATE]
proof (prove)
using this:
integral (\<Union> (F ` {..?n3})) (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) = integral (g ` \<Union> (F ` {..?n3})) (\<lambda>x. norm (f x))
bounded (range (\<lambda>k. integral (g ` \<Union> (F ` {..k})) (\<lambda>x. norm (f x))))

goal (1 subgoal):
 1. bounded (range (\<lambda>k. integral (\<Union> (F ` {..k})) (\<lambda>x. norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
bounded (range (\<lambda>k. integral UNIV (\<lambda>x. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)))

goal (2 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..Suc k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..Suc k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
[PROOF STEP]
show "(\<lambda>k. if x \<in> ?U k then norm (?D x) else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>n. F n) then norm (?D x) else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
[PROOF STEP]
by (force intro: tendsto_eventually eventually_sequentiallyI)
[PROOF STATE]
proof (state)
this:
(\<lambda>k. if ?x1 \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' ?x1))\<bar> *\<^sub>R f (g ?x1)) else 0) \<longlonglongrightarrow> (if ?x1 \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' ?x1))\<bar> *\<^sub>R f (g ?x1)) else 0)

goal (1 subgoal):
 1. \<And>k x. x \<in> UNIV \<Longrightarrow> (if x \<in> \<Union> (F ` {..k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) \<le> (if x \<in> \<Union> (F ` {..Suc k}) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0) integrable_on UNIV

goal (2 subgoals):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<le> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k9 k}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<le> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
 2. \<And>x. x \<in> UNIV \<Longrightarrow> (\<lambda>k. if x \<in> \<Union> (F ` {..?k9 k}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0)
[PROOF STEP]
show "(\<lambda>k. if x \<in> ?U k then ?D x else 0) \<longlonglongrightarrow> (if x \<in> (\<Union>n. F n) then ?D x else 0)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. if x \<in> \<Union> (F ` {..k}) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0)
[PROOF STEP]
proof clarsimp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. x \<in> F xa \<Longrightarrow> (\<lambda>k. if \<exists>xa\<in>{..k}. x \<in> F xa then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. x \<in> F xa \<Longrightarrow> (\<lambda>k. if \<exists>xa\<in>{..k}. x \<in> F xa then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)
[PROOF STEP]
assume "x \<in> F n"
[PROOF STATE]
proof (state)
this:
x \<in> F n

goal (1 subgoal):
 1. \<And>xa. x \<in> F xa \<Longrightarrow> (\<lambda>k. if \<exists>xa\<in>{..k}. x \<in> F xa then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)
[PROOF STEP]
show "(\<lambda>m. if \<exists>j\<in>{..m}. x \<in> F j then ?D x else 0) \<longlonglongrightarrow> ?D x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>m. if \<exists>j\<in>{..m}. x \<in> F j then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)
[PROOF STEP]
using \<open>x \<in> F n\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> F n

goal (1 subgoal):
 1. (\<lambda>m. if \<exists>j\<in>{..m}. x \<in> F j then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)
[PROOF STEP]
by (auto intro!: tendsto_eventually eventually_sequentiallyI [of n])
[PROOF STATE]
proof (state)
this:
(\<lambda>m. if \<exists>j\<in>{..m}. x \<in> F j then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<longlonglongrightarrow> \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>k. if ?x1 \<in> \<Union> (F ` {..k}) then \<bar>det (matrix (g' ?x1))\<bar> *\<^sub>R f (g ?x1) else 0) \<longlonglongrightarrow> (if ?x1 \<in> \<Union> (range F) then \<bar>det (matrix (g' ?x1))\<bar> *\<^sub>R f (g ?x1) else 0)

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> norm (if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) \<le> (if x \<in> \<Union> (range F) then norm (\<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) else 0)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) absolutely_integrable_on UNIV

goal (2 subgoals):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
 2. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) absolutely_integrable_on UNIV
[PROOF STEP]
show Dai: "?D absolutely_integrable_on (\<Union>n. F n)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. if x \<in> \<Union> (range F) then \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x) else 0) absolutely_integrable_on UNIV

goal (1 subgoal):
 1. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
[PROOF STEP]
unfolding absolutely_integrable_restrict_UNIV
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)

goal (1 subgoal):
 1. (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F)

goal (1 subgoal):
 1. \<lbrakk>f absolutely_integrable_on (\<Union>x. g ` F x); b = integral (\<Union>x. g ` F x) f\<rbrakk> \<Longrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
show "integral (\<Union>n. F n) ?D = integral ((\<Union>x. g ` F x)) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f
[PROOF STEP]
proof (rule LIMSEQ_unique)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?X \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
 2. ?X \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f
[PROOF STEP]
show "(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f
[PROOF STEP]
by (rule fgU)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>x. g ` F x) f

goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
show "(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union>n. F n) ?D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
unfolding D_int [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. integral (\<Union> (F ` {..n})) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))
[PROOF STEP]
by (rule integral_countable_UN [OF Dai F_leb])
[PROOF STATE]
proof (state)
this:
(\<lambda>n. integral (\<Union>m\<le>n. g ` F m) f) \<longlonglongrightarrow> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = integral (\<Union>x. g ` F x) f

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) absolutely_integrable_on \<Union> (range F) \<and> integral (\<Union> (range F)) (\<lambda>x. \<bar>det (matrix (g' x))\<bar> *\<^sub>R f (g x)) = b) = (f absolutely_integrable_on g ` \<Union> (range F) \<and> integral (g ` \<Union> (range F)) f = b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma comp_top_linorder_matrix:
  fixes f :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  shows "(f \<odot> mtop) (i,j) = (\<Squnion>\<^sub>k f (i,k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<odot> mtop) (i, j) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True}
[PROOF STEP]
apply (unfold times_matrix_def top_matrix_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (case (i, j) of (i, j) \<Rightarrow> sup_monoid.sum (\<lambda>k. f (i, k) * top) {k. True}) = sup_monoid.sum (\<lambda>k. f (i, k)) {k. True}
[PROOF STEP]
by (metis (no_types, lifting) case_prod_conv comp_right_one one_def sup_monoid.sum.cong)


[STATEMENT]
lemma ntcf_lcomp_Hom_NTMap_vdomain[cat_cs_simps]:
  assumes "\<phi> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
interpret \<phi>: is_ntcf \<alpha> \<AA> \<CC> \<FF> \<GG> \<phi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<phi> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<phi> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
unfolding ntcf_lcomp_Hom_def \<phi>.ntcf_NTDGCod
[PROOF STATE]
proof (prove)
using this:
\<phi> : \<FF> \<mapsto>\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,ntcf_id (dghm_id \<CC>)-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>
[PROOF STEP]
by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros)
[PROOF STATE]
proof (state)
this:
\<D>\<^sub>\<circ> (Hom\<^sub>A\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>(\<phi>-,-)\<lparr>NTMap\<rparr>) = (op_cat \<AA> \<times>\<^sub>C \<CC>)\<lparr>Obj\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_mult_less_mono2: "\<lbrakk>(0::real) < z; x < y\<rbrakk> \<Longrightarrow> z * x < z * y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < z; x < y\<rbrakk> \<Longrightarrow> z * x < z * y
[PROOF STEP]
by (metis add_uminus_conv_diff real_less_sum_gt_zero real_mult_order real_sum_gt_zero_less right_diff_distrib')


[STATEMENT]
lemma cor_squared:
  shows "(cor x)\<^sup>2 = cor (x\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cor x)\<^sup>2 = cor (x\<^sup>2)
[PROOF STEP]
by (simp add: power2_eq_square)


[STATEMENT]
lemma p_natpow_closed[simp]:
  fixes n::nat
  shows "(\<pp>[^]n) \<in> (carrier Q\<^sub>p)"
        "(\<pp>[^]n) \<in> (nonzero Q\<^sub>p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<pp> [^] n \<in> carrier Q\<^sub>p &&& \<pp> [^] n \<in> nonzero Q\<^sub>p
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<pp> [^] n \<in> nonzero Q\<^sub>p
[PROOF STEP]
using Qp_nat_pow_nonzero p_nonzero
[PROOF STATE]
proof (prove)
using this:
?x \<in> nonzero Q\<^sub>p \<Longrightarrow> ?x [^] ?n \<in> nonzero Q\<^sub>p
\<pp> \<in> nonzero Q\<^sub>p

goal (1 subgoal):
 1. \<pp> [^] n \<in> nonzero Q\<^sub>p
[PROOF STEP]
by blast


[STATEMENT]
lemma set_mset_mono:
  "A \<subseteq># B \<Longrightarrow> set_mset A \<subseteq> set_mset B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq># B \<Longrightarrow> set_mset A \<subseteq> set_mset B
[PROOF STEP]
by (metis mset_subset_eqD subsetI)


[STATEMENT]
lemma Pd'_Above:
  assumes "Y \<subseteq> above (Pd' (Xd x)) x"
  assumes "Y \<noteq> {}"
  shows "Above (Pd' d) Y \<subseteq> Above (Pd'_tax d) Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Above (Pd' d) Y \<subseteq> Above (Pd'_tax d) Y
[PROOF STEP]
using Pd'_d'_linear assms
[PROOF STATE]
proof (prove)
using this:
Linear_order (Pd' (Xd x))
Y \<subseteq> above (Pd' (Xd x)) x
Y \<noteq> {}

goal (1 subgoal):
 1. Above (Pd' d) Y \<subseteq> Above (Pd'_tax d) Y
[PROOF STEP]
unfolding Above_def Pd'_tax_def above_def order_on_defs
[PROOF STATE]
proof (prove)
using this:
((Refl (Pd' (Xd x)) \<and> trans (Pd' (Xd x))) \<and> antisym (Pd' (Xd x))) \<and> Total (Pd' (Xd x))
Y \<subseteq> {b. (x, b) \<in> Pd' (Xd x)}
Y \<noteq> {}

goal (1 subgoal):
 1. {b \<in> Field (Pd' d). \<forall>a\<in>Y. (a, b) \<in> Pd' d} \<subseteq> {b \<in> Field ((Pd'(Xd x := Restr (Pd' (Xd x)) {b. (x, b) \<in> Pd' (Xd x)})) d). \<forall>a\<in>Y. (a, b) \<in> (Pd'(Xd x := Restr (Pd' (Xd x)) {b. (x, b) \<in> Pd' (Xd x)})) d}
[PROOF STEP]
by (auto simp: Refl_Field_Restr subset_eq elim: transE)


[STATEMENT]
lemma Sup_range_assertion [simp]: "(!!w . p w \<in> assertion) \<Longrightarrow> Sup (range p) \<in> assertion"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>w. p w \<in> assertion) \<Longrightarrow> \<Squnion> range p \<in> assertion
[PROOF STEP]
by (rule Sup_assertion, auto)


[STATEMENT]
lemma one_minus_const_fps_X_power:
  "c \<noteq> 0 \<Longrightarrow> (1 - fps_const c * fps_X) ^ n =
     fps_compose (fps_binomial (of_nat n)) (-fps_const c * fps_X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c \<noteq> (0::'a) \<Longrightarrow> (1 - fps_const c * fps_X) ^ n = fps_binomial (of_nat n) oo - fps_const c * fps_X
[PROOF STEP]
by (subst fps_binomial_of_nat)
     (simp add: fps_compose_power [symmetric] fps_compose_add_distrib fps_const_neg [symmetric]
           del: fps_const_neg)