Form and meaning
The infinitivo compuesto is the infinitive haber plus a participle. It says that an action was already complete before the main statement holds: to have finished, after having arrived. English uses one verb have for owning and for perfect forms; Spanish splits the job, tener owns and haber builds, so it is haber terminado, not tener terminado.
How the form is made
Regular participles end in -ado (-ar) or -ido (-er, -ir). Common irregular ones: hecho, visto, escrito, dicho.
Después de haber terminado, descansé.
After finishing, I rested.
Lamento haber llegado tarde.
I'm sorry I arrived late.
After prepositions
English puts an -ing form after a preposition: after eating, without sleeping. Spanish puts an infinitive there, and if the action was already over, the compound infinitive.
Common triggers
Después de haber comido, salimos a pasear.
After we had eaten, we went out for a walk.
Sin haber dormido, no pude concentrarme.
Without having slept, I couldn't concentrate.
A pesar de haber estudiado mucho, suspendió.
Despite having studied hard, he failed.
After verbs of remembering and denying
Verbs like recordar, lamentar, negar and reconocer take the compound infinitive when they look back at something already done. English often uses -ing or a that clause here (I remember meeting him), so there is nothing to copy; you have to reach for haber. Object pronouns are written onto the end of haber: haberlo visto, haberme llamado.
Recuerdo haberlo conocido en Madrid.
I remember meeting him in Madrid.
lo is attached to haber
Niega haber dicho eso.
He denies saying that.
Reconoce haber escrito ese mensaje.
He admits writing that message.
Simple or compound infinitive?
The simple infinitive refers to the time of the main statement, the compound one to something before it. After después de both are possible: haber there only stresses that the action is complete.
Infinitivo simple, now
Gracias por venir.
Thank you for coming.
Me alegro de verte.
I'm glad to see you.
Infinitivo compuesto, already over
Gracias por haber venido.
Thank you for having come.
Me alegro de haberte visto.
I'm glad I saw you.