[STATEMENT]
lemma digit_wise_block_additivity:
  fixes c
  defines "b \<equiv> 2 ^ Suc c"
  assumes "nth_digit x (t-1) (2^Suc c) \<exclamdown> c = 0"
      and "nth_digit y (t-1) (2^Suc c) \<exclamdown> c = 0"
      and "k\<le>c"
      and "c>0"
  shows "nth_digit (x+y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have "k < Suc c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k < Suc c
[PROOF STEP]
using `k\<le>c`
[PROOF STATE]
proof (prove)
using this:
k \<le> c

goal (1 subgoal):
 1. k < Suc c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
k < Suc c

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have x: "nth_digit x t b \<exclamdown> k = x \<exclamdown> (Suc c * t + k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_digit x t b \<exclamdown> k = x \<exclamdown> (Suc c * t + k)
[PROOF STEP]
using digit_gen_pow2_reduct[of "k" "Suc c" "x" "t"] b_def `k<Suc c`
[PROOF STATE]
proof (prove)
using this:
k < Suc c \<Longrightarrow> nth_digit x t (2 ^ Suc c) \<exclamdown> k = x \<exclamdown> (Suc c * t + k)
b \<equiv> 2 ^ Suc c
k < Suc c

goal (1 subgoal):
 1. nth_digit x t b \<exclamdown> k = x \<exclamdown> (Suc c * t + k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nth_digit x t b \<exclamdown> k = x \<exclamdown> (Suc c * t + k)

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have y: "nth_digit y t b \<exclamdown> k = y \<exclamdown> (Suc c * t + k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_digit y t b \<exclamdown> k = y \<exclamdown> (Suc c * t + k)
[PROOF STEP]
using digit_gen_pow2_reduct[of "k" "Suc c" "y" "t"] b_def `k<Suc c`
[PROOF STATE]
proof (prove)
using this:
k < Suc c \<Longrightarrow> nth_digit y t (2 ^ Suc c) \<exclamdown> k = y \<exclamdown> (Suc c * t + k)
b \<equiv> 2 ^ Suc c
k < Suc c

goal (1 subgoal):
 1. nth_digit y t b \<exclamdown> k = y \<exclamdown> (Suc c * t + k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nth_digit y t b \<exclamdown> k = y \<exclamdown> (Suc c * t + k)

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have "(nth_digit x t b + nth_digit y t b) \<exclamdown> k
      = ((nth_digit x t b) \<exclamdown> k + (nth_digit y t b) \<exclamdown> k
      + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (nth_digit x t b + nth_digit y t b) \<exclamdown> k = (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2
[PROOF STEP]
using sum_digit_formula[of "nth_digit x t b" "nth_digit y t b" "k"]
[PROOF STATE]
proof (prove)
using this:
(nth_digit x t b + nth_digit y t b) \<exclamdown> k = (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2

goal (1 subgoal):
 1. (nth_digit x t b + nth_digit y t b) \<exclamdown> k = (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(nth_digit x t b + nth_digit y t b) \<exclamdown> k = (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(nth_digit x t b + nth_digit y t b) \<exclamdown> k = (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have "... = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k)
      + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2
[PROOF STEP]
using x y
[PROOF STATE]
proof (prove)
using this:
nth_digit x t b \<exclamdown> k = x \<exclamdown> (Suc c * t + k)
nth_digit y t b \<exclamdown> k = y \<exclamdown> (Suc c * t + k)

goal (1 subgoal):
 1. (nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(nth_digit x t b \<exclamdown> k + nth_digit y t b \<exclamdown> k + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have "... = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k)
      + bin_carry x y (Suc c * t + k)) mod 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2
[PROOF STEP]
using carry_gen_pow2_reduct[of "c" "x" "t" "y" "k"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < c; nth_digit x (t - 1) (2 ^ Suc c) \<exclamdown> c = 0; nth_digit y (t - 1) (2 ^ Suc c) \<exclamdown> c = 0; k \<le> c\<rbrakk> \<Longrightarrow> bin_carry (nth_digit x t (2 ^ Suc c)) (nth_digit y t (2 ^ Suc c)) k = bin_carry x y (Suc c * t + k)
b \<equiv> 2 ^ Suc c
nth_digit x (t - 1) (2 ^ Suc c) \<exclamdown> c = 0
nth_digit y (t - 1) (2 ^ Suc c) \<exclamdown> c = 0
k \<le> c
0 < c

goal (1 subgoal):
 1. (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry (nth_digit x t b) (nth_digit y t b) k) mod 2 = (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have "... = (x + y) \<exclamdown> (Suc c * t + k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2 = (x + y) \<exclamdown> (Suc c * t + k)
[PROOF STEP]
using sum_digit_formula
[PROOF STATE]
proof (prove)
using this:
(?a + ?b) \<exclamdown> ?k = (?a \<exclamdown> ?k + ?b \<exclamdown> ?k + bin_carry ?a ?b ?k) mod 2

goal (1 subgoal):
 1. (x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2 = (x + y) \<exclamdown> (Suc c * t + k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2 = (x + y) \<exclamdown> (Suc c * t + k)

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<exclamdown> (Suc c * t + k) + y \<exclamdown> (Suc c * t + k) + bin_carry x y (Suc c * t + k)) mod 2 = (x + y) \<exclamdown> (Suc c * t + k)

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
have "... = nth_digit (x+y) t b \<exclamdown> k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x + y) \<exclamdown> (Suc c * t + k) = nth_digit (x + y) t b \<exclamdown> k
[PROOF STEP]
using digit_gen_pow2_reduct[of "k" "Suc c" "x+y" "t"] b_def `k<Suc c`
[PROOF STATE]
proof (prove)
using this:
k < Suc c \<Longrightarrow> nth_digit (x + y) t (2 ^ Suc c) \<exclamdown> k = (x + y) \<exclamdown> (Suc c * t + k)
b \<equiv> 2 ^ Suc c
k < Suc c

goal (1 subgoal):
 1. (x + y) \<exclamdown> (Suc c * t + k) = nth_digit (x + y) t b \<exclamdown> k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x + y) \<exclamdown> (Suc c * t + k) = nth_digit (x + y) t b \<exclamdown> k

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(nth_digit x t b + nth_digit y t b) \<exclamdown> k = nth_digit (x + y) t b \<exclamdown> k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(nth_digit x t b + nth_digit y t b) \<exclamdown> k = nth_digit (x + y) t b \<exclamdown> k

goal (1 subgoal):
 1. nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nth_digit (x + y) t b \<exclamdown> k = (nth_digit x t b + nth_digit y t b) \<exclamdown> k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bilinear_cross7: "bilinear (\<times>\<^sub>7)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bilinear (\<times>\<^sub>7)
[PROOF STEP]
apply (auto simp add: bilinear_def linear_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) ((\<times>\<^sub>7) x)
 2. \<And>y. Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. x \<times>\<^sub>7 y)
[PROOF STEP]
apply unfold_locales
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x b1 b2. x \<times>\<^sub>7 (b1 + b2) = x \<times>\<^sub>7 b1 + x \<times>\<^sub>7 b2
 2. \<And>x r b. x \<times>\<^sub>7 (r *\<^sub>R b) = r *\<^sub>R x \<times>\<^sub>7 b
 3. \<And>y b1 b2. (b1 + b2) \<times>\<^sub>7 y = b1 \<times>\<^sub>7 y + b2 \<times>\<^sub>7 y
 4. \<And>y r b. (r *\<^sub>R b) \<times>\<^sub>7 y = r *\<^sub>R b \<times>\<^sub>7 y
[PROOF STEP]
apply (simp_all add: cross7_add_right cross7_mult_right cross7_add_left cross7_mult_left)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma integral_by_parts_integrable:
  fixes f g F G::"real \<Rightarrow> real"
  assumes "a \<le> b"
  assumes cont_f[intro]: "!!x. a \<le>x \<Longrightarrow> x\<le>b \<Longrightarrow> isCont f x"
  assumes cont_g[intro]: "!!x. a \<le>x \<Longrightarrow> x\<le>b \<Longrightarrow> isCont g x"
  assumes [intro]: "!!x. DERIV F x :> f x"
  assumes [intro]: "!!x. DERIV G x :> g x"
  shows  "integrable lborel (\<lambda>x.((F x) * (g x) + (f x) * (G x)) * indicator {a .. b} x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable lborel (\<lambda>x. (F x * g x + f x * G x) * indicat_real {a..b} x)
[PROOF STEP]
by (auto intro!: borel_integrable_atLeastAtMost continuous_intros) (auto intro!: DERIV_isCont)


[STATEMENT]
lemma Re_sin: "Re(sin z) = sin(Re z) * (exp(Im z) + exp(-(Im z))) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re (sin z) = sin (Re z) * (exp (Im z) + exp (- Im z)) / 2
[PROOF STEP]
by (simp add: sin_exp_eq field_simps Re_divide Im_exp)


[STATEMENT]
lemma [code abstract]:
    "Rep_FingerTree (lcons a t) = (FingerTreeStruc.lcons a (Rep_FingerTree t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Rep_FingerTree (lcons a t) = FingerTreeStruc.lcons a (Rep_FingerTree t)
[PROOF STEP]
by (simp add: lcons_def FingerTreeStruc.lcons_correct)


[STATEMENT]
lemma odd_distinct:
  assumes "\<And>i. p i \<noteq> 0 \<Longrightarrow> odd i"
  shows "odd_of_distinct (distinct_of_odd p) = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd_of_distinct (distinct_of_odd p) = p
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p ?i \<noteq> 0 \<Longrightarrow> odd ?i

goal (1 subgoal):
 1. odd_of_distinct (distinct_of_odd p) = p
[PROOF STEP]
unfolding odd_of_distinct_def distinct_of_odd_def
[PROOF STATE]
proof (prove)
using this:
p ?i \<noteq> 0 \<Longrightarrow> odd ?i

goal (1 subgoal):
 1. (\<lambda>i. if odd i then sum ((^) 2) {j. (if index (2 ^ j * i) \<in> bitset (p (oddpart (2 ^ j * i))) then 1 else 0) = 1} else 0) = p
[PROOF STEP]
by (auto simp add: fun_eq_iff index_oddpart sum_bitset)


[STATEMENT]
lemma (in finite_measure) split_space_into_finite_sets_and_rest:
  assumes ac: "absolutely_continuous M N" and sets_eq[simp]: "sets N = sets M"
  shows "\<exists>B::nat\<Rightarrow>'a set. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. N (B i) \<noteq> \<infinity>) \<and>
    (\<forall>A\<in>sets M. A \<inter> (\<Union>i. B i) = {} \<longrightarrow> (emeasure M A = 0 \<and> N A = 0) \<or> (emeasure M A > 0 \<and> N A = \<infinity>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
let ?Q = "{Q\<in>sets M. N Q \<noteq> \<infinity>}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
let ?a = "SUP Q\<in>?Q. emeasure M Q"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have "{} \<in> ?Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {} \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{} \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{} \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
have Q_not_empty: "?Q \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
{} \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>} \<noteq> {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{Q \<in> sets M. emeasure N Q \<noteq> \<infinity>} \<noteq> {}

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have "?a \<le> emeasure M (space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> emeasure M (space M)
[PROOF STEP]
using sets.sets_into_space
[PROOF STATE]
proof (prove)
using this:
?x \<in> sets ?M \<Longrightarrow> ?x \<subseteq> space ?M

goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> emeasure M (space M)
[PROOF STEP]
by (auto intro!: SUP_least emeasure_mono)
[PROOF STATE]
proof (state)
this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> emeasure M (space M)

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> emeasure M (space M)
[PROOF STEP]
have "?a \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> emeasure M (space M)

goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<noteq> \<infinity>
[PROOF STEP]
using finite_emeasure_space
[PROOF STATE]
proof (prove)
using this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> emeasure M (space M)
emeasure M (space M) \<noteq> top

goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<noteq> \<infinity>
[PROOF STEP]
by (auto simp: less_top[symmetric] top_unique simp del: SUP_eq_top_iff Sup_eq_top_iff)
[PROOF STATE]
proof (state)
this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<noteq> \<infinity>

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
from ennreal_SUP_countable_SUP [OF Q_not_empty, of "emeasure M"]
[PROOF STATE]
proof (chain)
picking this:
\<exists>f. range f \<subseteq> emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>} \<and> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range f)
[PROOF STEP]
obtain Q'' where "range Q'' \<subseteq> emeasure M ` ?Q" and a: "?a = (SUP i::nat. Q'' i)"
[PROOF STATE]
proof (prove)
using this:
\<exists>f. range f \<subseteq> emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>} \<and> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range f)

goal (1 subgoal):
 1. (\<And>Q''. \<lbrakk>range Q'' \<subseteq> emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}; Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range Q'')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range Q'' \<subseteq> emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range Q'')

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
range Q'' \<subseteq> emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range Q'')
[PROOF STEP]
have "\<forall>i. \<exists>Q'. Q'' i = emeasure M Q' \<and> Q' \<in> ?Q"
[PROOF STATE]
proof (prove)
using this:
range Q'' \<subseteq> emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range Q'')

goal (1 subgoal):
 1. \<forall>i. \<exists>Q'. Q'' i = emeasure M Q' \<and> Q' \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i. \<exists>Q'. Q'' i = emeasure M Q' \<and> Q' \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
from choice[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<exists>f. \<forall>x. Q'' x = emeasure M (f x) \<and> f x \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
obtain Q' where Q': "\<And>i. Q'' i = emeasure M (Q' i)" "\<And>i. Q' i \<in> ?Q"
[PROOF STATE]
proof (prove)
using this:
\<exists>f. \<forall>x. Q'' x = emeasure M (f x) \<and> f x \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. (\<And>Q'. \<lbrakk>\<And>i. Q'' i = emeasure M (Q' i); \<And>i. Q' i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
have a_Lim: "?a = (SUP i. emeasure M (Q' i))"
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = (SUP i. emeasure M (Q' i))
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = Sup (range Q'')

goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = (SUP i. emeasure M (Q' i))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = (SUP i. emeasure M (Q' i))

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
let ?O = "\<lambda>n. \<Union>i\<le>n. Q' i"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have Union: "(SUP i. emeasure M (?O i)) = emeasure M (\<Union>i. ?O i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i. emeasure M (\<Union> (Q' ` {..i}))) = emeasure M (\<Union>i. \<Union> (Q' ` {..i}))
[PROOF STEP]
proof (rule SUP_emeasure_incseq[of ?O])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. range (\<lambda>i. \<Union> (Q' ` {..i})) \<subseteq> sets M
 2. incseq (\<lambda>i. \<Union> (Q' ` {..i}))
[PROOF STEP]
show "range ?O \<subseteq> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>n. \<Union> (Q' ` {..n})) \<subseteq> sets M
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. range (\<lambda>n. \<Union> (Q' ` {..n})) \<subseteq> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range (\<lambda>n. \<Union> (Q' ` {..n})) \<subseteq> sets M

goal (1 subgoal):
 1. incseq (\<lambda>i. \<Union> (Q' ` {..i}))
[PROOF STEP]
show "incseq ?O"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. incseq (\<lambda>n. \<Union> (Q' ` {..n}))
[PROOF STEP]
by (fastforce intro!: incseq_SucI)
[PROOF STATE]
proof (state)
this:
incseq (\<lambda>n. \<Union> (Q' ` {..n}))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(SUP i. emeasure M (\<Union> (Q' ` {..i}))) = emeasure M (\<Union>i. \<Union> (Q' ` {..i}))

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have Q'_sets[measurable]: "\<And>i. Q' i \<in> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. Q' i \<in> sets M
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<And>i. Q' i \<in> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Q' ?i \<in> sets M

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have O_sets: "\<And>i. ?O i \<in> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<Union> (Q' ` {..i}) \<in> sets M
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<And>i. \<Union> (Q' ` {..i}) \<in> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Union> (Q' ` {..?i}) \<in> sets M

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> (Q' ` {..?i}) \<in> sets M
[PROOF STEP]
have O_in_G: "\<And>i. ?O i \<in> ?Q"
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..?i}) \<in> sets M

goal (1 subgoal):
 1. \<And>i. \<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
proof (safe del: notI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
 2. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
 2. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
have "Q' ` {..i} \<subseteq> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q' ` {..i} \<subseteq> sets M
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. Q' ` {..i} \<subseteq> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Q' ` {..i} \<subseteq> sets M

goal (2 subgoals):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
 2. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Q' ` {..i} \<subseteq> sets M
[PROOF STEP]
have "N (?O i) \<le> (\<Sum>i\<le>i. N (Q' i))"
[PROOF STATE]
proof (prove)
using this:
Q' ` {..i} \<subseteq> sets M

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i})) \<le> (\<Sum>i\<le>i. emeasure N (Q' i))
[PROOF STEP]
by (simp add: emeasure_subadditive_finite)
[PROOF STATE]
proof (state)
this:
emeasure N (\<Union> (Q' ` {..i})) \<le> (\<Sum>i\<le>i. emeasure N (Q' i))

goal (2 subgoals):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
 2. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure N (\<Union> (Q' ` {..i})) \<le> (\<Sum>i\<le>i. emeasure N (Q' i))

goal (2 subgoals):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
 2. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
have "\<dots> < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<le>i. emeasure N (Q' i)) < \<infinity>
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. (\<Sum>i\<le>i. emeasure N (Q' i)) < \<infinity>
[PROOF STEP]
by (simp add: less_top)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<le>i. emeasure N (Q' i)) < \<infinity>

goal (2 subgoals):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
 2. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure N (\<Union> (Q' ` {..i})) < \<infinity>
[PROOF STEP]
show "N (?O i) \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
emeasure N (\<Union> (Q' ` {..i})) < \<infinity>

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure N (\<Union> (Q' ` {..i})) \<noteq> \<infinity>

goal (1 subgoal):
 1. \<And>i. (\<And>i. \<Union> (Q' ` {..i}) \<in> sets M) \<Longrightarrow> \<Union> (Q' ` {..i}) \<in> sets M
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
\<Union> (Q' ` {..?i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have O_mono: "\<And>n. ?O n \<subseteq> ?O (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<Union> (Q' ` {..n}) \<subseteq> \<Union> (Q' ` {..Suc n})
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<Union> (Q' ` {..?n}) \<subseteq> \<Union> (Q' ` {..Suc ?n})

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have a_eq: "?a = emeasure M (\<Union>i. ?O i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = emeasure M (\<Union>i. \<Union> (Q' ` {..i}))
[PROOF STEP]
unfolding Union[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = (SUP i. emeasure M (\<Union> (Q' ` {..i})))
[PROOF STEP]
proof (rule antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> (SUP i. emeasure M (\<Union> (Q' ` {..i})))
 2. (SUP i. emeasure M (\<Union> (Q' ` {..i}))) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
show "?a \<le> (SUP i. emeasure M (?O i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> (SUP i. emeasure M (\<Union> (Q' ` {..i})))
[PROOF STEP]
unfolding a_Lim
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i. emeasure M (Q' i)) \<le> (SUP i. emeasure M (\<Union> (Q' ` {..i})))
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. (SUP i. emeasure M (Q' i)) \<le> (SUP i. emeasure M (\<Union> (Q' ` {..i})))
[PROOF STEP]
by (auto intro!: SUP_mono emeasure_mono)
[PROOF STATE]
proof (state)
this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) \<le> (SUP i. emeasure M (\<Union> (Q' ` {..i})))

goal (1 subgoal):
 1. (SUP i. emeasure M (\<Union> (Q' ` {..i}))) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
show "(SUP i. emeasure M (?O i)) \<le> ?a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i. emeasure M (\<Union> (Q' ` {..i}))) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
proof (safe intro!: Sup_mono, unfold bex_simps)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a i. i \<in> UNIV \<Longrightarrow> \<exists>x. (x \<in> sets M \<and> emeasure N x \<noteq> \<infinity>) \<and> emeasure M (\<Union> (Q' ` {..i})) \<le> emeasure M x
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a i. i \<in> UNIV \<Longrightarrow> \<exists>x. (x \<in> sets M \<and> emeasure N x \<noteq> \<infinity>) \<and> emeasure M (\<Union> (Q' ` {..i})) \<le> emeasure M x
[PROOF STEP]
have *: "(\<Union>(Q' ` {..i})) = ?O i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (Q' ` {..i}) = \<Union> (Q' ` {..i})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Union> (Q' ` {..i}) = \<Union> (Q' ` {..i})

goal (1 subgoal):
 1. \<And>a i. i \<in> UNIV \<Longrightarrow> \<exists>x. (x \<in> sets M \<and> emeasure N x \<noteq> \<infinity>) \<and> emeasure M (\<Union> (Q' ` {..i})) \<le> emeasure M x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> (Q' ` {..i}) = \<Union> (Q' ` {..i})
[PROOF STEP]
show "\<exists>x. (x \<in> sets M \<and> N x \<noteq> \<infinity>) \<and>
        emeasure M (\<Union>(Q' ` {..i})) \<le> emeasure M x"
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) = \<Union> (Q' ` {..i})

goal (1 subgoal):
 1. \<exists>x. (x \<in> sets M \<and> emeasure N x \<noteq> \<infinity>) \<and> emeasure M (\<Union> (Q' ` {..i})) \<le> emeasure M x
[PROOF STEP]
using O_in_G[of i]
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) = \<Union> (Q' ` {..i})
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<exists>x. (x \<in> sets M \<and> emeasure N x \<noteq> \<infinity>) \<and> emeasure M (\<Union> (Q' ` {..i})) \<le> emeasure M x
[PROOF STEP]
by (auto intro!: exI[of _ "?O i"])
[PROOF STATE]
proof (state)
this:
\<exists>x. (x \<in> sets M \<and> emeasure N x \<noteq> \<infinity>) \<and> emeasure M (\<Union> (Q' ` {..i})) \<le> emeasure M x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(SUP i. emeasure M (\<Union> (Q' ` {..i}))) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}) = emeasure M (\<Union>i. \<Union> (Q' ` {..i}))

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
let ?O_0 = "(\<Union>i. ?O i)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have "?O_0 \<in> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>i. \<Union> (Q' ` {..i})) \<in> sets M
[PROOF STEP]
using Q'
[PROOF STATE]
proof (prove)
using this:
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. (\<Union>i. \<Union> (Q' ` {..i})) \<in> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Union>i. \<Union> (Q' ` {..i})) \<in> sets M

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
have "disjointed Q' i \<in> sets M" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjointed Q' i \<in> sets M
[PROOF STEP]
using sets.range_disjointed_sets[of Q' M]
[PROOF STATE]
proof (prove)
using this:
range Q' \<subseteq> sets M \<Longrightarrow> range (disjointed Q') \<subseteq> sets M

goal (1 subgoal):
 1. disjointed Q' i \<in> sets M
[PROOF STEP]
using Q'_sets
[PROOF STATE]
proof (prove)
using this:
range Q' \<subseteq> sets M \<Longrightarrow> range (disjointed Q') \<subseteq> sets M
Q' ?i \<in> sets M

goal (1 subgoal):
 1. disjointed Q' i \<in> sets M
[PROOF STEP]
by (auto simp: subset_eq)
[PROOF STATE]
proof (state)
this:
disjointed Q' ?i \<in> sets M

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
note Q_sets = this
[PROOF STATE]
proof (state)
this:
disjointed Q' ?i \<in> sets M

goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)
[PROOF STEP]
proof (intro bexI exI conjI ballI impI allI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. disjoint_family ?B
 2. range ?B \<subseteq> sets M
 3. \<And>i. emeasure N (?B i) \<noteq> \<infinity>
 4. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range ?B) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
show "disjoint_family (disjointed Q')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint_family (disjointed Q')
[PROOF STEP]
by (rule disjoint_family_disjointed)
[PROOF STATE]
proof (state)
this:
disjoint_family (disjointed Q')

goal (3 subgoals):
 1. range (disjointed Q') \<subseteq> sets M
 2. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
 3. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
show "range (disjointed Q') \<subseteq> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (disjointed Q') \<subseteq> sets M
[PROOF STEP]
using Q'_sets
[PROOF STATE]
proof (prove)
using this:
Q' ?i \<in> sets M

goal (1 subgoal):
 1. range (disjointed Q') \<subseteq> sets M
[PROOF STEP]
by (intro sets.range_disjointed_sets) auto
[PROOF STATE]
proof (state)
this:
range (disjointed Q') \<subseteq> sets M

goal (2 subgoals):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
 2. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
range (disjointed Q') \<subseteq> sets M

goal (2 subgoals):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
 2. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
fix A
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
 2. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
assume A: "A \<in> sets M" "A \<inter> (\<Union>i. disjointed Q' i) = {}"
[PROOF STATE]
proof (state)
this:
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}

goal (2 subgoals):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
 2. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
[PROOF STEP]
have A1: "A \<inter> (\<Union>i. Q' i) = {}"
[PROOF STATE]
proof (prove)
using this:
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}

goal (1 subgoal):
 1. A \<inter> \<Union> (range Q') = {}
[PROOF STEP]
unfolding UN_disjointed_eq
[PROOF STATE]
proof (prove)
using this:
A \<in> sets M
A \<inter> \<Union> (range Q') = {}

goal (1 subgoal):
 1. A \<inter> \<Union> (range Q') = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<inter> \<Union> (range Q') = {}

goal (2 subgoals):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
 2. \<And>A. \<lbrakk>A \<in> sets M; A \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
show "emeasure M A = 0 \<and> N A = 0 \<or> 0 < emeasure M A \<and> N A = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>
[PROOF STEP]
proof (rule disjCI, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. emeasure M A = 0 \<or> emeasure N A \<noteq> top \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
assume *: "emeasure M A = 0 \<or> N A \<noteq> top"
[PROOF STATE]
proof (state)
this:
emeasure M A = 0 \<or> emeasure N A \<noteq> top

goal (1 subgoal):
 1. emeasure M A = 0 \<or> emeasure N A \<noteq> top \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
show "emeasure M A = 0 \<and> N A = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
proof (cases "emeasure M A = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. emeasure M A = 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
 2. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
emeasure M A = 0

goal (2 subgoals):
 1. emeasure M A = 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
 2. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
with ac A
[PROOF STATE]
proof (chain)
picking this:
absolutely_continuous M N
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
emeasure M A = 0
[PROOF STEP]
have "N A = 0"
[PROOF STATE]
proof (prove)
using this:
absolutely_continuous M N
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
emeasure M A = 0

goal (1 subgoal):
 1. emeasure N A = 0
[PROOF STEP]
unfolding absolutely_continuous_def
[PROOF STATE]
proof (prove)
using this:
null_sets M \<subseteq> null_sets N
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
emeasure M A = 0

goal (1 subgoal):
 1. emeasure N A = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
emeasure N A = 0

goal (2 subgoals):
 1. emeasure M A = 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
 2. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
with True
[PROOF STATE]
proof (chain)
picking this:
emeasure M A = 0
emeasure N A = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
emeasure M A = 0
emeasure N A = 0

goal (1 subgoal):
 1. emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M A = 0 \<and> emeasure N A = 0

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
emeasure M A \<noteq> 0

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
emeasure M A = 0 \<or> emeasure N A \<noteq> top
emeasure M A \<noteq> 0
[PROOF STEP]
have "N A \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
emeasure M A = 0 \<or> emeasure N A \<noteq> top
emeasure M A \<noteq> 0

goal (1 subgoal):
 1. emeasure N A \<noteq> \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
emeasure N A \<noteq> \<infinity>

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
with A
[PROOF STATE]
proof (chain)
picking this:
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
emeasure N A \<noteq> \<infinity>
[PROOF STEP]
have "emeasure M ?O_0 + emeasure M A = emeasure M (?O_0 \<union> A)"
[PROOF STATE]
proof (prove)
using this:
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
emeasure N A \<noteq> \<infinity>

goal (1 subgoal):
 1. emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A = emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A)
[PROOF STEP]
using Q' A1
[PROOF STATE]
proof (prove)
using this:
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
emeasure N A \<noteq> \<infinity>
Q'' ?i = emeasure M (Q' ?i)
Q' ?i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
A \<inter> \<Union> (range Q') = {}

goal (1 subgoal):
 1. emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A = emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A)
[PROOF STEP]
by (auto intro!: plus_emeasure simp: set_eq_iff)
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A = emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A)

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A = emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A)

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
have "\<dots> = (SUP i. emeasure M (?O i \<union> A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A) = (SUP i. emeasure M (\<Union> (Q' ` {..i}) \<union> A))
[PROOF STEP]
proof (rule SUP_emeasure_incseq[of "\<lambda>i. ?O i \<union> A", symmetric, simplified])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. range (\<lambda>i. \<Union> (Q' ` {..i}) \<union> A) \<subseteq> sets M
 2. incseq (\<lambda>i. \<Union> (Q' ` {..i}) \<union> A)
[PROOF STEP]
show "range (\<lambda>i. ?O i \<union> A) \<subseteq> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>i. \<Union> (Q' ` {..i}) \<union> A) \<subseteq> sets M
[PROOF STEP]
using \<open>N A \<noteq> \<infinity>\<close> O_sets A
[PROOF STATE]
proof (prove)
using this:
emeasure N A \<noteq> \<infinity>
\<Union> (Q' ` {..?i}) \<in> sets M
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}

goal (1 subgoal):
 1. range (\<lambda>i. \<Union> (Q' ` {..i}) \<union> A) \<subseteq> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range (\<lambda>i. \<Union> (Q' ` {..i}) \<union> A) \<subseteq> sets M

goal (1 subgoal):
 1. incseq (\<lambda>i. \<Union> (Q' ` {..i}) \<union> A)
[PROOF STEP]
qed (fastforce intro!: incseq_SucI)
[PROOF STATE]
proof (state)
this:
emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A) = (SUP i. emeasure M (\<Union> (Q' ` {..i}) \<union> A))

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M ((\<Union>i. \<Union> (Q' ` {..i})) \<union> A) = (SUP i. emeasure M (\<Union> (Q' ` {..i}) \<union> A))

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
have "\<dots> \<le> ?a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i. emeasure M (\<Union> (Q' ` {..i}) \<union> A)) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
proof (safe intro!: SUP_least)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> UNIV \<Longrightarrow> emeasure M (\<Union> (Q' ` {..i}) \<union> A) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> UNIV \<Longrightarrow> emeasure M (\<Union> (Q' ` {..i}) \<union> A) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
have "?O i \<union> A \<in> ?Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (Q' ` {..i}) \<union> A \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
proof (safe del: notI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<Union> (Q' ` {..i}) \<union> A \<in> sets M
 2. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<noteq> \<infinity>
[PROOF STEP]
show "?O i \<union> A \<in> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (Q' ` {..i}) \<union> A \<in> sets M
[PROOF STEP]
using O_sets A
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..?i}) \<in> sets M
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}

goal (1 subgoal):
 1. \<Union> (Q' ` {..i}) \<union> A \<in> sets M
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Union> (Q' ` {..i}) \<union> A \<in> sets M

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<noteq> \<infinity>
[PROOF STEP]
from O_in_G[of i]
[PROOF STATE]
proof (chain)
picking this:
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
have "N (?O i \<union> A) \<le> N (?O i) + N A"
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A
[PROOF STEP]
using emeasure_subadditive[of "?O i" N A] A O_sets
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
\<lbrakk>\<Union> (Q' ` {..i}) \<in> sets N; A \<in> sets N\<rbrakk> \<Longrightarrow> emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A
A \<in> sets M
A \<inter> \<Union> (range (disjointed Q')) = {}
\<Union> (Q' ` {..?i}) \<in> sets M

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<noteq> \<infinity>
[PROOF STEP]
with O_in_G[of i]
[PROOF STATE]
proof (chain)
picking this:
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A
[PROOF STEP]
show "N (?O i \<union> A) \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<noteq> \<infinity>
[PROOF STEP]
using \<open>N A \<noteq> \<infinity>\<close>
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<le> emeasure N (\<Union> (Q' ` {..i})) + emeasure N A
emeasure N A \<noteq> \<infinity>

goal (1 subgoal):
 1. emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<noteq> \<infinity>
[PROOF STEP]
by (auto simp: top_unique)
[PROOF STATE]
proof (state)
this:
emeasure N (\<Union> (Q' ` {..i}) \<union> A) \<noteq> \<infinity>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<Union> (Q' ` {..i}) \<union> A \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. \<And>i. i \<in> UNIV \<Longrightarrow> emeasure M (\<Union> (Q' ` {..i}) \<union> A) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Union> (Q' ` {..i}) \<union> A \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}
[PROOF STEP]
show "emeasure M (?O i \<union> A) \<le> ?a"
[PROOF STATE]
proof (prove)
using this:
\<Union> (Q' ` {..i}) \<union> A \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. emeasure M (\<Union> (Q' ` {..i}) \<union> A) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
by (rule SUP_upper)
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (Q' ` {..i}) \<union> A) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(SUP i. emeasure M (\<Union> (Q' ` {..i}) \<union> A)) \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})
[PROOF STEP]
have "emeasure M A = 0"
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A \<le> Sup (emeasure M ` {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>})

goal (1 subgoal):
 1. emeasure M A = 0
[PROOF STEP]
unfolding a_eq
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A \<le> emeasure M (\<Union>i. \<Union> (Q' ` {..i}))

goal (1 subgoal):
 1. emeasure M A = 0
[PROOF STEP]
using measure_nonneg[of M A]
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union>i. \<Union> (Q' ` {..i})) + emeasure M A \<le> emeasure M (\<Union>i. \<Union> (Q' ` {..i}))
0 \<le> Sigma_Algebra.measure M A

goal (1 subgoal):
 1. emeasure M A = 0
[PROOF STEP]
by (simp add: emeasure_eq_measure)
[PROOF STATE]
proof (state)
this:
emeasure M A = 0

goal (1 subgoal):
 1. emeasure M A \<noteq> 0 \<Longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
with \<open>emeasure M A \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
emeasure M A \<noteq> 0
emeasure M A = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
emeasure M A \<noteq> 0
emeasure M A = 0

goal (1 subgoal):
 1. emeasure M A = 0 \<and> emeasure N A = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
emeasure M A = 0 \<and> emeasure N A = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
emeasure M A = 0 \<and> emeasure N A = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>

goal (1 subgoal):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?A2 \<in> sets M; ?A2 \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M ?A2 = 0 \<and> emeasure N ?A2 = 0 \<or> 0 < emeasure M ?A2 \<and> emeasure N ?A2 = \<infinity>

goal (1 subgoal):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lbrakk>?A2 \<in> sets M; ?A2 \<inter> \<Union> (range (disjointed Q')) = {}\<rbrakk> \<Longrightarrow> emeasure M ?A2 = 0 \<and> emeasure N ?A2 = 0 \<or> 0 < emeasure M ?A2 \<and> emeasure N ?A2 = \<infinity>

goal (1 subgoal):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
have "N (disjointed Q' i) \<le> N (Q' i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure N (disjointed Q' i) \<le> emeasure N (Q' i)
[PROOF STEP]
by (auto intro!: emeasure_mono simp: disjointed_def)
[PROOF STATE]
proof (state)
this:
emeasure N (disjointed Q' i) \<le> emeasure N (Q' i)

goal (1 subgoal):
 1. \<And>i. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
emeasure N (disjointed Q' i) \<le> emeasure N (Q' i)
[PROOF STEP]
show "N (disjointed Q' i) \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
emeasure N (disjointed Q' i) \<le> emeasure N (Q' i)

goal (1 subgoal):
 1. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
using Q'(2)[of i]
[PROOF STATE]
proof (prove)
using this:
emeasure N (disjointed Q' i) \<le> emeasure N (Q' i)
Q' i \<in> {Q \<in> sets M. emeasure N Q \<noteq> \<infinity>}

goal (1 subgoal):
 1. emeasure N (disjointed Q' i) \<noteq> \<infinity>
[PROOF STEP]
by (auto simp: top_unique)
[PROOF STATE]
proof (state)
this:
emeasure N (disjointed Q' i) \<noteq> \<infinity>

goal:
No subgoals!
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
emeasure N (disjointed Q' ?i2) \<noteq> \<infinity>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>B. disjoint_family B \<and> range B \<subseteq> sets M \<and> (\<forall>i. emeasure N (B i) \<noteq> \<infinity>) \<and> (\<forall>A\<in>sets M. A \<inter> \<Union> (range B) = {} \<longrightarrow> emeasure M A = 0 \<and> emeasure N A = 0 \<or> 0 < emeasure M A \<and> emeasure N A = \<infinity>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lsc_at_PInfty:
  fixes f :: "'a::metric_space \<Rightarrow> ereal"
  assumes "f x0 = \<infinity>"
  shows "lsc_at x0 f \<longleftrightarrow> continuous (at x0) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lsc_at x0 f = isCont f x0
[PROOF STEP]
unfolding lsc_at_open continuous_at_open
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>S. open S \<and> f x0 \<in> S \<longrightarrow> (\<exists>T. open T \<and> x0 \<in> T \<and> (\<forall>x'\<in>T. f x' \<le> f x0 \<longrightarrow> f x' \<in> S))) = (\<forall>t. open t \<and> f x0 \<in> t \<longrightarrow> (\<exists>s. open s \<and> x0 \<in> s \<and> (\<forall>x'\<in>s. f x' \<in> t)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f x0 = \<infinity>

goal (1 subgoal):
 1. (\<forall>S. open S \<and> f x0 \<in> S \<longrightarrow> (\<exists>T. open T \<and> x0 \<in> T \<and> (\<forall>x'\<in>T. f x' \<le> f x0 \<longrightarrow> f x' \<in> S))) = (\<forall>t. open t \<and> f x0 \<in> t \<longrightarrow> (\<exists>s. open s \<and> x0 \<in> s \<and> (\<forall>x'\<in>s. f x' \<in> t)))
[PROOF STEP]
by auto


[STATEMENT]
lemma path_connected_space_imp_path_component_of:
   "\<lbrakk>path_connected_space X; a \<in> topspace X; b \<in> topspace X\<rbrakk>
        \<Longrightarrow> path_component_of X a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>path_connected_space X; a \<in> topspace X; b \<in> topspace X\<rbrakk> \<Longrightarrow> path_component_of X a b
[PROOF STEP]
by (simp add: path_connected_space_iff_path_component)


[STATEMENT]
lemma (in abelian_group) minus_to_eq :
  assumes "abelian_group G" and "x \<in> carrier G" and "y \<in> carrier G" and "x \<ominus> y = \<zero>"
  shows "x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
by (metis add.inv_solve_right assms(2) assms(3) assms(4) l_zero minus_eq zero_closed)


[STATEMENT]
lemma (in order_topology) order_tendstoD:
  assumes "(f \<longlongrightarrow> y) F"
  shows "a < y \<Longrightarrow> eventually (\<lambda>x. a < f x) F"
    and "y < a \<Longrightarrow> eventually (\<lambda>x. f x < a) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a < y \<Longrightarrow> \<forall>\<^sub>F x in F. a < f x) &&& (y < a \<Longrightarrow> \<forall>\<^sub>F x in F. f x < a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> y) F

goal (1 subgoal):
 1. (a < y \<Longrightarrow> \<forall>\<^sub>F x in F. a < f x) &&& (y < a \<Longrightarrow> \<forall>\<^sub>F x in F. f x < a)
[PROOF STEP]
by (auto simp: order_tendsto_iff)


[STATEMENT]
lemma Brouwer_degree2_eq:
   "(\<And>x. x \<in> topspace(nsphere p) \<Longrightarrow> f x = g x) \<Longrightarrow> Brouwer_degree2 p f = Brouwer_degree2 p g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> topspace (nsphere p) \<Longrightarrow> f x = g x) \<Longrightarrow> Brouwer_degree2 p f = Brouwer_degree2 p g
[PROOF STEP]
unfolding Brouwer_degree2_def Ball_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> topspace (nsphere p) \<Longrightarrow> f x = g x) \<Longrightarrow> (SOME d. \<forall>x. x \<in> carrier (reduced_homology_group (int p) (nsphere p)) \<longrightarrow> hom_induced (int p) (nsphere p) {} (nsphere p) {} f x = x [^]\<^bsub>reduced_homology_group (int p) (nsphere p)\<^esub> d) = (SOME d. \<forall>x. x \<in> carrier (reduced_homology_group (int p) (nsphere p)) \<longrightarrow> hom_induced (int p) (nsphere p) {} (nsphere p) {} g x = x [^]\<^bsub>reduced_homology_group (int p) (nsphere p)\<^esub> d)
[PROOF STEP]
apply (intro Eps_cong all_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>\<And>x. x \<in> topspace (nsphere p) \<Longrightarrow> f x = g x; xa \<in> carrier (reduced_homology_group (int p) (nsphere p))\<rbrakk> \<Longrightarrow> (hom_induced (int p) (nsphere p) {} (nsphere p) {} f xa = xa [^]\<^bsub>reduced_homology_group (int p) (nsphere p)\<^esub> x) = (hom_induced (int p) (nsphere p) {} (nsphere p) {} g xa = xa [^]\<^bsub>reduced_homology_group (int p) (nsphere p)\<^esub> x)
[PROOF STEP]
by (metis (mono_tags, lifting) hom_induced_eq)


[STATEMENT]
lemma fds_nth_mult: "fds_nth (f * g) = dirichlet_prod (fds_nth f) (fds_nth g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (f * g) = dirichlet_prod (fds_nth f) (fds_nth g)
[PROOF STEP]
by (simp add: times_fds_def fds_nth_fds dirichlet_prod_def fun_eq_iff)