Lecture 17-2 Unification — Transcript
Full transcript
- 0:00now we're going to look at the
- 0:01definition of unification
- 0:03and some mathematical basis of
- 0:06understanding
- 0:07the unification process
- 0:10so in nutshell unification is making
- 0:12terms equal by substitution
- 0:14so substitution is the essential tool by
- 0:17which you do
- 0:18unification a substitution is called a
- 0:20unifier
- 0:21of term d and u if you apply the
- 0:24substitution on
- 0:25both the terms you get the same term as
- 0:28an output okay
- 0:30and the t and u are considered unifiable
- 0:33if there exists
- 0:34some unifier that can make them equal
- 0:37here's an example consider the term fx1
- 0:41and x4 and what we can do we can
- 0:45map x1 to something and x4 to something
- 0:47such that
- 0:49both the terms become equal the one
- 0:51solution is x1 is mapped to c
- 0:53and x4 is mapped to fc then both subterm
- 0:56will become
- 0:57fc and then therefore they become equal
- 1:01here are other examples in which you can
- 1:03have x4
- 1:05and fx1 in the same terms but you can
- 1:07unify differently okay so instead of
- 1:09saying c i can use
- 1:112 a variable it's up to me my choice how
- 1:14i want to unify things okay
- 1:15it somehow should work and then both
- 1:18things should be equal
- 1:22sometimes you cannot unify them at all
- 1:24for example here if you try to unify
- 1:26these two guys you cannot unify them
- 1:28because the top symbols is different
- 1:29okay
- 1:30so there's no way you can make them
- 1:32equal
- 1:34another example of not ability to unify
- 1:37is this example in which you have
- 1:39x1 uh you need to be mapped by sigma and
- 1:42fx1 is mapped
- 1:43now this x1 is within this term
- 1:46and so both term cannot be of equal size
- 1:50if you just
- 1:50just think a minute and you and x1 is
- 1:53replaced by another term
- 1:54and here x the same term will show up
- 1:56this that term will be the sub term of
- 1:58this term
- 1:59how can they become equal ever so there
- 2:01is no way to find them
- 2:04so this is the some basic ideas behind
- 2:08substitution and unification
- 2:11now there's one more concept which is
- 2:13important uh which is called
- 2:15more general substitution what is uh
- 2:18the definition if i give you two
- 2:20substitutions i mean it's not
- 2:22with respect to any specific term t and
- 2:24u it's just it's a property of
- 2:25substitutions themselves okay
- 2:27if sigma one is more general than sigma
- 2:30two if there is a substitution okay
- 2:31there's a third substitution involved
- 2:33tau
- 2:34such that if you compose sigma 1 with
- 2:36tau
- 2:37it gives you sigma 2 so sigma 1 becomes
- 2:40more general
- 2:41and sigma 2 become more specific
- 2:44substitution ok so
- 2:46look at these two substitutions this
- 2:49maps x
- 2:50to f y z and this one maps to
- 2:53x to f c d z
- 2:56so that means that i this is more
- 2:59general than this guy because what we
- 3:00can do we can take this guy
- 3:02and replace z by g of z
- 3:05okay and y by c and then i get the same
- 3:09mapping
- 3:10right so but from here you cannot go
- 3:13back
- 3:13okay so therefore this is a greater than
- 3:16equal to sign
- 3:19similarly in this case you have y y z
- 3:23is greater than equal to if you have f z
- 3:25that here you have made
- 3:26two variables equal okay so i get this
- 3:29mapping y
- 3:29to z i can get here but
- 3:32once two variables became equal i
- 3:35there's no way i can substitute them
- 3:37and make them different letters okay
- 3:40so therefore one guy is bigger than
- 3:44another
- 3:46so you can easily show that this
- 3:48property is uh transitive means if sigma
- 3:50in
- 3:51is one is greater than equal to sigma
- 3:52two and sigma two greater than equal to
- 3:54sigma three you can just say that sigma
- 3:56one greater than equal to sigma three
- 4:01let's continue let's continue with this
- 4:04idea
- 4:04of more general unifier so we can
- 4:07imagine a uniform which is bigger than
- 4:09everybody else
- 4:10is it possible yes at least we can
- 4:13define it
- 4:14so let's suppose i give you two terms t
- 4:16and u
- 4:17okay and the sigma b unifier of
- 4:20p and u so sigma is the most general
- 4:23unifier
- 4:24of term u and t
- 4:28if it is more general unified than any
- 4:31other unifier between these two terms
- 4:33okay and this is not just the property
- 4:36of substitutions
- 4:37it's a property of with respect to two
- 4:39given terms t and uh
- 4:42one example will make it very clear
- 4:44let's suppose we have these two terms
- 4:46right so here i am giving you three
- 4:48different uniforms you can see that
- 4:51x can be matched you see z you can
- 4:53imagine g
- 4:54y and z maps to
- 4:57same thing and y the same two same thing
- 5:00it doesn't nothing changes
- 5:01so this is one unifier and there is
- 5:04another unifier and
- 5:05all you can check out that they all work
- 5:07okay but you can easily check that the
- 5:10sigma 1
- 5:11is greater than equal to sigma 2 you can
- 5:14see this is more specific unifier
- 5:16because
- 5:16it has constants in it okay and this guy
- 5:19has variables
- 5:20variables can take any value constant
- 5:22gets fixed so therefore
- 5:25the constant cannot be substituted
- 5:26anymore okay so therefore
- 5:29it becomes more specific unifier this
- 5:32guy
- 5:32is less than sigma 1 again because it
- 5:35has made two variables equal
- 5:37okay so once you make two variables
- 5:39equals it you become more specific
- 5:41uh unifiers and then then this more
- 5:44general version okay so you cannot go
- 5:46back
- 5:47okay that's the idea and therefore they
- 5:49recall more generally
- 5:51an additional note to make is that these
- 5:53two guys are uncomparable
- 5:54you cannot compare these two guys okay
- 5:57and so
- 5:58sigma 1 becomes the big guy and the
- 6:01sigma 2 and sigma 3
- 6:03are smaller uniforms now the question is
- 6:07is there is biggest or can be the most
- 6:10general
- 6:11uh unifier or is that unique okay
- 6:13there's exactly one of them
- 6:15and uh does it always exist i mean
- 6:19all these question uh remain to be
- 6:22answered so let's dive into it
- 6:26so let me define something called
- 6:27renaming a substitution is called
- 6:29renaming
- 6:30that all the mappings are from variable
- 6:32to variable
- 6:33and there is no all one to one this is
- 6:35not the case the variable
- 6:37x and y mapped to the same variable set
- 6:39okay so they should
- 6:41always map to different variables like
- 6:43it's not making
- 6:44two variables same so now let's uh look
- 6:47at the theorem if
- 6:48i give you two substitutions sigma 1
- 6:50sigma 2
- 6:51they both are mgus okay they both are
- 6:54claiming to be mgus
- 6:56of term u and t okay
- 6:59then there is a renaming okay tau
- 7:03such that sigma 1 tau equals to sigma 2
- 7:07so that is the code so that makes it
- 7:10sigma 1
- 7:11less than equal to sigma 2 since it's
- 7:14this is 1 to 1 so actually t tau inverse
- 7:17is also defined then also
- 7:20sigma 1 also become greater than equal
- 7:23to b from sigma 2
- 7:24sigma 1 is mgu therefore there is a
- 7:27substitution sigma 1 hat
- 7:29such then if you apply on it we get
- 7:33sigma 2 okay similarly
- 7:36since sigma 2 is also mgu then we can
- 7:39apply sigma 2 hat
- 7:40on this guy and we get sigma 1
- 7:43again so therefore sigma 1 should be
- 7:46obtainable
- 7:47by applying these two substitution one
- 7:49after another
- 7:50okay sigma 1 hat and sigma 2
- 7:54we can assume that that if a variable
- 7:58is not mapped by let's say
- 8:01x sigma 1 sigma it's not in the range of
- 8:05sigma 1
- 8:06then those variables will not show up
- 8:09here
- 8:09right for those variables y sigma 1 hat
- 8:13is equal to
- 8:14y okay it's good to check that why i'm
- 8:16saying so
- 8:17and where this is relevant okay i will
- 8:20leave it for
- 8:21exercise
- 8:24okay so uh now let's see the
- 8:28the claim here is uh if you take any
- 8:31variable
- 8:32and y sigma one hat then it gives you
- 8:36back a variable okay so let's see how
- 8:39that
- 8:39is true okay so consider x
- 8:44such that uh y is in the
- 8:47f of v sigma uh x sigma okay you take x
- 8:51apply the sigma one
- 8:53and then you get some variable appearing
- 8:55in y okay
- 8:56the question is what is happening with
- 8:58the sigma 1 hat
- 8:59and sigma 2 hat okay what these guys are
- 9:01doing right you want to
- 9:03get back to sigma 1 right ok
- 9:06so there are three possibilities okay
- 9:08what they are doing with this variable y
- 9:10sigma 1 hat does okay sigma 1 had done
- 9:13into a function
- 9:14x 1 sigma 1 hat becomes a
- 9:17longer term and
- 9:21so what happens is that when you apply
- 9:23sigma two hand you cannot get back to
- 9:25uh the same length because when you do
- 9:27substitution you always get
- 9:28longer or remains the same so the the
- 9:32this is not going to work out so it has
- 9:34to map to some constant or
- 9:36a variable okay so let's suppose it maps
- 9:39to a constant
- 9:40if it maps to a constant the sigma 2 hat
- 9:43will not be able to rename c back to y
- 9:46yes that's the problem okay so it cannot
- 9:48really uh
- 9:51it will it will have a problem that uh
- 9:55that you went from y to c and then
- 9:58you could not come back from c to y so
- 10:00that that creates a lot of trouble for
- 10:02you
- 10:02so therefore you only possibility left
- 10:05is that
- 10:06sigma one hat is taking you to some
- 10:08variable
- 10:09okay so sigma of y sigma one hat
- 10:13is just wherever mapping from variable
- 10:15to variables
- 10:18now what is left to show is the sigma uh
- 10:20one hat is the renaming ie
- 10:23it maps variable to variables which are
- 10:24we have already shown
- 10:26so how do i say one to one okay so
- 10:30that's the statement if i take two
- 10:31variables and we map them they will give
- 10:34you the different output okay
- 10:35so let's suppose they don't they they
- 10:38they take you to the same place okay
- 10:40so sigma 2 hat will not be able to
- 10:42rename the variables back to the
- 10:43distinct value you have
- 10:44two different names y one and y two they
- 10:47were mapped
- 10:48to the same variable now you want to
- 10:50bring them split them again because
- 10:52sigma two hat should bring sigma one
- 10:54back
- 10:55which is not possible now okay so
- 10:58therefore you have a contradiction
- 11:00and they must be distinct so sigma 1 hat
- 11:03is a renaming
- 11:04the similar argument sigma 2 hat is a
- 11:06renaming and therefore you can see that
- 11:08sigma 1 hat
- 11:10and sigma 2 hat both are renamings and
- 11:12therefore your theorem wants to
About this transcript
This page contains the full transcript of Lecture 17-2 Unification by Automated Reasoning, generated from the public captions YouTube serves with the video. The transcript has 1,797 words across 304 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.