I belive there is a bug. The current definition has the following outputs:
?- display(p or r and s).
or(p,and(r,s))
true.
Which is ok but:
?- display(p and r or s).
and(p,or(r,s))
true.
Which is not.
Can we agree on some test cases to look for a correct solution?