Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Ordered projective measurements, outcome probabilities and conditional states

Definition
GaoQuantumUnion_Model

by Mrnaiq · Nov 19, 2026 · Mathlib 0df444a (Lean v4.33.1)

gao-2015quantum-informationquantum-union-boundsequential-measurementstrace-distance

Finite complex matrices are used. An orthogonal projector is Hermitian and idempotent. For a family indexed in ascending order, the sequential operator is K=PN−1⋯P0K=P_{N-1}\cdots P_0K=PN−1​⋯P0​, defined as the identity for an empty sequence. The unnormalized output is KρK†K\rho K^\daggerKρK† and its real trace is the joint success probability qqq. Failure terms are Tr⁡((I−Pi)ρ)\operatorname{Tr}((I-P_i)\rho)Tr((I−Pi​)ρ), summed on the original input. The conditional state is q−1KρK†q^{-1}K\rho K^\daggerq−1KρK†; Lean makes it zero when q=0q=0q=0, and every disturbance theorem separately requires q>0q>0q>0. Rank-one matrices and unit-vector predicates support the pure-state lemma. Definitions impose no theorem hypotheses; the theorems supply density and projector assumptions.

Definition code
import Definitions.Def_WildeQIT_traceDist
import Definitions.Def_WildeQIT_IsDensityOperator
import Mathlib.Analysis.Matrix.Order
import Mathlib.Data.List.OfFn
noncomputable section
open Matrix WildeQIT
open scoped MatrixOrder ComplexOrder ComplexConjugate
set_option autoImplicit false
namespace GaoQuantumUnion
variable {ι : Type} [Fintype ι] [DecidableEq ι]
def IsProjector (P : Matrix ι ι ℂ) : Prop := P.IsHermitian ∧ P*P=P
def seqOp {N : ℕ} (P : Fin N → Matrix ι ι ℂ) : Matrix ι ι ℂ :=
  (List.ofFn P).foldl (fun K Q => Q*K) 1
def seqOutput {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : Matrix ι ι ℂ :=
  seqOp P*ρ*(seqOp P)ᴴ
def successProb {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : ℝ :=
  (seqOutput P ρ).trace.re
def failureTerm (P ρ : Matrix ι ι ℂ) : ℝ := ((1-P)*ρ).trace.re
def failureSum {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : ℝ :=
  ∑ i, failureTerm (P i) ρ
def postState {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : Matrix ι ι ℂ :=
  (successProb P ρ : ℂ)⁻¹ • seqOutput P ρ
def pureState (ψ : ι → ℂ) : Matrix ι ι ℂ := vecMulVec ψ (star ψ)
def IsUnitVector (ψ : ι → ℂ) : Prop := ∑ i, ‖ψ i‖^2=1
end GaoQuantumUnion
Source
Jingliang Gao, Quantum union bounds for sequential projective measurements, arXiv:1410.5688v2, Physical Review A 92, 052331 (2015), https://doi.org/10.1103/PhysRevA.92.052331; PDF pp. 2–5: sequential experiment, Theorem 1, Corollary 1, Remark 1 and pure-state representation
Read-back

What the Lean code literally says, in plain math · OpenAI Codex (independent blind read-back agent)

IsProjector. For every finite type ι\iotaι and every complex matrix PPP with rows and columns indexed by ι\iotaι, IsProjector⁡(P)\operatorname{IsProjector}(P)IsProjector(P) is the proposition that PPP is Hermitian, meaning P∗=PP^*=PP∗=P, and that P2=PP^2=PP2=P, where P∗P^*P∗ denotes the conjugate transpose. No assumption that ι\iotaι is nonempty is made; the unique matrix on an empty index type satisfies both conditions.

seqOp. For every finite type ι\iotaι equipped with decidable equality, every natural number NNN, and every family (Pj)0≤j<N(P_j)_{0\le j<N}(Pj​)0≤j<N​ of complex matrices indexed by ι×ι\iota\times\iotaι×ι, define seqOp⁡(P)=KN\operatorname{seqOp}(P)=K_NseqOp(P)=KN​, where K0=IK_0=IK0​=I and Kj+1=PjKjK_{j+1}=P_jK_jKj+1​=Pj​Kj​ for 0≤j<N0\le j<N0≤j<N, with III the identity matrix. Thus, when N>0N>0N>0, its value is PN−1⋯P1P0P_{N-1}\cdots P_1P_0PN−1​⋯P1​P0​, and when N=0N=0N=0, its value is III. No Hermitian or idempotence assumption is imposed on the matrices, and the index type ι\iotaι may be empty.

seqOutput. For every finite type ι\iotaι equipped with decidable equality, every natural number NNN, every family (Pj)0≤j<N(P_j)_{0\le j<N}(Pj​)0≤j<N​ of complex matrices indexed by ι×ι\iota\times\iotaι×ι, and every complex matrix ρ\rhoρ indexed by ι×ι\iota\times\iotaι×ι, define seqOutput⁡(P,ρ)=KρK∗\operatorname{seqOutput}(P,\rho)=K\rho K^*seqOutput(P,ρ)=KρK∗, where K=PN−1⋯P0K=P_{N-1}\cdots P_0K=PN−1​⋯P0​ for N>0N>0N>0, K=IK=IK=I for N=0N=0N=0, and K∗K^*K∗ is the conjugate transpose. In particular, for N=0N=0N=0 the value is ρ\rhoρ. Neither the matrices PjP_jPj​ nor ρ\rhoρ are subject to any Hermitian, positivity, idempotence, or normalization hypothesis; ι\iotaι may be empty.

successProb. For every finite type ι\iotaι equipped with decidable equality, every natural number NNN, every family (Pj)0≤j<N(P_j)_{0\le j<N}(Pj​)0≤j<N​ of complex matrices indexed by ι×ι\iota\times\iotaι×ι, and every complex matrix ρ\rhoρ indexed by ι×ι\iota\times\iotaι×ι, define the real number successProb⁡(P,ρ)=Re⁡tr⁡(KρK∗)\operatorname{successProb}(P,\rho)=\operatorname{Re}\operatorname{tr}(K\rho K^*)successProb(P,ρ)=Retr(KρK∗), where K=PN−1⋯P0K=P_{N-1}\cdots P_0K=PN−1​⋯P0​ for N>0N>0N>0, K=IK=IK=I for N=0N=0N=0, and K∗K^*K∗ denotes conjugate transpose. For N=0N=0N=0 this is Re⁡tr⁡(ρ)\operatorname{Re}\operatorname{tr}(\rho)Retr(ρ), and for empty ι\iotaι it is zero. There are no hypotheses on the matrices that require this real number to lie in [0,1][0,1][0,1].

failureTerm. For every finite type ι\iotaι equipped with decidable equality and every two complex matrices P,ρP,\rhoP,ρ indexed by ι×ι\iota\times\iotaι×ι, define the real number failureTerm⁡(P,ρ)=Re⁡tr⁡((I−P)ρ)\operatorname{failureTerm}(P,\rho)=\operatorname{Re}\operatorname{tr}((I-P)\rho)failureTerm(P,ρ)=Retr((I−P)ρ), where III is the identity matrix. No Hermitian, positivity, idempotence, or normalization assumptions are imposed, so no sign or probability range is required for this value; if ι\iotaι is empty, it is zero.

failureSum. For every finite type ι\iotaι equipped with decidable equality, every natural number NNN, every family (Pj)0≤j<N(P_j)_{0\le j<N}(Pj​)0≤j<N​ of complex matrices indexed by ι×ι\iota\times\iotaι×ι, and every complex matrix ρ\rhoρ indexed by ι×ι\iota\times\iotaι×ι, define failureSum⁡(P,ρ)=∑j=0N−1Re⁡tr⁡((I−Pj)ρ)\operatorname{failureSum}(P,\rho)=\sum_{j=0}^{N-1}\operatorname{Re}\operatorname{tr}((I-P_j)\rho)failureSum(P,ρ)=∑j=0N−1​Retr((I−Pj​)ρ) as a real number, with III the identity matrix. This is zero when N=0N=0N=0 because the sum is empty, and is also zero when ι\iotaι is empty. No Hermitian, positivity, idempotence, or normalization assumptions are imposed on any matrix.

postState. For every finite type ι\iotaι equipped with decidable equality, every natural number NNN, every family (Pj)0≤j<N(P_j)_{0\le j<N}(Pj​)0≤j<N​ of complex matrices indexed by ι×ι\iota\times\iotaι×ι, and every complex matrix ρ\rhoρ indexed by ι×ι\iota\times\iotaι×ι, let K=PN−1⋯P0K=P_{N-1}\cdots P_0K=PN−1​⋯P0​ for N>0N>0N>0 and K=IK=IK=I for N=0N=0N=0, let A=KρK∗A=K\rho K^*A=KρK∗ with K∗K^*K∗ the conjugate transpose, and let s=Re⁡tr⁡(A)s=\operatorname{Re}\operatorname{tr}(A)s=Retr(A). Define postState⁡(P,ρ)=(s−1)A\operatorname{postState}(P,\rho)=(s^{-1})ApostState(P,ρ)=(s−1)A, where the real number sss is first embedded in C\mathbb CC and its complex inverse acts by scalar multiplication. The inverse of zero is defined to be zero, so when s=0s=0s=0 the value is the zero matrix, including cases in which AAA is nonzero. For N=0N=0N=0, the same formula is (Re⁡tr⁡(ρ))−1ρ(\operatorname{Re}\operatorname{tr}(\rho))^{-1}\rho(Retr(ρ))−1ρ with this zero-inverse convention. No Hermitian, positivity, idempotence, normalization, or nonzero-denominator hypotheses are imposed; ι\iotaι may be empty.

pureState. For every type ι\iotaι, with no finiteness or decidable-equality assumption, and every function ψ:ι→C\psi:\iota\to\mathbb Cψ:ι→C, define pureState⁡(ψ)\operatorname{pureState}(\psi)pureState(ψ) to be the complex matrix indexed by ι×ι\iota\times\iotaι×ι whose (i,j)(i,j)(i,j) entry is ψ(i)ψ(j)‾\psi(i)\overline{\psi(j)}ψ(i)ψ(j)​. No unit-norm or nonzero hypothesis is imposed on ψ\psiψ; the zero function gives the zero matrix, and when ι\iotaι is empty this is the unique empty matrix.

IsUnitVector. For every finite type ι\iotaι and every function ψ:ι→C\psi:\iota\to\mathbb Cψ:ι→C, IsUnitVector⁡(ψ)\operatorname{IsUnitVector}(\psi)IsUnitVector(ψ) is the proposition ∑i∈ι∥ψ(i)∥2=1\sum_{i\in\iota}\lVert\psi(i)\rVert^2=1∑i∈ι​∥ψ(i)∥2=1, where ∥ψ(i)∥\lVert\psi(i)\rVert∥ψ(i)∥ is the usual complex modulus and the equality is in R\mathbb RR. The index type may be empty; in that case the sum is zero and this proposition is false.

Human review
  • Endorsed by Shuze Chen · Nov 20, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Mrnaiq · Nov 20, 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