Skip to content

Commit

Permalink
These lemmas seem to be missing
Browse files Browse the repository at this point in the history
  • Loading branch information
kbuzzard committed Aug 18, 2020
1 parent 67549d9 commit d5694dc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/data/option/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ by cases o; simp
lemma ne_none_iff_is_some {o : option α} : o ≠ none ↔ o.is_some :=
by cases o; simp

lemma ne_none_iff_exists {o : option α} : o ≠ none ↔ ∃ (x : α), o = some x :=
by {cases o; simp}

lemma ne_none_iff_exists' {o : option α} : o ≠ none ↔ ∃ (x : α), o = x :=
ne_none_iff_exists

lemma bex_ne_none {p : option α → Prop} :
(∃ x ≠ none, p x) ↔ ∃ x, p (some x) :=
⟨λ ⟨x, hx, hp⟩, ⟨get $ ne_none_iff_is_some.1 hx, by rwa [some_get]⟩,
Expand Down

0 comments on commit d5694dc

Please sign in to comment.