File: Mathlib/Data/Option/Defs.lean

full_name: Option.traverse
code: /-- Traverse an object of `Option α` with a function `f : α → F β` for an applicative `F`. -/
protected def traverse.{u, v}
    {F : Type u → Type v} [Applicative F] {α : Type*} {β : Type u} (f : α → F β) :
    Option α → F (Option β)
  
goal: Option α → F (Option β)

full_name: Option.elim'
code: /-- An elimination principle for `Option`. It is a nondependent version of `Option.rec`. -/
protected def elim' (b : β) (f : α → β) : Option α → β
  
goal: Option α → β

full_name: Option.elim'_none
code: @[simp]
theorem elim'_none (b : β) (f : α → β) : Option.elim' b f none = b 
goal: Option.elim' b f none = b

full_name: Option.elim'_some
code: @[simp]
theorem elim'_some {a : α} (b : β) (f : α → β) : Option.elim' b f (some a) = f a 
goal: Option.elim' b f (some a) = f a

full_name: Option.elim'_eq_elim
code: lemma elim'_eq_elim {α β : Type*} (b : β) (f : α → β) (a : Option α) :
    Option.elim' b f a = Option.elim a b f 
goal: Option.elim' b f a = a.elim b f

full_name: Option.mem_some_iff
code: theorem mem_some_iff {α : Type*} {a b : α} : a ∈ some b ↔ b = a 
goal: a ∈ some b ↔ b = a

full_name: Option.decidableEqNone
code: /-- `o = none` is decidable even if the wrapped type does not have decidable equality.
This is not an instance because it is not definitionally equal to `Option.decidableEq`.
Try to use `o.isNone` or `o.isSome` instead.
-/
@[inline]
def decidableEqNone {o : Option α} : Decidable (o = none) 
goal: Decidable (o = none)

full_name: Option.decidableForallMem
code: instance decidableForallMem {p : α → Prop} [DecidablePred p] :
    ∀ o : Option α, Decidable (∀ a ∈ o, p a)
  
goal: Decidable (∀ (a : α), a ∈ o → p a)

full_name: Option.decidableExistsMem
code: instance decidableExistsMem {p : α → Prop} [DecidablePred p] :
    ∀ o : Option α, Decidable (∃ a ∈ o, p a)
  
goal: Decidable (∃ a, a ∈ o ∧ p a)

full_name: Option.iget
code: /-- Inhabited `get` function. Returns `a` if the input is `some a`, otherwise returns `default`. -/
abbrev iget [Inhabited α] : Option α → α
  
goal: Option α → α

full_name: Option.iget_some
code: theorem iget_some [Inhabited α] {a : α} : (some a).iget = a 
goal: (some a).iget = a

full_name: Option.mem_toList
code: @[simp]
theorem mem_toList {a : α} {o : Option α} : a ∈ toList o ↔ a ∈ o 
goal: a ∈ o.toList ↔ a ∈ o

full_name: Option.liftOrGet_isCommutative
code: instance liftOrGet_isCommutative (f : α → α → α) [Std.Commutative f] :
    Std.Commutative (liftOrGet f) 
goal: Std.Commutative (Option.liftOrGet f)

full_name: Option.liftOrGet_isAssociative
code: instance liftOrGet_isAssociative (f : α → α → α) [Std.Associative f] :
    Std.Associative (liftOrGet f) 
goal: Std.Associative (Option.liftOrGet f)

full_name: Option.liftOrGet_isIdempotent
code: instance liftOrGet_isIdempotent (f : α → α → α) [Std.IdempotentOp f] :
    Std.IdempotentOp (liftOrGet f) 
goal: Std.IdempotentOp (Option.liftOrGet f)

full_name: Option.liftOrGet_isId
code: instance liftOrGet_isId (f : α → α → α) : Std.LawfulIdentity (liftOrGet f) none 
goal: Std.LawfulIdentity (Option.liftOrGet f) none

full_name: Lean.LOption.toOption
code: /-- Convert `undef` to `none` to make an `LOption` into an `Option`. -/
def _root_.Lean.LOption.toOption {α} : Lean.LOption α → Option α
  
goal: Lean.LOption α → Option α