arXiv:2610.39650cs.CGOct 2026

Manuscript Offprint

arXiv:2610.39650

Witnessed Boolean Contracts: Sound Local Distance Guarantees for Approximate Implicit CSG

Jeremy Pei

Abstract

Hard min/max operations preserve the sign of exact implicit solids but generally destroy signed-distance semantics. A value-error budget alone cannot repair the problem: arbitrarily small, sign-preserving perturbations can rotate the normalized gradient by nearly a right angle and move a gradient-projected boundary witness by a finite amount. We formalize this obstruction as the absence of a value-only stability modulus for witness projection.

We then introduce a witnessed Boolean contract. At each query, the contract checks five items: the value error, the gradient error, positive reach, separation of the active branch, and a Lipschitz visibility margin at the approximate witness. A sharp normalization lemma turns the gradient-error bound into a bound on the normal direction. We enlarge the local neighborhood so that the inactive operand can be checked at the true foot point as well as at the approximate witness. Under the stated analytic and domain assumptions, passing these checks proves that the selected branch gives a true point on the union boundary. It also bounds the distance deficiency by the active operand's pointwise value error. If any check fails or cannot be evaluated, the result is Unknown. The same argument extends to any finite hard union by checking the selected witness against every inactive operand.

An executable audit checks the analytic budgets, derivatives, wrapped interval bounds, branch order, and each step of the proof on 75,738 certified samples; it finds no violations. A broader stress test uses spheres, capsules, ring tori, three Boolean operators, and a four-leaf union. Among 96,000 analytic narrow-band samples, 87,469 are certified with zero oracle violations;

*Corresponding author.

Email address: jypei@nuaa.edu.cn (Jeremy Pei) per-case coverage ranges from 72.67% to 98.30%. When the visibility check is removed, 75 truly invalid witnesses are accepted. Thus branch separation alone is not enough. The non-union rows are labeled as empirical tests, not as new theorems.

Keywords: signed distance field, constructive solid geometry, implicit modelling, certified geometry, witness point, interval arithmetic

1. Introduction

Implicit CAD describes a solid X⊂R3X \subset \mathbb{R}^3 with a scalar field: the sign tells whether a point is inside or outside. If the field is the signed distance ϕX=sd(⋅,∂X)\phi_X = \text{sd}(\cdot, \partial X), its magnitude gives the distance to the boundary, and its gradient gives a surface normal almost everywhere. These properties are used in sphere tracing, offsets, narrow-band sampling, collision queries, and Hermite-data extraction for dual contouring [1, 2, 3, 4].

The standard hard union

ψ(x)=min⁡{ϕA(x),ϕB(x)}(1)\psi(x)=\min\{\phi_{A}(x),\phi_{B}(x)\} \tag{1}

gives the correct union sign for exact operands, but ψ\psi is not generally the signed distance to A∪BA \cup B. In an overlap, the closest point on the selected primitive can lie inside the other solid and therefore be hidden from the union boundary. This is a familiar source of pseudo-distance behavior in implicit modelling [5, 6, 7], but the usual remedies—adding a global error label or re-distancing the field—do not answer a local question: is the projected point on the selected primitive really a point on the Boolean boundary?

This question shows that value accuracy and geometric stability are different. If an approximate field ϕ^\widehat{\phi} satisfies ∥ϕ^−ϕ∥∞≤ε\|\widehat{\phi} - \phi\|_\infty \leq \varepsilon, its normalized gradient can still be nearly orthogonal to the true normal. A witness computed as x−ϕ^∇ϕ^/∥∇ϕ^∥x - \widehat{\phi} \nabla \widehat{\phi} / \|\nabla \widehat{\phi}\| can therefore remain far from the correct point even as ε→0\varepsilon \to 0. Consequently, neither a value budget nor sign preservation can justify a witness test by itself.

This paper gives a conditional guarantee for this local question. Instead of assigning one finite error bound to the whole Boolean field, it checks each query point separately. The test uses quantities supplied by an upstream certified implementation: value-error budgets for the operands, a gradient error bound for the cell, branch separation, a reach/tube check, and a Lipschitz bound on an enlarged box. If any required quantity is unknown, the test returns Unknown.

Contributions..

  1. We prove that value accuracy and sign preservation admit no stability modulus for normalized-gradient witness projection (Theorem 1). The counterexample remains inside a positive-reach tube and keeps the field value arbitrarily accurate.

  2. We derive a tight bound for normalizing a perturbed unit vector (Lemma 1) and combine it with value error to bound the approximate witness displacement (Lemma 2).

  3. We formulate a witnessed Boolean certificate for consuming upstream value, gradient, and range certificates, and prove its soundness for binary hard union (Theorem 2) and any finite hard union (Corollary 2). In contrast to a global pseudo-SDF label, the theorem identifies the precise local obligations that make a finite deficiency bound valid.

  4. We provide a reproducible proof-chain audit. It checks derivatives, wrapped interval arithmetic, branch order, and four analytic links on 75,738 certified samples, while explicitly separating proof, implementation validation, coverage, and empirical completeness. A second benchmark tests three analytic primitive classes, three Boolean operators, a four-leaf union, running time, reasons for rejection, and guard ablations. The four-leaf case tests the n-ary corollary. Intersection and difference are reported only as empirical tests.

The result is deliberately narrower than a new distance reconstruction method. It does not make the hard minimum a global SDF. It makes a local geometric statement checkable and safe to reject. Composition over mixed Boolean trees is not claimed here.

References (21)