This repository was archived by the owner on Jul 24, 2024. It is now read-only.
[Merged by Bors] - fix(tactic/core): Make the classical tactic behave like open_locale classical#14122
Closed
eric-wieser wants to merge 22 commits intomasterfrom
Closed
[Merged by Bors] - fix(tactic/core): Make the classical tactic behave like open_locale classical#14122eric-wieser wants to merge 22 commits intomasterfrom
classical tactic behave like open_locale classical#14122eric-wieser wants to merge 22 commits intomasterfrom
Conversation
Member
|
Note: if this works, we probably want to mimic |
Member
Author
|
Alternatively, we might want to just remove those lines from the |
Member
Author
|
Oh, actually |
Member
|
Presumably it is to deal with performance issues causes by those instances. But the de-instantiated instances should of course be removed. |
eric-wieser
commented
May 15, 2022
Member
|
This looks great! bors merge |
bors bot
pushed a commit
that referenced
this pull request
May 16, 2022
…e classical` (#14122) This renames the existing `classical` tactic to `classical!`, and adds a new `classical` tactic that is equivalent to `open_locale classical`. Comparing the effects of these: ```lean import tactic.interactive import tactic.localized -- this uses the noncomputable instance noncomputable def foo : decidable_eq ℕ := λ m n, begin classical!, apply_instance, end def bar : decidable_eq ℕ := λ m n, begin classical, apply_instance, end section open_locale classical def baz : decidable_eq ℕ := λ m n, by apply_instance end example : baz = bar := rfl ``` In a few places `classical` was actually just being used as a `resetI`. Only a very small number of uses of `classical` actually needed the more aggressive `classical!` (there are roughtly 500 uses in total); while a number of `congr`s can be eliminated with this change.
|
Pull request successfully merged into master. Build succeeded: |
classical tactic behave like open_locale classicalclassical tactic behave like open_locale classical
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This renames the existing
classicaltactic toclassical!, and adds a newclassicaltactic that is equivalent toopen_locale classical.Comparing the effects of these:
In a few places
classicalwas actually just being used as aresetI. Only a very small number of uses ofclassicalactually needed the more aggressiveclassical!(there are roughtly 500 uses in total); while a number ofcongrs can be eliminated with this change.