Skip to content

feat(Relativity): reverse Cauchy-Schwarz and triangle inequalities, twin paradox age gap nonnegative - #1642

Merged
jstoobysmith merged 3 commits into
leanprover-community:masterfrom
KevorkianPhilippe:twin-paradox-11
Sep 11, 2026
Merged

jstoobysmith merged 3 commits into
leanprover-community:masterfrom
KevorkianPhilippe:twin-paradox-11

Conversation

@KevorkianPhilippe

@KevorkianPhilippe KevorkianPhilippe commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

AI disclosure

AI disclosure. This PR was generated with Claude Fable 5.1 (Claude Code) under my
supervision, following AI-POLICY.md and AGENTS.md. I have read every definition and lemma
statement 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.

Turns the informal lemma ageGap_nonneg (tag 7ROVE) of
Physlib/Relativity/Special/TwinParadox/Basic.lean into a proved lemma, through the reverse
triangle inequality of Minkowski space, which was not in Physlib.

New file Physlib/Relativity/Tensors/RealTensor/Vector/Causality/CausallyFollows.lean
(namespace Lorentz.Vector), about vectors in the causal future of the origin, causallyFollows 0 u:

  • causallyFollows_zero_iff: causallyFollows 0 u ↔ 0 ≤ ⟪u, u⟫ₘ ∧ 0 ≤ u.timeComponent;
    causallyFollows_zero_sub: causallyFollows p q → causallyFollows 0 (q - p).
  • norm_spatialPart_le_timeComponent_of_causallyFollows: ‖u_spatial‖ ≤ u⁰.
  • sqrt_mul_sqrt_le_minkowskiProduct_of_causallyFollows: the reverse Cauchy-Schwarz inequality
    √⟪u, u⟫ₘ √⟪v, v⟫ₘ ≤ ⟪u, v⟫ₘ for u, v in the causal future of the origin (Euclidean
    Cauchy-Schwarz on the spatial parts plus the elementary inequality
    √(a² - c²) √(b² - d²) ≤ a b - c d for 0 ≤ c ≤ a, 0 ≤ d ≤ b, inlined in the proof).
  • sqrt_add_sqrt_le_sqrt_add_of_causallyFollows: the reverse triangle inequality
    √⟪u, u⟫ₘ + √⟪v, v⟫ₘ ≤ √⟪u + v, u + v⟫ₘ; causallyFollows_zero_add_of_causallyFollows.

Added to MinkowskiProduct.lean, next to minkowskiProduct_self_eq_timeComponent_spatialPart:
minkowskiProduct_self_eq_sq_sub (⟪u, u⟫ₘ = (u⁰)² - ‖u_spatial‖²) and minkowskiProduct_add_self.

TwinParadox/Basic.lean: informal_lemma ageGap_nonneg replaced by
lemma ageGap_nonneg : 0 ≤ T.ageGap. Physlib.lean: the new file registered.

Reviewer map: CausallyFollows.lean sections B (reverse Cauchy-Schwarz, with the elementary
inequality inlined) and C; then the four-line proof of ageGap_nonneg.

Update (Sept 11). Review remarks applied (second commit): no separate predicate, everything is
stated with causallyFollows 0 u; the file is named after that structure; the Minkowski product
lemmas moved next to the definition of the product; the elementary inequality is inlined. The same
rules were applied to the other open PRs of mine.

Update (Sept 11, later). Second review remark applied: the lemmas whose hypotheses are causallyFollows 0 u now end with _of_causallyFollows.

🤖 Generated with Claude Code

…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>
@github-actions

Copy link
Copy Markdown
Contributor

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.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

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.

@github-actions github-actions Bot added the t-relativity Relativity label Sep 11, 2026

@jstoobysmith jstoobysmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments here are specific to this pull request but probably extend throughout all of the pull requests that you've made. Could you make sure that these are addressed in all of them, because it would make the review process a lot quicker or easier? If you have any ideas of how you can make the review process easier for us, that would also be great.


/-- For `0 ≤ c ≤ a` and `0 ≤ d ≤ b`, `√(a² - c²) √(b² - d²) ≤ a b - c d`: indeed
`(a b - c d)² - (a² - c²)(b² - d²) = (a d - b c)²`. -/
lemma sqrt_mul_sqrt_le {a b c d : ℝ} (hc : 0 ≤ c) (hca : c ≤ a) (hd : 0 ≤ d) (hdb : d ≤ b) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, we shouldn't include lemmas like this. It's best just to include them in the proofs of our results because they mess up the code.

-/

/-- `⟪u, u⟫ₘ = (u⁰)² - ‖u_spatial‖²`. -/
lemma minkowskiProduct_self_eq_sq_sub {d : ℕ} (u : Vector d) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should go near the definition of Minkowski products.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise with some of the other definitions in this file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename this file "IsFutureCausal" because that is the data structure that the results in this file are about, rather than naming it after the lemma or the property.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or if it's just the same as "causally follows" with one of the vectors zero, we should just use that instead.

@jstoobysmith

Copy link
Copy Markdown
Member

Should have also said: many thanks for these. They look, in general, very good. Just one or two things probably need changing with each of them.

@jstoobysmith jstoobysmith added the awaiting-author A reviewer has asked the author a question or requested changes label Sep 11, 2026
…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>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…ive bridges next to their definition

Applies the review remarks of leanprover-community#1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…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>
@KevorkianPhilippe

Copy link
Copy Markdown
Contributor Author

Thank you for the review. The four points are now applied across all my open PRs (one extra commit per branch, no force-push): no isolated general-purpose lemma, lemmas next to the definition of their object, files named after the structure, and causallyFollows 0 u instead of a new predicate. Each PR body carries an "Update (Sept 11)" note describing the change. To make reviewing easier I will keep one file or one section per PR, a short reviewer map at the top of each body, and an explicit note whenever a PR touches a file outside its topic.

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Sep 11, 2026

@jstoobysmith jstoobysmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and sounds good to me. I've added one more comment here, but otherwise this pull request looks good.


/-- For a vector in the causal future of the origin, the Euclidean norm of the spatial part is at
most the time component. -/
lemma norm_spatialPart_le_timeComponent {d : ℕ} {u : Vector d} (hu : causallyFollows 0 u) :

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lemma and the ones that follow it should end with _of_causallyFollows

@jstoobysmith jstoobysmith added the awaiting-author A reviewer has asked the author a question or requested changes label Sep 11, 2026
…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>
KevorkianPhilippe pushed a commit to KevorkianPhilippe/physlib that referenced this pull request Sep 11, 2026
…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>
@KevorkianPhilippe

KevorkianPhilippe commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Renamed as requested (_of_causallyFollows), in 5d60cb3 here and ce1add9 on #1643.

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Sep 11, 2026

@jstoobysmith jstoobysmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. This now looks good to me. I will merge it shortly. Could you update the pull requests that depend on this after this merger has gone through. I think you're probably aware of this already, but PhyslibAlpha has a much quicker process to get stuff in, where we don't have to go through quite as detailed a review process. If you want to skip that phase and put stuff straight into PhyslibAlpha, that's fine. Obviously, we appreciate you taking the time to go through these reviews.

@jstoobysmith jstoobysmith added the ready-to-merge This PR is approved and will be merged shortly label Sep 11, 2026
@jstoobysmith
jstoobysmith merged commit 8b2b237 into leanprover-community:master Sep 11, 2026
9 checks passed
@KevorkianPhilippe

Copy link
Copy Markdown
Contributor Author

Thank you. The dependent pull requests are updated: master merged into #1643 and into the cosmology stack #1633 to #1641 (no force-push). Since #1632 was merged before its review fixes were pushed, #1633 now carries those fixes for the de Sitter part; this is noted in its body. I will keep the series that fill Physlib TODO items under the full review, and use PhyslibAlpha for material outside the TODO list.

jstoobysmith pushed a commit that referenced this pull request Sep 12, 2026
…win paradox age gap zero (#1643)

* feat(Relativity): reverse Cauchy-Schwarz and triangle inequalities, twin 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>

* feat(Relativity): equality case of the reverse triangle inequality, twin 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>

* style(Relativity): use causallyFollows 0 u, file named after the structure, lemmas next to their definitions

Applies the review remarks of #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>

* style(Relativity): name the lemmas after their causallyFollows hypothesis

As requested in the review of #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>

* refactor(Relativity): extract ageGap_eq, the age gap in terms of the two legs of Twin B

As suggested in the review of #1643; used by ageGap_eq_zero_iff and ageGap_nonneg.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* style(Relativity): indent the statement of ageGap_eq

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Philippe Kevorkian <philippe@hotelrelaisduloir.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
jstoobysmith pushed a commit that referenced this pull request Sep 16, 2026
…(radiation, Einstein-de Sitter) (#1633)

* feat(Cosmology): de Sitter solution of the Friedmann equations

Adds to Physlib/Cosmology/FLRW/Solutions.lean the de Sitter scale factor
deSitterScaleFactor, its time derivatives, and the lemmas
deSitterScaleFactor_firstOrderFriedmann, deSitterScaleFactor_secondOrderFriedmann,
hubbleConstant_deSitterScaleFactor and decelerationParameter_deSitterScaleFactor,
resolving the first TODO of the file. Also deriv_comp_val, the time derivative of a
curve given as a function of the time coordinate.

Generated with Claude Code under human supervision (see AI-POLICY.md).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* feat(Cosmology): flat power-law solutions of the Friedmann equations

Adds to Physlib/Cosmology/FLRW/Solutions.lean the power-law scale factor
powerLawScaleFactor with its derivatives, Hubble and deceleration parameters, the
density powerLawDensity it imposes, and the radiation-dominated
(radiationScaleFactor, radiationDensity, radiationPressure) and Einstein-de Sitter
(einsteinDeSitterScaleFactor, einsteinDeSitterDensity) instances with their Friedmann
lemmas, q and H(t0), resolving two TODOs of the file. Also deriv_eq_of_hasDerivAt.

Generated with Claude Code under human supervision (see AI-POLICY.md).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* chore(Cosmology): order authors alphabetically by last name

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* style(Cosmology): inline one-off helper lemmas, move the Time derivative bridges next to their definition

Applies the review remarks of #1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* refactor(Cosmology): inline the power-law scaffolding of the flat solutions

The general power-law solution a = (t / t0) ^ n is stated inline in the lemmas, quantified
over n; the defs powerLawScaleFactor, powerLawDensity, radiationDensity, radiationPressure and
einsteinDeSitterDensity and the two _eq glue lemmas are removed, the densities and the
pressure now appear in the theorem statements, and radiationScaleFactor and
einsteinDeSitterScaleFactor are defined directly.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* refactor(Cosmology): the normalisation epoch of the power-law solutions is a Time

t0 : Time instead of a real number in the power-law, radiation-dominated and Einstein-de Sitter
solutions (so H(t0) is stated at t0 itself), and docstrings saying that t0 is the
normalisation epoch a(t0) = 1, that the Big Bang sits at the origin t.val = 0 of the time
chart, and that the values for t.val <= 0 are junk.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Philippe Kevorkian <philippe@hotelrelaisduloir.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
jstoobysmith pushed a commit that referenced this pull request Sep 16, 2026
#1634)

* feat(Cosmology): de Sitter solution of the Friedmann equations

Adds to Physlib/Cosmology/FLRW/Solutions.lean the de Sitter scale factor
deSitterScaleFactor, its time derivatives, and the lemmas
deSitterScaleFactor_firstOrderFriedmann, deSitterScaleFactor_secondOrderFriedmann,
hubbleConstant_deSitterScaleFactor and decelerationParameter_deSitterScaleFactor,
resolving the first TODO of the file. Also deriv_comp_val, the time derivative of a
curve given as a function of the time coordinate.

Generated with Claude Code under human supervision (see AI-POLICY.md).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* feat(Cosmology): flat power-law solutions of the Friedmann equations

Adds to Physlib/Cosmology/FLRW/Solutions.lean the power-law scale factor
powerLawScaleFactor with its derivatives, Hubble and deceleration parameters, the
density powerLawDensity it imposes, and the radiation-dominated
(radiationScaleFactor, radiationDensity, radiationPressure) and Einstein-de Sitter
(einsteinDeSitterScaleFactor, einsteinDeSitterDensity) instances with their Friedmann
lemmas, q and H(t0), resolving two TODOs of the file. Also deriv_eq_of_hasDerivAt.

Generated with Claude Code under human supervision (see AI-POLICY.md).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* feat(Cosmology): Milne solution and Einstein static universe relations

Adds to Physlib/Cosmology/FLRW/Solutions.lean the Milne scale factor milneScaleFactor
with its Friedmann lemmas (k = -1, empty universe) and q = 0, the density
cosmologicalConstantDensity, and the equilibrium relations of the Einstein static
universe: einsteinStatic_density (rho = 2 rho_Lambda), einsteinStatic_curvature
(k c^2 / a^2 = 4 pi G rho) and einsteinStatic_curvature_pos. The curvature of the
Milne model and the instability of the static universe stay as narrowed TODOs.

Generated with Claude Code under human supervision (see AI-POLICY.md).

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* chore(Cosmology): order authors alphabetically by last name

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* chore(Cosmology): order authors alphabetically by last name

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* style(Cosmology): inline one-off helper lemmas, move the Time derivative bridges next to their definition

Applies the review remarks of #1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* style(Cosmology): inline one-off helper lemmas, move the Time derivative bridges next to their definition

Applies the review remarks of #1642 across the series: no isolated general-purpose lemma, and
lemmas about the time derivative live in SpaceAndTime/Time/Derivatives.lean.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* refactor(Cosmology): inline the power-law scaffolding of the flat solutions

The general power-law solution a = (t / t0) ^ n is stated inline in the lemmas, quantified
over n; the defs powerLawScaleFactor, powerLawDensity, radiationDensity, radiationPressure and
einsteinDeSitterDensity and the two _eq glue lemmas are removed, the densities and the
pressure now appear in the theorem statements, and radiationScaleFactor and
einsteinDeSitterScaleFactor are defined directly.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* refactor(Cosmology): the normalisation epoch of the power-law solutions is a Time

t0 : Time instead of a real number in the power-law, radiation-dominated and Einstein-de Sitter
solutions (so H(t0) is stated at t0 itself), and docstrings saying that t0 is the
normalisation epoch a(t0) = 1, that the Big Bang sits at the origin t.val = 0 of the time
chart, and that the values for t.val <= 0 are junk.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* docs(Cosmology): the Milne scale factor puts the Big Bang at the origin of the time chart

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

* refactor(Cosmology): state the Einstein static density directly

The density of the Einstein static universe is stated as rho = Lambda c^2 / (4 pi G); the def
cosmologicalConstantDensity is dropped from this file, the cosmological constant as a w = -1
fluid being the matter-content TODO of Physlib.Cosmology.FLRW.MatterContent.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Philippe Kevorkian <philippe@hotelrelaisduloir.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

medium ready-to-merge This PR is approved and will be merged shortly t-relativity Relativity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants