Skip to content

[Merged by Bors] - chore: use FunLike.coe as coercion for OrderIso and RelEmbedding#3082

Closed
ChrisHughes24 wants to merge 23 commits intomasterfrom
RingEquiv_CoeFn
Closed

[Merged by Bors] - chore: use FunLike.coe as coercion for OrderIso and RelEmbedding#3082
ChrisHughes24 wants to merge 23 commits intomasterfrom
RingEquiv_CoeFn

Conversation

@ChrisHughes24
Copy link
Copy Markdown
Member

@ChrisHughes24 ChrisHughes24 commented Mar 24, 2023

The changes I made were.

Use FunLike.coe instead of the previous definition for the coercion from RelEmbedding To functions and OrderIso to functions. The previous definition was

instance : CoeFun (r ↪r s) fun _ => α → β :=
--   ⟨fun o => o.toEmbedding⟩

This does not display nicely.

I also restored the simp attributes on a few lemmas that had their simp attributes removed during the port. Eventually
we might want a RelEmbeddingLike class, but this PR does not implement that.

I also added a few lemmas that proved that coercions to function commute with RelEmbedding.toRelHom or similar.

The other changes are just fixing the build. One strange issue is that the lemma Finset.mapEmbedding_apply seems to be harder to use, it has to be used with rw instead of simp


Open in Gitpod

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Mar 30, 2023

@ChrisHughes24, would you be able to write an explanation of what you're doing, and why, in the PR description? (Or linking to zulip as appropriate?)

@kim-em kim-em added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Mar 30, 2023
@ChrisHughes24 ChrisHughes24 added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Mar 30, 2023
@Parcly-Taxel Parcly-Taxel added the enhancement New feature or request label Apr 7, 2023
@Parcly-Taxel Parcly-Taxel requested a review from kim-em April 7, 2023 04:11
@kim-em kim-em added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 7, 2023
@kim-em kim-em added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 12, 2023
@kim-em kim-em removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 13, 2023
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Apr 20, 2023

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Apr 20, 2023
bors bot pushed a commit that referenced this pull request Apr 20, 2023
The changes I made were.

Use `FunLike.coe` instead of the previous definition for the coercion from `RelEmbedding` To functions and `OrderIso` to functions. The previous definition was
```lean
instance : CoeFun (r ↪r s) fun _ => α → β :=
--   ⟨fun o => o.toEmbedding⟩
```
This does not display nicely.

I also restored the `simp` attributes on a few lemmas that had their `simp` attributes removed during the port. Eventually
we might want a `RelEmbeddingLike` class, but this PR does not implement that.

I also added a few lemmas that proved that coercions to function commute with `RelEmbedding.toRelHom` or similar.

The other changes are just fixing the build. One strange issue is that the lemma `Finset.mapEmbedding_apply` seems to be harder to use, it has to be used with `rw` instead of `simp`



Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
@bors
Copy link
Copy Markdown

bors bot commented Apr 20, 2023

This PR was included in a batch that was canceled, it will be automatically retried

bors bot pushed a commit that referenced this pull request Apr 20, 2023
The changes I made were.

Use `FunLike.coe` instead of the previous definition for the coercion from `RelEmbedding` To functions and `OrderIso` to functions. The previous definition was
```lean
instance : CoeFun (r ↪r s) fun _ => α → β :=
--   ⟨fun o => o.toEmbedding⟩
```
This does not display nicely.

I also restored the `simp` attributes on a few lemmas that had their `simp` attributes removed during the port. Eventually
we might want a `RelEmbeddingLike` class, but this PR does not implement that.

I also added a few lemmas that proved that coercions to function commute with `RelEmbedding.toRelHom` or similar.

The other changes are just fixing the build. One strange issue is that the lemma `Finset.mapEmbedding_apply` seems to be harder to use, it has to be used with `rw` instead of `simp`



Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
@bors
Copy link
Copy Markdown

bors bot commented Apr 20, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore: use FunLike.coe as coercion for OrderIso and RelEmbedding [Merged by Bors] - chore: use FunLike.coe as coercion for OrderIso and RelEmbedding Apr 20, 2023
@bors bors bot closed this Apr 20, 2023
@bors bors bot deleted the RingEquiv_CoeFn branch April 20, 2023 08:28
kbuzzard pushed a commit that referenced this pull request Apr 22, 2023
The changes I made were.

Use `FunLike.coe` instead of the previous definition for the coercion from `RelEmbedding` To functions and `OrderIso` to functions. The previous definition was
```lean
instance : CoeFun (r ↪r s) fun _ => α → β :=
--   ⟨fun o => o.toEmbedding⟩
```
This does not display nicely.

I also restored the `simp` attributes on a few lemmas that had their `simp` attributes removed during the port. Eventually
we might want a `RelEmbeddingLike` class, but this PR does not implement that.

I also added a few lemmas that proved that coercions to function commute with `RelEmbedding.toRelHom` or similar.

The other changes are just fixing the build. One strange issue is that the lemma `Finset.mapEmbedding_apply` seems to be harder to use, it has to be used with `rw` instead of `simp`



Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
kim-em pushed a commit that referenced this pull request May 10, 2023
The changes I made were.

Use `FunLike.coe` instead of the previous definition for the coercion from `RelEmbedding` To functions and `OrderIso` to functions. The previous definition was
```lean
instance : CoeFun (r ↪r s) fun _ => α → β :=
--   ⟨fun o => o.toEmbedding⟩
```
This does not display nicely.

I also restored the `simp` attributes on a few lemmas that had their `simp` attributes removed during the port. Eventually
we might want a `RelEmbeddingLike` class, but this PR does not implement that.

I also added a few lemmas that proved that coercions to function commute with `RelEmbedding.toRelHom` or similar.

The other changes are just fixing the build. One strange issue is that the lemma `Finset.mapEmbedding_apply` seems to be harder to use, it has to be used with `rw` instead of `simp`



Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants