Skip to content

Commit d4c88ba

Browse files
Update docstrings
1 parent 60cac72 commit d4c88ba

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Extremal/KovariSosTuran.lean

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ namespace SimpleGraph
3333

3434
variable {V α β : Type*} [Fintype V] [Fintype α] [Fintype β]
3535

36-
section KovariSosTuran
37-
3836
namespace KovariSosTuran
3937

4038
/-- `bound` is the upper bound in the statement of the **Kővári–Sós–Turán theorem**.
@@ -52,8 +50,8 @@ theorem bound_nonneg {n s t : ℕ} (hs : 1 ≤ s) (ht : s ≤ t) : 0 ≤ bound n
5250

5351
variable [DecidableEq V]
5452

55-
/-- `aux` is the set of pairs `(t, v)` s.t. `t : Finset V` is an `n`-sized subset of the neighbor
56-
finset of `v : V` in `G : SimpleGraph V`.
53+
/-- `aux` is the set of pairs `(t, v)` such that `t : Finset V` is an `n`-sized subset of the
54+
neighbor finset of `v : V` in `G : SimpleGraph V`.
5755
5856
This is an auxiliary definition for the **Kővári–Sós–Turán theorem**. -/
5957
private abbrev aux (G : SimpleGraph V) [DecidableRel G.Adj] (n : ℕ) :=
@@ -136,16 +134,16 @@ private lemma card_edgeFinset_le_bound [Nonempty V] [Nonempty α] [Nonempty β]
136134
rw [Nat.one_le_cast]
137135
apply Nat.succ_le_of_lt
138136
any_goals positivity
139-
-- double-counting t ⊆ G.neighborSet v
137+
-- double-counting `(t, v) ↦ t ⊆ G.neighborSet v`
140138
trans (#X : ℝ)
141-
-- counting t
139+
-- counting `t`
142140
· trans (card V)*((descPochhammer ℝ (card α)).eval
143141
((∑ v, G.degree v : ℝ)/card V)/(card α).factorial)
144142
· rw [← Nat.cast_two, ← Nat.cast_mul, ← sum_degrees_eq_twice_card_edges, Nat.cast_sum,
145143
mul_div, div_le_div_iff_of_pos_right (by positivity), mul_le_mul_left (by positivity)]
146144
exact pow_le_descPochhammer_eval h_avg
147145
· exact le_card_aux h_avg
148-
-- counting v
146+
-- counting `v`
149147
· trans ((card V).choose (card α))*(card β-1)
150148
· exact card_aux_le h_free
151149
· apply mul_le_mul_of_nonneg_right (Nat.choose_le_pow_div (card α) (card V))
@@ -168,12 +166,10 @@ theorem card_edgeFinset_le_of_completeBipartiteGraph_free
168166
rw [← card_pos_iff]
169167
exact card_pos.trans_le hcard_le
170168
cases isEmpty_or_nonempty V
171-
-- if no vertices
172169
· have h_two_sub_one_div_ne_zero : 2 - (card α : ℝ)⁻¹ ≠ 0 := by
173170
apply sub_ne_zero_of_ne ∘ ne_of_gt
174171
exact (card α).cast_inv_le_one.trans_lt one_lt_two
175172
simp [h_two_sub_one_div_ne_zero]
176-
-- if vertices
177173
· rcases lt_or_le (∑ v, G.degree v : ℝ) ((card V)*(card α-1) : ℝ) with h_sum_lt | h_avg
178174
-- if avg degree less than `card a-1`
179175
· rw [← Nat.cast_sum, sum_degrees_eq_twice_card_edges,
@@ -201,6 +197,4 @@ theorem extremalNumber_completeBipartiteGraph_le (n : ℕ) [Nonempty α] (hcard_
201197
intro G _ h_free
202198
exact card_edgeFinset_le_of_completeBipartiteGraph_free hcard_le h_free
203199

204-
end KovariSosTuran
205-
206200
end SimpleGraph

0 commit comments

Comments
 (0)