probTable([AandB,NotAandB,B],[AandNotB,NotAandNotB,NotB],[A,NotA,100]) :-
    A + NotA #= 100,
    B + NotB #= 100,
    AandB + AandNotB #= A,
    NotAandB + NotAandNotB #= NotA,
    AandB + NotAandB #= B,
    AandNotB + NotAandNotB #= NotB.

%%%%%%%%%%

listSummer([X,Y,Z]) :- sum([X,Y],#=,Z).

proTable([A,B,C]) :- listSummer(A), listSummer(B),
                                        transpose([A,B,C],[D,E,F]),
                                        listSummer(D),listSummer(E),listSummer(F),listSummer(C).

%%%%%%%%%%

listSummer2(L) :- last(L,X),sum(L,#=,Z), Z - X #= X.

proTable2(L) :- append(L,V), V ins 1..sup, maplist(listSummer2,L), transpose(L,L2), maplist(listSummer2,L2).% maplist(label,L).


