https://123dok.org/document/rz3onk7z-binary-decision-diagrams-sequences-definitions-properties-algorithms.html