FRW universe satisfying the two Friedmann equations
DefinitionFRWUniverseAn FRW universe is the bundle of data appearing in the Friedmann–Robertson–Walker model, together with the two Friedmann equations imposed as axioms.
The data are: a gravitational constant ; a spatial curvature constant ; a set of cosmic times , assumed open and preconnected; a strictly positive scale factor on ; an energy density ; a pressure ; and three further functions , , that are required to be the derivatives of , and at every point of .
Two equations are imposed at every , with the Hubble parameter written and its derivative written :
The file also defines the Hubble parameter as a function on all of , and the predicate expressing the linear barotropic equation of state for all , for a constant .
import Mathlib
namespace FRWCosmology
/-- A Friedmann–Robertson–Walker (FRW) universe on a time interval.
The data are Newton's constant `G`, the spatial curvature constant `K`, an open connected
time domain `I`, the scale factor `a` with its first two derivatives `adot`, `addot`, the
energy density `rho` with its derivative `rhodot`, and the pressure `p`.
The two Friedmann equations are imposed pointwise on `I`, in the form of the source:
`H ^ 2 = 8 π G ρ / 3 - K / a ^ 2` and `Ḣ = -4 π G (ρ + p) + K / a ^ 2`, where the Hubble
parameter is `H = adot / a` and `Ḣ = addot / a - (adot / a) ^ 2`. -/
structure FRWUniverse where
/-- Newton's gravitational constant. -/
G : ℝ
/-- The spatial curvature constant of the Robertson–Walker metric. -/
K : ℝ
/-- The time domain on which the solution is considered. -/
I : Set ℝ
/-- The scale factor. -/
a : ℝ → ℝ
/-- The time derivative of the scale factor. -/
adot : ℝ → ℝ
/-- The second time derivative of the scale factor. -/
addot : ℝ → ℝ
/-- The energy density. -/
rho : ℝ → ℝ
/-- The time derivative of the energy density. -/
rhodot : ℝ → ℝ
/-- The pressure. -/
p : ℝ → ℝ
I_open : IsOpen I
I_conn : IsPreconnected I
a_pos : ∀ t ∈ I, 0 < a t
ha : ∀ t ∈ I, HasDerivAt a (adot t) t
hadot : ∀ t ∈ I, HasDerivAt adot (addot t) t
hrho : ∀ t ∈ I, HasDerivAt rho (rhodot t) t
friedmann₁ : ∀ t ∈ I, (adot t / a t) ^ 2 = 8 * Real.pi * G / 3 * rho t - K / a t ^ 2
friedmann₂ : ∀ t ∈ I, addot t / a t - (adot t / a t) ^ 2 =
-(4 * Real.pi * G) * (rho t + p t) + K / a t ^ 2
/-- The Hubble parameter `H = ȧ / a`. -/
noncomputable def FRWUniverse.H (U : FRWUniverse) (t : ℝ) : ℝ := U.adot t / U.a t
/-- The linear barotropic equation of state `p = w ρ`, with `w` a constant. -/
def FRWUniverse.LinearEoS (U : FRWUniverse) (w : ℝ) : Prop := ∀ t ∈ U.I, U.p t = w * U.rho t
end FRWCosmology
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter, non-blind
Disclosure — non-blind read-back. This read-back was written by the same agent that drafted the Lean statement, not by an independent blind auditor: its author had full sight of the source material and of the intended meaning. It is therefore not independent testimony and must not be mistaken for it; a reviewer who wants the usual independent cross-check should obtain a blind read-back from a separate auditor.
The bundle declares a structure whose data are nine components: two real numbers and ; a set of real numbers; and six functions , , , , , , each defined on all of and real-valued. (The notation etc. is used here only as a name for a component; whether it is a derivative is settled by the conditions listed next.)
The structure further requires the following conditions to hold.
- is an open subset of , and is preconnected. (An empty satisfies both, and the whole line satisfies both.)
- For every : . Nothing is assumed about , , outside .
- For every : the function is differentiable at with derivative ; the function is differentiable at with derivative ; the function is differentiable at with derivative . These are derivatives in the two-sided sense on all of , taken at points of .
- For every :
- For every :
Here is the real circle constant. No sign or nonvanishing condition is placed on or on : both may be zero, negative, or arbitrary reals, and is not restricted to . No condition constrains other than equation 5, and no continuity or differentiability of is required.
Two further items are defined on top of the structure. First, for a structure and any real , the quantity , formed with real division; at a outside where happens to be this evaluates to by the convention that division by zero yields zero. Second, for a structure and a real number , the proposition " has linear equation of state ", which asserts: for every , . This says nothing about and does not assert that such a exists or is unique.