End SUM.
Section SIGMA_BUT.
Variable E : Set.
Variable x0 : E.
Hypothesis eq_E_dec : eq_dec E.
Variable f : E -> Z.
Fixpoint sigma_but (l1 : list E) : (E -> Z) -> Z :=
fun f : E -> Z =>
match l1 with
| nil => 0%Z
| e :: l2 =>
if eq_E_dec e x0
then sigma_but l2 f
else (f e + sigma_but l2 f)%Z
end.

Lemma sigma_but_simpl :
forall (l : list E) (f g : E -> Z),
(forall x : E, x <> x0 -> In x l -> f x = g x) ->
sigma_but l f = sigma_but l g.