> For the complete documentation index, see [llms.txt](https://battlezips.gitbook.io/battlezips/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://battlezips.gitbook.io/battlezips/theory/primitives/merkle-trees/sparse-merkle-trees.md).

# Sparse Merkle Trees

## Merkle Trees. Great for proving inclusion but useless for saying what isn't included

In a previous section we described how a Merkle Tree proof of inclusion works. It is a fantastic tool for proving that a specific piece of data is part of a tree. Something that may have come to mind however is whether or not it is possible to prove that a piece of data is not contained within a Merkle Tree. With a standard tree this is not possible but it turns out that a Sparse Merkle Tree does precisely that!

## Sparse Merkle Tree

A Sparse Merkle Tree is similar to a standard one but there is a key difference in the fact that the nodes are indexed. Proof of inclusion is possible in this implementation but so is proof of non-inclusion. To prove that a value is not contained within a tree we must prove that the leaf where the value would be contains the value null

<figure><img src="https://1091404591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu3R2CTByhos1Cr9t3iOB%2Fuploads%2FKbNGspxugDVQekgGYQWs%2Fsparse_merkle_tree.png?alt=media&amp;token=862e9d42-fa7a-42d8-bd9e-bda2e68ad56d" alt=""><figcaption><p>A Sparse Merkle Tree is contains null values where values have not been inserted</p></figcaption></figure>
