Flat means asymptotic flat. The precise definition require Penrose diagram: the structure of infinity of spacetime looks like the structure of infinity of Minkowski spacetime, the archetypical example of a perfectly flat spacetime.
In simple term, this means on average over large distance, all the curvature from the stars and such become negligible. It’s like if someone say that Kansas is flat, it doesn’t mean there are no bumps while driving through Kansas.
Latest Answers