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.Conventions for notations in identifiers:
- The recommended spelling of
+ᵥin identifiers isvadd.
- The recommended spelling of
Instances
Type class for the -ᵥ notation.
- vsub : P → P → G
a -ᵥ bcomputes the difference ofaandb. The meaning of this notation is type-dependent, but it is intended to be used for additive torsors.Conventions for notations in identifiers:
- The recommended spelling of
-ᵥin identifiers isvsub.
- The recommended spelling of
Instances
a +ᵥ b computes the sum of a and b.
The meaning of this notation is type-dependent.
Conventions for notations in identifiers:
- The recommended spelling of
+ᵥin identifiers isvadd.
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.
Conventions for notations in identifiers:
- The recommended spelling of
-ᵥin identifiers isvsub.
Equations
- «term_-ᵥ_» = Lean.ParserDescr.trailingNode `«term_-ᵥ_» 65 65 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " -ᵥ ") (Lean.ParserDescr.cat `term 66))