1. eq/2
2. eqv/2
3. dif/2

## eq/2

This goal tries to match (or unify) the two arguments. It succeeds if the matching succeeds, and fails if the matching fails.

For example, given the following program:

`XIsNameY(X,Y) :- eq(X, name(Y)).`

we can ask the following query:

`?- XIsNameY(name(Martin), Martin).`

`{}`

meaning "yes".

The reason is that X, which is bound to name(Martin), matches with name(Y), since Y is bound to Martin.

## eqv/2

The eqv goal stands for "equivalent", and is the identity test on numbers. No matching occurs -- both arguments should have values. Thus you cannot make new variable bindings with this goal, since if either argument contains a variable, that variable should already have a value (or "be bound").

`?- eqv(X,54).`

`Error: any variable in an expression should have a value.`

This is because X is a free variable here.

`?- eqv(54,54).`

`{}`

`?- eq(X,54), eqv(X,54).`

`{X = 54}`

thus the first subgoal (eq(X,54)) succeeded with the variable binding just given, and the second subgoal also succeeded, since X was bound to 54.

## dif/2

This goal means "different".

`dif(x,y) `

is equivalent to:

`not(eq(x,y))`

Thus, first matching is attempted between the two arguments. Then the result is negated: If the matching succeeded, the dif goal fails. If the matching failed, the dif goal succeeds.

For example,

`?- dif(X,name(Martin)).`

`no.`

This is because X is a free variable, so X matches with name(Martin). Thus the matching succeeds, and therefore the dif subgoal fails.

On the other hand, if we ask:

`?- eq(X,name(Lisa)), dif(X,name(Martin)).`

`{X = name(Lisa)}`