proposition: Lemma LE x : L x = ((b - x) / (b - a) * f a + (x - a) / (b - a) * f b)%coqR.
proof: Proof. rewrite /L mulRBr [in LHS]addRA addRAC; congr (_ + _)%coqR. rewrite addR_opp -{1}(mul1R (f a)) -mulRBl; congr (_ * _)%coqR. rewrite -(mulRV (b - a)); last by rewrite subR_eq0'; exact/gtR_eqF. by rewrite -mulRBl -addR_opp oppRB addRA subRK addR_opp. 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