Equality and the EPL Theorem's Assumptions
In the preceding article I addressed a concern about requirements R2 and R3 used in the EPL Theorem: that if our propositional symbols have internal structure, are in fact FOL ground atoms, then
this internal structure could implicitly introduce some logical dependency between these symbols above and beyond what is stated in the premise π of a plausibility expression (π΄ | π) ; and
that therefore R2 and R3 become questionable.
I showed that there is in fact no such logical dependency introduced in the case of FOL without equality. In this article I address the case of FOL with equality.
FOL with equality
One approach to dealing with equality in FOL is to treat β=β as a special, logical symbol, having a fixed meaning just like Β¬ , β§ , β¨ , etc. have fixed meanings. In this approach, which weβll abbreviate as FOL=, one defines the semantics of equality via
given a FOL interpretation β.
Letβs write β¨β for the entailment relation of propositional logic and β¨β for the entailment relation of FOL=, based on the truth assignment induced by an interpretation β. The existence of additional logical dependencies introduced by equality manifests as the fact that it is possible for π β¨β π΄ to be true even though π β¨β A is false; for example, if π‘, π‘β, π‘β are ground terms and π is a tautology, then
and this occurs because propositional logic is blind to any internal structure of propositional symbols. (Recall that ground atomic formulas such as (π‘β = π‘β) are, in the context of propositional logic, just propositional symbols.)
Axiomatizing equality
With FOL= thereβs some implicit information regarding atomic formulas involving β=β that isnβt spelled out in oneβs premises, and if youβve read my previous articles you know what comes next: such implicit information must be made explicit in the premise π of a plausibility expression (π΄ | π) .
This brings us to the other way of dealing with equality in FOL: include explicit axioms for equality. One such standard axiomatization is the following:
ER: Equality is reflexive (every value is equal to itself).
\(\forall x.\,(x=x)\)ES: Equality is symmetric (order of arguments doesnβt matter).
\(\forall x.\forall y.\,\left(x=y\right)\rightarrow\left(y=x\right)\)ET: Equality is transitive.
\(\forall x.\forall y.\forall z.\,\left(x=y\right)\rightarrow\left(y=z\right)\rightarrow\left(x=z\right)\)EF(π): Equals are substitutable in function application. For every π > 0 and every π -ary function symbol π, we have the axiom
\(\begin{multline*} \forall x_{1}\cdots\forall x_{n}.\forall y_{1}.\cdots\forall y_{n}.\\ \left(x_{1}=y_{1}\right)\wedge\cdots\land\left(x_{n}=y_{n}\right)\rightarrow\\ \quad\left(f\left(x_{1},\ldots,x_{n}\right)=f\left(y_{1},\ldots,y_{n}\right)\right) \end{multline*}\)EP(π): Equals are substitutable in predicate application. For every π > 0 and every π-ary predicate symbol π, we have the axiom
\(\begin{multline*} \forall x_{1}\cdots\forall x_{n}.\forall y_{1}.\cdots\forall y_{n}.\\ \left(x_{1}=y_{1}\right)\wedge\cdots\land\left(x_{n}=y_{n}\right)\rightarrow\\ \quad\left(p\left(x_{1},\ldots,x_{n}\right)\leftrightarrow p\left(y_{1},\ldots,y_{n}\right)\right) \end{multline*}\)
Letβs write β¨β for the entailment relation of FOL (without equality), and let π€ be the set of equality axioms given above. Then propositional entailment β¨β, FOL entailment β¨β, and FOL= entailment β¨β for ground formulas π and π΄ are related as follows:
We essentially proved the first equivalence above in the preceding article. The second equivalence says that, from the standpoint of entailment, it doesnβt matter whether we use FOL=, or use FOL plus an axiomatization of equality.
Finite ground axiomatization
There is one snag, though: we need to incorporate an axiomatization of equality into the premise π itself, and in general we will not be able to do so with a finite set of ground axioms. Equality is finitely axiomatizable in FOL if we restrict the set of non-nullary1 function symbols and predicate symbols to be finite (we require a separate axiom for each of these); but to obtain ground axioms we have to replace each universal quantification βπ₯. π with an infinite number of instances obtained by replacing π₯ with every possible ground term. For example, the axiom
must be replaced by an axiom (π‘β = π‘β) β (π‘β = π‘β) for every one of the infinitely many possible choices of ground terms for π‘β and π‘β.
Luckily, we only need a ground axiomatization of equality that suffices for those instances of equality occurring in the premise π, or which we may wish to use in constructing the query π΄, of a plausibility expression (π΄ β£ π) . Let πΊ be this set of ground equality atoms, and letβs call a ground formula πΊ-limited if the only ground atoms containing β=β occurring in it are members of πΊ. Then we need a πΊ-limited ground formula π, which will be the conjunction of a finite set of ground equality axioms, such that
whenever π and π are πΊ-limited.
One approach: limit term depth
One way of creating such an axiomatization is by limiting the depth of terms. The depth of a term is the deepest nesting of function applications within it. Specifically, a term π( ) has depth 0, and a term π(π‘β, β¦ , π‘β) has depth 1 + maxα΅’ Ξ΄α΅’, where Ξ΄α΅’ is the depth of term π‘α΅’. Thus
π₯() has depth 0;
1 + π₯() has depth 1;
sqrt(1 + π₯()) has depth 2;
etc.
So letting π be some integer such that no term in π has depth greater than π, take the FOL axiomatization of equality given above and instantiate the universally quantified variables using terms of depth at most π, except for the EF(π) axioms; in this case instantiate the quantified variables with terms of depth at most π - 1 (as the resulting ground axiom will then contain a term of depth π).
If you find this finite limit troublesome, remember Jaynesβs finite sets policy: start with the finite case and then take the limit as π goes to infinity.
Another approach: finite domain of discourse
An alternative approach is to note that if
the domain of discourse (the set of values a quantified variable can have) is finite, and
our formulas are in ground normal form (defined below),
then a finite ground axiomatization of equality is possible. We do this as follows.
Choose a set of distinct domain constant symbols π = { πβ, β¦ , πβ } intended to represent the π values in the domain of discourse. We restrict our attention to formulas in ground normal form:
Definition. A FOL formula is in ground normal form (GNF) if it is a ground formula (no quantifiers, no variables) and every atomic subformula has form π(πβ, β¦ , πβ) or π(πβ, β¦ , πβ) = πβ, where each πα΅’ is a domain constant (πα΅’ β π), π is the arity of predicate symbol π, and π is the arity of function symbol π.
We then proceed as follows:
Construct a finite set of ground axioms that suffice to characterize equality for GNF formulas. It suffices to assert
that each domain constant is equal to itself and unequal to any other domain constant, and
that any term created by applying a function symbol to arguments that are all domain constants is equal to exactly one of the domain constants.
Show how to convert any ground formula into an equivalent GNF formula.
This strategy is a modification of the approach outlined in Wittocx, MariΓ«n, and Denecker (2010)2. Details follow.
If your desired domain of discourse is infinite, then once again, start with the finite case and take the limit as π goes to infinity.
Axiomatizing equality for GNF formulas
Let π· be the finite set of function symbols weβll support. It includes π, the set of domain constants.
Define the term equality axiom for a ground term t to be:
If π‘ is anything other than a domain constant symbol, TEA(π‘) is a ground formula expressing that π‘ is equal to exactly one of the domain constants πα΅’. For a domain constant πα΅’, TEA(πα΅’) expresses that πα΅’ is equal to itself and unequal to any other domain constant.
Define the function equality axiom for any function symbol π β π· of some arity π β₯ 0 to be:
This is the conjunction of the term equality axioms for function symbol π applied to all possible combinations of domain constants.
Finally, define the ground equality axiom to be
This is the conjunction of the function equality axioms for each function symbol. Note that GEA is itself a GNF formula.
A straightforward induction proof yields the following:
Theorem. For any ground term π‘ constructed from the function symbols in π·, GEA β¨β TEA(π‘) .
So GEA entails (in FOL) that every possible ground term is equal to exactly one of the domain constants. This suffices as an axiomatization of equality for GNF formulas. Furthermore, it is straightforward to show that for any two GNF formulas π and π,
thus ensuring that GEA makes explicit any implicit logical dependencies between the atoms of π and π.
Reduction to GNF
We can use the following algorithm to transform any ground formula into an equivalent (under FOL=) GNF formula. If π is a ground formula then π(π) is recursively defined as follows:
(Recurse through logical operators.)
(In equality comparisons between a domain constant and a term that is not a domain constant, put the domain constant on the right.)
(Replace an equality comparisons between two terms, neither of which is a domain constant, by a formula saying that both terms are equal to the same domain constant.)
(When a function application is compared to a domain constant, reduce its arguments to domain constants using the fact that any argument that is not a domain constant must be equal to some domain constant.)
(Reduce the arguments of a predicate to domain constants using the fact that any argument that is not a domain constant must be equal to some domain constant.)
(Leave GNF atoms unchanged.)
Another straightforward induction proof yields the following:
Theorem. For any ground formula π,
π(π) is well defined;
π(π) is a GNF formula; and
GEA β¨β π β π(π) : that is, π and π(π) are equivalent under FOL=, assuming GEA.
This justifies reducing
to
A note on computational complexity
These approaches to creating a finite ground axiomatization of equality can result in some very large formulas, which may appear computationally impractical; but keep in mind that although the EPL Theorem defines what our probabilities should be, this does not obligate us to carry out the actual computations (or approximate computations) by actually creating these very large formulas and naΓ―vely counting satisfying truth assignments. Furthermore, as previously discussed, although the finite case may often be difficult to compute exactly, things often simplify considerably when we take the limit as π or π goes to infinity.
Having nonzero arity.
Wittocx, J., MariΓ«n, M., and M. Denecker, 2010, βGrounding FO and FO(ID) with Bounds,β J. of Artificial Intelligence Research 38, pp. 223β269. https://www.jair.org/index.php/jair/article/view/10653/25467

