I saw this sentence on TV:

> 日々心によぎる「あのとき こうしていれば」という言葉。。。

and I wonder why していれば is used here and not すれば.

When I asked my teacher he said it is an N1 grammar point, he tried to explain
it to me but I didn't get it.

I'm looking for more info on this to understand why it is like that, I didn't
find it on a quick google search.

Here is one more example sentence that he gave me:

> あの時、ポケモンを見ていなかったら、日本語を勉強していなかったかもしれない。

Edit:  
The suggested duplicate questions don't answer why it is like that, they just
state that this is the right way.  
I still don't know why they are using ていれば, if it is just like that - fine.
But if there is a reason for a western mind to understand I will be glad to
hear it.
CC BY-SA 4.0
2019-03-02T13:05:57.513
65799
2019-03-03T14:14:46.467
2019-03-03T14:14:46.467
9831
11679
question
grammar aspect
"If I have done that" in the continuous form?