feat(Relativity): equality case of the reverse triangle inequality, twin paradox age gap zero - #1643
Conversation
…win paradox age gap nonnegative Adds Physlib/Relativity/Tensors/RealTensor/Vector/Causality/ReverseTriangle.lean with IsFutureCausal, isFutureCausal_of_causallyFollows, the elementary inequality sqrt_mul_sqrt_le, norm_spatialPart_le_timeComponent, the reverse Cauchy-Schwarz inequality sqrt_mul_sqrt_le_minkowskiProduct, minkowskiProduct_add_self, the reverse triangle inequality sqrt_add_sqrt_le_sqrt_add and isFutureCausal_add. In Physlib/Relativity/Special/TwinParadox/Basic.lean, replaces the informal lemma ageGap_nonneg (tag 7ROVE) by a proof. Generated with Claude Code under human supervision (see AI-POLICY.md). Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…win paradox age gap zero Adds to Physlib/Relativity/Tensors/RealTensor/Vector/Causality/ReverseTriangle.lean the equality cases minkowskiProduct_eq_iff (equality in the reverse Cauchy-Schwarz inequality iff the vectors are proportional with a nonnegative factor) and sqrt_add_eq_iff, with the helpers eq_zero_of_timeComponent_of_spatialPart, apply_inr_eq_zero_of_norm_spatialPart, minkowskiProduct_smul_self and sqrt_minkowskiProduct_smul_self; and to Physlib/Relativity/Special/TwinParadox/Basic.lean the lemma ageGap_eq_zero_iff (the age gap vanishes iff the turning point of Twin B lies on the worldline of Twin A) and example1_ageGap_ne_zero, resolving the TODO on the vanishing age gap. Generated with Claude Code under human supervision (see AI-POLICY.md). Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
|
Thank you for this pull-request (PR). If this is your first PR, welcome to the community! Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.
Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages. If you have any problems or questions, please reach out to the community on the Zulip. |
…cture, lemmas next to their definitions Applies the review remarks of leanprover-community#1642: the predicate IsFutureCausal is replaced by causallyFollows 0 u (equivalent), the file is renamed Causality/CausallyFollows.lean, the Minkowski product lemmas move to MinkowskiProduct.lean, the component lemmas to Vector/Basic.lean, and the elementary inequality is inlined in the proofs that use it. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…esis As requested in the review of leanprover-community#1642: the lemmas of CausallyFollows.lean whose hypotheses are causallyFollows 0 u end with _of_causallyFollows. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…nch is stacked on)
jstoobysmith
left a comment
There was a problem hiding this comment.
One more comment from me here.
| have hv := causallyFollows_zero_sub T.endPoint_causallyFollows_twinBMid | ||
| have hsum : T.endPoint - T.startPoint | ||
| = (T.twinBMid - T.startPoint) + (T.endPoint - T.twinBMid) := by abel | ||
| have hgap : T.ageGap = √⟪(T.twinBMid - T.startPoint) + (T.endPoint - T.twinBMid), |
There was a problem hiding this comment.
I think it might be useful to extract this as its own separate lemma, as it might be useful for other circumstances as well.
…two legs of Twin B As suggested in the review of leanprover-community#1643; used by ageGap_eq_zero_iff and ageGap_nonneg. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
jstoobysmith
left a comment
There was a problem hiding this comment.
I've approved this. This looks good, and many thanks for splitting up the two different changes into different commits and linking to them here. I wonder if we should actually add something like that to our agents.md because it makes the review process easier, especially if one can click through the commits to see
|
Thanks! Happy to make that a habit, and I agree it would help reviewers: one commit per review comment, each commit named after what it changes, and the PR comment that answers a review thread pointing to the commit hash. It costs the author nothing if the fix is done right after reading the comment. If you would like, I can open a small PR adding three lines to
Say the word and I will open it. |
AI disclosure
AI disclosure. This PR was generated with Claude Fable 5.1 (Claude Code) under my
supervision, following
AI-POLICY.mdandAGENTS.md. I have read every definition and lemmastatement and vouch that they state what the docstrings say. The statements were fixed before
the proofs were written; the elementary inequality at the core was checked symbolically.
Stacked on #1642 (
twin-paradox-11): the diff includes its commit; only the last commit is new here.Resolves the TODO "conditions for which the age gap is zero".
Added to
CausallyFollows.lean(section D, the equality cases):minkowskiProduct_eq_iff_of_causallyFollows: foru,vin the causal future of the origin, equality⟪u, v⟫ₘ = √⟪u, u⟫ₘ √⟪v, v⟫ₘholds if and only if∃ μ ≥ 0, v = μ • u ∨ u = μ • v(light-like cases included).
sqrt_add_eq_iff_of_causallyFollows: equality in the reverse triangle inequality if and only if equality in thereverse Cauchy-Schwarz inequality.
Added next to the definitions they are about:
minkowskiProduct_smul_self,sqrt_minkowskiProduct_smul_selfinMinkowskiProduct.lean;eq_zero_of_timeComponent_of_spatialPart,apply_inr_eq_zero_of_norm_spatialPartinVector/Basic.lean.Added to
TwinParadox/Basic.lean:ageGap_eq_zero_iff:T.ageGap = 0 ↔ ∃ μ ∈ [0, 1], T.twinBMid = T.startPoint + μ • (T.endPoint - T.startPoint), i.e. the age gap vanishes exactly when Twin B does not turn.example1_ageGap_ne_zero.Reviewer map:
minkowskiProduct_eq_iff_of_causallyFollows(the case analysis, the longest proof), thensqrt_add_eq_iff_of_causallyFollows, thenageGap_eq_zero_iff.Update (Sept 11). Review remarks of #1642 applied (third commit):
causallyFollows 0 uinstead of a new predicate, lemmas placed next to the definitions of their objects, file renamedCausallyFollows.lean.Update (Sept 11, later). Second review remark applied: the lemmas whose hypotheses are
causallyFollows 0 unow end with_of_causallyFollows.Update (Sept 11, evening). Review remark applied: the expression of the age gap in terms of the two legs of Twin B is now its own lemma,
ageGap_eq, used byageGap_eq_zero_iffand by the mergedageGap_nonneg.🤖 Generated with Claude Code