If I hypothetically purchase games that are discounted because I am playstation+ member do I get to keep the game after the end of the subscription?
Games you purchase are there to stay after the subscription lapses; only completely free games/DLC from Playstation Plus will be revoked if your subscription lapses (note you get access back if your subscription is renewed, even if it has previously lapsed).
A modal warning will appear every time you "purchase" a PS+ free game warning you that you will in fact lose access if your PS+ subscription ends; when in doubt, look for this warning. There's no such warning on free/paid items you'll keep after PS+ is over.
Yes, the game is yours after purchasing.