-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Factor code between words's alphabets and sets/enumerated sets/ordered sets #8920
Comments
comment:1
Hi Vincent, You are currently taking car of this. You may want either to reuse this ticket or to close it as duplicate. Florent |
Changed keywords from Words, Sets to Words, Sets, Cernay2012 |
This comment has been minimized.
This comment has been minimized.
comment:4
Many tests currently break because of the following behavior
|
This comment has been minimized.
This comment has been minimized.
comment:7
Hey Vincent, I think the only merged patch which might have caused the conflict is #13677. Thanks, Travis |
comment:8
Replying to @tscrim:
Hi Travis, I rebased the patch (together with Stepan Starosta) and actually we decided to simplify the FiniteEnumeratedSet (the new version was slower). Everything should apply and work on 5.5.rc0. Best, |
Author: Vincent Delecroix, Stepan Starosta |
Reviewer: Travis Scrimshaw |
comment:9
Hey Vincent and Stepan, In
I expected the last one to return
and both problems are because the alphabet does not have any element class. These problems were worse before this patch, but I was wondering if you wanted to take care of these here?
Additionally on This applied cleanly for me on Thanks for you work on this, Travis |
Dependencies: #13801 |
comment:11
Hi Travis, thanks for reviewing the patch and your comments! I uploaded a new version with two major changes
All problems are similar to the ones there are currently with Nathann and posets (#13747) : to be or not to be a facade, that is the question. One major difference with the previous patch is that we provide a class TotallyOrderedFiniteSet which has a facade option behavior and may choose the behavior you prefer. How do facades behave Facade are the default behavior for alphabets. The disadvantage of having a facade is that the elements need to have their order implemented, i.e., we get
Another disadvantage of having a facade is that if some elements do not inherit from Element, the constructor raises an error
Not using facade ? The possible workaround for the two above problems is to have a dedicated element class for TotallyOrderedFiniteSet. If the option facade is set to False, it is what you get
... but
Partial conclusion we do prefer having facade = True as a default behavior (as Nathann does). About endomorphisms Two reason to change is_endomorphism() are:
Thanks, |
comment:12
Replying to @videlec:
Yeah, we hit the same problem in Poset, and we worked around it by Cheers, |
comment:13
Hey Stepan and Vincent, Few more things:
However there is one problem with this, and that is Thank you, Travis |
comment:14
Hey Stepan and Vincent, Replying to @tscrim:
I talked with Nicolas about this, and he agreed with the changes in your patch, but also said we needed to change the Best, Travis |
comment:15
I've attached my review patch which address my comments and the doctests. The set comparisons in [comment:14] are a more general issue for another ticket. If you agree with my changes, you can set this to positive review. Best, Travis |
This comment has been minimized.
This comment has been minimized.
comment:17
I modified the comparison of elements of |
comment:18
I added link in the documentation and double quotes where it is needed. |
Changed keywords from Words, Sets, Cernay2012 to Words, Sets, Cernay2012, days45 |
comment:21
This needs to be rebased to #6495 and also this fuzz needs to be fixed:
|
comment:22
I rebased the patch for #6495. Vincnet |
comment:24
On OS X:
|
comment:25
On
|
Attachment: trac_8920-alphabet.patch.gz apply only this one (takes care of changes in the review patch) |
comment:27
I do not understand the first failure on OS X but I made a small modification in For the issue about comparisons of "Words", I just removed all related methods as they were needed nowhere and rely on comparison of alphabets which is not possible anymore. Vincent |
comment:29
The long tests pass for me now. I'll try harder to remember to (re)run the long tests in the future. |
Merged: sage-5.8.beta2 |
comment:31
Advice for the future: don't make needless whitespace changes, like you did here in |
Changed author from Vincent Delecroix, Stepan Starosta to Vincent Delecroix, Štěpán Starosta |
Create a class
TotallyOrderedFiniteSet
in sage.sets. Delete the different classes for alphabets (in sage.combinat.words.alphabet) and use the one in Sage (included the freshly createdTotallyOrderedFiniteSet
).Depends on #13801
Depends on #6495
CC: @sagetrac-sage-combinat @videlec @staroste
Component: combinatorics
Keywords: Words, Sets, Cernay2012, days45
Author: Vincent Delecroix, Štěpán Starosta
Reviewer: Travis Scrimshaw
Merged: sage-5.8.beta2
Issue created by migration from https://trac.sagemath.org/ticket/8920
The text was updated successfully, but these errors were encountered: