src/HOL/Probability/Information.thy
changeset 39302 d7728f65b353
parent 39198 f967a16dfcdd
child 40859 de0b30e6c2d2
equal deleted inserted replaced
39301:e1bd8a54c40f 39302:d7728f65b353
   503     apply (rule log_setsum')
   503     apply (rule log_setsum')
   504     using not_empty b_gt_1 finite_space sum_over_space_real_distribution
   504     using not_empty b_gt_1 finite_space sum_over_space_real_distribution
   505     by auto
   505     by auto
   506   also have "\<dots> = log b (\<Sum>x\<in>X`space M. if ?d x \<noteq> 0 then 1 else 0)"
   506   also have "\<dots> = log b (\<Sum>x\<in>X`space M. if ?d x \<noteq> 0 then 1 else 0)"
   507     apply (rule arg_cong[where f="\<lambda>f. log b (\<Sum>x\<in>X`space M. f x)"])
   507     apply (rule arg_cong[where f="\<lambda>f. log b (\<Sum>x\<in>X`space M. f x)"])
   508     using distribution_finite[of X] by (auto simp: ext_iff real_of_pinfreal_eq_0)
   508     using distribution_finite[of X] by (auto simp: fun_eq_iff real_of_pinfreal_eq_0)
   509   finally show ?thesis
   509   finally show ?thesis
   510     using finite_space by (auto simp: setsum_cases real_eq_of_nat)
   510     using finite_space by (auto simp: setsum_cases real_eq_of_nat)
   511 qed
   511 qed
   512 
   512 
   513 lemma (in finite_information_space) entropy_uniform_max:
   513 lemma (in finite_information_space) entropy_uniform_max:
   643   let "?dYZ A" = "real (joint_distribution Y Z A)"
   643   let "?dYZ A" = "real (joint_distribution Y Z A)"
   644   let "?dX A" = "real (distribution X A)"
   644   let "?dX A" = "real (distribution X A)"
   645   let "?dZ A" = "real (distribution Z A)"
   645   let "?dZ A" = "real (distribution Z A)"
   646   let ?M = "X ` space M \<times> Y ` space M \<times> Z ` space M"
   646   let ?M = "X ` space M \<times> Y ` space M \<times> Z ` space M"
   647 
   647 
   648   have split_beta: "\<And>f. split f = (\<lambda>x. f (fst x) (snd x))" by (simp add: ext_iff)
   648   have split_beta: "\<And>f. split f = (\<lambda>x. f (fst x) (snd x))" by (simp add: fun_eq_iff)
   649 
   649 
   650   have "- (\<Sum>(x, y, z) \<in> ?M. ?dXYZ {(x, y, z)} *
   650   have "- (\<Sum>(x, y, z) \<in> ?M. ?dXYZ {(x, y, z)} *
   651     log b (?dXYZ {(x, y, z)} / (?dXZ {(x, z)} * ?dYZ {(y,z)} / ?dZ {z})))
   651     log b (?dXYZ {(x, y, z)} / (?dXZ {(x, z)} * ?dYZ {(y,z)} / ?dZ {z})))
   652     \<le> log b (\<Sum>(x, y, z) \<in> ?M. ?dXZ {(x, z)} * ?dYZ {(y,z)} / ?dZ {z})"
   652     \<le> log b (\<Sum>(x, y, z) \<in> ?M. ?dXZ {(x, z)} * ?dYZ {(y,z)} / ?dZ {z})"
   653     unfolding split_beta
   653     unfolding split_beta