Reasoning laboratory · Special relativity
What would actually distinguish these models?
A candidate can fail a stated constraint, remain useful in a limited regime, or agree with another candidate on every measurement you have chosen.
These are bounded, host-calculated comparisons of model consequences. No experiment of nature is being performed, and no historical data have been manufactured. The explanations remain drafts.
Reasoning laboratory · explanatory draft
Which constraint makes the difference?
Does a model that works for slow objects also keep the light speed unchanged?
The low-speed check, the light-speed postulate, and the inverse test ask different questions. Deselecting a requirement changes which questions count; it does not change a computed prediction or disprove classical mechanics.
Static worked example · ideal model, host calculation
Unapplied request. All numbers still belong to the accepted observer.
Static worked example. The numbers were computed at build time.
| Candidate and conditions | Low-speed composition: 10 m/s plus 10 m/s | Light-speed postulate | Forward map followed by its inverse | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Galilean absolute timeOrdinary low-speed mechanics with a shared absolute time. A change of coordinates has an inverse; retaining absolute time need not preserve the measured light speed. The selected comparison differs at: Light-speed postulate. Model: galilean-absolute-time-v1 | Low-speed composition: 10 m/s plus 10 m/s Included in the selected comparison Consistent with Low-speed composition: 10 m/s plus 10 m/s
Open the calculation: Low-speed composition: 10 m/s plus 10 m/sBoth candidates are compared with ordinary addition at the stated low speeds. The relativistic residual uses a cancellation-free expression so rounding two nearly equal speeds does not conceal the difference. This check keeps its own speeds when the main observer setting changes. Tolerance: the larger of 1e-9 m/s and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Light-speed postulate Included in the selected comparison Violates Light-speed postulate
Open the calculation: Light-speed postulateTransform the two events on a light ray and divide their spatial separation by their time separation. The required reference is the light speed, not a result copied from the competing candidate. Tolerance: the larger of 0.000001 m/s and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Forward map followed by its inverse Included in the selected comparison Consistent with Forward map followed by its inverse
Open the calculation: Forward map followed by its inverseTransform each event and then reverse the frame velocity with the same candidate. Compare with the original event. Invertibility alone does not establish the light-speed postulate. Time is reported as ct in metres for a common unit, not as an additional physical premise. Tolerance: the larger of 0.000001 m and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Einstein’s inertial-frame kinematicsAligned inertial frames with the relativity and light-speed postulates. This comparison tests consequences of the resulting map; it does not derive the map from its own predictions. None of the selected requirements excludes this candidate at the stated tolerance. Model: lorentz-1905-kinematics-v1 | Low-speed composition: 10 m/s plus 10 m/s Included in the selected comparison Consistent with Low-speed composition: 10 m/s plus 10 m/s
Open the calculation: Low-speed composition: 10 m/s plus 10 m/sBoth candidates are compared with ordinary addition at the stated low speeds. The relativistic residual uses a cancellation-free expression so rounding two nearly equal speeds does not conceal the difference. This check keeps its own speeds when the main observer setting changes. Tolerance: the larger of 1e-9 m/s and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Light-speed postulate Included in the selected comparison Consistent with Light-speed postulate
Open the calculation: Light-speed postulateTransform the two events on a light ray and divide their spatial separation by their time separation. The required reference is the light speed, not a result copied from the competing candidate. Tolerance: the larger of 0.000001 m/s and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Forward map followed by its inverse Included in the selected comparison Consistent with Forward map followed by its inverse
Open the calculation: Forward map followed by its inverseTransform each event and then reverse the frame velocity with the same candidate. Compare with the original event. Invertibility alone does not establish the light-speed postulate. Time is reported as ct in metres for a common unit, not as an additional physical premise. Tolerance: the larger of 0.000001 m and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
|
These are the candidates considered here, not every conceivable alternative.
The summary uses five significant digits; every cell offers full-precision values. The low-speed residual is evaluated without subtracting rounded speeds.
Inspect the fixed events for Forward map followed by its inverse
| Event | t (s) | x (m) | y (m) | z (m) |
|---|---|---|---|---|
| event-1 | -2.25 | -200000000 | -7 | 10 |
| event-2 | -2 | -100000000 | -6 | 9 |
| event-3 | -1.75 | 0 | -5 | 8 |
| event-4 | -1.5 | 100000000 | -4 | 7 |
| event-5 | -1.25 | 200000000 | -3 | 6 |
| event-6 | -1 | -200000000 | -2 | 5 |
| event-7 | -0.75 | -100000000 | -1 | 4 |
| event-8 | -0.5 | 0 | 0 | 3 |
| event-9 | -0.25 | 100000000 | 1 | 2 |
| event-10 | 0 | 200000000 | 2 | 1 |
| event-11 | 0.25 | -200000000 | 3 | 0 |
| event-12 | 0.5 | -100000000 | 4 | -1 |
| event-13 | 0.75 | 0 | 5 | -2 |
| event-14 | 1 | 100000000 | 6 | -3 |
| event-15 | 1.25 | 200000000 | 7 | -4 |
| event-16 | 1.5 | -200000000 | 8 | -5 |
| event-17 | 1.75 | -100000000 | 9 | -6 |
| event-18 | 2 | 0 | 10 | -7 |
| event-19 | 2.25 | 100000000 | 11 | -8 |
| event-20 | 2.5 | 200000000 | 12 | -9 |
Sources, dates and calculation identities
These source references support this explanatory model comparison. They do not mark a transcription, historical reconstruction or translation as reviewed.
Evaluator closure: source:sha256:4496b3131d2c5d435eaa4fa3dae86c4823160ff2fa8be51a071833eb0d13daba
Case revision: 0fc39130e4420bed4607bc992329a974949d6f7e671f19c272e0a7fba29844ef
Both candidates are computed separately. Shared numerical primitives do not preassign agreement or disagreement.
Reasoning laboratory · explanatory draft
When the chosen observations cannot decide
Can these kinematic measurements distinguish a privileged-frame interpretation?
These are predicted outcomes of specified measurements, not historical datasets. Compare each candidate with the other. Numerical agreement under these observations does not decide whether an ether exists; disagreement elsewhere would require another stated test. The historical source links are references, not reviewed edition text.
Static worked example · ideal model, host calculation
Unapplied request. All numbers still belong to the accepted observer.
Static worked example. The numbers were computed at build time.
| Candidate and conditions | Coordinates of twenty specified events | Simultaneous endpoint measurement of a 100 m rod | Moving-clock seconds per laboratory second | Collinear composition with an object at 0.6c | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lorentz’s ether-based kinematicsRelative coordinates, contraction and local time with Lorentz’s scale factor set to one, interpreted with a privileged frame. Velocity composition also uses the group property associated with Poincaré’s June 1905 parallel work. The selected observations do not distinguish these candidates. This candidate is not refuted by them. Model: lorentz-1904-local-time-l1-v1 | Coordinates of twenty specified events Included in the selected comparison Indistinguishable under this observation
Open the calculation: Coordinates of twenty specified eventsOne route first forms the Galilean relative coordinate, then applies Lorentz’s scaling and local time. The other uses the existing Lorentz boost owner. Neither route calls the other to produce these event coordinates. Components use ct, x, y and z in metres. Tolerance: the larger of 0.000001 m and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Simultaneous endpoint measurement of a 100 m rod Included in the selected comparison Indistinguishable under this observation
Open the calculation: Simultaneous endpoint measurement of a 100 m rodThe endpoints are fixed in the rod frame. Each candidate’s inverse map selects the endpoint times that are simultaneous in the laboratory. Equal times in the rod frame would answer a different length question. Tolerance: the larger of 1e-10 m and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Moving-clock seconds per laboratory second Included in the selected comparison Indistinguishable under this observation
Open the calculation: Moving-clock seconds per laboratory secondTransform two events on the moving clock’s worldline. Compare the elapsed rest-frame time per laboratory second. This is an inertial clock-rate comparison, not a round-trip or acceleration experiment. Tolerance: the larger of 1e-12 1 and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Collinear composition with an object at 0.6c Included in the selected comparison Indistinguishable under this observation
Open the calculation: Collinear composition with an object at 0.6cTransform a rest-frame worldline back to the laboratory with each candidate’s inverse map. The reference is the other candidate’s prediction. Poincaré’s June 1905 contribution is parallel work, not knowledge placed on the 1904 shelf. Tolerance: the larger of 0.000001 m/s and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Einstein’s inertial-frame kinematicsAligned inertial frames with the relativity and light-speed postulates. This comparison tests consequences of the resulting map; it does not derive the map from its own predictions. The selected observations do not distinguish these candidates. This candidate is not refuted by them. Model: lorentz-1905-kinematics-v1 | Coordinates of twenty specified events Included in the selected comparison Indistinguishable under this observation
Open the calculation: Coordinates of twenty specified eventsOne route first forms the Galilean relative coordinate, then applies Lorentz’s scaling and local time. The other uses the existing Lorentz boost owner. Neither route calls the other to produce these event coordinates. Components use ct, x, y and z in metres. Tolerance: the larger of 0.000001 m and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Simultaneous endpoint measurement of a 100 m rod Included in the selected comparison Indistinguishable under this observation
Open the calculation: Simultaneous endpoint measurement of a 100 m rodThe endpoints are fixed in the rod frame. Each candidate’s inverse map selects the endpoint times that are simultaneous in the laboratory. Equal times in the rod frame would answer a different length question. Tolerance: the larger of 1e-10 m and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Moving-clock seconds per laboratory second Included in the selected comparison Indistinguishable under this observation
Open the calculation: Moving-clock seconds per laboratory secondTransform two events on the moving clock’s worldline. Compare the elapsed rest-frame time per laboratory second. This is an inertial clock-rate comparison, not a round-trip or acceleration experiment. Tolerance: the larger of 1e-12 1 and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
| Collinear composition with an object at 0.6c Included in the selected comparison Indistinguishable under this observation
Open the calculation: Collinear composition with an object at 0.6cTransform a rest-frame worldline back to the laboratory with each candidate’s inverse map. The reference is the other candidate’s prediction. Poincaré’s June 1905 contribution is parallel work, not knowledge placed on the 1904 shelf. Tolerance: the larger of 0.000001 m/s and 1e-12 times the larger magnitude of prediction and reference. A rounding-sized boundary band is reported as indeterminate. A stated numerical comparison threshold, not a measurement uncertainty or a confidence interval. The absolute floor also covers zero components.
|
These are the candidates considered here, not every conceivable alternative.
The summary uses five significant digits; every cell offers full-precision values. The low-speed residual is evaluated without subtracting rounded speeds.
Inspect the fixed events for Coordinates of twenty specified events
| Event | t (s) | x (m) | y (m) | z (m) |
|---|---|---|---|---|
| event-1 | -2.25 | -200000000 | -7 | 10 |
| event-2 | -2 | -100000000 | -6 | 9 |
| event-3 | -1.75 | 0 | -5 | 8 |
| event-4 | -1.5 | 100000000 | -4 | 7 |
| event-5 | -1.25 | 200000000 | -3 | 6 |
| event-6 | -1 | -200000000 | -2 | 5 |
| event-7 | -0.75 | -100000000 | -1 | 4 |
| event-8 | -0.5 | 0 | 0 | 3 |
| event-9 | -0.25 | 100000000 | 1 | 2 |
| event-10 | 0 | 200000000 | 2 | 1 |
| event-11 | 0.25 | -200000000 | 3 | 0 |
| event-12 | 0.5 | -100000000 | 4 | -1 |
| event-13 | 0.75 | 0 | 5 | -2 |
| event-14 | 1 | 100000000 | 6 | -3 |
| event-15 | 1.25 | 200000000 | 7 | -4 |
| event-16 | 1.5 | -200000000 | 8 | -5 |
| event-17 | 1.75 | -100000000 | 9 | -6 |
| event-18 | 2 | 0 | 10 | -7 |
| event-19 | 2.25 | 100000000 | 11 | -8 |
| event-20 | 2.5 | 200000000 | 12 | -9 |
Sources, dates and calculation identities
- Einstein (1905), Zur Elektrodynamik bewegter Körper, §§2–5
- Lorentz (1904), Electromagnetic phenomena, §§3–4, 8; relative coordinates and local time
- Poincaré, 5 June 1905, Sur la dynamique de l’électron, pp. 1504–1508; parallel work Parallel work: not on the 1904 shelf.
These source references support this explanatory model comparison. They do not mark a transcription, historical reconstruction or translation as reviewed.
Evaluator closure: source:sha256:4496b3131d2c5d435eaa4fa3dae86c4823160ff2fa8be51a071833eb0d13daba
Case revision: 5cff4533b2e4a5bbaaecd3c22be1d31ae8d7b2c1f44c94fc06b2dc8e9afe420c
Both candidates are computed separately. Shared numerical primitives do not preassign agreement or disagreement.
Inspect the calculation, not just its conclusion
The ether route constructs a relative coordinate and local time independently of the Lorentz event-transform function. Clock rates, moving-rod lengths and composed speeds are then obtained from each candidate’s events. A comparison table never supplies a prewritten verdict.
Light-speed invariance is a stated constraint in the first case. Agreement under the second case’s observations does not prove that an ether exists or that it does not exist.
Show the calculation source used by this build
source:sha256:4496b3131d2c5d435eaa4fa3dae86c4823160ff2fa8be51a071833eb0d13daba
src/physics/reference/countermodels.ts
sha256:a381c58f18bccbb565a95b2d81668cf0c235cfadfac758b174a4bd5d21846188
/**
* Small, explicit countermodel owners; no outcomes are decided here.
* The ether route uses Lorentz's relative coordinate and local time with l = 1,
* not the Einstein event map. Composition in that case is attributed to
* Poincare's June 1905 parallel work, not silently to Lorentz 1904 alone.
*/
import { ok, outsideDomain } from "./kinematics/types.ts";
import {
alignedBoost,
type Event,
galileanMap,
galileanRelativisticVelocityDifference,
galileanVelocity,
gamma,
type KinematicResult,
speedOfLightMetresPerSecond,
transformEvent,
} from "./kinematics.ts";
export type CountermodelId = "galilean" | "lorentz" | "lorentz-ether";
export type EventMap = (event: Event, beta: number, c: number) => KinematicResult<Event>;
function domain(v: number, c: number): KinematicResult<never> | null {
if (!Number.isFinite(c) || c <= 0 || !Number.isFinite(v))
return outsideDomain("nonfinite-input", "Use finite speeds and a positive finite light speed.");
if (Math.abs(v) >= c)
return outsideDomain("superluminal-observer", "The comparison uses observers with |v| < c.");
return null;
}
function finiteNumber(value: number): KinematicResult<number> {
return Number.isFinite(value)
? ok(value)
: {
status: "outside-domain",
condition: "unrepresentable-result",
domainKind: "numerical",
reason: "This result is outside the finite numerical range.",
};
}
function finiteEvent(result: KinematicResult<Event>): KinematicResult<Event> {
if (result.status !== "value") return result;
return Object.values(result.value).every(Number.isFinite)
? result
: {
status: "outside-domain",
condition: "unrepresentable-result",
domainKind: "numerical",
reason: "The transformed event is outside the finite numerical range.",
};
}
/** Galilean addition, within the comparison's common subluminal input domain. */
export function galileanCompose(
u: number,
v: number,
c = speedOfLightMetresPerSecond(),
): KinematicResult<number> {
const bad = domain(v, c) ?? domain(u, c);
if (bad) return bad;
const result = galileanVelocity(u, -v);
return result.status === "value" ? finiteNumber(result.value) : result;
}
/** Galilean minus relativistic composition, without subtracting rounded speeds. */
export function lorentzCompositionResidual(
u: number,
v: number,
c = speedOfLightMetresPerSecond(),
): KinematicResult<number> {
const bad = domain(v, c) ?? domain(u, c);
if (bad) return bad;
// The existing owner's difference for a boost of -v is relativistic addition
// minus Galilean addition. Changing the sign keeps its cancellation-free path.
const result = galileanRelativisticVelocityDifference(u, -v, c);
return result.status === "value" ? finiteNumber(-result.value.difference) : result;
}
export function lorentz1904EventMap(
event: Event,
v: number,
c = speedOfLightMetresPerSecond(),
): KinematicResult<Event> {
const bad = domain(v, c);
if (bad) return bad;
const g = gamma(v / c);
if (g.status !== "value") return g;
const relative = galileanMap(event, v);
if (relative.status !== "value") return relative;
const xr = relative.value.x;
return finiteEvent(
ok({
x: g.value * xr,
t: event.t / g.value - g.value * (v / c) * (xr / c),
y: event.y,
z: event.z,
}),
);
}
/** Closed owner registry, deliberately without an arbitrary function-name evaluator. */
export function countermodelEventMap(
candidate: CountermodelId,
event: Event,
beta: number,
c = speedOfLightMetresPerSecond(),
): KinematicResult<Event> {
if (!Number.isFinite(beta) || Math.abs(beta) >= 1)
return outsideDomain("superluminal-observer", "Use a finite observer speed with |v/c| < 1.");
const bad = domain(beta * c, c);
if (bad) return bad;
if (candidate === "galilean") return finiteEvent(galileanMap(event, beta * c));
if (candidate === "lorentz-ether") return lorentz1904EventMap(event, beta * c, c);
if (candidate !== "lorentz")
return outsideDomain("unknown-model", "This candidate is not registered.");
const boost = alignedBoost(beta, c);
return boost.status === "value" ? finiteEvent(transformEvent(event, boost.value)) : boost;
}
/** A rate from two events on a worldline, not a second velocity-transform formula. */
export function mappedWorldlineSpeed(
map: EventMap,
u: number,
beta: number,
c: number,
): KinematicResult<number> {
if (!Number.isFinite(u) || Math.abs(u) > c)
return outsideDomain("invalid-speed", "The tested worldline must have |u| <= c.");
const origin = map({ t: 0, x: 0, y: 0, z: 0 }, beta, c);
const later = map({ t: 1, x: u, y: 0, z: 0 }, beta, c);
if (origin.status !== "value") return origin;
if (later.status !== "value") return later;
const dt = later.value.t - origin.value.t;
if (dt === 0)
return outsideDomain(
"zero-time-interval",
"These events have no time separation in this description.",
);
return finiteNumber((later.value.x - origin.value.x) / dt);
}
/** Rest-frame clock seconds per laboratory second, from the clock's worldline. */
export function mappedClockRate(map: EventMap, beta: number, c: number): KinematicResult<number> {
const origin = map({ t: 0, x: 0, y: 0, z: 0 }, beta, c);
const later = map({ t: 1, x: beta * c, y: 0, z: 0 }, beta, c);
if (origin.status !== "value") return origin;
if (later.status !== "value") return later;
return finiteNumber(later.value.t - origin.value.t);
}
/**
* Solve laboratory simultaneity with the candidate's inverse map. The two
* endpoints are fixed in the rod frame. Equal rod-frame times would measure
* a different thing; every candidate supplies its own required time offset.
*/
export function mappedRodLength(
map: EventMap,
properLength: number,
beta: number,
c: number,
): KinematicResult<number> {
if (!Number.isFinite(properLength) || properLength <= 0)
return outsideDomain("invalid-length", "Use a positive finite proper length.");
const timeBasis = map({ t: 1, x: 0, y: 0, z: 0 }, -beta, c);
const endAtZero = map({ t: 0, x: properLength, y: 0, z: 0 }, -beta, c);
if (timeBasis.status !== "value") return timeBasis;
if (endAtZero.status !== "value") return endAtZero;
if (timeBasis.value.t === 0)
return outsideDomain(
"singular-time-map",
"This map cannot select simultaneous laboratory endpoints.",
);
const end = map(
{ t: -endAtZero.value.t / timeBasis.value.t, x: properLength, y: 0, z: 0 },
-beta,
c,
);
const start = map({ t: 0, x: 0, y: 0, z: 0 }, -beta, c);
if (end.status !== "value") return end;
if (start.status !== "value") return start;
return finiteNumber(end.value.x - start.value.x);
}
src/reasoning/countermodel/cellEvaluator.ts
sha256:adaefa8de4e589274e454abcf40e57a39ff1ddc51d4fc03a19ecfcd17505024c
/** Runs declared tests through the numerical owners. Cases supply inputs, never verdicts. */
import type { ScientificResult } from "../../experiments/results/types.ts";
import type { OutputContract } from "../../experiments/store/instanceStore.ts";
import {
countermodelEventMap,
galileanCompose,
lorentzCompositionResidual,
mappedClockRate,
mappedRodLength,
mappedWorldlineSpeed,
} from "../../physics/reference/countermodels.ts";
import {
type Event,
type KinematicResult,
speedOfLightMetresPerSecond,
} from "../../physics/reference/kinematics.ts";
import {
type CountermodelCase,
type CountermodelTest,
parseCountermodelCase,
testUnit,
} from "./caseSchema.ts";
export const OUTPUT_PARTS = ["Values", "Reference", "Residual"] as const;
export function cellQuantity(
candidate: number,
test: number,
part: (typeof OUTPUT_PARTS)[number],
): string {
return `candidate${candidate}Test${test}${part}`;
}
export function caseOutputs(spec: CountermodelCase): Readonly<Record<string, OutputContract>> {
const entries: [string, OutputContract][] = [];
spec.candidates.forEach((candidate, i) => {
spec.tests.forEach((test, j) => {
OUTPUT_PARTS.forEach((part) => {
entries.push([
cellQuantity(i, j, part),
{
unit: testUnit(test.test),
semanticKind: `countermodel-${part.toLowerCase()}`,
ownerId: `countermodels.${candidate.id}.${test.test}`,
statuses: ["value", "outside-domain"],
},
]);
});
});
});
return Object.freeze(Object.fromEntries(entries));
}
export function cellSampleLabels(test: CountermodelTest): readonly string[] {
return test.inputs.events
? test.inputs.events.flatMap((event) =>
["ct", "x", "y", "z"].map((axis) => `${event.id}: ${axis}`),
)
: [test.label];
}
class UnavailablePrediction extends Error {
readonly result: Extract<KinematicResult<never>, { status: "outside-domain" }>;
constructor(result: Extract<KinematicResult<never>, { status: "outside-domain" }>) {
super(result.reason);
this.result = result;
}
}
function value<T>(result: KinematicResult<T>): T {
if (result.status !== "value") throw new UnavailablePrediction(result);
return result.value;
}
const components = (event: Event, c: number): number[] => [event.t * c, event.x, event.y, event.z];
function predictions(
spec: CountermodelCase,
i: number,
test: CountermodelTest,
beta: number,
c: number,
): number[] {
const candidate = spec.candidates[i];
if (!candidate) throw new TypeError("Unknown candidate index.");
const map = (event: Event, b: number, light: number) =>
countermodelEventMap(candidate.id, event, b, light);
const p = test.inputs;
switch (test.test) {
case "low-speed":
return [
candidate.id === "galilean"
? value(galileanCompose(p.u as number, p.v as number, c))
: value(mappedWorldlineSpeed(map, p.u as number, -(p.v as number) / c, c)),
];
case "light-speed":
return [value(mappedWorldlineSpeed(map, c, beta, c))];
case "inverse":
return (p.events ?? []).flatMap((event) =>
components(value(map(value(map(event, beta, c)), -beta, c)), c),
);
case "events":
return (p.events ?? []).flatMap((event) => components(value(map(event, beta, c)), c));
case "rod":
return [value(mappedRodLength(map, p.properLength as number, beta, c))];
case "clock":
return [value(mappedClockRate(map, beta, c))];
case "composition":
return [value(mappedWorldlineSpeed(map, (p.worldlineBeta as number) * c, -beta, c))];
}
}
export type CountermodelEvaluation = Readonly<{
outputs: readonly ScientificResult[];
stepIndex: 0;
simulationTime: 0;
}>;
export function evaluateCountermodelCase(
input: CountermodelCase,
beta: number,
): CountermodelEvaluation {
const spec = parseCountermodelCase(input);
if (!Number.isFinite(beta) || Math.abs(beta) > 0.95)
throw new RangeError(
"Use an observer speed v/c between -0.95 and 0.95 for this bounded comparison.",
);
const c = speedOfLightMetresPerSecond();
const contracts = caseOutputs(spec),
outputs: ScientificResult[] = [];
spec.tests.forEach((test, j) => {
// Each candidate is evaluated separately, exactly once per test.
const calculated = spec.candidates.map((_, i) => {
try {
return { values: predictions(spec, i, test, beta, c) };
} catch (error) {
if (error instanceof UnavailablePrediction) return { failure: error.result };
throw error;
}
});
spec.candidates.forEach((candidate, i) => {
const actual = calculated[i],
other = calculated[1 - i];
let reference: number[];
if (test.kind === "observation") reference = other?.values ?? [];
else if (test.test === "low-speed")
reference = [value(galileanCompose(test.inputs.u as number, test.inputs.v as number, c))];
else if (test.test === "light-speed") reference = [c];
else reference = (test.inputs.events ?? []).flatMap((event) => components(event, c));
const failure = actual?.failure ?? (test.kind === "observation" ? other?.failure : undefined);
const values = actual?.values ?? [];
const residuals = values.map((n, k) => n - (reference[k] ?? NaN));
if (test.test === "low-speed" && candidate.id === "lorentz") {
residuals[0] = -value(
lorentzCompositionResidual(test.inputs.u as number, test.inputs.v as number, c),
);
}
OUTPUT_PARTS.forEach((part, k) => {
const quantityId = cellQuantity(i, j, part),
contract = contracts[quantityId];
if (!contract) throw new TypeError("Missing countermodel output contract.");
const common = {
quantityId,
unit: contract.unit,
semanticKind: contract.semanticKind,
ownerId: contract.ownerId,
};
if (failure)
outputs.push({
...common,
...failure,
boundary: { alternativeModel: "Choose inputs within the stated numerical domain." },
});
else {
const data = [values, reference, residuals][k];
if (
!data ||
data.length !== cellSampleLabels(test).length ||
!data.every(Number.isFinite)
)
throw new RangeError(
"Countermodel outputs must be finite and have the declared sample layout.",
);
outputs.push({ ...common, status: "value", value: Float64Array.from(data) });
}
});
});
});
return { outputs, stepIndex: 0, simulationTime: 0 };
}
All files included in the evaluator digest
scripts/generate-countermodels.mjssrc/content/checks/voice/index.tssrc/content/checks/voice/matchers.tssrc/content/checks/voice/rules.tssrc/content/compiler/loaders.tssrc/content/kernel/sourceDigest.tssrc/content/provenance/yaml.tssrc/experiments/results/codec.tssrc/experiments/results/outcomes.tssrc/experiments/results/refusalCodes.tssrc/experiments/results/refusals.tssrc/experiments/results/types.tssrc/experiments/store/instanceStore.tssrc/physics/reference/constants.tssrc/physics/reference/countermodels.tssrc/physics/reference/kinematics.tssrc/physics/reference/kinematics/concordance.tssrc/physics/reference/kinematics/constraints.tssrc/physics/reference/kinematics/mode1904.tssrc/physics/reference/kinematics/types.tssrc/reasoning/countermodel/caseSchema.tssrc/reasoning/countermodel/cellEvaluator.tssrc/reasoning/countermodel/session.tssrc/units/tolerance.ts