ClassicalMechanics.ReferenceFrame.fromReferencePoints
defimported Lean
Build a reference frame from the trajectories of a collection of reference points. At each time, the reference points must form an affine basis: none is redundant, and together they span the whole space. One reference point is chosen as the origin, and the displacements from it to the remaining points form the coordinate basis. The resulting frame need not be inertial or orthonormal.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open ClassicalMechanics in variable {d : ℕ} in noncomputable def ClassicalMechanics.ReferenceFrame.fromReferencePoints (timeOrigin : Time) (referencePoints : Finset (Time → Space d)) (independence : ∀ t, AffineIndependent ℝ fun point : referencePoints => point.val t) (spans_space : ∀ t, affineSpan ℝ {point.val t | point : referencePoints} = ⊤) : ReferenceFrame d
- Defined in
- Physlib, `ClassicalMechanics.ReferenceFrame.fromReferencePoints`
- Lean proof
- By Raunak Chhatwal, from github.com/leanprover-community/physlib at
e411c6e89692(Copyright (c) 2026 Raunak Chhatwal. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.ClassicalMechanics.ReferenceFrame.fromReferencePoints← ClassicalMechanics.ReferenceFrame.fromReferencePoints (Physlib/SpaceAndTime/ReferenceFrame.lean:62): verbatim
- Verified
- 10 Oct 2026
- Axioms
- none listed
- Built on 31
- Space.instPseudoMetricSpaceSpace.instPseudoMetricSpace
- Time.instAddTorsorRealTime.instAddTorsorReal
- Time.instChartedSpaceRealTime.instChartedSpaceReal
- SpaceThe type
Space dis the world-volume which corresponds toddimensional (flat) Euclidean space with a given (but arbitrary) choice of… - Space.vsub_applySpace.vsub_apply
- Space.instChartedSpaceEuclideanSpaceRealFinSpace.instChartedSpaceEuclideanSpaceRealFin
- Space.instMetricSpaceSpace.instMetricSpace
- TimeAn instant in time with a given unit and orientation, but no distinguished origin.
- Space.instNonemptySpace.instNonempty
- Space.instVAddEuclideanSpaceRealFinSpace.instVAddEuclideanSpaceRealFin
- Time.instNormedAddTorsorRealTime.instNormedAddTorsorReal
- Space.instSubsingletonOfNatNatSpace.instSubsingletonOfNatNat
- Space.instVSubEuclideanSpaceRealFinSpace.instVSubEuclideanSpaceRealFin
- Space.instAddTorsorEuclideanSpaceRealFinSpace.instAddTorsorEuclideanSpaceRealFin
- Space.instNontrivialSpace.instNontrivial
- Time.vsub_eq_valTime.vsub_eq_val
- Time.vadd_valTime.vadd_val
- Time.instNonemptyTime.instNonempty
- Time.instMetricSpaceTime.instMetricSpace
- Space.instNormedAddTorsorEuclideanSpaceRealFinSpace.instNormedAddTorsorEuclideanSpaceRealFin
- Time.instVSubRealTime.instVSubReal
- Space.instCoeFunForallFinRealSpace.instCoeFunForallFinReal
- Time.instIsManifoldRealModelWithCornersSelfTopWithTopENatTime.instIsManifoldRealModelWithCornersSelfTopWithTopENat
- Space.vadd_valSpace.vadd_val
- Space.instIsManifoldRealEuclideanSpaceFinModelWithCornersSelfTopWithTopENatSpace.instIsManifoldRealEuclideanSpaceFinModelWithCornersSelfTopWithTopENat
- Space.vadd_applySpace.vadd_apply
- Space.instAddActionEuclideanSpaceRealFinSpace.instAddActionEuclideanSpaceRealFin
- ClassicalMechanics.ReferenceFrameA time origin and a time-indexed spatial origin and basis in
d-dimensional space. - Space.instDistSpace.instDist
- Space.val_eq_iffSpace.val_eq_iff
- Time.instVAddRealTime.instVAddReal
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open ClassicalMechanics in variable {d : ℕ} in /-- Build a reference frame from the trajectories of a collection of reference points. At each time, the reference points must form an affine basis: none is redundant, and together they span the whole space. One reference point is chosen as the origin, and the displacements from it to the remaining points form the coordinate basis. The resulting frame need not be inertial or orthonormal. -/ noncomputable def ClassicalMechanics.ReferenceFrame.fromReferencePoints (timeOrigin : Time) (referencePoints : Finset (Time → Space d)) (independence : ∀ t, AffineIndependent ℝ fun point : referencePoints => point.val t) (spans_space : ∀ t, affineSpan ℝ {point.val t | point : referencePoints} = ⊤) : ReferenceFrame d := let affineBasis (t : Time) : AffineBasis referencePoints ℝ (Space d) := ⟨fun point => point.val t, independence t, spans_space t⟩ let reference_points_not_empty := (affineBasis timeOrigin).nonempty let origin := Classical.choice reference_points_not_empty letI := Fintype.ofFinite {point : referencePoints // point ≠ origin} let basis t := (affineBasis t).basisOf origin let other_reference_points_size_eq_dim : Fintype.card {point : referencePoints // point ≠ origin} = d := by simpa using (Module.finrank_eq_card_basis <| basis timeOrigin).symm let basisReindexed t := (basis t).reindex (Fintype.equivFinOfCardEq other_reference_points_size_eq_dim) { timeOrigin := timeOrigin, origin := origin, basis := basisReindexed }