Commit 2022-09-28 15:55 7247a3cc
View on Github →refactor(algebra/group/defs): inv_one_class
, neg_zero_class
(#16187)
Define typeclasses inv_one_class
and neg_zero_class
, to allow
results depending on those properties to be proved more generally than
for division_monoid
and subtraction_monoid
without requiring
duplication. Also define div_inv_one_monoid
and sub_neg_zero_monoid
.
The only instances added here are those deduced from division_monoid
and subtraction_monoid
, and the only lemmas generalized to these
classes were previously proved for those classes. Additional
instances intended for followups include:
neg_zero_class
for the combination ofmul_zero_class
withhas_distrib_neg
, so eliminating the separateneg_zero'
lemma.sub_neg_zero_monoid
forereal
.div_inv_one_monoid
forennreal
.- The usual
pointwise
,pi
andprod
instances. Additional lemmas intended to be generalized to use these typeclasses in followups include: antiperiodic.nat_mul_eq_of_eq_zero
andantiperiodic.int_mul_eq_of_eq_zero
, which currently require the codomain of the antiperiodic function to be asubtraction_monoid
. (The latter will also require involutiveneg
, as will some lemmas about inequalities.)- Given appropriate typeclasses for the interaction of inequalities
with
inv
andneg
(which will also enabling combiningleft
andright
variants, which is the main motivation of these changes), lemmas such asleft.inv_le_one_iff
,left.one_le_inv_iff
,left.one_lt_inv_iff
,left.inv_lt_one_iff
and theirright
and additive variants. Some of these currently have duplicates forennreal
, for example. Zulip thread raising question of such typeclasses: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/typeclasses.20for.20orders.20with.20neg.20and.20inv