Yamagishi Complexity Torus LabYamagishi Lab

[Paper 513] An Act of Counting Turns Out to Prove a Theorem of Algebra

Abstract

Quadratic reciprocity is taken to be a theorem proved within number theory. This paper shows that the sign falls out of counting lattice points two ways—agreeing for all five pairs of primes. No new theorem or law is claimed.

First, at $p=7$ and $q=11$ the counts are $8$ and $7$, summing to $\mathbf{15}$ (Section 2).

Second, that equals $((p-1)/2)((q-1)/2)=3\times5=15$ exactly (Section 2).

Third, this is the core of the paper. $(-1)^{15}=\mathbf{-1}$ matches the independently computed product of Legendre symbols, $\mathbf{-1}$ (Section 3).

Fourth, for all five pairs, both the sum and the sign agree (Section 3).

Fifth, miscounting by one flips the sign—so the test responds to the count (Section 3).

Sixth, the separator is whether one asks about a remainder or divides an area (Section 4).

Keywords: law of quadratic reciprocity, Eisenstein’s proof, lattice points, number theory, counting.

Scope (what is not claimed)

No new theorem or law is claimed—quadratic reciprocity and Eisenstein’s lattice-point proof are both standard. No proof is written out—numbers are matched for five pairs of primes; no proof for general $p$ and $q$ is given. The supplementary laws are excluded—the cases $(-1|p)$ and $(2|p)$ are not included; only pairs of odd primes. Complexity is not the subject—the cost of counting lattice points against computing a Legendre symbol directly is not compared. No square roots are extracted—that knowing solvability does not yield the root belongs to Paper 166 and is not entered. Relation to earlier papers: Paper 166 treated quadratic reciprocity and wrote in its scope note that it would not prove the law—this paper takes the seat that line kept open. Paper 331 showed that an area follows from counting two kinds of points—the same act of counting yields, here, a theorem of algebra. Paper 300 showed that a shared root can be decided—counting and testing remainders are distinct roots that nonetheless return one answer. Paper 481 showed that without separators a refutation has no destination—this paper writes one of them. What is added is counting lattice points for five pairs, confirming the sum against the product, confirming the sign against the Legendre symbols, corroborating by enumerating the quadratic residues, and showing that miscounting by one flips the sign.

1. Notation and the Question

Setting: For distinct odd primes $p$ and $q$, count the lattice points lying below the line of slope $q/p$ through the origin. Counting from the $x$ side gives

$$\mu(q,p)=\sum_{x=1}^{(p-1)/2}\left\lfloor\frac{qx}{p}\right\rfloor$$

and $\mu(p,q)$ is defined the same way from the $y$ side. Separately, the Legendre symbol $(a|p)$ is computed by Euler’s criterion, $a^{(p-1)/2}\bmod p$. The two are then compared.

Observation 1.1 Quadratic reciprocity is taken to be a theorem proved within number theory. An argument about remainders—a matter of division and congruences, runs the picture.

Observation 1.2 But the same answer falls out of counting lattice points. Cutting a rectangle by its diagonal—an operation of geometry.

Question: Does the count really fix the sign.

2. Counting the Lattice Points Two Ways

Computation 2.1: Count at $p=7$ and $q=11$.

QuantityValue
$\mu(q,p)$ (from the $x$ side)$8$
$\mu(p,q)$ (from the $y$ side)$7$
Sum$\mathbf{15}$
$((p-1)/2)((q-1)/2)=3\times5$$\mathbf{15}$

Observation 2.2 The sum equals the product exactly. $15$ against $15$—the rectangle’s lattice points divide across the diagonal with none left over.

Observation 2.3 No lattice point lies on the diagonal. Because $p$ and $q$ are coprime—were one to lie there, the two counts would fall short of the rectangle’s total.

Observation 2.4 The two counts enumerate the same points in different orders. From the $x$ side and from the $y$ side—each is one half of the same rectangle, cut by its diagonal.

Observation 2.5 No remainder has appeared so far. Only floors and addition—no congruence has been used.

3. The Sign Matches an Independent Calculation

Computation 3.1: Set the lattice count beside the product of Legendre symbols for five pairs.

$p$$q$Lattice sum$(q|p)(p|q)$$(-1)^{\text{sum}}$
$7$$11$$\mathbf{15}$$\mathbf{-1}$$\mathbf{-1}$
$5$$13$$12$$+1$$+1$
$13$$17$$48$$+1$$+1$
$19$$23$$99$$-1$$-1$
$29$$31$$210$$+1$$+1$

Observation 3.2 All five signs agree. $-1$, $+1$, $+1$, $-1$, $+1$—the counting side and the remainder side return the same answer independently.

Observation 3.3 The Legendre symbols are corroborated by enumeration. The residues mod $7$ are $\{1,2,4\}$ and mod $11$ are $\{1,3,4,5,9\}$—$11\bmod7=4$ lies in the first and $7$ does not lie in the second, so $(+1)\times(-1)=-1$.

Observation 3.4 Miscounting by one flips the sign. $(-1)^{16}=+1$ against $(-1)^{15}=-1$—the test responds to the count: this is not coincidence.

Observation 3.5 It keeps agreeing as the sum grows. $210$ at $29$ and $31$—fourteen times the $15$, and the parity still holds.

Observation 3.6 What matters is not the sum but its parity. $12$, $48$ and $210$ are all even—all return $+1$: the magnitude does not enter the answer.

4. The Separator

The separator: is one asking about a remainder, or dividing an area.

Observation 4.1 Asking about a remainder is the world of congruences. $a^{(p-1)/2}\bmod p$—an answer from exponentiation and division.

Observation 4.2 Dividing an area is the world of geometry. A sum of floors—a rectangle cut by its diagonal, and nothing more.

Observation 4.3 The two are distinct roots by the criterion of Paper 300. Both return the same sign—one a property of remainders, the other the parity of a count: their tools have nothing in common.

Observation 4.4 And yet the answers agree. At all five pairs—by the criterion of Paper 300 numerical agreement alone does not establish a shared root; here it is known by proof that the agreement is not chance.

Observation 4.5 Paper 166 kept this seat open. Its scope note reads that it will not prove the law—it measured what the law answers, while this paper looks at where that answer comes from.

Observation 4.6 The operation is the one in Paper 331. Counting lattice points—there it produced an area, here a theorem of algebra.

Observation 4.7 To be honest—no proof is written. Numbers were matched at five pairs—that the sum equals the product for general $p$ and $q$ follows from the argument that the rectangle’s points divide across the diagonal without remainder, but that argument is not written out here. What is shown reaches as far as agreement at five pairs.

5. Roll Call and Closing

  1. $8$ and $7$ at $p=7$, $q=11$ (Computation 2.1): summing to $15$.
  2. The sum equals $3\times5$ (Observation 2.2): nothing left over.
  3. No point on the diagonal (Observation 2.3): because they are coprime.
  4. No remainder appears (Observation 2.5): only floors and addition.
  5. All five signs agree (Computation 3.1): the core.
  6. Corroborated by enumeration (Observation 3.3): $(+1)\times(-1)=-1$.
  7. Miscounting flips the sign (Observation 3.4): the test responds.
  8. Only the parity matters (Observation 3.6): magnitude does not enter.
  9. The separator is remainder or area (Observation 4.3): distinct roots by Paper 300.
  10. No proof is written (Observation 4.7): five pairs matched.

Closing: Quadratic reciprocity is taken to be a theorem proved within number theory—an argument about remainders, a matter of division and congruences. But the same answer falls out of counting lattice points: cutting a rectangle by its diagonal, an operation of geometry. Counting the lattice points two ways—at $p=7$ and $q=11$, the $x$ side gives $8$ and the $y$ side $7$, summing to $\mathbf{15}$. That equals $((p-1)/2)((q-1)/2)=3\times5=\mathbf{15}$ exactly, so the rectangle’s lattice points divide across the diagonal with none left over. No point lies on the diagonal, because $p$ and $q$ are coprime; were one to lie there the counts would fall short. The two counts enumerate the same points in different orders, each being one half of the same rectangle. And no remainder has appeared: only floors and addition, with no congruence used. The sign matches an independent calculation—$(7,11)$ gives sum $15$ and sign $-1$; $(5,13)$ gives $12$ and $+1$; $(13,17)$ gives $48$ and $+1$; $(19,23)$ gives $99$ and $-1$; $(29,31)$ gives $210$ and $+1$. All five agree, the counting side and the remainder side answering independently. The symbols are corroborated by enumeration: residues mod $7$ are $\{1,2,4\}$ and mod $11$ are $\{1,3,4,5,9\}$, so $11\bmod7=4$ lies in the first, $7$ does not lie in the second, and $(+1)\times(-1)=-1$. Miscounting by one gives $(-1)^{16}=+1$ and flips the sign, so the test responds to the count. Agreement persists as the sum grows to $210$, and what matters is not the sum but its parity: $12$, $48$ and $210$ are all even and all return $+1$. One thing separates them—is one asking about a remainder, or dividing an area. Asking about a remainder is the world of congruences, with $a^{(p-1)/2}\bmod p$. Dividing an area is the world of geometry, a sum of floors and a rectangle cut by its diagonal. The two are distinct roots by the criterion of Paper 300: both return the same sign, but one is a property of remainders and the other the parity of a count, and their tools have nothing in common. And yet the answers agree at all five pairs. By that criterion numerical agreement alone establishes nothing; here it is known by proof that the agreement is not chance. Paper 166 kept this seat open, writing that it would not prove the law: it measured what the law answers, while this paper looks at where that answer comes from. The operation is the one in Paper 331, where counting lattice points produced an area and here produces a theorem of algebra. To be honest—no proof is written. Numbers were matched at five pairs, and that the sum equals the product in general follows from the argument that the rectangle’s points divide across the diagonal without remainder—an argument not written out here. What is shown reaches as far as agreement at five pairs.

References

  1. Eisenstein, G. (1844). Geometrischer Beweis des Fundamentaltheorems für die quadratischen Reste. Journal für die reine und angewandte Mathematik.
  2. Gauss, C. F. (1801). Disquisitiones Arithmeticae. Fleischer, Leipzig.
  3. Ireland, K., & Rosen, M. (1990). A Classical Introduction to Modern Number Theory (2nd ed.). Springer.
  4. Yamagishi, Y. (2026). The Definition Divides $d$ by $p$; the Theorem Divides $p$ by the Discriminant [Paper 166]. Zenodo. 10.5281/zenodo.22093052
  5. Yamagishi, Y. (2026). The Three Hundredth Census: Whether Two Things Share a Root Is Decidable [Paper 300]. Zenodo. 10.5281/zenodo.22171914
  6. Yamagishi, Y. (2026). Area, a Continuous Quantity, Comes Out Exactly from Counting Two Kinds of Points [Paper 331]. Zenodo. 10.5281/zenodo.22681503
  7. Yamagishi, Y. (2026). A Broken Law Can Be Blamed on Any of the Assumptions [Paper 481]. Zenodo. 10.5281/zenodo.22733927

Reference

Yamagishi, Y. (2026). An Act of Counting Turns Out to Prove a Theorem of Algebra [Paper 513]. YOI: https://www.yamagishiyuuki.com/yoi/513
DOI: 10.5281/zenodo.22862214
ORCID: 0009-0006-8587-3450

PDF (English) · PDF (Japanese) · Date proof of the English PDF (OpenTimestamps .ots) · SHA256SUMS

The record page for this paper (in Japanese, with the PDFs in each language and the date proof): YOI 513. This paper is a preprint and has not been peer reviewed.