Where and .Note that, for P to reject an input string it may not read the whole string (it may enter a configuration at which no transition is defined or it may execute a never-ending sequence of -moves). On the other hand if P accepts a string , then it must eventually read the whole string.
We know that if Thus is also in L.
Since P accepts both x and , the sequence of moves it makes while processing the first part x of the string must be exactly similar to that it makes on input x irrespective of whether x is followed by any other string or not. This is because of the fact that P is deterministic in nature.
After processing x at the stock content of P be with for some . Now, if P starts reading subsequent symbols from some string y (i.e. P may be assumed to start with the string xy) and finishes reading it, then let the stock content be . We are sure that , since P must still be able to process some longer string with xy as the prefix. So, we have