Lecture 17-4 correctness of Robinson algorithm — Transcript
Full transcript
- 0:00we have seen the robinsons algorithm
- 0:02however we are not sure
- 0:04its correctness we need to show that if
- 0:06this algorithm terminates
- 0:08and when it terminates it returns an m
- 0:10gene
- 0:12okay so let's first try to see that
- 0:14what's the termination argument for this
- 0:16algorithm
- 0:18so it's fairly simple that every time we
- 0:21make a move and sigma gets more and more
- 0:25richer
- 0:26it takes away one variable and start
- 0:27replacing terms
- 0:29which have other variables are present
- 0:31but no new variables are introduced so
- 0:33every step
- 0:34one variable goes down okay so
- 0:37what will happen eventually that you
- 0:39will run out of variables
- 0:41or you accept the
- 0:44program so therefore your
- 0:48this program always terminates
- 0:53now the other aspect is
- 0:56that when it returns it returns a
- 0:59unified sigma
- 1:01only if and only if this is unifiable
- 1:05furthermore sigma is a mg okay how do i
- 1:09prove that
- 1:10since mg must terminate we have proven
- 1:14the termination
- 1:15t and u are not
- 1:18unifiable then mg must return
- 1:21the loop in the program terminates only
- 1:24when
- 1:25there is a unifier found which makes d
- 1:28and u equal
- 1:29if says d and u are not unifiable then
- 1:33there is no way we can find the
- 1:36unifier so therefore it must terminate
- 1:39by a fail
- 1:40and since there is a termination you
- 1:43have to go this way let us suppose t and
- 1:46u
- 1:47are unifiable and tau is a unifier of
- 1:50tnu now our claim is that
- 1:55the following equation is
- 1:59loop invariant of the mg i.e that
- 2:02whatever unifier we learn sigma
- 2:06if you apply with this tau some some
- 2:08unifier between t and u
- 2:10uh then it will reduce tau back
- 2:13okay so uh how do they how do we show
- 2:16that
- 2:18initially sigma is identity therefore
- 2:21the invariant holds
- 2:22initially now we assume an induction
- 2:25hypothesis that
- 2:26at the head of the loop that tau is
- 2:29equal to sigma tau
- 2:30holds and then we are going to show that
- 2:32after the loop iteration
- 2:34you will not fail and this property will
- 2:37continue to hold
- 2:40the first thing i'm going to prove is
- 2:41that the intermediate terms
- 2:44remain unified okay so these are the
- 2:47intermediate terms
- 2:48and then if we apply tau on them since
- 2:52uh due to induction hypothesis sigma tau
- 2:55is equal to tau so i get t tau and
- 2:58similarly from this guy i get
- 3:00tau here and u t tau and u
- 3:04tau are equal because of this assumption
- 3:06that the t
- 3:07and unity you're unifiable and tau is
- 3:09actually
- 3:10the unifier so therefore they say
- 3:12quality chain holds
- 3:14so all intermediate terms in your
- 3:17algorithm of robinson uh
- 3:20or unified it never breaks it okay but
- 3:23by making any move for say on sigma
- 3:26furthermore i can prove one more thing
- 3:28that the x t x tau and s tau
- 3:30are equal okay so how do i do that
- 3:33since i have shown you the intermediate
- 3:36terms are unifiable
- 3:39by tau since x and s are disagreement
- 3:43pairs
- 3:44in t sigma and u
- 3:47sigma as possible there is a path and
- 3:49somewhere
- 3:51x occurs and somewhere s occurs
- 3:54okay and uh you and then what you do you
- 3:58when you apply
- 3:59tau on them they become equal so that
- 4:01means
- 4:02if you're applying tau on them should
- 4:04also result in the same thing otherwise
- 4:06how can
- 4:07they become equal okay so uh so
- 4:09therefore
- 4:10s x tau and x tau should be the
- 4:13same term using the above fact
- 4:17i can say that if we take a substitution
- 4:20x maps to s
- 4:23and we compose with this tau it should
- 4:26return tau
- 4:27yes how do i prove that let's suppose we
- 4:30take a variable y
- 4:31okay and we decide to see where does it
- 4:34get mapped okay so if let's suppose y
- 4:36is x y is x and then i try to
- 4:39apply this composition on
- 4:43s y since egg y is an x so
- 4:46the result is s okay and now s t is
- 4:49s tau is x tau so therefore
- 4:53i can simply derive y tau that means
- 4:56uh applying this composition on y gives
- 4:59me
- 5:00the effect of tau now let's suppose y is
- 5:04not
- 5:04x then this composition
- 5:08this substitution has no impact so i
- 5:10left with y
- 5:12and then you have white out and again
- 5:14you have
- 5:15same behavior as time so therefore this
- 5:17equality
- 5:18holds now we show that
- 5:21if we assume the environment at the loop
- 5:23head then fail is
- 5:25not returned it cannot possible that
- 5:27fail is written
- 5:29okay so there are two fails right so no
- 5:31fail at the first if condition when that
- 5:33happens is that both of them
- 5:34are non-valuable if both the body
- 5:37segregate pairs are non-variable
- 5:40then t sigma and new sigma are not
- 5:43unifiable
- 5:44right and we have shown that they are
- 5:46unified therefore it cannot be the case
- 5:48and then
- 5:49one of them must be a variable therefore
- 5:51that cannot happen
- 5:52and what about the last if condition can
- 5:55we return fail there
- 5:56that is also not possible since we know
- 5:58that
- 5:59x tau is equal to s down x cannot occur
- 6:02in s
- 6:03ok otherwise no unifier can make them
- 6:06equal
- 6:07right so this this equality can is not
- 6:09even possible there's no tau is possible
- 6:11if x
- 6:11occurs in s so therefore it doesn't
- 6:14happen
- 6:15and you don't get anything
- 6:20now if since there is no fail we show
- 6:22that the invariant will continue to hold
- 6:24after that rash okay so
- 6:25all the ingredients are in place it just
- 6:27we need to apply them now
- 6:28for example i need to show that after
- 6:31modifying my
- 6:32substitution i still remain to satisfy
- 6:36our invariant well
- 6:40what we have done so we have shown this
- 6:43guy
- 6:43is equal to tau so what i will do i will
- 6:46replace this
- 6:47by tau i get sigma tau okay and since
- 6:50sigma tau is equals to tau because of my
- 6:54induction hypothesis
- 6:55i get this equality since we have
- 6:59established that
- 7:00this fact is invariant so therefore at
- 7:03upon termination sigma will also
- 7:06be a unifier of tnu and it also be
- 7:10a more general uh unified than any other
- 7:14unifier therefore it must be an emgu
- 7:17and the termination
About this transcript
This page contains the full transcript of Lecture 17-4 correctness of Robinson algorithm by Automated Reasoning, generated from the public captions YouTube serves with the video. The transcript has 1,048 words across 185 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.