Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Compiled straight-line ray-machine program for known-facet slack product, direction square sum, and safe perturbation step size

Proved
Grunbaum2003.rayMachine_known_facet_step_eps_program

by kmehltretter82 · Nov 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsconvex-geometryconvex-polytopes

For any ambient dimension d≥0d \ge 0d≥0, any number k≥0k \ge 0k≥0 of learned facet rows stored on the tape at rowBase + j * d + i, any boundary point ppp stored at pBase + i, any transverse direction uuu stored at uBase + i, and any positive scale a=tape(aCell)>0a = \text{tape}(aCell) > 0a=tape(aCell)>0, there exists an explicit straight-line List RayInstruction program stepEpsProgram d k rowBase pBase uBase aCell minBase (depending only on the static parameters, never on the real input tape or oracle) that executes in stepEpsSteps d k rowBase pBase uBase aCell steps with zero oracle queries, never divides by zero whenever ∀j<k,  Lj(p)<1\forall j < k,\; L_j(p) < 1∀j<k,Lj​(p)<1, writes the exact safe perturbation step size

ε=a⋅δ2(1+a⋅M+δ),δ=∏j=0k−11−Lj(p)1+(1−Lj(p)),M=1+∑j=0k−1(Lj(u))2\varepsilon = \frac{a \cdot \delta}{2(1 + a \cdot M + \delta)}, \quad \delta = \prod_{j=0}^{k-1} \frac{1 - L_j(p)}{1 + (1 - L_j(p))}, \quad M = 1 + \sum_{j=0}^{k-1} (L_j(u))^2ε=2(1+a⋅M+δ)a⋅δ​,δ=j=0∏k−1​1+(1−Lj​(p))1−Lj​(p)​,M=1+j=0∑k−1​(Lj​(u))2

into dst = stepEpsDest d k rowBase pBase uBase aCell minBase ≥ minBase, and preserves all tape cells strictly below dst.

Preamble
import Definitions.Def_Grunbaum2003_RayInstruction
import Definitions.Def_Grunbaum2003_RayConfiguration
import Definitions.Def_Grunbaum2003_rayMachineStep
import Definitions.Def_Grunbaum2003_rayMachineRun
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset

set_option autoImplicit false
open scoped BigOperators
Formal statement
namespace Grunbaum2003

theorem rayMachine_known_facet_step_eps_program :
  ∃ (stepEpsProgram : ℕ → ℕ → ℤ → ℤ → ℤ → ℤ → ℤ → List RayInstruction)
    (stepEpsDest : ℕ → ℕ → ℤ → ℤ → ℤ → ℤ → ℤ → ℤ)
    (stepEpsSteps : ℕ → ℕ → ℤ → ℤ → ℤ → ℤ → ℕ),
    ∀ {d k : ℕ} (oracle : (Fin d → ℝ) → Fin d → ℝ) (source : ℤ → ℝ)
      (rowBase pBase uBase aCell minBase : ℤ) (q : ℕ),
      0 < source aCell →
      (∀ j : Fin k,
        ∑ i : Fin d, source (rowBase + (j.val : ℤ) * (d : ℤ) + (i.val : ℤ)) *
          source (pBase + (i.val : ℤ)) < 1) →
      let prog := stepEpsProgram d k rowBase pBase uBase aCell minBase
      let dst := stepEpsDest d k rowBase pBase uBase aCell minBase
      let steps := stepEpsSteps d k rowBase pBase uBase aCell
      let rowVal (j : Fin k) (xBase : ℤ) : ℝ :=
        ∑ i : Fin d, source (rowBase + (j.val : ℤ) * (d : ℤ) + (i.val : ℤ)) *
          source (xBase + (i.val : ℤ))
      let δ : ℝ := ∏ j : Fin k, (1 - rowVal j pBase) / (1 + (1 - rowVal j pBase))
      let M : ℝ := 1 + ∑ j : Fin k, (rowVal j uBase) ^ 2
      minBase ≤ dst ∧
      ∃ c' : RayConfiguration,
        rayMachineRun prog oracle steps ⟨0, 0, source, q⟩ = some c' ∧
        c'.pc = steps ∧ prog[c'.pc]? = some .halt ∧
        c'.head = 0 ∧ c'.queries = q ∧
        c'.tape dst = source aCell * δ / (2 * (1 + source aCell * M + δ)) ∧
        ∀ z : ℤ, z < dst → c'.tape z = source z := by sorry

end Grunbaum2003
Source
Grünbaum 2003, Convex Polytopes (2nd ed., Graduate Texts in Mathematics 221), §3.6, pp. 52b–52c (citing Gritzmann–Klee–Westwater 1995)

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