, , "defaulty", " " : , - (, , neg, imp) logical_atom/1 - ( ). . , // .., , "atom (...)". wff/1 :
wff(atom(_)).
wff(and(A, B)) :- wff(A), wff(B).
wff(neg(A)) :- wff(A).
wff(or(A, B)) :- wff(A), wff(B).
wff(imp(A, B)) :- wff(A), wff(B).
:
?- wff(and(atom(q), imp(or(atom(p), atom(q)), neg(atom(p))))).
true.
, , , .
, , :
wff(atom(_))
wff(and(A,B))
wff(neg(A))
wff(or(A,B))
wff(imp(A,B))
:
?- length(Ls, _), phrase(wff(W), Ls), writeln(W), false.
:
atom(_G490)
neg(atom(_G495))
and(atom(_G499),atom(_G501))
neg(neg(atom(_G500)))
or(atom(_G499),atom(_G501))
imp(atom(_G499),atom(_G501))
and(atom(_G502),neg(atom(_G506)))
and(neg(atom(_G504)),atom(_G506))
neg(and(atom(_G504),atom(_G506)))
neg(neg(neg(atom(_G505))))
neg(or(atom(_G504),atom(_G506)))
neg(imp(atom(_G504),atom(_G506)))
etc.
.