Will a planet rotate if it is the only being in the universe? As a senior student , I have been wondering whatever the word inertia mean . Is inertia lying in the interaction between all the objects , or is it the nature of a space even without anything put into it ? In our life it seems like the latter , since wherever you throw out a stone into a space it will go along a parabola . But that is not the case , for there is still the earth and the sun and all the distant galaxies that interact with the stone outside its moving space .
So if all the interactions are removed , and there's only a planet thrown into a universe of nothing . Then will it rotate , or can we detect its rotation through , for example , a Foucault pendulum ?
If not , can we conclude that inertia relies on the interaction of the objects , and thus a consequence of universal gravitation?
 A: @ummg's comment that you might want to read about Mach's Principle, https://en.wikipedia.org/wiki/Mach%27s_principle, is the right answer to your question.
Along the same lines, you might think about linear motion. Consider a universe with just two rigid bodies, say $m_1$ and $m_2$, and a compressed spring (of negligible mass so we needn't consider it a third body) placed between them. Release the spring, and $m_1$ and $m_2$ begin accelerating away from each other as the compressed spring expands. But all you can observe is their total acceleration $\ddot{\vec{r}}$ away from each other. There's no possible way to separately measure their individual accelerations $\ddot{\vec{r_1}}$ and $\ddot{\vec{r_2}}$, because (similarly to your example) there's no "rest of the universe" providing a fixed background reference frame. And so (in this example) there seems to be no empirical way to define "inertial mass".
And lots of similar "goofy" little problems emerge when you start considering the issues that Mach's principle tries to address.
A: If the "planet" is not an elementary particle, irreducible, but made of matter with chemical bonds, etc, governed by EM or EW force then the planet is made of a large number of objects each with its own frame of reference and the rotation would be "felt" by each element of the planet as stress from neighboring elements.
A: Rotation is a type of acceleration, and acceleration can be detected in an absolute sense. If the planet was symmetrical and rotating in the way that the Earth rotates, then with the right instruments the inhabitants of the planet would be able to detect the rotation and also the axis of rotation. An object at either of the poles would weight more than an object at the equator because of the centrifugal effect.
A: Yes, an isolated planet could be rotating, and we could discover the rotation through things like the Coriolis force. This is because a rotating reference frame is not inertial.
A: As mentioned in other answers, your question boils down to Mach's principle. As you noted, Gravitation plays a prominent role in this aspect. As noted in the comments, General Relativity does incorporate some parts of Mach's principle. Hence, it is quite interesting to think about GR to answer this question. This also allows us to get an answer far from being opinion based, since it will be built upon one of the best tested theories known to humankind. This answer will be split in a few parts: first an analysis of whether a rotating and a non-rotating bodies are the same thing, and next a few examples of how rotations work in Relativity. Finally, a summary of our conclusions.
Isolated Objects in General Relativity
Let's assume, for the sake of the argument, that the planet (which we assume to be spherical and the only thing in the Universe beyond the gravitational field) is not rotating. In this case, it follows from a result known as Birkhoff's theorem that the gravitational field of the planet is given outside of the planet by the Schwarzschild solution, which is the same solution we use to describe a black hole that has no charge as does not spin. This is similar to how the electric field outside a charged sphere is the same as if the charge was all concentrated in a single point.
One of the cool properties of this metric is that it is static, which can be interpreted as meaning two things:

*

*it does not change with time;

*it does not change when you make the substitution $t \to -t$, i.e., it looks the same if you reversed time.

These properties do not depend on the particular choice of reference frame you make. They are geometric properties of spacetime that characterize physical aspects that all observers should agree on. Hence, these are true regardless of whether you are in a inertial or non-inertial coordinate system.
Now what if the planet was spinning? Could it be described by this metric? If so, then the difference between spinning and no spinning boils down to a choice of reference frame. If not, then there is a fundamental notion of a spinning planet in GR.
A way to falsify if it can be described by Schwarzschild is by testing the previous two facts I listed. Let's see

*

*It doesn't really need to change with time, as long as the planet is spinning with a constant velocity. Nothing weird here, so maybe the solution is possible.

*Oops, now we ran into trouble: if we make $t \to -t$, we'll see the planet spinning backwards, hence there is a difference. The solution that describes the gravitational field of this planet cannot be static, and hence it cannot be the Schwarzschild solution. Therefore, GR does distinguish between a rotating and a non-rotating planet.

Black Holes
If we consider black holes, the analysis is even simpler. A non-rotating black hole is described by the Schwarzschild solution, while a rotating black hole is described by the Kerr solution. These solutions possess wildly different properties. For example, you can provide initial data for a field theory (e.g. Electromagnetism) on a Schwarzschild spacetime and obtain a full solution, but you can do it just for a piece of Kerr (in the jargon, Schwarzschild is globally hyperbolic, but Kerr is not). While I illustrated this argument with Electromagnetism, this is just cartoonish: the point is that they possess inherently different properties that are independent of reference frames. Hence, they are indeed different physical situations.
Relativity of Rotations
But shouldn't rotations be defined only by the matter around them? What is going on?
To some extent, they are. There are effects in General Relativity that show how rotating masses influence the very definition of rotating vs. non-rotating in the spacetime around them. The Lense–Thirring effect (which demonstrates how the inertial reference frame of an observer surrounded by a rotating mass is itself rotating as well) is an immediate example, but the ergosphere of Kerr black holes is another one. In this last one, one can use the effects of a rotating mass to even extract energy from a black hole by means of the Penrose process. More generically, these effects are collectively known as frame-dragging effects.
Hence, General Relativity does incorporate a bit of these notions that rotations depend on the surrounding masses. However, this is not so simple to the point that the rotation of a whole planet can be thought to be dependent of a "bad choice" of reference frame.
Summary
What do we learn from this? That rotation is not defined only with respect to the other bodies in the Universe. There are some "Machian effects" in GR and rotating masses do "drag spacetime around them", but the theory still distinguishes whether the planet is or not rotating.
In short, inertia does depend on the effects of gravitation, but this does not mean there is no notion of "universal rotation".

Comment: Shouldn't $t \to -t$ affect the observer too?
Not exactly. The argument I proposed does suffer from this flaw, but that is because I chose to discuss a geometrical property of spacetime (namely, whether it is static, or merely stationary). While "Is there a change when we take $t \to -t$?" is a way of formulating, it is a rather imprecise one, which I chose here just to keep the GR prerequisites as low as possible. It can be formulated in other ways. For example, Wikipedia presents the intuitive definition of "Static spacetime" as

In general relativity, a spacetime is said to be static if it does not change over time and is also irrotational.

I avoided this definition in fear it might sound too obvious. Wikipedia also proceeds to state the detailed definition

Formally, a spacetime is static if it admits a global, non-vanishing, timelike Killing vector field $K$ which is irrotational, i.e., whose orthogonal distribution is involutive. (Note that the leaves of the associated foliation are necessarily space-like hypersurfaces.) Thus, a static spacetime is a stationary spacetime satisfying this additional integrability condition.

This definition now sounds both obvious (for the case at consideration) and unintelligible for an audience that is not acquainted with GR. Nevertheless, it is completely frame-independent and objective, consisting of only remarks about the geometric properties of spacetime.
A: What exactly are you asking?   The title and details in your question seem to be different.
For the title, the planet could be rotating but it wouldn't have to be.  You are imagining a universe consisting of a single planet and we would have to figure out how that formed.
Whether we could detect any it is a different question, and you mention a Foucault pendulum so the answer would be yes.  It doesn't have to be rotating with respect to anything else, it just contains angular momentum.   You could ask the same question if the universe contained a single silly silo and nothing else.  It may be rotating or it may not, but we could easily tell if it was rotating with any speed.
A: Nearly all the answers so far, to the question in the title

Will a planet rotate if it is the only being in the universe?

answer yes, that it could be rotating and also state that the rotation could be measured.
But they pre-assume an absolute space.
If there is nothing else in the universe, there is no way we can say that the planet is rotating and also no way to measure it.
The absolute space idea went out of fashion with the 'aether' after the Michelson-Morley experiment.
We have to be careful saying that the rotation could be measured by the Coriolis force or a Foucault pendulum.  That presumes that the pendulum or object that's moving knows how to move in 'a straight line', or what the straight line actually is.
To suggest it somehow knows this is again to presume an absolute space.
Another problem with those type of answers is that by suggesting the methods above, the planet is then no longer the 'the only being in the universe', another object or objects have been introduced that are not part of the rotating planet, e.g. the observer and the pendulum.
It's a great question and clearly could never be tested experimentally, but an important thought experiment never-the-less.
In the absence of a proper way to define or measure the rotation, the answer here is  no!
