r is the FOL clause in the knowledge base.
In addition, the FOL clause may contain quantifiers and variables.
For any FOL sentence, there is a simplified form of it in various forms, such as CNF (Conjunctive Normal Form) (Horn sentences are similar) that this algorithm works on. CNF-style simplification is limited to a specific, limited set of statements and usually results in an expanded expression compared to the original (sometimes much longer). CNF does not use quantifiers, although variables are acceptable.
Quantifiers are "for all" (universal) operators, and "exists" (existential). Each quantifier takes a variable (or list of variables) and a single (auxiliary) operator, by which the entered variables (in the list) are quantified. These variables are called related, but only for the area of one subtitle (in the expression with a quantitative expression). Thus, the quantifier implicitly introduces a new region (for its variables).
CNF does not allow explicit quantifiers and does not provide multiple or separate areas for variables! Thus, it is necessary not only to exclude quantifiers, but also the scope of variables must also be eliminated (or collapsed into one area). (Areas are fairly easy to eliminate, and so this is done first.)
If a single statement contains several quantifiers, in FOL it is quite acceptable to use the same variable name in a quantifier that has a disjoint region. Thus, the following single (albeit composite) statement is acceptable in FOL:
(there-exists(x) (Father(x,Joe))) AND (there-exists(x) (Mother(x,Joe)))
which says that there is someone who is Joe’s father, and there is x (another x) who is Joe’s mother.
In the above statement, the variable x is introduced twice, although its two different applications are not actually related to each other! However, since x is used twice when we read, interpret, or manipulate and transform this operator, we must stay up to date with two separate areas (otherwise our transformations will sometimes not be equivalent). This generally applies to any FOL statement, which means we need to know about the scope for the purpose of interpreting and manipulating the general FOL statement.
The following statement is logically equivalent, but does not use x twice:
(there-exists(x) (Father(x,Joe))) AND (there-exists(y) (Mother(y,Joe)))
If we guarantee that our (transformed) operators do not have overlapping variables (i.e. there are no two options for using the same variable name in disjoint areas), we no longer need to consider two separate areas introduced by two methods of using quantification. We we can effectively consider that for the variables of such operators there is only one domain. This is the essence of the difference between STANDARDIZE-APART, since variables in different areas do not overlap (giving them unique names), we no longer need to consider several areas separately in one statement (which could have multiple quantifiers).
(You would do the same in Java if you combined two procedures or methods or statement blocks together into one: you must make sure that the selected variable names are unique between them so that they do not conflict.)
STANDARIZE-APART performs conversion to CNF, which requires the folding of several areas into one, and the elimination of quantifiers (as well as the replacement of some operators, such as implication and equivalence, with analogues in terms of "and", "or", and "no").
Existential quantifiers are excluded in favor of skolem functions as follows: in the second (and higher) order logic, we can quantify functions (for example, there is (f) such that f () ...), however, in First Order Logic, we cannot quantify functions. However, although we cannot quantify functions in FOL, we can still use functions. In FOL, functions are simply assumed to exist. (CNF forms and horn clowns also honor the supposed existence of functions.) Skoemization is a replacement for existential quantification, in which an existentially quantified variable (wherever it appears in a subtask) is replaced by a newly created and appropriately parameterized function (for each such existential quantifier replacement a new function is created, and the set parameters are related to the context of other incoming quantifiers). This newly introduced function is simply supposed to exist without the existence of an existential quantifier. By eliminating the use of an existentially quantified variable (in favor of a new function), we can now omit the existential quantization operator itself and simply save the modified subtitle.
Universal quantifiers advance to the outermost (volume) of the operator and can simply be eliminated (1) because the regions are expanded, and (2) because there are no more existential quantifiers (since those that have already been eliminated by skomimization) and (3), since in various forms of CNF / horn all variables are simply assumed to be universal.
Unification is a compositional method in which we consider what we know if we combine two (otherwise separated) pieces of information about the same relationship, R. Parts of the information take the form of variables and constant relationship parameters. Unlike standardization, unification does not always succeed, that is, it does not always reveal more information.
The last line is a recursive callback for the next level of search for the backward chain, in which one target (for example, the CNF application) that has been considered is replaced by the resulting sub-eyes. Turning to the point, I mean that unification is succeeding, and unification means that we have at least nominally advanced the state of our search engine, and this promotion deserves further search (at a different level).