-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
uncouple Sequence from categories #15852
Comments
This comment has been minimized.
This comment has been minimized.
Branch: u/rws/ticket/15852 |
Commit: |
Author: Ralf Stephan |
comment:4
While having the category of sequences also being the parent is a definite abuse IMO, I don't like the proposed change since:
So I would rather see a new class as you propose here with this ticket. Let's do things properly, and the parent shouldn't be too big or complicated either. This parent will also be in the category of Also what's the ticket that removes the |
comment:5
Replying to @tscrim:
In my understanding a sequence is always enumerable, it may not be finite, or it may not be mutable. The present Yes the infinite version is desirable but please not in this ticket, too.
#15853 and we have it now so use it. |
comment:6
A parent in Although since the present class is for finite sequences, I agree that infinite sequences should be done on another ticket. |
comment:7
Of course you're right, thanks for the explanation. I said I'm no algebraist. I have corrected the ticket description. |
This comment has been minimized.
This comment has been minimized.
comment:9
Let's have another attempt at this. A string (or word) over Σ is any finite sequence of symbols from Σ (which is finite too). The set of all finite strings over some fixed alphabet Σ forms a monoid with string concatenation as the operation. This monoid is denoted Σ∗ and is called the free monoid over Σ. (Taken from Wikipedia) That this is not far off is seen in Are there monoids with an infinite number of generators? |
comment:10
#15289 gives free monoids given by some indexing set. Although I only had enumerable indexing sets in mind, so it may not work over something non-enumerable. It almost feels like you're going to propose not having a parent for sequences and having them being subsumed by |
comment:11
I am coming completely naive to this, except for my OOP background, and if I can reuse So to the parent, it looks to me like a subclass of |
comment:12
The set of all finite (support) sequences is not a free monoid until you put the additional structure of concatenation on it. However we could also give (finite support) sequences the structure of a vector space over If anything, |
comment:13
Replying to @tscrim:
So you would call it |
comment:14
I am finally looking at this ticket. Thanks for taking care of long deprecated stuff! The documentation of I interpret that as a data structure for an homogeneous collection of objects, homogeneous in that they share a common universe. This sounds much more like a programming utility than a model for a mathematical concept. So I would tend to not try imposing a mathematical structure onto it: a sequence needs not have a parent nor a category, nor mathematical operations like +, ... Let's indeed deprecate/remove the corresponding methods. On the other hand, one could triple check that
There would remain to check that all methods indeed fit the specifications. [1] https://docs.python.org/2/library/collections.html#collections-abstract-base-classes Cheers, |
comment:16
I don't know about the Python's ABC idea. Do we have a place for classes that fit into that hierarchy? This ticket grew on me because it forced me to learn a bit about abstract algebra. After all this, I agree that this special |
This comment has been minimized.
This comment has been minimized.
comment:18
Accompanying this move could be a different name that doesn't surprise the user. While I can find no crisper name than |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:31
Two failing doctest, see patchbot report |
Changed branch from u/rws/ticket/15852 to u/rws/15852 |
comment:33
Squashed it all into one commit. New commits:
|
comment:34
branch is red, does not apply |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:37
Anything that removes that much chaff is a plus ;-) |
Reviewer: Volker Braun |
comment:38
Thanks for the review. |
Changed branch from u/rws/15852 to |
The
class Sequence
is difficult to place in the categories, as the discussion in this ticket shows. Rather, it has its place as programming utility, probably inmisc
. Thus, it needs not have a parent nor a category, nor mathematical operations like +, ... This ticket will deprecate/remove the corresponding methods.Previous description:
The category
Sequence
is deprecated since 2009 (commit619aa0fa
). If I understand it correctly, the classSequence
should instead have a parent from the categorySets
.The ticket that will remove category
Sequence
depends on this.CC: @nthiery
Component: categories
Author: Ralf Stephan
Branch/Commit:
1f9c338
Reviewer: Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/15852
The text was updated successfully, but these errors were encountered: