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

tactic: have : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N :=
  Nat.pow_le_pow_left (Nat.sub_le _ _) _
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
⊢ (2 * dValue N - 1) ^ nValue N ≤ N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ (2 * dValue N - 1) ^ nValue N ≤ N

tactic: apply this.trans
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ (2 * dValue N - 1) ^ nValue N ≤ N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ (2 * dValue N) ^ nValue N ≤ N

tactic: suffices ((2 * dValue N) ^ nValue N : ℝ) ≤ N from mod_cast this
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ (2 * dValue N) ^ nValue N ≤ N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ (2 * ↑(dValue N)) ^ nValue N ≤ ↑N

tactic: suffices i : (2 * dValue N : ℝ) ≤ (N : ℝ) ^ (nValue N : ℝ)⁻¹ by
  rw [← rpow_natCast]
  apply (rpow_le_rpow (mul_nonneg zero_le_two (cast_nonneg _)) i (cast_nonneg _)).trans
  rw [← rpow_mul (cast_nonneg _), inv_mul_cancel, rpow_one]
  rw [cast_ne_zero]
  apply (nValue_pos hN).ne'
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ (2 * ↑(dValue N)) ^ nValue N ≤ ↑N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹

tactic: rw [← le_div_iff']
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹ / 2

α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ 0 < 2

tactic: apply zero_lt_two
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ 0 < 2
state_after: no goals

tactic: rw [← rpow_natCast]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ (2 * ↑(dValue N)) ^ nValue N ≤ ↑N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ (2 * ↑(dValue N)) ^ ↑(nValue N) ≤ ↑N

tactic: apply (rpow_le_rpow (mul_nonneg zero_le_two (cast_nonneg _)) i (cast_nonneg _)).trans
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ (2 * ↑(dValue N)) ^ ↑(nValue N) ≤ ↑N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ (↑N ^ (↑(nValue N))⁻¹) ^ ↑(nValue N) ≤ ↑N

tactic: rw [← rpow_mul (cast_nonneg _), inv_mul_cancel, rpow_one]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ (↑N ^ (↑(nValue N))⁻¹) ^ ↑(nValue N) ≤ ↑N
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ ↑(nValue N) ≠ 0

tactic: rw [cast_ne_zero]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ ↑(nValue N) ≠ 0
state_after: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ nValue N ≠ 0

tactic: apply (nValue_pos hN).ne'
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
i : 2 * ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹
⊢ nValue N ≠ 0
state_after: no goals

tactic: exact floor_le (div_nonneg (rpow_nonneg (cast_nonneg _) _) zero_le_two)
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
hN : 2 ≤ N
this : (2 * dValue N - 1) ^ nValue N ≤ (2 * dValue N) ^ nValue N
⊢ ↑(dValue N) ≤ ↑N ^ (↑(nValue N))⁻¹ / 2
state_after: no goals