Verify ensures that the positions in elems correspond to the respective hashes
in a tree with the given root hash. The proof is expected to be the proof
returned by Prove().
An Array represents a dense array of leaf elements that are
combined into a Merkle tree. The GetHash method returns the
hash of a particular element in the array.