Skip to content

Commit 60cac72

Browse files
Refactor KovariSosTuran.bound
1 parent a6dc50a commit 60cac72

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Extremal/KovariSosTuran.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ namespace KovariSosTuran
4040
/-- `bound` is the upper bound in the statement of the **Kővári–Sós–Turán theorem**.
4141
4242
This is an auxiliary definition for the **Kővári–Sós–Turán theorem**. -/
43-
noncomputable abbrev bound (V : Type*) [Fintype V] (s t : ℕ) : ℝ :=
44-
(t-1)^(1/s : ℝ)*(card V)^(2-1/s : ℝ)/2 + (card V)*(s-1)/2
43+
noncomputable abbrev bound (n s t : ℕ) : ℝ :=
44+
(t-1)^(1/s : ℝ)*n^(2-1/s : ℝ)/2 + n*(s-1)/2
4545

46-
theorem bound_nonneg {s t : ℕ} (hs : 1 ≤ s) (ht : s ≤ t) : 0 ≤ bound V s t := by
46+
theorem bound_nonneg {n s t : ℕ} (hs : 1 ≤ s) (ht : s ≤ t) : 0 ≤ bound n s t := by
4747
apply add_nonneg <;> apply div_nonneg _ zero_le_two <;> apply mul_nonneg
4848
· apply Real.rpow_nonneg <| sub_nonneg_of_le (mod_cast hs.trans ht)
49-
· apply Real.rpow_nonneg (card V).cast_nonneg
50-
· exact (card V).cast_nonneg
49+
· apply Real.rpow_nonneg n.cast_nonneg
50+
· exact n.cast_nonneg
5151
· exact sub_nonneg_of_le (mod_cast hs)
5252

5353
variable [DecidableEq V]
@@ -111,7 +111,7 @@ This is an auxiliary definition for the **Kővári–Sós–Turán theorem**. -/
111111
private lemma card_edgeFinset_le_bound [Nonempty V] [Nonempty α] [Nonempty β]
112112
(h_avg : card α-1 ≤ (∑ v : V, G.degree v : ℝ) / card V)
113113
(h_free : (completeBipartiteGraph α β).Free G) :
114-
#G.edgeFinset ≤ bound V (card α) (card β) := by
114+
#G.edgeFinset ≤ bound (card V) (card α) (card β) := by
115115
have h_avg_sub_nonneg : 0 ≤ (2*#G.edgeFinset/card V-card α+1 : ℝ) := by
116116
rwa [← Nat.cast_sum, sum_degrees_eq_twice_card_edges, Nat.cast_mul,
117117
Nat.cast_two, ← sub_nonneg, ← sub_add] at h_avg

0 commit comments

Comments
 (0)