lean4-htt/tests/lean/run/eq_some_iff_get_eq_issue.lean
2024-02-16 02:05:18 +00:00

7 lines
234 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]; intro h; cases h; contradiction
simp [exists_prop]