feat(Cosmology): barotropic equation of state, density scaling laws, cosmological constant as a fluid - #1636
KevorkianPhilippe wants to merge 33 commits into
Conversation
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>
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>
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>
…edmann equations Adds to Physlib/Cosmology/FLRW/MatterContent.lean the predicate ContinuityEquation, the derivative of the first-order Friedmann equation (deriv_firstOrderFriedmann), the derivation of the continuity equation from the two Friedmann equations (continuityEquation_of_friedmann) and the converse derivation of the second-order equation from the first-order and continuity equations (secondOrderFriedmann_of_continuityEquation), resolving two TODOs of the file. Also hasDerivAt_mk_of_differentiableAt, the bridge from a time derivative to HasDerivAt. Generated with Claude Code under human supervision (see AI-POLICY.md). Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…cosmological constant as a fluid Adds to Physlib/Cosmology/FLRW/MatterContent.lean barotropicPressure, the density scaling law density_scaling with its converse continuityEquation_of_scaling and the dust, radiation and vacuum specialisations, and cosmologicalConstantDensity and cosmologicalConstantPressure with firstOrderFriedmann_iff_lambdaFluid, secondOrderFriedmann_iff_lambdaFluid and cosmologicalConstantPressure_eq_barotropic, resolving three TODOs. Moves cosmologicalConstantDensity from Solutions.lean, which now imports MatterContent. 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. |
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…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>
…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>
…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>
…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>
…munity#1632, on which this branch is stacked)
…munity#1632, on which this branch is stacked)
…ity#1632, on which this branch is stacked)
…ity#1632, on which this branch is stacked)
…utions 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>
…ns 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>
# Conflicts: # Physlib/Cosmology/FLRW/Solutions.lean
…in of the time chart Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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>
# Conflicts: # Physlib/Cosmology/FLRW/Solutions.lean # Physlib/SpaceAndTime/Time/Derivatives.lean
# Conflicts: # Physlib/Cosmology/FLRW/MatterContent.lean # Physlib/Cosmology/FLRW/Solutions.lean
…tOrderFriedmann at t : Time Review of leanprover-community#1635 by doxtor6. Time.hasDerivAt_mk_of_differentiableAt is stated at t : Time (derivative at t.val) instead of at the constructor form with a real parameter, so that callers no longer destructure t; deriv_firstOrderFriedmann is stated at t : Time as well and destructures inside its proof, and the two theorems of MatterContent.lean no longer do. Time.deriv_comp_val is dropped: it is the special case f := fun s => g s.val of Time.deriv_eq_of_hasDerivAt, which replaces it in Solutions.lean (its only user). The two surviving bridges are listed in the key results of Time/Derivatives.lean. Nits: continuityEquation_of_friedmann only needs G ≠ 0; the non-vanishing hypothesis of secondOrderFriedmann_of_continuityEquation is named ha'; the overview names the bridge the proofs actually use. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…rgy equation, API map Review of leanprover-community#1635 by doxtor6. The non-independence TODO is narrowed rather than deleted (derive it from the contracted Bianchi identity once the FLRW metric exists), and a TODO records the bridge to fluid dynamics: ContinuityEquation is the fluid energy equation for the Hubble flow, which needs an energy equation in Physlib.FluidDynamics first. The FLRW TODO of Basic.lean and the overview of MatterContent.lean record the design point that the two Friedmann equations are the primitive pair (where the scale factor is stationary, the first-order and continuity equations leave the pressure unconstrained). API-map.yaml: the continuity-equation requirement is split from the equation of state and marked done. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…sity_scaling, API map Follows the review of leanprover-community#1635: no statement of the API exposes the constructor form of a time any more. hasDerivAt_mul_rpow_of_continuityEquation, a helper stated on the real curve obtained through the time chart and used once, is inlined into density_scaling. API-map.yaml: the equation-of-state requirement is marked done and the cosmological constant as a fluid is recorded. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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 and checked symbolically (sympy) against the Friedmann equations of
Physlib.Cosmology.FLRW.Basic; no textbook is cited, the TODO items of the file are thespecification.
Stacked on #1635 (
flrw-matter-4): the diff includes the earlier commits of this series; only the last commit is new here.Resolves the equation-of-state, scaling-law, specialisation and cosmological-constant TODOs of
MatterContent.lean; the stress-energy tensor TODO stays (no FLRW metric in Physlib).Declarations added:
barotropicPressure:p = w ρ c²;deriv_of_continuityEquation_barotropic:∂ₜ ρ = -3 (1 + w) H ρ.density_scaling:ρ t = ρ t₀ (a t / a t₀)^(-3(1+w))(the curveρ a^(3(1+w))has zeroderivative under the barotropic continuity equation at all times, then
is_const_of_deriv_eq_zero; needsa,ρdifferentiable everywhere anda > 0);continuityEquation_of_scaling: the converse.density_scaling_dust,density_scaling_radiation,density_scaling_vacuum:ρ ∝ a⁻³,ρ ∝ a⁻⁴,ρconstant.cosmologicalConstantDensity(moved here fromSolutions.lean, which now importsMatterContent),cosmologicalConstantPressure;firstOrderFriedmann_iff_lambdaFluid,secondOrderFriedmann_iff_lambdaFluid: the Friedmann equations withΛare those withoutΛfor the fluidρ + ρ_Λ,p + p_Λ;cosmologicalConstantPressure_eq_barotropic:p_Λis thew = -1barotropic pressure ofρ_Λ.Reviewer map: C.1, then C.2 (
density_scalingand its converse), C.3, then D.Update (Sept 11). Applied the review remarks of #1642 across the series: no isolated general-purpose lemma (the one-off
HasDerivAtandrpowhelpers are inlined in the proofs that used them), and the three small bridges betweenTime.derivand Mathlib'sHasDerivAtnow live next to the definition of the time derivative, inPhyslib/SpaceAndTime/Time/Derivatives.lean(deriv_comp_val,deriv_eq_of_hasDerivAt,hasDerivAt_mk_of_differentiableAt, each introduced by the first PR of the series that needs it). Section letters shifted accordingly.Update (Sept 17). Merged the review of #1635 (statements at
t : Time,Time.deriv_comp_valdropped in favour ofTime.deriv_eq_of_hasDerivAt);API-map.yamlnow records what this PR completes. The one-off helperhasDerivAt_mul_rpow_of_continuityEquationis inlined intodensity_scaling.🤖 Generated with Claude Code