To express "having done" something, use the perfect gerund (gerundio compuesto). It is formed with the gerund habiendo (having) and a past participle.
Sequencing actions
The perfect gerund is used to describe an action that was completely finished before the main action of the sentence. It is very useful for laying out a sequence of steps, such as in scientific research or data analysis.
| Having taken the sample, it is logical that we verify the data. | Habiendo tomado la muestra, es lógico que verifiquemos los datos. |
| Having applied the formula, she has put the results in the table. | Habiendo aplicado la fórmula, ella ha puesto los resultados en la tabla. |
Notice that the main verb can be in the present, past, or even subjunctive—the perfect gerund simply tells us that its action happened first.
| Having analyzed the variable, we corroborated the hypothesis. | Habiendo analizado la variable, corroboramos la hipótesis. |
| Having finished the calculation, the expert confirmed its accuracy. | Habiendo terminado el cálculo, la experta confirmó su exactitud. |
Irregular participles
Just like with other perfect tenses, you will continue to use the irregular forms of past participles (like visto for ver or descubierto for descubrir) immediately after habiendo.
| Having seen the formula, I think that the calculation is very easy. | Habiendo visto la fórmula, pienso que el cálculo es muy fácil. |
| Having discovered the truth, we do not doubt its validity. | Habiendo descubierto la verdad, no dudamos de su validez. |
Your questions are stored by us to improve Elon.io