Skip to content

Conversation

fchapoton
Copy link
Contributor

namely declare some known properties as categories, as allowed by #39554

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.

Copy link

github-actions bot commented Aug 27, 2025

Documentation preview for this PR (built with commit c27cba6; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@fchapoton
Copy link
Contributor Author

fchapoton commented Sep 5, 2025

one question : should I add doctests for all these enhanced categories ?

@mantepse
Copy link
Contributor

mantepse commented Sep 5, 2025

I think it might be good to have, for each of the categories, something like _test_congruence_uniform.

I realize that I don't understand something. I did

sage: P = posets.TamariLattice(3)
sage: P.category()
Category of facade finite enumerated trim congruence uniform lattice posets
sage: P.is_congruence_uniform
<bound method FiniteLatticePoset.is_congruence_uniform of Finite lattice containing 5 elements>

and indeed, trace confirms that this is not picking up the method from LatticePosets.CongruenceUniform.ParentMethods. Is this to be expected?

@fchapoton
Copy link
Contributor Author

fchapoton commented Sep 5, 2025

I was thinking of adding tests to check that each poset where we declare a specific category is in this category. This may seem superfluous, as there can be no failure, otherwise the init would fail.

yes, the category always have a very low priority.

moving the "is_congruence_uniform" and similar method to the category would be a possible next step in the future

@mantepse
Copy link
Contributor

mantepse commented Sep 5, 2025

But then, why is there a method 'is_congruence_uniform' if it is not used?

@fchapoton
Copy link
Contributor Author

It will become used once the method in "LatticePoset" will be moved to the general category of lattices. I plan to do that later.

@mantepse
Copy link
Contributor

mantepse commented Sep 5, 2025

I think having a _test_congruence_uniform etc would be good idea.

Can we already iterate over the posets of given size in a given category? Then checking the number of posets against the Oeis is also an obvious candidate.

@fchapoton
Copy link
Contributor Author

thanks for the suggestions, Martin. Maybe we can keep them for another PR ? Here the aim is just to put some existing examples in more refined categories.

@mantepse
Copy link
Contributor

mantepse commented Sep 7, 2025

Bien sur !

Copy link
Contributor

@mantepse mantepse left a comment

Choose a reason for hiding this comment

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

LGTM

@vbraun vbraun merged commit 23dd178 into sagemath:develop Sep 14, 2025
24 of 25 checks passed
@fchapoton fchapoton deleted the refine_cat_lattice branch September 15, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants