fact: Fixpoint take_uniform_n' {T} (ls : list T) (len : nat) (n : nat) : list T := match n, ls, List.rev ls with | 0%nat, _, _ => [] | _, [], _ => [] | _, _, [] => [] | 1%nat, x::_, _ => [x] | 2%nat, [x], _ => [x] | 2%nat, x::_, y::_ => [x; y] | S n', x::xs, _ => let skip := Z.to_nat (Qfloor (1/2 + len / n - 1)) in x :: take_uniform_n' (skipn skip xs) (len - 1 - skip) n' end.
imports: Coq.Strings.String Coq.Structures.Orders Coq.micromega.Lia Coq.Bool.Bool Coq.Sorting.Mergesort Coq.QArith.QArith Coq.QArith.Qround Coq.QArith.Qabs Coq.QArith.Qminmax Coq.NArith.NArith Coq.ZArith.ZArith Coq.Arith.Arith Coq.Lists.List PerformanceExperiments.LetIn