Mathlib Map

Structures · Algebra

SubNegMonoid

A SubNegMonoid is an AddMonoid with unary - and binary - operations satisfying sub_eq_add_neg : ∀ a b, a - b = a + -b. The default for sub is such that a - b = a + -b holds by definition. Adding sub as a field rather than defining a - b := a + -b allows us to avoid certain classes of unification failures, for example: Let foo X be a type with a ∀ X, Sub (Foo X) instance but no ∀ X, Neg (Foo X). Suppose we also have an instance ∀ X [Cromulent X], AddGroup (Foo X). Then the (-) coming from AddGroup.sub cannot be definitionally equal to the (-) coming from Foo.Sub. In the same way, adding a zsmul field makes it possible to avoid definitional failures in diamonds. See the definition of AddMonoid and Note [forgetful inheritance] for more explanations on this.

Defined in
Mathlib.Algebra.Group.Defs
Shape
One type argument · adds sub_eq_add_neg, zsmul_zero', zsmul_succ', zsmul_neg'

Extends4

Extended by4

Concrete types that are instances13

  • Filter.Germ
  • UniformSpace.Completion
  • DomAddAct
  • AddUnits
  • WithCStarModule
  • Prod
  • OrderDual
  • ULift
  • MulOpposite
  • Lex
  • AddOpposite
  • Colex
  • Additive

How is a type an instance?

Loading the hierarchy index…

Assumed by104

Ancestors19