Skip to content

fix #1863#1868

Merged
CohenCyril merged 1 commit intomath-comp:masterfrom
affeldt-aist:fixes_1863
Mar 3, 2026
Merged

fix #1863#1868
CohenCyril merged 1 commit intomath-comp:masterfrom
affeldt-aist:fixes_1863

Conversation

@affeldt-aist
Copy link
Member

Motivation for this change

fixes #1863

@t6s I was merely thinking of that

Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md
  • added corresponding documentation in the headers

Reference: How to document

Merge policy

As a rule of thumb:

  • PRs with several commits that make sense individually and that
    all compile are preferentially merged into master.
  • PRs with disorganized commits are very likely to be squash-rebased.
Reminder to reviewers

Copy link
Member

@t6s t6s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks consistent and I approve this PR.

Is it good or bad to generalize this pattern into

Definition closed_under2 (T : Type) (p : pred T) (op : T -> T -> T) :=
  {in p &, forall x y, op x y \in p}.

and replace e.g. setU_closed by closed_under2 setU ?
(I noticed there are many *_closed in mathcomp.algebra.)

@t6s
Copy link
Member

t6s commented Mar 3, 2026

Another side note: filters of this form can be defined for any meet-semilattice, of which set _ is an instance; it can be even further generalized for posets, but in a slightly different form (meet-closedness replaced by downward directedness).

@CohenCyril
Copy link
Member

CohenCyril commented Mar 3, 2026

We can merge as is and generalize (twice) as @t6s mentioned later on. BTW the reason why mathcomp algebra contains specific definition is because they are substructures, and indexing happens on a per structure basis as of now, and might be improvements by automatically generating morphisms and substructures as part of @VojtechStep work.

@CohenCyril
Copy link
Member

CohenCyril commented Mar 3, 2026

and replace e.g. setU_closed by closed_under2 setU ?

We could even have the notation X.-closed2, we could do setU.-closed2 and downward.-closed2 where

Definition downward {L : porderType} {A : L} (B : L) (p : A <= B) : L := A.

@t6s
Copy link
Member

t6s commented Mar 3, 2026

improvements by automatically generating morphisms and substructures as part of @VojtechStep work.

sounds promising!

@CohenCyril CohenCyril merged commit 7aed26d into math-comp:master Mar 3, 2026
48 checks passed
@CohenCyril
Copy link
Member

@t6s would you be willing to open an issue based on our discussion here?

@affeldt-aist
Copy link
Member Author

@t6s would you be willing to open an issue based on our discussion here?

i was apparently writing issue #1871 and #1872 while you were typing your message ;-)

@t6s
Copy link
Member

t6s commented Mar 3, 2026

reynald was so quick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

would it make sense to use the predicate setI_closed here?

3 participants