There is a better than even chance that Mary went to the kitchen. It is almost certain that Sandra put down the milk. We believe that John got the apple. We believe that if 'Sandra put down the milk' or 'Mary went to the kitchen' or both then Greg is yellow. It is certain that if 'Mary went to the kitchen' or 'John got the apple' or both then Julius is green. There is almost no chance that if either 'Sandra put down the milk' or 'Mary went to the kitchen' but not both then Bernhard is a lion.
It is impossible that 'Bernhard is a lion and John got the apple'.
It is impossible that 'Bernhard is a lion and John got the apple'.
We believe that 'Bernhard is a lion and John got the apple'.

  and(A,B) :- A,B.
  or(A,B) :- A;B.
  nand(A,B) :- not(and(A,B)).
  nor(A,B) :- not(or(A,B)).
  xor(A,B) :- or(A,B), nand(A,B).

  %hop0
  0.6::factA.
  0.95::factB.
  0.75::factC.
  %hop1
  0.75::factX:-or(factB,factA).
  1.0::factY:-or(factA,factC).
  0.02::factZ:-xor(factB,factA).

  %hop2
  conclusion:-and(factZ,factC).

  query(conclusion).
  
'Bernhard is a lion and John got the apple'.