Trying to learn Unification process, and while reading in a website about it, i found this example.
Find the MGU of {p(f(a), g(Y)) and p(X, X)}
Sol: S0 => Here, Ψ1 = p(f(a), g(Y)), and Ψ2 = p(X, X) SUBST θ= {f(a) / X} S1 => Ψ1 = p(f(a), g(Y)), and Ψ2 = p(f(a), f(a)) SUBST θ= {f(a) / g(y)}, Unification failed.
Unification is not possible for these expressions.
I wanna know if this Unification failure isn't only due to the chosen Substitution ? For example why they didn't substitute: X / f(a) and then X / g(y) to get p(X,X) and p(X,X) ?
To unify
p(f(a), g(Y)) = p(X, X)would require thatf(a) = Xandg(Y) = Xbutfandgare distinct, so this fails.There is no choice about substitutions or anything here, it must fail.