lean4-htt/tests/lean/run/eq_some_iff_get_eq_issue.lean
Leonardo de Moura 45475d6434
feat: allow users to disable simpCtorEq simproc (#5167)
`simp only` will not apply this simproc anymore. Users must now write
`simp only [reduceCtorEq]`. See RFC #5046 for motivation.
This PR also renames simproc to `reduceCtorEq`. 

close #5046 


@semorrison A few `simp only ...` tactics will probably break in
Mathlib. Fix: include `reduceCtorEq`.
2024-08-26 13:51:21 +00:00

6 lines
247 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.

namespace Option
theorem eq_some_iff_get_eq' {o : Option α} {a : α} :
o = some a ↔ ∃ h : o.isSome, Option.get _ h = a := by
cases o; simp only [isSome_none, false_iff, reduceCtorEq]; intro h; cases h; contradiction
simp [exists_prop]