YouTube2Text

Lecture 18-2 Resolution proof system for first-order logic — Transcript

by Automated Reasoning · 2,082 words · 337 segments · language en · Watch on YouTube

Full transcript

  1. 0:00now we are going to look at resolution
  2. 0:02through improving
  3. 0:03under the context of first order we have
  4. 0:06seen some issues when
  5. 0:07adopting resolution for the first order
  6. 0:09logic for example how to do unification
  7. 0:12how variables are managed across
  8. 0:14different clauses
  9. 0:15once we have the understanding now how
  10. 0:17we can do it and how it what kind of
  11. 0:19proof rules we need
  12. 0:22so we have a set of clauses as input
  13. 0:24right so you have
  14. 0:25a formula f which is essentially a set
  15. 0:27of clauses
  16. 0:29so if you have a clause uh from in
  17. 0:32formula f you can
  18. 0:33essentially introduce in your proof you
  19. 0:35can say an assumption
  20. 0:36remember that in our proof system
  21. 0:38there's always was context right so
  22. 0:40this is in this case it would be f pro
  23. 0:43c however we don't write f to c because
  24. 0:47in in the case of resolution we remember
  25. 0:49that the context never changes the set
  26. 0:51of clauses remains the same across the
  27. 0:53proof so we
  28. 0:54really don't need to write again and
  29. 0:55again
  30. 0:57okay so uh how do we adopt resolution
  31. 1:00let's suppose you have a two clauses
  32. 1:02like this
  33. 1:02one this and one that and you have a b
  34. 1:06and not a so if a and b somehow we can
  35. 1:10unify
  36. 1:10then we can conclude c or d under the
  37. 1:12context of unification
  38. 1:14so remember that how we were unifying
  39. 1:17earlier if i give you a
  40. 1:18and b and apply mgu from the
  41. 1:21unification lecture then you can find
  42. 1:23that you can have some unifi
  43. 1:26sigma which is most general unifier you
  44. 1:29take c
  45. 1:30or d and then you apply the same unifier
  46. 1:33there
  47. 1:34and then you get some clause and that
  48. 1:36will be the conclusion
  49. 1:39okay so this is called resolution let us
  50. 1:42look at an example
  51. 1:43let's suppose you want to prove this
  52. 1:45formula to be always true
  53. 1:47then what do you do you translate
  54. 1:50first this formula into f1lcnf and you
  55. 1:53obtain
  56. 1:54this clause in this clause and notice
  57. 1:57that in both the clauses we have w
  58. 1:59appearing
  59. 2:00and both the w's are different and
  60. 2:04but they are using written using same
  61. 2:06symbol so
  62. 2:07we need to whenever our operating we
  63. 2:09need to be able to handle that
  64. 2:11so in in my context i'm simply using
  65. 2:13different colors so somehow they're
  66. 2:15saying color also part of the name
  67. 2:16okay so uh so how do i resolve i
  68. 2:21have this clause and this clause and
  69. 2:23then i have to unify these two so i can
  70. 2:25take red w and map it to fw and y
  71. 2:28maps to c and gives the unifier and then
  72. 2:31you
  73. 2:32derive false and therefore this formula
  74. 2:35is unset therefore original
  75. 2:38goal was valid okay
  76. 2:42so uh so that's how resolution proofs
  77. 2:45work okay so
  78. 2:47now let us look at another example okay
  79. 2:49you have two clauses like this
  80. 2:50f x y or q i and not the x
  81. 2:54x or r of f
  82. 2:57x okay so uh x within a clause should be
  83. 3:00treated as same variable so this
  84. 3:02x this x is
  85. 3:06same as this x okay but this x is
  86. 3:08different
  87. 3:09from those x's okay so uh
  88. 3:13if we unify p x y and not p y
  89. 3:16x x we obtain x red x
  90. 3:19maps to x and y maps to
  91. 3:23blue x so we obtain
  92. 3:26this uh clause finally q of x
  93. 3:29r of f x so you get this this output
  94. 3:35okay so now a natural question comes why
  95. 3:38are we using mgus why not
  96. 3:40any unifier okay so uh keeps maximum
  97. 3:44amount of generality in the consequence
  98. 3:46okay so this is the reason
  99. 3:48actually we can use any unifier however
  100. 3:51mgu's ensure that we
  101. 3:52don't lose generality very quickly and
  102. 3:56our ability to prove things in future
  103. 3:58becomes too restrictive and
  104. 4:00keeps our options open okay so so let's
  105. 4:03see
  106. 4:03and let's look at an example okay so you
  107. 4:06had we saw this
  108. 4:07uh clause and this is another clause and
  109. 4:11what
  110. 4:11we could have done x maps to d and this
  111. 4:14red x also maps to d and y maps really
  112. 4:16if you do that
  113. 4:17this guy will becomes p d d
  114. 4:20and the d d and then it will say oh you
  115. 4:23can now resolve
  116. 4:25and then you get the conclusion qd or
  117. 4:28rft please check yourself also
  118. 4:31if you do this now it has become very
  119. 4:35specific clause it has no more variables
  120. 4:37and if you want to unify something with
  121. 4:41something else let's say q of c it
  122. 4:43cannot be this part cannot be unified
  123. 4:46there's no advantage of doing this see
  124. 4:49if we had used
  125. 4:51mgu which we have seen last time we
  126. 4:53obtained this and we can always get to
  127. 4:55this more specific clause by applying
  128. 4:58another
  129. 4:59uh substitution just because
  130. 5:02mgu's gives you something which can
  131. 5:04always be go you can go down to the
  132. 5:06less general unifier so therefore you
  133. 5:10can always derive the thing you may want
  134. 5:13to
  135. 5:14derive more specific things you want to
  136. 5:16derive so you can always go from more
  137. 5:18general to more specific
  138. 5:20but once you get to specific there's no
  139. 5:22way going back
  140. 5:24therefore it's always good to maintain
  141. 5:26mgs are we done with resolutions
  142. 5:28i mean having handled all possibilities
  143. 5:30in resolution
  144. 5:32not there isn't a pesky issue of a
  145. 5:35within a clause the similar literal
  146. 5:38showing up but they are not actually
  147. 5:39being equal
  148. 5:40in the in the case of propositional
  149. 5:42logic if a literal
  150. 5:44let's say not x three repeats then you
  151. 5:47very easily see they are repeating and
  152. 5:48then you say okay don't don't don't
  153. 5:50repeat
  154. 5:50it just just write 1x3 this issue
  155. 5:53becomes worse in the case of first order
  156. 5:56logic things are very similar and
  157. 5:58they're there
  158. 5:59they don't look exactly the same
  159. 6:02so what can happen is you can have a
  160. 6:04several literals appearing in your class
  161. 6:06let's say l1 to lk
  162. 6:08and some way there is a way to unify l1
  163. 6:11to lk there is a
  164. 6:12unifier which should make them equal
  165. 6:15okay if that is possible
  166. 6:17what you can do is essentially keep one
  167. 6:19copy of them
  168. 6:20and apply sigma and reduce the size of
  169. 6:22the clause
  170. 6:23and this can very well happen so this
  171. 6:25rule is called
  172. 6:26factor rule okay you may be wondering
  173. 6:28why this is important okay so
  174. 6:30uh let me give you an example let's
  175. 6:33suppose you have this clause
  176. 6:35p x or p y okay so this is for all
  177. 6:38x y either p x or p y
  178. 6:41you can easily see that actually implies
  179. 6:43that the p is true on all x's or all
  180. 6:45wise okay so
  181. 6:46it's not very an economical way of of
  182. 6:49saying
  183. 6:50uh p is true on all axes okay but uh
  184. 6:54the clause as it says it is as it is
  185. 6:56it's written in a very inefficient way
  186. 6:58so okay how can i get rid of
  187. 7:00an extra p you can see that a resolution
  188. 7:03will not resolve this problem okay so
  189. 7:05this
  190. 7:05you can't get rid of this resolution
  191. 7:07itself you need another rule so
  192. 7:10essentially what you need the factor
  193. 7:11rule which which basically says x and y
  194. 7:14i will map them together and then you
  195. 7:17unify them
  196. 7:18and then then apply this unifier and
  197. 7:20then derive
  198. 7:21b x and you can easily see this is also
  199. 7:24a correct rule in terms of
  200. 7:26our original proof rules of the proof
  201. 7:30system
  202. 7:30please go and check that this proof will
  203. 7:33rule is also a valid proof
  204. 7:37okay so so is factor rule necessary are
  205. 7:40there situations
  206. 7:42without factor rules cannot you cannot
  207. 7:44do anything here's an example let's
  208. 7:45suppose you have
  209. 7:46uh uh this clause which we have just
  210. 7:50seen
  211. 7:50and they have a similar clause which is
  212. 7:52not p x or not p y
  213. 7:54okay so you can see from you from here
  214. 7:57you can derive
  215. 7:58p is always true on axis and
  216. 8:01here you can derive p is not true on all
  217. 8:03axis therefore you can
  218. 8:04say that there's a contradiction but how
  219. 8:06i
  220. 8:07progress with with only resolution okay
  221. 8:10so
  222. 8:11if you just apply resolution you will
  223. 8:12get px or not
  224. 8:14py okay you can just test it that this
  225. 8:17really happens
  226. 8:19okay and after this you know matter no
  227. 8:21matter which way in any which way you
  228. 8:23apply resolution it will not going to
  229. 8:25work
  230. 8:25just please go and try and try apply
  231. 8:27resolution in all three possible clauses
  232. 8:29in all possible ways
  233. 8:31uh you won't make any progress you'll
  234. 8:33get the same things again and again
  235. 8:35you need essentially a factor rule okay
  236. 8:38so then
  237. 8:39uh you get px and then similar thing you
  238. 8:42do on the clause two you get
  239. 8:43not px and then now you get false okay
  240. 8:47so uh so factor was essential without
  241. 8:50that you will not achieve completeness
  242. 8:52so we have seen three uh proof rules so
  243. 8:55far uh
  244. 8:56one is introduces the clause in a system
  245. 8:59uh two of them for a solution and now
  246. 9:02let's think about equality how do we go
  247. 9:04about
  248. 9:05using quality in our our proof system
  249. 9:08so let's suppose there's a there's a
  250. 9:11equality in your clause
  251. 9:12s is equal to 2 t and there is some
  252. 9:16rest of the clause c and there is
  253. 9:19somewhere you have derived d
  254. 9:21okay clause d which has some term
  255. 9:24appearing u
  256. 9:25okay and for some reason you know that
  257. 9:29you can unify s and u and obtain sigma
  258. 9:32okay and then how do you choose u in the
  259. 9:35clause d it's a different question let's
  260. 9:37suppose
  261. 9:37you have some hunch this u is useful
  262. 9:39okay so you try to unify them also
  263. 9:41yeah it can be unified so what you can
  264. 9:43conclude is that
  265. 9:45c or d okay you drop this equality
  266. 9:48altogether
  267. 9:49and and apply this is substitution so
  268. 9:52basically you replace
  269. 9:54u by t and then you apply this unifier
  270. 9:58which makes them equal so therefore
  271. 10:00it's it's it's an okay thing to do and
  272. 10:02then you can just drop x equals to t
  273. 10:04okay and this is this is is valid
  274. 10:07conclusion
  275. 10:08and this is called para modulation okay
  276. 10:11so we have them
  277. 10:12and how do we use them for example you
  278. 10:15have
  279. 10:16this kind of clause and you have this
  280. 10:20another clause and this is this is fy
  281. 10:22appearing in q
  282. 10:23okay so you here you have this is called
  283. 10:26c
  284. 10:26this is d and what i'm going to do is f
  285. 10:30of x
  286. 10:30going to unify with this guy and get it
  287. 10:32replaced by t
  288. 10:34okay so i i get this this unifier
  289. 10:38between uh fx and fy
  290. 10:41i get x maps device fairly trivial
  291. 10:43unification
  292. 10:45and therefore now i can do is that i
  293. 10:48replace this f x by d
  294. 10:51okay so then i get this guy
  295. 10:54get replaced by d and the same
  296. 10:58unification has to be applied here so
  297. 11:00then x get replaced by
  298. 11:02y so we had equality and then we learned
  299. 11:05how to use equality now let's see we
  300. 11:07have a disequality
  301. 11:09that's the last part and then how do we
  302. 11:11eliminate this equality for example
  303. 11:14when you're reaching final contradiction
  304. 11:16and there are some things are equal now
  305. 11:18you say the same things are disequal and
  306. 11:20then you derive contradiction right
  307. 11:21so somehow when you have a disequality
  308. 11:24you should be able to eliminate this
  309. 11:25equality from your clause and remove it
  310. 11:27okay
  311. 11:28so let's suppose you have a clause like
  312. 11:29this equality or some other thing
  313. 11:32then i can do is that i can find if they
  314. 11:35can unify them d
  315. 11:36and u okay under that unification i can
  316. 11:39remove this disequality because once you
  317. 11:41unify them they become equal and this
  318. 11:44because of the reflex rule
  319. 11:46uh proof rule you can say that this is
  320. 11:48not true
  321. 11:49so you can just get rid of this literal
  322. 11:51and you'll be left with
  323. 11:53c sigma fairly obvious and this is
  324. 11:56called reflexivity
  325. 11:59and the following derivation remove the
  326. 12:01literal from the clause okay so for
  327. 12:02example you have
  328. 12:03x not equal to fy you can simply unify
  329. 12:06f x and x and you say x
  330. 12:09maps to f y and just you say p of f
  331. 12:12that's what you derive out of this uh
  332. 12:18application of reflectivity rule so we
  333. 12:20have seen five rules
  334. 12:22and there's no other rule to learn and
  335. 12:24using these five rules i can
  336. 12:26derive anything on the first order logic
  337. 12:28i want to derive

About this transcript

This page contains the full transcript of Lecture 18-2 Resolution proof system for first-order logic by Automated Reasoning, generated from the public captions YouTube serves with the video. The transcript has 2,082 words across 337 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.