-
Notifications
You must be signed in to change notification settings - Fork 205
feat(Navier-Stokes): formalization of Navier–Stokes existence and smoothness #1457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
YaelDillies
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add way more documentation? I would make sure we're at least at mathlib standard (every def has a docstring), and hopefully go even further by writing down explicitly all the design decisions you've taken.
I didn't use the unicode character nu for viscosity as it looks too similar to the letter v which is used for velocity.
This seems fine.
bikeshead: should it use v(x,t) (aligned with the official statement) or v(t,x) that is more mathlib aligned?
I don't mind, so long as the discrepancy is clearly documented.
should it be formulated in an arbitrary dimension and then instantiated for n:=3?
Sure! That seems very reasonable so long as it isn't too difficult to do so. I assume it's already solved for n = 2? If so, it seems reasonable to have one statement for n = 2, one for n = 3 and one for all n, the first one being solved and the other two open.
- added doc strings, mostly AI generated but cleaned up and removed fluff - using notation form EuclideanGeometry
|
@YaelDillies Hopefully, I have addressed all the issues. The docs strings are mostly AI generated but they sound good to me and I don't really know what else I would write there. |
| (v₀ : ℝ³ → ℝ³) (hv₀ : InitialVelocityConditionRn v₀) : | ||
| ∃ v p, NavierStokesExistenceAndSmoothnessRn (n:=3) nu v₀ (f:=0) v p := sorry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (v₀ : ℝ³ → ℝ³) (hv₀ : InitialVelocityConditionRn v₀) : | |
| ∃ v p, NavierStokesExistenceAndSmoothnessRn (n:=3) nu v₀ (f:=0) v p := sorry | |
| (v₀ : ℝ³ → ℝ³) (hv₀ : InitialVelocityConditionRn v₀) : | |
| ∃ v p, NavierStokesExistenceAndSmoothnessRn (n:=3) nu v₀ (f:=0) v p := sorry |
Same below
|
|
||
| /-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /-- | |
| /-- |
| This condition ensures the velocity field has finite energy and reasonable | ||
| behavior as |x| → ∞. | ||
| -/ | ||
| structure InitialVelocityConditionRn {n : ℕ} (v₀ : ℝ^n → ℝ^n) : Prop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about
| structure InitialVelocityConditionRn {n : ℕ} (v₀ : ℝ^n → ℝ^n) : Prop | |
| structure InitialVelocityConditionDecay {n : ℕ} (v₀ : ℝ^n → ℝ^n) : Prop |
instead? In both cases, the function has domain R^n, so Rn is a bit confusing as a way to distinguish
| /-- (A) Existence and smoothness of Navier–Stokes solutions on ℝ³. -/ | ||
| @[category research open, AMS 35] | ||
| theorem navier_stokes_existence_and_smoothness_R3 (nu : ℝ) (hnu : nu > 0) | ||
| (v₀ : ℝ³ → ℝ³) (hv₀ : InitialVelocityConditionRn v₀) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source uses
| (v₀ : ℝ³ → ℝ³) (hv₀ : InitialVelocityConditionRn v₀) : | |
| (u₀ : ℝ³ → ℝ³) (hv₀ : InitialVelocityConditionRn u₀) : |
instead. Maybe you could do that so that nu can become \nu?
| /-- The pressure is periodic in space with period 1 for all times t ≥ 0 (condition 10). -/ | ||
| pressure_periodic : ∀ t ≥ 0, IsPeriodic (p · t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, the periodicity of pressure isn't stated anywhere. Could you leave a comment to that effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errata on page 6 says also
| /-- The Navier-Stokes equation (equation 1): | ||
| ∂v/∂t + (v·∇)v = ν∆v - ∇p + f -/ | ||
| navier_stokes : ∀ x, ∀ t > 0, | ||
| deriv (v x ·) t + fderiv ℝ (v · t) x (v x t) = nu • Δ (v · t) x - gradient (p · t) x + f x t |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Condition 1 is also stated for t = 0. Could you explain the discrepancy in a comment?
| (v : ℝ^n → ℝ → ℝ^n) (p : ℝ^n → ℝ → ℝ) : Prop | ||
| extends NavierStokesExistenceAndSmoothness nu v₀ f v p where | ||
|
|
||
| /-- The velocity is square-integrable at each time t ≥ 0. -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /-- The velocity is square-integrable at each time t ≥ 0. -/ | |
| /-- The velocity is square-integrable at each time t ≥ 0 (condition 7). -/ |
| ∃ (v₀ : ℝ³ → ℝ³) (f : ℝ³ → ℝ → ℝ³), | ||
| InitialVelocityConditionRn v₀ ∧ ForceConditionRn f ∧ | ||
| ¬(∃ v p, NavierStokesExistenceAndSmoothnessRn (n:=3) nu v₀ f v p) := sorry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ∃ (v₀ : ℝ³ → ℝ³) (f : ℝ³ → ℝ → ℝ³), | |
| InitialVelocityConditionRn v₀ ∧ ForceConditionRn f ∧ | |
| ¬(∃ v p, NavierStokesExistenceAndSmoothnessRn (n:=3) nu v₀ f v p) := sorry | |
| ∃ (v₀ : ℝ³ → ℝ³) (f : ℝ³ → ℝ → ℝ³), | |
| InitialVelocityConditionRn v₀ ∧ ForceConditionRn f ∧ | |
| \forall v p, ¬ NavierStokesExistenceAndSmoothnessRn (n:=3) nu v₀ f v p := sorry |
maybe?
|
We looked at it with Tomáš Bárta (teacher of ODE at Charles University), and it looks good to us. |
|
More from Tomáš Bárta: the formulation of NS seems correct to me but I have some remarks:
It seems strange that there is 'for all
The present lean formulation writes |
grunweg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. With Moritz Firsching sitting next to me (to answer any formal conjectures questions), I just took a first look, until line 130. Most of my comments are minor or stylistic --- but let me echo the comment about t > 0 vs t >= 0.
| The divergence of a vector field `v : ℝⁿ → ℝⁿ` at point `x`, | ||
| computed as the trace of the Jacobian matrix. | ||
|
|
||
| In coordinates: div v = Σᵢ ∂vᵢ/∂xᵢ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formula should be written as a LaTeX formula; likewise for the formula three lines above and in the other doc-strings below.
| In coordinates: div v = Σᵢ ∂vᵢ/∂xᵢ | ||
| -/ | ||
| noncomputable | ||
| def divergence {n : ℕ} (v : ℝ^n → ℝ^n) (x : ℝ^n) : ℝ := (fderiv ℝ v x).trace ℝ (ℝ^n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This definition has junk value zero when v is not differentiable at x (because then the fderiv is defined to be zero).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also add that as a simp lemma. And some basic API lemmas, such as linearity?
| noncomputable | ||
| def divergence {n : ℕ} (v : ℝ^n → ℝ^n) (x : ℝ^n) : ℝ := (fderiv ℝ v x).trace ℝ (ℝ^n) | ||
|
|
||
| notation "∇⬝" => divergence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| notation "∇⬝" => divergence | |
| @[inherit_doc] | |
| notation "∇⬝" => divergence |
Can you also mention the notation in the doc-string, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're only using this notation once. Can you also use it on line 75 --- or remove it?
| with period 1, i.e., `f(x + eᵢ) = f(x)` for each unit vector `eᵢ`. | ||
| This captures functions on the n-torus ℝⁿ/ℤⁿ. | ||
| -/ | ||
| def IsPeriodic {α : Sort*} {n : ℕ} (f : ℝ^n → α) : Prop := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps rename this to IsOnePeriodic?
| /-- All derivatives of v₀ decay faster than any polynomial (condition 4). | ||
|
|
||
| For any derivative order m and any decay rate K, there exists a constant C | ||
| such that |∂ᵐv₀(x)| ≤ C/(1+|x|)^K. -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal preference, to some extent:
| /-- All derivatives of v₀ decay faster than any polynomial (condition 4). | |
| For any derivative order m and any decay rate K, there exists a constant C | |
| such that |∂ᵐv₀(x)| ≤ C/(1+|x|)^K. -/ | |
| /-- All derivatives of v₀ decay faster than any polynomial (condition 4). | |
| For any derivative order m and any decay rate K, there exists a constant C | |
| such that |∂ᵐv₀(x)| ≤ C/(1+|x|)^K. -/ |
(and please apply the LaTeX formatting also)
| /-- | ||
| Initial velocity conditions for the periodic Navier-Stokes problem on ℝⁿ/ℤⁿ. | ||
|
|
||
| The velocity must be smooth, divergence-free, and periodic with period 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also like the phrasing "1-periodic"; this may read more nicely. Optional/subjective.
| -/ | ||
| structure InitialVelocityConditionPeriodic {n : ℕ} (v₀ : ℝ^n → ℝ^n) : Prop | ||
| extends InitialVelocityCondition v₀ where | ||
| /-- The initial velocity is periodic with period 1 in each direction (condition 8) -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only part of condition 8 --- perhaps rephrase as "condition 8, part 1"? Same above.
| periodic : IsPeriodic v₀ | ||
|
|
||
| /-- | ||
| Basic smoothness condition on external forcing term. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a definite article here. Thanks!
| The force must be smooth and decay faster than any polynomial | ||
| in both space and time (condition 5 in Fefferman's paper). | ||
| -/ | ||
| structure ForceConditionRn {n : ℕ} (f : ℝ^n → ℝ → ℝ^n) : Prop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: I'd put the extends clause on the same line. (Also, please apply the style comments about doc-string formatting in the same way as above.)
| For any derivative orders m and decay rate K, there exists C such that | ||
| |∂ᵐ_{x,t} f(x,t)| ≤ C/(1+|x|+t)^K for t > 0. | ||
| -/ | ||
| decay : ∀ m : ℕ, ∀ K : ℝ, ∃ C : ℝ, ∀ x, ∀ t > 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same comment as was made in the thread above: please use t >= 0 (and iteratedFDerivWithin if needed) --- or say clearly why you think this is a bad idea. I don't see why. Also below (and in the doc-string).
grunweg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finished my review: another collection of minor items; no further big questions.
| -/ | ||
|
|
||
| open ContDiff Set InnerProductSpace MeasureTheory EuclideanGeometry | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should n be a global implicit variable?
| structure ForceConditionPeriodic {n : ℕ} (f : ℝ^n → ℝ → ℝ^n) : Prop | ||
| extends ForceCondition f where | ||
| /-- The force is periodic in space with period 1 for all times (condition 8) -/ | ||
| periodic : ∀ t ≥ 0, IsPeriodic (f · t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd name this field isPeriodic (or isOnePeriodic if you rename IsPeriodic to IsOnePeriodic)
| structure NavierStokesExistenceAndSmoothness {n : ℕ} | ||
| (nu : ℝ) (v₀ : ℝ^n → ℝ^n) (f : ℝ^n → ℝ → ℝ^n) | ||
| (v : ℝ^n → ℝ → ℝ^n) (p : ℝ^n → ℝ → ℝ) : Prop where | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| (nu : ℝ) (v₀ : ℝ^n → ℝ^n) (f : ℝ^n → ℝ → ℝ^n) | ||
| (v : ℝ^n → ℝ → ℝ^n) (p : ℝ^n → ℝ → ℝ) : Prop | ||
| extends NavierStokesExistenceAndSmoothness nu v₀ f v p where | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| extends NavierStokesExistenceAndSmoothness nu v₀ f v p where | ||
|
|
||
| /-- The velocity is square-integrable at each time t ≥ 0. -/ | ||
| integrable : ∀ t ≥ 0, Integrable (‖v · t‖^2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use MemLp instead, i.e.
| integrable : ∀ t ≥ 0, Integrable (‖v · t‖^2) | |
| integrable : ∀ t ≥ 0, MemLp (‖v · t‖) 2 |
| extends NavierStokesExistenceAndSmoothness nu v₀ f v p where | ||
|
|
||
| /-- The velocity is periodic in space with period 1 for all times t ≥ 0 (condition 10). -/ | ||
| velocity_periodic : ∀ t ≥ 0, IsPeriodic (v · t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd name this as isPeriodic_velocity (following mathlib conventions). Similarly below.
| integrable : ∀ t ≥ 0, Integrable (‖v · t‖^2) | ||
|
|
||
| /-- The kinetic energy ∫|v(x,t)|²dx remains uniformly bounded for all time (condition 7). -/ | ||
| globally_bounded_energy : ∃ E, ∀ t ≥ 0, (∫ x : ℝ^n, ‖v x t‖^2) < E |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the Lebesgue integral, right? Then everything is fine. (For the Bochner integral, you'd have to worry about junk values.)
| theorem navier_stokes_breakdown_periodic (nu : ℝ) (hnu : nu > 0) : | ||
| ∃ (v₀ : ℝ³ → ℝ³) (f : ℝ³ → ℝ → ℝ³), | ||
| InitialVelocityConditionPeriodic v₀ ∧ ForceConditionPeriodic f ∧ | ||
| ¬(∃ v p, NavierStokesExistenceAndSmoothnessPeriodic (n:=3) nu v₀ f v p) := sorry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces around :=, please --- also above.
Formalization of Navier-Stokes existence and smoothness problem as described in https://www.claymath.org/wp-content/uploads/2022/06/navierstokes.pdf
Potentially issues:
fderiv ℝ (v · t) x (v x t)is the convective term and thatdivis divergence‖iteratedFDeriv ℝ n v₀ x‖instead of|∂^α u(x,t)|but it should be equivalentt ≥ 0ort > 0asfderivmight not give what we think att=0. Mainly inNavierStokesExistenceAndSmoothness.navierStokesNote:
vwhich is used for velocity.v(x,t)(aligned with the official statement) orv(t,x)that is more mathlib aligned?n:=3?