It is probably the case that Mary went to the garden. It is highly unlikely that Greg is yellow. It is highly likely that Julius is a swan. There is a better than even chance that if 'Mary went to the garden and Greg is yellow' then Lily is green. There is little chance that if either 'Greg is yellow' or 'Mary went to the garden' but not both then John put down the apple. We doubt that if 'Mary went to the garden and Julius is a swan' then Bernhard is a swan.
It is highly unlikely that 'John put down the apple and Julius is a swan'.
It is highly unlikely that 'John put down the apple and Julius is a swan'.
It is certain that 'John put down the apple and Julius is a swan'.

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

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

  query(conclusion).
  
'John put down the apple and Julius is a swan'.