def
instDecidableEqExcept_batteries.decEq
{ε✝ : Type u_1}
{α✝ : Type u_2}
[DecidableEq ε✝]
[DecidableEq α✝]
(x✝ x✝¹ : Except ε✝ α✝)
:
Decidable (x✝ = x✝¹)
Equations
- instDecidableEqExcept_batteries.decEq (Except.error a) (Except.error b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- instDecidableEqExcept_batteries.decEq (Except.error a) (Except.ok a_1) = isFalse ⋯
- instDecidableEqExcept_batteries.decEq (Except.ok a) (Except.error a_1) = isFalse ⋯
- instDecidableEqExcept_batteries.decEq (Except.ok a) (Except.ok b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
@[implicit_reducible]
instance
instDecidableEqExcept_batteries
{ε✝ : Type u_1}
{α✝ : Type u_2}
[DecidableEq ε✝]
[DecidableEq α✝]
:
DecidableEq (Except ε✝ α✝)
Visualize an Except using a checkmark or a cross.
Instances For
@[simp]
@[simp]
def
Except.pmap
{ε : Type u}
{α β : Type v}
(x : Except ε α)
(f : (a : α) → x = ok a → β)
:
Except ε β
Map a function over an Except value, using a proof that the value is .ok.
Instances For
@[simp]
theorem
Except.pmap_error
{ε : Type u}
{α β : Type v}
(e : ε)
(f : (a : α) → error e = ok a → β)
:
(error e).pmap f = error e
@[simp]
theorem
Except.pmap_ok
{ε : Type u}
{α β : Type v}
(a : α)
(f : (a' : α) → ok a = ok a' → β)
:
(ok a).pmap f = ok (f a ⋯)
@[simp]
theorem
Except.pmap_id
{ε : Type u}
{α : Type v}
(x : Except ε α)
:
(x.pmap fun (a : α) (x : x = ok a) => a) = x
@[simp]