## Context

Merkle tree is a data structure that calculates each node value by hashing the values of two subnodes. If you don’t know much about Merkle Tree please refer to : article and wikipidia to get an basic idea.

The main point of using a Merkle Tree is data integrity checks. You can recalculate the tree from the leaves (most bottom nodes) until the root (most upper node) and check if the data was temper in the same way.

We have the same libraries in solidity that implement this basic use case, but they have a problem of scale. The biggest problem is that to validate a tree root you have to submit all the leaves.

If you have to submit all the leaves to calculate the root, you are bound to that limit. If you have a tree with 32 leaves, than you have to commit all the 32 leaves.

By using a coordenation system as the Generalized Index, we can selective choose each leaf to be part of the computation. This is the natural usage of a Merkle Tree.

By having this capacity of selection we can construct one tree that can represent many proof system.

Merkle Tree by itself is a multi part proof system, here you can select some leafs to “prove” and give the intermediate node values as needed. We will see with more detail below that this means.

This library aims to implement that functionality in a way that is useful to a large use case and at the same time don’t be very opinionated about the proof that you are trying to make.