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.
We introduce the notation typeclass Star for algebraic structures with a star operation. Note: to
accommodate diverse notational preferences, no default notation is provided for Star.star.
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 • bis used as notation forHSMul.hSMul a b.a +ᵥ bis 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 +ᵥ bcomputes the sum ofaandb. 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))