Theorem: SimpleGraph.edgeDensity_badVertices_le
File: Mathlib/Combinatorics/SimpleGraph/Triangle/Counting.lean

tactic: rw [edgeDensity_def]
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.edgeDensity (SimpleGraph.badVertices G ε s t) t) ≤ ↑(G.edgeDensity s t) - ε
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card / (↑(SimpleGraph.badVertices G ε s t).card * ↑t.card)) ≤
    ↑(G.edgeDensity s t) - ε

tactic: push_cast
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card / (↑(SimpleGraph.badVertices G ε s t).card * ↑t.card)) ≤
    ↑(G.edgeDensity s t) - ε
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card / (↑(SimpleGraph.badVertices G ε s t).card * ↑t.card) ≤
    ↑(G.edgeDensity s t) - ε

tactic: refine div_le_of_nonneg_of_le_mul (by positivity) (sub_nonneg_of_le $ by linarith) ?_
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card / (↑(SimpleGraph.badVertices G ε s t).card * ↑t.card) ≤
    ↑(G.edgeDensity s t) - ε
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card ≤
    (↑(G.edgeDensity s t) - ε) * (↑(SimpleGraph.badVertices G ε s t).card * ↑t.card)

tactic: rw [mul_comm]
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card ≤
    (↑(G.edgeDensity s t) - ε) * (↑(SimpleGraph.badVertices G ε s t).card * ↑t.card)
state_after: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card ≤
    ↑(SimpleGraph.badVertices G ε s t).card * ↑t.card * (↑(G.edgeDensity s t) - ε)

tactic: exact G.card_interedges_badVertices_le
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ↑(G.interedges (SimpleGraph.badVertices G ε s t) t).card ≤
    ↑(SimpleGraph.badVertices G ε s t).card * ↑t.card * (↑(G.edgeDensity s t) - ε)
state_after: no goals

tactic: positivity
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ 0 ≤ ↑(SimpleGraph.badVertices G ε s t).card * ↑t.card
state_after: no goals

tactic: linarith
state_before: α : Type u_1
G G' : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : ℝ
s t u : Finset α
hε : 0 ≤ ε
dst : 2 * ε ≤ ↑(G.edgeDensity s t)
⊢ ε ≤ ↑(G.edgeDensity s t)
state_after: no goals