I think it is more likely that he knows absolutely nothing at all about anything, and will simply make **** up that he thinks sounds good.
His head is basically empty, but for the basic reptilian instincts. If it wasn't for his thick skull, the vacuum would drag his ears in. And he has been determined to be profoundly ignorant since childhood. Nobody has ever said NO to him, or forced him to actually pay attention and learn, or made him own up to his mistakes. His narcissism has been fed juicy red meat for all his life.
So his ability to reason out problems and avoid pitfalls based on prior knowledge is zero because he doesn't retain any prior knowledge. Having never experienced negative feedback means he believes anything he says is gospel and profound. So any resistance, any kickback, any questioning is an assault on his narcissistic castle, leading to towering anger and bitter denial.
So it is not so much that he lies all the time so much as he lives in a fairy tale land in his head. He thinks he is all-knowing and thus his truths are the only ones he accepts. When reality bites and shows him he is profoundly wrong, he continues to insist he is right because he has never learned to learn otherwise.