Olson (32): for
ProvedErdos131.sum_card_translate_sdiff_ge_nonzeroLet be an abelian group, let be finite, and let be a finite set of non-zero elements. Write
for the number of points by which the translate sticks out of . Then
This is equation (32) in the proof of Olson's Lemma 3.1 (Acta Arith. 28 (1975), p. 155). Olson writes it as
the point being that the correlation sum is taken over non-zero shifts only, where rather than . For and it gives , which is exactly what Case 1 of Olson's Lemma 3.1 needs; the weaker bound coming from the sum over all of loses a factor and yields only .
Proof idea. Fix . The map is injective and sends into , because forces . Hence , and summing over after exchanging the order of summation bounds by .
Formalisation notes. The statement is written subtraction-free,
C.card * S.card + S.card ≤ S.card * S.card + ∑ c ∈ C, ((S.image fun s => c + s) \ S).card,
because Finset.card lands in and truncated subtraction would change the meaning when ; adding to both sides of Olson's inequality and moving to the right gives the displayed form. The translate is written S.image fun s => c + s, matching the existing infrastructure cards for . No finiteness of is assumed: unlike the averaging form obtained from a sum over the whole group, this count never needs finite, which is what makes it applicable to Olson's Lemma 3.1 where the ambient group may be infinite. Both and are allowed and the inequality is then trivially true.
import Definitions.Def_Erdos131_NonDividing import Mathlib.Tactic open Erdos131
theorem Erdos131.sum_card_translate_sdiff_ge_nonzero {G : Type*} [AddCommGroup G] [DecidableEq G]
(S C : Finset G) (h0 : (0 : G) ∉ C) :
C.card * S.card + S.card
≤ S.card * S.card + ∑ c ∈ C, ((S.image fun s => c + s) \ S).card := by sorry