6

Currently I read up on unifiers, however have some problem understanding its concept. Thus far I found an example of an equation:

add(suc(x); y) $\stackrel{.}{=}$ add(y; suc(z))

and unifiers to it:

$\omicron$ = [suc(x)/y; x/z],

$\omicron'$ = [suc(suc(z))/y; suc(z)/z; suc(z)/x] and

$\omicron'$ = $\omicron$[suc(z)=x]

However I do not understand how one generally derives these unifiers from the equation above. Any construcive comment/answer would be appreciated.

Imago
  • 425
  • 4
  • 17

1 Answers1

7

A unifier of a set of terms is just any substitution that, when applied to each of the terms, makes them all equal. There's also the concept of a "most general unifier" (MGU), which is a unifier $\sigma$ of the terms such that any other unifier can be written as $\sigma\circ\tau$ for some substitution $\tau$: in other words any other unifier can be written as "first do an MGU and then do some more substitutions, which were kinda unnecessary because you'd already made the terms equal."

As for finding unifiers, there are various algorithms; see the Wikipedia article for more details. In terms of what's required for undergraduate exercises, though, the most natural "algorithm" is the rather unhelpful "Look at the terms and see what works." Once you understand the definition and you're comfortable with it, a unifier is usually pretty immediate.

David Richerby
  • 82,470
  • 26
  • 145
  • 239