If the earth disappeared, then math would disappear with it. It would be the same with stuff like tennis and chess.Math can be applied anywhere and is not limited to earth. Math has a strict set of rules which cannot be changed or bent, that's why I think they were discovered rather than invented. Sure, things like our numeral systems would be lost, but these are replaceable and they don't change how math works in any way.