Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term_expansion(L is R, algebra_isa(L,R)).
- algebra_isa(L,R):-grab_vars(L,Lvs),grab_vars(R,Rvs), ...
- equation(X,+,Y,Z):- var(X),X is Z-Y.
- equation(X,+,Y,Z):- var(Y),Y is Z-X.
- equation(X,+,Y,Z):- var(Z),Z is X+Y.
- equation(X,-,Y,Z):- var(X),X is Z+Y.
- equation(X,-,Y,Z):- var(Y),Y is Z+X.
- equation(X,-,Y,Z):- var(Z),Z is X-Y.
- equation(X,*,Y,Z):- var(X),X is Z/Y.
- equation(X,*,Y,Z):- var(Y),Y is Z/X.
- equation(X,*,Y,Z):- var(Z),Z is X*Y.
- equation(X,/,Y,Z):- var(X),X is Z*Y.
- equation(X,/,Y,Z):- var(Y),Y is Z*X.
- equation(X,/,Y,Z):- var(Z),Z is X/Y.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement