% query: div(g,g,f)
div(0,Y,0).
div(X,Y,Z):-quot(X,Y,Y,Z).
quot(0,s(Y),Z,0).
quot(s(X),s(Y),Z,T):-quot(X,Y,Z,T).
quot(X,0,s(Y),s(Z)):- div(X,s(Y),Z).
