:- dynamic and_godel/3, pri_min/3, pri_add/3, pri_prod/3.

member(info(X,Y)):-number(X),0=<X, X=<1, number(Y), (Y>=0;Y=inf).

leq(info(X1,Y1),info(X2,Y2)) :-X1=<X2, Y1>=Y2.
top(info(1,0)).
bot(info(0,inf)).

and_godel(info(X1,Y1),info(X2,Y2),info(X3,Y3)) :- pri_min(X1,X2,X3), pri_add(Y1,Y2,Y3).
and_prod(info(X1,Y1),info(X2,Y2),info(X3,Y3)) :- pri_prod(X1,X2,X3), pri_add(Y1,Y2,Y3).

pri_min(X,Y,Z):-(X<Y,X=Z;Y=<X,Z=Y).
pri_add(inf,inf,inf) :- !.
pri_add(inf,X,inf) :- !.
pri_add(X,inf,inf) :- !.
pri_add(X,Y,Z):-Z is X+Y.
pri_prod(X,Y,Z):-Z is X*Y.