NLA-lib Explorer

Finset.sum_le_of_pairwiseDisjoint_Ico

Library · theorem

Pairwise disjoint intervals inside [0, n) use at most n positions in total.

Finset.sum_le_of_pairwiseDisjoint_Ico.{u_1} {ι : Type u_1} (s : Finset ι) {off len : ι → ℕ} {n : ℕ}
  (hdisj : (↑s).PairwiseDisjoint fun i ↦ Finset.Ico (off i) (off i + len i))
  (hbound : ∀ i ∈ s, off i + len i ≤ n) : ∑ i ∈ s, len i ≤ n

Full source on GitHub

Import NLAlib.ForMathlib.Algebra.BigOperators.Intervals.