OctoInform Beta

OpenAI preprint, September 2026 · §6. Sampling integral columns

§6 (setting): Lifts of residue pairs to shifted boxes, projection to [0,1]2\lbrack 0,1\rbrack^2, and normalization of conditional and SL3\mathrm{SL}_3 sample laws

Integral column sampling boxes and CRT lifting laws.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The setting

To convert residue constructions modulo two coprime moduli hh and qq into planar point sets in the unit square [0,1]2[0, 1]^2, one lifts pairs of residue vectors in (ℤ/hℤ)3×(ℤ/qℤ)3(\mathbb{Z}/h\mathbb{Z})^3 \times (\mathbb{Z}/q\mathbb{Z})^3 to integer columns in the three-dimensional box ([0,N)2×[N,2N))∩ℤ3([0, N)^2 \times [N, 2N)) \cap \mathbb{Z}^3 and projects each column u=(u1,u2,u3)u = (u_1, u_2, u_3) to (u1/u3,u2/u3)(u_1/u_3, u_2/u_3). When hqhq divides NN, the Chinese Remainder Theorem (CRT) guarantees that every pair of prescribed residues has the same number of integer lifts. Uniform lifting over this box therefore yields normalized probability laws for single columns, for triples of columns, and for mm-tuples of columns sampled under a shared random matrix in SL3(ℤ/hℤ)\mathrm{SL}_3(\mathbb{Z}/h\mathbb{Z}) and a shared auxiliary residue set.

Shifted boxes, residues, and projection

A point in ℝ2\mathbb{R}^2 is an ordered pair p=(p1,p2)∈ℝ2p = (p_1, p_2) \in \mathbb{R}^2.✦ It lies in the unit square [0,1]2[0, 1]^2 if 0≤p1≤10 \le p_1 \le 1 and 0≤p2≤10 \le p_2 \le 1.✦

For natural numbers NN and dd and an integer shift vector σ=(σ1,…,σd)∈ℤd\sigma = (\sigma_1, \dots, \sigma_d) \in \mathbb{Z}^d, the shifted integer box Bd(N,σ)B_d(N, \sigma) is the finite set of integer vectors defined by Bd(N,σ)=∏i=1d([σi,σi+N)∩ℤ).B_d(N, \sigma) = \prod_{i=1}^{d} \bigl([\sigma_i, \sigma_i + N) \cap \mathbb{Z}\bigr).(1)✦ For a natural number NN, the sampling shift is σN=(0,0,N)∈ℤ3\sigma_N = (0, 0, N) \in \mathbb{Z}^3, and the corresponding sampling box is ℬN=B3(N,σN)=([0,N)2×[N,2N))∩ℤ3\mathcal{B}_N = B_3(N, \sigma_N) = ([0, N)^2 \times [N, 2N)) \cap \mathbb{Z}^3.✦ For natural numbers hh, qq, and LL, the integer column box is ℬLhq\mathcal{B}_{Lhq}.✦

The projective map π:ℬN→ℝ2\pi : \mathcal{B}_N \to \mathbb{R}^2 sends an integer column u=(u1,u2,u3)∈ℬNu = (u_1, u_2, u_3) \in \mathcal{B}_N to the point π(u)=(u1u3,u2u3).\pi(u) = \Bigl(\frac{u_1}{u_3}, \frac{u_2}{u_3}\Bigr).(2)✦ For any natural number mm, write Rm=ℤ/mℤR_m = \mathbb{Z}/m\mathbb{Z} for the residue ring modulo mm. The residue map resm:Bd(N,σ)→Rmd\mathrm{res}_m : B_d(N, \sigma) \to R_m^d reduces each coordinate modulo mm, sending x=(x1,…,xd)x = (x_1, \dots, x_d) to (x1mod⁡m,…,xdmod⁡m)(x_1 \bmod m, \dots, x_d \bmod m).✦ For triples of columns x=(x1,x2,x3)x = (x_1, x_2, x_3) in B3(N,σ)3B_3(N, \sigma)^3, write resm(3)(x)=(resm(x1),resm(x2),resm(x3))\mathrm{res}_m^{(3)}(x) = (\mathrm{res}_m(x_1), \mathrm{res}_m(x_2), \mathrm{res}_m(x_3)) in (Rm3)3(R_m^3)^3.

Lifted column and triple masses

Let XX, AA, and BB be sets, let f:X→Af : X \to A and g:X→Bg : X \to B be maps, let a∈Aa \in A, let V⊆BV \subseteq B be a finite subset, and let ss and LL be natural numbers. The conditional column mass μcond(f,g,a,V,s,L;x)∈ℝ\mu_{\mathrm{cond}}(f, g, a, V, s, L; x) \in \mathbb{R} at x∈Xx \in X equals 1/(sL3)1/(sL^3) when f(x)=af(x) = a and g(x)∈Vg(x) \in V, and 00 otherwise.✦ For natural numbers hh, qq, LL, and ss, a shift σ∈ℤ3\sigma \in \mathbb{Z}^3, a residue a∈Rh3a \in R_h^3, and a finite subset V⊆Rq3V \subseteq R_q^3, the integer column law on B3(Lhq,σ)B_3(Lhq, \sigma) is the real-valued function μcol(h,q,L,σ,a,V,s;u)=μcond(resh,resq,a,V,s,L;u).\mu_{\mathrm{col}}(h, q, L, \sigma, a, V, s; u) = \mu_{\mathrm{cond}}(\mathrm{res}_h, \mathrm{res}_q, a, V, s, L; u).(3)✦

A triple b=(b1,b2,b3)∈B3b = (b_1, b_2, b_3) \in B^3 is contained in a finite subset V⊆BV \subseteq B if bi∈Vb_i \in V for every i∈{1,2,3}i \in \{1, 2, 3\}.✦ For a finite subset O⊆AO \subseteq A and an element a∈Aa \in A, the main residue mass mmain(O,a)∈ℝm_{\mathrm{main}}(O, a) \in \mathbb{R} equals 1/|O|1/|O| when a∈Oa \in O and 00 otherwise.✦ Given a finite index set Ω\Omega, real weights w:Ω→ℝw : \Omega \to \mathbb{R}, and a family of finite subsets V(ω)⊆BV(\omega) \subseteq B indexed by ω∈Ω\omega \in \Omega, the triple inclusion mass I(w,V,b)∈ℝI(w, V, b) \in \mathbb{R} at b∈B3b \in B^3 is the sum of w(ω)w(\omega) over all ω∈Ω\omega \in \Omega for which bb is contained in V(ω)V(\omega).✦ For natural numbers ss and DD and maps f:X→Af : X \to A and g:X→B3g : X \to B^3, the auxiliary residue mass mauxm_{\mathrm{aux}}, the joint residue mass mresm_{\mathrm{res}}, and the lifted probability mass mliftm_{\mathrm{lift}} are given by maux(w,V,s;b)=I(w,V,b)s3,mres(O,w,V,s;a,b)=mmain(O,a)maux(w,V,s;b),mlift(f,g,O,w,V,s,D;x)=mres(O,w,V,s;f(x),g(x))D.\begin{aligned} m_{\mathrm{aux}}(w, V, s; b) &= \frac{I(w, V, b)}{s^3}, \\ m_{\mathrm{res}}(O, w, V, s; a, b) &= m_{\mathrm{main}}(O, a)\, m_{\mathrm{aux}}(w, V, s; b), \\ m_{\mathrm{lift}}(f, g, O, w, V, s, D; x) &= \frac{m_{\mathrm{res}}(O, w, V, s; f(x), g(x))}{D}. \end{aligned}(4)

Mixtures and the special-linear sample law

Let α\alpha, β\beta, ι\iota, and Θ\Theta be sets with β\beta and ι\iota finite. For real weights p:β→ℝp : \beta \to \mathbb{R} and a family of functions νb:α→ℝ\nu_b : \alpha \to \mathbb{R} (b∈βb \in \beta), the mixture weight at a∈αa \in \alpha is mix(p,ν;a)\mathrm{mix}(p, \nu; a). For a real-valued weight function μ:α→ℝ\mu : \alpha \to \mathbb{R} and a family x=(xi)i∈ι∈αιx = (x_i)_{i \in \iota} \in \alpha^\iota, the product probability weight is prod(μ;x)\mathrm{prod}(\mu; x). Given parameter weights ρ:Θ→ℝ\rho : \Theta \to \mathbb{R} and conditional weights μθ:α→ℝ\mu_\theta : \alpha \to \mathbb{R} (θ∈Θ\theta \in \Theta), the conditional product weight at (θ,x)∈Θ×αι(\theta, x) \in \Theta \times \alpha^\iota is sh(ρ,μ;θ,x)\mathrm{sh}(\rho, \mu; \theta, x). These three weights are defined by mix(p,ν;a)=∑b∈βp(b)νb(a),prod(μ;x)=∏i∈ιμ(xi),sh(ρ,μ;θ,x)=ρ(θ)prod(μθ;x).\begin{aligned} \mathrm{mix}(p, \nu; a) &= \sum_{b \in \beta} p(b)\,\nu_b(a), \\ \mathrm{prod}(\mu; x) &= \prod_{i \in \iota} \mu(x_i), \\ \mathrm{sh}(\rho, \mu; \theta, x) &= \rho(\theta)\,\mathrm{prod}(\mu_\theta; x). \end{aligned}(5)

Given maps f:X→Af : X \to A and g:X→Bg : X \to B, a residue family F:Θ×β→AF : \Theta \times \beta \to A, real weights p:β→ℝp : \beta \to \mathbb{R}, finite subsets V(ω)⊆BV(\omega) \subseteq B indexed by ω∈Ω\omega \in \Omega, and natural numbers ss and LL, the mixture column mass at (θ,ω)∈Θ×Ω(\theta, \omega) \in \Theta \times \Omega and x∈Xx \in X is μmix(f,g,F,p,V,s,L;θ,ω,x)=∑b∈βp(b)μcond(f,g,F(θ,b),V(ω),s,L;x).\begin{aligned} &\mu_{\mathrm{mix}}(f, g, F, p, V, s, L; \theta, \omega, x) \\ &\qquad = \sum_{b \in \beta} p(b)\,\mu_{\mathrm{cond}}\bigl(f, g, F(\theta, b), V(\omega), s, L; x\bigr). \end{aligned}(6)✦ Specializing (6) to X=ℬLhqX = \mathcal{B}_{Lhq}, f=reshf = \mathrm{res}_h, and g=resqg = \mathrm{res}_q yields the mixed integer column law νF,p,V,sh,q,L(θ,ω;u)\nu^{h,q,L}_{F, p, V, s}(\theta, \omega; u) for u∈ℬLhqu \in \mathcal{B}_{Lhq}.✦

In the sampling model, all column samples share one pair of coordinate changes while choosing their labels, residues, and integer lifts independently conditioned on that pair.

For a natural number mm and real weights ρ:Θ→ℝ\rho : \Theta \to \mathbb{R} and w:Ω→ℝw : \Omega \to \mathbb{R}, the joint column sample law on (Θ×Ω)×ℬLhqm(\Theta \times \Omega) \times \mathcal{B}_{Lhq}^m is the conditional product weight PF,ρ,w,p,V,sh,q,L,m(θ,ω,x)=ρ(θ)w(ω)∏j=1mνF,p,V,sh,q,L(θ,ω;xj).\begin{aligned} &P^{h,q,L,m}_{F, \rho, w, p, V, s}(\theta, \omega, x) \\ &\qquad = \rho(\theta)\, w(\omega) \prod_{j=1}^{m} \nu^{h,q,L}_{F, p, V, s}(\theta, \omega; x_j). \end{aligned}(7)✦

For a natural number hh, let SL3(Rh)\mathrm{SL}_3(R_h) be the special linear group of 3×33 \times 3 matrices over RhR_h with determinant 11.✦ Each G∈SL3(Rh)G \in \mathrm{SL}_3(R_h) acts on a column c∈Rh3c \in R_h^3 by left matrix-vector multiplication Gc∈Rh3Gc \in R_h^3.✦ When h>0h > 0, the uniform law ρh:SL3(Rh)→ℝ\rho_h : \mathrm{SL}_3(R_h) \to \mathbb{R} assigns weight ρh(G)=1/|SL3(Rh)|\rho_h(G) = 1 / |\mathrm{SL}_3(R_h)| to every G∈SL3(Rh)G \in \mathrm{SL}_3(R_h).✦

The claim

Theorem. Let hh and qq be coprime positive integers.

First, for any natural numbers NN and dd with hq∣Nhq \mid N, any shift σ∈ℤd\sigma \in \mathbb{Z}^d, and any residues a∈Rhda \in R_h^d and b∈Rqdb \in R_q^d, the number of lifts of (a,b)(a, b) in Bd(N,σ)B_d(N, \sigma) satisfies |{x∈Bd(N,σ):resh(x)=aand resq(x)=b}|=(Nhq)d.\begin{aligned} \bigl|\bigl\{x \in B_d(N, \sigma) :{}& \mathrm{res}_h(x) = a \\ &\text{and } \mathrm{res}_q(x) = b\bigr\}\bigr| = \Bigl(\frac{N}{hq}\Bigr)^d. \end{aligned}(8)✦

Second, for any positive integer NN and any column u∈ℬNu \in \mathcal{B}_N, the projection (2) lies in the unit square: π(u)∈[0,1]2.\pi(u) \in \lbrack 0, 1\rbrack^2.(9)✦

Third, for any positive integers LL and ss, any shift σ∈ℤ3\sigma \in \mathbb{Z}^3, any residue a∈Rh3a \in R_h^3, and any finite subset V⊆Rq3V \subseteq R_q^3 with |V|=s|V| = s, the integer column law (3) sums to 11: ∑u∈B3(Lhq,σ)μcol(h,q,L,σ,a,V,s;u)=1.\sum_{u \in B_3(Lhq, \sigma)} \mu_{\mathrm{col}}(h, q, L, \sigma, a, V, s; u) = 1.(10)✦

Fourth, let Ω\Omega be a finite set, let LL and ss be positive integers, let σ∈ℤ3\sigma \in \mathbb{Z}^3, let O⊆(Rh3)3O \subseteq (R_h^3)^3 be a nonempty finite set, let w:Ω→ℝw : \Omega \to \mathbb{R} satisfy ∑ω∈Ωw(ω)=1\sum_{\omega \in \Omega} w(\omega) = 1, and let V(ω)⊆Rq3V(\omega) \subseteq R_q^3 be finite subsets with |V(ω)|=s|V(\omega)| = s for every ω∈Ω\omega \in \Omega. Then the lifted probability mass (4) on triples in B3(Lhq,σ)3B_3(Lhq, \sigma)^3 with lift count L9L^9 sums to 11: ∑x∈B3(Lhq,σ)3mlift(resh(3),resq(3),O,w,V,s,L9;x)=1.\sum_{x \in B_3(Lhq, \sigma)^3} m_{\mathrm{lift}}\bigl(\mathrm{res}_h^{(3)}, \mathrm{res}_q^{(3)}, O, w, V, s, L^9; x\bigr) = 1.(11)✦

Fifth, let β\beta and Ω\Omega be finite sets, let LL and ss be positive integers, let mm be a natural number, let c:β→Rh3c : \beta \to R_h^3, and define Fc:SL3(Rh)×β→Rh3F_c : \mathrm{SL}_3(R_h) \times \beta \to R_h^3 by Fc(G,b)=Gc(b)F_c(G, b) = G c(b). If w:Ω→ℝw : \Omega \to \mathbb{R} and p:β→ℝp : \beta \to \mathbb{R} satisfy ∑ω∈Ωw(ω)=1\sum_{\omega \in \Omega} w(\omega) = 1 and ∑b∈βp(b)=1\sum_{b \in \beta} p(b) = 1, and if V(ω)⊆Rq3V(\omega) \subseteq R_q^3 are finite subsets with |V(ω)|=s|V(\omega)| = s for every ω∈Ω\omega \in \Omega, then the joint column sample law (7) sums to 11: ∑z∈(SL3(Rh)×Ω)×ℬLhqmPFc,ρh,w,p,V,sh,q,L,m(z)=1.\sum_{z \in (\mathrm{SL}_3(R_h) \times \Omega) \times \mathcal{B}_{Lhq}^m} P^{h,q,L,m}_{F_c, \rho_h, w, p, V, s}(z) = 1.(12)✦

What is checked

In the Lean library, the theorem above is stated over shifted integer boxes Bd(N,σ)B_d(N, \sigma), the sampling box ℬN\mathcal{B}_N with its projective map π\pi into ℝ2\mathbb{R}^2, coordinatewise residue reductions modulo coprime positive integers hh and qq, the lifted column and triple probability masses, and the joint column sample law mixed over SL3(Rh)\mathrm{SL}_3(R_h) and a finite auxiliary index set Ω\Omega.