Still I do not understand what you are doing, sorry, and I do not want to do it. But I borrowed the small part of the DNF in your post, and counted the number of solutions using my DNF library. Perhaps it is nothing relevant to you post. I have to repeat, corresponding to your removing actions your posts in this thread saying there is nothing important here. I am interested in ZDD as a possible new way of programming in Prolog. There must be excellent ZDD implementation in Python e.g. open on the net. My interest in general would be narrow as possible as you could imagine.
data(A):- A =
+[ *[a0,-a1,a2,-a3,-a4,-a5,-a6,-a7,-a8,-a9,-a10,-a11,-a12,-a13,-a14,-a15,-a16,-a17,a18,-a19,a20,-a21,a22,-a23,-a24,-a25,-a26,-a27,-a28,-a29,-a30,-a31,-a32,-a33,-a34,-a35],
*[a0,-a1,-a2,-a3,a4,-a5,-a6,-a7,-a8,-a9,-a10,-a11,-a12,-a13,-a14,-a15,-a16,-a17,a18,-a19,a20,-a21,a22,-a23,-a24,-a25,-a26,-a27,-a28,-a29,-a30,-a31,-a32,-a33,-a34,-a35],
*[-a0,-a1,-a2,-a3,-a4,-a5,-a6,-a7,-a8,-a9,a10,-a11,-a12,-a13,a14,-a15,a16,-a17,-a18,-a19,-a20,-a21,a22,-a23,-a24,-a25,-a26,-a27,a28,-a29,-a30,-a31,a32,-a33,a34,-a35],
*[-a0,-a1,-a2,-a3,-a4,-a5,-a6,-a7,-a8,-a9,-a10,-a11,-a12,-a13,a14,-a15,a16,-a17,-a18,-a19,-a20,-a21,-a22,-a23,-a24,-a25,-a26,-a27,-a28,-a29,a30,-a31,a32,-a33,a34,-a35]].
% ?- time((data(A), zdd((dnf(A, B), ltr_card(B, C))))).
%@ % 232,972 inferences, 0.017 CPU in 0.018 seconds (97% CPU, 13585165 Lips)
%@ A = +[*([a0, -a1, a2, -a3, -a4, - ...|...]), *([a0, -a1, -a2, -a3, a4|...]), *([-a0, -a1, -a2, - ...|...]), *([-a0, -a1, - ...|...])],
%@ B = 1854,
%@ C = 4 .