Imports
/- Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Joseph Tooby-Smith -/ module public import Physlib.Relativity.Special.ProperTime

Twin Paradox

The twin paradox corresponds to the following scenario:

Two twins start at the same point startPoint in spacetime. Twin A travels at constant speed to the spacetime point endPoint, whilst twin B makes a detour through the spacetime twinBMid and then to endPoint.

In this file, we assume that both twins travel at constant speed, and that the acceleration of Twin B is instantaneous.

The conclusion of this scenario is that Twin A will be older than Twin B when they meet at endPoint. This is something we show here with an explicit example.

The origin of the twin paradox dates back to Paul Langevin in 1911.

@[expose] public section

The twin paradox assuming instantaneous acceleration.

The starting point of both twins.

The end point of both twins.

The point twin B travels to between the start point and the end point.

structure InstantaneousTwinParadox where startPoint : SpaceTime 3 endPoint : SpaceTime 3 twinBMid : SpaceTime 3 endPoint_causallyFollows_startPoint : causallyFollows startPoint endPoint twinBMid_causallyFollows_startPoint : causallyFollows startPoint twinBMid endPoint_causallyFollows_twinBMid : causallyFollows twinBMid endPoint

The proper time experienced by twin A travelling at constant speed from T.startPoint to T.endPoint.

def properTimeTwinA : := SpaceTime.properTime T.startPoint T.endPoint

The proper time experienced by twin B travelling at constant speed from T.startPoint to T.twinBMid, and then from T.twinBMid to T.endPoint.

The proper time of twin A minus the proper time of twin B.

def ageGap : := T.properTimeTwinA - T.properTimeTwinB
TODO "Find the conditions for which the age gap for the twin paradox is zero."

In the twin paradox with instantaneous acceleration, Twin A is always older then Twin B.

informal_lemma ageGap_nonneg where deps := [``ageGap] tag := "7ROVE"

Example 1

The twin paradox in which:

    Twin A starts at 0 and travels at constant speed to [15, 0, 0, 0].

    Twin B starts at 0 and travels at constant speed to [7.5, 6, 0, 0] and then at (different) constant speed to [15, 0, 0, 0].

T:InstantaneousTwinParadox0 < ((fun x => match x with | Sum.inl 0 => 15 | Sum.inr i => 0) - fun x => match x with | Sum.inl 0 => 15 / 2 | Sum.inr 0 => 6 | Sum.inr i => 0) (Sum.inl 0) * ((fun x => match x with | Sum.inl 0 => 15 | Sum.inr i => 0) - fun x => match x with | Sum.inl 0 => 15 / 2 | Sum.inr 0 => 6 | Sum.inr i => 0) (Sum.inl 0) - i, ((fun x => match x with | Sum.inl 0 => 15 | Sum.inr i => 0) - fun x => match x with | Sum.inl 0 => 15 / 2 | Sum.inr 0 => 6 | Sum.inr i => 0) (Sum.inr i) * ((fun x => match x with | Sum.inl 0 => 15 | Sum.inr i => 0) - fun x => match x with | Sum.inl 0 => 15 / 2 | Sum.inr 0 => 6 | Sum.inr i => 0) (Sum.inr i) T:InstantaneousTwinParadox6 * 6 < (15 - 15 / 2) * (15 - 15 / 2) All goals completed! 🐙
@[simp] lemma example1_properTimeTwinA : example1.properTimeTwinA = 15 := example1.properTimeTwinA = 15 All goals completed! 🐙@[simp] lemma example1_properTimeTwinB : example1.properTimeTwinB = 9 := example1.properTimeTwinB = 9 (7.5 * 7.5 - 6 * 6) + (15 * (15 - 7.5) - (7.5 * (15 - 7.5) + 6 * 6)) = 9 norm_num [show 81 = 9 from sqrt_eq_cases.mpr (9 * 9 = 81 0 9 81 < 0 9 = 0 All goals completed! 🐙), show 4 = 2 from sqrt_eq_cases.mpr (2 * 2 = 4 0 2 4 < 0 2 = 0 All goals completed! 🐙)]lemma example1_ageGap : example1.ageGap = 6 := example1.ageGap = 6 All goals completed! 🐙TODO "Do the twin paradox with a non-instantaneous acceleration. This should be done in a different module."