I am trying to understand the grammar of the first sentence. Only the first sentence is correct but I don't understand why the other sentences are not.
"If he didn't say "Hello", he couldn't have seen you".
"If he didn't say "Hello", he couldn't see you."
"If he hadn't said "Hello", he couldn't have seen you."
"If he hadn't said "Hello", he couldn't see you."
I used the construction in 3 because in Michael Swan's "Practical English Usage" I read "we use "could have.. to talk about unrealised past ability or opportunities-to say that somebody was able to do something, but didn't do it, or that something was possible , but didn't happen. But in my sentences both actions happened. The person did say "hello" and the other person saw him/her. So it's not what Michael Swan is talking about in "I could have won the race if I hadn't fallen." Is this why only the first sentence is correct? I found a similar construction in the book's another example "I couldn't have won, so I didn't go in for the race." According to Swan negative sentences suggest that somebody would not have been able to do something even if they have wanted or tried. Butit isn't the same as my first sentence, is it? It also gives this example, "I could have won the race if I hadn't fallen." The construction is the same as my third sentence but the meaning is different.