Talk:Unification (computer science)

message: Should this page be renamed, e.g., Unification (Prolog) or Unification (Computer Programming)? --Nate—Preceding undated comment added at 00:41, 24 November 2002 (UTC)
thread_title: Untitled

message: I've no luck finding a page on this kind of unification that doesn't assume the reader wants to do it in Prolog/Lisp/etc.  If there are any good web pages that explain unification on logic with a series of clauses containing nothing but plain ol' variables (not even quantifiers, just variables) as you would do logic problems on paper, I think a link to that would be useful. --I am not good at running 21:32, 23 October 2005 (UTC)
thread_title:  link to non-compsci logic unification would be dandy 

message: The bit on prolog ought to be moved to Prolog and referenced, I think.  The Prolog page doesn't deal with it sufficiently on its own, and it matters. 138.38.32.84 14:03, 17 January 2007 (UTC)
thread_title:  Move unification in Prolog to the prolog article 

message: To say that x^2 can be unified with y^3 is at best misleading because the argument that (z^3)^2 = (z^2)^3 = z^6 is semantic and unification is - as I understand it - purely syntactic. I am not enough of an expert to get this right but it seems to me that as *terms* x^2 and y^3 have to be written as m(x,x) and m(y,m(y,y)) where 'm' denotes multiplication. Can these terms be unified? I think so because they both begin with the same function symbol and have the same number of arguments, which - I believe - can themselves be unified. But the definition of unification given on this page does not cover binary (n-ary) functions.  —Preceding unsigned comment added by Kilgore666 (talk • contribs) 03:01, 8 October 2007 (UTC)
thread_title:  Correct the example given 

message: Yes, BenKovitz and Kilgore666, you are right: The article is leaving out a number of important aspects and in my opinion it is complete rubbish in certain portions. It should be completely rewritten.  In some parts the explanations really do hurt, since they are just not at all catching the meaning and focus of the notions. —Preceding unsigned comment added by 93.207.221.50 (talk) 09:36, 1 April 2010 (UTC)
thread_title:  Answer and important remark 

message: What about the Most General Unifier? This article even redirects here, but the page does not mention it -- 200.185.249.203 (talk) 18:07, 16 March 2008 (UTC)
replies: text: I have now tried to add the definition of MGU to the article. Hope this is helps. Offliner (talk) 00:00, 17 September 2008 (UTC)
thread_title:  MGU 

message: Why speak of unifying "A=B, B=abc"?  This is simply confusing.  It is better to speak of unifying "A,B,abc" or "A=B=abc".  There is no reason to mix equal signs and commas like that, when they mean the same thing in this context.  I'm changing it to use commas throughout. Halberdo (talk) 00:24, 7 April 2009 (UTC)
replies: text: This is simply Prolog syntax: A = B is the unification operator, and it cannot be chained like A = B = C, one has to write it as several unifications joined by commas (which are really conjunction operators). I do not see any particular reason why a general article on unification should be bound by syntactic conventions of a specific language, your change is fine. — Emil J.—Preceding undated comment added at 09:44, 7 April 2009 (UTC)
thread_title:  Why use equations in the examples? 

message: click this link for car because it is a part of a car  —Preceding unsigned comment added by 86.14.186.72 (talk) 16:39, 22 March 2010 (UTC)
thread_title:  car  

message: The introduction seems hopelessly confused to me.  For one, it doesn't even mention what constitutes a solution to a unification problem.  As far as I'm aware, it's entirely standard to return a *substitution* as a solution to a unification problem, not another term, where applying the substitution to input terms results in two alpha-equivalent terms.  The notion of mgu is defined by taking an ordering on substitutions, not on terms.  The polynomial example is completely unclear, as whether or not these two polynomials even have a unifier depends entirely on how they are encoded.
Also, nitpicking, but the section on first-order unification is mistitled.  It isn't unification for first-order logic that is being described, but first-order unification, a description of the terms themselves to be unified (first-order terms, as opposed to higher-order terms or nominal terms).
The description of higher-order unification is also just ... bizarre.  What are ellipsis, in this context?  IMO, it's easier to describe higher-order unification as "just" the process of unifying higher-order (lambda-) terms.  Huet's algorithm is mentioned in the programming language section above, and there it is misplaced: it belongs in the section on higher-order unification, as it's the canonical example of a higher-order unification algorithm, and because virtually every type-inferencing algorithm that I've come across for functional PL's use Robinson's first-order unification algorithm, not higher-order unification.
If I get time, I plan to rework this article soon. DPMulligan (talk) 16:32, 9 May 2010 (UTC)
thread_title:  Introduction: non-standard notion of unifier? 

message: From reading the article I have *no* idea what higher-order unification is.  DPMulligan has the right idea; this article definitely needs work!
Norman Ramsey (talk) 14:52, 12 May 2010 (UTC)
replies: text: Hi, i wrote some semntences for HO unification, but its more a stub than something else. Explaining HO unification in detail requires lots of technical knowledge, so even an example is very hard to give. If you like, i can add some more stuff, but i don't know, if it is useful. Alerion (talk) 00:46, 21 January 2011 (UTC)
thread_title:  Higher-Order Unification needs help! 

message: I have started reworking the article, starting with the Introduction, removing all the technical jargon (we do not need to mention lattices in the introduction to a unification article).  Any comments (in particular, any technical mistakes) are welcome. DPMulligan (talk) 15:29, 13 May 2010 (UTC)
replies: text: Yeah, this article sucks. But before diving into it, perhaps its prerequisites should be written. Term rewriting has no article basically, and neither does equational logic. I see that you started writing nominal terms (computer science), which seems to want to cover unification in nominal equational logic. Before we get to the latest research topic (which you seem to be involved with), please write some more basic stuff missing. I wrote the abstract rewriting system article and overhauled the Semi-Thue system one a while back, but don't have much time to contribute lately, so the rewriting article is still lacks major topics, including term rewriting and unification. You seem very into lambda-calculus stuff, but please (re)write this from a more general perspective. Thanks, Pcap ping 21:07, 13 May 2010 (UTC)
thread_title:  Reworking article 

message: Is Unification the operation that binds two terms, or is it the process that finds a solution to a whole theory? Some sections describe it as the former ("It represents the mechanism of binding the contents of variables and can be viewed as a kind of one-time assignment") and some as the latter (the new lead section, and the Satisfiability article describe it that way). Diego Moya (talk) 16:29, 13 June 2011 (UTC)
replies: text: Don't know what you mean by "binding". In practice, unification is done on pairs of terms; in principle, you can take its reflexive, transitive closure which would make it apply to entire theories.  I'll try to modify article to say this. ... Note: Unification is done with substitution, and that is what the opening paragraph says. Now, in systems which have bound and free variables, and one performs a substitution on a bound variable, then, yes, I guess you could think of it as being kind-of-like binding a value to a variable; but these are different ideas, really. Among other things, you can always make substitutions on free variables as well :-) linas (talk) 17:53, 13 June 2011 (UTC)
replies: text: Unification can refer to syntactic unification, i.e. finding a substitution that makes both terms equal, or to theory unification, i.e. unification modulo some (equational) theory. The first is decidable with a fairly simple algorithm. The second is not, in general, decidable, but semi-decidable. There are interesting instances that are decidable (unification modulo associativity and commutativity is a major example with practical relevance). --Stephan Schulz (talk) 18:13, 13 June 2011 (UTC)
replies: text: I tried to carefully distinguish between "equal" and "identical" in the article: syntactic unification is about identity, not equality. If there are no equations, there cannot be any equalities, only identities. linas (talk) 18:21, 13 June 2011 (UTC)
replies: text: And, as I read the above, I see that I misused the word "theory". Sigh.. my bad. However, this comes back to Diego Moya's initial point: for syntactic unification, we use 'substitution (logic)' to describe what's going on. But soon as one goes over to equational theories, or talks about satisfiability, and esp boolean sat, we use the word 'interpretation (logic)' instead. These are really not the same thing, and some space should be devoted to this, as this is a point of confusion.  More generally, I have yet to see any article on WP that really deals with syntax vs. semantics -- semantics could almost do that, but it doesn't... linas (talk) 19:00, 13 June 2011 (UTC)
replies: text: p.p.s. I've casually noticed that associativity seems to make a striking difference in decidability, (i've noticed it here and there), but I don't really get why, so both details, and general remarks on why associativity (and commutativity) seems to tilt things around, would be nice. linas (talk) 19:18, 13 June 2011 (UTC)
thread_title:  Process or operation? 

message: As far as I understand unification (and I understand it fairly well), unification does not try to show that terms are equal (or identical), but rather determine if they have equal (or identical) instances. As an example, f(a,X) and f(Y,b) are neither equal nor identical, but have the common instance f(a,b) (with most general unifier {X<-b, Y<-a}). Similarly, if the background theory is {g(a)=b}, then g(X) and g(b) have equal instances (g(g(a)) and g(b), respectively), although the terms themselves are neither equal nor identical. --Stephan Schulz (talk) 14:18, 19 October 2011 (UTC)
replies: text: I would agree with that yes. —Ruud 12:00, 20 October 2011 (UTC)
thread_title:  Identity/equality? 

message: I made some changes in section "Definition of unification for first-order logic":
* Since there is usually more than one unifier of two terms (or sentences) p and q, the notion "UNIFY(p,q)" made no sense; since it wasn't used elsewhere, I deleted it.
* The notion of a unifier of a set of sentences had to be defined.
* The notion of applying a substitution to a set of sentences still remains to be defined.
I now think that this section should be integrated into "Syntactic unification problem on first-order terms", where unification of terms (rather than sentences) is explained, since I don't see anything particular to logical sentences here. Instead, the main contents is the explanation of "unifier" vs. "most general unifier", which could better be shifted to "Syntactic unification problem on first-order terms". I also suggest not to define simultaneous unification of more than two terms formally, i.e., to simplify the explications about a set L of sentences/terms to. 
I made an attempt to change "Syntactic unification problem on first-order terms" accordingly, but I don't dare to delete "Definition of unification for first-order logic" without agreement. An alternative could be to keep it, but to elaborate on the differences between unification of terms and sentences, making connections to Resolution_(logic). Jochen Burghardt (talk) 12:56, 15 May 2013 (UTC)
thread_title:  Delete section "''Definition of unification for first-order logic''"? 

message: It might be my browser, but I seem to get a lot of error messages?
Example:
Failed to parse (unknown function '\textcolor'): \{ \textcolor{red}{y \stackrel{?}{=} nil}, \; a.v_3 \stackrel{?}{=} v_4, \; app(v_3,v_4) \stackrel{?}{=} a.nil \}
I think this is related to LaTex.  
You can delete this section if I've made a mistake :)
88.104.138.194 (talk) 08:16, 5 July 2013 (UTC)
replies: text: Indeed, \textcolor and \leadsto are not supported by the default TeX rendering engine. They are supported by MathJax, which is probably why it went unnoticed so far.—Emil J. 11:52, 5 July 2013 (UTC)

text: Fixed. Another problem with the default rendering is that spacing is wrong (viz. missing) around the \stackrel{?}{=} signs (because for some silly reason, the preprocessor wraps \stackrel’s in { } before passing them to LaTeX; \mathrel and friends are likewise broken). This is a long-standing problem, and I don’t know of a good way to work around this (inserting explicit \, fixes the texvc output, but makes the spacing too large in MathJax).—Emil J. 12:12, 5 July 2013 (UTC)
thread_title:  Failed to Parse errors? 

message: Note 4 has gone wrong.  I do not know how to correct it.  — Preceding unsigned comment added by 86.166.162.78 (talk) 20:33, 9 September 2013 (UTC)
thread_title:  Note 4 

message: The example in the article says «The Haskell expression 1:['a','b','c'] is not correctly typed, because the list construction function ":" is of type a->[a]->[a] and for the first argument "1" the polymorphic type variable "a" has to denote the type Int whereas "['a','b','c']" is of type [Char], but "a" cannot be both Char and Int at the same time.»
This may sound a bit nit-picking, but the expression «1:['a','b','c']» is not necessarily ill-typed. Number literals are overloaded in Haskell, so «1» isn't of type Int but actually of type Num n => n. Given a type class instance Num Char, «1:['a','b','c']» can be correctly inferred to have type [Char]. Therefore, I suggest to use another example here, like «1 : ('a', 'b')» which will fail to unify types [a] and (b, c). -- PyroPi (talk) 02:53, 28 November 2013 (UTC)
thread_title:  Haskell type inference example 

message: This statement from the current text is wrong:
A substitution σ is more special than, or subsumed by, a substitution τ if xσ is more special than xτ for each variable x.
For example, { x ↦ f(u), y ↦ f(f(u)) } is more special than { x ↦ z, y ↦ f(z) }, since f(u) and f(f(u)) is more special than z and f(z), respectively.
For instance the first substitution applied to  g(x,z)  produces t1 = g(f(u),z),
while the second gives  t2 = g(z,z).  And  t1 is not more special than  t2. 
(Hence the two substitutions do not satisfy the standard definition of "more general":
theta is more general than tau if tau is the composition of theta with some substitution eta). 
</small>
In particular, {x/y} is not more general than {x/a} (Example 2.7, K.Apt "From logic programming to Prolog").
I am going to at least introduce a simple correction, replacing for "each variable x" by "for each term".
(This is easier than introducing substitution composition.)
Hope this does not introduce any new hidden error :)
--Wlodr (talk) 21:49, 24 October 2015 (UTC)
thread_title:  erroneous definition of "more special substitution" 

message: An editor has identified a potential problem with the redirect :Narrowing (computer science) and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 September 19#Narrowing (computer science) until a consensus is reached, and readers of this page are welcome to contribute to the discussion.  Mdewman6 (talk) 21:24, 19 September 2022 (UTC)
thread_title:  "Narrowing (computer science)" listed at [[Wikipedia:Redirects for discussion|Redirects for discussion]] 

message: Request to replace the inline reference to an entry in the Reference section -- it is far beyond my abilities. Thanks.
February 2024  — Preceding unsigned comment added by Ddccc (talk • contribs) 03:48, 14 February 2024 (UTC)
thread_title:  Added the section 'Logic language representation' 

message: No idea why I have to deal now with two volunteers.
I have rewritten the new section with the better title 'Infrastructure for linear versions'.  This deals with linear unification having different algorithms that rely on different data structures.  It is NOT specific for my DC algorithm.  It will be added to the wiki soon.
-----
I noticed that the wiki has now:
    According to Champeaux, Robinson's algorithm is faster on small
    inputs.
Please remove.  I cover this in my new section.
Also you not entitled to make that fuzzy assertion.
-----
A purpose of life is: help other people.  Wikipedia is a great example but is vulnerable due to sociopaths.  Its solution is using unpaid, unvetted volunteers, who create other problems.  Here goes:
***  "you removed a carefully crafted section - in vandalism fashion 
     - in stealth mode/ without any notification -- twice i believe"
     - This is the normal mode of editing on Wikipedia, a section is
     added in one edit and then it is deleted in the next. This is  
     the art of Wikipedia - to not only make an edit, but to avoid 
     having it reverted. 
This is NOT normal. Doubling down is even worse. I was totally
confused by first seeing the addition and later it had disappeared.  I checked the talk section: nothing.  Spend way, way to much time tracking down the perpetrator: Jochen Burghardt.  A consequence of not being trained, vetted, and not accountable. 
*** " 'There are literally thousands of papers about unification'
    Hyperbolic, which weakens your stance" 
    - This was actually not hyperbolic, see Google Scholar which says
    there are hundreds of thousands of papers,
I did.
Doubling down again. 
OK, show me ten papers about vanilla unification with correctness
proof, code on GitHub & comparison/ performance tests against 3
competitors.
OK, show me five papers about LINEAR unification with correctness
proof, code on GitHub & comparison/ performance tests against 3
competitors.
FOLLOW UP instead of shouting in the void.
*** "Who is 'we'?" 
    - "we" is the community of Wikipedia editors. You can see from
    this table that simply by having made more than 10 edits, you are
    in the top 5% of Wikipedia users. 
Doubling down yet again. This is fatal.  As an unvetted volunteer you
can not assume a 'WE' authority stance.  You are entitled only to
'>>I<< believe that XYZ'.  Just consider the connection between
authority and fascism: https://en.wikipedia.org/wiki/Fascism
*** "'An OO version of predicate calculus certainly doesn't belong to
    this article.' Fatal ex-cathedra assertion." 
    Well Wikipedia does have pillars: in particular there is WP:NPOV
    and in particular WP:UNDUE. If there is only one article and it
    has 0 citations then it is hard to justify giving it more space 
    in the article than a sentence, when there are so many highly- 
    cited articles on unification.
My paper is NOT about vanilla unification.  It is about linear
unification.  I had one sentence about MY paper while I pointed out
in the new section that richer languages have been used and are likely relevant also for other logic operations. 
{BTW I get still notification by ResearchGate about my papers from 40, 30, 20 years ago and from recent papers about quicksort.}
***  "for example in the preprocessors for theorem provers that I
     wrote about 4 decades ago." 
     - So then you write things? Are you in fact Dennis de Champeaux,
     as the d's and c's in your username might suggest? If so then
     it's a conflict-of-interest to cite your articles. Now per
     WP:SELFCITE it is allowed within reason (particularly note the
     "only if it is relevant" clause), but also per WP:CITESPAM an
     academic author trying to persistently add a citation to their
     work without going through the proper processes is one of the
     most common reasons for banning people.
Outrageous.  Did you read my article?  Did you see a self reference?
I recommend, based on your persona - as shown, that you join law
enforcement; you would likely thrive there.
*** "I am 82 and dismayed that I need to spend time on you." 
    - You don't have to edit Wikipedia... it is your choice to spend
    time here. Many people have left. There is a page 
    Wikipedia:Expert retention which discusses the fact that some 
    (most?) experts get fed up pretty quickly.
Bizarre ... You admit being useless/ obnoxious/ authoritarian/ ...?
Remember your purpose?  Helping other people.
I try. You two don't.  
I invited you two to IMPROVE my new section - coming soon.
Nothing but wasting our time.
How about you do some solid research instead.
Start with:
   www.ontooo.com/AIAssessment2.pdf
which I presented Feb 1 at ACDSA.
[[ Let me add: the quicksort wiki is FATALLY wrong with its quadratic
worst case complexity. A 1997 paper by David Musser gave a fix to get
O(NlogN).  The result? Java & Python use mergesort to avoid a
quadratic blow up.  Stupid.  Slow and not in-place.  Ditto with qsort
on my ubuntu box.  ChatGPT & Bard/Gemini regurgitate the O(N**2)
complexity.  The disasters get repeated ... and repeated ... and ...
There are 2 people mentioned in the qs wiki 12&11 times.  They made a
cyberspace tombstone.  Someone needs to clean them out. ]]
Go ahead ... do something useful instead.
:added sig:  user:Ddccc 20:36, 17 February 2024
:
:This is all very interesting but as it is out of scope of the article content I have replied on your talk page.
:
:I would say maybe to post it as a section on the talk page here (click "add topic" in the toolbar on the top), just because given your previous writing style it will probably get reverted if you add it unedited to the main page.
:
:There is the efficient higher-order unification paper by Vukmirović, already in the article. And an older comparison of first-order algorithms here. I wouldn't say any of them are "complete" in the sense in comparing every published algorithm. Such a comparison would be useful but I guess is too tedious for anyone to have done.
:
:I don't really see this distinction in the literature. All the algorithms for first-order unification are discussed equally. Whether they are linear or exponential is a matter of analysis, and if you analyze them empirically you will come to different conclusions on different datasets (and if you analyze them theoretically you will reach a third set of conclusions).
:
:I don't think such an observation is correct. One can implement your Java algorithms in C or C++, and while the code might be longer, it will probably also be faster than the Java version. Your discussion of an "object-oriented" approach  in the "faster" paper is really just a disguised method to use pointers instead of a hash table. In Java, the only way to use pointers is to make a class and instantiate an object of that class, but this is not the case in other languages. Mathnerd314159 (talk) 22:14, 18 February 2024 (UTC)
thread_title:  For Mr Jochen Burghardt & Mathnerd314159 ako Karen Oliver