Extra definitions on Option #
This file defines more operations involving Option α. Lemmas about them are located in other
files under Mathlib/Data/Option/.
Other basic operations on Option are defined in the core library.
An elimination principle for Option. It is a nondependent version of Option.rec.
Equations
- Option.elim' b f (some a) = f a
- Option.elim' b f none = b
Instances For
@[simp]
@[simp]
@[simp]
@[reducible, inline, deprecated "Use `Option.get!` (which will panic on `none`) or `Option.getD` (which takes an explicit default value)." (since := "2026-01-05")]
Inhabited get function. Returns a if the input is some a, otherwise returns default.