betaFeedback

WorksPhysics and Astronomy

Quantum Cryptography and Autoformalization in Lean

Abstract

Quantum key distribution provides secure communication by relying on physics principles and mathematical reasoning. Security proofs across the field can contain gaps, often between individually valid theorems integrated under mismatched assumptions. We produce an end-to-end security theorem formalized in the Lean proof assistant, eliminating hidden hypotheses by building only on Lean's standard axioms. Our proof covers composable security of the entanglement-based qubit BB84 protocol against coherent attacks by the postselection technique, accounting for finite block size, and is written in a language that enforces local operations and classical communication to help ensure a faithful representation of the protocol. The proof itself was enabled by LLM-based autoformalization, and with the proof complete, we used the same pipeline as a discovery machine, reducing the finite-size penalty on the key rate. Our work sets a reproducible standard for security arguments in quantum cryptography and shows how formal proof engines can accelerate discovery across quantum information science.

Introduction

Quantum key distribution (QKD) aims to establish shared secret keys for private communication, with their security derived from quantum theory under explicit assumptions about the devices and with authenticated classical communication. Advances in protocols [1], experimental platforms [2], and networks [3] have widened the range of proposed and demonstrated QKD systems. A central advance was composable security, which formalizes when a generated key can safely replace an ideal secret key in subsequent cryptographic applications [5] [4].

A complete security proof must use compatible assumptions throughout. For example, Nahar et al. [6] closed a gap first identified by Belzig [7] in the application of postselection [8] to QKD, obtaining a weaker security bound than previously claimed. A recent comprehensive review [9] documents gaps in security proofs for practical decoy-state implementations of the Bennett–Brassard 1984 (BB84) protocol [10], including incompatible assumptions when combining results from different papers. The review also identifies recent end-to-end proofs [11, 12].

In Lean 4 [13], a formal proof assistant, a small trusted kernel checks that each proof establishes its formal statement from the declared hypotheses and axioms. When a proof uses an earlier theorem, the kernel checks that its hypotheses are satisfied. Our review checks that the definitions and theorem statement describe the intended physical protocol and security claim.

Machine-checked security proofs are established in classical cryptography [14, 15]. In quantum information, formal methods have been used to verify protocols and circuits [16, 17, 18] and develop reasoning frameworks for quantum programs [19, 20]. For QKD, formal verifications of BB84 have used process calculi, Coq and model checking [21]. Nagarajan et al. [22] model-checked finite, noiseless instances of BB84 under intercept–resend attacks, Kubota et al. [23] verified protocol-equivalence steps in the Shor–Preskill proof, and Ax-Prover [24] formalized a lemma of the Lo–Chau argument. None of these works gives an end-to-end composable finite-key security bound against general attacks.

Large language models (LLMs) coupled to proof assistants are now used in research mathematics, including the Lean formalization of Fermat’s Last Theorem [25] and a proposed proof of finite-time blowup for smoothly forced three-dimensional Navier–Stokes flow [26]. Libraries such as Mathlib supply reusable mathematical definitions and results [27]; formalizing QKD also requires definitions of permitted local operations, public communication, and a security criterion.

We present, to our knowledge, the first end-to-end machine-verified composable finite-key security proof of entanglement-based qubit BB84 against coherent attacks (Figure 2). We model Alice’s and Bob’s operations in a language, defined in Lean, that enforces local operations and classical communication (LOCC) [28] by construction. For this explicit protocol, the proof combines the BB84 phase-error analysis [29, 30] with privacy amplification [4], finite-size entropy bounds [31, 32], and the postselection reduction that extends security against collective attacks to coherent attacks [6, 8]. The audit described in Sec. II checks that the definitions used by this theorem match the intended local operations and the information available to Eve. We also bound the protocol’s abort probability under a memoryless honest channel.

Figure 2. The machine-checked BB84 development (read bottom-up). The LOCC protocol construction and reusable quantum-information theorems support the BB84 security, key-length, and robustness results. The highlighted box marks the improved conditional-entropy variance bound of § 1.4.

We prove a tighter bound on the conditional-entropy variance of classical–quantum states than that of Ref. [32], reducing the finite-size penalty in the key length. The improved bound and the key-length condition built on it are proved in Lean.

We release the underlying Lean 4 quantum-information library as open source so that its definitions and results can be reused beyond this BB84 proof. It provides states and channels based on the standard finite-dimensional formalism [33], together with entropies, finite-size entropy bounds, and the LOCC protocol language. The same infrastructure has also been used to prove a quantum-optimization conjecture in Lean [34]. Our library complements existing formalizations of quantum information and physics, including Lean-QuantumInfo, now part of Physlib [35, 36], as well as other works on quantum error correction [37], quantum algorithms and circuits [38], and the foundations of quantum mechanics [39].

Section II describes the AI pipeline and the audit of definitions and theorem statements. Section III introduces the LOCC language and the security, robustness, and classicality definitions. Section IV constructs entanglement-based qubit BB84 and proves its security and robustness bounds. Section V presents the sharpened entropy-variance bound used by that guarantee and its finite-key consequences.

The AI proving pipeline and review

We developed the formalization through an iterative collaboration between researchers and LLM agents, using Lean to check the resulting proofs (Figure 1). Agents based on Claude and GPT translated statements from target papers into Lean, guided by type-checking feedback from the Lean compiler. They decomposed proofs into intermediate claims and developed the necessary definitions and supporting results based on Mathlib [27]. The agents reviewed candidate statements and used numerical checks, where applicable, to search for counterexamples or test proposed bounds before attempting formal proofs. For sustained work we used our loopy sequencer to launch agents with task-specific context, including dependency graphs for the library from lean-graph-tools, both of which are released open source. We also ran a locally hosted GLM-5.3-Flash model [40] through loopy on proving tasks set by Claude and reviewed by Claude and GPT (Sec. VI).

Figure 1. The proving workflow and review. Agents develop statements, definitions, and candidate proofs. Kernel checking validates the formal derivation, while manual review checks the intended meaning of the formal objects and guides proof strategy and library organization.

We guided the development of definitions and types and redirected overly specialized proof attempts toward general arguments. For example, we encouraged a proof of the postselection reduction for quantum channels [8] in place of one specialized to the BB84 representation then in use. We also reviewed the organization and naming of definitions and results to make the library easier to navigate and reuse, and checked agreement with the cited literature.

The Lean kernel type-checks each proof term against its theorem statement [13]. Our review can therefore focus on whether the statement, its hypotheses and its underlying definitions express the intended claim, without rechecking the proof body. This review has caught formalization errors. For example, an earlier AI-generated protocol computed the key as a hash of Alice’s and Bob’s key strings combined, although neither party had access to both. This error motivated our development of the LOCC language introduced in Sec. III, which enforces locality and makes public communication explicit.

The LOCC language and security definitions

This section develops the security definition for a protocol-independent representation of QKD as an LOCC program, in which steps are constructed as Kraus maps acting separately on each party’s register. Composing these maps along each branch and summing over branches gives a channel whose output records every announcement in a public register. The BB84 protocol is constructed and proved secure in Sec. IV. Throughout this and subsequent sections we link to our Lean library documentation below the relevant text.

Lean: QCryptLean

Appendix B provides a glossary of the main formal definitions used in the paper.

All our Hilbert spaces are finite-dimensional. Entropies are measured in bits, log⁡2\log_2 denotes the base-two logarithm and ln⁡\ln the natural logarithm. We follow the notation of Lean, in which every object has a type. We write x:Tx : T, read “xx has type TT”. In set notation one would write x∈Tx \in T. Types can depend on objects, for example Prog⁡(Γ)\operatorname{Prog}(\Gamma), defined below, is the type of programs starting from the system Γ\Gamma, so q:Prog⁡(Γ)q : \operatorname{Prog}(\Gamma) says that qq is such a program.

LOCC Program

We enforce LOCC constructively by defining a type called Program whose inhabitants can only be constructed by composing local actions, potentially dependent on public classical communications. Before introducing this Program, we specify the multipartite system and the private and announced actions from which it is constructed. Each action is built from an instrument on one party’s local register, following the instrument description of LOCC in Ref. [28 Sec. II].

We consider a finite set of parties PP (Alice and Bob for QKD), each with a finite register basis label set Γi\Gamma_i. We define the family Γ\Gamma that specifies the channel’s multipartite input system:

Γ=(Γi)i:P,HΓ=⨂i:PCΓi.(1)\Gamma= (\Gamma_i)_{i:P}, \qquad\mathcal{H}_{\Gamma} = \bigotimes_{i:P} \mathbb{C}^{\Gamma_i}. \tag*{(1)}

Lean: MultipartiteSystem

An instrument II for party ii, with finite-dimensional input and output spaces Hi\mathcal{H}_i and Hi′\mathcal{H}'_i, has a finite outcome set X\mathcal{X} and finite Kraus index sets Rx\mathcal{R}_x. The physical outcome is xx and r:Rxr : \mathcal{R}_x is an internal Kraus label:

Kx,r:Hi⟶Hi′,x:X,r:Rx,K_{x,r} : \mathcal{H}_i \longrightarrow\mathcal{H}'_i,\qquad x : \mathcal{X},\quad r : \mathcal{R}_x,
∑x:X∑r:RxKx,r†Kx,r=1Hi.(2)\sum_{x:\mathcal{X}}\sum_{r:\mathcal{R}_x} K_{x,r}^{\dagger}K_{x,r} = \mathbb{1}_{\mathcal{H}_i}. \tag*{(2)}

Lean: Instrument

For a specified input system Γ\Gamma, the structure PrivateAction packages the acting party ii, the outcome set X\mathcal{X} and the instrument II:

V=(i,X,I).(3)V = (i,\mathcal{X},I). \tag*{(3)}

Lean: PrivateAction

The output system Γ′\Gamma' is computed. It is Γ\Gamma with party ii’s register replaced by the output register of II, so Γj′=Γj\Gamma'_j = \Gamma_j for every j≠ij \ne i holds by construction. Since II acts on Hi\mathcal{H}_i alone, the action is local.

An announced action also specifies a report g:X→Yg : \mathcal{X} \to\mathcal{Y}, where Y\mathcal{Y} is a finite public alphabet and gg specifies which information about the outcome is announced. For a fixed-output instrument, the constructor for the announced action takes the data

A=(i,X,I,g).(4)A = (i,\mathcal{X},I,g). \tag*{(4)}

Lean: ofInstrument

The general AnnouncedAction structure also allows the acting party’s output register to depend on the report. It stores the Kraus family directly

Kx,r:Hi⟶Hi,g(x)′,y=g(x),(5)K_{x,r} : \mathcal{H}_i \longrightarrow\mathcal{H}'_{i,g(x)},\qquad y = g(x), \tag*{(5)}

Lean: AnnouncedAction

with the same completeness condition as defined before. The output system of each public branch is computed in the same way.

Next, our goal is to construct some object that keeps track of private and announced actions and their dependent subsequent actions. Write AjA_j for Alice’s actions and BjB_j for Bob’s, schematically we want to represent trees such as

A1→a=0B1(0)→done,A1→a=1B1(1){→b=0A2(0)→done,→b=1A2(1)→B2→done.\begin{aligned} A_1 &\xrightarrow{a=0} B_1^{(0)} \to\mathrm{done},\\ A_1 &\xrightarrow{a=1} B_1^{(1)} \begin{cases} \xrightarrow{b=0} A_2^{(0)} \to\mathrm{done},\\ \xrightarrow{b=1} A_2^{(1)} \to B_2 \to\mathrm{done}. \end{cases} \end{aligned}

Here A1A_1 announces a:{0,1}a : \{0,1\}, and B1(1)B_1^{(1)} announces b:{0,1}b : \{0,1\}. All remaining actions are private, and done marks termination. The three public histories are T={(0),(1,0),(1,1)}\mathcal{T} = \{(0),(1,0),(1,1)\}.

In the library we introduce a type Prog(Γ)(\Gamma) for holding onto the information in such a branching protocol, where Γ\Gamma is the system the protocol starts from. It is defined by the following three constructors

done,priv(V,q),q:Prog⁡(Γ′(V)),announced(A,y↦qy),qy:Prog⁡(Γ′(A,y)).(6)\begin{aligned} &\mathrm{done},\\ &\mathrm{priv}(V,q), && q : \operatorname{Prog}(\Gamma'(V)),\\ &\mathrm{announced}(A,y\mapsto q_y), && q_y : \operatorname{Prog}(\Gamma'(A,y)). \tag*{(6)} \end{aligned}

Lean: Program

Here VV and AA are the private and announced action records defined above, acting on Γ\Gamma. Note that the systems Γ′(V)\Gamma'(V) and Γ′(A,y)\Gamma'(A,y) are not supplied by the author, they are determined by the actions as Γ\Gamma with the acting party’s register replaced by the action’s output register. A continuation must start from this system, otherwise the program does not type-check.

In practice the protocols are most easily assembled using a function then which continues an action with the program that follows it. For the example above, the Lean code would be

p=A1.then(fun a↦match a with∣ 0⇒B1(0).then(done)∣ 1⇒B1(1).then(fun b↦match b with∣ 0⇒A2(0).then(done)∣ 1⇒A2(1).then(B2.then(done)))).(7)\begin{aligned} p &= A_1.\mathrm{then}(\mathrm{fun}\ a \mapsto\mathrm{match}\ a\ \mathrm{with}\\ &\quad|\,0 \Rightarrow B_1^{(0)}.\mathrm{then}(\mathrm{done})\\ &\quad|\,1 \Rightarrow B_1^{(1)}.\mathrm{then}(\mathrm{fun}\ b \mapsto\mathrm{match}\ b\ \mathrm{with}\\ &\qquad|\,0 \Rightarrow A_2^{(0)}.\mathrm{then}(\mathrm{done})\\ &\qquad|\,1 \Rightarrow A_2^{(1)}.\mathrm{then}(B_2.\mathrm{then}(\mathrm{done})))). \tag*{(7)} \end{aligned}

Lean: AnnouncedAction.then

Lean: PrivateAction.then

Programs can also be composed. For example, with the subprogram qq for the branch a=1a = 1, the same protocol reads

q=B1(1).then(fun b↦match b with∣ 0⇒A2(0).then(done)∣ 1⇒A2(1).then(B2.then(done))),p=A1.then(fun a↦match a with∣ 0⇒B1(0).then(done)∣ 1⇒q).(8)\begin{aligned} q &= B_1^{(1)}.\mathrm{then}(\mathrm{fun}\ b \mapsto\mathrm{match}\ b\ \mathrm{with}\\ &\quad|\,0 \Rightarrow A_2^{(0)}.\mathrm{then}(\mathrm{done})\\ &\quad|\,1 \Rightarrow A_2^{(1)}.\mathrm{then}(B_2.\mathrm{then}(\mathrm{done}))),\\ p &= A_1.\mathrm{then}(\mathrm{fun}\ a \mapsto\mathrm{match}\ a\ \mathrm{with}\\ &\quad|\,0 \Rightarrow B_1^{(0)}.\mathrm{then}(\mathrm{done})\\ &\quad|\,1 \Rightarrow q). \tag*{(8)} \end{aligned}

So far we have described how the library stores the information that defines a protocol in the Prog type. However, as it stands, a program p:Progp : \mathrm{Prog} cannot be fed into a diamond norm or trace norm. To do that we still need to extract actual channels out of pp, this process is described below.

Consider a particular branch in a program, with raw outcomes and internal Kraus indices fixed. We first extend each local Kraus map by the identity on the other parties’ registers, then compose the resulting maps along the branch, including any private actions. For the first two steps of the earlier example write KaAK_a^A for Alice’s Kraus map and Kb∣aBK_{b|a}^B for Bob’s (which may depend on the announcement aa that Alice makes). Taking one Kraus operator per outcome for simplicity, the channel for these two steps is

Ka,b(2)=(1A⊗Kb∣aB)(KaA⊗1B),E(2)(ρ)=∑a,bKa,b(2)ρ(Ka,b(2))†⊗∣t(a,b)⟩⟨t(a,b)∣.(9)K_{a,b}^{(2)} = \left(1_A \otimes K_{b|a}^B\right)\left(K_a^A \otimes1_B\right), \qquad \mathcal{E}^{(2)}(\rho)=\sum_{a,b}K_{a,b}^{(2)}\rho\left(K_{a,b}^{(2)}\right)^\dagger\otimes|t(a,b)\rangle\langle t(a,b)|. \tag*{(9)}

Here t(0,b)=(0)t(0,b)=(0) and t(1,b)=(1,b)t(1,b)=(1,b). Bob’s outcome bb remains private when a=0a=0 and is announced when a=1a=1. Later steps multiply further local Kraus maps on the left of Ka,b(2)K_{a,b}^{(2)}. The function denote does exactly this for every branch of the program and sums the resulting Kraus contributions to form the channel.

Lean: denote

Security, robustness, and classicality

Given a program p:Prog(Γ)p : \mathrm{Prog}(\Gamma) its associated real channel is defined with the denote function we saw above,

Ereal:=p.denote.(10)\mathcal{E}^{\mathrm{real}} := p.\mathrm{denote}. \tag*{(10)}

Lean: real

Since this channel only composes and sums the program’s Kraus maps, it discards only the registers that those maps discard. Therefore, registers for local operations whose outcomes are meant to be private must be explicitly traced out in the program before denotation. If they are not, those registers remain in the channel output and enter the real–ideal security comparison as additional side information. Tracing out cannot remove announced information, since it is a private action, and private actions never act on the public register.

To define security one compares the real channel to an ideal channel,

Eideal:=R∘Ereal,(11)\mathcal{E}^{\mathrm{ideal}} := \mathcal{R} \circ\mathcal{E}^{\mathrm{real}}, \tag*{(11)}

Lean: ideal

where R\mathcal{R} is a channel that erases the keys that Alice and Bob produced and writes one fresh, uniform random string of the same length into both key registers. It preserves the public transcript and all other registers, and leaves aborted runs unchanged. Therefore, on each accepting branch the ideal keys are equal, uniform, and independent of Eve’s information. Each done in a Prog can also carry an optional label; in a QKD program, R\mathcal{R} uses these labels to determine which registers are the keys.

Lean: KeyEnd

For a QKD protocol with classical output keys, ε\varepsilon-security is

12∥Ereal−Eideal∥⋄≤ε,(12)\frac{1}{2}\left\lVert\mathcal{E}^{\mathrm{real}}-\mathcal{E}^{\mathrm{ideal}}\right\rVert_{\diamond}\leq\varepsilon, \tag*{(12)}

Lean: IsSecure

where the diamond norm is

∥Λ∥⋄=sup⁡∥X∥1≤1∥(Λ⊗id⁡E)(X)∥1,(13)\left\lVert\Lambda\right\rVert_{\diamond}=\sup_{\lVert X\rVert_1\leq1}\left\lVert\left(\Lambda\otimes\operatorname{id}_E\right)(X)\right\rVert_1, \tag*{(13)}

Lean: diamondNorm

and ∥X∥1=Tr⁡X†X\lVert X\rVert_1=\operatorname{Tr}\sqrt{X^\dagger X} with XX ranging over operators on the input together with a reference EE of the same dimension. Half the diamond norm is the distinguishing advantage [5], so the real and ideal outputs have trace distance at most ε\varepsilon. Applying the same subsequent channel to both outputs cannot increase their distinguishability, including processing conditioned on the public transcript and acting jointly with Eve’s reference.

Lean: diamondDist_comp_le

According to this definition, a protocol that always aborts will appear secure, hence this definition of security is coupled with robustness which bounds the abort probability. Summing over the aborting public histories for a given input state ρ\rho gives

pabort(ρ):=∑t abortsTr⁡([Ereal(ρ)]t),(14)p_{\mathrm{abort}}(\rho):=\sum_{t\ \mathrm{aborts}}\operatorname{Tr}\left([\mathcal{E}^{\mathrm{real}}(\rho)]_t\right), \tag*{(14)}

where tt selects the output block for that history. The robustness bound for a specified input state, or class of inputs, is

pabort(ρ)≤δrob,0≤δrob<1.(15)p_{\mathrm{abort}}(\rho) \le\delta_{\mathrm{rob}}, \qquad0 \le\delta_{\mathrm{rob}} < 1. \tag*{(15)}

We also define classicality of Alice’s and Bob’s actions, which Sec. IV.A uses for the BB84 post-processing. A program is classical when every local action preserves diagonality on Alice’s and Bob’s registers for each outcome, along every branch. The library checks this property recursively.

For a joint input that is classical on Alice’s and Bob’s registers and quantum on the reference, such a program has an equivalent implementation by local stochastic operations and classical communication.

Machine-verified security of BB84

We now apply the definitions of Sec. III to entanglement-based qubit BB84. We construct the protocol, state its finite-key security theorem, and bound its abort probability on honest inputs. The Lean kernel checks the theorems of this section and of § 1.4, and their proofs (Figure 2) use only Lean’s standard foundational axioms (propext, Classical.choice and Quot.sound).

The protocol

The protocol is a program in the LOCC language of Sec. III. Alice and Bob share an authenticated public classical channel, and initially hold NN qubit pairs possibly distributed by Eve who may keep a purification.

Alice and Bob measure every qubit in either the ZZ or the XX basis, drawing the basis choice randomly from their respective distributions pAp_A and pBp_B. A party with basis distribution pp measures with the instrument

Kθ,xp=p(θ) ∣θ,x⟩⟨ϕxθ∣,(16)K^{p}_{\theta,x} = \sqrt{p(\theta)}\,|\theta,x\rangle\langle\phi^\theta_x|, \tag*{(16)}

where θ:{Z,X}\theta: \{Z, X\} is the basis, ∣ϕxθ⟩|\phi^\theta_x\rangle is the eigenstate of the Pauli operator θ\theta with eigenvalue (−1)x(-1)^x, and ∣θ,x⟩|\theta,x\rangle is an orthogonal classical record of basis and outcome. The qubit is discarded and nothing is announced.

This is followed by classical post-processing. First Alice and Bob announce their basis strings, and Alice announces a uniformly random permutation of the rounds with agreeing bases. In the order of this permuted register, the first nKn_K matched ZZ rounds form the raw key, the next mZm_Z the ZZ test block and the first mXm_X matched XX rounds the XX test block, and each party keeps only its outcome bits in these

n:=nK+mZ+mX(17)n := n_K + m_Z + m_X \tag*{(17)}

retained rounds; if the matched rounds cannot fill the three blocks, both parties instead discard their records and abort.

This is followed by parameter estimation, error correction and verification, and privacy amplification, which are not specific to BB84. In parameter estimation, Bob and then Alice announce their bits in every test round.

Alice then draws a verification seed and a privacy-amplification seed, binary matrices with nKn_K columns and with ℓEV\ell_{\mathrm{EV}} and ℓ\ell rows, uniformly and independently. She announces both seeds, the ℓEV\ell_{\mathrm{EV}}-bit verification tag given by the product of the verification seed and her raw key xx modulo 22, and the ℓ\ell-bit syndrome S(x)S(x) of an error-correction scheme with syndrome map SS and decoder DD.

Bob computes his corrected key D(y,S(x))D(y,S(x)) from his raw key yy. He announces acceptance if each test block is nonempty and its fraction of disagreeing bits lies in the window [Q−δ,Q+δ][Q-\delta,Q+\delta], with center QQ and half-width δ\delta, and if the tag of his corrected key equals Alice’s; otherwise he announces abort.

On acceptance, Alice’s final key is the ℓ\ell-bit product of the privacy-amplification seed and her raw key modulo 22, and Bob’s is the same product with his corrected key. The parties discard all other private records on acceptance and all their private records on abort.

The measurement step leaves classical records by construction, and every action of the post-processing preserves diagonality on Alice’s and Bob’s registers, so the post-processing is classical in the sense of Sec. III.B.

Finite-key security theorem

We state the bounds first, then explain their terms.

Theorem 1 (finite-key security of BB84). For every translation-equivariant error-correction scheme (Appendix A) and every choice of analysis parameters satisfying the conditions below, the real and ideal channels of the protocol satisfy

12∥EBB84real−EBB84ideal∥⋄≤εQKD,(18)\frac{1}{2}\left\|\mathcal{E}^{\mathrm{real}}_{\mathrm{BB84}}-\mathcal{E}^{\mathrm{ideal}}_{\mathrm{BB84}}\right\|_{\diamond}\leq\varepsilon_{\mathrm{QKD}}, \tag*{(18)}

so the protocol is εQKD\varepsilon_{\mathrm{QKD}}-secure in the sense of Eq. (12), where εQKD\varepsilon_{\mathrm{QKD}} is the error-verification error plus the postselection prefactor gn,4g_{n,4} times the sum of the contributions of parameter estimation, smoothing and privacy amplification:

εQKD:=εEV+gn,4(εPA+2εˉ+22εAT).(19)\varepsilon_{\mathrm{QKD}}:=\varepsilon_{\mathrm{EV}}+g_{n,4}\left(\varepsilon_{\mathrm{PA}}+2\bar{\varepsilon}+2\sqrt{2\varepsilon_{\mathrm{AT}}}\right). \tag*{(19)}

Lean: bellRenyiBudget

Here gn,4:=(n+33)g_{n,4}:=\binom{n+3}{3} is the postselection prefactor for extending the IID analysis to arbitrary inputs [6, 8], and the bracket matches the bound of Ref. [6, Theorem 3] for mixtures of IID inputs. The prefactor is the dimension of the symmetric subspace of (C4)⊗n(\mathbb{C}^{4})^{\otimes n}. Generic postselection for two qubits per round gives the larger prefactor (n+1515)\binom{n+15}{15}, from the symmetric subspace of (C16)⊗n(\mathbb{C}^{16})^{\otimes n}. The smaller factor exploits BB84’s Pauli symmetry: for a translation-equivariant error-correction scheme, applying the same Pauli operator to both qubits of any round relabels the classical outputs [6 Lemma 2]. We use the acceptance-test and verification bounds

εAT:=exp⁡[−mXkl⁡(Q+δ∥Q+δ+δ′)],\varepsilon_{\mathrm{AT}}:=\exp\left[-m_X\operatorname{kl}(Q+\delta\mathbin{\|}Q+\delta+\delta')\right],
εEV:=2−ℓEV,(20)\varepsilon_{\mathrm{EV}}:=2^{-\ell_{\mathrm{EV}}}, \tag*{(20)}

Lean: phaseTail

where kl⁡(a∥b):=aln⁡(a/b)+(1−a)ln⁡[(1−a)/(1−b)]\operatorname{kl}(a\mathbin{\|}b):=a\ln(a/b)+(1-a)\ln[(1-a)/(1-b)] is the binary relative entropy in nats. Here εAT\varepsilon_{\mathrm{AT}} bounds the probability that an IID input whose X-basis error rate exceeds the phase-error bound Q+δ+δ′Q+\delta+\delta' passes parameter estimation, by the Chernoff bound for the X test [41]. εEV\varepsilon_{\mathrm{EV}} bounds the probability that a corrected key differing from Alice’s raw key passes verification for a uniformly random verification seed. This holds for every input, so εEV\varepsilon_{\mathrm{EV}} is not multiplied by gn,4g_{n,4}. The deviation δ′\delta', the smoothing parameter εˉ\bar{\varepsilon} and the privacy-amplification error εPA\varepsilon_{\mathrm{PA}} are chosen in the analysis.

Lean: componentAcceptProbability_le_exp_neg_mul_klBer

The bound holds provided that εˉ\bar{\varepsilon}, εPA\varepsilon_{\mathrm{PA}}, β\beta and δ′\delta' are positive, that

Q+δ+δ′≤12,β<1,(21)Q+\delta+\delta'\leq\frac{1}{2},\qquad\beta<1, \tag*{(21)}

and that the final key length obeys

ℓ≤nK[1−h2(Q+δ+δ′)]−ℓEC−ℓEV−2log⁡2gn,4−Pβ(nK,εˉ)−2log⁡2(1/εPA)+2,(22)\ell\leq n_K\left[1-h_2(Q+\delta+\delta')\right]-\ell_{\mathrm{EC}}-\ell_{\mathrm{EV}} -2\log_2 g_{n,4}-P_\beta(n_K,\bar{\varepsilon})-2\log_2(1/\varepsilon_{\mathrm{PA}})+2, \tag*{(22)}

Lean: isSecure_of_bellRenyiConditions

The key-length condition (22) starts from the entropy of the raw key at the phase-error bound, with h2h_2 the binary entropy in bits, and subtracts, in turn, the public leakage of the syndrome and the tag, the postselection charge, the finite-size penalty and the hashing cost; the leftover-hash lemma [30] [4], as required by Ref. [6, Eq. (11)]. The +2+2 arises because εPA\varepsilon_{\mathrm{PA}} bounds a trace distance, half of a trace norm. The finite-size penalty

Pβ(nK,εˉ):=C⋆ln⁡22nKβ+KβnKβ2+b(εˉ)β,P_\beta(n_K,\bar{\varepsilon}):=\frac{C_{\star}\ln2}{2}n_K\beta+K_\beta n_K\beta^2+\frac{b(\bar{\varepsilon})}{\beta},
b(εˉ):=log⁡2(2/εˉ2),C⋆:=log⁡22(1+2),(23)b(\bar{\varepsilon}):=\log_2(2/\bar{\varepsilon}^{2}),\qquad C_{\star}:=\log_2^2(1+\sqrt{2}), \tag*{(23)}
Kβ:=K⋆2β(1−β)3,K⋆:=ln⁡3(2+ε2)6ln⁡2,K_\beta:=\frac{K_{\star}2^\beta}{(1-\beta)^3},\qquad K_{\star}:=\frac{\ln^3(2+\varepsilon^2)}{6\ln2},

Lean: renyiPenalty

bounds how far the smooth min-entropy of the raw key can fall below nKn_K times its per-round von Neumann entropy. § 1.4.A shows where each term comes from, the first through the variance cap C⋆C_{\star}.

The parameters δ′\delta', εˉ\bar{\varepsilon}, εPA\varepsilon_{\mathrm{PA}} and β\beta are free and trade the error against the key length. A larger deviation δ′\delta' between the window edge Q+δQ+\delta and the phase-error bound lowers εAT\varepsilon_{\mathrm{AT}} but raises h2(Q+δ+δ′)h_2(Q+\delta+\delta'). The condition Q+δ+δ′≤12Q+\delta+\delta'\leq\frac{1}{2} keeps h2h_2 increasing up to the bound, so every input covered by it has entropy at least 1−h2(Q+δ+δ′)1-h_2(Q+\delta+\delta') per round. Smaller εˉ\bar{\varepsilon} and εPA\varepsilon_{\mathrm{PA}} lower the error but raise PβP_\beta and 2log⁡2(1/εPA)2\log_2(1/\varepsilon_{\mathrm{PA}}), and β\beta balances the terms of PβP_\beta within the range 0<β<10<\beta<1 of Ref. [32, Cor. IV.2].

Robustness

Theorem 2 bounds the abort probability of Sec. III.B on an honest channel, which is the robustness of Ref. [5].

Theorem 2 (robustness of BB84). Let a memoryless channel without an eavesdropper deliver σ⊗N\sigma^{\otimes N}, where in matching bases the two-qubit state σ\sigma gives uniform outcome bits that disagree with probability qq, the quantum bit error rate (QBER). Let Bob’s corrected key differ from Alice’s raw key with probability at most εEC\varepsilon_{\mathrm{EC}}, for every raw key of Alice’s, when his raw key differs from hers by independent bit flips with probability qq. Let the quotas kZ:=nK+mZk_Z:=n_K+m_Z and kX:=mXk_X:=m_X of matched rounds required by selection, the matched-basis probabilities Pθ:=pA(θ)pB(θ)P_\theta:=p_A(\theta)p_B(\theta) and the window satisfy

kθ−1N<Pθ<1(θ:{Z,X}),\frac{k_\theta-1}{N}<P_\theta<1\quad(\theta:\{Z,X\}),
0<Q−δ<q<Q+δ<1.(24)0<Q-\delta<q<Q+\delta<1. \tag*{(24)}

Then

pabort(σ⊗N)≤εquota+εtest+εEC,(25)p_{\mathrm{abort}}(\sigma^{\otimes N})\leq\varepsilon_{\mathrm{quota}}+\varepsilon_{\mathrm{test}}+\varepsilon_{\mathrm{EC}}, \tag*{(25)}

where the relative-entropy Chernoff bounds [41, Thm. 2.1

and Cor. 4.1]

εquota:=∑θ:{Z,X}e−Nkl⁡((kθ−1)/N∥Pθ),εtest:=∑θ:{Z,X}[e−mθkl⁡(Q+δ∥q)+e−mθkl⁡(Q−δ∥q)](26)\begin{aligned} \varepsilon_{\mathrm{quota}} &:= \sum_{\theta:\{Z,X\}} e^{-N\operatorname{kl}((k_\theta-1)/N \mathbin\Vert P_\theta)},\\ \varepsilon_{\mathrm{test}} &:= \sum_{\theta:\{Z,X\}} \left[e^{-m_\theta\operatorname{kl}(Q+\delta\mathbin\Vert q)}+e^{-m_\theta\operatorname{kl}(Q-\delta\mathbin\Vert q)}\right] \tag*{(26)} \end{aligned}

bound the probabilities that a quota is not met and that a test block leaves the window.

Lean: one_sub_abortBound_le_acceptProbability

Proposition 4 in Appendix A gives a translation-equivariant error-correction scheme with this property, a linear syndrome of slightly more than nKh2(q)n_K h_2(q) bits, so Theorems 1 and 2 hold for the same protocol.

A tighter finite-key bound from the pipeline

This section describes the origin of the key length of Theorem 1. Its finite-size penalty rests on a new inequality, found with the pipeline of Sec. II: a bound on the conditional-entropy variance of classical–quantum states that improves that of Ref. [32] (Sec. V.A).

Variance bound and finite-size penalty

Let ρWB\rho_{WB} be a normalized classical–quantum state, with WW of dimension dWd_W and arbitrary finite-dimensional quantum side information BB. Its conditional-entropy variance [32 Defs. III.1–III.2], in bits squared, is:

Lρ:=log⁡2ρWB−log⁡2(1W⊗ρB),V(W∣B)ρ:=Tr⁡(ρWBLρ2)−[Tr⁡(ρWBLρ)]2(27)L_\rho:= \log_2 \rho_{WB}-\log_2(\mathbb{1}_W\otimes\rho_B), \qquad V(W|B)_\rho:= \operatorname{Tr}(\rho_{WB}L_\rho^2)-[\operatorname{Tr}(\rho_{WB}L_\rho)]^2 \tag*{(27)}

where ρB\rho_B is the marginal on BB and each logarithm is taken on its support.

Theorem 3 (conditional-entropy variance). Every such state satisfies

V(W∣B)ρ≤log⁡22(dW+dW−1).(28)V(W|B)_\rho\le\log_2^2\left(\sqrt{d_W}+\sqrt{d_W-1}\right). \tag*{(28)}

Lean: condVariance_le_logb_sq

This improves the bound log⁡22(2dW+1)\log_2^2(2d_W+1) of Ref. [32 Cor. III.5] for every dWd_W. For a binary key it gives the cap used by Theorem 1,

V(W∣B)ρ≤C⋆=log⁡22(1+2)≈1.6168,(29)V(W|B)_\rho\le C_\star=\log_2^2(1+\sqrt{2})\approx1.6168, \tag*{(29)}

Lean: condVariance_le_logb_sq_of_card_eq_two

in place of log⁡225≈5.39\log_2^2 5\approx5.39, both in bits squared.

Proof sketch. Write ρWB=∑xλx∣ex⟩⟨ex∣\rho_{WB}=\sum_x\lambda_x|e_x\rangle\langle e_x| and 1W⊗ρB=∑yκy∣fy⟩⟨fy∣\mathbb{1}_W\otimes\rho_B=\sum_y\kappa_y|f_y\rangle\langle f_y| in eigenbases. The Nussbaum–Szkoła weights μ(x,y):=λx∣⟨ex∣fy⟩∣2\mu(x,y):=\lambda_x|\langle e_x|f_y\rangle|^2 and ν(x,y):=κy∣⟨ex∣fy⟩∣2\nu(x,y):=\kappa_y|\langle e_x|f_y\rangle|^2 [32] are a probability distribution and a nonnegative weight function with ∑ν=Tr⁡(1W⊗ρB)=dW\sum\nu=\operatorname{Tr}(\mathbb{1}_W\otimes\rho_B)=d_W, and V(W∣B)ρln⁡22V(W|B)_\rho\ln^2 2 is the variance under μ\mu of the log-likelihood ratio Y:=ln⁡(μ/ν)Y:=\ln(\mu/\nu). It satisfies E[eY]=Tr⁡ρWB(1W⊗ρB)−1≤1\mathbb{E}[e^Y]=\operatorname{Tr}\rho_{WB}(\mathbb{1}_W\otimes\rho_B)^{-1}\le1, with the inverse on the support, because ρWB≤1W⊗ρB\rho_{WB}\le\mathbb{1}_W\otimes\rho_B. It also satisfies E[e−Y]=∑μ>0ν≤dW\mathbb{E}[e^{-Y}]=\sum_{\mu>0}\nu\le d_W. With the shift c:=−12ln⁡dWc:=-\frac{1}{2}\ln d_W these bounds give E[cosh⁡(Y−c)]≤dW\mathbb{E}[\cosh(Y-c)]\le\sqrt{d_W}. Let r:=ln⁡(dW+dW−1)r:=\ln(\sqrt{d_W}+\sqrt{d_W-1}), so that cosh⁡r=dW\cosh r=\sqrt{d_W}. Every real zz satisfies

z2≤r2+2rsinh⁡r(cosh⁡z−cosh⁡r),z^2\le r^2+\frac{2r}{\sinh r}(\cosh z-\cosh r),

where 2r/sinh⁡r2r/\sinh r is read as 2 when dW=1d_W=1. Since the mean minimizes the mean squared deviation, taking z=Y−cz=Y-c and averaging under μ\mu gives

Var⁡Y≤E[(Y−c)2]≤r2+2rsinh⁡r(E[cosh⁡(Y−c)]−cosh⁡r)≤r2,\begin{aligned} \operatorname{Var}Y &\le\mathbb{E}[(Y-c)^2]\\ &\le r^2+\frac{2r}{\sinh r}\left(\mathbb{E}[\cosh(Y-c)]-\cosh r\right)\le r^2, \end{aligned}

where the last step uses E[cosh⁡(Y−c)]≤dW=cosh⁡r\mathbb{E}[\cosh(Y-c)]\le\sqrt{d_W}=\cosh r. Dividing by ln⁡22\ln^2 2 gives (28).

For a binary key and nKn_K independent rounds, the finite-size penalty bounds the gap between nKH(W∣B)ρn_K H(W|B)_\rho, with H(W∣B)ρ:=−Tr⁡(ρWBLρ)H(W|B)_\rho:=-\operatorname{Tr}(\rho_{WB}L_\rho), and the smooth min-entropy that the leftover-hash lemma turns into key: for every 0<β<10<\beta<1,

nKH(W∣B)ρ−Hmin⁡εˉ(WnK∣BnK)≤Pβ(nK,εˉ).n_K H(W|B)_\rho-H_{\min}^{\bar{\varepsilon}}(W^{n_K}|B^{n_K})\le P_\beta(n_K,\bar{\varepsilon}).

Lean: le_smoothMinEntropy_tensorPower_renyiPenalty

To see where the variance enters, split the gap at the Petz conditional Rényi entropy H1+β′(W∣B)ρ:=−1βlog⁡2Tr⁡ρWB(1W⊗ρB)−βH'_{1+\beta}(W|B)_\rho:=-\frac{1}{\beta}\log_2\operatorname{Tr}\rho_{WB}(\mathbb{1}_W\otimes\rho_B)^{-\beta}, with the negative power on the support:

nKH−Hmin⁡εˉ=[nKH1+β′−Hmin⁡εˉ]+nK[H−H1+β′]≤b(εˉ)β+nK[βln⁡22V+β2K(1+β)]≤b(εˉ)β+nK[C⋆ln⁡22β+Kββ2]=Pβ,\begin{aligned} n_K H-H_{\min}^{\bar{\varepsilon}} &=[n_KH'_{1+\beta}-H_{\min}^{\bar{\varepsilon}}]+n_K[H-H'_{1+\beta}]\\ &\le\frac{b(\bar{\varepsilon})}{\beta}+n_K\left[\frac{\beta\ln2}{2}V+\beta^2K(1+\beta)\right]\\ &\le\frac{b(\bar{\varepsilon})}{\beta}+n_K\left[\frac{C_\star\ln2}{2}\beta+K_\beta\beta^2\right]=P_\beta, \end{aligned}

with the arguments dropped. The first bracket is bounded by the conversion from Rényi to smooth min-entropy [31 Prop. 6.5 and Eqs. (6.91)–(6.92)], and the second by the continuity bound of Ref. [32 Lemma IV.1], with K(1+β)K(1+\beta) given in Ref. [32 Cor. IV.2]. Theorem 3 then caps VV by C⋆C_\star, and K(1+β)≤KβK(1+\beta)\le K_\beta.

Discussion and Outlook

We used an AI-assisted proof pipeline to connect a typed LOCC description of BB84 to an end-to-end composable-security theorem. With the same pipeline we found a tighter bound on the conditional-entropy variance, which reduces the finite-size penalty in the key length of Theorem 1 (Sec. V).

The formalization also made hidden assumptions in the literature explicit. Let us give two examples, the proof of the postselection theorem of Ref. [8] restricts the diamond norm to density-operator inputs, which requires the map to preserve Hermiticity. This condition holds for the differences of channels to which the theorem is applied, and the formal statement assumes it. Likewise, the continuity bound of Ref. [32 Lemma IV.1] holds when the support of ρ\rho lies in that of σ\sigma, a condition its statement leaves implicit and the formal statement adds.

Several components of this development can also be used independently of BB84. These include quantum leftover hashing [30] [4] with its public seed retained in the security comparison, smooth-entropy bounds for classical–quantum tensor-power states derived from conditional Rényi entropy, and the postselection reduction of Ref. [8].

Lean: traceDistanceGen_output_le_of_le_smoothMinEntropyOpt

A new protocol would supply its own program and parameter estimation and reuse these results. Since the protocol language allows any finite set of parties, it could also describe protocols beyond key distribution, such as secure computation and digital signatures [42] or multiparty deep learning [43], each with its own security definition.

The library can be extended in several directions. To represent prepare-and-measure protocols directly, the protocol language could be extended to describe quantum transmission followed by LOCC processing. A more specialized protocol type could also enforce the measurement and subsequent classical-processing stages by construction, while security and robustness would remain properties to prove. Formal security proofs of optical QKD with decoy states [44, 45, 46] would additionally require suitable source, loss, and detector models. The same protocol definitions could support security proofs based on entropy accumulation [47] or uncertainty relations [48], allowing their assumptions and finite-size guarantees to be compared.

Several of the formal results above were written by the open-weight GLM-5.3-Flash model of Sec. II, run locally through loopy under the direction of Claude Opus 5. GLM worked on the generalization of Theorem 1 to a free privacy-amplification error, Rényi offset and deviation, and the relative-entropy tails of Theorem 2 and Proposition 4. The frontier model edited loopy prompts to tune the tasks of GLM, and Claude and GPT reviewed its PRs before they were merged into the library. GLM had Lean language-server tools but no shell. We hope to develop theorem proving with open-weight models further, through well-tuned harnesses and reinforcement learning.

Acknowledgments

We wish to thank Shlok Nahar, Devashish Tupkary, Uri Kol, Winston Yin, and Benjy Firester for useful discussions.

K.S. acknowledges support from the European Union’s Horizon Europe research and innovation programme under the Marie Skłodowska-Curie grant agreement No. 101202109. The research of M.B.S. is supported by the Knut and Alice Wallenberg Foundation, Grant KAW 2023.0490. J.M. acknowledges support from the MITRE Quantum Moonshot program, and the MIT Kalanıyot fellowship.

An admissible decoder

An error-correction scheme with syndrome map SS and decoder DD is translation-equivariant if for every bit string uu there is a permutation πu\pi_u of the syndrome values with S(x⊕u)=πu(S(x))S(x \oplus u)=\pi_u(S(x)) and D(y⊕u,S(x⊕u))=D(y,S(x))⊕uD(y \oplus u,S(x \oplus u))=D(y,S(x)) \oplus u for all raw keys xx and yy, where ⊕\oplus is bit-wise addition modulo 2.

Lean: IsTranslationEquivariant

Proposition 4 (an admissible decoder). Let q>0q>0, and let a decoding radius tt and a number ss of extra syndrome bits, both natural numbers, and a relative radius rr satisfy

0≤r≤12,t≤rnK,qnK<t+1≤nK,0 \le r \le\frac{1}{2}, \qquad t \le r n_K, \qquad q n_K < t+1 \le n_K,
nKh2(r)+s≤ϵEC.(30)n_K h_2(r)+s \le\epsilon_{\mathrm{EC}}. \tag*{(30)}

Then there is a translation-equivariant error-correction scheme with an ϵEC\epsilon_{\mathrm{EC}}-bit syndrome that meets the decoding hypothesis of Theorem 2 at QBER qq with

ϵEC=e−nKk((t+1)/nK∥q)+2−s.(31)\epsilon_{\mathrm{EC}}=e^{-n_K k((t+1)/n_K\mathbin{\|}q)}+2^{-s}. \tag*{(31)}

Lean: exists_decodesWhp_of_entropy_le

The two terms bound the probabilities that more than tt errors occur [41 Thm. 2.1] and that another error pattern of weight at most tt has the same syndrome. The scheme is a linear syndrome with coset decoding, shown to exist by averaging over all binary linear syndrome maps; the proposition provides neither an explicit code nor an efficient decoder.

Glossary of formal definitions

Table I collects the main formal objects of the development and the Lean identifiers that realize them. It lists definitions only, grouped into the standard quantum-information primitives, the LOCC program language of Sec. III, and the security notions built on them. The identifiers match the names used in the text. An audit of the dependencies of the theorems of Secs. IV and § 1.4 finds only the standard axioms propext, Classical.choice and Quot.sound.

Symbol / termLean identifierMeaning
Operators and channels (standard quantum information)
Op⁡(H)\operatorname{Op}(\mathcal{H})OpOperators on a party’s finite register; the complex matrices on H\mathcal{H}.
Λ\LambdaIsChannelPredicate that a linear map is completely positive and trace-preserving, i.e. a quantum channel.
∥⋅∥⋄\lVert\cdot\rVert_{\diamond}diamondNormDiamond norm sup⁡∥X∥1≤1∥(Λ⊗id⁡E)X∥1\sup_{\lVert X\rVert_1\leq1}\lVert(\Lambda\otimes\operatorname{id}_{E})X\rVert_1 over a same-dimension reference EE; half the diamond norm of the difference of two channels is the largest trace distance between their outputs.
Dtr(ρ,σ)D_{\mathrm{tr}}(\rho,\sigma)traceDistanceTrace distance 12∥ρ−σ∥1\frac{1}{2}\lVert\rho-\sigma\rVert_1 between states.
F(ρ,σ)F(\rho,\sigma)fidelityFidelity ∥ρσ∥1\lVert\sqrt{\rho}\sqrt{\sigma}\rVert_1 between states (squared form fidelitySq).
LOCC program language
Γ\GammaMultipartiteSystemLocal register bases of a multipartite quantum system.
instrumentInstrumentQuantum instrument on one party’s register [28 Sec. II].
private actionPrivateActionLocal action whose classical outcome is kept private.
announced actionAnnouncedActionLocal action that publicly announces a coarse-graining of its outcome.
thenPrivateAction.thenSequences an action with its continuation (announced analogue AnnouncedAction.then).
p:Prog⁡(Γ)p:\operatorname{Prog}(\Gamma)ProgramAn LOCC protocol as a tree of private and announced actions, constructible only by composing local actions.
B\mathcal{B}BoundaryThe public transcripts and the output space of each branch, computed from the program.
T\mathcal{T}ExitThe set of complete public histories, one for each branch; Transcript is the transcript register of a fixed list of alphabets.
denotedenoteCompiles a program into its channel, composing the branch Kraus maps and exposing announcements to Eve.
Security and classicality
Ereal\mathcal{E}^{\mathrm{real}}realThe real channel p.denotep.\text{denote} determined by the protocol.
Eideal\mathcal{E}^{\mathrm{ideal}}idealR∘Ereal\mathcal{R}\circ\mathcal{E}^{\mathrm{real}}, where R\mathcal{R} replaces both key registers with a single fresh uniform string (so the keys are equal, uniform, and independent of Eve) and leaves the transcript, other registers, and aborting runs unchanged.
key labelKeyEndLabel carried by each done of a QKD program: abort, or accept ℓ\ell with the part of Alice’s and Bob’s final registers that holds the ℓ\ell-bit key.
ε\varepsilon-securityIsSecureComposable full-interface security: the accepted keys are classical and 12∥Ereal−Eideal∥⋄≤ε\frac{1}{2}\lVert\mathcal{E}^{\mathrm{real}}-\mathcal{E}^{\mathrm{ideal}}\rVert_{\diamond}\leq\varepsilon, comparing the real and ideal channels jointly over both keys, the transcript, and Eve’s reference.
honest-classicalIsHonestClassicalEvery local action preserves diagonality on Alice’s and Bob’s registers, along every branch.

Table I. Glossary of the main formal definitions. Symbol or term, the Lean identifier that realizes it, and its meaning. H\mathcal{H} is a party’s finite register, ρ\rho, σ\sigma are states, Λ\Lambda a linear map, and EE a reference system.

References

References

  1. [5]C. Portmann and R. Renner, Security in quantum cryptography, Reviews of Modern Physics 94, 025008 (2022).DOI
  2. [6]S. Nahar, D. Tupkary, Y. Zhao, N. Lütkenhaus, and E. Y.-Z. Tan, Postselection Technique for Optical Quantum Key Distribution with Improved Definition of Finite Reductions, PRX Quantum 5, 040315 (2024).DOI
  3. [7]P. Belzig, Studying Stabilizer de Finetti Theorems and Possible Applications in Quantum Information Processing (2024), master’s thesis, University of Cologne (2020), arXiv:2403.10592 [quant-ph].
  4. [8]M. Christandl, R. König, and R. Renner, Postselection Technique for Quantum Channels with Applications to Quantum Cryptography, Physical Review Letters 102, 020504 (2009).pubmed.ncbi.nlm.nih.gov/19257257
  5. [9]D. Tupkary, E. Y.-Z. Tan, S. Nahar, L. Kamin, and N. Lütkenhaus, Security proofs for practical QKD: Variations, gaps, and limitations, Reviews of Modern Physics 98, 035003 (2026).DOI
  6. [10]C. H. Bennett and G. Brassard, Quantum cryptography: Public key distribution and coin tossing, in Proceedings of the IEEE International Conference on Computers, Systems, and Signal Processing (1984) p. 175.
  7. [11]D. Tupkary, S. Nahar, A. Arqand, E. Y. Z. Tan, and N. Lütkenhaus, A rigorous and complete security proof of decoy-state BB84 quantum key distribution (2026), arXiv:2601.18035 [quant-ph].arxiv.org/abs/2601.18035
  8. [12]A. Mizutani, T. Sasaki, and G. Kato, Protocol-level description and self-contained security proof of decoy-state BB84 QKD protocol (2025), arXiv:2504.20417 [quant-ph].arxiv.org/abs/2504.20417
  9. [13]L. d. Moura and S. Ullrich, The Lean 4 Theorem Prover and Programming Language, in Automated Deduction – CADE 28 (Springer International Publishing, 2021) pp. 625–635.DOI
  10. [14]G. Barthe, B. Grégoire, S. Heraud, and S. Z. Béguelin, Computer-Aided Security Proofs for the Working Cryptographer, in Advances in Cryptology – CRYPTO 2011 (Springer Berlin Heidelberg, 2011) pp. 71–90.DOI
  11. [15]D. A. Basin, A. Lochbihler, and S. R. Sefidgar, CryptHOL: Game-Based Proofs in Higher-Order Logic, Journal of Cryptology 33, 494 (2020).
  12. [16]J. Boender, F. Kammüller, and R. Nagarajan, Formalization of Quantum Protocols using Coq, Electronic Proceedings in Theoretical Computer Science 195, 71 (2015).DOI
  13. [17]K. Hietala, R. Rand, S.-H. Hung, X. Wu, and M. Hicks, A verified optimizer for Quantum circuits, Proceedings of the ACM on Programming Languages 5, 1 (2021).
  14. [18]Y. Peng, K. Hietala, R. Tao, L. Li, R. Rand, M. Hicks, and X. Wu, A formally certified end-to-end implementation of Shor’s factorization algorithm, Proceedings of the National Academy of Sciences 120, e2218775120 (2023).DOI
  15. [19]L. Zhou, G. Barthe, P.-Y. Strub, J. Liu, and M. Ying, CoqQ: Foundational Verification of Quantum Programs, Proceedings of the ACM on Programming Languages 7, 833 (2023).arxiv.org/abs/2207.11350
  16. [20]A. Bordg, H. Lachnitt, and Y. He, Certified Quantum Computation in Isabelle/HOL, Journal of Automated Reasoning 65, 691 (2021).
  17. [21]C. Chareton, S. Bardin, D. Lee, B. Valiron, R. Vilmart, and Z. Xu, Formal Methods for Quantum Programs: A Survey (2022), arXiv:2109.06493 [cs.PL].arxiv.org/abs/2109.06493
  18. [22]R. Nagarajan, N. Papanikolaou, G. Bowen, and S. Gay, An Automated Analysis of the Security of Quantum Key Distribution (2005), arXiv:cs/0502048 [cs.CR].DOI
  19. [23]T. Kubota, Y. Kakutani, G. Kato, Y. Kawano, and H. Sakurada, Semi-automated verification of security proofs of quantum cryptographic protocols, Journal of Symbolic Computation 73, 192 (2016).DOI
  20. [24]B. Breen, M. Del Tredici, J. McCarran, J. Aspuru Mijares, W. W. Yin, K. Sulimany, J. M. Taylor, F. H. L. Koppens, and D. Englund, Ax-Prover: a deep reasoning agentic framework for theorem proving in mathematics and quantum physics, Machine Learning: Science and Technology 7, 045073 (2026).
  21. [25]Anthropic, Formalizing Fermat’s Last Theorem (2026), 4 September 2026; Lean formalization: https://github.com/anthropics/fermats-last-theorem.
  22. [26]OpenAI, Finite time blowup for Navier–Stokes (2026), 8 September 2026; Lean formalization: https://github.com/openai/NavierStokesAndEuler.hub.valency.io/works/W_u44zqgpa
  23. [27]The mathlib Community, The lean mathematical library, in Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, POPL ’20 (ACM, 2020) pp. 367–381.DOI
  24. [28]E. Chitambar, D. Leung, M. Ozols, and A. Winter, Everything You Always Wanted to Know About LOCC (But Were Afraid to Ask), Communications in Mathematical Physics 328, 303 (2014).
  25. [29]P. W. Shor and J. Preskill, Simple Proof of Security of the BB84 Quantum Key Distribution Protocol, Physical Review Letters 85, 441 (2000).DOI
  26. [30]R. RENNER, SECURITY OF QUANTUM KEY DISTRIBUTION, International Journal of Quantum Information 06, 1 (2008).
  27. [31]M. Tomamichel, Quantum Information Processing with Finite Resources: Mathematical Foundations, Springer-Briefs in Mathematical Physics, Vol. 5 (Springer International Publishing, 2016).
  28. [32]F. Dupuis and O. Fawzi, Entropy Accumulation With Improved Second-Order Term, IEEE Transactions on Information Theory 65, 7596 (2019).DOI
  29. [33]J. Watrous, The Theory of Quantum Information (Cambridge University Press, 2018).DOI
  30. [34]U. Kol, M. Ben-Shahar, K. Sulimany, and D. Englund, A Machine-Verified Proof of a Quantum-Optimization Conjecture (2026), arXiv:2606.29687 [quant-ph].arxiv.org/abs/2606.29687
  31. [35]A. Meiburg, L. A. Z. Hesse, and R. Soldati, A Formalization of the Generalized Quantum Stein’s Lemma in Lean (2025), lean library: https://github.com/Timeroot/Lean-QuantumInfo, arXiv:2510.08672 [quant-ph].arxiv.org/abs/2510.08672
  32. [36]J. Tooby-Smith, HepLean: Digitalising high energy physics, Computer Physics Communications 308, 109457 (2025), lean library: https://github.com/leanprover-community/physlib.
  33. [37]Quantum error correction (), lean-QEC, https://github.com/VerifiedQCL/Lean-QEC; lean-qec-sslp, https://github.com/LionSR/lean-qec-sslp; QEC-CLean, https://github.com/Stavan-Jain/QECLLean.
  34. [38]Quantum algorithms, circuits, and simulation (), lean-Quantum, https://github.com/QnQWIRE/LeanQuantum; QLean, https://github.com/Paul-Lez/QLean; Lean-QuantumAlg, https://github.com/QudeLeap/Lean-QuantumAlg; QCLib, https://github.com/QuCompLean/QCLib; Quantum4Lean, https://github.com/Alektronnik/Quantum4Lean; QuantSem, https://github.com/Carson-9/QuantSem; Algolean, https://github.com/Shreyas4991/Algolean; MerLean, https://github.com/doctor6/MerLean-examples.
  35. [39]Foundations of quantum mechanics ( ), lean-quantum, https://github.com/Hayata-Yamasaki-Group/lean-quantum; Spectra, https://github.com/adambor/lean-Spectra; lean4-quantum, https://github.com/quest2180/lean4-quantum.
  36. [40]Z.ai, GLM-5.3-Flash: Frontier intelligence, flash cost (2026), 26 August 2026.
  37. [41]W. Mulzer, Five Proofs of Chernoff’s Bound with Applications (2019), arXiv:1801.03365 [cs.DM].arxiv.org/abs/1801.03365
  38. [42]M. Bozzio, C. Crépeau, P. Wallden, and P. Walth er, Quantum cryptography beyond key distribution: Theory and experiment, Reviews of Modern Physics 97, 045006 (2025).DOI
  39. [43]K. Sulimany, S. K. Vadlamani, R. Hamerly, P. Iyengar, and D. Englund, Quantum-Secure Multiparty Deep Learning, Physical Review X 15, 041056 (2025).DOI
  40. [44]W.-Y. Hwang, Quantum Key Distribution with High Loss: Toward Global Secure Communication, Physical Review Letters 91, 057901 (2003).pubmed.ncbi.nlm.nih.gov/12906634
  41. [45]H.-K. Lo, X. Ma, and K. Chen, Decoy State Quantum Key Distribution, Physical Review Letters 94, 230504 (2005).
  42. [46]X. Ma, B. Qi, J. Zhao, and H.-K. Lo, Practical decoy state for quantum key distribution, Physical Review A 72, 012326 (2005).DOI
  43. [47]F. Dupuis, O. Fawzi, and R. Renner, Entropy Accumulation, Communications in Mathematical Physics 379, 867 (2020).DOI
  44. [48]M. Tomamichel, C. C. W. Lim, N. Gisin, and R. Renner, Tight finite-key analysis for quantum cryptography, Nature Communications 3, 634 (2012).DOI

Paper details

vlnc:W_epna8pzp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

LLM-based autoformalization

View statement
Looking for related papers…
Contents