我在这段代码中发现了该代码,它告诉我公式是否有效,但我还想要的是续集的计算
:- op(900, fy, not).
:- op(850,yfx, and).
:- op(800,yfx, or).
:- op(750,yfx, imp).
:- op(700,yfx, iff).
sc([neg(A)|L],R) :- !, sc(L,[A|R]).
sc(L,[neg(A)|R]) :- !, sc([A|L],R).
sc(L,[or(A,B)|R]) :- !, sc(L,[A,B|R]).
sc([or(A,B)|L],R) :- !, sc([A|L],R), sc([B|L],R).
sc([A|L],R) :- atom(A), select(B,L,H), compound(B), !, sc([B,A|H],R).
sc(L,[A|R]) :- atom(A), select(B,R,H), compound(B), !, sc(L,[B,A|H]).
sc(L,R) :- member(A,L), member(A,R), !. ```