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: tactic congr! and improvement to convert #2566

Closed
wants to merge 14 commits into from

Conversation

kmill
Copy link
Contributor

@kmill kmill commented Mar 2, 2023

This introduces a tactic congr! that is an analogue to mathlib 3's congr'. It is a more insistent version of congr that makes use of more congruence lemmas (including user congruence lemmas), propext, funext, and Subsingleton instances. It also has a feature to lift reflexive relations to equalities. Along with funext, the tactic does intros, allowing congr! to get access to function bodies; the introduced variables can be named using rename_i if needed.

This also modifies convert to use congr! rather than congr, which makes it work more like the mathlib3 version of the tactic.


Open in Gitpod

@kmill kmill added WIP Work in progress t-meta Tactics, attributes or user commands labels Mar 2, 2023
@kmill kmill added awaiting-review The author would like community review of the PR awaiting-CI and removed WIP Work in progress labels Mar 2, 2023
Copy link
Member

@fpvandoorn fpvandoorn left a comment

Choose a reason for hiding this comment

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

LGTM

It would be nice to add some tests to the test folder, especially if you think that any of the subfunctions of congr! are not yet tested in mathlib.

bors d+

Mathlib/Tactic/Congr!.lean Outdated Show resolved Hide resolved
Mathlib/Tactic/Congr!.lean Show resolved Hide resolved
Mathlib/Tactic/Congr!.lean Outdated Show resolved Hide resolved
Mathlib/Tactic/Congr!.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Mar 2, 2023

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

@semorrison semorrison added delegated and removed awaiting-review The author would like community review of the PR labels Mar 2, 2023
@fpvandoorn
Copy link
Member

One more remark: congr! e with ... might be useful, to name newly introduced variable names. (Doesn't have to go into this PR, of course.)

@kmill kmill removed the awaiting-CI label Mar 2, 2023
@kmill
Copy link
Contributor Author

kmill commented Mar 2, 2023

bors r+

bors bot pushed a commit that referenced this pull request Mar 2, 2023
This introduces a tactic `congr!` that is an analogue to mathlib 3's `congr'`. It is a more insistent version of `congr` that makes use of more congruence lemmas (including user congruence lemmas), `propext`, `funext`, and `Subsingleton` instances. It also has a feature to lift reflexive relations to equalities. Along with `funext`, the tactic does `intros`, allowing `congr!` to get access to function bodies; the introduced variables can be named using `rename_i` if needed.

This also modifies `convert` to use `congr!` rather than `congr`, which makes it work more like the mathlib3 version of the tactic.
@bors
Copy link

bors bot commented Mar 3, 2023

Timed out.

@kmill
Copy link
Contributor Author

kmill commented Mar 3, 2023

There's nothing on the queue right now, so I guess I'll try again and hope timing out was just a fluke?

bors r+

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Mar 3, 2023
bors bot pushed a commit that referenced this pull request Mar 3, 2023
This introduces a tactic `congr!` that is an analogue to mathlib 3's `congr'`. It is a more insistent version of `congr` that makes use of more congruence lemmas (including user congruence lemmas), `propext`, `funext`, and `Subsingleton` instances. It also has a feature to lift reflexive relations to equalities. Along with `funext`, the tactic does `intros`, allowing `congr!` to get access to function bodies; the introduced variables can be named using `rename_i` if needed.

This also modifies `convert` to use `congr!` rather than `congr`, which makes it work more like the mathlib3 version of the tactic.
@bors
Copy link

bors bot commented Mar 3, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: tactic congr! and improvement to convert [Merged by Bors] - feat: tactic congr! and improvement to convert Mar 3, 2023
@bors bors bot closed this Mar 3, 2023
@bors bors bot deleted the kmill_feat_congr2 branch March 3, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants