Skip to content

Commit

Permalink
DestructProducts: fix incorrect mvar handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JLimperg committed Oct 2, 2023
1 parent 4f8b397 commit 0194095
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Aesop/BuiltinRules/DestructProducts.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private def destructProductHyp (goal : MVarId) (hyp : FVarId)
goal.withContext $ check prf
let [goal] ← goal.apply prf
| throwError "destructProducts: apply did not return exactly one goal"
discard $ goal.introN (genHyps.size - 1)
let (_, goal) ← goal.introN (genHyps.size - 1)
let (_, goal) ← goal.introN 2
goal.clear hyp

Expand Down
4 changes: 4 additions & 0 deletions AesopTest/DestructProducts.lean
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ example {p : α → Type} (h : Σ a, p a) : Sig α p := by

example {p : α → Type} (h : Σ' a, p a) : Sig α p := by
aesop

-- Test case for a bug reported by Jakob von Raumer.
example (x y : α × α) (h: p ∧ (x = y)) : x = y := by
aesop (simp_options := { enabled := false })

0 comments on commit 0194095

Please sign in to comment.