src/HOL/Probability/ex/Koepf_Duermuth_Countermeasure.thy
changeset 61284 2314c2f62eb1
parent 61169 4de9ff3ea29a
child 61609 77b453bd616f
equal deleted inserted replaced
61282:3e578ddef85d 61284:2314c2f62eb1
   469     using conditional_entropy_nonneg[of "t\<circ>OB" fst] by simp
   469     using conditional_entropy_nonneg[of "t\<circ>OB" fst] by simp
   470   also have "\<dots> \<le> log b (real (card ((t\<circ>OB)`msgs)))"
   470   also have "\<dots> \<le> log b (real (card ((t\<circ>OB)`msgs)))"
   471     using entropy_le_card[of "t\<circ>OB", OF simple_distributedI[OF simple_function_finite refl]] by simp
   471     using entropy_le_card[of "t\<circ>OB", OF simple_distributedI[OF simple_function_finite refl]] by simp
   472   also have "\<dots> \<le> log b (real (n + 1)^card observations)"
   472   also have "\<dots> \<le> log b (real (n + 1)^card observations)"
   473     using card_T_bound not_empty
   473     using card_T_bound not_empty
   474     by (auto intro!: log_le simp: card_gt_0_iff power_real_of_nat simp del: real_of_nat_power)
   474     by (auto intro!: log_le simp: card_gt_0_iff power_real_of_nat simp del: real_of_nat_power real_of_nat_Suc)
   475   also have "\<dots> = real (card observations) * log b (real n + 1)"
   475   also have "\<dots> = real (card observations) * log b (real n + 1)"
   476     by (simp add: log_nat_power real_of_nat_Suc)
   476     by (simp add: log_nat_power real_of_nat_Suc)
   477   finally show ?thesis  .
   477   finally show ?thesis  .
   478 qed
   478 qed
   479 
   479