proposition: Lemma finite_wlength_itv i : neitv i -> wlength [set` i] < +oo -> wlength [set` i] = (fine (g i.2))%:E - (fine (g i.1))%:E.
proof: Proof. move=> i0 ioo; have [i1f i2f] := wlength_finite_fin_num i0 ioo. rewrite fineK; last first. by rewrite /g; move: i2f; case: (ereal_of_itv_bound i.2). rewrite fineK; last first. by rewrite /g; move: i1f; case: (ereal_of_itv_bound i.1). rewrite wlength_itv; case: ifPn => //; rewrite -leNgt le_eqVlt => /predU1P[->|]. by rewrite subee// /g; move: i1f; case: (ereal_of_itv_bound i.1). by move/lt_ereal_bnd/ltW; rewrite leNgt; move: i0 => /neitvP => ->. Qed.
imports: mathcomp(all_ssreflect ssralg ssrnum ssrint interval) mathcomp(finmap fingroup perm rat) HB(structures) mathcomp.classical(mathcomp_extra boolp classical_sets) mathcomp.classical(functions fsbigop cardinality) reals ereal signed topology numfun normedtype sequences esum real_interval measure realfun