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

exact? fails to close goal #6666

Open
3 tasks done
TwoFX opened this issue Jan 16, 2025 · 0 comments
Open
3 tasks done

exact? fails to close goal #6666

TwoFX opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@TwoFX
Copy link
Member

TwoFX commented Jan 16, 2025

Prerequisites

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

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

  1. 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.

@TwoFX TwoFX added the bug Something isn't working label Jan 16, 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
Projects
None yet
Development

No branches or pull requests

1 participant