proposition: Lemma concavity_of_entropy : concave_function_in open_unit_interval H2.
proof: Proof. rewrite /concave_function_in => x y t Hx Hy. apply: RNconcave_function_at. move: t. have Hxy := Rtotal_order x y. wlog : x y Hx Hy Hxy / x < y. move=> H. case: Hxy. by apply H => //; lra. case => [-> t|Hxy' t]; first exact/convex_function_atxx. apply: convex_function_sym => // t0. by apply H => //; left. move=> Hxy' t. exact/R_convex_function_atN /concavity_of_entropy_x_le_y. Qed.
imports: HB(structures) mathcomp(all_ssreflect ssralg ssrnum matrix) mathcomp(mathcomp_extra Rstruct reals) Reals Ranalysis_ext Lra ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext fdist jfdist_cond entropy convex binary_entropy_function log_sum divergence