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

feat: use expose_names in try? #6967

Merged
merged 1 commit into from
Feb 6, 2025
Merged

feat: use expose_names in try? #6967

merged 1 commit into from
Feb 6, 2025

Conversation

leodemoura
Copy link
Member

This PR ensures try? can suggest tactics that need to reference inaccessible local names.
Example:

/--
info: Try these:
• · expose_names; induction as, bs_1 using app.induct <;> grind [= app]
• · expose_names; induction as, bs_1 using app.induct <;> grind only [app]
-/
#guard_msgs (info) in
example : app (app as bs) cs = app as (app bs cs) := by
  have bs := 20 -- shadows `bs` in the target
  try?

@leodemoura leodemoura added the changelog-language Language features, tactics, and metaprograms label Feb 6, 2025
@leodemoura leodemoura requested a review from kim-em as a code owner February 6, 2025 05:20
@leodemoura leodemoura enabled auto-merge February 6, 2025 05:20
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc February 6, 2025 05:27 Inactive
@leodemoura leodemoura added this pull request to the merge queue Feb 6, 2025
@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Feb 6, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase fbeec32c2b8d45051af34e84205e045cc6cd1144 --onto 1f956ad1af1cf423ad68f3ddc294fd2b7e5117df. (2025-02-06 05:49:10)

Merged via the queue into master with commit b01ca8e Feb 6, 2025
18 checks passed
tobiasgrosser pushed a commit to opencompl/lean4 that referenced this pull request Feb 16, 2025
This PR ensures `try?` can suggest tactics that need to reference
inaccessible local names.
Example: 
```lean
/--
info: Try these:
• · expose_names; induction as, bs_1 using app.induct <;> grind [= app]
• · expose_names; induction as, bs_1 using app.induct <;> grind only [app]
-/
#guard_msgs (info) in
example : app (app as bs) cs = app as (app bs cs) := by
  have bs := 20 -- shadows `bs` in the target
  try?
```
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 24, 2025
This PR ensures `try?` can suggest tactics that need to reference
inaccessible local names.
Example: 
```lean
/--
info: Try these:
• · expose_names; induction as, bs_1 using app.induct <;> grind [= app]
• · expose_names; induction as, bs_1 using app.induct <;> grind only [app]
-/
#guard_msgs (info) in
example : app (app as bs) cs = app as (app bs cs) := by
  have bs := 20 -- shadows `bs` in the target
  try?
```
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 25, 2025
This PR ensures `try?` can suggest tactics that need to reference
inaccessible local names.
Example: 
```lean
/--
info: Try these:
• · expose_names; induction as, bs_1 using app.induct <;> grind [= app]
• · expose_names; induction as, bs_1 using app.induct <;> grind only [app]
-/
#guard_msgs (info) in
example : app (app as bs) cs = app as (app bs cs) := by
  have bs := 20 -- shadows `bs` in the target
  try?
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-language Language features, tactics, and metaprograms toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants