Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
hmm.
Browse files Browse the repository at this point in the history
  • Loading branch information
b-mehta committed Sep 28, 2023
1 parent 727df23 commit 8b8de12
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace simple_graph

open_locale exponential_ramsey

open filter finset nat
open filter finset

lemma top_adjuster {α : Type*} [semilattice_sup α] [nonempty α] {p : α → Prop}
(h : ∀ᶠ k : α in at_top, p k) :
Expand Down Expand Up @@ -134,7 +134,7 @@ begin
rw [rpow_def_of_pos, ←mul_assoc, ←mul_assoc, mul_comm, ←rpow_def_of_pos hk₀'],
swap,
{ positivity },
have : real.log 2 * (4 / 5 * 2) ≤ log (1 + ε) * (4 / 5) * (2 / ε),
have : log 2 * (4 / 5 * 2) ≤ log (1 + ε) * (4 / 5) * (2 / ε),
{ rw [mul_div_assoc' _ _ ε, le_div_iff' hε, ←mul_assoc, mul_assoc (real.log _)],
refine mul_le_mul_of_nonneg_right (mul_log_two_le_log_one_add hε.le hε₁) _,
norm_num1 },
Expand Down Expand Up @@ -686,13 +686,13 @@ begin
rw [degree_regularisation_applied hi, book_config.degree_regularisation_step_X, mem_filter] at hx,
rw [degree_steps, mem_filter, mem_range] at hi,
change (1 - (k : ℝ) ^ (- 1 / 8 : ℝ)) * C.p * C.Y.card ≤ (red_neighbors χ x ∩ C.Y).card,
change x ∈ C.X ∧ (C.p - _ * α_function k (C.height k ini.p)) * (C.Y.card : ℝ) ≤
change x ∈ C.X ∧ (C.p - _ * α_function k (height k ini.p C.p)) * (C.Y.card : ℝ) ≤
(red_neighbors χ x ∩ C.Y).card at hx,
have : 1 / (k : ℝ) < C.p := one_div_k_lt_p_of_lt_final_step hi.1,
refine hx.2.trans' (mul_le_mul_of_nonneg_right _ (nat.cast_nonneg _)),
rw [one_sub_mul, sub_le_sub_iff_left],
cases le_total C.p (q_function k ini.p 0) with h' h',
{ rw [book_config.height, five_seven_extra, α_one, mul_div_assoc', ←rpow_add' (nat.cast_nonneg _),
{ rw [five_seven_extra, α_one, mul_div_assoc', ←rpow_add' (nat.cast_nonneg _),
div_eq_mul_one_div],
{ refine (mul_le_mul_of_nonneg_left this.le (rpow_nonneg_of_nonneg (nat.cast_nonneg _)
_)).trans_eq _,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace simple_graph

open_locale big_operators exponential_ramsey

open filter finset nat real
open filter finset real

variables {V : Type*} [decidable_eq V] [fintype V] {χ : top_edge_labelling V (fin 2)}
variables {k l : ℕ} {ini : book_config χ} {i : ℕ}
Expand Down Expand Up @@ -108,7 +108,7 @@ begin
rw [degree_regularisation_applied hi, book_config.degree_regularisation_step_X,
book_config.degree_regularisation_step_Y],
set C := algorithm μ k l ini i,
set α := α_function k (C.height k ini.p),
set α := α_function k (height k ini.p C.p),
rw col_density_eq_average,
have : C.X.filter (λ x, (C.p - k ^ (1 / 8 : ℝ) * α) * C.Y.card ≤
((col_neighbors χ 0 x ∩ C.Y).card)) = C.X.filter (λ x, C.p - k ^ (1 / 8 : ℝ) * α ≤
Expand Down Expand Up @@ -153,7 +153,7 @@ begin
rw [col_density_eq_average],
let C := algorithm μ k l ini i,
let C' := algorithm μ k l ini (i + 1),
have : ∀ x ∈ (C'.big_blue_step μ).X, C.p - k ^ (1 / 8 : ℝ) * α_function k (C.height k ini.p) ≤
have : ∀ x ∈ (C'.big_blue_step μ).X, C.p - k ^ (1 / 8 : ℝ) * α_function k (height k ini.p C.p) ≤
(red_neighbors χ x ∩ C.Y).card / C.Y.card,
{ intros x hx,
have : x ∈ (algorithm μ k l ini (i + 1)).X := book_config.get_book_snd_subset hx,
Expand All @@ -167,7 +167,6 @@ begin
refine (div_le_div_of_le _ (card_nsmul_le_sum _ _ _ this)).trans' _,
{ exact nat.cast_nonneg _ },
rw [book_config.big_blue_step_X, nsmul_eq_mul, mul_div_cancel_left],
{ refl },
rw [nat.cast_ne_zero, ←pos_iff_ne_zero, card_pos],
refine book_config.get_book_snd_nonempty hμ₀ _,
exact X_nonempty h,
Expand Down Expand Up @@ -320,7 +319,7 @@ end
lemma convex_thing_aux {x : ℝ} (hε : 0 ≤ x) (hx' : x ≤ 2 / 7) :
exp (-(7 * log 2 / 4 * x)) ≤ 1 - 7 / 2 * (1 - 1 / sqrt 2) * x :=
begin
have h' : 0 < log 2 := log_pos (by norm_num),
have h' : (0 : ℝ) < log 2 := log_pos (by norm_num),
let a := - log 2 / 2,
have : - log 2 / 20,
{ norm_num },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ lemma strict_convex_on.const_mul {c : ℝ} {s : set ℝ} {f : ℝ → ℝ} (hf :
hc).trans_eq (by simp only [smul_eq_mul]; ring_nf)⟩

lemma convex_on_inv : convex_on ℝ (set.Ioi (0 : ℝ)) (λ x, x⁻¹) :=
convex_on.congr (convex_on_zpow (-1)) (by simp)
convex_on.congr' (convex_on_zpow (-1)) (by simp)

lemma convex_on_one_div : convex_on ℝ (set.Ioi (0 : ℝ)) (λ x, 1 / x) :=
convex_on.congr (convex_on_zpow (-1)) (by simp)
convex_on.congr' (convex_on_zpow (-1)) (by simp)

lemma quadratic_is_concave {a b c : ℝ} (ha : 0 < a) :
strict_convex_on ℝ set.univ (λ x, a * x ^ 2 + b * x + c) :=
Expand Down

0 comments on commit 8b8de12

Please sign in to comment.