De haberlo sabido: conditions with the perfect infinitive
You buy a ticket, then an hour later find a better offer. “If I'd known, I'd have bought a different one.” Spanish can begin Si lo hubiera sabido or use the shorter De haberlo sabido. The preposition de with an infinitive expresses the condition instead of si. This compact construction belongs mainly to written and more carefully prepared spoken Spanish. At C1 level, it's worth recognising because it is common in newspapers and fiction. It can also give your own formal writing more variety.
De + infinitive: if
De tener tiempo, iría contigo. If I had time, I'd go with you.
The same as Si tuviera tiempo, iría contigo.
De ser necesario, cambiaremos la fecha. If necessary, we'll change the date.
The same as Si es necesario, cambiaremos la fecha.
The infinitive itself doesn't tell you whether the condition is open or hypothetical. The main clause supplies that distinction here: the future presents a real possibility; the conditional presents a hypothesis.
Put a comma after an initial conditional phrase.
Several expressions with this construction also occur in everyday speech. The last two in this list likewise begin with de, but don't contain an infinitive:
- de ser así: if that is so
- de ser posible: if possible
- de ser necesario: if necessary
- de no ser así: if not
- de lo contrario: otherwise
- de todos modos: anyway, in any case
De ser así, tendremos que llamar otra vez. If that's the case, we'll have to call again.
De ser posible, prefiero una mesa junto a la ventana. If possible, I'd prefer a table by the window.
De haber + participle: if something had happened
The perfect infinitive expresses an earlier action. In these examples, it introduces an unreal past condition equivalent to si hubiera….
De haberlo sabido, habría comprado otro billete. If I'd known, I would have bought another ticket.
De haber salido antes, habríamos evitado el atasco. If we'd left earlier, we would have avoided the traffic jam.
The infinitive doesn't mark person. The main clause and context often identify it: habríamos means “we”, whereas habría can refer to I, he, she or formal you.
The result needn't be past:
De haber reservado ayer, ahora tendríamos una mesa. If we'd booked yesterday, we'd have a table now.
The condition is past and the result present, hence simple conditional tendríamos.
When reading, separate the two times. What would have happened first? Haber and the participle tell you. What would follow, and when? The main clause tells you.
Negatives
Put no immediately after de, before the infinitive.
De no haber llovido, habríamos cenado fuera. If it hadn't rained, we'd have eaten outside.
De no ser por tu ayuda, seguiría perdido. If it weren't for your help, I'd still be lost.
De no ser por is a fixed expression meaning “if it weren't for” or “but for”. Conversational alternatives are si no fuera por and si no es por.
De no ser por el tráfico, habríamos llegado a tiempo. But for the traffic, we'd have arrived on time.
Pronouns
Attach pronouns to haber.
- de haberlo sabido: if I'd known it
- de habértelo dicho: if I'd told you
- de habernos enterado: if we'd found out
- de habérmelo pedido: if he'd asked me for it
De habértelo dicho antes, habría arruinado la sorpresa. If I'd told you earlier, I'd have ruined the surprise.
De habernos enterado antes, habríamos cambiado el plan. If we'd found out earlier, we'd have changed the plan.
The stress stays on -ber-. With one pronoun, write haberlo; with two, for example, habértelo. The accent follows the normal rules for the complete word.
A different subject
An infinitive can have its own explicit subject, placed after it.
De haber reservado Ana, habríamos cenado en ese restaurante. If Ana had booked, we'd have eaten at that restaurant.
De haberlo sabido yo, te lo habría dicho. If I'd known, I would have told you.
In everyday communication, a full clause is often clearer when the subjects differ: Si Ana hubiera reservado…
When de isn't conditional
Not every de followed by an infinitive expresses a condition. It often belongs to a verb or another linking expression.
Me alegro de haber venido. I'm glad I came. The construction is alegrarse de.
Después de haber comido, salimos. After eating, we went out. The expression is después de.
Acabo de llegar. I've just arrived. The construction is acabar de.
Es fácil de entender. It's easy to understand.
Try replacing de with si and expanding the phrase into a clause. If the meaning stays the same, it's conditional. If not, de has another role.
Conditional de often begins the sentence, but can also follow the main clause. Unlike alegrarse de, it isn't required by the preceding verb.
Other conditions without si
De with an infinitive isn't the only compact alternative.
A gerund: Saliendo ahora, llegamos a tiempo. If we leave now, we'll arrive on time.
A participle: Visto así, tienes razón. Seen that way, you're right.
Con and an infinitive: Con llamar una vez basta. Calling once is enough.
Sin and an infinitive: Sin estudiar no aprobarás. Without studying, you won't pass.
Yo que tú: Yo que tú, no iría. If I were you, I wouldn't go.
Como with the subjunctive as a threat or warning: Como llegues tarde, me voy. If you're late, I'm leaving.
Style
De haberlo sabido and si lo hubiera sabido mean the same. The first is shorter and denser, more suited to writing or prepared speech. Over coffee, si is more usual. Spain also has a third, conversational option: Si lo llego a saber, no vengo.
Three registers for the same idea:
- Si lo llego a saber, compro otro billete. Conversational.
- Si lo hubiera sabido, habría comprado otro billete. Neutral.
- De haberlo sabido, habría comprado otro billete. Compact, written style.
Checking
- Can you expand the phrase into a clause with si?
- Who would fulfil the condition? Look at the main clause and context.
- When? The simple infinitive usually refers to the present or future here; the perfect infinitive refers to an earlier event.
- When would the result occur? Choose the main clause's tense accordingly.
Take a sentence beginning Si lo hubiera sabido and change it to De haberlo sabido. Then try a different person and different pronouns: de habernos enterado, de habértelo dicho. Compare more conditions in the Spanish video lessons, and review tense forms in the Spanish grammar reference.