Documentation

Projects.Util.Option

def Option.getd {α : Type u_1} [Inhabited α] (x : Option α) :
α
Equations
Instances For
    @[simp]
    theorem Option.failure_bind {α : Type u_1} {β : Type u_2} {f : αOption β} :
    @[simp]
    theorem Option.exists_eq_some_of_ne_none {α : Type u_1} {x : Option α} (h : x none) :
    ∃ (y : α), x = some y
    @[simp]
    theorem Option.guard_bind_eq_some_iff {α : Type u_1} {P : Prop} [Decidable P] {f : UnitOption α} {x : α} :
    @[simp]
    theorem Option.guard_bind_isSome_iff {α : Type u_1} {P : Prop} [Decidable P] {f : UnitOption α} :
    @[simp]
    theorem Option.get!_with_bot_some {α : Type u_1} [Inhabited α] {x : α} :
    get! x = x
    theorem Option.eq_iff_of_subsingleton {α : Type u_1} [ha : Subsingleton α] {x y : Option α} :
    @[simp]
    theorem Option.bind_eq_some_iff' {α : Type u_1} {β : Type u_2} {x : Option α} {y : β} {f : αOption β} :
    x.bind f = some y ∃ (a : α), x = some a f a = some y
    theorem Option.bind_dite {α : Type u_1} {β : Type u_2} {P : Prop} [hp : Decidable P] {f : POption α} {g : ¬POption α} {r : αOption β} :
    (if h : P then f h else g h).bind r = if h : P then (f h).bind r else (g h).bind r
    theorem Option.bind_ite {α : Type u_1} {β : Type u_2} {P : Prop} [hp : Decidable P] {x y : Option α} {f : αOption β} :
    (if P then x else y).bind f = if P then x.bind f else y.bind f
    theorem Option.ne_none_of_eq_some {α : Type u_1} {m : Option α} {x : α} (h : m = some x) :
    theorem Option.map_elim_fn_some {α : Type u_1} {β : Type u_2} {f : αβ} {x y : Option α} :
    @[simp]
    theorem Option.elim_init_bool_false_eq_true_iff {α : Type u_1} {m : Option α} {f : αBool} :
    m.elim false f = true ∃ (x : α), m = some x f x = true
    @[simp]
    theorem Option.elim_init_false_iff {α : Type u_1} {m : Option α} {f : αProp} :
    m.elim False f ∃ (x : α), m = some x f x
    @[simp]
    theorem Option.getd_none {α : Type u_1} [ha : Inhabited α] :
    @[simp]
    theorem Option.getd_some {α : Type u_1} [ha : Inhabited α] {x : α} :
    (some x).getd = x
    theorem Option.getd_eq_getD {α : Type u_1} [ha : Inhabited α] {x : Option α} :