sorted_tuple
def
For any tuple u : Fin m → ℝ, its sorted tuple is u ∘ Tuple.sort u, which reorders the values of u in nondecreasing order.
Statement
noncomputable def sorted_tuple {m : ℕ} (u : Fin m → ℝ) : Fin m → ℝ
- Defined in
- Mathlib/Data/Fin/Tuple/Sort.lean
- Verified
- 27 Oct 2026
- Axioms
- none listed
- Used by 4
- is_overestimate_predictionPredictions a_hat : Fin n → Fin m → ℝ are overestimates of valuations v : Fin n → Fin m → ℝ with error factor ρ if for every agent i : Fin…
- is_exact_predictionFrequency predictions a_hat : Fin n → Fin m → ℝ are exact for valuations v : Fin n → Fin m → ℝ if for every agent i : Fin n, the sorted…
- not_has_online_alpha_ef1_four_of_gt_oneFor any alpha > 1, there is no deterministic online algorithm guaranteeing an alpha-EF1 allocation for four agents under exact frequency…
- op562_not_consistent_eefx_of_ge_three_halvesFor any number of agents n at least 3 and any error factor rho at least 3/2, no consistent online algorithm can guarantee any positive…
Read back from the Lean
Given a natural number $m$ (implicit) and a tuple of real numbers $u : \mathrm{Fin}\ m \to \mathbb{R}$, sorted_tuple u is defined as the composition $u \circ \mathrm{Tuple.sort}\ u : \mathrm{Fin}\ m \to \mathbb{R}$, which is the tuple $u$ reordered by the sorting permutation Tuple.sort u into non-decreasing order.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The sorted tuple of u : Fin m -> Real in nondecreasing order obtained by composing with Tuple.sort u. -/ noncomputable def sorted_tuple {m : ℕ} (u : Fin m → ℝ) : Fin m → ℝ := u ∘ Tuple.sort u