File: .lake/packages/lean4/src/lean/Init/Data/Option/Instances.lean

full_name: Option.eq_of_eq_some
code: theorem eq_of_eq_some {α : Type u} : ∀ {x y : Option α}, (∀z, x = some z ↔ y = some z) → x = y
  
goal: (∀ (z : α), x = some z ↔ y = some z) → x = y

full_name: Option.eq_none_of_isNone
code: theorem eq_none_of_isNone {α : Type u} : ∀ {o : Option α}, o.isNone → o = none
  
goal: o.isNone = true → o = none

full_name: Option.«instMembership_.lake»
code: instance : Membership α (Option α) 
goal: Membership α (Option α)

full_name: Option.mem_def
code: @[simp] theorem mem_def {a : α} {b : Option α} : a ∈ b ↔ b = some a 
goal: a ∈ b ↔ b = some a

full_name: Option.«instDecidableMemOfDecidableEq_.lake»
code: instance [DecidableEq α] (j : α) (o : Option α) : Decidable (j ∈ o) 
goal: Decidable (j ∈ o)

full_name: Option.isNone_iff_eq_none
code: @[simp] theorem isNone_iff_eq_none {o : Option α} : o.isNone ↔ o = none 
goal: o.isNone = true ↔ o = none

full_name: Option.some_inj
code: theorem some_inj {a b : α} : some a = some b ↔ a = b 
goal: some a = some b ↔ a = b

full_name: Option.decidable_eq_none
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 `instance : DecidableEq Option`.
Try to use `o.isNone` or `o.isSome` instead.
-/
@[inline] def decidable_eq_none {o : Option α} : Decidable (o = none) 
goal: Decidable (o = none)

full_name: Option.«instDecidableForallForallMemOfDecidablePred_.lake»
code: instance {p : α → Prop} [DecidablePred p] : ∀ o : Option α, Decidable (∀ a, a ∈ o → p a)

goal: Decidable (∀ (a : α), a ∈ o → p a)

full_name: Option.«instDecidableExistsAndMemOfDecidablePred_.lake»
code: instance {p : α → Prop} [DecidablePred p] : ∀ o : Option α, Decidable (Exists fun a => a ∈ o ∧ p a)

goal: Decidable (Exists fun a => a ∈ o ∧ p a)

full_name: Option.pbind
code: /--
Partial bind. If for some `x : Option α`, `f : Π (a : α), a ∈ x → Option β` is a
partial function defined on `a : α` giving an `Option β`, where `some a = x`,
then `pbind x f h` is essentially the same as `bind x f`
but is defined only when all `x = some a`, using the proof to apply `f`.
-/
@[simp, inline]
def pbind : ∀ x : Option α, (∀ a : α, a ∈ x → Option β) → Option β
  
goal: ((a : α) → a ∈ x → Option β) → Option β

full_name: Option.pmap
code: /--
Partial map. If `f : Π a, p a → β` is a partial function defined on `a : α` satisfying `p`,
then `pmap f x h` is essentially the same as `map f x` but is defined only when all members of `x`
satisfy `p`, using the proof to apply `f`.
-/
@[simp, inline] def pmap {p : α → Prop} (f : ∀ a : α, p a → β) :
    ∀ x : Option α, (∀ a, a ∈ x → p a) → Option β
  
goal: (∀ (a : α), a ∈ x → p a) → Option β

full_name: Option.forM
code: /-- Map a monadic function which returns `Unit` over an `Option`. -/
@[inline] protected def forM [Pure m] : Option α → (α → m PUnit) → m PUnit
  
goal: Option α → (α → m PUnit) → m PUnit

full_name: Option.«instForM_.lake»
code: instance : ForM m (Option α) α 
goal: ForM m (Option α) α

full_name: Option.«instForIn'InferInstanceMembership_.lake»
code: instance : ForIn' m (Option α) α inferInstance 
goal: ForIn' m (Option α) α inferInstance