File: Mathlib/Computability/AkraBazzi/AkraBazzi.lean

full_name: AkraBazziRecurrence.dist_r_b
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: (fun n => ↑(r i n) - b i * ↑n) =o[Filter.atTop] fun n => ↑n / Real.log ↑n ^ 2

full_name: AkraBazziRecurrence.r_lt_n
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: self.n₀ ≤ n → r i n < n

full_name: AkraBazziRecurrence.a_pos
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: 0 < a i

full_name: AkraBazziRecurrence.b_pos
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: 0 < b i

full_name: AkraBazziRecurrence.n₀_gt_zero
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: 0 < self.n₀

full_name: AkraBazziRecurrence.n₀
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: ℕ

full_name: AkraBazziRecurrence
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: Type

full_name: AkraBazziRecurrence.b_lt_one
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: b i < 1

full_name: AkraBazziRecurrence.T_gt_zero'
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: 0 < T n

full_name: AkraBazziRecurrence.g_nonneg
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: x ≥ 0 → 0 ≤ g x

full_name: AkraBazziRecurrence.g_grows_poly
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: AkraBazziRecurrence.GrowsPolynomially g

full_name: AkraBazziRecurrence.h_rec
code: /-- An Akra-Bazzi recurrence is a function that satisfies the recurrence
`T n = (∑ i, a i * T (r i n)) + g n`. -/
structure AkraBazziRecurrence {α : Type*} [Fintype α] [Nonempty α]
    (T : ℕ → ℝ) (g : ℝ → ℝ) (a : α → ℝ) (b : α → ℝ) (r : α → ℕ → ℕ) where
  /-- Point below which the recurrence is in the base case -/
  n₀ : ℕ
  /-- `n₀` is always `> 0` -/
  n₀_gt_zero : 0 < n₀
  /-- The `a`'s are nonzero -/
  a_pos : ∀ i, 0 < a i
  /-- The `b`'s are nonzero -/
  b_pos : ∀ i, 0 < b i
  /-- The b's are less than 1 -/
  b_lt_one : ∀ i, b i < 1
  /-- `g` is nonnegative -/
  g_nonneg : ∀ x ≥ 0, 0 ≤ g x
  /-- `g` grows polynomially -/
  g_grows_poly : AkraBazziRecurrence.GrowsPolynomially g
  /-- The actual recurrence -/
  h_rec (n : ℕ) (hn₀ : n₀ ≤ n) : T n = (∑ i, a i * T (r i n)) + g n
  /-- Base case: `T(n) > 0` whenever `n < n₀` -/
  T_gt_zero' (n : ℕ) (hn : n < n₀) : 0 < T n
  /-- The `r`'s always reduce `n` -/
  r_lt_n : ∀ i n, n₀ ≤ n → r i n < n
  /-- The `r`'s approximate the `b`'s -/
  dist_r_b : ∀ i, (fun n => (r i n : ℝ) - b i * n) =o[atTop] fun n => n / (log n) ^ 2
goal: T n = ∑ i : α, a i * T (r i n) + g ↑n

full_name: AkraBazziRecurrence.min_bi
code: /-- Smallest `b i` -/
noncomputable def min_bi (b : α → ℝ) : α 
goal: α

full_name: AkraBazziRecurrence.max_bi
code: /-- Largest `b i` -/
noncomputable def max_bi (b : α → ℝ) : α 
goal: α

full_name: AkraBazziRecurrence.min_bi_le
code: @[aesop safe apply]
lemma min_bi_le {b : α → ℝ} (i : α) : b (min_bi b) ≤ b i 
goal: b (AkraBazziRecurrence.min_bi b) ≤ b i

full_name: AkraBazziRecurrence.max_bi_le
code: @[aesop safe apply]
lemma max_bi_le {b : α → ℝ} (i : α) : b i ≤ b (max_bi b) 
goal: b i ≤ b (AkraBazziRecurrence.max_bi b)

full_name: AkraBazziRecurrence.dist_r_b'
code: lemma dist_r_b' : ∀ᶠ n in atTop, ∀ i, ‖(r i n : ℝ) - b i * n‖ ≤ n / log n ^ 2 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), ‖↑(r i n) - b i * ↑n‖ ≤ ↑n / Real.log ↑n ^ 2

full_name: AkraBazziRecurrence.isLittleO_self_div_log_id
code: lemma isLittleO_self_div_log_id :
    (fun (n : ℕ) => n / log n ^ 2) =o[atTop] (fun (n : ℕ) => (n : ℝ)) 
goal: (fun n => ↑n / Real.log ↑n ^ 2) =o[Filter.atTop] fun n => ↑n

full_name: AkraBazziRecurrence.eventually_b_le_r
code: lemma eventually_b_le_r : ∀ᶠ (n : ℕ) in atTop, ∀ i, (b i : ℝ) * n - (n / log n ^ 2) ≤ r i n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), b i * ↑n - ↑n / Real.log ↑n ^ 2 ≤ ↑(r i n)

full_name: AkraBazziRecurrence.eventually_r_le_b
code: lemma eventually_r_le_b : ∀ᶠ (n : ℕ) in atTop, ∀ i, r i n ≤ (b i : ℝ) * n + (n / log n ^ 2) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), ↑(r i n) ≤ b i * ↑n + ↑n / Real.log ↑n ^ 2

full_name: AkraBazziRecurrence.eventually_r_lt_n
code: lemma eventually_r_lt_n : ∀ᶠ (n : ℕ) in atTop, ∀ i, r i n < n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), r i n < n

full_name: AkraBazziRecurrence.eventually_bi_mul_le_r
code: lemma eventually_bi_mul_le_r : ∀ᶠ (n : ℕ) in atTop, ∀ i, (b (min_bi b) / 2) * n ≤ r i n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), b (AkraBazziRecurrence.min_bi b) / 2 * ↑n ≤ ↑(r i n)

full_name: AkraBazziRecurrence.bi_min_div_two_lt_one
code: lemma bi_min_div_two_lt_one : b (min_bi b) / 2 < 1 
goal: b (AkraBazziRecurrence.min_bi b) / 2 < 1

full_name: AkraBazziRecurrence.bi_min_div_two_pos
code: lemma bi_min_div_two_pos : 0 < b (min_bi b) / 2 
goal: 0 < b (AkraBazziRecurrence.min_bi b) / 2

full_name: AkraBazziRecurrence.exists_eventually_const_mul_le_r
code: lemma exists_eventually_const_mul_le_r :
    ∃ c ∈ Set.Ioo (0 : ℝ) 1, ∀ᶠ (n : ℕ) in atTop, ∀ i, c * n ≤ r i n 
goal: ∃ c ∈ Set.Ioo 0 1, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), c * ↑n ≤ ↑(r i n)

full_name: AkraBazziRecurrence.eventually_r_ge
code: lemma eventually_r_ge (C : ℝ) : ∀ᶠ (n : ℕ) in atTop, ∀ i, C ≤ r i n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), C ≤ ↑(r i n)

full_name: AkraBazziRecurrence.tendsto_atTop_r
code: lemma tendsto_atTop_r (i : α) : Tendsto (r i) atTop atTop 
goal: Filter.Tendsto (r i) Filter.atTop Filter.atTop

full_name: AkraBazziRecurrence.tendsto_atTop_r_real
code: lemma tendsto_atTop_r_real (i : α) : Tendsto (fun n => (r i n : ℝ)) atTop atTop 
goal: Filter.Tendsto (fun n => ↑(r i n)) Filter.atTop Filter.atTop

full_name: AkraBazziRecurrence.exists_eventually_r_le_const_mul
code: lemma exists_eventually_r_le_const_mul :
    ∃ c ∈ Set.Ioo (0 : ℝ) 1, ∀ᶠ (n : ℕ) in atTop, ∀ i, r i n ≤ c * n 
goal: ∃ c ∈ Set.Ioo 0 1, ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), ↑(r i n) ≤ c * ↑n

full_name: AkraBazziRecurrence.eventually_r_pos
code: lemma eventually_r_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < r i n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < r i n

full_name: AkraBazziRecurrence.eventually_log_b_mul_pos
code: lemma eventually_log_b_mul_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < log (b i * n) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < Real.log (b i * ↑n)

full_name: AkraBazziRecurrence.T_pos
code: @[aesop safe apply] lemma T_pos (n : ℕ) : 0 < T n 
goal: 0 < T n

full_name: AkraBazziRecurrence.T_nonneg
code: @[aesop safe apply]
lemma T_nonneg (n : ℕ) : 0 ≤ T n 
goal: 0 ≤ T n

full_name: AkraBazziRecurrence.smoothingFn
code: /-- The "smoothing function" is defined as `1 / log n`. This is defined as an `ℝ → ℝ` function
as opposed to `ℕ → ℝ` since this is more convenient for the proof, where we need to e.g. take
derivatives. -/
noncomputable def smoothingFn (n : ℝ) : ℝ 
goal: ℝ

full_name: AkraBazziRecurrence._aux_Mathlib_Computability_AkraBazzi_AkraBazzi___unexpand_AkraBazziRecurrence_smoothingFn_1
code: local notation "ε" => smoothingFn
goal: Lean.PrettyPrinter.Unexpander

full_name: AkraBazziRecurrence._aux_Mathlib_Computability_AkraBazzi_AkraBazzi___macroRules_AkraBazziRecurrence_termε_1
code: local notation "ε" => smoothingFn
goal: Lean.Macro

full_name: AkraBazziRecurrence.one_add_smoothingFn_le_two
code: lemma one_add_smoothingFn_le_two {x : ℝ} (hx : exp 1 ≤ x) : 1 + ε x ≤ 2 
goal: 1 + AkraBazziRecurrence.smoothingFn x ≤ 2

full_name: AkraBazziRecurrence.isLittleO_smoothingFn_one
code: lemma isLittleO_smoothingFn_one : ε =o[atTop] (fun _ => (1 : ℝ)) 
goal: AkraBazziRecurrence.smoothingFn =o[Filter.atTop] fun x => 1

full_name: AkraBazziRecurrence.isEquivalent_one_add_smoothingFn_one
code: lemma isEquivalent_one_add_smoothingFn_one : (fun x => 1 + ε x) ~[atTop] (fun _ => (1 : ℝ)) 
goal: (fun x => 1 + AkraBazziRecurrence.smoothingFn x) ~[Filter.atTop] fun x => 1

full_name: AkraBazziRecurrence.isEquivalent_one_sub_smoothingFn_one
code: lemma isEquivalent_one_sub_smoothingFn_one : (fun x => 1 - ε x) ~[atTop] (fun _ => (1 : ℝ)) 
goal: (fun x => 1 - AkraBazziRecurrence.smoothingFn x) ~[Filter.atTop] fun x => 1

full_name: AkraBazziRecurrence.growsPolynomially_one_sub_smoothingFn
code: lemma growsPolynomially_one_sub_smoothingFn : GrowsPolynomially fun x => 1 - ε x 
goal: AkraBazziRecurrence.GrowsPolynomially fun x => 1 - AkraBazziRecurrence.smoothingFn x

full_name: AkraBazziRecurrence.growsPolynomially_one_add_smoothingFn
code: lemma growsPolynomially_one_add_smoothingFn : GrowsPolynomially fun x => 1 + ε x 
goal: AkraBazziRecurrence.GrowsPolynomially fun x => 1 + AkraBazziRecurrence.smoothingFn x

full_name: AkraBazziRecurrence.eventually_one_sub_smoothingFn_gt_const_real
code: lemma eventually_one_sub_smoothingFn_gt_const_real (c : ℝ) (hc : c < 1) :
    ∀ᶠ (x : ℝ) in atTop, c < 1 - ε x 
goal: ∀ᶠ (x : ℝ) in Filter.atTop, c < 1 - AkraBazziRecurrence.smoothingFn x

full_name: AkraBazziRecurrence.eventually_one_sub_smoothingFn_gt_const
code: lemma eventually_one_sub_smoothingFn_gt_const (c : ℝ) (hc : c < 1) :
    ∀ᶠ (n : ℕ) in atTop, c < 1 - ε n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, c < 1 - AkraBazziRecurrence.smoothingFn ↑n

full_name: AkraBazziRecurrence.eventually_one_sub_smoothingFn_pos_real
code: lemma eventually_one_sub_smoothingFn_pos_real : ∀ᶠ (x : ℝ) in atTop, 0 < 1 - ε x 
goal: ∀ᶠ (x : ℝ) in Filter.atTop, 0 < 1 - AkraBazziRecurrence.smoothingFn x

full_name: AkraBazziRecurrence.eventually_one_sub_smoothingFn_pos
code: lemma eventually_one_sub_smoothingFn_pos : ∀ᶠ (n : ℕ) in atTop, 0 < 1 - ε n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, 0 < 1 - AkraBazziRecurrence.smoothingFn ↑n

full_name: AkraBazziRecurrence.eventually_one_sub_smoothingFn_nonneg
code: lemma eventually_one_sub_smoothingFn_nonneg : ∀ᶠ (n : ℕ) in atTop, 0 ≤ 1 - ε n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, 0 ≤ 1 - AkraBazziRecurrence.smoothingFn ↑n

full_name: AkraBazziRecurrence.eventually_one_sub_smoothingFn_r_pos
code: lemma eventually_one_sub_smoothingFn_r_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < 1 - ε (r i n) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < 1 - AkraBazziRecurrence.smoothingFn ↑(r i n)

full_name: AkraBazziRecurrence.differentiableAt_smoothingFn
code: @[aesop safe apply]
lemma differentiableAt_smoothingFn {x : ℝ} (hx : 1 < x) : DifferentiableAt ℝ ε x 
goal: DifferentiableAt ℝ AkraBazziRecurrence.smoothingFn x

full_name: AkraBazziRecurrence.differentiableAt_one_sub_smoothingFn
code: @[aesop safe apply]
lemma differentiableAt_one_sub_smoothingFn {x : ℝ} (hx : 1 < x) :
    DifferentiableAt ℝ (fun z => 1 - ε z) x 
goal: DifferentiableAt ℝ (fun z => 1 - AkraBazziRecurrence.smoothingFn z) x

full_name: AkraBazziRecurrence.differentiableOn_one_sub_smoothingFn
code: lemma differentiableOn_one_sub_smoothingFn : DifferentiableOn ℝ (fun z => 1 - ε z) (Set.Ioi 1) 
goal: DifferentiableOn ℝ (fun z => 1 - AkraBazziRecurrence.smoothingFn z) (Set.Ioi 1)

full_name: AkraBazziRecurrence.differentiableAt_one_add_smoothingFn
code: @[aesop safe apply]
lemma differentiableAt_one_add_smoothingFn {x : ℝ} (hx : 1 < x) :
    DifferentiableAt ℝ (fun z => 1 + ε z) x 
goal: DifferentiableAt ℝ (fun z => 1 + AkraBazziRecurrence.smoothingFn z) x

full_name: AkraBazziRecurrence.differentiableOn_one_add_smoothingFn
code: lemma differentiableOn_one_add_smoothingFn : DifferentiableOn ℝ (fun z => 1 + ε z) (Set.Ioi 1) 
goal: DifferentiableOn ℝ (fun z => 1 + AkraBazziRecurrence.smoothingFn z) (Set.Ioi 1)

full_name: AkraBazziRecurrence.deriv_smoothingFn
code: lemma deriv_smoothingFn {x : ℝ} (hx : 1 < x) : deriv ε x = -x⁻¹ / (log x ^ 2) 
goal: deriv AkraBazziRecurrence.smoothingFn x = -x⁻¹ / Real.log x ^ 2

full_name: AkraBazziRecurrence.isLittleO_deriv_smoothingFn
code: lemma isLittleO_deriv_smoothingFn : deriv ε =o[atTop] fun x => x⁻¹ 
goal: deriv AkraBazziRecurrence.smoothingFn =o[Filter.atTop] fun x => x⁻¹

full_name: AkraBazziRecurrence.eventually_deriv_one_sub_smoothingFn
code: lemma eventually_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =ᶠ[atTop] fun x => x⁻¹ / (log x ^ 2) 
goal: (deriv fun x => 1 - AkraBazziRecurrence.smoothingFn x) =ᶠ[Filter.atTop] fun x => x⁻¹ / Real.log x ^ 2

full_name: AkraBazziRecurrence.eventually_deriv_one_add_smoothingFn
code: lemma eventually_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =ᶠ[atTop] fun x => -x⁻¹ / (log x ^ 2) 
goal: (deriv fun x => 1 + AkraBazziRecurrence.smoothingFn x) =ᶠ[Filter.atTop] fun x => -x⁻¹ / Real.log x ^ 2

full_name: AkraBazziRecurrence.isLittleO_deriv_one_sub_smoothingFn
code: lemma isLittleO_deriv_one_sub_smoothingFn :
    deriv (fun x => 1 - ε x) =o[atTop] fun (x : ℝ) => x⁻¹ 
goal: (deriv fun x => 1 - AkraBazziRecurrence.smoothingFn x) =o[Filter.atTop] fun x => x⁻¹

full_name: AkraBazziRecurrence.isLittleO_deriv_one_add_smoothingFn
code: lemma isLittleO_deriv_one_add_smoothingFn :
    deriv (fun x => 1 + ε x) =o[atTop] fun (x : ℝ) => x⁻¹ 
goal: (deriv fun x => 1 + AkraBazziRecurrence.smoothingFn x) =o[Filter.atTop] fun x => x⁻¹

full_name: AkraBazziRecurrence.eventually_one_add_smoothingFn_pos
code: lemma eventually_one_add_smoothingFn_pos : ∀ᶠ (n : ℕ) in atTop, 0 < 1 + ε n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, 0 < 1 + AkraBazziRecurrence.smoothingFn ↑n

full_name: AkraBazziRecurrence.eventually_one_add_smoothingFn_r_pos
code: lemma eventually_one_add_smoothingFn_r_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < 1 + ε (r i n) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < 1 + AkraBazziRecurrence.smoothingFn ↑(r i n)

full_name: AkraBazziRecurrence.eventually_one_add_smoothingFn_nonneg
code: lemma eventually_one_add_smoothingFn_nonneg : ∀ᶠ (n : ℕ) in atTop, 0 ≤ 1 + ε n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, 0 ≤ 1 + AkraBazziRecurrence.smoothingFn ↑n

full_name: AkraBazziRecurrence.strictAntiOn_smoothingFn
code: lemma strictAntiOn_smoothingFn : StrictAntiOn ε (Set.Ioi 1) 
goal: StrictAntiOn AkraBazziRecurrence.smoothingFn (Set.Ioi 1)

full_name: AkraBazziRecurrence.strictMonoOn_one_sub_smoothingFn
code: lemma strictMonoOn_one_sub_smoothingFn :
    StrictMonoOn (fun (x : ℝ) => (1 : ℝ) - ε x) (Set.Ioi 1) 
goal: StrictMonoOn (fun x => 1 - AkraBazziRecurrence.smoothingFn x) (Set.Ioi 1)

full_name: AkraBazziRecurrence.strictAntiOn_one_add_smoothingFn
code: lemma strictAntiOn_one_add_smoothingFn : StrictAntiOn (fun (x : ℝ) => (1 : ℝ) + ε x) (Set.Ioi 1) 
goal: StrictAntiOn (fun x => 1 + AkraBazziRecurrence.smoothingFn x) (Set.Ioi 1)

full_name: AkraBazziRecurrence.isEquivalent_smoothingFn_sub_self
code: lemma isEquivalent_smoothingFn_sub_self (i : α) :
    (fun (n : ℕ) => ε (b i * n) - ε n) ~[atTop] fun n => -log (b i) / (log n)^2 
goal: (fun n => AkraBazziRecurrence.smoothingFn (b i * ↑n) - AkraBazziRecurrence.smoothingFn ↑n) ~[Filter.atTop] fun n =>
  -Real.log (b i) / Real.log ↑n ^ 2

full_name: AkraBazziRecurrence.isTheta_smoothingFn_sub_self
code: lemma isTheta_smoothingFn_sub_self (i : α) :
    (fun (n : ℕ) => ε (b i * n) - ε n) =Θ[atTop] fun n => 1 / (log n)^2 
goal: (fun n => AkraBazziRecurrence.smoothingFn (b i * ↑n) - AkraBazziRecurrence.smoothingFn ↑n) =Θ[Filter.atTop] fun n =>
  1 / Real.log ↑n ^ 2

full_name: AkraBazziRecurrence.continuous_sumCoeffsExp
code: @[continuity]
lemma continuous_sumCoeffsExp : Continuous (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) 
goal: Continuous fun p => ∑ i : α, a i * b i ^ p

full_name: AkraBazziRecurrence.strictAnti_sumCoeffsExp
code: lemma strictAnti_sumCoeffsExp : StrictAnti (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) 
goal: StrictAnti fun p => ∑ i : α, a i * b i ^ p

full_name: AkraBazziRecurrence.tendsto_zero_sumCoeffsExp
code: lemma tendsto_zero_sumCoeffsExp : Tendsto (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) atTop (𝓝 0) 
goal: Filter.Tendsto (fun p => ∑ i : α, a i * b i ^ p) Filter.atTop (𝓝 0)

full_name: AkraBazziRecurrence.tendsto_atTop_sumCoeffsExp
code: lemma tendsto_atTop_sumCoeffsExp : Tendsto (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) atBot atTop 
goal: Filter.Tendsto (fun p => ∑ i : α, a i * b i ^ p) Filter.atBot Filter.atTop

full_name: AkraBazziRecurrence.one_mem_range_sumCoeffsExp
code: lemma one_mem_range_sumCoeffsExp : 1 ∈ Set.range (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) 
goal: 1 ∈ Set.range fun p => ∑ i : α, a i * b i ^ p

full_name: AkraBazziRecurrence.injective_sumCoeffsExp
code: /-- The function x ↦ ∑ a_i b_i^x is injective. This implies the uniqueness of `p`. -/
lemma injective_sumCoeffsExp : Function.Injective (fun (p : ℝ) => ∑ i, a i * (b i) ^ p) 
goal: Function.Injective fun p => ∑ i : α, a i * b i ^ p

full_name: AkraBazziRecurrence.wrapped._@.Mathlib.Computability.AkraBazzi.AkraBazzi._hyg.10676
code: /-- The exponent `p` associated with a particular Akra-Bazzi recurrence. -/
noncomputable irreducible_def p : ℝ 
goal: Subtype (Eq @AkraBazziRecurrence.definition✝)

full_name: AkraBazziRecurrence.definition._@.Mathlib.Computability.AkraBazzi.AkraBazzi._hyg.10676
code: /-- The exponent `p` associated with a particular Akra-Bazzi recurrence. -/
noncomputable irreducible_def p : ℝ 
goal: ℝ

full_name: AkraBazziRecurrence.p_def
code: /-- The exponent `p` associated with a particular Akra-Bazzi recurrence. -/
noncomputable irreducible_def p : ℝ 
goal: AkraBazziRecurrence.p a b = Function.invFun (fun p => ∑ i : α, a i * b i ^ p) 1

full_name: AkraBazziRecurrence.p
code: /-- The exponent `p` associated with a particular Akra-Bazzi recurrence. -/
noncomputable irreducible_def p : ℝ 
goal: ℝ

full_name: AkraBazziRecurrence.sumCoeffsExp_p_eq_one
code: @[simp]
lemma sumCoeffsExp_p_eq_one : ∑ i, a i * (b i) ^ p a b = 1 
goal: ∑ i : α, a i * b i ^ AkraBazziRecurrence.p a b = 1

full_name: AkraBazziRecurrence.sumTransform
code: /-- The transformation which turns a function `g` into
`n^p * ∑ u ∈ Finset.Ico n₀ n, g u / u^(p+1)`. -/
noncomputable def sumTransform (p : ℝ) (g : ℝ → ℝ) (n₀ n : ℕ) 
goal: ℝ

full_name: AkraBazziRecurrence.sumTransform_def
code: lemma sumTransform_def {p : ℝ} {g : ℝ → ℝ} {n₀ n : ℕ} :
    sumTransform p g n₀ n = n^p * ∑ u ∈ Finset.Ico n₀ n, g u / u^(p + 1) 
goal: AkraBazziRecurrence.sumTransform p g n₀ n = ↑n ^ p * ∑ u ∈ Finset.Ico n₀ n, g ↑u / ↑u ^ (p + 1)

full_name: AkraBazziRecurrence.asympBound
code: /-- The asymptotic bound satisfied by an Akra-Bazzi recurrence, namely
`n^p (1 + ∑_{u < n} g(u) / u^(p+1))`. -/
noncomputable def asympBound (n : ℕ) : ℝ 
goal: ℝ

full_name: AkraBazziRecurrence.asympBound_def
code: lemma asympBound_def {n : ℕ} : asympBound g a b n = n ^ p a b + sumTransform (p a b) g 0 n 
goal: AkraBazziRecurrence.asympBound g a b n =
  ↑n ^ AkraBazziRecurrence.p a b + AkraBazziRecurrence.sumTransform (AkraBazziRecurrence.p a b) g 0 n

full_name: AkraBazziRecurrence.asympBound_def'
code: lemma asympBound_def' {n : ℕ} :
    asympBound g a b n = n ^ p a b * (1 + (∑ u ∈ range n, g u / u ^ (p a b + 1))) 
goal: AkraBazziRecurrence.asympBound g a b n =
  ↑n ^ AkraBazziRecurrence.p a b * (1 + ∑ u ∈ Finset.range n, g ↑u / ↑u ^ (AkraBazziRecurrence.p a b + 1))

full_name: AkraBazziRecurrence.asympBound_pos
code: lemma asympBound_pos (n : ℕ) (hn : 0 < n) : 0 < asympBound g a b n 
goal: 0 < AkraBazziRecurrence.asympBound g a b n

full_name: AkraBazziRecurrence.eventually_asympBound_pos
code: lemma eventually_asympBound_pos : ∀ᶠ (n : ℕ) in atTop, 0 < asympBound g a b n 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, 0 < AkraBazziRecurrence.asympBound g a b n

full_name: AkraBazziRecurrence.eventually_asympBound_r_pos
code: lemma eventually_asympBound_r_pos : ∀ᶠ (n : ℕ) in atTop, ∀ i, 0 < asympBound g a b (r i n) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop, ∀ (i : α), 0 < AkraBazziRecurrence.asympBound g a b (r i n)

full_name: AkraBazziRecurrence.eventually_atTop_sumTransform_le
code: lemma eventually_atTop_sumTransform_le :
    ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ i, sumTransform (p a b) g (r i n) n ≤ c * g n 
goal: ∃ c > 0,
  ∀ᶠ (n : ℕ) in Filter.atTop,
    ∀ (i : α), AkraBazziRecurrence.sumTransform (AkraBazziRecurrence.p a b) g (r i n) n ≤ c * g ↑n

full_name: AkraBazziRecurrence.eventually_atTop_sumTransform_ge
code: lemma eventually_atTop_sumTransform_ge :
    ∃ c > 0, ∀ᶠ (n : ℕ) in atTop, ∀ i, c * g n ≤ sumTransform (p a b) g (r i n) n 
goal: ∃ c > 0,
  ∀ᶠ (n : ℕ) in Filter.atTop,
    ∀ (i : α), c * g ↑n ≤ AkraBazziRecurrence.sumTransform (AkraBazziRecurrence.p a b) g (r i n) n

full_name: AkraBazziRecurrence.isBigO_apply_r_sub_b
code: lemma isBigO_apply_r_sub_b (q : ℝ → ℝ) (hq_diff : DifferentiableOn ℝ q (Set.Ioi 1))
    (hq_poly : GrowsPolynomially fun x => ‖deriv q x‖) (i : α) :
    (fun n => q (r i n) - q (b i * n)) =O[atTop] fun n => (deriv q n) * (r i n - b i * n) 
goal: (fun n => q ↑(r i n) - q (b i * ↑n)) =O[Filter.atTop] fun n => deriv q ↑n * (↑(r i n) - b i * ↑n)

full_name: AkraBazziRecurrence.eventually_deriv_rpow_p_mul_one_sub_smoothingFn
code: lemma eventually_deriv_rpow_p_mul_one_sub_smoothingFn (p : ℝ) :
    deriv (fun z => z ^ p * (1 - ε z))
      =ᶠ[atTop] fun z => p * z ^ (p-1) * (1 - ε z) + z ^ (p-1) / (log z ^ 2) 
goal: (deriv fun z => z ^ p * (1 - AkraBazziRecurrence.smoothingFn z)) =ᶠ[Filter.atTop] fun z =>
  p * z ^ (p - 1) * (1 - AkraBazziRecurrence.smoothingFn z) + z ^ (p - 1) / Real.log z ^ 2

full_name: AkraBazziRecurrence.eventually_deriv_rpow_p_mul_one_add_smoothingFn
code: lemma eventually_deriv_rpow_p_mul_one_add_smoothingFn (p : ℝ) :
    deriv (fun z => z ^ p * (1 + ε z))
      =ᶠ[atTop] fun z => p * z ^ (p-1) * (1 + ε z) - z ^ (p-1) / (log z ^ 2) 
goal: (deriv fun z => z ^ p * (1 + AkraBazziRecurrence.smoothingFn z)) =ᶠ[Filter.atTop] fun z =>
  p * z ^ (p - 1) * (1 + AkraBazziRecurrence.smoothingFn z) - z ^ (p - 1) / Real.log z ^ 2

full_name: AkraBazziRecurrence.isEquivalent_deriv_rpow_p_mul_one_sub_smoothingFn
code: lemma isEquivalent_deriv_rpow_p_mul_one_sub_smoothingFn {p : ℝ} (hp : p ≠ 0) :
    deriv (fun z => z ^ p * (1 - ε z)) ~[atTop] fun z => p * z ^ (p-1) 
goal: (deriv fun z => z ^ p * (1 - AkraBazziRecurrence.smoothingFn z)) ~[Filter.atTop] fun z => p * z ^ (p - 1)

full_name: AkraBazziRecurrence.isEquivalent_deriv_rpow_p_mul_one_add_smoothingFn
code: lemma isEquivalent_deriv_rpow_p_mul_one_add_smoothingFn {p : ℝ} (hp : p ≠ 0) :
    deriv (fun z => z ^ p * (1 + ε z)) ~[atTop] fun z => p * z ^ (p-1) 
goal: (deriv fun z => z ^ p * (1 + AkraBazziRecurrence.smoothingFn z)) ~[Filter.atTop] fun z => p * z ^ (p - 1)

full_name: AkraBazziRecurrence.isTheta_deriv_rpow_p_mul_one_sub_smoothingFn
code: lemma isTheta_deriv_rpow_p_mul_one_sub_smoothingFn {p : ℝ} (hp : p ≠ 0) :
    (fun x => ‖deriv (fun z => z ^ p * (1 - ε z)) x‖) =Θ[atTop] fun z => z ^ (p-1) 
goal: (fun x => ‖deriv (fun z => z ^ p * (1 - AkraBazziRecurrence.smoothingFn z)) x‖) =Θ[Filter.atTop] fun z => z ^ (p - 1)

full_name: AkraBazziRecurrence.isTheta_deriv_rpow_p_mul_one_add_smoothingFn
code: lemma isTheta_deriv_rpow_p_mul_one_add_smoothingFn {p : ℝ} (hp : p ≠ 0) :
    (fun x => ‖deriv (fun z => z ^ p * (1 + ε z)) x‖) =Θ[atTop] fun z => z ^ (p-1) 
goal: (fun x => ‖deriv (fun z => z ^ p * (1 + AkraBazziRecurrence.smoothingFn z)) x‖) =Θ[Filter.atTop] fun z => z ^ (p - 1)

full_name: AkraBazziRecurrence.growsPolynomially_deriv_rpow_p_mul_one_sub_smoothingFn
code: lemma growsPolynomially_deriv_rpow_p_mul_one_sub_smoothingFn (p : ℝ) :
    GrowsPolynomially fun x => ‖deriv (fun z => z ^ p * (1 - ε z)) x‖ 
goal: AkraBazziRecurrence.GrowsPolynomially fun x => ‖deriv (fun z => z ^ p * (1 - AkraBazziRecurrence.smoothingFn z)) x‖

full_name: AkraBazziRecurrence.growsPolynomially_deriv_rpow_p_mul_one_add_smoothingFn
code: lemma growsPolynomially_deriv_rpow_p_mul_one_add_smoothingFn (p : ℝ) :
    GrowsPolynomially fun x => ‖deriv (fun z => z ^ p * (1 + ε z)) x‖ 
goal: AkraBazziRecurrence.GrowsPolynomially fun x => ‖deriv (fun z => z ^ p * (1 + AkraBazziRecurrence.smoothingFn z)) x‖

full_name: AkraBazziRecurrence.rpow_p_mul_one_sub_smoothingFn_le
code: lemma rpow_p_mul_one_sub_smoothingFn_le :
    ∀ᶠ (n : ℕ) in atTop, ∀ i, (r i n) ^ (p a b) * (1 - ε (r i n))
      ≤ (b i) ^ (p a b) * n ^ (p a b) * (1 - ε n) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop,
  ∀ (i : α),
    ↑(r i n) ^ AkraBazziRecurrence.p a b * (1 - AkraBazziRecurrence.smoothingFn ↑(r i n)) ≤
      b i ^ AkraBazziRecurrence.p a b * ↑n ^ AkraBazziRecurrence.p a b * (1 - AkraBazziRecurrence.smoothingFn ↑n)

full_name: AkraBazziRecurrence.rpow_p_mul_one_add_smoothingFn_ge
code: lemma rpow_p_mul_one_add_smoothingFn_ge :
    ∀ᶠ (n : ℕ) in atTop, ∀ i, (b i) ^ (p a b) * n ^ (p a b) * (1 + ε n)
      ≤ (r i n) ^ (p a b) * (1 + ε (r i n)) 
goal: ∀ᶠ (n : ℕ) in Filter.atTop,
  ∀ (i : α),
    b i ^ AkraBazziRecurrence.p a b * ↑n ^ AkraBazziRecurrence.p a b * (1 + AkraBazziRecurrence.smoothingFn ↑n) ≤
      ↑(r i n) ^ AkraBazziRecurrence.p a b * (1 + AkraBazziRecurrence.smoothingFn ↑(r i n))

full_name: AkraBazziRecurrence.base_nonempty
code: lemma base_nonempty {n : ℕ} (hn : 0 < n) : (Finset.Ico (⌊b (min_bi b) / 2 * n⌋₊) n).Nonempty 
goal: (Finset.Ico ⌊b (AkraBazziRecurrence.min_bi b) / 2 * ↑n⌋₊ n).Nonempty

full_name: AkraBazziRecurrence.T_isBigO_smoothingFn_mul_asympBound
code: /-- The main proof of the upper bound part of the Akra-Bazzi theorem. The factor
`1 - ε n` does not change the asymptotic order, but is needed for the induction step to go
through. -/
lemma T_isBigO_smoothingFn_mul_asympBound :
    T =O[atTop] (fun n => (1 - ε n) * asympBound g a b n) 
goal: T =O[Filter.atTop] fun n => (1 - AkraBazziRecurrence.smoothingFn ↑n) * AkraBazziRecurrence.asympBound g a b n

full_name: AkraBazziRecurrence.smoothingFn_mul_asympBound_isBigO_T
code: /-- The main proof of the lower bound part of the Akra-Bazzi theorem. The factor
`1 + ε n` does not change the asymptotic order, but is needed for the induction step to go
through. -/
lemma smoothingFn_mul_asympBound_isBigO_T :
    (fun (n : ℕ) => (1 + ε n) * asympBound g a b n) =O[atTop] T 
goal: (fun n => (1 + AkraBazziRecurrence.smoothingFn ↑n) * AkraBazziRecurrence.asympBound g a b n) =O[Filter.atTop] T

full_name: AkraBazziRecurrence.isBigO_asympBound
code: /-- The **Akra-Bazzi theorem**: `T ∈ O(n^p (1 + ∑_u^n g(u) / u^{p+1}))` -/
theorem isBigO_asympBound : T =O[atTop] asympBound g a b 
goal: T =O[Filter.atTop] AkraBazziRecurrence.asympBound g a b

full_name: AkraBazziRecurrence.isBigO_symm_asympBound
code: /-- The **Akra-Bazzi theorem**: `T ∈ Ω(n^p (1 + ∑_u^n g(u) / u^{p+1}))` -/
theorem isBigO_symm_asympBound : asympBound g a b =O[atTop] T 
goal: AkraBazziRecurrence.asympBound g a b =O[Filter.atTop] T

full_name: AkraBazziRecurrence.isTheta_asympBound
code: /-- The **Akra-Bazzi theorem**: `T ∈ Θ(n^p (1 + ∑_u^n g(u) / u^{p+1}))` -/
theorem isTheta_asympBound : T =Θ[atTop] asympBound g a b 
goal: T =Θ[Filter.atTop] AkraBazziRecurrence.asympBound g a b