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(algebra/group_action_hom): define equivariant maps #2866

Closed
wants to merge 6 commits into from

Conversation

kckennylau
Copy link
Collaborator

@kckennylau kckennylau commented May 30, 2020

No description provided.

@kckennylau kckennylau added the WIP Work in progress label May 30, 2020
@rwbarton rwbarton changed the title feat(algebra/group_action_hom) define equivariant maps feat(algebra/group_action_hom): define equivariant maps May 30, 2020
@kckennylau
Copy link
Collaborator Author

In a future PR one might redefine linear_map based on R →+[M] S

@kckennylau kckennylau added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels May 30, 2020
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks!

src/algebra/group_action_hom.lean Outdated Show resolved Hide resolved
src/algebra/group_action_hom.lean Outdated Show resolved Hide resolved
src/algebra/group_action_hom.lean Outdated Show resolved Hide resolved
src/algebra/group_action_hom.lean Show resolved Hide resolved
src/algebra/group_action_hom.lean Outdated Show resolved Hide resolved
@jcommelin jcommelin 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 Jun 3, 2020
@jcommelin jcommelin requested a review from urkud June 8, 2020 09:56
@bryangingechen bryangingechen 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 Jun 10, 2020
@urkud
Copy link
Member

urkud commented Jun 12, 2020

LGTM but it would be nice if someone who understands has_coe vs has_coe_t rules to look at the has_coe instances.


## Main definitions

* `mul_action_hom M X Y`, the type of equivariant functions from `X` to `Y`.
Copy link
Member

Choose a reason for hiding this comment

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

We don't know what structures M, X and Y are meant to have here. It makes this whole docstring unusable.


-/

universes u v w u₁
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need all those universe variables? What happens if you put Type* everywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am used to using universe variables in lieu of Type* because of leanprover-community/lean#214 but it seems like this issue is resolved now.

@[nolint has_inhabited_instance]
structure distrib_mul_action_hom extends A →[M] B, A →+ B.

/-- Reinterpret an equivariant additive monoid homomorphism as an additive monoid homomorphism. -/
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand that docstring and the line below it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the make lint happy by adding a docstring to the automatically generated distrib_mul_action_hom.to_add_monoid_hom.

cf.

/-- Reinterpret an `open_subgroup` as a `subgroup`. -/
add_decl_doc open_subgroup.to_subgroup


variables {M A B}

@[simp] lemma coe_fn_coe (f : A →+[M] B) : ((f : A →+ B) : A → B) = f := rfl
Copy link
Member

Choose a reason for hiding this comment

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

Should this be norm_cast?

variables {M A B}

@[simp] lemma coe_fn_coe (f : A →+[M] B) : ((f : A →+ B) : A → B) = f := rfl
@[simp] lemma coe_fn_coe' (f : A →+[M] B) : ((f : A →[M] B) : A → B) = f := rfl
Copy link
Member

Choose a reason for hiding this comment

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

norm_cast?

@[simp] lemma map_zero (f : A →+[M] B) : f 0 = 0 :=
f.map_zero'

@[simp] lemma map_add (f : A →+[M] B) (x y : A) : f (x + y) = f x + f y :=
Copy link
Member

Choose a reason for hiding this comment

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

I'm always uneasy with such simp lemmas. It's not clear to me that the RHS is simpler.

Copy link
Member

Choose a reason for hiding this comment

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

But it's what we do for other "algebraic" maps in the library, and it seems to work quite well. I think that 95% of the time I'm using this direction.


variables (M) {A}

/-- The identity map is equivariant. -/
Copy link
Member

Choose a reason for hiding this comment

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

This docstring sounds like it describes a Prop.


variables {M R S}

@[simp] lemma coe_fn_coe (f : R →+*[M] S) : ((f : R →+* S) : R → S) = f := rfl
Copy link
Member

Choose a reason for hiding this comment

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

norm_cast?

variables {M R S}

@[simp] lemma coe_fn_coe (f : R →+*[M] S) : ((f : R →+* S) : R → S) = f := rfl
@[simp] lemma coe_fn_coe' (f : R →+*[M] S) : ((f : R →+[M] S) : R → S) = f := rfl
Copy link
Member

Choose a reason for hiding this comment

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

norm_cast?


variables (M) {R}

/-- The identity map is equivariant. -/
Copy link
Member

Choose a reason for hiding this comment

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

Docstring sounds like a Prop

@robertylewis
Copy link
Member

@PatrickMassot 's norm_cast suggestions sound right to me.

@robertylewis
Copy link
Member

LGTM but it would be nice if someone who understands has_coe vs has_coe_t rules to look at the has_coe instances.

The use of has_coe looks correct AFAIK.

@robertylewis robertylewis 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 Jun 13, 2020
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

@kckennylau I think this mostly looks good. If you address the comments, I would say "Let's Get This Merged".

@kckennylau
Copy link
Collaborator Author

Done @jcommelin

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@bors
Copy link

bors bot commented Jun 17, 2020

👎 Rejected by label

@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 17, 2020
@jcommelin jcommelin removed the awaiting-author A reviewer has asked the author a question or requested changes label Jun 17, 2020
@jcommelin
Copy link
Member

bors again
bors go ahead
bors don't complain
bors merge

@bors
Copy link

bors bot commented Jun 17, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/group_action_hom): define equivariant maps [Merged by Bors] - feat(algebra/group_action_hom): define equivariant maps Jun 17, 2020
@bors bors bot closed this Jun 17, 2020
@bors bors bot deleted the group-action-hom branch June 17, 2020 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

6 participants