Fixpoint sigma (l1 : list E) : (E -> Z) -> Z :=
  fun f : E -> Z =>
  match l1 with
  | nil => 0%Z
  | e :: l2 => (f e + sigma l2 f)%Z
  end.

(* Specifications: *)
Lemma sigma_null : forall l : list E, sigma l (fun e : E => 0%Z) = 0%Z.
Lemma sigma_pos : forall (f : E -> Z) (l : list E), (forall x_ : E, (f x_ >= 0)%Z) -> (sigma l f >= 0)%Z.
Lemma le_sigma : forall (l : list E) (f : E -> Z) (x : E), (forall x_ : E, (f x_ >= 0)%Z) -> In x l -> (f x <= sigma l f)%Z.
Lemma sigma_simpl : forall (l : list E) (f g : E -> Z), (forall x : E, In x l -> f x = g x) -> sigma l f = sigma l g.