# HG changeset patch # User paulson # Date 1720555994 -3600 # Node ID 34a5ca6fcdddf8f1962eae26371a429c3861d8c0 # Parent 1dd989a9ad886dd50199876e43ea288e30f8a193 Simplified a few proofs diff -r 1dd989a9ad88 -r 34a5ca6fcddd src/HOL/Probability/Information.thy --- a/src/HOL/Probability/Information.thy Tue Jul 09 16:06:32 2024 +0200 +++ b/src/HOL/Probability/Information.thy Tue Jul 09 21:13:14 2024 +0100 @@ -138,13 +138,10 @@ show "{x\space M. D x \ 1 \ D x \ 0} \ sets M" using D(1) by (auto intro: sets.sets_Collect_conj) - show "AE t in M. t \ {x\space M. D x \ 1 \ D x \ 0} \ - D t - indicator ?D_set t \ D t * (ln b * log b (D t))" - using D(2) - proof (eventually_elim, safe) - fix t assume Dt: "t \ space M" "D t \ 1" "D t \ 0" "0 \ D t" - and eq: "D t - indicator ?D_set t = D t * (ln b * log b (D t))" - + have False + if Dt: "t \ space M" "D t \ 1" "D t \ 0" "0 \ D t" + and eq: "D t - indicator ?D_set t = D t * (ln b * log b (D t))" for t + proof - have "D t - 1 = D t - indicator ?D_set t" using Dt by simp also note eq @@ -156,6 +153,10 @@ from ln_eq_minus_one[OF _ this] \D t \ 0\ \0 \ D t\ \D t \ 1\ show False by auto qed + with D(2) + show "AE t in M. t \ {x\space M. D x \ 1 \ D x \ 0} \ + D t - indicator ?D_set t \ D t * (ln b * log b (D t))" + by fastforce show "AE t in M. D t - indicator ?D_set t \ D t * (ln b * log b (D t))" using D(2) AE_space @@ -1019,7 +1020,7 @@ using that by (subst nn_integral_multc) (auto split: prod.split simp: ennreal_mult[symmetric]) show ?thesis apply (rule nn_integral_cong_AE) - using aeX1 aeX2 aeX3 + using aeX1 aeX3 by (force simp add: space_pair_measure D) qed also have "\ = 1" @@ -1029,22 +1030,24 @@ also have "\ < \" by simp finally have fin: "(\\<^sup>+ x. ?f x \?P) \ \" by simp - have pos: "(\\<^sup>+x. ?f x \?P) \ 0" - apply (subst nn_integral_density) - apply (simp_all add: split_beta') + have "(\\<^sup>+ x. ennreal (Pxyz x) * + ennreal (Pxz (fst x, snd (snd x)) * Pyz (snd x) / (Pz (snd (snd x)) * Pxyz x)) + \(S \\<^sub>M T \\<^sub>M P)) \ 0" proof let ?g = "\x. ennreal (Pxyz x) * (Pxz (fst x, snd (snd x)) * Pyz (snd x) / (Pz (snd (snd x)) * Pxyz x))" assume "(\\<^sup>+x. ?g x \(S \\<^sub>M T \\<^sub>M P)) = 0" then have "AE x in S \\<^sub>M T \\<^sub>M P. ?g x = 0" by (intro nn_integral_0_iff_AE[THEN iffD1]) auto then have "AE x in S \\<^sub>M T \\<^sub>M P. Pxyz x = 0" - using ae1 ae2 ae3 ae4 + using ae2 ae3 ae4 by (auto split: if_split_asm simp: mult_le_0_iff divide_le_0_iff space_pair_measure) then have "(\\<^sup>+ x. ennreal (Pxyz x) \S \\<^sub>M T \\<^sub>M P) = 0" by (subst nn_integral_cong_AE[of _ "\x. 0"]) auto with P.emeasure_space_1 show False by (subst (asm) emeasure_density) (auto cong: nn_integral_cong) qed + then have pos: "(\\<^sup>+x. ?f x \?P) \ 0" + by (subst nn_integral_density) (simp_all add: split_beta') have neg: "(\\<^sup>+ x. - ?f x \?P) = 0" by (subst nn_integral_0_iff_AE) (auto simp: space_pair_measure ennreal_neg) @@ -1084,7 +1087,6 @@ using fin neg by (auto simp: split_beta') have "integrable (S \\<^sub>M T \\<^sub>M P) (\x. Pxyz x * - log b (?f x))" apply (rule integrable_cong_AE[THEN iffD1, OF _ _ _ I3]) - using ae1 ae2 ae3 ae4 by (auto simp: log_mult log_divide field_simps) then show "integrable ?P (\x. - log b (?f x))" @@ -1097,7 +1099,6 @@ apply (force simp: space_pair_measure) apply simp apply (intro integral_cong_AE) - using ae1 ae2 ae3 ae4 by (auto simp: field_simps log_divide) finally show ?nonneg by simp