Study this example situation:
Last month Brian was in the hospital for a few days.
Liz didn’t know this, so she didn’t go to see him.
They met a few days ago. Liz said:
If I had know you were in the hospital, I would have gone to see you.
Liz said, “If I had known you were in the hospital…” So she didn’t know he was in the hospital.
We use if + had (‘d) … to talk about the past (if I had known/been/done, etc.):
I didn’t sett you when you passed me in the street. If I’d seen you, of course I would have said hello. (but he was tired)
If he had been looking where he was going, he wouldn’t have walked into the wall. (but he wasn’t looking)
The view was wonderful. If I’d had a camera, I would have taken some pictures. (but I didn’t have a camera)
I’m not hungry. If I was hungry, I would eat something. (now)
I wasn’t hungry. If I had been hungry, I would have eaten something. (past)
Do not use would in the if-past of the sentence.
We use would in the other past of the sentence:
If I had seen you, I would have said hello. (not If I would have seen you)
Note that’d can be would or had:
If I’d seen you, (I’d seen = I had seen)
I’d have said hello. (I’d have said = I would have said)
We use had (done) in the same way after wish. I wish something had happened = I am sorry that it didn’t happen:
I wish I’d known that Brian was sick. I would have gone to see him. (but I didn’t know)
I feel sick. I wish I hadn’t eaten so much cake. (I ate too much cake)
Do you wish you had studied science instead of languages? (you didn’t study science)
Do not use would have … after wish:
The weather was cold on our vacation. I wish it had been warmer. (not I wish it would have been)
Compare would (do) and would have (done):
If I had gone to the party last night, I would be tired now. (I am not tired now – present)
If I had gone to the party last night, I would have met lots of people. (I didn’t meet lots of people – past)
Compare would have, could have, and might have :
If the weather hadn’t been so bad,
– We would have gone out,
– We could have gone out. (= we would have been able to go out)
– We might have gone out. (= maybe we would have gone out)