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_sigma_but_not_in :
forall l : list E, ~ In x0 l -> sigma E l f = sigma_but l f.