Skip to content

[Merged by Bors] - feat: interval_cases tactic#1155

Closed
digama0 wants to merge 8 commits intomasterfrom
interval_cases
Closed

[Merged by Bors] - feat: interval_cases tactic#1155
digama0 wants to merge 8 commits intomasterfrom
interval_cases

Conversation

@digama0
Copy link
Copy Markdown
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 and removed WIP Work in progress labels Jan 12, 2023
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Jan 17, 2023

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review 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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

bors bot commented Jan 17, 2023

Build failed:

@hrmacbeth
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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