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: interval_cases tactic #1155

Closed
wants to merge 8 commits into from
Closed

Conversation

digama0
Copy link
Member

@digama0 digama0 commented Dec 21, 2022

Implements the interval_cases tactic from mathlib. This is a from scratch implementation, which should be a lot faster and give better goals than the original. I also tried to make a reasonable MetaM version of the tactic.

The original tactic was very generic and used typeclass inference to find most of the structure on the type. The new one is still somewhat type-generic but relies on meta-instances which implement the required functionality for supported types. Currently only Nat and Int are supported; PNat is more difficult because norm_num doesn't work on it.

@digama0 digama0 added the WIP Work in progress label Dec 21, 2022
@hrmacbeth hrmacbeth linked an issue Dec 21, 2022 that may be closed by this pull request
@hrmacbeth hrmacbeth added the t-meta Tactics, attributes or user commands label Jan 2, 2023
@digama0 digama0 added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Jan 12, 2023
@semorrison
Copy link
Contributor

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Jan 17, 2023
bors bot pushed a commit that referenced this pull request Jan 17, 2023
Implements the `interval_cases` tactic from mathlib. This is a from scratch implementation, which should be a lot faster and give better goals than the original. I also tried to make a reasonable MetaM version of the tactic.

The original tactic was very generic and used typeclass inference to find most of the structure on the type. The new one is still somewhat type-generic but relies on meta-instances which implement the required functionality for supported types. Currently only `Nat` and `Int` are supported; `PNat` is more difficult because `norm_num` doesn't work on it.
@bors
Copy link

bors bot commented Jan 17, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Jan 17, 2023
Implements the `interval_cases` tactic from mathlib. This is a from scratch implementation, which should be a lot faster and give better goals than the original. I also tried to make a reasonable MetaM version of the tactic.

The original tactic was very generic and used typeclass inference to find most of the structure on the type. The new one is still somewhat type-generic but relies on meta-instances which implement the required functionality for supported types. Currently only `Nat` and `Int` are supported; `PNat` is more difficult because `norm_num` doesn't work on it.
@bors
Copy link

bors bot commented Jan 17, 2023

Build failed (retrying...):

  • Build

bors bot pushed a commit that referenced this pull request Jan 17, 2023
Implements the `interval_cases` tactic from mathlib. This is a from scratch implementation, which should be a lot faster and give better goals than the original. I also tried to make a reasonable MetaM version of the tactic.

The original tactic was very generic and used typeclass inference to find most of the structure on the type. The new one is still somewhat type-generic but relies on meta-instances which implement the required functionality for supported types. Currently only `Nat` and `Int` are supported; `PNat` is more difficult because `norm_num` doesn't work on it.
@bors
Copy link

bors bot commented Jan 17, 2023

Build failed:

@hrmacbeth
Copy link
Member

The new Rat functionality of norm_num broke the build, and I have fixed it (at least, it builds) by blindly replacing toRawEqs with toRawIntEq.get!s, following the model of the ring fixes in #1441. @digama0 Feel free to revert if I did it wrong.

@digama0
Copy link
Member Author

digama0 commented Jan 17, 2023

bors merge

bors bot pushed a commit that referenced this pull request Jan 17, 2023
Implements the `interval_cases` tactic from mathlib. This is a from scratch implementation, which should be a lot faster and give better goals than the original. I also tried to make a reasonable MetaM version of the tactic.

The original tactic was very generic and used typeclass inference to find most of the structure on the type. The new one is still somewhat type-generic but relies on meta-instances which implement the required functionality for supported types. Currently only `Nat` and `Int` are supported; `PNat` is more difficult because `norm_num` doesn't work on it.

Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com>
@bors
Copy link

bors bot commented Jan 17, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: interval_cases tactic [Merged by Bors] - feat: interval_cases tactic Jan 17, 2023
@bors bors bot closed this Jan 17, 2023
@bors bors bot deleted the interval_cases branch January 17, 2023 11:28
jcommelin pushed a commit that referenced this pull request Jan 23, 2023
Implements the `interval_cases` tactic from mathlib. This is a from scratch implementation, which should be a lot faster and give better goals than the original. I also tried to make a reasonable MetaM version of the tactic.

The original tactic was very generic and used typeclass inference to find most of the structure on the type. The new one is still somewhat type-generic but relies on meta-instances which implement the required functionality for supported types. Currently only `Nat` and `Int` are supported; `PNat` is more difficult because `norm_num` doesn't work on it.

Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

interval_cases tactic
3 participants