The array-and-counter Merkle computation returns the root of the tree
ProvedBsv.Merkle.rootLit_eq_rootbitcoindata-structuresformal-verificationmerkle-tree
Let be an arbitrary binary operation on a type with decidable equality and a default element, and let rootLit be the Merkle computation using an array of pending hashes and an unbounded leaf counter, as in the imported definitions. For every list of leaves ,
Formalization Note The statement is about the Lean model of the computation, not about a particular program.
Preamble
import Definitions.Def_bsv_merkle_literal
Formal statement
namespace Bsv.Merkle
theorem rootLit_eq_root {α : Type} (H : α → α → α) [DecidableEq α] [Inhabited α] (l : List α) :
rootLit H l = root H l := by sorry
end Bsv.MerkleSource
Gregory J. Ward, Bryan W. Daugherty, Shawn M. Ryan, BSV Lean proofs (Apache-2.0), theorem rootLit_eq_root. https://github.com/codenlighten/bsv-lean-proofs