There is almost no chance that Lily is a swan. It is improbable that Mary picked up the milk. It is probably the case that Greg is a lion. It is likely that if 'Lily is a swan and Mary picked up the milk' then John discarded the apple. Chances are about even that if 'Greg is a lion' or 'Mary picked up the milk' or both then Bernhard is green. Chances are about even that if either 'Greg is a lion' or 'Mary picked up the milk' but not both then Fred went to the garden.
There is almost no chance that either 'Lily is a swan' or 'John discarded the apple' but not both.
There is almost no chance that either 'Lily is a swan' or 'John discarded the apple' but not both.
We believe that either 'Lily is a swan' or 'John discarded the apple' but not both.

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

  %hop2
  conclusion:-xor(factA,factX).

  query(conclusion).
  
Either 'Lily is a swan' or 'John discarded the apple' but not both.