lean4-htt/tests/lean/2361.lean
Scott Morrison 7286dfa38a
feat: withAssignableSyntheticOpaque in assumption (#2596)
* feat: withAssignableSyntheticOpaque in assumption
* add test
2023-10-30 04:00:52 +00:00

16 lines
513 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Lean
-- This worked before issue #2361
example {α : Type} {P : α → Prop} (a : α) (h : P a) : ∃ x, P x := by
constructor
assumption
example {α : Type} {P : α → Prop} (a : α) (h : P a) : ∃ x, P x := by
refine ⟨?m, ?c⟩
-- `?m` is synthetic opaque, so `assumption` needs to be able to assign such metavariables
-- for this to succeed.
case c => assumption
example {α : Type} {P : α → Prop} (a : α) (h : P a) : ∃ x, P x := by
refine' ⟨_, ?c⟩
case c => assumption