Diffeomorphism invariance in GR I apologize for asking the duplicate question, but I still get confused after reading the related post In general relativity, are two pseudo-Riemannian manifolds physically equivalent if they are isometric, or just diffeomorphic?. In particular, for the statement

if universe is represented by manifold $M$ with matter fields $\psi$ and metric $g$, and $\phi: M \rightarrow M$ is a diffeomorphism, then sets $(M, g, \psi)$ and $(M, \phi^*g, \phi^* \psi)$ represents the same physical situation.

what does "same physical situation" really mean? Does it have some mathematical formulation? Is a diffeomorphism equivalent to a general coordinate transformation?
Also, in https://physics.stackexchange.com/a/596779, it said that we can actually prove the diffeomorphism invariance of the Hilbert action, can anyone gives a derivation?
 A: "Same physical situation" means that there isn't even in principle any experiment that is able to conclusively tell you whether $(M, g, \psi)$ or $(M, \phi^* g, \phi^* \psi)$ is the right tuple. This means we are obligated to treat them on equal footing as far as the physics is concerned (mathematically, we may choose to work with one or the other, but we always have to check that the formulae that we write works for all of them in the same way).
To prove that the Einstein-Hilbert action is diffeomorphism invariant is trivial if you know Riemannian geometry. The action reads
$$ S[g] = \frac{1}{16 \pi G} \intop_{M} d^4 x \sqrt{|\det g|} R. $$
Here, $R$ transforms as a scalar under diffeomorphisms and $\sqrt{|\det g|}$ transforms as a scalar density. Therefore, the product $\sqrt{|\det g|} \cdot R$ transforms as a scalar density. Densities can be integrated over the manifold $M$ and the result is diffeomorphism invariant (modulo the caveat about $M$ being non-compact and the integral needing proper boundary conditions to be well defined). To derive the transformation law of $R$ and $\sqrt{|\det g|}$ read up on Riemannian geometry, or ask a separate question here.
You may be curious about what happens if we integrate just $\sqrt{|\det g|}$ (which is also a scalar density). The answer is that it computes the 4-volume of $M$, and when added to the Einstein-Hilbert action, it corresponds to the cosmological constant term.
Finally, what physicists call GCTs (General Coordinate Transformations) is what mathematicians call diffeomorphisms, perhaps modulo some insignificant nuances like whether only the part of the diffeomorphism group that is connected to identity constitutes as a GCT or whatever else.
A: I want to add one additional point that is usually glossed over, that being the behavior of the diffeomorphisms at infinity, in the case in which we can define a good notion of infinity in the spacetime under study. This will be somewhat long, but I hope instructive.
In my opinion the most precise way to state this is via the Covariant Phase Space formalism. This formalism allows you to, starting from a Lagrangian density ${\cal L}$ construct one phase space $(\Gamma,{\pmb \Omega})$. Here $\Gamma$ is a symplectic manifold and ${\pmb \Omega}$ is the associated symplectic form, which is just a closed and non-degenerate two-form on $\Gamma$. Symplectic manifolds are the underlying structure behind standard Hamiltonian mechanics.
In particular they give a clear description of what are true symmetries and what are transformations merely relating redundant descriptions of the same physics. This starts as follows: we define a canonical transformation to be a phase space diffeomorphism $T: \Gamma\to \Gamma$ preserving the symplectic form $T^\ast{\pmb\Omega}={\pmb\Omega}$. As you probably known, a vector field ${\bf X}:\Gamma\to T\Gamma$ generates a one-parameter family of diffeomorphisms. These diffeomorphisms will be canonical transformations if and only if $L_{\bf X}{\pmb \Omega}=0$ where $L_{\bf X}$ is the Lie derivative.
Now if you use Cartan's magic formula we have $$L_{\bf X}{\pmb \Omega}={\bf d}\iota_{\bf X} {\pmb \Omega}+\iota_{\bf X} {\bf d}{\pmb \Omega}$$
where $\iota_{\bf X}{\pmb \Omega}({\bf Y})={\pmb \Omega}({\bf X},{\bf Y })$ is the interior product. Now since ${\pmb \Omega}$ is closed we find that ${\bf X}$ generates canonical transformations if and only if ${\iota_{\bf X}}{\pmb \Omega}$ is a closed one-form. Assuming trivial topology of the phase space this means that there should be some phase space function $Q$ with the property that $$\iota_{\bf X}{\pmb \Omega}=-{\bf d}Q.$$
This establishes a correspondence between symmetries and phase space functions. It is the correspondence between symmetries and conserved quantities. We call $X$ a Hamiltonian vector field and $Q$ its associated Hamiltonian charge. Now we also see that if the right-hand side vanishes ${\iota_{\bf X}}{\pmb \Omega}=0$. This means that ${\bf X}$ is a degenerate vector of ${\pmb \Omega}$ and all configurations along its flow are physically equivalent.
So that is the clear way to state the physical symmetry vs redundancy issue. You should evaluate ${\iota}_{\bf X}{\pmb \Omega}$. If it vanishes identically you have a redundancy, if it gives you some nonzero $-{\bf d}Q$ it gives you a symmetry and you have found its charge.
Now this is very general and in fact all of this structure was there when you studied Hamiltonian mechanics even if you haven't seem it! The new stuff really comes with the Covariant Phase Space formalism. The key aspect is that you start with the space of all field configurations ${\scr F}$ and inside it you define the space of solutions to the equations of motion $\scr S$ and you'll construct the phase space as an appropriate subspace of $\scr S$.
In particular variations of fields $\delta \phi$ define tangent vectors to $\scr S$. Given the Lagrangian density ${\cal L}$ if you define the Lagrangian form $L={\cal L}\epsilon$ where $\epsilon$ is the spacetime volume form and if you take its variation it can always be put in the form $$\delta L = E[\phi]\delta \phi + d{\pmb\theta[\phi,\delta\phi]}.$$
The object ${\pmb \theta}[\phi,\delta\phi]$ depends on $\phi$ and is linear in $\delta \phi$ so you identify it as a one-form in field space. It is also a $(D-1)$-form on spacetime, where $D$ is the spacetime dimension. We thus refer to it as $(D-1,1)$-form. Taking a one phase space exterior derivative we obtain a $(D-1,2)$-form ${\pmb \omega}={\bf d}{\pmb \theta}$. Finally if the spacetime has one Cauchy slice $\Sigma$ we define the pre-sympletic form
\begin{eqnarray}
    {\pmb \Omega}[\phi;\delta_1 \phi,\delta_2\phi]=\int_{\Sigma}{\pmb \omega}[\phi,\delta_1\phi,\delta_2\phi].
\end{eqnarray}
The key aspect now is that in general, if you have local transformations $\delta_\varepsilon$, like diffeomorphisms in the case of gravity, or gauge transformations in the cause of gauge theories, then ${\pmb \omega}[\phi;\delta_\varepsilon\phi,\delta\phi]$ will turn out to be a total derivative and ${\pmb \Omega}[\phi;\delta_\varepsilon\phi,\delta\phi]$ will turn out to be a boundary term at $\partial \Sigma$. Intuitively you can think of a Cauchy slice as "all of space at an instant of time" and then $\partial \Sigma$ is at infinity.
Now you must study this integral over $\partial \Sigma$. Can it be written as $\delta Q$ for some $Q$? If the answer is no, then the transformation is not canonical and hence not a symmetry. If the answer is yes then we study the charge $Q$. Transformations with parameter $\varepsilon|_{\partial \Sigma}$ such that $Q$ vanishes will give rise to redundancies. These are the trivial gauge transformations. Transformations with parameter $\varepsilon|_{\partial\Sigma}$ such that $Q$ doesn't vanish will give rise to true physical symmetries. These are large gauge transformations.
So the answer is: by "same physical situation" we mean points in phase space related by the flow of degenerate vectors of the symplectic form. Diffeomorphisms which act trivially at $\partial \Sigma$ would give rise to such degenerate vectors and hence relate redundant descriptions of the same physical situation. On the other hand, diffeomorphisms with non-trivial action at $\partial\Sigma$ will be true physical symmetries.
One central example are the BMS transformations in asymptotically flat spacetimes. They are diffeomorphisms, but they act non-trivially at the celestial sphere at null infinity and therefore they are true physical symmetries. Finally for more details on that I recommend arXiv:1703.05448 and arXiv:2009.14334.
A: The inter-relationship between diffeomorphism invariance and general covariance is subtle. These are not the same notions, but one can imply the other, and even yield useful "identities" which are valid off-shell, that is, regardless of equations of motions being satisfied. Several of non-trivial insights that come from correctly comparing diffeomorphism invariance and coordinate transformations are discussed in a pedadogical manner in:
Varying without varying: Reparameterisations, Diffeomorphisms, General Covariance, Lie derivatives, and all that
arxiv: 2004.04178
A: The statement "what physicists call GCTs (General Coordinate Transformations) is what mathematicians call diffeomorphisms" made by Prof. Legolasov is not correct, see e.g. the paper by Gasperini et al. (2009).
A diffeomorphism is a mapping $\phi: M \to M$, while a GCT is a Euclidean mapping $f : \mathbb R^4 \to \mathbb R^4$. Here $\phi \in \text{Diff}(M)$, while $f \in GL(4,\mathbb R)$ and note that $\text{Diff}(M)$ is not isomorphic to $GL(4, \mathbb R)$.
