Theorem: Behrend.dValue_pos
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: have hN₀ : 0 < (N : ℝ) := cast_pos.2 (succ_pos'.trans_le hN₃)
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
⊢ 0 < dValue N

tactic: rw [dValue, floor_pos, ← log_le_log zero_lt_one, log_one, log_div _ two_ne_zero, log_rpow hN₀,
  div_mul_eq_mul_div, one_mul, sub_nonneg, le_div_iff]
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 0 < dValue N

tactic: have : (nValue N : ℝ) ≤ 2 * sqrt (log N) := by
  apply (ceil_lt_add_one <| sqrt_nonneg _).le.trans
  rw [two_mul, add_le_add_iff_left]
  apply le_sqrt_of_sq_le
  rw [one_pow, le_log_iff_exp_le hN₀]
  exact (exp_one_lt_d9.le.trans <| by norm_num).trans (cast_le.2 hN₃)
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ log 2 * ↑(nValue N) ≤ log ↑N

tactic: apply (mul_le_mul_of_nonneg_left this <| log_nonneg one_le_two).trans _
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ log 2 * ↑(nValue N) ≤ log ↑N

tactic: rw [← mul_assoc, ← le_div_iff (Real.sqrt_pos.2 <| log_pos <| one_lt_cast.2 _), div_sqrt]
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ log 2 * (2 * Real.sqrt (log ↑N)) ≤ log ↑N

tactic: exact hN₃.trans_lt' (by norm_num)
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ 1 < N

tactic: apply (ceil_lt_add_one <| sqrt_nonneg _).le.trans
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)

tactic: rw [two_mul, add_le_add_iff_left]
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ Real.sqrt (log ↑N) + 1 ≤ 2 * Real.sqrt (log ↑N)

tactic: apply le_sqrt_of_sq_le
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 1 ≤ Real.sqrt (log ↑N)

tactic: rw [one_pow, le_log_iff_exp_le hN₀]
state_before: case h
α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 1 ^ 2 ≤ log ↑N

tactic: exact (exp_one_lt_d9.le.trans <| by norm_num).trans (cast_le.2 hN₃)
state_before: case h
α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ exp 1 ≤ ↑N

tactic: norm_num
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 2.7182818286 ≤ ↑8

tactic: apply log_two_mul_two_le_sqrt_log_eight.trans
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ log 2 * 2 ≤ Real.sqrt (log ↑N)

tactic: apply Real.sqrt_le_sqrt
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ Real.sqrt (log 8) ≤ Real.sqrt (log ↑N)

tactic: rw [log_le_log _ hN₀]
state_before: case h
α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ log 8 ≤ log ↑N

tactic: exact_mod_cast hN₃
state_before: case h
α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ 8 ≤ ↑N

tactic: norm_num
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ 0 < 8

tactic: norm_num
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
this : ↑(nValue N) ≤ 2 * Real.sqrt (log ↑N)
⊢ 1 < 8

tactic: exact cast_pos.2 (nValue_pos <| hN₃.trans' <| by norm_num)
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 0 < ↑(nValue N)

tactic: norm_num
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 2 ≤ 8

tactic: exact (rpow_pos_of_pos hN₀ _).ne'
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ ↑N ^ (1 / ↑(nValue N)) ≠ 0

tactic: exact div_pos (rpow_pos_of_pos hN₀ _) zero_lt_two
state_before: α : Type ?u.742881
β : Type ?u.742884
n d k N : ℕ
x : Fin n → ℕ
hN₃ : 8 ≤ N
hN₀ : 0 < ↑N
⊢ 0 < ↑N ^ (1 / ↑(nValue N)) / 2