The integer affine W-trick
DefinitionGreenTaoPort_Wikipedia_GreenTao_Sieve_WTrickedLocalFactorsarithmetic-progressionsgreen-tao-port-8822number-theorysieve-theory
For natural parameters and an integer affine form , its -tricked form is
Thus its constant is and its coefficient at is , with natural parameters cast to integers. The construction itself requires neither nor a coprimality condition on ; those assumptions are supplied when evaluating the later local factors.
Definition code
import Definitions.Def_GreenTaoPort_Wikipedia_GreenTao_Primes_ReducedResidues
import Definitions.Def_GreenTaoPort_Wikipedia_GreenTao_Sieve_ComplexLocalFactorControl
import Definitions.Def_GreenTaoPort_Wikipedia_GreenTao_Sieve_LinearFormsExpansion
import Mathlib.Algebra.BigOperators.Expect
import Mathlib.Algebra.Field.ZMod
import Mathlib.Algebra.GCDMonoid.FinsetLemmas
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Analysis.Calculus.BumpFunction.InnerProduct
import Mathlib.Analysis.Calculus.ContDiff.Deriv
import Mathlib.Analysis.Calculus.Deriv.MeanValue
import Mathlib.Analysis.Calculus.Deriv.Support
import Mathlib.Analysis.Distribution.SchwartzSpace.Fourier
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Analysis.SpecialFunctions.Log.Summable
import Mathlib.Combinatorics.Pigeonhole
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Int.Lemmas
import Mathlib.Data.Nat.GCD.Prime
import Mathlib.Data.Nat.Squarefree
import Mathlib.Data.Nat.Totient
import Mathlib.Data.ZMod.Basic
import Mathlib.Data.ZMod.QuotientRing
import Mathlib.GroupTheory.Index
import Mathlib.LinearAlgebra.Pi
import Mathlib.Logic.Equiv.Fin.Basic
import Mathlib.MeasureTheory.Integral.Bochner.Set
import Mathlib.MeasureTheory.Integral.IntegralEqImproper
import Mathlib.NumberTheory.ArithmeticFunction.Moebius
import Mathlib.NumberTheory.Divisors
import Mathlib.NumberTheory.Primorial
import Mathlib.NumberTheory.SumPrimeReciprocals
import Mathlib.Tactic
set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3
/-!
# Small-prime local factors for W-tricked affine forms
If `ψ` is an integer affine form, the affine form occurring after the
`W`-trick is
`x ↦ W * ψ(x) + b`.
At a prime `p ∣ W` this form is identically `b` modulo `p`. When `b` is a
reduced residue modulo `W`, it is therefore nowhere zero modulo `p`. This
makes every small-prime avoidance factor, including the complex factor
produced by paired Fourier inversion, exactly one.
-/
namespace Wikipedia.SzemeredisTheorem
open scoped BigOperators
/-- The integer affine form obtained from `ψ` by the `W`-trick:
`x ↦ W * ψ(x) + b`. -/
def wTrickedAffineForm {ι : Type*}
(W b : ℕ) (ψ : AffineForm ι ℤ) : AffineForm ι ℤ where
constant := (W : ℤ) * ψ.constant + b
coefficient i := (W : ℤ) * ψ.coefficient i
end Wikipedia.SzemeredisTheorem
Source