Intelligence 2E

foundations of computational agents

The third edition of Artificial Intelligence: foundations of computational agents, Cambridge University Press, 2023 is now available (including full text).

Without allowing equality in the head of clauses, the only thing that is equal to a term in all interpretations is itself.

It is often useful to be able to assert or infer that two terms denote the same individual, such as $chairOnRight=chair2$. To allow this, the representation and reasoning system must be able to derive what follows from a knowledge base that includes clauses with equality in the head of clauses. There are two ways of doing this. The first is to axiomatize equality like any other predicate. The other is to build special-purpose inference machinery for equality.

Equality can be axiomatized as follows. The first three axioms state that equality is reflexive, symmetric, and transitive:

$X=X.$ | ||

$X=Y\leftarrow Y=X.$ | ||

$X=Z\leftarrow X=Y\wedge Y=Z.$ |

The other axioms depend on the set of function and relation symbols in the language; thus, they form what is called an axiom schema.

The first schema specifies substituting term with an equal term does not affect the value of the function. The axiom schema is that for every $n$-ary function symbol $f$, there is a rule

$f({X}_{1},\mathrm{\dots},{X}_{n})=f({Y}_{1},\mathrm{\dots},{Y}_{n})\leftarrow {X}_{1}={Y}_{1}\wedge \mathrm{\cdots}\wedge {X}_{n}={Y}_{n}.$ |

Similarly, for each $n$-ary predicate symbol $p$, there is a rule of the form

$p({X}_{1},\mathrm{\dots},{X}_{n})\leftarrow p({Y}_{1},\mathrm{\dots},{Y}_{n})\wedge {X}_{1}={Y}_{1}\wedge \mathrm{\cdots}\wedge {X}_{n}={Y}_{n}.$ |

The binary function ${c}{\mathit{}}{o}{\mathit{}}{n}{\mathit{}}{s}{\mathit{}}{\mathrm{(}}{X}{\mathrm{,}}{Y}{\mathrm{)}}$ requires the axiom

${c}{}{o}{}{n}{}{s}{}{(}{{X}}_{{1}}{,}{{X}}_{{2}}{)}{=}{c}{}{o}{}{n}{}{s}{}{(}{{Y}}_{{1}}{,}{{Y}}_{{2}}{)}{\leftarrow}{}{{X}}_{{1}}{=}{{Y}}_{{1}}{\wedge}{}{{X}}_{{2}}{=}{{Y}}_{{2}}{.}$ |

The ternary relationship ${p}{\mathit{}}{r}{\mathit{}}{o}{\mathit{}}{p}{\mathit{}}{\mathrm{(}}{I}{\mathrm{,}}{P}{\mathrm{,}}{V}{\mathrm{)}}$ requires the axiom

${p}{}{r}{}{o}{}{p}{}{(}{{I}}_{{1}}{,}{{P}}_{{1}}{,}{{V}}_{{1}}{)}{\leftarrow}{}{p}{}{r}{}{o}{}{p}{}{(}{{I}}_{{2}}{,}{{P}}_{{2}}{,}{{V}}_{{2}}{)}{\wedge}{}{{I}}_{{1}}{=}{{I}}_{{2}}{\wedge}{}{{P}}_{{1}}{=}{{P}}_{{2}}{\wedge}{}{{V}}_{{1}}{=}{{V}}_{{2}}{.}$ |

Having these axioms explicit as part of the knowledge base turns out to be very inefficient. Moreover, the use of these rules is not guaranteed to halt using a top-down depth-first interpreter. For example, the symmetric axiom will cause an infinite loop unless identical subgoals are noticed.

Paramodulation is a way to augment a proof procedure to implement equality. The general idea is that, if ${t}_{1}={t}_{2}$, any occurrence of ${t}_{1}$ can be replaced by ${t}_{2}$. Equality can thus be treated as a rewrite rule, substituting equals for equals. This approach works best if you can select a canonical representation for each individual, which is a term that other representations for that individual can be mapped into.

One classic example is the representation of numbers. There are many terms that represent the same number (e.g., $4*4$, $13+3$, $273-257$, ${2}^{4}$, ${4}^{2}$, $16$), but typically we treat the sequence of digits (in base ten) as the canonical representation of the number.

Universities invented student numbers to provide a canonical representation for each student. Different students with the same name are distinguishable and different names for the same person can be mapped to the person’s student number.