Section sum_sum_regroup.
Variable (r n k : nat) (f : nat -> nat)
(Hf1 : forall i, i < n -> f i <= k)
(Hf2 : forall i j, i < j < n -> f i < f j).

Theorem sum_sum_regroup : { g | ∑ n (fun i => ∑ i (fun j => power (f i + f j) r))
= ∑ (2*k) (fun i => g i * power i r)
/\ forall i, g i <= n }.