It's not that Ptolemy invented the geocentric view, but Ptolemy was the accepted "science" of the day and had the math worked out to work. The Church accepted the geocentric view because that was the predominant view.
Fantastic book btw