Equations
- comb_MTree = m.comb
Instances For
Equations
- t.hash_BTree = BTree.fold o.mhash comb_MTree t
Instances For
Equations
- ABTree.hash_Tree = ABTree.fold ABTree.leaf fun (x : Unit) (sl sr : ABTree α ℍ) => ABTree.node (m.comb (ABTree.getI' o.mhash id sl) (ABTree.getI' o.mhash id sr)) sl sr
Instances For
Equations
- ABTree.merkle_root = ABTree.getI' o.mhash fun (x : MkData ℍ) => x.top
Instances For
Equations
- instBEqSkElem = { beq := fun (l r : SkElem) => match l, r with | SkElem.Left, SkElem.Left => true | SkElem.Right, SkElem.Right => true | x, x_1 => false }
Equations
- SkElem.Left.destruct l r = l
- SkElem.Right.destruct l r = r
Instances For
def
ABTree.gen_path_elem_forward
{α β γ : Type}
{n : ℕ}
(t : ABTree α β)
(ag : α → γ)
(bg : β → γ)
(p : Sequence n SkElem)
:
Equations
- One or more equations did not get rendered due to their size.
- (ABTree.leaf v).gen_path_elem_forward ag bg p_2 = some (v, Sequence.nil)
- t.gen_path_elem_forward ag bg p = none
Instances For
theorem
opHash_neqRight
{ℍ : Type}
[HashMagma ℍ]
[lHStr : SLawFulHash ℍ]
{hl hr pl pr : ℍ}
:
¬hl = hr → ¬op_side SkElem.Right hl pl = op_side SkElem.Right hr pr
theorem
opHash_neqLeft
{ℍ : Type}
[HashMagma ℍ]
[lHStr : SLawFulHash ℍ]
{hl hr pl pr : ℍ}
:
¬hl = hr → ¬op_side SkElem.Left hl pl = op_side SkElem.Left hr pr
theorem
leftChildContaintionN
{α ℍ : Type}
[BEq ℍ]
[LawfulBEq ℍ]
[Hash α ℍ]
[HashMagma ℍ]
(v : α)
(h : ℍ)
(btR broot : BTree α)
:
broot = (BTree.leaf v).node btR → h = btR.hash_BTree → containCompute v [(SkElem.Left, h)] broot.hash_BTree = true
theorem
rightChildContaintionN
{α ℍ : Type}
[BEq ℍ]
[LawfulBEq ℍ]
[Hash α ℍ]
[HashMagma ℍ]
(v : α)
(h : ℍ)
(btL broot : BTree α)
:
broot = btL.node (BTree.leaf v) → h = btL.hash_BTree → containCompute v [(SkElem.Right, h)] broot.hash_BTree = true
theorem
leafChildContaintionN
{α ℍ : Type}
[BEq ℍ]
[LawfulBEq ℍ]
[Hash α ℍ]
[HashMagma ℍ]
(v : α)
(broot : BTree α)
:
broot = BTree.leaf v → containCompute v [] broot.hash_BTree = true