The physics works for Earth too. In all cases, you make the top of the cable bigger than the bottom to support all of the weight hanging from it. From what I've read, in the case of Earth and with current materials technology, we end up with the top of the cable having a diameter comparable to that of the Earth. Clearly, that's not feasible.
For Luna or Mars, gravity is reduced and the required diameter is less. Maybe it would even be feasible to build such an elevator if it were above the Earth. But now you're building above an alien plant, so you trade one set of potentially insurmountable obstacles for another.
I mean, that's a fair point. The total volume of the elevator cable would be greater than that of the Earth. The mass might still be less since we're not building it out of iron here, but effectively we'd have a binary planet with the centre of mass well outside the Earth's surface.
I'm not sure that that system would be unstable in human timeframes since the two would be tidally locked, although it would certainly alter the engineering stresses in ways that I'm grossly unqualified to calculate. I think a portion of the cable might be under compression rather than tension? I guess it depends on the rotational speed of the whole system.
Speaking of which, substantial amounts of energy would need to be spent accelerating the spin of the Earth/space elevator system to maintain a 24-hour day/night cycle.
However, Luna's presence would perturb the whole system, either tearing it apart with tidal stresses or being ejected from the system before that could happen.
I appreciate the correction. I'm not sure where I heard that particular piece of information, nor in that case what material was being examined. Perhaps that one was steel.
For Luna or Mars, gravity is reduced and the required diameter is less. Maybe it would even be feasible to build such an elevator if it were above the Earth. But now you're building above an alien plant, so you trade one set of potentially insurmountable obstacles for another.