mathlib documentation

core.init.data.option.basic

def option.to_monad {m : Type → Type} [monad m] [alternative m] {A : Type} (a : option A) :
m A

Equations
def option.get_or_else {α : Type u} (a : option α) (a_1 : α) :
α

Equations
def option.is_some {α : Type u} (a : option α) :

Equations
def option.is_none {α : Type u} (a : option α) :

Equations
def option.get {α : Type u} {o : option α} (a : (o.is_some)) :
α

Equations
def option.rhoare {α : Type u} (a : bool) (a_1 : α) :

Equations
def option.lhoare {α : Type u} (a : α) (a_1 : option α) :
α

Equations
def option.bind {α : Type u} {β : Type v} (a : option α) (a_1 : α → option β) :

Equations
def option.map {α : Type u_1} {β : Type u_2} (f : α → β) (o : option α) :

Equations
theorem option.map_id {α : Type u_1} :

@[instance]

Equations
def option.orelse {α : Type u} (a a_1 : option α) :

Equations
@[instance]

Equations
@[instance]
def option.inhabited (α : Type u) :

Equations
@[instance]
def option.decidable_eq {α : Type u} [d : decidable_eq α] :

Equations