We believe that Mary left the apple. Chances are slight that John went to the office. We believe that Bernhard is gray. Chances are slight that if 'Bernhard is gray and John went to the office' then Greg is white. There is a very good chance that if either 'Mary left the apple' or 'Bernhard is gray' but not both then Lily is a swan. There is little chance that if 'Bernhard is gray' or 'John went to the office' or both then Emily is a sheep.
It is impossible that 'Emily is a sheep and Greg is white'.
It is impossible that 'Emily is a sheep and Greg is white'.
It is certain that 'Emily is a sheep and Greg is white'.

  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.75::factA.
  0.1::factB.
  0.75::factC.
  %hop1
  0.1::factX:-and(factC,factB).
  0.8::factY:-xor(factA,factC).
  0.1::factZ:-or(factC,factB).

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

  query(conclusion).
  
'Emily is a sheep and Greg is white'.