Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement indexed monoids #15289

Closed
tscrim opened this issue Oct 16, 2013 · 92 comments
Closed

Implement indexed monoids #15289

tscrim opened this issue Oct 16, 2013 · 92 comments

Comments

@tscrim
Copy link
Collaborator

tscrim commented Oct 16, 2013

Implements free (abelian) monoids whose generators are indexed by an arbitrary set. This also moves common code from CombinatorialFreeModule into a new class sage.misc.indexed_generators.IndexedGenerators. With this we can now create (noncommutative) polynomials whose generators are given by a combinatorial object.

Also implements a very crude and basic version for groups.

Depends on #15309
Depends on #15169
Depends on #16349

CC: @sagetrac-sage-combinat @nthiery @sagetrac-mshimo @simon-king-jena

Component: algebra

Keywords: days54

Author: Travis Scrimshaw

Branch: 69ec7b2

Reviewer: Nicolas M. Thiéry

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

@tscrim
Copy link
Collaborator Author

tscrim commented Oct 16, 2013

comment:1

Initial version. I might add a _basis_keys attribute to CombinatorialFreeModule for backwards compatibility...

@nthiery
Copy link
Contributor

nthiery commented Oct 16, 2013

comment:2

Hi Travis,

Thanks for working on this feature! I'll try to look at it, but that won't be immediately. I would have thought we already had a ticket about that, but I might be wrong. For the record, here is a link to a discussion we had (a long time ago) about such features:

https://groups.google.com/forum/#!searchin/sage-combinat-devel/CombinatorialFreeModule$20free$20monoid/sage-combinat-devel/EH8M6bWPylk/a-FG4uFQm7AJ

Thanks again!

Cheers,
Nicolas

@tscrim
Copy link
Collaborator Author

tscrim commented Oct 16, 2013

comment:3

Hey Nicolas,

I believe there is a ticket about making free abelian groups as ZZ-modules, and another one about converting between additive and multiplicative groups. However they currently don't apply to CombinatorialFreeModule, and none of the tickets on CombinatorialFreeModule would apply here as far as I remember.

Here's a new version which gives a groups version so we can do Laurent polynomials. This is not are fancy as the discussion would like, but it serves my purposes for now.

Best,

Travis

@tscrim

This comment has been minimized.

@tscrim
Copy link
Collaborator Author

tscrim commented Oct 23, 2013

comment:4

Here's with some more functionality additions. I did make one major change and made the iterator return (generator, exp), as opposed to (index, exp) and similar to how FreeMonoid works.

Frequently I'm finding myself calling _sorted_items(), but I'm needing to manipulate the indices of the generators. I'm wondering if we should make it into a public method (perhaps with a better name since there is no true sorting occurring when it is not free).

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 2, 2013

Dependencies: #15309

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 2, 2013

comment:5

Rebased to 5.13.beta2.

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 2, 2013

Attachment: trac_15289-indexed_monoids-ts.patch.gz

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 7, 2013

Changed dependencies from #15309 to #15309 #15169

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 7, 2013

comment:7

Added git version.


New commits:

[c1b5afe](https://github.com/sagemath/sagetrac-mirror/commit/c1b5afe)#15289: Implemented indexed monoids and groups.
[6fd33b2](https://github.com/sagemath/sagetrac-mirror/commit/6fd33b2)#15169: Fix FreeAlgebra element constructor from a base field.

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 7, 2013

Commit: c1b5afe

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 7, 2013

Branch: public/monoids/15289-indexed

@tscrim
Copy link
Collaborator Author

tscrim commented Nov 9, 2013

Changed keywords from none to days54

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 3, 2013

Changed commit from c1b5afe to 9dca526

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 3, 2013

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

[9dca526](https://github.com/sagemath/sagetrac-mirror/commit/9dca526)Added comparison operations.
[a493bee](https://github.com/sagemath/sagetrac-mirror/commit/a493bee)Merge branch 'master' into public/monoids/15289-indexed

@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 8, 2014

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

545a8dfMerge branch 'develop' into public/monoids/15289-indexed
2975c87Merge branch 'develop' into public/monoids/15289-indexed
4002b0dMerge branch 'develop' into public/monoids/15289-indexed
9e9b769Merge branch 'develop' into public/monoids/15289-indexed
a278afaAdded cardinality methods.
f681606Added cardinality to free abelian monoid for consistancy.
3a0e50bMerge branch 'develop' into public/monoids/15289-indexed
d4606ccAdded more robustness to element creation.
991953aMerge branch 'develop' into public/monoids/15289-indexed

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 8, 2014

Changed commit from 9dca526 to 991953a

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 11, 2014

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

56703ebMade Indexed* have entry points through Free*.
163df6eChanged more _basis_keys to _indices, deprecated the former.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 11, 2014

Changed commit from 991953a to 163df6e

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 11, 2014

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

8db8e0aChanged `_an_element_` to indexed_monoid.py.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 11, 2014

Changed commit from 163df6e to 8db8e0a

@tscrim
Copy link
Collaborator Author

tscrim commented Feb 11, 2014

comment:14

Hey Nicolas,

From your comments on #15726, I've made the appropriate changes here.

  • All Indexed* now goes through Free*, but as a special case, I have IndexedFreeAbelianGroup as FreeGroup(index_set=X, abelian=True). Should we do the same for FreeMonoid?

  • I want to leave __pow__ alone since they are more specialized for the data structures.

  • The __contains__, are you suggesting putting it into Parent? If so, that might be a can of worms and should be done on another ticket.

  • I'd like to keep IndexedFreeAbelianGroup as multiplicative since I want to use them as a basis indexing set for polynomials.

  • Similarly, the comparisons are using lex ordering, so it gives a nice default order on terms when modeling polynomial rings with indexed generators.

Thank you for looking at this (and #15726). As always, I appreciate your wisdom and insight.

Best,

Travis


New commits:

8db8e0aChanged `_an_element_` to indexed_monoid.py.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 20, 2014

Changed commit from 73a4e48 to d4fe805

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

Changed commit from d4fe805 to 56cd05d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

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

56cd05dSome fixes discussed.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

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

f1f5547Fixed category issue.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

Changed commit from 56cd05d to f1f5547

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

Changed commit from f1f5547 to f6a73fd

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

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

f6a73fdFixed failing doctests in categories due to new intermediate categories.

@nthiery
Copy link
Contributor

nthiery commented Jul 1, 2014

comment:62

I checked the recent commits, and we have been discussing side by side for the last ones today. doc and pdf doc compiles. Positive review assuming all long tests pass (running them now).

Thanks Travis!

Cheers,
Nicolas

@nthiery
Copy link
Contributor

nthiery commented Jul 1, 2014

Reviewer: Nicolas M. Thiéry

@tscrim
Copy link
Collaborator Author

tscrim commented Jul 1, 2014

comment:64

Thank you for doing the review Nicolas.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

69ec7b2Fixed c3_controlled.pyx doctests.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 1, 2014

Changed commit from f6a73fd to 69ec7b2

@vbraun
Copy link
Member

vbraun commented Jul 3, 2014

Changed branch from public/monoids/15289-indexed to 69ec7b2

@kcrisman
Copy link
Member

kcrisman commented Feb 8, 2015

Changed commit from 69ec7b2 to none

@kcrisman
Copy link
Member

kcrisman commented Feb 8, 2015

comment:68

Hi guys, please see http://ask.sagemath.org/question/25763/incorrect-parsing-of-docstring-of-sagestructureindexed_generatorsindexedgenerators/ where it seems that putting "\left" becomes something quite different in html. I assume this is not desired; see #17745.

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

No branches or pull requests

6 participants