End SIGMA2_BUT.
Section SIGMA_BUT.
Variable Site : Set.
Hypothesis eq_site_dec : eq_dec Site.
Variable LS0 : list Site.
Variable LS1 : list Site.
Variable LS2 : list Site.
Variable Data : Set.
Let Table := Site -> Data.
Variable t : Table.
Variable s s0 s1 owner : Site.
Variable s2 : Site.
Variable d0 : Data.
Variable f : Site -> Site -> Site -> Data -> Z.
Variable pred : Data -> bool.
Variable
decidable_predicate : forall a : Data, {pred a = true} + {pred a = false}.

(* Specifications: *)
Lemma decidable_pred_pred :
forall a : Data,
{fun_or Data pred pred a = true} + {fun_or Data pred pred a = false}.
Lemma permute_sigma_reduce :
forall q : queue Data,
sigma Site LS0 (fun s : Site => reduce Data (f s s1 s2) q) =
reduce Data (fun d : Data => sigma Site LS0 (fun s : Site => f s s1 s2 d)) q.
Lemma permute_sigma_reduce2 :
forall q : queue Data,
sigma Site LS0 (fun _ : Site => reduce Data (f s s1 s2) q) =
reduce Data (fun d : Data => sigma Site LS0 (fun _ : Site => f s s1 s2 d)) q.
Lemma permute_sigma_but_reduce :
forall q : queue Data,
sigma_but Site owner eq_site_dec LS0
(fun s : Site => reduce Data (f s s1 s2) q) =
reduce Data
(fun d : Data =>
sigma_but Site owner eq_site_dec LS0 (fun s : Site => f s s1 s2 d)) q.
Lemma sigma_but_null :
forall (f : Site -> Z) (l : list Site),
(forall s : Site, s <> owner -> f s = 0%Z) ->
sigma_but Site owner eq_site_dec l f = 0%Z.
Lemma sigma_but_simpl :
forall (f1 f2 : Site -> Z) (l : list Site),
(forall s : Site, s <> owner -> f1 s = f2 s) ->
sigma_but Site owner eq_site_dec l f1 =
sigma_but Site owner eq_site_dec l f2.