Integer interpolation along a subdivided edge #
This file isolates the arithmetic needed to turn integral endpoint potentials into a convex integral potential on a path. It deliberately contains no graph construction.
For a positive length L and an integral rise T, write
T = q * L + r, with 0 <= r < L.
The potential below has slope q for the first L - r unit steps and slope
q + 1 for the final r steps. Thus it has endpoint values 0 and T, and
its slopes are nondecreasing. The sign convention is chosen for the future
chip-firing application: at an interior path vertex, prin will be the next
slope minus the previous slope.
The integral offset at which the slope changes from q to q + 1.
Equations
Instances For
The two-slope potential at integral offset i from the tail endpoint.
Equations
Instances For
The slope on the unit step from offset i to offset i + 1.
Equations
Instances For
The canonical unit slopes telescope to the difference of the endpoint
values. Unlike potential_length, this identity is also meaningful at
length zero.
On a nonempty block, the canonical unit slopes realize its declared rise. This is the telescoping fact used when concatenating piecewise blocks.
A canonical unit slope is at least any declared lower endpoint bound whose total rise is feasible. This is the W2 arithmetic bridge used when a piecewise block contributes the outgoing slope at a merged boundary.
A canonical unit slope is at most any declared upper endpoint bound whose total rise is feasible. The strict case uses the quotient bound; at equality the Euclidean remainder vanishes, so every genuine unit step is the quotient itself.
Convexity in the form needed at an interior path vertex: the next slope
minus the previous slope is nonnegative. Offset i + 1 is interior whenever
i + 1 < L; the inequality itself holds without that extra restriction.
Closed arithmetic regressions #
On a path of length one, the unique step realizes every integral rise.
A truncated negative ramp #
The loop lemma needs the potential of rise -k along a path of length L,
where 0 < k ≤ L. It falls with slope -1 for exactly k steps and is
constant afterwards. Thus it places one unit of Laplacian at distance k
from the zero endpoint (unless that point is the far endpoint).