Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Bilinear trace pairing of arbitrary symbols

Open
QAlgorithms.Papers.Independent.Intake100.P22.trace_pairing

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

prove2quantum

Fix a finite number n≥0n\ge0n≥0 of fermionic modes. Let C2n=End⁡(C2n)\mathcal C_{2n}=\operatorname{End}(\mathbb C^{2^n})C2n​=End(C2n) have Hermitian Majorana generators cac_aca​ satisfying cacb+cbca=2δabIc_ac_b+c_bc_a=2\delta_{ab}Ica​cb​+cb​ca​=2δab​I. The symbol map ω\omegaω sends each ordered Majorana monomial linearly to the corresponding ordered Grassmann monomial; it is not multiplicative. Gaussian states, operators, and maps have the meanings of Definitions 1–3 of the paper. All maps act on the full complex operator algebra, including its odd sector.

For arbitrary operators X,Y∈C2nX,Y\in\mathcal C_{2n}X,Y∈C2n​, use two anticommuting variable blocks θ,μ\theta,\muθ,μ and the left Berezin convention Dθ=dθ2n⋯dθ1D\theta=d\theta_{2n}\cdots d\theta_1Dθ=dθ2n​⋯dθ1​. Then

Tr⁡(XY)=(−2)n∫Dθ Dμ eθTμω(X,θ)ω(Y,μ).\operatorname{Tr}(XY)=(-2)^n\int D\theta\,D\mu\ e^{\theta^T\mu}\omega(X,\theta)\omega(Y,\mu).Tr(XY)=(−2)n∫DθDμ eθTμω(X,θ)ω(Y,μ).

There is no adjoint on XXX and neither input needs a parity or Gaussianity restriction. The identity converts operator traces into finite Grassmann calculations.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P22
Formal statement
noncomputable section

open scoped BigOperators Matrix ComplexConjugate ComplexOrder

namespace QAlgorithms.Papers.Independent.Intake100.P22

open QAlgorithms.Papers.Independent.Advance50.P19
  (CARSystem Major monomial wick totalFermionParity)

open QAlgorithms.Papers.Independent.Information100.P21 (Op)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- PDF p.4, Eq.(15): bilinear trace pairing, with no adjoint on X.
All theta and mu variables lie in a single Grassmann algebra. -/
theorem trace_pairing {n : ℕ} (s : CARSystem n) (X Y : Op (Qubits n)) :
    (X * Y).trace = (-2 : ℂ) ^ n *
      (grassMul
        (grassMul (grassExp (∑ a : Major n,
          grassMul (blockVars (2 * n) 2 0 a) (blockVars (2 * n) 2 1 a)))
          (grassSubst (majoranaSymbol s X) (blockVars (2 * n) 2 0)))
        (grassSubst (majoranaSymbol s Y) (blockVars (2 * n) 2 1))) Finset.univ := by sorry

end QAlgorithms.Papers.Independent.Intake100.P22

end
Source
Lagrangian representation for fermionic linear optics, arXiv:quant-ph/0404180v2, PDF p. 4, §IV, Eq.(15): trace pairing of arbitrary operator symbols
Read-back

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

For every natural number nnn, let Hn=C{0,1}n\mathcal H_n=\mathbb C^{\{0,1\}^n}Hn​=C{0,1}n, let sss supply Hermitian matrices γa\gamma_aγa​, 0≤a<d=2n0\le a<d=2n0≤a<d=2n, satisfying γaγb+γbγa=2δabI\gamma_a\gamma_b+\gamma_b\gamma_a=2\delta_{ab}Iγa​γb​+γb​γa​=2δab​I, and let X,YX,YX,Y be arbitrary complex matrices on Hn\mathcal H_nHn​. For each subset SSS of these indices, put σs(X)(S)=2−ntr⁡(γS†X)\sigma_s(X)(S)=2^{-n}\operatorname{tr}(\gamma_S^\dagger X)σs​(X)(S)=2−ntr(γS†​X), where γS\gamma_SγS​ is the increasing ordered product and γ∅=I\gamma_\varnothing=Iγ∅​=I, and define σs(Y)\sigma_s(Y)σs​(Y) likewise. In the complex exterior algebra on 2d=4n2d=4n2d=4n ordered generators, with two consecutive blocks θ0,…,θd−1\theta_0,\ldots,\theta_{d-1}θ0​,…,θd−1​ and η0,…,ηd−1\eta_0,\ldots,\eta_{d-1}η0​,…,ηd−1​, all generators anticommute and square to zero; write σs(X)(θ)=∑Sσs(X)(S)θS\sigma_s(X)(\theta)=\sum_S\sigma_s(X)(S)\theta_Sσs​(X)(θ)=∑S​σs​(X)(S)θS​ and σs(Y)(η)=∑Sσs(Y)(S)ηS\sigma_s(Y)(\eta)=\sum_S\sigma_s(Y)(S)\eta_Sσs​(Y)(η)=∑S​σs​(Y)(S)ηS​, using increasing ordered products. The asserted identity is

tr⁡(XY)=(−2)n[θ0⋯θd−1η0⋯ηd−1]((∑k=04n(∑a<dθaηa)kk!)σs(X)(θ)σs(Y)(η)),\operatorname{tr}(XY) =(-2)^n \left[\theta_0\cdots\theta_{d-1}\eta_0\cdots\eta_{d-1}\right] \left( \left(\sum_{k=0}^{4n}\frac{\left(\sum_{a<d}\theta_a\eta_a\right)^k}{k!}\right) \sigma_s(X)(\theta)\sigma_s(Y)(\eta) \right),tr(XY)=(−2)n[θ0​⋯θd−1​η0​⋯ηd−1​]((k=0∑4n​k!(∑a<d​θa​ηa​)k​)σs​(X)(θ)σs​(Y)(η)),

where brackets mean the coefficient of the displayed full ordered monomial, and the three factors are multiplied in their displayed order. No Hermitian, positivity, or normalization assumptions are made on X,YX,YX,Y. For n=0n=0n=0, the full monomial is the empty monomial, the exponential sum has only its constant term, and the scalar prefactor is 111.

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