Skip to content

Commit

Permalink
Merkle theorem
Browse files Browse the repository at this point in the history
  • Loading branch information
Eagle941 committed Oct 25, 2023
1 parent d1ac176 commit 5803737
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ProvenZk/Merkle.lean
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ theorem read_after_insert_sound {depth : Nat} {F: Type} {H: Hash F 2} (tree : Me
simp [set]
split <;> simp [item_at, tree_for, left, right, *]

lemma set_implies_item_at { depth : Nat } {F: Type} {H : Hash F 2} {t₁ t₂ : MerkleTree F H depth} {ix : Vector Dir depth} {item : F} :
set t₁ ix item = t₂ → item_at t₂ ix = item := by
intro h
rw [<-h]
apply read_after_insert_sound

-- Related to recover_proof_is_root
theorem proof_ceritfies_item
{depth : Nat}
Expand Down Expand Up @@ -441,4 +447,4 @@ theorem recover_equivalence
. apply recover_proof_reversible (Item := Item)
assumption

end MerkleTree
end MerkleTree

0 comments on commit 5803737

Please sign in to comment.