Guest User

Untitled

a guest
Apr 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. solvelogic(true,true,false,true).
  2.  
  3. implies(X,Y) :- (not(X);Y). %that's implies formula and it works
  4. xor(X,Y) :- not(X=Y). %that's xor formula and it works too
  5. and(X,Y) :- X,Y.
  6. or(X,Y) :- X;Y.
  7.  
  8. implies1(P,Q,R) :- implies(and(P,Q),R).
  9. implies2(P,Q,R) :- implies(P,(or(not(Q),R))).
  10. implies3(P,Q,R) :- implies(implies1(P,Q,R),implies2(P,Q,R)).
Add Comment
Please, Sign In to add comment