(***********************************************************************
**********************************************************************
**********************************************************************

	ITERATED SUMS
*)

Fixpoint sum_nm (n : nat) : nat -> (nat -> nat) -> nat :=
  fun (m : nat) (f : nat -> nat) =>
  match n with
  | O => f m
  | S n' => f m + sum_nm n' (S m) f
  end.

Lemma t_sum_Svars : forall (n k : nat) (f : nat -> nat), sum_nm k n f = sum_nm k (S n) (fun i : nat => f (pred i)).