Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The rounds of a trace are independent

Proved
BitcoinBackboneProb.iIndepFun_rounds

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

backbonebitcoinformal-verificationhoeffdinghonest-majoritymathlibnakamoto-consensusprobabilitytypical-execution

Under P n t p the round maps ω↦ωr\omega \mapsto \omega_rω↦ωr​ are mutually independent.

Preamble
import Definitions.Def_BitcoinBackboneProb
open BitcoinBackboneProb BitcoinBackbone
open MeasureTheory ProbabilityTheory
Formal statement
theorem BitcoinBackboneProb.iIndepFun_rounds (n t : ℕ) (p : unitInterval) :
    ProbabilityTheory.iIndepFun (fun r (ω : Trace n t) => ω r) (P n t p) := by sorry
Source
J. Garay, A. Kiayias, N. Leonardos, The Bitcoin Backbone Protocol: Analysis and Applications, EUROCRYPT 2015 (full version ePrint 2014/765): https://eprint.iacr.org/2014/765, Definition 9 (typical execution), Theorem 10, the honest-majority assumption; W. Hoeffding (1963) for the concentration bound; the backbone mission BitcoinBackbone (Execution, Typical, chain growth, common prefix, chain quality)
Read-back

What the Lean code literally says, in plain math · claude-fable-5-1 (independent sub-agent, blind: Lean code + auditor instructions only)

Read-back: BitcoinBackboneProb.iIndepFun_rounds

Statement. For all n,t∈Nn, t \in \mathbb Nn,t∈N and all p∈[0,1]p \in [0,1]p∈[0,1], with no further hypotheses: the family of coordinate maps (ω↦ωr)r∈N(\omega \mapsto \omega_r)_{r \in \mathbb N}(ω↦ωr​)r∈N​, each from Ωn,t\Omega_{n,t}Ωn,t​ to Rn,t\mathcal R_{n,t}Rn,t​ (with the product σ\sigmaσ-algebra on Rn,t\mathcal R_{n,t}Rn,t​), is mutually independent under Pn,t,pP_{n,t,p}Pn,t,p​. That is, for every finite set of rounds {r1,…,rk}⊆N\{r_1, \dots, r_k\} \subseteq \mathbb N{r1​,…,rk​}⊆N (distinct indices) and all measurable sets A1,…,Ak⊆Rn,tA_1, \dots, A_k \subseteq \mathcal R_{n,t}A1​,…,Ak​⊆Rn,t​,

Pn,t,p(ωr1∈A1,…,ωrk∈Ak)=∏i=1kPn,t,p(ωri∈Ai).P_{n,t,p}\big(\omega_{r_1} \in A_1, \dots, \omega_{r_k} \in A_k\big) = \prod_{i=1}^{k} P_{n,t,p}\big(\omega_{r_i} \in A_i\big).Pn,t,p​(ωr1​​∈A1​,…,ωrk​​∈Ak​)=i=1∏k​Pn,t,p​(ωri​​∈Ai​).

This statement does not by itself assert anything about the law of each ωr\omega_rωr​.

Probabilistic round model (unfolded)

  • Parameters. n,t∈Nn, t \in \mathbb Nn,t∈N are arbitrary natural numbers (either may be 000): nnn is the number of honest parties, ttt the number of adversarial queries per round. ppp is an element of the closed unit interval [0,1][0,1][0,1] (so p=0p = 0p=0 and p=1p = 1p=1 are allowed); wherever it appears in arithmetic it is the real number ppp. All casts of n,tn, tn,t and other naturals into formulas are casts into R\mathbb RR (so (λ−3)(\lambda - 3)(λ−3), (k−1)(k-1)(k−1) etc. below are real subtractions and may be negative), except where a natural-number subtraction is explicitly flagged.
  • Bernoulli law berp\mathrm{ber}_pberp​. The two-point Bernoulli measure on {true,false}\{\mathrm{true}, \mathrm{false}\}{true,false} built by Mathlib's bernoulliMeasure true false p: mass ppp on true\mathrm{true}true and mass 1−p1-p1−p on false\mathrm{false}false. It is a probability measure.
  • Round outcomes Rn,t\mathcal R_{n,t}Rn,t​. A round outcome is a pair ρ=(ρ1,ρ2)\rho = (\rho_1, \rho_2)ρ=(ρ1​,ρ2​) with ρ1:{0,…,n−1}→{true,false}\rho_1 : \{0,\dots,n-1\} \to \{\mathrm{true},\mathrm{false}\}ρ1​:{0,…,n−1}→{true,false} (which honest parties succeeded) and ρ2:{0,…,t−1}→{true,false}\rho_2 : \{0,\dots,t-1\} \to \{\mathrm{true},\mathrm{false}\}ρ2​:{0,…,t−1}→{true,false} (which adversarial queries succeeded). If n=0n = 0n=0 (resp. t=0t = 0t=0) the corresponding component is the unique empty function.
  • Round law μn,t,p\mu_{n,t,p}μn,t,p​. The product measure
μn,t,p=(⨂i=0n−1berp)⊗(⨂j=0t−1berp)\mu_{n,t,p} = \Big(\bigotimes_{i=0}^{n-1} \mathrm{ber}_p\Big) \otimes \Big(\bigotimes_{j=0}^{t-1} \mathrm{ber}_p\Big)μn,t,p​=(i=0⨂n−1​berp​)⊗(j=0⨂t−1​berp​)

on Rn,t\mathcal R_{n,t}Rn,t​ (product σ\sigmaσ-algebra): all n+tn + tn+t coordinates are independent, each true\mathrm{true}true with probability ppp. It is a probability measure.

  • Traces Ωn,t\Omega_{n,t}Ωn,t​. A trace is an infinite sequence ω=(ω0,ω1,ω2,… )\omega = (\omega_0, \omega_1, \omega_2, \dots)ω=(ω0​,ω1​,ω2​,…) of round outcomes, indexed by all r∈Nr \in \mathbb Nr∈N starting at r=0r = 0r=0; Ωn,t=Rn,tN\Omega_{n,t} = \mathcal R_{n,t}^{\mathbb N}Ωn,t​=Rn,tN​ with the product σ\sigmaσ-algebra.
  • Trace law Pn,t,pP_{n,t,p}Pn,t,p​. The infinite product probability measure Pn,t,p=⨂r∈Nμn,t,pP_{n,t,p} = \bigotimes_{r \in \mathbb N} \mu_{n,t,p}Pn,t,p​=⨂r∈N​μn,t,p​ on Ωn,t\Omega_{n,t}Ωn,t​ (Mathlib's Measure.infinitePi): the coordinates ωr\omega_rωr​ are i.i.d. with law μn,t,p\mu_{n,t,p}μn,t,p​. It is a probability measure. For any set A⊆Ωn,tA \subseteq \Omega_{n,t}A⊆Ωn,t​ (measurable or not; non-measurable sets get their outer measure), Pn,t,p(A)P_{n,t,p}(A)Pn,t,p​(A) below denotes the real number obtained by converting the (extended-nonnegative) measure of AAA to R\mathbb RR; it lies in [0,1][0,1][0,1].
  • Counts in one round. For ρ∈Rn,t\rho \in \mathcal R_{n,t}ρ∈Rn,t​:
#H(ρ)=#{ i<n:ρ1(i)=true }∈{0,…,n},#A(ρ)=#{ j<t:ρ2(j)=true }∈{0,…,t}.\#_H(\rho) = \#\{\, i < n : \rho_1(i) = \mathrm{true} \,\} \in \{0,\dots,n\}, \qquad \#_A(\rho) = \#\{\, j < t : \rho_2(j) = \mathrm{true} \,\} \in \{0,\dots,t\}.#H​(ρ)=#{i<n:ρ1​(i)=true}∈{0,…,n},#A​(ρ)=#{j<t:ρ2​(j)=true}∈{0,…,t}.
  • Round indicators. x(ρ)=1x(\rho) = 1x(ρ)=1 if #H(ρ)>0\#_H(\rho) > 0#H​(ρ)>0 and 000 otherwise; y(ρ)=1y(\rho) = 1y(ρ)=1 if #H(ρ)=1\#_H(\rho) = 1#H​(ρ)=1 and 000 otherwise (both natural numbers); w(ρ)=#A(ρ)−y(ρ)w(\rho) = \#_A(\rho) - y(\rho)w(ρ)=#A​(ρ)−y(ρ) computed in R\mathbb RR.
  • Trace variables. For ω∈Ωn,t\omega \in \Omega_{n,t}ω∈Ωn,t​ and r∈Nr \in \mathbb Nr∈N (including r=0r = 0r=0): Xr(ω)=x(ωr)X_r(\omega) = x(\omega_r)Xr​(ω)=x(ωr​), Yr(ω)=y(ωr)Y_r(\omega) = y(\omega_r)Yr​(ω)=y(ωr​), Zr(ω)=#A(ωr)Z_r(\omega) = \#_A(\omega_r)Zr​(ω)=#A​(ωr​) (natural numbers), Wr(ω)=w(ωr)∈RW_r(\omega) = w(\omega_r) \in \mathbb RWr​(ω)=w(ωr​)∈R. So Xr,Yr∈{0,1}X_r, Y_r \in \{0,1\}Xr​,Yr​∈{0,1} and Zr∈{0,…,t}Z_r \in \{0,\dots,t\}Zr​∈{0,…,t}.
  • Margin.
m(n,t,p)=n p (1−p) n −˙ 1−t p∈R,m(n,t,p) = n\,p\,(1-p)^{\,n \,\dot-\, 1} - t\,p \in \mathbb R,m(n,t,p)=np(1−p)n−˙​1−tp∈R,

where n−˙1n \dot- 1n−˙​1 is natural-number subtraction (truncated at 000): for n=0n = 0n=0 the exponent is 000 and m=−tpm = -t pm=−tp; for n=1n = 1n=1, m=p−tpm = p - tpm=p−tp; the convention 00=10^0 = 100=1 applies, so for n=1n = 1n=1, p=1p = 1p=1 the factor (1−p)0(1-p)^0(1−p)0 equals 111.

  • Rate.
κ(n,t,p)=m(n,t,p)22 (t+1)2 ≥0\kappa(n,t,p) = \frac{m(n,t,p)^2}{2\,(t+1)^2} \ \ge 0κ(n,t,p)=2(t+1)2m(n,t,p)2​ ≥0

(the denominator is at least 222, never zero).

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by pitimespi · Oct 30, 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