File: Mathlib/Combinatorics/SimpleGraph/Triangle/Removal.lean

full_name: SimpleGraph.triangleRemovalBound
code: /-- An explicit form for the constant in the triangle removal lemma.

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

full_name: SimpleGraph.triangleRemovalBound_pos
code: lemma triangleRemovalBound_pos (hε : 0 < ε) (hε₁ : ε ≤ 1) : 0 < triangleRemovalBound ε 
goal: 0 < SimpleGraph.triangleRemovalBound ε

full_name: SimpleGraph.triangleRemovalBound_nonpos
code: lemma triangleRemovalBound_nonpos (hε : ε ≤ 0) : triangleRemovalBound ε ≤ 0 
goal: SimpleGraph.triangleRemovalBound ε ≤ 0

full_name: SimpleGraph.triangleRemovalBound_mul_cube_lt
code: lemma triangleRemovalBound_mul_cube_lt (hε : 0 < ε) :
    triangleRemovalBound ε * ⌈4 / ε⌉₊ ^ 3 < 1 
goal: SimpleGraph.triangleRemovalBound ε * ↑⌈4 / ε⌉₊ ^ 3 < 1

full_name: _private.Mathlib.Combinatorics.SimpleGraph.Triangle.Removal.0.SimpleGraph.aux
code: private lemma aux {n k : ℕ} (hk : 0 < k) (hn : k ≤ n) : n < 2 * k * (n / k) 
goal: n < 2 * k * (n / k)

full_name: _private.Mathlib.Combinatorics.SimpleGraph.Triangle.Removal.0.SimpleGraph.card_bound
code: private lemma card_bound (hP₁ : P.IsEquipartition) (hP₃ : P.parts.card ≤ bound (ε / 8) ⌈4/ε⌉₊)
    (hX : s ∈ P.parts) : card α / (2 * bound (ε / 8) ⌈4 / ε⌉₊ : ℝ) ≤ s.card 
goal: ↑(Fintype.card α) / (2 * ↑(SzemerediRegularity.bound (ε / 8) ⌈4 / ε⌉₊)) ≤ ↑s.card

full_name: _private.Mathlib.Combinatorics.SimpleGraph.Triangle.Removal.0.SimpleGraph.triangle_removal_aux
code: private lemma triangle_removal_aux (hε : 0 < ε) (hP₁ : P.IsEquipartition)
    (hP₃ : P.parts.card ≤ bound (ε / 8) ⌈4/ε⌉₊)
    (ht : t ∈ (G.regularityReduced P (ε/8) (ε/4)).cliqueFinset 3) :
    triangleRemovalBound ε * card α ^ 3 ≤ (G.cliqueFinset 3).card 
goal: SimpleGraph.triangleRemovalBound ε * ↑(Fintype.card α) ^ 3 ≤ ↑(G.cliqueFinset 3).card

full_name: SimpleGraph.regularityReduced_edges_card_aux
code: lemma regularityReduced_edges_card_aux [Nonempty α] (hε : 0 < ε) (hP : P.IsEquipartition)
    (hPε : P.IsUniform G (ε/8)) (hP' : 4 / ε ≤ P.parts.card) :
    2 * (G.edgeFinset.card - (G.regularityReduced P (ε/8) (ε/4)).edgeFinset.card : ℝ)
      < 2 * ε * (card α ^ 2 : ℕ) 
goal: 2 * (↑G.edgeFinset.card - ↑(SimpleGraph.regularityReduced P G (ε / 8) (ε / 4)).edgeFinset.card) <
  2 * ε * ↑(Fintype.card α ^ 2)

full_name: SimpleGraph.FarFromTriangleFree.le_card_cliqueFinset
code: /-- **Triangle Removal Lemma**. If not all triangles can be removed by removing few edges (on the
order of `(card α)^2`), then there were many triangles to start with (on the order of
`(card α)^3`). -/
lemma FarFromTriangleFree.le_card_cliqueFinset (hG : G.FarFromTriangleFree ε) :
    triangleRemovalBound ε * card α ^ 3 ≤ (G.cliqueFinset 3).card 
goal: SimpleGraph.triangleRemovalBound ε * ↑(Fintype.card α) ^ 3 ≤ ↑(G.cliqueFinset 3).card

full_name: SimpleGraph.triangle_removal
code: /-- **Triangle Removal Lemma**. If there are not too many triangles (on the order of `(card α)^3`)
then they can all be removed by removing a few edges (on the order of `(card α)^2`). -/
lemma triangle_removal (hG : (G.cliqueFinset 3).card < triangleRemovalBound ε * card α ^ 3) :
    ∃ G' ≤ G, ∃ _ : DecidableRel G'.Adj,
      (G.edgeFinset.card - G'.edgeFinset.card : ℝ) < ε * (card α^2 : ℕ) ∧ G'.CliqueFree 3 
goal: ∃ G' ≤ G, ∃ x, ↑G.edgeFinset.card - ↑G'.edgeFinset.card < ε * ↑(Fintype.card α ^ 2) ∧ G'.CliqueFree 3

full_name: Mathlib.Meta.Positivity.evalTriangleRemovalBound
code: /-- Extension for the `positivity` tactic: `SimpleGraph.triangleRemovalBound ε` is positive if
`0 < ε ≤ 1`.

Note this looks for `ε ≤ 1` in the context. -/
@[positivity triangleRemovalBound _]
def evalTriangleRemovalBound : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt