Skip to content

feat(SpaceAndTime): add Galilean group API#1245

Merged
jstoobysmith merged 3 commits into
leanprover-community:masterfrom
Robby955:pr/911-galilean-group-api-2026-06-24
Jun 25, 2026
Merged

feat(SpaceAndTime): add Galilean group API#1245
jstoobysmith merged 3 commits into
leanprover-community:masterfrom
Robby955:pr/911-galilean-group-api-2026-06-24

Conversation

@Robby955

Copy link
Copy Markdown
Contributor

Addresses #911.

Summary

This adds the algebraic Galilean-group API in arbitrary spatial dimension.

Changes

  • add GalileanGroup d with orthogonal, boost-velocity, spatial-translation, and time-translation fields
  • add the Group (GalileanGroup d) instance
  • add the active coordinate action on Time × Space d as a MulAction
  • add inclusions from the Euclidean group, the orthogonal group, the existing rotation subgroup, spatial translations, the existing Euclidean translation subgroup, and time translations
  • add simp lemmas for the group fields and coordinate action

Related: #1116 added a first-step datatype and coordinate action. This PR takes a different route by adding the composition law, inverse, MulAction instance, and subgroup inclusions requested for #911.

The Lie-group instance is not included here. Physlib does not yet have the needed Lie-group or charted-space layer for Matrix.orthogonalGroup or EuclideanGroup, so that part should be a follow-up once the manifold API is in place.

Verification

  • lake build Physlib.SpaceAndTime.GalileanGroup.Basic
  • lake build Physlib
  • lake env lean /tmp/physlib-911-probe/GalileanProbe.lean
  • focused #lint on Physlib/SpaceAndTime/GalileanGroup/Basic.lean
  • lake exe lint_all --fast (build/import/tag/sorry checks pass; the repo-wide style phase still reports unrelated existing style issues)
  • ./scripts/lint-style.py Physlib/SpaceAndTime/GalileanGroup/Basic.lean
  • git diff --check
  • no sorry, admit, or axiom in touched files

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for this PR, which will now be reviewed. If submitting to ./Physlib or ./QuantumInfo, please see our review guidelines if you are not familiar with the process. You should expect a back and forth with a reviewer before your PR is merged. See also that link for how to add appropriate labels to your PR. The PR will also go through a number of automated checks. You can learn more about these here, including how to run them locally.

If you are submitting to ./PhyslibAlpha there will be a lighter review process, though your PR must still pass the automated checks.

If you want to bring attention to this PR, please write a message on this thread of the Lean Zulip.

Important: If a reviewer adds an awaiting-author label to your PR, once you have addressed the review comments, please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

rw [map_smul]

/-- The identity Galilean transformation. -/
def identity : GalileanGroup d :=

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.

I would not define this explicitly, nor inv and mil, I would instead include them directly in the instance

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.

Or define them in parts using instances of One, Mul etc.

namespace GalileanGroup

/-- A spatial vector viewed as a displacement of the chosen origin in `Space d`. -/
noncomputable def vectorToSpace (v : EuclideanSpace ℝ (Fin d)) : Space d :=

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 the corresponding Space file if indeed needed.

@[simp] lemma one_rotation : (1 : GalileanGroup d).rotation = 1 := rfl
@[simp] lemma one_velocity : (1 : GalileanGroup d).velocity = 0 := rfl
@[simp] lemma one_spaceTranslation : (1 : GalileanGroup d).spaceTranslation = 0 := rfl
@[simp] lemma one_timeTranslation : (1 : GalileanGroup d).timeTranslation = 0 := rfl

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.

If you use the instances One you can put these lemmas below that (giving a nice structure to the file). I would also put new lines between lemmas like this.

@jstoobysmith jstoobysmith added the awaiting-author A reviewer has asked the author a question or requested changes label Jun 24, 2026
@Robby955

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 Jun 24, 2026
@Robby955

Copy link
Copy Markdown
Contributor Author

@jstoobysmith Sure, I think I integrated those into my updates, if not just let me know what you'd like to see. Thanks!

@Robby955 Robby955 marked this pull request as ready for review June 24, 2026 16:09

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

This looks great to me, many thanks for making the changes. I've approved, will check it works with the bump, and if so merge.

@jstoobysmith jstoobysmith added the ready-to-merge This PR is approved and will be merged shortly label Jun 25, 2026
@jstoobysmith jstoobysmith merged commit 18ad9f3 into leanprover-community:master Jun 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR is approved and will be merged shortly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants