Section REDUCE.
Variable E : Set.
Variable f : E -> Z.
Fixpoint reduce (q : queue E) : Z :=
match q with
| empty => 0%Z
| input d q' => (reduce q' + f d)%Z
end.
Hypothesis positive_function : forall a : E, (f a > 0)%Z.

Lemma reduce_nil : reduce (empty E) = 0%Z.