# Relativity Laboratory

## Result first

Reality Bit Engine 0.8 adds a numerical special- and general-relativity
laboratory. It:

1. applies Lorentz boosts in an arbitrary three-dimensional direction;
2. verifies Minkowski-interval invariance;
3. transforms energy-momentum four-vectors and checks the mass shell;
4. calculates proper time for timelike intervals;
5. evaluates Schwarzschild radius, static clock rate, escape speed,
   weak-field light deflection, periapsis advance and curvature;
6. constructs Christoffel symbols, Ricci curvature and the Einstein tensor
   from a supplied four-dimensional metric using centered derivatives.

These calculations test the seven-layer language against relativity. They do
not replace relativity or show a deviation from Einstein's theory.

## 1. Special relativity

Write a spacetime displacement in length units as

\[
X=(ct,\mathbf x).
\]

Reality Bit Engine uses metric signature \((+---)\):

\[
\boxed{s^2=(ct)^2-\mathbf x\cdot\mathbf x.}
\]

For dimensionless boost velocity

\[
\boldsymbol\beta=\mathbf v/c,
\qquad
\beta^2=\boldsymbol\beta\cdot\boldsymbol\beta<1,
\]

\[
\gamma=\frac1{\sqrt{1-\beta^2}}.
\]

The general boost is

\[
ct'=\gamma(ct-\boldsymbol\beta\cdot\mathbf x),
\]

\[
\boxed{
\mathbf x'
=
\mathbf x
+\left[
\frac{\gamma-1}{\beta^2}
(\boldsymbol\beta\cdot\mathbf x)
-\gamma ct
\right]\boldsymbol\beta.
}
\]

For \(\beta=0\), the identity map is returned directly. The implementation
rejects \(\beta^2\ge1\), non-finite values and spacelike inputs to the real
proper-time function.

### The invariant

Substitution gives

\[
(ct')^2-\|\mathbf x'\|^2
=(ct)^2-\|\mathbf x\|^2.
\]

The test suite checks this over 10,000 deterministic random events and
arbitrary-direction boosts. It also applies the inverse boost
\(-\boldsymbol\beta\) and recovers the original event within declared
long-double roundoff.

For timelike displacement,

\[
\boxed{\Delta\tau=\frac{\sqrt{s^2}}{c}.}
\]

The engine distinguishes timelike, lightlike and spacelike intervals through
the sign of \(s^2\); it does not force a real proper time onto a spacelike
separation.

## 2. Energy-momentum

The four-momentum is

\[
P=(E/c,\mathbf p).
\]

Its invariant mass is

\[
P\cdot P
=
\frac{E^2}{c^2}-\|\mathbf p\|^2
=m^2c^2,
\]

or, in the engine's returned mass-squared units,

\[
\boxed{
m^2=\frac{E^2}{c^4}-\frac{\|\mathbf p\|^2}{c^2}.
}
\]

The same Lorentz map transforms \(P\). Tests start with a rest particle,
boost it, and verify that the energy changes while the invariant rest mass
does not.

## 3. Schwarzschild exterior

For mass \(M\),

\[
\boxed{r_s=\frac{2GM}{c^2}.}
\]

Outside the horizon, a static Schwarzschild clock has rate

\[
\boxed{
\frac{d\tau}{dt}=\sqrt{1-\frac{r_s}{r}}.
}
\]

The corresponding local escape-speed expression is

\[
v_{\mathrm{esc}}=c\sqrt{\frac{r_s}{r}}.
\]

The weak-field light-deflection estimate is

\[
\delta_{\mathrm{light}}
\approx
\frac{2r_s}{b}
=
\frac{4GM}{bc^2}.
\]

For orbit semi-major axis \(a\) and eccentricity \(e\), the leading
periapsis advance is

\[
\boxed{
\Delta\varpi
=
\frac{3\pi r_s}{a(1-e^2)}
=
\frac{6\pi GM}{a(1-e^2)c^2}.
}
\]

The Schwarzschild Kretschmann curvature invariant is

\[
\boxed{
K=R_{\alpha\beta\gamma\delta}
R^{\alpha\beta\gamma\delta}
=
\frac{12r_s^2}{r^6}.
}
\]

For the declared solar values, the executable returns:

| Quantity | Result |
|---|---:|
| Solar Schwarzschild radius | \(2953.33938206687856\) m |
| Solar-limb clock rate / infinity | \(0.999997877430992954\) |
| Solar-limb weak deflection | \(8.4902670175848169\times10^{-6}\) rad |

## 4. Numerical Einstein tensor

Given a metric \(g_{\mu\nu}(x)\), the engine first calculates

\[
\Gamma^\rho_{\mu\nu}
=
\frac12g^{\rho\sigma}
\left(
\partial_\mu g_{\sigma\nu}
+\partial_\nu g_{\sigma\mu}
-\partial_\sigma g_{\mu\nu}
\right).
\]

It then evaluates

\[
R_{\mu\nu}
=
\partial_\rho\Gamma^\rho_{\mu\nu}
-\partial_\nu\Gamma^\rho_{\mu\rho}
+\Gamma^\rho_{\rho\lambda}\Gamma^\lambda_{\mu\nu}
-\Gamma^\rho_{\nu\lambda}\Gamma^\lambda_{\mu\rho},
\]

\[
R=g^{\mu\nu}R_{\mu\nu},
\]

\[
\boxed{G_{\mu\nu}=R_{\mu\nu}-\frac12g_{\mu\nu}R.}
\]

The derivatives are centered finite differences, so a nonzero residual can be
numerical truncation or roundoff rather than new physics. The metric matrix is
inverted using pivoted Gauss-Jordan elimination and singular metrics are
rejected.

### Executable vacuum check

At the demonstration point \(r=10\), \(\theta=1.1\), for a geometrized
Schwarzschild radius \(r_s=2\):

| Metric | Maximum \(|R_{\mu\nu}|\) | Maximum \(|G_{\mu\nu}|\) |
|---|---:|---:|
| Minkowski | \(0\) | \(0\) |
| Schwarzschild exterior | \(1.6050\times10^{-10}\) | \(1.7591\times10^{-10}\) |

At the same Schwarzschild point,

\[
K=4.8\times10^{-5}.
\]

This demonstrates the central general-relativity distinction:

\[
\boxed{
R_{\mu\nu}=0
\quad\not\Rightarrow\quad
R_{\alpha\beta\gamma\delta}=0.
}
\]

Vacuum can be curved.

## 5. Relation to the seven-layer language

| Layer | Relativity interpretation |
|---|---|
| \(D_1\) | event or body identity and local field state |
| \(D_2\) | causal, source and observer relationships |
| \(D_3\) | spatial coordinates and geometry |
| \(D_4\) | coordinate time, proper time and evolution |
| \(D_5\) | alternative frames, paths and phases |
| \(D_6\) | clock, trajectory, redshift and lensing observations |
| \(D_7\) | interval invariance, tensor covariance and field constraints |

This mapping is organizational. Relativity itself uses four-dimensional
spacetime. The table does not turn evidence for relativistic spacetime into
evidence for seven spatial dimensions.

The useful connection is naturality. A change of coordinates \(S\) may alter
components while preserving tensor equations:

\[
G'_{\mu\nu}
=
\frac{\partial x^\alpha}{\partial x'^\mu}
\frac{\partial x^\beta}{\partial x'^\nu}
G_{\alpha\beta}.
\]

The seven-layer theory likewise requires physical conclusions to survive
admissible coordinate relabeling.

## 6. Commands

    reality-bit-engine relativity-demo
    reality-bit-engine lorentz 12 3 -4 1 0.3 -0.2 0.1
    reality-bit-engine schwarzschild 1.98847e30 6.957e8 6.957e8 5.790905e10 0.20563
    reality-bit-engine curvature-demo

## 7. Scientific boundary

The laboratory establishes:

- correct implementation of declared Lorentz and Schwarzschild equations;
- numerical covariance checks;
- a reusable four-metric curvature evaluator;
- explicit residuals rather than visual agreement.

It does not establish:

- a modification of Einstein's equations;
- a seventh physical coordinate;
- a quantum theory of gravity;
- that a numerical near-zero is an analytic proof;
- that coordinate time is God's time.

A new theory must predict a coordinate-invariant observable that differs from
general relativity, fix its parameters before measurement, and outperform
general relativity on observations not used to construct it.
