@[reducible, inline, deprecated Option.get!_eq_getD (since := "2024-11-18")]
Equations
Instances For
@[simp]
@[simp]
@[simp]
theorem
Option.get_map
{α : Type u_1}
{β : Type u_2}
{f : α → β}
{o : Option α}
{h : (Option.map f o).isSome = true}
:
@[simp]
theorem
Option.map_map
{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(h : β → γ)
(g : α → β)
(x : Option α)
:
theorem
Option.comp_map
{β : Type u_1}
{γ : Type u_2}
{α : Type u_3}
(h : β → γ)
(g : α → β)
(x : Option α)
:
@[simp]
theorem
Option.mem_map_of_mem
{α : Type u_1}
{β : Type u_2}
{x : Option α}
{a : α}
(g : α → β)
(h : a ∈ x)
:
@[simp]
@[simp]
theorem
Option.join_map_eq_map_join
{α : Type u_1}
{β : Type u_2}
{f : α → β}
{x : Option (Option α)}
:
@[simp]
@[simp]
@[simp]
theorem
Option.guard_congr
{α : Type u_1}
{f g : α → Prop}
[DecidablePred f]
[DecidablePred g]
(h : ∀ (a : α), f a ↔ g a)
:
theorem
Option.guard_comp
{α : Type u_1}
{β : Type u_2}
{p : α → Prop}
[DecidablePred p]
{f : β → α}
:
@[simp]
An arbitrary some a
with a : α
if α
is nonempty, and otherwise none
.
Equations
- Option.choice α = if h : Nonempty α then some (Classical.choice h) else none