The Merkle branch of the first leaf does not depend on that leaf
ProvedBsv.Merkle.branch_zero_indepbitcoindata-structuresformal-verificationmerkle-tree
Let be an arbitrary binary operation, and let branch be the Merkle branch of the imported definition. For all nodes and every list ,
So the branch of position can be computed before the first leaf is known. The statement concerns position only, and says nothing about the root.
Formalization Note The statement is about the Lean model of the tree, not about a particular program.
Preamble
import Definitions.Def_bsv_merkle_tree
Formal statement
namespace Bsv.Merkle
theorem branch_zero_indep {α : Type} (H : α → α → α) (x y : α) (t : List α) :
branch H (x :: t) 0 = branch H (y :: t) 0 := by sorry
end Bsv.MerkleSource
Gregory J. Ward, Bryan W. Daugherty, Shawn M. Ryan, BSV Lean proofs (Apache-2.0), theorem branch_zero_indep. https://github.com/codenlighten/bsv-lean-proofs/blob/41c4bfdc5ce4dd9bfbf0e21c77e6586d041261de/BsvLeanProofs/Merkle.lean