[GOAL]
x : ℝ
n_large : 512 ≤ x
⊢ x * (2 * x) ^ sqrt (2 * x) * 4 ^ (2 * x / 3) ≤ 4 ^ x
[PROOFSTEP]
let f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
⊢ x * (2 * x) ^ sqrt (2 * x) * 4 ^ (2 * x / 3) ≤ 4 ^ x
[PROOFSTEP]
have hf' : ∀ x, 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3) := fun x h =>
  div_pos (mul_pos h (rpow_pos_of_pos (mul_pos two_pos h) _)) (rpow_pos_of_pos four_pos _)
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
⊢ x * (2 * x) ^ sqrt (2 * x) * 4 ^ (2 * x / 3) ≤ 4 ^ x
[PROOFSTEP]
have hf : ∀ x, 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)) :=
  by
  intro x h5
  have h6 := mul_pos (zero_lt_two' ℝ) h5
  have h7 := rpow_pos_of_pos h6 (sqrt (2 * x))
  rw [log_div (mul_pos h5 h7).ne' (rpow_pos_of_pos four_pos _).ne', log_mul h5.ne' h7.ne', log_rpow h6,
    log_rpow zero_lt_four, ← mul_div_right_comm, ← mul_div, mul_comm x]
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
⊢ ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
[PROOFSTEP]
intro x h5
[GOAL]
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
x : ℝ
h5 : 0 < x
⊢ f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
[PROOFSTEP]
have h6 := mul_pos (zero_lt_two' ℝ) h5
[GOAL]
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
x : ℝ
h5 : 0 < x
h6 : 0 < 2 * x
⊢ f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
[PROOFSTEP]
have h7 := rpow_pos_of_pos h6 (sqrt (2 * x))
[GOAL]
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
x : ℝ
h5 : 0 < x
h6 : 0 < 2 * x
h7 : 0 < (2 * x) ^ sqrt (2 * x)
⊢ f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
[PROOFSTEP]
rw [log_div (mul_pos h5 h7).ne' (rpow_pos_of_pos four_pos _).ne', log_mul h5.ne' h7.ne', log_rpow h6,
  log_rpow zero_lt_four, ← mul_div_right_comm, ← mul_div, mul_comm x]
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
⊢ x * (2 * x) ^ sqrt (2 * x) * 4 ^ (2 * x / 3) ≤ 4 ^ x
[PROOFSTEP]
have h5 : 0 < x := lt_of_lt_of_le (by norm_num1) n_large
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
⊢ 0 < 512
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ x * (2 * x) ^ sqrt (2 * x) * 4 ^ (2 * x / 3) ≤ 4 ^ x
[PROOFSTEP]
rw [← div_le_one (rpow_pos_of_pos four_pos x), ← div_div_eq_mul_div, ← rpow_sub four_pos, ← mul_div 2 x,
  mul_div_left_comm, ← mul_one_sub, (by norm_num1 : (1 : ℝ) - 2 / 3 = 1 / 3), mul_one_div, ← log_nonpos_iff (hf' x h5),
  ← hf x h5]
  -- porting note: the proof was rewritten, because it was too slow
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ 1 - 2 / 3 = 1 / 3
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ f x ≤ 0
[PROOFSTEP]
have h : ConcaveOn ℝ (Set.Ioi 0.5) f := by
  apply ConcaveOn.sub
  apply ConcaveOn.add
  exact strictConcaveOn_log_Ioi.concaveOn.subset (Set.Ioi_subset_Ioi (by norm_num)) (convex_Ioi 0.5)
  convert ((strictConcaveOn_sqrt_mul_log_Ioi.concaveOn.comp_linearMap ((2 : ℝ) • LinearMap.id))) using 1
  · ext x
    simp only [Set.mem_Ioi, Set.mem_preimage, LinearMap.smul_apply, LinearMap.id_coe, id_eq, smul_eq_mul]
    rw [← mul_lt_mul_left (two_pos)]
    norm_num1
    rfl
  apply ConvexOn.smul
  refine div_nonneg (log_nonneg (by norm_num1)) (by norm_num1)
  exact convexOn_id (convex_Ioi (0.5 : ℝ))
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConcaveOn ℝ (Set.Ioi 0.5) f
[PROOFSTEP]
apply ConcaveOn.sub
[GOAL]
case hf
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConcaveOn ℝ (Set.Ioi 0.5) fun x => log x + sqrt (2 * x) * log (2 * x)
case hg
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConvexOn ℝ (Set.Ioi 0.5) fun x => log 4 / 3 * x
[PROOFSTEP]
apply ConcaveOn.add
[GOAL]
case hf.hf
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConcaveOn ℝ (Set.Ioi 0.5) fun x => log x
case hf.hg
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConcaveOn ℝ (Set.Ioi 0.5) fun x => sqrt (2 * x) * log (2 * x)
case hg
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConvexOn ℝ (Set.Ioi 0.5) fun x => log 4 / 3 * x
[PROOFSTEP]
exact strictConcaveOn_log_Ioi.concaveOn.subset (Set.Ioi_subset_Ioi (by norm_num)) (convex_Ioi 0.5)
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ 0 ≤ 0.5
[PROOFSTEP]
norm_num
[GOAL]
case hf.hg
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConcaveOn ℝ (Set.Ioi 0.5) fun x => sqrt (2 * x) * log (2 * x)
case hg
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConvexOn ℝ (Set.Ioi 0.5) fun x => log 4 / 3 * x
[PROOFSTEP]
convert ((strictConcaveOn_sqrt_mul_log_Ioi.concaveOn.comp_linearMap ((2 : ℝ) • LinearMap.id))) using 1
[GOAL]
case h.e'_9
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ Set.Ioi 0.5 = ↑(2 • LinearMap.id) ⁻¹' Set.Ioi 1
[PROOFSTEP]
ext x
[GOAL]
case h.e'_9.h
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x✝
x : ℝ
⊢ x ∈ Set.Ioi 0.5 ↔ x ∈ ↑(2 • LinearMap.id) ⁻¹' Set.Ioi 1
[PROOFSTEP]
simp only [Set.mem_Ioi, Set.mem_preimage, LinearMap.smul_apply, LinearMap.id_coe, id_eq, smul_eq_mul]
[GOAL]
case h.e'_9.h
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x✝
x : ℝ
⊢ OfScientific.ofScientific 5 true 1 < x ↔ 1 < 2 * x
[PROOFSTEP]
rw [← mul_lt_mul_left (two_pos)]
[GOAL]
case h.e'_9.h
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x✝
x : ℝ
⊢ 2 * OfScientific.ofScientific 5 true 1 < 2 * x ↔ 1 < 2 * x
[PROOFSTEP]
norm_num1
[GOAL]
case h.e'_9.h
x✝ : ℝ
n_large : 512 ≤ x✝
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x✝
x : ℝ
⊢ 1 < 2 * x ↔ 1 < 2 * x
[PROOFSTEP]
rfl
[GOAL]
case hg
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConvexOn ℝ (Set.Ioi 0.5) fun x => log 4 / 3 * x
[PROOFSTEP]
apply ConvexOn.smul
[GOAL]
case hg.hc
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ 0 ≤ log 4 / 3
case hg.hf
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConvexOn ℝ (Set.Ioi 0.5) fun x => x
[PROOFSTEP]
refine div_nonneg (log_nonneg (by norm_num1)) (by norm_num1)
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ 1 ≤ 4
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ 0 ≤ 3
[PROOFSTEP]
norm_num1
[GOAL]
case hg.hf
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
⊢ ConvexOn ℝ (Set.Ioi 0.5) fun x => x
[PROOFSTEP]
exact convexOn_id (convex_Ioi (0.5 : ℝ))
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ f x ≤ 0
[PROOFSTEP]
suffices ∃ x1 x2, 0.5 < x1 ∧ x1 < x2 ∧ x2 ≤ x ∧ 0 ≤ f x1 ∧ f x2 ≤ 0
  by
  obtain ⟨x1, x2, h1, h2, h0, h3, h4⟩ := this
  exact (h.right_le_of_le_left'' h1 ((h1.trans h2).trans_le h0) h2 h0 (h4.trans h3)).trans h4
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : ∃ x1 x2, 0.5 < x1 ∧ x1 < x2 ∧ x2 ≤ x ∧ 0 ≤ f x1 ∧ f x2 ≤ 0
⊢ f x ≤ 0
[PROOFSTEP]
obtain ⟨x1, x2, h1, h2, h0, h3, h4⟩ := this
[GOAL]
case intro.intro.intro.intro.intro.intro
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
x1 x2 : ℝ
h1 : 0.5 < x1
h2 : x1 < x2
h0 : x2 ≤ x
h3 : 0 ≤ f x1
h4 : f x2 ≤ 0
⊢ f x ≤ 0
[PROOFSTEP]
exact (h.right_le_of_le_left'' h1 ((h1.trans h2).trans_le h0) h2 h0 (h4.trans h3)).trans h4
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ ∃ x1 x2, 0.5 < x1 ∧ x1 < x2 ∧ x2 ≤ x ∧ 0 ≤ f x1 ∧ f x2 ≤ 0
[PROOFSTEP]
refine' ⟨18, 512, by norm_num1, by norm_num1, n_large, _, _⟩
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 0.5 < 18
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 18 < 512
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 0 ≤ f 18
[PROOFSTEP]
have : sqrt (2 * 18) = 6 := (sqrt_eq_iff_mul_self_eq_of_pos (by norm_num1)).mpr (by norm_num1)
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 0 < 6
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 6 * 6 = 2 * 18
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 ≤ f 18
[PROOFSTEP]
rw [hf, log_nonneg_iff, this]
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 1 ≤ 18 * (2 * 18) ^ 6 / 4 ^ (18 / 3)
[PROOFSTEP]
rw [one_le_div]
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 4 ^ (18 / 3) ≤ 18 * (2 * 18) ^ 6
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 4 ^ (18 / 3)
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 4 ^ 6 ≤ 18 * 36 ^ 6
[PROOFSTEP]
apply le_trans _ (le_mul_of_one_le_left _ _)
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 4 ^ 6 ≤ 36 ^ 6
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 ≤ 36 ^ 6
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 1 ≤ 18
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 4 ^ 6 ≤ 36 ^ 6
[PROOFSTEP]
apply Real.rpow_le_rpow
[GOAL]
case h
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 ≤ 4
[PROOFSTEP]
norm_num1
[GOAL]
case h₁
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 4 ≤ 36
[PROOFSTEP]
norm_num1
[GOAL]
case h₂
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 ≤ 6
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 ≤ 36 ^ 6
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 4 ^ 6
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18 * (2 * 18) ^ sqrt (2 * 18) / 4 ^ (18 / 3)
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
apply rpow_nonneg_of_nonneg
[GOAL]
case hx
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 ≤ 36
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 4 ^ 6
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18 * (2 * 18) ^ sqrt (2 * 18) / 4 ^ (18 / 3)
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 4 ^ 6
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18 * (2 * 18) ^ sqrt (2 * 18) / 4 ^ (18 / 3)
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
apply rpow_pos_of_pos
[GOAL]
case refine'_1.hx
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 4
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18 * (2 * 18) ^ sqrt (2 * 18) / 4 ^ (18 / 3)
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18 * (2 * 18) ^ sqrt (2 * 18) / 4 ^ (18 / 3)
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
apply hf' 18
[GOAL]
case refine'_1
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_1.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 18) = 6
⊢ 0 < 18
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ f 512 ≤ 0
[PROOFSTEP]
have : sqrt (2 * 512) = 32 := (sqrt_eq_iff_mul_self_eq_of_pos (by norm_num1)).mpr (by norm_num1)
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 0 < 32
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
⊢ 32 * 32 = 2 * 512
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ f 512 ≤ 0
[PROOFSTEP]
rw [hf, log_nonpos_iff (hf' _ _), this, div_le_one]
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 512 * (2 * 512) ^ 32 ≤ 4 ^ (512 / 3)
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 4 ^ (512 / 3)
[PROOFSTEP]
norm_num1
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 512
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2.a
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 512
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 512 * 1024 ^ 32 ≤ 4 ^ (512 / 3)
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 4 ^ (512 / 3)
[PROOFSTEP]
have : (512 : ℝ) = 2 ^ (9 : ℕ)
[GOAL]
case this
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 512 = 2 ^ ↑9
[PROOFSTEP]
rw [rpow_nat_cast 2 9]
[GOAL]
case this
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 512 = 2 ^ 9
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
⊢ 512 * 1024 ^ 32 ≤ 4 ^ (512 / 3)
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 4 ^ (512 / 3)
[PROOFSTEP]
conv_lhs => rw [this]
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
| 512 * 1024 ^ 32
[PROOFSTEP]
rw [this]
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
| 512 * 1024 ^ 32
[PROOFSTEP]
rw [this]
[GOAL]
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
| 512 * 1024 ^ 32
[PROOFSTEP]
rw [this]
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
⊢ 2 ^ ↑9 * 1024 ^ 32 ≤ 4 ^ (512 / 3)
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 4 ^ (512 / 3)
[PROOFSTEP]
have : (1024 : ℝ) = 2 ^ (10 : ℕ)
[GOAL]
case this
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
⊢ 1024 = 2 ^ ↑10
[PROOFSTEP]
rw [rpow_nat_cast 2 10]
[GOAL]
case this
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝ : sqrt (2 * 512) = 32
this : 512 = 2 ^ ↑9
⊢ 1024 = 2 ^ 10
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 2 ^ ↑9 * 1024 ^ 32 ≤ 4 ^ (512 / 3)
[PROOFSTEP]
rw [this, ← rpow_mul, ← rpow_add]
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 2 ^ (↑9 + ↑10 * 32) ≤ 4 ^ (512 / 3)
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2.hx
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 0 < 2
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2.hx
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 0 ≤ 2
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 2 ^ 329 ≤ 4 ^ (512 / 3)
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 4 ^ (512 / 3)
[PROOFSTEP]
have : (4 : ℝ) = 2 ^ (2 : ℕ)
[GOAL]
case this
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 4 = 2 ^ ↑2
[PROOFSTEP]
rw [rpow_nat_cast 2 2]
[GOAL]
case this
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝¹ : sqrt (2 * 512) = 32
this✝ : 512 = 2 ^ ↑9
this : 1024 = 2 ^ ↑10
⊢ 4 = 2 ^ 2
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝² : sqrt (2 * 512) = 32
this✝¹ : 512 = 2 ^ ↑9
this✝ : 1024 = 2 ^ ↑10
this : 4 = 2 ^ ↑2
⊢ 2 ^ 329 ≤ 4 ^ (512 / 3)
[PROOFSTEP]
rw [this, ← rpow_mul]
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝² : sqrt (2 * 512) = 32
this✝¹ : 512 = 2 ^ ↑9
this✝ : 1024 = 2 ^ ↑10
this : 4 = 2 ^ ↑2
⊢ 2 ^ 329 ≤ 2 ^ (↑2 * (512 / 3))
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2.hx
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝² : sqrt (2 * 512) = 32
this✝¹ : 512 = 2 ^ ↑9
this✝ : 1024 = 2 ^ ↑10
this : 4 = 2 ^ ↑2
⊢ 0 ≤ 2
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝² : sqrt (2 * 512) = 32
this✝¹ : 512 = 2 ^ ↑9
this✝ : 1024 = 2 ^ ↑10
this : 4 = 2 ^ ↑2
⊢ 2 ^ 329 ≤ 2 ^ (1024 / 3)
[PROOFSTEP]
apply rpow_le_rpow_of_exponent_le
[GOAL]
case refine'_2.hx
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝² : sqrt (2 * 512) = 32
this✝¹ : 512 = 2 ^ ↑9
this✝ : 1024 = 2 ^ ↑10
this : 4 = 2 ^ ↑2
⊢ 1 ≤ 2
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2.hyz
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this✝² : sqrt (2 * 512) = 32
this✝¹ : 512 = 2 ^ ↑9
this✝ : 1024 = 2 ^ ↑10
this : 4 = 2 ^ ↑2
⊢ 329 ≤ 1024 / 3
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_2
x : ℝ
n_large : 512 ≤ x
f : ℝ → ℝ := fun x => log x + sqrt (2 * x) * log (2 * x) - log 4 / 3 * x
hf' : ∀ (x : ℝ), 0 < x → 0 < x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3)
hf : ∀ (x : ℝ), 0 < x → f x = log (x * (2 * x) ^ sqrt (2 * x) / 4 ^ (x / 3))
h5 : 0 < x
h : ConcaveOn ℝ (Set.Ioi 0.5) f
this : sqrt (2 * 512) = 32
⊢ 0 < 4 ^ (512 / 3)
[PROOFSTEP]
apply rpow_pos_of_pos four_pos
[GOAL]
n : ℕ
n_large : 512 ≤ n
⊢ n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n
[PROOFSTEP]
rw [← @cast_le ℝ]
[GOAL]
n : ℕ
n_large : 512 ≤ n
⊢ ↑(n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)) ≤ ↑(4 ^ n)
[PROOFSTEP]
simp only [cast_add, cast_one, cast_mul, cast_pow, ← Real.rpow_nat_cast]
[GOAL]
n : ℕ
n_large : 512 ≤ n
⊢ ↑n * (↑2 * ↑n) ^ ↑(sqrt (2 * n)) * ↑4 ^ ↑(2 * n / 3) ≤ ↑4 ^ ↑n
[PROOFSTEP]
have n_pos : 0 < n := (by decide : 0 < 512).trans_le n_large
[GOAL]
n : ℕ
n_large : 512 ≤ n
⊢ 0 < 512
[PROOFSTEP]
decide
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
⊢ ↑n * (↑2 * ↑n) ^ ↑(sqrt (2 * n)) * ↑4 ^ ↑(2 * n / 3) ≤ ↑4 ^ ↑n
[PROOFSTEP]
have n2_pos : 1 ≤ 2 * n := mul_pos (by decide) n_pos
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
⊢ 0 < 2
[PROOFSTEP]
decide
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ ↑n * (↑2 * ↑n) ^ ↑(sqrt (2 * n)) * ↑4 ^ ↑(2 * n / 3) ≤ ↑4 ^ ↑n
[PROOFSTEP]
refine' _root_.trans (mul_le_mul _ _ _ _) (Bertrand.real_main_inequality (by exact_mod_cast n_large))
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 512 ≤ ↑n
[PROOFSTEP]
exact_mod_cast n_large
[GOAL]
case refine'_1
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ ↑n * (↑2 * ↑n) ^ ↑(sqrt (2 * n)) ≤ ↑n * (2 * ↑n) ^ Real.sqrt (2 * ↑n)
[PROOFSTEP]
refine' mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg _)
[GOAL]
case refine'_1
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ (↑2 * ↑n) ^ ↑(sqrt (2 * n)) ≤ (2 * ↑n) ^ Real.sqrt (2 * ↑n)
[PROOFSTEP]
refine' Real.rpow_le_rpow_of_exponent_le (by exact_mod_cast n2_pos) _
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 1 ≤ ↑2 * ↑n
[PROOFSTEP]
exact_mod_cast n2_pos
[GOAL]
case refine'_1
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ ↑(sqrt (2 * n)) ≤ Real.sqrt (2 * ↑n)
[PROOFSTEP]
exact_mod_cast Real.nat_sqrt_le_real_sqrt
[GOAL]
case refine'_2
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ ↑4 ^ ↑(2 * n / 3) ≤ 4 ^ (2 * ↑n / 3)
[PROOFSTEP]
exact Real.rpow_le_rpow_of_exponent_le (by norm_num1) (cast_div_le.trans (by norm_cast))
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 1 ≤ ↑4
[PROOFSTEP]
norm_num1
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ ↑(2 * n) / ↑3 ≤ 2 * ↑n / 3
[PROOFSTEP]
norm_cast
[GOAL]
case refine'_3
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 0 ≤ ↑4 ^ ↑(2 * n / 3)
[PROOFSTEP]
exact Real.rpow_nonneg_of_nonneg (by norm_num1) _
[GOAL]
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 0 ≤ ↑4
[PROOFSTEP]
norm_num1
[GOAL]
case refine'_4
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 0 ≤ ↑n * (2 * ↑n) ^ Real.sqrt (2 * ↑n)
[PROOFSTEP]
refine' mul_nonneg (Nat.cast_nonneg _) _
[GOAL]
case refine'_4
n : ℕ
n_large : 512 ≤ n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ 0 ≤ (2 * ↑n) ^ Real.sqrt (2 * ↑n)
[PROOFSTEP]
exact Real.rpow_nonneg_of_nonneg (mul_nonneg zero_le_two (Nat.cast_nonneg _)) _
[GOAL]
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
⊢ centralBinom n = ∏ p in Finset.range (2 * n / 3 + 1), p ^ ↑(Nat.factorization (centralBinom n)) p
[PROOFSTEP]
refine' (Eq.trans _ n.prod_pow_factorization_centralBinom).symm
[GOAL]
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
⊢ ∏ p in Finset.range (2 * n / 3 + 1), p ^ ↑(Nat.factorization (centralBinom n)) p =
    ∏ p in Finset.range (2 * n + 1), p ^ ↑(Nat.factorization (centralBinom n)) p
[PROOFSTEP]
apply Finset.prod_subset
[GOAL]
case h
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
⊢ Finset.range (2 * n / 3 + 1) ⊆ Finset.range (2 * n + 1)
[PROOFSTEP]
exact Finset.range_subset.2 (add_le_add_right (Nat.div_le_self _ _) _)
[GOAL]
case hf
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
⊢ ∀ (x : ℕ),
    x ∈ Finset.range (2 * n + 1) → ¬x ∈ Finset.range (2 * n / 3 + 1) → x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
intro x hx h2x
[GOAL]
case hf
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
x : ℕ
hx : x ∈ Finset.range (2 * n + 1)
h2x : ¬x ∈ Finset.range (2 * n / 3 + 1)
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
rw [Finset.mem_range, lt_succ_iff] at hx h2x 
[GOAL]
case hf
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
x : ℕ
hx : x ≤ 2 * n
h2x : ¬x ≤ 2 * n / 3
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
rw [not_le, div_lt_iff_lt_mul' three_pos, mul_comm x] at h2x 
[GOAL]
case hf
n : ℕ
n_large : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
x : ℕ
hx : x ≤ 2 * n
h2x : 2 * n < 3 * x
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
replace no_prime := not_exists.mp no_prime x
[GOAL]
case hf
n : ℕ
n_large : 2 < n
x : ℕ
hx : x ≤ 2 * n
h2x : 2 * n < 3 * x
no_prime : ¬(Nat.Prime x ∧ n < x ∧ x ≤ 2 * n)
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
rw [← and_assoc, not_and', not_and_or, not_lt] at no_prime 
[GOAL]
case hf
n : ℕ
n_large : 2 < n
x : ℕ
hx : x ≤ 2 * n
h2x : 2 * n < 3 * x
no_prime : x ≤ 2 * n → ¬Nat.Prime x ∨ x ≤ n
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
cases' no_prime hx with h h
[GOAL]
case hf.inl
n : ℕ
n_large : 2 < n
x : ℕ
hx : x ≤ 2 * n
h2x : 2 * n < 3 * x
no_prime : x ≤ 2 * n → ¬Nat.Prime x ∨ x ≤ n
h : ¬Nat.Prime x
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
rw [factorization_eq_zero_of_non_prime n.centralBinom h, Nat.pow_zero]
[GOAL]
case hf.inr
n : ℕ
n_large : 2 < n
x : ℕ
hx : x ≤ 2 * n
h2x : 2 * n < 3 * x
no_prime : x ≤ 2 * n → ¬Nat.Prime x ∨ x ≤ n
h : x ≤ n
⊢ x ^ ↑(Nat.factorization (centralBinom n)) x = 1
[PROOFSTEP]
rw [factorization_centralBinom_of_two_mul_self_lt_three_mul n_large h h2x, Nat.pow_zero]
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
⊢ centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
have n_pos : 0 < n := (Nat.zero_le _).trans_lt n_big
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
⊢ centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
have n2_pos : 1 ≤ 2 * n := mul_pos (zero_lt_two' ℕ) n_pos
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
⊢ centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
let S := (Finset.range (2 * n / 3 + 1)).filter Nat.Prime
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
⊢ centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
let f x := x ^ n.centralBinom.factorization x
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
⊢ centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
have : ∏ x : ℕ in S, f x = ∏ x : ℕ in Finset.range (2 * n / 3 + 1), f x :=
  by
  refine' Finset.prod_filter_of_ne fun p _ h => _
  contrapose! h; dsimp only
  rw [factorization_eq_zero_of_non_prime n.centralBinom h, _root_.pow_zero]
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
⊢ ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
[PROOFSTEP]
refine' Finset.prod_filter_of_ne fun p _ h => _
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
p : ℕ
x✝ : p ∈ Finset.range (2 * n / 3 + 1)
h : f p ≠ 1
⊢ Nat.Prime p
[PROOFSTEP]
contrapose! h
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
p : ℕ
x✝ : p ∈ Finset.range (2 * n / 3 + 1)
h : ¬Nat.Prime p
⊢ (fun x => x ^ ↑(Nat.factorization (centralBinom n)) x) p = 1
[PROOFSTEP]
dsimp only
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
p : ℕ
x✝ : p ∈ Finset.range (2 * n / 3 + 1)
h : ¬Nat.Prime p
⊢ p ^ ↑(Nat.factorization (centralBinom n)) p = 1
[PROOFSTEP]
rw [factorization_eq_zero_of_non_prime n.centralBinom h, _root_.pow_zero]
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
rw [centralBinom_factorization_small n n_big no_prime, ← this, ←
  Finset.prod_filter_mul_prod_filter_not S (· ≤ sqrt (2 * n))]
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ (∏ x in Finset.filter (fun x => x ≤ sqrt (2 * n)) S, f x) * ∏ x in Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S, f x ≤
    (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
[PROOFSTEP]
apply mul_le_mul'
[GOAL]
case h₁
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ ∏ x in Finset.filter (fun x => x ≤ sqrt (2 * n)) S, f x ≤ (2 * n) ^ sqrt (2 * n)
[PROOFSTEP]
refine' (Finset.prod_le_prod' fun p _ => (_ : f p ≤ 2 * n)).trans _
[GOAL]
case h₁.refine'_1
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
p : ℕ
x✝ : p ∈ Finset.filter (fun x => x ≤ sqrt (2 * n)) S
⊢ f p ≤ 2 * n
[PROOFSTEP]
exact pow_factorization_choose_le (mul_pos two_pos n_pos)
[GOAL]
case h₁.refine'_2
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ ∏ i in Finset.filter (fun x => x ≤ sqrt (2 * n)) S, 2 * n ≤ (2 * n) ^ sqrt (2 * n)
[PROOFSTEP]
have : (Finset.Icc 1 (sqrt (2 * n))).card = sqrt (2 * n) := by rw [card_Icc, Nat.add_sub_cancel]
[GOAL]
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ Finset.card (Finset.Icc 1 (sqrt (2 * n))) = sqrt (2 * n)
[PROOFSTEP]
rw [card_Icc, Nat.add_sub_cancel]
[GOAL]
case h₁.refine'_2
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this✝ : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
this : Finset.card (Finset.Icc 1 (sqrt (2 * n))) = sqrt (2 * n)
⊢ ∏ i in Finset.filter (fun x => x ≤ sqrt (2 * n)) S, 2 * n ≤ (2 * n) ^ sqrt (2 * n)
[PROOFSTEP]
rw [Finset.prod_const]
[GOAL]
case h₁.refine'_2
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this✝ : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
this : Finset.card (Finset.Icc 1 (sqrt (2 * n))) = sqrt (2 * n)
⊢ (2 * n) ^ Finset.card (Finset.filter (fun x => x ≤ sqrt (2 * n)) S) ≤ (2 * n) ^ sqrt (2 * n)
[PROOFSTEP]
refine' pow_le_pow n2_pos ((Finset.card_le_of_subset fun x hx => _).trans this.le)
[GOAL]
case h₁.refine'_2
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this✝ : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
this : Finset.card (Finset.Icc 1 (sqrt (2 * n))) = sqrt (2 * n)
x : ℕ
hx : x ∈ Finset.filter (fun x => x ≤ sqrt (2 * n)) S
⊢ x ∈ Finset.Icc 1 (sqrt (2 * n))
[PROOFSTEP]
obtain ⟨h1, h2⟩ := Finset.mem_filter.1 hx
[GOAL]
case h₁.refine'_2.intro
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this✝ : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
this : Finset.card (Finset.Icc 1 (sqrt (2 * n))) = sqrt (2 * n)
x : ℕ
hx : x ∈ Finset.filter (fun x => x ≤ sqrt (2 * n)) S
h1 : x ∈ S
h2 : x ≤ sqrt (2 * n)
⊢ x ∈ Finset.Icc 1 (sqrt (2 * n))
[PROOFSTEP]
exact Finset.mem_Icc.mpr ⟨(Finset.mem_filter.1 h1).2.one_lt.le, h2⟩
[GOAL]
case h₂
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ ∏ x in Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S, f x ≤ 4 ^ (2 * n / 3)
[PROOFSTEP]
refine' le_trans _ (primorial_le_4_pow (2 * n / 3))
[GOAL]
case h₂
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ ∏ x in Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S, f x ≤ primorial (2 * n / 3)
[PROOFSTEP]
refine' (Finset.prod_le_prod' fun p hp => (_ : f p ≤ p)).trans _
[GOAL]
case h₂.refine'_1
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
p : ℕ
hp : p ∈ Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S
⊢ f p ≤ p
[PROOFSTEP]
obtain ⟨h1, h2⟩ := Finset.mem_filter.1 hp
[GOAL]
case h₂.refine'_1.intro
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
p : ℕ
hp : p ∈ Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S
h1 : p ∈ S
h2 : ¬p ≤ sqrt (2 * n)
⊢ f p ≤ p
[PROOFSTEP]
refine' (pow_le_pow (Finset.mem_filter.1 h1).2.one_lt.le _).trans (pow_one p).le
[GOAL]
case h₂.refine'_1.intro
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
p : ℕ
hp : p ∈ Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S
h1 : p ∈ S
h2 : ¬p ≤ sqrt (2 * n)
⊢ ↑(Nat.factorization (centralBinom n)) p ≤ 1
[PROOFSTEP]
exact Nat.factorization_choose_le_one (sqrt_lt'.mp <| not_le.1 h2)
[GOAL]
case h₂.refine'_2
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ ∏ i in Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S, i ≤ primorial (2 * n / 3)
[PROOFSTEP]
refine' Finset.prod_le_prod_of_subset_of_one_le' (Finset.filter_subset _ _) _
[GOAL]
case h₂.refine'_2
n : ℕ
n_big : 2 < n
no_prime : ¬∃ p, Nat.Prime p ∧ n < p ∧ p ≤ 2 * n
n_pos : 0 < n
n2_pos : 1 ≤ 2 * n
S : Finset ℕ := Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1))
f : ℕ → ℕ := fun x => x ^ ↑(Nat.factorization (centralBinom n)) x
this : ∏ x in S, f x = ∏ x in Finset.range (2 * n / 3 + 1), f x
⊢ ∀ (i : ℕ),
    i ∈ Finset.filter Nat.Prime (Finset.range (2 * n / 3 + 1)) →
      ¬i ∈ Finset.filter (fun x => ¬x ≤ sqrt (2 * n)) S → 1 ≤ i
[PROOFSTEP]
exact fun p hp _ => (Finset.mem_filter.1 hp).2.one_lt.le
[GOAL]
n : ℕ
n_big : 512 ≤ n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
by_contra no_prime
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
⊢ False
[PROOFSTEP]
have H1 : n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n := bertrand_main_inequality n_big
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
H1 : n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n
⊢ False
[PROOFSTEP]
have H2 : 4 ^ n < n * n.centralBinom := Nat.four_pow_lt_mul_centralBinom n (le_trans (by norm_num1) n_big)
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
H1 : n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n
⊢ 4 ≤ 512
[PROOFSTEP]
norm_num1
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
H1 : n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n
H2 : 4 ^ n < n * centralBinom n
⊢ False
[PROOFSTEP]
have H3 : n.centralBinom ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) :=
  centralBinom_le_of_no_bertrand_prime n (lt_of_lt_of_le (by norm_num1) n_big) no_prime
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
H1 : n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n
H2 : 4 ^ n < n * centralBinom n
⊢ 2 < 512
[PROOFSTEP]
norm_num1
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
H1 : n * (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3) ≤ 4 ^ n
H2 : 4 ^ n < n * centralBinom n
H3 : centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
⊢ False
[PROOFSTEP]
rw [mul_assoc] at H1 
[GOAL]
n : ℕ
n_big : 512 ≤ n
no_prime : ¬∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
H1 : n * ((2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)) ≤ 4 ^ n
H2 : 4 ^ n < n * centralBinom n
H3 : centralBinom n ≤ (2 * n) ^ sqrt (2 * n) * 4 ^ (2 * n / 3)
⊢ False
[PROOFSTEP]
exact not_le.2 H2 ((mul_le_mul_left' H3 n).trans H1)
[GOAL]
n q p : ℕ
prime_p : Prime p
covering : p ≤ 2 * q
H : n < q → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
hn : n < p
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
by_cases p ≤ 2 * n
[GOAL]
n q p : ℕ
prime_p : Prime p
covering : p ≤ 2 * q
H : n < q → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
hn : n < p
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
by_cases p ≤ 2 * n
[GOAL]
case pos
n q p : ℕ
prime_p : Prime p
covering : p ≤ 2 * q
H : n < q → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
hn : n < p
h : p ≤ 2 * n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
exact ⟨p, prime_p, hn, h⟩
[GOAL]
case neg
n q p : ℕ
prime_p : Prime p
covering : p ≤ 2 * q
H : n < q → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
hn : n < p
h : ¬p ≤ 2 * n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
exact H (lt_of_mul_lt_mul_left' (lt_of_lt_of_le (not_le.1 h) covering))
[GOAL]
n : ℕ
hn0 : n ≠ 0
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
cases' lt_or_le 511 n with h h
[GOAL]
case inl
n : ℕ
hn0 : n ≠ 0
h : 511 < n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
exact exists_prime_lt_and_le_two_mul_eventually n h
[GOAL]
case inr
n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
replace h : n < 521 := h.trans_lt (by norm_num1)
[GOAL]
n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ 511 < 521
[PROOFSTEP]
norm_num1
[GOAL]
case inr
n : ℕ
hn0 : n ≠ 0
h : n < 521
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
revert h
[GOAL]
case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
open Lean Elab
  Tactic in
  run_tac
    do
      for i in [317, 163, 83, 43, 23, 13, 7, 5, 3, 2]do
        let i : Term := quote i
        evalTactic <| ← `(tactic| refine' exists_prime_lt_and_le_two_mul_succ $i (by norm_num1) (by norm_num1) _)
  exact fun h2 => ⟨2, prime_two, h2, Nat.mul_le_mul_left 2 (Nat.pos_of_ne_zero hn0)⟩
[GOAL]
case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
run_tac
  do
    for i in [317, 163, 83, 43, 23, 13, 7, 5, 3, 2]do
      let i : Term := quote i
      evalTactic <| ← `(tactic| refine' exists_prime_lt_and_le_two_mul_succ $i (by norm_num1) (by norm_num1) _)
[GOAL]
case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 2 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
[PROOFSTEP]
exact fun h2 => ⟨2, prime_two, h2, Nat.mul_le_mul_left 2 (Nat.pos_of_ne_zero hn0)⟩
