Do following terms unify in SWI prolog? If so, give the most general unifier.
bread
en bread
'Brood'
en bread
'bread'
en bread
Bread
en bread
bread
en bicky
eat(bread)
en bread
eat(bread)
en X
eat(X)
en eat(bread)
eat(bread,X)
en eat(Y,bicky)
eat(bread,X,coke)
en eat(Y,bicky,X)
eat(bread,X,coke)
en eat(Y,pizza)
eat(X)
en X
meal(eat(bread),drinken(coke))
en meal(X,Y)
meal(eat(bread),X)
en meal(X,drinken(coke))
You can verify your solutions in swipl
by concatenating the terms with a =
.
The program will then show you the most general unifier. If false
is shown,
no unifier was found. A result of true
is short for the empty unifier.