Is that above sentence grammatically correct?
This is grammatically correct, and also very idiomatic (to an American, at least).
Does the formula always go like this: present perfect (has finished) + ing-form (reading)?
The gerund ("-ing form") is the way in which the verb is being treated as a noun. (In other contexts, one might use the infinitive (to read), but here, one uses the gerund.)
In this case: friend (subject) has finished (verb) reading it (object).
The sentence might be the same even if there was not a gerund there:
- You can borrow it after my other friend has ridden a bus.
One would not use the infinitive here, in English, though:
- You can borrow it after my other friend has finished ✗to read it.
The infinitive (to read) in English is used for the "abstract idea" of the verb, and can't be used in a place where the action has, is now, or is expected to happen.
- If I were to read … ✓
- He is the one to read … ✓
- To read is a wonderful hobby. ✓
- I need to read the manual. ✓
- You want to read … ✓
- I was going to read, but … ✓
- He has finished to read … ✗
- The rules allow to read … ✗
- He avoids to read … ✗
- She recalled to read that book. ✗
- He has finished reading. ✓
- The rules allow reading. ✓
- He avoids reading. ✓
- She recalled reading that book. ✓
The two can also mean different things:
- She stopped to read. = She stopped [doing some other thing, in order that she might] read.
- She stopped reading. = She was reading, but then stopped; no reason is implied.
Or be almost interchangeable:
- She likes to read. ≈ She likes reading.
- He likes to eat. ≈ He likes eating.
Why does one use the present perfect, if, in fact, the book is still being read?
The use of the present perfect tense, in this case, is because "after" has introduced this clause — A "subordinate clause of time."
In this clause (after he has finished reading it), the tense is relative to itself, and not the moment at which the sentence was written. "he has finished reading it" is a supposed time, which the author expects to occur. (The writer did not say, for example, if he were to finish reading it in the subjunctive mood, so it is assumed that the event will definitely happen.)
In this case, the tense draws us through a series of events. First, the other friend must read. We don't know whether this has begun, yet, or not. Then, he must finish reading (perfect). When we are in that time — which may be in the future — then, after that time, you can borrow it.
If the author had used, instead, the past perfect, we would believe that the other friend has already finished, but the main verb (can) would need to be changed in order for after to make sense.
- You can borrow it after my other friend had finished reading it ✗
- You borrowed it after my other friend had finished reading it ✓
The past and past-perfect agree.
- You can borrow it after my other friend will have finished reading it ✗
I can't name any rule that forbids this sentence, but "it sounds silly to me." I think the problem there is that after and will have are doubling-up on the sense of future. I don't know how better to explain that, though.
- You can borrow it after my other friend finishes reading it. ✓
In this case, there is a different amount of information about his reading. It implies that the friend has probably started reading it, and needs only to finish. Since the subordinate verb finish has a meaning very similar to the perfect tense, it's quite subtle in this case.
- You can borrow it after my other friend has read it. ✓
Again, using the perfect form of reading carries nearly the same meaning as finished, so the difference here is very subtle.