AFTD Auto-Formalizing Theoretical Domains

op869_integer_fold_stage_budget

theoremverified

For an integer m-level fold schedule, each simulation stage fits in the next square-exponent vertex budget and the next power post-degree budget.

Statement

theorem op869_integer_fold_stage_budget (C m j : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) (hj : j < m) : let K := m^m; let F := C*K^3*2^(C*(m+1)); let t := m^(m-(j+1)); let q := m^(m-j); C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) ≤ F^((j+1)^2) ∧ C*K^2*q*F^j*2^(C*((q+t-1)/t)) ≤ F^(j+1)
Source
An integer schedule for the fold simulation of arXiv:2610.41516, Section 2.3, toward OP-869.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 2
  • TotalPreorderA total preorder: a preorder where ≤ is total (complete). This is weaker than LinearOrder — it does NOT require antisymmetry or…
  • LinearOrder.toTotalPreorderEvery LinearOrder is a TotalPreorder.
Used by 1

The proof, explained

The proof establishes that at simulation stage j, both the vertex budget and post-degree budget requirements are met by bounding a shared prefactor. First, the ratio bound (q + t - 1) / t ≤ m + 1 and the inequality q ≤ K show that the common prefactor C * K^2 * q * 2^(C * ⌈q / t⌉) is bounded above by F = C * K^3 * 2^(C * (m + 1)). Factoring this prefactor out reduces the vertex budget to F * F^(j^2) * F^j ≤ F^((j + 1)^2), which follows from the exponent inequality j^2 + j + 1 ≤ (j + 1)^2, and the post-degree budget to F * F^j = F^(j + 1).

  1. For positive t, the integer division ceiling bound (t * m + t - 1) / t ≤ m + 1 holds.

    By `Nat.div_le_of_le_mul`, it suffices to show that the numerator satisfies t * m + t - 1 ≤ t * (m + 1). This holds because t * m + t - 1 ≤ t * m + t by `Nat.sub_le`, and t * m + t = t * (m + 1) by ring algebra.

    lines 1–7

    uses Nat.div_le_of_le_mul, Nat.sub_le

    lemma op869_ceiling_tmp (m t : ℕ) (ht : 0 < t) :
        (t*m+t-1)/t ≤ m+1 := by
      apply Nat.div_le_of_le_mul
      calc
        t*m+t-1 ≤ t*m+t := Nat.sub_le _ _
        _ = t*(m+1) := by ring
    
  2. For any F ≥ 1 and natural j, the product F * F^(j^2) * F^j is bounded above by F^((j + 1)^2).

    Nonlinear arithmetic shows j^2 + j + 1 ≤ (j + 1)^2 = j^2 + 2j + 1. Combining powers using `pow_add` and `pow_succ` gives F * F^(j^2) * F^j = F^(j^2 + j + 1). Since F ≥ 1, `pow_le_pow_right'` applies to yield F^(j^2 + j + 1) ≤ F^((j + 1)^2).

    lines 8–16

    uses pow_add, pow_succ, pow_le_pow_right'

    lemma op869_square_budget_tmp (F j : ℕ) (hF : 1 ≤ F) :
        F * F^(j^2) * F^j ≤ F^((j+1)^2) := by
      have he : j^2+j+1 ≤ (j+1)^2 := by nlinarith
      calc
        F * F^(j^2) * F^j = F^(j^2+j+1) := by
          rw [pow_add, pow_succ]
          ring
        _ ≤ F^((j+1)^2) := pow_le_pow_right' hF he
    
  3. Define the parameters K = m^m, F = C * K^3 * 2^(C * (m + 1)), t = m^(m - (j + 1)), and q = m^(m - j), and state the two budget goals.

    The theorem introduces local names K, F, t, and q, and `change` restates the goal as a conjunction of the vertex budget bound C * K^2 * q * F^(j^2) * F^j * 2^(C * ((q + t - 1) / t)) ≤ F^((j + 1)^2) and the post-degree budget bound C * K^2 * q * F^j * 2^(C * ((q + t - 1) / t)) ≤ F^(j + 1).

    lines 17–23

    theorem op869_integer_fold_stage_budget (C m j : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) (hj : j < m) : let K := m^m; let F := C*K^3*2^(C*(m+1)); let t := m^(m-(j+1)); let q := m^(m-j); C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) ≤ F^((j+1)^2) ∧ C*K^2*q*F^j*2^(C*((q+t-1)/t)) ≤ F^(j+1) := by
      let K := m^m
      let F := C*K^3*2^(C*(m+1))
      let t := m^(m-(j+1))
      let q := m^(m-j)
      change C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) ≤ F^((j+1)^2) ∧
          C*K^2*q*F^j*2^(C*((q+t-1)/t)) ≤ F^(j+1)
  4. The parameters m and t are strictly positive, and q factors as t * m.

    Since m ≥ 2, we have m > 0, and t = m^(m - (j + 1)) is strictly positive by positivity of powers. Because j < m, linear arithmetic gives m - j = (m - (j + 1)) + 1, so by `pow_succ` we obtain q = m^(m - j) = m^(m - (j + 1)) * m = t * m.

    lines 24–29

    uses pow_succ

      have hm0 : 0 < m := by omega
      have ht : 0 < t := by dsimp [t]; positivity
      have hqt : q = t*m := by
        dsimp [q,t]
        have he : m-j = m-(j+1)+1 := by omega
        rw [he, pow_succ]
  5. The bounds q ≤ K, (q + t - 1) / t ≤ m + 1, and 2^(C * ((q + t - 1) / t)) ≤ 2^(C * (m + 1)) all hold.

    Since j ≥ 0, m - j ≤ m, so `pow_le_pow_right'` yields q = m^(m - j) ≤ m^m = K. Rewriting q as t * m allows applying `op869_ceiling_tmp` to get (q + t - 1) / t ≤ m + 1. Multiplying by C via `Nat.mul_le_mul_left` and applying monotonicity of powers of 2 (`pow_le_pow_right'`) bounds the exponential term.

    lines 30–35

    uses pow_le_pow_right', op869_ceiling_tmp, Nat.mul_le_mul_left

      have hqK : q ≤ K := by
        dsimp [q,K]
        exact pow_le_pow_right' (by omega : 1 ≤ m) (by omega)
      have hceil : (q+t-1)/t ≤ m+1 := by rw [hqt]; exact op869_ceiling_tmp m t ht
      have hexp : 2^(C*((q+t-1)/t)) ≤ 2^(C*(m+1)) :=
        pow_le_pow_right' (by norm_num : 1 ≤ 2) (Nat.mul_le_mul_left C hceil)
  6. The common prefactor satisfies C * K^2 * q * 2^(C * ((q + t - 1) / t)) ≤ F, and F ≥ 1.

    Using the bounds q ≤ K and 2^(C * ((q + t - 1) / t)) ≤ 2^(C * (m + 1)), congruence of multiplication bounds the prefactor by C * K^2 * K * 2^(C * (m + 1)) = C * K^3 * 2^(C * (m + 1)) = F. Positivity of C and K gives F > 0, so 1 ≤ F.

    lines 36–43

      have hfac : C*K^2*q*2^(C*((q+t-1)/t)) ≤ F := by
        dsimp [F]
        calc
          C*K^2*q*2^(C*((q+t-1)/t)) ≤ C*K^2*K*2^(C*(m+1)) := by gcongr
          _ = C*K^3*2^(C*(m+1)) := by ring
      have hC0 : 0 < C := by omega
      have hF0 : 0 < F := by dsimp [F,K]; positivity
      have hF : 1 ≤ F := hF0
  7. The vertex budget inequality holds: C * K^2 * q * F^(j^2) * F^j * 2^(C * ((q + t - 1) / t)) ≤ F^((j + 1)^2).

    Algebraically regrouping the left-hand side isolates the prefactor multiplied by F^(j^2) * F^j. Bounding the prefactor by F gives F * F^(j^2) * F^j, which by `op869_square_budget_tmp` is at most F^((j + 1)^2).

    lines 44–49

    uses op869_square_budget_tmp

      constructor
      · calc
          C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) =
              (C*K^2*q*2^(C*((q+t-1)/t))) * F^(j^2)*F^j := by ring
          _ ≤ F * F^(j^2)*F^j := by gcongr
          _ ≤ F^((j+1)^2) := op869_square_budget_tmp F j hF
  8. The post-degree budget inequality holds: C * K^2 * q * F^j * 2^(C * ((q + t - 1) / t)) ≤ F^(j + 1).

    Regrouping the left-hand side isolates the prefactor multiplied by F^j. Bounding the prefactor by F gives F * F^j, which equals F^(j + 1) by `pow_succ`.

    lines 50–54

    uses pow_succ

      · calc
          C*K^2*q*F^j*2^(C*((q+t-1)/t)) =
              (C*K^2*q*2^(C*((q+t-1)/t))) * F^j := by ring
          _ ≤ F * F^j := by gcongr
          _ = F^(j+1) := by rw [pow_succ]; ring
Nat.div_le_of_le_mul
If m ≤ k * n, then integer division satisfies m / k ≤ n.
Nat.sub_le
Subtracting a natural number does not increase the value: n - m ≤ n.
pow_add
In a monoid, powers add under multiplication: a^(m + n) = a^m * a^n.
pow_succ
The successor power satisfies a^(n + 1) = a^n * a.
pow_le_pow_right'
For an ordered monoid with base a ≥ 1, exponent inequality n ≤ m implies a^n ≤ a^m.
op869_ceiling_tmp
For any t > 0, the integer division (t * m + t - 1) / t is at most m + 1.
Nat.mul_le_mul_left
Multiplying an inequality of natural numbers by a factor on the left preserves the inequality: if n ≤ m, then k * n ≤ k * m.
op869_square_budget_tmp
For F ≥ 1 and any j, F * F^(j^2) * F^j ≤ F^((j + 1)^2).

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_ceiling_tmp (m t : ℕ) (ht : 0 < t) :    (t*m+t-1)/t ≤ m+1 := by  apply Nat.div_le_of_le_mul  calc    t*m+t-1 ≤ t*m+t := Nat.sub_le _ _    _ = t*(m+1) := by ringlemma op869_square_budget_tmp (F j : ℕ) (hF : 1 ≤ F) :    F * F^(j^2) * F^j ≤ F^((j+1)^2) := by  have he : j^2+j+1 ≤ (j+1)^2 := by nlinarith  calc    F * F^(j^2) * F^j = F^(j^2+j+1) := by      rw [pow_add, pow_succ]      ring    _ ≤ F^((j+1)^2) := pow_le_pow_right' hF hetheorem op869_integer_fold_stage_budget (C m j : ℕ) (hC : 1 ≤ C) (hm : 2 ≤ m) (hj : j < m) : let K := m^m; let F := C*K^3*2^(C*(m+1)); let t := m^(m-(j+1)); let q := m^(m-j); C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) ≤ F^((j+1)^2) ∧ C*K^2*q*F^j*2^(C*((q+t-1)/t)) ≤ F^(j+1) := by  let K := m^m  let F := C*K^3*2^(C*(m+1))  let t := m^(m-(j+1))  let q := m^(m-j)  change C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) ≤ F^((j+1)^2) ∧      C*K^2*q*F^j*2^(C*((q+t-1)/t)) ≤ F^(j+1)  have hm0 : 0 < m := by omega  have ht : 0 < t := by dsimp [t]; positivity  have hqt : q = t*m := by    dsimp [q,t]    have he : m-j = m-(j+1)+1 := by omega    rw [he, pow_succ]  have hqK : q ≤ K := by    dsimp [q,K]    exact pow_le_pow_right' (by omega : 1 ≤ m) (by omega)  have hceil : (q+t-1)/t ≤ m+1 := by rw [hqt]; exact op869_ceiling_tmp m t ht  have hexp : 2^(C*((q+t-1)/t)) ≤ 2^(C*(m+1)) :=    pow_le_pow_right' (by norm_num : 1 ≤ 2) (Nat.mul_le_mul_left C hceil)  have hfac : C*K^2*q*2^(C*((q+t-1)/t)) ≤ F := by    dsimp [F]    calc      C*K^2*q*2^(C*((q+t-1)/t)) ≤ C*K^2*K*2^(C*(m+1)) := by gcongr      _ = C*K^3*2^(C*(m+1)) := by ring  have hC0 : 0 < C := by omega  have hF0 : 0 < F := by dsimp [F,K]; positivity  have hF : 1 ≤ F := hF0  constructor  · calc      C*K^2*q*F^(j^2)*F^j*2^(C*((q+t-1)/t)) =          (C*K^2*q*2^(C*((q+t-1)/t))) * F^(j^2)*F^j := by ring      _ ≤ F * F^(j^2)*F^j := by gcongr      _ ≤ F^((j+1)^2) := op869_square_budget_tmp F j hF  · calc      C*K^2*q*F^j*2^(C*((q+t-1)/t)) =          (C*K^2*q*2^(C*((q+t-1)/t))) * F^j := by ring      _ ≤ F * F^j := by gcongr      _ = F^(j+1) := by rw [pow_succ]; ring
See it in the graphDiscuss this resultChallenge it