Theorem: _private.Mathlib.Combinatorics.SimpleGraph.Triangle.Counting.0.SimpleGraph.card_badVertices_le
File: Mathlib/Combinatorics/SimpleGraph/Triangle/Counting.lean

Proof steps:
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
⊢ ↑(SimpleGraph.badVertices G ε s t).card ≤ ↑s.card * ε
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
⊢ ↑(SimpleGraph.badVertices G ε s t).card ≤ ↑s.card * ε
tactic: have hε : ε ≤ 1 := (le_mul_of_one_le_of_le_of_nonneg (by norm_num) le_rfl hst.pos.le).trans
    (dst.trans $ by exact_mod_cast edgeDensity_le_one _ _ _)
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
⊢ ↑(SimpleGraph.badVertices G ε s t).card ≤ ↑s.card * ε
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
h : ↑s.card * ε < ↑(SimpleGraph.badVertices G ε s t).card
⊢ False
tactic: by_contra! h
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
h : ↑s.card * ε < ↑(SimpleGraph.badVertices G ε s t).card
⊢ False
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
h : ↑s.card * ε < ↑(SimpleGraph.badVertices G ε s t).card
this : |↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) - ↑(G.edgeDensity s t)| < ε
⊢ False
tactic: have : |(G.edgeDensity (badVertices G ε s t) t - G.edgeDensity s t : ℝ)| < ε :=
    hst (filter_subset _ _) Subset.rfl h.le (mul_le_of_le_one_right (Nat.cast_nonneg _) hε)
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
h : ↑s.card * ε < ↑(SimpleGraph.badVertices G ε s t).card
this : |↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) - ↑(G.edgeDensity s t)| < ε
⊢ False
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
h : ↑s.card * ε < ↑(SimpleGraph.badVertices G ε s t).card
this :
  ↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) - ↑(G.edgeDensity s t) < ε ∧
    ↑(G.edgeDensity s t) - ↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) < ε
⊢ False
tactic: rw [abs_sub_lt_iff] at this
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
hst : G.IsUniform ε s t
hε : ε ≤ 1
h : ↑s.card * ε < ↑(SimpleGraph.badVertices G ε s t).card
this :
  ↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) - ↑(G.edgeDensity s t) < ε ∧
    ↑(G.edgeDensity s t) - ↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) < ε
⊢ False
state_after: no goals
tactic: linarith [G.edgeDensity_badVertices_le hst.pos.le dst]