math-comp icon indicating copy to clipboard operation
math-comp copied to clipboard

Generalize lemmas from monoid to semigroups

Open proux01 opened this issue 3 years ago • 1 comments

Motivation for this change

Many lemmas for bigops on monoids (particularly abelian ones) were already valid on (abelian) semigroups. This generalization could be improved by adding semigroups to the monoid hierarchy, when porting to HB.

Some lemmas don't require a monoid with a neutral element but only an idempotent element. This is particularly useful for min/max that are idempotent but generally don't have a neutral element.

This is used for min/max in Analysis: https://github.com/math-comp/analysis/pull/712

Things done/to do
  • [x] added corresponding entries in CHANGELOG_UNRELEASED.md (do not edit former entries)
  • [ ] ~added corresponding documentation in the headers~
Automatic note to reviewers

Read this Checklist and make sure there is a milestone.

proux01 avatar Aug 01 '22 12:08 proux01

I just backported a few shorter proofs from mathcomp-analysis.

affeldt-aist avatar Aug 02 '22 01:08 affeldt-aist

@affeldt-aist this seems reasonably ready for nearly three months now, would you assign and merge?

proux01 avatar Oct 18 '22 08:10 proux01

@affeldt-aist this seems reasonably ready for nearly three months now, would you assign and merge?

I would have said okay a few days ago but the generalization requested in https://github.com/math-comp/analysis/pull/779 seems (at first sight) to trigger generalizations here also. I will try to investigate this by the end of the week.

affeldt-aist avatar Oct 20 '22 02:10 affeldt-aist

@affeldt-aist I had a look at https://github.com/math-comp/analysis/pull/779 , this made me add big_undup_AC here. There are certainly other things from the mathcomp_extra.v file from analysis to backport to matchomp, but I think this backporting belongs to a further PR.

proux01 avatar Oct 21 '22 13:10 proux01

@affeldt-aist is this mergeable?

proux01 avatar Oct 27 '22 07:10 proux01