sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 480 forks source link

Implement category for H, L, R, J trivials monoids #18001

Open bc9eee3a-171b-423e-8ec5-1c11eaa42e98 opened 9 years ago

bc9eee3a-171b-423e-8ec5-1c11eaa42e98 commented 9 years ago

The aim is to integrate in the main Sage library the mature methods and examples for

from the Sage-Semigroups package. https://github.com/nthiery/sage-semigroups

CC: @nthiery @hivert @tscrim @saliola

Component: categories

Keywords: monoids, days64

Branch/Commit: public/18001 @ ea4a971

Issue created by migration from https://trac.sagemath.org/ticket/18001

bc9eee3a-171b-423e-8ec5-1c11eaa42e98 commented 9 years ago

Branch: u/virmaux/develop

bc9eee3a-171b-423e-8ec5-1c11eaa42e98 commented 9 years ago

Changed branch from u/virmaux/develop to u/virmaux/monoids

nthiery commented 9 years ago

New commits:

3b59784Files for H, J, R, L trivial monoids, beginning of the implementation
nthiery commented 9 years ago

Dependencies: 18265

nthiery commented 9 years ago

Commit: 3b59784

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 3b59784 to 4dbdfac

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

4dbdfac18001: merge with develop
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 4dbdfac to c389ef3

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

c6ce64318001: rebase with develop
30c19af18001: rebase
c389ef318001: rebase (h_trivial)
tscrim commented 8 years ago

Changed dependencies from 18265 to #18265

fchapoton commented 8 years ago

Changed branch from u/virmaux/monoids to public/18001

fchapoton commented 8 years ago
comment:7

I have made a cleaner branch, starting from u/virmaux/develop.

I have also corrected a few typos in the new files.


New commits:

906e4f2Merge branch 'u/virmaux/develop' in 7.4.b0
fchapoton commented 8 years ago

Changed commit from c389ef3 to 906e4f2

fchapoton commented 8 years ago

Changed dependencies from #18265 to none

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 906e4f2 to 24a1fbd

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

24a1fbdtrac 18001 pep8 details
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

204dac1trac 18001 some details
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 8 years ago

Changed commit from 24a1fbd to 204dac1

nthiery commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,9 +1,7 @@
-It will mostly be a re-writing of the sage-combinat patch finite_semigroup-nt.patch of Nicolas M. Thiéry.
-
-The aim is to provide some specific methods for
+The aim is to integrate in the main Sage library the mature methods and examples for
 * H-trivial monoids
 * R-trivial monoids
 * L-trivial monoids
 * J-trivial monoids

-As well as several examples.
+from the [Sage-Semigroups|https://github.com/nthiery/sage-semigroups/] package.   
nthiery commented 6 years ago

Description changed:

--- 
+++ 
@@ -4,4 +4,4 @@
 * L-trivial monoids
 * J-trivial monoids

-from the [Sage-Semigroups|https://github.com/nthiery/sage-semigroups/] package.   
+from the [[Sage-Semigroups]] package.   
fchapoton commented 6 years ago

Description changed:

--- 
+++ 
@@ -4,4 +4,4 @@
 * L-trivial monoids
 * J-trivial monoids

-from the [[Sage-Semigroups]] package.   
+from the Sage-Semigroups package.   https://github.com/nthiery/sage-semigroups
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 204dac1 to f4ea928

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

42b6554Merge branch 'public/18001' of ssh://trac.sagemath.org:22/sage into 18001
f4ea928trac 18001 fix syntax error
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

a0878abtrac 18001 fix import of GF
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from f4ea928 to a0878ab

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

400e167trac 18001 fix my own mistake
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from a0878ab to 400e167

fchapoton commented 6 years ago
comment:18

there is one non-obvious failing doctest remaining..

tscrim commented 6 years ago
comment:19

The failure comes from the fact that the category of RTrivialMonoids().Finite() is not enumerated, as opposed to the category of Semigroups().Finite().FinitelyGenerated(). So I think you just have to add .FinitelyGenerated().

From the code, it also looks like you want JTrivialMonoids().Finite() to imply FinitelyGenerated() since you are giving it a distinguished generating set.

Quick doc comment: Sphinx doesn't like `H`-preorder; instead use `H`-preorder. Also, typo preoder.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

85ee163trac 18001 some doc details
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 400e167 to 85ee163

fchapoton commented 6 years ago
comment:21

I have fixed your doc comments.

Concerning the failing doctest, I have tried adding .FinitelyGenerated() but this does not fix it.

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Changed commit from 85ee163 to e473ebf

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 6 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

e473ebfChanging the category of R-trivial monoids example.
tscrim commented 6 years ago
comment:23

Well, it does fix one problem: the enumeration and the lack of a list() method. (I'm not sure if that means some of these methods should actually belong to the finite finitely-generated semigroups category, and I have swept the problem under the run.)

However, it then shows another problem, which seems to be rooted in the test itself. The method j_transversal_of_idempotents returns a list, but this test seems to be expecting a dict. So either the j_transversal_of_idempotents should now return a family whose keys are index_of_regular_j_class or the test itself needs to change. (BTW, there is a bug with j_transversal_of_idempotents; the output is cached, but it is a mutable list.)

fchapoton commented 6 years ago
comment:24

and also a superfluous import

+src/sage/categories/finite_semigroups.py:16: 'sage.categories.finite_enumerated_sets.FiniteEnumeratedSets' imported but unused
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

40afa48Merge branch 'public/18001' in 9.2.b3
4f7ad67fix one doctest
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from e473ebf to 4f7ad67

fchapoton commented 4 years ago
comment:26

any interest on this ? Nicolas ou Florent, ça vous motive un peu ou pas ?

tscrim commented 4 years ago
comment:27

I have interest, but no time. :/

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

23a3548Merge branch 'public/18001' in 9.2.b4
ea4a971replace Returns by Return
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 4 years ago

Changed commit from 4f7ad67 to ea4a971

mkoeppe commented 3 years ago
comment:30

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

fchapoton commented 3 years ago
comment:31

or is this just a duplicate of #18265 ?