`exact?` fails to close goal
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Domain
- compilers
Research direction
Start by reproducing the minimal example in live.lean-lang.org with the reported Lean nightly version, comparing exact? and apply? on the LinearO and IsTri variants. Trace the exact? and apply? tactic behavior around matching IsAnti.isSubsingleton h; done means exact? discovers and closes the original goal without an explicit using hypothesis.
Written by the indexing model from the issue text.
Description
Prerequisites
Please put an X between the brackets as you perform the following steps:
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
The exact? tactic fails to solve the following goal:
class LinearO (α : Type) (le : α → α → Prop) : Prop where
class IsTri (α : Type) (le : α → α → Prop) : Prop where
instance [LinearO α le] : IsTri α le where
def IsAnti (le : α → α → Prop) (s : α) : Prop := sorry
def IsSubsingleton (s : α) : Prop := sorry
theorem IsAnti.isSubsingleton [IsTri α le] {s : α} (h : IsAnti le s) : IsSubsingleton s := sorry
example [LinearO α le] {s : α} (h : IsAnti le s) : IsSubsingleton s := by
exact? -- `exact?` could not close the goal. Try `apply?` to see partial suggestions.
Context
Minimized from this Zulip message
Steps to Reproduce
- Copy the code above into live.lean-lang.org
Expected behavior: exact? finds the proof exact IsAnti.isSubsingleton h.
Actual behavior: exact? cannot close the goal. apply? finds the lemma but fails to find the matching hypothesis. exact? using h and apply? using h both do not find anything. When changing LinearO to IsTri in the example, exact? succeeds.
Versions
4.16.0-nightly-2025-01-15 on live.lean-lang.org
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from leanprover/lean4
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
leanprover/lean4#15197 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
leanprover/lean4#15172 · 1 comment ·
-
P-medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
leanprover/lean4#15037 ·
-
`Nat.lt` docstring OpenP-low
Difficulty 1/5 Under an hour Newbie friendliness 85/100
leanprover/lean4#15014 ·
-
P-medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
leanprover/lean4#14973 · 1 comment ·
All issues in leanprover/lean4
Similar issues
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#224908 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area-CodeGen-coreclr untriaged
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
secondlife/sl-vscode-plugin#147 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
objectionary/phie#149 ·