proposition: Lemma Ex_lb (r : R) : r * `Pr[ X >= r] <= `E X.
proof: Proof. rewrite /Ex (bigID [pred a' | (X a' >= r)%mcR]) /= -[a in a <= _]addR0. apply leR_add; last first. by apply/RleP/sumr_ge0 => a _; rewrite mulr_ge0//; exact/RleP/X_ge0. apply (@leR_trans (\sum_(i | (X i >= r)%mcR) r * P i)). by rewrite big_distrr /=; apply/Req_le/eq_bigl => a; rewrite inE. by apply leR_sumR => u Xur; apply/leR_wpmul2r => //; exact/RleP. Qed.
imports: mathcomp(all_ssreflect ssralg ssrnum matrix) mathcomp(Rstruct reals) Reals Lra ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext fdist