Skip to content

Commit b8081fb

Browse files
Use Eventually
1 parent 6fcd412 commit b8081fb

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Extremal/TuranDensity.lean

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,25 +115,27 @@ theorem isEquivalent_extremalNumber (h : turanDensity H ≠ 0) :
115115
simp [h, Nat.choose_eq_zero_iff, hn]
116116
simpa [isEquivalent_iff_tendsto_one hz] using
117117

118-
/-- `n`-vertex simple graphs having at least `(turanDensity H + o(1)) * n ^ 2` edges contain
119-
`H`, for sufficently large `n`. -/
120-
theorem isContained_of_card_edgeFinset (H : SimpleGraph W) {ε : ℝ} (hε_pos : 0 < ε) :
121-
∃ N, ∀ n ≥ N, ∀ {G : SimpleGraph (Fin n)} [DecidableRel G.Adj],
122-
#G.edgeFinset ≥ (turanDensity H + ε) * n.choose 2 → H ⊑ G := by
118+
/-- Simple graphs on `n` vertices having at least `(turanDensity H + o(1)) * n ^ 2` edges contain
119+
`H`, for sufficiently large `n`. -/
120+
theorem eventually_isContained_of_card_edgeFinset (H : SimpleGraph W) {ε : ℝ} (hε_pos : 0 < ε) :
121+
∀ᶠ n in atTop, ∀ {V : Type*} [Fintype V], card V = n →
122+
∀ {G : SimpleGraph V} [DecidableRel G.Adj],
123+
#G.edgeFinset ≥ (turanDensity H + ε) * n.choose 2 → H ⊑ G := by
123124
have hπ := (turanDensity_eq_csInf H).ge
125+
rw [eventually_atTop]
124126
contrapose! hπ with h
125127
apply lt_of_lt_of_le <| lt_add_of_pos_right (turanDensity H) hε_pos
126128
refine le_csInf ?_ (fun x ⟨m, hm, hx⟩ ↦ ?_)
127129
· rw [← Set.image, Set.image_nonempty]
128130
exact Set.nonempty_Ici
129131
· rw [← hx]
130-
have ⟨n, hn, G, _, hcard_edges, h_free⟩ := h m
131-
replace h_free : H.Free G := by rwa [← not_nonempty_iff] at h_free
132+
have ⟨n, hn, V, _, hc, G, _, hcard_edges, h_free⟩ := h m
133+
replace h_free : H.Free G := not_nonempty_iff.mpr h_free
132134
trans (extremalNumber n H / n.choose 2)
133135
· rw [le_div_iff₀ <| mod_cast Nat.choose_pos (hm.trans hn)]
134136
conv =>
135137
enter [2, 1, 1]
136-
rw [← Fintype.card_fin n]
138+
rw [← hc]
137139
exact hcard_edges.trans (mod_cast card_edgeFinset_le_extremalNumber h_free)
138140
· exact antitoneOn_extremalNumber_div_choose_two H hm (hm.trans hn) hn
139141

0 commit comments

Comments
 (0)