Skip to content

Central force integrability - #2001

Open
Sudo-RR wants to merge 14 commits into
leanprover-community:masterfrom
Sudo-RR:central-force-integrability
Open

Sudo-RR wants to merge 14 commits into
leanprover-community:masterfrom
Sudo-RR:central-force-integrability

Conversation

@Sudo-RR

@Sudo-RR Sudo-RR commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

We establish that central-force systems are Liouville integrable on an open dense domain, where the Hamiltonian, squared angular momentum and its z-component are functionally independent and pairwise Poisson-commuting.

The domain excludes the centre of force, zero radial momentum, and angular momentum parallel to the z-axis.

This combines the analytic-density lemmas from #1838 with their physics application: proving that this domain is dense.

Sudo-RR and others added 10 commits September 29, 2026 21:18
- `poissonBracket`, antisymmetry, bilinearity in each argument, and
  `deriv_comp_eq_poissonBracket` connecting it to time evolution under
  Hamilton's equations.
- `gradient_add` in `Physlib.Mathematics.Calculus.Gradient`, the missing
  additivity rule needed to prove bilinearity.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `poissonBracket_self`, the Poisson bracket of a function with itself
  vanishes, and `poissonBracket_eq_of_hasGradientAt`, the bracket of two
  functions with known partial gradients.
- `LiouvilleIntegrableOn U H`, a Hamiltonian system with `d` smooth
  conserved quantities, one of them the Hamiltonian, which are in
  involution and functionally independent on an open dense domain `U` of
  phase space.
- `LiouvilleIntegrableOn.deriv_comp_eq_zero`, each conserved quantity is
  constant along a solution of Hamilton's equations in `U`.
- `LiouvilleIntegrableOn.oneDegreeOfFreedom`, a system with one degree of
  freedom is Liouville integrable wherever its Hamiltonian is smooth with
  non-vanishing gradient.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `HasGradientAt.add`, `HasGradientAt.sub`, `HasGradientAt.mul`,
  `HasGradientAt.const_mul`, the algebraic rules for gradients.
- `HasDerivAt.comp_hasGradientAt`, the chain rule for a real function of
  a real-valued function.
- `hasGradientAt_inner_left`, `hasGradientAt_inner_right`,
  `hasGradientAt_inner_self`, `hasGradientAt_norm`, `hasGradientAt_coord`,
  the gradients of scalar products, of the norm away from the origin, and
  of coordinate functionals on Euclidean space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `CentralForce`, a particle in three dimensions under a central potential
  smooth away from the centre, with its `hamiltonian`.
- `CentralForce.hasGradientAt_hamiltonian_momentum` and
  `CentralForce.hasGradientAt_hamiltonian_position`, the partial gradients
  of the Hamiltonian: the velocity `p / m`, and away from the centre a
  multiple of the position.
- `CentralForce.contDiffOn_hamiltonian`, the Hamiltonian is smooth away
  from the centre of force.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `CentralForce.angularMomentum`, the angular momentum `q × p`, with
  `angularMomentumSq` and `angularMomentumZ`, Lagrange's identity
  `angularMomentumSq_eq`, their gradients and smoothness.
- `poissonBracket_angularMomentumSq_angularMomentumZ`, `{L², L_z} = 0`, and
  `poissonBracket_angularMomentumSq_hamiltonian`,
  `poissonBracket_angularMomentumZ_hamiltonian`, both are conserved under
  a central force (via the `_eq_zero_of_hasGradientAt` versions for any
  Hamiltonian with gradients parallel to `p` and `q`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `AnalyticOnNhd.dense_setOf_ne_zero`, by the identity principle a
  function analytic on a connected space and non-zero at some point is
  non-zero on a dense set.
- `analyticAt_euclideanSpace_apply`, coordinate functionals on Euclidean
  space are analytic, tagged `fun_prop` so that polynomial functions of
  the coordinates are automatically analytic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `CentralForce.integrabilityDomain`, where the radial momentum is non-zero
  and the angular momentum is not parallel to the z-axis, with
  `isOpen_integrabilityDomain` and `dense_integrabilityDomain` (via the
  non-vanishing of an analytic polynomial).
- `CentralForce.conservedQuantities`, the energy, `L²` and `L_z`, with
  `poissonBracket_conservedQuantities` (involution),
  `gradient_conservedQuantities`, `linearIndependent_gradients` and
  `linearIndependent_conservedQuantities` (functional independence).
- `CentralForce.liouvilleIntegrable`, every central-force system is
  Liouville integrable on the domain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply the analytic identity principle to the polynomial defining a central-force phase-space domain. Keep independence and the Liouville construction for a separate contribution.

Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
Merge the small analytic-density application and current upstream APIs while preserving the original feature history. Keep this follow-up limited to the conserved quantities, their independence and the integrability construction.

Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for this pull-request (PR). If this is your first PR, welcome to the community!

While you wait for a review, note that you can review PRs too; reviewing is not restricted to maintainers. Our review guidelines explain what to look for.

Over time, contributions such as reviews, maintenance and documentation are recorded on contributions.physlib.io.

Three main points:

  • Comment -awaiting-author on its own line to remove that label from your PR.
  • Comment blocked-by-PR or -blocked-by-PR on its own line to add or remove that label, respectively.
  • The first review might take several days to arrive. If in doubt message on the Zulip.

For the author: Please read

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 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 changes.

If you have any problems or questions, please reach out to the community on the Zulip.

For reviewers: Summary of your PR

Found differences:
@@ Physlib.Mathematics.ForMathlib.Analytic @@
+ module added Physlib.Mathematics.ForMathlib.Analytic (+80 -0)
+ added lemma AnalyticOnNhd.dense_setOf_ne_zero
+ added lemma analyticAt_euclideanSpace_apply
@@ PhyslibAlpha.ClassicalMechanics.LiouvilleIntegrable.CentralForce @@
+ module added PhyslibAlpha.ClassicalMechanics.LiouvilleIntegrable.CentralForce (+261 -0)
  namespaces ClassicalMechanics.CentralForce
+ added def conservedQuantities
+ added def integrabilityDomain
+ added def liouvilleIntegrable
+ added lemma dense_integrabilityDomain
+ added lemma gradient_conservedQuantities
+ added lemma integrabilityDomain_eq
+ added lemma isOpen_integrabilityDomain
+ added lemma linearIndependent_conservedQuantities
+ added lemma linearIndependent_gradients
+ added lemma poissonBracket_conservedQuantities
+ added lemma snd_ne_zero_of_mem_integrabilityDomain
+ added lemma toHamiltonianSystem_isLiouvilleIntegrableOn
@@ Physlib @@
! module modified Physlib (+1 -0)
@@ PhyslibAlpha @@
! module modified PhyslibAlpha (+1 -0)
@@ PhyslibAlpha.ClassicalMechanics.LiouvilleIntegrable.Basic @@
! module modified PhyslibAlpha.ClassicalMechanics.LiouvilleIntegrable.Basic (+34 -1)
  namespaces ClassicalMechanics
+ added def HamiltonianSystem.IsLiouvilleIntegrableOn
+ added structure HamiltonianSystem.LiouvilleIntegrabilityData
21 differences

The declarations are found by reading the diff as text, without regard for namespaces, so a declaration whose keyword and name are on different lines is missed, and two declarations of the same name in different namespaces are listed as one. A change to a proof, or to the body of a definition, does not appear. See scripts/alpha/github/pr_summary.lean.

Summary of commit 2d6617e, remade whenever a commit is pushed.

@jstoobysmith

Copy link
Copy Markdown
Member

Maybe worth looking at this comment

https://leanprover.zulipchat.com/#narrow/channel/479953-Physlib/topic/Classical.20mechanics/near/635364853

As I think this could form a better foundation for this, which makes the physics clearer

@jstoobysmith

Copy link
Copy Markdown
Member

See this #2003

@jstoobysmith

Copy link
Copy Markdown
Member

awaiting-author

For comments above

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Nov 2, 2026
@Sudo-RR

Sudo-RR commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi Joseph. Super sorry for the late reply, I was swamped with work.

I'll take a look at this today, as I understand we're creating an API map that unifies foundational Hamiltonian mechanics ? If yes then that's great for me because I have a bunch of work locally relating to Hamiltonian structures, action angle variables etc.

I'll read the lean docs on API maps later today and see how this contribution can be built on more solid footing. Sorry again for the late response :(

@jstoobysmith

Copy link
Copy Markdown
Member

@Sudo-RR No worries, but yes this is the idea. Would be great to have foundational Hamiltonian mechanics in so this sort of work can build on this.

@Sudo-RR

Sudo-RR commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jstoobysmith

I have opened a PR for the Hamiltonian Mechanics API map. Once thats approved, I'll start refactoring the existing implementations to ensure that things follow from a unified structure. In similar spirit to Lagrangian mechanics.

See #2025

Sudo-RR and others added 4 commits November 15, 2026 10:20
Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
Co-authored-by: Claude Opus 4.8 <no-reply+claude-opus-4-8@anthropic.com>
@Sudo-RR

Sudo-RR commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Hi I think this PR is ready for review now :)

I have modified it to use the shared structures I developed in the previous PR's. I.e. the Phase Space and Hamiltonian Structure PR's.

@Sudo-RR

Sudo-RR commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author
  • awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Nov 15, 2026
@Sudo-RR Sudo-RR closed this Nov 15, 2026
@Sudo-RR
Sudo-RR deleted the central-force-integrability branch November 15, 2026 17:43
@Sudo-RR
Sudo-RR restored the central-force-integrability branch November 15, 2026 17:44
@Sudo-RR Sudo-RR reopened this Nov 15, 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.

Couple of comments, a number of which are structural.

-/
module

-- `Uniqueness` imports this module privately; the auxiliary analyticity lemmas need its public API.

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.

Would remove this line.


/-- The coordinate functionals on Euclidean space are analytic. -/
@[fun_prop]
lemma analyticAt_euclideanSpace_apply {𝕜 ι : Type*} [RCLike 𝕜] [Fintype ι] (i : ι)

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.

What is the reason behind having this lemma? Seems like one could just use (EuclideanSpace.proj (𝕜 := 𝕜) i).analyticAt z in its place.

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.

Would move this too

PhyslibAlpha.ClassicalMechanics.CentralForce.LiouvilleIntegrable.lean 


/-- The three conserved quantities in involution of a central-force system: the Hamiltonian `H`,
the squared magnitude `L²` of the angular momentum, and its z-component `L_z`. -/
noncomputable def conservedQuantities :

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.

Should go in its own file I think within CentralForce

@jstoobysmith

Copy link
Copy Markdown
Member

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes medium t-mathematics Mathematics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants