1 He is understood to have left India for good last year.
2 The scientist claim to have discovered cure for AIDS and the medicine will be put on sale very soon.
3 He pretended to have lost her contact number.
4 We hope to have finished the project by the end of march.
5 I'm sorry to have disturbed you.
In all these sentences its use "to have", but purpose is different. For example in 4 it uses for future perspective while in 3 for past. Can someone explain the concept of "to have"? I find it difficult where to use "to have" or not. For example I would write 4th sentence as "We hope to finish the project by the end of march (if I haven't seen this sentence in my book). I also read that we can use perfect infinitive construction to talk about plans which didn't happen. But this rule doesn't follow with 5 sentence.
Thank you