Option instances for additive and multiplicative actions #
This file defines instances for additive and multiplicative actions on Option type. Scalar
multiplication is defined by a • some b = some (a • b) and a • none = none.
See also #
@[instance_reducible]
Equations
- Option.instSMul_mathlib = { smul := fun (a : M) => Option.map fun (x : α) => a • x }
@[instance_reducible]
Equations
- Option.VAdd = { vadd := fun (a : M) => Option.map fun (x : α) => a +ᵥ x }
@[simp]
@[simp]
instance Option.instIsScalarTowerOfSMul {M : Type u_1} {N : Type u_2} {α : Type u_3} [SMul M α] [SMul N α] [SMul M N] [IsScalarTower M N α] :
IsScalarTower M N (Option α)
instance Option.instVAddAssocClassOfVAdd {M : Type u_1} {N : Type u_2} {α : Type u_3} [_root_.VAdd M α] [_root_.VAdd N α] [_root_.VAdd M N] [VAddAssocClass M N α] :
VAddAssocClass M N (Option α)
instance Option.instSMulCommClass {M : Type u_1} {N : Type u_2} {α : Type u_3} [SMul M α] [SMul N α] [SMulCommClass M N α] :
SMulCommClass M N (Option α)
instance Option.instVAddCommClass {M : Type u_1} {N : Type u_2} {α : Type u_3} [_root_.VAdd M α] [_root_.VAdd N α] [VAddCommClass M N α] :
VAddCommClass M N (Option α)
instance Option.instIsCentralScalar {M : Type u_1} {α : Type u_3} [SMul M α] [SMul Mᵐᵒᵖ α] [IsCentralScalar M α] :
IsCentralScalar M (Option α)
instance Option.instIsCentralVAdd {M : Type u_1} {α : Type u_3} [_root_.VAdd M α] [_root_.VAdd Mᵃᵒᵖ α] [IsCentralVAdd M α] :
IsCentralVAdd M (Option α)
instance Option.instFaithfulSMul {M : Type u_1} {α : Type u_3} [SMul M α] [FaithfulSMul M α] :
FaithfulSMul M (Option α)
instance Option.instFaithfulVAdd {M : Type u_1} {α : Type u_3} [_root_.VAdd M α] [FaithfulVAdd M α] :
FaithfulVAdd M (Option α)
@[instance_reducible]
Equations
- Option.instMulAction = { toSMul := Option.instSMul_mathlib, mul_smul := ⋯, one_smul := ⋯ }