Finite arithmetic progressions in a set
DefinitionGreenTaoPort_Wikipedia_GreenTao_ArithmeticProgression_Basicarithmetic-progressionsgreen-tao-port-8822number-theory
Let and let . The predicate for a progression in requires
Here is the initial term, is the common difference, and is the length. A second predicate asserts the existence of such and for the specified length. No positivity condition is imposed on . For , the membership condition is empty, while the step is still required to be positive.
Definition code
import Definitions.Def_GreenTaoPort_Wikipedia_SzemeredisTheorem_Statement import Mathlib.Data.Nat.Prime.Defs import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Algebra.Group.Indicator import Mathlib.Data.Real.Archimedean import Mathlib.Order.LiminfLimsup set_option autoImplicit true set_option relaxedAutoImplicit false set_option maxSynthPendingDepth 3 namespace Wikipedia.SzemeredisTheorem /-- `IsAPIn A k a d` says that the first `k` terms of the natural-number arithmetic progression with initial term `a` and positive step `d` lie in `A`. -/ def IsAPIn (A : Set ℕ) (k a d : ℕ) : Prop := 0 < d ∧ ∀ j : ℕ, j < k → a + d * j ∈ A /-- A set contains an arithmetic progression of the specified length. -/ def ContainsAP (A : Set ℕ) (k : ℕ) : Prop := ∃ a d : ℕ, IsAPIn A k a d end Wikipedia.SzemeredisTheorem
Source