The setting
In the Heilbronn triangle construction, planar point configurations in the unit square are obtained by sampling integral columns from the shifted integer box and applying the projective map . Two columns map to the same point in precisely when they are proportional.
Controlling the number of colliding pairs in a sampled configuration requires an upper bound on the probability that for two sampled columns and . The Lean library establishes this bound in three stages: for uniform pairs from arbitrary subsets of size inside the shifted box, for uniform pairs from Chinese Remainder Theorem (CRT) residue lifts modulo coprime moduli and , and for the full Heilbronn point sampling law combining a finite-field norm digit encoding with an auxiliary cap.
Shifted boxes and residue lifts
A point in is an ordered pair of real numbers✦, and the unit square consists of those points with and .✦ For natural numbers and and an integer shift vector , the shifted integer box of side length is the Cartesian product .✦
In dimension , the sampling shift is , and the corresponding shifted box is (1) which also identifies with . On (and in particular on ), the projective map to is given by (2) When , every column satisfies . For any modulus , the residue vector modulo of a column in a shifted integer box is the vector in obtained by reducing each coordinate of modulo .✦
For natural numbers , , , , and and an integer , an integer double residue lift is an integer whose Euclidean remainders modulo and equal and , respectively.✦ Given and , an integer residue lift box is a tuple of such lifts across all coordinates✦, and its underlying vectors form a finite set of integer column lifts in .✦ Taking and the sampling shift gives the finite set of shifted CRT column lifts.✦
Parameters and residue encodings
The norm-encoding construction fixes the natural-number parameters (3) For natural numbers and satisfying , , and , prime parameter data consists of primes and with , where , satisfying (4)✦ Associated with are the combined modulus , the box size , and the lift multiplicity .
For a prime , labels are elements of the finite field equipped with a fixed basis over indexed by . The moment column of is ✦, and its label coordinate vector in records the -coordinates of these three entries.✦ On polynomial variables indexed by , the coordinate linear form at is ✦, and the determinant polynomial is the determinant of the matrix whose entry is the coordinate linear form at .✦
For a Galois extension and a multivariate polynomial over , the Galois conjugate product is ✦; its descent to a multivariate polynomial over is the norm polynomial of over .✦ Applying this construction to the determinant polynomial for yields the label norm polynomial over .✦
The degree- multi-indices on the coordinate set are the natural-number exponent vectors of total degree .✦ They have cardinality and are enumerated by .✦ For each and label , evaluating the -th monomial on the label coordinate vector of gives the monomial value .✦ For three multi-indices, combining them across the three variable blocks and extracting the corresponding coefficient of the label norm polynomial gives the triple-block tensor coefficient .
In a finite linearly ordered set , the strictly increasing triples have cardinality .✦ Enumerating the strictly increasing triples in by , the determinant decomposition rows at and are the three values in .✦ The designated digit positions at in rows , , and are , , and , respectively.✦ For each row and digit position , the prescribed residue modulo at is the sum of the -th decomposition row value at over all whose -th designated digit position equals .
For natural numbers and and a residue class , the residue fiber in is the set of integers satisfying , which has cardinality .✦ When , enumerating this fiber assigns to each sample index in a prescribed base- digit in .✦ With and prime parameter data for and , one has , so each label , row , position , and sample index in yields a sampled base- digit . On the main latent sample space , the sampled column in , where , has -th entry .
Auxiliary caps and point sampling laws
A subset of over a field is a cap if no three distinct points of are collinear.✦ Given a finite outcome space , a real-valued weight function on , and a family of finite subsets of a set , a triple is contained in if .✦ Its triple inclusion mass is the total weight of all whose subset contains all three entries of ✦, and for natural numbers and , its normalized auxiliary triple weight is (5)✦
An auxiliary cap sampling law for a prime and a natural number consists of a finite outcome space , nonnegative weights on summing to , a positive integer satisfying , and subsets of cardinality such that every avoids , is a cap, and admits no nontrivial integer linear relation in with among any three distinct elements .✦ In addition, for every triple , (6)
On finite spaces, the uniform probability weight assigns to each element of .✦ Given a weight on , the product probability weight of a family is .✦ Given a mixing weight on a finite set and weights on , the mixture weight at is .✦ Given a prior weight on and conditional weights on , the conditional product weight of is .
For residue maps and , a target residue , a finite subset , and natural numbers and , the conditional column mass assigns to each a real probability mass conditioned on and .✦ Evaluating this mass on a shifted integer box of side with the residue maps modulo and yields the integer column law.✦
A point sampling law consists of a finite environment space , a finite column space , nonnegative weights on and on (for each ) each summing to , and a map . Its pair collision probability is the expected pair collision mass.✦
Given coprime positive integers and , positive integers and , finite spaces and with probability weights and , residue targets , and subsets of size , the mixture point sampling law has column space , conditional column distribution given by the -mixture of the integer column laws for and , and point map .✦ Taking a product environment with product weight yields the independent environments point law.✦ Taking with the uniform probability weight yields the point sampling law✦; specializing , , and from prime parameter data produces the prime lift point law.✦
For a prime , prime parameter data for and , and an auxiliary cap sampling law for and , combining with the uniform probability weight on and the sampled column map into via the prime lift point law defines the auxiliary point sampling law.✦ Selecting such an auxiliary cap sampling law defines the Heilbronn point sampling law .✦
The claim
Lemma 6.1. Let , , and be natural numbers with , , and . For any subsets with , (7)✦ Let , , and be positive integers with , and let and . Setting and , (8)✦ Finally, for a prime and prime parameter data for and , with and , the pair collision probability of the Heilbronn point sampling law satisfies (9)✦
What is checked
Lemma 6.1 is stated over subsets of size in the shifted box , shifted CRT column lifts for coprime moduli and , and the Heilbronn point sampling law constructed from prime parameter data, the finite-field norm digit encoding, and an auxiliary cap sampling law. Beyond these collision bounds, the Lean library establishes the cardinality of strictly increasing triples in a finite linearly ordered set , the descent of the Galois conjugate product of a multivariate polynomial to the base field, the digit-base inequality , and the positivity of the lift multiplicity .