feat(ClassicalMechanics): pendulum trajectories on the configuration circle and the bridge to physical space - #1571
Conversation
|
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. |
…ian and Hamilton's equations New module Physlib.ClassicalMechanics.Pendulum.SimplePendulum.Hamiltonian (imported from Physlib.lean), with the Hamiltonian formulation of the simple pendulum: - toCanonicalMomentum: the canonical momentum p = dL/dtheta-dot = I theta-dot, as a linear equivalence between velocities and momenta, with its value toCanonicalMomentum_eq. - hamiltonian: the Legendre transform of the Lagrangian, with hamiltonian_eq computing it as the momentum-space kinetic energy plus the potential energy, hamiltonian_contDiff for its joint smoothness, and the partial gradients gradient_hamiltonian_position_eq and gradient_hamiltonian_momentum_eq. - hamiltonian_eq_energy: along any lift of the angle the Hamiltonian, evaluated on the canonical momentum of the lift, is the energy. - hamiltonEqOp: the Hamilton-equations operator of the Hamiltonian on momentum-angle phase space. - equationOfMotion_iff_hamiltonEqOp_eq_zero: for a smooth lift of the angle the equation of motion is equivalent to Hamilton's equations. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Add section B to SimplePendulum/Hamiltonian.lean: equationOfMotion_tfae proves that, for a smooth lift of the angle, the pointwise equation of motion, the vanishing of the variational derivative of the action, Hamilton's equations, the Lagrangian variational principle and the Hamiltonian variational principle are all equivalent. Update the module doc (Key results bullet and TOC entry for section B) and the API map (Hamiltonian-formulation requirement row, Overview kept consistent). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
699193f to
6c5b180
Compare
…miltonian module - Rename `toCanonicalMomentum` to `canonicalMomentum` (the `to` prefix is for maps into a different type); `toCanonicalMomentum_eq` becomes `canonicalMomentum_eq`. - Inline the four one-line proofs of the linear equivalence. - Drop the sub-subsection heading that introduced a single lemma. Requested by review on leanprover-community#1570. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Codex GPT-5.6 <noreply@openai.com>
…t and its smoothness Add SimplePendulum/Geometric/Trajectory.lean: - Trajectory: trajectories of the pendulum as curves Time → ConfigurationSpace, with Trajectory.ofLift sending a lift of the angle to the trajectory it describes on the circle (ofLift_apply). - ofLift_add_int_mul_two_pi and ofLift_eq_iff: two lifts describe the same trajectory exactly when they differ by a whole number of turns at each time. - continuous_ofLift and contMDiff_ofLift: the trajectory described by a continuous (resp. C^n) lift is continuous (resp. a C^n curve in the configuration circle). - Trajectory.toSpace: the physical position of the bob along a trajectory, with toSpace_ofLift, the rod-length constraint norm_toSpace and continuous_toSpace. - The geometric velocity as an mfderiv into the circle's tangent bundle is deferred to a later module, documented in prose; in this PR velocities are computed in physical space. - Register the module in Physlib.lean (sorted after Geometric.Basic). Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Codex GPT-5.6 <noreply@openai.com>
…tification of the lifted energies and Lagrangian with the bob's Add SimplePendulum/Geometric/PhysicalSpace.lean: - spaceTrajectory: the bob's position in the plane along a lifted trajectory, defined through Trajectory.toSpace, with spaceTrajectory_eq, the coordinate lemmas spaceTrajectory_apply_zero and spaceTrajectory_apply_one, and the rod-length constraint norm_spaceTrajectory (equal to ℓ, the length being positive). - differentiable_spaceTrajectory and deriv_spaceTrajectory: the bob's velocity along a differentiable lift, computed componentwise via the chain-rule lemmas deriv_sin_coord and deriv_cos_coord; norm_sq_deriv_spaceTrajectory gives the square of the speed, ℓ² θ̇². - kineticEnergy_eq_space, potentialEnergy_eq_height, lagrangian_eq_space and energy_eq_space: the chart kinetic energy, potential energy, Lagrangian and energy of SimplePendulum.Basic are those of the bob in physical space, exhibiting the chart Lagrangian as the constrained Lagrangian of a point mass on the circle of radius ℓ. - Register the module in Physlib.lean (sorted between Geometric.Basic and Geometric.Trajectory). - API maps: mark the trajectory rows done in SimplePendulum/API-map.yaml and Pendulum/API-map.yaml, add the identification row to SimplePendulum/API-map.yaml, and mark the Lagrangian row of Pendulum/API-map.yaml done. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Codex GPT-5.6 <noreply@openai.com>
6c5b180 to
f113b6b
Compare
Toward #883 — closes the tracker's trajectory and Lagrangian requirements: with this PR the parent
pendulum API map has no
N/Arows left.Stacked. Base is the Hamiltonian PR #1570 (branch
pendulum/pr3-hamiltonian,bda52edb).The commits belonging to this PR are the last two (
865163fb,f113b6bb), touching two newmodules,
Physlib.lean, and both API maps. Please review after #1570.Two new modules under
SimplePendulum/Geometric/:Trajectory.lean—Trajectory := Time → ConfigurationSpace;Trajectory.ofLift(thetrajectory described by a lift of the angle) with: invariance under whole-turn shifts
(
ofLift_add_int_mul_two_pi),ofLift_eq_iff(two lifts give the same trajectory iff at eachtime they differ by whole turns — the quantifiers are
∀ t, ∃ n; the uniform-nversion isfalse), continuity, and
contMDiff_ofLift(aC^nlift describes aC^ncurve in the circle —forward direction only; the converse needs the covering-map lift and is deferred honestly); the
bob's position along a trajectory with the rod-length constraint.
PhysicalSpace.lean—spaceTrajectory(the bob's position for a fixed pendulum), itsvelocity
(ℓ cos θ, ℓ sin θ)·θ̇and speedℓ²θ̇², and the payoff identities underDifferentiable ℝ θ:kineticEnergy_eq_space(½ I θ̇² = ½ m ‖v‖²),potentialEnergy_eq_height(
V = m g h,hfrom the bottom of the swing),lagrangian_eq_space— the chart Lagrangian of#1564 is the constrained Lagrangian of a point mass on the circle of radius ℓ — and
energy_eq_space.deriv_sin_coord/deriv_cos_coordare general chain-rule facts kept local to keep this PR to onefile pair; happy to promote them to
Time/Derivatives.leanin a follow-up if preferred.Reviewer reading order:
Trajectory.lean§A (checkofLift_eq_iff's quantifiers), §B, §C;then
PhysicalSpace.lean§A–B (the global-Differentiablehypothesis comes from theTime.derivAPI), §C (the four identities); the API maps last — the parent's trajectory and Lagrangian rows
flip to done, the Lagrangian row citing both the definition (
SimplePendulum.lagrangian,Basic.lean) and the identification proved here.Verification: full
lake build+ complete linter battery pass; axiom audit clean; the two newmodules' imports verified minimal.
Developed with assistance from AI; all mathematics and proofs were reviewed and verified to compile.