(* functional or *)
Definition fun_or (pred1 pred2 : E -> bool) (a : E) := pred1 a || pred2 a.(* functional sum *)
Definition fun_sum (f1 f2 : E -> Z) (a : E) := (f1 a + f2 a)%Z.Definition fun_minus (f1 f2 : E -> Z) (a : E) := (f1 a - f2 a)%Z.

Lemma reduce_in_queue_null : forall q : queue E, (forall x : E, In_queue E x q -> f x = 0%Z) -> reduce E f q = 0%Z.