The perfect personal infinitive: usage

Expressing gratitude

When thanking someone for a thoughtful action they have already completed, use the preposition por followed by the perfect personal infinitive. This translates closely to the English structure "for having [done something]".

Thank you for having offered me the small gift.
Obrigado por me teres oferecido a lembrança.
Thank you (f) for having read my dedication.
Obrigada por teres lido a minha dedicatória.
The girl thanked us for having offered the wine.
A rapariga agradeceu-nos por termos oferecido o vinho.

Explaining past causes

You can use this same structure—por or por causa de plus the perfect personal infinitive—to explain the reason behind a feeling or reaction. It shows how an action that was completed in the past caused an emotion or state.

My best friend got annoyed for them not having reciprocated the gesture.
O meu melhor amigo ficou chateado por não terem retribuído o gesto.
The parents are happy because of having received the letter.
Os pais estão felizes por causa de terem recebido a carta.
We show our gratitude for them having reciprocated.
Mostramos a nossa gratidão por eles terem retribuído.

Emphasizing anteriority

To clearly establish a timeline of events, use the perfect personal infinitive after prepositions like depois de (after) and apesar de (despite).

Using the perfect form here emphasizes that the action was entirely finished before the main action of the sentence took place, even if the main action is in the present tense.

After having made the wrapping, we put the bow on.
Depois de termos feito o embrulho, pomos o laço.
After having given the book, we were happy.
Depois de termos dado o livro, ficámos felizes.
Despite having bought the small gift, we forgot the wrapping.
Apesar de termos comprado a lembrança, esquecemo-nos do embrulho.