Where is the Lorentz signature enforced in general relativity? I'm trying to understand general relativity. Where in the field equations is it enforced that the metric will take on the (+---) form in some basis at each point?
Some thoughts I've had:

*

*It's baked into the Ricci tensor. This doesn't make sense to me because you can define the Riemann curvature for standard non Lorentzian surfaces.


*It's baked into the initial/boundary conditions which then propagate to the rest of spacetime.


*It's baked into the stress-energy tensor. This doesn't make sense to me because the vacuum equations are also Lorentzian.


*It's baked into the Einstein tensor and has something to do with conservation in energy.


*It's an implicit assumption and non-Lorentzian solutions are ignored.


*I'm looking at the whole thing wrong.
 A: As a simplified, purely mathematical answer, the signature of the metric is baked into the initial/boundary conditions. First of all note that it cannot change along a smooth enough connected space-time, as regions of different signatures would need to be separated by sets on which the metric is degenerate, i.e. singularities where GR does not hold. So once the signature is fixed at some point, it is fixed everywhere.
Now consider the kinds of problems we would like to solve:
If you want to use GR to predict future behavior of something, e.g. of our solar system, you would start with its current state as initial data and continue from there. We know that the current state has a locally Minkowski metric. But then all future states have the same signature.
Another type of problem that is studied abstractly a lot, is the influence of gravity on the space-time around a heavy object, e.g. the Schwarzschild-solution. We think of this object as existing somewhere in our universe. Even though we do not model the rest of the universe, we would like the solution in empty space far away from the object (i.e. the boundary condition at infinity) to behave similarly to the empty space we know. So the boundary condition again specifies a Minkowski signature.
The same applies to all other problems. If the signature of your solution is different from the signature we have at home, there is no way to find a space-time that connects your solution to us. Whatever universe you are calculating, if the signature is wrong, it might have some mathematical interest, but (at least within GR) it is completely inaccessible to our physical reality and thus strictly speaking not physics.
A: Quoted from Pseudo-Riemannian manifold - Lorentzian manifold:

A principal premise of general relativity is that spacetime
can be modeled as a 4-dimensional Lorentzian manifold
of signature $(-,+,+,+)$ or, equivalently, $(+,-,-,-)$.

So this is similar to your option 5.
A: The Lorentzian signature of the metric is "baked into" the local causal structure (the set of "light cones", one at each event) of spacetime, which plays a role in the initial value formulation.
A: 4-dimensional Lorenzian manifold was the most natural way to express the invariance of light velocity (Maxwell's wave equation), in terms of metric $$ds^2=c^2 dt^2-dx^2-dy^2-dz^2$$ For Herman Minkowski, Einstein's mathematics teacher and co-founder of General Relativity mathematical formulation, time was just the 4-dimension. However, colloquially speaking, physics is mathematics but with units. That are for time and space apparently different. The same metric equation can be written in a dual 4-dimensional Riemaniann space as $$c^2 dt^2=ds^2+dx^2+dy^2+dz^2,$$ where the coordinate $s$ represents the 4-dimension and the coordinate time $t$ is affine parameter with $c~dt$ as a path's length, see for example "Riemannian manifolds dual to static spacetimes" [1].
The Lorenzian metric (signature) is merely convention used by physicists because our perception of the fourth dimension is not the same as of the spatial ones. We are not able to see it directly. Indirectly, we register it by difference in elapsed proper time for observers that follow different paths in the 4-dimensional space.
[1]
: https://arxiv.org/abs/2004.10505
A: The Lorentz signature is just part of the theory; for example in a weak-field limit, we should reduce to special relativity, which is described using Lorentz signature (in order to talk about light, and also because Lorentz signature allows us to encode time and space into a single entity, and defines our notions of causality).

*

*No, it's not in the Ricci tensor. Any smooth manifold admits a connection $\nabla$, and with respect to this connection we can consider its curvature tensor $R^a_{\,bcd}$, and from this by taking a contraction we can define the Ricci tensor $R_{ab}= R^s_{\,asb}$. And connections can be very arbitrary, not necessarily even arising from a pseudo-Riemannian metric.

*I don't see any direct links.

*No it's not in the stress energy tensor. For instance, suppose we have an arbitrary pseudo-Riemannian metric $g$ (arbitrary signature $(p,q)$). We can still consider its Einstein tensor $R_{ab}-\frac{1}{2}Rg_{ab}$. By setting this to $0$, we see that $\Bbb{R}^4$ with the standard flat pseudo-Riemannian metric $\eta_{p,q}$ is a solution. However, for this to bear any resemblance to (special) relativity we need a $(1,3)$ signature split.

*See (3).

*Yes (though I'd say it's an explicit assumption).

*You mentioned (5), so you're not looking at it wrong.

Also, when coming up with any particular solution, such as Schwarzschild, or Kerr or anything else, the ansatz already imposes Lorentz signature.
