YouTube2Text

Lecture 17-2 Unification — Transcript

by Automated Reasoning · 1,797 words · 304 segments · language en · Watch on YouTube

Full transcript

  1. 0:00now we're going to look at the
  2. 0:01definition of unification
  3. 0:03and some mathematical basis of
  4. 0:06understanding
  5. 0:07the unification process
  6. 0:10so in nutshell unification is making
  7. 0:12terms equal by substitution
  8. 0:14so substitution is the essential tool by
  9. 0:17which you do
  10. 0:18unification a substitution is called a
  11. 0:20unifier
  12. 0:21of term d and u if you apply the
  13. 0:24substitution on
  14. 0:25both the terms you get the same term as
  15. 0:28an output okay
  16. 0:30and the t and u are considered unifiable
  17. 0:33if there exists
  18. 0:34some unifier that can make them equal
  19. 0:37here's an example consider the term fx1
  20. 0:41and x4 and what we can do we can
  21. 0:45map x1 to something and x4 to something
  22. 0:47such that
  23. 0:49both the terms become equal the one
  24. 0:51solution is x1 is mapped to c
  25. 0:53and x4 is mapped to fc then both subterm
  26. 0:56will become
  27. 0:57fc and then therefore they become equal
  28. 1:01here are other examples in which you can
  29. 1:03have x4
  30. 1:05and fx1 in the same terms but you can
  31. 1:07unify differently okay so instead of
  32. 1:09saying c i can use
  33. 1:112 a variable it's up to me my choice how
  34. 1:14i want to unify things okay
  35. 1:15it somehow should work and then both
  36. 1:18things should be equal
  37. 1:22sometimes you cannot unify them at all
  38. 1:24for example here if you try to unify
  39. 1:26these two guys you cannot unify them
  40. 1:28because the top symbols is different
  41. 1:29okay
  42. 1:30so there's no way you can make them
  43. 1:32equal
  44. 1:34another example of not ability to unify
  45. 1:37is this example in which you have
  46. 1:39x1 uh you need to be mapped by sigma and
  47. 1:42fx1 is mapped
  48. 1:43now this x1 is within this term
  49. 1:46and so both term cannot be of equal size
  50. 1:50if you just
  51. 1:50just think a minute and you and x1 is
  52. 1:53replaced by another term
  53. 1:54and here x the same term will show up
  54. 1:56this that term will be the sub term of
  55. 1:58this term
  56. 1:59how can they become equal ever so there
  57. 2:01is no way to find them
  58. 2:04so this is the some basic ideas behind
  59. 2:08substitution and unification
  60. 2:11now there's one more concept which is
  61. 2:13important uh which is called
  62. 2:15more general substitution what is uh
  63. 2:18the definition if i give you two
  64. 2:20substitutions i mean it's not
  65. 2:22with respect to any specific term t and
  66. 2:24u it's just it's a property of
  67. 2:25substitutions themselves okay
  68. 2:27if sigma one is more general than sigma
  69. 2:30two if there is a substitution okay
  70. 2:31there's a third substitution involved
  71. 2:33tau
  72. 2:34such that if you compose sigma 1 with
  73. 2:36tau
  74. 2:37it gives you sigma 2 so sigma 1 becomes
  75. 2:40more general
  76. 2:41and sigma 2 become more specific
  77. 2:44substitution ok so
  78. 2:46look at these two substitutions this
  79. 2:49maps x
  80. 2:50to f y z and this one maps to
  81. 2:53x to f c d z
  82. 2:56so that means that i this is more
  83. 2:59general than this guy because what we
  84. 3:00can do we can take this guy
  85. 3:02and replace z by g of z
  86. 3:05okay and y by c and then i get the same
  87. 3:09mapping
  88. 3:10right so but from here you cannot go
  89. 3:13back
  90. 3:13okay so therefore this is a greater than
  91. 3:16equal to sign
  92. 3:19similarly in this case you have y y z
  93. 3:23is greater than equal to if you have f z
  94. 3:25that here you have made
  95. 3:26two variables equal okay so i get this
  96. 3:29mapping y
  97. 3:29to z i can get here but
  98. 3:32once two variables became equal i
  99. 3:35there's no way i can substitute them
  100. 3:37and make them different letters okay
  101. 3:40so therefore one guy is bigger than
  102. 3:44another
  103. 3:46so you can easily show that this
  104. 3:48property is uh transitive means if sigma
  105. 3:50in
  106. 3:51is one is greater than equal to sigma
  107. 3:52two and sigma two greater than equal to
  108. 3:54sigma three you can just say that sigma
  109. 3:56one greater than equal to sigma three
  110. 4:01let's continue let's continue with this
  111. 4:04idea
  112. 4:04of more general unifier so we can
  113. 4:07imagine a uniform which is bigger than
  114. 4:09everybody else
  115. 4:10is it possible yes at least we can
  116. 4:13define it
  117. 4:14so let's suppose i give you two terms t
  118. 4:16and u
  119. 4:17okay and the sigma b unifier of
  120. 4:20p and u so sigma is the most general
  121. 4:23unifier
  122. 4:24of term u and t
  123. 4:28if it is more general unified than any
  124. 4:31other unifier between these two terms
  125. 4:33okay and this is not just the property
  126. 4:36of substitutions
  127. 4:37it's a property of with respect to two
  128. 4:39given terms t and uh
  129. 4:42one example will make it very clear
  130. 4:44let's suppose we have these two terms
  131. 4:46right so here i am giving you three
  132. 4:48different uniforms you can see that
  133. 4:51x can be matched you see z you can
  134. 4:53imagine g
  135. 4:54y and z maps to
  136. 4:57same thing and y the same two same thing
  137. 5:00it doesn't nothing changes
  138. 5:01so this is one unifier and there is
  139. 5:04another unifier and
  140. 5:05all you can check out that they all work
  141. 5:07okay but you can easily check that the
  142. 5:10sigma 1
  143. 5:11is greater than equal to sigma 2 you can
  144. 5:14see this is more specific unifier
  145. 5:16because
  146. 5:16it has constants in it okay and this guy
  147. 5:19has variables
  148. 5:20variables can take any value constant
  149. 5:22gets fixed so therefore
  150. 5:25the constant cannot be substituted
  151. 5:26anymore okay so therefore
  152. 5:29it becomes more specific unifier this
  153. 5:32guy
  154. 5:32is less than sigma 1 again because it
  155. 5:35has made two variables equal
  156. 5:37okay so once you make two variables
  157. 5:39equals it you become more specific
  158. 5:41uh unifiers and then then this more
  159. 5:44general version okay so you cannot go
  160. 5:46back
  161. 5:47okay that's the idea and therefore they
  162. 5:49recall more generally
  163. 5:51an additional note to make is that these
  164. 5:53two guys are uncomparable
  165. 5:54you cannot compare these two guys okay
  166. 5:57and so
  167. 5:58sigma 1 becomes the big guy and the
  168. 6:01sigma 2 and sigma 3
  169. 6:03are smaller uniforms now the question is
  170. 6:07is there is biggest or can be the most
  171. 6:10general
  172. 6:11uh unifier or is that unique okay
  173. 6:13there's exactly one of them
  174. 6:15and uh does it always exist i mean
  175. 6:19all these question uh remain to be
  176. 6:22answered so let's dive into it
  177. 6:26so let me define something called
  178. 6:27renaming a substitution is called
  179. 6:29renaming
  180. 6:30that all the mappings are from variable
  181. 6:32to variable
  182. 6:33and there is no all one to one this is
  183. 6:35not the case the variable
  184. 6:37x and y mapped to the same variable set
  185. 6:39okay so they should
  186. 6:41always map to different variables like
  187. 6:43it's not making
  188. 6:44two variables same so now let's uh look
  189. 6:47at the theorem if
  190. 6:48i give you two substitutions sigma 1
  191. 6:50sigma 2
  192. 6:51they both are mgus okay they both are
  193. 6:54claiming to be mgus
  194. 6:56of term u and t okay
  195. 6:59then there is a renaming okay tau
  196. 7:03such that sigma 1 tau equals to sigma 2
  197. 7:07so that is the code so that makes it
  198. 7:10sigma 1
  199. 7:11less than equal to sigma 2 since it's
  200. 7:14this is 1 to 1 so actually t tau inverse
  201. 7:17is also defined then also
  202. 7:20sigma 1 also become greater than equal
  203. 7:23to b from sigma 2
  204. 7:24sigma 1 is mgu therefore there is a
  205. 7:27substitution sigma 1 hat
  206. 7:29such then if you apply on it we get
  207. 7:33sigma 2 okay similarly
  208. 7:36since sigma 2 is also mgu then we can
  209. 7:39apply sigma 2 hat
  210. 7:40on this guy and we get sigma 1
  211. 7:43again so therefore sigma 1 should be
  212. 7:46obtainable
  213. 7:47by applying these two substitution one
  214. 7:49after another
  215. 7:50okay sigma 1 hat and sigma 2
  216. 7:54we can assume that that if a variable
  217. 7:58is not mapped by let's say
  218. 8:01x sigma 1 sigma it's not in the range of
  219. 8:05sigma 1
  220. 8:06then those variables will not show up
  221. 8:09here
  222. 8:09right for those variables y sigma 1 hat
  223. 8:13is equal to
  224. 8:14y okay it's good to check that why i'm
  225. 8:16saying so
  226. 8:17and where this is relevant okay i will
  227. 8:20leave it for
  228. 8:21exercise
  229. 8:24okay so uh now let's see the
  230. 8:28the claim here is uh if you take any
  231. 8:31variable
  232. 8:32and y sigma one hat then it gives you
  233. 8:36back a variable okay so let's see how
  234. 8:39that
  235. 8:39is true okay so consider x
  236. 8:44such that uh y is in the
  237. 8:47f of v sigma uh x sigma okay you take x
  238. 8:51apply the sigma one
  239. 8:53and then you get some variable appearing
  240. 8:55in y okay
  241. 8:56the question is what is happening with
  242. 8:58the sigma 1 hat
  243. 8:59and sigma 2 hat okay what these guys are
  244. 9:01doing right you want to
  245. 9:03get back to sigma 1 right ok
  246. 9:06so there are three possibilities okay
  247. 9:08what they are doing with this variable y
  248. 9:10sigma 1 hat does okay sigma 1 had done
  249. 9:13into a function
  250. 9:14x 1 sigma 1 hat becomes a
  251. 9:17longer term and
  252. 9:21so what happens is that when you apply
  253. 9:23sigma two hand you cannot get back to
  254. 9:25uh the same length because when you do
  255. 9:27substitution you always get
  256. 9:28longer or remains the same so the the
  257. 9:32this is not going to work out so it has
  258. 9:34to map to some constant or
  259. 9:36a variable okay so let's suppose it maps
  260. 9:39to a constant
  261. 9:40if it maps to a constant the sigma 2 hat
  262. 9:43will not be able to rename c back to y
  263. 9:46yes that's the problem okay so it cannot
  264. 9:48really uh
  265. 9:51it will it will have a problem that uh
  266. 9:55that you went from y to c and then
  267. 9:58you could not come back from c to y so
  268. 10:00that that creates a lot of trouble for
  269. 10:02you
  270. 10:02so therefore you only possibility left
  271. 10:05is that
  272. 10:06sigma one hat is taking you to some
  273. 10:08variable
  274. 10:09okay so sigma of y sigma one hat
  275. 10:13is just wherever mapping from variable
  276. 10:15to variables
  277. 10:18now what is left to show is the sigma uh
  278. 10:20one hat is the renaming ie
  279. 10:23it maps variable to variables which are
  280. 10:24we have already shown
  281. 10:26so how do i say one to one okay so
  282. 10:30that's the statement if i take two
  283. 10:31variables and we map them they will give
  284. 10:34you the different output okay
  285. 10:35so let's suppose they don't they they
  286. 10:38they take you to the same place okay
  287. 10:40so sigma 2 hat will not be able to
  288. 10:42rename the variables back to the
  289. 10:43distinct value you have
  290. 10:44two different names y one and y two they
  291. 10:47were mapped
  292. 10:48to the same variable now you want to
  293. 10:50bring them split them again because
  294. 10:52sigma two hat should bring sigma one
  295. 10:54back
  296. 10:55which is not possible now okay so
  297. 10:58therefore you have a contradiction
  298. 11:00and they must be distinct so sigma 1 hat
  299. 11:03is a renaming
  300. 11:04the similar argument sigma 2 hat is a
  301. 11:06renaming and therefore you can see that
  302. 11:08sigma 1 hat
  303. 11:10and sigma 2 hat both are renamings and
  304. 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.