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
- sub_eq_add_neg
- zero_sub
- natCast_zsmul
- add_sub_assoc
- one_zsmul
- negSucc_zsmul
- sub_mem
- ofNat_zsmul
- add_sub
- two_zsmul
- zero_zsmul
- zsmul_mem
- neg_one_zsmul
- posPart_zero
- posPart_nonneg
- negPart_nonneg
- posPart_def
- posPart_eq_self
- negPart_def
- map_zsmul'
- posPart_eq_zero
- SubNegMonoid.sub_eq_add_neg
- zsmul_nonneg
- ContMDiffWithinAt.sub_const
- SubNegMonoid.zsmul_neg'
- posPart_of_nonneg
- map_sub'
- add_sub_assoc'
- mapClusterPt_atTop_zsmul_iff_nsmul
- neg_eq_zero_sub
- map_comp_zsmul'
- negPart_eq_zero'
- AddMonoidHom.map_zsmul'
- dist_sub_right
- ContMDiffAt.sub_const
- zsmul_pos
- posPart_nonpos
- Specializes.zsmul
- posPart_mono
- SubNegMonoid.zsmul_zero'
- AddSubgroupClass.zsmulMemClass
- MeasureTheory.map_sub_right_eq_self
- Pi.subNegMonoid
- FunLike.subNegMonoid
- instNegPart
- edist_sub_right
- Cardinal.mk_sub_le
- OrderDual.instSubNegAddMonoid
- zsmul_eq_smul
- zsmul_neg_coe_of_pos