Commit 2022-02-16 11:53 75421198
View on Github →refactor(algebra/group/basic): add extra typeclasses for negation (#11960) The new typeclasses are:
has_involutive_inv R
, stating that(r⁻¹)⁻¹ = r
(instances:group
,group_with_zero
,ennreal
,set
,submonoid
)has_involutive_neg R
, stating that- -r = r
(instances:add_group
,ereal
,module.ray
,ray_vector
,set
,add_submonoid
,jordan_decomposition
)has_distrib_neg R
, stating that-a * b = a * -b = -(a * b)
(instances:ring
,units
,unitary
,special_linear_group
,GL_pos
) While the original motivation only concerned the twoneg
typeclasses, theto_additive
machinery forced the introduction ofhas_involutive_inv
, which turned out to be used in more places than expected. Adding these typeclases removes a large number of specializedunits R
lemmas as the lemmas aboutR
now match themselves. A surprising number of lemmas elsewhere in the library can also be removed. The removed lemmas are:- Lemmas about
units
(replaced byunits.has_distrib_neg
):units.neg_one_pow_eq_or
units.neg_pow
units.neg_pow_bit0
units.neg_pow_bit1
units.neg_sq
units.neg_inv
(nowinv_neg'
for arbitrary groups with distributive negation)units.neg_neg
units.neg_mul
units.mul_neg
units.neg_mul_eq_neg_mul
units.neg_mul_eq_mul_neg
units.neg_mul_neg
units.neg_eq_neg_one_mul
units.mul_neg_one
units.neg_one_mul
semiconj_by.units_neg_right
semiconj_by.units_neg_right_iff
semiconj_by.units_neg_left
semiconj_by.units_neg_left_iff
semiconj_by.units_neg_one_right
semiconj_by.units_neg_one_left
commute.units_neg_right
commute.units_neg_right_iff
commute.units_neg_left
commute.units_neg_left_iff
commute.units_neg_one_right
commute.units_neg_one_left
- Lemmas about groups with zero (replaced by
group_with_zero.to_has_involutive_neg
):inv_inv₀
inv_involutive₀
inv_injective₀
inv_eq_iff
(now shared with theinv_eq_iff_inv_eq
group lemma)eq_inv_iff
(now shared with theeq_inv_iff_eq_inv
group lemma)equiv.inv₀
measurable_equiv.inv₀
- Lemmas about
ereal
(replaced byereal.has_involutive_neg
):ereal.neg_neg
ereal.neg_inj
ereal.neg_eq_neg_iff
ereal.neg_eq_iff_neg_eq
- Lemmas about
ennreal
(replaced byennreal.has_involutive_inv
):ereal.inv_inv
ereal.inv_involutive
ereal.inv_bijective
ereal.inv_eq_inv
- Other lemmas:
ray_vector.neg_neg
module.ray.neg_neg
module.ray.neg_involutive
module.ray.eq_neg_iff_eq_neg
set.inv_inv
set.neg_neg
submonoid.inv_inv
add_submonoid.neg_neg
As a bonus, this provides the groupunitary R
with a negation operator and all the lemmas listed forunits
above. For now this doesn't attempt to unifyunits.neg_smul
andneg_smul
.