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
[Merged by Bors] - feat(algebra/add_torsor): torsors of additive group actions #2720
Conversation
…actions Define torsors of additive commutative group actions, to the extent needed for (and with notation motivated by) affine spaces, to the extent needed for Euclidean spaces. See https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Some.20olympiad.20formalisations for the discussion leading to this particular structure.
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
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.
Nice, thanks!
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
I've made |
I'd like to step back and think about how this fits into the rest of the library. Presumably we will want torsors for a (multiplicative) group at some point, which raises the following questions.
I know these can be annoying questions to think about when you just want to do Euclidean geometry, but otherwise these questions will just come up in the future when it's more difficult to modify the foundations. |
From observation of mathlib development over the past few months, it seems pretty good at large-scale refactorings whenever someone wants to do something that implies refactoring existing code (and the further something is from the foundations, the fewer changes are needed to it in such a refactoring beyond simple renaming of results). Changing names (of lemmas, classes, "vector" and notation) is easy, now (if someone can say what the names should be) or in future, if desired (but don't keep switching back and forth between wanting |
@jsm28 It's possible, but it's usually not so much fun. So if we can avoid such a refactor with a bit of careful planning ahead, I would very much prefer that 😉 |
I've now changed this to define separate |
bors merge |
Define torsors of additive group actions, to the extent needed for (and with notation motivated by) affine spaces, to the extent needed for Euclidean spaces. See https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Some.20olympiad.20formalisations for the discussion leading to this particular structure.
Pull request successfully merged into master. Build succeeded: |
The definition of `vsub_set` in `algebra/add_torsor` does something similar to `set.image2`, but expressed directly with `∃` inside `{...}`. Various lemmas in `linear_algebra/affine_space/basic` likewise express such sets of subtractions with a given point on one side directly rather than using `set.image`. These direct forms can be inconvenient to use with lemmas about `set.image2`, `set.image` and `set.range`; in particular, they have the equality inside the binders expressed the other way round, leading to constructs such as `conv_lhs { congr, congr, funext, conv { congr, funext, rw eq_comm } }` when it's necessary to convert one form to the other. The form of `vsub_set` was suggested in review of #2720, the original `add_torsor` addition, based on what was then used in `algebra/pointwise`. Since then, `image2` has been added to mathlib and `algebra/pointwise` now uses `image2`. Thus, convert these definitions to using `image2` or `''` as appropriate, so simplifying various proofs. This PR deliberately only addresses `vsub_set` and related definitions for such sets of subtractions; it does not attempt to change any other definitions in `linear_algebra/affine_space/basic` that might also be able to use `image2` or `''` but are not such sets of subtractions, and does not change the formulations of lemmas not involving such sets even if a rearrangement of equalities and existential quantifiers in some such lemmas might bring them closer to the formulations about images of sets.
…set (#3858) The definition of `vsub_set` in `algebra/add_torsor` does something similar to `set.image2`, but expressed directly with `∃` inside `{...}`. Various lemmas in `linear_algebra/affine_space/basic` likewise express such sets of subtractions with a given point on one side directly rather than using `set.image`. These direct forms can be inconvenient to use with lemmas about `set.image2`, `set.image` and `set.range`; in particular, they have the equality inside the binders expressed the other way round, leading to constructs such as `conv_lhs { congr, congr, funext, conv { congr, funext, rw eq_comm } }` when it's necessary to convert one form to the other. The form of `vsub_set` was suggested in review of #2720, the original `add_torsor` addition, based on what was then used in `algebra/pointwise`. Since then, `image2` has been added to mathlib and `algebra/pointwise` now uses `image2`. Thus, convert these definitions to using `image2` or `''` as appropriate, so simplifying various proofs. This PR deliberately only addresses `vsub_set` and related definitions for such sets of subtractions; it does not attempt to change any other definitions in `linear_algebra/affine_space/basic` that might also be able to use `image2` or `''` but are not such sets of subtractions, and does not change the formulations of lemmas not involving such sets even if a rearrangement of equalities and existential quantifiers in some such lemmas might bring them closer to the formulations about images of sets.
…er-community#2720) Define torsors of additive group actions, to the extent needed for (and with notation motivated by) affine spaces, to the extent needed for Euclidean spaces. See https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Some.20olympiad.20formalisations for the discussion leading to this particular structure.
Define torsors of additive group actions, to the extent needed for
(and with notation motivated by) affine spaces, to the extent needed
for Euclidean spaces. See
https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Some.20olympiad.20formalisations
for the discussion leading to this particular structure.