Skip to content

feat: let induction take zero alteratives - #6486

Merged
kim-em merged 1 commit into
leanprover:masterfrom
kmill:induction_empty_with
Jan 8, 2025
Merged

kim-em merged 1 commit into
leanprover:masterfrom
kmill:induction_empty_with

Conversation

@kmill

@kmill kmill commented Dec 31, 2024

Copy link
Copy Markdown
Collaborator

This PR modifies the induction/cases syntax so that the with clause does not need to be followed by any alternatives. This improves friendliness of these tactics, since this lets them surface the names of the missing alternatives:

example (n : Nat) : True := by
  induction n with
/-            ~~~~
alternative 'zero' has not been provided
alternative 'succ' has not been provided
-/

Related to issue #3555

This PR modifies the `induction`/`cases` syntax so that the `with` clause does not need to be followed by any alternatives. This improves friendliness of these tactics, since this lets them surface the names of the missing alternatives:
```lean
example (n : Nat) : True := by
  induction n with
/-            ~~~~
alternative 'zero' has not been provided
alternative 'succ' has not been provided
-/
```

Related to issue leanprover#3555
@kmill kmill added the changelog-language Language features and metaprograms label Dec 31, 2024
@kmill
kmill requested a review from kim-em as a code owner December 31, 2024 17:59
@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 Dec 31, 2024
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Dec 31, 2024
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Dec 31, 2024
@kmill kmill added the awaiting-review Waiting for someone to review the PR label Dec 31, 2024
@ghost

ghost commented Dec 31, 2024

Copy link
Copy Markdown

Mathlib CI status (docs):

@ghost ghost added the builds-mathlib CI has verified that Mathlib builds against this PR label Dec 31, 2024
@kim-em kim-em removed the awaiting-review Waiting for someone to review the PR label Jan 8, 2025
@kim-em
kim-em added this pull request to the merge queue Jan 8, 2025
Merged via the queue into leanprover:master with commit 18b183f Jan 8, 2025
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Jan 21, 2025
This PR modifies the `induction`/`cases` syntax so that the `with`
clause does not need to be followed by any alternatives. This improves
friendliness of these tactics, since this lets them surface the names of
the missing alternatives:
```lean
example (n : Nat) : True := by
  induction n with
/-            ~~~~
alternative 'zero' has not been provided
alternative 'succ' has not been provided
-/
```

Related to issue leanprover#3555
JovanGerb pushed a commit to JovanGerb/lean4 that referenced this pull request Jan 21, 2025
This PR modifies the `induction`/`cases` syntax so that the `with`
clause does not need to be followed by any alternatives. This improves
friendliness of these tactics, since this lets them surface the names of
the missing alternatives:
```lean
example (n : Nat) : True := by
  induction n with
/-            ~~~~
alternative 'zero' has not been provided
alternative 'succ' has not been provided
-/
```

Related to issue leanprover#3555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-language Language features 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