I'm assuming this question is about how to create sensible rules which imply facts are true based on other facts known about certain atoms. If location 'a' is smoking, there must be fire at location 'a', therefore 'a' has fire.
smoke(a).
smoke(b).
fire(c).
fire(X) :- smoke(X).
smoke(X) :- fire(X).
?- fire(a).
true
?- fire(b).
true
?- fire(c).
true
?- smoke(c).
true
In case you want to specifically check whether something is on fire or smoking:
isFire(X) :- fire(X);smoke(X).
isSmoke(X) :- smoke(X);fire(X).
Example:
?- isFire(asbestos), smoke(asbestos).
false <- the first statement is never true so the second never gets called
The ;
symbol means OR, so if either fire or smoke is true for a given fact, it will return true.