proposition: Lemma is_convex_segmentP (X : set T) : reflect (forall x y, X x -> X y -> (segment x y `<=` X)%classic) (is_convex_set X).
proof: Proof. apply: (iffP idP) => conv. by move=> x y xX yX z [p _ <-]; move/asboolP : conv; apply. by apply/asboolP => x y p xX yX; apply: (conv _ _ xX yX); exists p. Qed.
imports: HB(structures) mathcomp(all_ssreflect ssralg fingroup perm matrix) mathcomp(mathcomp_extra boolp classical_sets Rstruct) mathcomp(ssrnum ereal) mathcomp(lra Rstruct reals) Reals ssrR Reals_ext Ranalysis_ext ssr_ext ssralg_ext logb realType_ext fdist