Theorem: Behrend.le_sqrt_log
File: Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean

tactic: have : (12 : ℕ) * log 2 ≤ log N := by
  rw [← log_rpow zero_lt_two, rpow_natCast]
  exact log_le_log (by positivity) (mod_cast hN)
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
⊢ log (2 / (1 - 2 / rexp 1)) * (69 / 50) ≤ √(log ↑N)
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log (2 / (1 - 2 / rexp 1)) * (69 / 50) ≤ √(log ↑N)

tactic: refine (mul_le_mul_of_nonneg_right (log_le_log ?_ two_div_one_sub_two_div_e_le_eight) <| by
  norm_num1).trans ?_
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log (2 / (1 - 2 / rexp 1)) * (69 / 50) ≤ √(log ↑N)
state_after: case refine_1
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 0 < 2 / (1 - 2 / rexp 1)

case refine_2
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log 8 * (69 / 50) ≤ √(log ↑N)

tactic: have l8 : log 8 = (3 : ℕ) * log 2 := by
  rw [← log_rpow zero_lt_two, rpow_natCast]
  norm_num
state_before: case refine_2
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log 8 * (69 / 50) ≤ √(log ↑N)
state_after: case refine_2
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ log 8 * (69 / 50) ≤ √(log ↑N)

tactic: rw [l8]
state_before: case refine_2
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ log 8 * (69 / 50) ≤ √(log ↑N)
state_after: case refine_2
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ ↑3 * log 2 * (69 / 50) ≤ √(log ↑N)

tactic: apply le_sqrt_of_sq_le (le_trans _ this)
state_before: case refine_2
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ ↑3 * log 2 * (69 / 50) ≤ √(log ↑N)
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ (↑3 * log 2 * (69 / 50)) ^ 2 ≤ ↑12 * log 2

tactic: rw [mul_right_comm, mul_pow, sq (log 2), ← mul_assoc]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ (↑3 * log 2 * (69 / 50)) ^ 2 ≤ ↑12 * log 2
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ (↑3 * (69 / 50)) ^ 2 * log 2 * log 2 ≤ ↑12 * log 2

tactic: apply mul_le_mul_of_nonneg_right _ (log_nonneg one_le_two)
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ (↑3 * (69 / 50)) ^ 2 * log 2 * log 2 ≤ ↑12 * log 2
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ (↑3 * (69 / 50)) ^ 2 * log 2 ≤ ↑12

tactic: rw [← le_div_iff']
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ (↑3 * (69 / 50)) ^ 2 * log 2 ≤ ↑12
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ log 2 ≤ ↑12 / (↑3 * (69 / 50)) ^ 2

α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ 0 < (↑3 * (69 / 50)) ^ 2

tactic: exact sq_pos_of_ne_zero (by norm_num1)
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ 0 < (↑3 * (69 / 50)) ^ 2
state_after: no goals

tactic: rw [← log_rpow zero_lt_two, rpow_natCast]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
⊢ ↑12 * log 2 ≤ log ↑N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
⊢ log (2 ^ 12) ≤ log ↑N

tactic: exact log_le_log (by positivity) (mod_cast hN)
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
⊢ log (2 ^ 12) ≤ log ↑N
state_after: no goals

tactic: positivity
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
⊢ 0 < 2 ^ 12
state_after: no goals

tactic: norm_num1
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 0 ≤ 69 / 50
state_after: no goals

tactic: refine div_pos zero_lt_two ?_
state_before: case refine_1
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 0 < 2 / (1 - 2 / rexp 1)
state_after: case refine_1
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 0 < 1 - 2 / rexp 1

tactic: rw [sub_pos, div_lt_one (exp_pos _)]
state_before: case refine_1
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 0 < 1 - 2 / rexp 1
state_after: case refine_1
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 2 < rexp 1

tactic: exact exp_one_gt_d9.trans_le' (by norm_num1)
state_before: case refine_1
α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 2 < rexp 1
state_after: no goals

tactic: norm_num1
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ 2 ≤ 2.7182818283
state_after: no goals

tactic: rw [← log_rpow zero_lt_two, rpow_natCast]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log 8 = ↑3 * log 2
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log 8 = log (2 ^ 3)

tactic: norm_num
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
⊢ log 8 = log (2 ^ 3)
state_after: no goals

tactic: exact log_two_lt_d9.le.trans (by norm_num1)
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ log 2 ≤ ↑12 / (↑3 * (69 / 50)) ^ 2
state_after: no goals

tactic: norm_num1
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ 0.6931471808 ≤ ↑12 / (↑3 * (69 / 50)) ^ 2
state_after: no goals

tactic: norm_num1
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 4096 ≤ N
this : ↑12 * log 2 ≤ log ↑N
l8 : log 8 = ↑3 * log 2
⊢ ↑3 * (69 / 50) ≠ 0
state_after: no goals