It is probably the case that Mary went to the hallway. There is almost no chance that Sandra left the milk. It is highly likely that Greg is a lion. It is highly likely that if 'Greg is a lion' or 'Mary went to the hallway' or both then Lily is yellow. There is almost no chance that if 'Greg is a lion and Mary went to the hallway' then Julius is a swan. We doubt that if 'Sandra left the milk and Greg is a lion' then John took the apple.
It is impossible that 'John took the apple and Mary went to the hallway'.
It is impossible that 'John took the apple and Mary went to the hallway'.
There is a very good chance that 'John took the apple and Mary went to the hallway'.

  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.7::factA.
  0.02::factB.
  0.9::factC.
  %hop1
  0.9::factX:-or(factC,factA).
  0.02::factY:-and(factC,factA).
  0.2::factZ:-and(factB,factC).

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

  query(conclusion).
  
'John took the apple and Mary went to the hallway'.