sagemath / sage

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

Iterator through magma elements #18584

Open stumpc5 opened 9 years ago

stumpc5 commented 9 years ago

CC: @nthiery @sagetrac-vpilaud @saliola

Component: combinatorics

Keywords: sagedays64.5

Work Issues: document

Author: Christian Stump

Branch/Commit: u/stumpc5/iterator_through_magma_elements @ 154e2ea

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

stumpc5 commented 9 years ago

Branch: u/stumpc5/iterator_through_magma_elements

stumpc5 commented 9 years ago

New commits:

a2f0f31first implementation of the iterator through magma elements
stumpc5 commented 9 years ago

Commit: a2f0f31

stumpc5 commented 9 years ago

Author: Christian Stump

stumpc5 commented 9 years ago

Work Issues: document

stumpc5 commented 9 years ago
comment:3

Hi Nicolas and Franco -

I found this code on my computer (in my favourite sage-6.5 with parts of the combinat queue applied and the only computer where a proper chevie interface for reflection groups is running). It does not appear to be in Sage, so I wonder whether that's needed, or whether there is something better than that.

Thanks, Christian

stumpc5 commented 9 years ago

Changed keywords from none to sagedays64.5

stumpc5 commented 9 years ago
comment:5

It appears that finitely_generated_semigroups have a succ_generators and an {{iter}} defined. Is there a reason why that code is not in finitely_generated_magmas?

@Nicolas: should I move that code there, and delete my code for magmas?

stumpc5 commented 9 years ago
comment:6

And do you know what that # TODO: update transitive ideal in the source of finitely_generated_semigroups mean?

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

Changed commit from a2f0f31 to 47efd39

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

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

ac813a4some documentation
47efd39moved the magma iterator from semigroups to magmas
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from 47efd39 to c63a09f

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

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

c63a09fagain removed my obsolete trivial iterator
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

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

154e2eafixed typo and documentation
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 9 years ago

Changed commit from c63a09f to 154e2ea

stumpc5 commented 9 years ago
comment:10

Okay, this breaks a few things, but I leave the ticket open until someone says whether or not the iterator should stay in semigroups or should go to finitely generated magmas...

stumpc5 commented 9 years ago
comment:11

Is there an implementation of this iterator that not only iters through the elements, but also keeps track of the words in the generators to get to an element?

tscrim commented 9 years ago
comment:12

I believe there is an issue with needing associativity. Specifically, I don't believe that iterator could get (a * b) * (a * b). However, I think a default iterator could be described by using all previously encountered elements.

nthiery commented 9 years ago
comment:13

Hi Christian, Travis!

Replying to @tscrim:

I believe there is an issue with needing associativity. Specifically, I don't believe that iterator could get (a * b) * (a * b). However, I think a default iterator could be described by using all previously encountered elements.

Indeed this is why I had put this iterator in Semigroups.

Which raises a good question: could we implement this with the current RecursivelyEnumeratedSet? It essentially allows only for univariate functions which is presumably not enough.

Christian: what's your use case?

Cheers,

stumpc5 commented 9 years ago
comment:14

Christian: what's your use case?

I wanted (back when writing the never-finished-coxeter-group-stuff) to use an iterator through the reflection group, keeping track of the used word along the way.

Which raises a good question: could we implement this with the current RecursivelyEnumeratedSet?

Sorry, could you point to which question you refer? The way the iterator is implemented, or implementing a flag to attach the used word to the output?

Thanks, Christian

nthiery commented 9 years ago
comment:15

Replying to @stumpc5:

Christian: what's your use case?

I wanted (back when writing the never-finished-coxeter-group-stuff) to use an iterator through the reflection group, keeping track of the used word along the way.

Ok; so having it on a semigroup is enough for you.

Which raises a good question: could we implement this with the current RecursivelyEnumeratedSet?

Sorry, could you point to which question you refer? The way the iterator is implemented, or implementing a flag to attach the used word to the output?

My question was about the implementation of an iterator over a finitely generated magma using only RecursivelyEnumeratedSet. But if there is no explicit need for this feature right now, we might as well not worry about it.

Cheers, Nicolas