> I'm guessing epistemology or a similar field has pondered the "invented or discovered" question already, and if so, I want to read about it.
Any course or book on the Philosophy Of Science would cover that. Are numbers discovered or invented? Did the ancient hindu mathematician invent the number zero or did he discover it? You could argue that the symbolic representation of zero was invented ( or was it? ) but the idea of the number zero was discovered. The more you delve into it, the more you realize things aren't as straightforward as you might have imagined.
Or quicksort. Is it an invention or a discovery? You could go back and forth on it forever.