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(logic/embedding): use simps #4169

Closed
wants to merge 9 commits into from

Conversation

fpvandoorn
Copy link
Member

Some lemmas are slightly reformulated, and have a worse name. But they are (almost) never typed explicitly, since they are simp lemmas (even the occurrences in other files probably came from squeeze_simp).


@bryangingechen bryangingechen added the awaiting-review The author would like community review of the PR label Sep 17, 2020
@jcommelin
Copy link
Member

Hmmm, I really like simps! Would it be possible to have the new names use coe instead of to_fun? Because, when I see a simp-lemma whose name ends in to_fun I assume that it is a lemma that turns f.to_fun into a coerced (f : _ → _).

Or will this require ugly hackery?

@fpvandoorn
Copy link
Member Author

I'm glad it is useful!

I've been thinking about custom naming of simps.

Just renaming a projection should not be a problem. The nontrivial thing is to decide on the syntax to (1) do this automatically every time and (2) do this once for a specific simps attribute (if we want that).
An even easier thing to do is to is just to rename all projections that are coercions coe (and have no further control over it).

However, there are still questions like

fixed_points.to_alg_hom_to_fun_to_fun : ∀ (G : Type u) (F : Type v) [_inst_4 : group G] [_inst_5 : field F]
[_inst_6 : faithful_mul_semiring_action G F] (g : G) (a : F), ⇑(⇑(to_alg_hom G F) g) a = g • a

If we rename the projections, this might become fixed_points.to_alg_hom_coe_coe. There is already an option to only use the last projection name, so that it would become fixed_points.to_alg_hom_coe. That is satisfactory in this case, but in other cases you might want more freedom (if projection X and then Y is applied, I want the name to be foo_Z instead of foo_X_Y).

@fpvandoorn
Copy link
Member Author

I think this PR can still be merged, and then I'll change the naming scheme for simps in a later PR.

@semorrison
Copy link
Collaborator

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 24, 2020
bors bot pushed a commit that referenced this pull request Sep 24, 2020
Some lemmas are slightly reformulated, and have a worse name. But they are (almost) never typed explicitly, since they are simp lemmas (even the occurrences in other files probably came from `squeeze_simp`).
@bors
Copy link

bors bot commented Sep 24, 2020

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 24, 2020
Some lemmas are slightly reformulated, and have a worse name. But they are (almost) never typed explicitly, since they are simp lemmas (even the occurrences in other files probably came from `squeeze_simp`).
@bors
Copy link

bors bot commented Sep 24, 2020

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 24, 2020
Some lemmas are slightly reformulated, and have a worse name. But they are (almost) never typed explicitly, since they are simp lemmas (even the occurrences in other files probably came from `squeeze_simp`).
@bors
Copy link

bors bot commented Sep 24, 2020

Build failed:

@bryangingechen bryangingechen removed 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 Sep 24, 2020
@bryangingechen
Copy link
Collaborator

bors r+

@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 Sep 24, 2020
bors bot pushed a commit that referenced this pull request Sep 24, 2020
Some lemmas are slightly reformulated, and have a worse name. But they are (almost) never typed explicitly, since they are simp lemmas (even the occurrences in other files probably came from `squeeze_simp`).



Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
@bors
Copy link

bors bot commented Sep 24, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(logic/embedding): use simps [Merged by Bors] - feat(logic/embedding): use simps Sep 24, 2020
@bors bors bot closed this Sep 24, 2020
@bors bors bot deleted the simps-embedding branch September 24, 2020 10:39
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

4 participants