Originally Posted by
Ackbeet You need to have some sort of symbol/procedure for deleting strings from strings, or taking just a subset. Moreover, as string concatenation is not commutative, it'll need to reflect that fact. Perhaps you could think of the size of string x as |x|, which equals the number of characters. Then, define the left delete function ld as follows:
ld(x,n) = x with the first n characters deleted from the left, if n <= |x|
= 0 if n > |x|.
That function should, I think undo concatenation from the left, which is what you need. You'll probably need to show that the function is well-defined (that is, its output is identical for identical inputs). Then, you'll need to show that
ld(x+y,|x|) = y for all strings x and y.
Perhaps you can finish from there?