Is anything invented or discovered? It is a matter of semantics. One could say an invention is a discovery of how to do or make something. To begin with nothing can be invented without the existence of it's parts or processes so inventions have to be discoveries.
Plain and simple Mathematics, a process or way to study and understand the world could not be invented without already existing, so it is a discovery. If mathematics didn't exist it couldn't have been invented. There is nothing that man can create that hasn't existed in the mind of God who created the universe and everything in it, by default every conceivable and inconceivable invention.
Because if it didn't exist it couldn't be invented, be it creating a "new" object, idea or theory, it can't be created if it doesn't already exist, it can only be discovered.