Upper truncation of zero-padded order statistics #
Capping every value at a nonnegative threshold caps the positive-order k-th largest value
at the same threshold. Nonnegativity of the cap preserves the zero padding. Input values may
be negative, and the retained cardinality may be smaller than the requested rank.
Main results #
Finset.kthLargest_min: upper truncation commutes with the padded order statistic.
theorem Finset.kthLargest_min {α : Type u_1} {R : Type u_2} [LinearOrder R] [Zero R] {s : Finset α} {k : ℕ} {f : α → R} {t : R} (hk : 0 < k) (ht : 0 ≤ t) :
An upper cap that preserves zero commutes with every positive-order padded rank.