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

guessing k-regular sequences #35682

Merged
merged 79 commits into from
Jul 20, 2023

Conversation

dkrenn
Copy link
Contributor

@dkrenn dkrenn commented May 25, 2023

Fixes #21204.

…-regular-guess

* u/dkrenn/sequences/k-regular:
  cleanup imports
  remove pad_right (only used by .guess in other branch)
…-regular-guess

* u/dkrenn/sequences/k-regular:
  rename to kRegularSequenceSpace
  modify docstring at top of file
  write the missing docstrings
  use lazy_list_formatter in _repr_
  phrase error message and test it
  docstring of _product_of_matrices_
  make product_of_matrices a private method
  Trac sagemath#21200: rephrase requirements for input
  Trac sagemath#21200: polish docstrings
  Trac sagemath#21200: fix doctests
  Trac sagemath#21200: modify code so that everything works again
  Trac sagemath#21200: move code (no other changes)
  add k_regular_sequence to documentation
  lazy import kRegularSequences into global namespace
  fix doctests
  Trac sagemath#21164, comment 11, 1: extend docstring explaining inheriting
  Trac sagemath#21164, comment 11, 4: better description of arguments in str
  Trac sagemath#21164, comment 11, 2: refine docstring to make idempotence of lazy_list visible
  Trac sagemath#21164, comment 11, 3: revert rewrite in __add__
…-regular-guess

* u/dkrenn/sequences/k-regular:
  write remaining docstrings
  __classcall__ and __init__
…-regular-guess

* u/dkrenn/sequences/k-regular: (49 commits)
  correct one link
  move "transpose" in docstring to correct place
  cross-references
  complete docstrings and 100% coverage
  complete documentation
  reorder imports
  coverage to 100%
  fix doctests
  checks for creating recognizable series
  check input of RecognizableSequenceSpace and document it
  minor rewrite in _repr_
  small cleanup
  use @cached_method-workaround of sagemath#21281 in __getitem__
  rewrite to follow changes upstream
  remove algebra and use indices and coefficients directly
  change category
  remove cached_function from __getitem__
  delete un-needed code
  switch tuple entries in output of __iter__
  small rewrite in _repr_
  ...
…-regular-guess

* u/dkrenn/sequences/k-regular:
  fix doctests
  add experimental warning
  extend element constructor
  remove None-sense to simplify code
…-regular-guess

* u/dkrenn/sequences/k-regular:
  put conversion code n --> index/word into separat method
…-regular-guess

* u/dkrenn/sequences/k-regular:
  doctesting all parameters in coefficient_of_word
  pass keywords to coefficient_of_word
  experimental warning in k_regular_sequence
  minor rewrite in minimized
  flag to skip multiplication with left/right
  update __getitem__ to follow recognizable series
  rearrange __getitem__
  fix a typo
…egular-guess

* t/21203/sequences/k-regular: (1899 commits)
  fix building of docs (no idea why it failed)
  fix doctests (experimental warning)
  doctesting all parameters in coefficient_of_word
  pass keywords to coefficient_of_word
  experimental warning in k_regular_sequence
  minor rewrite in minimized
  flag to skip multiplication with left/right
  update __getitem__ to follow recognizable series
  rearrange __getitem__
  fix a typo
  Updated SageMath version to 7.4.beta1
  Dots removed.
  Minor changes.
  More cleanup
  Add sphinx plots and cleanup
  Fix doctests and minor cleanup
  Corrections, changes etc.
  Trac sagemath#21181: Yet a few more formatting fixes in docstrings of sage/combinat/words/finite_word.py
  Trac sagemath#21181 (previously sagemath#21178): Change to imperative form in docstrings of sage/combinat/words/finite_word.py, part II
  Trac sagemath#21181 (previously sagemath#21178): Change to imperative form in docstrings of sage/combinat/words/finite_word.py
  ...
…ces/k-regular-guess

* t/21325/sequences/k-regular-subseq: (21 commits)
  minor rewrites to use existing stuff better
  partial sums
  minor rewrites
  forward/backward difference
  allow b to be a dict
  minor rewrite
  rewrite to make subsequence more efficient (dynamically add kernel)
  quasi-cherry-pick of pad_right of k-regular-guess branch
  missing_value=0
  subsequence
  factor out subsequence to separat ticket
  extend to negative shifts in subsequence
  doctesting rmul, lmul and one_hadamard
  doctesting all parameters in coefficient_of_word
  subsequence
  hadamard_product
  change category to modules
  _rmul_ and _lmul_
  _neg_
  _add_
  ...
…gular-guess

* t/21319/sequences/rec-hash:
  TestSuite
  pickling support
  an_element and some_elements
  FreeModule_generic.some_elements
  MatrixSpace.some_elements
  equality testing
  hashing
  mutability in transposed()
  fix doctests
  handle mutable structures
…gular-guess

* t/21319/sequences/rec-hash: (140 commits)
  minor correction in doc
  remove zero()
  solve troubles with doc-building
  solve troubles with doc-building
  minor correction in doc
  Updated SageMath version to 7.4.beta2
  Small change in a doctest
  Small fixes. All doctests pass (hopefully)
  Rewrite coerce_binop. Fix a bug exposed by this in fields.py
  removed base_ring option from abelian_variety() in ell_rational_field.py
  trac 21310 get rid of itervalues in the combinat folder
  trac 21308 better doc
  trac 21308 add one reference + more doc
  trac 21308 better doc
  implement the magnitude function of a graph
  12364: adding doctest
  removal of another bunch of useless .keys()
  Add traceback line to doctest
  formatting changes to automorphims in rational_field
  added automorphisms to rational_field
  ...
…gular-guess

* t/21319/sequences/rec-hash: (2030 commits)
  fix doctest output of TestSuite (new tests were added)
  Python3: fix iteritems
  Python3: xrange
  Python3: absolut import
  Python3: absolute import
  Python3: izip
  Python3: __nonzero__
  Trac sagemath#21295: fix typos
  Trac sagemath#21295: fix ReST error
  Updated SageMath version to 7.5
  Updated SageMath version to 7.5.rc3
  Use a deterministic sorting key for number fields
  Updated SageMath version to 7.5.rc2
  22136: pkg version/chksum
  Upgrade to Python 2.7.13
  Updated SageMath version to 7.5.rc1
  amending coment and message in setup.py
  Move autogen to a more appropriate location.
  22095: better doctest
  run tests only in spkg-check. Also run spkg-check with the same options as spkg-install
  ...
…regular-guess

* u/dkrenn/sequences/rec-hash: (6376 commits)
  Updated SageMath version to 8.1
  Updated SageMath version to 8.1.rc4
  Updated tarball, add spkg-src and fix instructions
  fix for sagemath#24085 packaged as an update with non-official tarball
  Updated SageMath version to 8.1.rc3
  22851: make qepcad experimental
  sympy is needed by docbuild
  Updated SageMath version to 8.1.rc2
  Updated SageMath version to 8.1.rc1
  Added a comment with link to the relevant ticket
  Fixes https://trac.sagemath.org/ticket/24192
  Use correct format for nbserver_extensions
  Skip test on systems without RLIMIT_AS support
  Add patch fixing build errors in fpylll on Cygwin
  The path to lib/python/config does not contain the Python LD_VERSION on Python 2
  sagemath#24182 : update openssl package.
  increase tol
  Updated SageMath version to 8.1.rc0
  Add wikipedia link.
  Some reviewer comments.
  ...
…regular-guess

* u/dkrenn/sequences/rec-hash: (8211 commits)
  Updated SageMath version to 8.7
  Updated SageMath version to 8.7.rc0
  Trac sagemath#27490: Moved the alternate build_many implementation into a sage_setup.docbuild.utils module.
  Trac sagemath#27490: Further fixes in use of os.wait()
  Trac sagemath#27214: Patch GAP to allocate its memory pool using MAP_NORESERVE on Cygwin
  Trac sagemath#27490: Address some review comments and other cleanup:
  A little bit of import cleanup
  Trac sagemath#27490: Simplistic multiprocessing.Pool replacement for parallel docbuild on older Cygwin
  Fix alarm() test when cysignals was compiled with debugging
  Trac sagemath#27485: Use sdh_cmake in the spkg-install for primecount.
  Trac sagemath#27484: Add shd_cmake helper for running cmake with the correct flags for building Sage SPKGs.
  cysignals should be a normal dependency
  Upgrade to Cysignals 1.10.2
  Upgrade to notebook-5.7.6
  Trac sagemath#27461: Add abs tol on this test to account for minor numerical difference on Cygwin due to libm differences.
  Replacing None < infinity comparison with equivalent code.
  Some last little tidbits for uniformity.
  Removing some code duplication for __pth_root (changed to _pth_root_func).
  One more xderinv added.
  trac 27474: move some references to the master bibliography file.
  ...
…gular-guess

* t/21319/sequences/rec-hash: (11520 commits)
  Trac sagemath#21319: fixup due to changes in dependencies
  Trac sagemath#21318: fixup due to recent changes in dependencies
  Updated SageMath version to 9.3
  build/pkgs/fplll/spkg-install.in: Configure --without-qd if we use gcc from spkg
  build/pkgs/fplll/spkg-configure.m4: Add depcheck on gcc
  build/pkgs/ppl/spkg-configure.m4: Add depcheck on gcc
  build/pkgs/brial/spkg-configure.m4: Add depcheck on gcc
  build/pkgs/{freetype,libgd}/spkg-configure.m4: Add depcheck for gcc
  build/pkgs/zeromq/spkg-configure.m4: Add depcheck for gcc
  build/pkgs/ntl/spkg-configure.m4: Add depcheck for gcc
  Trac sagemath#21295 review issue 29: notice minimize vs field
  Trac sagemath#21295 review issue 7: document accessing coefficients
  Trac sagemath#21295 review issue 33: rename to number_of_zeros (as it should be)
  Trac sagemath#21203 review issue 4: rename to coefficient ring
  Trac sagemath#21295: rename to coefficient_ring
  Trac sagemath#21203 review issue 3: example for __getitem__ and __iter__
  Trac sagemath#21203 review issue 2: extend odds in Pascal's triangle
  Trac sagemath#21203 review issue 1: better binary sum of digits
  Trac sagemath#21203 review issue 5: meaningful error message in _n_to_index_
  Trac sagemath#21203 review issue 8: resolve "`n`th" in docstring
  ...
@dkrenn dkrenn marked this pull request as ready for review June 9, 2023 11:12
@dkrenn
Copy link
Contributor Author

dkrenn commented Jun 9, 2023

I have again addressed all open issues, so please review.

src/sage/combinat/k_regular_sequence.py Outdated Show resolved Hide resolved
src/sage/combinat/k_regular_sequence.py Outdated Show resolved Hide resolved
src/sage/combinat/k_regular_sequence.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cheuberg cheuberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you; I have two more very minor remarks.

@dkrenn
Copy link
Contributor Author

dkrenn commented Jul 17, 2023

Thank you; I have two more very minor remarks.

Addressed; please review.

Copy link
Contributor

@cheuberg cheuberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Unfortunately, in the last round, I forgot to mention that the code change w.r.t. left/right is not yet reflected in the comments (there, we always have "left vector valued sequence" instead of "right vector valued sequence" and the description needs updating).
Sorry.

@dkrenn
Copy link
Contributor Author

dkrenn commented Jul 17, 2023

Unfortunately, in the last round, I forgot to mention that the code change w.r.t. left/right is not yet reflected in the comments (there, we always have "left vector valued sequence" instead of "right vector valued sequence" and the description needs updating). Sorry.

No problem. 1050e70

Copy link
Contributor

@cheuberg cheuberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final suggestion, then we should be done here.

src/sage/combinat/k_regular_sequence.py Outdated Show resolved Hide resolved
Co-authored-by: cheuberg <clemens.heuberger@aau.at>
Copy link
Contributor

@cheuberg cheuberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please set appropriate labels (I am not a member of sage-triage yet, so I guess I cannot do it myself) once the bots are happy.

@github-actions
Copy link

Documentation preview for this PR (built with commit 822ce11; changes) is ready! 🎉

@dkrenn
Copy link
Contributor Author

dkrenn commented Jul 18, 2023

incremental build fails (AFAICS unrelated to this PR), but non-incremental build succeeds. Therefore, I've put it to positive-review. (I case this is incorrect procedure, what otherwise to do?) :)

@cheuberg
Copy link
Contributor

incremental build fails (AFAICS unrelated to this PR), but non-incremental build succeeds. Therefore, I've put it to positive-review. (I case this is incorrect procedure, what otherwise to do?) :)

Tests also pass locally. I do not know what to do with the results of codecov, this mostly seems to be a false positive, too. Shall we try to merge the current develop branch in order to exclude problems with that? Possibly in another PR?

@vbraun vbraun merged commit fba3ecf into sagemath:develop Jul 20, 2023
10 of 13 checks passed
@mkoeppe mkoeppe added this to the sage-10.1 milestone Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

guessing k-regular sequences
6 participants