Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§VI (65)–(67): CSS lattice construction

Open
QAlgorithms.Papers.Independent.Intakenext100.P12.css_lattice_construction

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let N≥1N\ge1N≥1 and let Mq,MpM_q,M_pMq​,Mp​ be nonsingular real N×NN\times NN×N row generator matrices, with Lp⊆Lq∗L_p\subseteq L_q^*Lp​⊆Lq∗​ for the Euclidean integer dual. In the displayed source block order put M=diag⁡(Mq,Mp)M=\operatorname{diag}(M_q,M_p)M=diag(Mq​,Mp​). Then MMM is nonsingular, the Gram matrix is integral, and

MΩMT=(0MqMpT−MpMqT0).M\Omega M^T=\begin{pmatrix}0&M_qM_p^T\\-M_pM_q^T&0\end{pmatrix}.MΩMT=(0−Mp​MqT​​Mq​MpT​0​).

All lattice vectors have integral symplectic pairings. The explicit position comb on the ppp-translation lattice is a nonzero continuous Schwartz functional fixed by the physical ppp translations and qqq modulations. The physical Weyl coordinates are obtained by swapping the source's grouped (q,p)(q,p)(q,p) blocks to the grouped (p,q)(p,q)(p,q) coefficient convention.

For the single-oscillator rectangular construction with n≥1n\ge1n≥1 and α>0\alpha>0α>0, the scalar generator product is nnn, so its displayed Gram matrix is nΩn\OmeganΩ. This supplies an actual generalized CSS stabilizer state, rather than assuming that the common eigenspace is nonzero.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P12
Formal statement
noncomputable section

open scoped BigOperators

open MeasureTheory Matrix ComplexConjugate

open QAlgorithms.Papers.Independent.Dependency50.P10 (Phase sigma)

namespace QAlgorithms.Papers.Independent.Intakenext100.P12

/-- Section VI (65)–(67), PDF p.8: the source's CSS row block construction. -/
theorem css_lattice_construction (N : ℕ) (hN : 0 < N)
    (Mq Mp : Matrix (Fin N) (Fin N) ℝ) (hq : Mq.det ≠ 0) (hp : Mp.det ≠ 0)
    (hdual : rowLattice Mp ⊆ euclideanDual (rowLattice Mq)) :
    let M := Matrix.fromBlocks Mq 0 0 Mp
    HasCSSDistribution N Mq Mp ∧ M.det ≠ 0 ∧ IntegralMatrix (latticeGram N M) ∧
    latticeGram N M = Matrix.fromBlocks 0 (Mq * Mp.transpose) (-(Mp * Mq.transpose)) 0 ∧
    (∀ v ∈ rowLattice M, ∀ w ∈ rowLattice M,
      ∃ k : ℤ, gkpPair N v w = k) ∧
    (∀ n : ℕ, 0 < n → ∀ alpha : ℝ, 0 < alpha →
      latticeGram 1 (Matrix.fromBlocks
        (Matrix.diagonal (fun _ : Fin 1 => Real.sqrt (2 * Real.pi) / alpha)) 0 0
        (Matrix.diagonal (fun _ : Fin 1 => n * alpha / Real.sqrt (2 * Real.pi)))) =
          (n : ℝ) • sigma 1) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P12

end
Source
Encoding a qubit in an oscillator, arXiv:quant-ph/0008040v3, PDF p. 8, §VI (65)–(67): CSS lattice construction
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For every positive integer NNN and invertible real N×NN\times NN×N matrices Mq,MpM_q,M_pMq​,Mp​, define Λ(B)={x:∃z∈ZI, xj=∑i∈IziBij for every j}\Lambda(B)=\{x:\exists z\in\mathbb Z^I,\ x_j=\sum_{i\in I}z_iB_{ij}\text{ for every }j\}Λ(B)={x:∃z∈ZI, xj​=∑i∈I​zi​Bij​ for every j} for any real square matrix indexed by a finite set III. Assume that ∑jujvj∈Z\sum_j u_jv_j\in\mathbb Z∑j​uj​vj​∈Z for every u∈Λ(Mp)u\in\Lambda(M_p)u∈Λ(Mp​) and v∈Λ(Mq)v\in\Lambda(M_q)v∈Λ(Mq​). Put M=(Mq00Mp)M=\begin{pmatrix}M_q&0\\0&M_p\end{pmatrix}M=(Mq​0​0Mp​​) and ΣN=(0IN−IN0)\Sigma_N=\begin{pmatrix}0&I_N\\-I_N&0\end{pmatrix}ΣN​=(0−IN​​IN​0​). Then there exists a nonzero continuous complex-linear functional TTT on the Schwartz functions on RN\mathbb R^NRN with T(f)=∑z∈ZNf((2π∑izi(Mp)ij)j)T(f)=\sum_{z\in\mathbb Z^N}f((\sqrt{2\pi}\sum_i z_i(M_p)_{ij})_j)T(f)=∑z∈ZN​f((2π​∑i​zi​(Mp​)ij​)j​) for every fff, and, for every row index iii and Schwartz functions f,gf,gf,g, T(g)=T(f)T(g)=T(f)T(g)=T(f) whenever either g(x)=f((xj+2π(Mp)ij)j)g(x)=f((x_j+\sqrt{2\pi}(M_p)_{ij})_j)g(x)=f((xj​+2π​(Mp​)ij​)j​) for all xxx or g(x)=exp⁡(i2π∑j(Mq)ijxj)f(x)g(x)=\exp(i\sqrt{2\pi}\sum_j(M_q)_{ij}x_j)f(x)g(x)=exp(i2π​∑j​(Mq​)ij​xj​)f(x) for all xxx; the sum uses the total infinite-sum convention. Furthermore, det⁡M≠0\det M\ne0detM=0, every entry of MΣNMTM\Sigma_NM^{\mathsf T}MΣN​MT is integral,

MΣNMT=(0MqMpT−MpMqT0),M\Sigma_NM^{\mathsf T} =\begin{pmatrix} 0&M_qM_p^{\mathsf T}\\ -M_pM_q^{\mathsf T}&0 \end{pmatrix},MΣN​MT=(0−Mp​MqT​​Mq​MpT​0​),

and ∑j(vleft,jwright,j−vright,jwleft,j)∈Z\sum_j(v_{\mathrm{left},j}w_{\mathrm{right},j}-v_{\mathrm{right},j}w_{\mathrm{left},j})\in\mathbb Z∑j​(vleft,j​wright,j​−vright,j​wleft,j​)∈Z for every v,w∈Λ(M)v,w\in\Lambda(M)v,w∈Λ(M). Finally, for every positive integer nnn and every positive real α\alphaα, the real 2×22\times22×2 matrix B=diag⁡(2π/α, nα/2π)B=\operatorname{diag}(\sqrt{2\pi}/\alpha,\ n\alpha/\sqrt{2\pi})B=diag(2π​/α, nα/2π​) satisfies BΣ1BT=nΣ1B\Sigma_1B^{\mathsf T}=n\Sigma_1BΣ1​BT=nΣ1​.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me