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? suggestion contains metavariable #6352

Open
dwrensha opened this issue Dec 10, 2024 · 1 comment
Open

exact? suggestion contains metavariable #6352

dwrensha opened this issue Dec 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dwrensha
Copy link
Contributor

When exact? succeeds, I expect it to give me something that closes the current goal.

However, in the following example, the exact? tactic suggests Try this: refine fun a a_1 => ?_.

def Subgroup' (G : Type) [Mul G] : Type := sorry

instance (G : Type) [Mul G] : Membership G (Subgroup' G) := sorry

def iSup' {G : Type} [Mul G] {ι : Type} (S : ι → Subgroup' G) : Subgroup' G := sorry

theorem mem_iSup_of_mem' {G : Type} [Mul G] {ι : Type} {S : ι → Subgroup' G} (i : ι) :
  ∀ {x : G}, x ∈ S i → x ∈ iSup' S := sorry

theorem foo {G : Type}
    [Mul G] {ι : Type} (S : ι → Subgroup' G)
    {C : (x : G) → x ∈ iSup' S → Prop}
    (hp : ∀ (i : ι) (x : G) (hx : x ∈ S i), C x (mem_iSup_of_mem' i hx))
    (x y : G) :
    (fun x ↦ ∃ (h : x ∈ iSup' S), C x h) x →
      (fun x ↦ ∃ (h : x ∈ iSup' S ), C x h) y →
        (fun x ↦ ∃ (h : x ∈ iSup' S), C x h) (x * y) := by
  exact?
-- Try this: refine fun a a_1 => ?_
-- (kernel) declaration has metavariables 'foo'

This occurs on current nightly and on leanprover/lean4:v4.15.0-rc1

@dwrensha dwrensha added the bug Something isn't working label Dec 10, 2024
@dwrensha
Copy link
Contributor Author

The above example was minimized from this line in the proof of Subgroup.iSup_induction' in mathlib.

@kim-em kim-em self-assigned this Dec 10, 2024
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

2 participants