Documentation

GaudisCrypt.Lib.EC.StdBigop

EasyCrypt's big operators on bounds (theories/algebra/StdBigop) #

The facts EC's smt() uses on the bounds of fel and seq: a sum over EC's range 0 n (here Finset.Ico (0 : ℤ) n) of a constant, the same sum over ℕ, and a real bound n%r * mu1 d v as an ENNReal (ENNReal.ofReal). None needs 0 ≤ n: for a negative n both sides vanish.

theorem GaudisCrypt.EC.sum_Ico_const (n : ℤ) (c : ENNReal) :
∑ _i ∈ Finset.Ico 0 n, c = ↑n.toNat * c

big predT (fun _ => c) (range 0 n) = n * c.

theorem GaudisCrypt.EC.sum_Ico_toNat (n : ℕ) (f : ℕ → ENNReal) :
∑ i ∈ Finset.Ico 0 ↑n, f i.toNat = ∑ i ∈ Finset.range n, f i

A sum over EC's range 0 n of a function of i, as a sum over ℕ.

theorem GaudisCrypt.EC.ofReal_intCast_mul_mu1 {α : Type} (d : SubProbability α) (v : α) (n : ℤ) :
ENNReal.ofReal (↑n * mu1 d v) = ↑n.toNat * ↑d {v}

n%r * mu1 d v, the real bound, as an ENNReal: n times the mass of v.