I did a bit of searching on the difference between "not having" and "having not", but I could not find a convincing argument. I typed this sentence;
Congratulations on not having given up yet!
It was corrected by a friend to;
Congratulations on having not given up yet!
I am certain that my friend has a better command of English and that he is correct. Could someone explain why the first sentence is incorrect?