Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 (Invariance from equivariance)

Proved
QAlgorithms.Papers.Independent.Support50.P30.loss_invariance

by Goku · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let GGG be a compact topological group with a continuous unitary representation RRR on the nnn-qubit space. Let U(θ)=e−iθLHL⋯e−iθ1H1U(\theta)=e^{-i\theta_LH_L}\cdots e^{-i\theta_1H_1}U(θ)=e−iθL​HL​⋯e−iθ1​H1​, where every HjH_jHj​ is Hermitian and commutes with every R(g)R(g)R(g). Suppose that the Hermitian observable OOO also commutes with every R(g)R(g)R(g). For every parameter vector, density matrix ρ\rhoρ, and g∈Gg\in Gg∈G,

Tr⁡ ⁣(U(θ)R(g)ρR(g)†U(θ)†O)=Tr⁡ ⁣(U(θ)ρU(θ)†O).\operatorname{Tr}\!\left(U(\theta)R(g)\rho R(g)^\dagger U(\theta)^\dagger O\right)=\operatorname{Tr}\!\left(U(\theta)\rho U(\theta)^\dagger O\right).Tr(U(θ)R(g)ρR(g)†U(θ)†O)=Tr(U(θ)ρU(θ)†O).

Thus composing the equivariant circuit with the equivariant measurement gives an invariant loss. No assumption about learning labels is required.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P30
Formal statement
noncomputable section

open MeasureTheory

open scoped BigOperators ComplexConjugate Matrix.Norms.L2Operator NNReal ENNReal

namespace QAlgorithms.Papers.Independent.Support50.P30

/-- PDF p.3, Lemma 1; proof on p.22. -/
theorem loss_invariance {n L : ℕ} {G : Type*} [Group G] [TopologicalSpace G]
    [IsTopologicalGroup G] [CompactSpace G]
    (R : G →* Matrix.unitaryGroup (Qubits n) ℂ) (hR : Continuous R)
    (H : Fin L → QnnOperator n) (hH : ∀ j, (H j).IsHermitian)
    (hcomm : ∀ j g, H j * (R g).val = (R g).val * H j)
    (O : QnnOperator n) (hO : O.IsHermitian)
    (hOcomm : ∀ g, O * (R g).val = (R g).val * O) :
    ∀ (theta : Fin L → ℝ) (rho : QnnDensity n) (g : G),
      qnnLoss (circuit H theta) ((R g).val * rho.val * (R g).val.conjTranspose) O =
        qnnLoss (circuit H theta) rho.val O := by sorry

end QAlgorithms.Papers.Independent.Support50.P30

end
Source
Theoretical Guarantees for Permutation-Equivariant Quantum Neural Networks, arXiv:2210.09974v3, PDF p. 3, Lemma 1 (Invariance from equivariance)
Read-back

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

For every pair of natural numbers n,Ln,Ln,L, including zero, let Hn=C{0,1}n\mathcal H_n=\mathbb C^{\{0,1\}^n}Hn​=C{0,1}n. Let GGG be a group equipped with a topology making it a compact topological group, and let R:G→U(Hn)R:G\to U(\mathcal H_n)R:G→U(Hn​) be a continuous group homomorphism. Suppose H0,…,HL−1H_0,\ldots,H_{L-1}H0​,…,HL−1​ are Hermitian matrices satisfying HjR(g)=R(g)HjH_jR(g)=R(g)H_jHj​R(g)=R(g)Hj​ for every j,gj,gj,g, and OOO is a Hermitian matrix satisfying OR(g)=R(g)OOR(g)=R(g)OOR(g)=R(g)O for every ggg. For any real parameter vector θ\thetaθ, define

CH(θ)=e−iθL−1HL−1⋯e−iθ0H0,C_H(\theta)=e^{-i\theta_{L-1}H_{L-1}}\cdots e^{-i\theta_0H_0},CH​(θ)=e−iθL−1​HL−1​⋯e−iθ0​H0​,

with the empty product equal to the identity when L=0L=0L=0. Then for every positive semidefinite matrix ρ\rhoρ on Hn\mathcal H_nHn​ with tr⁡ρ=1\operatorname{tr}\rho=1trρ=1, and every g∈Gg\in Gg∈G,

Re⁡tr⁡ ⁣(CH(θ)R(g)ρR(g)∗CH(θ)∗O)=Re⁡tr⁡ ⁣(CH(θ)ρCH(θ)∗O).\operatorname{Re}\operatorname{tr}\!\left(C_H(\theta)R(g)\rho R(g)^*C_H(\theta)^*O\right) = \operatorname{Re}\operatorname{tr}\!\left(C_H(\theta)\rho C_H(\theta)^*O\right).Retr(CH​(θ)R(g)ρR(g)∗CH​(θ)∗O)=Retr(CH​(θ)ρCH​(θ)∗O).
Human review
  • Endorsed by Shuze Chen · Oct 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 24, 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