Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Definitions for Extremal Quantum States in Coupled Systems

Definition
QAlgorithms_Papers_Independent_Intakethird100_P12

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The objects the formalized statements of Extremal Quantum States in Coupled Systems (arXiv:quant-ph/0307182) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • finiteCouplingSet: PDF p.5: ALL normalized PSD joint operators with the specified partial traces.
  • flatMatrix: PDF pp.4–5: lexicographic coordinates, second index varying fastest.
  • rankSplitEquiv: PDF p.3: concatenate the leading k and trailing n-k coordinates. The guard makes subtraction exact, including k=0 and k=n.
  • permuteMatrix: PDF pp.3,5: sigma M sigma^{-1}, where sigma sends |p(i)> to |i>. Thus inverse conjugation is obtained by replacing p with p.symm.
  • rankBlockMatrix: PDF p.3, (2.1): block completion, with no positivity assumption on its argument.
  • rankRow: PDF p.6: R=[I_k|A] in the same flattened rank coordinates.
  • physicalPerturbation: PDF p.5, (2.10): undo sigma, then restore physical tensor coordinates BEFORE taking either partial trace.
  • NoZeroMarginalPerturbation: PDF pp.5–7: no nonzero Hermitian perturbation with BOTH marginals zero.
  • compressedLocalSpace: PDF pp.6,8: image of the REAL Hermitian local-sum space; no complex span. Printed: column [I;A^t]. Changed: R.conjTranspose=[I;A†]. Why: preceding trace identity (2.11), PDF p.6, has A†; PDF p.11 expands this as AXA†. The correction remains subject to independent moderation.
  • omegaFromBasis: PDF p.9, Theorem 3.1: construct Omega from an actual complex orthonormal basis.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_Measurement

/-!
K. R. Parthasarathy, Extremal Quantum States in Coupled Systems, quant-ph/0307182v1.
All page references are PDF pages. Coordinates are relative to arbitrary chosen
subsystem orthonormal bases. Product indexing j+d2*i is lexicographic.
-/

namespace QAlgorithms.Papers.Independent.Intakethird100.P12

open scoped ComplexConjugate ComplexOrder

/-- PDF p.5: ALL normalized PSD joint operators with the specified partial traces. -/
def finiteCouplingSet {d1 d2 : ℕ} (rho1 : Matrix (Fin d1) (Fin d1) ℂ)
    (rho2 : Matrix (Fin d2) (Fin d2) ℂ) :
    Set (Matrix (Fin d1 × Fin d2) (Fin d1 × Fin d2) ℂ) :=
  {rho | IsDensityMatrix rho ∧ traceRight rho = rho1 ∧ traceLeft rho = rho2}

/-- PDF pp.4–5: lexicographic coordinates, second index varying fastest. -/
def flatMatrix {d1 d2 : ℕ} (M : Matrix (Fin d1 × Fin d2) (Fin d1 × Fin d2) ℂ) :
    Matrix (Fin (d1*d2)) (Fin (d1*d2)) ℂ :=
  M.submatrix finProdFinEquiv.symm finProdFinEquiv.symm

/-- PDF p.3: concatenate the leading k and trailing n-k coordinates.
The guard makes subtraction exact, including k=0 and k=n. -/
def rankSplitEquiv {n k : ℕ} (h : k ≤ n) : (Fin k ⊕ Fin (n-k)) ≃ Fin n :=
  finSumFinEquiv.trans (finCongr (by omega))

/-- PDF pp.3,5: sigma M sigma^{-1}, where sigma sends |p(i)> to |i>.
Thus inverse conjugation is obtained by replacing p with p.symm. -/
def permuteMatrix {n : ℕ} (p : Equiv.Perm (Fin n))
    (M : Matrix (Fin n) (Fin n) ℂ) : Matrix (Fin n) (Fin n) ℂ :=
  M.submatrix p p

/-- PDF p.3, (2.1): block completion, with no positivity assumption on its argument. -/
def rankBlockMatrix {n k : ℕ} (h : k ≤ n) (K : Matrix (Fin k) (Fin k) ℂ)
    (A : Matrix (Fin k) (Fin (n-k)) ℂ) : Matrix (Fin n) (Fin n) ℂ :=
  (Matrix.fromBlocks K (K*A) (A.conjTranspose*K)
    (A.conjTranspose*K*A)).submatrix (rankSplitEquiv h).symm (rankSplitEquiv h).symm

/-- PDF p.6: R=[I_k|A] in the same flattened rank coordinates. -/
def rankRow {n k : ℕ} (h : k ≤ n) (A : Matrix (Fin k) (Fin (n-k)) ℂ) :
    Matrix (Fin k) (Fin n) ℂ :=
  fun i j => match (rankSplitEquiv h).symm j with
    | Sum.inl l => if i = l then 1 else 0
    | Sum.inr l => A i l

/-- PDF p.5, (2.10): undo sigma, then restore physical tensor coordinates
BEFORE taking either partial trace. -/
def physicalPerturbation {d1 d2 k : ℕ} (h : k ≤ d1*d2)
    (p : Equiv.Perm (Fin (d1*d2)))
    (A : Matrix (Fin k) (Fin (d1*d2-k)) ℂ) (L : Matrix (Fin k) (Fin k) ℂ) :
    Matrix (Fin d1 × Fin d2) (Fin d1 × Fin d2) ℂ :=
  (permuteMatrix p.symm (rankBlockMatrix h L A)).submatrix finProdFinEquiv finProdFinEquiv

/-- PDF pp.5–7: no nonzero Hermitian perturbation with BOTH marginals zero. -/
def NoZeroMarginalPerturbation {d1 d2 k : ℕ} (h : k ≤ d1*d2)
    (p : Equiv.Perm (Fin (d1*d2)))
    (A : Matrix (Fin k) (Fin (d1*d2-k)) ℂ) : Prop :=
  ∀ L : Matrix (Fin k) (Fin k) ℂ, L.IsHermitian →
    traceRight (physicalPerturbation h p A L) = 0 →
    traceLeft (physicalPerturbation h p A L) = 0 → L = 0

/-- PDF pp.6,8: image of the REAL Hermitian local-sum space; no complex span.
Printed: column [I;A^t]. Changed: R.conjTranspose=[I;A†]. Why: preceding
trace identity (2.11), PDF p.6, has A†; PDF p.11 expands this as AXA†.
The correction remains subject to independent moderation. -/
def compressedLocalSpace {d1 d2 k : ℕ} (h : k ≤ d1*d2)
    (p : Equiv.Perm (Fin (d1*d2)))
    (A : Matrix (Fin k) (Fin (d1*d2-k)) ℂ) : Set (Matrix (Fin k) (Fin k) ℂ) :=
  {M | ∃ (X1 : Matrix (Fin d1) (Fin d1) ℂ) (X2 : Matrix (Fin d2) (Fin d2) ℂ),
    X1.IsHermitian ∧ X2.IsHermitian ∧
    M = rankRow h A * permuteMatrix p
      (flatMatrix (Matrix.kronecker X1 (1 : Matrix (Fin d2) (Fin d2) ℂ) +
        Matrix.kronecker (1 : Matrix (Fin d1) (Fin d1) ℂ) X2)) *
      (rankRow h A).conjTranspose}

/-- PDF p.9, Theorem 3.1: construct Omega from an actual complex orthonormal basis. -/
noncomputable def omegaFromBasis
    (psi : OrthonormalBasis (Fin 2) ℂ (EuclideanSpace ℂ (Fin 2))) :
    EuclideanSpace ℂ (Fin 2 × Fin 2) :=
  ((Real.sqrt 2)⁻¹ : ℂ) •
    (tensorVec (ket (0 : Fin 2)) (psi 0) + tensorVec (ket (1 : Fin 2)) (psi 1))

/-! Sanity checks of coordinate order and block orientation. -/

example {d1 d2 : ℕ} (rho1 : Matrix (Fin d1) (Fin d1) ℂ)
    (rho2 : Matrix (Fin d2) (Fin d2) ℂ)
    (rho : Matrix (Fin d1 × Fin d2) (Fin d1 × Fin d2) ℂ) :
    rho ∈ finiteCouplingSet rho1 rho2 ↔
      IsDensityMatrix rho ∧ traceRight rho = rho1 ∧ traceLeft rho = rho2 := Iff.rfl

example {d1 d2 : ℕ} (M : Matrix (Fin d1 × Fin d2) (Fin d1 × Fin d2) ℂ)
    (i j : Fin d1 × Fin d2) :
    flatMatrix M (finProdFinEquiv i) (finProdFinEquiv j) = M i j := by
  change M (finProdFinEquiv.symm (finProdFinEquiv i))
    (finProdFinEquiv.symm (finProdFinEquiv j)) = M i j
  simp only [Equiv.symm_apply_apply]

example {n k : ℕ} (h : k ≤ n) (i : Fin k) :
    (rankSplitEquiv h).symm (rankSplitEquiv h (Sum.inl i)) = Sum.inl i :=
  (rankSplitEquiv h).symm_apply_apply _

example {n : ℕ} (M : Matrix (Fin n) (Fin n) ℂ) :
    permuteMatrix (Equiv.refl _) M = M := rfl

example {n k : ℕ} (h : k ≤ n) (K : Matrix (Fin k) (Fin k) ℂ)
    (A : Matrix (Fin k) (Fin (n-k)) ℂ) (i j : Fin k) :
    rankBlockMatrix h K A (rankSplitEquiv h (Sum.inl i))
      (rankSplitEquiv h (Sum.inl j)) = K i j := by
  simp [rankBlockMatrix, Matrix.submatrix]

example {n k : ℕ} (h : k ≤ n) (A : Matrix (Fin k) (Fin (n-k)) ℂ)
    (i : Fin k) (j : Fin (n-k)) :
    rankRow h A i (rankSplitEquiv h (Sum.inr j)) = A i j := by
  simp [rankRow]

example {d1 d2 k : ℕ} (h : k ≤ d1*d2) (p : Equiv.Perm (Fin (d1*d2)))
    (A : Matrix (Fin k) (Fin (d1*d2-k)) ℂ) (L : Matrix (Fin k) (Fin k) ℂ)
    (i j : Fin d1 × Fin d2) :
    physicalPerturbation h p A L i j = rankBlockMatrix h L A
      (p.symm (finProdFinEquiv i)) (p.symm (finProdFinEquiv j)) := rfl

example {d1 d2 k : ℕ} (h : k ≤ d1*d2) (p : Equiv.Perm (Fin (d1*d2)))
    (A : Matrix (Fin k) (Fin (d1*d2-k)) ℂ) :
    (0 : Matrix (Fin k) (Fin k) ℂ) ∈ compressedLocalSpace h p A := by
  refine ⟨0, 0, ?_, ?_, ?_⟩
  · simp [Matrix.IsHermitian]
  · simp [Matrix.IsHermitian]
  · have hzero :
        Matrix.kronecker (0 : Matrix (Fin d1) (Fin d1) ℂ)
          (1 : Matrix (Fin d2) (Fin d2) ℂ) +
        Matrix.kronecker (1 : Matrix (Fin d1) (Fin d1) ℂ)
          (0 : Matrix (Fin d2) (Fin d2) ℂ) = 0 := by
      ext i j
      simp [Matrix.kronecker, Matrix.kroneckerMap]
    rw [hzero]
    change (0 : Matrix (Fin k) (Fin k) ℂ) =
      rankRow h A * (0 : Matrix (Fin (d1*d2)) (Fin (d1*d2)) ℂ) *
        (rankRow h A).conjTranspose
    simp only [Matrix.mul_zero, Matrix.zero_mul]

example {d1 d2 : ℕ} (h : 0 ≤ d1*d2) (p : Equiv.Perm (Fin (d1*d2)))
    (A : Matrix (Fin 0) (Fin (d1*d2-0)) ℂ) :
    NoZeroMarginalPerturbation h p A := by
  intro L _ _ _
  exact Subsingleton.elim _ _

example (psi : OrthonormalBasis (Fin 2) ℂ (EuclideanSpace ℂ (Fin 2))) (j : Fin 2) :
    omegaFromBasis psi (0, j) = ((Real.sqrt 2)⁻¹ : ℂ) * psi 0 j := by
  simp [omegaFromBasis, tensorVec, ket]

end QAlgorithms.Papers.Independent.Intakethird100.P12
Source
Extremal Quantum States in Coupled Systems, arXiv:quant-ph/0307182v1, https://arxiv.org/abs/quant-ph/0307182v1
Read-back

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

QAlgorithms.Papers.Independent.Intakethird100.P12.NoZeroMarginalPerturbation

For arbitrary natural numbers d1,d2,kd_1,d_2,kd1​,d2​,k satisfying k≤d1d2k\le d_1d_2k≤d1​d2​, a permutation ppp of {0,…,d1d2−1}\{0,\ldots,d_1d_2-1\}{0,…,d1​d2​−1}, and a complex k×(d1d2−k)k\times(d_1d_2-k)k×(d1​d2​−k) matrix AAA, this defines the following proposition: for every Hermitian complex k×kk\times kk×k matrix LLL, form

BL=(LLAA†LA†LA),(PL)(a,b),(a′,b′)=(BL)p−1(d2a+b), p−1(d2a′+b′).B_L= \begin{pmatrix} L & LA\\ A^\dagger L & A^\dagger LA \end{pmatrix}, \qquad (P_L)_{(a,b),(a',b')}=(B_L)_{p^{-1}(d_2a+b),\,p^{-1}(d_2a'+b')}.BL​=(LA†L​LAA†LA​),(PL​)(a,b),(a′,b′)​=(BL​)p−1(d2​a+b),p−1(d2​a′+b′)​.

If both partial traces vanish—that is, ∑b(PL)(a,b),(a′,b)=0\sum_b(P_L)_{(a,b),(a',b)}=0∑b​(PL​)(a,b),(a′,b)​=0 for all a,a′a,a'a,a′, and ∑a(PL)(a,b),(a,b′)=0\sum_a(P_L)_{(a,b),(a,b')}=0∑a​(PL​)(a,b),(a,b′)​=0 for all b,b′b,b'b,b′—then L=0L=0L=0. No positivity assumption is required of LLL. When k=0k=0k=0, the proposition holds because every matrix of size 0×00\times00×0 is zero; this includes all allowed cases with d1d2=0d_1d_2=0d1​d2​=0.

QAlgorithms.Papers.Independent.Intakethird100.P12.compressedLocalSpace

For arbitrary natural numbers d1,d2,kd_1,d_2,kd1​,d2​,k satisfying k≤d1d2k\le d_1d_2k≤d1​d2​, a permutation ppp of {0,…,d1d2−1}\{0,\ldots,d_1d_2-1\}{0,…,d1​d2​−1}, and a complex k×(d1d2−k)k\times(d_1d_2-k)k×(d1​d2​−k) matrix AAA, this defines the set of complex k×kk\times kk×k matrices MMM for which there exist Hermitian complex matrices X1X_1X1​ of size d1×d1d_1\times d_1d1​×d1​ and X2X_2X2​ of size d2×d2d_2\times d_2d2​×d2​ such that

M=RH~R†,R=[ Ik    A ].M=R\widetilde H R^\dagger,\qquad R=[\,I_k\;\;A\,].M=RHR†,R=[Ik​A].

Here HHH is the matrix on product indices with entries

H(a,b),(a′,b′)=(X1)a,a′δb,b′+δa,a′(X2)b,b′,H_{(a,b),(a',b')}=(X_1)_{a,a'}\delta_{b,b'}+\delta_{a,a'}(X_2)_{b,b'},H(a,b),(a′,b′)​=(X1​)a,a′​δb,b′​+δa,a′​(X2​)b,b′​,

and, writing f(a,b)=d2a+bf(a,b)=d_2a+bf(a,b)=d2​a+b, the matrix H~\widetilde HH has entries H~i,j=Hf−1(p(i)), f−1(p(j))\widetilde H_{i,j}=H_{f^{-1}(p(i)),\,f^{-1}(p(j))}Hi,j​=Hf−1(p(i)),f−1(p(j))​. No positivity or trace condition is imposed on X1,X2X_1,X_2X1​,X2​. If k=0k=0k=0, the defined set consists of the unique 0×00\times00×0 matrix, including when either product dimension is zero.

QAlgorithms.Papers.Independent.Intakethird100.P12.finiteCouplingSet

For arbitrary natural numbers d1,d2d_1,d_2d1​,d2​ and arbitrary complex matrices ρ1\rho_1ρ1​ of size d1×d1d_1\times d_1d1​×d1​ and ρ2\rho_2ρ2​ of size d2×d2d_2\times d_2d2​×d2​, this defines the set of complex matrices ρ\rhoρ, indexed by pairs (a,b)(a,b)(a,b) with 0≤a<d10\le a<d_10≤a<d1​ and 0≤b<d20\le b<d_20≤b<d2​, such that ρ\rhoρ is positive semidefinite, tr⁡ρ=1\operatorname{tr}\rho=1trρ=1, and its two partial traces satisfy

∑b=0d2−1ρ(a,b),(a′,b)=(ρ1)a,a′,∑a=0d1−1ρ(a,b),(a,b′)=(ρ2)b,b′\sum_{b=0}^{d_2-1}\rho_{(a,b),(a',b)}=(\rho_1)_{a,a'}, \qquad \sum_{a=0}^{d_1-1}\rho_{(a,b),(a,b')}=(\rho_2)_{b,b'}b=0∑d2​−1​ρ(a,b),(a′,b)​=(ρ1​)a,a′​,a=0∑d1​−1​ρ(a,b),(a,b′)​=(ρ2​)b,b′​

for every applicable pair of indices. No density-matrix assumption is imposed on the supplied ρ1,ρ2\rho_1,\rho_2ρ1​,ρ2​; the resulting set may be empty. If either dimension is zero, the set is empty because the only matrix on the empty product index set has trace zero.

QAlgorithms.Papers.Independent.Intakethird100.P12.flatMatrix

For arbitrary natural numbers d1,d2d_1,d_2d1​,d2​ and any complex matrix MMM whose rows and columns are indexed by {0,…,d1−1}×{0,…,d2−1}\{0,\ldots,d_1-1\}\times\{0,\ldots,d_2-1\}{0,…,d1​−1}×{0,…,d2​−1}, this defines a complex matrix of size d1d2×d1d2d_1d_2\times d_1d_2d1​d2​×d1​d2​ by reindexing both coordinates through the product-index bijection f(a,b)=d2a+bf(a,b)=d_2a+bf(a,b)=d2​a+b:

flatMatrix⁡(M)r,s=Mf−1(r),f−1(s).\operatorname{flatMatrix}(M)_{r,s}=M_{f^{-1}(r),f^{-1}(s)}.flatMatrix(M)r,s​=Mf−1(r),f−1(s)​.

If either dimension is zero, both the original and resulting matrices have empty index sets.

QAlgorithms.Papers.Independent.Intakethird100.P12.omegaFromBasis

Given any complex orthonormal basis (ψ0,ψ1)(\psi_0,\psi_1)(ψ0​,ψ1​) of the Euclidean space C2\mathbb C^2C2, indexed by 0,10,10,1, this defines the vector in C{0,1}×{0,1}\mathbb C^{\{0,1\}\times\{0,1\}}C{0,1}×{0,1}

ω=12(e0⊗ψ0+e1⊗ψ1),\omega=\frac{1}{\sqrt2}\bigl(e_0\otimes\psi_0+e_1\otimes\psi_1\bigr),ω=2​1​(e0​⊗ψ0​+e1​⊗ψ1​),

where e0,e1e_0,e_1e0​,e1​ are the coordinate vectors, and the tensor product used here has coordinates (u⊗v)(a,b)=uavb(u\otimes v)_{(a,b)}=u_a v_b(u⊗v)(a,b)​=ua​vb​. Equivalently, ω(0,b)=(ψ0)b/2\omega_{(0,b)}=(\psi_0)_b/\sqrt2ω(0,b)​=(ψ0​)b​/2​ and ω(1,b)=(ψ1)b/2\omega_{(1,b)}=(\psi_1)_b/\sqrt2ω(1,b)​=(ψ1​)b​/2​ for b=0,1b=0,1b=0,1.

QAlgorithms.Papers.Independent.Intakethird100.P12.permuteMatrix

For every natural number nnn, every permutation ppp of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, and every complex n×nn\times nn×n matrix MMM, this defines the complex n×nn\times nn×n matrix whose entries are

permuteMatrix⁡(p,M)i,j=Mp(i),p(j).\operatorname{permuteMatrix}(p,M)_{i,j}=M_{p(i),p(j)}.permuteMatrix(p,M)i,j​=Mp(i),p(j)​.

The same permutation is applied to the row and column indices. The definition also applies when n=0n=0n=0, in which case the matrices have empty index sets.

QAlgorithms.Papers.Independent.Intakethird100.P12.physicalPerturbation

For arbitrary natural numbers d1,d2,kd_1,d_2,kd1​,d2​,k satisfying k≤d1d2k\le d_1d_2k≤d1​d2​, a permutation ppp of {0,…,d1d2−1}\{0,\ldots,d_1d_2-1\}{0,…,d1​d2​−1}, a complex k×(d1d2−k)k\times(d_1d_2-k)k×(d1​d2​−k) matrix AAA, and a complex k×kk\times kk×k matrix LLL, this defines a matrix PLP_LPL​ on the product index set {0,…,d1−1}×{0,…,d2−1}\{0,\ldots,d_1-1\}\times\{0,\ldots,d_2-1\}{0,…,d1​−1}×{0,…,d2​−1}. Writing f(a,b)=d2a+bf(a,b)=d_2a+bf(a,b)=d2​a+b and

BL=(LLAA†LA†LA),(PL)(a,b),(a′,b′)=(BL)p−1(f(a,b)), p−1(f(a′,b′)),B_L= \begin{pmatrix} L & LA\\ A^\dagger L & A^\dagger LA \end{pmatrix}, \qquad (P_L)_{(a,b),(a',b')}=(B_L)_{p^{-1}(f(a,b)),\,p^{-1}(f(a',b'))},BL​=(LA†L​LAA†LA​),(PL​)(a,b),(a′,b′)​=(BL​)p−1(f(a,b)),p−1(f(a′,b′))​,

these formulas specify the defined matrix completely. No Hermitian or positivity assumption is imposed on LLL. If k=0k=0k=0, the result is zero; if d1d2=0d_1d_2=0d1​d2​=0, the hypothesis forces k=0k=0k=0 and the result has an empty index set.

QAlgorithms.Papers.Independent.Intakethird100.P12.rankBlockMatrix

For arbitrary natural numbers n,kn,kn,k satisfying k≤nk\le nk≤n, any complex k×kk\times kk×k matrix KKK, and any complex k×(n−k)k\times(n-k)k×(n−k) matrix AAA, this defines the complex n×nn\times nn×n matrix, with the first kkk coordinates preceding the remaining n−kn-kn−k coordinates, given by

(KKAA†KA†KA),\begin{pmatrix} K & KA\\ A^\dagger K & A^\dagger KA \end{pmatrix},(KA†K​KAA†KA​),

where A†A^\daggerA† denotes the conjugate transpose of AAA. No Hermitian, positivity, or rank condition is required of KKK or AAA. If k=0k=0k=0, the result is the zero n×nn\times nn×n matrix; if k=nk=nk=n, the result is KKK. These conventions include n=k=0n=k=0n=k=0.

QAlgorithms.Papers.Independent.Intakethird100.P12.rankRow

For arbitrary natural numbers n,kn,kn,k satisfying k≤nk\le nk≤n and any complex k×(n−k)k\times(n-k)k×(n−k) matrix AAA, this defines the complex k×nk\times nk×n matrix

R=[ Ik    A ].R=[\,I_k\;\;A\,].R=[Ik​A].

Explicitly, for 0≤i<k0\le i<k0≤i<k and 0≤j<n0\le j<n0≤j<n, its entry is 111 if j<kj<kj<k and i=ji=ji=j, is 000 if j<kj<kj<k and i≠ji\ne ji=j, and is Ai,j−kA_{i,j-k}Ai,j−k​ if j≥kj\ge kj≥k. When k=0k=0k=0, it has no rows; when k=nk=nk=n, it is InI_nIn​, including the empty identity when n=0n=0n=0.

QAlgorithms.Papers.Independent.Intakethird100.P12.rankSplitEquiv

For arbitrary natural numbers n,kn,kn,k, together with a hypothesis k≤nk\le nk≤n, this defines a bijection from the disjoint union of {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1} and {0,…,n−k−1}\{0,\ldots,n-k-1\}{0,…,n−k−1} to {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. It sends an index iii in the first summand to iii, and an index jjj in the second summand to k+jk+jk+j. Thus the inverse assigns indices below kkk to the first summand and the remaining indices to the second. The cases k=0k=0k=0, k=nk=nk=n, and n=k=0n=k=0n=k=0 are included, with the corresponding summands empty.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me