File: Mathlib/Combinatorics/Additive/Corner/Roth.lean

full_name: _private.Mathlib.Combinatorics.Additive.Corner.Roth.0.Corners.triangleIndices
code: /-- The triangle indices for the proof of the corners theorem construction. -/
private def triangleIndices (A : Finset (G × G)) : Finset (G × G × G) 
goal: Finset (G × G × G)

full_name: _private.Mathlib.Combinatorics.Additive.Corner.Roth.0.Corners.mk_mem_triangleIndices
code: @[simp]
private lemma mk_mem_triangleIndices : (a, b, c) ∈ triangleIndices A ↔ (a, b) ∈ A ∧ c = a + b 
goal: (a, b, c) ∈ Corners.triangleIndices A ↔ (a, b) ∈ A ∧ c = a + b

full_name: _private.Mathlib.Combinatorics.Additive.Corner.Roth.0.Corners.card_triangleIndices
code: @[simp] private lemma card_triangleIndices : (triangleIndices A).card = A.card 
goal: (Corners.triangleIndices A).card = A.card

full_name: _private.Mathlib.Combinatorics.Additive.Corner.Roth.0.Corners.triangleIndices.instExplicitDisjoint
code: private instance triangleIndices.instExplicitDisjoint : ExplicitDisjoint (triangleIndices A) 
goal: SimpleGraph.TripartiteFromTriangles.ExplicitDisjoint (Corners.triangleIndices A)

full_name: _private.Mathlib.Combinatorics.Additive.Corner.Roth.0.Corners.noAccidental
code: private lemma noAccidental (hs : IsCornerFree (A : Set (G × G))) :
    NoAccidental (triangleIndices A) 
goal: SimpleGraph.TripartiteFromTriangles.NoAccidental (Corners.triangleIndices A)

full_name: _private.Mathlib.Combinatorics.Additive.Corner.Roth.0.Corners.farFromTriangleFree_graph
code: private lemma farFromTriangleFree_graph [DecidableEq G] (hε : ε * card G ^ 2 ≤ A.card) :
    (graph <| triangleIndices A).FarFromTriangleFree (ε / 9) 
goal: (SimpleGraph.TripartiteFromTriangles.graph (Corners.triangleIndices A)).FarFromTriangleFree (ε / 9)

full_name: cornersTheoremBound
code: /-- An explicit form for the constant in the corners theorem.

Note that this depends on `SzemerediRegularity.bound`, which is a tower-type exponential. This means
`cornersTheoremBound` is in practice absolutely tiny. -/
noncomputable def cornersTheoremBound (ε : ℝ) : ℕ 
goal: ℕ

full_name: corners_theorem
code: /-- The **corners theorem** for finite abelian groups.

The maximum density of a corner-free set in `G × G` goes to zero as `|G|` tends to infinity. -/
theorem corners_theorem (ε : ℝ) (hε : 0 < ε) (hG : cornersTheoremBound ε ≤ card G)
    (A : Finset (G × G)) (hAε : ε * card G ^ 2 ≤ A.card) : ¬ IsCornerFree (A : Set (G × G)) 
goal: ¬IsCornerFree ↑A

full_name: corners_theorem_nat
code: /-- The **corners theorem** for `ℕ`.

The maximum density of a corner-free set in `{1, ..., n} × {1, ..., n}` goes to zero as `n` tends to
infinity. -/
theorem corners_theorem_nat (hε : 0 < ε) (hn : cornersTheoremBound (ε / 9) ≤ n)
    (A : Finset (ℕ × ℕ)) (hAn : A ⊆ range n ×ˢ range n) (hAε : ε * n ^ 2 ≤ A.card) :
    ¬ IsCornerFree (A : Set (ℕ × ℕ)) 
goal: ¬IsCornerFree ↑A

full_name: roth_3ap_theorem
code: /-- **Roth's theorem** for finite abelian groups.

The maximum density of a 3AP-free set in `G` goes to zero as `|G|` tends to infinity. -/
theorem roth_3ap_theorem (ε : ℝ) (hε : 0 < ε) (hG : cornersTheoremBound ε ≤ card G)
    (A : Finset G) (hAε : ε * card G ≤ A.card) : ¬ ThreeAPFree (A : Set G) 
goal: ¬ThreeAPFree ↑A

full_name: roth_3ap_theorem_nat
code: /-- **Roth's theorem** for `ℕ`.

The maximum density of a 3AP-free set in `{1, ..., n}` goes to zero as `n` tends to infinity. -/
theorem roth_3ap_theorem_nat (ε : ℝ) (hε : 0 < ε) (hG : cornersTheoremBound (ε / 3) ≤ n)
    (A : Finset ℕ) (hAn : A ⊆ range n) (hAε : ε * n ≤ A.card) : ¬ ThreeAPFree (A : Set ℕ) 
goal: ¬ThreeAPFree ↑A

full_name: rothNumberNat_isLittleO_id
code: /-- **Roth's theorem** for `ℕ` as an asymptotic statement.

The maximum density of a 3AP-free set in `{1, ..., n}` goes to zero as `n` tends to infinity. -/
theorem rothNumberNat_isLittleO_id :
    IsLittleO atTop (fun N ↦ (rothNumberNat N : ℝ)) (fun N ↦ (N : ℝ)) 
goal: (fun N => ↑(rothNumberNat N)) =o[Filter.atTop] fun N => ↑N