There is some degree of overlap between the simple past and the
present perfect however there are important differences. When a
specific past time is specified, the simple past should be used.
In the sentences above, the first sentence leaves open the
possibility that John continues to teach mathematics. The second
implies that John no longer teaches mathematics. Maybe he retired,
changed careers, or passed away.
The same is true for the sentences above. The second sentence
expresses more finality. Maybe the restaurant burned downed, maybe
Steve and Carol moved somewhere else or swore never to eat at the
restaurant again.
If something began in the past and continues until the moment of
speech, the present perfect is used.
If I was president, I would give you a pardon.
If she was rich, she'd travel around the world.
If he was smart, he'd leave town right away.
If I had only listened to my parents, I wouldn't be in jail.
Past Perfect
I would have done the same thing.
He should have told you earlier.
I should have tried harder.
I might have forgotten to lock the door.
She could have been nicer.
I wish you were here.
I wish you would call more often.
She would rather be with me than you.
You'd better see a doctor!
I study more, I would get better grades.
Present Perfect Continuous
She has been working a lot.
We've been walking in the forest.
I have been sleepy lately.
They have been angry with us for 15 years.
Past Perfect
If you had to do it again, would you
If I had know about that, I never would have married him.
If you had waited, you would have seen Mary.
If you you had asked her, she would have said 'yes'.