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

case name has unnecessary parts #6550

Open
3 tasks done
b-mehta opened this issue Jan 6, 2025 · 0 comments
Open
3 tasks done

case name has unnecessary parts #6550

b-mehta opened this issue Jan 6, 2025 · 0 comments
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@b-mehta
Copy link
Contributor

b-mehta commented Jan 6, 2025

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

The case name is unnecessarily long when deconstructing many parts.

Context

Example:

example (h : ∃ a b c d e f g : ℕ, False ∨ False) : False := by
  obtain ⟨a, b, c, d, e, f, g, h | h⟩ := h
  · sorry
  · sorry

The goals are now labelled case intro.intro.intro.intro.intro.intro.intro.inl and case intro.intro.intro.intro.intro.intro.intro.inr.

This happens surprisingly often to me, particularly when I deconstruct many existentials: I just had a case where it was named intro.intro.intro.intro.mk.mk.intro.intro.inr.twice where inr.twice is the only meaningful part of the label.

Steps to Reproduce

  1. Code as above

Expected behavior:
Desirable behaviour here would be that when deconstructing an inductive which has exactly one constructor, nothing is appended to the case name. In this case, the goals would be labelled case inl and case inr.

Actual behavior:
The goals are labelled case intro.intro.intro.intro.intro.intro.intro.inl and case intro.intro.intro.intro.intro.intro.intro.inr.

Versions

Using live.lean-lang.org:
Lean 4.16.0-rc1
Target: x86_64-unknown-linux-gnu

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@b-mehta b-mehta added the bug Something isn't working label Jan 6, 2025
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

No branches or pull requests

2 participants