Lecture 18-2 Resolution proof system for first-order logic — Transcript
Full transcript
- 0:00now we are going to look at resolution
- 0:02through improving
- 0:03under the context of first order we have
- 0:06seen some issues when
- 0:07adopting resolution for the first order
- 0:09logic for example how to do unification
- 0:12how variables are managed across
- 0:14different clauses
- 0:15once we have the understanding now how
- 0:17we can do it and how it what kind of
- 0:19proof rules we need
- 0:22so we have a set of clauses as input
- 0:24right so you have
- 0:25a formula f which is essentially a set
- 0:27of clauses
- 0:29so if you have a clause uh from in
- 0:32formula f you can
- 0:33essentially introduce in your proof you
- 0:35can say an assumption
- 0:36remember that in our proof system
- 0:38there's always was context right so
- 0:40this is in this case it would be f pro
- 0:43c however we don't write f to c because
- 0:47in in the case of resolution we remember
- 0:49that the context never changes the set
- 0:51of clauses remains the same across the
- 0:53proof so we
- 0:54really don't need to write again and
- 0:55again
- 0:57okay so uh how do we adopt resolution
- 1:00let's suppose you have a two clauses
- 1:02like this
- 1:02one this and one that and you have a b
- 1:06and not a so if a and b somehow we can
- 1:10unify
- 1:10then we can conclude c or d under the
- 1:12context of unification
- 1:14so remember that how we were unifying
- 1:17earlier if i give you a
- 1:18and b and apply mgu from the
- 1:21unification lecture then you can find
- 1:23that you can have some unifi
- 1:26sigma which is most general unifier you
- 1:29take c
- 1:30or d and then you apply the same unifier
- 1:33there
- 1:34and then you get some clause and that
- 1:36will be the conclusion
- 1:39okay so this is called resolution let us
- 1:42look at an example
- 1:43let's suppose you want to prove this
- 1:45formula to be always true
- 1:47then what do you do you translate
- 1:50first this formula into f1lcnf and you
- 1:53obtain
- 1:54this clause in this clause and notice
- 1:57that in both the clauses we have w
- 1:59appearing
- 2:00and both the w's are different and
- 2:04but they are using written using same
- 2:06symbol so
- 2:07we need to whenever our operating we
- 2:09need to be able to handle that
- 2:11so in in my context i'm simply using
- 2:13different colors so somehow they're
- 2:15saying color also part of the name
- 2:16okay so uh so how do i resolve i
- 2:21have this clause and this clause and
- 2:23then i have to unify these two so i can
- 2:25take red w and map it to fw and y
- 2:28maps to c and gives the unifier and then
- 2:31you
- 2:32derive false and therefore this formula
- 2:35is unset therefore original
- 2:38goal was valid okay
- 2:42so uh so that's how resolution proofs
- 2:45work okay so
- 2:47now let us look at another example okay
- 2:49you have two clauses like this
- 2:50f x y or q i and not the x
- 2:54x or r of f
- 2:57x okay so uh x within a clause should be
- 3:00treated as same variable so this
- 3:02x this x is
- 3:06same as this x okay but this x is
- 3:08different
- 3:09from those x's okay so uh
- 3:13if we unify p x y and not p y
- 3:16x x we obtain x red x
- 3:19maps to x and y maps to
- 3:23blue x so we obtain
- 3:26this uh clause finally q of x
- 3:29r of f x so you get this this output
- 3:35okay so now a natural question comes why
- 3:38are we using mgus why not
- 3:40any unifier okay so uh keeps maximum
- 3:44amount of generality in the consequence
- 3:46okay so this is the reason
- 3:48actually we can use any unifier however
- 3:51mgu's ensure that we
- 3:52don't lose generality very quickly and
- 3:56our ability to prove things in future
- 3:58becomes too restrictive and
- 4:00keeps our options open okay so so let's
- 4:03see
- 4:03and let's look at an example okay so you
- 4:06had we saw this
- 4:07uh clause and this is another clause and
- 4:11what
- 4:11we could have done x maps to d and this
- 4:14red x also maps to d and y maps really
- 4:16if you do that
- 4:17this guy will becomes p d d
- 4:20and the d d and then it will say oh you
- 4:23can now resolve
- 4:25and then you get the conclusion qd or
- 4:28rft please check yourself also
- 4:31if you do this now it has become very
- 4:35specific clause it has no more variables
- 4:37and if you want to unify something with
- 4:41something else let's say q of c it
- 4:43cannot be this part cannot be unified
- 4:46there's no advantage of doing this see
- 4:49if we had used
- 4:51mgu which we have seen last time we
- 4:53obtained this and we can always get to
- 4:55this more specific clause by applying
- 4:58another
- 4:59uh substitution just because
- 5:02mgu's gives you something which can
- 5:04always be go you can go down to the
- 5:06less general unifier so therefore you
- 5:10can always derive the thing you may want
- 5:13to
- 5:14derive more specific things you want to
- 5:16derive so you can always go from more
- 5:18general to more specific
- 5:20but once you get to specific there's no
- 5:22way going back
- 5:24therefore it's always good to maintain
- 5:26mgs are we done with resolutions
- 5:28i mean having handled all possibilities
- 5:30in resolution
- 5:32not there isn't a pesky issue of a
- 5:35within a clause the similar literal
- 5:38showing up but they are not actually
- 5:39being equal
- 5:40in the in the case of propositional
- 5:42logic if a literal
- 5:44let's say not x three repeats then you
- 5:47very easily see they are repeating and
- 5:48then you say okay don't don't don't
- 5:50repeat
- 5:50it just just write 1x3 this issue
- 5:53becomes worse in the case of first order
- 5:56logic things are very similar and
- 5:58they're there
- 5:59they don't look exactly the same
- 6:02so what can happen is you can have a
- 6:04several literals appearing in your class
- 6:06let's say l1 to lk
- 6:08and some way there is a way to unify l1
- 6:11to lk there is a
- 6:12unifier which should make them equal
- 6:15okay if that is possible
- 6:17what you can do is essentially keep one
- 6:19copy of them
- 6:20and apply sigma and reduce the size of
- 6:22the clause
- 6:23and this can very well happen so this
- 6:25rule is called
- 6:26factor rule okay you may be wondering
- 6:28why this is important okay so
- 6:30uh let me give you an example let's
- 6:33suppose you have this clause
- 6:35p x or p y okay so this is for all
- 6:38x y either p x or p y
- 6:41you can easily see that actually implies
- 6:43that the p is true on all x's or all
- 6:45wise okay so
- 6:46it's not very an economical way of of
- 6:49saying
- 6:50uh p is true on all axes okay but uh
- 6:54the clause as it says it is as it is
- 6:56it's written in a very inefficient way
- 6:58so okay how can i get rid of
- 7:00an extra p you can see that a resolution
- 7:03will not resolve this problem okay so
- 7:05this
- 7:05you can't get rid of this resolution
- 7:07itself you need another rule so
- 7:10essentially what you need the factor
- 7:11rule which which basically says x and y
- 7:14i will map them together and then you
- 7:17unify them
- 7:18and then then apply this unifier and
- 7:20then derive
- 7:21b x and you can easily see this is also
- 7:24a correct rule in terms of
- 7:26our original proof rules of the proof
- 7:30system
- 7:30please go and check that this proof will
- 7:33rule is also a valid proof
- 7:37okay so so is factor rule necessary are
- 7:40there situations
- 7:42without factor rules cannot you cannot
- 7:44do anything here's an example let's
- 7:45suppose you have
- 7:46uh uh this clause which we have just
- 7:50seen
- 7:50and they have a similar clause which is
- 7:52not p x or not p y
- 7:54okay so you can see from you from here
- 7:57you can derive
- 7:58p is always true on axis and
- 8:01here you can derive p is not true on all
- 8:03axis therefore you can
- 8:04say that there's a contradiction but how
- 8:06i
- 8:07progress with with only resolution okay
- 8:10so
- 8:11if you just apply resolution you will
- 8:12get px or not
- 8:14py okay you can just test it that this
- 8:17really happens
- 8:19okay and after this you know matter no
- 8:21matter which way in any which way you
- 8:23apply resolution it will not going to
- 8:25work
- 8:25just please go and try and try apply
- 8:27resolution in all three possible clauses
- 8:29in all possible ways
- 8:31uh you won't make any progress you'll
- 8:33get the same things again and again
- 8:35you need essentially a factor rule okay
- 8:38so then
- 8:39uh you get px and then similar thing you
- 8:42do on the clause two you get
- 8:43not px and then now you get false okay
- 8:47so uh so factor was essential without
- 8:50that you will not achieve completeness
- 8:52so we have seen three uh proof rules so
- 8:55far uh
- 8:56one is introduces the clause in a system
- 8:59uh two of them for a solution and now
- 9:02let's think about equality how do we go
- 9:04about
- 9:05using quality in our our proof system
- 9:08so let's suppose there's a there's a
- 9:11equality in your clause
- 9:12s is equal to 2 t and there is some
- 9:16rest of the clause c and there is
- 9:19somewhere you have derived d
- 9:21okay clause d which has some term
- 9:24appearing u
- 9:25okay and for some reason you know that
- 9:29you can unify s and u and obtain sigma
- 9:32okay and then how do you choose u in the
- 9:35clause d it's a different question let's
- 9:37suppose
- 9:37you have some hunch this u is useful
- 9:39okay so you try to unify them also
- 9:41yeah it can be unified so what you can
- 9:43conclude is that
- 9:45c or d okay you drop this equality
- 9:48altogether
- 9:49and and apply this is substitution so
- 9:52basically you replace
- 9:54u by t and then you apply this unifier
- 9:58which makes them equal so therefore
- 10:00it's it's it's an okay thing to do and
- 10:02then you can just drop x equals to t
- 10:04okay and this is this is is valid
- 10:07conclusion
- 10:08and this is called para modulation okay
- 10:11so we have them
- 10:12and how do we use them for example you
- 10:15have
- 10:16this kind of clause and you have this
- 10:20another clause and this is this is fy
- 10:22appearing in q
- 10:23okay so you here you have this is called
- 10:26c
- 10:26this is d and what i'm going to do is f
- 10:30of x
- 10:30going to unify with this guy and get it
- 10:32replaced by t
- 10:34okay so i i get this this unifier
- 10:38between uh fx and fy
- 10:41i get x maps device fairly trivial
- 10:43unification
- 10:45and therefore now i can do is that i
- 10:48replace this f x by d
- 10:51okay so then i get this guy
- 10:54get replaced by d and the same
- 10:58unification has to be applied here so
- 11:00then x get replaced by
- 11:02y so we had equality and then we learned
- 11:05how to use equality now let's see we
- 11:07have a disequality
- 11:09that's the last part and then how do we
- 11:11eliminate this equality for example
- 11:14when you're reaching final contradiction
- 11:16and there are some things are equal now
- 11:18you say the same things are disequal and
- 11:20then you derive contradiction right
- 11:21so somehow when you have a disequality
- 11:24you should be able to eliminate this
- 11:25equality from your clause and remove it
- 11:27okay
- 11:28so let's suppose you have a clause like
- 11:29this equality or some other thing
- 11:32then i can do is that i can find if they
- 11:35can unify them d
- 11:36and u okay under that unification i can
- 11:39remove this disequality because once you
- 11:41unify them they become equal and this
- 11:44because of the reflex rule
- 11:46uh proof rule you can say that this is
- 11:48not true
- 11:49so you can just get rid of this literal
- 11:51and you'll be left with
- 11:53c sigma fairly obvious and this is
- 11:56called reflexivity
- 11:59and the following derivation remove the
- 12:01literal from the clause okay so for
- 12:02example you have
- 12:03x not equal to fy you can simply unify
- 12:06f x and x and you say x
- 12:09maps to f y and just you say p of f
- 12:12that's what you derive out of this uh
- 12:18application of reflectivity rule so we
- 12:20have seen five rules
- 12:22and there's no other rule to learn and
- 12:24using these five rules i can
- 12:26derive anything on the first order logic
- 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.