Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Polynomial bounds are closed under affine input scaling

Definition
sgl_polynomial_linear_comp

by Henry Yuen · Jul 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

complexity-theorypolynomial-timeutility

This module proves a standard closure property for the mission predicate PolynomiallyBounded: if a time bound f(n)f(n)f(n) is polynomially bounded, then so is n↦f(an+b)n\mapsto f(a n + b)n↦f(an+b) for fixed natural constants aaa and bbb. It also records the special cases of adding a constant to the input length and multiplying the input length by a constant.

This is scheduler bookkeeping for the Sipser--Gács--Lautemann machine construction: verifier-query lengths and encoded-simulation input lengths are bounded by affine functions of the controlling input lengths, so existing polynomial verifier time bounds can be transported through those size changes.

Definition code
import Definitions.Def_sgl_polynomial_closures
import Mathlib.Tactic

namespace SipserGacsLautemann

theorem linear_argument_le_scaled_succ
    (a b n : Nat) :
    a * n + b + 1 ≤ (a + b + 1) * (n + 1) := by
  have ha : a * n ≤ a * (n + 1) :=
    Nat.mul_le_mul_left a (Nat.le_succ n)
  have hb : b + 1 ≤ (b + 1) * (n + 1) := by
    have hone : 1 ≤ n + 1 := Nat.succ_pos n
    simpa using Nat.mul_le_mul_left (b + 1) hone
  calc
    a * n + b + 1 = a * n + (b + 1) := by omega
    _ ≤ a * (n + 1) + (b + 1) * (n + 1) :=
      Nat.add_le_add ha hb
    _ = (a + b + 1) * (n + 1) := by
      ring

theorem PolynomiallyBounded.comp_linear
    {f : Nat → Nat}
    (hf : PolynomiallyBounded f)
    (a b : Nat) :
    PolynomiallyBounded (fun n => f (a * n + b)) := by
  rcases hf with ⟨coefficient, degree, hbound⟩
  refine
    ⟨coefficient * (a + b + 1) ^ degree,
      degree, ?_⟩
  intro n
  have hlinear :
      a * n + b + 1 ≤
        (a + b + 1) * (n + 1) :=
    linear_argument_le_scaled_succ a b n
  have hpow :
      (a * n + b + 1) ^ degree ≤
        ((a + b + 1) * (n + 1)) ^ degree :=
    Nat.pow_le_pow_left hlinear degree
  calc
    f (a * n + b) ≤
        coefficient * (a * n + b + 1) ^ degree :=
      hbound (a * n + b)
    _ ≤ coefficient *
        ((a + b + 1) * (n + 1)) ^ degree :=
      Nat.mul_le_mul_left coefficient hpow
    _ = (coefficient * (a + b + 1) ^ degree) *
        (n + 1) ^ degree := by
      rw [Nat.mul_pow]
      ac_rfl

theorem PolynomiallyBounded.comp_add_const
    {f : Nat → Nat}
    (hf : PolynomiallyBounded f)
    (b : Nat) :
    PolynomiallyBounded (fun n => f (n + b)) := by
  simpa [Nat.one_mul] using hf.comp_linear 1 b

theorem PolynomiallyBounded.comp_mul_const
    {f : Nat → Nat}
    (hf : PolynomiallyBounded f)
    (a : Nat) :
    PolynomiallyBounded (fun n => f (a * n)) := by
  simpa using hf.comp_linear a 0

end SipserGacsLautemann
Source
Standard closure of polynomially bounded functions under affine input scaling; used in the Prove2me Sipser--Gács--Lautemann scheduler formalization.

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me