It is probably the case that Lily is yellow. Chances are about even that Bernhard is a swan. We believe that John went to the hallway. Chances are slight that if 'Bernhard is a swan and Lily is yellow' then Julius is a lion. It is likely that if 'Bernhard is a swan' or 'John went to the hallway' or both then Greg is gray. There is almost no chance that if 'John went to the hallway and Bernhard is a swan' then Brian is a frog.
It is certain that 'Greg is gray and John went to the hallway'.
Chances are about even that 'Greg is gray and John went to the hallway'.
It is certain that 'Greg is gray and John 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.5::factB.
  0.75::factC.
  %hop1
  0.1::factX:-and(factB,factA).
  0.7::factY:-or(factB,factC).
  0.02::factZ:-and(factC,factB).

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

  query(conclusion).
  
'Greg is gray and John went to the hallway'.