A boundary bound for differences of box sums
ProvedWikipedia.SzemeredisTheorem.abs_boxSum_sub_trimmed_leadditive-combinatoricsgreen-tao-port-8822number-theory
For a finite coordinate type with decidable equality, natural side lengths, and any natural trimming modulus , suppose on the original box. The difference between its original and trimmed box sums has absolute value at most times the cardinality of the removed boundary.
Preamble
/- Mechanically transplanted from https://github.com/plby/lean-proofs.git at 8822f7ddef30fadbd92e1c6ab4ed897af356af5e. Original scopes and proof bytes are oracle-derived. -/ import Definitions.Def_GreenTaoPort_Wikipedia_GreenTao_Sieve_CongruenceAverage import Mathlib.Algebra.GCDMonoid.FinsetLemmas import Mathlib.Algebra.Order.BigOperators.Group.Finset import Mathlib.Data.Fintype.BigOperators import Mathlib.Data.Fintype.Pi import Mathlib.Logic.Equiv.Fin.Basic import Mathlib.Tactic set_option autoImplicit true set_option relaxedAutoImplicit false set_option maxSynthPendingDepth 3 /-! # Congruence averages on finite boxes This file supplies the elementary finite-arithmetic layer used after expanding the Selberg sieve weight. A finite family of divisor moduli is combined by an LCM, while a function depending only on coordinatewise residues is averaged exactly over boxes whose side lengths are multiples of that LCM. There are two equivalent box models: * `natBox side` is the literal finset of natural-valued points satisfying `x i < side i`; * `FiniteBox side` is the finite type `∀ i, Fin (side i)`. The second model makes quotient--remainder reindexing transparent, and `boxSum_eq_sum_natBox` transports its sums back to the literal finset. -/ open Wikipedia.SzemeredisTheorem open scoped BigOperators /-! ## LCM bounds -/ /-! ## Finite boxes -/ /-! ## Coordinatewise periodicity and exact box sums -/ /-! ## Exact means -/ /-! ## Trimming and explicit boundary loss -/
Formal statement
theorem Wikipedia.SzemeredisTheorem.abs_boxSum_sub_trimmed_le {ι : Type*}
[Fintype ι] [DecidableEq ι]
(D : ℕ) (side : ι → ℕ) (F : (ι → ℕ) → ℝ) (B : ℝ)
(hF : ∀ x ∈ natBox side, |F x| ≤ B) :
|boxSum side F - boxSum (trimmedSide D side) F| ≤
((natBox side \ natBox (trimmedSide D side)).card : ℝ) * B := by sorry
Source