AFTD Auto-Formalizing Theoretical Domains

op869_log_integer_budget_upper

theoremverified

For C≥1 and m≥2, the natural logarithm of the integer schedule budget is at most (3+2C)m³ log m.

Statement

theorem op869_log_integer_budget_upper (C m : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) :
    Real.log (((C * (m^m)^3 * 2^(C*(m+1)))^(m^2) : ℕ) : ℝ) ≤
      (3 + 2*(C : ℝ)) * (m : ℝ)^3 * Real.log (m : ℝ)
Source
The integer schedule and logarithmic inversion related to arXiv:2610.41516 Section 2.3.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

We bound the logarithm of the integer schedule budget F^(m^2), where F = C(m^m)^3 * 2^(C*(m+1)), by first expanding log F = log C + 3m log m + C(m+1) log 2. Using the elementary inequality C ≤ 2^C, we bound log C ≤ C log 2, and since m ≥ 2, we replace log 2 with log m. This produces the linear estimate log F ≤ (3 + 2C)m log m. Finally, multiplying by m^2 via the power rule for logarithms yields the required upper bound (3 + 2C)m³ log m.

  1. For every natural number n, n ≤ 2^n.

    We prove the preliminary bound n ≤ 2^n by induction on n. The base case n = 0 holds since 0 ≤ 2^0 = 1. For the inductive step, we note that 2^n ≥ 1 via Nat.one_le_pow, and rewrite 2^(n+1) as 2^n * 2 using pow_succ. Since 2^n * 2 = 2^n + 2^n ≥ n + 1 by the induction hypothesis n ≤ 2^n and 1 ≤ 2^n, linear integer arithmetic (omega) closes the case.

    lines 1–7

    uses Nat.one_le_pow, pow_succ

    lemma op869_nat_le_two_pow_tmp (n : ℕ) : n ≤ 2^n := by
      induction n with
      | zero => norm_num
      | succ n ih =>
        have hp : 1 ≤ 2^n := by exact Nat.one_le_pow n 2 (by decide)
        rw [pow_succ]
        omega
  2. C > 0, m > 0, m ≥ 2, C ≥ 0, log m ≥ 0, log 2 ≤ log m, and C ≤ 2^C as real inequalities.

    From the hypotheses C ≥ 1 and m ≥ 2, integer arithmetic (omega) gives C > 0 and m > 0. Casting these to the real numbers yields m ≥ 2 and C ≥ 0. Since m ≥ 2 ≥ 1, we have log m ≥ 0 by Real.log_nonneg. Because 2 ≤ m with 2 > 0, monotonicity of the logarithm (Real.log_le_log) implies log 2 ≤ log m. Finally, casting the helper lemma op869_nat_le_two_pow_tmp gives C ≤ 2^C in the reals.

    lines 10–19

    uses Real.log_nonneg, Real.log_le_log, op869_nat_le_two_pow_tmp

    theorem op869_log_integer_budget_upper (C m : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) :
        Real.log (((C * (m^m)^3 * 2^(C*(m+1)))^(m^2) : ℕ) : ℝ) ≤
          (3 + 2*(C : ℝ)) * (m : ℝ)^3 * Real.log (m : ℝ) := by
      have hC0 : 0 < C := by omega
      have hm0 : 0 < m := by omega
      have hmR : (2 : ℝ) ≤ (m : ℝ) := by exact_mod_cast hm
      have hCr : (0 : ℝ) ≤ C := by positivity
      have hlogm : 0 ≤ Real.log (m : ℝ) := Real.log_nonneg (by linarith)
      have hlog2le : Real.log 2 ≤ Real.log (m : ℝ) := Real.log_le_log (by norm_num) hmR
      have hc2 : (C : ℝ) ≤ (2 : ℝ)^C := by exact_mod_cast op869_nat_le_two_pow_tmp C
  3. log C ≤ C * log 2.

    Applying the monotonicity of the logarithm (Real.log_le_log) to C ≤ 2^C gives log C ≤ log(2^C). The power rule for logarithms (Real.log_pow) rewrites log(2^C) as C * log 2, establishing the bound.

    lines 20–23

    uses Real.log_le_log, Real.log_pow

      have hlogC : Real.log (C : ℝ) ≤ (C : ℝ) * Real.log 2 := by
        calc
          Real.log (C : ℝ) ≤ Real.log ((2 : ℝ)^C) := Real.log_le_log (by positivity) hc2
          _ = (C : ℝ) * Real.log 2 := Real.log_pow _ _
  4. F > 0 and log F = log C + 3m * log m + C(m+1) * log 2, where F = C(m^m)^3 * 2^(C*(m+1)).

    We define F = C(m^m)^3 * 2^(C*(m+1)) and verify F > 0 by positivity. Expanding log F by applying the product rule Real.log_mul twice separates the three factors. Then applying the power rule Real.log_pow along with cast lemmas (Nat.cast_mul, Nat.cast_add, Nat.cast_one) evaluates log((m^m)^3) = 3m * log m and log(2^(C*(m+1))) = C(m+1) * log 2, and ring arithmetic simplifies the sum to the desired form.

    lines 24–33

    uses Real.log_mul, Real.log_pow, Nat.cast_mul, Nat.cast_add, Nat.cast_one

      let F : ℕ := C * (m^m)^3 * 2^(C*(m+1))
      have hF0 : 0 < F := by dsimp [F]; positivity
      have hlogF : Real.log (F : ℝ) = Real.log (C : ℝ) + 3*(m : ℝ)*Real.log (m : ℝ) +
          (C : ℝ)*((m : ℝ)+1)*Real.log 2 := by
        dsimp [F]
        push_cast
        rw [Real.log_mul (by positivity) (by positivity)]
        rw [Real.log_mul (by positivity) (by positivity)]
        simp only [Real.log_pow, Nat.cast_mul, Nat.cast_add, Nat.cast_one]
        ring
  5. log F ≤ (3 + 2C) * m * log m.

    Since C ≥ 0, m ≥ 2, and log m ≥ log 2, the products C * (log m - log 2), C(m+1) * (log m - log 2), and C(m-2) * log m are all non-negative by mul_nonneg and sub_nonneg.mpr. Substituting the explicit expansion of log F, the non-linear arithmetic tactic nlinarith combines these three non-negative terms with log C ≤ C * log 2 to absorb lower-order terms into (3 + 2C) * m * log m.

    lines 34–42

    uses mul_nonneg, sub_nonneg.mpr

      have hmul1 : 0 ≤ (C : ℝ) * (Real.log (m : ℝ) - Real.log 2) :=
        mul_nonneg hCr (sub_nonneg.mpr hlog2le)
      have hmul2 : 0 ≤ ((C : ℝ) * ((m : ℝ)+1)) * (Real.log (m : ℝ) - Real.log 2) :=
        mul_nonneg (by positivity) (sub_nonneg.mpr hlog2le)
      have hmul3 : 0 ≤ ((C : ℝ) * ((m : ℝ)-2)) * Real.log (m : ℝ) :=
        mul_nonneg (mul_nonneg hCr (by linarith)) hlogm
      have hupper : Real.log (F : ℝ) ≤ (3+2*(C : ℝ))*(m : ℝ)*Real.log (m : ℝ) := by
        rw [hlogF]
        nlinarith
  6. log(F^(m^2)) ≤ (3 + 2C) * m^3 * log m.

    We rewrite the logarithm of the total budget F^(m^2) as m^2 * log F using the power rule Real.log_pow. Multiplying the bound log F ≤ (3 + 2C) * m * log m by m^2 ≥ 0 via mul_le_mul_of_nonneg_left, and simplifying m^2 * ((3 + 2C) * m * log m) = (3 + 2C) * m^3 * log m by ring arithmetic, finishes the proof.

    lines 43–50

    uses Real.log_pow, mul_le_mul_of_nonneg_left

      change Real.log ((F^(m^2) : ℕ) : ℝ) ≤ _
      push_cast
      rw [Real.log_pow]
      push_cast
      calc
        (m : ℝ)^2 * Real.log (F : ℝ) ≤ (m : ℝ)^2 * ((3+2*(C : ℝ))*(m : ℝ)*Real.log (m : ℝ)) :=
          mul_le_mul_of_nonneg_left hupper (by positivity)
        _ = (3+2*(C : ℝ))*(m : ℝ)^3*Real.log (m : ℝ) := by ring
Nat.one_le_pow
If a natural number m is positive, then m^n ≥ 1 for any exponent n.
pow_succ
In any monoid, a^(n+1) = a^n * a.
Real.log_nonneg
The natural logarithm of any real number x ≥ 1 is non-negative.
Real.log_le_log
The natural logarithm is monotone: if 0 < x ≤ y, then log x ≤ log y.
op869_nat_le_two_pow_tmp
For any natural number n, n ≤ 2^n.
Real.log_pow
For any real number x and natural number n, log(x^n) = n * log x.
Real.log_mul
For non-zero real numbers x and y, log(x * y) = log x + log y.
Nat.cast_mul
The cast of a product of natural numbers equals the product of their casts.
Nat.cast_add
The cast of a sum of natural numbers equals the sum of their casts.
Nat.cast_one
The cast of the natural number 1 into an additive monoid with one is 1.
mul_nonneg
The product of two non-negative elements is non-negative.
sub_nonneg.mpr
If b ≤ a, then a - b ≥ 0.
mul_le_mul_of_nonneg_left
Multiplying both sides of an inequality b ≤ c by a non-negative element a on the left preserves the inequality: a * b ≤ a * c.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

lemma op869_nat_le_two_pow_tmp (n : ℕ) : n ≤ 2^n := by  induction n with  | zero => norm_num  | succ n ih =>    have hp : 1 ≤ 2^n := by exact Nat.one_le_pow n 2 (by decide)    rw [pow_succ]    omega/-- Upper bound for the logarithm of the integer fold-schedule budget. -/theorem op869_log_integer_budget_upper (C m : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) :    Real.log (((C * (m^m)^3 * 2^(C*(m+1)))^(m^2) : ℕ) : ℝ) ≤      (3 + 2*(C : ℝ)) * (m : ℝ)^3 * Real.log (m : ℝ) := by  have hC0 : 0 < C := by omega  have hm0 : 0 < m := by omega  have hmR : (2 : ℝ) ≤ (m : ℝ) := by exact_mod_cast hm  have hCr : (0 : ℝ) ≤ C := by positivity  have hlogm : 0 ≤ Real.log (m : ℝ) := Real.log_nonneg (by linarith)  have hlog2le : Real.log 2 ≤ Real.log (m : ℝ) := Real.log_le_log (by norm_num) hmR  have hc2 : (C : ℝ) ≤ (2 : ℝ)^C := by exact_mod_cast op869_nat_le_two_pow_tmp C  have hlogC : Real.log (C : ℝ) ≤ (C : ℝ) * Real.log 2 := by    calc      Real.log (C : ℝ) ≤ Real.log ((2 : ℝ)^C) := Real.log_le_log (by positivity) hc2      _ = (C : ℝ) * Real.log 2 := Real.log_pow _ _  let F : ℕ := C * (m^m)^3 * 2^(C*(m+1))  have hF0 : 0 < F := by dsimp [F]; positivity  have hlogF : Real.log (F : ℝ) = Real.log (C : ℝ) + 3*(m : ℝ)*Real.log (m : ℝ) +      (C : ℝ)*((m : ℝ)+1)*Real.log 2 := by    dsimp [F]    push_cast    rw [Real.log_mul (by positivity) (by positivity)]    rw [Real.log_mul (by positivity) (by positivity)]    simp only [Real.log_pow, Nat.cast_mul, Nat.cast_add, Nat.cast_one]    ring  have hmul1 : 0 ≤ (C : ℝ) * (Real.log (m : ℝ) - Real.log 2) :=    mul_nonneg hCr (sub_nonneg.mpr hlog2le)  have hmul2 : 0 ≤ ((C : ℝ) * ((m : ℝ)+1)) * (Real.log (m : ℝ) - Real.log 2) :=    mul_nonneg (by positivity) (sub_nonneg.mpr hlog2le)  have hmul3 : 0 ≤ ((C : ℝ) * ((m : ℝ)-2)) * Real.log (m : ℝ) :=    mul_nonneg (mul_nonneg hCr (by linarith)) hlogm  have hupper : Real.log (F : ℝ) ≤ (3+2*(C : ℝ))*(m : ℝ)*Real.log (m : ℝ) := by    rw [hlogF]    nlinarith  change Real.log ((F^(m^2) : ℕ) : ℝ) ≤ _  push_cast  rw [Real.log_pow]  push_cast  calc    (m : ℝ)^2 * Real.log (F : ℝ) ≤ (m : ℝ)^2 * ((3+2*(C : ℝ))*(m : ℝ)*Real.log (m : ℝ)) :=      mul_le_mul_of_nonneg_left hupper (by positivity)    _ = (3+2*(C : ℝ))*(m : ℝ)^3*Real.log (m : ℝ) := by ring
See it in the graphDiscuss this resultChallenge it