Let be coprime. We want to prove the classical reciprocity law
where the Dedekind sum is defined by
Here for nonintegral
, and
for integral
.
Let be coprime integers. We use the periodic first Bernoulli function
defined for every real
. In particular,
when
. This is slightly different from the usual sawtooth function
, which is assigned the value
at integers. The advantage of
is that there is no exceptional convention inside finite residue sums: every residue class is treated by exactly the same formula. We also use the periodic second Bernoulli function
The function
is continuous and periodic, has mean zero on one period, and satisfies
whenever
. This derivative relation explains why
appears in the reciprocity formula: the shifted Dedekind sums are built from products of
, while the reciprocity identity is obtained by integrating the resulting first-order variation.
For real , define
This is the shifted Dedekind–Rademacher sum. The first factor measures the centered fractional part of the shifted point on the line of slope , while the second measures the centered horizontal position. Thus the sum is a shifted version of the usual correlation between horizontal position and vertical staircase error. The reciprocity law with the shifts is
The three terms correspond to the three boundary directions in the translated rational staircase picture: the horizontal shift
, the vertical shift
, and the shifted diagonal coordinate
. The product
is the corner correction.
Proof:
Distribution Identity: We use the following elementary formula to prove the shifted reciprocity formula.
To prove this, write , where
and
. Periodicity lets us replace
by
. Put
. Among the numbers
, precisely
cross the integer
and wrap around modulo
. Therefore
After subtracting , we get
This identity says that averaging the equally spaced translates of the periodic sawtooth recreates the same sawtooth at scale
. It is the finite mechanism that turns the original one-dimensional shifted sums into one symmetric sum over a
rectangle.
Symmetric Expression:
Set Apply the distribution identity with
to the first factor in
. Since
and adding the integer
does not change
, we obtain
Therefore Applying the same argument with
and
exchanged gives
Thus their sum is the symmetric rectangular expression
This is the main structural step. Each shifted staircase sum originally follows one family of steps. After unfolding, the two reciprocal sums become one expression over the entire residue rectangle. The symmetry between and
is now visible.
Both sides of the desired identity are periodic in and
with period
. For example, replacing
by
in the defining sum simply reindexes
by
. We may therefore work first in the open square
,
. Define
We will show that
is constant, and then determine that constant by averaging over one period square.
Away from the finitely many lines where one of the Bernoulli arguments is an integer, we may differentiate term by term. Write . Differentiating its defining sum gives
The distribution identity gives Also, because multiplication by
permutes the residue classes modulo
,
Hence
Differentiating with respect to is simpler:
Now write . Interchanging the two roles gives
Adding these four identities yields
On the other hand, away from integers, so direct differentiation of
gives exactly the same two formulas:
Thus has zero derivative in both variables wherever the displayed derivatives exist.
There is one small continuity point to check. In the open unit square, each and
lies strictly between
and
. Hence the only possible discontinuity in a summand of
occurs when
. But there
Thus the possible jump in is multiplied by zero. The summand, and hence
, is continuous across every such line. The function
is also continuous, because
is continuous and
are not integers inside the open square. Therefore the locally constant function
extends across all the dividing lines and is constant throughout
.
It remains only to determine this constant. We average both sides over one unit square. The first Bernoulli function has mean zero:
Similarly,
Using the rectangular representation of and making the changes of variables
and
, we get
For fixed , periodicity gives
. Thus the term involving
integrates to zero. The term involving
also integrates to zero after integrating first in
. Hence
The same is true for . The product
has zero average because each factor has zero mean. The separate
and
terms also have zero average. Finally, for each fixed
,
because is an integer and
has mean zero on every period. Therefore
Since is constant and has average zero, that constant is zero. Hence
on the open unit square. Periodicity then extends the identity to all real
. We have proved
Set . Since
and
, the periodic-Bernoulli formula gives
Now let denote the usual Dedekind sum formed with the sawtooth convention
. In the periodic-Bernoulli sum, the only extra term occurs at the zero residue
, where both factors equal
. Therefore
Applying this to both shifted sums and subtracting yields the classical reciprocity law
The difference between the constants and
is entirely an endpoint convention. In the periodic Bernoulli normalization,
; in the usual sawtooth normalization,
.
The ordinary Dedekind sum is attached to a rational staircase beginning at a lattice corner. The shifted sum moves the staircase away from that corner. The distribution identity spreads the one-dimensional staircase data into a residue rectangle, where the reciprocal pair of sums becomes symmetric. The derivative calculation then shows that the entire interior contribution is determined by its boundary variation. The functions
,
, and
are precisely the three periodic quadratic boundary primitives forced by that variation, while
is the corner term.
There is a geometric generating-function form of the shifted proof which explains why the Bernoulli terms on the right side of Rademacher’s formula have exactly the shape they do. Consider the translated rational line , together with the horizontal displacement
. In the unshifted picture, the line begins at a lattice vertex and the lattice points below it form the familiar finite rational staircase. After translation, the slope is unchanged, but the staircase is displaced relative to the lattice. Its first and final vertices need no longer be lattice points. For
, the height of the translated lower staircase above the shifted horizontal position
is
. Thus the appropriate shifted Carlitz polynomial is
This polynomial records the horizontal edges of the translated staircase. The exponent of records the horizontal column, while the exponent of
records the staircase height. Multiplication by
turns every monomial into the signed difference of the two endpoints of its horizontal edge. There is a corresponding polynomial for the vertical edges, obtained by interchanging
and
and transforming the shifts in the corresponding transposed coordinates. Multiplication by
turns those monomials into oriented vertical edges. As in the ordinary Carlitz identity, every interior staircase vertex then occurs once with positive sign and once with negative sign, so all interior contributions cancel exactly. The difference is that the translated path no longer begins and ends at lattice vertices. Consequently, the surviving boundary contribution is no longer just the simple endpoint expression from the unshifted identity; it consists of several rational boundary terms which record the horizontal shift, the vertical shift, and the position of the translated diagonal.
To extract the arithmetic content of this shifted cone identity, one passes from monomials to exponential variables and uses a sheared coordinate system adapted to the rational line. One sets and
, after changing variables so that
measures centered horizontal position and
measures centered vertical error from the translated line rather than raw height. In these coordinates, the coefficient of
in the Taylor expansion of the shifted staircase transform is precisely
The reciprocal staircase contributes . The interior of the two paths still cancels; therefore the coefficient of
is determined entirely by the endpoint rational functions. Their expansion produces the corner term
together with the three quadratic boundary terms
,
, and
. Thus Rademacher’s reciprocity law is the
coefficient of the translated Carlitz cone identity. In the unshifted case
, the cone apex lies at a lattice point, the translated boundary corrections collapse to constants, and—after replacing
by the usual sawtooth convention—the formula becomes the classical term.
Thus Rademacher’s shifted reciprocity law is not a separate miracle from ordinary Dedekind reciprocity. It is the same rational-staircase cancellation after the corner has been translated off the lattice. The shift makes the boundary visible, and the periodic Bernoulli functions record those boundary contributions without any ad hoc correction terms.