Skip to content
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(linear_algebra/affine_space/affine_subspace/pointwise): Translations are an action on affine subspaces #14230

Closed
wants to merge 16 commits into from

Conversation

winston-h-zhang
Copy link
Collaborator

@winston-h-zhang winston-h-zhang commented May 18, 2022


Defines instance : has_vadd V (affine_subspace k P) and instance : add_action V (affine_subspace k P) of the form p → v +ᵥ p.

I feel like this is really about sub-torsors, but that would require refactoring... :(
Open in Gitpod

@semorrison semorrison added the awaiting-review The author would like community review of the PR label May 18, 2022
@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels May 18, 2022
@winston-h-zhang winston-h-zhang self-assigned this May 19, 2022
@winston-h-zhang winston-h-zhang added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels May 19, 2022
@eric-wieser
Copy link
Member

eric-wieser commented May 22, 2022

Note that with #14319 this is basically a one-liner if you put it in a new file where you can import map; S.map (affine_equiv.const_vadd k O x)

@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels May 24, 2022
@winston-h-zhang winston-h-zhang added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels May 24, 2022
@winston-h-zhang
Copy link
Collaborator Author

Since we're spliting this off to a new pointwise file, why not reorganize affine_subspace entirely into something more like affine_subspace/{defs, lattice, basic, pointwise}? Then the usage of (s : set P).nonempty everywhere could be replaced with s ≠ ⊥.

@eric-wieser
Copy link
Member

eric-wieser commented May 25, 2022

Let's try to avoid making multiple refactors at once. That does sound like a reasonable idea for a follow-up PR.

@winston-h-zhang
Copy link
Collaborator Author

@YaelDillies @eric-wieser I've fixed the names, lmk if there's anything else

@YaelDillies YaelDillies changed the title feat(linear_algebra/affine_space/affine_subspace): Translations are an action on affine subspaces feat(linear_algebra/affine_space/affine_subspace/pointwise): Translations are an action on affine subspaces May 28, 2022
@winston-h-zhang
Copy link
Collaborator Author

@YaelDillies @eric-wieser When you guys have time please take a look at this again, thank you!

@YaelDillies
Copy link
Collaborator

Sorry, this might have to wait a week. This looks good overall but I don't have time to agree on the details.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another good lemma to have would be that the affine span of a pointwise vadd on a set is the same as the pointwise vadd on the span of the set (which should follow immediately from affine_subspace.map_span)

@winston-h-zhang
Copy link
Collaborator Author

If it looks good overall, may I have merging permission? 👀

src/linear_algebra/affine_space/pointwise.lean Outdated Show resolved Hide resolved
exact submodule.map_id _,
end

lemma pointwise_vadd_span (v : V) {s : set P} :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lemma pointwise_vadd_span (v : V) {s : set P} :
lemma pointwise_vadd_span (v : V) (s : set P) :

src/linear_algebra/affine_space/pointwise.lean Outdated Show resolved Hide resolved
@[simp] lemma coe_pointwise_vadd (v : V) (s : affine_subspace k P) :
((v +ᵥ s : affine_subspace k P) : set P) = v +ᵥ s := rfl

lemma vadd_mem_pointwise_vadd_iff (v : V) {s : affine_subspace k P} {p : P} :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lemma vadd_mem_pointwise_vadd_iff (v : V) {s : affine_subspace k P} {p : P} :
lemma vadd_mem_pointwise_vadd_iff {v : V} {s : affine_subspace k P} {p : P} :

variables {V₁ P₁ V₂ P₂ V₃ P₃ : Type*}
variables [add_comm_group V₁] [module k V₁] [add_torsor V₁ P₁]
variables [add_comm_group V₂] [module k V₂] [add_torsor V₂ P₂]
variables [add_comm_group V₃] [module k V₃] [add_torsor V₃ P₃]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is V₃ used here? If not, can you remove all mentions of it?

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors d+

Let's just wait for CI to pass.

@bors
Copy link

bors bot commented Jun 8, 2022

✌️ winston-h-zhang can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@eric-wieser eric-wieser added the awaiting-CI The author would like to see what CI has to say before doing more work. label Jun 8, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Jun 8, 2022
@eric-wieser
Copy link
Member

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Jun 8, 2022
bors bot pushed a commit that referenced this pull request Jun 8, 2022
…ions are an action on affine subspaces (#14230)

Co-authored-by: Hanting Zhang <hantingzhang03@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@winston-h-zhang winston-h-zhang removed the request for review from YaelDillies June 8, 2022 21:51
@bors
Copy link

bors bot commented Jun 8, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(linear_algebra/affine_space/affine_subspace/pointwise): Translations are an action on affine subspaces [Merged by Bors] - feat(linear_algebra/affine_space/affine_subspace/pointwise): Translations are an action on affine subspaces Jun 8, 2022
@bors bors bot closed this Jun 8, 2022
@bors bors bot deleted the hzhang-affine_space_action branch June 8, 2022 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants