-
-
Notifications
You must be signed in to change notification settings - Fork 655
Regular sequence: closing experimental phase of regular sequence module #36011
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
Regular sequence: closing experimental phase of regular sequence module #36011
Conversation
… regular-sequences-mul * origin/u/dkrenn/k-regular-warning: (69 commits) fix doctests after merge test RuntimeError no invertible matrix add comment and ref to sagemath#35748 remove W293 blank line contains whitespace fix docstring (LaTeX) fix whitespaces better handling of n_max add another test add another test fixup n_max fix left/right issue when bootstraping guessing more consistent naming in DEBUG output consequently rename to linear_combination simplify code by removing variables make NoLinearCombination a RuntimeError remove unneeded import Apply suggestions from code review Apply suggestions from code review write error message rename, describe and test max_exponent ...
Co-authored-by: cheuberg <clemens.heuberger@aau.at>
…ul' into regular-sequences-mul * refs/remotes/origin/regular-sequences-mul: Apply suggestions from code review
* u/dkrenn/k-regular-warning: Fix one typo Reference [HKL2021] appeared (and is now [HKL2022]) use HKL2021-algorithm in .regenerated fix broken links in docstrings simplify representative example (pascal triangle) extend doctest: show linear representation Apply suggestions from code review Update src/sage/combinat/k_regular_sequence.py fix left/right vector sequence issue in docstrings implement coefficient_of_n (for __getitem__) break long line in doctest rewrite minimiz_result decorator: deal with result is self use .linear_representation in doctests everywhere minor cleanup/readability change in .regenerated k-regular sequences: refactor .regenerated (use minimize_result decorator) fix doctest magic comments (according to relint)
* upstream/develop: (1372 commits) Updated SageMath version to 10.1.beta8 remove multiple call of Vmatrix and Vmodule remove PGE and some listcomp get two entry directly tests passed Still permutation wip fix one issue fix fix typo store inverse of permutation Direct_Permute WIP PermutedMatrixWindow redundant line Style fixes PR sagemath#35891: fix issue in src/sage/geometry/polyhedral_complex.py fix merging problems add type checks for parameters PR sagemath#35956: fix typo PR sagemath#35956: fix doctests fix another issue ...
…erimental * regular-sequences-mul: algorithm block break line in doctest make description of method "one" more precise Apply suggestions from code review convolution: rename variables k-regular sequences: convolution/docs k-regular sequences: extend category to Algebra k-regular sequences: implement convolution k-regular sequences: fix .one() cleanup old, unreadable dict creations recognizable series: embed coefficient ring recognizable series: properly deal with zero
CC @cheuberg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes so far are fine with me, but I'd go farther with removing the name k
of the base. I started making suggestions but then stopped because a search-and-replace for "k
-regular" seems to be more efficient.
src/sage/combinat/all.py
Outdated
@@ -277,7 +277,7 @@ | |||
lazy_import('sage.combinat.binary_recurrence_sequences', | |||
'BinaryRecurrenceSequence') | |||
lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') | |||
lazy_import('sage.combinat.k_regular_sequence', 'kRegularSequenceSpace') | |||
lazy_import('sage.combinat.k_regular_sequence', 'RegularSequenceRing') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to rename the file k_regular_sequence.py
to regular_sequence.py
(after merging #36001) for consistency: now that everything is renamed in such a way to remove the variable k
, that would seem to be a logical move to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed, I agree that this seems a logical move. I prepared a commit and will push it soon. (BTW it does not seem to be a problem due to #36001 when merging; git
appearently takes care of this.)
@@ -6,21 +6,6 @@ | |||
found, for example, on the :wikipedia:`k-regular_sequence` or in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The k
in lines 3 and 5 could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not convinced; see below (#36011 (comment))
At the moment, I am not fully convinced that this is the way to go. After all, the used term is " I, therefore, have some preference, for keeping this as it is. In case we agree to change, I have a strong preference for keeping the title (line 3) of the module as it is (i.e. including the base) and think we should give both names |
Documentation preview for this PR (built with commit cd04076; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are fine with me. The question on how to call the sequences in the documentation is perhaps not very urgent (and independent of removing the experimental notice).
Two comments:
- while the Wikipedia entry for regular sequences is called "k-regular sequence", the entry there for the closely related automatic sequence is called "automatic sequence" with an explanation there that it is sometimes called a "k-automatic sequence".
- concerning the documentation here: for some methods, mentioning "k" makes more sense to me than for others. E.g. for the constructor of a regular sequence, it makes more sense to me to say that it is "k-recursive" because the description of the family mu refers to the same k. However, for the oneline description of backwards difference, the "k" seems to be quite redundant to me: it does not occur anywhere else in the description of the method.
But, as I said, we can also merge it essentially as it is, perhaps just adding a short sentence at the very beginning.
This is now #36019. |
sagemathgh-36029: k-regular sequences: boundedness <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Implements an algorithm to check for boundedness of k-regular sequences. See issue sagemath#22964. (Coding and reviewing already happend on trac (see sagemath#22964) and the branch was ready but never merged due to a trivial issue. Now the current develop (10.1.beta8) has been merged in to avoid conflicts the upcoming sagemath#36011 (where a renaming took place; set as depedency now). ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies - sagemath#36011: Experimental warning removed in class used in this PR and class was renamed. URL: sagemath#36029 Reported by: Daniel Krenn Reviewer(s): cheuberg, Daniel Krenn, Gabriel Lipnik
sagemathgh-36029: k-regular sequences: boundedness <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Implements an algorithm to check for boundedness of k-regular sequences. See issue sagemath#22964. (Coding and reviewing already happend on trac (see sagemath#22964) and the branch was ready but never merged due to a trivial issue. Now the current develop (10.1.beta8) has been merged in to avoid conflicts the upcoming sagemath#36011 (where a renaming took place; set as depedency now). ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation accordingly. ### ⌛ Dependencies - sagemath#36011: Experimental warning removed in class used in this PR and class was renamed. URL: sagemath#36029 Reported by: Daniel Krenn Reviewer(s): cheuberg, Daniel Krenn, Gabriel Lipnik
This PR closes the experimental-phase of the regular sequences module. This module has been experimental für a very long time now. Lately #35894 has been completed so this is now a fully-functional ring/algebra. Except for the consequences of #35894 (renaming; see below), the interface is stable for very long time.
This PR does:
RegularSequenceRing
(as this structure now is a ring due to Regular sequences: implement convolution / ring structure #35894).📝 Checklist
⌛ Dependencies