test: add test for Lean 3 refine bug reported on Zulip

https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/.60refine.60.20bug.20.3F/near/278031110
This commit is contained in:
Leonardo de Moura 2022-04-06 16:04:17 -07:00
parent 847f5b21a6
commit 317492d207
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,28 @@
example (p q : Prop) : p ∧ q → p := by
refine fun ⟨a, b⟩ => a
example (p q : Prop) : p ∧ q → p := by
refine fun a => ?hp
trace_state
exact a.1
example (p q : Prop) : p ∧ q → p := by
refine fun ⟨a, b⟩ => a
example (p q : Prop) : p ∧ q → p := by
refine fun ⟨a, b⟩ => ?hp
trace_state
exact a
example (p q : Prop) : p ∧ q → p := by
refine fun a => ?hp
case hp => exact a.1
example (p q : Prop) : p ∧ q → p := by
refine fun ⟨a, b⟩ => ?hp
case hp => exact a
example (p q : Prop) : p ∧ q → p := by
refine λ ⟨a, b⟩ => ?hp
trace_state
exact a

View file

@ -0,0 +1,16 @@
case hp
p q : Prop
a : p ∧ q
⊢ p
case hp
p q : Prop
: p ∧ q
a : p
b : q
⊢ p
case hp
p q : Prop
: p ∧ q
a : p
b : q
⊢ p