Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chain growth for one party

Proved
BitcoinBackbone.chain_growth_self

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

backbonebitcoinchain-growthchain-qualitycommon-prefixformal-verificationgaray-kiayias-leonardosmathlibnakamoto-consensus

The same bound with q=pq = pq=p and r≤sr \le sr≤s.

Preamble
import Definitions.Def_BitcoinBackbone
Formal statement
theorem BitcoinBackbone.chain_growth_self (E : BitcoinBackbone.Execution) (hE : E.Legal)
    (p : ℕ) (hp : p < E.n) (r s : ℕ) (hrs : r ≤ s) :
    (E.chain p r).length + ∑ i ∈ Finset.Ico (r + 1) s, E.X i ≤ (E.chain p s).length := 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; Lemmas 7, 14, 15, Theorem 16, the chain-quality theorem; Bitcoin Core a773e1e33b349dc819b5a0edc1c7a4839dc73b48: GetBlockProof (chain.cpp) through the block mission's chainWork
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: BitcoinBackbone.chain_growth_self

Statement. Let EEE be an execution of the backbone model, assumed legal (no party has its mined-flag set in round 000; for p<np<np<n, r≥1r\ge1r≥1 the chain base(p,r)\mathrm{base}(p,r)base(p,r) is valid; for p<np<np<n every block of base(p,r)\mathrm{base}(p,r)base(p,r) has round <r<r<r; for all p,q<np,q<np,q<n and all rrr, ∣Cq(r)∣≤∣base(p,r+1)∣|\mathcal{C}_q(r)| \le |\mathrm{base}(p,r+1)|∣Cq​(r)∣≤∣base(p,r+1)∣; for j<Zrj<Z_rj<Zr​ the chain advParent(r,j)\mathrm{advParent}(r,j)advParent(r,j) is valid with all blocks of round ≤r\le r≤r). Let ppp be a natural number with p<np < np<n, and let r,sr, sr,s be natural numbers with r≤sr \le sr≤s (non-strict). Then

∣Cp(r)∣  +  ∑i=r+1s−1Xi  ≤  ∣Cp(s)∣,|\mathcal{C}_p(r)| \;+\; \sum_{i=r+1}^{s-1} X_i \;\le\; |\mathcal{C}_p(s)| ,∣Cp​(r)∣+i=r+1∑s−1​Xi​≤∣Cp​(s)∣,

where Cp(t)\mathcal{C}_p(t)Cp​(t) is party ppp's chain at the end of round ttt (Cp(0)=[ ]\mathcal{C}_p(0) = [\,]Cp​(0)=[]; for t≥1t\ge1t≥1, base(p,t)\mathrm{base}(p,t)base(p,t) followed by honest(p,t)\mathsf{honest}(p,t)honest(p,t) if mined(p,t)=true\mathrm{mined}(p,t)=\mathtt{true}mined(p,t)=true, else base(p,t)\mathrm{base}(p,t)base(p,t) alone), ∣⋅∣|\cdot|∣⋅∣ is list length, and Xi∈{0,1}X_i\in\{0,1\}Xi​∈{0,1} is 111 exactly when some party index p′<np'<np′<n has mined(p′,i)=true\mathrm{mined}(p',i)=\mathtt{true}mined(p′,i)=true.

Range of the sum. The index iii runs over {r+1,…,s−1}\{r+1, \dots, s-1\}{r+1,…,s−1}, excluding both rrr and sss. This set is empty when s≤r+1s \le r+1s≤r+1; in particular, when s=rs = rs=r the statement is the triviality ∣Cp(r)∣≤∣Cp(r)∣|\mathcal{C}_p(r)| \le |\mathcal{C}_p(r)|∣Cp​(r)∣≤∣Cp​(r)∣, and when s=r+1s = r+1s=r+1 it is ∣Cp(r)∣≤∣Cp(r+1)∣|\mathcal{C}_p(r)| \le |\mathcal{C}_p(r+1)|∣Cp​(r)∣≤∣Cp​(r+1)∣.

Differences from chain_growth. The same party ppp appears on both sides (no second party qqq), and r=sr = sr=s is permitted. Typicality is not assumed. r=0r=0r=0 is allowed (∣Cp(0)∣=0|\mathcal{C}_p(0)|=0∣Cp​(0)∣=0). If n=0n=0n=0 the hypothesis p<np<np<n cannot hold and the statement is vacuous.

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

    Confirmed by the moderator at approval.

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