Typeclasses for algebraic operations #
Notation typeclass for Inv
, the multiplicative analogue of Neg
.
We also introduce notation classes SMul
and VAdd
for multiplicative and additive
actions.
SMul
is typically, but not exclusively, used for scalar multiplication-like operators.
See the module Algebra.AddTorsor
for a motivating example for the name VAdd
(vector addition).
Note Zero
has already been defined in core Lean.
Notation #
a • b
is used as notation forHSMul.hSMul a b
.a +ᵥ b
is used as notation forHVAdd.hVAdd a b
.
The notation typeclass for heterogeneous additive actions.
This enables the notation a +ᵥ b : γ
where a : α
, b : β
.
- hVAdd : α → β → γ
a +ᵥ b
computes the sum ofa
andb
. The meaning of this notation is type-dependent.
Instances
a +ᵥ b
computes the sum of a
and b
.
The meaning of this notation is type-dependent.
Equations
- «term_+ᵥ_» = Lean.ParserDescr.trailingNode `«term_+ᵥ_» 65 66 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " +ᵥ ") (Lean.ParserDescr.cat `term 65))
Instances For
a -ᵥ b
computes the difference of a
and b
. The meaning of this notation is
type-dependent, but it is intended to be used for additive torsors.
Equations
- «term_-ᵥ_» = Lean.ParserDescr.trailingNode `«term_-ᵥ_» 65 65 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " -ᵥ ") (Lean.ParserDescr.cat `term 66))