From 3dabee0cdcca553e4df078a7c16a32b9b4a45fdb Mon Sep 17 00:00:00 2001 From: adrinospy Date: Fri, 9 Feb 2024 22:24:04 +0530 Subject: [PATCH 001/183] added auto labeler based on size of changes --- .github/workflows/pr-labeler.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/pr-labeler.yml diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml new file mode 100644 index 00000000000..c146a5c6aa2 --- /dev/null +++ b/.github/workflows/pr-labeler.yml @@ -0,0 +1,38 @@ +# set labels on Pull-Requests based on size of changes +# size is compared form first to last commit in the pull request +name: Size Labeler/Checker +on: + pull_request_target: + types: + - opened + - synchronize +jobs: + label-changes: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - name: Check changes and label + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + CHANGES=$((${{github.event.pull_request.additions}} + ${{github.event.pull_request.deletions}})) + echo "Changed files: $CHANGES" + + THRESHOLD=200 + + PR_NUMBER="${{ github.event.number }}" + API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" + AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" + + if [ "$CHANGES" -le "$THRESHOLD" ]; then + LABEL="tiny" + DELETE_LABEL="huge" + else + LABEL="huge" + DELETE_LABEL="tiny" + fi + + echo "Adding label: $LABEL" + curl -X POST -H "$AUTH_HEADER" -d "{\"labels\":[\"$LABEL\"]}" "$API_URL" + curl -X DELETE -H "$AUTH_HEADER" "$API_URL/$DELETE_LABEL" \ No newline at end of file From 6c4ac86aa73b2f9a06c985957727e437b039d622 Mon Sep 17 00:00:00 2001 From: adrinospy Date: Sun, 11 Feb 2024 16:48:18 +0530 Subject: [PATCH 002/183] added new labels for different thresholds --- .github/workflows/pr-labeler.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index c146a5c6aa2..b4f3c76e3f3 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -17,22 +17,32 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | CHANGES=$((${{github.event.pull_request.additions}} + ${{github.event.pull_request.deletions}})) - echo "Changed files: $CHANGES" + echo "Changes Made: $CHANGES" - THRESHOLD=200 + MINIMAL_THRESHOLD=50 + SMALL_THRESHOLD=100 + MODERATE_THRESHOLD=300 PR_NUMBER="${{ github.event.number }}" API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" - if [ "$CHANGES" -le "$THRESHOLD" ]; then - LABEL="tiny" - DELETE_LABEL="huge" + DELETE_LABELS=("minimal" "small" "moderate" "large") + + if [ "$CHANGES" -le "$MINIMAL_THRESHOLD" ]; then + LABEL="minimal" + elif [ "$CHANGES" -le "$SMALL_THRESHOLD" ]; then + LABEL="small" + elif [ "$CHANGES" -le "$MODERATE_THRESHOLD" ]; then + LABEL="moderate" else - LABEL="huge" - DELETE_LABEL="tiny" + LABEL="large" fi + DELETE_LABELS=("${DELETE_LABELS[@]/$LABEL}") + echo "Adding label: $LABEL" curl -X POST -H "$AUTH_HEADER" -d "{\"labels\":[\"$LABEL\"]}" "$API_URL" - curl -X DELETE -H "$AUTH_HEADER" "$API_URL/$DELETE_LABEL" \ No newline at end of file + for DELETE_LABEL in "${DELETE_LABELS[@]}"; do + curl -X DELETE -H "$AUTH_HEADER" "$API_URL/$DELETE_LABEL" + done From 9a19e596f58f298187fdbcd056f473f95561cc63 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 15:55:36 -0800 Subject: [PATCH 003/183] .github/workflows/macos.yml: Install tox from PyPI, not homebrew --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index bfa4bc58f96..0e8a76ad13d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -77,7 +77,7 @@ jobs: - name: Install test prerequisites run: | - brew install tox + pip install tox - name: Download upstream artifact uses: actions/download-artifact@v3 with: From 296fc20b7c0ebdbf280093dde4838799d53358cc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:37:45 -0800 Subject: [PATCH 004/183] .github/workflows/macos.yml: Add tests on M1 runners --- .github/workflows/macos.yml | 17 +++++++++++------ tox.ini | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0e8a76ad13d..2cbeb765b20 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -19,17 +19,22 @@ on: type: string # System configuration osversion_xcodeversion_toxenv_tuples: + # As of 2024-02, "runs-on: macos-latest" is macos-12. + # and "runs-on: macos-14" selects the new M1 runners. + # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories description: 'Stringified JSON object' default: >- - [["latest", "", "homebrew-macos-usrlocal-minimal"], - ["latest", "", "homebrew-macos-usrlocal-standard"], - ["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"], + [["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"], + ["12", "", "homebrew-macos-usrlocal-minimal"], ["12", "", "homebrew-macos-usrlocal-standard"], + ["12", "", "homebrew-macos-usrlocal-python3_xcode-standard"], + ["12", "", "homebrew-macos-usrlocal-maximal"], ["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"], - ["latest", "", "homebrew-macos-usrlocal-maximal"], - ["latest", "", "homebrew-macos-usrlocal-python3_xcode-standard"], + ["14", "", "homebrew-macos-opthomebrew-standard"], ["latest", "", "conda-forge-macos-minimal"], - ["latest", "", "conda-forge-macos-standard"]] + ["latest", "", "conda-forge-macos-standard"], + ["14", "", "conda-forge-macos-minimal"], + ["14", "", "conda-forge-macos-standard"]] type: string extra_sage_packages: description: 'Extra Sage packages to install as system packages' diff --git a/tox.ini b/tox.ini index 3673833724c..8f5a381201d 100644 --- a/tox.ini +++ b/tox.ini @@ -512,6 +512,9 @@ setenv = # brew caches downloaded files in ${HOME}/Library/Caches. We share it between different toxenvs. homebrew: SYSTEM=homebrew local-homebrew: HOMEBREW={envdir}/homebrew + # /opt/homebrew is the default install location on arm64 macOS + local-homebrew-opthomebrew: HOMEBREW=/opt/homebrew + # /usr/local is the default install location on x86_64 macOS local-{homebrew-usrlocal,nohomebrew}: HOMEBREW=/usr/local # local-macos-nohomebrew: "best effort" isolation to avoid using a homebrew installation in /usr/local # We use liblzma from the macOS system - which is available but its headers are not (neither is the xz executable). From 76720ad52d0485dae2ef5122fc5776a2e25f2f5c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:39:12 -0800 Subject: [PATCH 005/183] .github/workflows/macos.yml: Increase SAGE_NUM_THREADS to 6 --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2cbeb765b20..4a5dd8d5888 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -134,7 +134,7 @@ jobs: *) export TARGETS_PRE="${{ inputs.targets_pre }}" TARGETS="${{ inputs.targets }} TARGETS_OPTIONAL="${{ inputs.targets_optional }} ;; esac - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS + MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From deb02bc5e3e787685436e27ba4deebabfc617f2b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:46:47 -0800 Subject: [PATCH 006/183] .github/workflows/ci-macos.yml (local-nohomebrew): Increase SAGE_NUM_THREADS to 6 --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 9d2c70cbb78..19ea15aaed6 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -140,7 +140,7 @@ jobs: # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. # For doctesting, we use a lower parallelization to avoid timeouts. run: | - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS + MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From 4c3e28181d7f050dfa8b171f32a41961c843f194 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 16:48:33 -0800 Subject: [PATCH 007/183] .github/workflows/ci-macos.yml (local-nohomebrew): Also test on M1 --- .github/workflows/ci-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 19ea15aaed6..13c0a83e1a9 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -108,7 +108,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - os: [ macos-11, macos-12 ] + os: [ macos-11, macos-12, macos-14 ] tox_system_factor: [macos-nobootstrap] tox_packages_factor: [minimal] xcode_version_factor: [default] @@ -129,7 +129,7 @@ jobs: if: contains(matrix.tox_system_factor, 'nobootstrap') - name: Move homebrew away run: | - (cd /usr/local && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done) + (cd $(brew --prefix) && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done) - name: Select Xcode version run: | if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi From 214c0ebf50a24949196b21ff903f76332b4315fb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 17:02:18 -0800 Subject: [PATCH 008/183] .github/workflows/ci-macos.yml (local-nohomebrew): Add self-destruct sequence --- .github/workflows/ci-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 13c0a83e1a9..bac51f2d592 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -140,6 +140,7 @@ jobs: # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. # For doctesting, we use a lower parallelization to avoid timeouts. run: | + (sleep 20000; pkill make) & MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | From fd342f6fd442b7a90510a8c2a02a93e4d6a47e45 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 17:24:06 -0800 Subject: [PATCH 009/183] .github/workflows/macos.yml: Add input 'timeout' --- .github/workflows/macos.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4a5dd8d5888..20f6b29cf41 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,6 +46,10 @@ on: free_disk_space: default: false type: boolean + timeout: + description: 'Elapsed time (seconds) at which to kill the build' + default: 20000 + type: number # # For use in upstream CIs. # @@ -134,6 +138,7 @@ jobs: *) export TARGETS_PRE="${{ inputs.targets_pre }}" TARGETS="${{ inputs.targets }} TARGETS_OPTIONAL="${{ inputs.targets_optional }} ;; esac + (sleep ${{ inputs.timeout }}; pkill make) & MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | From 7a921b364f38620483dda1736ccfdf709194ec5b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 21:28:58 -0800 Subject: [PATCH 010/183] .github/workflows/macos.yml: Use pipx to install tox --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 20f6b29cf41..12d50394a39 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -86,7 +86,7 @@ jobs: - name: Install test prerequisites run: | - pip install tox + pipx install tox - name: Download upstream artifact uses: actions/download-artifact@v3 with: From 9694cd9364674fcd2fa7602b44001655d735989e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 22:05:20 -0800 Subject: [PATCH 011/183] .github/workflows/macos.yml: Use tox via 'pipx run' --- .github/workflows/macos.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 12d50394a39..93a8f856994 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -83,10 +83,16 @@ jobs: repository: ${{ inputs.sage_repo }} ref: ${{ inputs.sage_ref }} fetch-depth: 10000 - + - uses: actions/setup-python@v5 + # As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx. + # Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743 + id: python + with: + python-version: "3.8 - 3.12" + update-environment: false - name: Install test prerequisites run: | - pipx install tox + "${{ steps.python.outputs.python-path }}" -m pip install pipx - name: Download upstream artifact uses: actions/download-artifact@v3 with: @@ -139,7 +145,7 @@ jobs: ;; esac (sleep ${{ inputs.timeout }}; pkill make) & - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS + MAKE="make -j12" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From dc13076c1b694b9fc9817e6c8dbe87fbfb052f2e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 3 Feb 2024 22:14:15 -0800 Subject: [PATCH 012/183] .github/workflows/ci-macos.yml: Set timeout for stage 1 to 4 hours --- .github/workflows/ci-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index bac51f2d592..1b448c62722 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -34,6 +34,7 @@ jobs: uses: ./.github/workflows/macos.yml with: stage: "1" + timeout: 14400 stage-2: uses: ./.github/workflows/macos.yml From 468ead3b4bfe307c57e33cf8c067d82903d9d8d0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 4 Feb 2024 17:23:21 -0800 Subject: [PATCH 013/183] tox.ini (local-conda): Use 'uname -m' to determine arch for installer --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 8f5a381201d..a9ff0423488 100644 --- a/tox.ini +++ b/tox.ini @@ -541,10 +541,11 @@ setenv = local-conda: PATH={env:CONDA_PREFIX}/bin:/usr/bin:/bin:/usr/sbin:/sbin local-conda: CONDA_PKGS_DIRS={env:SHARED_CACHE_DIR}/conda_pkgs local-conda: CONDA_OS=$(uname | sed 's/^Darwin/MacOSX/;') + local-conda: CONDA_ARCH=$(uname -m) local-conda-forge: CONDA_INSTALLER_URL_BASE=https://github.com/conda-forge/miniforge/releases/latest/download/ - local-conda-forge: CONDA_INSTALLER_FILE=Miniforge3-{env:CONDA_OS}-x86_64.sh + local-conda-forge: CONDA_INSTALLER_FILE=Miniforge3-{env:CONDA_OS}-{env:CONDA_ARCH}.sh local-conda-miniconda: CONDA_INSTALLER_URL_BASE=https://repo.anaconda.com/miniconda/ - local-conda-miniconda: CONDA_INSTALLER_FILE=Miniconda3-latest-{env:CONDA_OS}-x86_64.sh + local-conda-miniconda: CONDA_INSTALLER_FILE=Miniconda3-latest-{env:CONDA_OS}-{env:CONDA_ARCH}.sh local-conda: SETENV=. {env:CONDA_PREFIX}/bin/activate base local-conda-environment: CONDA_SAGE_ENVIRONMENT=sage-build local-conda-environment: CONDA_SAGE_ENVIRONMENT_DIR= From d6ac96b59d348ce4d868abc73eef64c4f9da80e8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Feb 2024 12:37:30 -0800 Subject: [PATCH 014/183] .github/workflows/macos.yml: Remove failing test of macos-14-minimal --- .github/workflows/macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 93a8f856994..7344d839620 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,7 +33,6 @@ on: ["14", "", "homebrew-macos-opthomebrew-standard"], ["latest", "", "conda-forge-macos-minimal"], ["latest", "", "conda-forge-macos-standard"], - ["14", "", "conda-forge-macos-minimal"], ["14", "", "conda-forge-macos-standard"]] type: string extra_sage_packages: From db2814d69ffb3cb6e069eb9cba39c319604714f1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Feb 2024 17:28:16 -0800 Subject: [PATCH 015/183] build/pkgs/dsdp/spkg-install.in: Increase verbosity --- build/pkgs/dsdp/spkg-install.in | 1 + 1 file changed, 1 insertion(+) diff --git a/build/pkgs/dsdp/spkg-install.in b/build/pkgs/dsdp/spkg-install.in index 8c29005b9b1..5d0ecadf030 100644 --- a/build/pkgs/dsdp/spkg-install.in +++ b/build/pkgs/dsdp/spkg-install.in @@ -1,6 +1,7 @@ cd src cp ../patches/CMakeLists.txt . sdh_cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ -DBUILD_SHARED_LIBS=ON \ -DBLA_VENDOR=OpenBLAS \ -DBLAS_LIBRARIES="$(pkg-config --libs blas)" \ From 69738f774afc4662bc271669909af581f6c452e1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Feb 2024 21:07:50 -0800 Subject: [PATCH 016/183] src/bin/sage-env [macOS]: Detect ld-classic when full XCode is in use --- src/bin/sage-env | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 8fcfda48fb6..074392150b9 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -373,7 +373,12 @@ if [ -n "$SAGE_LOCAL" ]; then # On OS X, test whether "ld-classic" is present in the installed # version of the command-line tools. If so, we add "-ld_classic" # to LD_FLAGS. See #36599. - if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" ] ; then + # When the full XCode is installed and in use, for example after + # "sudo xcode-select -s /Applications/Xcode.app", then "xcode-select -p" + # gives "/Applications/Xcode.app/Contents/Developer", but "ld-classic" + # is not in the subdirectory "usr/bin/" but rather in the subdirectory + # "Toolchains/XcodeDefault.xctoolchain/usr/bin/". See #37237. + if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" -o -x "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS" else LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" From 4bdc404323cc0b93f11292c69b51c5c252cff22f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 6 Feb 2024 19:12:32 -0800 Subject: [PATCH 017/183] .github/workflows/ci-macos.yml (dist): Do not use tag to bump the version --- .github/workflows/ci-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 1b448c62722..d1a5d62f425 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -91,7 +91,7 @@ jobs: run: | git config --global user.email "nobody@example.com" git config --global user.name "Sage GitHub CI" - SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe --tags) || echo "(ignoring error)" + SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)" - name: make dist run: | ./configure --enable-download-from-upstream-url && make dist From d70aae0fd6f0ddf49d751b9ba14142fbba7a3b38 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 6 Feb 2024 20:55:23 -0800 Subject: [PATCH 018/183] src/bin/sage-env: Do not set the ld-classic flag when LD is set --- src/bin/sage-env | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/sage-env b/src/bin/sage-env index 074392150b9..61901897bcd 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -127,7 +127,7 @@ fi # The compilers are set in order of priority by # 1) environment variables # 2) compiler installed by sage -# 3) compiler set at configuration time +# 3) compiler set at configuration time if [ -z "$CC" ]; then if [ -n "$SAGE_LOCAL" -a -x "$SAGE_LOCAL/bin/gcc" ]; then CC=gcc @@ -378,7 +378,9 @@ if [ -n "$SAGE_LOCAL" ]; then # gives "/Applications/Xcode.app/Contents/Developer", but "ld-classic" # is not in the subdirectory "usr/bin/" but rather in the subdirectory # "Toolchains/XcodeDefault.xctoolchain/usr/bin/". See #37237. - if [ "$UNAME" = "Darwin" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" -o -x "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then + # However, if LD is set explicitly, as it is within conda on macOS, + # do not not do this. + if [ "$UNAME" = "Darwin" ] && [ -z "$LD" ] && [ -x "$(xcode-select -p)/usr/bin/ld-classic" -o -x "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic" ] ; then LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-ld_classic,-rpath,$SAGE_LOCAL/lib $LDFLAGS" else LDFLAGS="-L$SAGE_LOCAL/lib -Wl,-rpath,$SAGE_LOCAL/lib $LDFLAGS" From 83348a2235cd7047926a45c33d8d0828195f358a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Feb 2024 19:53:25 -0800 Subject: [PATCH 019/183] build/pkgs/pyscipopt: Update to 4.4.0 --- build/pkgs/pyscipopt/checksums.ini | 6 +++--- build/pkgs/pyscipopt/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/pyscipopt/checksums.ini b/build/pkgs/pyscipopt/checksums.ini index a7c0dad6706..022bf3873fd 100644 --- a/build/pkgs/pyscipopt/checksums.ini +++ b/build/pkgs/pyscipopt/checksums.ini @@ -1,5 +1,5 @@ tarball=PySCIPOpt_no_C-VERSION.tar.gz -sha1=cd8a7a5ee2f3d72eb0505b050ab8ffcf3acba409 -md5=b8a846432a7a1e6d5c6dcc547e7a6380 -cksum=710591360 +sha1=5ae7f3d7e9d8b344ee9a4413154ae80a5ee137de +md5=32a4dced7e74a1c290b32ef0da751129 +cksum=2258510906 upstream_url=https://github.com/scipopt/PySCIPOpt/archive/refs/tags/vVERSION.tar.gz diff --git a/build/pkgs/pyscipopt/package-version.txt b/build/pkgs/pyscipopt/package-version.txt index 80895903a15..fdc6698807a 100644 --- a/build/pkgs/pyscipopt/package-version.txt +++ b/build/pkgs/pyscipopt/package-version.txt @@ -1 +1 @@ -4.3.0 +4.4.0 From de6e1649f5255d74709d9a55548eb702ef6030a1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Feb 2024 19:58:18 -0800 Subject: [PATCH 020/183] build/pkgs/pyscipopt: Add https://github.com/scipopt/PySCIPOpt/pull/792 as a patch --- build/pkgs/pyscipopt/patches/792.patch | 1217 ++++++++++++++++++++++++ 1 file changed, 1217 insertions(+) create mode 100644 build/pkgs/pyscipopt/patches/792.patch diff --git a/build/pkgs/pyscipopt/patches/792.patch b/build/pkgs/pyscipopt/patches/792.patch new file mode 100644 index 00000000000..faff6076eb4 --- /dev/null +++ b/build/pkgs/pyscipopt/patches/792.patch @@ -0,0 +1,1217 @@ +From 96acc6be39b6d153cfcfe7b14741956eaf7f5851 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Sun, 18 Feb 2024 19:47:52 -0800 +Subject: [PATCH] src/pyscipopt: Add 'noexcept' to functions that use 'with + gil' + +--- + src/pyscipopt/benders.pxi | 30 ++++++++--------- + src/pyscipopt/benderscut.pxi | 14 ++++---- + src/pyscipopt/branchrule.pxi | 18 +++++----- + src/pyscipopt/conshdlr.pxi | 64 ++++++++++++++++++------------------ + src/pyscipopt/cutsel.pxi | 14 ++++---- + src/pyscipopt/event.pxi | 18 +++++----- + src/pyscipopt/heuristic.pxi | 14 ++++---- + src/pyscipopt/nodesel.pxi | 16 ++++----- + src/pyscipopt/presol.pxi | 14 ++++---- + src/pyscipopt/pricer.pxi | 16 ++++----- + src/pyscipopt/propagator.pxi | 22 ++++++------- + src/pyscipopt/reader.pxi | 8 ++--- + src/pyscipopt/relax.pxi | 14 ++++---- + src/pyscipopt/scip.pxd | 2 +- + src/pyscipopt/scip.pxi | 4 +-- + src/pyscipopt/sepa.pxi | 16 ++++----- + 16 files changed, 142 insertions(+), 142 deletions(-) + +diff --git a/src/pyscipopt/benders.pxi b/src/pyscipopt/benders.pxi +index 3e11db189..66a394d8d 100644 +--- a/src/pyscipopt/benders.pxi ++++ b/src/pyscipopt/benders.pxi +@@ -70,10 +70,10 @@ cdef Variable getPyVar(SCIP_VAR* var): + return vardata + + +-cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_Bool threadsafe) with gil: ++cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_Bool threadsafe) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +@@ -81,56 +81,56 @@ cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) with gil: + Py_DECREF(PyBenders) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.bendersinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.bendersexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.bendersinitpre() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.bendersexitpre() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.bendersinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders) with gil: ++cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.bendersexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) with gil: ++cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata + PyBenders.benderscreatesub(probnumber) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* infeasible, SCIP_Bool* auxviol, SCIP_Bool* skipsolve, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* infeasible, SCIP_Bool* auxviol, SCIP_Bool* skipsolve, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +@@ -146,7 +146,7 @@ cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_ + result[0] = result_dict.get("result", result[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +@@ -159,7 +159,7 @@ cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SC + result[0] = result_dict.get("result", result[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +@@ -174,7 +174,7 @@ cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL + + cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, + SCIP_BENDERSENFOTYPE type, int* mergecands, int npriomergecands, int nmergecands, SCIP_Bool checkint, +- SCIP_Bool infeasible, SCIP_Bool* merged) with gil: ++ SCIP_Bool infeasible, SCIP_Bool* merged) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +@@ -190,7 +190,7 @@ cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SO + merged[0] = result_dict.get("merged", False) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) with gil: ++cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +@@ -198,7 +198,7 @@ cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probn + return SCIP_OKAY + + #TODO: Really need to ask about the passing and returning of variables +-cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber) with gil: ++cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber) noexcept with gil: + cdef SCIP_BENDERSDATA* bendersdata + bendersdata = SCIPbendersGetData(benders) + PyBenders = bendersdata +diff --git a/src/pyscipopt/benderscut.pxi b/src/pyscipopt/benderscut.pxi +index 506a6f065..1ce561a06 100644 +--- a/src/pyscipopt/benderscut.pxi ++++ b/src/pyscipopt/benderscut.pxi +@@ -24,10 +24,10 @@ cdef class Benderscut: + print("python error in benderscutexec: this method needs to be implemented") + return {} + +-cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) with gil: ++cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: ++cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: + cdef SCIP_BENDERSCUTDATA* benderscutdata + benderscutdata = SCIPbenderscutGetData(benderscut) + PyBenderscut = benderscutdata +@@ -35,35 +35,35 @@ cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) wit + Py_DECREF(PyBenderscut) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: ++cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: + cdef SCIP_BENDERSCUTDATA* benderscutdata + benderscutdata = SCIPbenderscutGetData(benderscut) + PyBenderscut = benderscutdata + PyBenderscut.benderscutinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: ++cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: + cdef SCIP_BENDERSCUTDATA* benderscutdata + benderscutdata = SCIPbenderscutGetData(benderscut) + PyBenderscut = benderscutdata + PyBenderscut.benderscutexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: ++cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: + cdef SCIP_BENDERSCUTDATA* benderscutdata + benderscutdata = SCIPbenderscutGetData(benderscut) + PyBenderscut = benderscutdata + PyBenderscut.benderscutinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: ++cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: + cdef SCIP_BENDERSCUTDATA* benderscutdata + benderscutdata = SCIPbenderscutGetData(benderscut) + PyBenderscut = benderscutdata + PyBenderscut.benderscutexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BENDERSCUTDATA* benderscutdata + benderscutdata = SCIPbenderscutGetData(benderscut) + PyBenderscut = benderscutdata +diff --git a/src/pyscipopt/branchrule.pxi b/src/pyscipopt/branchrule.pxi +index 251aa33b1..2d3411d2c 100644 +--- a/src/pyscipopt/branchrule.pxi ++++ b/src/pyscipopt/branchrule.pxi +@@ -39,10 +39,10 @@ cdef class Branchrule: + + + +-cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: ++cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: ++cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata +@@ -50,35 +50,35 @@ cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) wit + Py_DECREF(PyBranchrule) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: ++cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata + PyBranchrule.branchinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: ++cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata + PyBranchrule.branchexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: ++cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata + PyBranchrule.branchinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: ++cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata + PyBranchrule.branchexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata +@@ -86,7 +86,7 @@ cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, S + result[0] = result_dict.get("result", result[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata +@@ -94,7 +94,7 @@ cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, S + result[0] = result_dict.get("result", result[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_BRANCHRULEDATA* branchruledata + branchruledata = SCIPbranchruleGetData(branchrule) + PyBranchrule = branchruledata +diff --git a/src/pyscipopt/conshdlr.pxi b/src/pyscipopt/conshdlr.pxi +index 80c60c17c..1299ad35c 100644 +--- a/src/pyscipopt/conshdlr.pxi ++++ b/src/pyscipopt/conshdlr.pxi +@@ -150,16 +150,16 @@ cdef Constraint getPyCons(SCIP_CONS* cons): + + + +-cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid) with gil: ++cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) with gil: ++cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyConshdlr.consfree() + Py_DECREF(PyConshdlr) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: ++cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -167,7 +167,7 @@ cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** c + PyConshdlr.consinit(constraints) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: ++cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -175,7 +175,7 @@ cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** c + PyConshdlr.consexit(constraints) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: ++cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -183,7 +183,7 @@ cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + PyConshdlr.consinitpre(constraints) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: ++cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -191,7 +191,7 @@ cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + PyConshdlr.consexitpre(constraints) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: ++cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -199,7 +199,7 @@ cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + PyConshdlr.consinitsol(constraints) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) with gil: ++cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -207,7 +207,7 @@ cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + PyConshdlr.consexitsol(constraints, restart) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata) with gil: ++cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + assert consdata[0] == PyCons +@@ -216,7 +216,7 @@ cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + Py_DECREF(PyCons) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons) with gil: ++cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons) noexcept with gil: + cdef Constraint PyTargetCons + PyConshdlr = getPyConshdlr(conshdlr) + PySourceCons = getPyCons(sourcecons) +@@ -235,7 +235,7 @@ cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* s + PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) with gil: ++cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -244,7 +244,7 @@ cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + infeasible[0] = result_dict.get("infeasible", infeasible[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -254,7 +254,7 @@ cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, +- SCIP_SOL* sol, SCIP_RESULT* result) with gil: ++ SCIP_SOL* sol, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -265,7 +265,7 @@ cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, +- SCIP_Bool solinfeasible, SCIP_RESULT* result) with gil: ++ SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -274,7 +274,7 @@ cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + result[0] = result_dict.get("result", result[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -285,7 +285,7 @@ cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* con + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, +- SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) with gil: ++ SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -295,7 +295,7 @@ cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, +- SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) with gil: ++ SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -306,7 +306,7 @@ cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, +- SCIP_PROPTIMING proptiming, SCIP_RESULT* result) with gil: ++ SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -319,7 +319,7 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, + int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, + int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, +- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: ++ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -354,12 +354,12 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, +- SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) with gil: ++ SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyConshdlr.consresprop() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg) with gil: ++cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + if cons == NULL: + PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) +@@ -368,31 +368,31 @@ cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* co + PyConshdlr.conslock(PyCons, locktype, nlockspos, nlocksneg) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: ++cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + PyConshdlr.consactive(PyCons) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: ++cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + PyConshdlr.consdeactive(PyCons) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: ++cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + PyConshdlr.consenable(PyCons) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: ++cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + PyConshdlr.consdisable(PyCons) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: ++cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + cdef constraints = [] + for i in range(nconss): +@@ -400,7 +400,7 @@ cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + PyConshdlr.consdelvars(constraints) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file) with gil: ++cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + # TODO: pass file +@@ -411,7 +411,7 @@ cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SC + SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_Bool initial, + SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, + SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, +- SCIP_Bool isglobal, SCIP_Bool* valid) with gil: ++ SCIP_Bool isglobal, SCIP_Bool* valid) noexcept with gil: + # TODO everything! + PyConshdlr = getPyConshdlr(sourceconshdlr) + PyConshdlr.conscopy() +@@ -421,14 +421,14 @@ cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SC + cdef SCIP_RETCODE PyConsParse (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, const char* name, const char* str, + SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, + SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, +- SCIP_Bool stickingatnode, SCIP_Bool* success) with gil: ++ SCIP_Bool stickingatnode, SCIP_Bool* success) noexcept with gil: + # TODO everything! + PyConshdlr = getPyConshdlr(conshdlr) + PyConshdlr.consparse() + success[0] = False + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success) with gil: ++cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success) noexcept with gil: + # TODO + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) +@@ -436,7 +436,7 @@ cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* + success[0] = False + return SCIP_OKAY + +-cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success) with gil: ++cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success) noexcept with gil: + PyConshdlr = getPyConshdlr(conshdlr) + PyCons = getPyCons(cons) + result_dict = PyConshdlr.consgetnvars(PyCons) +@@ -445,7 +445,7 @@ cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS + return SCIP_OKAY + + cdef SCIP_RETCODE PyConsGetdivebdchgs (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, +- SCIP_Bool* success, SCIP_Bool* infeasible) with gil: ++ SCIP_Bool* success, SCIP_Bool* infeasible) noexcept with gil: + # TODO + PyConshdlr = getPyConshdlr(conshdlr) + PyConshdlr.consgetdivebdchgs() +diff --git a/src/pyscipopt/cutsel.pxi b/src/pyscipopt/cutsel.pxi +index e953cb1e9..d259fb28e 100644 +--- a/src/pyscipopt/cutsel.pxi ++++ b/src/pyscipopt/cutsel.pxi +@@ -29,10 +29,10 @@ cdef class Cutsel: + return {} + + +-cdef SCIP_RETCODE PyCutselCopy (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: ++cdef SCIP_RETCODE PyCutselCopy (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: ++cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: + cdef SCIP_CUTSELDATA* cutseldata + cutseldata = SCIPcutselGetData(cutsel) + PyCutsel = cutseldata +@@ -40,7 +40,7 @@ cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: + Py_DECREF(PyCutsel) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: ++cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: + cdef SCIP_CUTSELDATA* cutseldata + cutseldata = SCIPcutselGetData(cutsel) + PyCutsel = cutseldata +@@ -48,21 +48,21 @@ cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: + return SCIP_OKAY + + +-cdef SCIP_RETCODE PyCutselExit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: ++cdef SCIP_RETCODE PyCutselExit (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: + cdef SCIP_CUTSELDATA* cutseldata + cutseldata = SCIPcutselGetData(cutsel) + PyCutsel = cutseldata + PyCutsel.cutselexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyCutselInitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: ++cdef SCIP_RETCODE PyCutselInitsol (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: + cdef SCIP_CUTSELDATA* cutseldata + cutseldata = SCIPcutselGetData(cutsel) + PyCutsel = cutseldata + PyCutsel.cutselinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: ++cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: + cdef SCIP_CUTSELDATA* cutseldata + cutseldata = SCIPcutselGetData(cutsel) + PyCutsel = cutseldata +@@ -71,7 +71,7 @@ cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: + + cdef SCIP_RETCODE PyCutselSelect (SCIP* scip, SCIP_CUTSEL* cutsel, SCIP_ROW** cuts, int ncuts, + SCIP_ROW** forcedcuts, int nforcedcuts, SCIP_Bool root, int maxnselectedcuts, +- int* nselectedcuts, SCIP_RESULT* result) with gil: ++ int* nselectedcuts, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_CUTSELDATA* cutseldata + cdef SCIP_ROW* scip_row + cutseldata = SCIPcutselGetData(cutsel) +diff --git a/src/pyscipopt/event.pxi b/src/pyscipopt/event.pxi +index 95c8bc1f4..914e882ed 100644 +--- a/src/pyscipopt/event.pxi ++++ b/src/pyscipopt/event.pxi +@@ -39,48 +39,48 @@ cdef class Eventhdlr: + + + # local helper functions for the interface +-cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + cdef SCIP_EVENTHDLRDATA* eventhdlrdata + eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) + return eventhdlrdata + +-cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventcopy() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventfree() + Py_DECREF(PyEventhdlr) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: ++cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata) with gil: ++cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEventhdlr.eventdelete() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata) with gil: ++cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata) noexcept with gil: + PyEventhdlr = getPyEventhdlr(eventhdlr) + PyEvent = Event() + PyEvent.event = event +diff --git a/src/pyscipopt/heuristic.pxi b/src/pyscipopt/heuristic.pxi +index 2980a1aee..930315630 100644 +--- a/src/pyscipopt/heuristic.pxi ++++ b/src/pyscipopt/heuristic.pxi +@@ -31,10 +31,10 @@ cdef class Heur: + + + +-cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) with gil: ++cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) with gil: ++cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: + cdef SCIP_HEURDATA* heurdata + heurdata = SCIPheurGetData(heur) + PyHeur = heurdata +@@ -42,35 +42,35 @@ cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) with gil: + Py_DECREF(PyHeur) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) with gil: ++cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: + cdef SCIP_HEURDATA* heurdata + heurdata = SCIPheurGetData(heur) + PyHeur = heurdata + PyHeur.heurinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) with gil: ++cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: + cdef SCIP_HEURDATA* heurdata + heurdata = SCIPheurGetData(heur) + PyHeur = heurdata + PyHeur.heurexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) with gil: ++cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: + cdef SCIP_HEURDATA* heurdata + heurdata = SCIPheurGetData(heur) + PyHeur = heurdata + PyHeur.heurinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) with gil: ++cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: + cdef SCIP_HEURDATA* heurdata + heurdata = SCIPheurGetData(heur) + PyHeur = heurdata + PyHeur.heurexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_HEURDATA* heurdata + heurdata = SCIPheurGetData(heur) + PyHeur = heurdata +diff --git a/src/pyscipopt/nodesel.pxi b/src/pyscipopt/nodesel.pxi +index 4d795bc9d..a3e832f15 100644 +--- a/src/pyscipopt/nodesel.pxi ++++ b/src/pyscipopt/nodesel.pxi +@@ -42,10 +42,10 @@ cdef class Nodesel: + return 0 + + +-cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) with gil: ++cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) with gil: ++cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata +@@ -53,7 +53,7 @@ cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) with gil: + Py_DECREF(PyNodesel) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: ++cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata +@@ -61,28 +61,28 @@ cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: + return SCIP_OKAY + + +-cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: ++cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata + PyNodesel.nodeexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) with gil: ++cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata + PyNodesel.nodeinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) with gil: ++cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata + PyNodesel.nodeexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) with gil: ++cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata +@@ -91,7 +91,7 @@ cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* + selnode[0] = selected_node.scip_node + return SCIP_OKAY + +-cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) with gil: ++cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) noexcept with gil: + cdef SCIP_NODESELDATA* nodeseldata + nodeseldata = SCIPnodeselGetData(nodesel) + PyNodesel = nodeseldata +diff --git a/src/pyscipopt/presol.pxi b/src/pyscipopt/presol.pxi +index d2b9115a5..13bd9a623 100644 +--- a/src/pyscipopt/presol.pxi ++++ b/src/pyscipopt/presol.pxi +@@ -30,10 +30,10 @@ cdef class Presol: + + + +-cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol) with gil: ++cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) with gil: ++cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: + cdef SCIP_PRESOLDATA* presoldata + presoldata = SCIPpresolGetData(presol) + PyPresol = presoldata +@@ -41,14 +41,14 @@ cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) with gil: + Py_DECREF(PyPresol) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol) with gil: ++cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: + cdef SCIP_PRESOLDATA* presoldata + presoldata = SCIPpresolGetData(presol) + PyPresol = presoldata + PyPresol.presolinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) with gil: ++cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: + cdef SCIP_PRESOLDATA* presoldata + presoldata = SCIPpresolGetData(presol) + PyPresol = presoldata +@@ -56,14 +56,14 @@ cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) with gil: + return SCIP_OKAY + + +-cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol) with gil: ++cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: + cdef SCIP_PRESOLDATA* presoldata + presoldata = SCIPpresolGetData(presol) + PyPresol = presoldata + PyPresol.presolinitpre() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol) with gil: ++cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: + cdef SCIP_PRESOLDATA* presoldata + presoldata = SCIPpresolGetData(presol) + PyPresol = presoldata +@@ -74,7 +74,7 @@ cdef SCIP_RETCODE PyPresolExec (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SC + int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, + int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, + int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, +- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: ++ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_PRESOLDATA* presoldata + presoldata = SCIPpresolGetData(presol) + PyPresol = presoldata +diff --git a/src/pyscipopt/pricer.pxi b/src/pyscipopt/pricer.pxi +index 1368572de..a218b254c 100644 +--- a/src/pyscipopt/pricer.pxi ++++ b/src/pyscipopt/pricer.pxi +@@ -33,10 +33,10 @@ cdef class Pricer: + + + +-cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid) with gil: ++cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) with gil: ++cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata +@@ -44,35 +44,35 @@ cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) with gil: + Py_DECREF(PyPricer) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer) with gil: ++cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata + PyPricer.pricerinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer) with gil: ++cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata + PyPricer.pricerexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer) with gil: ++cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata + PyPricer.pricerinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer) with gil: ++cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata + PyPricer.pricerexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata +@@ -82,7 +82,7 @@ cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* l + stopearly[0] = result_dict.get("stopearly", stopearly[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_PRICERDATA* pricerdata + pricerdata = SCIPpricerGetData(pricer) + PyPricer = pricerdata +diff --git a/src/pyscipopt/propagator.pxi b/src/pyscipopt/propagator.pxi +index d792577d9..4508efe78 100644 +--- a/src/pyscipopt/propagator.pxi ++++ b/src/pyscipopt/propagator.pxi +@@ -47,10 +47,10 @@ cdef class Prop: + + + +-cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata +@@ -58,42 +58,42 @@ cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) with gil: + Py_DECREF(PyProp) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata + PyProp.propinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata + PyProp.propexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata + PyProp.propinitpre() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata + PyProp.propexitpre() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop) with gil: ++cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata + PyProp.propinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart) with gil: ++cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata +@@ -104,7 +104,7 @@ cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_P + int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, + int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, + int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, +- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: ++ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata +@@ -137,7 +137,7 @@ cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_P + nchgsides[0] = result_dict["nchgsides"] + return SCIP_OKAY + +-cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_PROPDATA* propdata + propdata = SCIPpropGetData(prop) + PyProp = propdata +@@ -147,7 +147,7 @@ cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING propt + return SCIP_OKAY + + cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo, +- SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) with gil: ++ SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_PROPDATA* propdata + cdef SCIP_VAR* tmp + tmp = infervar +diff --git a/src/pyscipopt/reader.pxi b/src/pyscipopt/reader.pxi +index df0b3a288..2c45585d6 100644 +--- a/src/pyscipopt/reader.pxi ++++ b/src/pyscipopt/reader.pxi +@@ -18,10 +18,10 @@ cdef class Reader: + return {} + + +-cdef SCIP_RETCODE PyReaderCopy (SCIP* scip, SCIP_READER* reader) with gil: ++cdef SCIP_RETCODE PyReaderCopy (SCIP* scip, SCIP_READER* reader) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) with gil: ++cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) noexcept with gil: + cdef SCIP_READERDATA* readerdata + readerdata = SCIPreaderGetData(reader) + PyReader = readerdata +@@ -29,7 +29,7 @@ cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) with gil: + Py_DECREF(PyReader) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_READERDATA* readerdata + readerdata = SCIPreaderGetData(reader) + PyReader = readerdata +@@ -44,7 +44,7 @@ cdef SCIP_RETCODE PyReaderWrite (SCIP* scip, SCIP_READER* reader, FILE* file, + SCIP_VAR** vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, + SCIP_VAR** fixedvars, int nfixedvars, int startnvars, + SCIP_CONS** conss, int nconss, int maxnconss, int startnconss, +- SCIP_Bool genericnames, SCIP_RESULT* result) with gil: ++ SCIP_Bool genericnames, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_READERDATA* readerdata + readerdata = SCIPreaderGetData(reader) + cdef int fd = fileno(file) +diff --git a/src/pyscipopt/relax.pxi b/src/pyscipopt/relax.pxi +index 2b52c2643..81695e8bb 100644 +--- a/src/pyscipopt/relax.pxi ++++ b/src/pyscipopt/relax.pxi +@@ -30,10 +30,10 @@ cdef class Relax: + return{} + + +-cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) with gil: ++cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) with gil: ++cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: + cdef SCIP_RELAXDATA* relaxdata + relaxdata = SCIPrelaxGetData(relax) + PyRelax = relaxdata +@@ -41,35 +41,35 @@ cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) with gil: + Py_DECREF(PyRelax) + return SCIP_OKAY + +-cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax) with gil: ++cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: + cdef SCIP_RELAXDATA* relaxdata + relaxdata = SCIPrelaxGetData(relax) + PyRelax = relaxdata + PyRelax.relaxinit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax) with gil: ++cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: + cdef SCIP_RELAXDATA* relaxdata + relaxdata = SCIPrelaxGetData(relax) + PyRelax = relaxdata + PyRelax.relaxexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax) with gil: ++cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: + cdef SCIP_RELAXDATA* relaxdata + relaxdata = SCIPrelaxGetData(relax) + PyRelax = relaxdata + PyRelax.relaxinitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax) with gil: ++cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: + cdef SCIP_RELAXDATA* relaxdata + relaxdata = SCIPrelaxGetData(relax) + PyRelax = relaxdata + PyRelax.relaxexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result) with gil: ++cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result) noexcept with gil: + cdef SCIP_RELAXDATA* relaxdata + relaxdata = SCIPrelaxGetData(relax) + PyRelax = relaxdata +diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd +index 12815dbc4..f35a42486 100644 +--- a/src/pyscipopt/scip.pxd ++++ b/src/pyscipopt/scip.pxd +@@ -501,7 +501,7 @@ cdef extern from "scip/scip.h": + ctypedef union SCIP_DOMCHG: + pass + +- ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) ++ ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept + ctypedef void (*errormessagecallback) (void *data, FILE *file, const char *msg) + ctypedef SCIP_RETCODE (*messagehdlrfree) (SCIP_MESSAGEHDLR *messagehdlr) + +diff --git a/src/pyscipopt/scip.pxi b/src/pyscipopt/scip.pxi +index 0b2332d88..552197785 100644 +--- a/src/pyscipopt/scip.pxi ++++ b/src/pyscipopt/scip.pxi +@@ -975,10 +975,10 @@ cdef class Constraint: + and self.scip_cons == (other).scip_cons) + + +-cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg): ++cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept: + sys.stdout.write(msg.decode('UTF-8')) + +-cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): ++cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg) noexcept: + sys.stderr.write(msg.decode('UTF-8')) + + # - remove create(), includeDefaultPlugins(), createProbBasic() methods +diff --git a/src/pyscipopt/sepa.pxi b/src/pyscipopt/sepa.pxi +index 271945db1..94355a7d2 100644 +--- a/src/pyscipopt/sepa.pxi ++++ b/src/pyscipopt/sepa.pxi +@@ -34,10 +34,10 @@ cdef class Sepa: + + + +-cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa) with gil: ++cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) with gil: ++cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + PySepa = sepadata +@@ -45,35 +45,35 @@ cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) with gil: + Py_DECREF(PySepa) + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa) with gil: ++cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + PySepa = sepadata + PySepa.sepainit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa) with gil: ++cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + PySepa = sepadata + PySepa.sepaexit() + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa) with gil: ++cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + PySepa = sepadata + PySepa.sepainitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa) with gil: ++cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + PySepa = sepadata + PySepa.sepaexitsol() + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal, int depth) with gil: ++cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal, int depth) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + PySepa = sepadata +@@ -81,7 +81,7 @@ cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result + result[0] = result_dict.get("result", result[0]) + return SCIP_OKAY + +-cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal, int depth) with gil: ++cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal, int depth) noexcept with gil: + cdef SCIP_SEPADATA* sepadata + sepadata = SCIPsepaGetData(sepa) + solution = Solution.create(scip, sol) From 22fdd8cfe8a7d7b84e686a522acb7eba6bdc324a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Feb 2024 23:11:11 -0800 Subject: [PATCH 021/183] build/pkgs/pyscipopt: Fix upstream_url --- build/pkgs/pyscipopt/SPKG.rst | 4 ---- build/pkgs/pyscipopt/checksums.ini | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/build/pkgs/pyscipopt/SPKG.rst b/build/pkgs/pyscipopt/SPKG.rst index 28d6ee75aaa..555866ee6bd 100644 --- a/build/pkgs/pyscipopt/SPKG.rst +++ b/build/pkgs/pyscipopt/SPKG.rst @@ -16,7 +16,3 @@ Upstream Contact https://pypi.org/project/PySCIPOpt/ -Dependencies ------------- - -scipoptsuite diff --git a/build/pkgs/pyscipopt/checksums.ini b/build/pkgs/pyscipopt/checksums.ini index 022bf3873fd..5b537d4c57d 100644 --- a/build/pkgs/pyscipopt/checksums.ini +++ b/build/pkgs/pyscipopt/checksums.ini @@ -1,5 +1,5 @@ -tarball=PySCIPOpt_no_C-VERSION.tar.gz +tarball=PySCIPOpt-VERSION.tar.gz sha1=5ae7f3d7e9d8b344ee9a4413154ae80a5ee137de md5=32a4dced7e74a1c290b32ef0da751129 cksum=2258510906 -upstream_url=https://github.com/scipopt/PySCIPOpt/archive/refs/tags/vVERSION.tar.gz +upstream_url=https://pypi.io/packages/source/p/pyscipopt/PySCIPOpt-VERSION.tar.gz From c6a82b717ab34245a0011367c8e2ce5acd25deb8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 19 Feb 2024 22:09:03 -0800 Subject: [PATCH 022/183] .github/workflows/macos.yml: Pass inputs.extra_sage_packages to tox --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7344d839620..ccba31a3dcc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -144,7 +144,7 @@ jobs: ;; esac (sleep ${{ inputs.timeout }}; pkill make) & - MAKE="make -j12" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS + MAKE="make -j12" EXTRA_SAGE_PACKAGES="${{ inputs.extra_sage_packages }}" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - name: Prepare logs artifact run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" From 40f4d9b27a1abe6fff3fd316f7c65d90491a670f Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 15:06:26 +0000 Subject: [PATCH 023/183] Add fast pow for NTL polynomials over extensions --- .../rings/polynomial/polynomial_zz_pex.pxd | 3 +- .../rings/polynomial/polynomial_zz_pex.pyx | 92 ++++++++++++++++++- 2 files changed, 93 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pxd b/src/sage/rings/polynomial/polynomial_zz_pex.pxd index ca60398ef68..809bb45300f 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pxd +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pxd @@ -1,5 +1,6 @@ from sage.libs.ntl.ZZ_pEX cimport ZZ_pEX_c from sage.libs.ntl.ntl_ZZ_pEContext cimport ZZ_pEContext_ptrs +from sage.rings.integer cimport Integer ctypedef ZZ_pEX_c celement ctypedef ZZ_pEContext_ptrs *cparent @@ -7,5 +8,5 @@ ctypedef ZZ_pEContext_ptrs *cparent include "polynomial_template_header.pxi" cdef class Polynomial_ZZ_pEX(Polynomial_template): - pass + cdef _powmod_bigexp(Polynomial_ZZ_pEX self, Integer exp, Polynomial_ZZ_pEX modulus) diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 295bc4fccbe..b2a62635f77 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -20,7 +20,10 @@ from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class from sage.libs.ntl.ZZ_pE cimport ZZ_pE_to_ZZ_pX from sage.libs.ntl.ZZ_pX cimport ZZ_pX_deg, ZZ_pX_coeff from sage.libs.ntl.ZZ_p cimport ZZ_p_rep -from sage.libs.ntl.convert cimport ZZ_to_mpz +from sage.libs.ntl.convert cimport ZZ_to_mpz, mpz_to_ZZ + +from sage.structure.element import have_same_parent +from sage.structure.element import canonical_coercion # We need to define this stuff before including the templating stuff # to make sure the function get_cparent is found since it is used in @@ -616,3 +619,90 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): ZZ_pEX_InvTrunc(r.x, self.x, prec) sig_off() return r + + def __pow__(self, exp, modulus): + r""" + Exponentiation of polynomials over extension fields. + + EXAMPLES:: + + sage: K. = GF(101^2, 'a', modulus=[1,1,1]) + sage: R. = PolynomialRing(K, implementation="NTL") + sage: pow(x, 100) + x^100 + sage: pow(x + 3, 5) + x^5 + 15*x^4 + 90*x^3 + 68*x^2 + x + 41 + + If modulus is not None, performs modular exponentiation:: + + sage: K. = GF(101^2, 'a', modulus=[1,1,1]) + sage: R. = PolynomialRing(K, implementation="NTL") + sage: pow(x, 100, x^2 + x + a) + (19*a + 64)*x + 30*a + 2 + sage: pow(x, 100 * 101**200, x^2 + x + a) + (19*a + 64)*x + 30*a + 2 + + The modulus can have smaller degree than ``self``:: + + sage: K. = GF(101^2, 'a', modulus=[1,1,1]) + sage: R. = PolynomialRing(K, implementation="NTL") + sage: pow(x^4, 25, x^2 + x + a) + (19*a + 64)*x + 30*a + 2 + + TESTS:: + + Canonical coercion should apply:: + + sage: xx = GF(101)["x"].gen() + sage: pow(x+1, 25, 2) + 0 + sage: pow(x + a, 101**2, xx^3 + xx + 1) + 4*x^2 + 44*x + a + 70 + sage: pow(x + a, int(101**2), xx^3 + xx + 1) + 4*x^2 + 44*x + a + 70 + sage: xx = polygen(GF(97)) + sage: _ = pow(x + a, 101**2, xx^3 + xx + 1) + Traceback (most recent call last): + ... + TypeError: no common canonical parent for objects with parents: ... + """ + exp = Integer(exp) + if modulus is not None: + # Similar to coerce_binop + if not have_same_parent(self, modulus): + a, m = canonical_coercion(self, modulus) + if a is not self: + return pow(a, exp, m) + modulus = m + self = self % modulus + if exp > 0 and exp.bit_length() >= 32: + return (self)._powmod_bigexp(Integer(exp), modulus) + return Polynomial_template.__pow__(self, exp, modulus) + + cdef _powmod_bigexp(Polynomial_ZZ_pEX self, Integer exp, Polynomial_ZZ_pEX modulus): + """ + Modular exponentiation for large exponents. + """ + self._parent._modulus.restore() + cdef Polynomial_ZZ_pEX r + cdef ZZ_c e_ZZ + cdef ZZ_pEX_c y + cdef ZZ_pEX_Modulus_c mod + + mpz_to_ZZ(&e_ZZ, exp.value) + r = Polynomial_ZZ_pEX.__new__(Polynomial_ZZ_pEX) + celement_construct(&r.x, (self)._cparent) + r._parent = (self)._parent + r._cparent = (self)._cparent + ZZ_pEX_Modulus_build(mod, modulus.x) + + sig_on() + if ZZ_pEX_IsX(self.x): + ZZ_pEX_PowerXMod_ZZ_pre(r.x, e_ZZ, mod) + elif ZZ_pEX_deg(self.x) < ZZ_pEX_deg(modulus.x): + ZZ_pEX_PowerMod_ZZ_pre(r.x, self.x, e_ZZ, mod) + else: + ZZ_pEX_rem_pre(y, self.x, mod) + ZZ_pEX_PowerMod_ZZ_pre(r.x, y, e_ZZ, mod) + sig_off() + return r From 9331b5fcb0ec68c7b4ab5bf86e077b9771daaf07 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 15:07:49 +0000 Subject: [PATCH 024/183] Fix linting --- src/sage/rings/polynomial/polynomial_zz_pex.pxd | 1 - src/sage/rings/polynomial/polynomial_zz_pex.pyx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pxd b/src/sage/rings/polynomial/polynomial_zz_pex.pxd index 809bb45300f..b3cd775542e 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pxd +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pxd @@ -9,4 +9,3 @@ include "polynomial_template_header.pxi" cdef class Polynomial_ZZ_pEX(Polynomial_template): cdef _powmod_bigexp(Polynomial_ZZ_pEX self, Integer exp, Polynomial_ZZ_pEX modulus) - diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index b2a62635f77..2b1b4bc9395 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -678,7 +678,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): if exp > 0 and exp.bit_length() >= 32: return (self)._powmod_bigexp(Integer(exp), modulus) return Polynomial_template.__pow__(self, exp, modulus) - + cdef _powmod_bigexp(Polynomial_ZZ_pEX self, Integer exp, Polynomial_ZZ_pEX modulus): """ Modular exponentiation for large exponents. From 7eca602c942b18b79e082fe15d83175346551716 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 15:26:45 +0000 Subject: [PATCH 025/183] update docstring --- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 2b1b4bc9395..97b99883ec5 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -22,8 +22,7 @@ from sage.libs.ntl.ZZ_pX cimport ZZ_pX_deg, ZZ_pX_coeff from sage.libs.ntl.ZZ_p cimport ZZ_p_rep from sage.libs.ntl.convert cimport ZZ_to_mpz, mpz_to_ZZ -from sage.structure.element import have_same_parent -from sage.structure.element import canonical_coercion +from sage.structure.element import have_same_parent, canonical_coercion # We need to define this stuff before including the templating stuff # to make sure the function get_cparent is found since it is used in @@ -624,6 +623,9 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): r""" Exponentiation of polynomials over extension fields. + If ``modulus`` is not ``None``, the exponentiation is performed + modulo the polynomial ``modulus``. + EXAMPLES:: sage: K. = GF(101^2, 'a', modulus=[1,1,1]) From 2750aeebaebcc8be9cb4d4e18928a84354844bee Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 15:29:47 +0000 Subject: [PATCH 026/183] add fast modular exponentiation for polynomial rings over Z/NZ --- src/sage/libs/ntl/ntl_ZZ_pX.pxd | 3 + src/sage/libs/ntl/ntl_ZZ_pX.pyx | 60 +++++++++++- .../polynomial/polynomial_modn_dense_ntl.pyx | 93 ++++++++++++++++--- 3 files changed, 142 insertions(+), 14 deletions(-) diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pxd b/src/sage/libs/ntl/ntl_ZZ_pX.pxd index 38792bca2d1..c7132de6eff 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pxd @@ -1,5 +1,6 @@ from sage.libs.ntl.ZZ_pX cimport * from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class +from sage.rings.integer cimport Integer cdef class ntl_ZZ_pX(): cdef ZZ_pX_c x @@ -7,6 +8,8 @@ cdef class ntl_ZZ_pX(): cdef void setitem_from_int(ntl_ZZ_pX self, long i, int value) noexcept cdef int getitem_as_int(ntl_ZZ_pX self, long i) noexcept cdef ntl_ZZ_pX _new(self) noexcept + cpdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, exp) + cpdef ntl_ZZ_pX _powmod(ntl_ZZ_pX self, Integer exp, ntl_ZZ_pX modulus) cdef class ntl_ZZ_pX_Modulus(): cdef ZZ_pX_Modulus_c x diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pyx b/src/sage/libs/ntl/ntl_ZZ_pX.pyx index 3422239aaac..4a5ef4eee79 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pyx @@ -29,6 +29,7 @@ include 'decl.pxi' from cpython.object cimport Py_EQ, Py_NE from sage.cpython.string cimport char_to_str from sage.rings.integer cimport Integer +from sage.libs.ntl.convert cimport PyLong_to_ZZ from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ from sage.libs.ntl.ntl_ZZ_p cimport ntl_ZZ_p from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class @@ -489,23 +490,78 @@ cdef class ntl_ZZ_pX(): sig_off() return r - def __pow__(ntl_ZZ_pX self, long n, ignored): + def __pow__(self, n, modulus): """ Return the n-th nonnegative power of self. + If ``modulus`` is not ``None``, the exponentiation is performed + modulo the polynomial ``modulus``. + EXAMPLES:: sage: c = ntl.ZZ_pContext(20) sage: g = ntl.ZZ_pX([-1,0,1],c) sage: g**10 [1 0 10 0 5 0 0 0 10 0 8 0 10 0 0 0 5 0 10 0 1] + + sage: x = ntl.ZZ_pX([0,1],c) + sage: x**10 + [0 0 0 0 0 0 0 0 0 0 1] + + Modular exponentiation:: + + sage: c = ntl.ZZ_pContext(20) + sage: f = ntl.ZZ_pX([1,0,1],c) + sage: m = ntl.ZZ_pX([1,0,0,0,0,1],c) + sage: pow(f, 123**45, m) + [1 19 3 0 3] + + Modular exponentiation of ``x``:: + + sage: f = ntl.ZZ_pX([0,1],c) + sage: f.is_x() + True + sage: m = ntl.ZZ_pX([1,1,0,0,0,1],c) + sage: pow(f, 123**45, m) + [15 5 5 11] + """ + if modulus is None: + return self._pow(n) + else: + return self._powmod(Integer(n), modulus) + + cpdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, n): + """ + Compute the n-th power of self. """ if n < 0: raise NotImplementedError + cdef long ln = n #self.c.restore_c() # restored in _new() cdef ntl_ZZ_pX r = self._new() + if self.is_x() and n >= 1: + ZZ_pX_LeftShift(r.x, self.x, n-1) + else: + sig_on() + ZZ_pX_power(r.x, self.x, ln) + sig_off() + return r + + cpdef ntl_ZZ_pX _powmod(ntl_ZZ_pX self, Integer n, ntl_ZZ_pX modulus): + r""" + Compute the n-th power of self modulo a polynomial. + """ + cdef ntl_ZZ_pX r = self._new() + cdef ZZ_c n_ZZ + cdef ZZ_pX_Modulus_c mod + is_x = self.is_x() sig_on() - ZZ_pX_power(r.x, self.x, n) + mpz_to_ZZ(&n_ZZ, (n).value) + ZZ_pX_Modulus_build(mod, modulus.x) + if is_x: + ZZ_pX_PowerXMod_pre(r.x, n_ZZ, mod) + else: + ZZ_pX_PowerMod_pre(r.x, self.x, n_ZZ, mod) sig_off() return r diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index 65bd584d9ea..a646e3324e4 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -49,7 +49,7 @@ from sage.rings.infinity import infinity from sage.interfaces.singular import singular as singular_default -from sage.structure.element import coerce_binop +from sage.structure.element import canonical_coercion, coerce_binop, have_same_parent from sage.libs.ntl.types cimport NTL_SP_BOUND from sage.libs.ntl.ZZ_p cimport * @@ -211,15 +211,6 @@ cdef class Polynomial_dense_mod_n(Polynomial): raise IndexError("n must be >= 0") self._poly[n] = int(value) - def _pow(self, n): - n = int(n) - - if self.degree() <= 0: - return self.parent()(self[0]**n) - if n < 0: - return (~self)**(-n) - return self.parent()(self._poly**n, construct=True) - cpdef _add_(self, right) noexcept: return self.parent()(self._poly + (right)._poly, construct=True) @@ -845,7 +836,7 @@ cdef class Polynomial_dense_modn_ntl_zz(Polynomial_dense_mod_n): return r def __pow__(Polynomial_dense_modn_ntl_zz self, ee, modulus): - """ + r""" TESTS:: sage: R. = PolynomialRing(Integers(100), implementation='NTL') @@ -871,7 +862,6 @@ cdef class Polynomial_dense_modn_ntl_zz(Polynomial_dense_mod_n): sage: R. = PolynomialRing(Integers(100), implementation='NTL') sage: type(R(0)^0) == type(R(0)) True - """ cdef bint recip = 0, do_sig cdef long e = ee @@ -1793,6 +1783,85 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): A dense polynomial over the integers modulo `p`, where `p` is prime. """ + def __pow__(self, n, modulus): + """ + Exponentiation of polynomials over extension fields. + + If ``modulus`` is not ``None``, the exponentiation is performed + modulo the polynomial ``modulus``. + + EXAMPLES:: + + sage: R. = PolynomialRing(Integers(101), implementation='NTL') + sage: (x-1)^5 + x^5 + 96*x^4 + 10*x^3 + 91*x^2 + 5*x + 100 + sage: pow(x-1, 15, x^3+x+1) + 55*x^2 + 6*x + 46 + + TESTS:: + + Negative powers will not work:: + + sage: R. = PolynomialRing(Integers(101), implementation='NTL') + sage: (x-1)^(-5) + Traceback (most recent call last): + ... + NotImplementedError: Fraction fields not implemented for this type. + + We define ``0^0`` to be unity, :trac:`13895`:: + + sage: R. = PolynomialRing(Integers(101), implementation='NTL') + sage: R(0)^0 + 1 + + The value returned from ``0^0`` should belong to our ring:: + + sage: R. = PolynomialRing(Integers(101), implementation='NTL') + sage: type(R(0)^0) == type(R(0)) + True + + The modulus can have smaller degree than ``self``:: + + sage: R. = PolynomialRing(GF(101), implementation="NTL") + sage: pow(x^4 + 1, 100, x^2 + x + 1) + 100*x + 100 + + Canonical coercion should apply:: + + sage: R. = PolynomialRing(GF(101), implementation="FLINT") + sage: x_ZZ = ZZ["x"].gen() + sage: pow(x+1, 100, 2) + 0 + sage: pow(x+1, 100, x_ZZ^2 + x_ZZ + 1) + 100*x + 100 + sage: pow(x+1, int(100), x_ZZ^2 + x_ZZ + 1) + 100*x + 100 + sage: xx = polygen(GF(97)) + sage: _ = pow(x + 1, 3, xx^3 + xx + 1) + Traceback (most recent call last): + ... + TypeError: no canonical coercion from Univariate Polynomial Ring in x over Finite Field of size 97 to Univariate Polynomial Ring in x over Finite Field of size 101 + """ + n = Integer(n) + parent = (self)._parent + + if modulus is not None: + # Similar to coerce_binop + if not have_same_parent(self, modulus): + a, m = canonical_coercion(self, modulus) + if a is not self: + return pow(a, n, m) + modulus = m + self = self % modulus + return parent(pow(self.ntl_ZZ_pX(), n, modulus.ntl_ZZ_pX()), construct=True) + else: + if n < 0: + return ~(self**(-n)) + elif self.degree() <= 0: + return parent(self[0]**n) + else: + return parent(self.ntl_ZZ_pX()**n, construct=True) + @coerce_binop def gcd(self, right): """ From 68c1f10a6b58ac787b1bb2b61e08c189c9cc4410 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 23 Feb 2024 15:45:25 +0000 Subject: [PATCH 027/183] fast pow mod for flint Z/NZ --- .../polynomial/polynomial_modn_dense_ntl.pyx | 4 +- .../polynomial/polynomial_zmod_flint.pxd | 2 + .../polynomial/polynomial_zmod_flint.pyx | 92 ++++++++++++++++++- .../rings/polynomial/polynomial_zz_pex.pyx | 2 +- 4 files changed, 96 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index a646e3324e4..6ace99bbea7 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -1785,7 +1785,7 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): def __pow__(self, n, modulus): """ - Exponentiation of polynomials over extension fields. + Exponentiation of polynomials. If ``modulus`` is not ``None``, the exponentiation is performed modulo the polynomial ``modulus``. @@ -1840,7 +1840,7 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): sage: _ = pow(x + 1, 3, xx^3 + xx + 1) Traceback (most recent call last): ... - TypeError: no canonical coercion from Univariate Polynomial Ring in x over Finite Field of size 97 to Univariate Polynomial Ring in x over Finite Field of size 101 + TypeError: no common canonical parent for objects with parents: ... """ n = Integer(n) parent = (self)._parent diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pxd b/src/sage/rings/polynomial/polynomial_zmod_flint.pxd index 887f46ea6eb..6ef9cf7f4d7 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pxd +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pxd @@ -1,5 +1,6 @@ from sage.libs.flint.types cimport nmod_poly_t, nmod_poly_struct, fmpz_poly_t from sage.structure.parent cimport Parent +from sage.rings.integer cimport Integer from sage.rings.polynomial.polynomial_integer_dense_flint cimport Polynomial_integer_dense_flint ctypedef nmod_poly_struct celement @@ -14,4 +15,5 @@ cdef class Polynomial_zmod_flint(Polynomial_template): cdef int _set_list(self, x) except -1 cdef int _set_fmpz_poly(self, fmpz_poly_t) except -1 cpdef Polynomial _mul_trunc_opposite(self, Polynomial_zmod_flint other, length) noexcept + cpdef Polynomial _powmod_bigexp(self, Integer exp, Polynomial_zmod_flint modulus) cpdef rational_reconstruction(self, m, n_deg=?, d_deg=?) noexcept diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx index 1df2497b4ad..4bce8a5de75 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx @@ -41,7 +41,7 @@ AUTHORS: from sage.libs.ntl.ntl_lzz_pX import ntl_zz_pX from sage.structure.element cimport parent -from sage.structure.element import coerce_binop +from sage.structure.element import coerce_binop, canonical_coercion, have_same_parent from sage.rings.polynomial.polynomial_integer_dense_flint cimport Polynomial_integer_dense_flint from sage.misc.superseded import deprecated_function_alias @@ -62,6 +62,7 @@ include "sage/libs/flint/nmod_poly_linkage.pxi" # and then the interface include "polynomial_template.pxi" +from sage.libs.flint.fmpz cimport * from sage.libs.flint.fmpz_poly cimport * from sage.libs.flint.nmod_poly cimport * @@ -482,6 +483,95 @@ cdef class Polynomial_zmod_flint(Polynomial_template): _mul_short_opposite = _mul_trunc_opposite + def __pow__(self, exp, modulus): + r""" + Exponentiation of polynomials. + + If ``modulus`` is not ``None``, the exponentiation is performed + modulo the polynomial ``modulus``. + + EXAMPLES:: + + sage: R. = GF(5)[] + sage: pow(x+1, 5**50, x^5 + 4*x + 3) + x + 1 + sage: pow(x+1, 5**64, x^5 + 4*x + 3) + x + 4 + sage: pow(x, 5**64, x^5 + 4*x + 3) + x + 3 + + The modulus can have smaller degree than ``self``:: + + sage: R. = PolynomialRing(GF(5), implementation="FLINT") + sage: pow(x^4, 6, x^2 + x + 1) + 1 + + TESTS:: + + Canonical coercion applies:: + + sage: R. = PolynomialRing(GF(5), implementation="FLINT") + sage: x_ZZ = ZZ["x"].gen() + sage: pow(x+1, 25, 2) + 0 + sage: pow(x+1, 4, x_ZZ^2 + x_ZZ + 1) + 4*x + 4 + sage: pow(x+1, int(4), x_ZZ^2 + x_ZZ + 1) + 4*x + 4 + sage: xx = polygen(GF(97)) + sage: pow(x + 1, 3, xx^3 + xx + 1) + Traceback (most recent call last): + ... + TypeError: no common canonical parent for objects with parents: ... + """ + exp = Integer(exp) + if modulus is not None: + # Similar to coerce_binop + if not have_same_parent(self, modulus): + a, m = canonical_coercion(self, modulus) + if a is not self: + return pow(a, exp, m) + modulus = m + self = self % modulus + if exp > 0 and exp.bit_length() >= 32: + return self._powmod_bigexp(exp, modulus) + + return Polynomial_template.__pow__(self, exp, modulus) + + cpdef Polynomial _powmod_bigexp(Polynomial_zmod_flint self, Integer exp, Polynomial_zmod_flint m): + r""" + Modular exponentiation with a large integer exponent. + + It is assumed that checks and coercions have been already performed on arguments. + + TESTS:: + + sage: R. = PolynomialRing(GF(5), implementation="FLINT") + sage: f = x+1 + sage: f._powmod_bigexp(5**50, x^5 + 4*x + 3) + x + 1 + sage: x._powmod_bigexp(5**64, x^5 + 4*x + 3) + x + 3 + """ + cdef Polynomial_zmod_flint ans = self._new() + # Preconditioning is useful for large exponents: the inverse + # power series helps computing fast quotients. + cdef Polynomial_zmod_flint minv = self._new() + cdef fmpz_t exp_fmpz + + fmpz_init(exp_fmpz) + fmpz_set_mpz(exp_fmpz, (exp).value) + nmod_poly_reverse(&minv.x, &m.x, nmod_poly_length(&m.x)) + nmod_poly_inv_series(&minv.x, &minv.x, nmod_poly_length(&m.x)) + + if self == self._parent.gen(): + nmod_poly_powmod_x_fmpz_preinv(&ans.x, exp_fmpz, &m.x, &minv.x) + else: + nmod_poly_powmod_fmpz_binexp_preinv(&ans.x, &self.x, exp_fmpz, &m.x, &minv.x) + + fmpz_clear(exp_fmpz) + return ans + cpdef Polynomial _power_trunc(self, unsigned long n, long prec) noexcept: r""" TESTS:: diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 97b99883ec5..ad2f3376f84 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -621,7 +621,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): def __pow__(self, exp, modulus): r""" - Exponentiation of polynomials over extension fields. + Exponentiation of polynomials. If ``modulus`` is not ``None``, the exponentiation is performed modulo the polynomial ``modulus``. From 84e5dc6e7960f53079f4b623293876e771072fe9 Mon Sep 17 00:00:00 2001 From: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com> Date: Sat, 24 Feb 2024 14:28:04 +0000 Subject: [PATCH 028/183] Apply suggestions from code review Co-authored-by: Travis Scrimshaw --- src/sage/libs/ntl/ntl_ZZ_pX.pyx | 8 ++++---- src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx | 6 +++--- src/sage/rings/polynomial/polynomial_zmod_flint.pyx | 4 ++-- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pyx b/src/sage/libs/ntl/ntl_ZZ_pX.pyx index 4a5ef4eee79..244478307f6 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pyx @@ -530,9 +530,9 @@ cdef class ntl_ZZ_pX(): else: return self._powmod(Integer(n), modulus) - cpdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, n): + cdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, long n): """ - Compute the n-th power of self. + Compute the ``n``-th power of `self``. """ if n < 0: raise NotImplementedError @@ -547,9 +547,9 @@ cdef class ntl_ZZ_pX(): sig_off() return r - cpdef ntl_ZZ_pX _powmod(ntl_ZZ_pX self, Integer n, ntl_ZZ_pX modulus): + cdef ntl_ZZ_pX _powmod(ntl_ZZ_pX self, Integer n, ntl_ZZ_pX modulus): r""" - Compute the n-th power of self modulo a polynomial. + Compute the ``n``-th power of ``self`` modulo a polynomial. """ cdef ntl_ZZ_pX r = self._new() cdef ZZ_c n_ZZ diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index 6ace99bbea7..0b6bf4a443b 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -1785,7 +1785,7 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): def __pow__(self, n, modulus): """ - Exponentiation of polynomials. + Exponentiation of ``self``. If ``modulus`` is not ``None``, the exponentiation is performed modulo the polynomial ``modulus``. @@ -1798,7 +1798,7 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): sage: pow(x-1, 15, x^3+x+1) 55*x^2 + 6*x + 46 - TESTS:: + TESTS: Negative powers will not work:: @@ -1808,7 +1808,7 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): ... NotImplementedError: Fraction fields not implemented for this type. - We define ``0^0`` to be unity, :trac:`13895`:: + We define ``0^0`` to be unity, :issue:`13895`:: sage: R. = PolynomialRing(Integers(101), implementation='NTL') sage: R(0)^0 diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx index 4bce8a5de75..775258190cb 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx @@ -485,7 +485,7 @@ cdef class Polynomial_zmod_flint(Polynomial_template): def __pow__(self, exp, modulus): r""" - Exponentiation of polynomials. + Exponentiation of ``self``. If ``modulus`` is not ``None``, the exponentiation is performed modulo the polynomial ``modulus``. @@ -506,7 +506,7 @@ cdef class Polynomial_zmod_flint(Polynomial_template): sage: pow(x^4, 6, x^2 + x + 1) 1 - TESTS:: + TESTS: Canonical coercion applies:: diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index ad2f3376f84..e033d834200 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -635,7 +635,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): sage: pow(x + 3, 5) x^5 + 15*x^4 + 90*x^3 + 68*x^2 + x + 41 - If modulus is not None, performs modular exponentiation:: + If modulus is not ``None``, performs modular exponentiation:: sage: K. = GF(101^2, 'a', modulus=[1,1,1]) sage: R. = PolynomialRing(K, implementation="NTL") @@ -651,7 +651,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): sage: pow(x^4, 25, x^2 + x + a) (19*a + 64)*x + 30*a + 2 - TESTS:: + TESTS: Canonical coercion should apply:: From 10d57ed3daf2411a770559179f77e08b96ad0d3d Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 14:39:24 +0000 Subject: [PATCH 029/183] Ensure cython compiles after reviewer suggestion --- src/sage/libs/ntl/ntl_ZZ_pX.pxd | 4 ++-- src/sage/rings/polynomial/polynomial_zmod_flint.pxd | 2 +- src/sage/rings/polynomial/polynomial_zmod_flint.pyx | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pxd b/src/sage/libs/ntl/ntl_ZZ_pX.pxd index c7132de6eff..829eab2a769 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pxd @@ -8,8 +8,8 @@ cdef class ntl_ZZ_pX(): cdef void setitem_from_int(ntl_ZZ_pX self, long i, int value) noexcept cdef int getitem_as_int(ntl_ZZ_pX self, long i) noexcept cdef ntl_ZZ_pX _new(self) noexcept - cpdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, exp) - cpdef ntl_ZZ_pX _powmod(ntl_ZZ_pX self, Integer exp, ntl_ZZ_pX modulus) + cdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, long exp) + cdef ntl_ZZ_pX _powmod(ntl_ZZ_pX self, Integer exp, ntl_ZZ_pX modulus) cdef class ntl_ZZ_pX_Modulus(): cdef ZZ_pX_Modulus_c x diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pxd b/src/sage/rings/polynomial/polynomial_zmod_flint.pxd index 6ef9cf7f4d7..189bddad656 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pxd +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pxd @@ -15,5 +15,5 @@ cdef class Polynomial_zmod_flint(Polynomial_template): cdef int _set_list(self, x) except -1 cdef int _set_fmpz_poly(self, fmpz_poly_t) except -1 cpdef Polynomial _mul_trunc_opposite(self, Polynomial_zmod_flint other, length) noexcept - cpdef Polynomial _powmod_bigexp(self, Integer exp, Polynomial_zmod_flint modulus) + cdef Polynomial _powmod_bigexp(self, Integer exp, Polynomial_zmod_flint modulus) cpdef rational_reconstruction(self, m, n_deg=?, d_deg=?) noexcept diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx index 775258190cb..0e2a75291a0 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx @@ -534,11 +534,11 @@ cdef class Polynomial_zmod_flint(Polynomial_template): modulus = m self = self % modulus if exp > 0 and exp.bit_length() >= 32: - return self._powmod_bigexp(exp, modulus) + return (self)._powmod_bigexp(exp, modulus) return Polynomial_template.__pow__(self, exp, modulus) - cpdef Polynomial _powmod_bigexp(Polynomial_zmod_flint self, Integer exp, Polynomial_zmod_flint m): + cdef Polynomial _powmod_bigexp(Polynomial_zmod_flint self, Integer exp, Polynomial_zmod_flint m): r""" Modular exponentiation with a large integer exponent. @@ -548,9 +548,9 @@ cdef class Polynomial_zmod_flint(Polynomial_template): sage: R. = PolynomialRing(GF(5), implementation="FLINT") sage: f = x+1 - sage: f._powmod_bigexp(5**50, x^5 + 4*x + 3) + sage: pow(f, 5**50, x^5 + 4*x + 3) # indirect doctest x + 1 - sage: x._powmod_bigexp(5**64, x^5 + 4*x + 3) + sage: pow(x, 5**64, x^5 + 4*x + 3) # indirect doctest x + 3 """ cdef Polynomial_zmod_flint ans = self._new() From 713af40980e834c6fe2e743be0bec2d5b290dd93 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 16:01:40 +0000 Subject: [PATCH 030/183] fix change from cpdef to cdef --- src/sage/libs/ntl/ntl_ZZ_pX.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pyx b/src/sage/libs/ntl/ntl_ZZ_pX.pyx index 244478307f6..5066de60e3f 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pyx @@ -526,9 +526,9 @@ cdef class ntl_ZZ_pX(): [15 5 5 11] """ if modulus is None: - return self._pow(n) + return (self)._pow(n) else: - return self._powmod(Integer(n), modulus) + return (self)._powmod(Integer(n), modulus) cdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, long n): """ From 2e98cf8e68c89f2157f457d6965c2baa0aa51f24 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Sat, 24 Feb 2024 23:05:19 +0000 Subject: [PATCH 031/183] replace trac with issue --- .../rings/polynomial/polynomial_modn_dense_ntl.pyx | 6 +++--- src/sage/rings/polynomial/polynomial_zmod_flint.pyx | 6 +++--- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index 0b6bf4a443b..39741c20860 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -299,7 +299,7 @@ cdef class Polynomial_dense_mod_n(Polynomial): TESTS: - Check output type (see :trac:`25182`):: + Check output type (see :issue:`25182`):: sage: R. = PolynomialRing(Integers(3), implementation='NTL') sage: isinstance(x.degree(), Integer) @@ -851,7 +851,7 @@ cdef class Polynomial_dense_modn_ntl_zz(Polynomial_dense_mod_n): ... NotImplementedError: Fraction fields not implemented for this type. - We define ``0^0`` to be unity, :trac:`13895`:: + We define ``0^0`` to be unity, :issue:`13895`:: sage: R. = PolynomialRing(Integers(100), implementation='NTL') sage: R(0)^0 @@ -1409,7 +1409,7 @@ cdef class Polynomial_dense_modn_ntl_ZZ(Polynomial_dense_mod_n): sage: (x+1)^5 x^5 + 5*x^4 + 10*x^3 + 10*x^2 + 5*x + 1 - We define ``0^0`` to be unity, :trac:`13895`:: + We define ``0^0`` to be unity, :issue:`13895`:: sage: R. = PolynomialRing(Integers(10^30), implementation='NTL') sage: R(0)^0 diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx index 0e2a75291a0..3a9f49d9a49 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx @@ -228,7 +228,7 @@ cdef class Polynomial_zmod_flint(Polynomial_template): TESTS: - The following test from :trac:`12173` used to be horribly slow:: + The following test from :issue:`12173` used to be horribly slow:: sage: a = ZZ['x'](range(100000)) sage: R = Integers(3)['x'] @@ -347,7 +347,7 @@ cdef class Polynomial_zmod_flint(Polynomial_template): sage: r.parent() is GF(19) True - The following example shows that :trac:`11782` has been fixed:: + The following example shows that :issue:`11782` has been fixed:: sage: R. = ZZ.quo(9)['x'] sage: f = 2*x^3 + x^2 + x; g = 6*x^2 + 2*x + 1 @@ -748,7 +748,7 @@ cdef class Polynomial_zmod_flint(Polynomial_template): ... NotImplementedError: square free factorization of polynomials over rings with composite characteristic is not implemented - :trac:`20003`:: + :issue:`20003`:: sage: P. = GF(7)[] sage: (6*x+3).squarefree_decomposition() diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index e033d834200..6ce1c1422a7 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -89,7 +89,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): TESTS: - The following tests against a bug that was fixed in :trac:`9944`. + The following tests against a bug that was fixed in :issue:`9944`. With the ring definition above, we now have:: sage: R([3,'1234']) @@ -104,7 +104,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): TypeError: not a constant polynomial Check that NTL contexts are correctly restored and that - :trac:`9524` has been fixed:: + :issue:`9524` has been fixed:: sage: x = polygen(GF(9, 'a')) sage: x = polygen(GF(49, 'a')) @@ -113,7 +113,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): sage: 5*x 5*x - Check that :trac:`11239` is fixed:: + Check that :issue:`11239` is fixed:: sage: Fq. = GF(2^4); Fqq. = GF(3^7) sage: PFq. = Fq[]; PFqq. = Fqq[] @@ -237,7 +237,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): TESTS: - The work around provided in :trac:`10475` is superseded by :trac:`24072`:: + The work around provided in :issue:`10475` is superseded by :issue:`24072`:: sage: F. = GF(4) sage: P. = F[] @@ -248,7 +248,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): TypeError: positive characteristic not allowed in symbolic computations Check that polynomial evaluation works when using logarithmic - representation of finite field elements (:trac:`16383`):: + representation of finite field elements (:issue:`16383`):: sage: for i in range(10): ....: F = FiniteField(random_prime(15) ** ZZ.random_element(2, 5), 'a', repr='log') From 7f8254b4da72277c0c1ecd9885b937857b43fc40 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 21:02:28 -0800 Subject: [PATCH 032/183] .github/workflows/ci-linux.yml: Build 'default' with free_disk_space: true --- .github/workflows/ci-linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 7c0d22118c0..7e86f010b42 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -39,6 +39,7 @@ jobs: uses: ./.github/workflows/docker.yml with: # Build from scratch + free_disk_space: true docker_targets: "with-system-packages configured with-targets-pre with-targets" # FIXME: duplicated from env.TARGETS targets_pre: all-sage-local From 40ae78b10ead6441b7d2d8b989e97c757bc4a0e1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 21:04:55 -0800 Subject: [PATCH 033/183] .github/workflows/docker.yml: Build with 'make -j9', test with SAGE_NUM_THREADS=5 --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1ee938339b3..970e7db502e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -244,7 +244,7 @@ jobs: # configuration on many platforms. run: | (sleep ${{ inputs.timeout }}; for id in $(docker ps -q); do docker exec $id find /proc -maxdepth 2 -name cmdline -exec bash -c "grep -l [m][a][k][e] {} | cut -d/ -f3 | xargs --no-run-if-empty kill" \;; done) & - set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg NUMPROC=4 --build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=3\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;" + set -o pipefail; EXTRA_DOCKER_BUILD_ARGS="--build-arg NUMPROC=9 --build-arg USE_MAKEFLAGS=\"-k V=0 SAGE_NUM_THREADS=5\"" tox -e $TOX_ENV -- $TARGETS 2>&1 | sed "/^configure: notice:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: warning:/s|^|::warning file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;/^configure: error:/s|^|::error file=artifacts/$LOGS_ARTIFACT_NAME/config.log::|;" - name: Copy logs from the Docker image or build container run: | mkdir -p "artifacts/$LOGS_ARTIFACT_NAME" From 081c9ee01b5a826dff7782f4bb194d67878b77f5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 21:11:30 -0800 Subject: [PATCH 034/183] tox.ini: Add ubuntu-noble, fedora-40, linuxmint-21.3, gentoo-python3.12 --- tox.ini | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index 3673833724c..db66de3ea4f 100644 --- a/tox.ini +++ b/tox.ini @@ -205,7 +205,7 @@ setenv = docker: BASE_TAG=latest # # https://hub.docker.com/_/ubuntu?tab=description - # as of 2023-05, latest=jammy=22.04, rolling=lunar=23.04, devel=mantic=23.10 + # as of 2024-02, latest=jammy=22.04, rolling=mantic=23.10, devel=noble=24.04 # ubuntu-focal does not have libgap-dev # ubuntu: SYSTEM=debian @@ -226,6 +226,7 @@ setenv = ubuntu-jammy: BASE_TAG=jammy ubuntu-lunar: BASE_TAG=lunar ubuntu-mantic: BASE_TAG=mantic + ubuntu-noble: BASE_TAG=noble # # https://hub.docker.com/_/debian # debian-buster does not have libfreetype-dev (it only has libfreetype6-dev) @@ -264,6 +265,7 @@ setenv = linuxmint-21: BASE_IMAGE=linuxmintd/mint21 linuxmint-21.1: BASE_IMAGE=linuxmintd/mint21.1 linuxmint-21.2: BASE_IMAGE=linuxmintd/mint21.2 + linuxmint-21.3: BASE_IMAGE=linuxmintd/mint21.3 # # https://hub.docker.com/_/fedora # as of 2024-01, latest=39, rawhide=40 @@ -822,14 +824,14 @@ setenv = # Master list of platforms tested in CI Linux # DEFAULT_SYSTEM_FACTORS=\ - ubuntu-{trusty-toolchain-gcc_9,xenial-toolchain-gcc_9,bionic-gcc_8,focal,jammy,lunar,mantic} \ + ubuntu-{trusty-toolchain-gcc_9,xenial-toolchain-gcc_9,bionic-gcc_8,focal,jammy,lunar,mantic,noble} \ debian-{buster-gcc_spkg,bullseye,bookworm,trixie,sid} \ - linuxmint-{20.1,20.2,20.3,21,21.1,21.2} \ - fedora-{30,31,32,33,34,35,36,37,38,39} \ + linuxmint-{20.1,20.2,20.3,21,21.1,21.2,21.3} \ + fedora-{30,31,32,33,34,35,36,37,38,39,40} \ centos-7-devtoolset-gcc_11 \ centos-stream-{8,9}-python3.9 \ almalinux-{8-python3.9,9-python3.11} \ - gentoo-python{3.10,3.11} \ + gentoo-python{3.10,3.11,3.12} \ archlinux-latest \ opensuse-{15.3-gcc_11-python3.9,15.4-gcc_11-python3.10,15.5-gcc_11-python3.11} \ opensuse-tumbleweed{-python3.10,} \ From 504c4cd878f9d38cea97a9a742d1222fd904da5e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 21:12:24 -0800 Subject: [PATCH 035/183] tox -e update_docker_platforms --- .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .../devcontainer.json | 25 ++ .../portability-Dockerfile | 1 + .github/workflows/docker.yml | 4 + .../developer/portability_platform_table.rst | 260 ++++++++++++++++++ 18 files changed, 472 insertions(+) create mode 100644 .devcontainer/portability-fedora-40-minimal/devcontainer.json create mode 120000 .devcontainer/portability-fedora-40-minimal/portability-Dockerfile create mode 100644 .devcontainer/portability-fedora-40-standard/devcontainer.json create mode 120000 .devcontainer/portability-fedora-40-standard/portability-Dockerfile create mode 100644 .devcontainer/portability-gentoo-python3.12-minimal/devcontainer.json create mode 120000 .devcontainer/portability-gentoo-python3.12-minimal/portability-Dockerfile create mode 100644 .devcontainer/portability-gentoo-python3.12-standard/devcontainer.json create mode 120000 .devcontainer/portability-gentoo-python3.12-standard/portability-Dockerfile create mode 100644 .devcontainer/portability-linuxmint-21.3-minimal/devcontainer.json create mode 120000 .devcontainer/portability-linuxmint-21.3-minimal/portability-Dockerfile create mode 100644 .devcontainer/portability-linuxmint-21.3-standard/devcontainer.json create mode 120000 .devcontainer/portability-linuxmint-21.3-standard/portability-Dockerfile create mode 100644 .devcontainer/portability-ubuntu-noble-minimal/devcontainer.json create mode 120000 .devcontainer/portability-ubuntu-noble-minimal/portability-Dockerfile create mode 100644 .devcontainer/portability-ubuntu-noble-standard/devcontainer.json create mode 120000 .devcontainer/portability-ubuntu-noble-standard/portability-Dockerfile diff --git a/.devcontainer/portability-fedora-40-minimal/devcontainer.json b/.devcontainer/portability-fedora-40-minimal/devcontainer.json new file mode 100644 index 00000000000..dd037154fe3 --- /dev/null +++ b/.devcontainer/portability-fedora-40-minimal/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "fedora-40-minimal (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "fedora-40", + "PACKAGE_FACTOR": "minimal", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-fedora-40-minimal/portability-Dockerfile b/.devcontainer/portability-fedora-40-minimal/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-fedora-40-minimal/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-fedora-40-standard/devcontainer.json b/.devcontainer/portability-fedora-40-standard/devcontainer.json new file mode 100644 index 00000000000..1f9d4a5e378 --- /dev/null +++ b/.devcontainer/portability-fedora-40-standard/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "fedora-40-standard (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "fedora-40", + "PACKAGE_FACTOR": "standard", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-fedora-40-standard/portability-Dockerfile b/.devcontainer/portability-fedora-40-standard/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-fedora-40-standard/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-gentoo-python3.12-minimal/devcontainer.json b/.devcontainer/portability-gentoo-python3.12-minimal/devcontainer.json new file mode 100644 index 00000000000..41250ac5e74 --- /dev/null +++ b/.devcontainer/portability-gentoo-python3.12-minimal/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "gentoo-python3.12-minimal (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "gentoo-python3.12", + "PACKAGE_FACTOR": "minimal", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-gentoo-python3.12-minimal/portability-Dockerfile b/.devcontainer/portability-gentoo-python3.12-minimal/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-gentoo-python3.12-minimal/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-gentoo-python3.12-standard/devcontainer.json b/.devcontainer/portability-gentoo-python3.12-standard/devcontainer.json new file mode 100644 index 00000000000..3193910dd6a --- /dev/null +++ b/.devcontainer/portability-gentoo-python3.12-standard/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "gentoo-python3.12-standard (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "gentoo-python3.12", + "PACKAGE_FACTOR": "standard", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-gentoo-python3.12-standard/portability-Dockerfile b/.devcontainer/portability-gentoo-python3.12-standard/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-gentoo-python3.12-standard/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-linuxmint-21.3-minimal/devcontainer.json b/.devcontainer/portability-linuxmint-21.3-minimal/devcontainer.json new file mode 100644 index 00000000000..6350569173d --- /dev/null +++ b/.devcontainer/portability-linuxmint-21.3-minimal/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "linuxmint-21.3-minimal (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "linuxmint-21.3", + "PACKAGE_FACTOR": "minimal", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-linuxmint-21.3-minimal/portability-Dockerfile b/.devcontainer/portability-linuxmint-21.3-minimal/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-linuxmint-21.3-minimal/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-linuxmint-21.3-standard/devcontainer.json b/.devcontainer/portability-linuxmint-21.3-standard/devcontainer.json new file mode 100644 index 00000000000..245fee17201 --- /dev/null +++ b/.devcontainer/portability-linuxmint-21.3-standard/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "linuxmint-21.3-standard (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "linuxmint-21.3", + "PACKAGE_FACTOR": "standard", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-linuxmint-21.3-standard/portability-Dockerfile b/.devcontainer/portability-linuxmint-21.3-standard/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-linuxmint-21.3-standard/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-ubuntu-noble-minimal/devcontainer.json b/.devcontainer/portability-ubuntu-noble-minimal/devcontainer.json new file mode 100644 index 00000000000..f22b6775f74 --- /dev/null +++ b/.devcontainer/portability-ubuntu-noble-minimal/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "ubuntu-noble-minimal (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "ubuntu-noble", + "PACKAGE_FACTOR": "minimal", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-ubuntu-noble-minimal/portability-Dockerfile b/.devcontainer/portability-ubuntu-noble-minimal/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-ubuntu-noble-minimal/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-ubuntu-noble-standard/devcontainer.json b/.devcontainer/portability-ubuntu-noble-standard/devcontainer.json new file mode 100644 index 00000000000..7acec1e29ac --- /dev/null +++ b/.devcontainer/portability-ubuntu-noble-standard/devcontainer.json @@ -0,0 +1,25 @@ +// The command "tox -e update_docker_platforms" +// creates .devcontainer/portability-*-*/devcontainer.json +// from .devcontainer/portability-devcontainer.json.in +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "ubuntu-noble-standard (≥ 8-core)", + "build": { + "dockerfile": "portability-Dockerfile", + // See tox.ini for definitions + "args": { + "SYSTEM_FACTOR": "ubuntu-noble", + "PACKAGE_FACTOR": "standard", + "DOCKER_TARGET": "with-targets", + "DOCKER_TAG": "dev" + } + }, + "containerEnv": { + "MAKE": "make -j4" + }, + "onCreateCommand": ".devcontainer/onCreate.sh", + "updateContentCommand": ".devcontainer/portability-updateContent.sh", + "extensions": [ + "ms-python.python" + ] +} diff --git a/.devcontainer/portability-ubuntu-noble-standard/portability-Dockerfile b/.devcontainer/portability-ubuntu-noble-standard/portability-Dockerfile new file mode 120000 index 00000000000..692e2a79d64 --- /dev/null +++ b/.devcontainer/portability-ubuntu-noble-standard/portability-Dockerfile @@ -0,0 +1 @@ +../portability-Dockerfile \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 970e7db502e..ed049f3e85e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -25,6 +25,7 @@ on: "ubuntu-jammy", "ubuntu-lunar", "ubuntu-mantic", + "ubuntu-noble", "debian-buster-gcc_spkg", "debian-bullseye", "debian-bookworm", @@ -36,6 +37,7 @@ on: "linuxmint-21", "linuxmint-21.1", "linuxmint-21.2", + "linuxmint-21.3", "fedora-30", "fedora-31", "fedora-32", @@ -46,6 +48,7 @@ on: "fedora-37", "fedora-38", "fedora-39", + "fedora-40", "centos-7-devtoolset-gcc_11", "centos-stream-8-python3.9", "centos-stream-9-python3.9", @@ -53,6 +56,7 @@ on: "almalinux-9-python3.11", "gentoo-python3.10", "gentoo-python3.11", + "gentoo-python3.12", "archlinux-latest", "opensuse-15.3-gcc_11-python3.9", "opensuse-15.4-gcc_11-python3.10", diff --git a/src/doc/en/developer/portability_platform_table.rst b/src/doc/en/developer/portability_platform_table.rst index d024671c9d8..7b173a1959c 100644 --- a/src/doc/en/developer/portability_platform_table.rst +++ b/src/doc/en/developer/portability_platform_table.rst @@ -376,6 +376,60 @@ .. |codespace-ubuntu-mantic-maximal| image:: https://github.com/codespaces/badge.svg :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-ubuntu-mantic-maximal%2Fdevcontainer.json +.. |image-ubuntu-noble-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-minimal-with-system-packages + +.. |image-ubuntu-noble-minimal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-minimal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-minimal-configured + +.. |image-ubuntu-noble-minimal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-minimal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%23677895 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-minimal-with-targets-pre + +.. |image-ubuntu-noble-minimal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-minimal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%236686c1 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-minimal-with-targets + +.. |image-ubuntu-noble-minimal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-minimal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%236495ed + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-minimal-with-targets-optional + +.. |codespace-ubuntu-noble-minimal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-ubuntu-noble-minimal%2Fdevcontainer.json + +.. |image-ubuntu-noble-standard-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-standard-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-standard-with-system-packages + +.. |image-ubuntu-noble-standard-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-standard-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-standard-configured + +.. |image-ubuntu-noble-standard-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-standard-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%235d8a4c + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-standard-with-targets-pre + +.. |image-ubuntu-noble-standard-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-standard-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%2350ab2e + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-standard-with-targets + +.. |image-ubuntu-noble-standard-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-standard-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%2344cc11 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-standard-with-targets-optional + +.. |codespace-ubuntu-noble-standard| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-ubuntu-noble-standard%2Fdevcontainer.json + +.. |image-ubuntu-noble-maximal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-maximal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-maximal-with-system-packages + +.. |image-ubuntu-noble-maximal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-maximal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-maximal-configured + +.. |image-ubuntu-noble-maximal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-maximal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%238f6b8d + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-maximal-with-targets-pre + +.. |image-ubuntu-noble-maximal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-maximal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%23b46eb2 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-maximal-with-targets + +.. |image-ubuntu-noble-maximal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-ubuntu-noble-maximal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%23da70d6 + :target: https://ghcr.io/sagemath/sage/sage-ubuntu-noble-maximal-with-targets-optional + +.. |codespace-ubuntu-noble-maximal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-ubuntu-noble-maximal%2Fdevcontainer.json + .. |image-debian-buster-gcc_spkg-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-debian-buster-gcc_spkg-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 :target: https://ghcr.io/sagemath/sage/sage-debian-buster-gcc_spkg-minimal-with-system-packages @@ -970,6 +1024,60 @@ .. |codespace-linuxmint-21.2-maximal| image:: https://github.com/codespaces/badge.svg :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-linuxmint-21.2-maximal%2Fdevcontainer.json +.. |image-linuxmint-21.3-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-minimal-with-system-packages + +.. |image-linuxmint-21.3-minimal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-minimal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-minimal-configured + +.. |image-linuxmint-21.3-minimal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-minimal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%23677895 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-minimal-with-targets-pre + +.. |image-linuxmint-21.3-minimal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-minimal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%236686c1 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-minimal-with-targets + +.. |image-linuxmint-21.3-minimal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-minimal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%236495ed + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-minimal-with-targets-optional + +.. |codespace-linuxmint-21.3-minimal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-linuxmint-21.3-minimal%2Fdevcontainer.json + +.. |image-linuxmint-21.3-standard-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-standard-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-standard-with-system-packages + +.. |image-linuxmint-21.3-standard-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-standard-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-standard-configured + +.. |image-linuxmint-21.3-standard-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-standard-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%235d8a4c + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-standard-with-targets-pre + +.. |image-linuxmint-21.3-standard-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-standard-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%2350ab2e + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-standard-with-targets + +.. |image-linuxmint-21.3-standard-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-standard-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%2344cc11 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-standard-with-targets-optional + +.. |codespace-linuxmint-21.3-standard| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-linuxmint-21.3-standard%2Fdevcontainer.json + +.. |image-linuxmint-21.3-maximal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-maximal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-maximal-with-system-packages + +.. |image-linuxmint-21.3-maximal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-maximal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-maximal-configured + +.. |image-linuxmint-21.3-maximal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-maximal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%238f6b8d + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-maximal-with-targets-pre + +.. |image-linuxmint-21.3-maximal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-maximal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%23b46eb2 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-maximal-with-targets + +.. |image-linuxmint-21.3-maximal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-linuxmint-21.3-maximal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%23da70d6 + :target: https://ghcr.io/sagemath/sage/sage-linuxmint-21.3-maximal-with-targets-optional + +.. |codespace-linuxmint-21.3-maximal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-linuxmint-21.3-maximal%2Fdevcontainer.json + .. |image-fedora-30-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-30-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 :target: https://ghcr.io/sagemath/sage/sage-fedora-30-minimal-with-system-packages @@ -1510,6 +1618,60 @@ .. |codespace-fedora-39-maximal| image:: https://github.com/codespaces/badge.svg :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-fedora-39-maximal%2Fdevcontainer.json +.. |image-fedora-40-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-minimal-with-system-packages + +.. |image-fedora-40-minimal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-minimal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-minimal-configured + +.. |image-fedora-40-minimal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-minimal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%23677895 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-minimal-with-targets-pre + +.. |image-fedora-40-minimal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-minimal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%236686c1 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-minimal-with-targets + +.. |image-fedora-40-minimal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-minimal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%236495ed + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-minimal-with-targets-optional + +.. |codespace-fedora-40-minimal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-fedora-40-minimal%2Fdevcontainer.json + +.. |image-fedora-40-standard-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-standard-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-standard-with-system-packages + +.. |image-fedora-40-standard-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-standard-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-standard-configured + +.. |image-fedora-40-standard-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-standard-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%235d8a4c + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-standard-with-targets-pre + +.. |image-fedora-40-standard-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-standard-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%2350ab2e + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-standard-with-targets + +.. |image-fedora-40-standard-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-standard-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%2344cc11 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-standard-with-targets-optional + +.. |codespace-fedora-40-standard| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-fedora-40-standard%2Fdevcontainer.json + +.. |image-fedora-40-maximal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-maximal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-maximal-with-system-packages + +.. |image-fedora-40-maximal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-maximal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-maximal-configured + +.. |image-fedora-40-maximal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-maximal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%238f6b8d + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-maximal-with-targets-pre + +.. |image-fedora-40-maximal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-maximal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%23b46eb2 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-maximal-with-targets + +.. |image-fedora-40-maximal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-fedora-40-maximal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%23da70d6 + :target: https://ghcr.io/sagemath/sage/sage-fedora-40-maximal-with-targets-optional + +.. |codespace-fedora-40-maximal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-fedora-40-maximal%2Fdevcontainer.json + .. |image-centos-7-devtoolset-gcc_11-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-centos-7-devtoolset-gcc_11-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 :target: https://ghcr.io/sagemath/sage/sage-centos-7-devtoolset-gcc_11-minimal-with-system-packages @@ -1888,6 +2050,60 @@ .. |codespace-gentoo-python3.11-maximal| image:: https://github.com/codespaces/badge.svg :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-gentoo-python3.11-maximal%2Fdevcontainer.json +.. |image-gentoo-python3.12-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-minimal-with-system-packages + +.. |image-gentoo-python3.12-minimal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-minimal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-minimal-configured + +.. |image-gentoo-python3.12-minimal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-minimal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%23677895 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-minimal-with-targets-pre + +.. |image-gentoo-python3.12-minimal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-minimal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%236686c1 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-minimal-with-targets + +.. |image-gentoo-python3.12-minimal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-minimal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%236495ed + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-minimal-with-targets-optional + +.. |codespace-gentoo-python3.12-minimal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-gentoo-python3.12-minimal%2Fdevcontainer.json + +.. |image-gentoo-python3.12-standard-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-standard-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-standard-with-system-packages + +.. |image-gentoo-python3.12-standard-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-standard-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-standard-configured + +.. |image-gentoo-python3.12-standard-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-standard-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%235d8a4c + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-standard-with-targets-pre + +.. |image-gentoo-python3.12-standard-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-standard-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%2350ab2e + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-standard-with-targets + +.. |image-gentoo-python3.12-standard-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-standard-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%2344cc11 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-standard-with-targets-optional + +.. |codespace-gentoo-python3.12-standard| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-gentoo-python3.12-standard%2Fdevcontainer.json + +.. |image-gentoo-python3.12-maximal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-maximal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-maximal-with-system-packages + +.. |image-gentoo-python3.12-maximal-configured| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-maximal-configured/latest_tag?ignore=latest,dev,*-failed&label=configured&color=%23696969 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-maximal-configured + +.. |image-gentoo-python3.12-maximal-with-targets-pre| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-maximal-with-targets-pre/latest_tag?ignore=latest,dev,*-failed&label=with-targets-pre&color=%238f6b8d + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-maximal-with-targets-pre + +.. |image-gentoo-python3.12-maximal-with-targets| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-maximal-with-targets/latest_tag?ignore=latest,dev,*-failed&label=with-targets&color=%23b46eb2 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-maximal-with-targets + +.. |image-gentoo-python3.12-maximal-with-targets-optional| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-gentoo-python3.12-maximal-with-targets-optional/latest_tag?ignore=latest,dev,*-failed&label=with-targets-optional&color=%23da70d6 + :target: https://ghcr.io/sagemath/sage/sage-gentoo-python3.12-maximal-with-targets-optional + +.. |codespace-gentoo-python3.12-maximal| image:: https://github.com/codespaces/badge.svg + :target: https://codespaces.new/sagemath/sage?devcontainer_path=.devcontainer%2Fportability-gentoo-python3.12-maximal%2Fdevcontainer.json + .. |image-archlinux-latest-minimal-with-system-packages| image:: https://ghcr-badge.egpl.dev/sagemath/sage/sage-archlinux-latest-minimal-with-system-packages/size?tag=dev&label=with-system-packages&color=%23696969 :target: https://ghcr.io/sagemath/sage/sage-archlinux-latest-minimal-with-system-packages @@ -2459,6 +2675,17 @@ * -    ‑*maximal* - |image-ubuntu-mantic-maximal-with-system-packages| |image-ubuntu-mantic-maximal-with-targets-pre| - + * - **ubuntu**-noble + +    ‑*minimal* + - |image-ubuntu-noble-minimal-with-system-packages| |image-ubuntu-noble-minimal-with-targets-pre| |image-ubuntu-noble-minimal-with-targets| |image-ubuntu-noble-minimal-with-targets-optional| + - |codespace-ubuntu-noble-minimal| + * -    ‑*standard* + - |image-ubuntu-noble-standard-with-system-packages| |image-ubuntu-noble-standard-with-targets-pre| |image-ubuntu-noble-standard-with-targets| |image-ubuntu-noble-standard-with-targets-optional| + - |codespace-ubuntu-noble-standard| + * -    ‑*maximal* + - |image-ubuntu-noble-maximal-with-system-packages| |image-ubuntu-noble-maximal-with-targets-pre| + - * - **debian**-buster-gcc_spkg    ‑*minimal* @@ -2580,6 +2807,17 @@ * -    ‑*maximal* - |image-linuxmint-21.2-maximal-with-system-packages| |image-linuxmint-21.2-maximal-with-targets-pre| - + * - **linuxmint**-21.3 + +    ‑*minimal* + - |image-linuxmint-21.3-minimal-with-system-packages| |image-linuxmint-21.3-minimal-with-targets-pre| |image-linuxmint-21.3-minimal-with-targets| |image-linuxmint-21.3-minimal-with-targets-optional| + - |codespace-linuxmint-21.3-minimal| + * -    ‑*standard* + - |image-linuxmint-21.3-standard-with-system-packages| |image-linuxmint-21.3-standard-with-targets-pre| |image-linuxmint-21.3-standard-with-targets| |image-linuxmint-21.3-standard-with-targets-optional| + - |codespace-linuxmint-21.3-standard| + * -    ‑*maximal* + - |image-linuxmint-21.3-maximal-with-system-packages| |image-linuxmint-21.3-maximal-with-targets-pre| + - * - **fedora**-30    ‑*minimal* @@ -2690,6 +2928,17 @@ * -    ‑*maximal* - |image-fedora-39-maximal-with-system-packages| |image-fedora-39-maximal-with-targets-pre| - + * - **fedora**-40 + +    ‑*minimal* + - |image-fedora-40-minimal-with-system-packages| |image-fedora-40-minimal-with-targets-pre| |image-fedora-40-minimal-with-targets| |image-fedora-40-minimal-with-targets-optional| + - |codespace-fedora-40-minimal| + * -    ‑*standard* + - |image-fedora-40-standard-with-system-packages| |image-fedora-40-standard-with-targets-pre| |image-fedora-40-standard-with-targets| |image-fedora-40-standard-with-targets-optional| + - |codespace-fedora-40-standard| + * -    ‑*maximal* + - |image-fedora-40-maximal-with-system-packages| |image-fedora-40-maximal-with-targets-pre| + - * - **centos**-7-devtoolset-gcc_11    ‑*minimal* @@ -2767,6 +3016,17 @@ * -    ‑*maximal* - |image-gentoo-python3.11-maximal-with-system-packages| |image-gentoo-python3.11-maximal-with-targets-pre| - + * - **gentoo**-python3.12 + +    ‑*minimal* + - |image-gentoo-python3.12-minimal-with-system-packages| |image-gentoo-python3.12-minimal-with-targets-pre| |image-gentoo-python3.12-minimal-with-targets| |image-gentoo-python3.12-minimal-with-targets-optional| + - |codespace-gentoo-python3.12-minimal| + * -    ‑*standard* + - |image-gentoo-python3.12-standard-with-system-packages| |image-gentoo-python3.12-standard-with-targets-pre| |image-gentoo-python3.12-standard-with-targets| |image-gentoo-python3.12-standard-with-targets-optional| + - |codespace-gentoo-python3.12-standard| + * -    ‑*maximal* + - |image-gentoo-python3.12-maximal-with-system-packages| |image-gentoo-python3.12-maximal-with-targets-pre| + - * - **archlinux**-latest    ‑*minimal* From b08c7273fde5379611f50b32a412c129ac75c832 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 21:14:23 -0800 Subject: [PATCH 036/183] .github/workflows/build.yml: Use 4 instead of 2 processors --- .github/workflows/build.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce3c7889f4b..79c3a74c5d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,16 +93,16 @@ jobs: ./bootstrap && make build working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Build modularized distributions if: (success() || failure()) && steps.worktree.outcome == 'success' run: make V=0 tox && make SAGE_CHECK=no pypi-wheels working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Static code check with pyright if: (success() || failure()) && steps.worktree.outcome == 'success' @@ -137,8 +137,8 @@ jobs: ./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status working-directory: ./worktree-image env: - MAKE: make -j2 - SAGE_NUM_THREADS: 2 + MAKE: make -j4 + SAGE_NUM_THREADS: 4 - name: Build # This step is needed because building the modularized distributions installs some optional packages, @@ -149,8 +149,8 @@ jobs: make build working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 # Testing @@ -161,16 +161,16 @@ jobs: ./sage -t --new -p2 working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Test modularized distributions if: (success() || failure()) && steps.build.outcome == 'success' run: make V=0 tox && make pypi-wheels-check working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Check that all modules can be imported run: | From 06116c4d1a360172e071a22d95e804bdad8540d0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 21:16:25 -0800 Subject: [PATCH 037/183] .github/workflows/doc-build*.yml: Use 4 instead of 2 processors --- .github/workflows/doc-build-pdf.yml | 12 ++++++------ .github/workflows/doc-build.yml | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index 7ae675d9e64..713aa02543d 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -87,8 +87,8 @@ jobs: ./bootstrap && make build working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Build (fallback to non-incremental) id: build @@ -98,8 +98,8 @@ jobs: make sagelib-clean && git clean -fx src/sage && ./config.status && make build working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Build docs (PDF) id: docbuild @@ -108,8 +108,8 @@ jobs: make doc-clean doc-uninstall; make sagemath_doc_html-build-deps sagemath_doc_pdf-no-deps working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Copy docs id: copy diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 9d82909ef5f..1b1198f5ff8 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -95,8 +95,8 @@ jobs: ./bootstrap && make sagemath_doc_html-build-deps working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Build (fallback to non-incremental) id: build @@ -106,8 +106,8 @@ jobs: make sagelib-clean && git clean -fx src/sage && ./config.status && make sagemath_doc_html-build-deps working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Build docs id: docbuild @@ -124,8 +124,8 @@ jobs: ./config.status && make sagemath_doc_html-no-deps working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Copy docs id: copy @@ -169,8 +169,8 @@ jobs: ./config.status && make sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps working-directory: ./worktree-image env: - MAKE: make -j2 --output-sync=recurse - SAGE_NUM_THREADS: 2 + MAKE: make -j4 --output-sync=recurse + SAGE_NUM_THREADS: 4 - name: Copy live doc id: copylivedoc From b2d7229f9775d1375424cbb4228f684cf1ed05d2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 14 Feb 2024 23:15:51 -0800 Subject: [PATCH 038/183] tox.ini (ubuntu-noble): Set IGNORE_MISSING_SYSTEM_PACKAGES=yes --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index db66de3ea4f..cf8507128fd 100644 --- a/tox.ini +++ b/tox.ini @@ -207,6 +207,7 @@ setenv = # https://hub.docker.com/_/ubuntu?tab=description # as of 2024-02, latest=jammy=22.04, rolling=mantic=23.10, devel=noble=24.04 # ubuntu-focal does not have libgap-dev + # ubuntu-noble does not have libbrial-dev # ubuntu: SYSTEM=debian ubuntu: BASE_IMAGE=ubuntu @@ -227,6 +228,7 @@ setenv = ubuntu-lunar: BASE_TAG=lunar ubuntu-mantic: BASE_TAG=mantic ubuntu-noble: BASE_TAG=noble + ubuntu-noble: IGNORE_MISSING_SYSTEM_PACKAGES=yes # # https://hub.docker.com/_/debian # debian-buster does not have libfreetype-dev (it only has libfreetype6-dev) From 995a94b40fca1de83d728b05bed1f111c10b3203 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Mon, 26 Feb 2024 12:32:06 +0000 Subject: [PATCH 039/183] Fix docstring formatting --- src/sage/libs/ntl/ntl_ZZ_pX.pyx | 4 ++-- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pyx b/src/sage/libs/ntl/ntl_ZZ_pX.pyx index 5066de60e3f..8d2e5b1d43b 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pyx @@ -492,7 +492,7 @@ cdef class ntl_ZZ_pX(): def __pow__(self, n, modulus): """ - Return the n-th nonnegative power of self. + Return the ``n``-th nonnegative power of ``self``. If ``modulus`` is not ``None``, the exponentiation is performed modulo the polynomial ``modulus``. @@ -532,7 +532,7 @@ cdef class ntl_ZZ_pX(): cdef ntl_ZZ_pX _pow(ntl_ZZ_pX self, long n): """ - Compute the ``n``-th power of `self``. + Compute the ``n``-th power of ``self``. """ if n < 0: raise NotImplementedError diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 6ce1c1422a7..9ed9acbaa84 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -621,7 +621,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): def __pow__(self, exp, modulus): r""" - Exponentiation of polynomials. + Exponentiation of ``self``. If ``modulus`` is not ``None``, the exponentiation is performed modulo the polynomial ``modulus``. From 992dc4defaa08ed73832b344073bd63c414c913c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 19:22:13 -0800 Subject: [PATCH 040/183] build/pkgs/onetbb: Update to 2021.11.0 --- build/pkgs/onetbb/checksums.ini | 6 +++--- build/pkgs/onetbb/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/onetbb/checksums.ini b/build/pkgs/onetbb/checksums.ini index 69e7ed4d027..42e837760b6 100644 --- a/build/pkgs/onetbb/checksums.ini +++ b/build/pkgs/onetbb/checksums.ini @@ -1,5 +1,5 @@ tarball=onetbb-VERSION.tar.gz -sha1=b991f5d882aba2182871cfe011614cc43b92aa3c -md5=ba4ecedc4949f673a34b35de738a72fc -cksum=211900655 +sha1=740e86b703f42446ddde392b73a9db3dc0f5f4cd +md5=b301151120b08a17e98dcdda6e4f6011 +cksum=3287903962 upstream_url=https://github.com/oneapi-src/oneTBB/archive/refs/tags/vVERSION.tar.gz diff --git a/build/pkgs/onetbb/package-version.txt b/build/pkgs/onetbb/package-version.txt index a6513d2ae59..90431db79ad 100644 --- a/build/pkgs/onetbb/package-version.txt +++ b/build/pkgs/onetbb/package-version.txt @@ -1 +1 @@ -2021.9.0 +2021.11.0 From a80bbf9978fbd76f8103d8eec8a75cd52fd425dc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 19:22:41 -0800 Subject: [PATCH 041/183] build/pkgs/papilo: Update to 2.2.0 --- build/pkgs/papilo/checksums.ini | 6 +++--- build/pkgs/papilo/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/papilo/checksums.ini b/build/pkgs/papilo/checksums.ini index b2385565547..8bebc605f2c 100644 --- a/build/pkgs/papilo/checksums.ini +++ b/build/pkgs/papilo/checksums.ini @@ -1,5 +1,5 @@ tarball=papilo-VERSION.tar.gz -sha1=85d599ac9936aa1ddf687e04273b995522909de5 -md5=c41f5aa615ffc9914f8ca924947aa8cb -cksum=1535425476 +sha1=069f64ff25cfb08c9b2a416d1d215bd5b907c877 +md5=d58b7c991ac1c4a863de92a404409ca8 +cksum=1552180280 upstream_url=https://github.com/scipopt/papilo/archive/refs/tags/vVERSION.tar.gz diff --git a/build/pkgs/papilo/package-version.txt b/build/pkgs/papilo/package-version.txt index 3e3c2f1e5ed..ccbccc3dc62 100644 --- a/build/pkgs/papilo/package-version.txt +++ b/build/pkgs/papilo/package-version.txt @@ -1 +1 @@ -2.1.1 +2.2.0 From 0d444bc37dbe88af8e9bb72fd2ea68a8cf5fd127 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 19:25:39 -0800 Subject: [PATCH 042/183] build/pkgs/scip: Update to 9.0.0 --- build/pkgs/scip/checksums.ini | 10 +++++----- build/pkgs/scip/package-version.txt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/pkgs/scip/checksums.ini b/build/pkgs/scip/checksums.ini index 97b8c8a7084..9dce3926f9b 100644 --- a/build/pkgs/scip/checksums.ini +++ b/build/pkgs/scip/checksums.ini @@ -1,5 +1,5 @@ -tarball=scip-VERSION.tar.gz -sha1=2637767428e285b6ddda8c462f1cc31d66833d80 -md5=b657369986ecd9b2944206d11ecce2e4 -cksum=967379932 -upstream_url=https://github.com/scipopt/scip/archive/refs/tags/vVERSION.tar.gz +tarball=scip-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.tar.gz +sha1=bb28aef4bad00a1ff2c7f4ee982961709d15b9f8 +md5=2fdbc40c98d380b12586bcef6819b9d7 +cksum=1262698285 +upstream_url=https://github.com/scipopt/scip/archive/refs/tags/v${VERSION_MAJOR}${VERSION_MINOR}${VERSION_MICRO}.tar.gz diff --git a/build/pkgs/scip/package-version.txt b/build/pkgs/scip/package-version.txt index 227b54a0631..f7ee06693c1 100644 --- a/build/pkgs/scip/package-version.txt +++ b/build/pkgs/scip/package-version.txt @@ -1 +1 @@ -802 +9.0.0 From 407cc17384e2ac7f9603f5c870f4436b6cb90a78 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 19:33:18 -0800 Subject: [PATCH 043/183] build/pkgs/papilo: Remove patches --- ...o-not-require-boost-program_options-.patch | 26 ------------------- .../import_memory_multiprecision.patch | 20 -------------- 2 files changed, 46 deletions(-) delete mode 100644 build/pkgs/papilo/patches/0001-CMakeLists.txt-Do-not-require-boost-program_options-.patch delete mode 100644 build/pkgs/papilo/patches/import_memory_multiprecision.patch diff --git a/build/pkgs/papilo/patches/0001-CMakeLists.txt-Do-not-require-boost-program_options-.patch b/build/pkgs/papilo/patches/0001-CMakeLists.txt-Do-not-require-boost-program_options-.patch deleted file mode 100644 index 5001ca4d67a..00000000000 --- a/build/pkgs/papilo/patches/0001-CMakeLists.txt-Do-not-require-boost-program_options-.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 1fc5aecb4eca500917407b008c8c8eb8637a9c27 Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Sat, 19 Nov 2022 19:03:37 -0800 -Subject: [PATCH] CMakeLists.txt: Do not require boost program_options for the - library - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7256877..db905aa 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -47,7 +47,7 @@ if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) - endif() - --find_package(Boost ${BOOST_MIN_VERSION} COMPONENTS program_options REQUIRED) -+find_package(Boost ${BOOST_MIN_VERSION} REQUIRED) - - if(GMP) - find_package(GMP) --- -2.37.3 - diff --git a/build/pkgs/papilo/patches/import_memory_multiprecision.patch b/build/pkgs/papilo/patches/import_memory_multiprecision.patch deleted file mode 100644 index 1f16ced0bed..00000000000 --- a/build/pkgs/papilo/patches/import_memory_multiprecision.patch +++ /dev/null @@ -1,20 +0,0 @@ -commit 855bd67a64c5c044080d790e5c9fb7e298a61ab7 -Author: Matthias Koeppe -Date: Thu Dec 8 18:10:29 2022 -0800 - - src/papilo/misc/MultiPrecision.hpp: Add #include - -diff --git a/src/papilo/misc/MultiPrecision.hpp b/src/papilo/misc/MultiPrecision.hpp -index 669014c..44d3e63 100644 ---- a/src/papilo/misc/MultiPrecision.hpp -+++ b/src/papilo/misc/MultiPrecision.hpp -@@ -26,6 +26,9 @@ - - #include "papilo/Config.hpp" - -+// work around build failure with boost on Fedora 37 -+#include -+ - #include - - #ifdef PAPILO_HAVE_FLOAT128 From bb3805307241b349c202ccc3ef3de2514ea19939 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 20:57:19 -0800 Subject: [PATCH 044/183] build/pkgs/scip: Remove patches/no_rpath.patch --- build/pkgs/scip/patches/no_rpath.patch | 40 -------------------------- 1 file changed, 40 deletions(-) delete mode 100644 build/pkgs/scip/patches/no_rpath.patch diff --git a/build/pkgs/scip/patches/no_rpath.patch b/build/pkgs/scip/patches/no_rpath.patch deleted file mode 100644 index 28b4220b6b3..00000000000 --- a/build/pkgs/scip/patches/no_rpath.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit eaff18abb55c86e90d44583731550c874dc3c3e0 -Author: Matthias Koeppe -Date: Sun Nov 27 14:12:32 2022 -0800 - - CMakeLists.txt: Remove hardcoded RPATH settings - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 8629ace18b..db2505d74b 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,8 +3,7 @@ - # - function(setLibProperties targetname outputname) - set_target_properties(${targetname} PROPERTIES -- OUTPUT_NAME ${outputname} -- MACOSX_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -+ OUTPUT_NAME ${outputname}) - endfunction(setLibProperties) - - set(CMAKE_C_STANDARD 99) -@@ -1092,7 +1091,6 @@ add_dependencies(scip scip_update_githash) - set_target_properties(libscip PROPERTIES - VERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR}.${SCIP_VERSION_PATCH}.${SCIP_VERSION_SUB} - SOVERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR} -- INSTALL_RPATH_USE_LINK_PATH TRUE - CXX_VISIBILITY_PRESET hidden - C_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN 1) -@@ -1102,11 +1100,6 @@ target_include_directories(scip PUBLIC - $ - $) - --# set the install rpath to the installed destination --set_target_properties(scip PROPERTIES -- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" -- INSTALL_RPATH_USE_LINK_PATH TRUE) -- - # install the header files of scip - install(FILES ${lpiheaders} DESTINATION include/lpi) - install(FILES ${dijkstraheaders} DESTINATION include/dijkstra) From 6c9a3526ca9f8c7e3428bc3a4f9cec800647eca5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 21:11:51 -0800 Subject: [PATCH 045/183] build/pkgs/scip/dependencies: Add bliss --- build/pkgs/scip/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/scip/dependencies b/build/pkgs/scip/dependencies index 62836bef5a5..fb21a14a5dd 100644 --- a/build/pkgs/scip/dependencies +++ b/build/pkgs/scip/dependencies @@ -1,4 +1,4 @@ -$(MP_LIBRARY) readline soplex papilo zlib | cmake +$(MP_LIBRARY) readline soplex papilo zlib bliss | cmake ---------- All lines of this file are ignored except the first. From 76ef32c70fb39b8795f71d00f018333f7666328d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 21:14:25 -0800 Subject: [PATCH 046/183] build/pkgs/scip_sdp: Update to 4.3.0 --- build/pkgs/scip_sdp/checksums.ini | 6 +++--- build/pkgs/scip_sdp/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/scip_sdp/checksums.ini b/build/pkgs/scip_sdp/checksums.ini index b0e38cf751d..94370bcab39 100644 --- a/build/pkgs/scip_sdp/checksums.ini +++ b/build/pkgs/scip_sdp/checksums.ini @@ -1,5 +1,5 @@ tarball=scipsdp-VERSION.tgz -sha1=dcfb090a95f79df8524bcc63d34d7ddc6692924e -md5=4f900c60456b3f08160ca494bec8e9f4 -cksum=2622380399 +sha1=d5482fd414fdcaa38d6d80111bbe8931aeef63ea +md5=0de7752ba6602e3432940eaaf79dfa9d +cksum=162799809 upstream_url=http://www.opt.tu-darmstadt.de/scipsdp/downloads/scipsdp-VERSION.tgz diff --git a/build/pkgs/scip_sdp/package-version.txt b/build/pkgs/scip_sdp/package-version.txt index ee74734aa22..80895903a15 100644 --- a/build/pkgs/scip_sdp/package-version.txt +++ b/build/pkgs/scip_sdp/package-version.txt @@ -1 +1 @@ -4.1.0 +4.3.0 From ed0aae9b8514966b51063a210591fbfb0c185cf0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 21:19:18 -0800 Subject: [PATCH 047/183] build/pkgs/scip_sdp/patches: Remove --- ...9cf75146ca34c637f919d1f4527a63743300.patch | 55 ------------- build/pkgs/scip_sdp/patches/macos_link.patch | 19 ----- build/pkgs/scip_sdp/patches/no_rpath.patch | 35 -------- .../patches/zz_another_blas_change.patch | 80 ------------------- 4 files changed, 189 deletions(-) delete mode 100644 build/pkgs/scip_sdp/patches/findlapack-09e79cf75146ca34c637f919d1f4527a63743300.patch delete mode 100644 build/pkgs/scip_sdp/patches/macos_link.patch delete mode 100644 build/pkgs/scip_sdp/patches/no_rpath.patch delete mode 100644 build/pkgs/scip_sdp/patches/zz_another_blas_change.patch diff --git a/build/pkgs/scip_sdp/patches/findlapack-09e79cf75146ca34c637f919d1f4527a63743300.patch b/build/pkgs/scip_sdp/patches/findlapack-09e79cf75146ca34c637f919d1f4527a63743300.patch deleted file mode 100644 index a2ec71a5e71..00000000000 --- a/build/pkgs/scip_sdp/patches/findlapack-09e79cf75146ca34c637f919d1f4527a63743300.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 09e79cf75146ca34c637f919d1f4527a63743300 Mon Sep 17 00:00:00 2001 -From: Marc Pfetsch -Date: Fri, 9 Dec 2022 18:52:09 +0100 -Subject: [PATCH] use cmake FindLAPACK - ---- - CMakeLists.txt | 14 +++++--------- - src/CMakeLists.txt | 6 +++--- - 2 files changed, 8 insertions(+), 12 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 15e4edc..d4f14f5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -79,16 +79,12 @@ add_custom_target(scip_update_githash - COMMAND ${CMAKE_COMMAND} -DDST=${PROJECT_SOURCE_DIR}/scipsdpgithash.c - -P ${CMAKE_BINARY_DIR}/scip_update_githash.cmake) - -- - # find lapack and blas --find_library(LAPACK_LIBRARY lapack) --if(LAPACK_LIBRARY) -- message(STATUS "Found lapack library: " ${LAPACK_LIBRARY}) --endif() -- --find_library(BLAS_LIBRARY blas) --if(BLAS_LIBRARY) -- message(STATUS "Found blas library: " ${BLAS_LIBRARY}) -+find_package(LAPACK REQUIRED) -+if(LAPACK_FOUND) -+ message(STATUS "Found lapack library: " ${LAPACK_LIBRARIES}) -+else() -+ message(FATAL_ERROR "Lapack not found") - endif() - - # search the selected symmetry computation program -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 30c66b7..5e5d7d3 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -125,11 +125,11 @@ setLibProperties(libscipsdp "scipsdp") - #put binary in bin directory - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - if(SHARED) -- target_link_libraries(libscipsdp PRIVATE ${ZIMPL_PIC_LIBRARIES} ${SDPS_PIC_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARY} ${BLAS_LIBRARY} m) -+ target_link_libraries(libscipsdp PRIVATE ${ZIMPL_PIC_LIBRARIES} ${SDPS_PIC_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) - add_executable(scipsdp scipsdp/main.c ${scipsdpsources} ${objscipsdpsources} ${sdpisources} ${sym}) -- target_link_libraries(scipsdp ${ZLIB_LIBRARIES} ${Readline_LIBRARY} ${GMP_LIBRARIES} ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARY} ${BLAS_LIBRARY} m) -+ target_link_libraries(scipsdp ${ZLIB_LIBRARIES} ${Readline_LIBRARY} ${GMP_LIBRARIES} ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) - else() -- target_link_libraries(libscipsdp PRIVATE ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARY} ${BLAS_LIBRARY} m) -+ target_link_libraries(libscipsdp PRIVATE ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) - add_executable(scipsdp scipsdp/main.c ${scipsdpsources} ${objscipsdpsources} ${sdpisources} ${sym}) - target_link_libraries(scipsdp libscipsdp ${SCIP_LIBRARIES}) - endif() diff --git a/build/pkgs/scip_sdp/patches/macos_link.patch b/build/pkgs/scip_sdp/patches/macos_link.patch deleted file mode 100644 index 16f2da86d22..00000000000 --- a/build/pkgs/scip_sdp/patches/macos_link.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 09f4b596870a2774f7104e318d9812cd5c7ace4a -Author: Matthias Koeppe -Date: Wed Dec 7 14:59:49 2022 -0800 - - src/CMakeLists.txt: Link libscipsdp through with libscip - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5e5d7d3..ac3841e 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -125,7 +125,7 @@ setLibProperties(libscipsdp "scipsdp") - #put binary in bin directory - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - if(SHARED) -- target_link_libraries(libscipsdp PRIVATE ${ZIMPL_PIC_LIBRARIES} ${SDPS_PIC_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) -+ target_link_libraries(libscipsdp PRIVATE ${ZIMPL_PIC_LIBRARIES} ${SDPS_PIC_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) - add_executable(scipsdp scipsdp/main.c ${scipsdpsources} ${objscipsdpsources} ${sdpisources} ${sym}) - target_link_libraries(scipsdp ${ZLIB_LIBRARIES} ${Readline_LIBRARY} ${GMP_LIBRARIES} ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) - else() diff --git a/build/pkgs/scip_sdp/patches/no_rpath.patch b/build/pkgs/scip_sdp/patches/no_rpath.patch deleted file mode 100644 index a4509df7fc7..00000000000 --- a/build/pkgs/scip_sdp/patches/no_rpath.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit b12db4b95295fec9b32131039a6ee4a746c6f832 -Author: Matthias Koeppe -Date: Wed Dec 7 15:03:48 2022 -0800 - - src/CMakeLists.txt: Remote hardcoded RPATH settings - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index f293115..64ac3d1 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -5,8 +5,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - # - function(setLibProperties targetname outputname) - set_target_properties(${targetname} PROPERTIES -- OUTPUT_NAME ${outputname} -- MACOSX_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -+ OUTPUT_NAME ${outputname}) - endfunction(setLibProperties) - - set(CMAKE_C_STANDARD 99) -@@ -141,13 +140,7 @@ target_compile_definitions(scipsdp PRIVATE EXTERN=extern) - - set_target_properties(libscipsdp PROPERTIES - VERSION ${SCIPSDP_VERSION_MAJOR}.${SCIPSDP_VERSION_MINOR}.${SCIPSDP_VERSION_PATCH} -- SOVERSION ${SCIPSDP_VERSION_MAJOR}.${SCIPSDP_VERSION_MINOR} -- INSTALL_RPATH_USE_LINK_PATH TRUE) -- --# set the install rpath to the installed destination --set_target_properties(scipsdp PROPERTIES -- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" -- INSTALL_RPATH_USE_LINK_PATH TRUE) -+ SOVERSION ${SCIPSDP_VERSION_MAJOR}.${SCIPSDP_VERSION_MINOR}) - - # install the header files of scip - install(FILES ${sdpiheaders} DESTINATION include/sdpi) diff --git a/build/pkgs/scip_sdp/patches/zz_another_blas_change.patch b/build/pkgs/scip_sdp/patches/zz_another_blas_change.patch deleted file mode 100644 index 132f13eab82..00000000000 --- a/build/pkgs/scip_sdp/patches/zz_another_blas_change.patch +++ /dev/null @@ -1,80 +0,0 @@ -commit acb468a1805055e9f34dc1057eea186335bc2e13 -Author: Matthias Koeppe -Date: Fri Dec 9 15:53:05 2022 -0800 - - cmake/Modules/Find{DSDP,MOSEK}.cmake: Do not hardcode blas/lapack lib names here - -commit 8c8f7f82a16af70e044526f2911a94429d65b588 -Author: Matthias Koeppe -Date: Fri Dec 9 19:09:51 2022 -0800 - - CMakeLists.txt, src/CMakeLists.txt: Explicitly link through with blas - - -diff --git a/cmake/Modules/FindDSDP.cmake b/cmake/Modules/FindDSDP.cmake -index 8f43ae8..376fbdb 100644 ---- a/cmake/Modules/FindDSDP.cmake -+++ b/cmake/Modules/FindDSDP.cmake -@@ -8,7 +8,7 @@ find_library(DSDP_LIBRARY - HINTS ${DSDP_DIR} $ENV{DSDP_DIR} - PATH_SUFFIXES lib) - --set(DSDP_LIBRARIES ${DSDP_LIBRARY} -llapack -lblas) -+set(DSDP_LIBRARIES ${DSDP_LIBRARY}) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(DSDP DEFAULT_MSG DSDP_INCLUDE_DIRS DSDP_LIBRARIES) -diff --git a/cmake/Modules/FindMOSEK.cmake b/cmake/Modules/FindMOSEK.cmake -index a8ee1d6..e3b7ab7 100644 ---- a/cmake/Modules/FindMOSEK.cmake -+++ b/cmake/Modules/FindMOSEK.cmake -@@ -15,10 +15,10 @@ find_library(IOMP5_LIBRARY - PATH_SUFFIXES bin) - - if(IOMPS_LIBRARY) -- set(MOSEK_LIBRARIES ${MOSEK_LIBRARY} ${IOMP5_LIBRARY} -llapack -lblas -pthread) -+ set(MOSEK_LIBRARIES ${MOSEK_LIBRARY} ${IOMP5_LIBRARY} -pthread) - else() - # if libiomps is not available, we skip it -- set(MOSEK_LIBRARIES ${MOSEK_LIBRARY} -llapack -lblas -pthread) -+ set(MOSEK_LIBRARIES ${MOSEK_LIBRARY} -pthread) - endif() - - include(FindPackageHandleStandardArgs) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index d4f14f5..fd2bdf9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -86,6 +86,12 @@ if(LAPACK_FOUND) - else() - message(FATAL_ERROR "Lapack not found") - endif() -+find_package(BLAS REQUIRED) -+if(BLAS_FOUND) -+ message(STATUS "Found blas library: " ${BLAS_LIBRARIES}) -+else() -+ message(FATAL_ERROR "Blas not found") -+endif() - - # search the selected symmetry computation program - message(STATUS "Finding symmetry computation program \"${SYM}\"") -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 5e5d7d3..b3e2be9 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -125,11 +125,11 @@ setLibProperties(libscipsdp "scipsdp") - #put binary in bin directory - set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) - if(SHARED) -- target_link_libraries(libscipsdp PRIVATE ${ZIMPL_PIC_LIBRARIES} ${SDPS_PIC_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) -+ target_link_libraries(libscipsdp PRIVATE ${ZIMPL_PIC_LIBRARIES} ${SDPS_PIC_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} m) - add_executable(scipsdp scipsdp/main.c ${scipsdpsources} ${objscipsdpsources} ${sdpisources} ${sym}) -- target_link_libraries(scipsdp ${ZLIB_LIBRARIES} ${Readline_LIBRARY} ${GMP_LIBRARIES} ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) -+ target_link_libraries(scipsdp ${ZLIB_LIBRARIES} ${Readline_LIBRARY} ${GMP_LIBRARIES} ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SCIP_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} m) - else() -- target_link_libraries(libscipsdp PRIVATE ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} m) -+ target_link_libraries(libscipsdp PRIVATE ${ZIMPL_LIBRARIES} ${SDPS_LIBRARIES} ${SYM_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} m) - add_executable(scipsdp scipsdp/main.c ${scipsdpsources} ${objscipsdpsources} ${sdpisources} ${sym}) - target_link_libraries(scipsdp libscipsdp ${SCIP_LIBRARIES}) - endif() From 70df6458e873177d475798efb8c49857a2d5c6cf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 12:21:20 -0800 Subject: [PATCH 048/183] build/pkgs/scip: Add patch from https://github.com/scipopt/SCIP-SDP/issues/12\#issuecomment-1969453709 --- build/pkgs/scip/package-version.txt | 2 +- .../pkgs/scip/patches/struct_symmetry_header.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/scip/patches/struct_symmetry_header.patch diff --git a/build/pkgs/scip/package-version.txt b/build/pkgs/scip/package-version.txt index f7ee06693c1..486ff8cd7ba 100644 --- a/build/pkgs/scip/package-version.txt +++ b/build/pkgs/scip/package-version.txt @@ -1 +1 @@ -9.0.0 +9.0.0.p0 diff --git a/build/pkgs/scip/patches/struct_symmetry_header.patch b/build/pkgs/scip/patches/struct_symmetry_header.patch new file mode 100644 index 00000000000..39d9114a58e --- /dev/null +++ b/build/pkgs/scip/patches/struct_symmetry_header.patch @@ -0,0 +1,14 @@ +From https://github.com/scipopt/SCIP-SDP/issues/12#issuecomment-1969453709 + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5392127c5d..b66e86dec5 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -991,6 +991,7 @@ set(scipheaders + set(symheaders + symmetry/build_sassy_graph.h + symmetry/compute_symmetry.h ++ symmetry/struct_symmetry.h + symmetry/type_symmetry.h + ) + From 9a29147d41d8b48e34eda94ffb4ac8fa0a0f5b7f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 12:35:34 -0800 Subject: [PATCH 049/183] build/pkgs/soplex: Update to 7.0.0 --- build/pkgs/soplex/checksums.ini | 8 ++++---- build/pkgs/soplex/package-version.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/pkgs/soplex/checksums.ini b/build/pkgs/soplex/checksums.ini index 5689a553333..866f76b3ba9 100644 --- a/build/pkgs/soplex/checksums.ini +++ b/build/pkgs/soplex/checksums.ini @@ -1,5 +1,5 @@ tarball=soplex-VERSION.tar.gz -sha1=6777fa6e7fd02ea6805901dbf60d873b4c312b62 -md5=2865c3a95ee903307d4bd32b0c9594e7 -cksum=278250056 -upstream_url=https://github.com/scipopt/soplex/archive/refs/tags/release-VERSION.tar.gz +sha1=5d0e7fa41b45aa0877134a5b8e261d9608505636 +md5=28be7e9aa5579ccd62cbe492d874ca2a +cksum=232471152 +upstream_url=https://github.com/scipopt/soplex/archive/refs/tags/release-${VERSION_MAJOR}${VERSION_MINOR}${VERSION_MICRO}.tar.gz diff --git a/build/pkgs/soplex/package-version.txt b/build/pkgs/soplex/package-version.txt index 85c3d27e59d..66ce77b7ead 100644 --- a/build/pkgs/soplex/package-version.txt +++ b/build/pkgs/soplex/package-version.txt @@ -1 +1 @@ -602 +7.0.0 From 297cb51b18374fa63caec8f44f12a4dc5f654010 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 12:42:30 -0800 Subject: [PATCH 050/183] build/pkgs/soplex/patches/no_rpath.patch: Remove --- build/pkgs/soplex/patches/no_rpath.patch | 44 ------------------------ 1 file changed, 44 deletions(-) delete mode 100644 build/pkgs/soplex/patches/no_rpath.patch diff --git a/build/pkgs/soplex/patches/no_rpath.patch b/build/pkgs/soplex/patches/no_rpath.patch deleted file mode 100644 index 7cad9b059f7..00000000000 --- a/build/pkgs/soplex/patches/no_rpath.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit 0c2527842fe4eaed8d9e5107d6a6621b3d6a716f -Author: Matthias Koeppe -Date: Sat Nov 26 17:08:40 2022 -0800 - - CMakeLists.txt, src/CMakeLists.txt: Remove hardcoded RPATH settings - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4f8635fc..6f7a6e1b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -64,9 +64,6 @@ if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Release) - endif() - --# set the correct rpath for OS X --set(CMAKE_MACOSX_RPATH ON) -- - # use C++14 standard - set(CMAKE_CXX_STANDARD 14) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 27d52f14..fd3705ed 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -3,8 +3,7 @@ - # - function(setLibProperties targetname outputname) - set_target_properties(${targetname} PROPERTIES -- OUTPUT_NAME ${outputname} -- MACOSX_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -+ OUTPUT_NAME ${outputname}) - endfunction(setLibProperties) - - include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) -@@ -200,9 +199,6 @@ endif() - add_executable(example EXCLUDE_FROM_ALL example.cpp) - target_link_libraries(example libsoplex) - --# set the install rpath to the installed destination --set_target_properties(soplex PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -- - # install the header files of soplex - install(FILES ${headers} ${PROJECT_BINARY_DIR}/soplex/config.h DESTINATION include/soplex) - install(FILES soplex.h soplex.hpp soplex_interface.h DESTINATION include) From fc3c9a18479a2aa28de6e72ddda438ac82ee23d6 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 1 Mar 2024 17:43:52 +0000 Subject: [PATCH 051/183] Add -Infinity as degree for LaurentPolynomialRing --- src/sage/rings/polynomial/laurent_polynomial.pyx | 12 +++++++++++- .../rings/polynomial/laurent_polynomial_mpair.pyx | 13 ++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial.pyx b/src/sage/rings/polynomial/laurent_polynomial.pyx index 03de4a1179f..b5d5323643e 100644 --- a/src/sage/rings/polynomial/laurent_polynomial.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial.pyx @@ -15,6 +15,7 @@ from sage.misc.derivative import multi_derivative from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.polynomial.polynomial_ring import is_PolynomialRing from sage.structure.richcmp cimport richcmp, rich_to_bool +from sage.rings.infinity import minus_infinity cdef class LaurentPolynomial(CommutativeAlgebraElement): @@ -1018,7 +1019,7 @@ cdef class LaurentPolynomial_univariate(LaurentPolynomial): return ret def degree(self): - """ + r""" Return the degree of ``self``. EXAMPLES:: @@ -1030,7 +1031,16 @@ cdef class LaurentPolynomial_univariate(LaurentPolynomial): sage: g = -10/x^5 + x^2 - x^7 sage: g.degree() 7 + + The zero polynomial is defined to have degree `-\infty`:: + + sage: R. = LaurentPolynomialRing(ZZ) + sage: R.zero().degree() + -Infinity """ + # The zero polynomial is defined to have degree -Infinity + if self.is_zero(): + return minus_infinity return self.__u.degree() + self.__n def __neg__(self): diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index 893b81c87af..c84a34a4a90 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -16,6 +16,7 @@ from sage.structure.factorization import Factorization from sage.misc.derivative import multi_derivative from sage.rings.polynomial.polydict cimport monomial_exponent from sage.matrix.matrix0 cimport Matrix +from sage.rings.infinity import minus_infinity cdef class LaurentPolynomial_mpair(LaurentPolynomial): @@ -1155,7 +1156,7 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): return [a.eadd(self._mon) for a in self._poly.exponents()] def degree(self, x=None): - """ + r""" Return the degree of ``x`` in ``self``. EXAMPLES:: @@ -1168,7 +1169,17 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): 1 sage: f.degree(z) 0 + + The zero polynomial is defined to have degree `-\infty`:: + + sage: R. = LaurentPolynomialRing(ZZ) + sage: R.zero().degree() + -Infinity """ + # The zero polynomial is defined to have degree -Infinity + if self.is_zero(): + return minus_infinity + if not x: return self._poly.total_degree() + sum(self._mon) From 976ad8c81c5a878d06491afbcaaa54b210df13fe Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Fri, 1 Mar 2024 18:14:32 +0000 Subject: [PATCH 052/183] Improve docstring for degree --- .../polynomial/laurent_polynomial_mpair.pyx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index c84a34a4a90..3a75f349677 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -1157,12 +1157,15 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): def degree(self, x=None): r""" - Return the degree of ``x`` in ``self``. + Return the degree of ``x`` in ``self``. If ``x`` is ``None`` + then insteads returns the degree of the highest degree term. EXAMPLES:: sage: R. = LaurentPolynomialRing(QQ) sage: f = 4*x^7*z^-1 + 3*x^3*y + 2*x^4*z^-2 + x^6*y^-7 + sage: f.degree() + 6 sage: f.degree(x) 7 sage: f.degree(y) @@ -1172,15 +1175,28 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): The zero polynomial is defined to have degree `-\infty`:: - sage: R. = LaurentPolynomialRing(ZZ) + sage: R. = LaurentPolynomialRing(ZZ) sage: R.zero().degree() -Infinity + sage: R.zero().degree(x) + -Infinity + sage: R.zero().degree(x) == R.zero().degree(y) == R.zero().degree(z) + True + + TESTS:: + + sage: R. = LaurentPolynomialRing(ZZ) + sage: f = x + y + z + sage: f.degree(1) + Traceback (most recent call last): + ... + TypeError: x must be a generator of parent """ # The zero polynomial is defined to have degree -Infinity if self.is_zero(): return minus_infinity - if not x: + if x is None: return self._poly.total_degree() + sum(self._mon) cdef tuple g = self._parent.gens() From b76407e4fbccd28f30a6686223bdee51dff47c4f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 3 Mar 2024 09:49:49 -0800 Subject: [PATCH 053/183] build/pkgs/scip_sdp/spkg-install.in: Use 'ctest --rerun-failed --output-on-failure' --- build/pkgs/scip_sdp/spkg-check.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build/pkgs/scip_sdp/spkg-check.in b/build/pkgs/scip_sdp/spkg-check.in index 8df53fc6a36..8ef3bb74f54 100644 --- a/build/pkgs/scip_sdp/spkg-check.in +++ b/build/pkgs/scip_sdp/spkg-check.in @@ -1,3 +1,6 @@ cd src cd build $MAKE test +if [ $? != 0 ]; then + ctest --rerun-failed --output-on-failure +fi From 0563c507a45bcd9dcc6689564f16b9fd0170058f Mon Sep 17 00:00:00 2001 From: adrinospy Date: Mon, 4 Mar 2024 04:31:30 +0530 Subject: [PATCH 054/183] added functionality to ignore blank lines --- .github/workflows/sync_labels.yml | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.github/workflows/sync_labels.yml b/.github/workflows/sync_labels.yml index 56fe526eb8e..d174170d804 100644 --- a/.github/workflows/sync_labels.yml +++ b/.github/workflows/sync_labels.yml @@ -64,3 +64,66 @@ jobs: GITHUB_TOKEN: ${{ env.TOKEN }} REPO_URL: ${{ github.event.repository.html_url }} LOG_LEVEL: ${{ vars.SYNC_LABELS_LOG_LEVEL }} # variable from repository settings, values can be "--debug", "--info" or "--warning" + + # add labels based on size + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Add labels based on size + run: | + git fetch origin ${{ github.base_ref }} + CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) + CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + + # ignore blank lines + CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') + + # count total no of lines + CHANGES=$(echo "$CHANGES" | wc -l) + + echo "CHANGES MADE: $CHANGES" + + MINIMAL_THRESHOLD=50 + + SMALL_THRESHOLD=100 + MODERATE_THRESHOLD=300 + + PR_NUMBER="${{ github.event.number }}" + API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" + AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" + + DELETE_LABELS=("v: minimal" "v: small" "v: moderate" "v: large") + + if [ "$CHANGES" -le "$MINIMAL_THRESHOLD" ]; then + LABEL="v: minimal" + elif [ "$CHANGES" -le "$SMALL_THRESHOLD" ]; then + LABEL="v: small" + elif [ "$CHANGES" -le "$MODERATE_THRESHOLD" ]; then + LABEL="v: moderate" + else + LABEL="v: large" + fi + + DELETE_LABELS=("${DELETE_LABELS[@]//${LABEL}}") + + echo "Adding label: $LABEL" + curl -X POST \ + -H "$AUTH_HEADER" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + -d "{\"labels\":[\"$LABEL\"]}" \ + "$API_URL" >/dev/null + + echo "Deleting Labels:" + for DELETE_LABEL in "${DELETE_LABELS[@]}"; do + ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') + curl -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "$AUTH_HEADER" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "$API_URL/$ENCODED_LABEL" >/dev/null + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1b95968aa945727bfad4f63ef36d704c34f61a7b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 3 Mar 2024 18:18:18 -0800 Subject: [PATCH 055/183] build/pkgs/{soplex,scip}: Re-add rebased rpath patches --- ....txt-Remove-hardcoded-RPATH-settings.patch | 46 ++++++++++++++++ ...rc-CMakeLists.txt-Remove-hardcoded-R.patch | 52 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 build/pkgs/scip/patches/0001-CMakeLists.txt-Remove-hardcoded-RPATH-settings.patch create mode 100644 build/pkgs/soplex/patches/0001-CMakeLists.txt-src-CMakeLists.txt-Remove-hardcoded-R.patch diff --git a/build/pkgs/scip/patches/0001-CMakeLists.txt-Remove-hardcoded-RPATH-settings.patch b/build/pkgs/scip/patches/0001-CMakeLists.txt-Remove-hardcoded-RPATH-settings.patch new file mode 100644 index 00000000000..ad9449c59cb --- /dev/null +++ b/build/pkgs/scip/patches/0001-CMakeLists.txt-Remove-hardcoded-RPATH-settings.patch @@ -0,0 +1,46 @@ +From 5a05bcd05b75ca8f6b2228b08f57ff71ba46329b Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Sun, 3 Mar 2024 18:15:12 -0800 +Subject: [PATCH] CMakeLists.txt: Remove hardcoded RPATH settings + +--- + src/CMakeLists.txt | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5392127c5d..995d194aee 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -5,8 +5,7 @@ include(GNUInstallDirs) + + function(setLibProperties targetname outputname) + set_target_properties(${targetname} PROPERTIES +- OUTPUT_NAME ${outputname} +- MACOSX_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") ++ OUTPUT_NAME ${outputname}) + endfunction(setLibProperties) + + set(CMAKE_C_STANDARD 99) +@@ -1118,7 +1117,6 @@ add_dependencies(scip scip_update_githash) + set_target_properties(libscip PROPERTIES + VERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR}.${SCIP_VERSION_PATCH}.${SCIP_VERSION_SUB} + SOVERSION ${SCIP_VERSION_MAJOR}.${SCIP_VERSION_MINOR} +- INSTALL_RPATH_USE_LINK_PATH TRUE + CXX_VISIBILITY_PRESET hidden + C_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN 1) +@@ -1128,11 +1126,6 @@ target_include_directories(scip BEFORE PUBLIC + $ + $) + +-# set the install rpath to the installed destination +-set_target_properties(scip PROPERTIES +- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" +- INSTALL_RPATH_USE_LINK_PATH TRUE) +- + # install the header files of scip + install(FILES ${lpiheaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lpi) + install(FILES ${dijkstraheaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dijkstra) +-- +2.42.0 + diff --git a/build/pkgs/soplex/patches/0001-CMakeLists.txt-src-CMakeLists.txt-Remove-hardcoded-R.patch b/build/pkgs/soplex/patches/0001-CMakeLists.txt-src-CMakeLists.txt-Remove-hardcoded-R.patch new file mode 100644 index 00000000000..b875781ebc1 --- /dev/null +++ b/build/pkgs/soplex/patches/0001-CMakeLists.txt-src-CMakeLists.txt-Remove-hardcoded-R.patch @@ -0,0 +1,52 @@ +From d96dd5fbfb790ab961243ef2cb5f1d0137e1f8a5 Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Sun, 3 Mar 2024 18:09:53 -0800 +Subject: [PATCH] CMakeLists.txt, src/CMakeLists.txt: Remove hardcoded RPATH + settings + +--- + CMakeLists.txt | 3 --- + src/CMakeLists.txt | 6 +----- + 2 files changed, 1 insertion(+), 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 25317fc0..310d29a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -65,9 +65,6 @@ if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) + endif() + +-# set the correct rpath for OS X +-set(CMAKE_MACOSX_RPATH ON) +- + # use C++14 standard + set(CMAKE_CXX_STANDARD 14) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d259115d..ffdf0435 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -3,8 +3,7 @@ + # + function(setLibProperties targetname outputname) + set_target_properties(${targetname} PROPERTIES +- OUTPUT_NAME ${outputname} +- MACOSX_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") ++ OUTPUT_NAME ${outputname}) + endfunction(setLibProperties) + + include(GNUInstallDirs) +@@ -208,9 +207,6 @@ endif() + add_executable(example EXCLUDE_FROM_ALL example.cpp) + target_link_libraries(example libsoplex) + +-# set the install rpath to the installed destination +-set_target_properties(soplex PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +- + # install the header files of soplex + install(FILES ${headers} ${PROJECT_BINARY_DIR}/soplex/config.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/soplex) + install(FILES soplex.h soplex.hpp soplex_interface.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-- +2.42.0 + From 0023d7d103be6001ed6311421a75e311b252eb0f Mon Sep 17 00:00:00 2001 From: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:42:42 +0000 Subject: [PATCH 056/183] Update comment to show the degree is the total degree --- src/sage/rings/polynomial/laurent_polynomial_mpair.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index 3a75f349677..51cec89f3c5 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -1157,8 +1157,9 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): def degree(self, x=None): r""" - Return the degree of ``x`` in ``self``. If ``x`` is ``None`` - then insteads returns the degree of the highest degree term. + If ``x`` is ``None``, return the total degreee of ``self``. + Otherwise, if ``x`` is generator of the ring, returns the + degree of ``x`` in ``self``. EXAMPLES:: From 52a0b30a858343df1932c2bc2d0d01e66b344a93 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Mon, 4 Mar 2024 14:52:03 +0000 Subject: [PATCH 057/183] Reformaty docstring --- .../rings/polynomial/laurent_polynomial_mpair.pyx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index 51cec89f3c5..74b6f57fd7b 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -1157,9 +1157,17 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): def degree(self, x=None): r""" - If ``x`` is ``None``, return the total degreee of ``self``. - Otherwise, if ``x`` is generator of the ring, returns the - degree of ``x`` in ``self``. + Return the degree of ``self``. + + INPUT: + + - ``x`` -- (default: ``None``) a generator of the parent ring + + OUTPUT: + + If ``x`` is ``None``, return the maximum degree of the monomials of + ``self``. If ``x`` is given and it is a generator of the parent + ring, the output is the maximum degree in ``x`` of ``self``. EXAMPLES:: From 171a3804396369b830499f71995a07525a63cbe0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Mar 2024 12:51:36 -0800 Subject: [PATCH 058/183] build/pkgs/pyscipopt: Update to 5.0.0 --- build/pkgs/pyscipopt/checksums.ini | 6 +++--- build/pkgs/pyscipopt/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/pyscipopt/checksums.ini b/build/pkgs/pyscipopt/checksums.ini index 5b537d4c57d..1232c25dff5 100644 --- a/build/pkgs/pyscipopt/checksums.ini +++ b/build/pkgs/pyscipopt/checksums.ini @@ -1,5 +1,5 @@ tarball=PySCIPOpt-VERSION.tar.gz -sha1=5ae7f3d7e9d8b344ee9a4413154ae80a5ee137de -md5=32a4dced7e74a1c290b32ef0da751129 -cksum=2258510906 +sha1=713e32cc0ff112500c4f43487614094ece4a8bbf +md5=ee425a362744a4475228510b48781be9 +cksum=1541742154 upstream_url=https://pypi.io/packages/source/p/pyscipopt/PySCIPOpt-VERSION.tar.gz diff --git a/build/pkgs/pyscipopt/package-version.txt b/build/pkgs/pyscipopt/package-version.txt index fdc6698807a..0062ac97180 100644 --- a/build/pkgs/pyscipopt/package-version.txt +++ b/build/pkgs/pyscipopt/package-version.txt @@ -1 +1 @@ -4.4.0 +5.0.0 From d2f7adb875142bc7b7c09a800def67833b1e8fdb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Mar 2024 12:51:55 -0800 Subject: [PATCH 059/183] build/pkgs/pyscipopt/patches/792.patch: Remove --- build/pkgs/pyscipopt/patches/792.patch | 1217 ------------------------ 1 file changed, 1217 deletions(-) delete mode 100644 build/pkgs/pyscipopt/patches/792.patch diff --git a/build/pkgs/pyscipopt/patches/792.patch b/build/pkgs/pyscipopt/patches/792.patch deleted file mode 100644 index faff6076eb4..00000000000 --- a/build/pkgs/pyscipopt/patches/792.patch +++ /dev/null @@ -1,1217 +0,0 @@ -From 96acc6be39b6d153cfcfe7b14741956eaf7f5851 Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Sun, 18 Feb 2024 19:47:52 -0800 -Subject: [PATCH] src/pyscipopt: Add 'noexcept' to functions that use 'with - gil' - ---- - src/pyscipopt/benders.pxi | 30 ++++++++--------- - src/pyscipopt/benderscut.pxi | 14 ++++---- - src/pyscipopt/branchrule.pxi | 18 +++++----- - src/pyscipopt/conshdlr.pxi | 64 ++++++++++++++++++------------------ - src/pyscipopt/cutsel.pxi | 14 ++++---- - src/pyscipopt/event.pxi | 18 +++++----- - src/pyscipopt/heuristic.pxi | 14 ++++---- - src/pyscipopt/nodesel.pxi | 16 ++++----- - src/pyscipopt/presol.pxi | 14 ++++---- - src/pyscipopt/pricer.pxi | 16 ++++----- - src/pyscipopt/propagator.pxi | 22 ++++++------- - src/pyscipopt/reader.pxi | 8 ++--- - src/pyscipopt/relax.pxi | 14 ++++---- - src/pyscipopt/scip.pxd | 2 +- - src/pyscipopt/scip.pxi | 4 +-- - src/pyscipopt/sepa.pxi | 16 ++++----- - 16 files changed, 142 insertions(+), 142 deletions(-) - -diff --git a/src/pyscipopt/benders.pxi b/src/pyscipopt/benders.pxi -index 3e11db189..66a394d8d 100644 ---- a/src/pyscipopt/benders.pxi -+++ b/src/pyscipopt/benders.pxi -@@ -70,10 +70,10 @@ cdef Variable getPyVar(SCIP_VAR* var): - return vardata - - --cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_Bool threadsafe) with gil: -+cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_Bool threadsafe) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -81,56 +81,56 @@ cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) with gil: - Py_DECREF(PyBenders) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersinitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersexitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) with gil: -+cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.benderscreatesub(probnumber) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* infeasible, SCIP_Bool* auxviol, SCIP_Bool* skipsolve, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* infeasible, SCIP_Bool* auxviol, SCIP_Bool* skipsolve, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -146,7 +146,7 @@ cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_ - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -159,7 +159,7 @@ cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SC - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -174,7 +174,7 @@ cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL - - cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, - SCIP_BENDERSENFOTYPE type, int* mergecands, int npriomergecands, int nmergecands, SCIP_Bool checkint, -- SCIP_Bool infeasible, SCIP_Bool* merged) with gil: -+ SCIP_Bool infeasible, SCIP_Bool* merged) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -190,7 +190,7 @@ cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SO - merged[0] = result_dict.get("merged", False) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) with gil: -+cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -198,7 +198,7 @@ cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probn - return SCIP_OKAY - - #TODO: Really need to ask about the passing and returning of variables --cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber) with gil: -+cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -diff --git a/src/pyscipopt/benderscut.pxi b/src/pyscipopt/benderscut.pxi -index 506a6f065..1ce561a06 100644 ---- a/src/pyscipopt/benderscut.pxi -+++ b/src/pyscipopt/benderscut.pxi -@@ -24,10 +24,10 @@ cdef class Benderscut: - print("python error in benderscutexec: this method needs to be implemented") - return {} - --cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata -@@ -35,35 +35,35 @@ cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) wit - Py_DECREF(PyBenderscut) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata -diff --git a/src/pyscipopt/branchrule.pxi b/src/pyscipopt/branchrule.pxi -index 251aa33b1..2d3411d2c 100644 ---- a/src/pyscipopt/branchrule.pxi -+++ b/src/pyscipopt/branchrule.pxi -@@ -39,10 +39,10 @@ cdef class Branchrule: - - - --cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -@@ -50,35 +50,35 @@ cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) wit - Py_DECREF(PyBranchrule) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -@@ -86,7 +86,7 @@ cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, S - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -@@ -94,7 +94,7 @@ cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, S - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -diff --git a/src/pyscipopt/conshdlr.pxi b/src/pyscipopt/conshdlr.pxi -index 80c60c17c..1299ad35c 100644 ---- a/src/pyscipopt/conshdlr.pxi -+++ b/src/pyscipopt/conshdlr.pxi -@@ -150,16 +150,16 @@ cdef Constraint getPyCons(SCIP_CONS* cons): - - - --cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid) with gil: -+cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) with gil: -+cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consfree() - Py_DECREF(PyConshdlr) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -167,7 +167,7 @@ cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** c - PyConshdlr.consinit(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -175,7 +175,7 @@ cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** c - PyConshdlr.consexit(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -183,7 +183,7 @@ cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consinitpre(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -191,7 +191,7 @@ cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consexitpre(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -199,7 +199,7 @@ cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consinitsol(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) with gil: -+cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -207,7 +207,7 @@ cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consexitsol(constraints, restart) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata) with gil: -+cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - assert consdata[0] == PyCons -@@ -216,7 +216,7 @@ cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - Py_DECREF(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons) with gil: -+cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons) noexcept with gil: - cdef Constraint PyTargetCons - PyConshdlr = getPyConshdlr(conshdlr) - PySourceCons = getPyCons(sourcecons) -@@ -235,7 +235,7 @@ cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* s - PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) with gil: -+cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -244,7 +244,7 @@ cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - infeasible[0] = result_dict.get("infeasible", infeasible[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -254,7 +254,7 @@ cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, -- SCIP_SOL* sol, SCIP_RESULT* result) with gil: -+ SCIP_SOL* sol, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -265,7 +265,7 @@ cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, -- SCIP_Bool solinfeasible, SCIP_RESULT* result) with gil: -+ SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -274,7 +274,7 @@ cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -285,7 +285,7 @@ cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* con - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, -- SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) with gil: -+ SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -295,7 +295,7 @@ cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, -- SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) with gil: -+ SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -306,7 +306,7 @@ cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, -- SCIP_PROPTIMING proptiming, SCIP_RESULT* result) with gil: -+ SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -319,7 +319,7 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, - int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, - int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, -- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: -+ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -354,12 +354,12 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, -- SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) with gil: -+ SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consresprop() - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg) with gil: -+cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - if cons == NULL: - PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) -@@ -368,31 +368,31 @@ cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* co - PyConshdlr.conslock(PyCons, locktype, nlockspos, nlocksneg) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consactive(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consdeactive(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consenable(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consdisable(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -400,7 +400,7 @@ cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consdelvars(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file) with gil: -+cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - # TODO: pass file -@@ -411,7 +411,7 @@ cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SC - SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_Bool initial, - SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, - SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, -- SCIP_Bool isglobal, SCIP_Bool* valid) with gil: -+ SCIP_Bool isglobal, SCIP_Bool* valid) noexcept with gil: - # TODO everything! - PyConshdlr = getPyConshdlr(sourceconshdlr) - PyConshdlr.conscopy() -@@ -421,14 +421,14 @@ cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SC - cdef SCIP_RETCODE PyConsParse (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, const char* name, const char* str, - SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, - SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, -- SCIP_Bool stickingatnode, SCIP_Bool* success) with gil: -+ SCIP_Bool stickingatnode, SCIP_Bool* success) noexcept with gil: - # TODO everything! - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consparse() - success[0] = False - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success) with gil: -+cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success) noexcept with gil: - # TODO - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) -@@ -436,7 +436,7 @@ cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - success[0] = False - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success) with gil: -+cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - result_dict = PyConshdlr.consgetnvars(PyCons) -@@ -445,7 +445,7 @@ cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsGetdivebdchgs (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, -- SCIP_Bool* success, SCIP_Bool* infeasible) with gil: -+ SCIP_Bool* success, SCIP_Bool* infeasible) noexcept with gil: - # TODO - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consgetdivebdchgs() -diff --git a/src/pyscipopt/cutsel.pxi b/src/pyscipopt/cutsel.pxi -index e953cb1e9..d259fb28e 100644 ---- a/src/pyscipopt/cutsel.pxi -+++ b/src/pyscipopt/cutsel.pxi -@@ -29,10 +29,10 @@ cdef class Cutsel: - return {} - - --cdef SCIP_RETCODE PyCutselCopy (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselCopy (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata -@@ -40,7 +40,7 @@ cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: - Py_DECREF(PyCutsel) - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata -@@ -48,21 +48,21 @@ cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: - return SCIP_OKAY - - --cdef SCIP_RETCODE PyCutselExit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselExit (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata - PyCutsel.cutselexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselInitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselInitsol (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata - PyCutsel.cutselinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata -@@ -71,7 +71,7 @@ cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: - - cdef SCIP_RETCODE PyCutselSelect (SCIP* scip, SCIP_CUTSEL* cutsel, SCIP_ROW** cuts, int ncuts, - SCIP_ROW** forcedcuts, int nforcedcuts, SCIP_Bool root, int maxnselectedcuts, -- int* nselectedcuts, SCIP_RESULT* result) with gil: -+ int* nselectedcuts, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cdef SCIP_ROW* scip_row - cutseldata = SCIPcutselGetData(cutsel) -diff --git a/src/pyscipopt/event.pxi b/src/pyscipopt/event.pxi -index 95c8bc1f4..914e882ed 100644 ---- a/src/pyscipopt/event.pxi -+++ b/src/pyscipopt/event.pxi -@@ -39,48 +39,48 @@ cdef class Eventhdlr: - - - # local helper functions for the interface --cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - cdef SCIP_EVENTHDLRDATA* eventhdlrdata - eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) - return eventhdlrdata - --cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventcopy() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventfree() - Py_DECREF(PyEventhdlr) - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata) with gil: -+cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventdelete() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata) with gil: -+cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEvent = Event() - PyEvent.event = event -diff --git a/src/pyscipopt/heuristic.pxi b/src/pyscipopt/heuristic.pxi -index 2980a1aee..930315630 100644 ---- a/src/pyscipopt/heuristic.pxi -+++ b/src/pyscipopt/heuristic.pxi -@@ -31,10 +31,10 @@ cdef class Heur: - - - --cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata -@@ -42,35 +42,35 @@ cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) with gil: - Py_DECREF(PyHeur) - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata -diff --git a/src/pyscipopt/nodesel.pxi b/src/pyscipopt/nodesel.pxi -index 4d795bc9d..a3e832f15 100644 ---- a/src/pyscipopt/nodesel.pxi -+++ b/src/pyscipopt/nodesel.pxi -@@ -42,10 +42,10 @@ cdef class Nodesel: - return 0 - - --cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -@@ -53,7 +53,7 @@ cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) with gil: - Py_DECREF(PyNodesel) - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -@@ -61,28 +61,28 @@ cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: - return SCIP_OKAY - - --cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata - PyNodesel.nodeexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata - PyNodesel.nodeinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata - PyNodesel.nodeexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) with gil: -+cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -@@ -91,7 +91,7 @@ cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* - selnode[0] = selected_node.scip_node - return SCIP_OKAY - --cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) with gil: -+cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -diff --git a/src/pyscipopt/presol.pxi b/src/pyscipopt/presol.pxi -index d2b9115a5..13bd9a623 100644 ---- a/src/pyscipopt/presol.pxi -+++ b/src/pyscipopt/presol.pxi -@@ -30,10 +30,10 @@ cdef class Presol: - - - --cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -@@ -41,14 +41,14 @@ cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) with gil: - Py_DECREF(PyPresol) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata - PyPresol.presolinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -@@ -56,14 +56,14 @@ cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) with gil: - return SCIP_OKAY - - --cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata - PyPresol.presolinitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -@@ -74,7 +74,7 @@ cdef SCIP_RETCODE PyPresolExec (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SC - int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, - int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, - int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, -- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: -+ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -diff --git a/src/pyscipopt/pricer.pxi b/src/pyscipopt/pricer.pxi -index 1368572de..a218b254c 100644 ---- a/src/pyscipopt/pricer.pxi -+++ b/src/pyscipopt/pricer.pxi -@@ -33,10 +33,10 @@ cdef class Pricer: - - - --cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid) with gil: -+cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata -@@ -44,35 +44,35 @@ cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) with gil: - Py_DECREF(PyPricer) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata -@@ -82,7 +82,7 @@ cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* l - stopearly[0] = result_dict.get("stopearly", stopearly[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata -diff --git a/src/pyscipopt/propagator.pxi b/src/pyscipopt/propagator.pxi -index d792577d9..4508efe78 100644 ---- a/src/pyscipopt/propagator.pxi -+++ b/src/pyscipopt/propagator.pxi -@@ -47,10 +47,10 @@ cdef class Prop: - - - --cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -58,42 +58,42 @@ cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) with gil: - Py_DECREF(PyProp) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propinitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propexitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart) with gil: -+cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -104,7 +104,7 @@ cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_P - int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, - int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, - int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, -- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: -+ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -137,7 +137,7 @@ cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_P - nchgsides[0] = result_dict["nchgsides"] - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -147,7 +147,7 @@ cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING propt - return SCIP_OKAY - - cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo, -- SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) with gil: -+ SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PROPDATA* propdata - cdef SCIP_VAR* tmp - tmp = infervar -diff --git a/src/pyscipopt/reader.pxi b/src/pyscipopt/reader.pxi -index df0b3a288..2c45585d6 100644 ---- a/src/pyscipopt/reader.pxi -+++ b/src/pyscipopt/reader.pxi -@@ -18,10 +18,10 @@ cdef class Reader: - return {} - - --cdef SCIP_RETCODE PyReaderCopy (SCIP* scip, SCIP_READER* reader) with gil: -+cdef SCIP_RETCODE PyReaderCopy (SCIP* scip, SCIP_READER* reader) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) with gil: -+cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) noexcept with gil: - cdef SCIP_READERDATA* readerdata - readerdata = SCIPreaderGetData(reader) - PyReader = readerdata -@@ -29,7 +29,7 @@ cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) with gil: - Py_DECREF(PyReader) - return SCIP_OKAY - --cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_READERDATA* readerdata - readerdata = SCIPreaderGetData(reader) - PyReader = readerdata -@@ -44,7 +44,7 @@ cdef SCIP_RETCODE PyReaderWrite (SCIP* scip, SCIP_READER* reader, FILE* file, - SCIP_VAR** vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, - SCIP_VAR** fixedvars, int nfixedvars, int startnvars, - SCIP_CONS** conss, int nconss, int maxnconss, int startnconss, -- SCIP_Bool genericnames, SCIP_RESULT* result) with gil: -+ SCIP_Bool genericnames, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_READERDATA* readerdata - readerdata = SCIPreaderGetData(reader) - cdef int fd = fileno(file) -diff --git a/src/pyscipopt/relax.pxi b/src/pyscipopt/relax.pxi -index 2b52c2643..81695e8bb 100644 ---- a/src/pyscipopt/relax.pxi -+++ b/src/pyscipopt/relax.pxi -@@ -30,10 +30,10 @@ cdef class Relax: - return{} - - --cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata -@@ -41,35 +41,35 @@ cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) with gil: - Py_DECREF(PyRelax) - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata -diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd -index 12815dbc4..f35a42486 100644 ---- a/src/pyscipopt/scip.pxd -+++ b/src/pyscipopt/scip.pxd -@@ -501,7 +501,7 @@ cdef extern from "scip/scip.h": - ctypedef union SCIP_DOMCHG: - pass - -- ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) -+ ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept - ctypedef void (*errormessagecallback) (void *data, FILE *file, const char *msg) - ctypedef SCIP_RETCODE (*messagehdlrfree) (SCIP_MESSAGEHDLR *messagehdlr) - -diff --git a/src/pyscipopt/scip.pxi b/src/pyscipopt/scip.pxi -index 0b2332d88..552197785 100644 ---- a/src/pyscipopt/scip.pxi -+++ b/src/pyscipopt/scip.pxi -@@ -975,10 +975,10 @@ cdef class Constraint: - and self.scip_cons == (other).scip_cons) - - --cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg): -+cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept: - sys.stdout.write(msg.decode('UTF-8')) - --cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): -+cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg) noexcept: - sys.stderr.write(msg.decode('UTF-8')) - - # - remove create(), includeDefaultPlugins(), createProbBasic() methods -diff --git a/src/pyscipopt/sepa.pxi b/src/pyscipopt/sepa.pxi -index 271945db1..94355a7d2 100644 ---- a/src/pyscipopt/sepa.pxi -+++ b/src/pyscipopt/sepa.pxi -@@ -34,10 +34,10 @@ cdef class Sepa: - - - --cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata -@@ -45,35 +45,35 @@ cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) with gil: - Py_DECREF(PySepa) - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepainit() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepaexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepainitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepaexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal, int depth) with gil: -+cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal, int depth) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata -@@ -81,7 +81,7 @@ cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal, int depth) with gil: -+cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal, int depth) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - solution = Solution.create(scip, sol) From 961a7c448f74ff677f25110257e76246b4c2853b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Mar 2024 17:44:49 -0800 Subject: [PATCH 060/183] build/pkgs/onetbb/patches/gcc13-154cc73ca4d359621202399cc0c3c91058e56e79.patch: Remove --- ...c73ca4d359621202399cc0c3c91058e56e79.patch | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 build/pkgs/onetbb/patches/gcc13-154cc73ca4d359621202399cc0c3c91058e56e79.patch diff --git a/build/pkgs/onetbb/patches/gcc13-154cc73ca4d359621202399cc0c3c91058e56e79.patch b/build/pkgs/onetbb/patches/gcc13-154cc73ca4d359621202399cc0c3c91058e56e79.patch deleted file mode 100644 index a2e4d939311..00000000000 --- a/build/pkgs/onetbb/patches/gcc13-154cc73ca4d359621202399cc0c3c91058e56e79.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 154cc73ca4d359621202399cc0c3c91058e56e79 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Wed, 22 Feb 2023 14:16:46 +0000 -Subject: [PATCH] test: common: include for abort() (fix build with - GCC 13) (#1031) - -GCC 13 (as usual for new compiler releases) shuffles around some -internal includes and so etc is no longer transitively included. - -See https://www.gnu.org/software/gcc/gcc-13/porting_to.html. - -Signed-off-by: Sam James ---- - test/common/utils_assert.h | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/test/common/utils_assert.h b/test/common/utils_assert.h -index 1df8ae72ac..0123ab881e 100644 ---- a/test/common/utils_assert.h -+++ b/test/common/utils_assert.h -@@ -1,5 +1,5 @@ - /* -- Copyright (c) 2005-2022 Intel Corporation -+ Copyright (c) 2005-2023 Intel Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. -@@ -20,6 +20,8 @@ - #include "config.h" - #include "utils_report.h" - -+#include -+ - #define REPORT_FATAL_ERROR REPORT - - namespace utils { From 615db2334f5cbe4ffc9c07d6be61627631c79f4c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 5 Mar 2024 22:02:43 -0800 Subject: [PATCH 061/183] src/sage/numerical/backends/scip_backend.pyx: Fix typo in doctest --- src/sage/numerical/backends/scip_backend.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/numerical/backends/scip_backend.pyx b/src/sage/numerical/backends/scip_backend.pyx index 1ae54f483aa..8e7d7fd1685 100644 --- a/src/sage/numerical/backends/scip_backend.pyx +++ b/src/sage/numerical/backends/scip_backend.pyx @@ -1274,7 +1274,7 @@ cdef class SCIPBackend(GenericBackend): EXAMPLES: sage: from sage.numerical.backends.generic_backend import get_solver - sage: lp = get_solver(solver="SCIP") + sage: p = get_solver(solver="SCIP") sage: p.solver_parameter("limits/time", 1) sage: p.solver_parameter("limits/time") 1.0 From 6dd48d7bd6fd9352477ba45e1da062609c7aba8a Mon Sep 17 00:00:00 2001 From: Giacomo Pope <44242839+GiacomoPope@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:50:30 +0000 Subject: [PATCH 062/183] Update src/sage/rings/polynomial/laurent_polynomial_mpair.pyx Co-authored-by: Travis Scrimshaw --- src/sage/rings/polynomial/laurent_polynomial_mpair.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index 74b6f57fd7b..93fd74fcda9 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -1165,9 +1165,9 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): OUTPUT: - If ``x`` is ``None``, return the maximum degree of the monomials of - ``self``. If ``x`` is given and it is a generator of the parent - ring, the output is the maximum degree in ``x`` of ``self``. + If ``x`` is ``None``, return the total degree of ``self``. + If ``x`` is a given generator of the parent ring, + the output is the maximum degree of ``x`` in ``self``. EXAMPLES:: From da0903d961e3d878bf990d32d8a9a3a9dd561d5b Mon Sep 17 00:00:00 2001 From: adrinospy Date: Tue, 12 Mar 2024 12:27:58 +0530 Subject: [PATCH 063/183] no of changes depends on repo variable and checks if repo variables exists --- .github/workflows/pr-labeler.yml | 73 +++++++++++++++++++------------ .github/workflows/sync_labels.yml | 63 -------------------------- 2 files changed, 46 insertions(+), 90 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index b4f3c76e3f3..3b5c28cf478 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -1,48 +1,67 @@ -# set labels on Pull-Requests based on size of changes -# size is compared form first to last commit in the pull request name: Size Labeler/Checker on: pull_request_target: types: - opened - synchronize + - edited jobs: label-changes: runs-on: ubuntu-latest permissions: pull-requests: write steps: - - name: Check changes and label - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - CHANGES=$((${{github.event.pull_request.additions}} + ${{github.event.pull_request.deletions}})) - echo "Changes Made: $CHANGES" - - MINIMAL_THRESHOLD=50 - SMALL_THRESHOLD=100 - MODERATE_THRESHOLD=300 + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Add labels based on size + run: | + if [[ -z "${{ vars.SMALL_THRESHOLD }}" || -z "${{ vars.MODERATE_THRESHOLD }}" || -z "${{ vars.LARGE_THRESHOLD }}" ]]; then + echo "One or more environment variables are not set." + exit 1 + fi + git fetch origin ${{ github.base_ref }} + CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) + CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + # ignore blank lines + CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') + # count total no of lines + CHANGES=$(echo "$CHANGES" | wc -l) + echo "CHANGES MADE: $CHANGES" + SMALL_THRESHOLD=${{vars.SMALL_THRESHOLD}} + MODERATE_THRESHOLD=${{vars.MODERATE_THRESHOLD}} + LARGE_THRESHOLD=${{vars.LARGE_THRESHOLD}} PR_NUMBER="${{ github.event.number }}" API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" - - DELETE_LABELS=("minimal" "small" "moderate" "large") - - if [ "$CHANGES" -le "$MINIMAL_THRESHOLD" ]; then - LABEL="minimal" - elif [ "$CHANGES" -le "$SMALL_THRESHOLD" ]; then - LABEL="small" - elif [ "$CHANGES" -le "$MODERATE_THRESHOLD" ]; then - LABEL="moderate" + DELETE_LABELS=("v: minimal" "v: small" "v: moderate" "v: large") + if [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then + LABEL="v: small" + elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then + LABEL="v: moderate" + elif [ "$CHANGES" -gt "$LARGE_THRESHOLD" ]; then + LABEL="v: large" else - LABEL="large" + LABEL="v: minimal" fi - - DELETE_LABELS=("${DELETE_LABELS[@]/$LABEL}") - + DELETE_LABELS=("${DELETE_LABELS[@]//${LABEL}}") echo "Adding label: $LABEL" - curl -X POST -H "$AUTH_HEADER" -d "{\"labels\":[\"$LABEL\"]}" "$API_URL" + curl -X POST \ + -H "$AUTH_HEADER" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + -d "{\"labels\":[\"$LABEL\"]}" \ + "$API_URL" >/dev/null + echo "Deleting Labels:" for DELETE_LABEL in "${DELETE_LABELS[@]}"; do - curl -X DELETE -H "$AUTH_HEADER" "$API_URL/$DELETE_LABEL" + ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') + curl -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "$AUTH_HEADER" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "$API_URL/$ENCODED_LABEL" >/dev/null done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/sync_labels.yml b/.github/workflows/sync_labels.yml index d174170d804..56fe526eb8e 100644 --- a/.github/workflows/sync_labels.yml +++ b/.github/workflows/sync_labels.yml @@ -64,66 +64,3 @@ jobs: GITHUB_TOKEN: ${{ env.TOKEN }} REPO_URL: ${{ github.event.repository.html_url }} LOG_LEVEL: ${{ vars.SYNC_LABELS_LOG_LEVEL }} # variable from repository settings, values can be "--debug", "--info" or "--warning" - - # add labels based on size - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Add labels based on size - run: | - git fetch origin ${{ github.base_ref }} - CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) - CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') - - # ignore blank lines - CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') - - # count total no of lines - CHANGES=$(echo "$CHANGES" | wc -l) - - echo "CHANGES MADE: $CHANGES" - - MINIMAL_THRESHOLD=50 - - SMALL_THRESHOLD=100 - MODERATE_THRESHOLD=300 - - PR_NUMBER="${{ github.event.number }}" - API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" - AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" - - DELETE_LABELS=("v: minimal" "v: small" "v: moderate" "v: large") - - if [ "$CHANGES" -le "$MINIMAL_THRESHOLD" ]; then - LABEL="v: minimal" - elif [ "$CHANGES" -le "$SMALL_THRESHOLD" ]; then - LABEL="v: small" - elif [ "$CHANGES" -le "$MODERATE_THRESHOLD" ]; then - LABEL="v: moderate" - else - LABEL="v: large" - fi - - DELETE_LABELS=("${DELETE_LABELS[@]//${LABEL}}") - - echo "Adding label: $LABEL" - curl -X POST \ - -H "$AUTH_HEADER" \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -d "{\"labels\":[\"$LABEL\"]}" \ - "$API_URL" >/dev/null - - echo "Deleting Labels:" - for DELETE_LABEL in "${DELETE_LABELS[@]}"; do - ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') - curl -X DELETE \ - -H "Accept: application/vnd.github+json" \ - -H "$AUTH_HEADER" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "$API_URL/$ENCODED_LABEL" >/dev/null - done - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From dc7d14e2355255325039f639a97293ac535d0fc0 Mon Sep 17 00:00:00 2001 From: adrinospy Date: Tue, 12 Mar 2024 12:32:22 +0530 Subject: [PATCH 064/183] made code redable --- .github/workflows/pr-labeler.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 3b5c28cf478..214b9b19abe 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -18,25 +18,33 @@ jobs: - name: Add labels based on size run: | - if [[ -z "${{ vars.SMALL_THRESHOLD }}" || -z "${{ vars.MODERATE_THRESHOLD }}" || -z "${{ vars.LARGE_THRESHOLD }}" ]]; then + if [[ -z "${{ vars.SMALL_THRESHOLD }}" || -z "${{ vars.MODERATE_THRESHOLD }}" || -z "${{ vars.LARGE_THRESHOLD }}"]]; then echo "One or more environment variables are not set." exit 1 fi git fetch origin ${{ github.base_ref }} CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) + CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + # ignore blank lines CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') + # count total no of lines CHANGES=$(echo "$CHANGES" | wc -l) + echo "CHANGES MADE: $CHANGES" + SMALL_THRESHOLD=${{vars.SMALL_THRESHOLD}} MODERATE_THRESHOLD=${{vars.MODERATE_THRESHOLD}} LARGE_THRESHOLD=${{vars.LARGE_THRESHOLD}} + PR_NUMBER="${{ github.event.number }}" API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" + DELETE_LABELS=("v: minimal" "v: small" "v: moderate" "v: large") + if [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then LABEL="v: small" elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then @@ -46,7 +54,9 @@ jobs: else LABEL="v: minimal" fi + DELETE_LABELS=("${DELETE_LABELS[@]//${LABEL}}") + echo "Adding label: $LABEL" curl -X POST \ -H "$AUTH_HEADER" \ @@ -54,7 +64,9 @@ jobs: -H "X-GitHub-Api-Version: 2022-11-28" \ -d "{\"labels\":[\"$LABEL\"]}" \ "$API_URL" >/dev/null + echo "Deleting Labels:" + for DELETE_LABEL in "${DELETE_LABELS[@]}"; do ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') curl -X DELETE \ From cdf4d0b0c67afdbc7563740d4e75951009a05a0d Mon Sep 17 00:00:00 2001 From: adrinospy Date: Mon, 18 Mar 2024 02:24:04 +0530 Subject: [PATCH 065/183] adding labels of file changed --- .github/workflows/pr-labeler.yml | 52 ++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 214b9b19abe..91bd5fdc21f 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -1,3 +1,5 @@ +# This action automatically labels Pull-Requests +# based on files edited and no of lines changed. name: Size Labeler/Checker on: pull_request_target: @@ -18,27 +20,23 @@ jobs: - name: Add labels based on size run: | - if [[ -z "${{ vars.SMALL_THRESHOLD }}" || -z "${{ vars.MODERATE_THRESHOLD }}" || -z "${{ vars.LARGE_THRESHOLD }}"]]; then - echo "One or more environment variables are not set." - exit 1 - fi git fetch origin ${{ github.base_ref }} - CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) - CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + # get all the changes made and changed files + CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) + CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | awk -F'src/sage/' '{print $2}' | cut -d'/' -f1 | sed 's/\([^ ]\+\)/c: \1/g') # ignore blank lines CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') + # ignore non necessary lines from git diff + CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + # count total no of lines CHANGES=$(echo "$CHANGES" | wc -l) echo "CHANGES MADE: $CHANGES" - SMALL_THRESHOLD=${{vars.SMALL_THRESHOLD}} - MODERATE_THRESHOLD=${{vars.MODERATE_THRESHOLD}} - LARGE_THRESHOLD=${{vars.LARGE_THRESHOLD}} - PR_NUMBER="${{ github.event.number }}" API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" @@ -46,24 +44,29 @@ jobs: DELETE_LABELS=("v: minimal" "v: small" "v: moderate" "v: large") if [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then - LABEL="v: small" + SIZE_LABEL="v: small" elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then - LABEL="v: moderate" + SIZE_LABEL="v: moderate" elif [ "$CHANGES" -gt "$LARGE_THRESHOLD" ]; then - LABEL="v: large" + SIZE_LABEL="v: large" else - LABEL="v: minimal" + SIZE_LABEL="v: minimal" fi - DELETE_LABELS=("${DELETE_LABELS[@]//${LABEL}}") + DELETE_LABELS=("${DELETE_LABELS[@]//${SIZE_LABEL}}") - echo "Adding label: $LABEL" - curl -X POST \ - -H "$AUTH_HEADER" \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -d "{\"labels\":[\"$LABEL\"]}" \ - "$API_URL" >/dev/null + readarray -t LABELS <<< "$CHANGED_FILES" + LABELS+=("$SIZE_LABEL") + + echo "Adding label: ${LABELS[@]}" + for LABEL in "${LABELS[@]}"; do + curl -X POST \ + -H "$AUTH_HEADER" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + -d "{\"labels\":[\"$LABEL\"]}" \ + "$API_URL" >/dev/null + done echo "Deleting Labels:" @@ -76,4 +79,7 @@ jobs: "$API_URL/$ENCODED_LABEL" >/dev/null done env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SMALL_THRESHOLD: ${{ vars.SMALL_THRESHOLD }} + MODERATE_THRESHOLD: ${{ vars.MODERATE_THRESHOLD }} + LARGE_THRESHOLD: ${{ vars.LARGE_THRESHOLD }} From b21fa3b1d08d2c052c85cb2fb595ef41641632e7 Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Mon, 25 Mar 2024 23:06:26 +0100 Subject: [PATCH 066/183] Removed redundant calculations... ... and small refactoring of code --- .../algebras/quatalg/quaternion_algebra.py | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index d2c9de90176..4692d5a7075 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -768,17 +768,21 @@ def maximal_order(self, take_shortcuts=True): TESTS: - We check that :issue:`37417` and the first part of :issue:`37217` are fixed:: - - sage: invars = [(-4, -28), (-292, -732), (-48, -564), (-436, -768), (-752, -708), - ....: (885, 545), (411, -710), (-411, 593), (805, -591), (-921, 353), - ....: (409, 96), (394, 873), (353, -722), (730, 830), (-466, -427), (-213, -630), - ....: (-511, 608), (493, 880), (105, -709), (-213, 530), (97, 745)] - sage: all(QuaternionAlgebra(a, b).maximal_order().is_maximal() for (a, b) in invars) + Check that :issue:`37417` and the first part of :issue:`37217` are fixed:: + + sage: invars = [(-4, -28), (-292, -732), (-48, -564), (-436, -768), + ....: (-752, -708), (885, 545), (411, -710), (-411, 593), + ....: (805, -591), (-921, 353), (409, 96), (394, 873), + ....: (353, -722), (730, 830), (-466, -427), (-213, -630), + ....: (-511, 608), (493, 880), (105, -709), (-213, 530), + ....: (97, 745)] + sage: all(QuaternionAlgebra(a, b).maximal_order().is_maximal() + ....: for (a, b) in invars) True """ if self.base_ring() != QQ: - raise NotImplementedError("maximal order only implemented for rational quaternion algebras") + raise NotImplementedError("maximal order only implemented for" + " rational quaternion algebras") d_A = self.discriminant() @@ -821,15 +825,16 @@ def maximal_order(self, take_shortcuts=True): # The following code should always work (over QQ) # Start with <1,i,j,k> - R = self.quaternion_order((1,) + self.gens()) + order_basis = (self.one(),) + self.gens() + R = self.quaternion_order(order_basis) d_R = R.discriminant() e_new_gens = [] # For each prime at which R is not yet maximal, make it bigger for p, _ in d_R.factor(): - e = R.basis() - disc = self.quaternion_order(e).discriminant() + e = order_basis + disc = d_R while disc.valuation(p) > d_A.valuation(p): # Compute a normalized basis at p f = normalize_basis_at_p(list(e), p) @@ -903,12 +908,12 @@ def maximal_order(self, take_shortcuts=True): e_n = basis_for_quaternion_lattice(list(e) + e_n[1:], reverse=True) # e_n now contains elements that locally at p give a bigger order, - # but the basis may be messed up at other primes (it might not even - # be an order). We will join them all together at the end + # but the basis may be messed up at other primes (it might not + # even be an order). We will join them all together at the end e = e_n - # Since e might not define an order at this point, we need to manually - # calculate the updated discriminant + # Since e might not define an order at this point, we need to + # manually calculate the updated discriminant L = [] for x in e: MM = [] From 4e8e363e2e64334f8711b380f064bf6d2d8d1dd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 23:48:20 +0000 Subject: [PATCH 067/183] :arrow_up: Bump actions/cache from 3 to 4 Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 1bb08637099..996c46cb95e 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -54,7 +54,7 @@ jobs: SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }} - name: Cache conda packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/conda_pkgs_dir key: From 84b045370058cc1411b890ad02bb1d760dbe4a3b Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Tue, 26 Mar 2024 00:08:17 +0100 Subject: [PATCH 068/183] Extend `.maximal_order` to allow for base order --- .../algebras/quatalg/quaternion_algebra.py | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 4692d5a7075..c4452867966 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -687,14 +687,19 @@ def __init__(self, base_ring, a, b, names='i,j,k'): self._gens = (self([0, 1, 0, 0]), self([0, 0, 1, 0]), self([0, 0, 0, 1])) @cached_method - def maximal_order(self, take_shortcuts=True): + def maximal_order(self, order_basis=None, take_shortcuts=True): r""" Return a maximal order in this quaternion algebra. - The algorithm used is from [Voi2012]_. + If ``order_basis`` is specified, the resulting maximal order + will contain the quaternion order of ``self`` given by this + basis. The algorithm used is from [Voi2012]_. INPUT: + - ``order_basis`` -- (optional, default: ``None``) a basis of a + quaternion order of ``self`` + - ``take_shortcuts`` -- (default: ``True``) if the discriminant is prime and the invariants of the algebra are of a nice form, use Proposition 5.2 of [Piz1980]_. @@ -791,7 +796,8 @@ def maximal_order(self, take_shortcuts=True): # (every quaternion algebra of prime discriminant has a representation # of such a form though) a, b = self.invariants() - if take_shortcuts and d_A.is_prime() and a in ZZ and b in ZZ: + if (not order_basis and take_shortcuts and d_A.is_prime() + and a in ZZ and b in ZZ): a = ZZ(a) b = ZZ(b) i, j, k = self.gens() @@ -824,10 +830,20 @@ def maximal_order(self, take_shortcuts=True): return self.quaternion_order(basis) # The following code should always work (over QQ) - # Start with <1,i,j,k> - order_basis = (self.one(),) + self.gens() - R = self.quaternion_order(order_basis) - d_R = R.discriminant() + # If no order basis is given, start with <1,i,j,k> + if not order_basis: + order_basis = (self.one(),) + self.gens() + + try: + R = self.quaternion_order(order_basis) + d_R = R.discriminant() + except (TypeError, ValueError): + raise ValueError('order_basis is not a basis of an order of the' + ' given quaternion algebra') + + if order_basis[0] not in ZZ: + raise Warning('the algorithm might not work if the' + ' first basis vector is not an integer') e_new_gens = [] From 438f8cf7d38a952bfab595520933e9498394bdf7 Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Tue, 26 Mar 2024 15:05:35 +0100 Subject: [PATCH 069/183] Adapt to work with arbitrary order bases --- src/sage/algebras/quatalg/quaternion_algebra.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index c4452867966..57f8ae9490d 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -841,15 +841,15 @@ def maximal_order(self, order_basis=None, take_shortcuts=True): raise ValueError('order_basis is not a basis of an order of the' ' given quaternion algebra') - if order_basis[0] not in ZZ: - raise Warning('the algorithm might not work if the' - ' first basis vector is not an integer') + # Since Voight's algorithm only works for a starting basis having 1 as + # its first vector, we derive such a basis from the given order basis + basis = basis_for_quaternion_lattice(order_basis, reverse=True) e_new_gens = [] # For each prime at which R is not yet maximal, make it bigger for p, _ in d_R.factor(): - e = order_basis + e = basis disc = d_R while disc.valuation(p) > d_A.valuation(p): # Compute a normalized basis at p @@ -940,7 +940,7 @@ def maximal_order(self, order_basis=None, take_shortcuts=True): e_new_gens.extend(e[1:]) - e_new = basis_for_quaternion_lattice(list(R.basis()) + e_new_gens, reverse=True) + e_new = basis_for_quaternion_lattice(list(basis) + e_new_gens, reverse=True) return self.quaternion_order(e_new) def invariants(self): From 59436fe548cf2091a0c287e4d2a9aeec1719e02a Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Tue, 26 Mar 2024 15:45:10 +0100 Subject: [PATCH 070/183] Defined comparison operators for orders --- .../algebras/quatalg/quaternion_algebra.py | 80 +++++++++++++++++-- 1 file changed, 74 insertions(+), 6 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 57f8ae9490d..62f92a1ee36 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1633,7 +1633,7 @@ def gen(self, n): """ return self.__basis[n] - def __eq__(self, R): + def __eq__(self, other): """ Compare orders self and other. @@ -1654,17 +1654,17 @@ def __eq__(self, R): sage: Q.quaternion_order([1,-i,k,j+i*7]) == Q.quaternion_order([1,i,j,k]) True """ - if not isinstance(R, QuaternionOrder): + if not isinstance(other, QuaternionOrder): return False - return (self.__quaternion_algebra == R.__quaternion_algebra and - self.unit_ideal() == R.unit_ideal()) + return (self.__quaternion_algebra == other.__quaternion_algebra and + self.unit_ideal() == other.unit_ideal()) def __ne__(self, other): """ Compare orders self and other. - Two orders are equal if they - have the same basis and are in the same quaternion algebra. + Two orders are equal if they have the same + basis and are in the same quaternion algebra. EXAMPLES:: @@ -1676,6 +1676,74 @@ def __ne__(self, other): """ return not self.__eq__(other) + def __le__(self, other): + """ + Compare orders self and other. + + EXAMPLES:: + + sage: B. = QuaternionAlgebra(-1, -11) + sage: O = B.quaternion_order([1,i,j,k]) + sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) + sage: O <= R + True + sage: R <= O + False + """ + if not isinstance(other, QuaternionOrder): + return False + return self.unit_ideal().__le__(other.unit_ideal()) + + def __lt__(self, other): + """ + Compare orders self and other. + + EXAMPLES:: + + sage: B. = QuaternionAlgebra(-1, -11) + sage: O = B.quaternion_order([1,i,j,k]) + sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) + sage: O < R + True + sage: R < O + False + """ + return self.__le__(other) and self.__ne__(other) + + def __ge__(self, other): + """ + Compare orders self and other. + + EXAMPLES:: + + sage: B. = QuaternionAlgebra(-1, -11) + sage: O = B.quaternion_order([1,i,j,k]) + sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) + sage: O >= R + False + sage: R >= O + True + """ + if not isinstance(other, QuaternionOrder): + return False + return self.unit_ideal().__ge__(other.unit_ideal()) + + def __gt__(self, other): + """ + Compare orders self and other. + + EXAMPLES:: + + sage: B. = QuaternionAlgebra(-1, -11) + sage: O = B.quaternion_order([1,i,j,k]) + sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) + sage: O > R + False + sage: R > O + True + """ + return self.__ge__(other) and self.__ne__(other) + def __hash__(self): """ Compute the hash of ``self``. From 7ad48accfaa6e8ef812de9463fde74dd8117cd63 Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Tue, 26 Mar 2024 16:02:40 +0100 Subject: [PATCH 071/183] Added example for basis extension --- src/sage/algebras/quatalg/quaternion_algebra.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 62f92a1ee36..90960d44c9c 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -762,6 +762,19 @@ def maximal_order(self, order_basis=None, take_shortcuts=True): ....: A = QuaternionAlgebra(d) ....: assert A.maximal_order(take_shortcuts=False).is_maximal() + Specifying an order basis gives an extension of orders:: + + sage: A. = QuaternionAlgebra(-292, -732) + sage: alpha = A.random_element() + sage: while alpha.is_zero(): + ....: alpha = A.random_element() + sage: conj = [alpha * b * alpha.inverse() for b in [k,i,j]] + sage: order_basis = tuple(conj) + (A.one(),) + sage: O = A.quaternion_order(order_basis) + sage: R = A.maximal_order(order_basis) + sage: O <= R and R.is_maximal() + True + We do not support number fields other than the rationals yet:: sage: K = QuadraticField(5) From 5a00a8e8b3f885a67aea259bc76ffc0ffe232aac Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Tue, 26 Mar 2024 16:26:42 +0100 Subject: [PATCH 072/183] Small docstring modifications --- src/sage/algebras/quatalg/quaternion_algebra.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 90960d44c9c..f3f315e1f80 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -692,13 +692,13 @@ def maximal_order(self, order_basis=None, take_shortcuts=True): Return a maximal order in this quaternion algebra. If ``order_basis`` is specified, the resulting maximal order - will contain the quaternion order of ``self`` given by this + will contain the order of the quaternion algebra given by this basis. The algorithm used is from [Voi2012]_. INPUT: - - ``order_basis`` -- (optional, default: ``None``) a basis of a - quaternion order of ``self`` + - ``order_basis`` -- (optional, default: ``None``) a basis of an + order of this quaternion algebra - ``take_shortcuts`` -- (default: ``True``) if the discriminant is prime and the invariants of the algebra are of a nice form, use From 20b5d54adc0ebb308446c2b79546a011ec506d5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Wed, 27 Mar 2024 10:48:36 +0100 Subject: [PATCH 073/183] pe8 and ruff fixes in the plot folder --- src/sage/plot/animate.py | 19 +-- src/sage/plot/arc.py | 2 +- src/sage/plot/arrow.py | 10 +- src/sage/plot/bezier_path.py | 2 +- src/sage/plot/circle.py | 2 +- src/sage/plot/colors.py | 14 +-- src/sage/plot/density_plot.py | 2 +- src/sage/plot/disk.py | 2 +- src/sage/plot/ellipse.py | 3 +- src/sage/plot/graphics.py | 79 ++++++------ src/sage/plot/histogram.py | 4 +- src/sage/plot/hyperbolic_arc.py | 7 +- src/sage/plot/hyperbolic_polygon.py | 1 + src/sage/plot/hyperbolic_regular_polygon.py | 6 +- src/sage/plot/matrix_plot.py | 14 +-- src/sage/plot/multigraphics.py | 20 ++-- src/sage/plot/plot.py | 30 ++++- src/sage/plot/plot3d/list_plot3d.py | 9 +- src/sage/plot/plot3d/plot3d.py | 30 +++-- src/sage/plot/plot3d/revolution_plot3d.py | 1 + src/sage/plot/plot3d/shapes2.py | 17 ++- src/sage/plot/plot3d/tachyon.py | 126 +++++++++----------- src/sage/plot/plot3d/texture.py | 8 +- src/sage/plot/plot3d/tri_plot.py | 6 +- src/sage/plot/plot_field.py | 4 +- src/sage/plot/point.py | 1 - src/sage/plot/primitive.py | 3 +- src/sage/plot/text.py | 2 +- 28 files changed, 226 insertions(+), 198 deletions(-) diff --git a/src/sage/plot/animate.py b/src/sage/plot/animate.py index 071bcd92622..b4b20e83754 100644 --- a/src/sage/plot/animate.py +++ b/src/sage/plot/animate.py @@ -154,6 +154,7 @@ def animate(frames, **kwds): """ return Animation(frames, **kwds) + class Animation(WithEqualityById, SageObject): r""" Return an animation of a sequence of plots of objects. @@ -1000,7 +1001,7 @@ def ffmpeg(self, savefile=None, show_path=False, output_format=None, # -loop_output option can be added with the # ffmpeg_options argument. if iterations is not None: - loop_cmd = '-loop {0} '.format(iterations) + loop_cmd = f'-loop {iterations} ' else: loop_cmd = '' # A pix_fmt value is required for some but not all @@ -1008,10 +1009,10 @@ def ffmpeg(self, savefile=None, show_path=False, output_format=None, # prevent sage from adding this option, and it may be # controlled separately through ffmpeg_options. if pix_fmt is not None: - pix_fmt_cmd = '-pix_fmt {0} '.format(pix_fmt) + pix_fmt_cmd = f'-pix_fmt {pix_fmt} ' else: pix_fmt_cmd = '' - ffmpeg_options += ' {0}{1}'.format(pix_fmt_cmd,loop_cmd) + ffmpeg_options += f' {pix_fmt_cmd}{loop_cmd}' if delay is not None and output_format != '.mpeg' and output_format != '.mpg': early_options += ' -r %s ' % int(100/delay) savefile = os.path.abspath(savefile) @@ -1023,7 +1024,7 @@ def ffmpeg(self, savefile=None, show_path=False, output_format=None, # afterwards. Hence 'early_options' and 'ffmpeg_options' # The `-nostdin` is needed to avoid the command to hang, see # https://stackoverflow.com/questions/16523746/ffmpeg-hangs-when-run-in-background - cmd = 'cd %s; ffmpeg -nostdin -y -f image2 %s -i %s %s %s' % ( + cmd = 'cd {}; ffmpeg -nostdin -y -f image2 {} -i {} {} {}'.format( shlex.quote(pngdir), early_options, shlex.quote(pngs), ffmpeg_options, shlex.quote(savefile)) from subprocess import check_call, CalledProcessError, PIPE try: @@ -1254,7 +1255,7 @@ def interactive(self, **kwds): except (AttributeError, TypeError): frame = None if not isinstance(frame, Graphics3d): - raise TypeError("Could not convert frame {} to Graphics3d".format(i)) + raise TypeError(f"Could not convert frame {i} to Graphics3d") g3d_frames.append(frame) # Give preference to this method's keyword arguments over those provided # to animate or the constructor. @@ -1265,7 +1266,7 @@ def interactive(self, **kwds): return KeyframeAnimationGroup(g3d_frames, **kwds) -class APngAssembler(): +class APngAssembler: r""" Builds an APNG_ (Animated PNG) from a sequence of PNG files. This is used by the :meth:`sage.plot.animate.Animation.apng` method. @@ -1322,7 +1323,7 @@ def __init__(self, out, num_frames, self.num_plays = num_plays self.default_delay_numerator = delay self.default_delay_denominator = delay_denominator - self._matchref = dict() + self._matchref = {} self.out.write(self.magic) def add_frame(self, pngfile, delay=None, delay_denominator=None): @@ -1449,7 +1450,7 @@ def _add_png(self, pngfile): """ with open(pngfile, 'rb') as png: if png.read(8) != self.magic: - raise ValueError("{} is not a PNG file".format(pngfile)) + raise ValueError(f"{pngfile} is not a PNG file") while True: chead = png.read(8) if len(chead) == 0: @@ -1466,7 +1467,7 @@ def _add_png(self, pngfile): self._copy() else: if cdata != ref: - raise ValueError("Chunk {} mismatch".format(utype)) + raise ValueError(f"Chunk {utype} mismatch") met = ("_first_" if self._first else "_next_") + utype try: met = getattr(self, met) diff --git a/src/sage/plot/arc.py b/src/sage/plot/arc.py index 8da333ee12b..c7d8d76ffae 100644 --- a/src/sage/plot/arc.py +++ b/src/sage/plot/arc.py @@ -346,7 +346,7 @@ def _repr_(self): sage: print(Arc(2,3,2.2,2.2,0,2,3,{})) Arc with center (2.0,3.0) radii (2.2,2.2) angle 0.0 inside the sector (2.0,3.0) """ - return "Arc with center (%s,%s) radii (%s,%s) angle %s inside the sector (%s,%s)" % (self.x, self.y, self.r1, self.r2, self.angle, self.s1, self.s2) + return "Arc with center ({},{}) radii ({},{}) angle {} inside the sector ({},{})".format(self.x, self.y, self.r1, self.r2, self.angle, self.s1, self.s2) def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/arrow.py b/src/sage/plot/arrow.py index 74da7b4b4f7..25fcf381c92 100644 --- a/src/sage/plot/arrow.py +++ b/src/sage/plot/arrow.py @@ -114,7 +114,7 @@ def _repr_(self): sage: CurveArrow(path=[[(0,0),(1,4),(2,3)]],options={})._repr_() 'CurveArrow from (0, 0) to (2, 3)' """ - return "CurveArrow from %s to %s" % (self.path[0][0], self.path[-1][-1]) + return f"CurveArrow from {self.path[0][0]} to {self.path[-1][-1]}" def _render_on_subplot(self, subplot): """ @@ -152,7 +152,7 @@ def _render_on_subplot(self, subplot): from matplotlib.path import Path bpath = Path(self.vertices, self.codes) p = FancyArrowPatch(path=bpath, - lw=width, arrowstyle='%s,head_width=%s,head_length=%s' % (style, head_width, head_length), + lw=width, arrowstyle='{},head_width={},head_length={}'.format(style, head_width, head_length), fc=color, ec=color, linestyle=get_matplotlib_linestyle(options['linestyle'], return_type='long')) p.set_zorder(options['zorder']) @@ -319,7 +319,7 @@ def _repr_(self): sage: Arrow(0,0,2,3,{})._repr_() 'Arrow from (0.0,0.0) to (2.0,3.0)' """ - return "Arrow from (%s,%s) to (%s,%s)" % (self.xtail, self.ytail, self.xhead, self.yhead) + return f"Arrow from ({self.xtail},{self.ytail}) to ({self.xhead},{self.yhead})" def _render_on_subplot(self, subplot): r""" @@ -378,7 +378,7 @@ def _render_on_subplot(self, subplot): from matplotlib.patches import FancyArrowPatch p = FancyArrowPatch((self.xtail, self.ytail), (self.xhead, self.yhead), lw=width, - arrowstyle='%s,head_width=%s,head_length=%s' % (style, head_width, head_length), + arrowstyle='{},head_width={},head_length={}'.format(style, head_width, head_length), shrinkA=arrowshorten_end, shrinkB=arrowshorten_end, fc=color, ec=color, linestyle=get_matplotlib_linestyle(options['linestyle'], return_type='long')) @@ -395,7 +395,7 @@ def _render_on_subplot(self, subplot): import matplotlib.patheffects as pe - class CheckNthSubPath(): + class CheckNthSubPath: def __init__(self, patch, n): """ creates a callable object that returns True if the diff --git a/src/sage/plot/bezier_path.py b/src/sage/plot/bezier_path.py index 14958fbbba8..16053ad0e7b 100644 --- a/src/sage/plot/bezier_path.py +++ b/src/sage/plot/bezier_path.py @@ -208,7 +208,7 @@ def _repr_(self): """ x0, y0 = self.vertices[0] x1, y1 = self.vertices[-1] - return "Bezier path from (%s, %s) to (%s, %s)" % (x0, y0, x1, y1) + return f"Bezier path from ({x0}, {y0}) to ({x1}, {y1})" def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/circle.py b/src/sage/plot/circle.py index c7fd3d9dfc0..7d5f04f2f9c 100644 --- a/src/sage/plot/circle.py +++ b/src/sage/plot/circle.py @@ -133,7 +133,7 @@ def _repr_(self): sage: c = C[0]; c Circle defined by (2.0,3.0) with r=5.0 """ - return "Circle defined by (%s,%s) with r=%s" % (self.x, self.y, self.r) + return f"Circle defined by ({self.x},{self.y}) with r={self.r}" def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/colors.py b/src/sage/plot/colors.py index 3322c6cfdbc..cdc4a9f1b21 100644 --- a/src/sage/plot/colors.py +++ b/src/sage/plot/colors.py @@ -254,7 +254,7 @@ def html_to_float(c): raise ValueError("'%s' must be a valid HTML hex color (e.g., '#f07' or '#d6e7da')" % c) h = c[1:] if len(h) == 3: - h = '%s%s%s%s%s%s' % (h[0], h[0], h[1], h[1], h[2], h[2]) + h = f'{h[0]}{h[0]}{h[1]}{h[1]}{h[2]}{h[2]}' elif len(h) != 6: raise ValueError("color hex string (= '%s') must have length 3 or 6" % h) return tuple([int(h[i:i + 2], base=16) / 255 for i in [0, 2, 4]]) @@ -338,7 +338,7 @@ def rgbcolor(c, space='rgb'): elif isinstance(c, (list, tuple)): if len(c) != 3: - raise ValueError("color list or tuple '%s' must have 3 entries, one for each RGB, HSV, HLS, or HSL channel" % (c, )) + raise ValueError("color list or tuple '{}' must have 3 entries, one for each RGB, HSV, HLS, or HSL channel".format(c )) c = [mod_one(_) for _ in list(c)] if space == 'rgb': return tuple(c) @@ -358,7 +358,7 @@ def rgbcolor(c, space='rgb'): to_mpl_color = rgbcolor -class Color(): +class Color: def __init__(self, r='#0000ff', g=None, b=None, space='rgb'): """ A Red-Green-Blue (RGB) color model color object. For most @@ -421,7 +421,7 @@ def __repr__(self): sage: Color(1, 0.5, 1/16, space='hsl').__repr__() 'RGB color (0.09375, 0.03125, 0.03125)' """ - return "RGB color %s" % (self._rgb, ) + return f"RGB color {self._rgb}" def __lt__(self, right): """ @@ -645,7 +645,7 @@ def blend(self, color, fraction=0.5): color = [float(_) for _ in color] return Color(rgbcolor([(1 - fraction) * a + fraction * b for a, b in zip(self._rgb, color)])) - raise TypeError("%s must be a Color or float-convertible 3-tuple/list" % (color, )) + raise TypeError(f"{color} must be a Color or float-convertible 3-tuple/list") def __add__(self, right): """ @@ -1104,7 +1104,7 @@ def __getattr__(self, name): try: return self[name] except KeyError: - raise AttributeError("'%s' has no attribute or colormap %s" % (type(self).__name__, name)) + raise AttributeError("'{}' has no attribute or colormap {}".format(type(self).__name__, name)) def __dir__(self): """ @@ -1611,7 +1611,7 @@ def __getattr__(self, name): try: return self[name] except KeyError: - raise AttributeError("'%s' has no attribute or colormap %s" % (type(self).__name__, name)) + raise AttributeError("'{}' has no attribute or colormap {}".format(type(self).__name__, name)) def __repr__(self): """ diff --git a/src/sage/plot/density_plot.py b/src/sage/plot/density_plot.py index ff27f2d126b..a69da22344a 100644 --- a/src/sage/plot/density_plot.py +++ b/src/sage/plot/density_plot.py @@ -127,7 +127,7 @@ def _repr_(self): sage: d = D[0]; d DensityPlot defined by a 25 x 25 data grid """ - return "DensityPlot defined by a %s x %s data grid" % (self.xy_array_row, self.xy_array_col) + return "DensityPlot defined by a {} x {} data grid".format(self.xy_array_row, self.xy_array_col) def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/disk.py b/src/sage/plot/disk.py index 4219cf35155..20831caf61f 100644 --- a/src/sage/plot/disk.py +++ b/src/sage/plot/disk.py @@ -149,7 +149,7 @@ def _repr_(self): sage: p = P[0]; p Disk defined by (3.0,3.0) with r=1.0 spanning (0.0, 1.5707963267...) radians """ - return "Disk defined by (%s,%s) with r=%s spanning (%s, %s) radians" % (self.x, self.y, self.r, self.rad1, self.rad2) + return "Disk defined by ({},{}) with r={} spanning ({}, {}) radians".format(self.x, self.y, self.r, self.rad1, self.rad2) def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/ellipse.py b/src/sage/plot/ellipse.py index 788db0fd76b..c606d8360db 100644 --- a/src/sage/plot/ellipse.py +++ b/src/sage/plot/ellipse.py @@ -170,7 +170,7 @@ def _repr_(self): sage: Ellipse(0,0,2,1,0,{})._repr_() 'Ellipse centered at (0.0, 0.0) with radii (2.0, 1.0) and angle 0.0' """ - return "Ellipse centered at (%s, %s) with radii (%s, %s) and angle %s" % (self.x, self.y, self.r1, self.r2, self.angle) + return "Ellipse centered at ({}, {}) with radii ({}, {}) and angle {}".format(self.x, self.y, self.r1, self.r2, self.angle) def _render_on_subplot(self, subplot): """ @@ -227,6 +227,7 @@ def plot3d(self): """ raise NotImplementedError + @rename_keyword(color='rgbcolor') @options(alpha=1, fill=False, thickness=1, edgecolor='blue', facecolor='blue', linestyle='solid', zorder=5, aspect_ratio=1.0, legend_label=None, legend_color=None) diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py index 8a61068887f..0b6c1072ec4 100644 --- a/src/sage/plot/graphics.py +++ b/src/sage/plot/graphics.py @@ -1,4 +1,3 @@ -# -*- encoding: utf-8 -*- r""" Graphics objects @@ -100,23 +99,23 @@ def _parse_figsize(figsize): # figsize should be a pair of positive numbers if len(figsize) != 2: raise ValueError("figsize should be a positive number or a list " - "of two positive numbers, not {0}".format(figsize)) + f"of two positive numbers, not {figsize}") figsize = (float(figsize[0]), float(figsize[1])) # floats for mpl if not (figsize[0] > 0 and figsize[1] > 0): raise ValueError("figsize should be positive numbers, " - "not {0} and {1}".format(figsize[0], figsize[1])) + f"not {figsize[0]} and {figsize[1]}") else: # in this case, figsize is a single number representing the width and # should be positive try: figsize = float(figsize) # to pass to mpl except TypeError: - raise TypeError("figsize should be a positive number, not {0}".format(figsize)) + raise TypeError(f"figsize should be a positive number, not {figsize}") if figsize > 0: default_width, default_height = rcParams['figure.figsize'] figsize = (figsize, default_height * figsize / default_width) else: - raise ValueError("figsize should be positive, not {0}".format(figsize)) + raise ValueError(f"figsize should be positive, not {figsize}") return figsize @@ -1398,7 +1397,7 @@ def _set_scale(self, subplot, scale=None, base=None): if scale not in ('linear', 'loglog', 'semilogx', 'semilogy'): raise ValueError("The scale must be one of 'linear', 'loglog'," - " 'semilogx' or 'semilogy' -- got '{0}'".format(scale)) + f" 'semilogx' or 'semilogy' -- got '{scale}'") if isinstance(base, (list, tuple)): basex, basey = base @@ -1437,37 +1436,37 @@ def _set_scale(self, subplot, scale=None, base=None): # NOTE: If you intend to use a new parameter in show(), you should update # this dictionary to contain the default value for that parameter. - SHOW_OPTIONS = dict(# axes options - axes=None, axes_labels=None, axes_labels_size=None, - axes_pad=None, base=None, scale=None, - xmin=None, xmax=None, ymin=None, ymax=None, - flip_x=False, flip_y=False, + SHOW_OPTIONS = {# axes options + 'axes': None, 'axes_labels': None, 'axes_labels_size': None, + 'axes_pad': None, 'base': None, 'scale': None, + 'xmin': None, 'xmax': None, 'ymin': None, 'ymax': None, + 'flip_x': False, 'flip_y': False, # Figure options - aspect_ratio=None, dpi=DEFAULT_DPI, fig_tight=True, - figsize=None, fontsize=None, frame=False, - title=None, title_pos=None, transparent=False, + 'aspect_ratio': None, 'dpi': DEFAULT_DPI, 'fig_tight': True, + 'figsize': None, 'fontsize': None, 'frame': False, + 'title': None, 'title_pos': None, 'transparent': False, # Grid options - gridlines=None, gridlinesstyle=None, - hgridlinesstyle=None, vgridlinesstyle=None, + 'gridlines': None, 'gridlinesstyle': None, + 'hgridlinesstyle': None, 'vgridlinesstyle': None, # Legend options - legend_options={}, show_legend=None, + 'legend_options': {}, 'show_legend': None, # Ticks options - ticks=None, tick_formatter=None, ticks_integer=False, + 'ticks': None, 'tick_formatter': None, 'ticks_integer': False, # Text options - typeset='default') + 'typeset': 'default'} # Default options for the legends: - LEGEND_OPTIONS = dict(back_color='white', borderpad=0.6, - borderaxespad=None, - columnspacing=None, - fancybox=False, font_family='sans-serif', - font_size='medium', font_style='normal', - font_variant='normal', font_weight='medium', - handlelength=0.05, handletextpad=0.5, - labelspacing=0.02, loc='best', - markerscale=0.6, ncol=1, numpoints=2, - shadow=True, title=None) + LEGEND_OPTIONS = {'back_color': 'white', 'borderpad': 0.6, + 'borderaxespad': None, + 'columnspacing': None, + 'fancybox': False, 'font_family': 'sans-serif', + 'font_size': 'medium', 'font_style': 'normal', + 'font_variant': 'normal', 'font_weight': 'medium', + 'handlelength': 0.05, 'handletextpad': 0.5, + 'labelspacing': 0.02, 'loc': 'best', + 'markerscale': 0.6, 'ncol': 1, 'numpoints': 2, + 'shadow': True, 'title': None} @suboptions('legend', **LEGEND_OPTIONS) def show(self, **kwds): @@ -2788,7 +2787,7 @@ def matplotlib(self, filename=None, rcParams['text.usetex'] = True elif typeset != 'default': # We won't change (maybe user-set) defaults raise ValueError("typeset must be set to one of 'default', 'latex'," - " or 'type1'; got '{}'.".format(typeset)) + f" or 'type1'; got '{typeset}'.") self.fontsize(fontsize) self.axes_labels(l=axes_labels) @@ -2805,7 +2804,7 @@ def matplotlib(self, filename=None, if not subplot: subplot = figure.add_subplot(111) # Add all the primitives to the subplot - old_opts = dict() + old_opts = {} for g in self._objects: opts, old_opts[g] = g.options(), g.options() for k, v in opts.items(): @@ -2867,7 +2866,7 @@ def matplotlib(self, filename=None, if show_legend: from matplotlib.font_manager import FontProperties - lopts = dict() + lopts = {} lopts.update(legend_options) lopts.update(self._legend_opts) prop = FontProperties( @@ -2898,8 +2897,8 @@ def matplotlib(self, filename=None, subplot.set_xlim([xmin, xmax]) subplot.set_ylim([ymin, ymax]) - locator_options = dict(nbins=9, steps=[1, 2, 5, 10], - integer=ticks_integer) + locator_options = {'nbins': 9, 'steps': [1, 2, 5, 10], + 'integer': ticks_integer} if axes is None: axes = self._show_axes @@ -3090,8 +3089,8 @@ def matplotlib(self, filename=None, if gridlinesstyle is None: # Set up the default grid style - gridlinesstyle = dict(color='black', linestyle=':', - linewidth=0.5) + gridlinesstyle = {'color': 'black', 'linestyle': ':', + 'linewidth': 0.5} vgridstyle = gridlinesstyle.copy() if vgridlinesstyle is not None: @@ -3341,7 +3340,7 @@ def save(self, filename, **kwds): Graphics object consisting of 1 graphics primitive """ - options = dict() + options = {} options.update(self.SHOW_OPTIONS) options.update(self._extra_kwds) options.update(kwds) @@ -3406,7 +3405,7 @@ def save(self, filename, **kwds): # tight_layout adjusts the *subplot* parameters so ticks aren't cut off, etc. figure.tight_layout() - opts = dict(dpi=dpi, transparent=transparent) + opts = {'dpi': dpi, 'transparent': transparent} if fig_tight is True: opts['bbox_inches'] = 'tight' if self._bbox_extra_artists: @@ -3438,7 +3437,7 @@ def _latex_(self, **kwds): """ tmpfilename = tmp_filename(ext='.pgf') self.save(filename=tmpfilename, **kwds) - with open(tmpfilename, "r") as tmpfile: + with open(tmpfilename) as tmpfile: latex_list = tmpfile.readlines() from sage.misc.latex import latex latex.add_package_to_preamble_if_available('pgf') @@ -3464,7 +3463,7 @@ def description(self): for g in self: g_zorder = g.options().get('zorder', 0) if hasattr(g, 'xdata'): - g_str = '{0}:\t{1}'.format(g, list(zip(g.xdata, g.ydata))) + g_str = f'{g}:\t{list(zip(g.xdata, g.ydata))}' else: g_str = repr(g) data.append([g_zorder, g_str, g]) diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py index e10229417fc..959284fa2e1 100644 --- a/src/sage/plot/histogram.py +++ b/src/sage/plot/histogram.py @@ -180,9 +180,9 @@ def _repr_(self): """ L = len(self.datalist) if not hasattr(self.datalist[0], '__contains__'): - return "Histogram defined by a data list of size {}".format(L) + return f"Histogram defined by a data list of size {L}" else: - return "Histogram defined by {} data lists".format(L) + return f"Histogram defined by {L} data lists" def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/hyperbolic_arc.py b/src/sage/plot/hyperbolic_arc.py index 4e7fda8350d..9b89198c68f 100644 --- a/src/sage/plot/hyperbolic_arc.py +++ b/src/sage/plot/hyperbolic_arc.py @@ -227,7 +227,8 @@ def _repr_(self): sage: HyperbolicArc(0, 1/2+I*sqrt(3)/2, "UHP", {}) Hyperbolic arc (0.000000000000000, 0.500000000000000 + 0.866025403784439*I) """ - return "Hyperbolic arc (%s, %s)" % (self.A, self.B) + return f"Hyperbolic arc ({self.A}, {self.B})" + @rename_keyword(color='rgbcolor') @options(alpha=1, fill=False, thickness=1, rgbcolor="blue", zorder=2, linestyle='solid') @@ -389,9 +390,9 @@ def hyperbolic_arc(a, b, model="UHP", **options): # Check for valid points if a[2] < 0 or a[0]**2+a[1]**2-a[2]**2 + 1 > EPSILON: - raise ValueError("%s is not a valid point in the HM model" % (a,)) + raise ValueError(f"{a} is not a valid point in the HM model") if b[2] < 0 or b[0]**2+b[1]**2-b[2]**2 + 1 > EPSILON: - raise ValueError("%s is not a valid point in the HM model" % (b,)) + raise ValueError(f"{b} is not a valid point in the HM model") HM = HyperbolicPlane().HM() geodesic = HM.get_geodesic(a, b) diff --git a/src/sage/plot/hyperbolic_polygon.py b/src/sage/plot/hyperbolic_polygon.py index efe39697829..ba09c3de97c 100644 --- a/src/sage/plot/hyperbolic_polygon.py +++ b/src/sage/plot/hyperbolic_polygon.py @@ -109,6 +109,7 @@ def _repr_(self): """ return "Hyperbolic polygon ({})".format(", ".join(map(str, self._pts))) + def _winding_number(vertices, point): r""" Compute the winding number of the given point in the plane `z = 0`. diff --git a/src/sage/plot/hyperbolic_regular_polygon.py b/src/sage/plot/hyperbolic_regular_polygon.py index 9be2169ab63..17397dce3f4 100644 --- a/src/sage/plot/hyperbolic_regular_polygon.py +++ b/src/sage/plot/hyperbolic_regular_polygon.py @@ -117,7 +117,7 @@ def __init__(self, sides, i_angle, center, options): raise ValueError("interior angle %s must be in (0, pi) interval" % (i_angle)) if pi*(sides-2) - sides*i_angle <= 0: raise ValueError("there exists no hyperbolic regular compact polygon," - " for sides=%s the interior angle must be less than %s" % (sides, pi * (sides-2) / sides)) + " for sides={} the interior angle must be less than {}".format(sides, pi * (sides-2) / sides)) self.sides = sides self.i_angle = i_angle beta = 2 * pi / self.sides # compute the rotation angle to be used ahead @@ -168,8 +168,7 @@ def _repr_(self): sage: HyperbolicRegularPolygon(5,pi/2,I, {}) Hyperbolic regular polygon (sides=5, i_angle=1/2*pi, center=1.00000000000000*I) """ - return ("Hyperbolic regular polygon (sides=%s, i_angle=%s, center=%s)" - % (self.sides, self.i_angle, self.center)) + return ("Hyperbolic regular polygon (sides={}, i_angle={}, center={})".format(self.sides, self.i_angle, self.center)) def _i_rotation(self, z, alpha): r""" @@ -200,6 +199,7 @@ def _i_rotation(self, z, alpha): G = matrix([[_c, _s], [-_s, _c]]) return (G[0][0] * z + G[0][1]) / (G[1][0] * z + G[1][1]) + @rename_keyword(color='rgbcolor') @options(alpha=1, fill=False, thickness=1, rgbcolor="blue", zorder=2, linestyle='solid') diff --git a/src/sage/plot/matrix_plot.py b/src/sage/plot/matrix_plot.py index 96e966a6513..da55e540890 100644 --- a/src/sage/plot/matrix_plot.py +++ b/src/sage/plot/matrix_plot.py @@ -162,7 +162,7 @@ def _repr_(self): sage: m = M[0]; m # needs sage.symbolic MatrixPlot defined by a 5 x 5 data grid """ - return "MatrixPlot defined by a %s x %s data grid" % (self.xy_array_row, self.xy_array_col) + return "MatrixPlot defined by a {} x {} data grid".format(self.xy_array_row, self.xy_array_col) def _render_on_subplot(self, subplot): """ @@ -195,9 +195,9 @@ def _render_on_subplot(self, subplot): rowstyle = subdiv_options['style'] colstyle = subdiv_options['style'] if rowstyle is None: - rowstyle = dict() + rowstyle = {} if colstyle is None: - colstyle = dict() + colstyle = {} # Make line objects for subdivisions from .line import line2d @@ -224,10 +224,10 @@ def _render_on_subplot(self, subplot): extent = (lim['xmin'], lim['xmax'], lim['ymax' if flip_y else 'ymin'], lim['ymin' if flip_y else 'ymax']) - opts = dict(cmap=cmap, interpolation='nearest', aspect='equal', - norm=norm, vmin=options['vmin'], vmax=options['vmax'], - origin=('upper' if flip_y else 'lower'), - extent=extent, zorder=options.get('zorder')) + opts = {'cmap': cmap, 'interpolation': 'nearest', 'aspect': 'equal', + 'norm': norm, 'vmin': options['vmin'], 'vmax': options['vmax'], + 'origin': ('upper' if flip_y else 'lower'), + 'extent': extent, 'zorder': options.get('zorder')} image = subplot.imshow(self.xy_data_array, **opts) if options.get('colorbar', False): diff --git a/src/sage/plot/multigraphics.py b/src/sage/plot/multigraphics.py index f22febca152..f04755a7d09 100644 --- a/src/sage/plot/multigraphics.py +++ b/src/sage/plot/multigraphics.py @@ -151,7 +151,7 @@ def __init__(self, graphics_list): else: if not isinstance(ins, (list, tuple)) or len(ins) != 2: raise TypeError("a pair (Graphics, position) is " - "expected, not {}".format(ins)) + f"expected, not {ins}") self.append(ins[0], pos=ins[1]) def _repr_(self): @@ -490,7 +490,7 @@ def save(self, filename, figsize=None, **kwds): # tight_layout adjusts the *subplot* parameters so ticks aren't # cut off, etc. figure.tight_layout() - opts = dict(dpi=dpi, transparent=transparent) + opts = {"dpi": dpi, "transparent": transparent} if fig_tight is True: opts['bbox_inches'] = 'tight' figure.savefig(filename, **opts) @@ -545,7 +545,7 @@ def _latex_(self, **kwds): """ tmpfilename = tmp_filename(ext='.pgf') self.save(filename=tmpfilename, **kwds) - with open(tmpfilename, "r") as tmpfile: + with open(tmpfilename) as tmpfile: latex_list = tmpfile.readlines() return ''.join(latex_list) @@ -741,8 +741,8 @@ def __str__(self): """ n = len(self._glist) if n <= 1: - return "Multigraphics with {} element".format(n) - return "Multigraphics with {} elements".format(n) + return f"Multigraphics with {n} element" + return f"Multigraphics with {n} elements" def _add_subplot(self, figure, index, **options): r""" @@ -910,7 +910,7 @@ def append(self, graphics, pos=None): from matplotlib import rcParams if not isinstance(graphics, Graphics): raise TypeError("a Graphics object is expected, " - "not {}".format(graphics)) + f"not {graphics}") if pos is None: # Default position: left = rcParams['figure.subplot.left'] @@ -919,7 +919,7 @@ def append(self, graphics, pos=None): height = rcParams['figure.subplot.top'] - bottom pos = (left, bottom, width, height) elif not isinstance(pos, (list, tuple)) or len(pos) != 4: - raise TypeError("pos must be a 4-tuple, not {}".format(pos)) + raise TypeError(f"pos must be a 4-tuple, not {pos}") pos = tuple(float(p) for p in pos) self._glist.append(graphics) self._positions.append(pos) @@ -1142,7 +1142,7 @@ def __init__(self, array): MultiGraphics.__init__(self, []) if not isinstance(array, (list, tuple)): raise TypeError("array must be a list of lists of Graphics " - "objects, not {}".format(array)) + f"objects, not {array}") array = list(array) self._rows = len(array) if self._rows > 0: @@ -1155,7 +1155,7 @@ def __init__(self, array): for row in array: # basically flatten the list if not isinstance(row, (list, tuple)) or len(row) != self._cols: raise TypeError("array must be a list of equal-size lists of " - "Graphics objects, not {}".format(array)) + f"Graphics objects, not {array}") for g in row: if not isinstance(g, Graphics): raise TypeError("every element of array must be a " @@ -1179,7 +1179,7 @@ def __str__(self): 'Graphics Array of size 2 x 3' """ - return "Graphics Array of size {} x {}".format(self._rows, self._cols) + return f"Graphics Array of size {self._rows} x {self._cols}" def _add_subplot(self, figure, index, **options): r""" diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py index 20a71ef8bd1..2f830297d4b 100644 --- a/src/sage/plot/plot.py +++ b/src/sage/plot/plot.py @@ -673,6 +673,7 @@ def f(x): return (x-3)*(x-5)*(x-7)+40 _SelectiveFormatterClass = None + def SelectiveFormatter(formatter, skip_values): """ This matplotlib formatter selectively omits some tick values and @@ -773,6 +774,7 @@ def __call__(self, x, *args, **kwds): return _SelectiveFormatterClass(formatter, skip_values) + def xydata_from_point_list(points): r""" Return two lists (xdata, ydata), each coerced to a list of floats, @@ -837,6 +839,7 @@ def xydata_from_point_list(points): ydata.append(float(y)) return xdata, ydata + @options(alpha=1, thickness=1, fill=False, fillcolor='automatic', fillalpha=0.5, plot_points=200, adaptive_tolerance=0.01, adaptive_recursion=5, detect_poles=False, exclude=None, @@ -2066,13 +2069,14 @@ def f(x): return (floor(x)+0.5) / (1-(x-0.5)**2) xmax = kwds.pop('xmax', 1) G = _plot(funcs, (xmin, xmax), *args, **kwds) else: - sage.misc.verbose.verbose("there were %s extra arguments (besides %s)" % (n, funcs), level=0) + sage.misc.verbose.verbose("there were {} extra arguments (besides {})".format(n, funcs), level=0) G._set_extra_kwds(G_kwds) if do_show: G.show() return G + def _plot(funcs, xrange, parametric=False, polar=False, fill=False, label='', randomize=True, **options): """ @@ -2427,7 +2431,7 @@ def golden_rainbow(i,lightness=0.4): fstr = 'max' else: fstr = 'min' - msg = "WARNING: You use the built-in function %s for filling. You probably wanted the string '%s'." % (fstr, fstr) + msg = "WARNING: You use the built-in function {} for filling. You probably wanted the string '{}'.".format(fstr, fstr) sage.misc.verbose.verbose(msg, level=0) if not is_fast_float(fill): fill_f = fast_float(fill, expect_one_var=True) @@ -2760,6 +2764,7 @@ def parametric_plot(funcs, *args, **kwargs): else: raise ValueError("the number of functions and the number of variable ranges is not a supported combination for a 2d or 3d parametric plots") + @options(aspect_ratio=1.0) def polar_plot(funcs, *args, **kwds): r""" @@ -2865,6 +2870,7 @@ def polar_plot(funcs, *args, **kwds): kwds['polar'] = True return plot(funcs, *args, **kwds) + @options(aspect_ratio='automatic') def list_plot(data, plotjoined=False, **kwargs): r""" @@ -3154,6 +3160,8 @@ def list_plot(data, plotjoined=False, **kwargs): return point(data, **kwargs) #------------------------ Graphs on log scale ---------------------------# + + @options(base=10) def plot_loglog(funcs, *args, **kwds): """ @@ -3204,6 +3212,7 @@ def plot_loglog(funcs, *args, **kwds): """ return plot(funcs, *args, scale='loglog', **kwds) + @options(base=10) def plot_semilogx(funcs, *args, **kwds): """ @@ -3256,6 +3265,7 @@ def plot_semilogx(funcs, *args, **kwds): """ return plot(funcs, *args, scale='semilogx', **kwds) + @options(base=10) def plot_semilogy(funcs, *args, **kwds): """ @@ -3294,6 +3304,7 @@ def plot_semilogy(funcs, *args, **kwds): """ return plot(funcs, *args, scale='semilogy', **kwds) + @options(base=10) def list_plot_loglog(data, plotjoined=False, **kwds): """ @@ -3361,6 +3372,7 @@ def list_plot_loglog(data, plotjoined=False, **kwds): """ return list_plot(data, plotjoined=plotjoined, scale='loglog', **kwds) + @options(base=10) def list_plot_semilogx(data, plotjoined=False, **kwds): """ @@ -3416,6 +3428,7 @@ def list_plot_semilogx(data, plotjoined=False, **kwds): """ return list_plot(data, plotjoined=plotjoined, scale='semilogx', **kwds) + @options(base=10) def list_plot_semilogy(data, plotjoined=False, **kwds): """ @@ -3474,6 +3487,7 @@ def list_plot_semilogy(data, plotjoined=False, **kwds): """ return list_plot(data, plotjoined=plotjoined, scale='semilogy', **kwds) + def to_float_list(v): """ Given a list or tuple or iterable v, coerce each element of v to a @@ -3487,6 +3501,7 @@ def to_float_list(v): """ return [float(x) for x in v] + def reshape(v, n, m): """ Helper function for creating graphics arrays. @@ -3553,6 +3568,7 @@ def reshape(v, n, m): return L + def graphics_array(array, nrows=None, ncols=None): r""" Plot a list of lists (or tuples) of graphics objects on one canvas, @@ -3723,6 +3739,7 @@ def h(x): return sin(4*x) array = reshape(array, nrows, ncols) return GraphicsArray(array) + def multi_graphics(graphics_list): r""" Plot a list of graphics at specified positions on a single canvas. @@ -3797,6 +3814,7 @@ def multi_graphics(graphics_list): """ return MultiGraphics(graphics_list) + def minmax_data(xdata, ydata, dict=False): """ Return the minimums and maximums of ``xdata`` and ``ydata``. @@ -3832,6 +3850,7 @@ def minmax_data(xdata, ydata, dict=False): else: return xmin, xmax, ymin, ymax + def adaptive_refinement(f, p1, p2, adaptive_tolerance=0.01, adaptive_recursion=5, level=0, *, excluded=False): r""" @@ -3913,14 +3932,14 @@ def adaptive_refinement(f, p1, p2, adaptive_tolerance=0.01, try: y = float(f(x)) if str(y) in ['nan', 'NaN', 'inf', '-inf']: - sage.misc.verbose.verbose("%s\nUnable to compute f(%s)" % (msg, x),1) + sage.misc.verbose.verbose(f"{msg}\nUnable to compute f({x})",1) # give up for this branch if excluded: return [(x, 'NaN')] return [] except (ZeroDivisionError, TypeError, ValueError, OverflowError) as msg: - sage.misc.verbose.verbose("%s\nUnable to compute f(%s)" % (msg, x), 1) + sage.misc.verbose.verbose(f"{msg}\nUnable to compute f({x})", 1) # give up for this branch if excluded: return [(x, 'NaN')] @@ -3942,6 +3961,7 @@ def adaptive_refinement(f, p1, p2, adaptive_tolerance=0.01, else: return [] + def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize=True, initial_points=None, *, excluded=False, @@ -4073,7 +4093,7 @@ def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, exception_indices.append(i) except (ArithmeticError, TypeError, ValueError) as m: - sage.misc.verbose.verbose("%s\nUnable to compute f(%s)" % (m, xi), 1) + sage.misc.verbose.verbose(f"{m}\nUnable to compute f({xi})", 1) if i == 0: # Given an error for left endpoint, try to move it in slightly for j in range(1, 99): diff --git a/src/sage/plot/plot3d/list_plot3d.py b/src/sage/plot/plot3d/list_plot3d.py index 7bfd84f76a4..a2b0781796c 100644 --- a/src/sage/plot/plot3d/list_plot3d.py +++ b/src/sage/plot/plot3d/list_plot3d.py @@ -264,7 +264,7 @@ def list_plot3d(v, interpolation_type='default', point_list=None, **kwds): kwds['color'] = txtr if is_Matrix(v): if (interpolation_type == 'default' or - interpolation_type == 'linear' and 'num_points' not in kwds): + interpolation_type == 'linear' and 'num_points' not in kwds): return list_plot3d_matrix(v, **kwds) else: data = [(i, j, v[i, j]) @@ -563,7 +563,7 @@ def list_plot3d_tuples(v, interpolation_type, **kwds): # noise to avoid the problem if needed. corr_matrix = numpy.corrcoef(x, y) if not (-0.9 <= corr_matrix[0, 1] <= 0.9): - ep = float(.000001) + ep = .000001 x = [float(p[0]) + random() * ep for p in v] y = [float(p[1]) + random() * ep for p in v] @@ -607,6 +607,7 @@ def list_plot3d_tuples(v, interpolation_type, **kwds): def g(x, y): z = f(x, y) return (x, y, z) + G = ParametricSurface(g, (list(numpy.r_[xmin:xmax:num_points * j]), list(numpy.r_[ymin:ymax:num_points * j])), **kwds) @@ -623,6 +624,7 @@ def g(x, y): def g(x, y): z = f([x, y]).item() return (x, y, z) + G = ParametricSurface(g, (list(numpy.r_[xmin:xmax:num_points * j]), list(numpy.r_[ymin:ymax:num_points * j])), **kwds) @@ -636,10 +638,11 @@ def g(x, y): kx = kwds['degree'] ky = kwds['degree'] s = kwds.get('smoothing', len(x) - numpy.sqrt(2 * len(x))) - s = interpolate.bisplrep(x, y, z, [int(1)] * len(x), xmin, xmax, + s = interpolate.bisplrep(x, y, z, [1] * len(x), xmin, xmax, ymin, ymax, kx=kx, ky=ky, s=s) def f(x, y): return interpolate.bisplev(x, y, s) + return plot3d(f, (xmin, xmax), (ymin, ymax), plot_points=[num_points, num_points], **kwds) diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py index 2e027e87dd2..83845dc9494 100644 --- a/src/sage/plot/plot3d/plot3d.py +++ b/src/sage/plot/plot3d/plot3d.py @@ -158,7 +158,7 @@ def f(x,y): return math.exp(x/5)*math.cos(y) from sage.misc.sageinspect import sage_getargspec, is_function_or_cython_function -class _Coordinates(): +class _Coordinates: """ This abstract class encapsulates a new coordinate system for plotting. Sub-classes must implement the :meth:`transform` method which, given @@ -348,14 +348,14 @@ def to_cartesian(self, func, params=None): def subs_func(t): # We use eval so that the lambda function has the same # variable names as the original function - ll = """lambda {x},{y}: t.subs({{ - dep_var_dummy: float(func({x}, {y})), - indep_var_dummies[0]: float({x}), - indep_var_dummies[1]: float({y}) - }})""".format(x=params[0], y=params[1]) - return eval(ll, dict(t=t, func=func, - dep_var_dummy=dep_var_dummy, - indep_var_dummies=indep_var_dummies)) + ll = f"""lambda {params[0]},{params[1]}: t.subs({{ + dep_var_dummy: float(func({params[0]}, {params[1]})), + indep_var_dummies[0]: float({params[0]}), + indep_var_dummies[1]: float({params[1]}) + }})""" + return eval(ll, {'t': t, 'func': func, + 'dep_var_dummy': dep_var_dummy, + 'indep_var_dummies': indep_var_dummies}) return [subs_func(m) for m in transformation] def __repr__(self): @@ -373,8 +373,7 @@ def __repr__(self): sage: c My Special Coordinates coordinate transform (z in terms of x, y) """ - return '%s coordinate transform (%s in terms of %s)' % \ - (self._name, self.dep_var, ', '.join(self.indep_vars)) + return '{} coordinate transform ({} in terms of {})'.format(self._name, self.dep_var, ', '.join(self.indep_vars)) def _find_arguments_for_callable(func): @@ -471,6 +470,7 @@ def transform(self, **kwds): """ return tuple(t.subs(**kwds) for t in self.custom_trans) + class Spherical(_Coordinates): """ A spherical coordinate system for use with ``plot3d(transformation=...)`` @@ -542,6 +542,7 @@ def transform(self, radius=None, azimuth=None, inclination=None): radius * sin(inclination) * sin(azimuth), radius * cos(inclination)) + class SphericalElevation(_Coordinates): """ A spherical coordinate system for use with ``plot3d(transformation=...)`` @@ -660,6 +661,7 @@ def transform(self, radius=None, azimuth=None, elevation=None): radius * cos(elevation) * sin(azimuth), radius * sin(elevation)) + class Cylindrical(_Coordinates): """ A cylindrical coordinate system for use with ``plot3d(transformation=...)`` @@ -730,6 +732,7 @@ def transform(self, radius=None, azimuth=None, height=None): radius * sin(azimuth), height) + class TrivialTriangleFactory: """ Class emulating behavior of :class:`~sage.plot.plot3d.tri_plot.TriangleFactory` @@ -794,6 +797,8 @@ def smooth_triangle(self, a, b, c, da, db, dc, color=None): from . import parametric_plot3d + + def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): """ Plots a function in 3d. @@ -1118,6 +1123,7 @@ def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): P.frame_aspect_ratio([1.0,1.0,0.5]) return P + def plot3d_adaptive(f, x_range, y_range, color="automatic", grad_f=None, max_bend=.5, max_depth=5, initial_depth=4, num_colors=128, **kwds): @@ -1323,6 +1329,7 @@ def spherical_plot3d(f, urange, vrange, **kwds): """ return plot3d(f, urange, vrange, transformation=Spherical('radius', ['azimuth', 'inclination']), **kwds) + def cylindrical_plot3d(f, urange, vrange, **kwds): """ Plots a function in cylindrical coordinates. This function is @@ -1397,6 +1404,7 @@ def cylindrical_plot3d(f, urange, vrange, **kwds): """ return plot3d(f, urange, vrange, transformation=Cylindrical('radius', ['azimuth', 'height']), **kwds) + def axes(scale=1, radius=None, **kwds): """ Creates basic axes in three dimensions. Each axis is a three diff --git a/src/sage/plot/plot3d/revolution_plot3d.py b/src/sage/plot/plot3d/revolution_plot3d.py index f3220dcd1a3..6349fabbdd5 100644 --- a/src/sage/plot/plot3d/revolution_plot3d.py +++ b/src/sage/plot/plot3d/revolution_plot3d.py @@ -25,6 +25,7 @@ from sage.plot.plot3d.parametric_plot3d import parametric_plot3d + @rename_keyword(alpha='opacity') def revolution_plot3d(curve,trange,phirange=None,parallel_axis='z',axis=(0,0),print_vector=False,show_curve=False,**kwds): r""" diff --git a/src/sage/plot/plot3d/shapes2.py b/src/sage/plot/plot3d/shapes2.py index 96e4646bbc4..7fe8aeb18a2 100644 --- a/src/sage/plot/plot3d/shapes2.py +++ b/src/sage/plot/plot3d/shapes2.py @@ -942,9 +942,8 @@ def tachyon_repr(self, render_params): radius = self.size * TACHYON_PIXEL texture = self.texture.id - return ("Sphere center {center[0]!r} {center[1]!r} {center[2]!r} " - "Rad {radius!r} {texture}").format(center=cen, radius=radius, - texture=texture) + return (f"Sphere center {cen[0]!r} {cen[1]!r} {cen[2]!r} " + f"Rad {radius!r} {texture}") def obj_repr(self, render_params): """ @@ -980,7 +979,7 @@ def jmol_repr(self, render_params): name = render_params.unique_name('point') transform = render_params.transform cen = self.loc if transform is None else transform(self.loc) - return ["draw %s DIAMETER %s {%s %s %s}\n%s" % (name, int(self.size), cen[0], cen[1], cen[2], self.texture.jmol_str('$' + name))] + return ["draw {} DIAMETER {} {{{} {} {}}}\n{}".format(name, int(self.size), cen[0], cen[1], cen[2], self.texture.jmol_str('$' + name))] def threejs_repr(self, render_params): r""" @@ -1010,7 +1009,7 @@ def threejs_repr(self, render_params): color = '#' + str(self.texture.hex_rgb()) opacity = float(self.texture.opacity) size = float(self.size) - point = dict(point=center, size=size, color=color, opacity=opacity) + point = {'point': center, 'size': size, 'color': color, 'opacity': opacity} return [('point', point)] def stl_binary_repr(self, render_params): @@ -1198,13 +1197,13 @@ def jmol_repr(self, render_params): TP = P if T is None else T(P) if P in corners: if cmd: - cmds.append(cmd + " {%s %s %s} " % TP) + cmds.append(cmd + " {{{} {} {}}} ".format(*TP)) cmds.append(self.texture.jmol_str('$' + name)) type = 'arrow' if self.arrow_head and P is last_corner else 'curve' name = render_params.unique_name('line') - cmd = "draw %s diameter %s %s {%s %s %s} " % (name, int(self.thickness), type, TP[0], TP[1], TP[2]) + cmd = "draw {} diameter {} {} {{{} {} {}}} ".format(name, int(self.thickness), type, TP[0], TP[1], TP[2]) else: - cmd += " {%s %s %s} " % TP + cmd += " {{{} {} {}}} ".format(*TP) cmds.append(cmd) cmds.append(self.texture.jmol_str('$' + name)) return cmds @@ -1392,7 +1391,7 @@ def threejs_repr(self, render_params): transform = render_params.transform if transform is not None: points = [transform(p) for p in points] - line = dict(points=points, color=color, opacity=opacity, linewidth=thickness) + line = {'points': points, 'color': color, 'opacity': opacity, 'linewidth': thickness} reprs.append(('line', line)) return reprs diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py index 4e8184a7816..21a53787610 100644 --- a/src/sage/plot/plot3d/tachyon.py +++ b/src/sage/plot/plot3d/tachyon.py @@ -629,7 +629,7 @@ def _res(self): sage: t._res() '\nresolution 300 700\n' """ - return '\nresolution %s %s\n' % (self._xres, self._yres) + return f'\nresolution {self._xres} {self._yres}\n' def _camera(self): r""" @@ -651,20 +651,14 @@ def _camera(self): if self._aperture != '': camera_out = camera_out + r""" aperture %s""" % (float(self._aperture)) - camera_out = camera_out + r""" - zoom %s - aspectratio %s - antialiasing %s - raydepth %s - center %s - viewdir %s - updir %s""" % (float(self._zoom), - float(self._aspectratio), - int(self._antialiasing), - int(self._raydepth), - tostr(self._camera_position), - tostr(self._viewdir), - tostr(self._updir)) + camera_out = camera_out + fr""" + zoom {float(self._zoom)} + aspectratio {float(self._aspectratio)} + antialiasing {int(self._antialiasing)} + raydepth {int(self._raydepth)} + center {tostr(self._camera_position)} + viewdir {tostr(self._viewdir)} + updir {tostr(self._updir)}""" if self._frustum != '': camera_out = camera_out + r""" frustum %s""" % (tostr(self._frustum)) @@ -691,10 +685,10 @@ def str(self): """ return r""" begin_scene - %s - %s - %s - end_scene""" % (self._res(), + {} + {} + {} + end_scene""".format(self._res(), self._camera(), '\n'.join(x.str() for x in self._objects)) @@ -1083,7 +1077,7 @@ def parametric_plot(self, f, t_0, t_f, tex, r=.1, cylinders=True, e_rel=.01, e_abs=.01)) -class Light(): +class Light: r""" Represent lighting objects. @@ -1125,15 +1119,14 @@ def str(self): color 1.0 1.0 1.0 """ - return r""" - light center %s - rad %s - color %s - """ % (tostr(self._center), self._radius, - tostr(self._color)) + return fr""" + light center {tostr(self._center)} + rad {self._radius} + color {tostr(self._color)} + """ -class Texfunc(): +class Texfunc: def __init__(self, ttype=0, center=(0, 0, 0), rotate=(0, 0, 0), scale=(1, 1, 1), imagefile=''): @@ -1195,7 +1188,7 @@ def str(self): raise ValueError -class Texture(): +class Texture: def __init__(self, name, ambient=0.2, diffuse=0.8, specular=0.0, opacity=1.0, @@ -1255,10 +1248,10 @@ def str(self): ['ambient', '0.2', 'diffuse', '0.8'] """ return r""" - texdef %s ambient %s diffuse %s specular %s opacity %s - phong %s %s phong_size %s - color %s texfunc %s - """ % (self._name, + texdef {} ambient {} diffuse {} specular {} opacity {} + phong {} {} phong_size {} + color {} texfunc {} + """.format(self._name, self._ambient, self._diffuse, self._specular, @@ -1270,7 +1263,7 @@ def str(self): self._texfunc) -class Sphere(): +class Sphere: r""" A class for creating spheres in tachyon. """ @@ -1305,12 +1298,12 @@ def str(self): sage: s.str() '\n sphere center 1.0 1.0 1.0 rad 1.0 r\n ' """ - return r""" - sphere center %s rad %s %s - """ % (tostr(self._center), self._radius, self._texture) + return fr""" + sphere center {tostr(self._center)} rad {self._radius} {self._texture} + """ -class Ring(): +class Ring: r""" An annulus of zero thickness. """ @@ -1346,12 +1339,12 @@ def str(self): '\n ring center 0.0 0.0 0.0 normal 1.0 1.0 0.0 inner 1.0 outer 2.0 s\n ' """ return r""" - ring center %s normal %s inner %s outer %s %s - """ % (tostr(self._center), tostr(self._normal), + ring center {} normal {} inner {} outer {} {} + """.format(tostr(self._center), tostr(self._normal), self._inner, self._outer, self._texture) -class FractalLandscape(): +class FractalLandscape: r""" Axis-aligned fractal landscape. @@ -1388,12 +1381,12 @@ def str(self): '\n scape res 20 20 scale 30 30 center 1.0 2.0 3.0 s\n ' """ return r""" - scape res %s scale %s center %s %s - """ % (tostr(self._res, 2, int), tostr(self._scale, 2, int), + scape res {} scale {} center {} {} + """.format(tostr(self._res, 2, int), tostr(self._scale, 2, int), tostr(self._center), self._texture) -class Cylinder(): +class Cylinder: r""" An infinite cylinder. """ @@ -1429,11 +1422,11 @@ def str(self): '\n cylinder center 0.0 0.0 0.0 axis 1.0 1.0 1.0 rad 0.1 s\n ' """ return r""" - cylinder center %s axis %s rad %s %s - """ % (tostr(self._center), tostr(self._axis), self._radius, self._texture) + cylinder center {} axis {} rad {} {} + """.format(tostr(self._center), tostr(self._axis), self._radius, self._texture) -class Plane(): +class Plane: r""" An infinite plane. """ @@ -1465,12 +1458,12 @@ def str(self): sage: p.str() '\n plane center 1.0 2.0 3.0 normal 1.0 2.0 4.0 s\n ' """ - return r""" - plane center %s normal %s %s - """ % (tostr(self._center), tostr(self._normal), self._texture) + return fr""" + plane center {tostr(self._center)} normal {tostr(self._normal)} {self._texture} + """ -class FCylinder(): +class FCylinder: r""" A finite cylinder. """ @@ -1504,11 +1497,11 @@ def str(self): '\n fcylinder base 0.0 0.0 0.0 apex 1.0 1.0 1.0 rad 0.1 s\n ' """ return r""" - fcylinder base %s apex %s rad %s %s - """ % (tostr(self._center), tostr(self._axis), self._radius, self._texture) + fcylinder base {} apex {} rad {} {} + """.format(tostr(self._center), tostr(self._axis), self._radius, self._texture) -class Axis_aligned_box(): +class Axis_aligned_box: r""" Box with axis-aligned edges with the given min and max coordinates. """ @@ -1540,9 +1533,9 @@ def str(self): sage: aab.str() '\n box min 0.0 0.0 0.0 max 1.0 1.0 1.0 s\n ' """ - return r""" - box min %s max %s %s - """ % (tostr(self._min_p), tostr(self._max_p), self._texture) + return fr""" + box min {tostr(self._min_p)} max {tostr(self._max_p)} {self._texture} + """ class TachyonTriangle(Triangle): @@ -1560,10 +1553,10 @@ def str(self): sage: t.str() '\n TRI V0 -1.0 -1.0 -1.0 V1 0.0 0.0 0.0 V2 1.0 2.0 3.0 \n 0\n ' """ - return r""" - TRI V0 %s V1 %s V2 %s - %s - """ % (tostr(self._a), tostr(self._b), tostr(self._c), self._color) + return fr""" + TRI V0 {tostr(self._a)} V1 {tostr(self._b)} V2 {tostr(self._c)} + {self._color} + """ class TachyonSmoothTriangle(SmoothTriangle): @@ -1581,12 +1574,11 @@ def str(self): sage: t.str() '\n STRI V0 ... 1.0 0.0 0.0 N1 0.0 1.0 0.0 N2 0.0 0.0 1.0 \n 0\n ' """ - return r""" - STRI V0 %s V1 %s V2 %s - N0 %s N1 %s N2 %s - %s - """ % (tostr(self._a), tostr(self._b), tostr(self._c), - tostr(self._da), tostr(self._db), tostr(self._dc), self._color) + return fr""" + STRI V0 {tostr(self._a)} V1 {tostr(self._b)} V2 {tostr(self._c)} + N0 {tostr(self._da)} N1 {tostr(self._db)} N2 {tostr(self._dc)} + {self._color} + """ class TachyonTriangleFactory(TriangleFactory): @@ -1663,7 +1655,7 @@ def get_colors(self, list): return self._tachyon.texture_recolor(self._texture, list) -class ParametricPlot(): +class ParametricPlot: r""" Parametric plotting routines. """ diff --git a/src/sage/plot/plot3d/texture.py b/src/sage/plot/plot3d/texture.py index c4dee5d3ad5..7e67a08d590 100644 --- a/src/sage/plot/plot3d/texture.py +++ b/src/sage/plot/plot3d/texture.py @@ -339,9 +339,9 @@ def _repr_(self): Texture(texture..., ffff00) """ if self.name is not None: - return "Texture(%s, %s, %s)" % (self.id, self.name, self.hex_rgb()) + return f"Texture({self.id}, {self.name}, {self.hex_rgb()})" else: - return "Texture(%s, %s)" % (self.id, self.hex_rgb()) + return f"Texture({self.id}, {self.hex_rgb()})" def hex_rgb(self): """ @@ -353,7 +353,7 @@ def hex_rgb(self): sage: Texture((1, .5, 0)).hex_rgb() 'ff7f00' """ - return "%02x%02x%02x" % tuple(int(255 * s) for s in self.color) + return "{:02x}{:02x}{:02x}".format(*tuple(int(255 * s) for s in self.color)) def tachyon_str(self): r""" @@ -451,7 +451,7 @@ def jmol_str(self, obj): sage: sum([dodecahedron(center=[2.5*x, 0, 0], color=(1, 0, 0, x/10)) for x in range(11)]).show(aspect_ratio=[1,1,1], frame=False, zoom=2) """ translucent = "translucent %s" % float(1 - self.opacity) if self.opacity < 1 else "" - return "color %s %s [%s,%s,%s]" % (obj, translucent, + return "color {} {} [{},{},{}]".format(obj, translucent, int(255 * self.color[0]), int(255 * self.color[1]), int(255 * self.color[2])) diff --git a/src/sage/plot/plot3d/tri_plot.py b/src/sage/plot/plot3d/tri_plot.py index 256b0d348c3..5eb15299fe5 100644 --- a/src/sage/plot/plot3d/tri_plot.py +++ b/src/sage/plot/plot3d/tri_plot.py @@ -25,6 +25,7 @@ from math import sqrt import random + class Triangle: """ A graphical triangle class. @@ -64,7 +65,7 @@ class of the form sage: print(tri.str()) [0, 0, 0] [-1, 2, 3] [0, 2, 0] 0 """ - return "%s %s %s %s" % (self._a, self._b, self._c, self._color) + return f"{self._a} {self._b} {self._c} {self._color}" def set_color(self, color): """ @@ -95,6 +96,7 @@ def get_vertices(self): """ return (self._a, self._b, self._c) + class SmoothTriangle(Triangle): """ A class for smoothed triangles. @@ -135,7 +137,7 @@ def str(self): sage: print(t.str()) [1, 2, 3] [2, 3, 4] [0, 0, 0] 0 [0, 0, 1] [0, 1, 0] [1, 0, 0] """ - return "%s %s %s %s %s %s %s" % (self._a, self._b, self._c, self._color, self._da, self._db, self._dc) + return "{} {} {} {} {} {} {}".format(self._a, self._b, self._c, self._color, self._da, self._db, self._dc) def get_normals(self): """ diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py index a54a6db185b..c8052fb1520 100644 --- a/src/sage/plot/plot_field.py +++ b/src/sage/plot/plot_field.py @@ -139,7 +139,7 @@ def _repr_(self): 20 """ - return "PlotField defined by a %s x %s vector grid" % ( + return "PlotField defined by a {} x {} vector grid".format( self._options['plot_points'], self._options['plot_points']) def _render_on_subplot(self, subplot): @@ -355,6 +355,6 @@ def plot_slope_field(f, xrange, yrange, **kwds): norm_inverse = lambda x,y: 1/sqrt(f(x, y)**2+1) f_normalized = lambda x,y: f(x, y)*norm_inverse(x, y) else: - norm_inverse = 1 / sqrt((f**2+1)) + norm_inverse = 1 / sqrt(f**2+1) f_normalized = f * norm_inverse return plot_vector_field((norm_inverse, f_normalized), xrange, yrange, **slope_options) diff --git a/src/sage/plot/point.py b/src/sage/plot/point.py index 9377d2bec85..0c2a2897368 100644 --- a/src/sage/plot/point.py +++ b/src/sage/plot/point.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- r""" Points diff --git a/src/sage/plot/primitive.py b/src/sage/plot/primitive.py index 20c2987142f..ee9966846b1 100644 --- a/src/sage/plot/primitive.py +++ b/src/sage/plot/primitive.py @@ -21,6 +21,7 @@ from sage.structure.sage_object import SageObject from sage.misc.verbose import verbose + class GraphicPrimitive(WithEqualityById, SageObject): """ Base class for graphics primitives, e.g., things that knows how to draw @@ -183,7 +184,7 @@ def options(self): for k in O.keys(): if k not in K: do_verify = False - verbose("WARNING: Ignoring option '%s'=%s" % (k, O[k]), + verbose(f"WARNING: Ignoring option '{k}'={O[k]}", level=0) t = True if t: diff --git a/src/sage/plot/text.py b/src/sage/plot/text.py index 602cdfebddf..1c49c102b62 100644 --- a/src/sage/plot/text.py +++ b/src/sage/plot/text.py @@ -85,7 +85,7 @@ def _repr_(self): sage: t = T[0];t # needs sage.symbolic Text 'I like cool constants' at the point (3.1415926535...,2.7182818284...) """ - return "Text '%s' at the point (%s,%s)" % (self.string, self.x, self.y) + return f"Text '{self.string}' at the point ({self.x},{self.y})" def _allowed_options(self): """ From 0c09460e3e1304753e189e7b46508d5d9cbbee24 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 26 Feb 2024 18:56:44 -0800 Subject: [PATCH 074/183] pkgs/sagemath-{objects,categories}: Add 'external' section according to draft PEP 725 --- pkgs/sagemath-categories/pyproject.toml.m4 | 17 +++++++++++++++++ pkgs/sagemath-objects/pyproject.toml.m4 | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/pkgs/sagemath-categories/pyproject.toml.m4 b/pkgs/sagemath-categories/pyproject.toml.m4 index eed48a1db15..edbafa59242 100644 --- a/pkgs/sagemath-categories/pyproject.toml.m4 +++ b/pkgs/sagemath-categories/pyproject.toml.m4 @@ -37,3 +37,20 @@ include-package-data = false [tool.setuptools.dynamic] version = {file = ["VERSION.txt"]} + +[external] +# External dependencies in the format proposed by https://peps.python.org/pep-0725 +build-requires = [ + "virtual:compiler/c", + "virtual:compiler/cpp", + "pkg:generic/pkg-config", +] + +host-requires = [ + "pkg:generic/gmp", + "pkg:generic/mpc", + "pkg:generic/mpfr", +] + +dependencies = [ +] diff --git a/pkgs/sagemath-objects/pyproject.toml.m4 b/pkgs/sagemath-objects/pyproject.toml.m4 index a8d7d83a44a..68cfbafe935 100644 --- a/pkgs/sagemath-objects/pyproject.toml.m4 +++ b/pkgs/sagemath-objects/pyproject.toml.m4 @@ -46,3 +46,20 @@ version = {file = ["VERSION.txt"]} "python_debug.h", ] "sage.rings" = ["integer_fake.h"] + +[external] +# External dependencies in the format proposed by https://peps.python.org/pep-0725 +build-requires = [ + "virtual:compiler/c", + "virtual:compiler/cpp", + "pkg:generic/pkg-config", +] + +host-requires = [ + "pkg:generic/gmp", + "pkg:generic/mpc", + "pkg:generic/mpfr", +] + +dependencies = [ +] From bcde7cac77ebc55c87e35fef70384873eb6f765c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 14:46:40 -0800 Subject: [PATCH 075/183] .github/workflows/dist.yml: Upgrade cibuildwheel to 2.16.5 --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 5bf5729039c..b7406d6c8a0 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -156,7 +156,7 @@ jobs: mkdir -p unpacked for pkg in sagemath-objects sagemath-categories; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz - pipx run cibuildwheel==2.16.2 unpacked/$pkg* + pipx run cibuildwheel==2.16.5 unpacked/$pkg* done - uses: actions/upload-artifact@v3 From f254c8e1190afec15b970fcb7f26afa6964d5ef5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 14:57:16 -0800 Subject: [PATCH 076/183] .github/workflows/dist.yml: Also build wheels on macos-14 runners (arm64) --- .github/workflows/dist.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index b7406d6c8a0..e73ae6e83c3 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -116,7 +116,9 @@ jobs: - os: ubuntu-latest arch: i686 - os: macos-latest - arch: auto + arch: x86_64 + - os: macos-14 + arch: arm64 env: # SPKGs to install as system packages SPKGS: _bootstrap _prereq From 1457fed3f0276567954bb34b4fb19276c6b88427 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 28 Feb 2024 15:55:17 -0800 Subject: [PATCH 077/183] .github/workflows/dist.yml: Install pipx --- .github/workflows/dist.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index e73ae6e83c3..4c509763d06 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -143,6 +143,14 @@ jobs: name: dist path: dist + - uses: actions/setup-python@v5 + # As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx. + # Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743 + id: python + with: + python-version: "3.8 - 3.12" + update-environment: false + - name: Build platform wheels # We build the wheels from the sdists so that MANIFEST filtering becomes effective. # But we must run cibuildwheel with the unpacked source directory, not a tarball, @@ -153,12 +161,13 @@ jobs: # This is unfortunately repeated for each of the packages that we build wheels for # because CIBW starts with a fresh container on each invocation. run: | + "${{ steps.python.outputs.python-path }}" -m pip install pipx export PATH=build/bin:$PATH export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE" mkdir -p unpacked for pkg in sagemath-objects sagemath-categories; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz - pipx run cibuildwheel==2.16.5 unpacked/$pkg* + "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.16.5 unpacked/$pkg* done - uses: actions/upload-artifact@v3 From 1af5b2ae7d52247cea20fecd1ca1f37e4386e2f1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 15 Mar 2024 23:50:44 -0700 Subject: [PATCH 078/183] .github/workflows/dist.yml: Use cibuildwheel==2.17.0 --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 4c509763d06..4726969a45f 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -167,7 +167,7 @@ jobs: mkdir -p unpacked for pkg in sagemath-objects sagemath-categories; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz - "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.16.5 unpacked/$pkg* + "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg* done - uses: actions/upload-artifact@v3 From 780dbf5544c81d8f12453d9fd1743879ebcd52d3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 29 Feb 2024 18:20:18 -0800 Subject: [PATCH 079/183] src/doc/*/tutorial/programming.rst: In 'standalone script', no need to import from sage.all --- src/doc/de/tutorial/programming.rst | 1 - src/doc/en/tutorial/programming.rst | 1 - src/doc/fr/tutorial/programming.rst | 1 - src/doc/ja/tutorial/programming.rst | 3 +-- src/doc/pt/tutorial/programming.rst | 1 - src/doc/ru/tutorial/programming.rst | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/doc/de/tutorial/programming.rst b/src/doc/de/tutorial/programming.rst index 9da919fedae..ceeed63c84c 100644 --- a/src/doc/de/tutorial/programming.rst +++ b/src/doc/de/tutorial/programming.rst @@ -177,7 +177,6 @@ Polynome, usw.: #!/usr/bin/env sage import sys - from sage.all import * if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0]) diff --git a/src/doc/en/tutorial/programming.rst b/src/doc/en/tutorial/programming.rst index 57dac68ae1c..7e4fd9b3468 100644 --- a/src/doc/en/tutorial/programming.rst +++ b/src/doc/en/tutorial/programming.rst @@ -166,7 +166,6 @@ etc: #!/usr/bin/env sage import sys - from sage.all import * if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0]) diff --git a/src/doc/fr/tutorial/programming.rst b/src/doc/fr/tutorial/programming.rst index f109e121414..32f465cfc5c 100644 --- a/src/doc/fr/tutorial/programming.rst +++ b/src/doc/fr/tutorial/programming.rst @@ -176,7 +176,6 @@ entiers, des polynômes, etc. : #!/usr/bin/env sage import sys - from sage.all import * if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0]) diff --git a/src/doc/ja/tutorial/programming.rst b/src/doc/ja/tutorial/programming.rst index df8d6d4112c..1232c1bf1e6 100644 --- a/src/doc/ja/tutorial/programming.rst +++ b/src/doc/ja/tutorial/programming.rst @@ -140,10 +140,9 @@ Cythonソースファイルから生成されたC言語コードをコンパイ :: - #!/usr/bin/env sage -python + #!/usr/bin/env sage import sys - from sage.all import * if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0]) diff --git a/src/doc/pt/tutorial/programming.rst b/src/doc/pt/tutorial/programming.rst index 08c0a4713e3..ea1d6b2e348 100644 --- a/src/doc/pt/tutorial/programming.rst +++ b/src/doc/pt/tutorial/programming.rst @@ -192,7 +192,6 @@ O seguinte script em Sage fatora inteiros, polinômios, etc: #!/usr/bin/env sage import sys - from sage.all import * if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0]) diff --git a/src/doc/ru/tutorial/programming.rst b/src/doc/ru/tutorial/programming.rst index 826d3b6df4a..0ea10634c0b 100644 --- a/src/doc/ru/tutorial/programming.rst +++ b/src/doc/ru/tutorial/programming.rst @@ -162,7 +162,6 @@ C и обработан компилятором C. #!/usr/bin/env sage import sys - from sage.all import * if len(sys.argv) != 2: print("Usage: %s " % sys.argv[0]) From b474439b71b3f7df2c887c6d0417746b63e98b2e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 31 Mar 2024 22:28:44 -0700 Subject: [PATCH 080/183] sage.modular: Docstring/doctest cosmetics --- .../modular/arithgroup/arithgroup_element.pyx | 7 +- src/sage/modular/cusps_nf.py | 4 +- src/sage/modular/dirichlet.py | 121 +++++++++---- src/sage/modular/hypergeometric_motive.py | 8 +- src/sage/modular/modform/ambient_R.py | 7 +- src/sage/modular/modform/ring.py | 2 +- .../graded_ring_element.py | 8 +- .../hecke_triangle_group_element.py | 68 ++++---- src/sage/modular/modsym/p1list_nf.py | 145 ++++++++-------- src/sage/modular/overconvergent/genus0.py | 159 +++++++++++------- 10 files changed, 307 insertions(+), 222 deletions(-) diff --git a/src/sage/modular/arithgroup/arithgroup_element.pyx b/src/sage/modular/arithgroup/arithgroup_element.pyx index 52c6a692866..15d426a9d0d 100644 --- a/src/sage/modular/arithgroup/arithgroup_element.pyx +++ b/src/sage/modular/arithgroup/arithgroup_element.pyx @@ -39,12 +39,11 @@ cdef class ArithmeticSubgroupElement(MultiplicativeGroupElement): - ``parent`` -- an arithmetic subgroup - - `x` -- data defining a 2x2 matrix over ZZ - which lives in parent + - ``x`` -- data defining a 2x2 matrix over ZZ + which lives in ``parent`` - ``check`` -- if ``True``, check that parent is an arithmetic - subgroup, and that `x` defines a matrix of - determinant `1`. + subgroup, and that `x` defines a matrix of determinant `1`. We tend not to create elements of arithmetic subgroups that are not SL2Z, in order to avoid coercion issues (that is, the other arithmetic diff --git a/src/sage/modular/cusps_nf.py b/src/sage/modular/cusps_nf.py index 8d8b580a74e..d2a7eb8942e 100644 --- a/src/sage/modular/cusps_nf.py +++ b/src/sage/modular/cusps_nf.py @@ -944,7 +944,7 @@ def is_Gamma0_equivalent(self, other, N, Transformation=False): :: - sage: k. = NumberField(x^2+23) + sage: k. = NumberField(x^2 + 23) sage: N = k.ideal(3) sage: alpha1 = NFCusp(k, a+1, 4) sage: alpha2 = NFCusp(k, a-8, 29) @@ -1188,7 +1188,7 @@ def NFCusps_ideal_reps_for_levelN(N, nlists=1): :: - sage: k. = NumberField(x^4 - x^3 -21*x^2 + 17*x + 133) + sage: k. = NumberField(x^4 - x^3 - 21*x^2 + 17*x + 133) sage: N = k.ideal(6) sage: from sage.modular.cusps_nf import NFCusps_ideal_reps_for_levelN sage: NFCusps_ideal_reps_for_levelN(N) diff --git a/src/sage/modular/dirichlet.py b/src/sage/modular/dirichlet.py index 7b0c28c5c32..3f871dadf91 100644 --- a/src/sage/modular/dirichlet.py +++ b/src/sage/modular/dirichlet.py @@ -16,14 +16,15 @@ sage: G = DirichletGroup(35) sage: x = G.gens() sage: e = x[0]*x[1]^2; e - Dirichlet character modulo 35 of conductor 35 mapping 22 |--> zeta12^3, 31 |--> zeta12^2 - 1 + Dirichlet character modulo 35 of conductor 35 + mapping 22 |--> zeta12^3, 31 |--> zeta12^2 - 1 sage: e.order() 12 This illustrates a canonical coercion:: sage: e = DirichletGroup(5, QQ).0 - sage: f = DirichletGroup(5,CyclotomicField(4)).0 + sage: f = DirichletGroup(5, CyclotomicField(4)).0 sage: e*f Dirichlet character modulo 5 of conductor 5 mapping 2 |--> -zeta4 @@ -118,7 +119,8 @@ def kronecker_character(d): EXAMPLES:: sage: kronecker_character(97*389*997^2) - Dirichlet character modulo 37733 of conductor 37733 mapping 1557 |--> -1, 37346 |--> -1 + Dirichlet character modulo 37733 of conductor 37733 + mapping 1557 |--> -1, 37346 |--> -1 :: @@ -148,7 +150,8 @@ def kronecker_character_upside_down(d): EXAMPLES:: sage: kronecker_character_upside_down(97*389*997^2) - Dirichlet character modulo 37506941597 of conductor 37733 mapping 13533432536 |--> -1, 22369178537 |--> -1, 14266017175 |--> 1 + Dirichlet character modulo 37506941597 of conductor 37733 + mapping 13533432536 |--> -1, 22369178537 |--> -1, 14266017175 |--> 1 AUTHORS: @@ -213,7 +216,8 @@ def __init__(self, parent, x, check=True): sage: G. = DirichletGroup(13) sage: G - Group of Dirichlet characters modulo 13 with values in Cyclotomic Field of order 12 and degree 4 + Group of Dirichlet characters modulo 13 with values + in Cyclotomic Field of order 12 and degree 4 sage: e Dirichlet character modulo 13 of conductor 13 mapping 2 |--> zeta12 sage: loads(e.dumps()) == e @@ -223,7 +227,8 @@ def __init__(self, parent, x, check=True): sage: G, x = DirichletGroup(35).objgens() sage: e = x[0]*x[1]; e - Dirichlet character modulo 35 of conductor 35 mapping 22 |--> zeta12^3, 31 |--> zeta12^2 + Dirichlet character modulo 35 of conductor 35 + mapping 22 |--> zeta12^3, 31 |--> zeta12^2 sage: e.order() 12 sage: loads(e.dumps()) == e @@ -242,14 +247,16 @@ def __init__(self, parent, x, check=True): sage: G([i, -1, -1]) Traceback (most recent call last): ... - ValueError: values (= (zeta16^4, -1, -1)) must have multiplicative orders dividing (2, 16, 2), respectively + ValueError: values (= (zeta16^4, -1, -1)) must have + multiplicative orders dividing (2, 16, 2), respectively sage: from sage.modular.dirichlet import DirichletCharacter sage: M = FreeModule(Zmod(16), 3) sage: DirichletCharacter(G, M([4, 8, 8])) Traceback (most recent call last): ... - ValueError: values (= (4, 8, 8) modulo 16) must have additive orders dividing (2, 16, 2), respectively + ValueError: values (= (4, 8, 8) modulo 16) must have + additive orders dividing (2, 16, 2), respectively """ MultiplicativeGroupElement.__init__(self, parent) if check: @@ -360,7 +367,8 @@ def change_ring(self, R): sage: e = DirichletGroup(7, QQ).0 sage: f = e.change_ring(QuadraticField(3, 'a')) sage: f.parent() - Group of Dirichlet characters modulo 7 with values in Number Field in a with defining polynomial x^2 - 3 with a = 1.732050807568878? + Group of Dirichlet characters modulo 7 with values in Number Field in a + with defining polynomial x^2 - 3 with a = 1.732050807568878? :: @@ -1054,11 +1062,14 @@ def decomposition(self): sage: G. = DirichletGroup(20) sage: c = a*b sage: d = c.decomposition(); d - [Dirichlet character modulo 4 of conductor 4 mapping 3 |--> -1, Dirichlet character modulo 5 of conductor 5 mapping 2 |--> zeta4] + [Dirichlet character modulo 4 of conductor 4 mapping 3 |--> -1, + Dirichlet character modulo 5 of conductor 5 mapping 2 |--> zeta4] sage: d[0].parent() - Group of Dirichlet characters modulo 4 with values in Cyclotomic Field of order 4 and degree 2 + Group of Dirichlet characters modulo 4 with values + in Cyclotomic Field of order 4 and degree 2 sage: d[1].parent() - Group of Dirichlet characters modulo 5 with values in Cyclotomic Field of order 4 and degree 2 + Group of Dirichlet characters modulo 5 with values + in Cyclotomic Field of order 4 and degree 2 We cannot multiply directly, since coercion of one element into the other parent fails in both cases:: @@ -1066,7 +1077,10 @@ def decomposition(self): sage: d[0]*d[1] == c Traceback (most recent call last): ... - TypeError: unsupported operand parent(s) for *: 'Group of Dirichlet characters modulo 4 with values in Cyclotomic Field of order 4 and degree 2' and 'Group of Dirichlet characters modulo 5 with values in Cyclotomic Field of order 4 and degree 2' + TypeError: unsupported operand parent(s) for *: 'Group of Dirichlet + characters modulo 4 with values in Cyclotomic Field of order 4 and + degree 2' and 'Group of Dirichlet characters modulo 5 with values + in Cyclotomic Field of order 4 and degree 2' We can multiply if we are explicit about where we want the multiplication to take place. @@ -1081,11 +1095,14 @@ def decomposition(self): trivial for `k = 1` and non-cyclic for `k \ge 3`:: sage: (DirichletGroup(18).0).decomposition() - [Dirichlet character modulo 2 of conductor 1, Dirichlet character modulo 9 of conductor 9 mapping 2 |--> zeta6] + [Dirichlet character modulo 2 of conductor 1, + Dirichlet character modulo 9 of conductor 9 mapping 2 |--> zeta6] sage: (DirichletGroup(36).0).decomposition() - [Dirichlet character modulo 4 of conductor 4 mapping 3 |--> -1, Dirichlet character modulo 9 of conductor 1 mapping 2 |--> 1] + [Dirichlet character modulo 4 of conductor 4 mapping 3 |--> -1, + Dirichlet character modulo 9 of conductor 1 mapping 2 |--> 1] sage: (DirichletGroup(72).0).decomposition() - [Dirichlet character modulo 8 of conductor 4 mapping 7 |--> -1, 5 |--> 1, Dirichlet character modulo 9 of conductor 1 mapping 2 |--> 1] + [Dirichlet character modulo 8 of conductor 4 mapping 7 |--> -1, 5 |--> 1, + Dirichlet character modulo 9 of conductor 1 mapping 2 |--> 1] """ D = self.parent().decomposition() vals = [[z] for z in self.values_on_gens()] @@ -1264,7 +1281,8 @@ def galois_orbit(self, sort=True): sage: e = G.0^2; e Dirichlet character modulo 13 of conductor 13 mapping 2 |--> zeta12^2 sage: e.galois_orbit() - [Dirichlet character modulo 13 of conductor 13 mapping 2 |--> zeta12^2, Dirichlet character modulo 13 of conductor 13 mapping 2 |--> -zeta12^2 + 1] + [Dirichlet character modulo 13 of conductor 13 mapping 2 |--> zeta12^2, + Dirichlet character modulo 13 of conductor 13 mapping 2 |--> -zeta12^2 + 1] A non-example:: @@ -1322,7 +1340,12 @@ def gauss_sum(self, a=1): sage: G = DirichletGroup(13) sage: e = G.0 sage: e.gauss_sum() - -zeta156^46 + zeta156^45 + zeta156^42 + zeta156^41 + 2*zeta156^40 + zeta156^37 - zeta156^36 - zeta156^34 - zeta156^33 - zeta156^31 + 2*zeta156^30 + zeta156^28 - zeta156^24 - zeta156^22 + zeta156^21 + zeta156^20 - zeta156^19 + zeta156^18 - zeta156^16 - zeta156^15 - 2*zeta156^14 - zeta156^10 + zeta156^8 + zeta156^7 + zeta156^6 + zeta156^5 - zeta156^4 - zeta156^2 - 1 + -zeta156^46 + zeta156^45 + zeta156^42 + zeta156^41 + 2*zeta156^40 + + zeta156^37 - zeta156^36 - zeta156^34 - zeta156^33 - zeta156^31 + + 2*zeta156^30 + zeta156^28 - zeta156^24 - zeta156^22 + zeta156^21 + + zeta156^20 - zeta156^19 + zeta156^18 - zeta156^16 - zeta156^15 + - 2*zeta156^14 - zeta156^10 + zeta156^8 + zeta156^7 + zeta156^6 + + zeta156^5 - zeta156^4 - zeta156^2 - 1 sage: factor(norm(e.gauss_sum())) 13^24 @@ -1340,7 +1363,8 @@ def gauss_sum(self, a=1): sage: G = DirichletGroup(13, K) sage: chi = G([z^2]) sage: chi.gauss_sum() - zeta52^22 + zeta52^21 + zeta52^19 - zeta52^16 + zeta52^15 + zeta52^14 + zeta52^12 - zeta52^11 - zeta52^10 - zeta52^7 - zeta52^5 + zeta52^4 + zeta52^22 + zeta52^21 + zeta52^19 - zeta52^16 + zeta52^15 + zeta52^14 + + zeta52^12 - zeta52^11 - zeta52^10 - zeta52^7 - zeta52^5 + zeta52^4 Check that :issue:`25127` is fixed:: @@ -1487,8 +1511,10 @@ def jacobi_sum(self, char, check=True): ... NotImplementedError: Characters must be from the same Dirichlet Group. - sage: all_jacobi_sums = [(DP[i].values_on_gens(),DP[j].values_on_gens(),DP[i].jacobi_sum(DP[j])) - ....: for i in range(p-1) for j in range(i, p-1)] + sage: all_jacobi_sums = [(DP[i].values_on_gens(), + ....: DP[j].values_on_gens(), + ....: DP[i].jacobi_sum(DP[j])) + ....: for i in range(p - 1) for j in range(i, p - 1)] sage: for s in all_jacobi_sums: ....: print(s) ((1,), (1,), 5) @@ -1898,6 +1924,7 @@ def minimize_base_ring(self): A related bug (see :issue:`18086`):: + sage: x = polygen(ZZ, 'x') sage: K. = NumberField([x^2 + 1, x^2 - 3]) sage: chi = DirichletGroup(7, K).0 sage: chi.minimize_base_ring() @@ -2256,7 +2283,8 @@ class DirichletGroupFactory(UniqueFactory): of `(\ZZ/N\ZZ)^*`:: sage: DirichletGroup(20) - Group of Dirichlet characters modulo 20 with values in Cyclotomic Field of order 4 and degree 2 + Group of Dirichlet characters modulo 20 with values + in Cyclotomic Field of order 4 and degree 2 We create the group of Dirichlet character mod 20 with values in the rational numbers:: @@ -2272,7 +2300,10 @@ class DirichletGroupFactory(UniqueFactory): on the generators of `(Z/NZ)^*`:: sage: list(G) - [Dirichlet character modulo 20 of conductor 1 mapping 11 |--> 1, 17 |--> 1, Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, Dirichlet character modulo 20 of conductor 5 mapping 11 |--> 1, 17 |--> -1, Dirichlet character modulo 20 of conductor 20 mapping 11 |--> -1, 17 |--> -1] + [Dirichlet character modulo 20 of conductor 1 mapping 11 |--> 1, 17 |--> 1, + Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, + Dirichlet character modulo 20 of conductor 5 mapping 11 |--> 1, 17 |--> -1, + Dirichlet character modulo 20 of conductor 20 mapping 11 |--> -1, 17 |--> -1] Next we construct the group of Dirichlet character mod 20, but with values in `\QQ(\zeta_n)`:: @@ -2284,7 +2315,8 @@ class DirichletGroupFactory(UniqueFactory): We next compute several invariants of ``G``:: sage: G.gens() - (Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, Dirichlet character modulo 20 of conductor 5 mapping 11 |--> 1, 17 |--> zeta4) + (Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, + Dirichlet character modulo 20 of conductor 5 mapping 11 |--> 1, 17 |--> zeta4) sage: G.unit_gens() (11, 17) sage: G.zeta() @@ -2298,22 +2330,29 @@ class DirichletGroupFactory(UniqueFactory): sage: R. = PolynomialRing(QQ) sage: K. = NumberField(x^4 + 1) sage: DirichletGroup(5, K) - Group of Dirichlet characters modulo 5 with values in Number Field in a with defining polynomial x^4 + 1 + Group of Dirichlet characters modulo 5 with values + in Number Field in a with defining polynomial x^4 + 1 An example where we give ``zeta``, but not its order:: sage: G = DirichletGroup(5, K, a); G - Group of Dirichlet characters modulo 5 with values in the group of order 8 generated by a in Number Field in a with defining polynomial x^4 + 1 + Group of Dirichlet characters modulo 5 with values in the group of order 8 + generated by a in Number Field in a with defining polynomial x^4 + 1 sage: G.list() - [Dirichlet character modulo 5 of conductor 1 mapping 2 |--> 1, Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2, Dirichlet character modulo 5 of conductor 5 mapping 2 |--> -1, Dirichlet character modulo 5 of conductor 5 mapping 2 |--> -a^2] + [Dirichlet character modulo 5 of conductor 1 mapping 2 |--> 1, + Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2, + Dirichlet character modulo 5 of conductor 5 mapping 2 |--> -1, + Dirichlet character modulo 5 of conductor 5 mapping 2 |--> -a^2] We can also restrict the order of the characters, either with or without specifying a root of unity:: sage: DirichletGroup(5, K, zeta=-1, zeta_order=2) - Group of Dirichlet characters modulo 5 with values in the group of order 2 generated by -1 in Number Field in a with defining polynomial x^4 + 1 + Group of Dirichlet characters modulo 5 with values in the group of order 2 + generated by -1 in Number Field in a with defining polynomial x^4 + 1 sage: DirichletGroup(5, K, zeta_order=2) - Group of Dirichlet characters modulo 5 with values in the group of order 2 generated by -1 in Number Field in a with defining polynomial x^4 + 1 + Group of Dirichlet characters modulo 5 with values in the group of order 2 + generated by -1 in Number Field in a with defining polynomial x^4 + 1 :: @@ -2331,7 +2370,8 @@ class DirichletGroupFactory(UniqueFactory): sage: p = next_prime(10^40) sage: g = DirichletGroup(19, GF(p)); g - Group of Dirichlet characters modulo 19 with values in Finite Field of size 10000000000000000000000000000000000000121 + Group of Dirichlet characters modulo 19 with values + in Finite Field of size 10000000000000000000000000000000000000121 Note that the root of unity has small order, i.e., it is not the largest order root of unity in the field:: @@ -2344,19 +2384,24 @@ class DirichletGroupFactory(UniqueFactory): sage: r4 = CyclotomicField(4).ring_of_integers() sage: G = DirichletGroup(60, r4) sage: G.gens() - (Dirichlet character modulo 60 of conductor 4 mapping 31 |--> -1, 41 |--> 1, 37 |--> 1, Dirichlet character modulo 60 of conductor 3 mapping 31 |--> 1, 41 |--> -1, 37 |--> 1, Dirichlet character modulo 60 of conductor 5 mapping 31 |--> 1, 41 |--> 1, 37 |--> zeta4) + (Dirichlet character modulo 60 of conductor 4 + mapping 31 |--> -1, 41 |--> 1, 37 |--> 1, + Dirichlet character modulo 60 of conductor 3 + mapping 31 |--> 1, 41 |--> -1, 37 |--> 1, + Dirichlet character modulo 60 of conductor 5 + mapping 31 |--> 1, 41 |--> 1, 37 |--> zeta4) sage: val = G.gens()[2].values_on_gens()[2] ; val zeta4 sage: parent(val) Gaussian Integers generated by zeta4 in Cyclotomic Field of order 4 and degree 2 - sage: r4.residue_field(r4.ideal(29).factor()[0][0])(val) + sage: r4_29_0 = r4.residue_field(r4.ideal(29).factor()[0][0]); r4_29_0(val) doctest:warning ... DeprecationWarning: ... 17 - sage: r4.residue_field(r4.ideal(29).factor()[0][0])(val) * GF(29)(3) + sage: r4_29_0(val) * GF(29)(3) 22 - sage: r4.residue_field(r4.ideal(29).factor()[0][0])(G.gens()[2].values_on_gens()[2]) * 3 + sage: r4_29_0(G.gens()[2].values_on_gens()[2]) * 3 22 - sage: parent(r4.residue_field(r4.ideal(29).factor()[0][0])(G.gens()[2].values_on_gens()[2]) * 3) + sage: parent(r4_29_0(G.gens()[2].values_on_gens()[2]) * 3) Residue field of Fractional ideal (-2*zeta4 + 5) :: @@ -2398,9 +2443,11 @@ class DirichletGroupFactory(UniqueFactory): sage: G.gens() Traceback (most recent call last): ... - NotImplementedError: factorization of polynomials over rings with composite characteristic is not implemented + NotImplementedError: factorization of polynomials over rings + with composite characteristic is not implemented sage: G = DirichletGroup(5, Zmod(15), zeta=2); G - Group of Dirichlet characters modulo 5 with values in the group of order 4 generated by 2 in Ring of integers modulo 15 + Group of Dirichlet characters modulo 5 with values in the group of order 4 + generated by 2 in Ring of integers modulo 15 sage: G.gens() (Dirichlet character modulo 5 of conductor 5 mapping 2 |--> 2,) diff --git a/src/sage/modular/hypergeometric_motive.py b/src/sage/modular/hypergeometric_motive.py index 26a9ff00c7c..111c93ff07f 100644 --- a/src/sage/modular/hypergeometric_motive.py +++ b/src/sage/modular/hypergeometric_motive.py @@ -20,7 +20,7 @@ sage: H = Hyp(cyclotomic=([30], [1,2,3,5])) sage: H.alpha_beta() ([1/30, 7/30, 11/30, 13/30, 17/30, 19/30, 23/30, 29/30], - [0, 1/5, 1/3, 2/5, 1/2, 3/5, 2/3, 4/5]) + [0, 1/5, 1/3, 2/5, 1/2, 3/5, 2/3, 4/5]) sage: H.M_value() == 30**30 / (15**15 * 10**10 * 6**6) True sage: H.euler_factor(2, 7) @@ -1457,7 +1457,7 @@ def H_value(self, p, f, t, ring=None): - `t` -- a rational parameter - - ``ring`` -- optional (default ``UniversalCyclotomicfield``) + - ``ring`` -- optional (default :class:`UniversalCyclotomicfield`) The ring could be also ``ComplexField(n)`` or ``QQbar``. @@ -1468,9 +1468,9 @@ def H_value(self, p, f, t, ring=None): .. WARNING:: This is apparently working correctly as can be tested - using ComplexField(70) as value ring. + using ``ComplexField(70)`` as value ring. - Using instead UniversalCyclotomicfield, this is much + Using instead :class:`UniversalCyclotomicfield`, this is much slower than the `p`-adic version :meth:`padic_H_value`. EXAMPLES: diff --git a/src/sage/modular/modform/ambient_R.py b/src/sage/modular/modform/ambient_R.py index 9f416f49169..0d19eb36cd3 100644 --- a/src/sage/modular/modform/ambient_R.py +++ b/src/sage/modular/modform/ambient_R.py @@ -23,7 +23,7 @@ def __init__(self, M, base_ring): EXAMPLES:: - sage: M = ModularForms(23,2,base_ring=GF(7)) # indirect doctest + sage: M = ModularForms(23, 2, base_ring=GF(7)) # indirect doctest sage: M Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(23) of weight 2 over Finite Field of size 7 @@ -46,9 +46,10 @@ def modular_symbols(self,sign=0): sage: # needs sage.rings.number_field sage: K. = QuadraticField(-1) - sage: chi = DirichletGroup(5, base_ring = K).0 + sage: chi = DirichletGroup(5, base_ring=K).0 + sage: x = polygen(ZZ, 'x') sage: L. = K.extension(x^2 - 402*i) - sage: M = ModularForms(chi, 7, base_ring = L) + sage: M = ModularForms(chi, 7, base_ring=L) sage: symbs = M.modular_symbols() sage: symbs.character() == chi True diff --git a/src/sage/modular/modform/ring.py b/src/sage/modular/modform/ring.py index c0a69717cfa..d16ba084dbb 100644 --- a/src/sage/modular/modform/ring.py +++ b/src/sage/modular/modform/ring.py @@ -212,7 +212,7 @@ def __init__(self, group, base_ring=QQ): Traceback (most recent call last): ... ValueError: group (=3.40000000000000) should be a congruence subgroup - sage: ModularFormsRing(Gamma0(2), base_ring=PolynomialRing(ZZ,x)) + sage: ModularFormsRing(Gamma0(2), base_ring=PolynomialRing(ZZ, 'x')) Traceback (most recent call last): ... ValueError: base ring (=Univariate Polynomial Ring in x over Integer Ring) should be QQ, ZZ or a finite prime field diff --git a/src/sage/modular/modform_hecketriangle/graded_ring_element.py b/src/sage/modular/modform_hecketriangle/graded_ring_element.py index 0de1562677b..bd6d2a03a2c 100644 --- a/src/sage/modular/modform_hecketriangle/graded_ring_element.py +++ b/src/sage/modular/modform_hecketriangle/graded_ring_element.py @@ -143,7 +143,7 @@ def _richcmp_(self, other, op): EXAMPLES:: sage: from sage.modular.modform_hecketriangle.graded_ring import MeromorphicModularFormsRing - sage: (x,y,z,d) = MeromorphicModularFormsRing().pol_ring().gens() + sage: x, y, z, d = MeromorphicModularFormsRing().pol_ring().gens() sage: MeromorphicModularFormsRing(n=3)(x) == MeromorphicModularFormsRing(n=4)(x) False sage: MeromorphicModularFormsRing()(-1/x) is MeromorphicModularFormsRing()(1/(-x)) @@ -1249,7 +1249,7 @@ def order_at(self, tau=infinity): Return the (overall) order of ``self`` at ``tau`` if easily possible: Namely if ``tau`` is ``infinity`` or congruent to ``i`` resp. ``rho``. - It is possible to determine the order of points from ``HyperbolicPlane()``. + It is possible to determine the order of points from :class:`HyperbolicPlane`. In this case the coordinates of the upper half plane model are used. If ``self`` is homogeneous and modular then the rational function @@ -1834,7 +1834,7 @@ def evaluate(self, tau, prec=None, num_prec=None, check=False): (and fail) for certain (many) choices of (``base_ring``, ``tau.parent()``). - It is possible to evaluate at points of ``HyperbolicPlane()``. + It is possible to evaluate at points of :class:`HyperbolicPlane`. In this case the coordinates of the upper half plane model are used. To obtain a precise and fast result the parameters @@ -2123,7 +2123,7 @@ def evaluate(self, tau, prec=None, num_prec=None, check=False): sage: (f.q_expansion_fixed_d().polynomial())(exp((2*pi*i).n(1000)*az/G.lam())) # long time -140.471170232432551196978... + 469.079369280804086032719...*I - It is possible to evaluate at points of ``HyperbolicPlane()``:: + It is possible to evaluate at points of :class:`HyperbolicPlane`:: sage: # needs sage.symbolic sage: p = HyperbolicPlane().PD().get_point(-I/2) diff --git a/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py b/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py index 2d52c934adf..0e48b78e008 100644 --- a/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +++ b/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py @@ -2888,9 +2888,9 @@ def root_extension_embedding(self, K=None): INPUT: - ``K`` -- A field to which we want the (correct) embedding. - If ``K=None`` (default) then ``AlgebraicField()`` is - used for elliptic elements and ``AlgebraicRealField()`` - otherwise. + If ``K=None`` (default), then ``AlgebraicField()`` is + used for elliptic elements and ``AlgebraicRealField()`` + otherwise. EXAMPLES:: @@ -2955,26 +2955,25 @@ def fixed_points(self, embedded=False, order="default"): INPUT: - - ``embedded`` -- If ``True`` the fixed points are embedded into - ``AlgebraicRealField`` resp. ``AlgebraicField``. - Default: ``False``. + - ``embedded`` -- If ``True``, the fixed points are embedded into + ``AlgebraicRealField`` resp. ``AlgebraicField``. Default: ``False``. - - ``order`` -- If ``order="none"`` the fixed points are choosen - and ordered according to a fixed formula. + - ``order`` -- If ``order="none"`` the fixed points are choosen + and ordered according to a fixed formula. - If ``order="sign"`` the fixed points are always ordered - according to the sign in front of the square root. + If ``order="sign"`` the fixed points are always ordered + according to the sign in front of the square root. - If ``order="default"`` (default) then in case the fixed - points are hyperbolic they are ordered according to the - sign of the trace of ``self`` instead, such that the - attracting fixed point comes first. + If ``order="default"`` (default) then in case the fixed + points are hyperbolic they are ordered according to the + sign of the trace of ``self`` instead, such that the + attracting fixed point comes first. - If ``order="trace"`` the fixed points are always ordered - according to the sign of the trace of ``self``. - If the trace is zero they are ordered by the sign in - front of the square root. In particular the fixed_points - in this case remain the same for ``-self``. + If ``order="trace"`` the fixed points are always ordered + according to the sign of the trace of ``self``. + If the trace is zero they are ordered by the sign in + front of the square root. In particular the fixed_points + in this case remain the same for ``-self``. OUTPUT: @@ -3108,16 +3107,15 @@ def acton(self, tau): INPUT: - - ``tau`` -- Either an element of ``self`` or any - element to which a linear fractional - transformation can be applied in - the usual way. + - ``tau`` -- Either an element of ``self`` or any + element to which a linear fractional + transformation can be applied in the usual way. - In particular ``infinity`` is a possible - argument and a possible return value. + In particular ``infinity`` is a possible + argument and a possible return value. - As mentioned it is also possible to use - points of ``HyperbolicPlane()``. + As mentioned it is also possible to use + points of ``HyperbolicPlane()``. EXAMPLES:: @@ -3152,8 +3150,10 @@ def acton(self, tau): sage: p = HyperbolicPlane().PD().get_point(-I/2+1/8) sage: G.V(2).acton(p) - Point in PD -((-(47*I + 161)*sqrt(5) - 47*I - 161)/(145*sqrt(5) + 94*I + 177) + I)/(I*(-(47*I + 161)*sqrt(5) - 47*I - 161)/(145*sqrt(5) + 94*I + 177) + 1) - sage: bool(G.V(2).acton(p).to_model('UHP').coordinates() == G.V(2).acton(p.to_model('UHP').coordinates())) + Point in PD -((-(47*I + 161)*sqrt(5) - 47*I - 161)/(145*sqrt(5) + 94*I + 177) + + I)/(I*(-(47*I + 161)*sqrt(5) - 47*I - 161)/(145*sqrt(5) + 94*I + 177) + 1) + sage: bool(G.V(2).acton(p).to_model('UHP').coordinates() + ....: == G.V(2).acton(p.to_model('UHP').coordinates())) True sage: p = HyperbolicPlane().PD().get_point(I) @@ -3334,9 +3334,15 @@ def as_hyperbolic_plane_isometry(self, model="UHP"): [lam^2 - 1 lam] [lam^2 - 1 lam^2 - 1] sage: el.as_hyperbolic_plane_isometry().parent() - Set of Morphisms from Hyperbolic plane in the Upper Half Plane Model to Hyperbolic plane in the Upper Half Plane Model in Category of hyperbolic models of Hyperbolic plane + Set of Morphisms + from Hyperbolic plane in the Upper Half Plane Model + to Hyperbolic plane in the Upper Half Plane Model + in Category of hyperbolic models of Hyperbolic plane sage: el.as_hyperbolic_plane_isometry("KM").parent() - Set of Morphisms from Hyperbolic plane in the Klein Disk Model to Hyperbolic plane in the Klein Disk Model in Category of hyperbolic models of Hyperbolic plane + Set of Morphisms + from Hyperbolic plane in the Klein Disk Model + to Hyperbolic plane in the Klein Disk Model + in Category of hyperbolic models of Hyperbolic plane """ from sage.geometry.hyperbolic_space.hyperbolic_interface import HyperbolicPlane return HyperbolicPlane().UHP().get_isometry(self._matrix).to_model(model) diff --git a/src/sage/modular/modsym/p1list_nf.py b/src/sage/modular/modsym/p1list_nf.py index 25c68137e0c..29b5c087642 100644 --- a/src/sage/modular/modsym/p1list_nf.py +++ b/src/sage/modular/modsym/p1list_nf.py @@ -19,7 +19,8 @@ sage: k. = NumberField(x^3 + 11) sage: N = k.ideal(5, a^2 - a + 1) sage: P = P1NFList(N); P - The projective line over the ring of integers modulo the Fractional ideal (5, a^2 - a + 1) + The projective line over + the ring of integers modulo the Fractional ideal (5, a^2 - a + 1) List operations with the P1NFList: @@ -116,7 +117,7 @@ def P1NFList_clear_level_cache(): @richcmp_method class MSymbol(SageObject): - """ + r""" The constructor for an M-symbol over a number field. INPUT: @@ -127,15 +128,15 @@ class MSymbol(SageObject): level N. - ``d`` -- (optional) when present, it must be an integral element such - that + + N = R, where R is the corresponding ring of integers. + that `\la c\ra + \la d\ra + N = R, where `R` is the corresponding ring of integers. - - ``check`` -- bool (default True). If ``check=False`` the constructor does - not check the condition + + N = R. + - ``check`` -- bool (default ``True``). If ``check=False`` the constructor does + not check the condition `\la c\ra + \la d\ra + N = R`. OUTPUT: - An M-symbol modulo the given ideal N, i.e. an element of the - projective line `\\mathbb{P}^1(R/N)`, where R is the ring of integers of + An M-symbol modulo the given ideal `N`, i.e. an element of the + projective line `\mathbb{P}^1(R/N)`, where `R` is the ring of integers of the underlying number field. EXAMPLES:: @@ -153,7 +154,7 @@ class MSymbol(SageObject): sage: MSymbol(N, (1, 0)) M-symbol (1: 0) of level Fractional ideal (2, a + 1) - We get an error if , and N are not coprime: + We get an error if `\la c\ra`, `\la d\ra` and `N` are not coprime: :: @@ -216,7 +217,7 @@ def __init__(self, N, c, d=None, check=True): self.__c, self.__d = (c1, d1) def __repr__(self): - """ + r""" Return the string representation of this MSymbol. EXAMPLES:: @@ -245,7 +246,7 @@ def _latex_(self): return r"\(%s: %s\)" % (self.c._latex_(), self.d._latex_()) def __richcmp__(self, other, op): - """ + r""" Comparison function for objects of the class MSymbol. The order is the same as for the underlying lists of lists. @@ -269,7 +270,7 @@ def __richcmp__(self, other, op): [other.__c.list(), other.__d.list()], op) def N(self): - """ + r""" Return the level or modulus of this MSymbol. EXAMPLES:: @@ -284,8 +285,8 @@ def N(self): return self.__N def tuple(self): - """ - Return the MSymbol as a list (c, d). + r""" + Return the :class:`MSymbol` as a list `(c, d)`. EXAMPLES:: @@ -300,7 +301,7 @@ def tuple(self): return self.__c, self.__d def __getitem__(self, n): - """ + r""" Indexing function for the list defined by an M-symbol. INPUT: @@ -323,7 +324,7 @@ def __getitem__(self, n): return self.tuple()[n] def __get_c(self): - """ + r""" Return the first coefficient of the M-symbol. EXAMPLES:: @@ -339,7 +340,7 @@ def __get_c(self): c = property(__get_c) def __get_d(self): - """ + r""" Return the second coefficient of the M-symbol. EXAMPLES:: @@ -355,15 +356,15 @@ def __get_d(self): d = property(__get_d) def lift_to_sl2_Ok(self): - """ - Lift the MSymbol to an element of `SL(2, Ok)`, where `Ok` is the ring + r""" + Lift the :class:`MSymbol` to an element of `SL(2, O_k)`, where `O_k` is the ring of integers of the corresponding number field. OUTPUT: A list of integral elements `[a, b, c', d']` that are the entries of - a 2x2 matrix with determinant 1. The lower two entries are congruent - (modulo the level) to the coefficients `c, d` of the MSymbol self. + a `2\times 2` matrix with determinant 1. The lower two entries are congruent + (modulo the level) to the coefficients `c`, `d` of the :class:`MSymbol` ``self``. EXAMPLES:: @@ -378,12 +379,12 @@ def lift_to_sl2_Ok(self): def normalize(self, with_scalar=False): r""" - Return a normalized MSymbol (a canonical representative of an element - of `\mathbb{P}^1(R/N)` ) equivalent to ``self``. + Return a normalized :class:`MSymbol` (a canonical representative of an element + of `\mathbb{P}^1(R/N)`) equivalent to ``self``. INPUT: - - ``with_scalar`` -- bool (default False) + - ``with_scalar`` -- bool (default ``False``) OUTPUT: @@ -391,7 +392,7 @@ def normalize(self, with_scalar=False): `(u*c', u*d')` is congruent to `(c: d)` (mod `N`), where `(c: d)` are the coefficients of ``self`` and `N` is the level. - - a normalized MSymbol (c': d') equivalent to ``self``. + - a normalized :class:`MSymbol` `(c': d')` equivalent to ``self``. EXAMPLES:: @@ -487,7 +488,7 @@ class P1NFList(SageObject): OUTPUT: - A P1NFList object representing `\mathbb{P}^1(R/N)`. + A :class:`P1NFList` object representing `\mathbb{P}^1(R/N)`. EXAMPLES:: @@ -505,7 +506,7 @@ class P1NFList(SageObject): True """ def __init__(self, N): - """ + r""" The constructor for the class P1NFList. See ``P1NFList`` for full documentation. @@ -522,7 +523,7 @@ def __init__(self, N): self.__list.sort() def __richcmp__(self, other, op): - """ + r""" Comparison function for objects of the class P1NFList. The order is the same as for the underlying modulus. @@ -547,7 +548,7 @@ def __richcmp__(self, other, op): return richcmp(self.__N, other.__N, op) def __getitem__(self, n): - """ + r""" Standard indexing function for the class P1NFList. EXAMPLES:: @@ -565,7 +566,7 @@ def __getitem__(self, n): return self.__list[n] def __len__(self): - """ + r""" Return the length of this P1NFList. EXAMPLES:: @@ -580,22 +581,22 @@ def __len__(self): return len(self.__list) def __repr__(self): - """ + r""" Return the string representation of this P1NFList. EXAMPLES:: sage: x = polygen(QQ, 'x') sage: k. = NumberField(x^3 + 11) - sage: N = k.ideal(5, a+1) + sage: N = k.ideal(5, a + 1) sage: P = P1NFList(N); P The projective line over the ring of integers modulo the Fractional ideal (5, a + 1) """ return "The projective line over the ring of integers modulo the %s" % self.__N def list(self): - """ - Return the underlying list of this P1NFList object. + r""" + Return the underlying list of this :class:`P1NFList` object. EXAMPLES:: @@ -622,14 +623,14 @@ def normalize(self, c, d=None, with_scalar=False): - ``d`` -- (optional) when present, it must be an integral element of the number field such that `(c, d)` defines an M-symbol of level `N`. - - ``with_scalar`` -- bool (default False) + - ``with_scalar`` -- bool (default ``False``) OUTPUT: - (only if ``with_scalar=True``) a transforming scalar `u`, such that `(u*c', u*d')` is congruent to `(c: d)` (mod `N`). - - a normalized MSymbol (c': d') equivalent to `(c: d)`. + - a normalized :class:`MSymbol` `(c': d')` equivalent to `(c: d)`. EXAMPLES:: @@ -640,7 +641,7 @@ def normalize(self, c, d=None, with_scalar=False): sage: P.normalize(3, a) M-symbol (1: 2*a) of level Fractional ideal (5, 1/2*a + 3/2) - We can use an MSymbol as input: + We can use an :class:`MSymbol` as input: :: @@ -667,8 +668,8 @@ def normalize(self, c, d=None, with_scalar=False): return MSymbol(self.N(), c, d).normalize(with_scalar) def N(self): - """ - Return the level or modulus of this P1NFList. + r""" + Return the level or modulus of this :class:`P1NFList`. EXAMPLES:: @@ -689,12 +690,12 @@ def index(self, c, d=None, with_scalar=False): INPUT: - ``c`` -- integral element of the corresponding number field, or an - MSymbol. + :class:`MSymbol`. - ``d`` -- (optional) when present, it must be an integral element of the number field such that `(c, d)` defines an M-symbol of level `N`. - - ``with_scalar`` -- bool (default False) + - ``with_scalar`` -- bool (default ``False``) OUTPUT: @@ -713,7 +714,7 @@ def index(self, c, d=None, with_scalar=False): sage: P[5]==MSymbol(N, 3, a).normalize() True - We can give an MSymbol as input: + We can give an :class:`MSymbol` as input: :: @@ -721,7 +722,7 @@ def index(self, c, d=None, with_scalar=False): sage: P.index(alpha) 5 - We cannot look for the class of an MSymbol of a different level: + We cannot look for the class of an :class:`MSymbol` of a different level: :: @@ -773,7 +774,7 @@ def index_of_normalized_pair(self, c, d=None): INPUT: - ``c`` -- integral element of the corresponding number field, or a - normalized MSymbol. + normalized :class:`MSymbol`. - ``d`` -- (optional) when present, it must be an integral element of the number field such that `(c, d)` defines a normalized M-symbol of @@ -808,18 +809,18 @@ def index_of_normalized_pair(self, c, d=None): return False def lift_to_sl2_Ok(self, i): - """ - Lift the `i`-th element of this P1NFList to an element of `SL(2, R)`, + r""" + Lift the `i`-th element of this :class:`P1NFList` to an element of `SL(2, R)`, where `R` is the ring of integers of the corresponding number field. INPUT: - - ``i`` - integer (index of the element to lift) + - ``i`` -- integer (index of the element to lift) OUTPUT: If the `i`-th element is `(c : d)`, the function returns a list of - integral elements `[a, b, c', d']` that defines a 2x2 matrix with + integral elements `[a, b, c', d']` that defines a `2\times 2` matrix with determinant 1 and such that `c=c'` (mod `N`) and `d=d'` (mod `N`). EXAMPLES:: @@ -845,8 +846,8 @@ def lift_to_sl2_Ok(self, i): return self[i].lift_to_sl2_Ok() def apply_S(self, i): - """ - Applies the matrix S = [0, -1, 1, 0] to the i-th M-Symbol of the list. + r""" + Applies the matrix `S` = [0, -1, 1, 0] to the `i`-th M-Symbol of the list. INPUT: @@ -855,7 +856,7 @@ def apply_S(self, i): OUTPUT: integer -- the index of the M-Symbol obtained by the right action of - the matrix S = [0, -1, 1, 0] on the i-th M-Symbol. + the matrix `S` = [0, -1, 1, 0] on the `i`-th M-Symbol. EXAMPLES:: @@ -880,8 +881,8 @@ def apply_S(self, i): return j def apply_TS(self, i): - """ - Applies the matrix TS = [1, -1, 0, 1] to the i-th M-Symbol of the list. + r""" + Applies the matrix `TS` = [1, -1, 0, 1] to the `i`-th M-Symbol of the list. INPUT: @@ -890,7 +891,7 @@ def apply_TS(self, i): OUTPUT: integer -- the index of the M-Symbol obtained by the right action of - the matrix TS = [1, -1, 0, 1] on the i-th M-Symbol. + the matrix `TS` = [1, -1, 0, 1] on the `i`-th M-Symbol. EXAMPLES:: @@ -901,7 +902,7 @@ def apply_TS(self, i): sage: P.apply_TS(3) 2 - We test that TS has order 3: + We test that `TS` has order 3: :: @@ -914,20 +915,20 @@ def apply_TS(self, i): return j def apply_T_alpha(self, i, alpha=1): - """ - Applies the matrix T_alpha = [1, alpha, 0, 1] to the i-th M-Symbol of + r""" + Applies the matrix `T_alpha` = [1, alpha, 0, 1] to the `i`-th M-Symbol of the list. INPUT: - ``i`` -- integer - - ``alpha`` -- element of the corresponding ring of integers(default 1) + - ``alpha`` -- (default 1) element of the corresponding ring of integers OUTPUT: integer -- the index of the M-Symbol obtained by the right action of - the matrix T_alpha = [1, alpha, 0, 1] on the i-th M-Symbol. + the matrix `T_alpha` = [1, `alpha`, 0, 1] on the i-th M-Symbol. EXAMPLES:: @@ -938,7 +939,7 @@ def apply_T_alpha(self, i, alpha=1): sage: P.apply_T_alpha(4, a^ 2 - 2) 3 - We test that T_a*T_b = T_(a+b): + We test that `T_a*T_b = T_{(a+b)}`: :: @@ -951,7 +952,7 @@ def apply_T_alpha(self, i, alpha=1): def apply_J_epsilon(self, i, e1, e2=1): r""" - Apply the matrix `J_{\epsilon}` = [e1, 0, 0, e2] to the i-th + Apply the matrix `J_{\epsilon}` = [e1, 0, 0, e2] to the `i`-th M-Symbol of the list. e1, e2 are units of the underlying number field. @@ -967,7 +968,7 @@ def apply_J_epsilon(self, i, e1, e2=1): OUTPUT: integer -- the index of the M-Symbol obtained by the right action of - the matrix `J_{\epsilon}` = [e1, 0, 0, e2] on the i-th M-Symbol. + the matrix `J_{\epsilon}` = [e1, 0, 0, e2] on the `i`-th M-Symbol. EXAMPLES:: @@ -1006,8 +1007,8 @@ def apply_J_epsilon(self, i, e1, e2=1): # ************************************************************************* def p1NFlist(N): - """ - Return a list of the normalized elements of `\\mathbb{P}^1(R/N)`, where + r""" + Return a list of the normalized elements of `\mathbb{P}^1(R/N)`, where `N` is an integral ideal. INPUT: @@ -1054,7 +1055,7 @@ def p1NFlist(N): def lift_to_sl2_Ok(N, c, d): - """ + r""" Lift a pair (c, d) to an element of `SL(2, O_k)`, where `O_k` is the ring of integers of the corresponding number field. @@ -1068,9 +1069,9 @@ def lift_to_sl2_Ok(N, c, d): OUTPUT: - A list [a, b, c', d'] of integral elements that are the entries of - a 2x2 matrix with determinant 1. The lower two entries are congruent to - c, d modulo the ideal `N`. + A list `[a, b, c', d']` of integral elements that are the entries of + a `2\times 2` matrix with determinant 1. The lower two entries are congruent to + `c`, `d` modulo the ideal `N`. EXAMPLES:: @@ -1161,9 +1162,9 @@ def lift_to_sl2_Ok(N, c, d): def make_coprime(N, c, d): - """ + r""" Return (c, d') so d' is congruent to d modulo N, and such that c and d' are - coprime ( + = R). + coprime (`\la c\ra + \la d'\ra = R`). INPUT: @@ -1175,9 +1176,9 @@ def make_coprime(N, c, d): OUTPUT: - A pair (c, d') where c, d' are integral elements of the corresponding - number field, with d' congruent to d mod N, and such that + = R - (R being the corresponding ring of integers). + A pair `(c, d')` where `c`, `d'` are integral elements of the corresponding + number field, with `d'` congruent to `d` mod `N`, and such that `\la c\ra + \la d'\ra = R` + (`R` being the corresponding ring of integers). EXAMPLES:: diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index 58f31f4af0c..fef0f95983a 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -73,7 +73,8 @@ :: sage: f2 = M(CuspForms(3, 8).0); f2 - 3-adic overconvergent modular form of weight-character 8 with q-expansion q + 6*q^2 - 27*q^3 - 92*q^4 + 390*q^5 - 162*q^6 ... + 3-adic overconvergent modular form of weight-character 8 with q-expansion + q + 6*q^2 - 27*q^3 - 92*q^4 + 390*q^5 - 162*q^6 ... We express this in a basis, and see that the coefficients go to zero very fast: @@ -82,7 +83,10 @@ :: sage: [x.valuation(3) for x in f2.coordinates(60)] - [+Infinity, -1, 3, 6, 10, 13, 18, 20, 24, 27, 31, 34, 39, 41, 45, 48, 52, 55, 61, 62, 66, 69, 73, 76, 81, 83, 87, 90, 94, 97, 102, 104, 108, 111, 115, 118, 124, 125, 129, 132, 136, 139, 144, 146, 150, 153, 157, 160, 165, 167, 171, 174, 178, 181, 188, 188, 192, 195, 199, 202] + [+Infinity, -1, 3, 6, 10, 13, 18, 20, 24, 27, 31, 34, 39, 41, 45, 48, 52, 55, 61, + 62, 66, 69, 73, 76, 81, 83, 87, 90, 94, 97, 102, 104, 108, 111, 115, 118, 124, 125, + 129, 132, 136, 139, 144, 146, 150, 153, 157, 160, 165, 167, 171, 174, 178, 181, + 188, 188, 192, 195, 199, 202] This form has more level at `p`, and hence is less overconvergent: @@ -91,7 +95,9 @@ :: sage: f3 = M(CuspForms(9, 8).0); [x.valuation(3) for x in f3.coordinates(60)] - [+Infinity, -1, -1, 0, -4, -4, -2, -3, 0, 0, -1, -1, 1, 0, 3, 3, 3, 3, 5, 3, 7, 7, 6, 6, 8, 7, 10, 10, 8, 8, 10, 9, 12, 12, 12, 12, 14, 12, 17, 16, 15, 15, 17, 16, 19, 19, 18, 18, 20, 19, 22, 22, 22, 22, 24, 21, 25, 26, 24, 24] + [+Infinity, -1, -1, 0, -4, -4, -2, -3, 0, 0, -1, -1, 1, 0, 3, 3, 3, 3, 5, 3, 7, 7, + 6, 6, 8, 7, 10, 10, 8, 8, 10, 9, 12, 12, 12, 12, 14, 12, 17, 16, 15, 15, 17, 16, + 19, 19, 18, 18, 20, 19, 22, 22, 22, 22, 24, 21, 25, 26, 24, 24] An error will be raised for forms which are not sufficiently overconvergent: @@ -216,23 +222,23 @@ def OverconvergentModularForms(prime, weight, radius, base_ring=QQ, prec=20, cha INPUT: - - ``prime`` - a prime number `p`, which must be one of the primes `\{2, 3, + - ``prime`` -- a prime number `p`, which must be one of the primes `\{2, 3, 5, 7, 13\}`, or the congruence subgroup `\Gamma_0(p)` where `p` is one of these primes. - - ``weight`` - an integer (which at present must be 0 or `\ge 2`), the + - ``weight`` -- an integer (which at present must be 0 or `\ge 2`), the weight. - - ``radius`` - a rational number in the interval `\left( 0, \frac{p}{p+1} + - ``radius`` -- a rational number in the interval `\left( 0, \frac{p}{p+1} \right)`, the radius of overconvergence. - - ``base_ring`` (default: `\QQ`), a ring over which to compute. This + - ``base_ring`` -- (default: `\QQ`), a ring over which to compute. This need not be a `p`-adic ring. - - ``prec`` - an integer (default: 20), the number of `q`-expansion terms to + - ``prec`` -- an integer (default: 20), the number of `q`-expansion terms to compute. - - ``char`` - a Dirichlet character modulo `p` or ``None`` (the default). + - ``char`` -- a Dirichlet character modulo `p` or ``None`` (the default). Here ``None`` is interpreted as the trivial character modulo `p`. The character `\chi` and weight `k` must satisfy `(-1)^k = \chi(-1)`, and @@ -243,11 +249,14 @@ def OverconvergentModularForms(prime, weight, radius, base_ring=QQ, prec=20, cha EXAMPLES:: sage: OverconvergentModularForms(3, 0, 1/2) - Space of 3-adic 1/2-overconvergent modular forms of weight-character 0 over Rational Field + Space of 3-adic 1/2-overconvergent modular forms + of weight-character 0 over Rational Field sage: OverconvergentModularForms(3, 16, 1/2) - Space of 3-adic 1/2-overconvergent modular forms of weight-character 16 over Rational Field - sage: OverconvergentModularForms(3, 3, 1/2, char = DirichletGroup(3,QQ).0) - Space of 3-adic 1/2-overconvergent modular forms of weight-character (3, 3, [-1]) over Rational Field + Space of 3-adic 1/2-overconvergent modular forms + of weight-character 16 over Rational Field + sage: OverconvergentModularForms(3, 3, 1/2, char=DirichletGroup(3,QQ).0) + Space of 3-adic 1/2-overconvergent modular forms + of weight-character (3, 3, [-1]) over Rational Field """ if is_Gamma0(prime) or is_Gamma1(prime): prime = prime.level() @@ -360,17 +369,19 @@ def _set_radius(self, radius): sage: M = OverconvergentModularForms(3, 2, 1/2) # indirect doctest sage: M._set_radius(1/3); M - Space of 3-adic 1/3-overconvergent modular forms of weight-character 2 over Rational Field + Space of 3-adic 1/3-overconvergent modular forms of weight-character 2 + over Rational Field sage: x = polygen(ZZ, 'x') sage: L. = Qp(3).extension(x^5 - 3) - sage: OverconvergentModularForms(3, 2, 1/30, base_ring=L).normalising_factor() # indirect doctest + sage: OverconvergentModularForms(3, 2, 1/30, base_ring=L).normalising_factor() # indirect doctest w + O(w^101) sage: OverconvergentModularForms(3, 2, 1/40, base_ring=L) Traceback (most recent call last): ... - ValueError: no element of base ring (=3-adic Eisenstein Extension ...) has normalised valuation 3/20 + ValueError: no element of base ring (=3-adic Eisenstein Extension ...) + has normalised valuation 3/20 """ p = ZZ(self.prime()) @@ -401,7 +412,7 @@ def is_exact(self): r""" True if elements of this space are represented exactly, i.e., there is no precision loss when doing arithmetic. As this is never true for - overconvergent modular forms spaces, this returns False. + overconvergent modular forms spaces, this returns ``False``. EXAMPLES:: @@ -412,13 +423,14 @@ def is_exact(self): def change_ring(self, ring): r""" - Return the space corresponding to self but over the given base ring. + Return the space corresponding to ``self`` but over the given base ring. EXAMPLES:: sage: M = OverconvergentModularForms(2, 0, 1/2) sage: M.change_ring(Qp(2)) - Space of 2-adic 1/2-overconvergent modular forms of weight-character 0 over 2-adic Field with ... + Space of 2-adic 1/2-overconvergent modular forms of weight-character 0 + over 2-adic Field with ... """ return OverconvergentModularForms(self.prime(), self.weight(), self.radius(), ring, self.prec(), self.character()) @@ -434,11 +446,13 @@ def base_extend(self, ring): sage: M = OverconvergentModularForms(2, 0, 1/2, base_ring=Qp(2)) sage: x = polygen(ZZ, 'x') sage: M.base_extend(Qp(2).extension(x^2 - 2, names="w")) - Space of 2-adic 1/2-overconvergent modular forms of weight-character 0 over 2-adic Eisenstein Extension ... + Space of 2-adic 1/2-overconvergent modular forms of weight-character 0 + over 2-adic Eisenstein Extension ... sage: M.base_extend(QQ) Traceback (most recent call last): ... - TypeError: Base extension of self (over '2-adic Field with capped relative precision 20') to ring 'Rational Field' not defined. + TypeError: Base extension of self (over '2-adic Field with capped + relative precision 20') to ring 'Rational Field' not defined. """ if ring.has_coerce_map_from(self.base_ring()): return self.change_ring(ring) @@ -451,16 +465,17 @@ def _an_element_(self): EXAMPLES:: - sage: OverconvergentModularForms(3, 2, 1/3, prec=4).an_element() # indirect doctest - 3-adic overconvergent modular form of weight-character 2 with q-expansion 9*q + 216*q^2 + 2430*q^3 + O(q^4) + sage: OverconvergentModularForms(3, 2, 1/3, prec=4).an_element() # indirect doctest + 3-adic overconvergent modular form of weight-character 2 + with q-expansion 9*q + 216*q^2 + 2430*q^3 + O(q^4) """ return self.element_class(self, self._gsr.an_element()) def character(self): r""" - Return the character of self. For overconvergent forms, the weight and + Return the character of ``self``. For overconvergent forms, the weight and the character are unified into the concept of a weight-character, so - this returns exactly the same thing as self.weight(). + this returns exactly the same thing as ``self.weight()``. EXAMPLES:: @@ -475,9 +490,9 @@ def character(self): def weight(self): r""" - Return the character of self. For overconvergent forms, the weight and + Return the character of ``self``. For overconvergent forms, the weight and the character are unified into the concept of a weight-character, so - this returns exactly the same thing as self.character(). + this returns exactly the same thing as ``self.character()``. EXAMPLES:: @@ -515,7 +530,7 @@ def __eq__(self, other): False sage: OverconvergentModularForms(3, 0, 1/2) == OverconvergentModularForms(3, 0, 1/3) False - sage: OverconvergentModularForms(3, 0, 1/2) == OverconvergentModularForms(3, 0, 1/2, base_ring = Qp(3)) + sage: OverconvergentModularForms(3, 0, 1/2) == OverconvergentModularForms(3, 0, 1/2, base_ring=Qp(3)) False sage: OverconvergentModularForms(3, 0, 1/2) == OverconvergentModularForms(3, 0, 1/2) True @@ -599,17 +614,20 @@ def __reduce__(self): def gen(self, i): r""" - Return the ith module generator of self. + Return the `i`-th module generator of ``self``. EXAMPLES:: sage: M = OverconvergentModularForms(3, 2, 1/2, prec=4) sage: M.gen(0) - 3-adic overconvergent modular form of weight-character 2 with q-expansion 1 + 12*q + 36*q^2 + 12*q^3 + O(q^4) + 3-adic overconvergent modular form of weight-character 2 + with q-expansion 1 + 12*q + 36*q^2 + 12*q^3 + O(q^4) sage: M.gen(1) - 3-adic overconvergent modular form of weight-character 2 with q-expansion 27*q + 648*q^2 + 7290*q^3 + O(q^4) + 3-adic overconvergent modular form of weight-character 2 + with q-expansion 27*q + 648*q^2 + 7290*q^3 + O(q^4) sage: M.gen(30) - 3-adic overconvergent modular form of weight-character 2 with q-expansion O(q^4) + 3-adic overconvergent modular form of weight-character 2 + with q-expansion O(q^4) """ return OverconvergentModularFormElement(self, gexp=self._gsr.gen()**i) @@ -627,7 +645,7 @@ def _repr_(self): def prime(self): r""" - Return the residue characteristic of self, i.e. the prime `p` such that + Return the residue characteristic of ``self``, i.e. the prime `p` such that this is a `p`-adic space. EXAMPLES:: @@ -651,16 +669,18 @@ def radius(self): def gens(self): r""" Return a generator object that iterates over the (infinite) set of - basis vectors of self. + basis vectors of ``self``. EXAMPLES:: sage: o = OverconvergentModularForms(3, 12, 1/2) sage: t = o.gens() sage: next(t) - 3-adic overconvergent modular form of weight-character 12 with q-expansion 1 - 32760/61203943*q - 67125240/61203943*q^2 - ... + 3-adic overconvergent modular form of weight-character 12 with q-expansion + 1 - 32760/61203943*q - 67125240/61203943*q^2 - ... sage: next(t) - 3-adic overconvergent modular form of weight-character 12 with q-expansion 27*q + 19829193012/61203943*q^2 + 146902585770/61203943*q^3 + ... + 3-adic overconvergent modular form of weight-character 12 with q-expansion + 27*q + 19829193012/61203943*q^2 + 146902585770/61203943*q^3 + ... """ i = 0 while True: @@ -844,10 +864,10 @@ def _coerce_map_from_(self, other): def coordinate_vector(self, x): r""" - Write x as a vector with respect to the basis given by self.basis(). - Here x must be an element of this space or something that can be - converted into one. If x has precision less than the default precision - of self, then the returned vector will be shorter. + Write ``x`` as a vector with respect to the basis given by ``self.basis()``. + Here ``x`` must be an element of this space or something that can be + converted into one. If ``x`` has precision less than the default precision + of ``self``, then the returned vector will be shorter. EXAMPLES:: @@ -873,7 +893,7 @@ def coordinate_vector(self, x): def ngens(self): r""" - The number of generators of self (as a module over its base ring), i.e. infinity. + The number of generators of ``self`` (as a module over its base ring), i.e. infinity. EXAMPLES:: @@ -893,7 +913,7 @@ def hecke_operator(self, f, m): `T_m` acting on `f`. The input may be either a "bare" power series, or an - OverconvergentModularFormElement object; the return value will be of + :class:`OverconvergentModularFormElement` object; the return value will be of the same type. EXAMPLES:: @@ -901,7 +921,8 @@ def hecke_operator(self, f, m): sage: M = OverconvergentModularForms(3, 0, 1/2) sage: f = M.1 sage: M.hecke_operator(f, 3) - 3-adic overconvergent modular form of weight-character 0 with q-expansion 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + 52494114852*q^6 + O(q^7) + 3-adic overconvergent modular form of weight-character 0 with q-expansion + 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + 52494114852*q^6 + O(q^7) sage: M.hecke_operator(f.q_expansion(), 3) 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + 52494114852*q^6 + O(q^7) """ @@ -964,11 +985,13 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): [ 0 24 64 0] [ 0 32 1152 4608] [ 0 0 3072 61440] - sage: OverconvergentModularForms(2, 12, 1/2, base_ring=pAdicField(2)).hecke_matrix(2, 3) * (1 + O(2^2)) + sage: o = OverconvergentModularForms(2, 12, 1/2, base_ring=pAdicField(2)) + sage: o.hecke_matrix(2, 3) * (1 + O(2^2)) [ 1 + O(2^2) 0 0] [ 0 2^3 + O(2^5) 2^6 + O(2^8)] [ 0 2^4 + O(2^6) 2^7 + 2^8 + O(2^9)] - sage: OverconvergentModularForms(2, 12, 1/2, base_ring=pAdicField(2)).hecke_matrix(2, 3, exact_arith=True) + sage: o = OverconvergentModularForms(2, 12, 1/2, base_ring=pAdicField(2)) + sage: o.hecke_matrix(2, 3, exact_arith=True) [ 1 0 0] [ 0 33881928/1414477 64] [ 0 -192898739923312/2000745183529 1626332544/1414477] @@ -1026,13 +1049,13 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): def slopes(self, n, use_recurrence=False): r""" - Compute the slopes of the `U_p` operator acting on self, using an n x n matrix. + Compute the slopes of the `U_p` operator acting on self, using an `n\times n` matrix. EXAMPLES:: - sage: OverconvergentModularForms(5,2,1/3,base_ring=Qp(5),prec=100).slopes(5) + sage: OverconvergentModularForms(5, 2, 1/3, base_ring=Qp(5), prec=100).slopes(5) [0, 2, 5, 6, 9] - sage: OverconvergentModularForms(2,1,1/3,char=DirichletGroup(4,QQ).0).slopes(5) + sage: OverconvergentModularForms(2, 1, 1/3, char=DirichletGroup(4,QQ).0).slopes(5) [0, 2, 4, 6, 8] """ if self.base_ring() == QQ: @@ -1045,22 +1068,22 @@ def slopes(self, n, use_recurrence=False): def eigenfunctions(self, n, F=None, exact_arith=True): """ - Calculate approximations to eigenfunctions of self. + Calculate approximations to eigenfunctions of ``self``. - These are the eigenfunctions of self.hecke_matrix(p, n), which + These are the eigenfunctions of ``self.hecke_matrix(p, n)``, which are approximations to the true eigenfunctions. Returns a list - of OverconvergentModularFormElement objects, in increasing + of :class:`OverconvergentModularFormElement` objects, in increasing order of slope. INPUT: - - ``n`` - integer. The size of the matrix to use. + - ``n`` -- integer. The size of the matrix to use. - - ``F`` - None, or a field over which to calculate eigenvalues. If the - field is None, the current base ring is used. If the base ring is not + - ``F`` -- either ``None`` or a field over which to calculate eigenvalues. If the + field is ``None``, the current base ring is used. If the base ring is not a `p`-adic ring, an error will be raised. - - ``exact_arith`` - True or False (default True). If True, use exact + - ``exact_arith`` -- ``True`` or ``False`` (default ``True``). If ``True``, use exact rational arithmetic to calculate the matrix of the `U` operator and its characteristic power series, even when the base ring is an inexact `p`-adic ring. This is typically slower, but more numerically stable. @@ -1073,7 +1096,8 @@ def eigenfunctions(self, n, F=None, exact_arith=True): sage: X = OverconvergentModularForms(2, 2, 1/6).eigenfunctions(8, Qp(2, 100)) sage: X[1] - 2-adic overconvergent modular form of weight-character 2 with q-expansion (1 + O(2^74))*q + (2^4 + 2^5 + 2^9 + 2^10 + 2^12 + 2^13 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^28 + 2^30 + 2^31 + 2^32 + 2^34 + 2^36 + 2^37 + 2^39 + 2^40 + 2^43 + 2^44 + 2^45 + 2^47 + 2^48 + 2^52 + 2^53 + 2^54 + 2^55 + 2^56 + 2^58 + 2^59 + 2^60 + 2^61 + 2^67 + 2^68 + 2^70 + 2^71 + 2^72 + 2^74 + 2^76 + O(2^78))*q^2 + (2^2 + 2^7 + 2^8 + 2^9 + 2^12 + 2^13 + 2^16 + 2^17 + 2^21 + 2^23 + 2^25 + 2^28 + 2^33 + 2^34 + 2^36 + 2^37 + 2^42 + 2^45 + 2^47 + 2^49 + 2^50 + 2^51 + 2^54 + 2^55 + 2^58 + 2^60 + 2^61 + 2^67 + 2^71 + 2^72 + O(2^76))*q^3 + (2^8 + 2^11 + 2^14 + 2^19 + 2^21 + 2^22 + 2^24 + 2^25 + 2^26 + 2^27 + 2^28 + 2^29 + 2^32 + 2^33 + 2^35 + 2^36 + 2^44 + 2^45 + 2^46 + 2^47 + 2^49 + 2^50 + 2^53 + 2^54 + 2^55 + 2^56 + 2^57 + 2^60 + 2^63 + 2^66 + 2^67 + 2^69 + 2^74 + 2^76 + 2^79 + 2^80 + 2^81 + O(2^82))*q^4 + (2 + 2^2 + 2^9 + 2^13 + 2^15 + 2^17 + 2^19 + 2^21 + 2^23 + 2^26 + 2^27 + 2^28 + 2^30 + 2^33 + 2^34 + 2^35 + 2^36 + 2^37 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^45 + 2^58 + 2^59 + 2^60 + 2^61 + 2^62 + 2^63 + 2^65 + 2^66 + 2^68 + 2^69 + 2^71 + 2^72 + O(2^75))*q^5 + (2^6 + 2^7 + 2^15 + 2^16 + 2^21 + 2^24 + 2^25 + 2^28 + 2^29 + 2^33 + 2^34 + 2^37 + 2^44 + 2^45 + 2^48 + 2^50 + 2^51 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^64 + 2^69 + 2^71 + 2^73 + 2^75 + 2^78 + O(2^80))*q^6 + (2^3 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^25 + 2^26 + 2^34 + 2^37 + 2^38 + 2^39 + 2^40 + 2^41 + 2^45 + 2^47 + 2^49 + 2^51 + 2^53 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^61 + 2^66 + 2^69 + 2^70 + 2^71 + 2^74 + 2^76 + O(2^77))*q^7 + O(q^8) + 2-adic overconvergent modular form of weight-character 2 with q-expansion + (1 + O(2^74))*q + (2^4 + 2^5 + 2^9 + 2^10 + 2^12 + 2^13 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^28 + 2^30 + 2^31 + 2^32 + 2^34 + 2^36 + 2^37 + 2^39 + 2^40 + 2^43 + 2^44 + 2^45 + 2^47 + 2^48 + 2^52 + 2^53 + 2^54 + 2^55 + 2^56 + 2^58 + 2^59 + 2^60 + 2^61 + 2^67 + 2^68 + 2^70 + 2^71 + 2^72 + 2^74 + 2^76 + O(2^78))*q^2 + (2^2 + 2^7 + 2^8 + 2^9 + 2^12 + 2^13 + 2^16 + 2^17 + 2^21 + 2^23 + 2^25 + 2^28 + 2^33 + 2^34 + 2^36 + 2^37 + 2^42 + 2^45 + 2^47 + 2^49 + 2^50 + 2^51 + 2^54 + 2^55 + 2^58 + 2^60 + 2^61 + 2^67 + 2^71 + 2^72 + O(2^76))*q^3 + (2^8 + 2^11 + 2^14 + 2^19 + 2^21 + 2^22 + 2^24 + 2^25 + 2^26 + 2^27 + 2^28 + 2^29 + 2^32 + 2^33 + 2^35 + 2^36 + 2^44 + 2^45 + 2^46 + 2^47 + 2^49 + 2^50 + 2^53 + 2^54 + 2^55 + 2^56 + 2^57 + 2^60 + 2^63 + 2^66 + 2^67 + 2^69 + 2^74 + 2^76 + 2^79 + 2^80 + 2^81 + O(2^82))*q^4 + (2 + 2^2 + 2^9 + 2^13 + 2^15 + 2^17 + 2^19 + 2^21 + 2^23 + 2^26 + 2^27 + 2^28 + 2^30 + 2^33 + 2^34 + 2^35 + 2^36 + 2^37 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^45 + 2^58 + 2^59 + 2^60 + 2^61 + 2^62 + 2^63 + 2^65 + 2^66 + 2^68 + 2^69 + 2^71 + 2^72 + O(2^75))*q^5 + (2^6 + 2^7 + 2^15 + 2^16 + 2^21 + 2^24 + 2^25 + 2^28 + 2^29 + 2^33 + 2^34 + 2^37 + 2^44 + 2^45 + 2^48 + 2^50 + 2^51 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^64 + 2^69 + 2^71 + 2^73 + 2^75 + 2^78 + O(2^80))*q^6 + (2^3 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^25 + 2^26 + 2^34 + 2^37 + 2^38 + 2^39 + 2^40 + 2^41 + 2^45 + 2^47 + 2^49 + 2^51 + 2^53 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^61 + 2^66 + 2^69 + 2^70 + 2^71 + 2^74 + 2^76 + O(2^77))*q^7 + O(q^8) sage: [x.slope() for x in X] [0, 4, 8, 14, 16, 18, 26, 30] """ @@ -1248,8 +1272,8 @@ def _discover_recurrence_matrix(self, use_smithline=True): def cps_u(self, n, use_recurrence=False): r""" - Compute the characteristic power series of `U_p` acting on self, using - an n x n matrix. + Compute the characteristic power series of `U_p` acting on ``self``, using + an `n\times n` matrix. EXAMPLES:: @@ -1440,12 +1464,16 @@ def eigenvalue(self): def q_expansion(self, prec=None): r""" - Return the `q`-expansion of self, to as high precision as it is known. + Return the `q`-expansion of ``self``, to as high precision as it is known. EXAMPLES:: sage: OverconvergentModularForms(3, 4, 1/2).gen(0).q_expansion() - 1 - 120/13*q - 1080/13*q^2 - 120/13*q^3 - 8760/13*q^4 - 15120/13*q^5 - 1080/13*q^6 - 41280/13*q^7 - 5400*q^8 - 120/13*q^9 - 136080/13*q^10 - 159840/13*q^11 - 8760/13*q^12 - 263760/13*q^13 - 371520/13*q^14 - 15120/13*q^15 - 561720/13*q^16 - 45360*q^17 - 1080/13*q^18 - 823200/13*q^19 + O(q^20) + 1 - 120/13*q - 1080/13*q^2 - 120/13*q^3 - 8760/13*q^4 - 15120/13*q^5 + - 1080/13*q^6 - 41280/13*q^7 - 5400*q^8 - 120/13*q^9 - 136080/13*q^10 + - 159840/13*q^11 - 8760/13*q^12 - 263760/13*q^13 - 371520/13*q^14 + - 15120/13*q^15 - 561720/13*q^16 - 45360*q^17 - 1080/13*q^18 + - 823200/13*q^19 + O(q^20) """ if prec is None: return self._qexp @@ -1668,7 +1696,7 @@ def weight(self): def additive_order(self): r""" Return the additive order of this element (required attribute for all - elements deriving from sage.modules.ModuleElement). + elements deriving from :class:`sage.modules.ModuleElement`). EXAMPLES:: @@ -1688,21 +1716,24 @@ def additive_order(self): def base_extend(self, R): r""" - Return a copy of self but with coefficients in the given ring. + Return a copy of ``self`` but with coefficients in the given ring. EXAMPLES:: sage: M = OverconvergentModularForms(7, 10, 1/2, prec=5) sage: f = M.1 sage: f.base_extend(Qp(7, 4)) - 7-adic overconvergent modular form of weight-character 10 with q-expansion (7 + O(7^5))*q + (6*7 + 4*7^2 + 7^3 + 6*7^4 + O(7^5))*q^2 + (5*7 + 5*7^2 + 7^4 + O(7^5))*q^3 + (7^2 + 4*7^3 + 3*7^4 + 2*7^5 + O(7^6))*q^4 + O(q^5) + 7-adic overconvergent modular form of weight-character 10 with q-expansion + (7 + O(7^5))*q + (6*7 + 4*7^2 + 7^3 + 6*7^4 + O(7^5))*q^2 + + (5*7 + 5*7^2 + 7^4 + O(7^5))*q^3 + (7^2 + 4*7^3 + 3*7^4 + 2*7^5 + + O(7^6))*q^4 + O(q^5) """ S = self.parent().base_extend(R) return S(self) def __pari__(self): r""" - Return the Pari object corresponding to self, which is just the + Return the Pari object corresponding to ``self``, which is just the `q`-expansion of self as a formal power series. EXAMPLES:: From 64ab9dedadd3a5eb89df16c94467792d1f4c8463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Tue, 2 Apr 2024 08:36:26 +0200 Subject: [PATCH 081/183] fix sugegsted details --- src/sage/plot/arc.py | 10 +++++----- src/sage/plot/colors.py | 4 ++-- src/sage/plot/matrix_plot.py | 17 +++++++++-------- src/sage/plot/plot.py | 30 +++++++++++++++--------------- src/sage/plot/plot_field.py | 21 ++++++++++++--------- 5 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/sage/plot/arc.py b/src/sage/plot/arc.py index c7d8d76ffae..c2a0f69ed1c 100644 --- a/src/sage/plot/arc.py +++ b/src/sage/plot/arc.py @@ -1,7 +1,7 @@ """ Arcs of circles and ellipses """ -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2010 Vincent Delecroix <20100.delecroix@gmail.com>, # # Distributed under the terms of the GNU General Public License (GPL) @@ -13,8 +13,8 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.plot.primitive import GraphicPrimitive from sage.plot.colors import to_mpl_color @@ -336,7 +336,7 @@ def theta_stretch(theta, scale): g.add_primitive(BezierPath(cutlist, opt)) return g - def _repr_(self): + def _repr_(self) -> str: """ String representation of ``Arc`` primitive. @@ -346,7 +346,7 @@ def _repr_(self): sage: print(Arc(2,3,2.2,2.2,0,2,3,{})) Arc with center (2.0,3.0) radii (2.2,2.2) angle 0.0 inside the sector (2.0,3.0) """ - return "Arc with center ({},{}) radii ({},{}) angle {} inside the sector ({},{})".format(self.x, self.y, self.r1, self.r2, self.angle, self.s1, self.s2) + return f"Arc with center ({self.x},{self.y}) radii ({self.r1},{self.r2}) angle {self.angle} inside the sector ({self.s1},{self.s2})" def _render_on_subplot(self, subplot): """ diff --git a/src/sage/plot/colors.py b/src/sage/plot/colors.py index cdc4a9f1b21..573750498d7 100644 --- a/src/sage/plot/colors.py +++ b/src/sage/plot/colors.py @@ -338,8 +338,8 @@ def rgbcolor(c, space='rgb'): elif isinstance(c, (list, tuple)): if len(c) != 3: - raise ValueError("color list or tuple '{}' must have 3 entries, one for each RGB, HSV, HLS, or HSL channel".format(c )) - c = [mod_one(_) for _ in list(c)] + raise ValueError(f"color list or tuple '{c}' must have 3 entries, one for each RGB, HSV, HLS, or HSL channel") + c = [mod_one(comp) for comp in c] if space == 'rgb': return tuple(c) elif space == 'hsv': diff --git a/src/sage/plot/matrix_plot.py b/src/sage/plot/matrix_plot.py index da55e540890..3e3e5c7dd24 100644 --- a/src/sage/plot/matrix_plot.py +++ b/src/sage/plot/matrix_plot.py @@ -1,7 +1,7 @@ """ Matrix plots """ -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2006 Alex Clemesha , # William Stein , # 2008 Mike Hansen , @@ -15,8 +15,8 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options, suboptions @@ -224,10 +224,11 @@ def _render_on_subplot(self, subplot): extent = (lim['xmin'], lim['xmax'], lim['ymax' if flip_y else 'ymin'], lim['ymin' if flip_y else 'ymax']) - opts = {'cmap': cmap, 'interpolation': 'nearest', 'aspect': 'equal', - 'norm': norm, 'vmin': options['vmin'], 'vmax': options['vmax'], - 'origin': ('upper' if flip_y else 'lower'), - 'extent': extent, 'zorder': options.get('zorder')} + opts = {'cmap': cmap, 'interpolation': 'nearest', + 'aspect': 'equal', 'norm': norm, + 'vmin': options['vmin'], 'vmax': options['vmax'], + 'origin': ('upper' if flip_y else 'lower'), + 'extent': extent, 'zorder': options.get('zorder')} image = subplot.imshow(self.xy_data_array, **opts) if options.get('colorbar', False): @@ -240,7 +241,7 @@ def _render_on_subplot(self, subplot): subplot.xaxis.tick_top() else: subplot.xaxis.tick_bottom() - subplot.xaxis.set_ticks_position('both') #only tick marks, not tick labels + subplot.xaxis.set_ticks_position('both') # only tick marks, not tick labels @suboptions('colorbar', orientation='vertical', format=None) diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py index 2f830297d4b..4f650fa4613 100644 --- a/src/sage/plot/plot.py +++ b/src/sage/plot/plot.py @@ -580,17 +580,17 @@ def f(x): return (x-3)*(x-5)*(x-7)+40 from functools import reduce -## IMPORTANT: Do *not* import matplotlib at module scope. It takes a -## surprisingly long time to initialize itself. It's better if it is -## imported in functions, so it only gets started if it is actually -## going to be used. +# IMPORTANT: Do *not* import matplotlib at module scope. It takes a +# surprisingly long time to initialize itself. It's better if it is +# imported in functions, so it only gets started if it is actually +# going to be used. -#DEFAULT_FIGSIZE=(6, 3.70820393249937) +# DEFAULT_FIGSIZE=(6, 3.70820393249937) import sage.misc.verbose from sage.arith.srange import srange -from sage.misc.randstate import current_randstate #for plot adaptive refinement -from math import sin, cos, pi, log, exp #for polar_plot and log scaling +from sage.misc.randstate import current_randstate # for plot adaptive refinement +from math import sin, cos, pi, log, exp # for polar_plot and log scaling from sage.ext.fast_eval import fast_float, is_fast_float from sage.structure.element import Expression @@ -605,10 +605,10 @@ def f(x): return (x-3)*(x-5)*(x-7)+40 from sage.misc.lazy_import import lazy_import lazy_import('sage.plot.line', 'line2d', deprecation=28717) -#Currently not used - see comment immediately above about -#figure.canvas.mpl_connect('draw_event', pad_for_tick_labels) +# Currently not used - see comment immediately above about +# figure.canvas.mpl_connect('draw_event', pad_for_tick_labels) # TODO - figure out how to use this, add documentation -#def pad_for_tick_labels(event): +# def pad_for_tick_labels(event): # import matplotlib.transforms as mtransforms # figure=event.canvas.figure # bboxes = [] @@ -638,10 +638,10 @@ def f(x): return (x-3)*(x-5)*(x-7)+40 # figure.canvas.draw() # return False # -#Currently not used - see comment above about -#figure.canvas.mpl_connect('draw_event', pad_for_tick_labels) +# Currently not used - see comment above about +# figure.canvas.mpl_connect('draw_event', pad_for_tick_labels) # TODO - figure out how to use this, add documentation -#def adjust_figure_to_contain_bbox(fig, bbox,pad=1.1): +# def adjust_figure_to_contain_bbox(fig, bbox,pad=1.1): # """ # For each amount we are over (in axes coordinates), we adjust by over*pad # to give ourselves a bit of padding. @@ -2069,7 +2069,7 @@ def f(x): return (floor(x)+0.5) / (1-(x-0.5)**2) xmax = kwds.pop('xmax', 1) G = _plot(funcs, (xmin, xmax), *args, **kwds) else: - sage.misc.verbose.verbose("there were {} extra arguments (besides {})".format(n, funcs), level=0) + sage.misc.verbose.verbose(f"there were {n} extra arguments (besides {funcs})", level=0) G._set_extra_kwds(G_kwds) if do_show: @@ -2078,7 +2078,7 @@ def f(x): return (floor(x)+0.5) / (1-(x-0.5)**2) def _plot(funcs, xrange, parametric=False, - polar=False, fill=False, label='', randomize=True, **options): + polar=False, fill=False, label='', randomize=True, **options): """ Internal function which does the actual plotting. diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py index c8052fb1520..b1a9505eb81 100644 --- a/src/sage/plot/plot_field.py +++ b/src/sage/plot/plot_field.py @@ -2,7 +2,7 @@ """ Plotting fields """ -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2006 Alex Clemesha , # William Stein , # 2008 Mike Hansen , @@ -16,8 +16,8 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.plot.primitive import GraphicPrimitive from sage.misc.decorators import options from sage.arith.srange import xsrange @@ -256,12 +256,12 @@ def plot_vector_field(f_g, xrange, yrange, **options): x,y = var('x,y') g = plot_vector_field((x,y), (x,-2,2), (y,-2,2), xmax=10) sphinx_plot(g) - """ - (f,g) = f_g + f, g = f_g from sage.plot.all import Graphics from sage.plot.misc import setup_for_eval_on_grid - z, ranges = setup_for_eval_on_grid([f,g], [xrange,yrange], options['plot_points']) + z, ranges = setup_for_eval_on_grid([f, g], [xrange, yrange], + options['plot_points']) f, g = z xpos_array, ypos_array, xvec_array, yvec_array = [], [], [], [] @@ -352,9 +352,12 @@ def plot_slope_field(f, xrange, yrange, **kwds): from sage.misc.functional import sqrt from sage.misc.sageinspect import is_function_or_cython_function if is_function_or_cython_function(f): - norm_inverse = lambda x,y: 1/sqrt(f(x, y)**2+1) - f_normalized = lambda x,y: f(x, y)*norm_inverse(x, y) + def norm_inverse(x, y): + return 1 / sqrt(f(x, y)**2 + 1) + + def f_normalized(x, y): + return f(x, y) * norm_inverse(x, y) else: - norm_inverse = 1 / sqrt(f**2+1) + norm_inverse = 1 / sqrt(f**2 + 1) f_normalized = f * norm_inverse return plot_vector_field((norm_inverse, f_normalized), xrange, yrange, **slope_options) From 5a4fdd298958a264f0db5261ffe7c01ad65fea4f Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Wed, 3 Apr 2024 11:58:15 +0100 Subject: [PATCH 082/183] Fix a failing docstring --- src/sage/rings/polynomial/laurent_polynomial_mpair.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index fc50f83406b..17834718d1c 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -1199,7 +1199,7 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial): sage: f.degree(1) Traceback (most recent call last): ... - TypeError: x must be a generator of parent + TypeError: 1 is not a generator of parent """ # The zero polynomial is defined to have degree -Infinity if self.is_zero(): From a2b5799e13c485e0a34b7f0664b03f08e9c55c1a Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Wed, 3 Apr 2024 12:20:07 +0100 Subject: [PATCH 083/183] Add checks for failing doctests --- .../rings/polynomial/polynomial_modn_dense_ntl.pyx | 12 +++++++----- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index bed65411fd0..a487cebd702 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -1808,13 +1808,15 @@ cdef class Polynomial_dense_mod_p(Polynomial_dense_mod_n): TESTS: - Negative powers will not work:: + Negative powers work but use the generic + implementation of fraction fields:: sage: R. = PolynomialRing(Integers(101), implementation='NTL') - sage: (x-1)^(-5) - Traceback (most recent call last): - ... - NotImplementedError: Fraction fields not implemented for this type. + sage: f = (x-1)^(-5) + sage: type(f) + + sage: (f + 2).numerator() + 2*x^5 + 91*x^4 + 20*x^3 + 81*x^2 + 10*x + 100 We define ``0^0`` to be unity, :issue:`13895`:: diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 9ed9acbaa84..a2cf2f2f31f 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -670,6 +670,10 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): """ exp = Integer(exp) if modulus is not None: + # Handle when modulus is zero + if modulus.is_zero(): + raise ZeroDivisionError("modulus must be nonzero") + # Similar to coerce_binop if not have_same_parent(self, modulus): a, m = canonical_coercion(self, modulus) From f997788e1e1de5dd0d8eef8c0fdacbc904a53d00 Mon Sep 17 00:00:00 2001 From: adrinospy Date: Wed, 3 Apr 2024 22:40:54 +0530 Subject: [PATCH 084/183] added environment variables for repeated literals --- .github/workflows/get_changes.sh | 61 +++++++++++++++++++++++++++ .github/workflows/pr-labeler.yml | 72 ++++++-------------------------- 2 files changed, 74 insertions(+), 59 deletions(-) create mode 100644 .github/workflows/get_changes.sh diff --git a/.github/workflows/get_changes.sh b/.github/workflows/get_changes.sh new file mode 100644 index 00000000000..b2e716c9da5 --- /dev/null +++ b/.github/workflows/get_changes.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +# get all the changes made and changed files +CHANGES=$(git diff --ignore-all-space $PR_BASE_SHA $PR_HEAD_SHA) + +# ignore blank lines +CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') + +# ignore non necessary lines from git diff +CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + +# count total no of lines +CHANGES=$(echo "$CHANGES" | wc -l) + +echo "CHANGES MADE: $CHANGES" + +# get changed files +CHANGED_PATH=$(git diff --name-only $PR_BASE_SHA $PR_HEAD_SHA) + +# extract changed dir +CHANGED_DIR=$(echo "$CHANGED_PATH" | awk -F'src/sage/' '{print $2}' | cut -d'/' -f1 | sed 's/\([^ ]\+\)/c: \1/g') + +AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN" + +DELETE_LABELS=("$MINIMAL" "$SMALL" "$MODERATE" "$LARGE") + +if [ "$CHANGES" -gt "$LARGE_THRESHOLD" ]; then +SIZE_LABEL="$LARGE" +elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then +SIZE_LABEL="$MODERATE" +elif [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then +SIZE_LABEL="$SMALL" +else +SIZE_LABEL="$MINIMAL" +fi + +DELETE_LABELS=("${DELETE_LABELS[@]//${SIZE_LABEL}}") + +readarray -t LABELS <<< "$CHANGED_DIR" +LABELS+=("$SIZE_LABEL") + +echo "Adding label: ${LABELS[@]}" +for LABEL in "${LABELS[@]}"; do + curl -X POST \ + -H "$AUTH_HEADER" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + -d "{\"labels\":[\"$LABEL\"]}" \ + "$API_URL" >/dev/null +done + +echo "Deleting Labels:" + +for DELETE_LABEL in "${DELETE_LABELS[@]}"; do + ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') + curl -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "$AUTH_HEADER" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "$API_URL/$ENCODED_LABEL" >/dev/null +done \ No newline at end of file diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 91bd5fdc21f..521e7a2901b 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -9,6 +9,7 @@ on: - edited jobs: label-changes: + if: vars.SMALL_THRESHOLD && vars.MODERATE_THRESHOLD && vars.LARGE_THRESHOLD runs-on: ubuntu-latest permissions: pull-requests: write @@ -20,66 +21,19 @@ jobs: - name: Add labels based on size run: | - git fetch origin ${{ github.base_ref }} - - # get all the changes made and changed files - CHANGES=$(git diff --ignore-all-space ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}) - CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | awk -F'src/sage/' '{print $2}' | cut -d'/' -f1 | sed 's/\([^ ]\+\)/c: \1/g') - - # ignore blank lines - CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') - - # ignore non necessary lines from git diff - CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') - - # count total no of lines - CHANGES=$(echo "$CHANGES" | wc -l) - - echo "CHANGES MADE: $CHANGES" - - PR_NUMBER="${{ github.event.number }}" - API_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/labels" - AUTH_HEADER="Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" - - DELETE_LABELS=("v: minimal" "v: small" "v: moderate" "v: large") - - if [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then - SIZE_LABEL="v: small" - elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then - SIZE_LABEL="v: moderate" - elif [ "$CHANGES" -gt "$LARGE_THRESHOLD" ]; then - SIZE_LABEL="v: large" - else - SIZE_LABEL="v: minimal" - fi - - DELETE_LABELS=("${DELETE_LABELS[@]//${SIZE_LABEL}}") - - readarray -t LABELS <<< "$CHANGED_FILES" - LABELS+=("$SIZE_LABEL") - - echo "Adding label: ${LABELS[@]}" - for LABEL in "${LABELS[@]}"; do - curl -X POST \ - -H "$AUTH_HEADER" \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -d "{\"labels\":[\"$LABEL\"]}" \ - "$API_URL" >/dev/null - done - - echo "Deleting Labels:" - - for DELETE_LABEL in "${DELETE_LABELS[@]}"; do - ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') - curl -X DELETE \ - -H "Accept: application/vnd.github+json" \ - -H "$AUTH_HEADER" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "$API_URL/$ENCODED_LABEL" >/dev/null - done + git fetch origin $BASE_SHA + chmod a+x .github/workflows/get_changes.sh + .github/workflows/get_changes.sh env: + BASE_SHA: ${{ github.base_ref }} + PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + API_URL: "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" + MINIMAL: 'v: minimal' + SMALL: 'v: small' + MODERATE: 'v: moderate' + LARGE: 'v: large' SMALL_THRESHOLD: ${{ vars.SMALL_THRESHOLD }} MODERATE_THRESHOLD: ${{ vars.MODERATE_THRESHOLD }} - LARGE_THRESHOLD: ${{ vars.LARGE_THRESHOLD }} + LARGE_THRESHOLD: ${{ vars.LARGE_THRESHOLD }} \ No newline at end of file From d969885c8d473a5ec98b89fc9be3bcd827aecee7 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 4 Apr 2024 20:10:58 +0200 Subject: [PATCH 085/183] be more specific also for ore polynomials, adapt doctests --- src/sage/categories/action.pyx | 4 ++-- src/sage/categories/map.pyx | 2 +- src/sage/categories/modules_with_basis.py | 2 +- .../dynamics/arithmetic_dynamics/dynamical_semigroup.py | 2 +- src/sage/matrix/matrix1.pyx | 2 +- src/sage/rings/polynomial/ore_polynomial_element.pyx | 4 ++-- src/sage/rings/polynomial/polynomial_element.pyx | 8 ++++---- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sage/categories/action.pyx b/src/sage/categories/action.pyx index 3b3ba9d463b..9a9f9c45668 100644 --- a/src/sage/categories/action.pyx +++ b/src/sage/categories/action.pyx @@ -148,7 +148,7 @@ cdef class Action(Functor): sage: A(x, 5) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: x sage: A = IntegerMulAction(ZZ, R, False) # Right action sage: A(x, 5) 5*x @@ -157,7 +157,7 @@ cdef class Action(Functor): sage: A(5, x) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: x """ if len(args) == 2: # Normal case, called with (g, x) or (x, g) as arguments diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index 29613f16285..e687cad229b 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -2087,7 +2087,7 @@ cdef class FormalCompositeMap(Map): sage: ZZ(3*x + 45) # indirect doctest Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: 3*x + 45 """ sections = [] for m in reversed(list(self)): diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index e1fa796ba3b..4d9049e1894 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -1332,7 +1332,7 @@ def _from_dict(self, d, coerce=True, remove_zeros=True): sage: A._from_dict(d, coerce=True) # needs sage.modules Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: y """ R = self.base_ring() B = self.basis() diff --git a/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py b/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py index ebb8702a7db..a12c2d257fb 100644 --- a/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +++ b/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py @@ -697,7 +697,7 @@ def orbit(self, p, n): sage: d.orbit(2, x) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: x :: diff --git a/src/sage/matrix/matrix1.pyx b/src/sage/matrix/matrix1.pyx index b15eb21da77..e13114eb849 100644 --- a/src/sage/matrix/matrix1.pyx +++ b/src/sage/matrix/matrix1.pyx @@ -1925,7 +1925,7 @@ cdef class Matrix(Matrix0): sage: D = A.augment(B) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: y sage: E = A.change_ring(R) sage: F = E.augment(B); F diff --git a/src/sage/rings/polynomial/ore_polynomial_element.pyx b/src/sage/rings/polynomial/ore_polynomial_element.pyx index 86c2a057353..d5c429b4d8e 100644 --- a/src/sage/rings/polynomial/ore_polynomial_element.pyx +++ b/src/sage/rings/polynomial/ore_polynomial_element.pyx @@ -3010,7 +3010,7 @@ cdef class ConstantOrePolynomialSection(Map): sage: m(S([0,1])-S([0,t])) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: (-t + 1)*x """ if x.degree() <= 0: try: @@ -3018,7 +3018,7 @@ cdef class ConstantOrePolynomialSection(Map): except AttributeError: return ((x).constant_coefficient()) else: - raise TypeError("not a constant polynomial") + raise TypeError(f"not a constant polynomial: {x}") cdef class OrePolynomialBaseringInjection(Morphism): diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 8b58e403d3d..7c5646aa267 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -1476,7 +1476,7 @@ cdef class Polynomial(CommutativePolynomial): sage: QQ(3*x + 45) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: 3*x + 45 """ return self._scalar_conversion(sage.rings.rational.Rational) @@ -12894,7 +12894,7 @@ cdef class ConstantPolynomialSection(Map): sage: phi(y_1) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: y_1 """ cpdef Element _call_(self, x) noexcept: """ @@ -12913,7 +12913,7 @@ cdef class ConstantPolynomialSection(Map): sage: m(x) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: x """ if x.degree() <= 0: try: @@ -12921,7 +12921,7 @@ cdef class ConstantPolynomialSection(Map): except AttributeError: return ((x).constant_coefficient()) else: - raise TypeError("not a constant polynomial") + raise TypeError(f"not a constant polynomial: {x}") cdef class PolynomialBaseringInjection(Morphism): """ diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 9a0384c643b..0f588b48d89 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -99,7 +99,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): sage: R([3,x]) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: x Check that NTL contexts are correctly restored and that :issue:`9524` has been fixed:: From 14045bf73ae13f871812a5ca47b080f2a3e64c3a Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 5 Apr 2024 01:11:17 +0200 Subject: [PATCH 086/183] fix doctest --- src/doc/en/thematic_tutorials/coercion_and_categories.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/en/thematic_tutorials/coercion_and_categories.rst b/src/doc/en/thematic_tutorials/coercion_and_categories.rst index edd89ad3c42..f6cb67993ac 100644 --- a/src/doc/en/thematic_tutorials/coercion_and_categories.rst +++ b/src/doc/en/thematic_tutorials/coercion_and_categories.rst @@ -837,7 +837,7 @@ The four axioms requested for coercions sage: ZZ(P2.gen(1)) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: not a constant polynomial: v Hence, we only have a *partial* map. This is fine for a *conversion*, but a partial map does not qualify as a *coercion*. From 5e0ba2b2bc8b816537b95a2663160a17ca193259 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 5 Apr 2024 15:30:12 +0200 Subject: [PATCH 087/183] improve error message --- src/doc/en/thematic_tutorials/coercion_and_categories.rst | 2 +- src/sage/categories/action.pyx | 4 ++-- src/sage/categories/map.pyx | 2 +- src/sage/categories/modules_with_basis.py | 2 +- .../dynamics/arithmetic_dynamics/dynamical_semigroup.py | 2 +- src/sage/matrix/matrix1.pyx | 2 +- src/sage/rings/polynomial/ore_function_element.py | 4 ++-- src/sage/rings/polynomial/ore_polynomial_element.pyx | 4 ++-- src/sage/rings/polynomial/polynomial_element.pyx | 8 ++++---- src/sage/rings/polynomial/polynomial_zz_pex.pyx | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/doc/en/thematic_tutorials/coercion_and_categories.rst b/src/doc/en/thematic_tutorials/coercion_and_categories.rst index f6cb67993ac..afa83bfa754 100644 --- a/src/doc/en/thematic_tutorials/coercion_and_categories.rst +++ b/src/doc/en/thematic_tutorials/coercion_and_categories.rst @@ -837,7 +837,7 @@ The four axioms requested for coercions sage: ZZ(P2.gen(1)) Traceback (most recent call last): ... - TypeError: not a constant polynomial: v + TypeError: v is not a constant polynomial Hence, we only have a *partial* map. This is fine for a *conversion*, but a partial map does not qualify as a *coercion*. diff --git a/src/sage/categories/action.pyx b/src/sage/categories/action.pyx index 9a9f9c45668..4a026093411 100644 --- a/src/sage/categories/action.pyx +++ b/src/sage/categories/action.pyx @@ -148,7 +148,7 @@ cdef class Action(Functor): sage: A(x, 5) Traceback (most recent call last): ... - TypeError: not a constant polynomial: x + TypeError: x is not a constant polynomial sage: A = IntegerMulAction(ZZ, R, False) # Right action sage: A(x, 5) 5*x @@ -157,7 +157,7 @@ cdef class Action(Functor): sage: A(5, x) Traceback (most recent call last): ... - TypeError: not a constant polynomial: x + TypeError: x is not a constant polynomial """ if len(args) == 2: # Normal case, called with (g, x) or (x, g) as arguments diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index e687cad229b..439c7cf0ac9 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -2087,7 +2087,7 @@ cdef class FormalCompositeMap(Map): sage: ZZ(3*x + 45) # indirect doctest Traceback (most recent call last): ... - TypeError: not a constant polynomial: 3*x + 45 + TypeError: 3*x + 45 is not a constant polynomial """ sections = [] for m in reversed(list(self)): diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 4d9049e1894..fda93510d07 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -1332,7 +1332,7 @@ def _from_dict(self, d, coerce=True, remove_zeros=True): sage: A._from_dict(d, coerce=True) # needs sage.modules Traceback (most recent call last): ... - TypeError: not a constant polynomial: y + TypeError: y is not a constant polynomial """ R = self.base_ring() B = self.basis() diff --git a/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py b/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py index a12c2d257fb..93c402d4695 100644 --- a/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +++ b/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py @@ -697,7 +697,7 @@ def orbit(self, p, n): sage: d.orbit(2, x) Traceback (most recent call last): ... - TypeError: not a constant polynomial: x + TypeError: x is not a constant polynomial :: diff --git a/src/sage/matrix/matrix1.pyx b/src/sage/matrix/matrix1.pyx index e13114eb849..231b6f50333 100644 --- a/src/sage/matrix/matrix1.pyx +++ b/src/sage/matrix/matrix1.pyx @@ -1925,7 +1925,7 @@ cdef class Matrix(Matrix0): sage: D = A.augment(B) Traceback (most recent call last): ... - TypeError: not a constant polynomial: y + TypeError: y is not a constant polynomial sage: E = A.change_ring(R) sage: F = E.augment(B); F diff --git a/src/sage/rings/polynomial/ore_function_element.py b/src/sage/rings/polynomial/ore_function_element.py index f44dd8ad880..0c1a919351f 100644 --- a/src/sage/rings/polynomial/ore_function_element.py +++ b/src/sage/rings/polynomial/ore_function_element.py @@ -708,13 +708,13 @@ def _call_(self, x): sage: F(g) # needs sage.rings.function_field Traceback (most recent call last): ... - TypeError: not a constant function + TypeError: (x + t^2)^(-1) * x is not a constant function """ numerator = x._numerator denominator = x._denominator if numerator.degree() == denominator.degree() and denominator.right_divides(numerator): return numerator.leading_coefficient() / denominator.leading_coefficient() - raise TypeError("not a constant function") + raise TypeError(f"{x} is not a constant function") class OreFunctionBaseringInjection(Morphism): r""" diff --git a/src/sage/rings/polynomial/ore_polynomial_element.pyx b/src/sage/rings/polynomial/ore_polynomial_element.pyx index d5c429b4d8e..00fa90f2d11 100644 --- a/src/sage/rings/polynomial/ore_polynomial_element.pyx +++ b/src/sage/rings/polynomial/ore_polynomial_element.pyx @@ -3010,7 +3010,7 @@ cdef class ConstantOrePolynomialSection(Map): sage: m(S([0,1])-S([0,t])) Traceback (most recent call last): ... - TypeError: not a constant polynomial: (-t + 1)*x + TypeError: (-t + 1)*x is not a constant polynomial """ if x.degree() <= 0: try: @@ -3018,7 +3018,7 @@ cdef class ConstantOrePolynomialSection(Map): except AttributeError: return ((x).constant_coefficient()) else: - raise TypeError(f"not a constant polynomial: {x}") + raise TypeError(f"{x} is not a constant polynomial") cdef class OrePolynomialBaseringInjection(Morphism): diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 7c5646aa267..d2b8159696e 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -1476,7 +1476,7 @@ cdef class Polynomial(CommutativePolynomial): sage: QQ(3*x + 45) Traceback (most recent call last): ... - TypeError: not a constant polynomial: 3*x + 45 + TypeError: 3*x + 45 is not a constant polynomial """ return self._scalar_conversion(sage.rings.rational.Rational) @@ -12894,7 +12894,7 @@ cdef class ConstantPolynomialSection(Map): sage: phi(y_1) Traceback (most recent call last): ... - TypeError: not a constant polynomial: y_1 + TypeError: y_1 is not a constant polynomial """ cpdef Element _call_(self, x) noexcept: """ @@ -12913,7 +12913,7 @@ cdef class ConstantPolynomialSection(Map): sage: m(x) Traceback (most recent call last): ... - TypeError: not a constant polynomial: x + TypeError: x is not a constant polynomial """ if x.degree() <= 0: try: @@ -12921,7 +12921,7 @@ cdef class ConstantPolynomialSection(Map): except AttributeError: return ((x).constant_coefficient()) else: - raise TypeError(f"not a constant polynomial: {x}") + raise TypeError(f"{x} is not a constant polynomial") cdef class PolynomialBaseringInjection(Morphism): """ diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 0f588b48d89..e7ad9e35686 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -99,7 +99,7 @@ cdef class Polynomial_ZZ_pEX(Polynomial_template): sage: R([3,x]) Traceback (most recent call last): ... - TypeError: not a constant polynomial: x + TypeError: x is not a constant polynomial Check that NTL contexts are correctly restored and that :issue:`9524` has been fixed:: From b6ecf3ce5ecbbc71bbc6699b5a8a4ccfc1879964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Fri, 5 Apr 2024 16:33:45 -0700 Subject: [PATCH 088/183] Apply suggestions from code review Co-authored-by: Sebastian A. Spindler <153911337+S17A05@users.noreply.github.com> --- src/sage/modular/hypergeometric_motive.py | 2 +- src/sage/modular/modsym/p1list_nf.py | 14 +++++++------- src/sage/modular/overconvergent/genus0.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sage/modular/hypergeometric_motive.py b/src/sage/modular/hypergeometric_motive.py index 111c93ff07f..bcb719fef9b 100644 --- a/src/sage/modular/hypergeometric_motive.py +++ b/src/sage/modular/hypergeometric_motive.py @@ -1468,7 +1468,7 @@ def H_value(self, p, f, t, ring=None): .. WARNING:: This is apparently working correctly as can be tested - using ``ComplexField(70)`` as value ring. + using ``ComplexField(70)`` as the value ring. Using instead :class:`UniversalCyclotomicfield`, this is much slower than the `p`-adic version :meth:`padic_H_value`. diff --git a/src/sage/modular/modsym/p1list_nf.py b/src/sage/modular/modsym/p1list_nf.py index 29b5c087642..edb8248b6da 100644 --- a/src/sage/modular/modsym/p1list_nf.py +++ b/src/sage/modular/modsym/p1list_nf.py @@ -128,10 +128,10 @@ class MSymbol(SageObject): level N. - ``d`` -- (optional) when present, it must be an integral element such - that `\la c\ra + \la d\ra + N = R, where `R` is the corresponding ring of integers. + that `\langle c\rangle + \langle d\rangle + N = R`, where `R` is the corresponding ring of integers. - ``check`` -- bool (default ``True``). If ``check=False`` the constructor does - not check the condition `\la c\ra + \la d\ra + N = R`. + not check the condition `\langle c\rangle + \langle d\rangle + N = R`. OUTPUT: @@ -154,7 +154,7 @@ class MSymbol(SageObject): sage: MSymbol(N, (1, 0)) M-symbol (1: 0) of level Fractional ideal (2, a + 1) - We get an error if `\la c\ra`, `\la d\ra` and `N` are not coprime: + We get an error if `\langle c\rangle`, `\langle d\rangle` and `N` are not coprime: :: @@ -916,7 +916,7 @@ def apply_TS(self, i): def apply_T_alpha(self, i, alpha=1): r""" - Applies the matrix `T_alpha` = [1, alpha, 0, 1] to the `i`-th M-Symbol of + Applies the matrix `T_{alpha}` = [1, `alpha`, 0, 1] to the `i`-th M-Symbol of the list. INPUT: @@ -928,7 +928,7 @@ def apply_T_alpha(self, i, alpha=1): OUTPUT: integer -- the index of the M-Symbol obtained by the right action of - the matrix `T_alpha` = [1, `alpha`, 0, 1] on the i-th M-Symbol. + the matrix `T_{alpha}` = [1, `alpha`, 0, 1] on the i-th M-Symbol. EXAMPLES:: @@ -1164,7 +1164,7 @@ def lift_to_sl2_Ok(N, c, d): def make_coprime(N, c, d): r""" Return (c, d') so d' is congruent to d modulo N, and such that c and d' are - coprime (`\la c\ra + \la d'\ra = R`). + coprime (`\langle c\rangle + \langle d'\rangle = R`). INPUT: @@ -1177,7 +1177,7 @@ def make_coprime(N, c, d): OUTPUT: A pair `(c, d')` where `c`, `d'` are integral elements of the corresponding - number field, with `d'` congruent to `d` mod `N`, and such that `\la c\ra + \la d'\ra = R` + number field, with `d'` congruent to `d` mod `N`, and such that `\langle c\rangle + \langle d'\rangle = R` (`R` being the corresponding ring of integers). EXAMPLES:: diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index fef0f95983a..2d8a1f64532 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -1734,7 +1734,7 @@ def base_extend(self, R): def __pari__(self): r""" Return the Pari object corresponding to ``self``, which is just the - `q`-expansion of self as a formal power series. + `q`-expansion of ``self`` as a formal power series. EXAMPLES:: From 00c0c70dd0861184efdb4f9a51031226bbf77abf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 17:08:37 -0700 Subject: [PATCH 089/183] src/sage/modular/overconvergent/genus0.py: More docstring/doctest cosmetics --- src/sage/modular/overconvergent/genus0.py | 246 +++++++++++++++------- 1 file changed, 175 insertions(+), 71 deletions(-) diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index 2d8a1f64532..50da43a3e08 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -116,7 +116,7 @@ :: - sage: M.hecke_matrix(3, 4).change_ring(Qp(3,prec=1)) + sage: M.hecke_matrix(3, 4).change_ring(Qp(3, prec=1)) [ 1 + O(3) 0 0 0] [ 0 2*3^3 + O(3^4) 2*3^3 + O(3^4) 3^2 + O(3^3)] [ 0 2*3^7 + O(3^8) 2*3^8 + O(3^9) 3^6 + O(3^7)] @@ -130,10 +130,25 @@ sage: efuncs = M.eigenfunctions(4) sage: for i in [1..3]: - ....: print(efuncs[i].q_expansion(prec=4).change_ring(Qp(3,prec=20))) - (1 + O(3^20))*q + (2*3 + 3^15 + 3^16 + 3^17 + 2*3^19 + 2*3^20 + O(3^21))*q^2 + (2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + 2*3^10 + 2*3^11 + 2*3^12 + 2*3^13 + 2*3^14 + 2*3^15 + 2*3^16 + 3^17 + 2*3^18 + 2*3^19 + 3^21 + 3^22 + O(3^23))*q^3 + O(q^4) - (1 + O(3^20))*q + (3 + 2*3^2 + 3^3 + 3^4 + 3^12 + 3^13 + 2*3^14 + 3^15 + 2*3^17 + 3^18 + 3^19 + 3^20 + O(3^21))*q^2 + (3^7 + 3^13 + 2*3^14 + 2*3^15 + 3^16 + 3^17 + 2*3^18 + 3^20 + 2*3^21 + 2*3^22 + 2*3^23 + 2*3^25 + O(3^27))*q^3 + O(q^4) - (1 + O(3^20))*q + (2*3 + 3^3 + 2*3^4 + 3^6 + 2*3^8 + 3^9 + 3^10 + 2*3^11 + 2*3^13 + 3^16 + 3^18 + 3^19 + 3^20 + O(3^21))*q^2 + (3^9 + 2*3^12 + 3^15 + 3^17 + 3^18 + 3^19 + 3^20 + 2*3^22 + 2*3^23 + 2*3^27 + 2*3^28 + O(3^29))*q^3 + O(q^4) + ....: print(efuncs[i].q_expansion(prec=4).change_ring(Qp(3, prec=20))) + (1 + O(3^20))*q + + (2*3 + 3^15 + 3^16 + 3^17 + 2*3^19 + 2*3^20 + O(3^21))*q^2 + + (2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + + 2*3^10 + 2*3^11 + 2*3^12 + 2*3^13 + 2*3^14 + 2*3^15 + + 2*3^16 + 3^17 + 2*3^18 + 2*3^19 + 3^21 + 3^22 + O(3^23))*q^3 + + O(q^4) + (1 + O(3^20))*q + + (3 + 2*3^2 + 3^3 + 3^4 + 3^12 + 3^13 + 2*3^14 + + 3^15 + 2*3^17 + 3^18 + 3^19 + 3^20 + O(3^21))*q^2 + + (3^7 + 3^13 + 2*3^14 + 2*3^15 + 3^16 + 3^17 + 2*3^18 + + 3^20 + 2*3^21 + 2*3^22 + 2*3^23 + 2*3^25 + O(3^27))*q^3 + + O(q^4) + (1 + O(3^20))*q + + (2*3 + 3^3 + 2*3^4 + 3^6 + 2*3^8 + 3^9 + 3^10 + + 2*3^11 + 2*3^13 + 3^16 + 3^18 + 3^19 + 3^20 + O(3^21))*q^2 + + (3^9 + 2*3^12 + 3^15 + 3^17 + 3^18 + 3^19 + 3^20 + + 2*3^22 + 2*3^23 + 2*3^27 + 2*3^28 + O(3^29))*q^3 + + O(q^4) The first eigenfunction is a classical cusp form of level 3: @@ -163,7 +178,12 @@ :: sage: a3 = efuncs[3].q_expansion()[3]; a3 - 3^9 + 2*3^12 + 3^15 + 3^17 + 3^18 + 3^19 + 3^20 + 2*3^22 + 2*3^23 + 2*3^27 + 2*3^28 + 3^32 + 3^33 + 2*3^34 + 3^38 + 2*3^39 + 3^40 + 2*3^41 + 3^44 + 3^45 + 3^46 + 2*3^47 + 2*3^48 + 3^49 + 3^50 + 2*3^51 + 2*3^52 + 3^53 + 2*3^54 + 3^55 + 3^56 + 3^57 + 2*3^58 + 2*3^59 + 3^60 + 2*3^61 + 2*3^63 + 2*3^64 + 3^65 + 2*3^67 + 3^68 + 2*3^69 + 2*3^71 + 3^72 + 2*3^74 + 3^75 + 3^76 + 3^79 + 3^80 + 2*3^83 + 2*3^84 + 3^85 + 2*3^87 + 3^88 + 2*3^89 + 2*3^90 + 2*3^91 + 3^92 + O(3^98) + 3^9 + 2*3^12 + 3^15 + 3^17 + 3^18 + 3^19 + 3^20 + 2*3^22 + 2*3^23 + 2*3^27 + + 2*3^28 + 3^32 + 3^33 + 2*3^34 + 3^38 + 2*3^39 + 3^40 + 2*3^41 + 3^44 + 3^45 + + 3^46 + 2*3^47 + 2*3^48 + 3^49 + 3^50 + 2*3^51 + 2*3^52 + 3^53 + 2*3^54 + 3^55 + + 3^56 + 3^57 + 2*3^58 + 2*3^59 + 3^60 + 2*3^61 + 2*3^63 + 2*3^64 + 3^65 + 2*3^67 + + 3^68 + 2*3^69 + 2*3^71 + 3^72 + 2*3^74 + 3^75 + 3^76 + 3^79 + 3^80 + 2*3^83 + + 2*3^84 + 3^85 + 2*3^87 + 3^88 + 2*3^89 + 2*3^90 + 2*3^91 + 3^92 + O(3^98) sage: efuncs[3].slope() 9 """ @@ -410,9 +430,11 @@ def _set_radius(self, radius): def is_exact(self): r""" - True if elements of this space are represented exactly, i.e., there is - no precision loss when doing arithmetic. As this is never true for - overconvergent modular forms spaces, this returns ``False``. + Return ``True`` if elements of this space are represented exactly. + + This would mean that there is no precision loss when doing arithmetic. + As this is never true for overconvergent modular forms spaces, + this method returns ``False``. EXAMPLES:: @@ -473,9 +495,11 @@ def _an_element_(self): def character(self): r""" - Return the character of ``self``. For overconvergent forms, the weight and - the character are unified into the concept of a weight-character, so - this returns exactly the same thing as ``self.weight()``. + Return the character of ``self``. + + For overconvergent forms, the weight and the character are unified into + the concept of a weight-character, so this returns exactly the same + thing as :meth:`weight`. EXAMPLES:: @@ -490,9 +514,11 @@ def character(self): def weight(self): r""" - Return the character of ``self``. For overconvergent forms, the weight and - the character are unified into the concept of a weight-character, so - this returns exactly the same thing as ``self.character()``. + Return the weight of ``self``. + + For overconvergent forms, the weight and the character are unified into + the concept of a weight-character, so this returns exactly the same + thing as :meth:`character`. EXAMPLES:: @@ -507,6 +533,8 @@ def weight(self): def normalising_factor(self): r""" + Return the normalising factor of ``self``. + The normalising factor `c` such that `g = c f` is a parameter for the `r`-overconvergent disc in `X_0(p)`, where `f` is the standard uniformiser. @@ -550,7 +578,7 @@ def __ne__(self, other): True sage: OverconvergentModularForms(3, 0, 1/2) != OverconvergentModularForms(3, 0, 1/3) True - sage: OverconvergentModularForms(3, 0, 1/2) != OverconvergentModularForms(3, 0, 1/2, base_ring = Qp(3)) + sage: OverconvergentModularForms(3, 0, 1/2) != OverconvergentModularForms(3, 0, 1/2, base_ring=Qp(3)) True sage: OverconvergentModularForms(3, 0, 1/2) != OverconvergentModularForms(3, 0, 1/2) False @@ -594,7 +622,7 @@ def _params(self): def __reduce__(self): r""" - Return the function and arguments used to construct self. Used for pickling. + Return the function and arguments used to construct ``self``. Used for pickling. EXAMPLES:: @@ -634,7 +662,7 @@ def gen(self, i): def _repr_(self): r""" - Return a string representation of self. + Return a string representation of ``self``. EXAMPLES:: @@ -645,8 +673,9 @@ def _repr_(self): def prime(self): r""" - Return the residue characteristic of ``self``, i.e. the prime `p` such that - this is a `p`-adic space. + Return the residue characteristic of ``self``. + + This is the prime `p` such that this is a `p`-adic space. EXAMPLES:: @@ -689,14 +718,15 @@ def gens(self): def prec(self): r""" - Return the series precision of self. Note that this is different from - the `p`-adic precision of the base ring. + Return the series precision of ``self``. + + Note that this is different from the `p`-adic precision of the base ring. EXAMPLES:: sage: OverconvergentModularForms(3, 0, 1/2).prec() 20 - sage: OverconvergentModularForms(3, 0, 1/2,prec=40).prec() + sage: OverconvergentModularForms(3, 0, 1/2, prec=40).prec() 40 """ return self._prec @@ -715,7 +745,7 @@ def _element_constructor_(self, input): - arbitrary power series in `q` - lists of elements of the base ring (interpreted as vectors in the - basis given by self.gens()). + basis given by :meth:`gens`). Precision may be specified by padding lists at the end with zeros; inputs with a higher precision than the set precision of this space @@ -819,7 +849,7 @@ def zero(self): def _coerce_from_ocmf(self, f): r""" - Try to convert the overconvergent modular form `f` into an element of self. + Try to convert the overconvergent modular form `f` into an element of ``self``. An error will be raised if this is obviously nonsense. @@ -841,8 +871,9 @@ def _coerce_from_ocmf(self, f): def _coerce_map_from_(self, other): r""" - Canonical coercion of x into self. Here the possibilities for x are - more restricted. + Canonical coercion of ``x`` into ``self``. + + Here the possibilities for ``x`` are more restricted. TESTS:: @@ -865,6 +896,7 @@ def _coerce_map_from_(self, other): def coordinate_vector(self, x): r""" Write ``x`` as a vector with respect to the basis given by ``self.basis()``. + Here ``x`` must be an element of this space or something that can be converted into one. If ``x`` has precision less than the default precision of ``self``, then the returned vector will be shorter. @@ -922,9 +954,11 @@ def hecke_operator(self, f, m): sage: f = M.1 sage: M.hecke_operator(f, 3) 3-adic overconvergent modular form of weight-character 0 with q-expansion - 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + 52494114852*q^6 + O(q^7) + 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + + 52494114852*q^6 + O(q^7) sage: M.hecke_operator(f.q_expansion(), 3) - 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + 52494114852*q^6 + O(q^7) + 2430*q + 265356*q^2 + 10670373*q^3 + 249948828*q^4 + 4113612864*q^5 + + 52494114852*q^6 + O(q^7) """ # This should just be an instance of hecke_operator_on_qexp but that @@ -969,14 +1003,14 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): Calculate the matrix of the `T_m` operator in the basis of this space, truncated to an `n \times n` matrix. Conventions are that operators act on the left on column vectors (this is the opposite of the conventions - of the sage.modules.matrix_morphism class!) Uses naive `q`-expansion - arguments if use_recurrence=False and uses the Kolberg style - recurrences if use_recurrence=True. + of the :mod:`sage.modules.matrix_morphism` class!) Uses naive `q`-expansion + arguments if ``use_recurrence=False`` and uses the Kolberg style + recurrences if ``use_recurrence=True``. - The argument "exact_arith" causes the computation to be done with + The argument ``exact_arith`` causes the computation to be done with rational arithmetic, even if the base ring is an inexact `p`-adic ring. This is useful as there can be precision loss issues (particularly with - use_recurrence=False). + ``use_recurrence=False``). EXAMPLES:: @@ -1049,7 +1083,7 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): def slopes(self, n, use_recurrence=False): r""" - Compute the slopes of the `U_p` operator acting on self, using an `n\times n` matrix. + Compute the slopes of the `U_p` operator acting on ``self``, using an `n\times n` matrix. EXAMPLES:: @@ -1097,7 +1131,34 @@ def eigenfunctions(self, n, F=None, exact_arith=True): sage: X = OverconvergentModularForms(2, 2, 1/6).eigenfunctions(8, Qp(2, 100)) sage: X[1] 2-adic overconvergent modular form of weight-character 2 with q-expansion - (1 + O(2^74))*q + (2^4 + 2^5 + 2^9 + 2^10 + 2^12 + 2^13 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^28 + 2^30 + 2^31 + 2^32 + 2^34 + 2^36 + 2^37 + 2^39 + 2^40 + 2^43 + 2^44 + 2^45 + 2^47 + 2^48 + 2^52 + 2^53 + 2^54 + 2^55 + 2^56 + 2^58 + 2^59 + 2^60 + 2^61 + 2^67 + 2^68 + 2^70 + 2^71 + 2^72 + 2^74 + 2^76 + O(2^78))*q^2 + (2^2 + 2^7 + 2^8 + 2^9 + 2^12 + 2^13 + 2^16 + 2^17 + 2^21 + 2^23 + 2^25 + 2^28 + 2^33 + 2^34 + 2^36 + 2^37 + 2^42 + 2^45 + 2^47 + 2^49 + 2^50 + 2^51 + 2^54 + 2^55 + 2^58 + 2^60 + 2^61 + 2^67 + 2^71 + 2^72 + O(2^76))*q^3 + (2^8 + 2^11 + 2^14 + 2^19 + 2^21 + 2^22 + 2^24 + 2^25 + 2^26 + 2^27 + 2^28 + 2^29 + 2^32 + 2^33 + 2^35 + 2^36 + 2^44 + 2^45 + 2^46 + 2^47 + 2^49 + 2^50 + 2^53 + 2^54 + 2^55 + 2^56 + 2^57 + 2^60 + 2^63 + 2^66 + 2^67 + 2^69 + 2^74 + 2^76 + 2^79 + 2^80 + 2^81 + O(2^82))*q^4 + (2 + 2^2 + 2^9 + 2^13 + 2^15 + 2^17 + 2^19 + 2^21 + 2^23 + 2^26 + 2^27 + 2^28 + 2^30 + 2^33 + 2^34 + 2^35 + 2^36 + 2^37 + 2^38 + 2^39 + 2^41 + 2^42 + 2^43 + 2^45 + 2^58 + 2^59 + 2^60 + 2^61 + 2^62 + 2^63 + 2^65 + 2^66 + 2^68 + 2^69 + 2^71 + 2^72 + O(2^75))*q^5 + (2^6 + 2^7 + 2^15 + 2^16 + 2^21 + 2^24 + 2^25 + 2^28 + 2^29 + 2^33 + 2^34 + 2^37 + 2^44 + 2^45 + 2^48 + 2^50 + 2^51 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^64 + 2^69 + 2^71 + 2^73 + 2^75 + 2^78 + O(2^80))*q^6 + (2^3 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 2^14 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^25 + 2^26 + 2^34 + 2^37 + 2^38 + 2^39 + 2^40 + 2^41 + 2^45 + 2^47 + 2^49 + 2^51 + 2^53 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^61 + 2^66 + 2^69 + 2^70 + 2^71 + 2^74 + 2^76 + O(2^77))*q^7 + O(q^8) + (1 + O(2^74))*q + + (2^4 + 2^5 + 2^9 + 2^10 + 2^12 + 2^13 + 2^15 + 2^17 + 2^19 + 2^20 + + 2^21 + 2^23 + 2^28 + 2^30 + 2^31 + 2^32 + 2^34 + 2^36 + 2^37 + + 2^39 + 2^40 + 2^43 + 2^44 + 2^45 + 2^47 + 2^48 + 2^52 + 2^53 + + 2^54 + 2^55 + 2^56 + 2^58 + 2^59 + 2^60 + 2^61 + 2^67 + 2^68 + + 2^70 + 2^71 + 2^72 + 2^74 + 2^76 + O(2^78))*q^2 + + (2^2 + 2^7 + 2^8 + 2^9 + 2^12 + 2^13 + 2^16 + 2^17 + 2^21 + 2^23 + + 2^25 + 2^28 + 2^33 + 2^34 + 2^36 + 2^37 + 2^42 + 2^45 + 2^47 + + 2^49 + 2^50 + 2^51 + 2^54 + 2^55 + 2^58 + 2^60 + 2^61 + 2^67 + + 2^71 + 2^72 + O(2^76))*q^3 + + (2^8 + 2^11 + 2^14 + 2^19 + 2^21 + 2^22 + 2^24 + 2^25 + 2^26 + + 2^27 + 2^28 + 2^29 + 2^32 + 2^33 + 2^35 + 2^36 + 2^44 + 2^45 + + 2^46 + 2^47 + 2^49 + 2^50 + 2^53 + 2^54 + 2^55 + 2^56 + 2^57 + + 2^60 + 2^63 + 2^66 + 2^67 + 2^69 + 2^74 + 2^76 + 2^79 + 2^80 + + 2^81 + O(2^82))*q^4 + + (2 + 2^2 + 2^9 + 2^13 + 2^15 + 2^17 + 2^19 + 2^21 + 2^23 + 2^26 + + 2^27 + 2^28 + 2^30 + 2^33 + 2^34 + 2^35 + 2^36 + 2^37 + 2^38 + + 2^39 + 2^41 + 2^42 + 2^43 + 2^45 + 2^58 + 2^59 + 2^60 + 2^61 + + 2^62 + 2^63 + 2^65 + 2^66 + 2^68 + 2^69 + 2^71 + 2^72 + O(2^75))*q^5 + + (2^6 + 2^7 + 2^15 + 2^16 + 2^21 + 2^24 + 2^25 + 2^28 + 2^29 + 2^33 + + 2^34 + 2^37 + 2^44 + 2^45 + 2^48 + 2^50 + 2^51 + 2^54 + 2^55 + + 2^57 + 2^58 + 2^59 + 2^60 + 2^64 + 2^69 + 2^71 + 2^73 + 2^75 + + 2^78 + O(2^80))*q^6 + (2^3 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + + 2^14 + 2^15 + 2^17 + 2^19 + 2^20 + 2^21 + 2^23 + 2^25 + 2^26 + + 2^34 + 2^37 + 2^38 + 2^39 + 2^40 + 2^41 + 2^45 + 2^47 + 2^49 + + 2^51 + 2^53 + 2^54 + 2^55 + 2^57 + 2^58 + 2^59 + 2^60 + 2^61 + + 2^66 + 2^69 + 2^70 + 2^71 + 2^74 + 2^76 + O(2^77))*q^7 + + O(q^8) sage: [x.slope() for x in X] [0, 4, 8, 14, 16, 18, 26, 30] """ @@ -1278,9 +1339,24 @@ def cps_u(self, n, use_recurrence=False): EXAMPLES:: sage: OverconvergentModularForms(3, 16, 1/2, base_ring=Qp(3)).cps_u(4) - 1 + O(3^20) + (2 + 2*3 + 2*3^2 + 2*3^4 + 3^5 + 3^6 + 3^7 + 3^11 + 3^12 + 2*3^14 + 3^16 + 3^18 + O(3^19))*T + (2*3^3 + 3^5 + 3^6 + 3^7 + 2*3^8 + 2*3^9 + 2*3^10 + 3^11 + 3^12 + 2*3^13 + 2*3^16 + 2*3^18 + O(3^19))*T^2 + (2*3^15 + 2*3^16 + 2*3^19 + 2*3^20 + 2*3^21 + O(3^22))*T^3 + (3^17 + 2*3^18 + 3^19 + 3^20 + 3^22 + 2*3^23 + 2*3^25 + 3^26 + O(3^27))*T^4 + 1 + O(3^20) + + (2 + 2*3 + 2*3^2 + 2*3^4 + 3^5 + 3^6 + 3^7 + + 3^11 + 3^12 + 2*3^14 + 3^16 + 3^18 + O(3^19))*T + + (2*3^3 + 3^5 + 3^6 + 3^7 + 2*3^8 + 2*3^9 + 2*3^10 + + 3^11 + 3^12 + 2*3^13 + 2*3^16 + 2*3^18 + O(3^19))*T^2 + + (2*3^15 + 2*3^16 + 2*3^19 + 2*3^20 + 2*3^21 + O(3^22))*T^3 + + (3^17 + 2*3^18 + 3^19 + 3^20 + 3^22 + 2*3^23 + 2*3^25 + 3^26 + O(3^27))*T^4 sage: OverconvergentModularForms(3, 16, 1/2, base_ring=Qp(3), prec=30).cps_u(10) - 1 + O(3^20) + (2 + 2*3 + 2*3^2 + 2*3^4 + 3^5 + 3^6 + 3^7 + 2*3^15 + O(3^16))*T + (2*3^3 + 3^5 + 3^6 + 3^7 + 2*3^8 + 2*3^9 + 2*3^10 + 2*3^11 + 2*3^12 + 2*3^13 + 3^14 + 3^15 + O(3^16))*T^2 + (3^14 + 2*3^15 + 2*3^16 + 3^17 + 3^18 + O(3^19))*T^3 + (3^17 + 2*3^18 + 3^19 + 3^20 + 3^21 + O(3^24))*T^4 + (3^29 + 2*3^32 + O(3^33))*T^5 + (2*3^44 + O(3^45))*T^6 + (2*3^59 + O(3^60))*T^7 + (2*3^78 + O(3^79))*T^8 + 1 + O(3^20) + + (2 + 2*3 + 2*3^2 + 2*3^4 + 3^5 + 3^6 + 3^7 + 2*3^15 + O(3^16))*T + + (2*3^3 + 3^5 + 3^6 + 3^7 + 2*3^8 + 2*3^9 + 2*3^10 + + 2*3^11 + 2*3^12 + 2*3^13 + 3^14 + 3^15 + O(3^16))*T^2 + + (3^14 + 2*3^15 + 2*3^16 + 3^17 + 3^18 + O(3^19))*T^3 + + (3^17 + 2*3^18 + 3^19 + 3^20 + 3^21 + O(3^24))*T^4 + + (3^29 + 2*3^32 + O(3^33))*T^5 + + (2*3^44 + O(3^45))*T^6 + + (2*3^59 + O(3^60))*T^7 + + (2*3^78 + O(3^79))*T^8 .. NOTE:: @@ -1325,7 +1401,8 @@ def __init__(self, parent, gexp=None, qexp=None): EXAMPLES:: sage: OverconvergentModularForms(3, 2, 1/6,prec=5).an_element() # indirect doctest - 3-adic overconvergent modular form of weight-character 2 with q-expansion 3*q + 72*q^2 + 810*q^3 + 6096*q^4 + O(q^5) + 3-adic overconvergent modular form of weight-character 2 + with q-expansion 3*q + 72*q^2 + 810*q^3 + 6096*q^4 + O(q^5) """ ModuleElement.__init__(self, parent) @@ -1390,22 +1467,23 @@ def _rmul_(self, x): def prec(self): r""" - Return the series expansion precision of this overconvergent modular - form. (This is not the same as the `p`-adic precision of the - coefficients.) + Return the series expansion precision of this overconvergent modular form. + + This is not the same as the `p`-adic precision of the coefficients. EXAMPLES:: - sage: OverconvergentModularForms(5, 6, 1/3,prec=15).gen(1).prec() + sage: OverconvergentModularForms(5, 6, 1/3, prec=15).gen(1).prec() 15 """ return self.gexp().prec() def is_eigenform(self): r""" - Return True if this is an eigenform. At present this returns False - unless this element was explicitly flagged as an eigenform, using the - _notify_eigen function. + Return ``True`` if this is an eigenform. + + At present this returns ``False`` unless this element was explicitly + flagged as an eigenform, using the method :meth:`_notify_eigen`. EXAMPLES:: @@ -1420,9 +1498,12 @@ def is_eigenform(self): def slope(self): r""" - Return the slope of this eigenform, i.e. the valuation of its - `U_p`-eigenvalue. Raises an error unless this element was explicitly - flagged as an eigenform, using the _notify_eigen function. + Return the slope of this eigenform. + + This is the valuation of its `U_p`-eigenvalue. + + Raises an error unless this element was explicitly + flagged as an eigenform, using the method :meth:`_notify_eigen`. EXAMPLES:: @@ -1443,16 +1524,22 @@ def eigenvalue(self): r""" Return the `U_p`-eigenvalue of this eigenform. - This raises an error unless - this element was explicitly flagged as an eigenform, using the - _notify_eigen function. + This raises an error unless this element was explicitly flagged + as an eigenform, using the method :meth:`_notify_eigen`. EXAMPLES:: sage: M = OverconvergentModularForms(3, 0, 1/2) sage: f = M.eigenfunctions(3)[1] sage: f.eigenvalue() - 3^2 + 3^4 + 2*3^6 + 3^7 + 3^8 + 2*3^9 + 2*3^10 + 3^12 + 3^16 + 2*3^17 + 3^18 + 3^20 + 2*3^21 + 3^22 + 2*3^23 + 3^25 + 3^26 + 2*3^27 + 2*3^29 + 3^30 + 3^31 + 3^32 + 3^33 + 3^34 + 3^36 + 3^40 + 2*3^41 + 3^43 + 3^44 + 3^45 + 3^46 + 3^48 + 3^49 + 3^50 + 2*3^51 + 3^52 + 3^54 + 2*3^57 + 2*3^59 + 3^60 + 3^61 + 2*3^63 + 2*3^66 + 2*3^67 + 3^69 + 2*3^72 + 3^74 + 2*3^75 + 3^76 + 2*3^77 + 2*3^78 + 2*3^80 + 3^81 + 2*3^82 + 3^84 + 2*3^85 + 2*3^86 + 3^87 + 3^88 + 2*3^89 + 2*3^91 + 3^93 + 3^94 + 3^95 + 3^96 + 3^98 + 2*3^99 + O(3^100) + 3^2 + 3^4 + 2*3^6 + 3^7 + 3^8 + 2*3^9 + 2*3^10 + 3^12 + 3^16 + 2*3^17 + + 3^18 + 3^20 + 2*3^21 + 3^22 + 2*3^23 + 3^25 + 3^26 + 2*3^27 + 2*3^29 + + 3^30 + 3^31 + 3^32 + 3^33 + 3^34 + 3^36 + 3^40 + 2*3^41 + 3^43 + 3^44 + + 3^45 + 3^46 + 3^48 + 3^49 + 3^50 + 2*3^51 + 3^52 + 3^54 + 2*3^57 + + 2*3^59 + 3^60 + 3^61 + 2*3^63 + 2*3^66 + 2*3^67 + 3^69 + 2*3^72 + + 3^74 + 2*3^75 + 3^76 + 2*3^77 + 2*3^78 + 2*3^80 + 3^81 + 2*3^82 + + 3^84 + 2*3^85 + 2*3^86 + 3^87 + 3^88 + 2*3^89 + 2*3^91 + 3^93 + 3^94 + + 3^95 + 3^96 + 3^98 + 2*3^99 + O(3^100) sage: M.gen(4).eigenvalue() Traceback (most recent call last): ... @@ -1484,17 +1571,27 @@ def q_expansion(self, prec=None): def gexp(self): r""" - Return the formal power series in `g` corresponding to this - overconvergent modular form (so the result is `F` where this modular form - is `E_k^\ast \times F(g)`, where `g` is the appropriately normalised - parameter of `X_0(p)`). + Return the formal power series in `g` corresponding to ``self``. + + If this overconvergent modular form is `E_k^\ast \times F(g)` + where `g` is the appropriately normalised parameter of `X_0(p)`, + the result is `F`. EXAMPLES:: sage: M = OverconvergentModularForms(3, 0, 1/2) sage: f = M.eigenfunctions(3)[1] sage: f.gexp() - (3^-3 + O(3^95))*g + (3^-1 + 1 + 2*3 + 3^2 + 2*3^3 + 3^5 + 3^7 + 3^10 + 3^11 + 3^14 + 3^15 + 3^16 + 2*3^19 + 3^21 + 3^22 + 2*3^23 + 2*3^24 + 3^26 + 2*3^27 + 3^29 + 3^31 + 3^34 + 2*3^35 + 2*3^36 + 3^38 + 2*3^39 + 3^41 + 2*3^42 + 2*3^43 + 2*3^44 + 2*3^46 + 2*3^47 + 3^48 + 2*3^49 + 2*3^50 + 3^51 + 2*3^54 + 2*3^55 + 2*3^56 + 3^57 + 2*3^58 + 2*3^59 + 2*3^60 + 3^61 + 3^62 + 3^63 + 3^64 + 2*3^65 + 3^67 + 3^68 + 2*3^69 + 3^70 + 2*3^71 + 2*3^74 + 3^76 + 2*3^77 + 3^78 + 2*3^79 + 2*3^80 + 3^84 + 2*3^85 + 2*3^86 + 3^88 + 2*3^89 + 3^91 + 3^92 + 2*3^94 + 3^95 + O(3^97))*g^2 + O(g^3) + (3^-3 + O(3^95))*g + + (3^-1 + 1 + 2*3 + 3^2 + 2*3^3 + 3^5 + 3^7 + 3^10 + 3^11 + 3^14 + 3^15 + + 3^16 + 2*3^19 + 3^21 + 3^22 + 2*3^23 + 2*3^24 + 3^26 + 2*3^27 + + 3^29 + 3^31 + 3^34 + 2*3^35 + 2*3^36 + 3^38 + 2*3^39 + 3^41 + 2*3^42 + + 2*3^43 + 2*3^44 + 2*3^46 + 2*3^47 + 3^48 + 2*3^49 + 2*3^50 + 3^51 + + 2*3^54 + 2*3^55 + 2*3^56 + 3^57 + 2*3^58 + 2*3^59 + 2*3^60 + 3^61 + + 3^62 + 3^63 + 3^64 + 2*3^65 + 3^67 + 3^68 + 2*3^69 + 3^70 + 2*3^71 + + 2*3^74 + 3^76 + 2*3^77 + 3^78 + 2*3^79 + 2*3^80 + 3^84 + 2*3^85 + + 2*3^86 + 3^88 + 2*3^89 + 3^91 + 3^92 + 2*3^94 + 3^95 + O(3^97))*g^2 + + O(g^3) """ return self._gexp @@ -1535,11 +1632,13 @@ def prime(self): def _notify_eigen(self, eigenvalue): """ - Flags this element as an eigenform. It then remembers some extra data. + Flag this element as an eigenform. + + It then remembers some extra data. EXAMPLES:: - sage: OverconvergentModularForms(3, 16, 1/3).eigenfunctions(4) # indirect doctest + sage: OverconvergentModularForms(3, 16, 1/3).eigenfunctions(4) # indirect doctest [...] """ self._is_eigen = True @@ -1548,9 +1647,10 @@ def _notify_eigen(self, eigenvalue): def is_integral(self): r""" - Test whether or not this element has `q`-expansion coefficients that - are `p`-adically integral. This should always be the case with eigenfunctions, but sometimes - if n is very large this breaks down for unknown reasons! + Test whether this element has `q`-expansion coefficients that are `p`-adically integral. + + This should always be the case with eigenfunctions, but sometimes + if `n` is very large this breaks down for unknown reasons! EXAMPLES:: @@ -1580,7 +1680,7 @@ def _repr_(self) -> str: def _richcmp_(self, other, op): r""" - Compare self to other. + Compare ``self`` to ``other``. EXAMPLES:: @@ -1594,7 +1694,7 @@ def _richcmp_(self, other, op): def r_ord(self, r): r""" - The `p`-adic valuation of the norm of self on the `r`-overconvergent region. + The `p`-adic valuation of the norm of ``self`` on the `r`-overconvergent region. EXAMPLES:: @@ -1620,8 +1720,9 @@ def r_ord(self, r): def valuation(self): r""" - Return the `p`-adic valuation of this form (i.e. the minimum of the - `p`-adic valuations of its coordinates). + Return the `p`-adic valuation of this form. + + This is the minimum of the `p`-adic valuations of its coordinates. EXAMPLES:: @@ -1695,8 +1796,10 @@ def weight(self): def additive_order(self): r""" - Return the additive order of this element (required attribute for all - elements deriving from :class:`sage.modules.ModuleElement`). + Return the additive order of this element. + + This implements a required method for all + elements deriving from :class:`sage.modules.ModuleElement`. EXAMPLES:: @@ -1733,8 +1836,9 @@ def base_extend(self, R): def __pari__(self): r""" - Return the Pari object corresponding to ``self``, which is just the - `q`-expansion of ``self`` as a formal power series. + Return the Pari object corresponding to ``self``. + + This is just the `q`-expansion of ``self`` as a formal power series. EXAMPLES:: From 737807e9ecf826e52574d0bd377b1cffafeac54c Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Sat, 6 Apr 2024 18:29:46 +0200 Subject: [PATCH 090/183] Implemented reviewer feedback --- .../algebras/quatalg/quaternion_algebra.py | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index f3f315e1f80..1e230f1a5e4 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -687,7 +687,7 @@ def __init__(self, base_ring, a, b, names='i,j,k'): self._gens = (self([0, 1, 0, 0]), self([0, 0, 1, 0]), self([0, 0, 0, 1])) @cached_method - def maximal_order(self, order_basis=None, take_shortcuts=True): + def maximal_order(self, take_shortcuts=True, order_basis=None): r""" Return a maximal order in this quaternion algebra. @@ -795,12 +795,11 @@ def maximal_order(self, order_basis=None, take_shortcuts=True): ....: (-511, 608), (493, 880), (105, -709), (-213, 530), ....: (97, 745)] sage: all(QuaternionAlgebra(a, b).maximal_order().is_maximal() - ....: for (a, b) in invars) + ....: for (a, b) in invars) True """ if self.base_ring() != QQ: - raise NotImplementedError("maximal order only implemented for" - " rational quaternion algebras") + raise NotImplementedError("maximal order only implemented for rational quaternion algebras") d_A = self.discriminant() @@ -1648,7 +1647,7 @@ def gen(self, n): def __eq__(self, other): """ - Compare orders self and other. + Compare orders ``self`` and ``other``. EXAMPLES:: @@ -1674,7 +1673,7 @@ def __eq__(self, other): def __ne__(self, other): """ - Compare orders self and other. + Compare orders ``self`` and ``other``. Two orders are equal if they have the same basis and are in the same quaternion algebra. @@ -1691,7 +1690,7 @@ def __ne__(self, other): def __le__(self, other): """ - Compare orders self and other. + Compare orders ``self`` and ``other``. EXAMPLES:: @@ -1709,7 +1708,7 @@ def __le__(self, other): def __lt__(self, other): """ - Compare orders self and other. + Compare orders ``self`` and ``other``. EXAMPLES:: @@ -1725,7 +1724,7 @@ def __lt__(self, other): def __ge__(self, other): """ - Compare orders self and other. + Compare orders ``self`` and ``other``. EXAMPLES:: @@ -1743,7 +1742,7 @@ def __ge__(self, other): def __gt__(self, other): """ - Compare orders self and other. + Compare orders ``self`` and ``other``. EXAMPLES:: @@ -3711,7 +3710,9 @@ def normalize_basis_at_p(e, p, B=QuaternionAlgebraElement_abstract.pair): # Ensures that (B(f0,f0)/2).valuation(p) <= B(f0,f1).valuation(p) if B(f0, f1).valuation(p) + 1 < B(f0, f0).valuation(p): - f0, f1 = f0 + f1, f0 + g = f0 + f0 += f1 + f1 = g # Make remaining vectors orthogonal to span of f0, f1 e[min_m] = e[0] From eef4b409963bb1e561841f9405415e2cd505db2d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Apr 2024 11:30:52 -0700 Subject: [PATCH 091/183] src/sage/modular/overconvergent/genus0.py: Fix latex for dagger --- src/sage/modular/overconvergent/genus0.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index 50da43a3e08..b7626ce2683 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -39,7 +39,7 @@ (This is Theorem 1 of [Loe2007]_.) Hence if we fix an element `c` with `|c| = p^{-\frac{12r}{p-1}}`, the space -`S_k^\dag(1, r)` of overconvergent `p`-adic modular forms has an orthonormal +`S_k^\dagger(1, r)` of overconvergent `p`-adic modular forms has an orthonormal basis given by the functions `(cf)^n`. So any element can be written in the form `E_k \times \sum_{n \ge 0} a_n (cf)^n`, where `a_n \to 0` as `N \to \infty`, and any such sequence `a_n` defines a unique overconvergent form. From 007ed6633a079e31e656b8a0e6e2edc7f9e4071a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Apr 2024 11:31:34 -0700 Subject: [PATCH 092/183] OverconvergentModularFormsSpace.hecke_matrix: Add keyword 'side', rewrite docstring --- src/sage/modular/overconvergent/genus0.py | 50 ++++++++++++++++------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index b7626ce2683..5c23a3aaa49 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -998,19 +998,30 @@ def _convert_to_basis(self, qexp): x = x - self._basis_cache[i] * answer[i] return answer + O(g**n) - def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): + def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False, side='left'): r""" - Calculate the matrix of the `T_m` operator in the basis of this space, - truncated to an `n \times n` matrix. Conventions are that operators act - on the left on column vectors (this is the opposite of the conventions - of the :mod:`sage.modules.matrix_morphism` class!) Uses naive `q`-expansion - arguments if ``use_recurrence=False`` and uses the Kolberg style - recurrences if ``use_recurrence=True``. - - The argument ``exact_arith`` causes the computation to be done with - rational arithmetic, even if the base ring is an inexact `p`-adic ring. - This is useful as there can be precision loss issues (particularly with - ``use_recurrence=False``). + Calculate the matrix of the `T_m` operator, truncated to `n \times n`. + + INPUT: + + - ``m`` -- integer; determines the operator `T_m` + + - ``n`` -- integer; truncate the matrix in the basis of this space + to an `n \times n` matrix + + - ``use_recurrence`` -- boolean (default: ``False``); whether to use + Kolberg style recurrences. If ``False``, use naive `q`-expansion + arguments. + + - ``exact_arith`` -- boolean (default: ``True``); whether to do the + computation to be done with rational arithmetic, even if the base ring + is an inexact `p`-adic ring. + + This is useful as there can be precision loss issues (particularly + with ``use_recurrence=False``). + + - ``side`` -- ``'left'`` (default) or ``'right'``; if ``'left'``, the + operator acts on the left on column vectors EXAMPLES:: @@ -1029,10 +1040,17 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): [ 1 0 0] [ 0 33881928/1414477 64] [ 0 -192898739923312/2000745183529 1626332544/1414477] - """ + Side switch:: + + sage: OverconvergentModularForms(2, 0, 1/2).hecke_matrix(2, 4, side='right') + [ 1 0 0 0] + [ 0 24 32 0] + [ 0 64 1152 3072] + [ 0 0 4608 61440] + """ if exact_arith and not self.base_ring().is_exact(): - return self.change_ring(QQ).hecke_matrix(m, n, use_recurrence) + return self.change_ring(QQ).hecke_matrix(m, n, use_recurrence, side=side) M = MatrixSpace(self.base_ring(), n) mat = M(0) @@ -1079,6 +1097,10 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): l = self._convert_to_basis(self.hecke_operator(self._basis_cache[j], m)) for i in range(n): mat[i, j] = l[i] + + if side == 'right': + return mat.transpose() + return mat def slopes(self, n, use_recurrence=False): From 3ee561a0ef03a6dd428ae9e81b89aad8e2c2a1a9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Apr 2024 11:35:33 -0700 Subject: [PATCH 093/183] OverconvergentModularFormsSpace.recurrence_matrix: Docstring cosmetics --- src/sage/modular/overconvergent/genus0.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index 5c23a3aaa49..d6359e53007 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -1262,10 +1262,13 @@ def eigenfunctions(self, n, F=None, exact_arith=True): def recurrence_matrix(self, use_smithline=True): r""" - Return the recurrence matrix satisfied by the coefficients of `U`, - that is a matrix `R =(r_{rs})_{r,s=1 \dots p}` such that `u_{ij} = - \sum_{r,s=1}^p r_{rs} u_{i-r, j-s}`. Uses an elegant construction which - I believe is due to Smithline. See [Loe2007]_. + Return the recurrence matrix satisfied by the coefficients of `U`. + + This is a matrix `R =(r_{rs})_{r,s=1,\dots,p}` such that `u_{ij} = + \sum_{r,s=1}^p r_{rs} u_{i-r, j-s}`. + + Uses an elegant construction which the author believes to be due + to Smithline. See [Loe2007]_. EXAMPLES:: From c29ee5c2c027025adb68ccc432b4acf0ed0b4f55 Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Sat, 6 Apr 2024 20:47:19 +0200 Subject: [PATCH 094/183] Fixed doctest error Caused by switched order of input arguments Amend: This time for real --- src/sage/algebras/quatalg/quaternion_algebra.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 1e230f1a5e4..1f7d3e3ac19 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -770,8 +770,8 @@ def maximal_order(self, take_shortcuts=True, order_basis=None): ....: alpha = A.random_element() sage: conj = [alpha * b * alpha.inverse() for b in [k,i,j]] sage: order_basis = tuple(conj) + (A.one(),) - sage: O = A.quaternion_order(order_basis) - sage: R = A.maximal_order(order_basis) + sage: O = A.quaternion_order(basis=order_basis) + sage: R = A.maximal_order(order_basis=order_basis) sage: O <= R and R.is_maximal() True From 8c850c547da9268e15af6efe5d43c3b0201b9322 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 9 Feb 2024 16:53:36 +0100 Subject: [PATCH 095/183] make map_coefficients more general, in line with polynomials --- src/sage/categories/modules_with_basis.py | 49 +++++++++++++++++++---- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index e1fa796ba3b..006db5d34ab 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -28,6 +28,7 @@ from sage.categories.fields import Fields from sage.categories.modules import Modules from sage.categories.poor_man_map import PoorManMap +from sage.categories.map import Map from sage.structure.element import Element, parent @@ -2062,17 +2063,25 @@ def trailing_term(self, *args, **kwds): """ return self.parent().term(*self.trailing_item(*args, **kwds)) - def map_coefficients(self, f): + def map_coefficients(self, f, new_base_ring=None): """ - Mapping a function on coefficients. + Return the element obtained by applying ``f`` to the non-zero + coefficients of ``self``. + + If ``f`` is a :class:`sage.categories.map.Map`, then the resulting + polynomial will be defined over the codomain of ``f``. Otherwise, the + resulting polynomial will be over the same ring as ``self``. Set + ``new_base_ring`` to override this behaviour. + + An error is raised if the coefficients are not in the new base ring. INPUT: - - ``f`` -- an endofunction on the coefficient ring of the - free module + - ``f`` -- a callable that will be applied to the + coefficients of ``self``. - Return a new element of ``self.parent()`` obtained by applying the - function ``f`` to all of the coefficients of ``self``. + - ``new_base_ring`` (optional) -- if given, the resulting element + will be defined over this ring. EXAMPLES:: @@ -2096,8 +2105,32 @@ def map_coefficients(self, f): sage: a = s([2,1]) + 2*s([3,2]) # needs sage.combinat sage.modules sage: a.map_coefficients(lambda x: x * 2) # needs sage.combinat sage.modules 2*s[2, 1] + 4*s[3, 2] - """ - return self.parent().sum_of_terms( (m, f(c)) for m,c in self ) + + We can map into a different base ring:: + + sage: # needs sage.combinat + sage: e = SymmetricFunctions(QQ).elementary() + sage: a = 1/2*(e([2,1]) + e([1,1,1])); a + 1/2*e[1, 1, 1] + 1/2*e[2, 1] + sage: b = a.map_coefficients(lambda c: 2*c, ZZ); b + e[1, 1, 1] + e[2, 1] + sage: b.parent() + Symmetric Functions over Integer Ring in the elementary basis + sage: b.map_coefficients(lambda c: 1/2*c, ZZ) + Traceback (most recent call last): + ... + TypeError: no conversion of this rational to integer + """ + R = self.parent() + if new_base_ring is not None: + B = new_base_ring + R = R.change_ring(B) + elif isinstance(f, Map): + B = f.codomain() + R = R.change_ring(B) + else: + B = self.base_ring() + return R.sum_of_terms((m, B(f(c))) for m, c in self) def map_support(self, f): """ From 717b3a00fb576accffec4952f1f60519d0ca9ad8 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 8 Apr 2024 17:31:27 +0200 Subject: [PATCH 096/183] remove full stop Co-authored-by: Travis Scrimshaw --- src/sage/categories/modules_with_basis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 006db5d34ab..50d82b5a453 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -2078,7 +2078,7 @@ def map_coefficients(self, f, new_base_ring=None): INPUT: - ``f`` -- a callable that will be applied to the - coefficients of ``self``. + coefficients of ``self`` - ``new_base_ring`` (optional) -- if given, the resulting element will be defined over this ring. From 6e93f6c5307d2c791c7e9b6ef8b3eb9a39964596 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 8 Apr 2024 17:31:40 +0200 Subject: [PATCH 097/183] fix formatting Co-authored-by: Travis Scrimshaw --- src/sage/categories/modules_with_basis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 50d82b5a453..1d7bee8c63a 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -2080,8 +2080,8 @@ def map_coefficients(self, f, new_base_ring=None): - ``f`` -- a callable that will be applied to the coefficients of ``self`` - - ``new_base_ring`` (optional) -- if given, the resulting element - will be defined over this ring. + - ``new_base_ring`` -- (optional) if given, the resulting element + will be defined over this ring EXAMPLES:: From 084314a8087ca217bbe61d06d450a4905aaf837c Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 8 Apr 2024 17:33:04 +0200 Subject: [PATCH 098/183] do not assume that __iter__ returns monomial coefficients Co-authored-by: Travis Scrimshaw --- src/sage/categories/modules_with_basis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 1d7bee8c63a..1490ca3354c 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -2130,7 +2130,8 @@ def map_coefficients(self, f, new_base_ring=None): R = R.change_ring(B) else: B = self.base_ring() - return R.sum_of_terms((m, B(f(c))) for m, c in self) + mc = self.monomial_coefficients(copy=False) + return R.sum_of_terms((m, B(f(c))) for m, c in mc.items()) def map_support(self, f): """ From 2ade4c015dbd443efb3da6e0d2417acd1a6307ff Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 8 Apr 2024 17:33:59 +0200 Subject: [PATCH 099/183] more consistency with multivariate polynomials Co-authored-by: Travis Scrimshaw --- src/sage/categories/modules_with_basis.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 1490ca3354c..ef6e43c5b19 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -2122,14 +2122,14 @@ def map_coefficients(self, f, new_base_ring=None): TypeError: no conversion of this rational to integer """ R = self.parent() - if new_base_ring is not None: - B = new_base_ring - R = R.change_ring(B) - elif isinstance(f, Map): + if isinstance(f, Map): B = f.codomain() - R = R.change_ring(B) else: B = self.base_ring() + if new_base_ring is not None: + B = new_base_ring + if B is not self.base_ring(): + R = R.change_ring(B) mc = self.monomial_coefficients(copy=False) return R.sum_of_terms((m, B(f(c))) for m, c in mc.items()) From b64e8b4f8a79837630dfb4455fbba4d3569cc068 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 9 Apr 2024 09:00:30 +0200 Subject: [PATCH 100/183] improve doc, remove dependency of doctest on symmetric functions --- src/sage/categories/modules_with_basis.py | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index ef6e43c5b19..dcbd547fe53 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -2073,7 +2073,8 @@ def map_coefficients(self, f, new_base_ring=None): resulting polynomial will be over the same ring as ``self``. Set ``new_base_ring`` to override this behaviour. - An error is raised if the coefficients are not in the new base ring. + An error is raised if the coefficients cannot be + converted to the new base ring. INPUT: @@ -2108,18 +2109,27 @@ def map_coefficients(self, f, new_base_ring=None): We can map into a different base ring:: - sage: # needs sage.combinat - sage: e = SymmetricFunctions(QQ).elementary() - sage: a = 1/2*(e([2,1]) + e([1,1,1])); a - 1/2*e[1, 1, 1] + 1/2*e[2, 1] + sage: F = CombinatorialFreeModule(QQ, ['a','b','c']) + sage: B = F.basis() + sage: a = 1/2*(B['a'] + 3*B['c']); a + 1/2*B['a'] + 3/2*B['c'] sage: b = a.map_coefficients(lambda c: 2*c, ZZ); b - e[1, 1, 1] + e[2, 1] + B['a'] + 3*B['c'] sage: b.parent() - Symmetric Functions over Integer Ring in the elementary basis + Free module generated by {'a', 'b', 'c'} over Integer Ring sage: b.map_coefficients(lambda c: 1/2*c, ZZ) Traceback (most recent call last): ... TypeError: no conversion of this rational to integer + + Coefficients are converted to the new base ring after + applying the map:: + + sage: B['a'].map_coefficients(lambda c: 2*c, GF(2)) + 0 + sage: B['a'].map_coefficients(lambda c: GF(2)(c), QQ) + B['a'] + """ R = self.parent() if isinstance(f, Map): From f2b74276e19317a9f418f82d18b542a1780b8a5b Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 9 Apr 2024 09:04:41 +0200 Subject: [PATCH 101/183] pycodestyle fixes --- src/sage/categories/modules_with_basis.py | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index dcbd547fe53..7de5d7dcd91 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -174,7 +174,7 @@ def _call_(self, x): if M.base_ring() != self.base_ring(): M = M.change_ring(self.base_ring()) except (TypeError, AttributeError) as msg: - raise TypeError("%s\nunable to coerce x (=%s) into %s" % (msg,x,self)) + raise TypeError("%s\nunable to coerce x (=%s) into %s" % (msg, x, self)) return M def is_abelian(self): @@ -582,7 +582,7 @@ def module_morphism(self, on_basis=None, matrix=None, function=None, return ModuleMorphismByLinearity( domain=self, on_basis=on_basis, **keywords) else: - return ModuleMorphismFromFunction( # Or just SetMorphism? + return ModuleMorphismFromFunction( # Or just SetMorphism? domain=self, function=function, **keywords) _module_morphism = module_morphism @@ -1265,7 +1265,7 @@ def _apply_module_morphism(self, x, on_basis, codomain=False): except Exception: raise ValueError('codomain could not be determined') - if hasattr( codomain, 'linear_combination' ): + if hasattr(codomain, 'linear_combination'): mc = x.monomial_coefficients(copy=False) return codomain.linear_combination((on_basis(key), coeff) for key, coeff in mc.items()) @@ -1289,8 +1289,8 @@ def _apply_module_endomorphism(self, x, on_basis): 2*s[2, 1] + 2*s[3] """ mc = x.monomial_coefficients(copy=False) - return self.linear_combination( (on_basis(key), coeff) - for key, coeff in mc.items()) + return self.linear_combination((on_basis(key), coeff) + for key, coeff in mc.items()) def dimension(self): """ @@ -2183,7 +2183,7 @@ def map_support(self, f): sage: y.parent() is B # needs sage.modules True """ - return self.parent().sum_of_terms( (f(m), c) for m,c in self ) + return self.parent().sum_of_terms((f(m), c) for m, c in self) def map_support_skip_none(self, f): """ @@ -2217,7 +2217,9 @@ def map_support_skip_none(self, f): sage: y.parent() is B # needs sage.modules True """ - return self.parent().sum_of_terms( (fm,c) for (fm,c) in ((f(m), c) for m,c in self) if fm is not None) + return self.parent().sum_of_terms((fm, c) + for fm, c in ((f(m), c) for m, c in self) + if fm is not None) def map_item(self, f): """ @@ -2251,7 +2253,7 @@ def map_item(self, f): sage: a.map_item(f) # needs sage.combinat sage.modules 2*s[2, 1] + 2*s[3] """ - return self.parent().sum_of_terms( f(m,c) for m,c in self ) + return self.parent().sum_of_terms(f(m, c) for m, c in self) def tensor(*elements): """ @@ -2587,11 +2589,13 @@ def apply_multilinear_morphism(self, f, codomain=None): except AttributeError: codomain = f(*[module.zero() for module in modules]).parent() if codomain in ModulesWithBasis(K): - return codomain.linear_combination((f(*[module.monomial(t) for (module,t) in zip(modules, m)]), c) - for m,c in self) + return codomain.linear_combination((f(*[module.monomial(t) + for module, t in zip(modules, m)]), c) + for m, c in self) else: - return sum((c * f(*[module.monomial(t) for (module,t) in zip(modules, m)]) - for m,c in self), + return sum((c * f(*[module.monomial(t) + for module, t in zip(modules, m)]) + for m, c in self), codomain.zero()) class DualObjects(DualObjectsCategory): From 48f2c22d0642e8dd0e06f7fbc0fcd58c0c6f281b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Tue, 9 Apr 2024 13:43:22 +0200 Subject: [PATCH 102/183] fix indentations --- src/sage/plot/graphics.py | 104 +++++++++++++++++---------------- src/sage/plot/plot3d/plot3d.py | 20 +++---- 2 files changed, 63 insertions(+), 61 deletions(-) diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py index 0b6c1072ec4..258a6ca7047 100644 --- a/src/sage/plot/graphics.py +++ b/src/sage/plot/graphics.py @@ -1388,7 +1388,7 @@ def _set_scale(self, subplot, scale=None, base=None): if isinstance(scale, (list, tuple)): if len(scale) != 2 and len(scale) != 3: raise ValueError("If the input is a tuple, it must be of " - "the form (scale, base) or (scale, basex, basey)") + "the form (scale, base) or (scale, basex, basey)") if len(scale) == 2: base = scale[1] else: @@ -1397,7 +1397,7 @@ def _set_scale(self, subplot, scale=None, base=None): if scale not in ('linear', 'loglog', 'semilogx', 'semilogy'): raise ValueError("The scale must be one of 'linear', 'loglog'," - f" 'semilogx' or 'semilogy' -- got '{scale}'") + f" 'semilogx' or 'semilogy' -- got '{scale}'") if isinstance(base, (list, tuple)): basex, basey = base @@ -1436,37 +1436,37 @@ def _set_scale(self, subplot, scale=None, base=None): # NOTE: If you intend to use a new parameter in show(), you should update # this dictionary to contain the default value for that parameter. - SHOW_OPTIONS = {# axes options - 'axes': None, 'axes_labels': None, 'axes_labels_size': None, - 'axes_pad': None, 'base': None, 'scale': None, - 'xmin': None, 'xmax': None, 'ymin': None, 'ymax': None, - 'flip_x': False, 'flip_y': False, - # Figure options - 'aspect_ratio': None, 'dpi': DEFAULT_DPI, 'fig_tight': True, - 'figsize': None, 'fontsize': None, 'frame': False, - 'title': None, 'title_pos': None, 'transparent': False, - # Grid options - 'gridlines': None, 'gridlinesstyle': None, - 'hgridlinesstyle': None, 'vgridlinesstyle': None, - # Legend options - 'legend_options': {}, 'show_legend': None, - # Ticks options - 'ticks': None, 'tick_formatter': None, 'ticks_integer': False, - # Text options - 'typeset': 'default'} + SHOW_OPTIONS = { # axes options + 'axes': None, 'axes_labels': None, 'axes_labels_size': None, + 'axes_pad': None, 'base': None, 'scale': None, + 'xmin': None, 'xmax': None, 'ymin': None, 'ymax': None, + 'flip_x': False, 'flip_y': False, + # Figure options + 'aspect_ratio': None, 'dpi': DEFAULT_DPI, 'fig_tight': True, + 'figsize': None, 'fontsize': None, 'frame': False, + 'title': None, 'title_pos': None, 'transparent': False, + # Grid options + 'gridlines': None, 'gridlinesstyle': None, + 'hgridlinesstyle': None, 'vgridlinesstyle': None, + # Legend options + 'legend_options': {}, 'show_legend': None, + # Ticks options + 'ticks': None, 'tick_formatter': None, 'ticks_integer': False, + # Text options + 'typeset': 'default'} # Default options for the legends: LEGEND_OPTIONS = {'back_color': 'white', 'borderpad': 0.6, - 'borderaxespad': None, - 'columnspacing': None, - 'fancybox': False, 'font_family': 'sans-serif', - 'font_size': 'medium', 'font_style': 'normal', - 'font_variant': 'normal', 'font_weight': 'medium', - 'handlelength': 0.05, 'handletextpad': 0.5, - 'labelspacing': 0.02, 'loc': 'best', - 'markerscale': 0.6, 'ncol': 1, 'numpoints': 2, - 'shadow': True, 'title': None} + 'borderaxespad': None, + 'columnspacing': None, + 'fancybox': False, 'font_family': 'sans-serif', + 'font_size': 'medium', 'font_style': 'normal', + 'font_variant': 'normal', 'font_weight': 'medium', + 'handlelength': 0.05, 'handletextpad': 0.5, + 'labelspacing': 0.02, 'loc': 'best', + 'markerscale': 0.6, 'ncol': 1, 'numpoints': 2, + 'shadow': True, 'title': None} @suboptions('legend', **LEGEND_OPTIONS) def show(self, **kwds): @@ -2359,9 +2359,9 @@ def _limit_output_aspect_ratio(self, xmin, xmax, ymin, ymax): return {'xmin': xmin, 'xmax': xmax, 'ymin': ymin, 'ymax': ymax} def _matplotlib_tick_formatter(self, subplot, base=(10, 10), - locator_options={}, scale=('linear', 'linear'), - tick_formatter=(None, None), ticks=(None, None), - xmax=None, xmin=None, ymax=None, ymin=None): + locator_options={}, scale=('linear', 'linear'), + tick_formatter=(None, None), ticks=(None, None), + xmax=None, xmin=None, ymax=None, ymin=None): r""" Take a matplotlib subplot instance representing the graphic and set the ticks formatting. This function is only for internal use. @@ -2387,8 +2387,10 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), # This function is created to refactor some code that is repeated # in the matplotlib function from matplotlib.ticker import (FixedLocator, Locator, - LogFormatterMathtext, LogLocator, MaxNLocator, - MultipleLocator, NullLocator, ScalarFormatter) + LogFormatterMathtext, + LogLocator, MaxNLocator, + MultipleLocator, + NullLocator, ScalarFormatter) x_locator, y_locator = ticks # ---------------------- Location of x-ticks --------------------- @@ -2410,8 +2412,8 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), x_locator = MultipleLocator(float(x_locator)) else: # not enough room for two major ticks raise ValueError('Expand the range of the independent ' - 'variable to allow two multiples of your tick locator ' - '(option `ticks`).') + 'variable to allow two multiples of your tick locator ' + '(option `ticks`).') # ---------------------- Location of y-ticks --------------------- if y_locator is None: @@ -2431,8 +2433,8 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), y_locator = MultipleLocator(float(y_locator)) else: # not enough room for two major ticks raise ValueError('Expand the range of the dependent ' - 'variable to allow two multiples of your tick locator ' - '(option `ticks`).') + 'variable to allow two multiples of your tick locator ' + '(option `ticks`).') x_formatter, y_formatter = tick_formatter from matplotlib.ticker import FuncFormatter, FixedFormatter @@ -2453,8 +2455,8 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), if scale[0] == 'log': # We need to strip out '\\mathdefault' from the string x_formatter = FuncFormatter(lambda n, pos: - LogFormatterMathtext(base=base[0])(n, pos).replace( - "\\mathdefault", "")) + LogFormatterMathtext(base=base[0])(n, pos).replace( + "\\mathdefault", "")) else: # circumvent the problem of symbolic tick values (trac #34693) if isinstance(x_locator, FixedLocator): @@ -2465,8 +2467,8 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), if (not isinstance(ticks[0], (list, tuple)) or len(ticks[0]) != len(x_formatter)): raise ValueError("If the first component of the list " - "`tick_formatter` is a list then the first component " - "of `ticks` must also be a list of equal length.") + "`tick_formatter` is a list then the first component " + "of `ticks` must also be a list of equal length.") x_formatter = FixedFormatter(x_formatter) # ---------------------- Formatting y-ticks ---------------------- if y_formatter is None: @@ -2482,8 +2484,8 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), if scale[1] == 'log': # We need to strip out '\\mathdefault' from the string y_formatter = FuncFormatter(lambda n, pos: - LogFormatterMathtext(base=base[1])(n, pos).replace( - "\\mathdefault", "")) + LogFormatterMathtext(base=base[1])(n, pos).replace( + "\\mathdefault", "")) else: # circumvent the problem of symbolic tick values (trac #34693) if isinstance(y_locator, FixedLocator): @@ -2494,8 +2496,8 @@ def _matplotlib_tick_formatter(self, subplot, base=(10, 10), if (not isinstance(ticks[1], (list, tuple)) or len(ticks[1]) != len(y_formatter)): raise ValueError("If the second component of the list " - "`tick_formatter` is a list then the second component " - "of `ticks` must also be a list of equal length.") + "`tick_formatter` is a list then the second component " + "of `ticks` must also be a list of equal length.") y_formatter = FixedFormatter(y_formatter) subplot.xaxis.set_major_locator(x_locator) @@ -2898,7 +2900,7 @@ def matplotlib(self, filename=None, subplot.set_ylim([ymin, ymax]) locator_options = {'nbins': 9, 'steps': [1, 2, 5, 10], - 'integer': ticks_integer} + 'integer': ticks_integer} if axes is None: axes = self._show_axes @@ -3054,7 +3056,7 @@ def matplotlib(self, filename=None, # We do this change only on linear scale, otherwise matplotlib # errors out with a memory error. from matplotlib.ticker import (AutoMinorLocator, FixedLocator, - LogLocator, NullLocator) + LogLocator, NullLocator) if isinstance(x_locator, (NullLocator, FixedLocator)): subplot.xaxis.set_minor_locator(NullLocator()) elif xscale == 'linear': @@ -3090,7 +3092,7 @@ def matplotlib(self, filename=None, if gridlinesstyle is None: # Set up the default grid style gridlinesstyle = {'color': 'black', 'linestyle': ':', - 'linewidth': 0.5} + 'linewidth': 0.5} vgridstyle = gridlinesstyle.copy() if vgridlinesstyle is not None: @@ -3179,7 +3181,7 @@ def matplotlib(self, filename=None, labeltrans = offset_copy(trans, figure, x=xaxis_labeloffset, y=0, units='points') subplot.xaxis.set_label_coords(x=xaxis_labelx, - y=xaxis_labely, transform=labeltrans) + y=xaxis_labely, transform=labeltrans) ylabel = subplot.yaxis.get_label() ylabel.set_horizontalalignment('center') @@ -3189,7 +3191,7 @@ def matplotlib(self, filename=None, labeltrans = offset_copy(trans, figure, x=0, y=yaxis_labeloffset, units='points') subplot.yaxis.set_label_coords(x=yaxis_labelx, - y=yaxis_labely, transform=labeltrans) + y=yaxis_labely, transform=labeltrans) # This option makes the xlim and ylim limits not take effect # todo: figure out which limits were specified, and let the diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py index 83845dc9494..094ea89f254 100644 --- a/src/sage/plot/plot3d/plot3d.py +++ b/src/sage/plot/plot3d/plot3d.py @@ -354,8 +354,8 @@ def subs_func(t): indep_var_dummies[1]: float({params[1]}) }})""" return eval(ll, {'t': t, 'func': func, - 'dep_var_dummy': dep_var_dummy, - 'indep_var_dummies': indep_var_dummies}) + 'dep_var_dummy': dep_var_dummy, + 'indep_var_dummies': indep_var_dummies}) return [subs_func(m) for m in transformation] def __repr__(self): @@ -1114,13 +1114,13 @@ def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): elif adaptive: P = plot3d_adaptive(f, urange, vrange, **kwds) else: - arg1 = lambda u,v: u - arg2 = lambda u,v: v - P = parametric_plot3d.parametric_plot3d((arg1,arg2,f), + arg1 = lambda u, v: u + arg2 = lambda u, v: v + P = parametric_plot3d.parametric_plot3d((arg1, arg2, f), urange, vrange, **kwds) - P.frame_aspect_ratio([1.0,1.0,0.5]) + P.frame_aspect_ratio([1.0, 1.0, 0.5]) return P @@ -1441,7 +1441,7 @@ def axes(scale=1, radius=None, **kwds): sphinx_plot(T) """ if radius is None: - radius = scale/100.0 - return Graphics3dGroup([arrow3d((0,0,0),(scale,0,0), radius, **kwds), - arrow3d((0,0,0),(0,scale,0), radius, **kwds), - arrow3d((0,0,0),(0,0,scale), radius, **kwds)]) + radius = scale / 100.0 + return Graphics3dGroup([arrow3d((0, 0, 0), (scale, 0, 0), radius, **kwds), + arrow3d((0, 0, 0), (0, scale, 0), radius, **kwds), + arrow3d((0, 0, 0), (0, 0, scale), radius, **kwds)]) From e2fc4afc19d202bd2e9427203877a6bddee45f14 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Tue, 9 Apr 2024 22:08:22 +0900 Subject: [PATCH 103/183] Fixing bug with classical Lie algebras over positive characteristic fields. --- .../lie_algebras/classical_lie_algebra.py | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/sage/algebras/lie_algebras/classical_lie_algebra.py b/src/sage/algebras/lie_algebras/classical_lie_algebra.py index 01dd668e711..28a148eb645 100644 --- a/src/sage/algebras/lie_algebras/classical_lie_algebra.py +++ b/src/sage/algebras/lie_algebras/classical_lie_algebra.py @@ -1700,6 +1700,26 @@ def _construct_struct_coeffs(self, R, p_roots): [((alpha[1], -alpha[1]), {alphacheck[1]: 1}), ((alpha[1], alphacheck[1]), {alpha[1]: -2}), ((alphacheck[1], -alpha[1]), {-alpha[1]: -2})] + + TESTS: + + Check that we can construct Lie algebras over positive characteristic + fields (:issue:`37773`):: + + sage: sl4 = lie_algebras.sl(GF(3), 4) + sage: sl4.is_nilpotent() + False + sage: sl4.lower_central_series() + (Lie algebra of ['A', 3] in the Chevalley basis,) + sage: sl4.is_solvable() + False + sage: sl4.is_semisimple() + True + sage: sl4.killing_form_matrix().det() + 2 + sage: sl5 = lie_algebras.sl(GF(3), 5) + sage: sl5.killing_form_matrix().det() + 2 """ alphacheck = self._Q.simple_coroots() roots = frozenset(self._Q.roots()) @@ -1727,12 +1747,12 @@ def _construct_struct_coeffs(self, R, p_roots): continue if b - x in roots: - t1 = ((b-x).norm_squared() / b.norm_squared() + t1 = (R((b-x).norm_squared()) / R(b.norm_squared()) * sp_sign[(x, b-x)] * sp_sign[(a, y-a)]) else: t1 = 0 if a - x in roots: - t2 = ((a-x).norm_squared() / a.norm_squared() + t2 = (R((a-x).norm_squared()) / R(a.norm_squared()) * sp_sign[(x, a-x)] * sp_sign[(b, y-b)]) else: t2 = 0 From d206b472e8b4163a499208a3d1671d409acda76c Mon Sep 17 00:00:00 2001 From: adrinospy Date: Tue, 9 Apr 2024 18:44:45 +0530 Subject: [PATCH 104/183] made suggested changes --- .github/workflows/get_changes.sh | 61 -------------------- .github/workflows/pr-labeler.yml | 18 +++--- .github/workflows/set_labels_by_changes.sh | 67 ++++++++++++++++++++++ 3 files changed, 76 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/get_changes.sh create mode 100644 .github/workflows/set_labels_by_changes.sh diff --git a/.github/workflows/get_changes.sh b/.github/workflows/get_changes.sh deleted file mode 100644 index b2e716c9da5..00000000000 --- a/.github/workflows/get_changes.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -# get all the changes made and changed files -CHANGES=$(git diff --ignore-all-space $PR_BASE_SHA $PR_HEAD_SHA) - -# ignore blank lines -CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') - -# ignore non necessary lines from git diff -CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') - -# count total no of lines -CHANGES=$(echo "$CHANGES" | wc -l) - -echo "CHANGES MADE: $CHANGES" - -# get changed files -CHANGED_PATH=$(git diff --name-only $PR_BASE_SHA $PR_HEAD_SHA) - -# extract changed dir -CHANGED_DIR=$(echo "$CHANGED_PATH" | awk -F'src/sage/' '{print $2}' | cut -d'/' -f1 | sed 's/\([^ ]\+\)/c: \1/g') - -AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN" - -DELETE_LABELS=("$MINIMAL" "$SMALL" "$MODERATE" "$LARGE") - -if [ "$CHANGES" -gt "$LARGE_THRESHOLD" ]; then -SIZE_LABEL="$LARGE" -elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then -SIZE_LABEL="$MODERATE" -elif [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then -SIZE_LABEL="$SMALL" -else -SIZE_LABEL="$MINIMAL" -fi - -DELETE_LABELS=("${DELETE_LABELS[@]//${SIZE_LABEL}}") - -readarray -t LABELS <<< "$CHANGED_DIR" -LABELS+=("$SIZE_LABEL") - -echo "Adding label: ${LABELS[@]}" -for LABEL in "${LABELS[@]}"; do - curl -X POST \ - -H "$AUTH_HEADER" \ - -H "Accept: application/vnd.github+json" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - -d "{\"labels\":[\"$LABEL\"]}" \ - "$API_URL" >/dev/null -done - -echo "Deleting Labels:" - -for DELETE_LABEL in "${DELETE_LABELS[@]}"; do - ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') - curl -X DELETE \ - -H "Accept: application/vnd.github+json" \ - -H "$AUTH_HEADER" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - "$API_URL/$ENCODED_LABEL" >/dev/null -done \ No newline at end of file diff --git a/.github/workflows/pr-labeler.yml b/.github/workflows/pr-labeler.yml index 521e7a2901b..7eb62c8a498 100644 --- a/.github/workflows/pr-labeler.yml +++ b/.github/workflows/pr-labeler.yml @@ -5,11 +5,14 @@ on: pull_request_target: types: - opened + - reopened - synchronize + - ready_for_review + - review_requested - edited jobs: label-changes: - if: vars.SMALL_THRESHOLD && vars.MODERATE_THRESHOLD && vars.LARGE_THRESHOLD + if: vars.SMALL_THRESHOLD && vars.MODERATE_THRESHOLD && vars.LARGE_THRESHOLD && github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: pull-requests: write @@ -22,18 +25,15 @@ jobs: - name: Add labels based on size run: | git fetch origin $BASE_SHA - chmod a+x .github/workflows/get_changes.sh - .github/workflows/get_changes.sh + chmod a+x .github/workflows/set_labels_by_changes.sh + .github/workflows/set_labels_by_changes.sh env: BASE_SHA: ${{ github.base_ref }} PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - API_URL: "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" - MINIMAL: 'v: minimal' - SMALL: 'v: small' - MODERATE: 'v: moderate' - LARGE: 'v: large' + REPOSITORY: ${{ github.repository }} + PR_NUMBER: ${{ github.event.pull_request.number}} SMALL_THRESHOLD: ${{ vars.SMALL_THRESHOLD }} MODERATE_THRESHOLD: ${{ vars.MODERATE_THRESHOLD }} - LARGE_THRESHOLD: ${{ vars.LARGE_THRESHOLD }} \ No newline at end of file + LARGE_THRESHOLD: ${{ vars.LARGE_THRESHOLD }} diff --git a/.github/workflows/set_labels_by_changes.sh b/.github/workflows/set_labels_by_changes.sh new file mode 100644 index 00000000000..a182d539339 --- /dev/null +++ b/.github/workflows/set_labels_by_changes.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +echo 'set_labels_by_changes.sh called with environment:' +echo "BASE SHA: $PR_BASE_SHA" +echo "HEAD SHA: $PR_HEAD_SHA" +echo "SMALL THRESHOLD $SMALL_THRESHOLD" +echo "MODERATE THERESHOLD: $MODERATE_THRESHOLD" +echo "LARGE THRESHOLD: $LARGE_THRESHOLD" + +# get all the changes made and changed files +CHANGES=$(git diff --ignore-all-space $PR_BASE_SHA $PR_HEAD_SHA) + +# ignore blank lines +CHANGES=$(echo "$CHANGES" | grep -vE '^[\+\-]\s*$') + +# ignore non necessary lines from git diff +CHANGES=$(echo "$CHANGES" | grep -E '^[+\-]' | grep -vE '^\+\+\+|^\-\-\-') + +# count total no of lines +CHANGES=$(echo "$CHANGES" | wc -l) + +echo "CHANGES MADE: $CHANGES" + +AUTH_HEADER="Authorization: Bearer $GITHUB_TOKEN" + +MINIMAL="v: minimal" +SMALL="v: small" +MODERATE="v: moderate" +LARGE="v: large" + +DELETE_LABELS=("$MINIMAL" "$SMALL" "$MODERATE" "$LARGE") + +if [ "$CHANGES" -gt "$LARGE_THRESHOLD" ]; then + SIZE_LABEL="$LARGE" +elif [ "$CHANGES" -gt "$MODERATE_THRESHOLD" ]; then + SIZE_LABEL="$MODERATE" +elif [ "$CHANGES" -gt "$SMALL_THRESHOLD" ]; then + SIZE_LABEL="$SMALL" +else + SIZE_LABEL="$MINIMAL" +fi + +DELETE_LABELS=("${DELETE_LABELS[@]//${SIZE_LABEL}/}") + +# API for adding labels on the Pull Request +API_URL="https://api.github.com/repos/$REPOSITORY/issues/$PR_NUMBER/labels" + +echo "Adding label: ${SIZE_LABEL[@]}" +for LABEL in "${SIZE_LABEL[@]}"; do + curl -X POST \ + -H "$AUTH_HEADER" \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + -d "{\"labels\":[\"$LABEL\"]}" \ + "$API_URL" >/dev/null +done + +echo "Deleting Labels:" + +for DELETE_LABEL in "${DELETE_LABELS[@]}"; do + ENCODED_LABEL=$(echo "$DELETE_LABEL" | sed 's/ /%20/g') + curl -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "$AUTH_HEADER" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "$API_URL/$ENCODED_LABEL" >/dev/null +done From e956798756a933ad15d05249804b4d11c7a1cdeb Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Tue, 9 Apr 2024 18:04:13 +0300 Subject: [PATCH 105/183] Add matroid `relabel` --- src/sage/matroids/basis_matroid.pyx | 63 +- .../matroids/circuit_closures_matroid.pxd | 1 + .../matroids/circuit_closures_matroid.pyx | 44 + src/sage/matroids/circuits_matroid.pxd | 3 +- src/sage/matroids/circuits_matroid.pyx | 44 + src/sage/matroids/database_matroids.py | 800 ++++++++++-------- src/sage/matroids/flats_matroid.pxd | 3 +- src/sage/matroids/flats_matroid.pyx | 45 + src/sage/matroids/graphic_matroid.py | 38 + src/sage/matroids/linear_matroid.pxd | 5 + src/sage/matroids/linear_matroid.pyx | 180 ++++ src/sage/matroids/matroid.pxd | 1 + src/sage/matroids/matroid.pyx | 83 ++ 13 files changed, 945 insertions(+), 365 deletions(-) diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index 4c20102a621..43ce3f24962 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -77,6 +77,7 @@ from sage.structure.richcmp cimport rich_to_bool from sage.matroids.matroid cimport Matroid from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid from sage.matroids.set_system cimport SetSystem +from sage.matroids.utilities import cmp_elements_key from cpython.object cimport Py_EQ, Py_NE from itertools import combinations @@ -189,15 +190,19 @@ cdef class BasisMatroid(BasisExchangeMatroid): if M is not None: rank = M.full_rank() nonbases = M.nonbases() - groundset = sorted(M.groundset()) + groundset = sorted(M.groundset(), key=cmp_elements_key) if groundset is None: groundset = frozenset() if rank is None: if bases is not None: - rank = len(min(bases)) + for B in bases: + rank = len(B) + break elif nonbases is not None: - rank = len(min(nonbases)) + for N in nonbases: + rank = len(N) + break else: rank = 0 @@ -515,42 +520,46 @@ cdef class BasisMatroid(BasisExchangeMatroid): cdef frozenset se = frozenset([e]) return BasisMatroid(groundset=self._E + (e,), bases=[B | se for B in self.bases()]) - cpdef relabel(self, l): - """ + cpdef relabel(self, f): + r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``l[e]``, - where ``l`` is a given injective map. If ``e not in l`` then the + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the identity map is assumed. INPUT: - - ``l`` -- a python object such that `l[e]` is the new label of `e`. - - OUTPUT: - - A matroid. - - .. TODO:: + - ``f`` -- a python object such that `f[e]` is the new label of `e` - Write abstract ``RelabeledMatroid`` class, and add ``relabel()`` - method to the main ``Matroid`` class, together with ``_relabel()`` - method that can be replaced by subclasses. Use the code from - ``is_isomorphism()`` in ``relabel()`` to deal with a variety of - input methods for the relabeling. + OUTPUT: a matroid EXAMPLES:: - sage: from sage.matroids.advanced import * + sage: from sage.matroids.advanced import BasisMatroid sage: M = BasisMatroid(matroids.catalog.Fano()) sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] - sage: N = M.relabel({'g':'x'}) - sage: sorted(N.groundset()) - ['a', 'b', 'c', 'd', 'e', 'f', 'x'] + sage: N = M.relabel({'a':0, 'g':'x'}) + sage: from sage.matroids.utilities import cmp_elements_key + sage: sorted(N.groundset(), key=cmp_elements_key) + [0, 'b', 'c', 'd', 'e', 'f', 'x'] + sage: N.is_isomorphic(M) + True + + TESTS:: + + sage: from sage.matroids.advanced import BasisMatroid + sage: M = BasisMatroid(matroids.catalog.Fano()) + sage: f = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - M = BasisMatroid(M=self) - M._relabel(l) + d = self._relabel_map(f) + E = [d[x] for x in self.groundset()] + B = [[d[y] for y in list(x)] for x in self.bases()] + M = BasisMatroid(groundset=E, bases=B) return M # enumeration @@ -691,8 +700,8 @@ cdef class BasisMatroid(BasisExchangeMatroid): bi[bc[e]].append(e) else: bi[bc[e]] = [e] - self._bases_invariant_var = hash(tuple([(c, len(bi[c])) for c in sorted(bi)])) - self._bases_partition_var = SetSystem(self._E, [[self._E[e] for e in bi[c]] for c in sorted(bi)]) + self._bases_invariant_var = hash(tuple([(c, len(bi[c])) for c in sorted(bi, key=cmp_elements_key)])) + self._bases_partition_var = SetSystem(self._E, [[self._E[e] for e in bi[c]] for c in sorted(bi, key=cmp_elements_key)]) return self._bases_invariant_var cpdef _bases_partition(self): diff --git a/src/sage/matroids/circuit_closures_matroid.pxd b/src/sage/matroids/circuit_closures_matroid.pxd index 7c7b61ec35f..446d5ca3f86 100644 --- a/src/sage/matroids/circuit_closures_matroid.pxd +++ b/src/sage/matroids/circuit_closures_matroid.pxd @@ -13,3 +13,4 @@ cdef class CircuitClosuresMatroid(Matroid): cpdef _circuit(self, F) cpdef circuit_closures(self) cpdef _is_isomorphic(self, other, certificate=*) + cpdef relabel(self, f) diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index 42293cc2fc3..8480dd429c4 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -568,4 +568,48 @@ cdef class CircuitClosuresMatroid(Matroid): version = 0 return sage.matroids.unpickling.unpickle_circuit_closures_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: from sage.matroids.circuit_closures_matroid import CircuitClosuresMatroid + sage: M = CircuitClosuresMatroid(matroids.catalog.RelaxedNonFano()) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5, 6] + sage: N = M.relabel({'g':'x', 0:'z'}) # 'g':'x' is ignored + sage: from sage.matroids.utilities import cmp_elements_key + sage: sorted(N.groundset(), key=cmp_elements_key) + [1, 2, 3, 4, 5, 6, 'z'] + sage: M.is_isomorphic(N) + True + + TESTS:: + + sage: from sage.matroids.circuit_closures_matroid import CircuitClosuresMatroid + sage: M = CircuitClosuresMatroid(matroids.catalog.RelaxedNonFano()) + sage: f = {0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f', 6: 'g'} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset()] + CC = {} + for i in self.circuit_closures(): + CC[i] = [[d[y] for y in x] for x in list(self._circuit_closures[i])] + M = CircuitClosuresMatroid(groundset=E, circuit_closures=CC) + return M + # todo: customized minor, extend methods. diff --git a/src/sage/matroids/circuits_matroid.pxd b/src/sage/matroids/circuits_matroid.pxd index 26f86b2dac0..b8995b08ef4 100644 --- a/src/sage/matroids/circuits_matroid.pxd +++ b/src/sage/matroids/circuits_matroid.pxd @@ -24,8 +24,9 @@ cdef class CircuitsMatroid(Matroid): cpdef girth(self) cpdef is_paving(self) - # isomorphism + # isomorphism and relabeling cpdef _is_isomorphic(self, other, certificate=*) + cpdef relabel(self, f) # verification cpdef is_valid(self) diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index 6c09c2dc07d..b8d3b8b18c0 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -413,6 +413,50 @@ cdef class CircuitsMatroid(Matroid): version = 0 return sage.matroids.unpickling.unpickle_circuits_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: from sage.matroids.circuits_matroid import CircuitsMatroid + sage: M = CircuitsMatroid(matroids.catalog.RelaxedNonFano()) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5, 6] + sage: N = M.relabel({'g':'x', 0:'z'}) # 'g':'x' is ignored + sage: from sage.matroids.utilities import cmp_elements_key + sage: sorted(N.groundset(), key=cmp_elements_key) + [1, 2, 3, 4, 5, 6, 'z'] + sage: M.is_isomorphic(N) + True + + TESTS:: + + sage: from sage.matroids.circuits_matroid import CircuitsMatroid + sage: M = CircuitsMatroid(matroids.catalog.RelaxedNonFano()) + sage: f = {0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f', 6: 'g'} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self._groundset] + C = [] + for i in self._k_C: + C += [[d[y] for y in list(x)] for x in self._k_C[i]] + M = CircuitsMatroid(groundset=E, circuits=C) + return M + # enumeration cpdef bases(self): diff --git a/src/sage/matroids/database_matroids.py b/src/sage/matroids/database_matroids.py index 0017ce0627e..2e937874b06 100644 --- a/src/sage/matroids/database_matroids.py +++ b/src/sage/matroids/database_matroids.py @@ -38,7 +38,6 @@ from sage.matrix.constructor import Matrix from sage.matroids.constructor import Matroid -from sage.matroids.circuit_closures_matroid import CircuitClosuresMatroid from sage.matroids.linear_matroid import ( RegularMatroid, BinaryMatroid, @@ -59,7 +58,7 @@ # The order is the same as in Oxley. -def U24(): +def U24(groundset='abcd'): r""" The uniform matroid of rank `2` on `4` elements. @@ -70,7 +69,7 @@ def U24(): sage: M = matroids.catalog.U24(); M U(2, 4): Matroid of rank 2 on 4 elements with circuit-closures - {2: {{0, 1, 2, 3}}} + {2: {{'a', 'b', 'c', 'd'}}} sage: N = matroids.Uniform(2, 4) sage: M.is_isomorphic(N) True @@ -96,12 +95,21 @@ def U24(): REFERENCES: [Oxl2011]_, p. 639. + + TESTS:: + + sage: M = matroids.catalog.U24(range(4)) + sage: sorted(M.groundset()) + [0, 1, 2, 3] + sage: M.is_isomorphic(matroids.catalog.U24()) + True """ M = Uniform(2, 4) + M = _rename_and_relabel(M, "U(2, 4)", groundset) return M -def U25(): +def U25(groundset='abcde'): """ The uniform matroid of rank `2` on `5` elements. @@ -111,7 +119,7 @@ def U25(): sage: U25 = matroids.catalog.U25(); U25 U(2, 5): Matroid of rank 2 on 5 elements with circuit-closures - {2: {{0, 1, 2, 3, 4}}} + {2: {{'a', 'b', 'c', 'd', 'e'}}} sage: U35 = matroids.catalog.U35() sage: U25.is_isomorphic(U35.dual()) True @@ -119,12 +127,19 @@ def U25(): REFERENCES: [Oxl2011]_, p. 640. + + TESTS:: + + sage: M = matroids.catalog.U25(range(5)) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4] """ M = Uniform(2, 5) + M = _rename_and_relabel(M, "U(2, 5)", groundset) return M -def U35(): +def U35(groundset='abcde'): """ The uniform matroid of rank `3` on `5` elements. @@ -134,7 +149,7 @@ def U35(): sage: U35 = matroids.catalog.U35(); U35 U(3, 5): Matroid of rank 3 on 5 elements with circuit-closures - {3: {{0, 1, 2, 3, 4}}} + {3: {{'a', 'b', 'c', 'd', 'e'}}} sage: U25 = matroids.catalog.U25() sage: U35.is_isomorphic(U25.dual()) True @@ -142,12 +157,19 @@ def U35(): REFERENCES: [Oxl2011]_, p. 640. + + TESTS:: + + sage: M = matroids.catalog.U35(range(5)) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4] """ M = Uniform(3, 5) + M = _rename_and_relabel(M, "U(3, 5)", groundset) return M -def K4(): +def K4(groundset='abcdef'): r""" The graphic matroid of the complete graph `K_4`. @@ -176,12 +198,19 @@ def K4(): REFERENCES: [Oxl2011]_, p. 640. + + TESTS:: + + sage: M = matroids.catalog.K4(range(6)) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5] """ M = CompleteGraphic(4) + M = _rename_and_relabel(M, "M(K4)", groundset) return M -def Whirl3(): +def Whirl3(groundset='abcdef'): r""" The rank-`3` whirl. @@ -211,12 +240,19 @@ def Whirl3(): REFERENCES: [Oxl2011]_, p. 641. + + TESTS:: + + sage: W = matroids.catalog.Whirl3(range(6)) + sage: sorted(W.groundset()) + [0, 1, 2, 3, 4, 5] """ M = Whirl(3) + M = _rename_and_relabel(M, "Whirl(3)", groundset) return M -def Q6(): +def Q6(groundset='abcdef'): """ Return the matroid `Q_6`, represented over `GF(4)`. @@ -245,12 +281,12 @@ def Q6(): F = GF(4, 'x') x = F.gens()[0] A = Matrix(F, [[1, 0, 0, 1, 0, 1], [0, 1, 0, 1, 1, x], [0, 0, 1, 0, 1, 1]]) - M = QuaternaryMatroid(A, 'abcdef') - M.rename("Q6: " + repr(M)) + M = QuaternaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Q6") return M -def P6(): +def P6(groundset=None): """ Return the matroid `P_6`, represented as circuit closures. @@ -277,14 +313,13 @@ def P6(): [Oxl2011]_, p. 641-2. """ - E = 'abcdef' - CC = {2: ['abc'], 3: [E]} - M = CircuitClosuresMatroid(groundset=E, circuit_closures=CC) - M.rename("P6: " + repr(M)) + CC = {2: ['abc'], 3: ['abcdef']} + M = Matroid(groundset='abcdef', circuit_closures=CC) + M = _rename_and_relabel(M, "P6", groundset) return M -def U36(): +def U36(groundset='abcdef'): """ The uniform matroid of rank `3` on `6` elements. @@ -295,7 +330,7 @@ def U36(): sage: U36 = matroids.catalog.U36(); U36 U(3, 6): Matroid of rank 3 on 6 elements with circuit-closures - {3: {{0, 1, 2, 3, 4, 5}}} + {3: {{'a', 'b', 'c', 'd', 'e', 'f'}}} sage: Z = matroids.Spike(3, False) sage: U36.is_isomorphic(Z) True @@ -307,12 +342,21 @@ def U36(): REFERENCES: [Oxl2011]_, p. 642. + + TESTS:: + + sage: M = matroids.catalog.U36(range(6)) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5] + sage: M.is_isomorphic(matroids.catalog.U36()) + True """ M = Uniform(3, 6) + M = _rename_and_relabel(M, "U(3, 6)", groundset) return M -def R6(): +def R6(groundset='abcdef'): """ Return the matroid `R_6`, represented over `GF(3)`. @@ -340,12 +384,12 @@ def R6(): A = Matrix( GF(3), [[1, 0, 0, 1, 1, 1], [0, 1, 0, 1, 2, 1], [0, 0, 1, 1, 0, 2]] ) - M = TernaryMatroid(A, 'abcdef') - M.rename("R6: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "R6") return M -def Fano(): +def Fano(groundset='abcdefg'): r""" Return the Fano matroid, represented over `GF(2)`. @@ -390,12 +434,12 @@ def Fano(): GF(2), [[1, 0, 0, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 0, 1]] ) - M = BinaryMatroid(A, 'abcdefg') - M.rename("Fano: " + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Fano") return M -def FanoDual(): +def FanoDual(groundset='abcdefg'): """ Return the dual of the Fano matroid. @@ -424,13 +468,19 @@ def FanoDual(): REFERENCES: [Oxl2011]_, p. 643. + + TESTS:: + + sage: F7D = matroids.catalog.FanoDual(range(7)) + sage: sorted(F7D.groundset()) + [0, 1, 2, 3, 4, 5, 6] """ M = Fano().dual() - M.rename("F7*: " + repr(M)) + M = _rename_and_relabel(M, "F7*", groundset) return M -def NonFano(): +def NonFano(groundset='abcdefg'): """ Return the non-Fano matroid, represented over `GF(3)`. @@ -459,12 +509,12 @@ def NonFano(): GF(3), [[1, 0, 0, 0, 1, 1, 1], [0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 1, 1, 0, 1]] ) - M = TernaryMatroid(A, 'abcdefg') - M.rename("NonFano: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "NonFano") return M -def NonFanoDual(): +def NonFanoDual(groundset='abcdefg'): r""" Return the dual of the non-Fano matroid. @@ -492,13 +542,21 @@ def NonFanoDual(): REFERENCES: [Oxl2011]_, p. 643-4. + + TESTS:: + + sage: M = matroids.catalog.NonFanoDual(range(7)) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5, 6] + sage: M.is_isomorphic(matroids.catalog.NonFanoDual()) + True """ M = NonFano().dual() - M.rename("NonFano*: " + repr(M)) + M = _rename_and_relabel(M, "NonFano*", groundset) return M -def O7(): +def O7(groundset='abcdefg'): """ Return the matroid `O_7`, represented over `GF(3)`. @@ -523,12 +581,12 @@ def O7(): GF(3), [[1, 0, 0, 1, 1, 1, 1], [0, 1, 0, 0, 1, 2, 2], [0, 0, 1, 1, 0, 1, 0]] ) - M = TernaryMatroid(A, 'abcdefg') - M.rename("O7: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "O7") return M -def P7(): +def P7(groundset='abcdefg'): """ Return the matroid `P_7`, represented over `GF(3)`. @@ -556,12 +614,12 @@ def P7(): GF(3), [[1, 0, 0, 2, 1, 1, 0], [0, 1, 0, 1, 1, 0, 1], [0, 0, 1, 1, 0, 1, 1]] ) - M = TernaryMatroid(A, 'abcdefg') - M.rename("P7: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "P7") return M -def AG32(): +def AG32(groundset='abcdefgh'): """ Return the matroid `AG(3, 2)`. @@ -601,10 +659,11 @@ def AG32(): [Oxl2011]_, p. 645. """ M = AG(3, 2) + M = _rename_and_relabel(M, "AG(3, 2)", groundset) return M -def AG32prime(): +def AG32prime(groundset=None): """ Return the matroid `AG(3, 2)'`, represented as circuit closures. @@ -629,7 +688,7 @@ def AG32prime(): {'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f', 'h'}, {'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'}, {'d', 'e', 'f', 'g'}] - sage: M.is_valid() # long time + sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False @@ -665,12 +724,12 @@ def AG32prime(): ], 4: ['abcdefgh'], } - M = CircuitClosuresMatroid(groundset='abcdefgh', circuit_closures=CC) - M.rename("AG(3, 2)': " + repr(M)) + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "AG(3, 2)'", groundset) return M -def R8(): +def R8(groundset='abcdefgh'): """ Return the matroid `R_8`, represented over `GF(3)`. @@ -717,12 +776,12 @@ def R8(): [0, 0, 0, 1, 1, 1, 1, 2], ], ) - M = TernaryMatroid(A, 'abcdefgh') - M.rename("R8: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "R8") return M -def F8(): +def F8(groundset=None): """ Return the matroid `F_8`, represented as circuit closures. @@ -765,12 +824,12 @@ def F8(): ], 4: ['abcdefgh'], } - M = CircuitClosuresMatroid(groundset='abcdefgh', circuit_closures=CC) - M.rename("F8: " + repr(M)) + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "F8", groundset) return M -def Q8(): +def Q8(groundset=None): """ Return the matroid `Q_8`, represented as circuit closures. @@ -814,12 +873,12 @@ def Q8(): ], 4: ['abcdefgh'], } - M = CircuitClosuresMatroid(groundset='abcdefgh', circuit_closures=CC) - M.rename("Q8: " + repr(M)) + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "Q8", groundset) return M -def L8(): +def L8(groundset=None): """ Return the matroid `L_8`, represented as circuit closures. @@ -846,7 +905,7 @@ def L8(): Every single-element contraction is isomorphic to the free extension of `M(K_4)`:: - sage: K4 = matroids.catalog.K4() + sage: K4 = matroids.catalog.K4(range(6)) sage: Bext = [list(b) for b in K4.bases()] + [list(I)+[6] for I in ....: K4.independent_r_sets(2)] sage: K4ext = Matroid(bases=Bext) @@ -861,12 +920,12 @@ def L8(): """ CC = {3: ['abfg', 'bcdg', 'defg', 'cdeh', 'aefh', 'abch', 'aceg', 'bdfh'], 4: ['abcdefgh']} - M = CircuitClosuresMatroid(groundset='abcdefgh', circuit_closures=CC) - M.rename("L8: " + repr(M)) + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "L8", groundset) return M -def S8(): +def S8(groundset='abcdefgh'): """ Return the matroid `S_8`, represented over `GF(2)`. @@ -912,12 +971,12 @@ def S8(): [0, 0, 0, 1, 1, 1, 1, 1], ], ) - M = BinaryMatroid(A, 'abcdefgh') - M.rename("S8: " + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "S8") return M -def Vamos(): +def Vamos(groundset=None): r""" Return the `V\acute{a}mos` matroid, represented as circuit closures. @@ -938,7 +997,7 @@ def Vamos(): {'c', 'd', 'e', 'f'}, {'e', 'f', 'g', 'h'}] sage: M.is_dependent(['c', 'd', 'g', 'h']) False - sage: M.is_valid() # long time + sage: M.is_valid() and M.is_paving() # long time True sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True @@ -950,12 +1009,12 @@ def Vamos(): [Oxl2011]_, p. 649. """ CC = {3: ['abcd', 'abef', 'cdef', 'abgh', 'efgh'], 4: ['abcdefgh']} - M = CircuitClosuresMatroid(groundset='abcdefgh', circuit_closures=CC) - M.rename("Vamos: " + repr(M)) + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "Vamos", groundset) return M -def T8(): +def T8(groundset='abcdefgh'): """ Return the matroid `T_8`, represented over `GF(3)`. @@ -991,12 +1050,12 @@ def T8(): [0, 0, 0, 1, 1, 1, 1, 0], ], ) - M = TernaryMatroid(A, 'abcdefgh') - M.rename("T8: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "T8") return M -def J(): +def J(groundset='abcdefgh'): """ Return the matroid `J`, represented over `GF(3)`. @@ -1032,12 +1091,12 @@ def J(): [0, 0, 0, 1, 1, 0, 0, 1], ], ) - M = TernaryMatroid(A, 'abcdefgh') - M.rename("J: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "J") return M -def P8(): +def P8(groundset='abcdefgh'): """ Return the matroid `P_8`, represented over `GF(3)`. @@ -1070,12 +1129,12 @@ def P8(): [0, 0, 0, 1, 0, 1, 1, 2], ], ) - M = TernaryMatroid(A, 'abcdefgh') - M.rename("P8: " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "P8") return M -def P8pp(): +def P8pp(groundset=None): """ Return the matroid `P_8^=`, represented as circuit closures. @@ -1102,11 +1161,11 @@ def P8pp(): """ NSC = ['abfh', 'bceg', 'cdfh', 'adeg', 'acef', 'bdfg', 'acgh', 'bdeh'] M = Matroid(groundset='abcdefgh', rank=4, nonspanning_circuits=NSC) - M.rename("P8'': " + repr(M)) + M = _rename_and_relabel(M, "P8''", groundset) return M -def Wheel4(): +def Wheel4(groundset='abcdefgh'): """ Return the rank-`4` wheel. @@ -1129,10 +1188,11 @@ def Wheel4(): [Oxl2011]_, p. 651-2. """ M = Wheel(4) + M = _rename_and_relabel(M, "Wheel(4)", groundset) return M -def Whirl4(): +def Whirl4(groundset='abcdefgh'): """ Return the rank-`4` whirl. @@ -1155,10 +1215,11 @@ def Whirl4(): [Oxl2011]_, p. 652. """ M = Whirl(4) + M = _rename_and_relabel(M, "Whirl(4)", groundset) return M -def K33dual(): +def K33dual(groundset='abcdefghi'): """ Return the matroid `M*(K_{3, 3})`, represented over the regular partial field. @@ -1185,13 +1246,13 @@ def K33dual(): from sage.graphs.graph_generators import graphs G = graphs.CompleteBipartiteGraph(3, 3) - M = Matroid(groundset='abcdefghi', graph=G, regular=True) + M = Matroid(groundset=groundset, graph=G, regular=True) M = M.dual() - M.rename("M*(K3, 3): " + repr(M)) + M = _rename_and_relabel(M, "M*(K3, 3)") return M -def K33(): +def K33(groundset='abcdefghi'): r""" Return the graphic matroid `M(K_{3,3})`. @@ -1215,12 +1276,12 @@ def K33(): from sage.graphs.graph_generators import graphs G = graphs.CompleteBipartiteGraph(3, 3) - M = Matroid(groundset='abcdefghi', graph=G, regular=True) - M.rename("M(K3, 3): " + repr(M)) + M = Matroid(groundset=groundset, graph=G, regular=True) + M = _rename_and_relabel(M, "M(K3, 3)") return M -def AG23(): +def AG23(groundset='abcdefghi'): """ Return the matroid `AG(2, 3)`. @@ -1247,10 +1308,11 @@ def AG23(): [Oxl2011]_, p. 653. """ M = AG(2, 3) + M = _rename_and_relabel(M, "AG(2, 3)", groundset) return M -def TernaryDowling3(): +def TernaryDowling3(groundset='abcdefghi'): r""" Return the matroid `Q_3(GF(3)^\times)`, represented over `GF(3)`. @@ -1281,13 +1343,13 @@ def TernaryDowling3(): [0, 0, 1, 0, 0, 2, 1, 2, 1], ], ) - M = TernaryMatroid(A, 'abcdefghi') - M.rename("Q3(GF(3)x): " + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Q3(GF(3)x)") return M -def R9(): - r""" +def R9(groundset=None): + """ Return the matroid `R_9`. The ternary Reid geometry. The only `9`-element rank-`3` simple ternary @@ -1300,7 +1362,7 @@ def R9(): R9: Matroid of rank 3 on 9 elements with 15 nonspanning circuits sage: M.is_valid() True - sage: len(M.nonspanning_circuits()) + sage: len(list(M.nonspanning_circuits())) 15 sage: M.is_simple() and M.is_ternary() True @@ -1314,7 +1376,7 @@ def R9(): NSC = ['abc', 'abd', 'acd', 'aef', 'agh', 'bcd', 'bfh', 'bgi', 'ceg', 'cfi', 'deh', 'dei', 'dfg', 'dhi', 'ehi'] M = Matroid(rank=3, nonspanning_circuits=NSC) - M.rename("R9: " + repr(M)) + M = _rename_and_relabel(M, "R9", groundset) return M @@ -1338,7 +1400,7 @@ def Pappus(groundset=None): {'g', 'h', 'i'}] sage: M.is_dependent(['d', 'e', 'f']) True - sage: M.is_valid() # long time + sage: M.is_valid() True sage: M.automorphism_group().is_transitive() True @@ -1349,11 +1411,11 @@ def Pappus(groundset=None): """ NSC = ['abc', 'def', 'ceg', 'bfg', 'cdh', 'afh', 'bdi', 'aei', 'ghi'] M = Matroid(groundset='abcdefghi', rank=3, nonspanning_circuits=NSC) - M.rename("Pappus: " + repr(M)) + M = _rename_and_relabel(M, "Pappus", groundset) return M -def NonPappus(): +def NonPappus(groundset=None): """ Return the non-Pappus matroid. @@ -1363,15 +1425,16 @@ def NonPappus(): EXAMPLES:: - sage: from sage.matroids.advanced import setprint sage: M = matroids.catalog.NonPappus(); M NonPappus: Matroid of rank 3 on 9 elements with 8 nonspanning circuits - sage: setprint(M.nonspanning_circuits()) - [{'a', 'b', 'c'}, {'a', 'e', 'i'}, {'a', 'f', 'h'}, {'b', 'd', 'i'}, - {'b', 'f', 'g'}, {'c', 'd', 'h'}, {'c', 'e', 'g'}, {'g', 'h', 'i'}] + sage: NSC = set([('a', 'b', 'c'), ('a', 'e', 'i'), ('a', 'f', 'h'), + ....: ('b', 'd', 'i'), ('b', 'f', 'g'), ('c', 'd', 'h'), + ....: ('c', 'e', 'g'), ('g', 'h', 'i')]) + sage: NSC == set(tuple(sorted(C)) for C in M.nonspanning_circuits()) + True sage: M.is_dependent(['d', 'e', 'f']) False - sage: M.is_valid() # long time + sage: M.is_valid() and M.is_paving() True sage: M.automorphism_group().is_transitive() False @@ -1382,11 +1445,11 @@ def NonPappus(): """ NSC = ['abc', 'ceg', 'bfg', 'cdh', 'afh', 'bdi', 'aei', 'ghi'] M = Matroid(groundset='abcdefghi', rank=3, nonspanning_circuits=NSC) - M.rename("NonPappus: " + repr(M)) + M = _rename_and_relabel(M, "NonPappus", groundset) return M -def K5(): +def K5(groundset='abcdefghij'): """ Return the graphic matroid `M(K_5)`. @@ -1407,10 +1470,11 @@ def K5(): [Oxl2011]_, p. 656. """ M = CompleteGraphic(5) + M = _rename_and_relabel(M, "M(K5)", groundset) return M -def K5dual(): +def K5dual(groundset='abcdefghij'): """ Return the matroid `M^*(K_5)`. @@ -1419,7 +1483,7 @@ def K5dual(): EXAMPLES:: sage: M = matroids.catalog.K5dual(); M - M*(K5): Dual of 'M(K5): Graphic matroid of rank 4 on 10 elements' + M*(K5): Matroid of rank 6 on 10 elements with 15 circuits sage: M.is_3connected() True sage: G1 = M.automorphism_group() @@ -1432,16 +1496,16 @@ def K5dual(): [Oxl2011]_, p. 656. """ M = CompleteGraphic(5).dual() - # M = Matroid(circuits=M.circuits()) - M.rename("M*(K5): " + repr(M)) + M = Matroid(circuits=list(M.circuits())) + M = _rename_and_relabel(M, "M*(K5)", groundset) return M -def R10(): +def R10(groundset='abcdefghij'): """ Return the matroid `R_{10}`, represented over the regular partial field. - The matroid `R_{10}` is a 10-element regular matroid of rank-5. It is the + The NonDesargues matroid is a `10`-element matroid of rank-5. It is the unique splitter for the class of regular matroids. It is the graft matroid of `K_{3, 3}` in which every vertex is coloured. @@ -1492,8 +1556,8 @@ def R10(): [0, 0, 0, 0, 1, 1, 0, 0, 1, -1], ], ) - M = RegularMatroid(A, 'abcdefghij') - M.rename("R10: " + repr(M)) + M = RegularMatroid(A, groundset) + M = _rename_and_relabel(M, "R10") return M @@ -1520,7 +1584,7 @@ def NonDesargues(groundset=None): """ NSC = ['acj', 'aef', 'bce', 'bfj', 'bgi', 'chi', 'dfg', 'dij', 'egh'] M = Matroid(rank=3, nonspanning_circuits=NSC) - M.rename("NonDesargues: " + repr(M)) + M = _rename_and_relabel(M, "NonDesargues", groundset) return M @@ -1539,7 +1603,7 @@ def R12(groundset='abcdefghijkl'): R12: Regular matroid of rank 6 on 12 elements with 441 bases sage: M.is_isomorphic(M.dual()) and not M.equals(M.dual()) True - sage: M.is_valid() # long time + sage: M.is_valid() True sage: M.automorphism_group().is_transitive() False @@ -1559,12 +1623,12 @@ def R12(groundset='abcdefghijkl'): [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, -1, -1], ], ) - M = RegularMatroid(A, 'abcdefghijkl') - M.rename("R12: " + repr(M)) + M = RegularMatroid(A, groundset) + M = _rename_and_relabel(M, "R12") return M -def ExtendedTernaryGolayCode(): +def ExtendedTernaryGolayCode(groundset='abcdefghijkl'): """ Return the matroid of the extended ternary Golay code. @@ -1576,13 +1640,14 @@ def ExtendedTernaryGolayCode(): Extended Ternary Golay Code: Ternary matroid of rank 6 on 12 elements, type 6+ sage: C = LinearCode(M.representation()) - sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) # long time + sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) True sage: M.is_valid() True The automorphism group is the `5`-transitive Mathieu group `M12`: + sage: # long time sage: G = M.automorphism_group() sage: G.is_transitive() True @@ -1627,12 +1692,12 @@ def ExtendedTernaryGolayCode(): [0, 0, 0, 0, 1, 0, 1, 0, 2, 2, 1, 1], [0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1] ]) - M = TernaryMatroid(A, 'abcdefghijkl') - M.rename('Extended Ternary Golay Code: ' + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Extended Ternary Golay Code") return M -def T12(): +def T12(groundset='abcdefghijkl'): """ Return the matroid `T_{12}`. @@ -1668,12 +1733,12 @@ def T12(): [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1], ], ) - M = BinaryMatroid(A, 'abcdefghijkl') - M.rename("T12: " + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "T12") return M -def PG23(): +def PG23(groundset=None): """ Return the matroid `PG23`. @@ -1694,10 +1759,11 @@ def PG23(): [Oxl2011]_, p. 659. """ M = PG(2, 3) + M = _rename_and_relabel(M, groundset=groundset) return M -def Wheel(r, field=None, ring=None): +def Wheel(r, field=None, ring=None, groundset=None): r""" Return the rank-`r` wheel. @@ -1708,6 +1774,7 @@ def Wheel(r, field=None, ring=None): over the ring or field ``ring``. If the ring is `\ZZ`, then output will be a regular matroid. - ``field`` -- any field; same as ``ring``, but only fields are allowed + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: the rank-`r` wheel matroid, represented as a regular matroid @@ -1767,11 +1834,11 @@ def Wheel(r, field=None, ring=None): M = RegularMatroid(A) else: M = Matroid(A) - M.rename("Wheel(" + str(r) + "): " + repr(M)) + M = _rename_and_relabel(M, "Wheel(" + str(r) + ")", groundset) return M -def Whirl(r): +def Whirl(r, groundset=None): r""" Return the rank-`r` whirl. @@ -1780,6 +1847,7 @@ def Whirl(r): INPUT: - ``r`` -- a positive integer; the rank of the desired matroid. + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: the rank-`r` whirl matroid, represented as a ternary matroid @@ -1835,11 +1903,11 @@ def Whirl(r): else: A[i, 2 * r - 1] = 1 M = TernaryMatroid(A) - M.rename("Whirl(" + str(r) + "): " + repr(M)) + M = _rename_and_relabel(M, "Whirl(" + str(r) + ")", groundset) return M -def Uniform(r, n): +def Uniform(r, n, groundset=None): """ Return the uniform matroid of rank `r` on `n` elements. @@ -1852,6 +1920,7 @@ def Uniform(r, n): - ``r`` -- a nonnegative integer; the rank of the uniform matroid - ``n`` -- a nonnegative integer; the number of elements of the uniform matroid + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: the uniform matroid `U_{r,n}` @@ -1885,12 +1954,12 @@ def Uniform(r, n): CC = {r: [E]} else: CC = {} - M = CircuitClosuresMatroid(groundset=E, circuit_closures=CC) - M.rename("U(" + str(r) + ", " + str(n) + "): " + repr(M)) + M = Matroid(groundset=E, circuit_closures=CC) + M = _rename_and_relabel(M, "U(" + str(r) + ", " + str(n) + ")", groundset) return M -def PG(n, q, x=None): +def PG(n, q, x=None, groundset=None): """ Return the projective geometry of dimension ``n`` over the finite field of order ``q``. @@ -1904,6 +1973,7 @@ def PG(n, q, x=None): - ``x`` -- a string (default: ``None``); the name of the generator of a non-prime field, used for non-prime fields. If not supplied, ``'x'`` is used. + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: a linear matroid whose elements are the points of `PG(n, q)` @@ -1928,11 +1998,11 @@ def PG(n, q, x=None): P = ProjectiveSpace(n, F) A = Matrix(F, [list(p) for p in list(P)]).transpose() M = Matroid(A) - M.rename("PG(" + str(n) + ", " + str(q) + "): " + repr(M)) + M = _rename_and_relabel(M, "PG(" + str(n) + ", " + str(q) + ")", groundset) return M -def AG(n, q, x=None): +def AG(n, q, x=None, groundset=None): r""" Return the affine geometry of dimension ``n`` over the finite field of order ``q``. @@ -1949,6 +2019,7 @@ def AG(n, q, x=None): - ``x`` -- a string (default: ``None``); the name of the generator of a non-prime field, used for non-prime fields. If not supplied, ``'x'`` is used. + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: a linear matroid whose elements are the points of `AG(n, q)` @@ -1974,11 +2045,11 @@ def AG(n, q, x=None): F, [list(p) for p in list(P) if not list(p)[0] == 0] ).transpose() M = Matroid(A) - M.rename("AG(" + str(n) + ", " + str(q) + "): " + repr(M)) + M = _rename_and_relabel(M, "AG(" + str(n) + ", " + str(q) + ")", groundset) return M -def Z(r, t=True): +def Z(r, t=True, groundset=None): r""" Return the unique rank-`r` binary spike. @@ -1987,7 +2058,8 @@ def Z(r, t=True): INPUT: - ``r`` -- an integer (`r \ge 3`); the rank of the spike - - ``t`` -- a Boolean (default: ``True``); whether the spike is tipped + - ``t`` -- boolean (default: ``True``); whether the spike is tipped + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: a matroid; the unique rank-`r` binary spike (tipped or tipless) @@ -2004,7 +2076,9 @@ def Z(r, t=True): sage: import random sage: Z3 = matroids.Z(3) - sage: e = random.choice(list(Z3.groundset())) + sage: E = sorted(Z3.groundset()); E + ['t', 'x1', 'x2', 'x3', 'y1', 'y2', 'y3'] + sage: e = random.choice(E) sage: Z3.delete(e).is_isomorphic(matroids.catalog.K4()) True @@ -2020,6 +2094,18 @@ def Z(r, t=True): sage: Z4.is_isomorphic(matroids.catalog.AG32()) True + and `Z_4 \setminus e \cong S_8`, for all `e \neq t`:: + + sage: Z4 = matroids.Z(4) + sage: E = sorted(Z4.groundset()) + sage: E.remove('t') + sage: e = random.choice(E) + sage: S8 = matroids.catalog.S8() + sage: Z4.delete(e).is_isomorphic(S8) + True + sage: Z4.delete('t').is_isomorphic(S8) + False + The tipless binary spike is self-dual; it is identically self-dual if and only if r is even. It also has a transitive automorphism group:: @@ -2029,7 +2115,7 @@ def Z(r, t=True): True sage: Z.equals(Z.dual()) != (r % 2 == 1) # XOR True - sage: Z.automorphism_group().is_transitive() + sage: Z.automorphism_group().is_transitive() # long time True REFERENCES: @@ -2043,17 +2129,20 @@ def Z(r, t=True): A = Id.augment(J-Id).augment(tip) M = Matroid(A) + X = ['x'+str(i) for i in range(1, r+1)] + Y = ['y'+str(i) for i in range(1, r+1)] if t: - # M = M.relabel(X+Y+['t']) + M = M.relabel(X+Y+['t']) M.rename("Z_" + str(r) + ": " + repr(M)) else: M = M.delete(2*r) - # M = M.relabel(X+Y) + M = M.relabel(X+Y) M.rename("Z_" + str(r) + "\\t: " + repr(M)) + M = _rename_and_relabel(M, groundset=groundset) return M -def Spike(r, t=True, C3=[]): +def Spike(r, t=True, C3=[], groundset=None): r""" Return a rank-`r` spike. @@ -2076,6 +2165,7 @@ def Spike(r, t=True, C3=[]): - ``t`` -- boolean (default: ``True``); whether the spike is tipped - ``C3`` -- a list (default: ``[]``); a list of extra nonspanning circuits. The default (i.e. the empty list) results in a free `r`-spike + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: a matroid; a rank-`r` spike (tipped or tipless) @@ -2086,10 +2176,10 @@ def Spike(r, t=True, C3=[]): nonspanning circuits sage: M.is_isomorphic(matroids.Uniform(3, 6)) True - sage: len(matroids.Spike(8).bases()) + sage: len(list(matroids.Spike(8).bases())) 4864 sage: import random - sage: r = random.choice(range(3, 8)) + sage: r = random.choice(range(3, 20)) sage: M = matroids.Spike(r) sage: M.is_3connected() True @@ -2169,21 +2259,21 @@ def Spike(r, t=True, C3=[]): for i in range(1, r+1): NSC += [['t', 'x'+str(i), 'y'+str(i)]] for j in range(i+1, r+1): - NSC += [['t', 'x'+str(i), 'y'+str(i), 'x'+str(j), 'y'+str(j)]] + NSC += [['x'+str(i), 'y'+str(i), 'x'+str(j), 'y'+str(j)]] M = Matroid(groundset=E, rank=r, nonspanning_circuits=NSC) free = "Free " if C3 == [] else "" tip = "" if t else "\\t" M = M if t else M.delete('t') - M.rename(free + str(r) + "-spike" + tip + ": " + repr(M)) + M = _rename_and_relabel(M, free + str(r) + "-spike" + tip, groundset) return M # Q_r(A) -def Theta(n): +def Theta(n, groundset=None): r""" Return the matroid `\Theta_n`. @@ -2193,11 +2283,14 @@ def Theta(n): INPUT: - ``n`` -- an integer (`n \ge 2`); the rank of the matroid + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: a matroid (`\Theta_n`) EXAMPLES:: + sage: matroids.Theta(30) + Theta_30: Matroid of rank 30 on 60 elements with 16270 circuits sage: M = matroids.Theta(2) sage: U12 = matroids.Uniform(1, 2) sage: U = U12.direct_sum(U12) @@ -2251,11 +2344,11 @@ def Theta(n): C += [Yu + ['x'+str(s)] + ['x'+str(t)]] M = Matroid(groundset=E, circuits=C) - M.rename("Theta_" + str(n) + ": " + repr(M)) + M = _rename_and_relabel(M, "Theta_" + str(n), groundset) return M -def Psi(r): +def Psi(r, groundset=None): r""" Return the matroid `\Psi_r`. @@ -2264,6 +2357,7 @@ def Psi(r): INPUT: - ``r`` -- an integer (`r \ge 3`); the rank of the matroid + - ``groundset`` -- a string (optional); the groundset of the matroid OUTPUT: a matroid (`\Psi_r`) @@ -2294,7 +2388,7 @@ def Psi(r): sage: M = matroids.Psi(r) sage: M.equals(M.dual()) True - sage: M.automorphism_group().is_transitive() + sage: M.automorphism_group().is_transitive() # long time True REFERENCES: @@ -2333,7 +2427,7 @@ def genbin(n, bs=""): NSC += [C] M = Matroid(groundset=E, rank=r, nonspanning_circuits=NSC) - M.rename("Psi_" + str(r) + ": " + repr(M)) + M = _rename_and_relabel(M, "Psi_" + str(r), groundset) return M @@ -2346,7 +2440,7 @@ def genbin(n, bs=""): # 7 elements: -def RelaxedNonFano(): +def RelaxedNonFano(groundset=None): """ Return the relaxed NonFano matroid. @@ -2363,11 +2457,11 @@ def RelaxedNonFano(): w = GF4('w') A = Matrix(GF4, [[1, 1, 0, 1], [1, 0, 1, 1], [0, 1, w, 1]]) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("F7=: " + repr(M)) + M = _rename_and_relabel(M, "F7=", groundset) return M -def TippedFree3spike(): +def TippedFree3spike(groundset=None): """ Return the tipped free `3`-spike. @@ -2387,14 +2481,14 @@ def TippedFree3spike(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[0, 3, 5, 1, 4, 6, 2] ) - M.rename("Tipped rank-3 free spike: " + repr(M)) + M = _rename_and_relabel(M, "Tipped rank-3 free spike", groundset) return M # 8 elements: -def AG23minusDY(): +def AG23minusDY(groundset=None): r""" Return the matroid `AG23minusDY`. @@ -2411,11 +2505,11 @@ def AG23minusDY(): """ A = Matrix(GF(3), [[1, 1, 1, 1], [1, 0, 1, 2], [2, 0, 1, 2], [2, 1, 1, 0]]) M = TernaryMatroid(reduced_matrix=A) - M.rename("Delta-Y of AG(2,3)\\e: " + repr(M)) + M = _rename_and_relabel(M, "Delta-Y of AG(2,3)\\e", groundset) return M -def TQ8(): +def TQ8(groundset=None): """ Return the matroid `TQ8`. @@ -2436,11 +2530,11 @@ def TQ8(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 7, 5, 3, 8, 6, 4, 2] ) - M.rename("TQ8: " + repr(M)) + M = _rename_and_relabel(M, "TQ8", groundset) return M -def P8p(): +def P8p(groundset=None): """ Return the matroid `P8^-`. @@ -2463,11 +2557,11 @@ def P8p(): M = QuaternaryMatroid( reduced_matrix=A, groundset=['a', 'c', 'b', 'f', 'd', 'e', 'g', 'h'] ) - M.rename("P8-: " + repr(M)) + M = _rename_and_relabel(M, "P8-", groundset) return M -def KP8(): +def KP8(groundset=None): """ Return the matroid `KP8`. @@ -2490,11 +2584,11 @@ def KP8(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 4, 3, 5, 6, 7, 0, 2] ) - M.rename("KP8: " + repr(M)) + M = _rename_and_relabel(M, "KP8", groundset) return M -def Sp8(): +def Sp8(groundset=None): """ Return the matroid `Sp8`. @@ -2517,11 +2611,11 @@ def Sp8(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 2, 3, 5, 4, 6, 7, 8] ) - M.rename("Sp8: " + repr(M)) + M = _rename_and_relabel(M, "Sp8", groundset) return M -def Sp8pp(): +def Sp8pp(groundset=None): """ Return the matroid `Sp8=`. @@ -2542,11 +2636,11 @@ def Sp8pp(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 5, 6, 7, 2, 3, 4, 8] ) - M.rename("Sp8=: " + repr(M)) + M = _rename_and_relabel(M, "Sp8=", groundset) return M -def LP8(): +def LP8(groundset=None): """ Return the matroid `LP8`. @@ -2569,11 +2663,11 @@ def LP8(): M = QuaternaryMatroid( reduced_matrix=A, groundset=['a', 'b', 'd', 'e', 'c', 'f', 'g', 'h'] ) - M.rename("LP8: " + repr(M)) + M = _rename_and_relabel(M, "LP8", groundset) return M -def WQ8(): +def WQ8(groundset=None): r""" Return the matroid `WQ8`. @@ -2596,14 +2690,14 @@ def WQ8(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[0, 1, 3, 4, 2, 5, 6, 7] ) - M.rename("WQ8: " + repr(M)) + M = _rename_and_relabel(M, "WQ8", groundset) return M # 9 elements: -def BB9(): +def BB9(groundset=None): """ Return the matroid `BB9`. @@ -2638,11 +2732,11 @@ def BB9(): reduced_matrix=A, groundset=['i', 'b', 'd', 'j', 'h', 'f', 'c', 'a', 'k'] ) - M.rename("BB9: " + repr(M)) + M = _rename_and_relabel(M, "BB9", groundset) return M -def TQ9(): +def TQ9(groundset=None): """ Return the matroid `TQ9`. @@ -2673,11 +2767,11 @@ def TQ9(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 4, 6, 0, 2, 5, 3, 7, 8] ) - M.rename("TQ9: " + repr(M)) + M = _rename_and_relabel(M, "TQ9", groundset) return M -def TQ9p(): +def TQ9p(groundset=None): """ Return the matroid `TQ9^-`. @@ -2712,11 +2806,11 @@ def TQ9p(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 4, 7, 8, 0, 6, 5, 2, 3] ) - M.rename("TQ9': " + repr(M)) + M = _rename_and_relabel(M, "TQ9'", groundset) return M -def M8591(): +def M8591(groundset=None): r""" Return the matroid `M8591`. @@ -2740,11 +2834,11 @@ def M8591(): [0, 0, 1, 1, 0]] ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("M8591: " + repr(M)) + M = _rename_and_relabel(M, "M8591", groundset) return M -def PP9(): +def PP9(groundset=None): """ Return the matroid `PP9`. @@ -2780,11 +2874,11 @@ def PP9(): reduced_matrix=A, groundset=['a', 'c', 'b', 'f', 'd', 'e', 'g', 'h', 'z'] ) - M.rename("PP9: " + repr(M)) + M = _rename_and_relabel(M, "PP9", groundset) return M -def BB9gDY(): +def BB9gDY(groundset=None): r""" Return the matroid `BB9gDY`. @@ -2818,11 +2912,11 @@ def BB9gDY(): reduced_matrix=A, groundset=['c', 'd', 'i', 'f', 'h', 'a', 'j', 'k', 'b'] ) - M.rename("Segment cosegment exchange on BB9: " + repr(M)) + M = _rename_and_relabel(M, "Segment cosegment exchange on BB9", groundset) return M -def A9(): +def A9(groundset=None): """ Return the matroid `A9`. @@ -2847,11 +2941,11 @@ def A9(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[6, 5, 4, 1, 2, 3, 7, 8, 0] ) - M.rename("A9: " + repr(M)) + M = _rename_and_relabel(M, "A9", groundset) return M -def FN9(): +def FN9(groundset=None): """ Return the matroid `FN9`. @@ -2881,11 +2975,11 @@ def FN9(): reduced_matrix=A, groundset=['b0', 'a', 'y', 'z', 'x', "c0", 'b', 'c', 'a0'] ) - M.rename("FN9: " + repr(M)) + M = _rename_and_relabel(M, "FN9", groundset) return M -def FX9(): +def FX9(groundset=None): """ Return the matroid `FX9`. @@ -2913,11 +3007,11 @@ def FX9(): ) # M48806 M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FX9: " + repr(M)) + M = _rename_and_relabel(M, "FX9", groundset) return M -def KR9(): +def KR9(groundset=None): """ Return the matroid `KR9`. @@ -2948,11 +3042,11 @@ def KR9(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[2, 4, 0, 6, 1, 5, 3, 7, 8] ) - M.rename("KR9: " + repr(M)) + M = _rename_and_relabel(M, "KR9", groundset) return M -def KQ9(): +def KQ9(groundset=None): """ Return the matroid `KQ9`. @@ -2987,14 +3081,14 @@ def KQ9(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[5, 0, 4, 3, 2, 6, 8, 7, 1] ) - M.rename("KQ9: " + repr(M)) + M = _rename_and_relabel(M, "KQ9", groundset) return M # 10 elements: -def UG10(): +def UG10(groundset=None): """ Return the matroid `UG10`. @@ -3024,11 +3118,11 @@ def UG10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UG10: " + repr(M)) + M = _rename_and_relabel(M, "UG10", groundset) return M -def FF10(): +def FF10(groundset=None): """ Return the matroid `FF10`. @@ -3057,11 +3151,11 @@ def FF10(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ) - M.rename("FF10: " + repr(M)) + M = _rename_and_relabel(M, "FF10", groundset) return M -def GP10(): +def GP10(groundset=None): """ Return the matroid `GP10`. @@ -3087,11 +3181,11 @@ def GP10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("GP10: " + repr(M)) + M = _rename_and_relabel(M, "GP10", groundset) return M -def FZ10(): +def FZ10(groundset=None): """ Return the matroid `FZ10`. @@ -3118,11 +3212,11 @@ def FZ10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FZ10: " + repr(M)) + M = _rename_and_relabel(M, "FZ10", groundset) return M -def UQ10(): +def UQ10(groundset=None): """ Return the matroid `UQ10`. @@ -3150,11 +3244,11 @@ def UQ10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UQ10: " + repr(M)) + M = _rename_and_relabel(M, "UQ10", groundset) return M -def FP10(): +def FP10(groundset=None): """ Return the matroid `FP10`. @@ -3181,11 +3275,11 @@ def FP10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FP10: " + repr(M)) + M = _rename_and_relabel(M, "FP10", groundset) return M -def TQ10(): +def TQ10(groundset=None): """ Return the matroid `TQ10`. @@ -3218,11 +3312,11 @@ def TQ10(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 6, 8, 'c', 3, 7, 'd', 2, 5, 4] ) - M.rename("TQ10: " + repr(M)) + M = _rename_and_relabel(M, "TQ10", groundset) return M -def FY10(): +def FY10(groundset=None): """ Return the matroid `FY10`. @@ -3249,11 +3343,11 @@ def FY10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FY10: " + repr(M)) + M = _rename_and_relabel(M, "FY10", groundset) return M -def PP10(): +def PP10(groundset=None): """ Return the matroid `PP10`. @@ -3290,11 +3384,11 @@ def PP10(): reduced_matrix=A, groundset=['z', 'f', 'c', 'g', 'e', 'b', 'a', 'h', 'd', 'x'] ) - M.rename("PP10: " + repr(M)) + M = _rename_and_relabel(M, "PP10", groundset) return M -def FU10(): +def FU10(groundset=None): """ Return the matroid `FU10`. @@ -3320,11 +3414,11 @@ def FU10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FU10: " + repr(M)) + M = _rename_and_relabel(M, "FU10", groundset) return M -def D10(): +def D10(groundset=None): """ Return the matroid `D10`. @@ -3351,11 +3445,11 @@ def D10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("D10: " + repr(M)) + M = _rename_and_relabel(M, "D10", groundset) return M -def UK10(): +def UK10(groundset=None): """ Return the matroid `UK10`. @@ -3382,11 +3476,11 @@ def UK10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UK10: " + repr(M)) + M = _rename_and_relabel(M, "UK10", groundset) return M -def PK10(): +def PK10(groundset=None): """ Return the matroid `PK10`. @@ -3413,11 +3507,11 @@ def PK10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("PK10: " + repr(M)) + M = _rename_and_relabel(M, "PK10", groundset) return M -def GK10(): +def GK10(groundset=None): """ Return the matroid `GK10`. @@ -3444,11 +3538,11 @@ def GK10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("GK10: " + repr(M)) + M = _rename_and_relabel(M, "GK10", groundset) return M -def FT10(): +def FT10(groundset=None): """ Return the matroid `FT10`. @@ -3475,11 +3569,11 @@ def FT10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FT10: " + repr(M)) + M = _rename_and_relabel(M, "FT10", groundset) return M -def TK10(): +def TK10(groundset=None): """ Return the matroid `TK10`. @@ -3506,11 +3600,11 @@ def TK10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("TK10: " + repr(M)) + M = _rename_and_relabel(M, "TK10", groundset) return M -def KT10(): +def KT10(groundset=None): """ Return the matroid `KT10`. @@ -3537,11 +3631,11 @@ def KT10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("KT10: " + repr(M)) + M = _rename_and_relabel(M, "KT10", groundset) return M -def TU10(): +def TU10(groundset=None): """ Return the matroid `TU10`. @@ -3568,11 +3662,11 @@ def TU10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("TU10: " + repr(M)) + M = _rename_and_relabel(M, "TU10", groundset) return M -def UT10(): +def UT10(groundset=None): """ Return the matroid `UT10`. @@ -3599,11 +3693,11 @@ def UT10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UT10: " + repr(M)) + M = _rename_and_relabel(M, "UT10", groundset) return M -def FK10(): +def FK10(groundset=None): """ Return the matroid `FK10`. @@ -3630,11 +3724,11 @@ def FK10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FK10: " + repr(M)) + M = _rename_and_relabel(M, "FK10", groundset) return M -def KF10(): +def KF10(groundset=None): """ Return the matroid `KF10`. @@ -3661,14 +3755,14 @@ def KF10(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("KF10: " + repr(M)) + M = _rename_and_relabel(M, "KF10", groundset) return M # 11 elements: -def FA11(): +def FA11(groundset=None): """ Return the matroid `FA11`. @@ -3699,14 +3793,14 @@ def FA11(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[1, 3, 4, 2, 8, 7, 9, 0, 5, 10, 6] ) - M.rename("FA11: " + repr(M)) + M = _rename_and_relabel(M, "FA11", groundset) return M # 12 elements: -def FR12(): +def FR12(groundset=None): """ Return the matroid `FR12`. @@ -3734,11 +3828,11 @@ def FR12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FR12: " + repr(M)) + M = _rename_and_relabel(M, "FR12", groundset) return M -def GP12(): +def GP12(groundset=None): """ Return the matroid `GP12`. @@ -3766,11 +3860,11 @@ def GP12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("GP12: " + repr(M)) + M = _rename_and_relabel(M, "GP12", groundset) return M -def FQ12(): +def FQ12(groundset=None): """ Return the matroid `FQ12`. @@ -3807,11 +3901,11 @@ def FQ12(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[7, 4, 5, 9, 2, 1, 0, 6, 'd', 'c', 8, 3] ) - M.rename("FQ12: " + repr(M)) + M = _rename_and_relabel(M, "FQ12", groundset) return M -def FF12(): +def FF12(groundset=None): """ Return the matroid `FF12`. @@ -3846,11 +3940,11 @@ def FF12(): M = QuaternaryMatroid( reduced_matrix=A, groundset=[0, 4, 'c', 3, 5, 'd', 8, 9, 2, 7, 1, 6] ) - M.rename("FF12: " + repr(M)) + M = _rename_and_relabel(M, "FF12", groundset) return M -def FZ12(): +def FZ12(groundset=None): """ Return the matroid `FZ12`. @@ -3878,11 +3972,11 @@ def FZ12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FZ12: " + repr(M)) + M = _rename_and_relabel(M, "FZ12", groundset) return M -def UQ12(): +def UQ12(groundset=None): """ Return the matroid `UQ12`. @@ -3910,11 +4004,11 @@ def UQ12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UQ12: " + repr(M)) + M = _rename_and_relabel(M, "UQ12", groundset) return M -def FP12(): +def FP12(groundset=None): """ Return the matroid `FP12`. @@ -3942,11 +4036,11 @@ def FP12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FP12: " + repr(M)) + M = _rename_and_relabel(M, "FP12", groundset) return M -def FS12(): +def FS12(groundset=None): """ Return the matroid `FS12`. @@ -3973,11 +4067,11 @@ def FS12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FS12: " + repr(M)) + M = _rename_and_relabel(M, "FS12", groundset) return M -def UK12(): +def UK12(groundset=None): """ Return the matroid `UK12`. @@ -4005,11 +4099,11 @@ def UK12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UK12: " + repr(M)) + M = _rename_and_relabel(M, "UK12", groundset) return M -def UA12(): +def UA12(groundset=None): """ Return the matroid `UA12`. @@ -4037,11 +4131,11 @@ def UA12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UA12: " + repr(M)) + M = _rename_and_relabel(M, "UA12", groundset) return M -def AK12(): +def AK12(groundset=None): """ Return the matroid `AK12`. @@ -4069,11 +4163,11 @@ def AK12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("AK12: " + repr(M)) + M = _rename_and_relabel(M, "AK12", groundset) return M -def FK12(): +def FK12(groundset=None): """ Return the matroid `FK12`. @@ -4101,11 +4195,11 @@ def FK12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FK12: " + repr(M)) + M = _rename_and_relabel(M, "FK12", groundset) return M -def KB12(): +def KB12(groundset=None): """ Return the matroid `KB12`. @@ -4133,11 +4227,11 @@ def KB12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("KB12: " + repr(M)) + M = _rename_and_relabel(M, "KB12", groundset) return M -def AF12(): +def AF12(groundset=None): """ Return the matroid `AF12`. @@ -4165,11 +4259,11 @@ def AF12(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("AF12: " + repr(M)) + M = _rename_and_relabel(M, "AF12", groundset) return M -def NestOfTwistedCubes(): +def NestOfTwistedCubes(groundset=None): r""" Return the NestOfTwistedCubes matroid. @@ -4178,7 +4272,8 @@ def NestOfTwistedCubes(): EXAMPLES:: - sage: M = matroids.catalog.NestOfTwistedCubes() + sage: M = matroids.catalog.NestOfTwistedCubes(); M + NestOfTwistedCubes: Matroid of rank 6 on 12 elements with 57 circuits sage: M.is_3connected() True """ @@ -4188,7 +4283,7 @@ def complement(groundset, subset): gs = ["e1", "e2", "e3", "e4", "e5", "e6", "f1", "f2", "f3", "f4", "f5", "f6"] - M = CircuitClosuresMatroid( + M = Matroid( groundset=gs, circuit_closures={ 3: [ @@ -4228,15 +4323,15 @@ def complement(groundset, subset): 6: [gs], }, ) - M = Matroid(circuits=M.circuits()) - M.rename("NestOfTwistedCubes: " + repr(M)) + M = Matroid(circuits=list(M.circuits())) + M = _rename_and_relabel(M, "NestOfTwistedCubes", groundset) return M # 13 elements: -def XY13(): +def XY13(groundset=None): """ Return the matroid `XY13`. @@ -4264,14 +4359,14 @@ def XY13(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("XY13: " + repr(M)) + M = _rename_and_relabel(M, "XY13", groundset) return M # 14 elements: -def N3(): +def N3(groundset=None): """ Return the matroid `N3`. @@ -4302,11 +4397,11 @@ def N3(): ], ) M = TernaryMatroid(reduced_matrix=A) - M.rename("N3: " + repr(M)) + M = _rename_and_relabel(M, "N3", groundset) return M -def N3pp(): +def N3pp(groundset=None): """ Return the matroid `N3pp`. @@ -4338,11 +4433,11 @@ def N3pp(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("N3=: " + repr(M)) + M = _rename_and_relabel(M, "N3=", groundset) return M -def UP14(): +def UP14(groundset=None): """ Return the matroid `UP14`. @@ -4371,11 +4466,11 @@ def UP14(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("UP14: " + repr(M)) + M = _rename_and_relabel(M, "UP14", groundset) return M -def VP14(): +def VP14(groundset=None): """ Return the matroid `VP14`. @@ -4404,11 +4499,11 @@ def VP14(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("VP14: " + repr(M)) + M = _rename_and_relabel(M, "VP14", groundset) return M -def FV14(): +def FV14(groundset=None): """ Return the matroid `FV14` @@ -4437,11 +4532,11 @@ def FV14(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FV14: " + repr(M)) + M = _rename_and_relabel(M, "FV14", groundset) return M -def OW14(): +def OW14(groundset=None): """ Return the matroid `OW14`. @@ -4470,11 +4565,11 @@ def OW14(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("OW14: " + repr(M)) + M = _rename_and_relabel(M, "OW14", groundset) return M -def FM14(): +def FM14(groundset=None): """ Return the matroid `FM14`. @@ -4502,14 +4597,14 @@ def FM14(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FM14: " + repr(M)) + M = _rename_and_relabel(M, "FM14", groundset) return M # 15 elements: -def FA15(): +def FA15(groundset=None): """ Return the matroid `FA15`. @@ -4539,14 +4634,14 @@ def FA15(): ], ) M = QuaternaryMatroid(reduced_matrix=A) - M.rename("FA15: " + repr(M)) + M = _rename_and_relabel(M, "FA15", groundset) return M # 16 elements: -def N4(): +def N4(groundset=None): """ Return the matroid `N4`. @@ -4578,7 +4673,7 @@ def N4(): ], ) M = TernaryMatroid(reduced_matrix=A) - M.rename("N4: " + repr(M)) + M = _rename_and_relabel(M, "N4", groundset) return M @@ -4588,7 +4683,7 @@ def N4(): # ******************************** # -def NonVamos(): +def NonVamos(groundset=None): r""" Return the non-`V\acute{a}mos` matroid. @@ -4616,17 +4711,16 @@ def NonVamos(): [Oxl2011]_, p. 72, 84. """ - E = 'abcdefgh' CC = { 3: ['abcd', 'abef', 'cdef', 'abgh', 'cdgh', 'efgh'], - 4: [E] + 4: ['abcdefgh'] } - M = CircuitClosuresMatroid(groundset=E, circuit_closures=CC) - M.rename('NonVamos: ' + repr(M)) + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "NonVamos", groundset) return M -def NotP8(): +def NotP8(groundset='abcdefgh'): """ Return the matroid ``NotP8``. @@ -4650,12 +4744,12 @@ def NotP8(): [0, 0, 1, 0, 1, 1, 0, 1], [0, 0, 0, 1, -1, 1, 1, 1] ]) - M = TernaryMatroid(A, "abcdefgh") - M.rename('NotP8: ' + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "NotP8") return M -def AG23minus(): +def AG23minus(groundset=None): """ Return the ternary affine plane minus a point. @@ -4677,15 +4771,14 @@ class of near-regular matroids. [Oxl2011]_, p. 653. """ - E = 'abcdefgh' CC = {2: ['abc', 'ceh', 'fgh', 'adf', 'aeg', 'cdg', 'bdh', 'bef'], - 3: [E]} - M = CircuitClosuresMatroid(groundset=E, circuit_closures=CC) - M.rename('AG23minus: ' + repr(M)) + 3: ['abcdefgh']} + M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = _rename_and_relabel(M, "AG23minus", groundset) return M -def P9(): +def P9(groundset='abcdefghi'): """ Return the matroid `P_9`. @@ -4707,12 +4800,12 @@ def P9(): [0, 0, 1, 0, 0, 1, 1, 0, 1], [0, 0, 0, 1, 0, 0, 1, 1, 0] ]) - M = BinaryMatroid(A, "abcdefghi") - M.rename('P9: ' + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "P9") return M -def R9A(): +def R9A(groundset=None): """ Return the matroid `R_9^A`. @@ -4731,11 +4824,11 @@ def R9A(): NSC = ['abch', 'abde', 'abfi', 'acdi', 'aceg', 'adgh', 'aefh', 'bcdf', 'bdhi', 'begi', 'cehi', 'defi', 'fghi'] M = Matroid(groundset='abcdefghi', rank=4, nonspanning_circuits=NSC) - M.rename("R9A: " + repr(M)) + M = _rename_and_relabel(M, "R9A", groundset) return M -def R9B(): +def R9B(groundset=None): """ Return the matroid `R_9^B`. @@ -4754,11 +4847,11 @@ def R9B(): NSC = ['abde', 'bcdf', 'aceg', 'abch', 'befh', 'cdgh', 'bcei', 'adfi', 'abgi', 'degi', 'bdhi', 'aehi', 'fghi'] M = Matroid(groundset='abcdefghi', rank=4, nonspanning_circuits=NSC) - M.rename("R9B: " + repr(M)) + M = _rename_and_relabel(M, "R9B", groundset) return M -def Block_9_4(): +def Block_9_4(groundset=None): """ Return the paving matroid whose nonspanning circuits form the blocks of a `2-(9, 4, 3)` design. @@ -4770,7 +4863,7 @@ def Block_9_4(): circuits sage: M.is_valid() and M.is_paving() True - sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits()) + sage: BD = BlockDesign(M.groundset(), list(M.nonspanning_circuits())) sage: BD.is_t_design(return_parameters=True) (True, (2, 9, 4, 3)) """ @@ -4778,11 +4871,11 @@ def Block_9_4(): 'begh', 'dfgh', 'abei', 'cdfi', 'bcgi', 'adgi', 'efgi', 'bdhi', 'cehi', 'afhi'] M = Matroid(groundset='abcdefghi', rank=4, nonspanning_circuits=NSC) - M.rename("Block(9, 4): " + repr(M)) + M = _rename_and_relabel(M, "Block(9, 4)", groundset) return M -def TicTacToe(): +def TicTacToe(groundset=None): """ Return the TicTacToe matroid. @@ -4803,11 +4896,11 @@ def TicTacToe(): NSC = ['abcdg', 'adefg', 'abceh', 'abcfi', 'cdefi', 'adghi', 'beghi', 'cfghi'] M = Matroid(groundset='abcdefghi', rank=5, nonspanning_circuits=NSC) - M.rename("TicTacToe: " + repr(M)) + M = _rename_and_relabel(M, "TicTacToe", groundset) return M -def N1(): +def N1(groundset='abcdefghij'): r""" Return the matroid `N_1`, represented over `\GF{3}`. @@ -4833,12 +4926,12 @@ def N1(): [0, 0, 0, 1, 0, 0, 0, 1, 2, 2], [0, 0, 0, 0, 1, 1, 1, 1, 2, 0] ]) - M = TernaryMatroid(A, 'abcdefghij') - M.rename('N1: ' + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "N1") return M -def Block_10_5(): +def Block_10_5(groundset=None): """ Return the paving matroid whose nonspanning circuits form the blocks of a `3-(10, 5, 3)` design. @@ -4850,7 +4943,7 @@ def Block_10_5(): circuits sage: M.is_valid() and M.is_paving() True - sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits()) + sage: BD = BlockDesign(M.groundset(), list(M.nonspanning_circuits())) sage: BD.is_t_design(return_parameters=True) (True, (3, 10, 5, 3)) """ @@ -4861,11 +4954,11 @@ def Block_10_5(): 'abcij', 'bdeij', 'cdfij', 'adgij', 'efgij', 'aehij', 'bfhij', 'cghij'] M = Matroid(groundset='abcdefghij', rank=5, nonspanning_circuits=NSC) - M.rename("Block(10, 5): " + repr(M)) + M = _rename_and_relabel(M, "Block(10, 5)", groundset) return M -def Q10(): +def Q10(groundset='abcdefghij'): r""" Return the matroid `Q_{10}`, represented over `\GF{4}`. @@ -4876,7 +4969,8 @@ def Q10(): EXAMPLES:: - sage: M = matroids.catalog.Q10() + sage: M = matroids.catalog.Q10(); M + Q10: Quaternary matroid of rank 5 on 10 elements sage: M.is_isomorphic(M.dual()) True sage: M.is_valid() @@ -4901,12 +4995,12 @@ def Q10(): [0, 0, 0, 1, 0, 0, 0, x + 1, 1, x], [0, 0, 0, 0, 1, x, 0, 0, x + 1, 1] ]) - M = QuaternaryMatroid(A, "abcdefghij") - M.rename('Q10: ' + repr(M)) + M = QuaternaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Q10") return M -def BetsyRoss(): +def BetsyRoss(groundset=None): """ Return the Betsy Ross matroid, represented by circuit closures. @@ -4928,11 +5022,11 @@ def BetsyRoss(): 'bef', 'bej', 'bfj', 'bgh', 'bik', 'ceh', 'cei', 'cfg', 'chi', 'cjk', 'dfk', 'dgh', 'dij', 'efj', 'egk', 'ehi'] M = Matroid(groundset='abcdefghijk', rank=3, nonspanning_circuits=NSC) - M.rename("BetsyRoss: " + repr(M)) + M = _rename_and_relabel(M, "BetsyRoss", groundset) return M -def N2(): +def N2(groundset='abcdefghijkl'): r""" Return the matroid `N_2`, represented over `\GF{3}`. @@ -4959,8 +5053,8 @@ def N2(): [0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1, 2, 2, 1, 0, 1] ]) - M = TernaryMatroid(A, "abcdefghijkl") - M.rename('N2: ' + repr(M)) + M = TernaryMatroid(A, groundset) + M = _rename_and_relabel(M, "N2") return M @@ -4994,12 +5088,12 @@ def D16(groundset='abcdefghijklmnop'): # A.K.A. the Carolyn Chun Matroid [0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0] ]) - M = BinaryMatroid(A, "abcdefghijklmnop") - M.rename('D16: ' + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "D16") return M -def Terrahawk(): # A.K.A. the Dillon Mayhew Matroid +def Terrahawk(groundset='abcdefghijklmnop'): # aka the Dillon Mayhew Matroid """ Return the Terrahawk matroid. @@ -5027,12 +5121,12 @@ def Terrahawk(): # A.K.A. the Dillon Mayhew Matroid [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0] ]) - M = BinaryMatroid(A, "abcdefghijklmnop") - M.rename('Terrahawk: ' + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Terrahawk") return M -def ExtendedBinaryGolayCode(): +def ExtendedBinaryGolayCode(groundset='abcdefghijklmnopqrstuvwx'): """ Return the matroid of the extended binary Golay code. @@ -5076,12 +5170,12 @@ def ExtendedBinaryGolayCode(): [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ]) - M = BinaryMatroid(A, "abcdefghijklmnopqrstuvwx") - M.rename('Extended Binary Golay Code: ' + repr(M)) + M = BinaryMatroid(A, groundset) + M = _rename_and_relabel(M, "Extended Binary Golay Code") return M -def CompleteGraphic(n): +def CompleteGraphic(n, groundset=None): """ Return the cycle matroid of the complete graph on `n` vertices. @@ -5115,5 +5209,39 @@ def CompleteGraphic(n): groundset=list(range((n * (n - 1)) // 2)), graph=graphs.CompleteGraph(n) ) - M.rename("M(K" + str(n) + "): " + repr(M)) + M = _rename_and_relabel(M, "M(K" + str(n) + ")", groundset) + return M + + +# helper function + + +def _rename_and_relabel(M, name=None, groundset=None): + """ + Return a renamed and relabeled matroid. + + This is a helper function for easily renaming and relabeling matroids upon + definition in the context of the database of matroids. + + INPUT: + + - ``M`` -- a matroid + - ``name`` -- a string (optional) + - ``groundset`` -- a string (optional) + + OUTPUT: + + a matroid + """ + if groundset is not None: + if len(groundset) != len(M.groundset()): + raise ValueError( + "The groundset should be of size %s (%s given)." % + (len(M.groundset()), len(groundset)) + ) + M = M.relabel(dict(zip(M.groundset(), groundset))) + + if name is not None: + M.rename(name+": " + repr(M)) + return M diff --git a/src/sage/matroids/flats_matroid.pxd b/src/sage/matroids/flats_matroid.pxd index e97b929429b..026c934a185 100644 --- a/src/sage/matroids/flats_matroid.pxd +++ b/src/sage/matroids/flats_matroid.pxd @@ -13,8 +13,9 @@ cdef class FlatsMatroid(Matroid): cpdef flats(self, k) cpdef whitney_numbers2(self) - # isomorphism + # isomorphism and relabeling cpdef _is_isomorphic(self, other, certificate=*) + cpdef relabel(self, f) # verification cpdef is_valid(self) diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index ae95455bb2f..23951d666f6 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -300,6 +300,51 @@ cdef class FlatsMatroid(Matroid): version = 0 return sage.matroids.unpickling.unpickle_flats_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: from sage.matroids.flats_matroid import FlatsMatroid + sage: M = FlatsMatroid(matroids.catalog.RelaxedNonFano()) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5, 6] + sage: N = M.relabel({'g':'x', 0:'z'}) # 'g':'x' is ignored + sage: from sage.matroids.utilities import cmp_elements_key + sage: sorted(N.groundset(), key=cmp_elements_key) + [1, 2, 3, 4, 5, 6, 'z'] + sage: M.is_isomorphic(N) + True + + TESTS:: + + sage: from sage.matroids.flats_matroid import FlatsMatroid + sage: M = FlatsMatroid(matroids.catalog.RelaxedNonFano()) + sage: f = {0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f', 6: 'g'} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self._groundset] + F = {} + for i in self._F: + F[i] = [] + F[i] += [[d[y] for y in list(x)] for x in self._F[i]] + M = FlatsMatroid(groundset=E, flats=F) + return M + # enumeration cpdef flats(self, k): diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 57bbae15f22..f1e8840f281 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -2001,3 +2001,41 @@ def regular_matroid(self): from sage.matroids.constructor import Matroid as ConstructorMatroid X = [l for u, v, l in self._G.edge_iterator()] return ConstructorMatroid(groundset=X, graph=self._G, regular=True) + + def relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: M = matroids.CompleteGraphic(4) + sage: sorted(M.groundset()) + [0, 1, 2, 3, 4, 5] + sage: N = M.relabel({0:6, 5:'e'}) + sage: sorted(N.groundset(), key=str) + [1, 2, 3, 4, 6, 'e'] + sage: N.is_isomorphic(M) + True + + TESTS:: + + sage: M = matroids.CompleteGraphic(4) + sage: f = {0: 'a', 1: 'b', 2: 'c', 3: 'd', 4: 'e', 5: 'f', 6: 'g'} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset()] + M = GraphicMatroid(self.graph(), groundset=E) + return M diff --git a/src/sage/matroids/linear_matroid.pxd b/src/sage/matroids/linear_matroid.pxd index 4902ccef6ef..89e9580024e 100644 --- a/src/sage/matroids/linear_matroid.pxd +++ b/src/sage/matroids/linear_matroid.pxd @@ -28,6 +28,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): cpdef is_field_isomorphism(self, other, morphism) # cpdef is_field_isomorphic(self, other) # TODO: currently only works as ``def`` cpdef _fast_isom_test(self, other) + cpdef relabel(self, f) cpdef _minor(self, contractions, deletions) cpdef dual(self) @@ -88,6 +89,7 @@ cdef class BinaryMatroid(LinearMatroid): cpdef BinaryMatrix _projection(self) cpdef BinaryMatrix _projection_partition(self) cpdef _fast_isom_test(self, other) + cpdef relabel(self, f) cpdef is_graphic(self) cpdef is_valid(self) @@ -118,6 +120,7 @@ cdef class TernaryMatroid(LinearMatroid): cpdef _principal_quadripartition(self) cpdef TernaryMatrix _projection(self) cpdef _fast_isom_test(self, other) + cpdef relabel(self, f) cpdef is_valid(self) @@ -144,6 +147,7 @@ cdef class QuaternaryMatroid(LinearMatroid): cpdef bicycle_dimension(self) cpdef _principal_tripartition(self) cpdef _fast_isom_test(self, other) + cpdef relabel(self, f) cpdef is_valid(self) @@ -159,6 +163,7 @@ cdef class RegularMatroid(LinearMatroid): cpdef _invariant(self) cpdef _fast_isom_test(self, other) + cpdef relabel(self, f) cpdef bases_count(self) cpdef _projection(self) diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 7b6eb9bb711..1fb95238100 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -2973,6 +2973,42 @@ cdef class LinearMatroid(BasisExchangeMatroid): data = (A, gs, reduced, self.get_custom_name()) return sage.matroids.unpickling.unpickle_linear_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: M = matroids.catalog.Fano() + sage: sorted(M.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + sage: N = M.relabel({'g':'x'}) + sage: sorted(N.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'x'] + + TESTS:: + + sage: M = matroids.catalog.Fano() + sage: f = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset_list()] + M = LinearMatroid(groundset=E, matrix=self._matrix_()) + return M + # Binary matroid cdef class BinaryMatroid(LinearMatroid): @@ -4038,6 +4074,42 @@ cdef class BinaryMatroid(LinearMatroid): data = (A, gs, basis, self.get_custom_name()) return sage.matroids.unpickling.unpickle_binary_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: M = matroids.catalog.Fano() + sage: sorted(M.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + sage: N = M.relabel({'g':'x'}) + sage: sorted(N.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'x'] + + TESTS:: + + sage: M = matroids.catalog.Fano() + sage: f = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset_list()] + M = BinaryMatroid(groundset=E, matrix=self._matrix_()) + return M + cdef class TernaryMatroid(LinearMatroid): r""" Ternary matroids. @@ -4932,6 +5004,42 @@ cdef class TernaryMatroid(LinearMatroid): data = (A, gs, basis, self.get_custom_name()) return sage.matroids.unpickling.unpickle_ternary_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: M = matroids.catalog.NonFano() + sage: sorted(M.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + sage: N = M.relabel({'g':'x'}) + sage: sorted(N.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'x'] + + TESTS:: + + sage: M = matroids.catalog.NonFano() + sage: f = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset_list()] + M = TernaryMatroid(groundset=E, matrix=self._matrix_()) + return M + # Quaternary Matroids cdef class QuaternaryMatroid(LinearMatroid): @@ -5657,6 +5765,42 @@ cdef class QuaternaryMatroid(LinearMatroid): data = (A, gs, basis, self.get_custom_name()) return sage.matroids.unpickling.unpickle_quaternary_matroid, (version, data) + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: M = matroids.catalog.RelaxedNonFano("abcdefg") + sage: sorted(M.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'g'] + sage: N = M.relabel({'g':'x'}) + sage: sorted(N.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'x'] + + TESTS:: + + sage: M = matroids.catalog.RelaxedNonFano("abcdefg") + sage: f = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset_list()] + M = QuaternaryMatroid(groundset=E, matrix=self._matrix_()) + return M + # Regular Matroids cdef class RegularMatroid(LinearMatroid): @@ -6575,3 +6719,39 @@ cdef class RegularMatroid(LinearMatroid): reduced = True data = (A, gs, reduced, self.get_custom_name()) return sage.matroids.unpickling.unpickle_regular_matroid, (version, data) + + cpdef relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: M = matroids.catalog.R10() + sage: sorted(M.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'] + sage: N = M.relabel({'g':'x'}) + sage: sorted(N.groundset()) + ['a', 'b', 'c', 'd', 'e', 'f', 'h', 'i', 'j', 'x'] + + TESTS:: + + sage: M = matroids.catalog.R10() + sage: f = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([M._relabel_map(f)[x] for x in S]) + """ + d = self._relabel_map(f) + E = [d[x] for x in self.groundset_list()] + M = RegularMatroid(groundset=E, matrix=self._matrix_()) + return M diff --git a/src/sage/matroids/matroid.pxd b/src/sage/matroids/matroid.pxd index 5103bcf2a4b..7aa97843c7e 100644 --- a/src/sage/matroids/matroid.pxd +++ b/src/sage/matroids/matroid.pxd @@ -141,6 +141,7 @@ cdef class Matroid(SageObject): cpdef equals(self, other) cpdef is_isomorphism(self, other, morphism) cpdef _is_isomorphism(self, other, morphism) + cpdef _relabel_map(self, f) # minors, dual, truncation cpdef minor(self, contractions=*, deletions=*) diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 781f72592ac..23cfee2f9b4 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -120,6 +120,7 @@ additional functionality (e.g. linear extensions). - :meth:`is_binary() ` - :meth:`ternary_matroid() ` - :meth:`is_ternary() ` + - :meth:`relabel() ` - Optimization - :meth:`max_weight_independent() ` @@ -8389,3 +8390,85 @@ cdef class Matroid(SageObject): # place this matroid at the beginning of the list matroids.insert(0, self) return union_matroid.MatroidSum(iter(matroids)) + + cpdef _relabel_map(self, f): + """ + Return a dictionary from the groundset to the relabeled groundset + and check that the mapping defined by ``f`` is valid. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e`; if + ``e not in f`` then the identity map is assumed + + EXAMPLES:: + + sage: M = matroids.catalog.Vamos([1,2,3,4,5,6,7,8]) + sage: M._relabel_map({1:'a', 8:'h', 9:'i'}) + {1: 'a', 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 'h'} + sage: M._relabel_map({1:2}) + Traceback (most recent call last): + ... + ValueError: given map doesn't relabel the groundset properly + """ + E = set() + d = {} + for x in self.groundset(): + try: + E.add(f[x]) + d[x] = f[x] + except LookupError: + E.add(x) + d[x] = x + if len(E) != len(self.groundset()): + raise ValueError("given map doesn't relabel the groundset properly") + return d + + def relabel(self, f): + r""" + Return an isomorphic matroid with relabeled groundset. + + The output is obtained by relabeling each element ``e`` by ``f[e]``, + where ``f`` is a given injective map. If ``e not in f`` then the + identity map is assumed. + + INPUT: + + - ``f`` -- a python object such that `f[e]` is the new label of `e` + + OUTPUT: a matroid + + EXAMPLES:: + + sage: from sage.matroids.rank_matroid import RankMatroid + sage: N = matroids.catalog.Sp8pp() + sage: M = RankMatroid(groundset=N.groundset(), rank_function=N.rank) + sage: sorted(M.groundset()) + [1, 2, 3, 4, 5, 6, 7, 8] + sage: N = M.relabel({8:0}) + sage: sorted(N.groundset()) + [0, 1, 2, 3, 4, 5, 6, 7] + sage: M.is_isomorphic(N) + True + + TESTS:: + + sage: from sage.matroids.rank_matroid import RankMatroid + sage: N = matroids.catalog.Sp8pp() + sage: M = RankMatroid(groundset=N.groundset(), rank_function=N.rank) + sage: f = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h'} + sage: N = M.relabel(f) + sage: for S in powerset(M.groundset()): + ....: assert M.rank(S) == N.rank([f[x] for x in S]) + """ + from sage.matroids.rank_matroid import RankMatroid + d = self._relabel_map(f) + E = [d[x] for x in self.groundset()] + + def f_relabel(X): + d_inv = {d[x]: x for x in self.groundset()} + X_inv = [d_inv[x] for x in X] + return self.rank(X_inv) + + M = RankMatroid(groundset=E, rank_function=f_relabel) + return M From 18487f30bb8f4c5c055c06fa824d1d7ec00e9ca3 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Wed, 10 Apr 2024 10:17:06 +0900 Subject: [PATCH 106/183] Allow characteristic 2 and adding some more tests. --- .../lie_algebras/classical_lie_algebra.py | 48 ++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/src/sage/algebras/lie_algebras/classical_lie_algebra.py b/src/sage/algebras/lie_algebras/classical_lie_algebra.py index 28a148eb645..fae28403d4f 100644 --- a/src/sage/algebras/lie_algebras/classical_lie_algebra.py +++ b/src/sage/algebras/lie_algebras/classical_lie_algebra.py @@ -1706,7 +1706,12 @@ def _construct_struct_coeffs(self, R, p_roots): Check that we can construct Lie algebras over positive characteristic fields (:issue:`37773`):: + sage: sl3 = LieAlgebra(GF(3), cartan_type=['A',2]) + sage: sl3.center().basis() + Family (2*h1 + h2,) sage: sl4 = lie_algebras.sl(GF(3), 4) + sage: sl4.center().dimension() + 0 sage: sl4.is_nilpotent() False sage: sl4.lower_central_series() @@ -1720,10 +1725,28 @@ def _construct_struct_coeffs(self, R, p_roots): sage: sl5 = lie_algebras.sl(GF(3), 5) sage: sl5.killing_form_matrix().det() 2 + + This also includes characteristic 2:: + + sage: sl4 = LieAlgebra(GF(2), cartan_type=['A',3]) + sage: sl4.center().basis() + Family (h1 + h3,) + sage: sp6 = LieAlgebra(GF(2), cartan_type=['C',3]) + sage: sp6.killing_form_matrix().det() + 0 + sage: F4 = LieAlgebra(GF(2), cartan_type=['F',4]) + sage: F4.killing_form_matrix().det() # long time + 0 + sage: G2 = LieAlgebra(GF(2), cartan_type=['G',2]) + sage: G2.killing_form_matrix().det() + 0 """ alphacheck = self._Q.simple_coroots() roots = frozenset(self._Q.roots()) - one = R.one() + # We do everything initially over QQ and then convert to R at the end + # since this is a ZZ-basis. + from sage.rings.rational_field import QQ + one = QQ.one() # Determine the signs for the structure coefficients from the root system # We first create the special roots @@ -1747,12 +1770,12 @@ def _construct_struct_coeffs(self, R, p_roots): continue if b - x in roots: - t1 = (R((b-x).norm_squared()) / R(b.norm_squared()) + t1 = ((b-x).norm_squared() / b.norm_squared() * sp_sign[(x, b-x)] * sp_sign[(a, y-a)]) else: t1 = 0 if a - x in roots: - t2 = (R((a-x).norm_squared()) / R(a.norm_squared()) + t2 = ((a-x).norm_squared() / a.norm_squared() * sp_sign[(x, a-x)] * sp_sign[(b, y-b)]) else: t2 = 0 @@ -1775,15 +1798,15 @@ def e_coeff(r, s): for i,r in enumerate(p_roots): # [e_r, h_i] and [h_i, f_r] for ac in alphacheck: - c = r.scalar(ac) + c = R(r.scalar(ac)) if c == 0: continue s_coeffs[(r, ac)] = {r: -c} s_coeffs[(ac, -r)] = {-r: -c} # [e_r, f_r] - s_coeffs[(r, -r)] = {alphacheck[j]: c - for j, c in r.associated_coroot()} + s_coeffs[(r, -r)] = {alphacheck[j]: Rc + for j, c in r.associated_coroot() if (Rc := R(c))} # [e_r, e_s] and [e_r, f_s] with r != +/-s # We assume s is positive, as otherwise we negate @@ -1799,16 +1822,19 @@ def e_coeff(r, s): c *= -sp_sign[(b, a)] else: c *= sp_sign[(a, b)] - s_coeffs[(-r, s)] = {a: -c} - s_coeffs[(r, -s)] = {-a: c} + c = R(c) + if c: + s_coeffs[(-r, s)] = {a: -c} + s_coeffs[(r, -s)] = {-a: c} # [e_r, e_s] a = r + s if a in p_roots: # (r, s) is a special pair - c = e_coeff(r, s) * sp_sign[(r, s)] - s_coeffs[(r, s)] = {a: c} - s_coeffs[(-r, -s)] = {-a: -c} + c = R(e_coeff(r, s) * sp_sign[(r, s)]) + if c: + s_coeffs[(r, s)] = {a: c} + s_coeffs[(-r, -s)] = {-a: -c} return s_coeffs From da3d9de837ad3f62cd410ef17bac89a83dd0b599 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Wed, 10 Apr 2024 11:31:43 +0900 Subject: [PATCH 107/183] Laurent polynomials: Fixing xgcd to match gcd. Adding euclidean_degree() method. --- .../rings/polynomial/laurent_polynomial.pyx | 75 ++++++++++++++++--- .../polynomial/laurent_polynomial_ring.py | 4 +- 2 files changed, 67 insertions(+), 12 deletions(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial.pyx b/src/sage/rings/polynomial/laurent_polynomial.pyx index a830ef7f510..5ae5dee4a9b 100644 --- a/src/sage/rings/polynomial/laurent_polynomial.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial.pyx @@ -1318,22 +1318,59 @@ cdef class LaurentPolynomial_univariate(LaurentPolynomial): return ~self raise ArithmeticError("element is not a unit") + @coerce_binop def xgcd(self, other): - """ + r""" Extended `gcd` for univariate Laurent polynomial rings over a field. + OUTPUT: + + A triple ``(g, p, q)`` such that ``g`` is the :meth:`gcd` of + ``self`` (`= a`) and ``other`` (`= b`), and ``p`` and ``q`` are + cofactors satisfying the Bezout identity + + .. MATH:: + + g = p \cdot a + q \cdot b. + EXAMPLES:: sage: S. = LaurentPolynomialRing(QQ) - sage: (t^-2 + 1).xgcd(t^-3 + 1) - (1, 1/2*t^2 - 1/2*t^3 - 1/2*t^4, 1/2*t^3 + 1/2*t^4) + sage: a = t^-2 + 1 + sage: b = t^-3 + 1 + sage: g, p, q = a.xgcd(b); (g, p, q) + (t^-3, 1/2*t^-1 - 1/2 - 1/2*t, 1/2 + 1/2*t) + sage: g == p * a + q * b + True + sage: g == a.gcd(b) + True + sage: t.xgcd(t) + (t, 0, 1) + sage: t.xgcd(5) + (1, 0, 1/5) """ - R = self.parent() - S = R.polynomial_ring() - f, df = self.monomial_reduction() - g, dg = other.monomial_reduction() - h, p, q = f.xgcd(g) - return R(h), p / df, q / dg + cdef LaurentPolynomial_univariate elt = other + cdef LaurentPolynomial_univariate ret_gcd, ret_p, ret_q + cdef long n = min(self.__n, elt.__n) + + h, p, q = self.__u.xgcd(elt.__u) + + ret_gcd = self._new_c() + ret_gcd.__u = h + ret_gcd.__n = n + ret_gcd._normalize() + + ret_p = self._new_c() + ret_p.__u = p + ret_p.__n = n - self.__n + ret_p._normalize() + + ret_q = self._new_c() + ret_q.__u = q + ret_q.__n = n - elt.__n + ret_q._normalize() + + return (ret_gcd, ret_p, ret_q) def inverse_mod(a, m): """ @@ -1424,6 +1461,26 @@ cdef class LaurentPolynomial_univariate(LaurentPolynomial): ret._normalize() return ret + def euclidean_degree(self): + r""" + Return the degree of ``self`` as an element of an Euclidean domain. + + This is the Euclidean degree of the underlying polynomial. + + EXAMPLES:: + + sage: R. = LaurentPolynomialRing(QQ) + sage: (x^-5 + x^2).euclidean_degree() + 7 + + sage: R. = LaurentPolynomialRing(ZZ) + sage: (x^-5 + x^2).euclidean_degree() + Traceback (most recent call last): + ... + NotImplementedError + """ + return self.__u.euclidean_degree() + @coerce_binop def quo_rem(self, other): r""" diff --git a/src/sage/rings/polynomial/laurent_polynomial_ring.py b/src/sage/rings/polynomial/laurent_polynomial_ring.py index 6d24de9f96f..808e897b49c 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ring.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ring.py @@ -436,9 +436,7 @@ def __init__(self, R): sage: L = LaurentPolynomialRing(QQ,'x') sage: type(L) - sage: L == loads(dumps(L)) - True - + sage: TestSuite(L).run() TESTS:: From ee2ca64f0e11bb4af1526568f0cb8a279abe9a17 Mon Sep 17 00:00:00 2001 From: Nolord <33145668+Nolord@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:30:26 +0200 Subject: [PATCH 108/183] verifies set partition argument before yield --- src/sage/combinat/set_partition_iterator.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/set_partition_iterator.pyx b/src/sage/combinat/set_partition_iterator.pyx index 7c9bc0eaaf5..39eb7d0d645 100644 --- a/src/sage/combinat/set_partition_iterator.pyx +++ b/src/sage/combinat/set_partition_iterator.pyx @@ -129,5 +129,6 @@ def set_partition_iterator_blocks(base_set, Py_ssize_t k): cdef Py_ssize_t n = len(base) cdef list a = list(range(n)) # TODO: implement _set_partition_block_gen as an iterative algorithm - for P in _set_partition_block_gen(n, k, a): - yield from_word( P, base) + if n >= k: + for P in _set_partition_block_gen(n, k, a): + yield from_word( P, base) From ba1c78671246676dc09776efbf770588f5b11b64 Mon Sep 17 00:00:00 2001 From: Nolord <33145668+Nolord@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:34:39 +0200 Subject: [PATCH 109/183] removed if condition and error --- src/sage/combinat/set_partition.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sage/combinat/set_partition.py b/src/sage/combinat/set_partition.py index 0c22c6a2edc..c174f49582b 100644 --- a/src/sage/combinat/set_partition.py +++ b/src/sage/combinat/set_partition.py @@ -2061,18 +2061,17 @@ def __classcall_private__(cls, s=None, part=None): pass s = frozenset(s) - if part is not None: + if part is None: + return SetPartitions_set(s) + else: if isinstance(part, (int, Integer)): - if len(s) < part: - raise ValueError("part must be <= len(set)") return SetPartitions_setn(s, part) else: part = sorted(part, reverse=True) if part not in Partitions(len(s)): raise ValueError("part must be an integer partition of %s" % len(s)) return SetPartitions_setparts(s, Partition(part)) - else: - return SetPartitions_set(s) + def __contains__(self, x): """ From 1b3afcdd857708c84a686ed5b955357c9bdcb027 Mon Sep 17 00:00:00 2001 From: Nolord <33145668+Nolord@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:36:59 +0200 Subject: [PATCH 110/183] removed newline --- src/sage/combinat/set_partition.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/combinat/set_partition.py b/src/sage/combinat/set_partition.py index c174f49582b..2c3f70bfa6b 100644 --- a/src/sage/combinat/set_partition.py +++ b/src/sage/combinat/set_partition.py @@ -2071,7 +2071,6 @@ def __classcall_private__(cls, s=None, part=None): if part not in Partitions(len(s)): raise ValueError("part must be an integer partition of %s" % len(s)) return SetPartitions_setparts(s, Partition(part)) - def __contains__(self, x): """ From a0ba82f26bb09f9e92710c4faab26fdb8ec5c49e Mon Sep 17 00:00:00 2001 From: Nolord <33145668+Nolord@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:09:00 +0200 Subject: [PATCH 111/183] added example --- src/sage/combinat/set_partition.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sage/combinat/set_partition.py b/src/sage/combinat/set_partition.py index 2c3f70bfa6b..4c0a3ec186d 100644 --- a/src/sage/combinat/set_partition.py +++ b/src/sage/combinat/set_partition.py @@ -2033,6 +2033,14 @@ class SetPartitions(UniqueRepresentation, Parent): sage: SetPartitions('aabcd').cardinality() # needs sage.libs.flint 15 + If the number of parts exceeds the length of the set, + an empty iterator is returned (:issue:`37643`):: + + sage: SetPartitions(range(3), 4).list() + [] + sage: SetPartitions('abcd', 6).list() + [] + REFERENCES: - :wikipedia:`Partition_of_a_set` From 16635e4895d3aa9132dd3e91a07288750915fb4f Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Wed, 10 Apr 2024 14:20:00 +0300 Subject: [PATCH 112/183] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstring suggestions by mkoeppe Co-authored-by: Matthias Köppe --- src/sage/matroids/basis_matroid.pyx | 2 +- src/sage/matroids/circuit_closures_matroid.pyx | 4 ++-- src/sage/matroids/circuits_matroid.pyx | 4 ++-- src/sage/matroids/flats_matroid.pyx | 2 +- src/sage/matroids/graphic_matroid.py | 2 +- src/sage/matroids/linear_matroid.pyx | 18 +++++++++--------- src/sage/matroids/matroid.pyx | 14 +++++++------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index 43ce3f24962..991017467be 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -540,7 +540,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): sage: M = BasisMatroid(matroids.catalog.Fano()) sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] - sage: N = M.relabel({'a':0, 'g':'x'}) + sage: N = M.relabel({'a': 0, 'g': 'x'}) sage: from sage.matroids.utilities import cmp_elements_key sage: sorted(N.groundset(), key=cmp_elements_key) [0, 'b', 'c', 'd', 'e', 'f', 'x'] diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index 8480dd429c4..01fe81b9374 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -578,7 +578,7 @@ cdef class CircuitClosuresMatroid(Matroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -588,7 +588,7 @@ cdef class CircuitClosuresMatroid(Matroid): sage: M = CircuitClosuresMatroid(matroids.catalog.RelaxedNonFano()) sage: sorted(M.groundset()) [0, 1, 2, 3, 4, 5, 6] - sage: N = M.relabel({'g':'x', 0:'z'}) # 'g':'x' is ignored + sage: N = M.relabel({'g': 'x', 0: 'z'}) # 'g': 'x' is ignored sage: from sage.matroids.utilities import cmp_elements_key sage: sorted(N.groundset(), key=cmp_elements_key) [1, 2, 3, 4, 5, 6, 'z'] diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index b8d3b8b18c0..d5d64f07bb4 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -423,7 +423,7 @@ cdef class CircuitsMatroid(Matroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -433,7 +433,7 @@ cdef class CircuitsMatroid(Matroid): sage: M = CircuitsMatroid(matroids.catalog.RelaxedNonFano()) sage: sorted(M.groundset()) [0, 1, 2, 3, 4, 5, 6] - sage: N = M.relabel({'g':'x', 0:'z'}) # 'g':'x' is ignored + sage: N = M.relabel({'g': 'x', 0: 'z'}) # 'g': 'x' is ignored sage: from sage.matroids.utilities import cmp_elements_key sage: sorted(N.groundset(), key=cmp_elements_key) [1, 2, 3, 4, 5, 6, 'z'] diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index 23951d666f6..16ee733d902 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -320,7 +320,7 @@ cdef class FlatsMatroid(Matroid): sage: M = FlatsMatroid(matroids.catalog.RelaxedNonFano()) sage: sorted(M.groundset()) [0, 1, 2, 3, 4, 5, 6] - sage: N = M.relabel({'g':'x', 0:'z'}) # 'g':'x' is ignored + sage: N = M.relabel({'g': 'x', 0: 'z'}) # 'g': 'x' is ignored sage: from sage.matroids.utilities import cmp_elements_key sage: sorted(N.groundset(), key=cmp_elements_key) [1, 2, 3, 4, 5, 6, 'z'] diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index f1e8840f281..62614e4acbf 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -2012,7 +2012,7 @@ def relabel(self, f): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 1fb95238100..aaff053982c 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -2983,7 +2983,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -2992,7 +2992,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): sage: M = matroids.catalog.Fano() sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] - sage: N = M.relabel({'g':'x'}) + sage: N = M.relabel({'g': 'x'}) sage: sorted(N.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'x'] @@ -4084,7 +4084,7 @@ cdef class BinaryMatroid(LinearMatroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -4093,7 +4093,7 @@ cdef class BinaryMatroid(LinearMatroid): sage: M = matroids.catalog.Fano() sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] - sage: N = M.relabel({'g':'x'}) + sage: N = M.relabel({'g': 'x'}) sage: sorted(N.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'x'] @@ -5014,7 +5014,7 @@ cdef class TernaryMatroid(LinearMatroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -5023,7 +5023,7 @@ cdef class TernaryMatroid(LinearMatroid): sage: M = matroids.catalog.NonFano() sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g'] - sage: N = M.relabel({'g':'x'}) + sage: N = M.relabel({'g': 'x'}) sage: sorted(N.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'x'] @@ -5775,7 +5775,7 @@ cdef class QuaternaryMatroid(LinearMatroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -6730,7 +6730,7 @@ cdef class RegularMatroid(LinearMatroid): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -6739,7 +6739,7 @@ cdef class RegularMatroid(LinearMatroid): sage: M = matroids.catalog.R10() sage: sorted(M.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'] - sage: N = M.relabel({'g':'x'}) + sage: N = M.relabel({'g': 'x'}) sage: sorted(N.groundset()) ['a', 'b', 'c', 'd', 'e', 'f', 'h', 'i', 'j', 'x'] diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 23cfee2f9b4..67062623bb6 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -8398,15 +8398,15 @@ cdef class Matroid(SageObject): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e`; if + - ``f`` -- a python object such that ``f[e]`` is the new label of `e`; if ``e not in f`` then the identity map is assumed EXAMPLES:: - sage: M = matroids.catalog.Vamos([1,2,3,4,5,6,7,8]) - sage: M._relabel_map({1:'a', 8:'h', 9:'i'}) + sage: M = matroids.catalog.Vamos([1, 2, 3, 4, 5, 6, 7, 8]) + sage: M._relabel_map({1: 'a', 8: 'h', 9: 'i'}) {1: 'a', 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 'h'} - sage: M._relabel_map({1:2}) + sage: M._relabel_map({1: 2}) Traceback (most recent call last): ... ValueError: given map doesn't relabel the groundset properly @@ -8434,7 +8434,7 @@ cdef class Matroid(SageObject): INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``f`` -- a python object such that ``f[e]`` is the new label of `e` OUTPUT: a matroid @@ -8445,7 +8445,7 @@ cdef class Matroid(SageObject): sage: M = RankMatroid(groundset=N.groundset(), rank_function=N.rank) sage: sorted(M.groundset()) [1, 2, 3, 4, 5, 6, 7, 8] - sage: N = M.relabel({8:0}) + sage: N = M.relabel({8: 0}) sage: sorted(N.groundset()) [0, 1, 2, 3, 4, 5, 6, 7] sage: M.is_isomorphic(N) @@ -8456,7 +8456,7 @@ cdef class Matroid(SageObject): sage: from sage.matroids.rank_matroid import RankMatroid sage: N = matroids.catalog.Sp8pp() sage: M = RankMatroid(groundset=N.groundset(), rank_function=N.rank) - sage: f = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h'} + sage: f = {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e', 6: 'f', 7: 'g', 8: 'h'} sage: N = M.relabel(f) sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) From 5491e7bf370ffa623f7c6148414e6f418ca20591 Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Wed, 10 Apr 2024 15:08:11 +0300 Subject: [PATCH 113/183] Rename keyword to `mapping` --- src/sage/matroids/basis_matroid.pxd | 2 +- src/sage/matroids/basis_matroid.pyx | 16 +++-- .../matroids/circuit_closures_matroid.pxd | 2 +- .../matroids/circuit_closures_matroid.pyx | 13 ++-- src/sage/matroids/circuits_matroid.pxd | 2 +- src/sage/matroids/circuits_matroid.pyx | 13 ++-- src/sage/matroids/flats_matroid.pxd | 2 +- src/sage/matroids/flats_matroid.pyx | 13 ++-- src/sage/matroids/graphic_matroid.py | 13 ++-- src/sage/matroids/linear_matroid.pxd | 10 +-- src/sage/matroids/linear_matroid.pyx | 65 ++++++++++--------- src/sage/matroids/matroid.pyx | 13 ++-- 12 files changed, 88 insertions(+), 76 deletions(-) diff --git a/src/sage/matroids/basis_matroid.pxd b/src/sage/matroids/basis_matroid.pxd index 3782b51c5fa..98400ba26ca 100644 --- a/src/sage/matroids/basis_matroid.pxd +++ b/src/sage/matroids/basis_matroid.pxd @@ -25,7 +25,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): cpdef truncation(self) cpdef _extension(self, e, H) cpdef _with_coloop(self, e) - cpdef relabel(self, l) + # cpdef relabel(self, mapping) cpdef _bases_invariant(self) cpdef _bases_partition(self) diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index 991017467be..1dc2ff755a3 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -79,7 +79,7 @@ from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid from sage.matroids.set_system cimport SetSystem from sage.matroids.utilities import cmp_elements_key from cpython.object cimport Py_EQ, Py_NE - +from sage.misc.decorators import rename_keyword from itertools import combinations # class of general matroids, represented by their list of bases @@ -520,17 +520,19 @@ cdef class BasisMatroid(BasisExchangeMatroid): cdef frozenset se = frozenset([e]) return BasisMatroid(groundset=self._E + (e,), bases=[B | se for B in self.bases()]) - cpdef relabel(self, f): + @rename_keyword(deprecation=37775, l='mapping') + def relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -556,7 +558,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset()] B = [[d[y] for y in list(x)] for x in self.bases()] M = BasisMatroid(groundset=E, bases=B) diff --git a/src/sage/matroids/circuit_closures_matroid.pxd b/src/sage/matroids/circuit_closures_matroid.pxd index 446d5ca3f86..4c6ef771057 100644 --- a/src/sage/matroids/circuit_closures_matroid.pxd +++ b/src/sage/matroids/circuit_closures_matroid.pxd @@ -13,4 +13,4 @@ cdef class CircuitClosuresMatroid(Matroid): cpdef _circuit(self, F) cpdef circuit_closures(self) cpdef _is_isomorphic(self, other, certificate=*) - cpdef relabel(self, f) + cpdef relabel(self, mapping) diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index 01fe81b9374..eced2f7ce35 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -568,17 +568,18 @@ cdef class CircuitClosuresMatroid(Matroid): version = 0 return sage.matroids.unpickling.unpickle_circuit_closures_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -604,7 +605,7 @@ cdef class CircuitClosuresMatroid(Matroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset()] CC = {} for i in self.circuit_closures(): diff --git a/src/sage/matroids/circuits_matroid.pxd b/src/sage/matroids/circuits_matroid.pxd index b8995b08ef4..f495a1eff81 100644 --- a/src/sage/matroids/circuits_matroid.pxd +++ b/src/sage/matroids/circuits_matroid.pxd @@ -26,7 +26,7 @@ cdef class CircuitsMatroid(Matroid): # isomorphism and relabeling cpdef _is_isomorphic(self, other, certificate=*) - cpdef relabel(self, f) + cpdef relabel(self, mapping) # verification cpdef is_valid(self) diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index d5d64f07bb4..455a4d8464a 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -413,17 +413,18 @@ cdef class CircuitsMatroid(Matroid): version = 0 return sage.matroids.unpickling.unpickle_circuits_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -449,7 +450,7 @@ cdef class CircuitsMatroid(Matroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self._groundset] C = [] for i in self._k_C: diff --git a/src/sage/matroids/flats_matroid.pxd b/src/sage/matroids/flats_matroid.pxd index 026c934a185..440dac7012c 100644 --- a/src/sage/matroids/flats_matroid.pxd +++ b/src/sage/matroids/flats_matroid.pxd @@ -15,7 +15,7 @@ cdef class FlatsMatroid(Matroid): # isomorphism and relabeling cpdef _is_isomorphic(self, other, certificate=*) - cpdef relabel(self, f) + cpdef relabel(self, mapping) # verification cpdef is_valid(self) diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index 16ee733d902..1d736eddfe7 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -300,17 +300,18 @@ cdef class FlatsMatroid(Matroid): version = 0 return sage.matroids.unpickling.unpickle_flats_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that `f[e]` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -336,7 +337,7 @@ cdef class FlatsMatroid(Matroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self._groundset] F = {} for i in self._F: diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 62614e4acbf..8d7fdd89757 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -2002,17 +2002,18 @@ def regular_matroid(self): X = [l for u, v, l in self._G.edge_iterator()] return ConstructorMatroid(groundset=X, graph=self._G, regular=True) - def relabel(self, f): + def relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -2035,7 +2036,7 @@ def relabel(self, f): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset()] M = GraphicMatroid(self.graph(), groundset=E) return M diff --git a/src/sage/matroids/linear_matroid.pxd b/src/sage/matroids/linear_matroid.pxd index 89e9580024e..76027b61a9f 100644 --- a/src/sage/matroids/linear_matroid.pxd +++ b/src/sage/matroids/linear_matroid.pxd @@ -28,7 +28,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): cpdef is_field_isomorphism(self, other, morphism) # cpdef is_field_isomorphic(self, other) # TODO: currently only works as ``def`` cpdef _fast_isom_test(self, other) - cpdef relabel(self, f) + cpdef relabel(self, mapping) cpdef _minor(self, contractions, deletions) cpdef dual(self) @@ -89,7 +89,7 @@ cdef class BinaryMatroid(LinearMatroid): cpdef BinaryMatrix _projection(self) cpdef BinaryMatrix _projection_partition(self) cpdef _fast_isom_test(self, other) - cpdef relabel(self, f) + cpdef relabel(self, mapping) cpdef is_graphic(self) cpdef is_valid(self) @@ -120,7 +120,7 @@ cdef class TernaryMatroid(LinearMatroid): cpdef _principal_quadripartition(self) cpdef TernaryMatrix _projection(self) cpdef _fast_isom_test(self, other) - cpdef relabel(self, f) + cpdef relabel(self, mapping) cpdef is_valid(self) @@ -147,7 +147,7 @@ cdef class QuaternaryMatroid(LinearMatroid): cpdef bicycle_dimension(self) cpdef _principal_tripartition(self) cpdef _fast_isom_test(self, other) - cpdef relabel(self, f) + cpdef relabel(self, mapping) cpdef is_valid(self) @@ -163,7 +163,7 @@ cdef class RegularMatroid(LinearMatroid): cpdef _invariant(self) cpdef _fast_isom_test(self, other) - cpdef relabel(self, f) + cpdef relabel(self, mapping) cpdef bases_count(self) cpdef _projection(self) diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index aaff053982c..80795c5272a 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -2973,17 +2973,18 @@ cdef class LinearMatroid(BasisExchangeMatroid): data = (A, gs, reduced, self.get_custom_name()) return sage.matroids.unpickling.unpickle_linear_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -3004,7 +3005,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset_list()] M = LinearMatroid(groundset=E, matrix=self._matrix_()) return M @@ -4074,17 +4075,18 @@ cdef class BinaryMatroid(LinearMatroid): data = (A, gs, basis, self.get_custom_name()) return sage.matroids.unpickling.unpickle_binary_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -4105,7 +4107,7 @@ cdef class BinaryMatroid(LinearMatroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset_list()] M = BinaryMatroid(groundset=E, matrix=self._matrix_()) return M @@ -5004,17 +5006,18 @@ cdef class TernaryMatroid(LinearMatroid): data = (A, gs, basis, self.get_custom_name()) return sage.matroids.unpickling.unpickle_ternary_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -5035,7 +5038,7 @@ cdef class TernaryMatroid(LinearMatroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset_list()] M = TernaryMatroid(groundset=E, matrix=self._matrix_()) return M @@ -5765,17 +5768,18 @@ cdef class QuaternaryMatroid(LinearMatroid): data = (A, gs, basis, self.get_custom_name()) return sage.matroids.unpickling.unpickle_quaternary_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -5796,7 +5800,7 @@ cdef class QuaternaryMatroid(LinearMatroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset_list()] M = QuaternaryMatroid(groundset=E, matrix=self._matrix_()) return M @@ -6720,17 +6724,18 @@ cdef class RegularMatroid(LinearMatroid): data = (A, gs, reduced, self.get_custom_name()) return sage.matroids.unpickling.unpickle_regular_matroid, (version, data) - cpdef relabel(self, f): + cpdef relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -6751,7 +6756,7 @@ cdef class RegularMatroid(LinearMatroid): sage: for S in powerset(M.groundset()): ....: assert M.rank(S) == N.rank([M._relabel_map(f)[x] for x in S]) """ - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset_list()] M = RegularMatroid(groundset=E, matrix=self._matrix_()) return M diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 67062623bb6..3529d5bc5b9 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -8424,17 +8424,18 @@ cdef class Matroid(SageObject): raise ValueError("given map doesn't relabel the groundset properly") return d - def relabel(self, f): + def relabel(self, mapping): r""" Return an isomorphic matroid with relabeled groundset. - The output is obtained by relabeling each element ``e`` by ``f[e]``, - where ``f`` is a given injective map. If ``e not in f`` then the - identity map is assumed. + The output is obtained by relabeling each element ``e`` by + ``mapping[e]``, where ``mapping`` is a given injective map. If + ``mapping[e]`` is not defined, then the identity map is assumed. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e` + - ``mapping`` -- a python object such that `mapping[e]` is the new + label of `e` OUTPUT: a matroid @@ -8462,7 +8463,7 @@ cdef class Matroid(SageObject): ....: assert M.rank(S) == N.rank([f[x] for x in S]) """ from sage.matroids.rank_matroid import RankMatroid - d = self._relabel_map(f) + d = self._relabel_map(mapping) E = [d[x] for x in self.groundset()] def f_relabel(X): From 39fc350c4d2c6e3dd7cb9ca40f4666842539268a Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Wed, 10 Apr 2024 15:53:45 +0300 Subject: [PATCH 114/183] Remove `groundset=...` redundancies --- src/sage/matroids/database_matroids.py | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/sage/matroids/database_matroids.py b/src/sage/matroids/database_matroids.py index 2e937874b06..3ab8e0c7816 100644 --- a/src/sage/matroids/database_matroids.py +++ b/src/sage/matroids/database_matroids.py @@ -314,7 +314,7 @@ def P6(groundset=None): [Oxl2011]_, p. 641-2. """ CC = {2: ['abc'], 3: ['abcdef']} - M = Matroid(groundset='abcdef', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "P6", groundset) return M @@ -724,7 +724,7 @@ def AG32prime(groundset=None): ], 4: ['abcdefgh'], } - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "AG(3, 2)'", groundset) return M @@ -824,7 +824,7 @@ def F8(groundset=None): ], 4: ['abcdefgh'], } - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "F8", groundset) return M @@ -873,7 +873,7 @@ def Q8(groundset=None): ], 4: ['abcdefgh'], } - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "Q8", groundset) return M @@ -920,7 +920,7 @@ def L8(groundset=None): """ CC = {3: ['abfg', 'bcdg', 'defg', 'cdeh', 'aefh', 'abch', 'aceg', 'bdfh'], 4: ['abcdefgh']} - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "L8", groundset) return M @@ -1009,7 +1009,7 @@ def Vamos(groundset=None): [Oxl2011]_, p. 649. """ CC = {3: ['abcd', 'abef', 'cdef', 'abgh', 'efgh'], 4: ['abcdefgh']} - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "Vamos", groundset) return M @@ -1160,7 +1160,7 @@ def P8pp(groundset=None): [Oxl2011]_, p. 651. """ NSC = ['abfh', 'bceg', 'cdfh', 'adeg', 'acef', 'bdfg', 'acgh', 'bdeh'] - M = Matroid(groundset='abcdefgh', rank=4, nonspanning_circuits=NSC) + M = Matroid(rank=4, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "P8''", groundset) return M @@ -1410,7 +1410,7 @@ def Pappus(groundset=None): [Oxl2011]_, p. 655. """ NSC = ['abc', 'def', 'ceg', 'bfg', 'cdh', 'afh', 'bdi', 'aei', 'ghi'] - M = Matroid(groundset='abcdefghi', rank=3, nonspanning_circuits=NSC) + M = Matroid(rank=3, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "Pappus", groundset) return M @@ -1444,7 +1444,7 @@ def NonPappus(groundset=None): [Oxl2011]_, p. 655. """ NSC = ['abc', 'ceg', 'bfg', 'cdh', 'afh', 'bdi', 'aei', 'ghi'] - M = Matroid(groundset='abcdefghi', rank=3, nonspanning_circuits=NSC) + M = Matroid(rank=3, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "NonPappus", groundset) return M @@ -2239,7 +2239,7 @@ def Spike(r, t=True, C3=[], groundset=None): planes = [['t', 'x'+str(i), 'y'+str(i), 'x'+str(j), 'y'+str(j)] for i in range(1, r+1) for j in range(i+1, r+1)] CC = {2: lines, 3: planes, r: [E]} - M = Matroid(groundset=E, circuit_closures=CC) + M = Matroid(circuit_closures=CC) else: for S in C3: for xy in S: @@ -2261,7 +2261,7 @@ def Spike(r, t=True, C3=[], groundset=None): for j in range(i+1, r+1): NSC += [['x'+str(i), 'y'+str(i), 'x'+str(j), 'y'+str(j)]] - M = Matroid(groundset=E, rank=r, nonspanning_circuits=NSC) + M = Matroid(rank=r, nonspanning_circuits=NSC) free = "Free " if C3 == [] else "" tip = "" if t else "\\t" @@ -2343,7 +2343,7 @@ def Theta(n, groundset=None): Yu = [Y[i] for i in range(len(Y)) if i != u] C += [Yu + ['x'+str(s)] + ['x'+str(t)]] - M = Matroid(groundset=E, circuits=C) + M = Matroid(circuits=C) M = _rename_and_relabel(M, "Theta_" + str(n), groundset) return M @@ -4715,7 +4715,7 @@ def NonVamos(groundset=None): 3: ['abcd', 'abef', 'cdef', 'abgh', 'cdgh', 'efgh'], 4: ['abcdefgh'] } - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "NonVamos", groundset) return M @@ -4773,7 +4773,7 @@ class of near-regular matroids. """ CC = {2: ['abc', 'ceh', 'fgh', 'adf', 'aeg', 'cdg', 'bdh', 'bef'], 3: ['abcdefgh']} - M = Matroid(groundset='abcdefgh', circuit_closures=CC) + M = Matroid(circuit_closures=CC) M = _rename_and_relabel(M, "AG23minus", groundset) return M @@ -4823,7 +4823,7 @@ def R9A(groundset=None): """ NSC = ['abch', 'abde', 'abfi', 'acdi', 'aceg', 'adgh', 'aefh', 'bcdf', 'bdhi', 'begi', 'cehi', 'defi', 'fghi'] - M = Matroid(groundset='abcdefghi', rank=4, nonspanning_circuits=NSC) + M = Matroid(rank=4, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "R9A", groundset) return M @@ -4846,7 +4846,7 @@ def R9B(groundset=None): """ NSC = ['abde', 'bcdf', 'aceg', 'abch', 'befh', 'cdgh', 'bcei', 'adfi', 'abgi', 'degi', 'bdhi', 'aehi', 'fghi'] - M = Matroid(groundset='abcdefghi', rank=4, nonspanning_circuits=NSC) + M = Matroid(rank=4, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "R9B", groundset) return M @@ -4870,7 +4870,7 @@ def Block_9_4(groundset=None): NSC = ['abcd', 'acef', 'bdef', 'cdeg', 'abfg', 'adeh', 'bcfh', 'acgh', 'begh', 'dfgh', 'abei', 'cdfi', 'bcgi', 'adgi', 'efgi', 'bdhi', 'cehi', 'afhi'] - M = Matroid(groundset='abcdefghi', rank=4, nonspanning_circuits=NSC) + M = Matroid(rank=4, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "Block(9, 4)", groundset) return M @@ -4895,7 +4895,7 @@ def TicTacToe(groundset=None): """ NSC = ['abcdg', 'adefg', 'abceh', 'abcfi', 'cdefi', 'adghi', 'beghi', 'cfghi'] - M = Matroid(groundset='abcdefghi', rank=5, nonspanning_circuits=NSC) + M = Matroid(rank=5, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "TicTacToe", groundset) return M @@ -4953,7 +4953,7 @@ def Block_10_5(groundset=None): 'cdegj', 'bcfgj', 'acdhj', 'bcehj', 'defhj', 'bdghj', 'afghj', 'abcij', 'bdeij', 'cdfij', 'adgij', 'efgij', 'aehij', 'bfhij', 'cghij'] - M = Matroid(groundset='abcdefghij', rank=5, nonspanning_circuits=NSC) + M = Matroid(rank=5, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "Block(10, 5)", groundset) return M @@ -5021,7 +5021,7 @@ def BetsyRoss(groundset=None): NSC = ['acf', 'acg', 'adi', 'adj', 'afg', 'ahk', 'aij', 'bdg', 'bdh', 'bef', 'bej', 'bfj', 'bgh', 'bik', 'ceh', 'cei', 'cfg', 'chi', 'cjk', 'dfk', 'dgh', 'dij', 'efj', 'egk', 'ehi'] - M = Matroid(groundset='abcdefghijk', rank=3, nonspanning_circuits=NSC) + M = Matroid(rank=3, nonspanning_circuits=NSC) M = _rename_and_relabel(M, "BetsyRoss", groundset) return M From 6cf17196f55df5ddc78517cf93a4f33893fa3c26 Mon Sep 17 00:00:00 2001 From: Jackson Walters Date: Thu, 4 Apr 2024 14:54:21 -0400 Subject: [PATCH 115/183] dft for symmetric group algebra when p|n The DFT for the SGA throws a ZeroDivisionError p|n. Uses the idempotents as computed in [Murphy '83] to build the Pierce decomposition of the group algebra over a finite field. The "modular" Fourier transform is the homomorphic projection onto each block via v |--> v*e_i. This change of basis matrix is the modular Fourier transform, and works even when p|n. Co-Authored-By: Travis Scrimshaw --- src/sage/combinat/symmetric_group_algebra.py | 58 ++++++++++++++++++-- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/src/sage/combinat/symmetric_group_algebra.py b/src/sage/combinat/symmetric_group_algebra.py index b0214063e3b..3b7673a5425 100644 --- a/src/sage/combinat/symmetric_group_algebra.py +++ b/src/sage/combinat/symmetric_group_algebra.py @@ -1885,10 +1885,15 @@ def seminormal_basis(self, mult='l2r'): basis.append(self.epsilon_ik(t1, t2, mult=mult)) return basis - def dft(self, form="seminormal", mult='l2r'): - """ + def dft(self, form=None, mult='l2r'): + r""" Return the discrete Fourier transform for ``self``. + See [Mur1983]_ for the construction of central primitive orthogonal idempotents. + For each idempotent `e_i` we have a homomorphic projection `v \mapsto v e_i`. + Choose a basis for each submodule spanned by `\{\sigma e_i | \sigma \in S_n\}`. + The change-of-basis from the standard basis `\{\sigma\}_\sigma` is returned. + INPUT: - ``mult`` -- string (default: `l2r`). If set to `r2l`, @@ -1906,15 +1911,32 @@ def dft(self, form="seminormal", mult='l2r'): [ 0 1 0 -1 1 -1] [ 1 -1/2 1 -1/2 -1/2 -1/2] [ 1 -1 -1 1 1 -1] + + Over fields of characteristic `p > 0` such that `p \mid n!`, we use the + modular Fourier transform (:issue:`37751`):: + + sage: GF2S3 = SymmetricGroupAlgebra(GF(2), 3) + sage: GF2S3.dft() + [1 0 0 0 1 0] + [0 1 0 0 0 1] + [0 0 1 0 0 1] + [0 0 0 1 1 0] + [1 0 0 1 1 0] + [0 1 1 0 0 1] """ + if form is None: + form = "modular" if self.base_ring().characteristic().divides(self.group().cardinality()) else "seminormal" if form == "seminormal": + if self.base_ring().characteristic().divides(self.group().cardinality()): + raise ValueError("seminormal does not work when p | n!") return self._dft_seminormal(mult=mult) - else: - raise ValueError("invalid form (= %s)" % form) + if form == "modular": + return self._dft_modular() + raise ValueError("invalid form (= %s)" % form) def _dft_seminormal(self, mult='l2r'): """ - Return the seminormal form of the discrete Fourier for ``self``. + Return the seminormal form of the discrete Fourier transform for ``self``. INPUT: @@ -1941,6 +1963,32 @@ def _dft_seminormal(self, mult='l2r'): snb = self.seminormal_basis(mult=mult) return matrix([vector(b) for b in snb]).inverse().transpose() + def _dft_modular(self): + r""" + Return the discrete Fourier transform when the characteristic divides the order of the group. + + EXAMPLES:: + + sage: GF3S3 = SymmetricGroupAlgebra(GF(3), 3) + sage: GF3S3._dft_modular() + [1 0 0 0 0 0] + [0 1 0 0 0 0] + [0 0 1 0 0 0] + [0 0 0 1 0 0] + [0 0 0 0 1 0] + [0 0 0 0 0 1] + """ + idempotents = self.central_orthogonal_idempotents() + # project v onto each block U_i = F_p[S_n]*e_i via \pi_i: v |--> v*e_i + B = self.basis() + blocks = [self.submodule([b * idem for b in B]) for idem in idempotents] + # compute the list of basis vectors lifted to the SGA from each block + block_decomposition_basis = [u.lift() for block in blocks for u in block.basis()] + # construct the matrix to the standard basis in the order given by the group + G = self.group() + mat = [[b[g] for b in block_decomposition_basis] for g in G] + return matrix(self.base_ring(), mat) + def epsilon_ik(self, itab, ktab, star=0, mult='l2r'): r""" Return the seminormal basis element of ``self`` corresponding to the From 6c9ff6c85448419ce878ded626e38d32fb365fba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Wed, 10 Apr 2024 20:57:07 +0200 Subject: [PATCH 116/183] various changes about is_field and is_ring --- src/sage/combinat/descent_algebra.py | 83 ++++++++----------- src/sage/geometry/polyhedron/parent.py | 12 ++- src/sage/modular/pollack_stevens/dist.pyx | 26 +++--- .../modular/pollack_stevens/distributions.py | 40 ++++----- src/sage/modular/ssmod/ssmod.py | 15 ++-- .../polynomes_doctest.py | 2 +- src/sage/topology/simplicial_complex.py | 44 +++++----- 7 files changed, 105 insertions(+), 117 deletions(-) diff --git a/src/sage/combinat/descent_algebra.py b/src/sage/combinat/descent_algebra.py index bb7db9e326e..3cc463b54bb 100644 --- a/src/sage/combinat/descent_algebra.py +++ b/src/sage/combinat/descent_algebra.py @@ -13,25 +13,26 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.misc.cachefunc import cached_method -from sage.misc.bindable_class import BindableClass -from sage.misc.lazy_attribute import lazy_attribute -from sage.structure.parent import Parent -from sage.structure.unique_representation import UniqueRepresentation +from sage.arith.misc import factorial from sage.categories.algebras import Algebras from sage.categories.commutative_rings import CommutativeRings -from sage.categories.realizations import Realizations, Category_realization_of_parent +from sage.categories.fields import Fields from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis -from sage.rings.integer_ring import ZZ -from sage.rings.rational_field import QQ -from sage.arith.misc import factorial -from sage.combinat.free_module import CombinatorialFreeModule -from sage.combinat.permutation import Permutations +from sage.categories.realizations import Realizations, Category_realization_of_parent from sage.combinat.composition import Compositions +from sage.combinat.free_module import CombinatorialFreeModule from sage.combinat.integer_matrices import IntegerMatrices +from sage.combinat.ncsf_qsym.ncsf import NonCommutativeSymmetricFunctions +from sage.combinat.permutation import Permutations from sage.combinat.subset import SubsetsSorted from sage.combinat.symmetric_group_algebra import SymmetricGroupAlgebra -from sage.combinat.ncsf_qsym.ncsf import NonCommutativeSymmetricFunctions +from sage.misc.bindable_class import BindableClass +from sage.misc.cachefunc import cached_method +from sage.misc.lazy_attribute import lazy_attribute +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ +from sage.structure.parent import Parent +from sage.structure.unique_representation import UniqueRepresentation class DescentAlgebra(UniqueRepresentation, Parent): @@ -134,9 +135,30 @@ def __init__(self, R, n): EXAMPLES:: sage: TestSuite(DescentAlgebra(QQ, 4)).run() + + TESTS:: + + sage: B = DescentAlgebra(QQ, 4).B() + sage: B.is_commutative() + False + sage: B = DescentAlgebra(QQ, 1).B() + sage: B.is_commutative() + True + + sage: B = DescentAlgebra(QQ, 4).B() + sage: B.is_field() + False + sage: B = DescentAlgebra(QQ, 1).B() + sage: B.is_field() + True """ self._n = n - self._category = FiniteDimensionalAlgebrasWithBasis(R) + cat = FiniteDimensionalAlgebrasWithBasis(R) + if R in CommutativeRings() and n <= 2: + cat = cat.Commutative() + if R in Fields() and n <= 1: + cat &= Fields() + self._category = cat Parent.__init__(self, base=R, category=self._category.WithRealizations()) def _repr_(self): @@ -838,7 +860,7 @@ def __init__(self, base): """ Category_realization_of_parent.__init__(self, base) - def _repr_(self): + def _repr_(self) -> str: r""" Return the representation of ``self``. @@ -913,39 +935,6 @@ def __getitem__(self, p): p = [p] return self.monomial(C(p)) - def is_field(self, proof=True): - """ - Return whether this descent algebra is a field. - - EXAMPLES:: - - sage: B = DescentAlgebra(QQ, 4).B() - sage: B.is_field() - False - sage: B = DescentAlgebra(QQ, 1).B() - sage: B.is_field() - True - """ - if self.realization_of()._n <= 1: - return self.base_ring().is_field() - return False - - def is_commutative(self) -> bool: - """ - Return whether this descent algebra is commutative. - - EXAMPLES:: - - sage: B = DescentAlgebra(QQ, 4).B() - sage: B.is_commutative() - False - sage: B = DescentAlgebra(QQ, 1).B() - sage: B.is_commutative() - True - """ - return (self.base_ring() in CommutativeRings() - and self.realization_of()._n <= 2) - @lazy_attribute def to_symmetric_group_algebra(self): """ diff --git a/src/sage/geometry/polyhedron/parent.py b/src/sage/geometry/polyhedron/parent.py index 2d87ac6f202..7dafad76437 100644 --- a/src/sage/geometry/polyhedron/parent.py +++ b/src/sage/geometry/polyhedron/parent.py @@ -480,9 +480,8 @@ def Vrepresentation_space(self): if self.base_ring() in Fields(): from sage.modules.free_module import VectorSpace return VectorSpace(self.base_ring(), self.ambient_dim()) - else: - from sage.modules.free_module import FreeModule - return FreeModule(self.base_ring(), self.ambient_dim()) + from sage.modules.free_module import FreeModule + return FreeModule(self.base_ring(), self.ambient_dim()) ambient_space = Vrepresentation_space @@ -521,7 +520,6 @@ def _repr_base_ring(self): sage: Polyhedra(K, 4)._repr_base_ring() # needs sage.rings.number_field '(Number Field in sqrt3 with defining polynomial x^2 - 3 with sqrt3 = 1.732050807568878?)' """ - if self.base_ring() is ZZ: return 'ZZ' if self.base_ring() is QQ: @@ -535,9 +533,9 @@ def _repr_base_ring(self): else: if self.base_ring() is AA: return 'AA' - return '({0})'.format(self.base_ring()) + return f'({self.base_ring()})' - def _repr_ambient_module(self): + def _repr_ambient_module(self) -> str: """ Return an abbreviated string representation of the ambient space. @@ -885,7 +883,7 @@ def _coerce_base_ring(self, other): from sage.structure.element import Element if isinstance(other, Element): other = other.parent() - if hasattr(other, "is_ring") and other.is_ring(): + if other in Rings(): other_ring = other else: try: diff --git a/src/sage/modular/pollack_stevens/dist.pyx b/src/sage/modular/pollack_stevens/dist.pyx index 1f79133f2f5..cd1ce2a722f 100644 --- a/src/sage/modular/pollack_stevens/dist.pyx +++ b/src/sage/modular/pollack_stevens/dist.pyx @@ -26,26 +26,26 @@ REFERENCES: # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** +import operator -from sage.structure.richcmp cimport richcmp_not_equal, rich_to_bool -from sage.rings.integer_ring import ZZ -from sage.rings.rational_field import QQ -from sage.rings.power_series_ring import PowerSeriesRing -from sage.rings.finite_rings.integer_mod_ring import Zmod from sage.arith.misc import binomial, bernoulli -from sage.matrix.matrix cimport Matrix +from sage.categories.fields import Fields from sage.matrix.constructor import matrix -from sage.structure.element cimport Element -import operator -from sage.rings.padics.padic_generic import pAdicGeneric -from sage.rings.integer cimport Integer +from sage.matrix.matrix cimport Matrix from sage.misc.verbose import verbose +from sage.modular.pollack_stevens.sigma0 import Sigma0 +from sage.rings.finite_rings.integer_mod_ring import Zmod from sage.rings.infinity import Infinity +from sage.rings.integer cimport Integer +from sage.rings.integer_ring import ZZ +from sage.rings.padics.padic_generic import pAdicGeneric +from sage.rings.power_series_ring import PowerSeriesRing +from sage.rings.rational_field import QQ +from sage.structure.element cimport Element +from sage.structure.richcmp cimport richcmp_not_equal, rich_to_bool #from sage.libs.flint.ulong_extras cimport * -from sage.modular.pollack_stevens.sigma0 import Sigma0 - cdef long overflow = 1 << (4 * sizeof(long) - 1) cdef long underflow = -overflow cdef long maxordp = (1L << (sizeof(long) * 8 - 2)) - 1 @@ -1167,7 +1167,7 @@ cdef class Dist_vector(Dist): p = self.parent().prime() cdef Dist_vector ans if p == 0: - if R.is_field(): + if R in Fields(): ans = self._new_c() ans.ordp = 0 ans._moments = V(v) diff --git a/src/sage/modular/pollack_stevens/distributions.py b/src/sage/modular/pollack_stevens/distributions.py index f33b4022842..422f319ed6e 100644 --- a/src/sage/modular/pollack_stevens/distributions.py +++ b/src/sage/modular/pollack_stevens/distributions.py @@ -31,32 +31,31 @@ (1 + O(11^5), 2 + O(11^4), 3 + O(11^3), 4 + O(11^2), 5 + O(11)) """ -# **************************************************************************** +# ************************************************************************* # Copyright (C) 2012 Robert Pollack # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ -# **************************************************************************** +# ************************************************************************* +from sage.categories.fields import Fields +from sage.categories.modules import Modules +from sage.misc.cachefunc import cached_method from sage.misc.lazy_import import lazy_import from sage.modules.module import Module -from sage.structure.parent import Parent -from sage.rings.rational_field import QQ from sage.rings.integer_ring import ZZ -from sage.misc.cachefunc import cached_method -from sage.categories.modules import Modules -from sage.structure.factory import UniqueFactory - +from sage.rings.rational_field import QQ from sage.rings.ring import Ring +from sage.structure.factory import UniqueFactory +from sage.structure.parent import Parent +from .sigma0 import _default_adjuster lazy_import('sage.modular.pollack_stevens.dist', 'get_dist_classes') lazy_import('sage.rings.padics.factory', ['ZpCA', 'QpCR']) lazy_import('sage.rings.padics.padic_generic', 'pAdicGeneric') -from .sigma0 import _default_adjuster - class OverconvergentDistributions_factory(UniqueFactory): """ @@ -283,7 +282,7 @@ def __init__(self, k, p=None, prec_cap=None, base=None, character=None, """ if not isinstance(base, Ring): raise TypeError("base must be a ring") - #from sage.rings.padics.pow_computer import PowComputer + # from sage.rings.padics.pow_computer import PowComputer # should eventually be the PowComputer on ZpCA once that uses longs. Dist, WeightKAction = get_dist_classes(p, prec_cap, base, self.is_symk(), implementation) @@ -317,9 +316,9 @@ def _element_constructor_(self, val, **kwargs): sage: v = V([1,2,3,4,5,6,7]); v (1, 2, 3, 4, 5, 6, 7) """ - ordp = kwargs.get('ord',0) - check = kwargs.get('check',True) - normalize = kwargs.get('normalize',True) + ordp = kwargs.get('ord', 0) + check = kwargs.get('check', True) + normalize = kwargs.get('normalize', True) return self.Element(val, self, ordp, check, normalize) def _coerce_map_from_(self, other): @@ -409,13 +408,14 @@ def prime(self): def weight(self): """ - Return the weight of this distribution space. The standard - caveat applies, namely that the weight of `Sym^k` is - defined to be `k`, not `k+2`. + Return the weight of this distribution space. + + The standard caveat applies, namely that the weight of `Sym^k` + is defined to be `k`, not `k+2`. OUTPUT: - - nonnegative integer + nonnegative integer EXAMPLES:: @@ -472,7 +472,7 @@ def lift(self, p=None, M=None, new_base_ring=None): """ if self._character is not None: if self._character.base_ring() != QQ: - # need to change coefficient ring for character + # need to change coefficient ring for character raise NotImplementedError if M is None: M = self._prec_cap + 1 @@ -689,7 +689,7 @@ def _repr_(self): elif self.base_ring() is ZZ: V = 'Z^2' elif isinstance(self.base_ring(), pAdicGeneric) and self.base_ring().degree() == 1: - if self.base_ring().is_field(): + if self.base_ring() in Fields(): V = 'Q_%s^2' % self._p else: V = 'Z_%s^2' % self._p diff --git a/src/sage/modular/ssmod/ssmod.py b/src/sage/modular/ssmod/ssmod.py index d2d2d717cbc..550e0e29ec4 100644 --- a/src/sage/modular/ssmod/ssmod.py +++ b/src/sage/modular/ssmod/ssmod.py @@ -69,6 +69,7 @@ # **************************************************************************** from sage.arith.misc import kronecker, next_prime +from sage.categories.fields import Fields from sage.matrix.matrix_space import MatrixSpace from sage.misc.lazy_import import lazy_import from sage.modular.arithgroup.all import Gamma0 @@ -333,7 +334,7 @@ def supersingular_j(FF): - Iftikhar Burhanuddin -- burhanud@usc.edu """ - if not FF.is_field() or not FF.is_finite(): + if FF not in Fields().Finite(): raise ValueError("%s is not a finite field" % FF) prime = FF.characteristic() if not Integer(prime).is_prime(): @@ -417,7 +418,7 @@ def __init__(self, prime=2, level=1, base_ring=ZZ): HeckeModule_free_module.__init__(self, base_ring, prime * level, weight=2) - def _repr_(self): + def _repr_(self) -> str: """ String representation of self. @@ -429,7 +430,7 @@ def _repr_(self): return "Module of supersingular points on X_0(%s)/F_%s over %s" % ( self.__level, self.__prime, self.base_ring()) - def __richcmp__(self, other, op): + def __richcmp__(self, other, op) -> bool: r""" Compare ``self`` to ``other``. @@ -675,7 +676,7 @@ def supersingular_points(self): dim = dimension_supersingular_module(prime, level) - pos = int(0) + pos = 0 # using list to keep track of explored nodes using pos ss_points = [jinv] @@ -697,7 +698,7 @@ def supersingular_points(self): # root finding (??) neighbors = Phi2_quad(X, ss_points[j_prev], ss_points[pos]).roots() - for (xj, ej) in neighbors: + for xj, ej in neighbors: if xj not in ss_points_dic: j = len(ss_points) ss_points += [xj] @@ -710,7 +711,7 @@ def supersingular_points(self): if pos != 0: # also record the root from j_prev T2_matrix[pos, j_prev] += 1 - pos += int(1) + pos += 1 self.__hecke_matrices[2] = T2_matrix return (ss_points, ss_points_dic) @@ -836,7 +837,7 @@ def hecke_matrix(self, L): Fp2 = self.__finite_field h = len(SS) R = self.base_ring() - T_L = MatrixSpace(R, h)(0) + T_L = MatrixSpace(R, h).zero() S, X = Fp2['x'].objgen() for i in range(len(SS)): diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py index 5ac636c433a..86ab2edd193 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py @@ -97,7 +97,7 @@ Sage example in ./polynomes.tex, line 551:: sage: A = QQ['x'] - sage: A.is_ring() and A.is_noetherian() + sage: A in Rings() and A.is_noetherian() True Sage example in ./polynomes.tex, line 559:: diff --git a/src/sage/topology/simplicial_complex.py b/src/sage/topology/simplicial_complex.py index aba3289607e..f7870435782 100644 --- a/src/sage/topology/simplicial_complex.py +++ b/src/sage/topology/simplicial_complex.py @@ -159,22 +159,24 @@ # cohomology: compute cup products (and Massey products?) from copy import copy -from sage.misc.lazy_import import lazy_import -from sage.misc.cachefunc import cached_method +from itertools import combinations, chain +from functools import total_ordering + from .cell_complex import GenericCellComplex -from sage.structure.sage_object import SageObject -from sage.structure.parent import Parent +from sage.categories.fields import Fields +from sage.misc.cachefunc import cached_method +from sage.misc.latex import latex +from sage.misc.lazy_import import lazy_import +from sage.misc.superseded import deprecation from sage.rings.integer import Integer -from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.polynomial_ring import polygens -from sage.sets.set import Set from sage.rings.integer_ring import ZZ +from sage.rings.polynomial.polynomial_ring import polygens +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.rational_field import QQ +from sage.sets.set import Set from sage.structure.category_object import normalize_names -from sage.misc.latex import latex -from sage.misc.superseded import deprecation -from functools import total_ordering -from itertools import combinations, chain +from sage.structure.parent import Parent +from sage.structure.sage_object import SageObject lazy_import('sage.categories.simplicial_complexes', 'SimplicialComplexes') lazy_import('sage.matrix.constructor', 'matrix') @@ -321,10 +323,7 @@ def rename_vertex(n, keep, left=True): try: return lookup[n] except KeyError: - if left: - return "L" + str(n) - else: - return "R" + str(n) + return ("L" + str(n)) if left else ("R" + str(n)) @total_ordering @@ -644,7 +643,7 @@ def product(self, other, rename_vertices=True): answer = [] for x in lattice_paths(self.tuple(), other.tuple()): - new = tuple(["L" + str(v) + "R" + str(w) for (v, w) in x]) + new = tuple(["L" + str(v) + "R" + str(w) for v, w in x]) answer.append(Simplex(new)) return answer @@ -2435,10 +2434,10 @@ def _homology_(self, dim=None, base_ring=ZZ, subcomplex=None, if H_with_gens: chains = self.n_chains(i, base_ring=base_ring) new_H = [] - for (H, gen) in H_with_gens: + for H, gen in H_with_gens: v = gen.vector(i) new_gen = chains.zero() - for (coeff, chaine) in zip(v, chains.gens()): + for coeff, chaine in zip(v, chains.gens()): new_gen += coeff * chaine new_H.append((H, new_gen)) answer[i] = new_H @@ -2450,7 +2449,7 @@ def _homology_(self, dim=None, base_ring=ZZ, subcomplex=None, # Fix non-reduced answer. if subcomplex is None and not reduced and 0 in dim: try: - if base_ring.is_field(): + if base_ring in Fields(): rank = answer[0].dimension() else: rank = len(answer[0].invariants()) @@ -3076,7 +3075,7 @@ def is_cohen_macaulay(self, base_ring=QQ, ncpus=0): def all_homologies_vanish(F): S = self.link(F) H = S.homology(base_ring=base_ring) - if base_ring.is_field(): + if base_ring in Fields(): return all(H[j].dimension() == 0 for j in range(S.dimension())) else: return not any(H[j].invariants() for j in range(S.dimension())) @@ -4998,7 +4997,7 @@ def bigraded_betti_number(self, a, b, base_ring=ZZ, verbose=False): """ if b % 2: return ZZ.zero() - if a == 0 and b == 0: + if a == 0 == b: return ZZ.one() if base_ring in self._bbn and not verbose: if base_ring in self._bbn_all_computed: @@ -5049,7 +5048,7 @@ def is_golod(self) -> bool: sage: Y.is_golod() True """ - H = [a+b for (a, b) in self.bigraded_betti_numbers()] + H = [a+b for a, b in self.bigraded_betti_numbers()] if 0 in H: H.remove(0) @@ -5121,6 +5120,7 @@ def moment_angle_complex(self): from .moment_angle_complex import MomentAngleComplex return MomentAngleComplex(self) + # Miscellaneous utility functions. # The following two functions can be used to generate the facets for From 19d6ce3ba6c61785ac35f21695a1ce696c786494 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Thu, 11 Apr 2024 12:39:49 +0900 Subject: [PATCH 117/183] Speed up symmetric group simple_module_rank(). --- src/sage/combinat/specht_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/specht_module.py b/src/sage/combinat/specht_module.py index 127903829f7..260a3fbde43 100644 --- a/src/sage/combinat/specht_module.py +++ b/src/sage/combinat/specht_module.py @@ -1351,12 +1351,12 @@ def tabloid_gram_matrix(la, base_ring): [4 1 1 2 4] """ from sage.combinat.tableau import StandardTableaux - ST = StandardTableaux(la) + ST = list(StandardTableaux(la)) def bilinear_form(p1, p2): if len(p2) < len(p1): p1, p2 = p2, p1 - return sum(c1 * p2.get(T1, 0) for T1, c1 in p1.items() if c1) + return sum(c1 * p2[T1] for T1, c1 in p1.items() if c1 and T1 in p2) PT = {T: polytabloid(T) for T in ST} gram_matrix = [[bilinear_form(PT[T1], PT[T2]) for T1 in ST] for T2 in ST] From f87b6fdd845ea8a36220634fbd01709ac029bef8 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Thu, 11 Apr 2024 14:41:23 +0900 Subject: [PATCH 118/183] Make the gcd look nice in xgcd --- src/sage/rings/polynomial/laurent_polynomial.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/laurent_polynomial.pyx b/src/sage/rings/polynomial/laurent_polynomial.pyx index 5ae5dee4a9b..742475231c8 100644 --- a/src/sage/rings/polynomial/laurent_polynomial.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial.pyx @@ -1321,7 +1321,7 @@ cdef class LaurentPolynomial_univariate(LaurentPolynomial): @coerce_binop def xgcd(self, other): r""" - Extended `gcd` for univariate Laurent polynomial rings over a field. + Extended :meth:`gcd` for univariate Laurent polynomial rings over a field. OUTPUT: From ededb5980198a783d0cbcf1c08edecc8ef12326e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 10 Apr 2024 22:56:26 -0700 Subject: [PATCH 119/183] build/bin/sage-logger: Suppress error message output when /usr/bin/time is not available --- build/bin/sage-logger | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bin/sage-logger b/build/bin/sage-logger index 6945ba98182..1661e52f5f8 100755 --- a/build/bin/sage-logger +++ b/build/bin/sage-logger @@ -63,7 +63,7 @@ fi timefile="$logdir/$logname.time" rm -f "$timefile" -if /usr/bin/time -h -o /dev/null true; then +if /usr/bin/time -h -o /dev/null true 2>/dev/null; then TIME="/usr/bin/time -h -o $timefile" else TIME="" @@ -71,7 +71,7 @@ fi report_time () { - time=$(echo $(cat $timefile)) + time=$(echo $(cat $timefile 2>/dev/null)) case "$time" in *m*real*|*h*real*|*[1-9][0-9].*real*|*[1-9][0-9],*real*) # at least 10 seconds wall time From d3c60a2ed9ad38f78e06a8bb18e706a968e9441e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Thu, 11 Apr 2024 08:05:19 +0200 Subject: [PATCH 120/183] undo wrong move --- src/sage/modular/ssmod/ssmod.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/modular/ssmod/ssmod.py b/src/sage/modular/ssmod/ssmod.py index 550e0e29ec4..e00da45a87e 100644 --- a/src/sage/modular/ssmod/ssmod.py +++ b/src/sage/modular/ssmod/ssmod.py @@ -837,7 +837,7 @@ def hecke_matrix(self, L): Fp2 = self.__finite_field h = len(SS) R = self.base_ring() - T_L = MatrixSpace(R, h).zero() + T_L = MatrixSpace(R, h)(0) # mutable S, X = Fp2['x'].objgen() for i in range(len(SS)): From 4d23d18c71382d4b6e3d5f419a0553c17eeff579 Mon Sep 17 00:00:00 2001 From: gmou3 <32706872+gmou3@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:13:54 +0300 Subject: [PATCH 121/183] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``mapping[e]`` Co-authored-by: Matthias Köppe --- src/sage/matroids/circuit_closures_matroid.pyx | 2 +- src/sage/matroids/circuits_matroid.pyx | 2 +- src/sage/matroids/flats_matroid.pyx | 2 +- src/sage/matroids/graphic_matroid.py | 4 ++-- src/sage/matroids/linear_matroid.pyx | 10 +++++----- src/sage/matroids/matroid.pyx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index eced2f7ce35..cabd077202d 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -578,7 +578,7 @@ cdef class CircuitClosuresMatroid(Matroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index 455a4d8464a..2f9ad33d028 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -423,7 +423,7 @@ cdef class CircuitsMatroid(Matroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index 1d736eddfe7..06d0d249353 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -310,7 +310,7 @@ cdef class FlatsMatroid(Matroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 8d7fdd89757..6b7e54340ad 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -2012,7 +2012,7 @@ def relabel(self, mapping): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid @@ -2022,7 +2022,7 @@ def relabel(self, mapping): sage: M = matroids.CompleteGraphic(4) sage: sorted(M.groundset()) [0, 1, 2, 3, 4, 5] - sage: N = M.relabel({0:6, 5:'e'}) + sage: N = M.relabel({0: 6, 5: 'e'}) sage: sorted(N.groundset(), key=str) [1, 2, 3, 4, 6, 'e'] sage: N.is_isomorphic(M) diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 80795c5272a..cfa0698178e 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -2983,7 +2983,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid @@ -4085,7 +4085,7 @@ cdef class BinaryMatroid(LinearMatroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid @@ -5016,7 +5016,7 @@ cdef class TernaryMatroid(LinearMatroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid @@ -5778,7 +5778,7 @@ cdef class QuaternaryMatroid(LinearMatroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid @@ -6734,7 +6734,7 @@ cdef class RegularMatroid(LinearMatroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 3529d5bc5b9..7e20e58d75b 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -8434,7 +8434,7 @@ cdef class Matroid(SageObject): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of `e` OUTPUT: a matroid From f2bdbb2af3c9063c40a7860840ed599148e641c3 Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Thu, 11 Apr 2024 14:19:15 +0300 Subject: [PATCH 122/183] Add is_graphic/regular --- src/sage/matroids/database_matroids.py | 6 +++ src/sage/matroids/graphic_matroid.py | 28 +++++++++++ src/sage/matroids/linear_matroid.pyx | 14 ++++++ src/sage/matroids/matroid.pxd | 2 + src/sage/matroids/matroid.pyx | 67 ++++++++++++++++++++++++++ 5 files changed, 117 insertions(+) diff --git a/src/sage/matroids/database_matroids.py b/src/sage/matroids/database_matroids.py index 0017ce0627e..6da7c02b902 100644 --- a/src/sage/matroids/database_matroids.py +++ b/src/sage/matroids/database_matroids.py @@ -112,6 +112,8 @@ def U25(): sage: U25 = matroids.catalog.U25(); U25 U(2, 5): Matroid of rank 2 on 5 elements with circuit-closures {2: {{0, 1, 2, 3, 4}}} + sage: U25.is_graphic() or U25.is_regular() + False sage: U35 = matroids.catalog.U35() sage: U25.is_isomorphic(U35.dual()) True @@ -135,6 +137,8 @@ def U35(): sage: U35 = matroids.catalog.U35(); U35 U(3, 5): Matroid of rank 3 on 5 elements with circuit-closures {3: {{0, 1, 2, 3, 4}}} + sage: U35.is_graphic() or U35.is_regular() + False sage: U25 = matroids.catalog.U25() sage: U35.is_isomorphic(U25.dual()) True @@ -155,6 +159,8 @@ def K4(): sage: M = matroids.catalog.K4(); M M(K4): Graphic matroid of rank 3 on 6 elements + sage: M.is_graphic() + True `M(K_4)` is isomorphic to `M(\mathcal{W}_3)`, the rank-`3` wheel:: diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 57bbae15f22..4a425cb896c 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -1161,6 +1161,34 @@ def is_valid(self): """ return True + def is_graphic(self): + r""" + Return if ``self`` is graphic. + + This is trivially ``True`` for a class:`GraphicMatroid`. + + EXAMPLES:: + + sage: M = Matroid(graphs.PetersenGraph()) + sage: M.is_graphic() + True + """ + return True + + def is_regular(self): + r""" + Return if ``self`` is regular. + + This is always ``True`` for a class:`GraphicMatroid`. + + EXAMPLES:: + + sage: M = Matroid(graphs.DesarguesGraph()) + sage: M.is_regular() + True + """ + return True + # Graphic methods: def graph(self): diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 7b6eb9bb711..e710c1777da 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -6367,6 +6367,20 @@ cdef class RegularMatroid(LinearMatroid): # representation + def is_regular(self): + r""" + Return if ``self`` is regular. + + This is trivially ``True`` for a class:`RegularMatroid`. + + EXAMPLES:: + + sage: M = matroids.catalog.R10() + sage: M.is_regular() + True + """ + return True + cpdef binary_matroid(self, randomized_tests=1, verify = True): r""" Return a binary matroid representing ``self``. diff --git a/src/sage/matroids/matroid.pxd b/src/sage/matroids/matroid.pxd index 5103bcf2a4b..9a2b6f9eaa9 100644 --- a/src/sage/matroids/matroid.pxd +++ b/src/sage/matroids/matroid.pxd @@ -193,6 +193,8 @@ cdef class Matroid(SageObject): cpdef _local_ternary_matroid(self, basis=*) cpdef ternary_matroid(self, randomized_tests=*, verify=*) cpdef is_ternary(self, randomized_tests=*) + cpdef is_regular(self) + cpdef is_graphic(self) # matroid k-closed cpdef is_k_closed(self, int k) diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 781f72592ac..56eb6d0269d 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -116,6 +116,8 @@ additional functionality (e.g. linear extensions). - :meth:`girth() ` - Representation + - :meth:`is_graphic() ` + - :meth:`is_regular() ` - :meth:`binary_matroid() ` - :meth:`is_binary() ` - :meth:`ternary_matroid() ` @@ -6465,6 +6467,71 @@ cdef class Matroid(SageObject): """ return self.ternary_matroid(randomized_tests=randomized_tests, verify=True) is not None + cpdef is_graphic(self): + r""" + Return if ``self`` is graphic. + + A matroid is graphic if and only if it has no minor isomorphic to any + of the matroids `U_{2, 4}`, `F_7`, `F_7^*`, `M^*(K_5)`, and + `M^*(K_{3, 3})`. + + EXAMPLES:: + + sage: M = matroids.catalog.Wheel4() + sage: M.is_graphic() + True + sage: M = matroids.catalog.U24() + sage: M.is_graphic() + False + + REFERENCES: + + [Oxl2011]_, p. 385. + """ + from sage.matroids.database_matroids import ( + U24, + Fano, + FanoDual, + K5dual, + K33dual + ) + excluded_minors = [U24(), Fano(), FanoDual(), K5dual(), K33dual()] + for M in excluded_minors: + if self.has_minor(M): + return False + return True + + cpdef is_regular(self): + r""" + Return if ``self`` is regular. + + A regular matroid is one that can be represented by a totally + unimodular matrix, the latter being a matrix over `\mathbb{R}` for + which every square submatrix has determinant in `\{0, 1, -1\}`. A + matroid is regular if and only if it is representable over every field. + Alternatively, a matroid is regular if and only if it has no minor + isomorphic to `U_{2, 4}`, `F_7`, or `F_7^*`. + + EXAMPLES:: + + sage: M = matroids.catalog.Wheel4() + sage: M.is_regular() + True + sage: M = matroids.catalog.R9() + sage: M.is_regular() + False + + REFERENCES: + + [Oxl2011]_, p. 373. + """ + if not self.is_binary(): # equivalent to checking for a U24 minor + return False + from sage.matroids.database_matroids import Fano, FanoDual + if self.has_minor(Fano()) or self.has_minor(FanoDual()): + return False + return True + # matroid k-closed cpdef is_k_closed(self, int k): From 0c49d81a6571d1f1c8e85fb95fd51e1f10124129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Thu, 11 Apr 2024 13:41:52 +0200 Subject: [PATCH 123/183] various ruff fixes in groups (PERF, etc) --- .../additive_abelian_wrapper.py | 31 ++++++------ src/sage/groups/braid.py | 4 +- src/sage/groups/class_function.py | 28 +++++------ src/sage/groups/cubic_braid.py | 47 +++++++++--------- src/sage/groups/finitely_presented.py | 7 ++- src/sage/groups/generic.py | 3 +- src/sage/groups/kernel_subgroup.py | 1 + src/sage/groups/libgap_mixin.py | 12 ++--- .../matrix_gps/finitely_generated_gap.py | 10 ++-- src/sage/groups/matrix_gps/orthogonal.py | 19 ++++---- src/sage/groups/perm_gps/permgroup.py | 48 ++++++++++--------- src/sage/groups/perm_gps/permgroup_named.py | 25 +++++----- .../semimonomial_transformation_group.py | 4 +- 13 files changed, 116 insertions(+), 123 deletions(-) diff --git a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py index bf16874d97f..3edddea25e7 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py +++ b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py @@ -77,6 +77,7 @@ from sage.misc.superseded import deprecated_function_alias + class UnwrappingMorphism(Morphism): r""" The embedding into the ambient group. Used by the coercion framework. @@ -213,7 +214,7 @@ def __init__(self, universe, gens, invariants): self._universe = universe self._gen_elements = tuple(universe(x) for x in gens) self._gen_orders = invariants - cover,rels = addgp.cover_and_relations_from_invariants(invariants) + cover, rels = addgp.cover_and_relations_from_invariants(invariants) addgp.AdditiveAbelianGroup_fixed_gens.__init__(self, cover, rels, cover.gens()) self._unset_coercions_used() self.register_embedding(UnwrappingMorphism(self)) @@ -488,13 +489,13 @@ def torsion_subgroup(self, n=None): if n <= 0: raise ValueError('n must be a positive integer') gens, ords = [], [] - for g,o in genords: + for g, o in genords: if not o: continue d = n.gcd(o) if d == 1: continue - gens.append(o//d * g) + gens.append(o // d * g) ords.append(d) return AdditiveAbelianGroupWrapper(self.universe(), gens, ords) @@ -691,9 +692,9 @@ def _expand_basis_pgroup(p, alphas, vals, beta, h, rel): if not (isinstance(alphas, list) and isinstance(vals, list)): raise TypeError('alphas and vals must be lists for mutability') if not len(alphas) == len(vals) == k - 1: - raise ValueError(f'alphas and/or vals have incorrect length') -# assert not sum(r*a for r,a in zip(rel, alphas+[beta])) -# assert all(a.order() == p**v for a,v in zip(alphas,vals)) + raise ValueError('alphas and/or vals have incorrect length') + # assert not sum(r*a for r,a in zip(rel, alphas+[beta])) + # assert all(a.order() == p**v for a,v in zip(alphas,vals)) if rel[-1] < 0: raise ValueError('rel must have nonnegative entries') @@ -726,8 +727,8 @@ def _expand_basis_pgroup(p, alphas, vals, beta, h, rel): return # step 3 - j = next(j for j,r in enumerate(rel) if r == min_r) - alphas[j] = sum(a * (r//rel[j]) for a,r in zip(alphas+[beta], rel)) + j = next(j for j, r in enumerate(rel) if r == min_r) + alphas[j] = sum(a * (r // rel[j]) for a, r in zip(alphas + [beta], rel)) # step 4 if not alphas[j]: @@ -752,7 +753,8 @@ def _expand_basis_pgroup(p, alphas, vals, beta, h, rel): else: alphas.append(beta) vals.append(h) -# assert alphas[-1].order() == p**vals[-1] + # assert alphas[-1].order() == p**vals[-1] + def basis_from_generators(gens, ords=None): r""" @@ -803,7 +805,8 @@ def basis_from_generators(gens, ords=None): gammas = [] ms = [] for p in ps: - pgens = [(o.prime_to_m_part(p) * g, o.p_primary_part(p)) for g, o in zip(gens, ords) if not o % p] + pgens = [(o.prime_to_m_part(p) * g, o.p_primary_part(p)) + for g, o in zip(gens, ords) if not o % p] assert pgens pgens.sort(key=lambda tup: tup[1]) @@ -814,7 +817,7 @@ def basis_from_generators(gens, ords=None): while pgens: beta, ord_beta = pgens.pop() try: - dlog = _discrete_log_pgroup(p, vals, alphas, beta) + _ = _discrete_log_pgroup(p, vals, alphas, beta) except ValueError: pass else: @@ -845,8 +848,8 @@ def basis_from_generators(gens, ords=None): gammas.append(a) ms.append(p ** v) -## assert len({sum(i*g for i,g in zip(vec,gammas)) -## for vec in __import__('itertools').product(*map(range,ms))}) \ -## == __import__('sage').misc.misc_c.prod(ms) +# assert len({sum(i*g for i,g in zip(vec,gammas)) +# for vec in __import__('itertools').product(*map(range,ms))}) \ +# == __import__('sage').misc.misc_c.prod(ms) return gammas, ms diff --git a/src/sage/groups/braid.py b/src/sage/groups/braid.py index fb52b074218..3b48e00effd 100644 --- a/src/sage/groups/braid.py +++ b/src/sage/groups/braid.py @@ -2590,8 +2590,8 @@ def __init__(self, names): rels = [] for i in range(1, n): rels.append(free_group([i, i + 1, i, -i - 1, -i, -i - 1])) - for j in range(i + 2, n + 1): - rels.append(free_group([i, j, -i, -j])) + rels.extend(free_group([i, j, -i, -j]) + for j in range(i + 2, n + 1)) cat = Groups().Infinite() FinitelyPresentedGroup.__init__(self, free_group, tuple(rels), category=cat) diff --git a/src/sage/groups/class_function.py b/src/sage/groups/class_function.py index 901b0083b49..6ca0d9ee2cb 100644 --- a/src/sage/groups/class_function.py +++ b/src/sage/groups/class_function.py @@ -605,10 +605,9 @@ def irreducible_constituents(self): L = self._gap_classfunction.ConstituentsOfCharacter() return tuple(ClassFunction(self._group, list(l)) for l in L) - def decompose(self): + def decompose(self) -> tuple: r""" - Returns a list of the characters that appear in the decomposition - of chi. + Return a list of the characters appearing the decomposition of ``self``. EXAMPLES:: @@ -618,14 +617,13 @@ def decompose(self): ((3, Character of Symmetric group of order 5! as a permutation group), (2, Character of Symmetric group of order 5! as a permutation group)) """ - L = [] - for irr in self.irreducible_constituents(): - L.append((self.scalar_product(irr), irr)) + L = [(self.scalar_product(irr), irr) + for irr in self.irreducible_constituents()] return tuple(L) def norm(self): r""" - Returns the norm of self. + Return the norm of ``self``. EXAMPLES:: @@ -635,7 +633,7 @@ def norm(self): """ return self._gap_classfunction.Norm() - def values(self): + def values(self) -> list: r""" Return the list of values of self on the conjugacy classes. @@ -665,7 +663,7 @@ def values(self): def central_character(self): r""" - Returns the central character of self. + Return the central character of ``self``. EXAMPLES:: @@ -677,7 +675,7 @@ def central_character(self): def determinant_character(self): r""" - Returns the determinant character of self. + Return the determinant character of ``self``. EXAMPLES:: @@ -1310,10 +1308,9 @@ def irreducible_constituents(self): L = self._gap_classfunction.ConstituentsOfCharacter() return tuple(ClassFunction_libgap(self._group, l) for l in L) - def decompose(self): + def decompose(self) -> tuple: r""" - Return a list of the characters that appear in the decomposition - of ``self``. + Return a list of the characters appearing the decomposition of ``self``. EXAMPLES:: @@ -1323,9 +1320,8 @@ def decompose(self): ((3, Character of Symmetric group of order 5! as a permutation group), (2, Character of Symmetric group of order 5! as a permutation group)) """ - L = [] - for irr in self.irreducible_constituents(): - L.append((self.scalar_product(irr), irr)) + L = [(self.scalar_product(irr), irr) + for irr in self.irreducible_constituents()] return tuple(L) def norm(self): diff --git a/src/sage/groups/cubic_braid.py b/src/sage/groups/cubic_braid.py index 9dd59e069f9..c80da80520e 100644 --- a/src/sage/groups/cubic_braid.py +++ b/src/sage/groups/cubic_braid.py @@ -128,7 +128,7 @@ def eliminate_item(tietze_list): return None first = tietze_list[0] second = None - for i in range(1,l): + for i in range(1, l): if tietze_list[i] in (first, -first): if i == 1: second = tietze_list[i] @@ -502,9 +502,9 @@ def find_root(domain): # -------------------------------------------------------------------- cbg_type = self.parent()._cbg_type if cbg_type == CubicBraidGroup.type.AssionS: - characteristic = 3 # making Assion type S relations vanish + characteristic = 3 # making Assion type S relations vanish elif cbg_type == CubicBraidGroup.type.AssionU: - characteristic = 2 # making Assion type U relations vanish + characteristic = 2 # making Assion type U relations vanish else: characteristic = 0 try: @@ -512,7 +512,7 @@ def find_root(domain): except ValueError: raise ValueError('characteristic must be in integer') - if not characteristic.is_zero() and not characteristic.is_prime(): + if not characteristic.is_zero() and not characteristic.is_prime(): raise ValueError('characteristic must be a prime') if characteristic.is_zero(): from sage.rings.number_field.number_field import CyclotomicField @@ -526,7 +526,7 @@ def find_root(domain): root_bur = find_root(domain) domain = root_bur.parent() - else: # domain is not None + else: # domain is not None root_bur = find_root(domain) else: # root_bur is not None @@ -550,11 +550,11 @@ def conv2domain(laur_pol): from sage.matrix.constructor import matrix d1, d2 = burau_ori.dimensions() - burau_mat = matrix(d1, d2, lambda i,j: conv2domain(burau_ori[i,j])) + burau_mat = matrix(d1, d2, lambda i, j: conv2domain(burau_ori[i, j])) if unitary: - burau_mat_adj = matrix(d1, d2, lambda i,j: conv2domain(burau_ori_adj[i,j])) - herm_form = matrix(d1, d2, lambda i,j: conv2domain(herm_form_ori[i,j])) + burau_mat_adj = matrix(d1, d2, lambda i, j: conv2domain(burau_ori_adj[i, j])) + herm_form = matrix(d1, d2, lambda i, j: conv2domain(herm_form_ori[i, j])) return burau_mat, burau_mat_adj, herm_form return burau_mat @@ -764,15 +764,14 @@ def __init__(self, names, cbg_type=None): # internal naming of elements for convenience b = [free_group([i]) for i in range(1, n+1)] - t = [free_group([i, i+1]) ** 3 for i in range(1, n)] + t = [free_group([i, i+1]) ** 3 for i in range(1, n)] ti = [free_group([-i, -i-1]) ** 3 for i in range(1, n)] - # first the braid relation + # first the braid relations rels = list(self._braid_group.relations()) - # than the cubic relation - for i in range(n): - rels.append(b[i]**3) + # than the cubic relations + rels.extend(b[i]**3 for i in range(n)) # than Assion's relation Satz 2.2 for cbg_type=CubicBraidGroup.type.AssionS # and Satz 2.4 for cbg_type=CubicBraidGroup.type.AssionU @@ -1276,7 +1275,7 @@ def create_unitary_realization(self, m): if pos + 1 < m: transvections.append(xbas[pos-1]+xbas[pos]+xbas[pos+1]) # t_{3i+1} = x_{3i-1} + x_{3i} + x_{3i+1} if pos + 3 < m: - transvections.append(xbas[pos+1]+xbas[pos+2]+xbas[pos+3]) # t_{3i+2} = x_{3i+1} + x_{3i+2} + x_{3i+3} + transvections.append(xbas[pos+1]+xbas[pos+2]+xbas[pos+3]) # t_{3i+2} = x_{3i+1} + x_{3i+2} + x_{3i+3} # ----------------------------------------------------------- # Conversion-Map from transvection vector to transvection @@ -1299,15 +1298,14 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a): set_classical_realization(self, base_group, proj_group, centralizing_matrix, transvec_matrices) return - #---------------------------------------------------------------------------------------------------------- - #---------------------------------------------------------------------------------------------------------- + # ---------------------------------------------------------------- # local functions declaration section finishes here - #---------------------------------------------------------------------------------------------------------- - #---------------------------------------------------------------------------------------------------------- + # ---------------------------------------------------------------- - # ------------------------------------------------------------------------------- + # ---------------------------------------------------------------- # initialization of constants - # ------------------------------------------------------------------------------- + # ---------------------------------------------------------------- + n = self.strands() # ------------------------------------------------------------------------------- @@ -1317,7 +1315,7 @@ def transvec2mat(v, bas=bas, bform=bform, fact=a): dim_sympl_group = n-1 # S(n-1) = Sp(n-1, 3) if n % 2 == 0: dim_sympl_group = n # S(n-1) = subgroup of PSp(n, 3) - create_sympl_realization(self, dim_sympl_group) + create_sympl_realization(self, dim_sympl_group) elif self._cbg_type == CubicBraidGroup.type.AssionU: dim_unitary_group = n-1 # U(n-1) = GU(n-1, 2) if n % 3 == 0: @@ -1543,8 +1541,9 @@ def as_matrix_group(self, root_bur=None, domain=None, characteristic=None, var=' unitary = True gen_list = [] for braid_gen in self.gens(): - bur_mat = braid_gen.burau_matrix(root_bur=root_bur, domain=domain, characteristic=characteristic, - var=var, reduced=reduced) + bur_mat = braid_gen.burau_matrix(root_bur=root_bur, domain=domain, + characteristic=characteristic, + var=var, reduced=reduced) if unitary: bur_mat, bur_mat_ad, herm_form = bur_mat @@ -1809,7 +1808,7 @@ def as_reflection_group(self): if not is_chevie_available(): raise ImportError("the GAP3 package 'CHEVIE' is needed to obtain the corresponding reflection groups") - if self._cbg_type != CubicBraidGroup.type.Coxeter or self.strands() > 5 or self.strands() < 2: + if self._cbg_type != CubicBraidGroup.type.Coxeter or self.strands() > 5 or self.strands() < 2: raise ValueError("no reflection group defined") # ------------------------------------------------------------------------------- diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index 3388c41d954..7d96975fe22 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -1005,7 +1005,7 @@ def as_permutation_group(self, limit=4096000): from sage.combinat.permutation import Permutation from sage.groups.perm_gps.permgroup import PermutationGroup return PermutationGroup([ - Permutation(coset_table[2*i]) for i in range(len(coset_table)//2)]) + Permutation(coset_table[2*i]) for i in range(len(coset_table)//2)]) def direct_product(self, H, reduced=False, new_names=True): r""" @@ -1548,14 +1548,13 @@ def sorted_presentation(self): L1 = [] for rel in L0: C = [rel] - for j in range(len(rel) - 1): - C.append(rel[j + 1:] + rel[:j + 1]) + C.extend(rel[j + 1:] + rel[:j + 1] for j in range(len(rel) - 1)) C1 = [tuple(-j for j in reversed(l)) for l in C] C += C1 C.sort() L1.append(C[0]) L1.sort() - return F/L1 + return F / L1 def epimorphisms(self, H): r""" diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index cb406b444af..fccb76fe0ef 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -901,7 +901,7 @@ def discrete_log(a, base, ord=None, bounds=None, operation='*', identity=None, i power = lambda x, y: multiple(x, y, operation=operation, identity=identity, inverse=inverse, op=op) if bounds: lb, ub = map(integer_ring.ZZ, bounds) - if (op is None or identity is None or inverse is None or ord is None) and operation not in addition_names+multiplication_names: + if (op is None or identity is None or inverse is None or ord is None) and operation not in addition_names + multiplication_names: raise ValueError("ord, op, identity, and inverse must all be specified for this operation") if ord is None: if operation in multiplication_names: @@ -1500,7 +1500,6 @@ def has_order(P, n, operation='+'): return False n = n.factor() - G = P.parent() if operation in addition_names: isid = lambda el: not el mult = lambda el, n: multiple(el, n, operation='+') diff --git a/src/sage/groups/kernel_subgroup.py b/src/sage/groups/kernel_subgroup.py index dec7a0be573..6a20b673c57 100644 --- a/src/sage/groups/kernel_subgroup.py +++ b/src/sage/groups/kernel_subgroup.py @@ -21,6 +21,7 @@ from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation + class KernelSubgroup(UniqueRepresentation, Parent): r""" The kernel (normal) subgroup. diff --git a/src/sage/groups/libgap_mixin.py b/src/sage/groups/libgap_mixin.py index 50f8fdf2678..476fb4e9416 100644 --- a/src/sage/groups/libgap_mixin.py +++ b/src/sage/groups/libgap_mixin.py @@ -277,7 +277,7 @@ def conjugacy_classes_representatives(self): if not self.is_finite(): raise NotImplementedError("only implemented for finite groups") G = self.gap() - reps = [ cc.Representative() for cc in G.ConjugacyClasses() ] + reps = [cc.Representative() for cc in G.ConjugacyClasses()] return tuple(self(g) for g in reps) def conjugacy_classes(self): @@ -676,9 +676,7 @@ def irreducible_characters(self): if not self.is_finite(): raise NotImplementedError("only implemented for finite groups") Irr = self.gap().Irr() - L = [] - for irr in Irr: - L.append(ClassFunction_libgap(self, irr)) + L = [ClassFunction_libgap(self, irr) for irr in Irr] return tuple(L) def character(self, values): @@ -731,7 +729,7 @@ def trivial_character(self): """ if not self.is_finite(): raise NotImplementedError("only implemented for finite groups") - values = [1]*self._gap_().NrConjugacyClasses().sage() + values = [1] * self._gap_().NrConjugacyClasses().sage() return self.character(values) def character_table(self): @@ -763,8 +761,8 @@ def character_table(self): [ 4 0 -1 -1 2 1 0] [ 1 1 1 1 1 1 1] """ - #code from function in permgroup.py, but modified for - #how gap handles these groups. + # code from function in permgroup.py, but modified for + # how gap handles these groups. G = self._gap_() cl = self.conjugacy_classes() from sage.rings.integer import Integer diff --git a/src/sage/groups/matrix_gps/finitely_generated_gap.py b/src/sage/groups/matrix_gps/finitely_generated_gap.py index 14bf551789f..b1623f543f9 100644 --- a/src/sage/groups/matrix_gps/finitely_generated_gap.py +++ b/src/sage/groups/matrix_gps/finitely_generated_gap.py @@ -29,7 +29,6 @@ from sage.groups.matrix_gps.finitely_generated import MatrixGroup from sage.groups.matrix_gps.matrix_group_gap import MatrixGroup_gap from sage.matrix.matrix_space import MatrixSpace -from sage.misc.cachefunc import cached_method from sage.misc.functional import cyclotomic_polynomial from sage.modules.free_module_element import vector from sage.rings.fraction_field import FractionField @@ -72,7 +71,7 @@ def __reduce__(self): ) """ return (MatrixGroup, - tuple(g.matrix() for g in self.gens()) + ({'check':False},)) + tuple(g.matrix() for g in self.gens()) + ({'check': False},)) def as_permutation_group(self, algorithm=None, seed=None): r""" @@ -321,7 +320,7 @@ def invariant_generators(self): # test if the field is admissible if F.gen() == 1: # we got the rationals or GF(prime) FieldStr = str(F.characteristic()) - elif hasattr(F,'polynomial'): # we got an algebraic extension + elif hasattr(F, 'polynomial'): # we got an algebraic extension if len(F.gens()) > 1: raise NotImplementedError("can only deal with finite fields and (simple algebraic extensions of) the rationals") FieldStr = '(%d,%s)' % (F.characteristic(), str(F.gen())) @@ -794,10 +793,7 @@ def reynolds_operator(self, poly, chi=None): elif not C.is_absolute() or not K.is_absolute() or not R.is_absolute(): raise NotImplementedError("only implemented for absolute fields") else: - fields = [] - for M in [R,K,C]: - if M.absolute_degree() != 1: - fields.append(M) + fields = [M for M in [R, K, C] if M.absolute_degree() != 1] l = len(fields) if l == 0: # all are QQ diff --git a/src/sage/groups/matrix_gps/orthogonal.py b/src/sage/groups/matrix_gps/orthogonal.py index 3ce9915dfec..c30fc14a331 100644 --- a/src/sage/groups/matrix_gps/orthogonal.py +++ b/src/sage/groups/matrix_gps/orthogonal.py @@ -196,18 +196,18 @@ def _OG(n, R, special, e=0, var='a', invariant_form=None): inserted_text = "with respect to symmetric form" name = '{0} Orthogonal Group of degree {1} over {2} {3}\n{4}'.format( - prefix, degree, ring, inserted_text,invariant_form) + prefix, degree, ring, inserted_text, invariant_form) ltx = r'\text{{{0}O}}_{{{1}}}({2})\text{{ {3} }}{4}'.format( - ltx_prefix, degree, latex(ring), inserted_text, - latex(invariant_form)) + ltx_prefix, degree, latex(ring), inserted_text, + latex(invariant_form)) else: name = '{0} Orthogonal Group of degree {1} over {2}'.format(prefix, degree, ring) ltx = r'\text{{{0}O}}_{{{1}}}({2})'.format(ltx_prefix, degree, latex(ring)) else: name = '{0} Orthogonal Group of degree {1} and form parameter {2} over {3}'.format(prefix, degree, e, ring) ltx = r'\text{{{0}O}}_{{{1}}}({2}, {3})'.format(ltx_prefix, degree, - latex(ring), - '+' if e == 1 else '-') + latex(ring), + '+' if e == 1 else '-') if isinstance(ring, FiniteField): try: @@ -522,11 +522,14 @@ def invariant_bilinear_form(self): m.set_immutable() return m - invariant_quadratic_form = invariant_bilinear_form # this is identical in the generic case - invariant_form = invariant_bilinear_form # alias (analogues to symplectic and unitary cases) + invariant_quadratic_form = invariant_bilinear_form + # this is identical in the generic case + + invariant_form = invariant_bilinear_form + # alias (analogues to symplectic and unitary cases) def _check_matrix(self, x, *args): - """a + """ Check whether the matrix ``x`` is orthogonal. See :meth:`~sage.groups.matrix_gps.matrix_group._check_matrix` diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index f001126ed84..3f6431948ea 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -203,6 +203,7 @@ def wrapped(self, n, p=0): return f(self, n, p=p) return wrapped + def direct_product_permgroups(P): """ Takes the direct product of the permutation groups listed in ``P``. @@ -230,6 +231,7 @@ def direct_product_permgroups(P): G = libgap.DirectProduct(*P) return PermutationGroup(gap_group=G) + def from_gap_list(G, src): r""" Convert a string giving a list of GAP permutations into a list of @@ -249,7 +251,7 @@ def from_gap_list(G, src): # src is a list of strings, each of which is a permutation of # integers in cycle notation. It may contain \n and spaces. src = [str(g)[1:].split(")(") - for g in str(src).replace(" ","").replace("\n","")[1:-2].split("),")] + for g in str(src).replace(" ", "").replace("\n", "")[1:-2].split("),")] # src is a list of list of strings. Each string is a list of # integers separated by ',' @@ -260,6 +262,7 @@ def from_gap_list(G, src): # src is now a list of group elements return src + def PermutationGroup(gens=None, *args, **kwds): """ Return the permutation group associated to `x` (typically a @@ -539,7 +542,7 @@ def __init__(self, gens=None, gap_group=None, canonicalize=True, # to make the domain contain all integers up to the max. # This is needed for backward compatibility if all(isinstance(p, (int, Integer)) for p in domain): - domain = list(range(min([1] + domain), max([1] + domain)+1)) + domain = list(range(min([1] + domain), max([1] + domain) + 1)) if domain not in FiniteEnumeratedSets(): domain = FiniteEnumeratedSet(domain) @@ -823,7 +826,7 @@ def __richcmp__(self, right, op): gSelf = self._libgap_() gRight = right._libgap_() - if op in [op_EQ,op_NE]: + if op in [op_EQ, op_NE]: return gSelf._richcmp_(gRight, op) if gSelf.IsSubgroup(gRight): @@ -906,7 +909,7 @@ def _element_constructor_(self, x, check=True): # We check if we can lift ``x`` to ``self`` directly # so we can pass check=False for speed. if (isinstance(x_parent, PermutationGroup_subgroup) - and x_parent._ambient_group is self): + and x_parent._ambient_group is self): return self.element_class(x, self, check=False) from sage.groups.perm_gps.permgroup_named import SymmetricGroup @@ -1268,9 +1271,9 @@ def elements(SGS): else: enumeration = "depth" return iter(RecursivelyEnumeratedSet( - seeds=seeds, - successors=successors, - enumeration=enumeration)) + seeds=seeds, + successors=successors, + enumeration=enumeration)) else: raise ValueError("the input algorithm (='%s') must be 'SGS', 'BFS' or 'DFS'" % algorithm) @@ -1558,12 +1561,12 @@ def _domain_gap(self, domain=None): '[1, 2, 3, 4, 5]' """ if domain is None: - return repr(list(range(1, self.degree()+1))) - else: - try: - return repr([self._domain_to_gap[point] for point in domain]) - except KeyError: - raise ValueError("domain must be a subdomain of self.domain()") + return repr(list(range(1, self.degree() + 1))) + + try: + return repr([self._domain_to_gap[point] for point in domain]) + except KeyError: + raise ValueError("domain must be a subdomain of self.domain()") @cached_method def smallest_moved_point(self): @@ -1588,7 +1591,7 @@ def smallest_moved_point(self): p = self._libgap_().SmallestMovedPoint() return self._domain_from_gap[Integer(p)] - def representative_action(self,x,y): + def representative_action(self, x, y): r""" Return an element of self that maps `x` to `y` if it exists. @@ -3709,12 +3712,9 @@ def subgroups(self): - Rob Beezer (2011-01-24) """ - all_sg = [] ccs = self._libgap_().ConjugacyClassesSubgroups() - for cc in ccs: - for h in cc.Elements(): - all_sg.append(self.subgroup(gap_group=h)) - return all_sg + return [self.subgroup(gap_group=h) for cc in ccs + for h in cc.Elements()] @cached_method def _regular_subgroup_gap(self): @@ -4166,7 +4166,7 @@ def maximal_normal_subgroups(self): return [self.subgroup(gap_group=gap_subgroup) for gap_subgroup in self._libgap_().MaximalNormalSubgroups()] - ###################### Boolean tests ##################### + # ##################### Boolean tests ##################### def is_abelian(self): """ @@ -4715,7 +4715,7 @@ def normalizes(self, other): """ return bool(self._libgap_().IsNormal(other)) - ############## Series ###################### + # ############# Series ###################### def composition_series(self): """ @@ -4857,7 +4857,8 @@ def molien_series(self): sage: PG.molien_series() == PG1.molien_series()*(1-x)^2 True """ - pi = self._libgap_().PermutationCharacter(list(self.domain()),libgap.OnPoints) + pi = self._libgap_().PermutationCharacter(list(self.domain()), + libgap.OnPoints) M = pi.MolienSeries() R = QQ['x'] @@ -5217,7 +5218,7 @@ def _latex_(self): gens = '\\langle ' + \ ', '.join([x._latex_() for x in self.gens()]) + ' \\rangle' return '\\hbox{Subgroup } %s \\hbox{ of } %s' % \ - (gens, self.ambient_group()._latex_()) + (gens, self.ambient_group()._latex_()) def ambient_group(self): """ @@ -5263,6 +5264,7 @@ def is_normal(self, other=None): # Allow for subclasses to use a different subgroup class PermutationGroup_generic.Subgroup = PermutationGroup_subgroup + class PermutationGroup_action(PermutationGroup_generic): """ A permutation group given by a finite group action. diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index 69014066364..6e979561e43 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -191,7 +191,7 @@ def __classcall__(cls, domain): if domain < 0: raise ValueError("domain (={}) must be an integer >= 0 or a list".format(domain)) - domain = list(range(1, domain+1)) + domain = list(range(1, domain + 1)) v = FiniteEnumeratedSet(domain) else: v = domain @@ -469,17 +469,17 @@ def young_subgroup(self, comp): gens = [] pos = 0 for c in comp: - for i in range(c - 1): - gens.append(self((domain[pos + i], domain[pos + i + 1]))) + gens.extend(self((domain[pos + i], domain[pos + i + 1])) + for i in range(c - 1)) pos += c return self.subgroup(gens) def major_index(self, parameter=None): r""" - Return the *major index generating polynomial* of ``self``, - which is a gadget counting the elements of ``self`` by major - index. + Return the *major index generating polynomial* of ``self``. + + This is a gadget counting the elements of ``self`` by major index. INPUT: @@ -1395,13 +1395,12 @@ def __init__(self, factors): jumppoint = Integer(1) for a in simplified: # create one of the generators for the abelian group - gens.append([tuple(range(jumppoint, jumppoint+a))]) + gens.append([tuple(range(jumppoint, jumppoint + a))]) # make contribution to the generator that dihedralizes the # abelian group - for i in range(1, (a//2)+1): - if i != a-i: - genx.append((jumppoint+i, jumppoint+a-i)) - jumppoint = jumppoint + a + genx.extend((jumppoint+i, jumppoint+a-i) + for i in range(1, (a//2)+1) if i != a-i) + jumppoint += a # If all of the direct factors are C2, then the action turning # each element into its inverse is trivial, and the # semi-direct product becomes a direct product, so we simply @@ -1419,9 +1418,7 @@ def _repr_(self): sage: G Generalized dihedral group generated by C2 x C4 x C8 """ - grouplist = [] - for n in self.factors: - grouplist.append('C{}'.format(n)) + grouplist = [f'C{n}' for n in self.factors] return 'Generalized dihedral group generated by ' + ' x '.join(grouplist) diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py b/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py index e61c7bf64c7..602896e3ee8 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py @@ -311,8 +311,8 @@ def gens(self) -> tuple: from sage.groups.perm_gps.permgroup_named import SymmetricGroup R = self.base_ring() l = [self(v=([R.primitive_element()] + [R.one()] * (self.degree() - 1)))] - for g in SymmetricGroup(self.degree()).gens(): - l.append(self(perm=Permutation(g))) + l.extend(self(perm=Permutation(g)) + for g in SymmetricGroup(self.degree()).gens()) if R.is_field() and not R.is_prime_field(): l.append(self(autom=R.hom([R.primitive_element()**R.characteristic()]))) return tuple(l) From 3e6c11336ed008ae2a834afc3e233ba2b2541b41 Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Thu, 11 Apr 2024 14:55:24 +0300 Subject: [PATCH 124/183] Suggestions by mkoeppe --- src/sage/matroids/basis_exchange_matroid.pxd | 2 +- src/sage/matroids/basis_exchange_matroid.pyx | 29 +++++++++++--------- src/sage/matroids/basis_matroid.pyx | 2 +- src/sage/matroids/circuits_matroid.pyx | 2 +- src/sage/matroids/flats_matroid.pyx | 2 +- src/sage/matroids/matroid.pxd | 2 +- src/sage/matroids/matroid.pyx | 13 +++++---- src/sage/matroids/set_system.pxd | 2 +- src/sage/matroids/set_system.pyx | 17 ++++++------ 9 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/sage/matroids/basis_exchange_matroid.pxd b/src/sage/matroids/basis_exchange_matroid.pxd index 97cc4391633..6bcc9e0236e 100644 --- a/src/sage/matroids/basis_exchange_matroid.pxd +++ b/src/sage/matroids/basis_exchange_matroid.pxd @@ -15,7 +15,7 @@ cdef class BasisExchangeMatroid(Matroid): cdef _weak_invariant_var, _strong_invariant_var, _heuristic_invariant_var cdef SetSystem _weak_partition_var, _strong_partition_var, _heuristic_partition_var - cdef _relabel(self, l) + cdef _relabel(self, mapping) cdef _pack(self, bitset_t, X) cdef __unpack(self, bitset_t) diff --git a/src/sage/matroids/basis_exchange_matroid.pyx b/src/sage/matroids/basis_exchange_matroid.pyx index 835092678e2..4e21994cca1 100644 --- a/src/sage/matroids/basis_exchange_matroid.pyx +++ b/src/sage/matroids/basis_exchange_matroid.pyx @@ -191,27 +191,30 @@ cdef class BasisExchangeMatroid(Matroid): bitset_free(self._output) bitset_free(self._temp) - cdef _relabel(self, l): + cdef _relabel(self, mapping): """ - Relabel each element `e` as `l[e]`, where `l` is a given injective map. + Relabel each element ``e`` as ``mapping[e]``, where ``mapping`` is a + given injective map. INPUT: - - `l`, a python object such that `l[e]` is the new label of e. + - ``mapping`` -- a python object such that ``mapping[e]`` is the new + label of `e` - OUTPUT: + OUTPUT: ``None`` - ``None``. + .. NOTE:: - NOTE: - For internal use. Matroids are immutable but this method does modify the matroid. The use this method will only - be safe in very limited circumstances, such as perhaps on a fresh copy of a matroid. + For internal use. Matroids are immutable but this method does + modify the matroid. The use of this method will only be safe in + very limited circumstances, such as perhaps on a fresh copy of a + matroid. """ cdef long i E = [] for i in range(self._groundset_size): - if self._E[i] in l: - E.append(l[self._E[i]]) + if self._E[i] in mapping: + E.append(mapping[self._E[i]]) else: E.append(self._E[i]) self._E = tuple(E) @@ -222,12 +225,12 @@ cdef class BasisExchangeMatroid(Matroid): self._idx[self._E[i]] = i if self._weak_partition_var: - self._weak_partition_var._relabel(l) + self._weak_partition_var._relabel(mapping) if self._strong_partition_var: - self._strong_partition_var._relabel(l) + self._strong_partition_var._relabel(mapping) if self._heuristic_partition_var: - self._heuristic_partition_var._relabel(l) + self._heuristic_partition_var._relabel(mapping) # the engine cdef _pack(self, bitset_t I, F): diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index 1dc2ff755a3..e1dea45531e 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -560,7 +560,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): """ d = self._relabel_map(mapping) E = [d[x] for x in self.groundset()] - B = [[d[y] for y in list(x)] for x in self.bases()] + B = [[d[y] for y in x] for x in self.bases()] M = BasisMatroid(groundset=E, bases=B) return M diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index 2f9ad33d028..9173f0d791a 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -454,7 +454,7 @@ cdef class CircuitsMatroid(Matroid): E = [d[x] for x in self._groundset] C = [] for i in self._k_C: - C += [[d[y] for y in list(x)] for x in self._k_C[i]] + C += [[d[y] for y in x] for x in self._k_C[i]] M = CircuitsMatroid(groundset=E, circuits=C) return M diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index 06d0d249353..20a89f9ffd7 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -342,7 +342,7 @@ cdef class FlatsMatroid(Matroid): F = {} for i in self._F: F[i] = [] - F[i] += [[d[y] for y in list(x)] for x in self._F[i]] + F[i] += [[d[y] for y in x] for x in self._F[i]] M = FlatsMatroid(groundset=E, flats=F) return M diff --git a/src/sage/matroids/matroid.pxd b/src/sage/matroids/matroid.pxd index 7aa97843c7e..398abb7f2cb 100644 --- a/src/sage/matroids/matroid.pxd +++ b/src/sage/matroids/matroid.pxd @@ -141,7 +141,7 @@ cdef class Matroid(SageObject): cpdef equals(self, other) cpdef is_isomorphism(self, other, morphism) cpdef _is_isomorphism(self, other, morphism) - cpdef _relabel_map(self, f) + cpdef _relabel_map(self, mapping) # minors, dual, truncation cpdef minor(self, contractions=*, deletions=*) diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 7e20e58d75b..37ceec05874 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -8391,15 +8391,16 @@ cdef class Matroid(SageObject): matroids.insert(0, self) return union_matroid.MatroidSum(iter(matroids)) - cpdef _relabel_map(self, f): + cpdef _relabel_map(self, mapping): """ Return a dictionary from the groundset to the relabeled groundset - and check that the mapping defined by ``f`` is valid. + and check that the mapping defined by ``mapping`` is valid. INPUT: - - ``f`` -- a python object such that ``f[e]`` is the new label of `e`; if - ``e not in f`` then the identity map is assumed + - ``mapping`` -- a python object such that ``mapping[e]`` is the new + label of ``e``; if ``mapping[e]`` is not defined then the identity + map is assumed EXAMPLES:: @@ -8415,8 +8416,8 @@ cdef class Matroid(SageObject): d = {} for x in self.groundset(): try: - E.add(f[x]) - d[x] = f[x] + E.add(mapping[x]) + d[x] = mapping[x] except LookupError: E.add(x) d[x] = x diff --git a/src/sage/matroids/set_system.pxd b/src/sage/matroids/set_system.pxd index a283244b53b..3b3a4902a22 100644 --- a/src/sage/matroids/set_system.pxd +++ b/src/sage/matroids/set_system.pxd @@ -9,7 +9,7 @@ cdef class SetSystem: cdef bitset_t _temp cdef copy(self) - cdef _relabel(self, l) + cdef _relabel(self, mapping) cpdef _complements(self) cdef resize(self, k=*) diff --git a/src/sage/matroids/set_system.pyx b/src/sage/matroids/set_system.pyx index 606231a1734..66468756fe5 100644 --- a/src/sage/matroids/set_system.pyx +++ b/src/sage/matroids/set_system.pyx @@ -207,24 +207,23 @@ cdef class SetSystem: S._append(self._subsets[i]) return S - cdef _relabel(self, l): + cdef _relabel(self, mapping): """ - Relabel each element `e` of the ground set as `l(e)`, where `l` is a - given injective map. + Relabel each element ``e`` of the ground set as ``mapping[e]``, where + ``mapping`` is a given injective map. INPUT: - - ``l`` -- a python object such that `l[e]` is the new label of e. + - ``mapping`` -- a python object such that ``mapping[e]`` is the new + label of `e` - OUTPUT: - - ``None``. + OUTPUT: ``None`` """ cdef long i E = [] for i in range(self._groundset_size): - if self._groundset[i] in l: - E.append(l[self._E[i]]) + if self._groundset[i] in mapping: + E.append(mapping[self._E[i]]) else: E.append(self._E[i]) self._groundset = E From b7005f68ecf9b92f4c7957ddc2bf4418a593e0e3 Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Thu, 11 Apr 2024 15:03:59 +0300 Subject: [PATCH 125/183] Change `e` to ``e`` --- src/sage/matroids/basis_exchange_matroid.pyx | 2 +- src/sage/matroids/basis_matroid.pyx | 2 +- src/sage/matroids/circuit_closures_matroid.pyx | 2 +- src/sage/matroids/circuits_matroid.pyx | 2 +- src/sage/matroids/flats_matroid.pyx | 2 +- src/sage/matroids/graphic_matroid.py | 2 +- src/sage/matroids/linear_matroid.pyx | 10 +++++----- src/sage/matroids/matroid.pyx | 2 +- src/sage/matroids/set_system.pyx | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sage/matroids/basis_exchange_matroid.pyx b/src/sage/matroids/basis_exchange_matroid.pyx index 4e21994cca1..9db2f296679 100644 --- a/src/sage/matroids/basis_exchange_matroid.pyx +++ b/src/sage/matroids/basis_exchange_matroid.pyx @@ -199,7 +199,7 @@ cdef class BasisExchangeMatroid(Matroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: ``None`` diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index e1dea45531e..72bb8368b4e 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -532,7 +532,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): INPUT: - ``mapping`` -- a python object such that `mapping[e]` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index cabd077202d..709b40c4dd1 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -579,7 +579,7 @@ cdef class CircuitClosuresMatroid(Matroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index 9173f0d791a..7b46b8ff102 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -424,7 +424,7 @@ cdef class CircuitsMatroid(Matroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index 20a89f9ffd7..8e701c56198 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -311,7 +311,7 @@ cdef class FlatsMatroid(Matroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 6b7e54340ad..21be785969a 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -2013,7 +2013,7 @@ def relabel(self, mapping): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index cfa0698178e..b2fd28c99ea 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -2984,7 +2984,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid @@ -4086,7 +4086,7 @@ cdef class BinaryMatroid(LinearMatroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid @@ -5017,7 +5017,7 @@ cdef class TernaryMatroid(LinearMatroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid @@ -5779,7 +5779,7 @@ cdef class QuaternaryMatroid(LinearMatroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid @@ -6735,7 +6735,7 @@ cdef class RegularMatroid(LinearMatroid): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 37ceec05874..36d7c7f7352 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -8436,7 +8436,7 @@ cdef class Matroid(SageObject): INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/set_system.pyx b/src/sage/matroids/set_system.pyx index 66468756fe5..d4e306abfdd 100644 --- a/src/sage/matroids/set_system.pyx +++ b/src/sage/matroids/set_system.pyx @@ -215,7 +215,7 @@ cdef class SetSystem: INPUT: - ``mapping`` -- a python object such that ``mapping[e]`` is the new - label of `e` + label of ``e`` OUTPUT: ``None`` """ From abc9ef8c9270bea6e455c70bbce820e5a507aced Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Thu, 11 Apr 2024 18:05:24 +0300 Subject: [PATCH 126/183] Docstring improvements in groups --- src/sage/groups/abelian_gps/abelian_aut.py | 8 +- src/sage/groups/abelian_gps/abelian_group.py | 44 ++---- .../abelian_gps/abelian_group_element.py | 18 +-- .../groups/abelian_gps/abelian_group_gap.py | 44 ++---- .../abelian_gps/abelian_group_morphism.py | 8 +- .../groups/abelian_gps/dual_abelian_group.py | 12 +- .../abelian_gps/dual_abelian_group_element.py | 10 +- src/sage/groups/abelian_gps/element_base.py | 16 +-- src/sage/groups/abelian_gps/values.py | 30 ++-- .../additive_abelian_group.py | 11 +- .../additive_abelian_wrapper.py | 4 +- src/sage/groups/additive_abelian/qmodnz.py | 4 +- .../groups/additive_abelian/qmodnz_element.py | 6 +- src/sage/groups/affine_gps/affine_group.py | 12 +- src/sage/groups/affine_gps/group_element.py | 16 +-- src/sage/groups/artin.py | 29 ++-- src/sage/groups/braid.py | 136 ++++++------------ src/sage/groups/class_function.py | 111 ++++++-------- src/sage/groups/conjugacy_classes.py | 2 - src/sage/groups/cubic_braid.py | 14 +- src/sage/groups/finitely_presented.py | 56 ++------ src/sage/groups/finitely_presented_named.py | 34 ++--- src/sage/groups/fqf_orthogonal.py | 5 +- src/sage/groups/free_group.py | 29 ++-- src/sage/groups/generic.py | 30 ++-- src/sage/groups/group.pyx | 15 +- src/sage/groups/group_exp.py | 21 ++- src/sage/groups/group_semidirect_product.py | 4 +- src/sage/groups/libgap_mixin.py | 33 ++--- src/sage/groups/libgap_morphism.py | 23 ++- src/sage/groups/libgap_wrapper.pxd | 1 - src/sage/groups/libgap_wrapper.pyx | 61 +++----- .../groups/matrix_gps/finitely_generated.py | 15 +- src/sage/groups/matrix_gps/group_element.pyx | 4 +- .../groups/matrix_gps/group_element_gap.pyx | 2 +- src/sage/groups/matrix_gps/linear.py | 2 +- src/sage/groups/matrix_gps/matrix_group.py | 25 ++-- .../groups/matrix_gps/matrix_group_gap.py | 11 +- src/sage/groups/matrix_gps/named_group.py | 18 +-- src/sage/groups/matrix_gps/orthogonal.py | 20 +-- src/sage/groups/matrix_gps/symplectic.py | 2 +- src/sage/groups/matrix_gps/symplectic_gap.py | 2 +- src/sage/groups/matrix_gps/unitary.py | 14 +- src/sage/groups/matrix_gps/unitary_gap.py | 4 +- src/sage/groups/misc_gps/argument_groups.py | 60 ++------ src/sage/groups/misc_gps/imaginary_groups.py | 8 +- src/sage/groups/old.pyx | 12 +- src/sage/groups/perm_gps/constructor.py | 6 +- .../automorphism_group_canonical_label.pyx | 10 +- .../partn_ref/canonical_augmentation.pyx | 4 +- .../perm_gps/partn_ref/data_structures.pxd | 11 +- .../perm_gps/partn_ref/data_structures.pyx | 8 +- .../perm_gps/partn_ref/double_coset.pyx | 11 +- .../perm_gps/partn_ref/refinement_binary.pyx | 49 ++++--- .../perm_gps/partn_ref/refinement_graphs.pyx | 6 +- .../perm_gps/partn_ref/refinement_lists.pxd | 1 - .../partn_ref/refinement_matrices.pyx | 9 +- .../perm_gps/partn_ref/refinement_python.pyx | 28 +--- .../perm_gps/partn_ref/refinement_sets.pyx | 12 +- .../partn_ref2/refinement_generic.pyx | 19 +-- src/sage/groups/perm_gps/permgroup.py | 95 ++++-------- .../groups/perm_gps/permgroup_element.pyx | 42 +++--- src/sage/groups/perm_gps/permgroup_named.py | 128 ++++++----------- .../groups/perm_gps/symgp_conjugacy_class.py | 6 +- .../semimonomial_transformation.pyx | 4 +- .../semimonomial_transformation_group.py | 6 +- 66 files changed, 492 insertions(+), 1009 deletions(-) diff --git a/src/sage/groups/abelian_gps/abelian_aut.py b/src/sage/groups/abelian_gps/abelian_aut.py index b27f9bdb220..894b54f6736 100644 --- a/src/sage/groups/abelian_gps/abelian_aut.py +++ b/src/sage/groups/abelian_gps/abelian_aut.py @@ -176,9 +176,7 @@ def matrix(self): The `i`-th row is the exponent vector of the image of the `i`-th generator. - OUTPUT: - - - a square matrix over the integers + OUTPUT: a square matrix over the integers EXAMPLES:: @@ -315,9 +313,7 @@ def _coerce_map_from_(self, S): - ``S`` -- anything - OUTPUT: - - Boolean or nothing + OUTPUT: boolean or nothing EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/abelian_group.py b/src/sage/groups/abelian_gps/abelian_group.py index 90cdcaa42fd..a3db5c46179 100644 --- a/src/sage/groups/abelian_gps/abelian_group.py +++ b/src/sage/groups/abelian_gps/abelian_group.py @@ -448,7 +448,7 @@ def AbelianGroup(n, gens_orders=None, names="f"): def is_AbelianGroup(x): """ - Return True if ``x`` is an Abelian group. + Return ``True`` if ``x`` is an Abelian group. EXAMPLES:: @@ -558,9 +558,7 @@ def is_isomorphic(left, right): - ``right`` -- anything. - OUTPUT: - - Boolean. Whether ``left`` and ``right`` are isomorphic as abelian groups. + OUTPUT: boolean; whether ``left`` and ``right`` are isomorphic as abelian groups EXAMPLES:: @@ -682,9 +680,7 @@ def dual_group(self, names="X", base_ring=None): - ``base_ring`` -- the base ring. If ``None`` (default), then a suitable cyclotomic field is picked automatically. - OUTPUT: - - The :class:`dual abelian group `. + OUTPUT: the :class:`dual abelian group ` EXAMPLES:: @@ -721,7 +717,7 @@ def elementary_divisors(self): r""" This returns the elementary divisors of the group, using Pari. - .. note:: + .. NOTE:: Here is another algorithm for computing the elementary divisors `d_1, d_2, d_3, \ldots`, of a finite abelian group (where `d_1 | d_2 | d_3 | \ldots` @@ -736,9 +732,7 @@ def elementary_divisors(self): on these "smaller invariants" to compute `d_{i-1}`, and so on. (Thanks to Robert Miller for communicating this algorithm.) - OUTPUT: - - A tuple of integers. + OUTPUT: a tuple of integers EXAMPLES:: @@ -806,15 +800,13 @@ def identity(self): def _group_notation(self, eldv): """ - Return abstract group notation for generator orders ``eldv`` + Return abstract group notation for generator orders ``eldv``. INPUT: - ``eldv`` -- iterable of integers. - OUTPUT: - - String. + OUTPUT: a string EXAMPLES:: @@ -955,9 +947,7 @@ def gens_orders(self): Use :meth:`elementary_divisors` if you are looking for an invariant of the group. - OUTPUT: - - A tuple of integers. + OUTPUT: a tuple of integers EXAMPLES:: @@ -1018,9 +1008,7 @@ def invariants(self): Use :meth:`elementary_divisors` if you are looking for an invariant of the group. - OUTPUT: - - A tuple of integers. Zero means infinite cyclic factor. + OUTPUT: a tuple of integers; zero means infinite cyclic factor EXAMPLES:: @@ -1043,7 +1031,7 @@ def invariants(self): def is_cyclic(self): """ - Return True if the group is a cyclic group. + Return ``True`` if the group is a cyclic group. EXAMPLES:: @@ -1153,7 +1141,7 @@ def permutation_group(self): def is_commutative(self): """ - Return True since this group is commutative. + Return ``True`` since this group is commutative. EXAMPLES:: @@ -1787,11 +1775,9 @@ def __contains__(self, x): def ambient_group(self): """ - Return the ambient group related to self. + Return the ambient group related to ``self``. - OUTPUT: - - A multiplicative Abelian group. + OUTPUT: a multiplicative Abelian group EXAMPLES:: @@ -1879,9 +1865,7 @@ def gens(self) -> tuple: """ Return the generators for this subgroup. - OUTPUT: - - A tuple of group elements generating the subgroup. + OUTPUT: a tuple of group elements generating the subgroup EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/abelian_group_element.py b/src/sage/groups/abelian_gps/abelian_group_element.py index b081f1e1c4e..501872aaedd 100644 --- a/src/sage/groups/abelian_gps/abelian_group_element.py +++ b/src/sage/groups/abelian_gps/abelian_group_element.py @@ -120,22 +120,24 @@ def as_permutation(self): def word_problem(self, words): """ - TODO - this needs a rewrite - see stuff in the matrix_grp - directory. - - G and H are abelian groups, g in G, H is a subgroup of G generated - by a list (words) of elements of G. If self is in H, return the - expression for self as a word in the elements of (words). + ``G`` and ``H`` are abelian groups, ``g`` in ``G``, ``H`` is a + subgroup of ``G`` generated by a list (words) of elements of ``G``. If + ``self`` is in ``H``, return the expression for ``self`` as a word in + the elements of (words). This function does not solve the word problem in Sage. Rather it pushes it over to GAP, which has optimized (non-deterministic) algorithms for the word problem. - .. warning:: + .. WARNING:: - Don't use E (or other GAP-reserved letters) as a generator + Don't use ``E`` (or other GAP-reserved letters) as a generator name. + .. TODO:: + + This needs a rewrite - see stuff in the ``matrix_grp`` directory. + EXAMPLES:: sage: # needs sage.libs.gap diff --git a/src/sage/groups/abelian_gps/abelian_group_gap.py b/src/sage/groups/abelian_gps/abelian_group_gap.py index 9ce83a6e33c..41316f3b433 100644 --- a/src/sage/groups/abelian_gps/abelian_group_gap.py +++ b/src/sage/groups/abelian_gps/abelian_group_gap.py @@ -92,9 +92,7 @@ def __reduce__(self): r""" Implement pickling. - OUTPUT: - - - a tuple ``f`` such that this element is ``f[0](*f[1])`` + OUTPUT: a tuple ``f`` such that this element is ``f[0](*f[1])`` EXAMPLES:: @@ -112,9 +110,7 @@ def exponents(self): r""" Return the tuple of exponents of this element. - OUTPUT: - - - a tuple of integers + OUTPUT: a tuple of integers EXAMPLES:: @@ -172,9 +168,7 @@ def order(self): r""" Return the order of this element. - OUTPUT: - - - an integer or infinity + OUTPUT: an integer or infinity EXAMPLES:: @@ -204,9 +198,7 @@ def exponents(self): r""" Return the tuple of exponents of ``self``. - OUTPUT: - - - a tuple of integers + OUTPUT: a tuple of integers EXAMPLES:: @@ -272,9 +264,7 @@ def _coerce_map_from_(self, S): - ``S`` -- anything - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -492,9 +482,7 @@ def gens_orders(self): Use :meth:`elementary_divisors` if you are looking for an invariant of the group. - OUTPUT: - - - a tuple of integers + OUTPUT: a tuple of integers EXAMPLES:: @@ -598,9 +586,7 @@ def subgroup(self, gens): - ``gens`` -- a list of elements coercible into this group - OUTPUT: - - - a subgroup + OUTPUT: a subgroup EXAMPLES:: @@ -643,9 +629,7 @@ class AbelianGroupGap(AbelianGroup_gap): - ``generator_orders`` -- a list of nonnegative integers where `0` gives a factor isomorphic to `\ZZ` - OUTPUT: - - - an abelian group + OUTPUT: an abelian group EXAMPLES:: @@ -850,9 +834,7 @@ def lift(self, x): - ``x`` -- an element of this subgroup - OUTPUT: - - The corresponding element of the ambient group + OUTPUT: the corresponding element of the ambient group EXAMPLES:: @@ -881,9 +863,7 @@ def retract(self, x): - ``x`` -- an element of the ambient group that actually lies in this subgroup. - OUTPUT: - - The corresponding element of this subgroup + OUTPUT: the corresponding element of this subgroup EXAMPLES:: @@ -980,9 +960,7 @@ def _coerce_map_from_(self, S): - ``S`` -- anything - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/abelian_group_morphism.py b/src/sage/groups/abelian_gps/abelian_group_morphism.py index e4b7b82b42b..a44abb83df9 100644 --- a/src/sage/groups/abelian_gps/abelian_group_morphism.py +++ b/src/sage/groups/abelian_gps/abelian_group_morphism.py @@ -44,10 +44,10 @@ def _repr_type(self): class AbelianGroupMorphism(Morphism): """ - Some python code for wrapping GAP's GroupHomomorphismByImages - function for abelian groups. Returns "fail" if gens does not - generate self or if the map does not extend to a group - homomorphism, self - other. + Some python code for wrapping GAP's ``GroupHomomorphismByImages`` + function for abelian groups. Returns "fail" if ``gens`` does not + generate ``self`` or if the map does not extend to a group + homomorphism, ``self`` - ``other``. EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/dual_abelian_group.py b/src/sage/groups/abelian_gps/dual_abelian_group.py index 4aecfd69816..7b1bbaee40d 100644 --- a/src/sage/groups/abelian_gps/dual_abelian_group.py +++ b/src/sage/groups/abelian_gps/dual_abelian_group.py @@ -78,7 +78,7 @@ def is_DualAbelianGroup(x): """ - Return True if `x` is the dual group of an abelian group. + Return ``True`` if `x` is the dual group of an abelian group. EXAMPLES:: @@ -271,9 +271,7 @@ def gens(self) -> tuple: """ Return the generators for the group. - OUTPUT: - - A tuple of group elements generating the group. + OUTPUT: a tuple of group elements generating the group EXAMPLES:: @@ -301,9 +299,7 @@ def gens_orders(self): """ The orders of the generators of the dual group. - OUTPUT: - - A tuple of integers. + OUTPUT: a tuple of integers EXAMPLES:: @@ -361,7 +357,7 @@ def order(self): def is_commutative(self): """ - Return True since this group is commutative. + Return ``True`` since this group is commutative. EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/dual_abelian_group_element.py b/src/sage/groups/abelian_gps/dual_abelian_group_element.py index 6fdb8a68c4e..ecf17404bdd 100644 --- a/src/sage/groups/abelian_gps/dual_abelian_group_element.py +++ b/src/sage/groups/abelian_gps/dual_abelian_group_element.py @@ -64,9 +64,7 @@ def is_DualAbelianGroupElement(x) -> bool: - ``x`` -- anything - OUTPUT: - - Boolean + OUTPUT: boolean EXAMPLES:: @@ -89,10 +87,8 @@ def __call__(self, g): """ Evaluate ``self`` on a group element ``g``. - OUTPUT: - - An element in - :meth:`~sage.groups.abelian_gps.dual_abelian_group.DualAbelianGroup_class.base_ring`. + OUTPUT: an element in + :meth:`~sage.groups.abelian_gps.dual_abelian_group.DualAbelianGroup_class.base_ring` EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/element_base.py b/src/sage/groups/abelian_gps/element_base.py index 0435c9835b9..43d77c29494 100644 --- a/src/sage/groups/abelian_gps/element_base.py +++ b/src/sage/groups/abelian_gps/element_base.py @@ -165,10 +165,6 @@ def _repr_(self): """ Return a string representation of ``self``. - OUTPUT: - - String. - EXAMPLES:: sage: G = AbelianGroup([2]) @@ -199,9 +195,7 @@ def _richcmp_(self, other, op): The comparison is based on the exponents. - OUTPUT: - - boolean + OUTPUT: boolean EXAMPLES:: @@ -220,9 +214,7 @@ def order(self): """ Return the order of this element. - OUTPUT: - - An integer or ``infinity``. + OUTPUT: an integer or ``infinity`` EXAMPLES:: @@ -335,9 +327,7 @@ def is_trivial(self): """ Test whether ``self`` is the trivial group element ``1``. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/values.py b/src/sage/groups/abelian_gps/values.py index 3db117123f0..eda0858b1f8 100644 --- a/src/sage/groups/abelian_gps/values.py +++ b/src/sage/groups/abelian_gps/values.py @@ -193,16 +193,12 @@ def __init__(self, domain, codomain): def _call_(self, x): """ - Return the value associated to ``x`` + Return the value associated to ``x``. INPUT: - ``x`` -- a group element - OUTPUT: - - Its value. - EXAMPLES:: sage: # needs sage.symbolic @@ -257,10 +253,8 @@ def value(self): """ Return the value of the group element. - OUTPUT: - - The value according to the values for generators, see - :meth:`~AbelianGroupWithValues.gens_values`. + OUTPUT: the value according to the values for generators; see + :meth:`~AbelianGroupWithValues.gens_values` EXAMPLES:: @@ -414,9 +408,7 @@ def gen(self, i=0): - ``i`` -- integer (default: 0). The index of the generator. - OUTPUT: - - A group element. + OUTPUT: a group element EXAMPLES:: @@ -442,9 +434,7 @@ def gens_values(self): """ Return the values associated to the generators. - OUTPUT: - - A tuple. + OUTPUT: a tuple EXAMPLES:: @@ -465,10 +455,8 @@ def values_group(self): units in a ring then the :meth:`values_group` would be the whole ring. - OUTPUT: - - The common parent of the values, containing the group - generated by all values. + OUTPUT: the common parent of the values, containing the group + generated by all values EXAMPLES:: @@ -486,9 +474,7 @@ def values_embedding(self): """ Return the embedding of ``self`` in :meth:`values_group`. - OUTPUT: - - A morphism. + OUTPUT: a morphism EXAMPLES:: diff --git a/src/sage/groups/additive_abelian/additive_abelian_group.py b/src/sage/groups/additive_abelian/additive_abelian_group.py index 167b38a9cc0..394ef807944 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_group.py +++ b/src/sage/groups/additive_abelian/additive_abelian_group.py @@ -25,9 +25,8 @@ def AdditiveAbelianGroup(invs, remember_generators=True): generators (corresponding to the given invariants, which need not be in Smith form). - OUTPUT: - - The abelian group `\bigoplus_i \ZZ / n_i \ZZ`, where `n_i` are the invariants. + OUTPUT: the abelian group `\bigoplus_i \ZZ / n_i \ZZ`, where `n_i` are the + invariants EXAMPLES:: @@ -246,7 +245,7 @@ def _repr_(self): def _latex_(self): r""" - Returns a Latex representation of the group, using the invariants. + Return a Latex representation of the group, using the invariants. EXAMPLES:: @@ -375,7 +374,7 @@ def is_multiplicative(self): def is_cyclic(self): r""" - Returns ``True`` if the group is cyclic. + Return ``True`` if the group is cyclic. EXAMPLES: @@ -422,7 +421,7 @@ def __init__(self, cover, rels, gens): def gens(self) -> tuple: r""" - Return the specified generators for self (as a tuple). Compare + Return the specified generators for ``self`` (as a tuple). Compare ``self.smithform_gens()``. EXAMPLES:: diff --git a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py index 3edddea25e7..c12a67725b6 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py +++ b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py @@ -160,7 +160,7 @@ def element(self): def _repr_(self): r""" - String representation of self. + String representation of ``self``. EXAMPLES:: @@ -290,7 +290,7 @@ def discrete_exp(self, v): r""" Given a list (or other iterable) of length equal to the number of generators of this group, compute the element of the ambient group - with those exponents in terms of the generators of self. + with those exponents in terms of the generators of ``self``. EXAMPLES:: diff --git a/src/sage/groups/additive_abelian/qmodnz.py b/src/sage/groups/additive_abelian/qmodnz.py index db0b23d5fe4..34e9a0e9132 100644 --- a/src/sage/groups/additive_abelian/qmodnz.py +++ b/src/sage/groups/additive_abelian/qmodnz.py @@ -54,9 +54,7 @@ class QmodnZ(Parent, UniqueRepresentation): - `n` -- an integer (including 0 or negative integers). - OUTPUT: - - The abelian group `\Q/n\Z`. + OUTPUT: the abelian group `\Q/n\Z` EXAMPLES:: diff --git a/src/sage/groups/additive_abelian/qmodnz_element.py b/src/sage/groups/additive_abelian/qmodnz_element.py index 10f92f76bf9..73557159161 100644 --- a/src/sage/groups/additive_abelian/qmodnz_element.py +++ b/src/sage/groups/additive_abelian/qmodnz_element.py @@ -38,9 +38,7 @@ class QmodnZ_Element(AdditiveGroupElement): - ``parent`` -- the parent abelian group `\Q/n\Z`. - OUTPUT: - - The element `q` of abelian group `\Q/n\Z`, in standard form. + OUTPUT: the element `q` of abelian group `\Q/n\Z`, in standard form EXAMPLES:: @@ -330,7 +328,7 @@ def _richcmp_(self, right, op): def additive_order(self): r""" - Returns the order of this element in the abelian group `\Q/n\Z`. + Return the order of this element in the abelian group `\Q/n\Z`. EXAMPLES:: diff --git a/src/sage/groups/affine_gps/affine_group.py b/src/sage/groups/affine_gps/affine_group.py index a811640c3c0..38fa05058e0 100644 --- a/src/sage/groups/affine_gps/affine_group.py +++ b/src/sage/groups/affine_gps/affine_group.py @@ -308,7 +308,7 @@ def degree(self): """ Return the dimension of the affine space. - OUTPUT: An integer. + OUTPUT: an integer EXAMPLES:: @@ -327,10 +327,8 @@ def matrix_space(self): Return the space of matrices representing the general linear transformations. - OUTPUT: - - The parent of the matrices `A` defining the affine group - element `Ax+b`. + OUTPUT: the parent of the matrices `A` defining the affine group + element `Ax+b` EXAMPLES:: @@ -393,7 +391,7 @@ def linear(self, A): - ``A`` -- anything that determines a matrix - OUTPUT: The affine group element `x \mapsto A x`. + OUTPUT: The affine group element `x \mapsto A x` EXAMPLES:: @@ -414,7 +412,7 @@ def translation(self, b): - ``b`` -- anything that determines a vector - OUTPUT: The affine group element `x \mapsto x + b`. + OUTPUT: The affine group element `x \mapsto x + b` EXAMPLES:: diff --git a/src/sage/groups/affine_gps/group_element.py b/src/sage/groups/affine_gps/group_element.py index 42546194bb6..703137784e4 100644 --- a/src/sage/groups/affine_gps/group_element.py +++ b/src/sage/groups/affine_gps/group_element.py @@ -145,7 +145,7 @@ def A(self): """ Return the general linear part of an affine group element. - OUTPUT: The matrix `A` of the affine group element `Ax + b`. + OUTPUT: The matrix `A` of the affine group element `Ax + b` EXAMPLES:: @@ -162,7 +162,7 @@ def b(self): """ Return the translation part of an affine group element. - OUTPUT: The vector `b` of the affine group element `Ax + b`. + OUTPUT: The vector `b` of the affine group element `Ax + b` EXAMPLES:: @@ -328,11 +328,8 @@ def _mul_(self, other): - ``other`` -- another element of the same affine group. - OUTPUT: - - The product of the affine group elements ``self`` and - ``other`` defined by the composition of the two affine - transformations. + OUTPUT: the product of the affine group elements ``self`` and + ``other`` defined by the composition of the two affine transformations EXAMPLES:: @@ -359,7 +356,7 @@ def __call__(self, v): - ``v`` -- a polynomial, a multivariate polynomial, a polyhedron, a vector, or anything that can be converted into a vector. - OUTPUT: The image of ``v`` under the affine group element. + OUTPUT: the image of ``v`` under the affine group element EXAMPLES:: @@ -402,7 +399,6 @@ def __call__(self, v): sage: cube = polytopes.cube() # needs sage.geometry.polyhedron sage: f(cube) # needs sage.geometry.polyhedron A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 8 vertices - """ parent = self.parent() @@ -455,7 +451,7 @@ def __invert__(self): """ Return the inverse group element. - OUTPUT: Another affine group element. + OUTPUT: another affine group element EXAMPLES:: diff --git a/src/sage/groups/artin.py b/src/sage/groups/artin.py index afb40463206..a198bccef69 100644 --- a/src/sage/groups/artin.py +++ b/src/sage/groups/artin.py @@ -51,9 +51,7 @@ def _latex_(self): r""" Return a LaTeX representation of ``self``. - OUTPUT: - - String. A valid LaTeX math command sequence. + OUTPUT: a string; a valid LaTeX math command sequence TESTS:: @@ -79,9 +77,7 @@ def exponent_sum(self): """ Return the exponent sum of ``self``. - OUTPUT: - - Integer. + OUTPUT: an integer EXAMPLES:: @@ -111,11 +107,10 @@ def coxeter_group_element(self, W=None): INPUT: - - ``W`` -- (default: ``self.parent().coxeter_group()``) the image Coxeter group - - OUTPUT: + - ``W`` -- (default: ``self.parent().coxeter_group()``) the image + Coxeter group - An element of the Coxeter group ``W``. + OUTPUT: an element of the Coxeter group ``W`` EXAMPLES:: @@ -263,10 +258,8 @@ def _left_normal_form_coxeter(self): Return the left normal form of the element, in the `\Delta` exponent and Coxeter group element form. - OUTPUT: - - A tuple whose first element is the power of `\Delta`, and the rest - are the Coxeter elements corresponding to the simple factors. + OUTPUT: a tuple whose first element is the power of `\Delta`, and the + rest are the Coxeter elements corresponding to the simple factors EXAMPLES:: @@ -515,9 +508,7 @@ def cardinality(self): """ Return the number of elements of ``self``. - OUTPUT: - - Infinity. + OUTPUT: Infinity EXAMPLES:: @@ -605,9 +596,7 @@ def index_set(self): """ Return the index set of ``self``. - OUTPUT: - - A tuple. + OUTPUT: a tuple EXAMPLES:: diff --git a/src/sage/groups/braid.py b/src/sage/groups/braid.py index 3b48e00effd..71550739296 100644 --- a/src/sage/groups/braid.py +++ b/src/sage/groups/braid.py @@ -170,9 +170,7 @@ def components_in_closure(self): """ Return the number of components of the trace closure of the braid. - OUTPUT: - - Positive integer. + OUTPUT: a positive integer EXAMPLES:: @@ -442,9 +440,7 @@ def permutation(self, W=None): - ``W`` -- (optional) the permutation group to project ``self`` to; the default is ``self.parent().coxeter_group()`` - OUTPUT: - - The image of ``self`` under the natural projection map to ``W``. + OUTPUT: the image of ``self`` under the natural projection map to ``W`` EXAMPLES:: @@ -676,9 +672,8 @@ def LKB_matrix(self, variables='x,y'): - ``variables`` -- string (default: ``'x,y'``). A string containing the names of the variables, separated by a comma. - OUTPUT: - - The matrix corresponding to the Lawrence-Krammer-Bigelow representation of the braid. + OUTPUT: the matrix corresponding to the Lawrence-Krammer-Bigelow + representation of the braid EXAMPLES:: @@ -811,10 +806,9 @@ def links_gould_matrix(self, symbolics=False): are elements of a quotient ring of a three variate Laurent polynomial ring. - OUTPUT: - - The representation matrix of ``self`` over the ring according to the choice - of the keyword ``symbolics`` (see the corresponding explanation). + OUTPUT: the representation matrix of ``self`` over the ring according + to the choice of the keyword ``symbolics`` (see the corresponding + explanation) EXAMPLES:: @@ -849,9 +843,7 @@ def links_gould_polynomial(self, varnames=None, use_symbolics=False): - ``varnames`` -- string (default ``t0, t1``) - OUTPUT: - - A Laurent polynomial in the given variable names. + OUTPUT: a Laurent polynomial in the given variable names EXAMPLES:: @@ -908,9 +900,7 @@ def tropical_coordinates(self): r""" Return the tropical coordinates of ``self`` in the braid group `B_n`. - OUTPUT: - - - a list of `2n` tropical integers + OUTPUT: a list of `2n` tropical integers EXAMPLES:: @@ -1325,9 +1315,7 @@ def _annular_khovanov_complex_cached(self, qagrad, ring=None): - ``ring`` -- (default: ``ZZ``) the coefficient ring - OUTPUT: - - The annular Khovanov complex of the braid in the given grading. + OUTPUT: the annular Khovanov complex of the braid in the given grading .. NOTE:: @@ -1380,8 +1368,8 @@ def annular_khovanov_complex(self, qagrad=None, ring=None): OUTPUT: The annular Khovanov complex of the braid, given as a dictionary whose - keys are tuples of quantum and annular grading. - If ``qagrad`` is specified only return the chain complex of that grading. + keys are tuples of quantum and annular grading. If ``qagrad`` is + specified only return the chain complex of that grading. EXAMPLES:: @@ -1437,9 +1425,9 @@ def annular_khovanov_homology(self, qagrad=None, ring=IntegerRing()): OUTPUT: - If ``qagrad`` is ``None``, return a dictionary of homogies in all - gradings indexed by grading. If qagrad is specified, return homology - of that grading. + If ``qagrad`` is ``None``, return a dictionary of homologies in all + gradings indexed by grading. If ``qagrad`` is specified, return the + homology of that grading. .. NOTE:: @@ -1535,10 +1523,8 @@ def _left_normal_form_coxeter(self): r""" Return the left normal form of the braid, in permutation form. - OUTPUT: - - A tuple whose first element is the power of `\Delta`, and the - rest are the permutations corresponding to the simple factors. + OUTPUT: a tuple whose first element is the power of `\Delta`, and the + rest are the permutations corresponding to the simple factors EXAMPLES:: @@ -1633,7 +1619,6 @@ def centralizer(self): sage: b = B([2, 1, 3, 2]) sage: b.centralizer() [s1*s0*s2*s1, s0*s2] - """ c = centralizer(self) B = self.parent() @@ -1652,7 +1637,6 @@ def super_summit_set(self): (s0^-1*s1^-1*s0^-1)^2*s1^2*s0^3*s1, (s0^-1*s1^-1*s0^-1)^2*s1*s0^3*s1^2, s0^-1*s1^-1*s0^-2*s1^-1*s0*s1^3*s0] - """ sss = supersummitset(self) B = self.parent() @@ -1710,10 +1694,8 @@ def conjugating_braid(self, other): OUTPUT: - A conjugating braid. - - More precisely, if the output is `d`, `o` equals ``other``, and `s` equals ``self`` - then `o = d^{-1} \cdot s \cdot d`. + A conjugating braid. More precisely, if the output is `d`, `o` equals + ``other``, and `s` equals ``self`` then `o = d^{-1} \cdot s \cdot d`. EXAMPLES:: @@ -1798,10 +1780,9 @@ def pure_conjugating_braid(self, other): OUTPUT: - A pure conjugating braid. - - More precisely, if the output is `d`, `o` equals ``other``, and `s` equals ``self`` - then `o = d^{-1} \cdot s \cdot d`. + A pure conjugating braid. More precisely, if the output is `d`, `o` + equals ``other``, and `s` equals ``self`` then + `o = d^{-1} \cdot s \cdot d`. EXAMPLES:: @@ -1914,9 +1895,7 @@ def thurston_type(self): """ Return the thurston_type of ``self``. - OUTPUT: - - One of ``'reducible'``, ``'periodic'`` or ``'pseudo-anosov'``. + OUTPUT: one of ``'reducible'``, ``'periodic'`` or ``'pseudo-anosov'`` EXAMPLES:: @@ -1946,7 +1925,6 @@ def is_reducible(self): sage: a = B([2, 2, -1, -1, 2, 2]) sage: a.is_reducible() False - """ return self.thurston_type() == 'reducible' @@ -2002,9 +1980,7 @@ def sliding_circuits(self): """ Return the sliding circuits of the braid. - OUTPUT: - - A list of sliding circuits. Each sliding circuit is itself + OUTPUT: a list of sliding circuits. Each sliding circuit is itself a list of braids. EXAMPLES:: @@ -2081,9 +2057,7 @@ def deformed_burau_matrix(self, variab='q'): resulting laurent polynomial, which is the base ring for the free algebra constructed - OUTPUT: - - A matrix with elements in the free algebra ``self._algebra``. + OUTPUT: a matrix with elements in the free algebra ``self._algebra`` EXAMPLES:: @@ -2333,10 +2307,8 @@ def tuples(self): This is in the reduced form as outlined in Definition 4.1 of [HL2018]_. - OUTPUT: - - A dict of tuples of ints corresponding to the exponents in the - generators with values in the algebra's base ring. + OUTPUT: a dict of tuples of ints corresponding to the exponents in the + generators with values in the algebra's base ring EXAMPLES:: @@ -2384,9 +2356,7 @@ def reduced_word(self): r""" Return the (reduced) right quantum word. - OUTPUT: - - An element in the free algebra. + OUTPUT: an element in the free algebra EXAMPLES:: @@ -2619,11 +2589,7 @@ def __reduce__(self): def _repr_(self): """ - Return a string representation - - OUTPUT: - - String. + Return a string representation. TESTS:: @@ -2637,9 +2603,7 @@ def cardinality(self): """ Return the number of group elements. - OUTPUT: - - Infinity. + OUTPUT: Infinity TESTS:: @@ -2656,10 +2620,8 @@ def as_permutation_group(self): """ Return an isomorphic permutation group. - OUTPUT: - - This raises a :class:`ValueError` error since braid groups - are infinite. + OUTPUT: this raises a :class:`ValueError` error since braid groups + are infinite TESTS:: @@ -2675,9 +2637,7 @@ def strands(self): """ Return the number of strands. - OUTPUT: - - Integer. + OUTPUT: an integer EXAMPLES:: @@ -2753,10 +2713,7 @@ def _standard_lift_Tietze(self, p): - Every two strands cross each other at most once. - OUTPUT: - - A shortest word that represents the braid, - in Tietze list form. + OUTPUT: a shortest word that represents the braid, in Tietze list form EXAMPLES:: @@ -2887,9 +2844,7 @@ def _LKB_matrix_(self, braid, variab): appear in the matrix. They must be given as a string, separated by a comma - OUTPUT: - - The LKB matrix of the braid, with respect to the variables. + OUTPUT: the LKB matrix of the braid, with respect to the variables TESTS:: @@ -3036,9 +2991,7 @@ def TL_basis_with_drain(self, drain_size): - ``drain_size`` -- integer between 0 and the number of strands (both inclusive) - OUTPUT: - - A list of basis elements, each of which is a list of integers. + OUTPUT: a list of basis elements, each of which is a list of integers EXAMPLES: @@ -3220,10 +3173,8 @@ def TL_representation(self, drain_size, variab=None): entries of the matrices; if ``None``, then use a default variable in `\ZZ[A,A^{-1}]` - OUTPUT: - - A list of matrices corresponding to the representations of each - of the standard generators and their inverses. + OUTPUT: a list of matrices corresponding to the representations of each + of the standard generators and their inverses EXAMPLES:: @@ -3311,7 +3262,8 @@ def TL_representation(self, drain_size, variab=None): def mapping_class_action(self, F): """ - Return the action of self in the free group F as mapping class group. + Return the action of ``self`` in the free group F as mapping class + group. This action corresponds to the action of the braid over the punctured disk, whose fundamental group is the free group on @@ -3321,9 +3273,7 @@ def mapping_class_action(self, F): element with a braid. So you generally do not have to construct this action yourself. - OUTPUT: - - A :class:`MappingClassGroupAction`. + OUTPUT: a :class:`MappingClassGroupAction` EXAMPLES:: @@ -3650,9 +3600,7 @@ def _act_(self, b, x): - ``x`` -- a free group element. - OUTPUT: - - A new braid. + OUTPUT: a new braid TESTS:: diff --git a/src/sage/groups/class_function.py b/src/sage/groups/class_function.py index 6ca0d9ee2cb..0af4d5ce646 100644 --- a/src/sage/groups/class_function.py +++ b/src/sage/groups/class_function.py @@ -4,11 +4,13 @@ This module implements a wrapper of GAP's ClassFunction function. -NOTE: The ordering of the columns of the character table of a group -corresponds to the ordering of the list. However, in general there is -no way to canonically list (or index) the conjugacy classes of a group. -Therefore the ordering of the columns of the character table of -a group is somewhat random. +.. NOTE: + + The ordering of the columns of the character table of a group + corresponds to the ordering of the list. However, in general there is + no way to canonically list (or index) the conjugacy classes of a group. + Therefore the ordering of the columns of the character table of + a group is somewhat random. AUTHORS: @@ -53,7 +55,6 @@ def ClassFunction(group, values): - ``values`` -- list/tuple/iterable of numbers. The values of the class function on the conjugacy classes, in that order. - EXAMPLES:: sage: G = CyclicPermutationGroup(4) @@ -132,7 +133,7 @@ def __init__(self, G, values): def _gap_init_(self): r""" - Return a string showing how to declare / initialize self in Gap. + Return a string showing how to declare / initialize ``self`` in Gap. Stored in the \code{self._gap_string} attribute. EXAMPLES:: @@ -146,7 +147,7 @@ def _gap_init_(self): def _gap_(self, *args): r""" - Coerce self into a GAP element. + Coerce ``self`` into a GAP element. EXAMPLES:: @@ -182,7 +183,7 @@ def __repr__(self): def __iter__(self): r""" - Iterate through the values of self evaluated on the conjugacy + Iterate through the values of ``self`` evaluated on the conjugacy classes. EXAMPLES:: @@ -296,16 +297,13 @@ def __call__(self, g): def __add__(self, other): r""" - Return the sum of the characters self and other. + Return the sum of the characters of ``self`` and other. INPUT: - - ``other`` -- a :class:`ClassFunction` of the same group as - ``self``. - - OUTPUT: + - ``other`` -- a :class:`ClassFunction` of the same group as ``self`` - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -330,9 +328,7 @@ def __sub__(self, other): - ``other`` -- a :class:`ClassFunction` of the same group as ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -361,9 +357,7 @@ def __mul__(self, other): can be converted into GAP: integers, rational, and elements of certain number fields. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -376,7 +370,6 @@ def __mul__(self, other): sage: (3*chi1).values() [9, 3, -3, 0, -3] - sage: (1/2*chi1).values() [3/2, 1/2, -1/2, 0, -1/2] @@ -420,9 +413,7 @@ def __pos__(self): r""" Return ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -440,9 +431,7 @@ def __neg__(self): r""" Return the additive inverse of ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -458,7 +447,7 @@ def __neg__(self): def __pow__(self, other): r""" - Return the product of self with itself other times. + Return the product of ``self`` with itself other times. EXAMPLES:: @@ -475,7 +464,7 @@ def __pow__(self, other): def symmetric_power(self, n): r""" - Return the symmetrized product of self with itself ``n`` times. + Return the symmetrized product of ``self`` with itself ``n`` times. INPUT: @@ -501,21 +490,20 @@ def symmetric_power(self, n): def exterior_power(self, n): r""" - Return the anti-symmetrized product of self with itself ``n`` times. + Return the antisymmetrized product of ``self`` with itself ``n`` + times. INPUT: - ``n`` -- a positive integer. - OUTPUT: - - The ``n``-th anti-symmetrized power of ``self`` as a - :class:`ClassFunction`. + OUTPUT: the ``n``-th antisymmetrized power of ``self`` as a + :class:`ClassFunction` EXAMPLES:: sage: chi = ClassFunction(SymmetricGroup(4), gap([3, 1, -1, 0, -1])) - sage: p = chi.exterior_power(3) # the highest anti-symmetric power for a 3-d character + sage: p = chi.exterior_power(3) # the highest antisymmetric power for a 3-d character sage: p Character of Symmetric group of order 4! as a permutation group sage: p.values() @@ -529,7 +517,7 @@ def exterior_power(self, n): def scalar_product(self, other): r""" - Return the scalar product of self with other. + Return the scalar product of ``self`` with other. EXAMPLES:: @@ -546,8 +534,8 @@ def scalar_product(self, other): def is_irreducible(self): r""" - Return True if self cannot be written as the sum of two nonzero - characters of self. + Return ``True`` if ``self`` cannot be written as the sum of two nonzero + characters of ``self``. EXAMPLES:: @@ -635,7 +623,7 @@ def norm(self): def values(self) -> list: r""" - Return the list of values of self on the conjugacy classes. + Return the list of values of ``self`` on the conjugacy classes. EXAMPLES:: @@ -1005,9 +993,7 @@ def __add__(self, other): - ``other`` -- a :class:`ClassFunction` of the same group as ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -1032,9 +1018,7 @@ def __sub__(self, other): - ``other`` -- a :class:`ClassFunction` of the same group as ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -1063,9 +1047,7 @@ def __mul__(self, other): can be converted into GAP: integers, rational, and elements of certain number fields. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -1078,7 +1060,6 @@ def __mul__(self, other): sage: (3*chi1).values() [9, 3, -3, 0, -3] - sage: (1/2*chi1).values() [3/2, 1/2, -1/2, 0, -1/2] @@ -1122,9 +1103,7 @@ def __pos__(self): r""" Return ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -1142,9 +1121,7 @@ def __neg__(self): r""" Return the additive inverse of ``self``. - OUTPUT: - - A :class:`ClassFunction` + OUTPUT: a :class:`ClassFunction` EXAMPLES:: @@ -1183,10 +1160,8 @@ def symmetric_power(self, n): - ``n`` -- a positive integer - OUTPUT: - - The ``n``-th symmetrized power of ``self`` as a - :class:`ClassFunction`. + OUTPUT: the ``n``-th symmetrized power of ``self`` as a + :class:`ClassFunction` EXAMPLES:: @@ -1203,21 +1178,19 @@ def symmetric_power(self, n): def exterior_power(self, n): r""" - Return the anti-symmetrized product of ``self`` with itself ``n`` times. + Return the antisymmetrized product of ``self`` with itself ``n`` times. INPUT: - ``n`` -- a positive integer - OUTPUT: - - The ``n``-th anti-symmetrized power of ``self`` as a - :class:`ClassFunction`. + OUTPUT: the ``n``-th antisymmetrized power of ``self`` as a + :class:`ClassFunction` EXAMPLES:: sage: chi = ClassFunction(SymmetricGroup(4), [3, 1, -1, 0, -1]) - sage: p = chi.exterior_power(3) # the highest anti-symmetric power for a 3-d character + sage: p = chi.exterior_power(3) # the highest antisymmetric power for a 3-d character sage: p Character of Symmetric group of order 4! as a permutation group sage: p.values() @@ -1338,7 +1311,7 @@ def norm(self): def values(self): r""" - Return the list of values of self on the conjugacy classes. + Return the list of values of ``self`` on the conjugacy classes. EXAMPLES:: @@ -1410,9 +1383,7 @@ def restrict(self, H): - ``H`` -- a subgroup of the underlying group of ``self``. - OUTPUT: - - A :class:`ClassFunction` of ``H`` defined by restriction. + OUTPUT: a :class:`ClassFunction` of ``H`` defined by restriction EXAMPLES:: diff --git a/src/sage/groups/conjugacy_classes.py b/src/sage/groups/conjugacy_classes.py index 147cc803842..2208389e17d 100644 --- a/src/sage/groups/conjugacy_classes.py +++ b/src/sage/groups/conjugacy_classes.py @@ -216,7 +216,6 @@ def __iter__(self): True sage: any(x == m2 for x in C) True - """ from sage.sets.recursively_enumerated_set import RecursivelyEnumeratedSet g = self._representative @@ -517,7 +516,6 @@ def set(self): sage: S = [(1,3,2,4), (1,4,3,2), (1,3,4,2), (1,2,3,4), (1,4,2,3), (1,2,4,3)] sage: C.set() == Set(G(x) for x in S) True - """ from sage.sets.set import Set try: diff --git a/src/sage/groups/cubic_braid.py b/src/sage/groups/cubic_braid.py index c80da80520e..17e543687a4 100644 --- a/src/sage/groups/cubic_braid.py +++ b/src/sage/groups/cubic_braid.py @@ -807,10 +807,6 @@ def _repr_(self): r""" Return a string representation. - OUTPUT: - - String describing ``self``. - EXAMPLES:: sage: CubicBraidGroup(2) @@ -1423,10 +1419,8 @@ def braid_group(self): Return a :class:`BraidGroup` with identical generators, such that there exists an epimorphism to ``self``. - OUTPUT: - - A :class:`BraidGroup` having conversion maps to and from ``self`` - (which is just a section in the latter case). + OUTPUT: a :class:`BraidGroup` having conversion maps to and from + ``self`` (which is just a section in the latter case) EXAMPLES:: @@ -1973,9 +1967,7 @@ def order(self): To avoid long wait-time on calculations the order will be obtained using the classical realization. - OUTPUT: - - Cardinality of the group as Integer or infinity. + OUTPUT: cardinality of the group as integer or infinity EXAMPLES:: diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index 7d96975fe22..adb166093cd 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -269,10 +269,6 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. - EXAMPLES:: sage: G. = FreeGroup() @@ -300,9 +296,7 @@ def Tietze(self): the letter corresponding to the `i`-th generator of the group. Negative integers represent the inverses of generators. - OUTPUT: - - A tuple of integers. + OUTPUT: a tuple of integers EXAMPLES:: @@ -332,10 +326,8 @@ def __call__(self, *values, **kwds): ``True``). Whether to verify that ``values`` satisfy the relations in the finitely presented group. - OUTPUT: - - The product of ``values`` in the order and with exponents - specified by ``self``. + OUTPUT: the product of ``values`` in the order and with exponents + specified by ``self`` EXAMPLES:: @@ -386,9 +378,7 @@ def wrap_FpGroup(libgap_fpgroup): - ``libgap_fpgroup`` -- a LibGAP finitely presented group - OUTPUT: - - A Sage :class:`FinitelyPresentedGroup`. + OUTPUT: a Sage :class:`FinitelyPresentedGroup` EXAMPLES: @@ -813,10 +803,6 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. - TESTS:: sage: G. = FreeGroup() @@ -834,9 +820,7 @@ def _latex_(self): """ Return a LaTeX representation - OUTPUT: - - String. A valid LaTeX math command sequence. + OUTPUT: a string; a valid LaTeX math command sequence TESTS:: @@ -864,9 +848,7 @@ def free_group(self): """ Return the free group (without relations). - OUTPUT: - - A :func:`~sage.groups.free_group.FreeGroup`. + OUTPUT: a :func:`~sage.groups.free_group.FreeGroup` EXAMPLES:: @@ -883,9 +865,7 @@ def relations(self): """ Return the relations of the group. - OUTPUT: - - The relations as a tuple of elements of :meth:`free_group`. + OUTPUT: the relations as a tuple of elements of :meth:`free_group` EXAMPLES:: @@ -910,9 +890,7 @@ def cardinality(self, limit=4096000): - ``limit`` -- integer (default: 4096000). The maximal number of cosets before the computation is aborted. - OUTPUT: - - Integer or ``Infinity``. The number of elements in the group. + OUTPUT: integer or ``Infinity``; the number of elements in the group EXAMPLES:: @@ -1036,10 +1014,8 @@ def direct_product(self, H, reduced=False, new_names=True): to keep the old variable names, as they may change meaning in the output group if its presentation is reduced. - OUTPUT: - - The direct product of ``self`` with ``H`` as a finitely - presented group. + OUTPUT: the direct product of ``self`` with ``H`` as a finitely + presented group EXAMPLES:: @@ -1358,9 +1334,8 @@ def abelianization_map(self): r""" Return the abelianization map of ``self``. - OUTPUT: - - The abelianization map of ``self`` as a homomorphism of finitely presented groups. + OUTPUT: the abelianization map of ``self`` as a homomorphism of + finitely presented groups EXAMPLES:: @@ -1530,11 +1505,10 @@ def simplified(self): def sorted_presentation(self): """ - Return the same presentation with the relations sorted to ensure equality. - - OUTPUT: + Return the same presentation with the relations sorted to ensure + equality. - A new finitely presented group with the relations sorted. + OUTPUT: a new finitely presented group with the relations sorted EXAMPLES:: diff --git a/src/sage/groups/finitely_presented_named.py b/src/sage/groups/finitely_presented_named.py index d800bf014d0..256ad33404f 100644 --- a/src/sage/groups/finitely_presented_named.py +++ b/src/sage/groups/finitely_presented_named.py @@ -79,9 +79,7 @@ def CyclicPresentation(n): - ``n`` -- The order of the cyclic presentation to be returned. - OUTPUT: - - The cyclic group of order `n` as finite presentation. + OUTPUT: the cyclic group of order `n` as finite presentation EXAMPLES:: @@ -219,10 +217,8 @@ def FinitelyGeneratedHeisenbergPresentation(n=1, p=0): - ``p`` -- (optional) a prime number, where we construct the Heisenberg group over the finite field `\ZZ/p\ZZ` - OUTPUT: - - Finitely generated Heisenberg group over the finite field - of order ``p`` or over the integers. + OUTPUT: finitely generated Heisenberg group over the finite field + of order ``p`` or over the integers .. SEEALSO:: @@ -304,9 +300,7 @@ def DihedralPresentation(n): - ``n`` -- The size of the set that `D_n` is acting on. - OUTPUT: - - Dihedral group of order `2n`. + OUTPUT: Dihedral group of order `2n` EXAMPLES:: @@ -343,9 +337,7 @@ def DiCyclicPresentation(n): - ``n`` -- positive integer, 2 or greater, determining the order of the group (`4n`). - OUTPUT: - - The dicyclic group of order `4n` is defined by the presentation + OUTPUT: the dicyclic group of order `4n` is defined by the presentation .. MATH:: @@ -441,9 +433,7 @@ def QuaternionPresentation(): r""" Build the Quaternion group of order 8 as a finitely presented group. - OUTPUT: - - Quaternion group as a finite presentation. + OUTPUT: Quaternion group as a finite presentation EXAMPLES:: @@ -520,9 +510,7 @@ def KleinFourPresentation(): r""" Build the Klein group of order `4` as a finitely presented group. - OUTPUT: - - Klein four group (`C_2 \times C_2`) as a finitely presented group. + OUTPUT: Klein four group (`C_2 \times C_2`) as a finitely presented group EXAMPLES:: @@ -548,9 +536,7 @@ def BinaryDihedralPresentation(n): - ``n`` -- the value `n` - OUTPUT: - - The binary dihedral group of order `4n` as finite presentation. + OUTPUT: the binary dihedral group of order `4n` as finite presentation EXAMPLES:: @@ -579,9 +565,7 @@ def CactusPresentation(n): r""" Build the `n`-fruit cactus group as a finitely presented group. - OUTPUT: - - Cactus group `J_n` as a finitely presented group. + OUTPUT: Cactus group `J_n` as a finitely presented group EXAMPLES:: diff --git a/src/sage/groups/fqf_orthogonal.py b/src/sage/groups/fqf_orthogonal.py index 8c996ad3c6a..f810e8dccb3 100644 --- a/src/sage/groups/fqf_orthogonal.py +++ b/src/sage/groups/fqf_orthogonal.py @@ -5,7 +5,6 @@ consists of all linear self-maps of `T` which preserve the torsion quadratic form. - EXAMPLES:: sage: L = IntegralLattice("A2").twist(2) # needs sage.graphs @@ -436,9 +435,7 @@ def _act_(self, g, a): - ``a`` -- an element of the invariant submodule - ``g`` -- an element of the acting group - OUTPUT: - - - an element of the invariant submodule + OUTPUT: an element of the invariant submodule EXAMPLES:: diff --git a/src/sage/groups/free_group.py b/src/sage/groups/free_group.py index 471940f6b95..1da411b3036 100644 --- a/src/sage/groups/free_group.py +++ b/src/sage/groups/free_group.py @@ -82,9 +82,7 @@ def is_FreeGroup(x): - ``x`` -- anything. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -245,9 +243,7 @@ def _latex_(self): r""" Return a LaTeX representation - OUTPUT: - - String. A valid LaTeX math command sequence. + OUTPUT: a string; a valid LaTeX math command sequence EXAMPLES:: @@ -305,9 +301,7 @@ def Tietze(self): the letter corresponding to the `i`-th generator of the group. Negative integers represent the inverses of generators. - OUTPUT: - - A tuple of integers. + OUTPUT: a tuple of integers EXAMPLES:: @@ -527,10 +521,8 @@ def __call__(self, *values): list/tuple/iterable of the same length as the number of generators of the free group. - OUTPUT: - - The product of ``values`` in the order and with exponents - specified by ``self``. + OUTPUT: the product of ``values`` in the order and with exponents + specified by ``self`` EXAMPLES:: @@ -700,9 +692,7 @@ def wrap_FreeGroup(libgap_free_group): - ``libgap_free_group`` -- a LibGAP free group. - OUTPUT: - - A Sage :class:`FreeGroup_class`. + OUTPUT: a Sage :class:`FreeGroup_class` EXAMPLES: @@ -792,13 +782,11 @@ def _repr_(self): def rank(self): """ - Return the number of generators of self. + Return the number of generators of ``self``. Alias for :meth:`ngens`. - OUTPUT: - - Integer. + OUTPUT: an integer EXAMPLES:: @@ -951,7 +939,6 @@ def quotient(self, relations, **kwds): Free Group on generators {a, b} sage: F1/[r] Finitely presented group < a, b, c, d | a*b*a^-1 > - """ from sage.groups.finitely_presented import FinitelyPresentedGroup return FinitelyPresentedGroup(self, tuple(map(self, relations) ), **kwds) diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index fccb76fe0ef..5a540088d2c 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -15,7 +15,6 @@ multiplication_names = ('multiplication', 'times', 'product', '*') addition_names = ('addition', 'plus', 'sum', '+') - Also included are a generic function for computing multiples (or powers), and an iterator for general multiples and powers. @@ -401,10 +400,12 @@ def bsgs(a, b, bounds, operation='*', identity=None, inverse=None, op=None): An integer `n` such that `a^n = b` (or `na = b`). If no such `n` exists, this function raises a :class:`ValueError` exception. - NOTE: This is a generalization of discrete logarithm. One - situation where this version is useful is to find the order of - an element in a group where we only have bounds on the group - order (see the elliptic curve example below). + .. NOTE:: + + This is a generalization of discrete logarithm. One + situation where this version is useful is to find the order of + an element in a group where we only have bounds on the group + order (see the elliptic curve example below). ALGORITHM: Baby step giant step. Time and space are soft `O(\sqrt{n})` where `n` is the difference between upper and lower @@ -992,7 +993,7 @@ def discrete_log_lambda(a, base, bounds, operation='*', identity=None, inverse=N - op() -- function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group - hash_function -- having an efficient hash function is critical for this algorithm - OUTPUT: Returns an integer `n` such that `a=base^n` (or `a=n*base`) + OUTPUT: an integer `n` such that `a=base^n` (or `a=n*base`) ALGORITHM: Pollard Lambda, if bounds are (lb,ub) it has time complexity O(sqrt(ub-lb)) and space complexity O(log(ub-lb)) @@ -1213,10 +1214,10 @@ def order_from_multiple(P, m, plist=None, factorization=None, check=True, - ``inverse()`` -- function of 1 argument ``x``, returning inverse of ``x``; - ``op()`` - function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group. - .. note:: + .. NOTE:: - It is more efficient for the caller to factor ``m`` and cache - the factors for subsequent calls. + It is more efficient for the caller to factor ``m`` and cache + the factors for subsequent calls. EXAMPLES:: @@ -1362,8 +1363,7 @@ def order_from_bounds(P, bounds, d=None, operation='+', - ``op()`` -- a function of 2 arguments defining the group binary operation. - - .. note:: + .. NOTE:: Typically ``lb`` and ``ub`` will be bounds on the group order, and from previous calculation we know that the group order is @@ -1549,9 +1549,7 @@ def merge_points(P1, P2, operation='+', - ``op()`` -- a function of 2 arguments defining the group binary operation. - OUTPUT: - - A pair `(g_3,n_3)` where `g_3` has order `n_3=\hbox{lcm}(n_1,n_2)`. + OUTPUT: a pair `(g_3,n_3)` where `g_3` has order `n_3=\hbox{lcm}(n_1,n_2)` EXAMPLES:: @@ -1631,9 +1629,7 @@ def structure_description(G, latex=False): - ``latex`` -- a boolean (default: ``False``). If ``True``, return a LaTeX formatted string. - OUTPUT: - - string + OUTPUT: a string .. WARNING:: diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index 9ecbfde9d6f..2f1a6cc1846 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -29,9 +29,7 @@ def is_Group(x): - ``x`` -- anything. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -175,7 +173,7 @@ cdef class Group(Parent): def is_finite(self): """ - Returns True if this group is finite. + Return ``True`` if this group is finite. EXAMPLES:: @@ -223,8 +221,7 @@ cdef class Group(Parent): def is_multiplicative(self): r""" - Returns True if the group operation is given by \* (rather than - +). + Return ``True`` if the group operation is given by \* (rather than +). Override for additive groups. @@ -239,11 +236,9 @@ cdef class Group(Parent): def _an_element_(self): """ - Return an element - - OUTPUT: + Return an element. - An element of the group. + OUTPUT: an element of the group EXAMPLES:: diff --git a/src/sage/groups/group_exp.py b/src/sage/groups/group_exp.py index ffae5e73cb2..58d9ba4b512 100644 --- a/src/sage/groups/group_exp.py +++ b/src/sage/groups/group_exp.py @@ -111,9 +111,8 @@ def _apply_functor(self, x): - A commutative additive group `x` - OUTPUT: - - - An isomorphic group whose operation is multiplication rather than addition. + OUTPUT: an isomorphic group whose operation is multiplication rather + than addition In the following example, ``self`` is the functor `GroupExp()`, `x` is the additive group `QQ^2`, and the output group is stored as `EQ2`. @@ -143,12 +142,13 @@ def _apply_functor_to_morphism(self, f): - A homomorphism `f` of commutative additive groups. - OUTPUT: + OUTPUT: the above homomorphism, but between the corresponding + multiplicative groups - The above homomorphism, but between the corresponding multiplicative groups. - In the following example, ``self`` is the functor `GroupExp()` and `f` is an endomorphism of the - additive group of integers. + In the following example, ``self`` is the functor `GroupExp()` and `f` + is an endomorphism of the additive group of integers. EXAMPLES:: @@ -245,11 +245,9 @@ class GroupExp_Class(UniqueRepresentation, Parent): INPUT: - - `G`: a commutative additive group - - OUTPUT: + - `G` -- a commutative additive group - - The multiplicative form of `G`. + OUTPUT: the multiplicative form of `G` EXAMPLES:: @@ -263,7 +261,6 @@ def __init__(self, G): sage: EG = GroupExp()(QQ^2) sage: TestSuite(EG).run(skip = "_test_elements") - """ if G not in CommutativeAdditiveGroups(): raise TypeError("%s must be a commutative additive group" % G) @@ -307,7 +304,6 @@ def one(self): (1, 0) sage: x == x * G.one() True - """ return GroupExpElement(self, self._G.zero()) @@ -349,7 +345,6 @@ def group_generators(self): sage: GroupExp()(ZZ).group_generators() (1,) - """ if hasattr(self._G, 'gens'): additive_generators = self._G.gens() diff --git a/src/sage/groups/group_semidirect_product.py b/src/sage/groups/group_semidirect_product.py index 1805dbbc53a..0c8ba8a96aa 100644 --- a/src/sage/groups/group_semidirect_product.py +++ b/src/sage/groups/group_semidirect_product.py @@ -291,8 +291,8 @@ def check_implemented_group(x): def act_to_right(self): r""" - True if the left factor acts on the right factor and - False if the right factor acts on the left factor. + Return ``True`` if the left factor acts on the right factor and + ``False`` if the right factor acts on the left factor. EXAMPLES:: diff --git a/src/sage/groups/libgap_mixin.py b/src/sage/groups/libgap_mixin.py index 476fb4e9416..aeb100f2ca2 100644 --- a/src/sage/groups/libgap_mixin.py +++ b/src/sage/groups/libgap_mixin.py @@ -56,10 +56,8 @@ def is_abelian(self): r""" Return whether the group is Abelian. - OUTPUT: - - Boolean. ``True`` if this group is an Abelian group and ``False`` - otherwise. + OUTPUT: boolean; ``True`` if this group is an Abelian group and + ``False`` otherwise EXAMPLES:: @@ -184,9 +182,7 @@ def is_finite(self): """ Test whether the matrix group is finite. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -272,7 +268,6 @@ def conjugacy_classes_representatives(self): Traceback (most recent call last): ... NotImplementedError: only implemented for finite groups - """ if not self.is_finite(): raise NotImplementedError("only implemented for finite groups") @@ -352,9 +347,7 @@ def center(self): """ Return the center of this group as a subgroup. - OUTPUT: - - The center as a subgroup. + OUTPUT: the center as a subgroup EXAMPLES:: @@ -654,9 +647,7 @@ def irreducible_characters(self): """ Return the irreducible characters of the group. - OUTPUT: - - A tuple containing all irreducible characters. + OUTPUT: a tuple containing all irreducible characters EXAMPLES:: @@ -784,9 +775,7 @@ def random_element(self): """ Return a random element of this group. - OUTPUT: - - A group element. + OUTPUT: a group element EXAMPLES:: @@ -864,10 +853,8 @@ def list(self): """ List all elements of this group. - OUTPUT: - - A tuple containing all group elements in a random but fixed - order. + OUTPUT: a tuple containing all group elements in a random but fixed + order EXAMPLES:: @@ -941,9 +928,7 @@ def is_isomorphic(self, H): - ``H`` -- a group. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: diff --git a/src/sage/groups/libgap_morphism.py b/src/sage/groups/libgap_morphism.py index daac871629b..5b780ceb922 100644 --- a/src/sage/groups/libgap_morphism.py +++ b/src/sage/groups/libgap_morphism.py @@ -378,9 +378,7 @@ def pushforward(self, J, *args, **kwds): - ``J`` -- a subgroup or an element of the domain of ``self`` - OUTPUT: - - The image of ``J`` under ``self``. + OUTPUT: the image of ``J`` under ``self`` .. NOTE:: @@ -558,13 +556,11 @@ def preimage(self, S): def section(self): r""" - This method returns a section map of self by use of :meth:`lift`. + This method returns a section map of ``self`` by use of :meth:`lift`. See :meth:`section` of :class:`sage.categories.map.Map`, as well. - OUTPUT: - - an instance of :class:`sage.categories.morphism.SetMorphism` - mapping an element of the codomain of self to one of its preimages + OUTPUT: an instance of :class:`sage.categories.morphism.SetMorphism` + mapping an element of the codomain of ``self`` to one of its preimages EXAMPLES:: @@ -596,9 +592,7 @@ class GroupHomset_libgap(HomsetWithBase): - ``H`` -- a libgap group - ``category`` -- a category - OUTPUT: - - The homset of two libgap groups. + OUTPUT: the homset of two libgap groups EXAMPLES:: @@ -730,9 +724,10 @@ def natural_map(self): OUTPUT: - an instance of the element class of self if there exists a group homomorphism - mapping the generators of the domain of self to the according generators of - the codomain. Else the method falls back to the default. + An instance of the element class of ``self`` if there exists a group + homomorphism mapping the generators of the domain of ``self`` to the + according generators of the codomain. Otherwise, the method falls back + to the default. EXAMPLES:: diff --git a/src/sage/groups/libgap_wrapper.pxd b/src/sage/groups/libgap_wrapper.pxd index 0c43b098140..2f76d978afd 100644 --- a/src/sage/groups/libgap_wrapper.pxd +++ b/src/sage/groups/libgap_wrapper.pxd @@ -1,7 +1,6 @@ from sage.structure.element cimport MultiplicativeGroupElement from sage.libs.gap.element cimport GapElement - cdef class ElementLibGAP(MultiplicativeGroupElement): cdef GapElement _libgap cpdef GapElement gap(self) diff --git a/src/sage/groups/libgap_wrapper.pyx b/src/sage/groups/libgap_wrapper.pyx index 3d27ec44ea0..0834a304c66 100644 --- a/src/sage/groups/libgap_wrapper.pyx +++ b/src/sage/groups/libgap_wrapper.pyx @@ -159,9 +159,7 @@ class ParentLibGAP(SageObject): You can access the containing group with :meth:`ambient`. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -180,9 +178,7 @@ class ParentLibGAP(SageObject): - ``G`` -- group; the codomain - ``cat`` -- category - OUTPUT: - - The set of homomorphisms from ``self`` to ``G``. + OUTPUT: the set of homomorphisms from ``self`` to ``G`` EXAMPLES:: @@ -201,10 +197,7 @@ class ParentLibGAP(SageObject): You should override this with a derived class. Its constructor must accept the same arguments as :meth:`__init__`. - OUTPUT: - - A new instance of a group (derived class of - :class:`ParentLibGAP`). + OUTPUT: a new instance of a group (derived class of :class:`ParentLibGAP`) TESTS:: @@ -225,9 +218,7 @@ class ParentLibGAP(SageObject): - ``generators`` -- a list/tuple/iterable of group elements. - OUTPUT: - - The subgroup generated by ``generators``. + OUTPUT: the subgroup generated by ``generators`` EXAMPLES:: @@ -269,11 +260,9 @@ class ParentLibGAP(SageObject): def gap(self): """ - Return the gap representation of self. - - OUTPUT: + Return the gap representation of ``self``. - A :class:`~sage.libs.gap.element.GapElement` + OUTPUT: a :class:`~sage.libs.gap.element.GapElement` EXAMPLES:: @@ -309,11 +298,9 @@ class ParentLibGAP(SageObject): def ngens(self): """ - Return the number of generators of self. + Return the number of generators of ``self``. - OUTPUT: - - Integer. + OUTPUT: an integer EXAMPLES:: @@ -332,10 +319,6 @@ class ParentLibGAP(SageObject): """ Return a string representation. - OUTPUT: - - String. - TESTS:: sage: from sage.groups.libgap_wrapper import ElementLibGAP, ParentLibGAP @@ -407,7 +390,7 @@ class ParentLibGAP(SageObject): def gen(self, i): """ - Return the `i`-th generator of self. + Return the `i`-th generator of ``self``. .. warning:: @@ -419,9 +402,7 @@ class ParentLibGAP(SageObject): - ``i`` -- integer between `0` (inclusive) and :meth:`ngens` (exclusive). The index of the generator. - OUTPUT: - - The `i`-th generator of the group. + OUTPUT: the `i`-th generator of the group EXAMPLES:: @@ -438,7 +419,7 @@ class ParentLibGAP(SageObject): @cached_method def one(self): """ - Return the identity element of self. + Return the identity element of ``self``. EXAMPLES:: @@ -454,7 +435,7 @@ class ParentLibGAP(SageObject): def _an_element_(self): """ - Return an element of self. + Return an element of ``self``. EXAMPLES:: @@ -522,9 +503,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): """ Return a LibGAP representation of the element. - OUTPUT: - - A :class:`~sage.libs.gap.element.GapElement` + OUTPUT: a :class:`~sage.libs.gap.element.GapElement` EXAMPLES:: @@ -572,9 +551,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): """ Test whether the group element is the trivial element. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -591,10 +568,6 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): """ Return a string representation. - OUTPUT: - - String. - EXAMPLES:: sage: G. = FreeGroup() @@ -622,9 +595,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): r""" Return a LaTeX representation - OUTPUT: - - String. A valid LaTeX math command sequence. + OUTPUT: a string; a valid LaTeX math command sequence EXAMPLES:: @@ -727,7 +698,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): def __invert__(self): """ - Return the inverse of self. + Return the inverse of ``self``. TESTS:: diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py index 6d487e5d123..3ad8719a5dd 100644 --- a/src/sage/groups/matrix_gps/finitely_generated.py +++ b/src/sage/groups/matrix_gps/finitely_generated.py @@ -83,9 +83,7 @@ def normalize_square_matrices(matrices): """ Find a common space for all matrices. - OUTPUT: - - A list of matrices, all elements of the same matrix space. + OUTPUT: a list of matrices, all elements of the same matrix space EXAMPLES:: @@ -151,7 +149,8 @@ def QuaternionMatrixGroupGF3(): is not isomorphic to the group of symmetries of a square (the dihedral group `D_4`). - .. note:: + .. NOTE:: + This group is most easily available via ``groups.matrix.QuaternionGF3()``. EXAMPLES: @@ -413,9 +412,7 @@ def gen(self, i): """ Return the `i`-th generator - OUTPUT: - - The `i`-th generator of the group. + OUTPUT: the `i`-th generator of the group EXAMPLES:: @@ -435,9 +432,7 @@ def ngens(self): """ Return the number of generators - OUTPUT: - - An integer. The number of generators. + OUTPUT: an integer; the number of generators EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/group_element.pyx b/src/sage/groups/matrix_gps/group_element.pyx index 38bf1f03279..2e6428fc714 100644 --- a/src/sage/groups/matrix_gps/group_element.pyx +++ b/src/sage/groups/matrix_gps/group_element.pyx @@ -97,7 +97,7 @@ cpdef is_MatrixGroupElement(x): - ``x`` -- anything. - OUTPUT: Boolean. + OUTPUT: boolean EXAMPLES:: @@ -372,7 +372,7 @@ cdef class MatrixGroupElement_generic(MultiplicativeGroupElement): """ Return the inverse group element - OUTPUT: A matrix group element. + OUTPUT: a matrix group element EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/group_element_gap.pyx b/src/sage/groups/matrix_gps/group_element_gap.pyx index b07c0f01a44..2f7eb82cb8d 100644 --- a/src/sage/groups/matrix_gps/group_element_gap.pyx +++ b/src/sage/groups/matrix_gps/group_element_gap.pyx @@ -306,7 +306,7 @@ cdef class MatrixGroupElement_gap(ElementLibGAP): This method writes the group element as a product of the elements of the list ``gens``, or the standard generators of - the parent of self if ``gens`` is None. + the parent of ``self`` if ``gens`` is ``None``. INPUT: diff --git a/src/sage/groups/matrix_gps/linear.py b/src/sage/groups/matrix_gps/linear.py index ef2bf1aa0be..759faf2db18 100644 --- a/src/sage/groups/matrix_gps/linear.py +++ b/src/sage/groups/matrix_gps/linear.py @@ -201,7 +201,7 @@ def SL(n, R, var='a'): matrices that are invertible over the ring `R` with determinant one. - .. note:: + .. NOTE:: This group is also available via ``groups.matrix.SL()``. diff --git a/src/sage/groups/matrix_gps/matrix_group.py b/src/sage/groups/matrix_gps/matrix_group.py index 2b87493fbc5..e7ad5183e45 100644 --- a/src/sage/groups/matrix_gps/matrix_group.py +++ b/src/sage/groups/matrix_gps/matrix_group.py @@ -131,9 +131,7 @@ def _check_matrix(self, x, *args): - ``*args`` -- optional other representations of ``x``, depending on the group implementation. Ignored by default. - OUTPUT: - - A :class:`TypeError` must be raised if ``x`` is invalid. + OUTPUT: a :class:`TypeError` must be raised if ``x`` is invalid EXAMPLES:: @@ -186,9 +184,11 @@ def subgroup(self, generators, check=True): INPUT: - ``generators`` -- a list/tuple/iterable of group elements of ``self`` - - ``check`` -- boolean (optional, default: ``True``). Whether to check that each matrix is invertible. + - ``check`` -- boolean (optional, default: ``True``). Whether to check + that each matrix is invertible. - OUTPUT: The subgroup generated by ``generators`` as an instance of :class:`FinitelyGeneratedMatrixGroup_gap` + OUTPUT: the subgroup generated by ``generators`` as an instance of + :class:`FinitelyGeneratedMatrixGroup_gap` EXAMPLES:: @@ -262,10 +262,6 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. - EXAMPLES:: sage: F = GF(5); MS = MatrixSpace(F, 2, 2) @@ -429,10 +425,8 @@ def degree(self): """ Return the degree of this matrix group. - OUTPUT: - - Integer. The size (number of rows equals number of columns) of - the matrices. + OUTPUT: an integer; the size (number of rows equals number of columns) + of the matrices EXAMPLES:: @@ -474,9 +468,7 @@ def __richcmp__(self, other, op): - ``op`` -- comparison operator - OUTPUT: - - boolean + OUTPUT: boolean EXAMPLES:: @@ -573,6 +565,5 @@ def is_trivial(self): 2 sage: G.is_trivial() True - """ return all(g.is_one() for g in self.gens()) diff --git a/src/sage/groups/matrix_gps/matrix_group_gap.py b/src/sage/groups/matrix_gps/matrix_group_gap.py index 84fd3d74996..f413c87bdde 100644 --- a/src/sage/groups/matrix_gps/matrix_group_gap.py +++ b/src/sage/groups/matrix_gps/matrix_group_gap.py @@ -137,7 +137,6 @@ def __init__(self, degree, base_ring, libgap_group, ambient=None, category=None) Traceback (most recent call last): ... NotImplementedError: group must be finite - """ ParentLibGAP.__init__(self, libgap_group, ambient=ambient) MatrixGroup_generic.__init__(self, degree, base_ring, category=category) @@ -202,9 +201,7 @@ def _check_matrix(self, x_sage, x_gap): - ``x_gap`` -- the corresponding LibGAP matrix. - OUTPUT: - - A :class:`TypeError` must be raised if ``x`` is invalid. + OUTPUT: a :class:`TypeError` must be raised if ``x`` is invalid EXAMPLES:: @@ -232,9 +229,11 @@ def subgroup(self, generators, check=True): INPUT: - ``generators`` -- a list/tuple/iterable of group elements of ``self`` - - ``check`` -- boolean (optional, default: ``True``). Whether to check that each matrix is invertible. + - ``check`` -- boolean (optional, default: ``True``). Whether to check + that each matrix is invertible. - OUTPUT: The subgroup generated by ``generators`` as an instance of :class:`FinitelyGeneratedMatrixGroup_gap` + OUTPUT: The subgroup generated by ``generators`` as an instance of + :class:`FinitelyGeneratedMatrixGroup_gap` EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/named_group.py b/src/sage/groups/matrix_gps/named_group.py index 90c01e232e7..1aae7019e3c 100644 --- a/src/sage/groups/matrix_gps/named_group.py +++ b/src/sage/groups/matrix_gps/named_group.py @@ -78,9 +78,7 @@ def normalize_args_vectorspace(*args, **kwds): field generator name in the case where ``ring`` is a prime power. - OUTPUT: - - A pair ``(degree, ring)``. + OUTPUT: a pair ``(degree, ring)`` TESTS:: @@ -237,9 +235,7 @@ def _an_element_(self): """ Return an element. - OUTPUT: - - A group element. + OUTPUT: a group element EXAMPLES:: @@ -253,10 +249,6 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. - EXAMPLES:: sage: GL(2, QQ)._repr_() @@ -266,11 +258,9 @@ def _repr_(self): def _latex_(self): """ - Return a LaTeX representation - - OUTPUT: + Return a LaTeX representation. - String. + OUTPUT: a string EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/orthogonal.py b/src/sage/groups/matrix_gps/orthogonal.py index c30fc14a331..ab1b770e4cf 100644 --- a/src/sage/groups/matrix_gps/orthogonal.py +++ b/src/sage/groups/matrix_gps/orthogonal.py @@ -116,9 +116,7 @@ def normalize_args_e(degree, ring, e): finite fields and if the degree is even. A parameter that distinguishes inequivalent invariant forms. - OUTPUT: - - The integer ``e`` with values required by GAP. + OUTPUT: the integer ``e`` with values required by GAP TESTS:: @@ -263,10 +261,8 @@ def GO(n, R, e=0, var='a', invariant_form=None): by the orthogonal group; the form is checked to be non-degenerate and symmetric but not to be positive definite - OUTPUT: - - The general orthogonal group of given degree, base ring, and - choice of invariant form. + OUTPUT: the general orthogonal group of given degree, base ring, and + choice of invariant form EXAMPLES:: @@ -373,10 +369,8 @@ def SO(n, R, e=None, var='a', invariant_form=None): by the orthogonal group; the form is checked to be non-degenerate and symmetric but not to be positive definite - OUTPUT: - - The special orthogonal group of given degree, base ring, and choice of - invariant form. + OUTPUT: the special orthogonal group of given degree, base ring, and choice + of invariant form EXAMPLES:: @@ -482,9 +476,7 @@ def invariant_bilinear_form(self): """ Return the symmetric bilinear form preserved by ``self``. - OUTPUT: - - A matrix. + OUTPUT: a matrix EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/symplectic.py b/src/sage/groups/matrix_gps/symplectic.py index 0e378b4d153..d139034107d 100644 --- a/src/sage/groups/matrix_gps/symplectic.py +++ b/src/sage/groups/matrix_gps/symplectic.py @@ -211,7 +211,7 @@ def invariant_form(self): """ Return the quadratic form preserved by the symplectic group. - OUTPUT: A matrix. + OUTPUT: a matrix EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/symplectic_gap.py b/src/sage/groups/matrix_gps/symplectic_gap.py index d348ed9f40f..b0d05c3be6e 100644 --- a/src/sage/groups/matrix_gps/symplectic_gap.py +++ b/src/sage/groups/matrix_gps/symplectic_gap.py @@ -48,7 +48,7 @@ def invariant_form(self): """ Return the quadratic form preserved by the symplectic group. - OUTPUT: A matrix. + OUTPUT: a matrix EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/unitary.py b/src/sage/groups/matrix_gps/unitary.py index 43ac69c3983..37a9cb826ee 100644 --- a/src/sage/groups/matrix_gps/unitary.py +++ b/src/sage/groups/matrix_gps/unitary.py @@ -68,11 +68,7 @@ def finite_field_sqrt(ring): """ Helper function. - INPUT: A ring. - - OUTPUT: - - Integer `q` such that ``ring`` is the finite field with `q^2` elements. + OUTPUT: an integer `q` such that ``ring`` is the finite field with `q^2` elements EXAMPLES:: @@ -189,7 +185,7 @@ def GU(n, R, var='a', invariant_form=None): by the unitary group; the form is checked to be non-degenerate and hermitian but not to be positive definite - OUTPUT: The general unitary group. + OUTPUT: the general unitary group EXAMPLES:: @@ -301,9 +297,7 @@ def SU(n, R, var='a', invariant_form=None): by the unitary group; the form is checked to be non-degenerate and hermitian but not to be positive definite - OUTPUT: - - Return the special unitary group. + OUTPUT: the special unitary group EXAMPLES:: @@ -396,7 +390,7 @@ def invariant_form(self): Return the hermitian form preserved by the unitary group. - OUTPUT: A square matrix describing the bilinear form + OUTPUT: a square matrix describing the bilinear form EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/unitary_gap.py b/src/sage/groups/matrix_gps/unitary_gap.py index ac2de20f96b..ab0512a4803 100644 --- a/src/sage/groups/matrix_gps/unitary_gap.py +++ b/src/sage/groups/matrix_gps/unitary_gap.py @@ -41,9 +41,7 @@ def invariant_form(self): """ Return the hermitian form preserved by the unitary group. - OUTPUT: - - A square matrix describing the bilinear form + OUTPUT: a square matrix describing the bilinear form EXAMPLES:: diff --git a/src/sage/groups/misc_gps/argument_groups.py b/src/sage/groups/misc_gps/argument_groups.py index 1c949a57f51..5cf9ead8c7d 100644 --- a/src/sage/groups/misc_gps/argument_groups.py +++ b/src/sage/groups/misc_gps/argument_groups.py @@ -114,9 +114,7 @@ def _normalize_(element): - ``element`` -- an element of the parent's base - OUTPUT: - - An element. + OUTPUT: an element TESTS:: @@ -151,9 +149,7 @@ def _symbolic_(self, R=None): The output will be an element of ``R``. If ``None``, then the symbolic ring is used. - OUTPUT: - - A symbolic expression. + OUTPUT: a symbolic expression EXAMPLES:: @@ -337,9 +333,7 @@ def _determine_category_(category): - ``category`` -- a category or ``None`` (in which case the output equals ``category``) - OUTPUT: - - A category. + OUTPUT: a category EXAMPLES:: @@ -414,9 +408,7 @@ def _normalize_(exponent): - ``exponent`` -- an element of the parent's base - OUTPUT: - - An element. + OUTPUT: an element TESTS:: @@ -463,9 +455,7 @@ def _symbolic_(self, R=None): The output will be an element of ``R``. If ``None``, then the symbolic ring is used. - OUTPUT: - - A symbolic expression. + OUTPUT: a symbolic expression EXAMPLES:: @@ -681,9 +671,7 @@ def _element_constructor_(self, data, exponent=None, **kwds): - ``kwds`` -- are passed on to element - OUTPUT: - - A :class:`UnitCirclePoint`. + OUTPUT: a :class:`UnitCirclePoint` TESTS:: @@ -796,9 +784,7 @@ def _create_element_in_extension_(self, exponent): - ``exponent`` -- the element data. - OUTPUT: - - An element. + OUTPUT: an element EXAMPLES:: @@ -828,9 +814,7 @@ def _coerce_map_from_(self, R): - ``R`` -- a parent. - OUTPUT: - - A boolean. + OUTPUT: boolean TESTS:: @@ -1088,9 +1072,7 @@ def _normalize_(element): - ``element`` -- an element of the parent's base - OUTPUT: - - An element. + OUTPUT: an element TESTS:: @@ -1123,9 +1105,7 @@ def _symbolic_(self, R=None): The output will be an element of ``R``. If ``None``, then the symbolic ring is used. - OUTPUT: - - A symbolic expression. + OUTPUT: a symbolic expression EXAMPLES:: @@ -1275,9 +1255,7 @@ def _element_constructor_(self, data, **kwds): - ``kwds`` -- are passed on to element - OUTPUT: - - A :class:`ArgumentByElement`. + OUTPUT: a :class:`ArgumentByElement` TESTS:: @@ -1345,9 +1323,7 @@ def _create_element_in_extension_(self, element): - ``element`` -- the element data. - OUTPUT: - - An element. + OUTPUT: an element EXAMPLES:: @@ -1379,9 +1355,7 @@ def _coerce_map_from_(self, R): - ``R`` -- a parent. - OUTPUT: - - A boolean. + OUTPUT: boolean TESTS:: @@ -1436,9 +1410,7 @@ def _normalize_(element): - ``element`` -- an element of the parent's base - OUTPUT: - - An element. + OUTPUT: an element TESTS:: @@ -1689,9 +1661,7 @@ def _element_constructor_(self, data): - ``data`` -- an object - OUTPUT: - - A :class:`Sign`. + OUTPUT: a :class:`Sign` TESTS:: diff --git a/src/sage/groups/misc_gps/imaginary_groups.py b/src/sage/groups/misc_gps/imaginary_groups.py index 41fe79f9959..428db810921 100644 --- a/src/sage/groups/misc_gps/imaginary_groups.py +++ b/src/sage/groups/misc_gps/imaginary_groups.py @@ -284,9 +284,7 @@ def _determine_category_(category): - ``category`` -- a category or ``None`` (in which case the output equals ``category``) - OUTPUT: - - A category. + OUTPUT: a category EXAMPLES:: @@ -376,9 +374,7 @@ def _element_constructor_(self, data, imag=None): - ``imag`` -- a number (of a subset of the reals) or ``None`` - OUTPUT: - - A :class:`ImaginaryElement`. + OUTPUT: a :class:`ImaginaryElement` TESTS:: diff --git a/src/sage/groups/old.pyx b/src/sage/groups/old.pyx index 1833b4a2b74..08df0405ffa 100644 --- a/src/sage/groups/old.pyx +++ b/src/sage/groups/old.pyx @@ -69,7 +69,7 @@ cdef class Group(sage.structure.parent.Parent): def __contains__(self, x): r""" - True if coercion of `x` into self is defined. + Return ``True`` if coercion of ``x`` into ``self`` is defined. EXAMPLES:: @@ -88,7 +88,7 @@ cdef class Group(sage.structure.parent.Parent): def is_abelian(self): """ - Return True if this group is abelian. + Return ``True`` if this group is abelian. EXAMPLES:: @@ -103,7 +103,7 @@ cdef class Group(sage.structure.parent.Parent): def is_commutative(self): r""" - Return True if this group is commutative. This is an alias for + Return ``True`` if this group is commutative. This is an alias for is_abelian, largely to make groups work well with the Factorization class. @@ -119,7 +119,7 @@ cdef class Group(sage.structure.parent.Parent): def order(self): """ - Returns the number of elements of this group, which is either a + Return the number of elements of this group, which is either a positive integer or infinity. EXAMPLES:: @@ -135,8 +135,7 @@ cdef class Group(sage.structure.parent.Parent): def is_multiplicative(self): r""" - Returns True if the group operation is given by \* (rather than - +). + Return ``True`` if the group operation is given by \* (rather than +). Override for additive groups. @@ -214,7 +213,6 @@ cdef class FiniteGroup(Group): """ return True - cdef class AlgebraicGroup(Group): """ Generic algebraic group. diff --git a/src/sage/groups/perm_gps/constructor.py b/src/sage/groups/perm_gps/constructor.py index 5a130eb19be..ab912f7667d 100644 --- a/src/sage/groups/perm_gps/constructor.py +++ b/src/sage/groups/perm_gps/constructor.py @@ -170,10 +170,8 @@ def standardize_generator(g, convert_dict=None, as_cycles=False): - ``as_cycles`` -- (default: ``False``) whether the output should be as cycles or in one-line notation - OUTPUT: - - The permutation in as a list in one-line notation or a list of cycles - as tuples. + OUTPUT: the permutation in as a list in one-line notation or a list of + cycles as tuples. EXAMPLES:: diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx index 803f2533b7d..dd2647238f2 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx @@ -438,12 +438,12 @@ cdef aut_gp_and_can_lab *get_aut_gp_and_can_lab(void *S, int -- 0 if gamma_1(S1) = gamma_2(S2), otherwise -1 or 1 (see docs for cmp), such that the set of all structures is well-ordered - NOTE: - The partition ``partition1`` *must* satisfy the property that in each cell, - the smallest element occurs first! + .. NOTE:: - OUTPUT: - pointer to a aut_gp_and_can_lab struct + The partition ``partition1`` *must* satisfy the property that in each + cell, the smallest element occurs first! + + OUTPUT: a pointer to a ``aut_gp_and_can_lab`` struct """ cdef PartitionStack *current_ps diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx index 6143e509caa..245ec5f7c06 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx @@ -467,9 +467,7 @@ cdef iterator *setup_canonical_generator(int degree, - ``max_depth`` - maximum depth of augmentations to be made from the seed object S - OUTPUT: - - pointer to an iterator of objects + OUTPUT: a pointer to an iterator of objects """ if max_depth <= 1: diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd index f53184bd082..408fe26a15a 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd @@ -85,8 +85,7 @@ cdef inline OrbitPartition *OP_copy(OrbitPartition *OP) noexcept: """ Allocate and return a pointer to a copy of a OrbitPartition of degree n. - Returns a - null pointer in the case of an allocation failure. + Returns a null pointer in the case of an allocation failure. """ cdef OrbitPartition *OP2 = OP_new(OP.degree) if OP is NULL: @@ -172,7 +171,7 @@ cdef inline int PS_copy_from_to(PartitionStack *PS, PartitionStack *PS2) noexcep cdef inline bint PS_is_discrete(PartitionStack *PS) noexcept: """ - Returns whether the deepest partition consists only of singleton cells. + Return whether the deepest partition consists only of singleton cells. """ cdef int i for i from 0 <= i < PS.degree: @@ -182,7 +181,7 @@ cdef inline bint PS_is_discrete(PartitionStack *PS) noexcept: cdef inline int PS_num_cells(PartitionStack *PS) noexcept: """ - Returns the number of cells. + Return the number of cells. """ cdef int i, ncells = 0 for i from 0 <= i < PS.degree: @@ -206,13 +205,13 @@ cdef inline void PS_move_min_to_front(PartitionStack *PS, int start, int end) no cdef inline bint PS_is_mcr(PartitionStack *PS, int m) noexcept: """ - Returns whether PS.elements[m] (not m!) is the smallest element of its cell. + Return whether PS.elements[m] (not m!) is the smallest element of its cell. """ return m == 0 or PS.levels[m-1] <= PS.depth cdef inline bint PS_is_fixed(PartitionStack *PS, int m) noexcept: """ - Returns whether PS.elements[m] (not m!) is in a singleton cell, assuming + Return whether PS.elements[m] (not m!) is in a singleton cell, assuming PS_is_mcr(PS, m) is already true. """ return PS.levels[m] <= PS.depth diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pyx b/src/sage/groups/perm_gps/partn_ref/data_structures.pyx index cb25f23a4d3..e7a3e8c55f8 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pyx +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pyx @@ -659,7 +659,7 @@ cdef inline void SC_dealloc(StabilizerChain *SC) noexcept: cdef StabilizerChain *SC_symmetric_group(int n) noexcept: """ - Returns a stabilizer chain for the symmetric group on {0, 1, ..., n-1}. + Return a stabilizer chain for the symmetric group on {0, 1, ..., n-1}. Returns NULL in the case of an allocation failure. """ @@ -700,7 +700,7 @@ cdef StabilizerChain *SC_symmetric_group(int n) noexcept: cdef StabilizerChain *SC_alternating_group(int n) noexcept: """ - Returns a stabilizer chain for the alternating group on {0, 1, ..., n-1}. + Return a stabilizer chain for the alternating group on {0, 1, ..., n-1}. Returns NULL in the case of an allocation failure. """ @@ -1142,8 +1142,8 @@ cdef bint SC_is_giant(int n, int num_perms, int *perms, float p, bitset_t suppor If the group is not a giant, this routine will return False. This could also indicate an allocation failure. - If the group is a giant, this routine will return True with approximate - probability p. It will set `support' to the support of the group in this + If the group is a giant, this routine will return ``True`` with approximate + probability ``p``. It will set `support' to the support of the group in this case. Use bitset_len to get the size of support. The bitset `support' must be initialized. Must have 0 <= p < 1. diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx index 73631b395c4..051e3f78fa4 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx @@ -313,14 +313,13 @@ cdef int double_coset(void *S1, void *S2, PartitionStack *partition1, int *order isom -- space to store the isomorphism to, or NULL if isomorphism is not needed - NOTE: - The partition ``partition1`` and the resulting partition from ``ordering2`` - *must* satisfy the property that in each cell, the smallest element occurs - first! + .. NOTE:: - OUTPUT: - 1 if S1 and S2 are isomorphic, otherwise 0. + The partition ``partition1`` and the resulting partition from + ``ordering2`` *must* satisfy the property that in each cell, the + smallest element occurs first! + OUTPUT: ``1`` if ``S1`` and ``S2`` are isomorphic, otherwise ``0`` """ cdef PartitionStack *current_ps cdef PartitionStack *first_ps diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx index 6a3c07ac75d..c01634e1772 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx @@ -114,7 +114,7 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): def run(self, partition=None): """ Perform the canonical labeling and automorphism group computation, - storing results to self. + storing results to ``self``. INPUT: partition -- an optional list of lists partition of the columns. @@ -257,13 +257,13 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): order and a base for which the list of generators is a strong generating set. - EXAMPLES: (For more examples, see self.run()) + EXAMPLES: (For more examples, see self.run()):: + sage: from sage.groups.perm_gps.partn_ref.refinement_binary import LinearBinaryCodeStruct sage: B = LinearBinaryCodeStruct(matrix(GF(2),[[1,1,1,1]])) sage: B.automorphism_group() ([[0, 1, 3, 2], [0, 2, 1, 3], [1, 0, 2, 3]], 24, [0, 1, 2]) - """ cdef int i, j cdef list generators, base @@ -282,7 +282,8 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): """ Returns a canonical relabeling (in list permutation format). - EXAMPLES: (For more examples, see self.run()) + EXAMPLES: (For more examples, see self.run()):: + sage: from sage.groups.perm_gps.partn_ref.refinement_binary import LinearBinaryCodeStruct sage: B = LinearBinaryCodeStruct(matrix(GF(2), [[1,1,0]])) @@ -295,7 +296,6 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): ([[2, 1, 0]], 2, [0]) sage: B.canonical_relabeling() [1, 0, 2] - """ cdef int i if self.output is NULL: @@ -304,7 +304,7 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): def is_isomorphic(self, LinearBinaryCodeStruct other): """ - Calculate whether self is isomorphic to other. + Calculate whether ``self`` is isomorphic to ``other``. EXAMPLES:: @@ -314,7 +314,6 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): sage: C = LinearBinaryCodeStruct(Matrix(GF(2), [[1,1,1,0,0,1],[1,1,0,1,1,0]])) sage: B.is_isomorphic(C) [0, 1, 2, 5, 3, 4] - """ cdef int i, n = self.degree cdef int *output @@ -512,7 +511,6 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): [4, 0, 1, 2]) sage: B.canonical_relabeling() [2, 3, 4, 5, 0, 1] - """ cdef int n = self.degree cdef PartitionStack *part @@ -534,7 +532,8 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): order and a base for which the list of generators is a strong generating set. - EXAMPLES: (For more examples, see self.run()) + EXAMPLES: (For more examples, see self.run()):: + sage: from sage.groups.perm_gps.partn_ref.refinement_binary import NonlinearBinaryCodeStruct sage: B = NonlinearBinaryCodeStruct(Matrix(GF(2), [[1,1,1,0,0,0],[1,1,0,1,0,0],[1,0,1,1,0,0],[0,1,1,1,0,0],[0,0,0,0,1,0],[0,0,0,0,0,1]])) @@ -546,7 +545,6 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): [0, 1, 2, 3, 5, 4]], 48, [4, 0, 1, 2]) - """ cdef int i, j cdef list generators, base @@ -565,14 +563,14 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): """ Returns a canonical relabeling (in list permutation format). - EXAMPLES: (For more examples, see self.run()) + EXAMPLES: (For more examples, see self.run()):: + sage: from sage.groups.perm_gps.partn_ref.refinement_binary import NonlinearBinaryCodeStruct sage: B = NonlinearBinaryCodeStruct(Matrix(GF(2), [[1,1,1,0,0,0],[1,1,0,1,0,0],[1,0,1,1,0,0],[0,1,1,1,0,0],[0,0,0,0,1,0],[0,0,0,0,0,1]])) sage: B.run() sage: B.canonical_relabeling() [2, 3, 4, 5, 0, 1] - """ cdef int i if self.output is NULL: @@ -581,7 +579,7 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): def is_isomorphic(self, NonlinearBinaryCodeStruct other): """ - Calculate whether self is isomorphic to other. + Calculate whether ``self`` is isomorphic to ``other``. EXAMPLES:: @@ -591,7 +589,6 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): sage: C = NonlinearBinaryCodeStruct(Matrix(GF(2), [[1,1,0,0,1,1],[1,1,1,1,0,0]])) sage: B.is_isomorphic(C) [2, 3, 0, 1, 4, 5] - """ cdef int i, n = self.degree cdef int *output @@ -914,17 +911,19 @@ cdef int compare_nonlinear_codes(int *gamma_1, int *gamma_2, void *S1, void *S2, cdef bint all_children_are_equivalent(PartitionStack *col_ps, void *S) noexcept: """ - Returns True if any refinement of the current partition results in the same - structure. - - WARNING: - Converse does not hold in general! See Lemma 2.25 of [1] for details, noting - that the binary code is interpreted as a bipartite graph (see module docs - for details). + Return ``True`` if any refinement of the current partition results in the + same structure. INPUT: - col_ps -- the partition stack to be checked - S -- a binary code struct object + + - ``col_ps`` -- the partition stack to be checked + - ``S`` -- a binary code struct object + + .. WARNING:: + + Converse does not hold in general! See Lemma 2.25 of [1] for details, noting + that the binary code is interpreted as a bipartite graph (see module docs + for details). """ cdef BinaryCodeStruct BCS = S cdef PartitionStack *word_ps = BCS.word_ps @@ -957,7 +956,7 @@ cdef bint all_children_are_equivalent(PartitionStack *col_ps, void *S) noexcept: cdef inline int word_degree(PartitionStack *word_ps, BinaryCodeStruct BCS, int entry, int cell_index, PartitionStack *col_ps) noexcept: """ - Returns the number of edges from the vertex corresponding to entry to + Return the number of edges from the vertex corresponding to entry to vertices in the cell corresponding to cell_index. INPUT: @@ -987,7 +986,7 @@ cdef inline int word_degree(PartitionStack *word_ps, BinaryCodeStruct BCS, int e cdef inline int col_degree(PartitionStack *col_ps, BinaryCodeStruct BCS, int entry, int cell_index, PartitionStack *word_ps) noexcept: """ - Returns the number of edges from the vertex corresponding to entry to + Return the number of edges from the vertex corresponding to entry to vertices in the cell corresponding to cell_index. INPUT: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx index 1b588487d1c..2ebf9e08b56 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx @@ -676,12 +676,12 @@ cdef int compare_graphs(int *gamma_1, int *gamma_2, void *S1, void *S2, int degr cdef bint all_children_are_equivalent(PartitionStack *PS, void *S) noexcept: """ - Return True if every refinement of the current partition results in the + Return ``True`` if every refinement of the current partition results in the same structure. - WARNING: + .. WARNING:: - Converse does not hold in general! See Lemma 2.25 of [1] for details. + Converse does not hold in general! See Lemma 2.25 of [1] for details. INPUT: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd index e7b6cf42f6d..43cf567dc40 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd @@ -11,7 +11,6 @@ from sage.groups.perm_gps.partn_ref.data_structures cimport * - # name of the three functions to customize cdef int refine_list(PartitionStack *, void *, int *, int) noexcept cdef int compare_lists(int *, int *, void *, void *, int) noexcept diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx index c8d4f86a8f1..1366fa8ceee 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx @@ -110,7 +110,6 @@ cdef class MatrixStruct: 00011 01100 4 - """ print(self.matrix) print("") @@ -127,7 +126,7 @@ cdef class MatrixStruct: def run(self, partition=None): """ Perform the canonical labeling and automorphism group computation, - storing results to self. + storing results to ``self``. INPUT: @@ -153,7 +152,6 @@ cdef class MatrixStruct: sage: M = MatrixStruct(matrix(GF(3),[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2]])) sage: M.automorphism_group()[1] == factorial(14) True - """ cdef int i, n = self.degree cdef PartitionStack *part @@ -189,7 +187,6 @@ cdef class MatrixStruct: sage: M = MatrixStruct(matrix(GF(3),[[0,1,2],[0,2,1]])) sage: M.automorphism_group() ([[0, 2, 1]], 2, [1]) - """ cdef int i, j cdef list generators, base @@ -217,7 +214,6 @@ cdef class MatrixStruct: sage: M = MatrixStruct(matrix(GF(3),[[0,1,2],[0,2,1]])) sage: M.canonical_relabeling() [0, 1, 2] - """ cdef int i if self.output is NULL: @@ -226,7 +222,7 @@ cdef class MatrixStruct: def is_isomorphic(self, MatrixStruct other): """ - Calculate whether self is isomorphic to other. + Calculate whether ``self`` is isomorphic to ``other``. EXAMPLES:: @@ -235,7 +231,6 @@ cdef class MatrixStruct: sage: N = MatrixStruct(Matrix(GF(11), [[0,1,0,2,0,3],[1,0,2,0,3,0]])) sage: M.is_isomorphic(N) [0, 2, 4, 1, 3, 5] - """ cdef int i, n = self.degree cdef int *output diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx index 23d5e7576c7..b73406b13a7 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx @@ -12,12 +12,11 @@ in pure Python, and still use the Cython algorithms. Experimentation with specific partition backtrack implementations no longer requires compilation, as the input functions can be dynamically changed at runtime. -NOTE: - -This is not intended for production quality implementations of partition -refinement, but instead for experimentation, learning, and use of the Python -debugger. +.. NOTE:: + This is not intended for production quality implementations of partition + refinement, but instead for experimentation, learning, and use of the + Python debugger. """ #***************************************************************************** @@ -53,7 +52,6 @@ cdef class PythonPartitionStack: sage: from sage.groups.perm_gps.partn_ref.refinement_python import PythonPartitionStack sage: P = PythonPartitionStack(7) # implicit doctest - """ self.c_ps = PS_new(n, 1) @@ -66,7 +64,6 @@ cdef class PythonPartitionStack: sage: from sage.groups.perm_gps.partn_ref.refinement_python import PythonPartitionStack sage: P = PythonPartitionStack(7) sage: del(P) # implicit doctest - """ PS_dealloc(self.c_ps) @@ -80,7 +77,6 @@ cdef class PythonPartitionStack: sage: P = PythonPartitionStack(7) sage: P # implicit doctest PythonPartitionStack of degree 7 and depth 0. - """ return "PythonPartitionStack of degree %d and depth %d."%(self.c_ps.degree, self.c_ps.depth) @@ -98,7 +94,6 @@ cdef class PythonPartitionStack: sage: P.display() (0 1 2 3 4 5 6) (0 1 2|3 4 5 6) - """ PS_print(self.c_ps) @@ -116,7 +111,6 @@ cdef class PythonPartitionStack: [None, None, None, None, None, None, None] sage: P.is_discrete() True - """ return PS_is_discrete(self.c_ps) @@ -130,7 +124,6 @@ cdef class PythonPartitionStack: sage: P = PythonPartitionStack(7) sage: P.num_cells() 1 - """ return PS_num_cells(self.c_ps) @@ -150,7 +143,6 @@ cdef class PythonPartitionStack: sage: P.move_min_to_front(0,1) sage: P.display() (0 1 2 3 4 5 6) - """ PS_move_min_to_front(self.c_ps, start, end) @@ -166,7 +158,6 @@ cdef class PythonPartitionStack: (0 1 2 3 4 5 6) sage: Q.display() (0 1 2 3 4 5 6) - """ cdef PythonPartitionStack cpy cpy = PythonPartitionStack(self.c_ps.degree) @@ -192,7 +183,6 @@ cdef class PythonPartitionStack: sage: P.display() (0 1 2 3 4 5 6) (0 1 2 3 4 5 6) - """ PS_clear(self.c_ps) @@ -208,7 +198,6 @@ cdef class PythonPartitionStack: [0, 1, 2, 3, 4, 5, 6] sage: P.levels() [7, 7, 7, 7, 7, 7, -1] - """ cdef int i return [self.c_ps.entries[i] for i from 0 <= i < self.c_ps.degree] @@ -225,7 +214,6 @@ cdef class PythonPartitionStack: sage: P.set_entry(0,1) sage: P.display() (1 0 2 3 4 5 6) - """ self.c_ps.entries[i] = entry @@ -239,7 +227,6 @@ cdef class PythonPartitionStack: sage: P = PythonPartitionStack(7) sage: P.get_entry(0) 0 - """ return self.c_ps.entries[i] @@ -255,7 +242,6 @@ cdef class PythonPartitionStack: [0, 1, 2, 3, 4, 5, 6] sage: P.levels() [7, 7, 7, 7, 7, 7, -1] - """ return [self.c_ps.levels[i] for i from 0 <= i < self.c_ps.degree] @@ -273,7 +259,6 @@ cdef class PythonPartitionStack: sage: P.display() (0 1 2 3 4 5 6) (0 1 2|3 4 5 6) - """ self.c_ps.levels[i] = level @@ -287,7 +272,6 @@ cdef class PythonPartitionStack: sage: P = PythonPartitionStack(7) sage: P.get_level(0) 7 - """ return self.c_ps.levels[i] @@ -302,7 +286,6 @@ cdef class PythonPartitionStack: sage: P = PythonPartitionStack(7) sage: P.depth() 0 - """ if new is not None: self.c_ps.depth = new @@ -319,7 +302,6 @@ cdef class PythonPartitionStack: sage: P = PythonPartitionStack(7) sage: P.degree() 7 - """ if new is not None: self.c_ps.degree = new @@ -340,7 +322,6 @@ cdef class PythonPartitionStack: [[0, 1, 2, 3, 4, 5, 6]] sage: P.partition(1) [[0, 1, 2], [3, 4, 5, 6]] - """ cdef int i cdef list partition = [], cell = [] @@ -380,7 +361,6 @@ class PythonObjectWrapper: sage: P.cs_fn - """ self.degree = degree self.obj = obj diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx index 6ccc0b28c45..c3a42da04d8 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx @@ -536,7 +536,7 @@ cdef void deallocate_sgd(void *data) noexcept: cdef void *subset_generator_next(void *data, int *degree, bint *mem_err) noexcept: r""" - Returns the next element to consider adding to the set. + Return the next element to consider adding to the set. """ cdef subset_generator_data *sgd = data while True: @@ -694,11 +694,11 @@ def sets_modulo_perm_group(list generators, int max_size, INPUT: - - ``generators`` - (list of lists) list of generators in list form - - ``max_size`` - (int) maximum size of subsets to be generated - - ``indicate_mem_err`` - (bool) whether to raise an error - if we run out of memory, or simply append a MemoryError - instance to the end of the output + - ``generators`` -- (list of lists) list of generators in list form + - ``max_size`` -- (int) maximum size of subsets to be generated + - ``indicate_mem_err`` -- (bool) whether to raise an error + if we run out of memory, or simply append a MemoryError + instance to the end of the output EXAMPLES:: diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx index 261d1987897..89529f4e8ce 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx @@ -252,7 +252,6 @@ cdef tuple PS_refinement(PartitionStack * part, long *refine_vals, long *best, j += 1 - loc_begin = i + 1 i += 1 return (True, newly_fixed) @@ -495,17 +494,15 @@ cdef class PartitionRefinement_generic: ##################################################################### cdef bint _inner_min_(self, int pos, bint * inner_group_changed) noexcept: """ - Minimize the node by the action of the inner group on the i-th position. + Minimize the node by the action of the inner group on the ith position. INPUT: - - `pos` - A position in `range(self.n)` - - `inner_group_changed` - will be set to true if `G_y` got smaller - - OUTPUT: + - ``pos`` -- A position in ``range(self.n)`` + - ``inner_group_changed`` -- will be set to ``True`` if `G_y` got smaller - - `True` if and only if the actual node compares less or equal to - the candidate for the canonical form. + OUTPUT: ``True`` if and only if the actual node compares less or equal + to the candidate for the canonical form. """ raise NotImplementedError @@ -517,10 +514,8 @@ cdef class PartitionRefinement_generic: to a smaller subgroup of `S_n`. This function also has to take care on ``self._is_candidate_initialized``. - OUTPUT: - - - `False` only if the actual node compares larger than the candidate - for the canonical form. + OUTPUT: ``False`` only if the actual node compares larger than the + candidate for the canonical form """ raise NotImplementedError diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index 3f6431948ea..09c6f8ceab5 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -119,12 +119,12 @@ - Dixon, J. and Mortimer, B., Permutation Groups, Springer-Verlag, Berlin/New York, 1996. -.. note:: +.. NOTE:: - Though Suzuki groups are okay, Ree groups should *not* be wrapped - as permutation groups - the construction is too slow - unless (for - small values or the parameter) they are made using explicit - generators. + Though Suzuki groups are okay, Ree groups should *not* be wrapped + as permutation groups - the construction is too slow - unless (for + small values or the parameter) they are made using explicit + generators. """ # **************************************************************************** @@ -277,9 +277,7 @@ def PermutationGroup(gens=None, *args, **kwds): - ``canonicalize`` -- boolean (default: ``True``); if ``True``, sort generators and remove duplicates - OUTPUT: - - - a permutation group + OUTPUT: a permutation group EXAMPLES:: @@ -457,9 +455,7 @@ def __init__(self, gens=None, gap_group=None, canonicalize=True, - ``canonicalize`` -- bool (default: ``True``); if ``True``, sort generators and remove duplicates - OUTPUT: - - - A permutation group. + OUTPUT: a permutation group EXAMPLES: @@ -665,9 +661,8 @@ def gap(self): compatibility and have :class:`sage.groups.libgap_morphism.GroupHomset_libgap` work for permutation groups, as well - OUTPUT: - - an instance of :class:`sage.libs.gap.element.GapElement` representing this group + OUTPUT: an instance of :class:`sage.libs.gap.element.GapElement` + representing this group EXAMPLES:: @@ -730,9 +725,7 @@ def _Hom_(self, G, category=None, check=True): - ``G`` -- group; the codomain - ``cat`` -- category - OUTPUT: - - The set of homomorphisms from ``self`` to ``G``. + OUTPUT: the set of homomorphisms from ``self`` to ``G`` EXAMPLES:: @@ -751,7 +744,7 @@ def _Hom_(self, G, category=None, check=True): def _magma_init_(self, magma): r""" - Return a string showing how to declare / initialize self in Magma. + Return a string showing how to declare / initialize ``self`` in Magma. EXAMPLES: @@ -816,7 +809,6 @@ def __richcmp__(self, right, op): False sage: G != H False - """ if not isinstance(right, PermutationGroup_generic): return NotImplemented @@ -1467,7 +1459,6 @@ def exponent(self): sage: G = AlternatingGroup(4) sage: G.exponent() 6 - """ return Integer(self._libgap_().Exponent()) @@ -1593,7 +1584,7 @@ def smallest_moved_point(self): def representative_action(self, x, y): r""" - Return an element of self that maps `x` to `y` if it exists. + Return an element of ``self`` that maps `x` to `y` if it exists. This method wraps the gap function ``RepresentativeAction``, which can also return elements that map a given set of points on another set of @@ -1945,7 +1936,6 @@ def base(self, seed=None): [1, 2, 3, 4, 5] sage: S.base([1,3,5,7,9,11]) # create a base for M12 with only odd integers [1, 3, 5, 7, 9] - """ if seed is None: seed = self.domain() @@ -1992,10 +1982,8 @@ def strong_generating_system(self, base_of_group=None, implementation="sage"): * ``"gap"`` -- if used, the ``base_of_group`` must be ``None`` and the computation is directly performed in GAP - OUTPUT: - - A list of lists of permutations from the group, which form a strong - generating system. + OUTPUT: a list of lists of permutations from the group, which forms a + strong generating system .. WARNING:: @@ -2433,7 +2421,6 @@ def frattini_subgroup(self): sage: G.frattini_subgroup() Subgroup generated by [()] of (Symmetric group of order 4! as a permutation group) - """ return self.subgroup(gap_group=self._libgap_().FrattiniSubgroup()) @@ -2525,7 +2512,6 @@ def intersection(self, other): Traceback (most recent call last): ... TypeError: junk is not a permutation group - """ from sage.categories.finite_permutation_groups import FinitePermutationGroups @@ -2881,7 +2867,6 @@ def semidirect_product(self, N, mapping, check=True): AUTHOR: - Kevin Halasz (2012-8-12) - """ if check: @@ -2927,10 +2912,8 @@ def holomorph(self): See :wikipedia:`Holomorph (mathematics)` - OUTPUT: - - Return the holomorph of a given group as permutation group - via a wrapping of GAP's semidirect product function. + OUTPUT: the holomorph of a given group as permutation group + via a wrapping of GAP's semidirect product function EXAMPLES: @@ -3010,9 +2993,7 @@ def _subgroup_constructor(self, libgap_group): - ``libgap_group`` -- an instance of :class:`sage.libs.gap.element.GapElement` representing a GAP group whose generators belong to ``self.gap()`` - OUTPUT: - - The corresponding subgroup of ``self`` as an instance of this class + OUTPUT: the corresponding subgroup of ``self`` as an instance of this class EXAMPLES:: @@ -3045,10 +3026,9 @@ def as_finitely_presented_group(self, reduced=False): is called, attempting to simplify the presentation of the finitely presented group to be returned. - OUTPUT: - - Finite presentation of ``self``, obtained by taking the image - of the isomorphism returned by the GAP function ``IsomorphismFpGroupByGenerators``. + OUTPUT: finite presentation of ``self``, obtained by taking the image + of the isomorphism returned by the GAP function + ``IsomorphismFpGroupByGenerators`` ALGORITHM: @@ -3195,7 +3175,7 @@ def commutator(self, other=None): The two groups need only be permutation groups, there is no notion of requiring them to explicitly be subgroups of some other group. - .. note:: + .. NOTE:: For the identical statement, the generators of the returned group can vary from one execution to the next. @@ -3511,7 +3491,6 @@ def character_table(self): AUTHORS: - David Joyner and William Stein (2006-01-04) - """ G = self._libgap_() cl = G.ConjugacyClasses() @@ -3734,7 +3713,6 @@ def _regular_subgroup_gap(self): sage: S4._regular_subgroup_gap() # random ConjugacyClassSubgroups(SymmetricGroup( [ 1 .. 4 ] ),Group( [ (1,4)(2,3), (1,3)(2,4) ] )) - """ filt = libgap.eval('x -> IsRegular(Representative(x), [1..{}])'.format( self.degree())) @@ -3774,7 +3752,6 @@ def has_regular_subgroup(self, return_group=False): sage: G = graphs.PetersenGraph().automorphism_group() sage: G.has_regular_subgroup() False - """ b = False G = None @@ -3909,7 +3886,7 @@ def cosets(self, S, side='right'): the list of cosets, due to the ordering of the representatives). See below for examples of this. - .. note:: + .. NOTE:: This is a naive implementation intended for instructional purposes, and hence is slow for larger groups. Sage and GAP @@ -4237,15 +4214,11 @@ def isomorphism_to(self, right): INPUT: - - ``self`` -- this group - ``right`` -- a permutation group - - OUTPUT: - - - ``None`` or a morphism of permutation groups. + OUTPUT: ``None``, or a morphism of permutation groups EXAMPLES:: @@ -4290,16 +4263,12 @@ def is_isomorphic(self, right): INPUT: - - ``self`` -- this group - ``right`` -- a permutation group - - OUTPUT: - - - boolean; ``True`` if ``self`` and ``right`` are isomorphic groups; - ``False`` otherwise. + OUTPUT: boolean; ``True`` if ``self`` and ``right`` are isomorphic + groups; ``False`` otherwise EXAMPLES:: @@ -4392,7 +4361,6 @@ def is_pgroup(self): sage: G = PermutationGroup(['(1,2,3,4,5)']) sage: G.is_pgroup() True - """ return bool(self._libgap_().IsPGroup()) @@ -4425,7 +4393,6 @@ def is_simple(self): sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: G.is_simple() False - """ return bool(self._libgap_().IsSimpleGroup()) @@ -4610,7 +4577,6 @@ def is_primitive(self, domain=None): sage: G = PermutationGroup([[(1,2,3,4)],[(2,4)]]) sage: G.is_primitive([1,2,3]) False - """ #If the domain is not a subset of self.domain(), then the #action isn't primitive. @@ -4646,7 +4612,6 @@ def is_semi_regular(self, domain=None): True sage: G.is_semi_regular(G.non_fixed_points()) False - """ try: domain = libgap.eval(self._domain_gap(domain)) @@ -4679,7 +4644,6 @@ def is_regular(self, domain=None): True sage: G.is_regular(G.non_fixed_points()) False - """ try: domain = libgap.eval(self._domain_gap(domain)) @@ -4916,7 +4880,6 @@ def poincare_series(self, p=2, n=10): AUTHORS: - David Joyner and Graham Ellis - """ load_hap() from sage.arith.misc import is_prime @@ -4957,7 +4920,6 @@ def sylow_subgroup(self, p): sage: PSL(10,2).sylow_subgroup(7) Subgroup generated by... - """ return self.subgroup(gap_group=self._libgap_().SylowSubgroup(p)) @@ -5159,7 +5121,6 @@ def __richcmp__(self, other, op): True sage: G.subgroup([G((1,2,3))]) == G.subgroup([G((1,3,2))]) True - """ if self is other: return rich_to_bool(op, 0) @@ -5254,7 +5215,6 @@ def is_normal(self, other=None): (Symmetric group of order 3! as a permutation group) sage: H.is_normal() True - """ if other is None: other = self.ambient_group() @@ -5316,9 +5276,7 @@ def __init__(self, gens, action, domain, gap_group=None, category=None, canonica - ``canonicalize`` -- bool (default: ``True``); if ``True``, sort generators and remove duplicates - OUTPUT: - - - A finite group action given as a permutation group. + OUTPUT: a finite group action given as a permutation group. EXAMPLES:: @@ -5326,7 +5284,6 @@ def __init__(self, gens, action, domain, gap_group=None, category=None, canonica sage: G = PermutationGroup(action=a, domain=range(7)) # needs sage.combinat sage: G.orbits() # needs sage.combinat ((0,), (1, 2, 4), (3, 6, 5)) - """ from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition from sage.sets.disjoint_set import DisjointSet diff --git a/src/sage/groups/perm_gps/permgroup_element.pyx b/src/sage/groups/perm_gps/permgroup_element.pyx index 0d80d04a8af..4c52b386294 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pyx +++ b/src/sage/groups/perm_gps/permgroup_element.pyx @@ -794,7 +794,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): def __reduce__(self): r""" - Returns a function and its arguments needed to create this + Return a function and its arguments needed to create this permutation group element. This is used in pickling. EXAMPLES:: @@ -899,7 +899,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): def _gap_init_(self): r""" - Returns a GAP string representation for this + Return a GAP string representation for this PermutationGroupElement. EXAMPLES:: @@ -961,7 +961,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): def __getitem__(self, i): r""" Return the ``i``-th permutation cycle in the disjoint cycle - representation of self. + representation of ``self``. INPUT: @@ -1028,7 +1028,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): def __call__(self, i): r""" - Returns the image of the integer i under this permutation. + Return the image of the integer i under this permutation. Alternately, if i is a list, tuple or string, returns the result of self acting on i. @@ -1091,7 +1091,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): cpdef list _act_on_list_on_position(self, list x): r""" - Returns the right action of ``self`` on the list ``x``. This is the + Return the right action of ``self`` on the list ``x``. This is the action on positions. EXAMPLES:: @@ -1119,7 +1119,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): cpdef ClonableIntArray _act_on_array_on_position(self, ClonableIntArray x): r""" - Returns the right action of ``self`` on the ClonableIntArray + Return the right action of ``self`` on the ClonableIntArray ``x``. This is the action on positions. EXAMPLES:: @@ -1422,7 +1422,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): cpdef _gap_list(self): r""" - Returns this permutation in list notation compatible with the + Return this permutation in list notation compatible with the GAP numbering. EXAMPLES:: @@ -1446,7 +1446,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): def _gap_cycle_string(self): r""" - Returns a cycle string for this permutation compatible with + Return a cycle string for this permutation compatible with the GAP numbering. EXAMPLES:: @@ -1871,10 +1871,8 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): type should be returned as a :class:`list` or as a :class:`Partition` (default: ``False``) - OUTPUT: - - A :class:`Partition`, or :class:`list` if ``is_list`` is ``True``, - giving the cycle type of ``self`` + OUTPUT: a :class:`Partition`, or :class:`list` if ``is_list`` is + ``True``, giving the cycle type of ``self`` If speed is a concern, then ``as_list=True`` should be used. @@ -1905,13 +1903,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): def has_descent(self, i, side="right", positive=False): r""" - INPUT: - - - ``i`` -- an element of the index set - - ``side`` -- ``"left"`` or ``"right"`` (default: ``"right"``) - - ``positive`` -- a boolean (default: ``False``) - - Returns whether ``self`` has a left (resp. right) descent at + Return whether ``self`` has a left (resp. right) descent at position ``i``. If ``positive`` is ``True``, then test for a non descent instead. @@ -1920,6 +1912,12 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): convention. Hence, ``self`` has a left descent at position ``i`` if ``self(i) > self(i+1)``. + INPUT: + + - ``i`` -- an element of the index set + - ``side`` -- ``"left"`` or ``"right"`` (default: ``"right"``) + - ``positive`` -- a boolean (default: ``False``) + EXAMPLES:: sage: S = SymmetricGroup([1,2,3]) @@ -2124,10 +2122,10 @@ cdef class SymmetricGroupElement(PermutationGroupElement): cdef bint is_valid_permutation(int* perm, int n) noexcept: r""" - This is used in the __init__ method. + This is used in the ``__init__`` method. - Returns True iff the first n elements of perm are literally a - permutation of [0, ..., n-1]. + Return ``True`` iff the first ``n`` elements of perm are literally a + permutation of ``[0, ..., n-1]``. TESTS:: diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index 6e979561e43..514b676efbf 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -594,9 +594,7 @@ def conjugacy_class(self, g): - ``g`` -- a partition or an element of the symmetric group ``self`` - OUTPUT: - - A conjugacy class of a symmetric group. + OUTPUT: a conjugacy class of a symmetric group EXAMPLES:: @@ -678,7 +676,7 @@ def __init__(self, domain=None): - ``n`` -- a positive integer, or list or tuple thereof - .. note:: + .. NOTE:: This group is also available via ``groups.permutation.Alternating()``. @@ -753,7 +751,7 @@ def __init__(self, n): - ``n`` -- a positive integer - .. note:: + .. NOTE:: This group is also available via ``groups.permutation.Cyclic()``. @@ -874,7 +872,7 @@ class DiCyclicGroup(PermutationGroup_unique): `i+1` and code `a^{i}x` as the symbol `2n+i+1`. The two generators are then represented using a left regular representation. - .. note:: + .. NOTE:: This group is also available via ``groups.permutation.DiCyclic()``. @@ -1004,7 +1002,7 @@ def _repr_(self): def is_commutative(self): r""" - Return True if this group is commutative. + Return ``True`` if this group is commutative. EXAMPLES:: @@ -1016,7 +1014,7 @@ def is_commutative(self): def is_abelian(self): r""" - Return True if this group is abelian. + Return ``True`` if this group is abelian. EXAMPLES:: @@ -1033,13 +1031,11 @@ def __init__(self): The Klein 4 Group, which has order `4` and exponent `2`, viewed as a subgroup of `S_4`. - OUTPUT: + OUTPUT: the Klein 4 group of order 4, as a permutation group of degree 4 - the Klein 4 group of order 4, as a permutation group of degree 4. - - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.KleinFour()``. + This group is also available via ``groups.permutation.KleinFour()``. EXAMPLES:: @@ -1152,7 +1148,7 @@ class QuaternionGroup(DiCyclicGroup): See the :class:`DiCyclicGroup` class for a generalization of this construction. - .. note:: + .. NOTE:: This group is also available via ``groups.permutation.Quaternion()``. @@ -1431,9 +1427,7 @@ def __init__(self, n): - ``n`` -- a positive integer - OUTPUT: - - The dihedral group of order `2n`, as a permutation group + OUTPUT: the dihedral group of order `2n`, as a permutation group .. NOTE:: @@ -1730,7 +1724,6 @@ def __init__(self, m): AUTHOR: - Kevin Halasz (2012-8-7) - """ if not isinstance(m, Integer): raise TypeError('m must be an integer, not %s' % m) @@ -1776,13 +1769,11 @@ def __init__(self, n): - ``n`` -- a positive integer in {9, 10, 11, 12, 21, 22, 23, 24}. - OUTPUT: + OUTPUT: the Mathieu group of degree `n`, as a permutation group - the Mathieu group of degree `n`, as a permutation group - - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.Mathieu()``. + This group is also available via ``groups.permutation.Mathieu()``. EXAMPLES:: @@ -1830,13 +1821,11 @@ def __init__(self, d, n): - ``n`` -- positive integer; the index of the group in the GAP database, starting at 1 - OUTPUT: - - the `n`-th transitive group of degree `d` + OUTPUT: the `n`-th transitive group of degree `d` - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.Transitive()``. + This group is also available via ``groups.permutation.Transitive()``. EXAMPLES:: @@ -2225,9 +2214,7 @@ class PrimitiveGroup(PermutationGroup_unique): - ``n`` -- positive integer. the index of the group in the GAP database, starting at 1 - OUTPUT: - - The ``n``-th primitive group of degree ``d``. + OUTPUT: Tthe ``n``-th primitive group of degree ``d`` EXAMPLES:: @@ -2302,10 +2289,6 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. - EXAMPLES:: sage: G = PrimitiveGroup(5,1); G @@ -2317,9 +2300,7 @@ def group_primitive_id(self): """ Return the index of this group in the GAP database of primitive groups. - OUTPUT: - - A positive integer, following GAP's conventions. + OUTPUT: a positive integer, following GAP's conventions EXAMPLES:: @@ -2417,9 +2398,7 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. + OUTPUT: a string TESTS:: @@ -2436,9 +2415,7 @@ def __contains__(self, G): - `G` -- anything. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -2494,9 +2471,7 @@ def _repr_(self): """ Return a string representation. - OUTPUT: - - String. + OUTPUT: a string TESTS:: @@ -2513,9 +2488,7 @@ def __contains__(self, G): - `G` -- anything. - OUTPUT: - - Boolean. + OUTPUT: boolean EXAMPLES:: @@ -2568,10 +2541,8 @@ def cardinality(self): r""" Return the cardinality of ``self``. - OUTPUT: - - An integer. The number of primitive groups of a given degree - up to isomorphism. + OUTPUT: an integer; the number of primitive groups of a given degree + up to isomorphism EXAMPLES:: @@ -2648,13 +2619,11 @@ def __init__(self, n, q, name='a'): - ``q`` -- prime power; the size of the ground field - ``name`` -- (default: ``'a'``) variable name of indeterminate of finite field `\GF(q)` - OUTPUT: - - PGL(`n`, `q`) + OUTPUT: PGL(`n`, `q`) - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.PGL()``. + This group is also available via ``groups.permutation.PGL()``. EXAMPLES:: @@ -2710,11 +2679,9 @@ def __init__(self, n, q, name='a'): - ``q`` -- either a prime power (the size of the ground field) or a finite field - ``name`` -- (default: ``'a'``) variable name of indeterminate of finite field `\GF(q)` - OUTPUT: + OUTPUT: the group PSL(`n`, `q`) - the group PSL(`n`, `q`) - - .. note:: + .. NOTE:: This group is also available via ``groups.permutation.PSL()``. @@ -2892,13 +2859,11 @@ def __init__(self, n, q, name='a'): - ``q`` -- prime power; the size of the ground field - ``name`` -- (default: ``'a'``) variable name of indeterminate of finite field `\GF(q)` - OUTPUT: + OUTPUT: PSp(`n`, `q`) - PSp(`n`, `q`) - - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.PSp()``. + This group is also available via ``groups.permutation.PSp()``. EXAMPLES:: @@ -2970,13 +2935,11 @@ def __init__(self, n, q, name='a'): - q -- prime power; the size of the ground field - name -- (default: 'a') variable name of indeterminate of finite field GF(q) - OUTPUT: - - PSU(n,q) + OUTPUT: PSU(n,q) - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.PSU()``. + This group is also available via ``groups.permutation.PSU()``. EXAMPLES:: @@ -3006,7 +2969,6 @@ def _repr_(self): sage: PSU(2,3) # needs sage.rings.finite_rings The projective special unitary group of degree 2 over Finite Field of size 3 - """ return "The projective special unitary group of degree %s over %s" % (self._n, self.base_ring()) @@ -3022,13 +2984,11 @@ def __init__(self, n, q, name='a'): - ``q`` -- prime power; the size of the ground field - ``name`` -- (default: ``'a'``) variable name of indeterminate of finite field `\GF(q)` - OUTPUT: - - PGU(`n`, `q`) + OUTPUT: PGU(`n`, `q`) - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.PGU()``. + This group is also available via ``groups.permutation.PGU()``. EXAMPLES:: @@ -3059,7 +3019,6 @@ def _repr_(self): sage: PGU(2,3) # needs sage.rings.finite_rings The projective general unitary group of degree 2 over Finite Field of size 3 - """ return "The projective general unitary group of degree %s over %s" % (self._n, self.base_ring()) @@ -3080,13 +3039,11 @@ def __init__(self, q, name='a'): - ``name`` -- (default: ``'a'``) variable name of indeterminate of finite field `\GF(q)` - OUTPUT: + OUTPUT: a Suzuki group - A Suzuki group. - - .. note:: + .. NOTE:: - This group is also available via ``groups.permutation.Suzuki()``. + This group is also available via ``groups.permutation.Suzuki()``. EXAMPLES:: @@ -3141,7 +3098,6 @@ def __str__(self): sage: G = SuzukiGroup(32, name='alpha') # needs sage.rings.finite_rings sage: print(G) # needs sage.rings.finite_rings The Suzuki group over Finite Field in alpha of size 2^5 - """ return "The Suzuki group over %s" % self.base_ring() diff --git a/src/sage/groups/perm_gps/symgp_conjugacy_class.py b/src/sage/groups/perm_gps/symgp_conjugacy_class.py index 23f5cdab15c..da051a72523 100644 --- a/src/sage/groups/perm_gps/symgp_conjugacy_class.py +++ b/src/sage/groups/perm_gps/symgp_conjugacy_class.py @@ -307,10 +307,8 @@ def conjugacy_class_iterator(part, S=None): - ``S`` -- (optional, default: `\{ 1, 2, \ldots, n \}`, where `n` is the size of ``part``) a set - OUTPUT: - - An iterator over the conjugacy class consisting of all - permutations of the set ``S`` whose cycle type is ``part``. + OUTPUT: an iterator over the conjugacy class consisting of all + permutations of the set ``S`` whose cycle type is ``part`` EXAMPLES:: diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx index baaefa1950e..c1fc37fda84 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx @@ -30,8 +30,6 @@ with and an elementwisely defined multiplication of vectors. (The indexing of vectors is `0`-based here, so `\psi = (\psi_0, \psi_1, \ldots, \psi_{n-1})`.) - - The parent is :class:`~sage.groups.semimonomial_transformations.semimonomial_transformation_group.SemimonomialTransformationGroup`. @@ -77,7 +75,7 @@ def _is_id(f, R): def _inverse(f, R): """ - Returns the inverse to the automorphism `f` of a ring `R`. + Return the inverse to the automorphism `f` of a ring `R`. EXAMPLES:: diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py b/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py index 602896e3ee8..50b5e5741d5 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py @@ -128,11 +128,9 @@ def __init__(self, R, len): - ``R`` -- a ring - - ``len`` -- the degree of the monomial group + - ``len`` -- the degree of the monomial group - OUTPUT: - - - the complete semimonomial group + OUTPUT: the complete semimonomial group EXAMPLES:: From 9fbaf6fae3933a1de422bdbe07e6d0e7ecb56736 Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Thu, 11 Apr 2024 21:32:16 +0300 Subject: [PATCH 127/183] More recommendations by mkoeppe --- src/sage/matroids/basis_exchange_matroid.pyx | 4 +- src/sage/matroids/basis_matroid.pyx | 4 +- .../matroids/circuit_closures_matroid.pyx | 2 +- src/sage/matroids/circuits_matroid.pyx | 4 +- src/sage/matroids/database_matroids.py | 83 +++++++++---------- src/sage/matroids/flats_matroid.pyx | 2 +- src/sage/matroids/graphic_matroid.py | 3 +- src/sage/matroids/linear_matroid.pyx | 14 ++-- src/sage/matroids/matroid.pyx | 4 +- 9 files changed, 55 insertions(+), 65 deletions(-) diff --git a/src/sage/matroids/basis_exchange_matroid.pyx b/src/sage/matroids/basis_exchange_matroid.pyx index 9db2f296679..30038d1d3c0 100644 --- a/src/sage/matroids/basis_exchange_matroid.pyx +++ b/src/sage/matroids/basis_exchange_matroid.pyx @@ -213,9 +213,9 @@ cdef class BasisExchangeMatroid(Matroid): cdef long i E = [] for i in range(self._groundset_size): - if self._E[i] in mapping: + try: E.append(mapping[self._E[i]]) - else: + except LookupError: E.append(self._E[i]) self._E = tuple(E) self._groundset = frozenset(E) diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index 72bb8368b4e..c079abe8c46 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -263,7 +263,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): sage: repr(M) # indirect doctest 'Matroid of rank 3 on 7 elements with 28 bases' """ - return Matroid._repr_(self) + " with " + str(self.bases_count()) + " bases" + return f'{Matroid._repr_(self)} with {self.bases_count()} bases' # support for parent BasisExchangeMatroid @@ -531,7 +531,7 @@ cdef class BasisMatroid(BasisExchangeMatroid): INPUT: - - ``mapping`` -- a python object such that `mapping[e]` is the new + - ``mapping`` -- a python object such that ``mapping[e]`` is the new label of ``e`` OUTPUT: a matroid diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index 709b40c4dd1..5e2dcbf9c38 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -609,7 +609,7 @@ cdef class CircuitClosuresMatroid(Matroid): E = [d[x] for x in self.groundset()] CC = {} for i in self.circuit_closures(): - CC[i] = [[d[y] for y in x] for x in list(self._circuit_closures[i])] + CC[i] = [[d[y] for y in x] for x in self._circuit_closures[i]] M = CircuitClosuresMatroid(groundset=E, circuit_closures=CC) return M diff --git a/src/sage/matroids/circuits_matroid.pyx b/src/sage/matroids/circuits_matroid.pyx index 7b46b8ff102..3478154867b 100644 --- a/src/sage/matroids/circuits_matroid.pyx +++ b/src/sage/matroids/circuits_matroid.pyx @@ -269,9 +269,9 @@ cdef class CircuitsMatroid(Matroid): NonDesargues: Matroid of rank 3 on 10 elements with 9 nonspanning circuits """ if self._nsc_defined: - return Matroid._repr_(self) + " with " + str(len(self.nonspanning_circuits())) + " nonspanning circuits" + return f'{Matroid._repr_(self)} with {len(self.nonspanning_circuits())} nonspanning circuits' else: - return Matroid._repr_(self) + " with " + str(len(self._C)) + " circuits" + return f'{Matroid._repr_(self)} with {len(self._C)} circuits' # comparison diff --git a/src/sage/matroids/database_matroids.py b/src/sage/matroids/database_matroids.py index 3ab8e0c7816..188fdaab1db 100644 --- a/src/sage/matroids/database_matroids.py +++ b/src/sage/matroids/database_matroids.py @@ -1362,7 +1362,7 @@ def R9(groundset=None): R9: Matroid of rank 3 on 9 elements with 15 nonspanning circuits sage: M.is_valid() True - sage: len(list(M.nonspanning_circuits())) + sage: len(M.nonspanning_circuits()) 15 sage: M.is_simple() and M.is_ternary() True @@ -1834,7 +1834,7 @@ def Wheel(r, field=None, ring=None, groundset=None): M = RegularMatroid(A) else: M = Matroid(A) - M = _rename_and_relabel(M, "Wheel(" + str(r) + ")", groundset) + M = _rename_and_relabel(M, f'Wheel({r})', groundset) return M @@ -1903,7 +1903,7 @@ def Whirl(r, groundset=None): else: A[i, 2 * r - 1] = 1 M = TernaryMatroid(A) - M = _rename_and_relabel(M, "Whirl(" + str(r) + ")", groundset) + M = _rename_and_relabel(M, f'Whirl({r})', groundset) return M @@ -1955,7 +1955,7 @@ def Uniform(r, n, groundset=None): else: CC = {} M = Matroid(groundset=E, circuit_closures=CC) - M = _rename_and_relabel(M, "U(" + str(r) + ", " + str(n) + ")", groundset) + M = _rename_and_relabel(M, f'U({r}, {n})', groundset) return M @@ -1998,7 +1998,7 @@ def PG(n, q, x=None, groundset=None): P = ProjectiveSpace(n, F) A = Matrix(F, [list(p) for p in list(P)]).transpose() M = Matroid(A) - M = _rename_and_relabel(M, "PG(" + str(n) + ", " + str(q) + ")", groundset) + M = _rename_and_relabel(M, f'PG({n}, {q})', groundset) return M @@ -2045,7 +2045,7 @@ def AG(n, q, x=None, groundset=None): F, [list(p) for p in list(P) if not list(p)[0] == 0] ).transpose() M = Matroid(A) - M = _rename_and_relabel(M, "AG(" + str(n) + ", " + str(q) + ")", groundset) + M = _rename_and_relabel(M, f'AG({n}, {q})', groundset) return M @@ -2129,15 +2129,15 @@ def Z(r, t=True, groundset=None): A = Id.augment(J-Id).augment(tip) M = Matroid(A) - X = ['x'+str(i) for i in range(1, r+1)] - Y = ['y'+str(i) for i in range(1, r+1)] + X = [f'x{i}' for i in range(1, r + 1)] + Y = [f'y{i}' for i in range(1, r + 1)] if t: - M = M.relabel(X+Y+['t']) - M.rename("Z_" + str(r) + ": " + repr(M)) + M = M.relabel(X + Y + ['t']) + M.rename(f'Z_{r}: ' + repr(M)) else: - M = M.delete(2*r) - M = M.relabel(X+Y) - M.rename("Z_" + str(r) + "\\t: " + repr(M)) + M = M.delete(2 * r) + M = M.relabel(X + Y) + M.rename(f'Z_{r}\\t: ' + repr(M)) M = _rename_and_relabel(M, groundset=groundset) return M @@ -2176,7 +2176,7 @@ def Spike(r, t=True, C3=[], groundset=None): nonspanning circuits sage: M.is_isomorphic(matroids.Uniform(3, 6)) True - sage: len(list(matroids.Spike(8).bases())) + sage: len(matroids.Spike(8).bases()) 4864 sage: import random sage: r = random.choice(range(3, 20)) @@ -2228,16 +2228,16 @@ def Spike(r, t=True, C3=[], groundset=None): E = ['t'] X, Y = [], [] for i in range(1, r + 1): - X.append('x' + str(i)) - Y.append('y' + str(i)) + X.append(f'x{i}') + Y.append(f'y{i}') E += X E += Y if C3 == [] and r > 3: # free spike (can be defined fast through circuit closures) - lines = [['t', 'x'+str(i), 'y'+str(i)] for i in range(1, r+1)] - planes = [['t', 'x'+str(i), 'y'+str(i), 'x'+str(j), 'y'+str(j)] - for i in range(1, r+1) for j in range(i+1, r+1)] + lines = [['t', f'x{i}', f'y{i}'] for i in range(1, r + 1)] + planes = [['t', f'x{i}', f'y{i}', f'x{j}', f'y{j}'] + for i in range(1, r + 1) for j in range(i + 1, r + 1)] CC = {2: lines, 3: planes, r: [E]} M = Matroid(circuit_closures=CC) else: @@ -2256,17 +2256,17 @@ def Spike(r, t=True, C3=[], groundset=None): NSC = [] # nonspanning_circuits NSC += C3 - for i in range(1, r+1): - NSC += [['t', 'x'+str(i), 'y'+str(i)]] - for j in range(i+1, r+1): - NSC += [['x'+str(i), 'y'+str(i), 'x'+str(j), 'y'+str(j)]] + for i in range(1, r + 1): + NSC += [['t', f'x{i}', f'y{i}']] + for j in range(i + 1, r + 1): + NSC += [[f'x{i}', f'y{i}', f'x{j}', f'y{j}']] M = Matroid(rank=r, nonspanning_circuits=NSC) free = "Free " if C3 == [] else "" tip = "" if t else "\\t" M = M if t else M.delete('t') - M = _rename_and_relabel(M, free + str(r) + "-spike" + tip, groundset) + M = _rename_and_relabel(M, f'{free}{r}-spike{tip}', groundset) return M @@ -2325,26 +2325,25 @@ def Theta(n, groundset=None): [Oxl2011]_, p. 663-4. """ - X = ['x'+str(i) for i in range(n)] - Y = ['y'+str(i) for i in range(n)] - E = X + Y + X = [f'x{i}' for i in range(n)] + Y = [f'y{i}' for i in range(n)] import itertools C = [] C += list(itertools.combinations(X, 3)) for i in range(n): Yi = [Y[j] for j in range(len(Y)) if j != i] - C += [Yi + ['x'+str(i)]] + C += [Yi + [f'x{i}']] for u in range(n): for s in range(n): - for t in range(s+1, n): + for t in range(s + 1, n): if u != s and u != t and s != t: Yu = [Y[i] for i in range(len(Y)) if i != u] - C += [Yu + ['x'+str(s)] + ['x'+str(t)]] + C += [Yu + [f'x{s}'] + [f'x{t}']] M = Matroid(circuits=C) - M = _rename_and_relabel(M, "Theta_" + str(n), groundset) + M = _rename_and_relabel(M, f'Theta_{n}', groundset) return M @@ -2395,8 +2394,8 @@ def Psi(r, groundset=None): [Oxl2011]_, p. 664. """ - A = ['a'+str(i) for i in range(0, r)] - B = ['b'+str(i) for i in range(0, r)] + A = [f'a{i}' for i in range(0, r)] + B = [f'b{i}' for i in range(0, r)] E = A + B def generate_binary_strings(bit_count): @@ -2414,20 +2413,20 @@ def genbin(n, bs=""): NSC = [] # nonspanning circuits for i in range(0, r): - for k in range(1, r-2): - I0 = ['a'+str(i), 'b'+str(i)] - IK = ['a'+str((i+k) % r), 'b'+str((i+k) % r)] - for AB in generate_binary_strings(k-1): + for k in range(1, r - 2): + I0 = [f'a{i}', f'b{i}'] + IK = [f'a{(i+k) % r}', f'b{(i+k) % r}'] + for AB in generate_binary_strings(k - 1): C = [] C += I0 + IK j = 1 for z in AB: - C += [z+str((i+j) % r)] + C += [f'{z}{(i+j) % r}'] j += 1 NSC += [C] M = Matroid(groundset=E, rank=r, nonspanning_circuits=NSC) - M = _rename_and_relabel(M, "Psi_" + str(r), groundset) + M = _rename_and_relabel(M, f'Psi_{r}', groundset) return M @@ -5209,7 +5208,7 @@ def CompleteGraphic(n, groundset=None): groundset=list(range((n * (n - 1)) // 2)), graph=graphs.CompleteGraph(n) ) - M = _rename_and_relabel(M, "M(K" + str(n) + ")", groundset) + M = _rename_and_relabel(M, f'M(K{n})', groundset) return M @@ -5229,9 +5228,7 @@ def _rename_and_relabel(M, name=None, groundset=None): - ``name`` -- a string (optional) - ``groundset`` -- a string (optional) - OUTPUT: - - a matroid + OUTPUT: a matroid """ if groundset is not None: if len(groundset) != len(M.groundset()): diff --git a/src/sage/matroids/flats_matroid.pyx b/src/sage/matroids/flats_matroid.pyx index 8e701c56198..74f64621dd1 100644 --- a/src/sage/matroids/flats_matroid.pyx +++ b/src/sage/matroids/flats_matroid.pyx @@ -205,7 +205,7 @@ cdef class FlatsMatroid(Matroid): Matroid of rank 6 on 6 elements with 64 flats """ flats_num = sum(1 for i in self._F for F in self._F[i]) - return Matroid._repr_(self) + " with " + str(flats_num) + " flats" + return f'{Matroid._repr_(self)} with {flats_num} flats' # comparison diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 21be785969a..53f30e7ed88 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -306,8 +306,7 @@ def _repr_(self): """ self._mrank = str(self._rank(self._groundset)) self._elts = str(len(self._groundset)) - - return "Graphic matroid of rank " + self._mrank + " on " + self._elts + " elements" + return f'Graphic matroid of rank {self._mrank} on {self._elts} elements' # Comparison: diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index b2fd28c99ea..f996aceca57 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -466,8 +466,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): 'Linear matroid of rank 2 on 5 elements represented over the Finite Field of size 5' """ - S = "Linear matroid of rank " + str(self.rank()) + " on " + str(self.size()) + " elements represented over the " + repr(self.base_ring()) - return S + return f'Linear matroid of rank {self.rank()} on {self.size()} elements represented over the {repr(self.base_ring())}' # representations @@ -3247,8 +3246,7 @@ cdef class BinaryMatroid(LinearMatroid): sage: repr(M) # indirect doctest 'Binary matroid of rank 3 on 7 elements, type (3, 0)' """ - S = "Binary matroid of rank " + str(self.rank()) + " on " + str(self.size()) + " elements, type (" + str(self.bicycle_dimension()) + ', ' + str(self.brown_invariant()) + ')' - return S + return f'Binary matroid of rank {self.rank()} on {self.size()} elements, type ({self.bicycle_dimension()}, {self.brown_invariant()})' cpdef _current_rows_cols(self, B=None): """ @@ -4351,7 +4349,7 @@ cdef class TernaryMatroid(LinearMatroid): sage: repr(M) # indirect doctest 'Ternary matroid of rank 3 on 7 elements, type 0-' """ - S = "Ternary matroid of rank " + str(self.rank()) + " on " + str(self.size()) + " elements, type " + str(self.bicycle_dimension()) + S = f'Ternary matroid of rank {self.rank()} on {self.size()} elements, type {self.bicycle_dimension()}' if self.character() == 1: S = S + '+' else: @@ -5278,8 +5276,7 @@ cdef class QuaternaryMatroid(LinearMatroid): sage: repr(M) # indirect doctest # needs sage.rings.finite_rings 'Quaternary matroid of rank 2 on 3 elements' """ - S = "Quaternary matroid of rank " + str(self.rank()) + " on " + str(self.size()) + " elements" - return S + return f'Quaternary matroid of rank {self.rank()} on {self.size()} elements' cpdef _current_rows_cols(self, B=None): """ @@ -6023,8 +6020,7 @@ cdef class RegularMatroid(LinearMatroid): sage: repr(M) # indirect doctest 'Regular matroid of rank 5 on 10 elements with 162 bases' """ - S = "Regular matroid of rank " + str(self.rank()) + " on " + str(self.size()) + " elements with " + str(self.bases_count()) + " bases" - return S + return f'Regular matroid of rank {self.rank()} on {self.size()} elements with {self.bases_count()} bases' cpdef bases_count(self): """ diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 36d7c7f7352..eec3a331fe6 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -1197,9 +1197,7 @@ cdef class Matroid(SageObject): sage: sage.matroids.matroid.Matroid._repr_(M) 'Matroid of rank 4 on 8 elements' """ - S = "Matroid of rank " - S = S + str(self.rank()) + " on " + str(self.size()) + " elements" - return S + return f'Matroid of rank {self.rank()} on {self.size()} elements' # cpdef show(self): # Show either the graph, or the matrix with labels, or the lattice, From acfc96250eab0edd7e9c50d688042d27ee011762 Mon Sep 17 00:00:00 2001 From: gmou3 <32706872+gmou3@users.noreply.github.com> Date: Thu, 11 Apr 2024 22:45:31 +0300 Subject: [PATCH 128/183] Update src/sage/matroids/linear_matroid.pyx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Köppe --- src/sage/matroids/linear_matroid.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index f996aceca57..142c461e297 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -466,7 +466,7 @@ cdef class LinearMatroid(BasisExchangeMatroid): 'Linear matroid of rank 2 on 5 elements represented over the Finite Field of size 5' """ - return f'Linear matroid of rank {self.rank()} on {self.size()} elements represented over the {repr(self.base_ring())}' + return f'Linear matroid of rank {self.rank()} on {self.size()} elements represented over the {self.base_ring()!r}' # representations From ad196d956f9bbb67c4746ad2cbab0aa5cb0c5ed6 Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Fri, 12 Apr 2024 02:30:44 +0300 Subject: [PATCH 129/183] More docstring improvements in groups --- src/sage/groups/abelian_gps/abelian_group.py | 101 +++++++++--------- .../abelian_gps/abelian_group_element.py | 8 +- .../groups/abelian_gps/abelian_group_gap.py | 18 ++-- src/sage/groups/abelian_gps/all.py | 7 +- .../groups/abelian_gps/dual_abelian_group.py | 10 +- src/sage/groups/abelian_gps/element_base.py | 8 +- src/sage/groups/abelian_gps/values.py | 44 ++++---- .../additive_abelian_group.py | 20 ++-- .../additive_abelian_wrapper.py | 10 +- src/sage/groups/additive_abelian/qmodnz.py | 2 +- .../groups/additive_abelian/qmodnz_element.py | 4 +- src/sage/groups/affine_gps/affine_group.py | 10 +- src/sage/groups/affine_gps/euclidean_group.py | 4 +- src/sage/groups/affine_gps/group_element.py | 18 ++-- src/sage/groups/artin.py | 10 +- src/sage/groups/braid.py | 22 ++-- src/sage/groups/cactus_group.py | 2 +- src/sage/groups/class_function.py | 64 ++++------- src/sage/groups/cubic_braid.py | 35 +++--- src/sage/groups/finitely_presented.py | 42 ++++---- src/sage/groups/finitely_presented_named.py | 18 ++-- src/sage/groups/fqf_orthogonal.py | 2 +- src/sage/groups/free_group.py | 44 ++++---- src/sage/groups/galois_group.py | 28 ++--- src/sage/groups/galois_group_perm.py | 10 +- src/sage/groups/generic.py | 40 +++---- src/sage/groups/group.pyx | 6 +- src/sage/groups/group_exp.py | 4 +- src/sage/groups/group_semidirect_product.py | 3 +- src/sage/groups/indexed_free_group.py | 5 +- src/sage/groups/libgap_mixin.py | 12 +-- src/sage/groups/libgap_morphism.py | 5 +- src/sage/groups/libgap_wrapper.pyx | 18 ++-- .../groups/matrix_gps/finitely_generated.py | 12 +-- .../matrix_gps/finitely_generated_gap.py | 8 +- src/sage/groups/matrix_gps/group_element.pyx | 6 +- .../groups/matrix_gps/group_element_gap.pyx | 4 +- src/sage/groups/matrix_gps/isometries.py | 17 +-- src/sage/groups/matrix_gps/linear.py | 8 +- src/sage/groups/matrix_gps/matrix_group.py | 21 ++-- .../groups/matrix_gps/matrix_group_gap.py | 22 ++-- src/sage/groups/matrix_gps/named_group.py | 4 +- src/sage/groups/matrix_gps/named_group_gap.py | 18 ++-- src/sage/groups/matrix_gps/orthogonal.py | 8 +- src/sage/groups/matrix_gps/unitary.py | 2 +- src/sage/groups/misc_gps/argument_groups.py | 10 +- src/sage/groups/old.pyx | 5 +- src/sage/groups/pari_group.py | 4 +- .../perm_gps/partn_ref/data_structures.pyx | 39 +++---- .../perm_gps/partn_ref/refinement_binary.pyx | 62 +++++------ .../perm_gps/partn_ref/refinement_graphs.pyx | 28 ++--- .../partn_ref/refinement_matrices.pyx | 11 +- .../perm_gps/partn_ref/refinement_python.pyx | 43 ++++---- .../perm_gps/partn_ref/refinement_sets.pyx | 28 ++--- .../partn_ref2/refinement_generic.pyx | 8 +- src/sage/groups/perm_gps/permgroup.py | 2 +- src/sage/groups/perm_gps/permgroup_named.py | 24 ++--- .../semimonomial_transformation.pyx | 12 +-- 58 files changed, 520 insertions(+), 520 deletions(-) diff --git a/src/sage/groups/abelian_gps/abelian_group.py b/src/sage/groups/abelian_gps/abelian_group.py index a3db5c46179..b0752d92908 100644 --- a/src/sage/groups/abelian_gps/abelian_group.py +++ b/src/sage/groups/abelian_gps/abelian_group.py @@ -40,21 +40,21 @@ invariant factors of the group. You should now use :meth:`~AbelianGroup_class.gens_orders` instead:: - sage: J = AbelianGroup([2,0,3,2,4]); J - Multiplicative Abelian group isomorphic to C2 x Z x C3 x C2 x C4 - sage: J.gens_orders() # use this instead - (2, 0, 3, 2, 4) - sage: J.invariants() # deprecated - (2, 0, 3, 2, 4) - sage: J.elementary_divisors() # these are the "invariant factors" - (2, 2, 12, 0) - sage: for i in range(J.ngens()): - ....: print((i, J.gen(i), J.gen(i).order())) # or use this form - (0, f0, 2) - (1, f1, +Infinity) - (2, f2, 3) - (3, f3, 2) - (4, f4, 4) + sage: J = AbelianGroup([2,0,3,2,4]); J + Multiplicative Abelian group isomorphic to C2 x Z x C3 x C2 x C4 + sage: J.gens_orders() # use this instead + (2, 0, 3, 2, 4) + sage: J.invariants() # deprecated + (2, 0, 3, 2, 4) + sage: J.elementary_divisors() # these are the "invariant factors" + (2, 2, 12, 0) + sage: for i in range(J.ngens()): + ....: print((i, J.gen(i), J.gen(i).order())) # or use this form + (0, f0, 2) + (1, f1, +Infinity) + (2, f2, 3) + (3, f3, 2) + (4, f4, 4) Background on invariant factors and the Smith normal form (according to section 4.1 of [Cohen1]_): An abelian group is a @@ -160,7 +160,7 @@ .. [Rotman] \J. Rotman, An introduction to the theory of groups, 4th ed, Springer, 1995. -.. warning:: +.. WARNING:: Many basic properties for infinite abelian groups are not implemented. @@ -221,15 +221,17 @@ from sage.structure.unique_representation import UniqueRepresentation -# TODO: this uses perm groups - the AbelianGroupElement instance method -# uses a different implementation. +# .. TODO:: + +# this uses perm groups - the AbelianGroupElement instance method +# uses a different implementation. def word_problem(words, g, verbose=False): r""" - G and H are abelian, g in G, H is a subgroup of G generated by a - list (words) of elements of G. If g is in H, return the expression - for g as a word in the elements of (words). + `G` and `H` are abelian, `g` in `G`, `H` is a subgroup of `G` generated by + a list (words) of elements of `G`. If `g` is in `H`, return the expression + for `g` as a word in the elements of (words). - The 'word problem' for a finite abelian group G boils down to the + The 'word problem' for a finite abelian group `G` boils down to the following matrix-vector analog of the Chinese remainder theorem. Problem: Fix integers `1 tuple: """ Return the generators for this subgroup. - OUTPUT: a tuple of group elements generating the subgroup + OUTPUT: tuple of group elements generating the subgroup EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/abelian_group_element.py b/src/sage/groups/abelian_gps/abelian_group_element.py index 501872aaedd..3dc764dd7d0 100644 --- a/src/sage/groups/abelian_gps/abelian_group_element.py +++ b/src/sage/groups/abelian_gps/abelian_group_element.py @@ -49,8 +49,8 @@ def is_AbelianGroupElement(x): """ - Return true if x is an abelian group element, i.e., an element of - type AbelianGroupElement. + Return ``True`` if x is an abelian group element, i.e., an element of + type ``AbelianGroupElement``. EXAMPLES: Though the integer 3 is in the integers, and the integers have an abelian group structure, 3 is not an AbelianGroupElement:: @@ -92,8 +92,8 @@ class AbelianGroupElement(AbelianGroupElementBase): """ def as_permutation(self): r""" - Return the element of the permutation group G (isomorphic to the - abelian group A) associated to a in A. + Return the element of the permutation group ``G`` (isomorphic to the + abelian group ``A``) associated to ``a`` in ``A``. EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/abelian_group_gap.py b/src/sage/groups/abelian_gps/abelian_group_gap.py index 41316f3b433..45a6a8bdd1a 100644 --- a/src/sage/groups/abelian_gps/abelian_group_gap.py +++ b/src/sage/groups/abelian_gps/abelian_group_gap.py @@ -92,7 +92,7 @@ def __reduce__(self): r""" Implement pickling. - OUTPUT: a tuple ``f`` such that this element is ``f[0](*f[1])`` + OUTPUT: tuple ``f`` such that this element is ``f[0](*f[1])`` EXAMPLES:: @@ -110,7 +110,7 @@ def exponents(self): r""" Return the tuple of exponents of this element. - OUTPUT: a tuple of integers + OUTPUT: tuple of integers EXAMPLES:: @@ -168,7 +168,7 @@ def order(self): r""" Return the order of this element. - OUTPUT: an integer or infinity + OUTPUT: integer or infinity EXAMPLES:: @@ -198,7 +198,7 @@ def exponents(self): r""" Return the tuple of exponents of ``self``. - OUTPUT: a tuple of integers + OUTPUT: tuple of integers EXAMPLES:: @@ -283,7 +283,7 @@ def _coerce_map_from_(self, S): def _element_constructor_(self, x, check=True): r""" - Defines coercions and conversions. + Define coercions and conversions. INPUT: @@ -482,7 +482,7 @@ def gens_orders(self): Use :meth:`elementary_divisors` if you are looking for an invariant of the group. - OUTPUT: a tuple of integers + OUTPUT: tuple of integers EXAMPLES:: @@ -715,7 +715,7 @@ def _repr_(self): def __reduce__(self): r""" - Implements pickling. + Implement pickling. We have to work around the fact that gap does not provide pickling. @@ -804,7 +804,7 @@ def _repr_(self): def __reduce__(self): r""" - Implements pickling. + Implement pickling. We have to work around the fact that gap does not provide pickling. @@ -935,7 +935,7 @@ def _repr_(self): def __reduce__(self): r""" - Implements pickling. + Implement pickling. We have to work around the fact that gap does not provide pickling. diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index 2bb91f85f3b..fa418e36c0c 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -20,10 +20,11 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -#from dual_abelian_group import DualAbelianGroup +# from dual_abelian_group import DualAbelianGroup from .abelian_group import AbelianGroup, word_problem from .values import AbelianGroupWithValues -# TODO: -# Implement group homset, conversion of generator images to morphism +# .. TODO:: + +# Implement group homset, conversion of generator images to morphism from .abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/abelian_gps/dual_abelian_group.py b/src/sage/groups/abelian_gps/dual_abelian_group.py index 7b1bbaee40d..86966cf74d6 100644 --- a/src/sage/groups/abelian_gps/dual_abelian_group.py +++ b/src/sage/groups/abelian_gps/dual_abelian_group.py @@ -117,7 +117,7 @@ class DualAbelianGroup_class(UniqueRepresentation, AbelianGroupBase): def __init__(self, G, names, base_ring): """ - The Python constructor + The Python constructor. EXAMPLES:: @@ -271,7 +271,7 @@ def gens(self) -> tuple: """ Return the generators for the group. - OUTPUT: a tuple of group elements generating the group + OUTPUT: tuple of group elements generating the group EXAMPLES:: @@ -299,7 +299,7 @@ def gens_orders(self): """ The orders of the generators of the dual group. - OUTPUT: a tuple of integers + OUTPUT: tuple of integers EXAMPLES:: @@ -328,7 +328,7 @@ def invariants(self): def __contains__(self, X): """ - Implements "in". + Implement "in". EXAMPLES:: @@ -373,7 +373,7 @@ def is_commutative(self): @cached_method def list(self): """ - Return tuple of all elements of this group. + Return a tuple of all elements of this group. EXAMPLES:: diff --git a/src/sage/groups/abelian_gps/element_base.py b/src/sage/groups/abelian_gps/element_base.py index 43d77c29494..7712049e219 100644 --- a/src/sage/groups/abelian_gps/element_base.py +++ b/src/sage/groups/abelian_gps/element_base.py @@ -214,7 +214,7 @@ def order(self): """ Return the order of this element. - OUTPUT: an integer or ``infinity`` + OUTPUT: integer or ``infinity`` EXAMPLES:: @@ -248,7 +248,7 @@ def order(self): def _div_(left, right): """ - Divide ``left`` and ``right`` + Divide ``left`` and ``right``. TESTS:: @@ -266,7 +266,7 @@ def _div_(left, right): def _mul_(left, right): """ - Multiply ``left`` and ``right`` + Multiply ``left`` and ``right``. TESTS:: @@ -284,7 +284,7 @@ def _mul_(left, right): def __pow__(self, n): """ - Exponentiate ``self`` + Exponentiate ``self``. TESTS:: diff --git a/src/sage/groups/abelian_gps/values.py b/src/sage/groups/abelian_gps/values.py index eda0858b1f8..c38edcfb9f9 100644 --- a/src/sage/groups/abelian_gps/values.py +++ b/src/sage/groups/abelian_gps/values.py @@ -16,7 +16,7 @@ number field. The :func:`AbelianGroupWithValues` keeps track of these associated values. -.. warning:: +.. WARNING:: Really, this requires a group homomorphism from the abstract Abelian group to the set of values. This is only checked if you @@ -85,10 +85,10 @@ def AbelianGroupWithValues(values, n, gens_orders=None, names='f', check=False, INPUT: - ``values`` -- a list/tuple/iterable of values that you want to - associate to the generators. + associate to the generators - ``n`` -- integer (optional). If not specified, will be derived - from ``gens_orders``. + from ``gens_orders`` - ``gens_orders`` -- a list of non-negative integers in the form `[a_0, a_1, \dots, a_{n-1}]`, typically written in increasing @@ -156,7 +156,7 @@ class AbelianGroupWithValuesEmbedding(Morphism): - ``domain`` -- a :class:`AbelianGroupWithValues_class` - ``codomain`` -- the values group (need not be in the category of - groups, e.g. symbolic ring). + groups, e.g. symbolic ring) EXAMPLES:: @@ -176,7 +176,7 @@ class AbelianGroupWithValuesEmbedding(Morphism): def __init__(self, domain, codomain): """ - Construct the morphism + Construct the morphism. TESTS:: @@ -218,13 +218,13 @@ class AbelianGroupWithValuesElement(AbelianGroupElement): INPUT: - - ``exponents`` -- tuple of integers. The exponent vector defining - the group element. + - ``exponents`` -- tuple of integers; the exponent vector defining + the group element - - ``parent`` -- the parent. + - ``parent`` -- the parent - ``value`` -- the value assigned to the group element or ``None`` - (default). In the latter case, the value is computed as needed. + (default); in the latter case, the value is computed as needed EXAMPLES:: @@ -235,7 +235,7 @@ class AbelianGroupWithValuesElement(AbelianGroupElement): def __init__(self, parent, exponents, value=None): """ - Create an element + Create an element. EXAMPLES:: @@ -269,7 +269,7 @@ def value(self): def _div_(left, right): """ - Divide ``left`` by ``right`` + Divide ``left`` by ``right``. TESTS:: @@ -287,7 +287,7 @@ def _div_(left, right): def _mul_(left, right): """ - Multiply ``left`` and ``right`` + Multiply ``left`` and ``right``. TESTS:: @@ -305,11 +305,11 @@ def _mul_(left, right): def __pow__(self, n): """ - Exponentiate ``self`` + Exponentiate ``self``. INPUT: - - ``n`` -- integer. The exponent. + - ``n`` -- integer; the exponent TESTS:: @@ -357,15 +357,15 @@ class AbelianGroupWithValues_class(AbelianGroup_class): INPUT: - - ``generator_orders`` -- tuple of integers. The orders of the + - ``generator_orders`` -- tuple of integers; the orders of the generators. - - ``names`` -- string or list of strings. The names for the generators. + - ``names`` -- string or list of strings; the names for the generators - - ``values`` -- Tuple the same length as the number of - generators. The values assigned to the generators. + - ``values`` -- tuple the same length as the number of + generators; the values assigned to the generators. - - ``values_group`` -- the common parent of the values. + - ``values_group`` -- the common parent of the values EXAMPLES:: @@ -376,7 +376,7 @@ class AbelianGroupWithValues_class(AbelianGroup_class): def __init__(self, generator_orders, names, values, values_group): """ - The Python constructor + The Python constructor. TESTS:: @@ -406,7 +406,7 @@ def gen(self, i=0): INPUT: - - ``i`` -- integer (default: 0). The index of the generator. + - ``i`` -- integer (default: 0); the index of the generator OUTPUT: a group element @@ -434,7 +434,7 @@ def gens_values(self): """ Return the values associated to the generators. - OUTPUT: a tuple + OUTPUT: tuple EXAMPLES:: diff --git a/src/sage/groups/additive_abelian/additive_abelian_group.py b/src/sage/groups/additive_abelian/additive_abelian_group.py index 394ef807944..bbf91165437 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_group.py +++ b/src/sage/groups/additive_abelian/additive_abelian_group.py @@ -18,12 +18,12 @@ def AdditiveAbelianGroup(invs, remember_generators=True): INPUT: - - ``invs`` (list of integers): the invariants. + - ``invs`` -- list of integers; the invariants. These should all be greater than or equal to zero. - - ``remember_generators`` (boolean): whether or not to fix a set of - generators (corresponding to the given invariants, which need not be in - Smith form). + - ``remember_generators`` -- boolean (default: ``True``); whether or not + to fix a set of generators (corresponding to the given invariants, which + need not be in Smith form). OUTPUT: the abelian group `\bigoplus_i \ZZ / n_i \ZZ`, where `n_i` are the invariants @@ -206,9 +206,9 @@ class AdditiveAbelianGroup_class(FGP_Module_class): INPUT: - - ``cover`` -- the covering group as `\ZZ`-module. + - ``cover`` -- the covering group as `\ZZ`-module - - ``relations`` -- the relations as submodule of ``cover``. + - ``relations`` -- the relations as submodule of ``cover`` """ # The element class must be overridden in derived classes @@ -295,11 +295,11 @@ def _module_constructor(self, cover, relations, check=True): INPUT: - - ``cover`` -- the covering group as `\ZZ`-module. + - ``cover`` -- the covering group as `\ZZ`-module - - ``relations`` -- the relations as submodule of ``cover``. + - ``relations`` -- the relations as submodule of ``cover`` - - ``check`` -- ignored, present for compatibility with ``fg_pid`` code. + - ``check`` -- ignored, present for compatibility with ``fg_pid`` code EXAMPLES:: @@ -325,7 +325,7 @@ def _module_constructor(self, cover, relations, check=True): def order(self): r""" - Return the order of this group (an integer or infinity) + Return the order of this group (integer or infinity). EXAMPLES:: diff --git a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py index c12a67725b6..966b3137cdb 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py +++ b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py @@ -2,7 +2,7 @@ Wrapper class for abelian groups This class is intended as a template for anything in Sage that needs the -functionality of abelian groups. One can create an AdditiveAbelianGroupWrapper +functionality of abelian groups. One can create an ``AdditiveAbelianGroupWrapper`` object from any given set of elements in some given parent, as long as an ``_add_`` method has been defined. @@ -41,10 +41,10 @@ .. TODO:: - - Think about subgroups and quotients, which probably won't work - in the current implementation -- some fiddly adjustments will be - needed in order to be able to pass extra arguments to the - subquotient's init method. + Think about subgroups and quotients, which probably won't work + in the current implementation -- some fiddly adjustments will be + needed in order to be able to pass extra arguments to the + subquotient's init method. AUTHORS: diff --git a/src/sage/groups/additive_abelian/qmodnz.py b/src/sage/groups/additive_abelian/qmodnz.py index 34e9a0e9132..8ae0dd35728 100644 --- a/src/sage/groups/additive_abelian/qmodnz.py +++ b/src/sage/groups/additive_abelian/qmodnz.py @@ -51,7 +51,7 @@ class QmodnZ(Parent, UniqueRepresentation): #. ``QQ/(n*ZZ)``, where - - `n` -- an integer (including 0 or negative integers). + - `n` -- integer (including 0 or negative integers). OUTPUT: the abelian group `\Q/n\Z` diff --git a/src/sage/groups/additive_abelian/qmodnz_element.py b/src/sage/groups/additive_abelian/qmodnz_element.py index 73557159161..b3ebe8e2335 100644 --- a/src/sage/groups/additive_abelian/qmodnz_element.py +++ b/src/sage/groups/additive_abelian/qmodnz_element.py @@ -34,9 +34,9 @@ class QmodnZ_Element(AdditiveGroupElement): INPUT: - - ``q`` -- a rational number. + - ``q`` -- a rational number - - ``parent`` -- the parent abelian group `\Q/n\Z`. + - ``parent`` -- the parent abelian group `\Q/n\Z` OUTPUT: the element `q` of abelian group `\Q/n\Z`, in standard form diff --git a/src/sage/groups/affine_gps/affine_group.py b/src/sage/groups/affine_gps/affine_group.py index 38fa05058e0..f0e4b3d27f4 100644 --- a/src/sage/groups/affine_gps/affine_group.py +++ b/src/sage/groups/affine_gps/affine_group.py @@ -186,11 +186,11 @@ def __init__(self, degree, ring): INPUT: - - ``degree`` -- integer. The degree of the affine group, that + - ``degree`` -- integer; The degree of the affine group, that is, the dimension of the affine space the group is acting on - naturally. + naturally - - ``ring`` -- a ring. The base ring of the affine space. + - ``ring`` -- a ring; the base ring of the affine space EXAMPLES:: @@ -308,7 +308,7 @@ def degree(self): """ Return the dimension of the affine space. - OUTPUT: an integer + OUTPUT: integer EXAMPLES:: @@ -435,7 +435,7 @@ def reflection(self, v): INPUT: - - ``v`` -- a vector, or something that determines a vector. + - ``v`` -- a vector, or something that determines a vector OUTPUT: diff --git a/src/sage/groups/affine_gps/euclidean_group.py b/src/sage/groups/affine_gps/euclidean_group.py index 3154eee7a01..000210ddeab 100644 --- a/src/sage/groups/affine_gps/euclidean_group.py +++ b/src/sage/groups/affine_gps/euclidean_group.py @@ -164,9 +164,9 @@ def _element_constructor_check(self, A, b): INPUT: - - ``A`` -- an element of :meth:`matrix_space`. + - ``A`` -- an element of :meth:`matrix_space` - - ``b`` -- an element of :meth:`vector_space`. + - ``b`` -- an element of :meth:`vector_space` OUTPUT: diff --git a/src/sage/groups/affine_gps/group_element.py b/src/sage/groups/affine_gps/group_element.py index 703137784e4..c4ffa997e94 100644 --- a/src/sage/groups/affine_gps/group_element.py +++ b/src/sage/groups/affine_gps/group_element.py @@ -53,20 +53,20 @@ class AffineGroupElement(MultiplicativeGroupElement): INPUT: - ``A`` -- an invertible matrix, or something defining a - matrix if ``convert==True``. + matrix if ``convert==True`` - ``b``-- a vector, or something defining a vector if ``convert==True`` (default: ``0``, defining the zero - vector). + vector) - - ``parent`` -- the parent affine group. + - ``parent`` -- the parent affine group - - ``convert`` - bool (default: ``True``). Whether to convert + - ``convert`` - bool (default: ``True``); whether to convert ``A`` into the correct matrix space and ``b`` into the - correct vector space. + correct vector space - - ``check`` - bool (default: ``True``). Whether to do some - checks or just accept the input as valid. + - ``check`` - bool (default: ``True``); whether to do some + checks or just accept the input as valid As a special case, ``A`` can be a matrix obtained from :meth:`matrix`, that is, one row and one column larger. In @@ -326,7 +326,7 @@ def _mul_(self, other): INPUT: - - ``other`` -- another element of the same affine group. + - ``other`` -- another element of the same affine group OUTPUT: the product of the affine group elements ``self`` and ``other`` defined by the composition of the two affine transformations @@ -354,7 +354,7 @@ def __call__(self, v): INPUT: - ``v`` -- a polynomial, a multivariate polynomial, a polyhedron, a - vector, or anything that can be converted into a vector. + vector, or anything that can be converted into a vector OUTPUT: the image of ``v`` under the affine group element diff --git a/src/sage/groups/artin.py b/src/sage/groups/artin.py index a198bccef69..306569e546b 100644 --- a/src/sage/groups/artin.py +++ b/src/sage/groups/artin.py @@ -77,7 +77,7 @@ def exponent_sum(self): """ Return the exponent sum of ``self``. - OUTPUT: an integer + OUTPUT: integer EXAMPLES:: @@ -258,7 +258,7 @@ def _left_normal_form_coxeter(self): Return the left normal form of the element, in the `\Delta` exponent and Coxeter group element form. - OUTPUT: a tuple whose first element is the power of `\Delta`, and the + OUTPUT: tuple whose first element is the power of `\Delta`, and the rest are the Coxeter elements corresponding to the simple factors EXAMPLES:: @@ -596,7 +596,7 @@ def index_set(self): """ Return the index set of ``self``. - OUTPUT: a tuple + OUTPUT: tuple EXAMPLES:: @@ -654,7 +654,7 @@ def _standard_lift_Tietze(self, w): INPUT: - - ``w`` -- an element of the Coxeter group of ``self``. + - ``w`` -- an element of the Coxeter group of ``self`` EXAMPLES:: @@ -672,7 +672,7 @@ def _standard_lift(self, w): INPUT: - - ``w`` -- an element of the Coxeter group of ``self``. + - ``w`` -- an element of the Coxeter group of ``self`` EXAMPLES:: diff --git a/src/sage/groups/braid.py b/src/sage/groups/braid.py index 71550739296..7721d3d602f 100644 --- a/src/sage/groups/braid.py +++ b/src/sage/groups/braid.py @@ -1523,7 +1523,7 @@ def _left_normal_form_coxeter(self): r""" Return the left normal form of the braid, in permutation form. - OUTPUT: a tuple whose first element is the power of `\Delta`, and the + OUTPUT: tuple whose first element is the power of `\Delta`, and the rest are the permutations corresponding to the simple factors EXAMPLES:: @@ -1626,7 +1626,7 @@ def centralizer(self): def super_summit_set(self): """ - Return a list with the super summit set of the braid + Return a list with the super summit set of the braid. EXAMPLES:: @@ -1864,7 +1864,7 @@ def pure_conjugating_braid(self, other): def ultra_summit_set(self): """ - Return a list with the orbits of the ultra summit set of ``self`` + Return a list with the orbits of the ultra summit set of ``self``. EXAMPLES:: @@ -2411,7 +2411,7 @@ def eps(self, N): INPUT: - - ``N`` -- an integer; the number of colors + - ``N`` -- integer; the number of colors EXAMPLES:: @@ -2637,7 +2637,7 @@ def strands(self): """ Return the number of strands. - OUTPUT: an integer + OUTPUT: integer EXAMPLES:: @@ -2837,10 +2837,10 @@ def _LKB_matrix_(self, braid, variab): INPUT: - - ``braid`` -- tuple of integers. The Tietze list of the - braid. + - ``braid`` -- tuple of integers; the Tietze list of the + braid - - ``variab`` -- string. the names of the variables that will + - ``variab`` -- string. The names of the variables that will appear in the matrix. They must be given as a string, separated by a comma @@ -3452,7 +3452,7 @@ def epimorphisms(self, H): def BraidGroup(n=None, names='s'): """ - Construct a Braid Group + Construct a Braid Group. INPUT: @@ -3596,9 +3596,9 @@ def _act_(self, b, x): INPUT: - - ``b`` -- a braid. + - ``b`` -- a braid - - ``x`` -- a free group element. + - ``x`` -- a free group element OUTPUT: a new braid diff --git a/src/sage/groups/cactus_group.py b/src/sage/groups/cactus_group.py index a4a6fe629b0..c8d6ba7241f 100644 --- a/src/sage/groups/cactus_group.py +++ b/src/sage/groups/cactus_group.py @@ -43,7 +43,7 @@ class CactusGroup(UniqueRepresentation, Group): INPUT: - - ``n`` -- an integer + - ``n`` -- integer EXAMPLES: diff --git a/src/sage/groups/class_function.py b/src/sage/groups/class_function.py index 0af4d5ce646..c7978b4283e 100644 --- a/src/sage/groups/class_function.py +++ b/src/sage/groups/class_function.py @@ -50,10 +50,10 @@ def ClassFunction(group, values): INPUT: - - ``group`` -- a group. + - ``group`` -- a group - - ``values`` -- list/tuple/iterable of numbers. The values of the - class function on the conjugacy classes, in that order. + - ``values`` -- list/tuple/iterable of numbers; the values of the + class function on the conjugacy classes, in that order EXAMPLES:: @@ -168,10 +168,6 @@ def __repr__(self): r""" Return a string representation. - OUTPUT: - - A string. - EXAMPLES:: sage: G = SymmetricGroup(4) @@ -326,7 +322,7 @@ def __sub__(self, other): INPUT: - ``other`` -- a :class:`ClassFunction` of the same group as - ``self``. + ``self`` OUTPUT: a :class:`ClassFunction` @@ -353,9 +349,9 @@ def __mul__(self, other): INPUT: - ``other`` -- either a number or a :class:`ClassFunction` of - the same group as ``self``. A number can be anything that + the same group as ``self``; A number can be anything that can be converted into GAP: integers, rational, and elements - of certain number fields. + of certain number fields OUTPUT: a :class:`ClassFunction` @@ -468,12 +464,9 @@ def symmetric_power(self, n): INPUT: - - ``n`` -- a positive integer. + - ``n`` -- positive integer - OUTPUT: - - The ``n``-th symmetrized power of ``self`` as a - :class:`ClassFunction`. + OUTPUT: the ``n``-th symmetrized power of ``self`` as a :class:`ClassFunction` EXAMPLES:: @@ -495,10 +488,9 @@ def exterior_power(self, n): INPUT: - - ``n`` -- a positive integer. + - ``n`` -- positive integer. - OUTPUT: the ``n``-th antisymmetrized power of ``self`` as a - :class:`ClassFunction` + OUTPUT: the ``n``-th antisymmetrized power of ``self`` as a :class:`ClassFunction` EXAMPLES:: @@ -690,11 +682,9 @@ def restrict(self, H): INPUT: - - ``H`` -- a subgroup of the underlying group of ``self``. + - ``H`` -- a subgroup of the underlying group of ``self`` - OUTPUT: - - A :class:`ClassFunction` of ``H`` defined by restriction. + OUTPUT: a :class:`ClassFunction` of ``H`` defined by restriction EXAMPLES:: @@ -717,7 +707,7 @@ def induct(self, G): INPUT: - - ``G`` -- A supergroup of the underlying group of ``self``. + - ``G`` -- a supergroup of the underlying group of ``self`` OUTPUT: @@ -851,10 +841,6 @@ def _repr_(self): r""" Return a string representation. - OUTPUT: - - A string. - EXAMPLES:: sage: G = SymmetricGroup(4) @@ -941,9 +927,7 @@ def domain(self): r""" Return the domain of ``self``. - OUTPUT: - - The underlying group of the class function. + OUTPUT: the underlying group of the class function EXAMPLES:: @@ -990,8 +974,7 @@ def __add__(self, other): INPUT: - - ``other`` -- a :class:`ClassFunction` of the same group as - ``self``. + - ``other`` -- a :class:`ClassFunction` of the same group as ``self`` OUTPUT: a :class:`ClassFunction` @@ -1015,8 +998,7 @@ def __sub__(self, other): INPUT: - - ``other`` -- a :class:`ClassFunction` of the same group as - ``self``. + - ``other`` -- a :class:`ClassFunction` of the same group as ``self`` OUTPUT: a :class:`ClassFunction` @@ -1158,10 +1140,9 @@ def symmetric_power(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer - OUTPUT: the ``n``-th symmetrized power of ``self`` as a - :class:`ClassFunction` + OUTPUT: the ``n``-th symmetrized power of ``self`` as a :class:`ClassFunction` EXAMPLES:: @@ -1182,10 +1163,9 @@ def exterior_power(self, n): INPUT: - - ``n`` -- a positive integer + - ``n`` -- positive integer - OUTPUT: the ``n``-th antisymmetrized power of ``self`` as a - :class:`ClassFunction` + OUTPUT: the ``n``-th antisymmetrized power of ``self`` as a :class:`ClassFunction` EXAMPLES:: @@ -1381,7 +1361,7 @@ def restrict(self, H): INPUT: - - ``H`` -- a subgroup of the underlying group of ``self``. + - ``H`` -- a subgroup of the underlying group of ``self`` OUTPUT: a :class:`ClassFunction` of ``H`` defined by restriction @@ -1411,7 +1391,7 @@ def induct(self, G): INPUT: - - ``G`` -- A supergroup of the underlying group of ``self``. + - ``G`` -- a supergroup of the underlying group of ``self`` OUTPUT: diff --git a/src/sage/groups/cubic_braid.py b/src/sage/groups/cubic_braid.py index 17e543687a4..6f357c91b58 100644 --- a/src/sage/groups/cubic_braid.py +++ b/src/sage/groups/cubic_braid.py @@ -579,7 +579,7 @@ class CubicBraidGroup(FinitelyPresentedGroup): INPUT: - - ``names`` -- see the corresponding documentation of :class:`BraidGroup_class`. + - ``names`` -- see the corresponding documentation of :class:`BraidGroup_class` - ``cbg_type`` -- (default: ``CubicBraidGroup.type.Coxeter``; see explanation below) enum type :class:`CubicBraidGroup.type` @@ -1072,18 +1072,17 @@ def set_classical_realization(self, base_group, proj_group, centralizing_matrix, This is a local function of :meth:`_create_classical_realization`. - It handles the common part of symplectic and unitary version and creates conversion maps. + It handles the common part of symplectic and unitary version and + creates conversion maps. INPUT: - - ``base_group`` -- The symplectic or unitary groups Sp(m,3) resp. GU(m,2). - - ``proj_group`` -- The corresponding projective group of base_group. - - ``centralizing_matrix`` -- The centralizing matrix according to Assion. - - ``transvec_matrices`` -- List of transvection matrices according to Assion. + - ``base_group`` -- the symplectic or unitary groups Sp(m,3) resp. GU(m,2) + - ``proj_group`` -- the corresponding projective group of base_group + - ``centralizing_matrix`` -- the centralizing matrix according to Assion + - ``transvec_matrices`` -- list of transvection matrices according to Assion - OUTPUT: - - No output, but the function sets the attributes of ``self`` described above. + OUTPUT: no output, but the function sets the attributes of ``self`` described above """ centralizing_element = None @@ -1151,10 +1150,12 @@ def create_sympl_realization(self, m): INPUT: - - ``m`` -- Integer, the dimension of the classical groups vector-space of operation. + - ``m`` -- integer; the dimension of the classical groups + vector-space of operation - The function calculates the centralizing matrix and the transvections as given by Assion - and then uses set_classical_realization to complete the construction. + The function calculates the centralizing matrix and the + transvections as given by Assion and then uses + ``set_classical_realization`` to complete the construction. """ # ----------------------------------------------------------- # getting the invariant bilinear form of the group @@ -1222,10 +1223,12 @@ def create_unitary_realization(self, m): INPUT: - - ``m`` -- Integer, the dimension of the classical groups vector-space of operation. + - ``m`` -- integer; the dimension of the classical groups + vector-space of operation - The function calculates the centralizing_matrix and the transvections as given by Assion - and then uses set_classical_realization to complete the construction. + The function calculates the centralizing_matrix and the + transvections as given by Assion and then uses + ``set_classical_realization`` to complete the construction. """ # --------------------------------------------------------------------- # getting the invariant bilinear form of the group @@ -1459,7 +1462,7 @@ def braid_group(self): @cached_method def as_matrix_group(self, root_bur=None, domain=None, characteristic=None, var='t', reduced=False): r""" - Creates an epimorphic image of ``self`` as a matrix group by use of + Create an epimorphic image of ``self`` as a matrix group by use of the burau representation. INPUT: diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index adb166093cd..69bc261a17c 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -296,7 +296,7 @@ def Tietze(self): the letter corresponding to the `i`-th generator of the group. Negative integers represent the inverses of generators. - OUTPUT: a tuple of integers + OUTPUT: tuple of integers EXAMPLES:: @@ -320,11 +320,11 @@ def __call__(self, *values, **kwds): INPUT: - ``*values`` -- a list/tuple/iterable of the same length as - the number of generators. + the number of generators - - ``check=True`` -- boolean keyword (default: - ``True``). Whether to verify that ``values`` satisfy the - relations in the finitely presented group. + - ``check=True`` -- boolean keyword (default: ``True``); whether to + verify that ``values`` satisfy the relations in the finitely + presented group OUTPUT: the product of ``values`` in the order and with exponents specified by ``self`` @@ -553,7 +553,7 @@ def finitely_presented_group(self): def reduce(self, element): """ - Applies the rules in the rewriting system to the element, to obtain + Apply the rules in the rewriting system to the element, to obtain a reduced form. If the rewriting system is confluent, this reduced form is unique @@ -683,7 +683,7 @@ def is_confluent(self): def make_confluent(self): """ - Applies Knuth-Bendix algorithm to try to transform the rewriting + Apply the Knuth-Bendix algorithm to try to transform the rewriting system into a confluent one. Note that this method does not return any object, just changes the @@ -818,9 +818,9 @@ def _repr_(self): def _latex_(self): """ - Return a LaTeX representation + Return a LaTeX representation. - OUTPUT: a string; a valid LaTeX math command sequence + OUTPUT: string; a valid LaTeX math command sequence TESTS:: @@ -887,8 +887,8 @@ def cardinality(self, limit=4096000): INPUT: - - ``limit`` -- integer (default: 4096000). The maximal number - of cosets before the computation is aborted. + - ``limit`` -- integer (default: 4096000); the maximal number + of cosets before the computation is aborted OUTPUT: integer or ``Infinity``; the number of elements in the group @@ -937,8 +937,8 @@ def as_permutation_group(self, limit=4096000): INPUT: - - ``limit`` -- integer (default: 4096000). The maximal number - of cosets before the computation is aborted. + - ``limit`` -- integer (default: 4096000); the maximal number + of cosets before the computation is aborted OUTPUT: @@ -1536,7 +1536,7 @@ def epimorphisms(self, H): INPUT: - - `H` -- Another group + - `H` -- another group EXAMPLES:: @@ -1654,8 +1654,9 @@ def abelian_alexander_matrix(self, ring=QQ, simplified=True): OUTPUT: - ``A`` -- a matrix with coefficients in ``R`` - - ``ideal`` -- an list of generators of an ideal ``I`` of ``R = A.base_ring()`` such that ``R/I`` is - the group algebra of the abelianization of ``self`` + - ``ideal`` -- an list of generators of an ideal ``I`` of + ``R = A.base_ring()`` such that ``R/I`` is the group algebra of the + abelianization of ``self`` EXAMPLES:: @@ -1720,10 +1721,11 @@ def characteristic_varieties(self, ring=QQ, matrix_ideal=None, groebner=False): r""" Return the characteristic varieties of the group ``self``. - There are several definitions of the characteristic varieties of a group `G`, see e.g. [CS1999a]_. Let `\Lambda` be the - group algebra of `G/G'` and `\mathbb{T}` its associated algebraic variety (a torus). Each - element `\xi\in\mathbb{T}` defines a local system of coefficients and the `k` th-characteristic - variety is + There are several definitions of the characteristic varieties of a + group `G`, see e.g. [CS1999a]_. Let `\Lambda` be the group algebra of + `G/G'` and `\mathbb{T}` its associated algebraic variety (a torus). + Each element `\xi\in\mathbb{T}` defines a local system of coefficients + and the `k` th-characteristic variety is .. MATH:: diff --git a/src/sage/groups/finitely_presented_named.py b/src/sage/groups/finitely_presented_named.py index 256ad33404f..8b07c5af7df 100644 --- a/src/sage/groups/finitely_presented_named.py +++ b/src/sage/groups/finitely_presented_named.py @@ -77,7 +77,7 @@ def CyclicPresentation(n): INPUT: - - ``n`` -- The order of the cyclic presentation to be returned. + - ``n`` -- the order of the cyclic presentation to be returned OUTPUT: the cyclic group of order `n` as finite presentation @@ -110,9 +110,9 @@ def FinitelyGeneratedAbelianPresentation(int_list): INPUT: - - ``int_list`` -- List of integers defining the group to be returned, the defining list + - ``int_list`` -- list of integers defining the group to be returned, the defining list is reduced to the invariants of the input list before generating the corresponding - group. + group OUTPUT: @@ -298,7 +298,7 @@ def DihedralPresentation(n): INPUT: - - ``n`` -- The size of the set that `D_n` is acting on. + - ``n`` -- the size of the set that `D_n` is acting on OUTPUT: Dihedral group of order `2n` @@ -335,7 +335,7 @@ def DiCyclicPresentation(n): INPUT: - ``n`` -- positive integer, 2 or greater, determining the order of - the group (`4n`). + the group (`4n`) OUTPUT: the dicyclic group of order `4n` is defined by the presentation @@ -384,8 +384,8 @@ def SymmetricPresentation(n): INPUT: - - ``n`` -- The size of the underlying set of arbitrary symbols being acted - on by the Symmetric group of order `n!`. + - ``n`` -- the size of the underlying set of arbitrary symbols being acted + on by the Symmetric group of order `n!` OUTPUT: @@ -461,8 +461,8 @@ def AlternatingPresentation(n): INPUT: - - ``n`` -- The size of the underlying set of arbitrary symbols being acted - on by the Alternating group of order `n!/2`. + - ``n`` -- the size of the underlying set of arbitrary symbols being acted + on by the Alternating group of order `n!/2` OUTPUT: diff --git a/src/sage/groups/fqf_orthogonal.py b/src/sage/groups/fqf_orthogonal.py index f810e8dccb3..47dac17281b 100644 --- a/src/sage/groups/fqf_orthogonal.py +++ b/src/sage/groups/fqf_orthogonal.py @@ -124,7 +124,7 @@ class FqfOrthogonalGroup(AbelianGroupAutomorphismGroup_subgroup): INPUT: - - ``T`` -- a non degenerate torsion quadratic module. + - ``T`` -- a non degenerate torsion quadratic module EXAMPLES:: diff --git a/src/sage/groups/free_group.py b/src/sage/groups/free_group.py index 1da411b3036..09eb12d6a1c 100644 --- a/src/sage/groups/free_group.py +++ b/src/sage/groups/free_group.py @@ -80,7 +80,7 @@ def is_FreeGroup(x): INPUT: - - ``x`` -- anything. + - ``x`` -- anything OUTPUT: boolean @@ -107,9 +107,9 @@ def _lexi_gen(zeroes=False): INPUT: - - ``zeroes`` -- Boolean defaulting as ``False``. If ``True``, the + - ``zeroes`` -- boolean (default: ``False``); if ``True``, the integers appended to the output string begin at zero at the - first iteration through the alphabet. + first iteration through the alphabet OUTPUT: @@ -162,11 +162,11 @@ class FreeGroupElement(ElementLibGAP): INPUT: - - ``x`` -- something that determines the group element. Either a + - ``x`` -- something that determines the group element; either a :class:`~sage.libs.gap.element.GapElement` or the Tietze list - (see :meth:`Tietze`) of the group element. + (see :meth:`Tietze`) of the group element - - ``parent`` -- the parent :class:`FreeGroup`. + - ``parent`` -- the parent :class:`FreeGroup` EXAMPLES:: @@ -241,7 +241,7 @@ def __hash__(self): def _latex_(self): r""" - Return a LaTeX representation + Return a LaTeX representation. OUTPUT: a string; a valid LaTeX math command sequence @@ -301,7 +301,7 @@ def Tietze(self): the letter corresponding to the `i`-th generator of the group. Negative integers represent the inverses of generators. - OUTPUT: a tuple of integers + OUTPUT: tuple of integers EXAMPLES:: @@ -519,7 +519,7 @@ def __call__(self, *values): - ``*values`` -- a sequence of values, or a list/tuple/iterable of the same length as the number of - generators of the free group. + generators of the free group OUTPUT: the product of ``values`` in the order and with exponents specified by ``self`` @@ -597,11 +597,11 @@ def FreeGroup(n=None, names='x', index_set=None, abelian=False, **kwds): INPUT: - - ``n`` -- integer or ``None`` (default). The number of - generators. If not specified the ``names`` are counted. + - ``n`` -- integer (default: ``None``); the number of + generators (if not specified the ``names`` are counted) - ``names`` -- string or list/tuple/iterable of strings (default: - ``'x'``). The generator names or name prefix. + ``'x'``); the generator names or name prefix - ``index_set`` -- (optional) an index set for the generators; if specified then the optional keyword ``abelian`` can be used @@ -690,7 +690,7 @@ def wrap_FreeGroup(libgap_free_group): INPUT: - - ``libgap_free_group`` -- a LibGAP free group. + - ``libgap_free_group`` -- a LibGAP free group OUTPUT: a Sage :class:`FreeGroup_class` @@ -743,12 +743,12 @@ def __init__(self, generator_names, libgap_free_group=None): INPUT: - - ``generator_names`` -- a tuple of strings. The names of the - generators. + - ``generator_names`` -- a tuple of strings; the names of the + generators - - ``libgap_free_group`` -- a LibGAP free group or ``None`` - (default). The LibGAP free group to wrap. If ``None``, a - suitable group will be constructed. + - ``libgap_free_group`` -- a LibGAP free group (default: ``None``); + the LibGAP free group to wrap (if ``None``, a suitable group will be + constructed) TESTS:: @@ -786,7 +786,7 @@ def rank(self): Alias for :meth:`ngens`. - OUTPUT: an integer + OUTPUT: integer EXAMPLES:: @@ -907,10 +907,10 @@ def quotient(self, relations, **kwds): INPUT: - - ``relations`` -- A list/tuple/iterable with the elements of - the free group. + - ``relations`` -- a list/tuple/iterable with the elements of + the free group - further named arguments, that are passed to the constructor - of a finitely presented group. + of a finitely presented group OUTPUT: diff --git a/src/sage/groups/galois_group.py b/src/sage/groups/galois_group.py index a7439d18ab3..b3460f32be8 100644 --- a/src/sage/groups/galois_group.py +++ b/src/sage/groups/galois_group.py @@ -25,9 +25,11 @@ def _alg_key(self, algorithm=None, recompute=False): r""" Return a key for use in cached_method calls. - If recompute is false, will cache using ``None`` as the key, so no recomputation will be done. + If recompute is false, will cache using ``None`` as the key, so no + recomputation will be done. - If recompute is true, will cache by algorithm, yielding a recomputation for each different algorithm. + If recompute is true, will cache by algorithm, yielding a recomputation + for each different algorithm. EXAMPLES:: @@ -45,10 +47,11 @@ def _alg_key(self, algorithm=None, recompute=False): class _GMixin: r""" - This class provides some methods for Galois groups to be used for both permutation groups - and abelian groups, subgroups and full Galois groups. + This class provides some methods for Galois groups to be used for both + permutation groups and abelian groups, subgroups and full Galois groups. - It is just intended to provide common functionality between various different Galois group classes. + It is just intended to provide common functionality between various + different Galois group classes. """ @lazy_attribute def _default_algorithm(self): @@ -90,7 +93,7 @@ def _gcdata(self): def _get_algorithm(self, algorithm): r""" - Allows overriding the default algorithm specified at object creation. + Allow overriding the default algorithm specified at object creation. EXAMPLES:: @@ -177,7 +180,7 @@ def _field(self): def _repr_(self): """ - String representation of this Galois group + String representation of this Galois group. EXAMPLES:: @@ -309,13 +312,14 @@ def fixed_field(self, name=None, polred=None, threshold=None): INPUT: - - ``name`` -- a variable name for the new field. + - ``name`` -- a variable name for the new field - ``polred`` -- whether to optimize the generator of the newly created field - for a simpler polynomial, using pari's polredbest. - Defaults to ``True`` when the degree of the fixed field is at most 8. + for a simpler polynomial, using pari's polredbest; + defaults to ``True`` when the degree of the fixed field is at most 8 - - ``threshold`` -- positive number; polred only performed if the cost is at most this threshold + - ``threshold`` -- positive number; polred only performed if the cost + is at most this threshold EXAMPLES:: @@ -377,7 +381,7 @@ def is_galois(self): @lazy_attribute def _gcdata(self): r""" - Return the Galois closure (ie, the finite field itself) together with the identity + Return the Galois closure (ie, the finite field itself) together with the identity. EXAMPLES:: diff --git a/src/sage/groups/galois_group_perm.py b/src/sage/groups/galois_group_perm.py index 7a640bcfe29..3b81e0d5908 100644 --- a/src/sage/groups/galois_group_perm.py +++ b/src/sage/groups/galois_group_perm.py @@ -17,11 +17,13 @@ class GaloisGroup_perm(_GaloisMixin, PermutationGroup_generic): - ``field`` -- a field, separable over its base - - ``names`` -- a string or tuple of length 1, giving a variable name for the splitting field + - ``names`` -- a string or tuple of length 1, giving a variable name for + the splitting field - - ``gc_numbering`` -- boolean, whether to express permutations in terms of the - roots of the defining polynomial of the splitting field (versus the defining polynomial - of the original extension). The default value may vary based on the type of field. + - ``gc_numbering`` -- boolean, whether to express permutations in terms of + the roots of the defining polynomial of the splitting field (versus the + defining polynomial of the original extension); the default value may + vary based on the type of field """ @abstract_method def transitive_number(self, algorithm=None, recompute=False): diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index 5a540088d2c..86aebc74709 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -534,7 +534,7 @@ def discrete_log_rho(a, base, ord=None, operation='*', identity=None, inverse=No - ``hash_function`` -- having an efficient hash function is critical for this algorithm (see examples) - OUTPUT: an integer `n` such that `a = base^n` (or `a = n*base`) + OUTPUT: integer `n` such that `a = base^n` (or `a = n*base`) ALGORITHM: Pollard rho for discrete logarithm, adapted from the article of Edlyn Teske, 'A space efficient algorithm for group @@ -600,7 +600,6 @@ def discrete_log_rho(a, base, ord=None, operation='*', identity=None, inverse=No AUTHOR: - Yann Laigle-Chapuy (2009-09-05) - """ from sage.rings.integer import Integer from sage.rings.finite_rings.integer_mod_ring import IntegerModRing @@ -701,7 +700,8 @@ def discrete_log(a, base, ord=None, bounds=None, operation='*', identity=None, i - ``identity`` -- the group's identity - ``inverse()`` - function of 1 argument ``x``, returning inverse of ``x`` - ``op()`` - function of 2 arguments ``x``, ``y``, returning ``x*y`` in the group - - ``algorithm`` -- string denoting what algorithm to use for prime-order logarithms: ``'bsgs'``, ``'rho'``, ``'lambda'`` + - ``algorithm`` -- string denoting what algorithm to use for prime-order + logarithms: ``'bsgs'``, ``'rho'``, ``'lambda'`` ``a`` and ``base`` must be elements of some group with identity given by ``identity``, inverse of ``x`` by ``inverse(x)``, and group @@ -719,7 +719,7 @@ def discrete_log(a, base, ord=None, bounds=None, operation='*', identity=None, i If no such `n` exists, this function raises a :class:`ValueError` exception. - .. warning:: + .. WARNING:: If ``x`` has a ``log`` method, it is likely to be vastly faster than using this function. E.g., if ``x`` is an integer modulo @@ -993,7 +993,7 @@ def discrete_log_lambda(a, base, bounds, operation='*', identity=None, inverse=N - op() -- function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group - hash_function -- having an efficient hash function is critical for this algorithm - OUTPUT: an integer `n` such that `a=base^n` (or `a=n*base`) + OUTPUT: integer `n` such that `a=base^n` (or `a=n*base`) ALGORITHM: Pollard Lambda, if bounds are (lb,ub) it has time complexity O(sqrt(ub-lb)) and space complexity O(log(ub-lb)) @@ -1200,19 +1200,19 @@ def order_from_multiple(P, m, plist=None, factorization=None, check=True, INPUT: - - ``P`` -- a Sage object which is a group element; + - ``P`` -- a Sage object which is a group element - ``m`` -- a Sage integer which is a multiple of the order of ``P``, - i.e. we require that ``m*P=0`` (or ``P**m=1``); + i.e. we require that ``m*P=0`` (or ``P**m=1``) - ``check`` -- a Boolean (default: ``True``), indicating whether we check if ``m`` - really is a multiple of the order; + really is a multiple of the order - ``factorization`` -- the factorization of ``m``, or ``None`` in which - case this function will need to factor ``m``; + case this function will need to factor ``m`` - ``plist`` -- a list of the prime factors of ``m``, or ``None``. Kept for compatibility only, - prefer the use of ``factorization``; - - ``operation`` -- string: ``'+'`` (default), ``'*'`` or ``None``; - - ``identity`` -- the identity element of the group; - - ``inverse()`` -- function of 1 argument ``x``, returning inverse of ``x``; - - ``op()`` - function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group. + prefer the use of ``factorization`` + - ``operation`` -- string: ``'+'`` (default), ``'*'`` or ``None`` + - ``identity`` -- the identity element of the group + - ``inverse()`` -- function of 1 argument ``x``, returning inverse of ``x`` + - ``op()`` - function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group .. NOTE:: @@ -1298,7 +1298,7 @@ def _multiple(A, B): # we use an internal recursive function to avoid unnecessary computations. def _order_from_multiple_helper(Q, L, S): """ - internal use, to minimize the number of group operations. + For internal use, to minimize the number of group operations. """ l = len(L) if l == 1: @@ -1349,10 +1349,10 @@ def order_from_bounds(P, bounds, d=None, operation='+', - ``P`` -- a Sage object which is a group element - ``bounds`` -- a 2-tuple ``(lb,ub)`` such that ``m*P=0`` (or - ``P**m=1``) for some ``m`` with ``lb<=m<=ub``. + ``P**m=1``) for some ``m`` with ``lb<=m<=ub`` - ``d`` -- (optional) a positive integer; only ``m`` which are - multiples of this will be considered. + multiples of this will be considered - ``operation`` -- string: ``'+'`` (default ) or ``'*'`` or other. If other, the following must be supplied: @@ -1626,10 +1626,10 @@ def structure_description(G, latex=False): INPUT: - - ``latex`` -- a boolean (default: ``False``). If ``True``, return a - LaTeX formatted string. + - ``latex`` -- a boolean (default: ``False``); if ``True``, return a + LaTeX formatted string - OUTPUT: a string + OUTPUT: string .. WARNING:: diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index 2f1a6cc1846..32fe6d13941 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -27,7 +27,7 @@ def is_Group(x): INPUT: - - ``x`` -- anything. + - ``x`` -- anything OUTPUT: boolean @@ -48,7 +48,7 @@ def is_Group(x): cdef class Group(Parent): """ - Base class for all groups + Base class for all groups. TESTS:: @@ -76,7 +76,7 @@ cdef class Group(Parent): """ def __init__(self, base=None, category=None): """ - The Python constructor + The Python constructor. TESTS:: diff --git a/src/sage/groups/group_exp.py b/src/sage/groups/group_exp.py index 58d9ba4b512..ccf6d62f147 100644 --- a/src/sage/groups/group_exp.py +++ b/src/sage/groups/group_exp.py @@ -140,7 +140,7 @@ def _apply_functor_to_morphism(self, f): INPUT: - - A homomorphism `f` of commutative additive groups. + - A homomorphism `f` of commutative additive groups OUTPUT: the above homomorphism, but between the corresponding multiplicative groups @@ -180,7 +180,7 @@ class GroupExpElement(ElementWrapper, MultiplicativeGroupElement): - ``self`` -- the exponentiated group element being created - ``parent`` -- the exponential group (parent of ``self``) - - ``x`` -- the commutative additive group element being wrapped to form ``self``. + - ``x`` -- the commutative additive group element being wrapped to form ``self`` EXAMPLES:: diff --git a/src/sage/groups/group_semidirect_product.py b/src/sage/groups/group_semidirect_product.py index 0c8ba8a96aa..7adc1868f8d 100644 --- a/src/sage/groups/group_semidirect_product.py +++ b/src/sage/groups/group_semidirect_product.py @@ -136,7 +136,8 @@ def to_opposite(self): class GroupSemidirectProduct(CartesianProduct): r""" - Return the semidirect product of the groups ``G`` and ``H`` using the homomorphism ``twist``. + Return the semidirect product of the groups ``G`` and ``H`` using the + homomorphism ``twist``. INPUT: diff --git a/src/sage/groups/indexed_free_group.py b/src/sage/groups/indexed_free_group.py index 79be1df663d..02a4838d77c 100644 --- a/src/sage/groups/indexed_free_group.py +++ b/src/sage/groups/indexed_free_group.py @@ -24,7 +24,8 @@ from sage.categories.poor_man_map import PoorManMap from sage.groups.group import Group, AbelianGroup from sage.monoids.indexed_free_monoid import (IndexedMonoid, - IndexedFreeMonoidElement, IndexedFreeAbelianMonoidElement) + IndexedFreeMonoidElement, + IndexedFreeAbelianMonoidElement) from sage.misc.cachefunc import cached_method import sage.data_structures.blas_dict as blas from sage.rings.integer import Integer @@ -165,7 +166,7 @@ def __init__(self, indices, prefix, category=None, **kwds): def _repr_(self): """ - Return a string representation of ``self`` + Return a string representation of ``self``. TESTS:: diff --git a/src/sage/groups/libgap_mixin.py b/src/sage/groups/libgap_mixin.py index aeb100f2ca2..931d22ccdc5 100644 --- a/src/sage/groups/libgap_mixin.py +++ b/src/sage/groups/libgap_mixin.py @@ -196,7 +196,7 @@ def is_finite(self): def cardinality(self): """ - Implements :meth:`EnumeratedSets.ParentMethods.cardinality`. + Implement :meth:`EnumeratedSets.ParentMethods.cardinality`. EXAMPLES:: @@ -329,8 +329,8 @@ def class_function(self, values): INPUT: - - ``values`` -- list/tuple/iterable of numbers. The values of the - class function on the conjugacy classes, in that order. + - ``values`` -- list/tuple/iterable of numbers; the values of the + class function on the conjugacy classes, in that order EXAMPLES:: @@ -647,7 +647,7 @@ def irreducible_characters(self): """ Return the irreducible characters of the group. - OUTPUT: a tuple containing all irreducible characters + OUTPUT: tuple containing all irreducible characters EXAMPLES:: @@ -853,7 +853,7 @@ def list(self): """ List all elements of this group. - OUTPUT: a tuple containing all group elements in a random but fixed + OUTPUT: tuple containing all group elements in a random but fixed order EXAMPLES:: @@ -926,7 +926,7 @@ def is_isomorphic(self, H): INPUT: - - ``H`` -- a group. + - ``H`` -- a group OUTPUT: boolean diff --git a/src/sage/groups/libgap_morphism.py b/src/sage/groups/libgap_morphism.py index 5b780ceb922..ec48dda3776 100644 --- a/src/sage/groups/libgap_morphism.py +++ b/src/sage/groups/libgap_morphism.py @@ -46,7 +46,8 @@ class GroupMorphism_libgap(Morphism): INPUT: - ``homset`` -- the parent - - ``gap_hom`` -- a :class:`sage.libs.gap.element.GapElement` consisting of a group homomorphism + - ``gap_hom`` -- a :class:`sage.libs.gap.element.GapElement` consisting of + a group homomorphism - ``check`` -- (default: ``True``) check if the ``gap_hom`` is a group homomorphism; this can be expensive @@ -283,7 +284,7 @@ def __init__(self, homset, gap_hom, check=True): def __reduce__(self): r""" - Implements pickling. + Implement pickling. We have to work around the fact that GAP does not provide pickling. diff --git a/src/sage/groups/libgap_wrapper.pyx b/src/sage/groups/libgap_wrapper.pyx index 0834a304c66..abaf17f11d9 100644 --- a/src/sage/groups/libgap_wrapper.pyx +++ b/src/sage/groups/libgap_wrapper.pyx @@ -86,11 +86,11 @@ class ParentLibGAP(SageObject): INPUT: - ``libgap_parent`` -- the libgap element that is the parent in - GAP. + GAP - ``ambient`` -- A derived class of :class:`ParentLibGAP` or - ``None`` (default). The ambient class if ``libgap_parent`` has - been defined as a subgroup. + ``None`` (default); the ambient class if ``libgap_parent`` has + been defined as a subgroup EXAMPLES:: @@ -300,7 +300,7 @@ class ParentLibGAP(SageObject): """ Return the number of generators of ``self``. - OUTPUT: an integer + OUTPUT: integer EXAMPLES:: @@ -392,7 +392,7 @@ class ParentLibGAP(SageObject): """ Return the `i`-th generator of ``self``. - .. warning:: + .. WARNING:: Indexing starts at `0` as usual in Sage/Python. Not as in GAP, where indexing starts at `1`. @@ -400,7 +400,7 @@ class ParentLibGAP(SageObject): INPUT: - ``i`` -- integer between `0` (inclusive) and :meth:`ngens` - (exclusive). The index of the generator. + (exclusive); The index of the generator OUTPUT: the `i`-th generator of the group @@ -453,7 +453,7 @@ class ParentLibGAP(SageObject): cdef class ElementLibGAP(MultiplicativeGroupElement): """ - A class for LibGAP-based Sage group elements + A class for LibGAP-based Sage group elements. INPUT: @@ -593,7 +593,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): def _latex_(self): r""" - Return a LaTeX representation + Return a LaTeX representation. OUTPUT: a string; a valid LaTeX math command sequence @@ -613,7 +613,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): cpdef _mul_(left, right): """ - Multiplication of group elements + Multiplication of group elements. TESTS:: diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py index 3ad8719a5dd..1df22e6c3a6 100644 --- a/src/sage/groups/matrix_gps/finitely_generated.py +++ b/src/sage/groups/matrix_gps/finitely_generated.py @@ -211,10 +211,10 @@ def MatrixGroup(*gens, **kwds): INPUT: - ``*gens`` -- matrices, or a single list/tuple/iterable of - matrices, or a matrix group. + matrices, or a matrix group - - ``check`` -- boolean keyword argument (optional, default: - ``True``). Whether to check that each matrix is invertible. + - ``check`` -- boolean keyword argument (default: ``True``); + whether to check that each matrix is invertible EXAMPLES:: @@ -410,7 +410,7 @@ def gens(self) -> tuple: def gen(self, i): """ - Return the `i`-th generator + Return the `i`-th generator. OUTPUT: the `i`-th generator of the group @@ -430,9 +430,9 @@ def gen(self, i): def ngens(self): """ - Return the number of generators + Return the number of generators. - OUTPUT: an integer; the number of generators + OUTPUT: integer; the number of generators EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/finitely_generated_gap.py b/src/sage/groups/matrix_gps/finitely_generated_gap.py index b1623f543f9..70c45d59162 100644 --- a/src/sage/groups/matrix_gps/finitely_generated_gap.py +++ b/src/sage/groups/matrix_gps/finitely_generated_gap.py @@ -85,13 +85,13 @@ def as_permutation_group(self, algorithm=None, seed=None): INPUT: - - ``algorithm`` -- ``None`` or ``'smaller'``. In the latter + - ``algorithm`` -- ``None`` or ``'smaller'``; in the latter case, try harder to find a permutation representation of - small degree. + small degree - ``seed`` -- ``None`` or an integer specifying the seed - to fix results depending on pseudo-random-numbers. Here + to fix results depending on pseudo-random-numbers; here it makes sense to be used with respect to the ``'smaller'`` - option, since GAP produces random output in that context. + option, since GAP produces random output in that context OUTPUT: diff --git a/src/sage/groups/matrix_gps/group_element.pyx b/src/sage/groups/matrix_gps/group_element.pyx index 2e6428fc714..99c21b2589a 100644 --- a/src/sage/groups/matrix_gps/group_element.pyx +++ b/src/sage/groups/matrix_gps/group_element.pyx @@ -91,11 +91,11 @@ except ImportError: cpdef is_MatrixGroupElement(x): """ - Test whether ``x`` is a matrix group element + Test whether ``x`` is a matrix group element. INPUT: - - ``x`` -- anything. + - ``x`` -- anything OUTPUT: boolean @@ -370,7 +370,7 @@ cdef class MatrixGroupElement_generic(MultiplicativeGroupElement): def __invert__(self): """ - Return the inverse group element + Return the inverse group element. OUTPUT: a matrix group element diff --git a/src/sage/groups/matrix_gps/group_element_gap.pyx b/src/sage/groups/matrix_gps/group_element_gap.pyx index 2f7eb82cb8d..2b363f7c303 100644 --- a/src/sage/groups/matrix_gps/group_element_gap.pyx +++ b/src/sage/groups/matrix_gps/group_element_gap.pyx @@ -312,8 +312,8 @@ cdef class MatrixGroupElement_gap(ElementLibGAP): - ``gens`` -- a list/tuple/iterable of elements (or objects that can be converted to group elements), or ``None`` - (default). By default, the generators of the parent group - are used. + (default); by default, the generators of the parent group + are used OUTPUT: diff --git a/src/sage/groups/matrix_gps/isometries.py b/src/sage/groups/matrix_gps/isometries.py index 424e5a0edf0..baf0925d706 100644 --- a/src/sage/groups/matrix_gps/isometries.py +++ b/src/sage/groups/matrix_gps/isometries.py @@ -46,8 +46,9 @@ class GroupOfIsometries(FinitelyGeneratedMatrixGroup_gap): r""" A base class for Orthogonal matrix groups with a gap backend. - Main difference to :class:`~sage.groups.matrix_gps.orthogonal.OrthogonalMatrixGroup_gap` is that we can - specify generators and a bilinear form. Following gap the group action is from the right. + Main difference to :class:`~sage.groups.matrix_gps.orthogonal.OrthogonalMatrixGroup_gap` + is that we can specify generators and a bilinear form. Following gap the group action is + from the right. INPUT: @@ -59,10 +60,10 @@ class GroupOfIsometries(FinitelyGeneratedMatrixGroup_gap): - ``check`` -- bool (default: ``True``) check if the generators preserve the bilinear form - ``invariant_submodule`` -- a submodule preserved by the group action - (default: ``None``) registers an action on this submodule. + (default: ``None``) registers an action on this submodule - ``invariant_quotient_module`` -- a quotient module preserved by the group action (default: ``None``) - registers an action on this quotient module. + registers an action on this quotient module EXAMPLES:: @@ -134,7 +135,7 @@ def _repr_(self): r""" Return the string representation of this matrix group. - OUTPUT: a string + OUTPUT: string EXAMPLES:: @@ -159,7 +160,7 @@ def _repr_(self): def __reduce__(self): r""" - Implements pickling. + Implement pickling. EXAMPLES:: @@ -358,7 +359,7 @@ class GroupActionOnQuotientModule(Action): - ``MatrixGroup`` -- the group acting :class:`GroupOfIsometries` - ``submodule`` -- an invariant quotient module - - ``is_left`` -- bool (default: ``False``) + - ``is_left`` -- boolean (default: ``False``) EXAMPLES:: @@ -376,7 +377,7 @@ class GroupActionOnQuotientModule(Action): """ def __init__(self, MatrixGroup, quotient_module, is_left=False): r""" - Initialize the action + Initialize the action. TESTS:: diff --git a/src/sage/groups/matrix_gps/linear.py b/src/sage/groups/matrix_gps/linear.py index 759faf2db18..e8c7ddd08a3 100644 --- a/src/sage/groups/matrix_gps/linear.py +++ b/src/sage/groups/matrix_gps/linear.py @@ -207,13 +207,13 @@ def SL(n, R, var='a'): INPUT: - - ``n`` -- a positive integer. + - ``n`` -- positive integer - - ``R`` -- ring or an integer. If an integer is specified, the - corresponding finite field is used. + - ``R`` -- ring or integer; if an integer is specified, the + corresponding finite field is used - ``var`` -- variable used to represent generator of the finite - field, if needed. + field, if needed EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/matrix_group.py b/src/sage/groups/matrix_gps/matrix_group.py index e7ad5183e45..709a88a6d8e 100644 --- a/src/sage/groups/matrix_gps/matrix_group.py +++ b/src/sage/groups/matrix_gps/matrix_group.py @@ -126,10 +126,10 @@ def _check_matrix(self, x, *args): INPUT: - ``x`` -- a Sage matrix in the correct matrix space (degree - and base ring). + and base ring) - ``*args`` -- optional other representations of ``x``, - depending on the group implementation. Ignored by default. + depending on the group implementation. Ignored by default OUTPUT: a :class:`TypeError` must be raised if ``x`` is invalid @@ -184,8 +184,8 @@ def subgroup(self, generators, check=True): INPUT: - ``generators`` -- a list/tuple/iterable of group elements of ``self`` - - ``check`` -- boolean (optional, default: ``True``). Whether to check - that each matrix is invertible. + - ``check`` -- boolean (default: ``True``); whether to check that each + matrix is invertible OUTPUT: the subgroup generated by ``generators`` as an instance of :class:`FinitelyGeneratedMatrixGroup_gap` @@ -345,7 +345,8 @@ def sign_representation(self, base_ring=None, side="twosided"): .. WARNING:: - Assumes ``self`` is a matrix group over a field which has embedding over real numbers. + Assumes ``self`` is a matrix group over a field which has + embedding over real numbers. INPUT: @@ -390,17 +391,17 @@ class MatrixGroup_generic(MatrixGroup_base): def __init__(self, degree, base_ring, category=None): """ - Base class for matrix groups over generic base rings + Base class for matrix groups over generic base rings. You should not use this class directly. Instead, use one of the more specialized derived classes. INPUT: - - ``degree`` -- integer. The degree (matrix size) of the - matrix group. + - ``degree`` -- integer; the degree (matrix size) of the + matrix group - - ``base_ring`` -- ring. The base ring of the matrices. + - ``base_ring`` -- ring; the base ring of the matrices TESTS:: @@ -425,7 +426,7 @@ def degree(self): """ Return the degree of this matrix group. - OUTPUT: an integer; the size (number of rows equals number of columns) + OUTPUT: integer; the size (number of rows equals number of columns) of the matrices EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/matrix_group_gap.py b/src/sage/groups/matrix_gps/matrix_group_gap.py index f413c87bdde..d7de4c75f6e 100644 --- a/src/sage/groups/matrix_gps/matrix_group_gap.py +++ b/src/sage/groups/matrix_gps/matrix_group_gap.py @@ -37,16 +37,16 @@ def __init__(self, degree, base_ring, libgap_group, ambient=None, category=None) INPUT: - - ``degree`` -- integer. The degree (matrix size) of the - matrix group. + - ``degree`` -- integer; the degree (matrix size) of the + matrix group - - ``base_ring`` -- ring. The base ring of the matrices. + - ``base_ring`` -- ring; the base ring of the matrices - - ``libgap_group`` -- the defining libgap group. + - ``libgap_group`` -- the defining libgap group - - ``ambient`` -- A derived class of :class:`ParentLibGAP` or - ``None`` (default). The ambient class if ``libgap_group`` - has been defined as a subgroup. + - ``ambient`` -- a derived class of :class:`ParentLibGAP` or + ``None`` (default); the ambient class if ``libgap_group`` + has been defined as a subgroup TESTS: @@ -197,9 +197,9 @@ def _check_matrix(self, x_sage, x_gap): INPUT: - ``x_sage`` -- a Sage matrix in the correct matrix space (degree - and base ring). + and base ring) - - ``x_gap`` -- the corresponding LibGAP matrix. + - ``x_gap`` -- the corresponding LibGAP matrix OUTPUT: a :class:`TypeError` must be raised if ``x`` is invalid @@ -229,8 +229,8 @@ def subgroup(self, generators, check=True): INPUT: - ``generators`` -- a list/tuple/iterable of group elements of ``self`` - - ``check`` -- boolean (optional, default: ``True``). Whether to check - that each matrix is invertible. + - ``check`` -- boolean (default: ``True``). Whether to check that each + matrix is invertible OUTPUT: The subgroup generated by ``generators`` as an instance of :class:`FinitelyGeneratedMatrixGroup_gap` diff --git a/src/sage/groups/matrix_gps/named_group.py b/src/sage/groups/matrix_gps/named_group.py index 1aae7019e3c..142ea68ddfb 100644 --- a/src/sage/groups/matrix_gps/named_group.py +++ b/src/sage/groups/matrix_gps/named_group.py @@ -188,7 +188,7 @@ class NamedMatrixGroup_generic(CachedRepresentation, MatrixGroup_generic): def __init__(self, degree, base_ring, special, sage_name, latex_string, category=None, invariant_form=None): """ - Base class for "named" matrix groups + Base class for "named" matrix groups. INPUT: @@ -260,7 +260,7 @@ def _latex_(self): """ Return a LaTeX representation. - OUTPUT: a string + OUTPUT: string EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/named_group_gap.py b/src/sage/groups/matrix_gps/named_group_gap.py index b8b1f54722c..699e351f06d 100644 --- a/src/sage/groups/matrix_gps/named_group_gap.py +++ b/src/sage/groups/matrix_gps/named_group_gap.py @@ -23,22 +23,22 @@ class NamedMatrixGroup_gap(NamedMatrixGroup_generic, MatrixGroup_gap): def __init__(self, degree, base_ring, special, sage_name, latex_string, gap_command_string, category=None): """ - Base class for "named" matrix groups using LibGAP + Base class for "named" matrix groups using LibGAP. INPUT: - - ``degree`` -- integer. The degree (number of rows/columns of - matrices). + - ``degree`` -- integer; the degree (number of rows/columns of + matrices) - - ``base_ring`` -- ring. The base ring of the matrices. + - ``base_ring`` -- ring; the base ring of the matrices - - ``special`` -- boolean. Whether the matrix group is special, - that is, elements have determinant one. + - ``special`` -- boolean; whether the matrix group is special, + that is, elements have determinant one - - ``latex_string`` -- string. The latex representation. + - ``latex_string`` -- string; the latex representation - - ``gap_command_string`` -- string. The GAP command to construct - the matrix group. + - ``gap_command_string`` -- string; the GAP command to construct + the matrix group EXAMPLES:: diff --git a/src/sage/groups/matrix_gps/orthogonal.py b/src/sage/groups/matrix_gps/orthogonal.py index ab1b770e4cf..adfa3248204 100644 --- a/src/sage/groups/matrix_gps/orthogonal.py +++ b/src/sage/groups/matrix_gps/orthogonal.py @@ -21,7 +21,7 @@ of `SO(e,d,q)` in `GO(e,d,q)` is `2` if `q` is odd, but `SO(e,d,q) = GO(e,d,q)` if `q` is even.) -.. warning:: +.. WARNING:: GAP and Sage use different notations: @@ -107,10 +107,10 @@ def normalize_args_e(degree, ring, e): INPUT: - - ``degree`` -- integer. The degree of the affine group, that is, - the dimension of the affine space the group is acting on. + - ``degree`` -- integer; the degree of the affine group, that is, + the dimension of the affine space the group is acting on - - ``ring`` -- a ring. The base ring of the affine space. + - ``ring`` -- a ring; the base ring of the affine space - ``e`` -- integer, one of `+1`, `0`, `-1`. Only relevant for finite fields and if the degree is even. A parameter that diff --git a/src/sage/groups/matrix_gps/unitary.py b/src/sage/groups/matrix_gps/unitary.py index 37a9cb826ee..e706abcfda7 100644 --- a/src/sage/groups/matrix_gps/unitary.py +++ b/src/sage/groups/matrix_gps/unitary.py @@ -68,7 +68,7 @@ def finite_field_sqrt(ring): """ Helper function. - OUTPUT: an integer `q` such that ``ring`` is the finite field with `q^2` elements + OUTPUT: integer `q` such that ``ring`` is the finite field with `q^2` elements EXAMPLES:: diff --git a/src/sage/groups/misc_gps/argument_groups.py b/src/sage/groups/misc_gps/argument_groups.py index 5cf9ead8c7d..edbdb7b7bad 100644 --- a/src/sage/groups/misc_gps/argument_groups.py +++ b/src/sage/groups/misc_gps/argument_groups.py @@ -281,7 +281,7 @@ def _act_on_(self, other, is_left): def __abs__(self): r""" - Return the absolute value of this argument which equals `1` + Return the absolute value of this argument which equals `1`. TESTS:: @@ -782,7 +782,7 @@ def _create_element_in_extension_(self, exponent): INPUT: - - ``exponent`` -- the element data. + - ``exponent`` -- the element data OUTPUT: an element @@ -812,7 +812,7 @@ def _coerce_map_from_(self, R): INPUT: - - ``R`` -- a parent. + - ``R`` -- a parent OUTPUT: boolean @@ -1321,7 +1321,7 @@ def _create_element_in_extension_(self, element): INPUT: - - ``element`` -- the element data. + - ``element`` -- the element data OUTPUT: an element @@ -1353,7 +1353,7 @@ def _coerce_map_from_(self, R): INPUT: - - ``R`` -- a parent. + - ``R`` -- a parent OUTPUT: boolean diff --git a/src/sage/groups/old.pyx b/src/sage/groups/old.pyx index 08df0405ffa..564dbd75c23 100644 --- a/src/sage/groups/old.pyx +++ b/src/sage/groups/old.pyx @@ -26,7 +26,7 @@ from sage.misc.superseded import deprecation cdef class Group(sage.structure.parent.Parent): """ - Generic group class + Generic group class. """ def __init__(self, category=None): """ @@ -165,8 +165,7 @@ cdef class Group(sage.structure.parent.Parent): def quotient(self, H, **kwds): """ - Return the quotient of this group by the normal subgroup - `H`. + Return the quotient of this group by the normal subgroup `H`. EXAMPLES:: diff --git a/src/sage/groups/pari_group.py b/src/sage/groups/pari_group.py index 62dc75cb821..fb460e5b902 100644 --- a/src/sage/groups/pari_group.py +++ b/src/sage/groups/pari_group.py @@ -29,7 +29,7 @@ def __init__(self, x, degree): def __repr__(self): """ - String representation of this group + String representation of this group. EXAMPLES:: @@ -159,7 +159,7 @@ def order(self): def permutation_group(self): """ - Return the corresponding GAP transitive group + Return the corresponding GAP transitive group. EXAMPLES:: diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pyx b/src/sage/groups/perm_gps/partn_ref/data_structures.pyx index e7a3e8c55f8..6f4d9b2b430 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pyx +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pyx @@ -42,7 +42,7 @@ from sage.arith.misc import is_prime as n_is_prime cdef inline OrbitPartition *OP_new(int n) noexcept: """ - Allocate and return a pointer to a new OrbitPartition of degree n. Returns a + Allocate and return a pointer to a new OrbitPartition of degree n. Return a null pointer in the case of an allocation failure. """ cdef OrbitPartition *OP = \ @@ -181,7 +181,7 @@ def OP_represent(int n, merges, perm): cdef inline PartitionStack *PS_new(int n, bint unit_partition) noexcept: """ - Allocate and return a pointer to a new PartitionStack of degree n. Returns a + Allocate and return a pointer to a new PartitionStack of degree n. Return a null pointer in the case of an allocation failure. """ cdef PartitionStack *PS = \ @@ -213,7 +213,7 @@ cdef void PS_unit_partition(PartitionStack *PS) noexcept: cdef inline PartitionStack *PS_copy(PartitionStack *PS) noexcept: """ - Allocate and return a pointer to a copy of PartitionStack PS. Returns a null + Allocate and return a pointer to a copy of PartitionStack PS. Return a null pointer in the case of an allocation failure. """ cdef int n = PS.degree @@ -237,7 +237,7 @@ cdef inline void PS_dealloc(PartitionStack *PS) noexcept: cdef PartitionStack *PS_from_list(list L) noexcept: """ - Allocate and return a pointer to a PartitionStack representing L. Returns a + Allocate and return a pointer to a PartitionStack representing L. Return a null pointer in the case of an allocation failure. """ cdef int cell, i, num_cells = len(L), cur_start = 0, cur_len, n = 0 @@ -286,7 +286,7 @@ cdef int PS_first_smallest(PartitionStack *PS, bitset_t b, int *second_pos=NULL) """ Find the first occurrence of the smallest cell of size greater than one, which is admissible (checked by the function ``test_allowance``). - Its entries are stored to b and its minimum element is returned. + Its entries are stored to `b` and its minimum element is returned. """ cdef int i = 0, j = 0, location = 0, n = PS.degree bitset_zero(b) @@ -383,7 +383,7 @@ cdef int PS_find_element(PartitionStack *PS, bitset_t b, int x) except -1: cdef list PS_singletons(PartitionStack * part): """ - Return the list of all singletons in the PartitionStack. + Return the list of all singletons in the ``PartitionStack``. """ cdef list l = [] cdef int i @@ -552,7 +552,7 @@ cdef enum: cdef StabilizerChain *SC_new(int n, bint init_gens=True) noexcept: """ - Allocate and return a pointer to a new StabilizerChain of degree n. Returns + Allocate and return a pointer to a new StabilizerChain of degree n. Return a null pointer in the case of an allocation failure. """ cdef int i @@ -624,7 +624,7 @@ cdef inline int SC_realloc_gens(StabilizerChain *SC, int level, int size) noexce """ Reallocate generator array at level `level` to size `size`. - Returns 1 in case of an allocation failure. + Return 1 in case of an allocation failure. """ cdef int *temp cdef int n = SC.degree @@ -661,7 +661,7 @@ cdef StabilizerChain *SC_symmetric_group(int n) noexcept: """ Return a stabilizer chain for the symmetric group on {0, 1, ..., n-1}. - Returns NULL in the case of an allocation failure. + Return ``NULL`` in the case of an allocation failure. """ cdef int i, j, b cdef StabilizerChain *SC = SC_new(n, False) @@ -702,7 +702,7 @@ cdef StabilizerChain *SC_alternating_group(int n) noexcept: """ Return a stabilizer chain for the alternating group on {0, 1, ..., n-1}. - Returns NULL in the case of an allocation failure. + Return ``NULL`` in the case of an allocation failure. """ cdef int i, j, b cdef StabilizerChain *SC = SC_new(n, False) @@ -747,7 +747,7 @@ cdef int SC_realloc_bitsets(StabilizerChain *SC, unsigned long size) noexcept: If size is larger than current allocation, double the size of the bitsets until it is not. - Returns 1 in case of an allocation failure. + Return 1 in case of an allocation failure. """ cdef unsigned long size_old = SC.gen_used.size if size <= size_old: @@ -780,7 +780,7 @@ cdef StabilizerChain *SC_copy(StabilizerChain *SC, int level) noexcept: """ Creates a copy of the first `level` levels of SC. Must have 0 < level. - Returns a null pointer in case of allocation failure. + Return a null pointer in case of allocation failure. """ cdef int i, n = SC.degree cdef StabilizerChain *SCC = SC_new(n, False) @@ -847,7 +847,7 @@ cdef StabilizerChain *SC_new_base(StabilizerChain *SC, int *base, int base_len) Use SC_cleanup to remove redundant base points. - Returns a null pointer in case of an allocation failure. + Return a null pointer in case of an allocation failure. """ cdef StabilizerChain *NEW = SC_new(SC.degree) if NEW is NULL: @@ -908,7 +908,7 @@ cdef StabilizerChain *SC_insert_base_point(StabilizerChain *SC, int level, int p Use SC_cleanup to remove redundant base points. - Returns a null pointer in case of an allocation failure. + Return a null pointer in case of an allocation failure. """ cdef int i, b, n = SC.degree cdef StabilizerChain *NEW @@ -994,7 +994,7 @@ cdef int SC_sift(StabilizerChain *SC, int level, int x, int *gens, int num_gens, num_gens - how many of these there are new_gens - space of size at least num_gens*n for the sifted perms to go - Returns 1 in case of an allocation failure. + Return 1 in case of an allocation failure. """ cdef int n = SC.degree if num_gens == 0: @@ -1619,10 +1619,11 @@ cdef int sort_by_function(PartitionStack *PS, int start, int *degrees) noexcept: A simple counting sort, given the degrees of vertices to a certain cell. INPUT: - PS -- the partition stack to be checked - start -- beginning index of the cell to be sorted - degrees -- the values to be sorted by, must have extra scratch space for a - total of 3*n+1 + + - PS -- the partition stack to be checked + - start -- beginning index of the cell to be sorted + - degrees -- the values to be sorted by, must have extra scratch space for a + total of `3*n+1` """ cdef int n = PS.degree diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx index c01634e1772..41891938e7a 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx @@ -117,8 +117,9 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): storing results to ``self``. INPUT: - partition -- an optional list of lists partition of the columns. - default is the unit partition. + + - partition -- an optional list of lists partition of the columns; + default is the unit partition EXAMPLES:: @@ -253,7 +254,7 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): def automorphism_group(self): """ - Returns a list of generators of the automorphism group, along with its + Return a list of generators of the automorphism group, along with its order and a base for which the list of generators is a strong generating set. @@ -280,7 +281,7 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): def canonical_relabeling(self): """ - Returns a canonical relabeling (in list permutation format). + Return a canonical relabeling (in list permutation format). EXAMPLES: (For more examples, see self.run()):: @@ -528,7 +529,7 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): def automorphism_group(self): """ - Returns a list of generators of the automorphism group, along with its + Return a list of generators of the automorphism group, along with its order and a base for which the list of generators is a strong generating set. @@ -561,7 +562,7 @@ cdef class NonlinearBinaryCodeStruct(BinaryCodeStruct): def canonical_relabeling(self): """ - Returns a canonical relabeling (in list permutation format). + Return a canonical relabeling (in list permutation format). EXAMPLES: (For more examples, see self.run()):: @@ -625,17 +626,17 @@ cdef int ith_word_nonlinear(BinaryCodeStruct self, int i, bitset_s *word) noexce cdef int refine_by_bip_degree(PartitionStack *col_ps, void *S, int *cells_to_refine_by, int ctrb_len) noexcept: r""" - Refines the input partition by checking degrees of vertices to the given + Refine the input partition by checking degrees of vertices to the given cells in the associated bipartite graph (vertices split into columns and words). INPUT: - col_ps -- a partition stack, whose finest partition is the partition to be - refined. - S -- a binary code struct object - cells_to_refine_by -- a list of pointers to cells to check degrees against - in refining the other cells (updated in place) - ctrb_len -- how many cells in cells_to_refine_by + + - col_ps -- a partition stack, whose finest partition is the partition to be refined + - S -- a binary code struct object + - cells_to_refine_by -- a list of pointers to cells to check degrees against + in refining the other cells (updated in place) + - ctrb_len -- how many cells in cells_to_refine_by OUTPUT: @@ -960,12 +961,12 @@ cdef inline int word_degree(PartitionStack *word_ps, BinaryCodeStruct BCS, int e vertices in the cell corresponding to cell_index. INPUT: - word_ps -- the partition stack to be checked - col_ps -- corresponding partition stack on columns - BCS -- a binary code struct object - entry -- the position of the vertex in question in the entries of word_ps - cell_index -- the starting position of the cell in question in the entries - of PS + + - word_ps -- the partition stack to be checked + - col_ps -- corresponding partition stack on columns + - BCS -- a binary code struct object + - entry -- the position of the vertex in question in the entries of word_ps + - cell_index -- the starting position of the cell in question in the entries of PS """ cdef bitset_t cell, word cdef int h @@ -990,12 +991,12 @@ cdef inline int col_degree(PartitionStack *col_ps, BinaryCodeStruct BCS, int ent vertices in the cell corresponding to cell_index. INPUT: - col_ps -- the partition stack to be checked - word_ps -- corresponding partition stack on words - BCS -- a binary code struct object - entry -- the position of the vertex in question in the entries of word_ps - cell_index -- the starting position of the cell in question in the entries - of PS + + - col_ps -- the partition stack to be checked + - word_ps -- corresponding partition stack on words + - BCS -- a binary code struct object + - entry -- the position of the vertex in question in the entries of word_ps + - cell_index -- the starting position of the cell in question in the entries of PS """ cdef bitset_t word bitset_init(word, BCS.degree) @@ -1054,14 +1055,15 @@ cdef inline int sort_by_function_codes(PartitionStack *PS, int start, int *degre def random_tests(num=50, n_max=50, k_max=6, nwords_max=200, perms_per_code=10, density_range=(.1,.9)): """ - Tests to make sure that C(gamma(B)) == C(B) for random permutations gamma + Test to make sure that C(gamma(B)) == C(B) for random permutations gamma and random codes B, and that is_isomorphic returns an isomorphism. INPUT: - num -- run tests for this many codes - n_max -- test codes with at most this many columns - k_max -- test codes with at most this for dimension - perms_per_code -- test each code with this many random permutations + + - num -- run tests for this many codes + - n_max -- test codes with at most this many columns + - k_max -- test codes with at most this for dimension + - perms_per_code -- test each code with this many random permutations DISCUSSION: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx index 2ebf9e08b56..5cad4cb0a0b 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx @@ -1163,7 +1163,7 @@ cdef void *apply_dg_edge_aug(void *parent, void *aug, void *child, int *degree, cdef void *allocate_dg_edge(int n, bint loops) noexcept: r""" - Allocates an object for this augmentation scheme. + Allocate an object for this augmentation scheme. """ cdef GraphStruct GS cdef DenseGraph G @@ -1187,7 +1187,7 @@ cdef void *allocate_dg_edge(int n, bint loops) noexcept: cdef void free_dg_edge(void *child) noexcept: r""" - Deallocates an object for this augmentation scheme. + Deallocate an object for this augmentation scheme. """ cdef GraphStruct GS = child sig_free(GS.scratch) @@ -1196,9 +1196,9 @@ cdef void free_dg_edge(void *child) noexcept: cdef void *canonical_dg_edge_parent(void *child, void *parent, int *permutation, int *degree, bint *mem_err) noexcept: r""" - Applies ``permutation`` to ``child``, determines an arbitrary parent by - deleting the lexicographically largest edge, applies the inverse of - ``permutation`` to the result and stores the result in ``parent``. + Apply ``permutation`` to ``child``, determine an arbitrary parent by + deleting the lexicographically largest edge, apply the inverse of + ``permutation`` to the result and store the result in ``parent``. """ cdef GraphStruct GS_par = parent, GS = child cdef DenseGraph DG_par = GS_par.G, DG = GS.G @@ -1226,7 +1226,7 @@ cdef void *canonical_dg_edge_parent(void *child, void *parent, int *permutation, cdef iterator *allocate_dg_edge_gen(int degree, int depth, bint loops) noexcept: r""" - Allocates the iterator for generating graphs. + Allocate the iterator for generating graphs. """ cdef iterator *dg_edge_gen = sig_malloc(sizeof(iterator)) cdef canonical_generator_data *cgd = allocate_cgd(depth, degree) @@ -1256,7 +1256,7 @@ cdef iterator *allocate_dg_edge_gen(int degree, int depth, bint loops) noexcept: cdef void free_dg_edge_gen(iterator *dg_edge_gen) noexcept: r""" - Deallocates the iterator for generating graphs. + Deallocate the iterator for generating graphs. """ cdef canonical_generator_data *cgd = dg_edge_gen.data deallocate_cgd(cgd) @@ -1431,7 +1431,7 @@ cdef void *apply_dg_vert_aug(void *parent, void *aug, void *child, int *degree, cdef void *allocate_dg_vert(int n, int depth) noexcept: r""" - Allocates an object for this augmentation scheme. + Allocate an object for this augmentation scheme. """ cdef GraphStruct GS cdef DenseGraph G @@ -1457,7 +1457,7 @@ cdef void *allocate_dg_vert(int n, int depth) noexcept: cdef void free_dg_vert(void *child) noexcept: r""" - Deallocates an object for this augmentation scheme. + Deallocate an object for this augmentation scheme. """ cdef GraphStruct GS = child sig_free(GS.scratch) @@ -1466,9 +1466,9 @@ cdef void free_dg_vert(void *child) noexcept: cdef void *canonical_dg_vert_parent(void *child, void *parent, int *permutation, int *degree, bint *mem_err) noexcept: r""" - Applies ``permutation`` to ``child``, determines an arbitrary parent by - deleting the lexicographically largest vertex, applies the inverse of - ``permutation`` to the result and stores the result in ``parent``. + Apply ``permutation`` to ``child``, determines an arbitrary parent by + deleting the lexicographically largest vertex, apply the inverse of + ``permutation`` to the result and store the result in ``parent``. """ cdef GraphStruct GS_par = parent, GS = child cdef DenseGraph DG_par = GS_par.G, DG = GS.G @@ -1488,7 +1488,7 @@ cdef void *canonical_dg_vert_parent(void *child, void *parent, int *permutation, cdef iterator *allocate_dg_vert_gen(int degree, int depth) noexcept: r""" - Allocates the iterator for generating graphs. + Allocate the iterator for generating graphs. """ cdef iterator *dg_vert_gen = sig_malloc(sizeof(iterator)) cdef canonical_generator_data *cgd = allocate_cgd(depth, degree) @@ -1529,7 +1529,7 @@ cdef iterator *allocate_dg_vert_gen(int degree, int depth) noexcept: cdef void free_dg_vert_gen(iterator *dg_vert_gen) noexcept: r""" - Deallocates the iterator for generating graphs. + Deallocate the iterator for generating graphs. """ cdef canonical_generator_data *cgd = dg_vert_gen.data deallocate_cgd(cgd) diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx index 1366fa8ceee..9fb97741746 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx @@ -130,9 +130,8 @@ cdef class MatrixStruct: INPUT: - partition -- an optional list of lists partition of the columns. - - Default is the unit partition. + - partition -- an optional list of lists partition of the columns; + default is the unit partition. EXAMPLES:: @@ -174,7 +173,7 @@ cdef class MatrixStruct: def automorphism_group(self): """ - Returns a list of generators of the automorphism group, along with its + Return a list of generators of the automorphism group, along with its order and a base for which the list of generators is a strong generating set. @@ -203,7 +202,7 @@ cdef class MatrixStruct: def canonical_relabeling(self): """ - Returns a canonical relabeling (in list permutation format). + Return a canonical relabeling (in list permutation format). For more examples, see self.run(). @@ -299,7 +298,7 @@ cdef bint all_matrix_children_are_equivalent(PartitionStack *PS, void *S) noexce def random_tests(n=10, nrows_max=50, ncols_max=50, nsymbols_max=10, perms_per_matrix=5, density_range=(.1,.9)): """ - Tests to make sure that C(gamma(M)) == C(M) for random permutations gamma + Test to make sure that C(gamma(M)) == C(M) for random permutations gamma and random matrices M, and that M.is_isomorphic(gamma(M)) returns an isomorphism. diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx index b73406b13a7..0dd869c1c95 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx @@ -69,7 +69,7 @@ cdef class PythonPartitionStack: def __repr__(self): """ - Returns a string representing the stack. + Return a string representing the stack. EXAMPLES:: @@ -82,7 +82,7 @@ cdef class PythonPartitionStack: def display(self): """ - Prints a representation of the stack. + Print a representation of the stack. EXAMPLES:: @@ -99,7 +99,7 @@ cdef class PythonPartitionStack: def is_discrete(self): """ - Returns whether the deepest partition consists only of singleton cells. + Return whether the deepest partition consists only of singleton cells. EXAMPLES:: @@ -116,7 +116,7 @@ cdef class PythonPartitionStack: def num_cells(self): """ - Returns the number of cells in the deepest partition. + Return the number of cells in the deepest partition. EXAMPLES:: @@ -129,7 +129,7 @@ cdef class PythonPartitionStack: def move_min_to_front(self, int start, int end): """ - Makes sure that the first element of the segment of entries i with + Make sure that the first element of the segment of entries i with start <= i <= end is minimal. EXAMPLES:: @@ -166,7 +166,7 @@ cdef class PythonPartitionStack: def clear(self): """ - Sets the current partition to the first shallower one, i.e. forgets about + Set the current partition to the first shallower one, i.e. forget about boundaries between cells that are new to the current level. EXAMPLES:: @@ -188,7 +188,7 @@ cdef class PythonPartitionStack: def entries(self): """ - Returns the entries array as a Python list of ints. + Return the entries array as a Python list of ints. EXAMPLES:: @@ -204,7 +204,7 @@ cdef class PythonPartitionStack: def set_entry(self, int i, int entry): """ - Sets the ith entry of the entries array to entry. + Set the ith entry of the entries array to entry. EXAMPLES:: @@ -219,7 +219,7 @@ cdef class PythonPartitionStack: def get_entry(self, int i): """ - Gets the ith entry of the entries array. + Get the ith entry of the entries array. EXAMPLES:: @@ -247,7 +247,7 @@ cdef class PythonPartitionStack: def set_level(self, int i, int level): """ - Sets the ith entry of the levels array to entry. + Set the ith entry of the levels array to entry. EXAMPLES:: @@ -264,7 +264,7 @@ cdef class PythonPartitionStack: def get_level(self, int i): """ - Gets the ith entry of the levels array. + Get the ith entry of the levels array. EXAMPLES:: @@ -277,7 +277,7 @@ cdef class PythonPartitionStack: def depth(self, new=None): """ - Returns the depth of the deepest partition in the stack, setting it to + Return the depth of the deepest partition in the stack, setting it to new if new is not None. EXAMPLES:: @@ -293,7 +293,7 @@ cdef class PythonPartitionStack: def degree(self, new=None): """ - Returns the degree of the partition stack, setting it to + Return the degree of the partition stack, setting it to new if new is not None. EXAMPLES:: @@ -404,13 +404,13 @@ def aut_gp_and_can_lab_python(S, partition, n, compare_structures, canonical_label, base, order): """ - Calls the automorphism group and canonical label function. + Call the automorphism group and canonical label function. INPUT: - S -- the object to examine - partition -- an ordered partition, as a list of lists - n -- the degree of the automorphism group to be computed + - S -- the object to examine + - partition -- an ordered partition, as a list of lists + - n -- the degree of the automorphism group to be computed :: @@ -493,11 +493,10 @@ def double_coset_python(S1, S2, partition1, ordering2, n, INPUT: - S1, S2 -- the objects to examine - partition1 -- an ordered partition, as a list of lists - ordering2 -- represents a partition of the points of S2, - as a relabeling of partition1 - n -- the degree + - S1, S2 -- the objects to examine + - partition1 -- an ordered partition, as a list of lists + - ordering2 -- represents a partition of the points of S2, as a relabeling of partition1 + - n -- the degree :: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx index c3a42da04d8..a613b7b9c4a 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx @@ -183,9 +183,9 @@ def set_stab_py(generators, sett, relab=False): cdef aut_gp_and_can_lab *set_stab(StabilizerChain *supergroup, subset *sett, bint relab) noexcept: r""" - Computes the set stabilizer of ``sett`` within ``supergroup``. (Note that + Compute the set stabilizer of ``sett`` within ``supergroup``. (Note that ``set`` is a reserved Python keyword.) If ``relab`` is specified then - computes the canonical label of the set under the action of the group. + compute the canonical label of the set under the action of the group. """ cdef aut_gp_and_can_lab *output cdef int n = supergroup.degree @@ -202,7 +202,7 @@ cdef aut_gp_and_can_lab *set_stab(StabilizerChain *supergroup, subset *sett, bin def sets_isom_py(generators, set1, set2): r""" - Computes whether ``set1`` and ``set2`` are isomorphic under the action of + Compute whether ``set1`` and ``set2`` are isomorphic under the action of the group generated by the generators given in list form. EXAMPLES:: @@ -486,7 +486,7 @@ cdef int compare_sets(int *gamma_1, int *gamma_2, void *S1, void *S2, int degree cdef void *allocate_subset(int n) noexcept: r""" - Allocates a subset struct of degree n. + Allocate a subset struct of degree n. """ cdef subset *set1 = sig_malloc(sizeof(subset)) cdef int *scratch = sig_malloc((3*n+1) * sizeof(int)) @@ -505,7 +505,7 @@ cdef void *allocate_subset(int n) noexcept: cdef void free_subset(void *child) noexcept: r""" - Deallocates a subset struct. + Deallocate a subset struct. """ cdef subset *set1 = child if set1 is not NULL: @@ -515,7 +515,7 @@ cdef void free_subset(void *child) noexcept: cdef void *allocate_sgd(int degree) noexcept: r""" - Allocates the data part of an iterator which generates augmentations, i.e., + Allocate the data part of an iterator which generates augmentations, i.e., elements to add to the set. """ cdef subset_generator_data *sgd = sig_malloc(sizeof(subset_generator_data)) @@ -527,7 +527,7 @@ cdef void *allocate_sgd(int degree) noexcept: cdef void deallocate_sgd(void *data) noexcept: r""" - Deallocates the data part of the augmentation iterator. + Deallocate the data part of the augmentation iterator. """ cdef subset_generator_data *sgd = data if sgd is not NULL: @@ -552,7 +552,7 @@ cdef void *subset_generator_next(void *data, int *degree, bint *mem_err) noexcep cdef int generate_child_subsets(void *S, aut_gp_and_can_lab *group, iterator *child_iterator) noexcept: r""" - Sets up an iterator of augmentations, i.e., elements to add to the given set. + Set up an iterator of augmentations, i.e., elements to add to the given set. """ cdef subset *subset1 = S cdef int i, j, n = group.group.degree @@ -572,7 +572,7 @@ cdef int generate_child_subsets(void *S, aut_gp_and_can_lab *group, iterator *ch cdef void *apply_subset_aug(void *parent, void *aug, void *child, int *degree, bint *mem_err) noexcept: r""" - Adds the element represented by ``aug`` to ``parent``, storing the result to + Add the element represented by ``aug`` to ``parent``, storing the result to ``child``. """ cdef subset *set1 = child @@ -589,7 +589,7 @@ cdef void free_subset_aug(void *aug) noexcept: cdef void *canonical_set_parent(void *child, void *parent, int *permutation, int *degree, bint *mem_err) noexcept: r""" - Determines the canonical parent of the set ``child`` by applying + Determine the canonical parent of the set ``child`` by applying ``permutation``, deleting the largest element in lexicographic order, and storing the result to ``parent``. """ @@ -619,7 +619,7 @@ cdef void *canonical_set_parent(void *child, void *parent, int *permutation, int cdef iterator *allocate_subset_gen(int degree, int max_size) noexcept: r""" - Allocates the generator of subsets. + Allocate the generator of subsets. """ cdef iterator *subset_gen = sig_malloc(sizeof(iterator)) if subset_gen is not NULL: @@ -630,7 +630,7 @@ cdef iterator *allocate_subset_gen(int degree, int max_size) noexcept: cdef int allocate_subset_gen_2(int degree, int max_size, iterator *it) noexcept: r""" - Given an already allocated iterator, allocates the generator of subsets. + Given an already allocated iterator, allocate the generator of subsets. """ cdef canonical_generator_data *cgd = allocate_cgd(max_size + 1, degree) if cgd is NULL: @@ -656,7 +656,7 @@ cdef int allocate_subset_gen_2(int degree, int max_size, iterator *it) noexcept: cdef void free_subset_gen(iterator *subset_gen) noexcept: r""" - Frees the iterator of subsets. + Free the iterator of subsets. """ if subset_gen is NULL: return @@ -666,7 +666,7 @@ cdef void free_subset_gen(iterator *subset_gen) noexcept: cdef iterator *setup_set_gen(iterator *subset_gen, int degree, int max_size) noexcept: r""" - Initiates the iterator of subsets. + Initiate the iterator of subsets. """ cdef subset *empty_set cdef iterator *subset_iterator = setup_canonical_generator(degree, diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx index 89529f4e8ce..ff54ecdb023 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx @@ -1,5 +1,5 @@ r""" -Automorphism groups and canonical labels. +Automorphism groups and canonical labels For details see section 3 of [Feu2013]_. @@ -454,7 +454,7 @@ cdef class LabelledBranching: cdef class PartitionRefinement_generic: r""" - Implements the partition and refinement framework for + Implement the partition and refinement framework for group actions `G \rtimes S_n` on `X^n` as described in :mod:`sage.groups.perm_gps.partn_ref2.refinement_generic`. """ @@ -592,7 +592,7 @@ cdef class PartitionRefinement_generic: def get_autom_order_permutation(self): r""" - Return the order of the automorphism group we have computes + Return the order of the automorphism group we have computed. EXAMPLES:: @@ -869,7 +869,7 @@ cdef class PartitionRefinement_generic: cdef void _latex_act_node(self, str comment="", int printlvl=0) noexcept: r""" Append the actual node as a string of latex-commands to - ``self._latex_debug_string`` + ``self._latex_debug_string``. """ raise NotImplementedError # must be implemented by derived classes diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index 09c6f8ceab5..5b76232e336 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -1481,7 +1481,7 @@ def largest_moved_point(self): sage: G.largest_moved_point() 'e' - .. warning:: + .. WARNING:: The name of this function is not good; this function should be deprecated in term of degree:: diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index 514b676efbf..cfc38b639de 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -157,7 +157,7 @@ def __classcall__(cls, domain): INPUT: - - ``n`` -- an integer or list or tuple thereof + - ``n`` -- integer or list or tuple thereof Calls the constructor with a tuple representing the set. @@ -1077,7 +1077,7 @@ def __init__(self, n): INPUT: - - ``n`` -- an integer among `\{1,2,3\}`. + - ``n`` -- integer among `\{1,2,3\}`. EXAMPLES:: @@ -1841,7 +1841,7 @@ def __init__(self, d, n): sage: G.category() Category of finite enumerated permutation groups - .. warning:: this follows GAP's naming convention of indexing + .. WARNING:: this follows GAP's naming convention of indexing the transitive groups starting from ``1``:: sage: TransitiveGroup(5,0) @@ -1849,7 +1849,7 @@ def __init__(self, d, n): ... ValueError: index n must be in {1,..,5} - .. warning:: only transitive groups of "small" degree are + .. WARNING:: only transitive groups of "small" degree are available in GAP's database:: sage: TransitiveGroup(32,1) @@ -1922,7 +1922,7 @@ def TransitiveGroups(d=None): """ INPUT: - - ``d`` -- an integer (optional) + - ``d`` -- integer (optional) Return the set of all transitive groups of a given degree ``d`` up to isomorphisms. If ``d`` is not specified, it returns the set of all @@ -1940,7 +1940,7 @@ def TransitiveGroups(d=None): sage: TransitiveGroups() Transitive Groups - .. warning:: in practice, the database currently only contains + .. WARNING:: in practice, the database currently only contains transitive groups up to degree 31:: sage: TransitiveGroups(32).cardinality() @@ -2229,7 +2229,7 @@ class PrimitiveGroup(PermutationGroup_unique): sage: G.category() Category of finite enumerated permutation groups - .. warning:: + .. WARNING:: this follows GAP's naming convention of indexing the primitive groups starting from ``1``:: @@ -2316,7 +2316,7 @@ def PrimitiveGroups(d=None): INPUT: - - ``d`` -- an integer (optional) + - ``d`` -- integer (optional) OUTPUT: @@ -2398,7 +2398,7 @@ def _repr_(self): """ Return a string representation. - OUTPUT: a string + OUTPUT: string TESTS:: @@ -2471,7 +2471,7 @@ def _repr_(self): """ Return a string representation. - OUTPUT: a string + OUTPUT: string TESTS:: @@ -2514,7 +2514,7 @@ def __getitem__(self, n): sage: PrimitiveGroups(5)[3] AGL(1, 5) - .. warning:: + .. WARNING:: this follows GAP's naming convention of indexing the primitive groups starting from ``1``:: @@ -2541,7 +2541,7 @@ def cardinality(self): r""" Return the cardinality of ``self``. - OUTPUT: an integer; the number of primitive groups of a given degree + OUTPUT: integer; the number of primitive groups of a given degree up to isomorphism EXAMPLES:: diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx index c1fc37fda84..b59facdd3ce 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx @@ -265,8 +265,8 @@ cdef class SemimonomialTransformation(MultiplicativeGroupElement): def __reduce__(self): """ - Returns a function and its arguments needed to create this - semimonomial group element. This is used in pickling. + Return a function and its arguments needed to create this + semimonomial group element. This is used in pickling. EXAMPLES:: @@ -279,7 +279,7 @@ cdef class SemimonomialTransformation(MultiplicativeGroupElement): def get_v(self): """ - Returns the component corresponding to `{R^{\times}}^n` of ``self``. + Return the component corresponding to `{R^{\times}}^n` of ``self``. EXAMPLES:: @@ -291,7 +291,7 @@ cdef class SemimonomialTransformation(MultiplicativeGroupElement): def get_v_inverse(self): """ - Returns the (elementwise) inverse of the component corresponding to + Return the (elementwise) inverse of the component corresponding to `{R^{\times}}^n` of ``self``. EXAMPLES:: @@ -304,7 +304,7 @@ cdef class SemimonomialTransformation(MultiplicativeGroupElement): def get_perm(self): """ - Returns the component corresponding to `S_n` of ``self``. + Return the component corresponding to `S_n` of ``self``. EXAMPLES:: @@ -316,7 +316,7 @@ cdef class SemimonomialTransformation(MultiplicativeGroupElement): def get_autom(self): """ - Returns the component corresponding to `Aut(R)` of ``self``. + Return the component corresponding to `Aut(R)` of ``self``. EXAMPLES:: From 57af00f376e888da05ed796b5f4c0873495c68c8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 29 Feb 2024 22:09:35 -0800 Subject: [PATCH 130/183] sage.categories.morphism.SetIsomorphism: New --- src/sage/categories/map.pyx | 3 +- src/sage/categories/morphism.pxd | 3 + src/sage/categories/morphism.pyx | 158 ++++++++++++++++++++++++++++++- 3 files changed, 162 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index b41b7538c59..a3355563d34 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -1272,7 +1272,7 @@ cdef class Map(Element): def section(self): """ - Return a section of self. + Return a section of ``self``. .. NOTE:: @@ -1439,6 +1439,7 @@ cdef class Section(Map): """ return self._inverse + cdef class FormalCompositeMap(Map): """ Formal composite maps. diff --git a/src/sage/categories/morphism.pxd b/src/sage/categories/morphism.pxd index e5befc8207e..52847fd83b7 100644 --- a/src/sage/categories/morphism.pxd +++ b/src/sage/categories/morphism.pxd @@ -8,3 +8,6 @@ cdef class Morphism(Map): cdef class SetMorphism(Morphism): cdef object _function cpdef bint _eq_c_impl(left, Element right) noexcept + +cdef class SetIsomorphism(SetMorphism): + cdef object _inverse diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx index 0e4805ef1b4..d4b412dd126 100644 --- a/src/sage/categories/morphism.pyx +++ b/src/sage/categories/morphism.pyx @@ -570,7 +570,7 @@ cdef class SetMorphism(Morphism): - ``parent`` -- a Homset - ``function`` -- a Python function that takes elements - of the domain as input and returns elements of the domain. + of the domain as input and returns elements of the codomain. EXAMPLES:: @@ -736,3 +736,159 @@ cdef class SetMorphism(Morphism): return not (isinstance(right, Element) and self._eq_c_impl(right)) else: return False + + +cdef class SetIsomorphism(SetMorphism): + r""" + An isomorphism of sets. + + INPUT: + + - ``parent`` -- a Homset + - ``function`` -- a Python function that takes elements + of the domain as input and returns elements of the codomain. + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__); f + Generic endomorphism of Integer Ring + sage: f._set_inverse(f) + sage: ~f is f + True + """ + def _set_inverse(self, inverse): + r""" + Set the inverse morphism of ``self`` to be ``inverse``. + + INPUT: + + - ``inverse`` -- a :class:`SetIsomorphism` + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: f._set_inverse(f) + sage: ~f is f + True + """ + self._inverse = inverse + + def __invert__(self): + r""" + Return the inverse morphism of ``self``. + + If :meth:`_set_inverse` has not been called yet, an error is raised. + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: ~f + Traceback (most recent call last): + ... + RuntimeError: inverse morphism has not been set + sage: f._set_inverse(f) + sage: ~f + Generic endomorphism of Integer Ring + """ + if not self._inverse: + raise RuntimeError('inverse morphism has not been set') + return self._inverse + + cdef dict _extra_slots(self) noexcept: + """ + Extend the dictionary with extra slots for this class. + + INPUT: + + - ``_slots`` -- a dictionary + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: f._set_inverse(f) + sage: f._extra_slots_test() + {'_codomain': Integer Ring, + '_domain': Integer Ring, + '_function': , + '_inverse': Generic endomorphism of Integer Ring, + '_is_coercion': False, + '_repr_type_str': None} + """ + slots = SetMorphism._extra_slots(self) + slots['_inverse'] = self._inverse + return slots + + cdef _update_slots(self, dict _slots) noexcept: + """ + Update the slots of ``self`` from the data in the dictionary. + + INPUT: + + - ``_slots`` -- a dictionary + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: f._update_slots_test({'_function': operator.__neg__, + ....: '_inverse': f, + ....: '_domain': QQ, + ....: '_codomain': QQ, + ....: '_repr_type_str': 'bla'}) + sage: f(3) + -3 + sage: f._repr_type() + 'bla' + sage: f.domain() + Rational Field + sage: f.codomain() + Rational Field + sage: f.inverse() == f + True + """ + self._inverse = _slots['_inverse'] + SetMorphism._update_slots(self, _slots) + + def section(self): + """ + Return a section of this morphism. + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: f._set_inverse(f) + sage: f.section() is f + True + """ + return self.__invert__() + + def is_surjective(self): + r""" + Return whether this morphism is surjective. + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: f.is_surjective() + True + """ + return True + + def is_injective(self): + r""" + Return whether this morphism is injective. + + EXAMPLES:: + + sage: f = sage.categories.morphism.SetIsomorphism(Hom(ZZ, ZZ, Sets()), + ....: operator.__neg__) + sage: f.is_injective() + True + """ + return True From 6903923fb4efd63aac13bdb0de473c8fde90a16c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 29 Feb 2024 22:11:04 -0800 Subject: [PATCH 131/183] FiniteRankFreeModule_abstract.isomorphism_with_fixed_basis: Return a SetIsomorphism --- .../tensor/modules/finite_rank_free_module.py | 109 +++++++++++++----- 1 file changed, 81 insertions(+), 28 deletions(-) diff --git a/src/sage/tensor/modules/finite_rank_free_module.py b/src/sage/tensor/modules/finite_rank_free_module.py index 0434ed84c53..cb0922eaa10 100644 --- a/src/sage/tensor/modules/finite_rank_free_module.py +++ b/src/sage/tensor/modules/finite_rank_free_module.py @@ -539,7 +539,9 @@ class :class:`~sage.modules.free_module.FreeModule_generic` from typing import Generator, Optional from sage.categories.fields import Fields +from sage.categories.homset import Hom from sage.categories.modules import Modules +from sage.categories.morphism import SetIsomorphism from sage.categories.rings import Rings from sage.misc.cachefunc import cached_method from sage.rings.integer import Integer @@ -755,15 +757,15 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): - ``codomain`` -- (default: ``None``) the codomain of the isomorphism represented by a free module within the category :class:`~sage.categories.modules_with_basis.ModulesWithBasis` with - the same rank and base ring as ``self``; if ``None`` a free module + the same rank and base ring as ``self``; if ``None``, a free module represented by :class:`~sage.combinat.free_module.CombinatorialFreeModule` is constructed OUTPUT: - - a module morphism represented by - :class:`~sage.modules.with_basis.morphism.ModuleMorphismFromFunction` + - a module isomorphism represented by + :class:`~sage.categories.morphism.SetIsomorphism` EXAMPLES:: @@ -800,6 +802,12 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): To: Free module generated by {'a', 'b', 'c'} over Rational Field sage: phi_eW(e[1] + 2 * e[2]) B['a'] + 2*B['b'] + sage: ~phi_eW + Generic morphism: + From: Free module generated by {'a', 'b', 'c'} over Rational Field + To: 3-dimensional vector space over the Rational Field + sage: (~phi_eW)(W.basis()['b']).display() + e_2 Providing a :class:`~sage.modules.free_module.Module_free_ambient` as the codomain:: @@ -814,7 +822,8 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): Sending (1,1)-tensors to matrices:: sage: T11 = V.tensor_module(1, 1); T11 - Free module of type-(1,1) tensors on the 3-dimensional vector space over the Rational Field + Free module of type-(1,1) tensors on the + 3-dimensional vector space over the Rational Field sage: e_T11 = T11.basis("e"); e_T11 Standard basis on the Free module of type-(1,1) tensors on the 3-dimensional vector space over the Rational Field @@ -822,7 +831,8 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): sage: W = MatrixSpace(QQ, 3) sage: phi_e_T11 = T11.isomorphism_with_fixed_basis(e_T11, codomain=W); phi_e_T11 Generic morphism: - From: Free module of type-(1,1) tensors on the 3-dimensional vector space over the Rational Field + From: Free module of type-(1,1) tensors on the + 3-dimensional vector space over the Rational Field To: Full MatrixSpace of 3 by 3 dense matrices over Rational Field sage: t = T11.an_element(); t.display() 1/2 e_1⊗e^1 @@ -830,20 +840,33 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): [1/2 0 0] [ 0 0 0] [ 0 0 0] + sage: ~phi_e_T11 + Generic morphism: + From: Full MatrixSpace of 3 by 3 dense matrices over Rational Field + To: Free module of type-(1,1) tensors on the + 3-dimensional vector space over the Rational Field + sage: (~phi_e_T11)(W([[0, 1/2, 1/3], + ....: [-1/2, 0, 0], + ....: [-1/3, 0, 0]])).display() + 1/2 e_1⊗e^2 + 1/3 e_1⊗e^3 - 1/2 e_2⊗e^1 - 1/3 e_3⊗e^1 Sending symmetric bilinear forms to matrices (note that they are currently elements of `T^{(0,2)}(M)`, not the symmetric power of `M`):: sage: T02 = V.tensor_module(0, 2); T02 - Free module of type-(0,2) tensors on the 3-dimensional vector space over the Rational Field + Free module of type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field sage: e_T02 = T02.basis("e"); e_T02 Standard basis on the - Free module of type-(0,2) tensors on the 3-dimensional vector space over the Rational Field - induced by Basis (e_1,e_2,e_3) on the 3-dimensional vector space over the Rational Field + Free module of type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field + induced by Basis (e_1,e_2,e_3) on the + 3-dimensional vector space over the Rational Field sage: W = MatrixSpace(QQ, 3) sage: phi_e_T02 = T02.isomorphism_with_fixed_basis(e_T02, codomain=W); phi_e_T02 Generic morphism: - From: Free module of type-(0,2) tensors on the 3-dimensional vector space over the Rational Field + From: Free module of type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field To: Full MatrixSpace of 3 by 3 dense matrices over Rational Field sage: a = V.sym_bilinear_form() @@ -851,7 +874,8 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): sage: a[2,2], a[2,3] = 4, 5 sage: a[3,3] = 6 sage: a.display() - e^1⊗e^1 + 2 e^1⊗e^2 + 3 e^1⊗e^3 + 2 e^2⊗e^1 + 4 e^2⊗e^2 + 5 e^2⊗e^3 + 3 e^3⊗e^1 + 5 e^3⊗e^2 + 6 e^3⊗e^3 + e^1⊗e^1 + 2 e^1⊗e^2 + 3 e^1⊗e^3 + 2 e^2⊗e^1 + 4 e^2⊗e^2 + 5 e^2⊗e^3 + + 3 e^3⊗e^1 + 5 e^3⊗e^2 + 6 e^3⊗e^3 sage: phi_e_T02(a) [1 2 3] [2 4 5] @@ -860,15 +884,18 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): Same but explicitly in the subspace of symmetric bilinear forms:: sage: Sym2Vdual = V.dual_symmetric_power(2); Sym2Vdual - Free module of fully symmetric type-(0,2) tensors on the 3-dimensional vector space over the Rational Field + Free module of fully symmetric type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field sage: Sym2Vdual.is_submodule(T02) True sage: Sym2Vdual.rank() 6 sage: e_Sym2Vdual = Sym2Vdual.basis("e"); e_Sym2Vdual Standard basis on the - Free module of fully symmetric type-(0,2) tensors on the 3-dimensional vector space over the Rational Field - induced by Basis (e_1,e_2,e_3) on the 3-dimensional vector space over the Rational Field + Free module of fully symmetric type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field + induced by Basis (e_1,e_2,e_3) on the + 3-dimensional vector space over the Rational Field sage: W_basis = [phi_e_T02(b) for b in e_Sym2Vdual]; W_basis [ [1 0 0] [0 1 0] [0 0 1] [0 0 0] [0 0 0] [0 0 0] @@ -877,25 +904,34 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): ] sage: W = MatrixSpace(QQ, 3).submodule(W_basis); W Free module generated by {0, 1, 2, 3, 4, 5} over Rational Field - sage: phi_e_Sym2Vdual = Sym2Vdual.isomorphism_with_fixed_basis(e_Sym2Vdual, codomain=W); phi_e_Sym2Vdual + sage: phi_e_Sym2Vdual = Sym2Vdual.isomorphism_with_fixed_basis(e_Sym2Vdual, + ....: codomain=W) + sage: phi_e_Sym2Vdual Generic morphism: - From: Free module of fully symmetric type-(0,2) tensors on the 3-dimensional vector space over the Rational Field + From: Free module of fully symmetric type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field To: Free module generated by {0, 1, 2, 3, 4, 5} over Rational Field Sending tensors to elements of the tensor square of :class:`CombinatorialFreeModule`:: sage: T20 = V.tensor_module(2, 0); T20 - Free module of type-(2,0) tensors on the 3-dimensional vector space over the Rational Field + Free module of type-(2,0) tensors on the + 3-dimensional vector space over the Rational Field sage: e_T20 = T02.basis("e"); e_T20 Standard basis on the - Free module of type-(0,2) tensors on the 3-dimensional vector space over the Rational Field - induced by Basis (e_1,e_2,e_3) on the 3-dimensional vector space over the Rational Field + Free module of type-(0,2) tensors on the + 3-dimensional vector space over the Rational Field + induced by Basis (e_1,e_2,e_3) on the + 3-dimensional vector space over the Rational Field sage: W = CombinatorialFreeModule(QQ, [1, 2, 3]).tensor_square(); W - Free module generated by {1, 2, 3} over Rational Field # Free module generated by {1, 2, 3} over Rational Field + Free module generated by {1, 2, 3} over Rational Field + # Free module generated by {1, 2, 3} over Rational Field sage: phi_e_T20 = T20.isomorphism_with_fixed_basis(e_T20, codomain=W); phi_e_T20 Generic morphism: - From: Free module of type-(2,0) tensors on the 3-dimensional vector space over the Rational Field - To: Free module generated by {1, 2, 3} over Rational Field # Free module generated by {1, 2, 3} over Rational Field + From: Free module of type-(2,0) tensors on the + 3-dimensional vector space over the Rational Field + To: Free module generated by {1, 2, 3} over Rational Field + # Free module generated by {1, 2, 3} over Rational Field sage: t = T20.an_element(); t.display() 1/2 e_1⊗e_1 sage: phi_e_T20(t) @@ -940,13 +976,17 @@ def isomorphism_with_fixed_basis(self, basis=None, codomain=None): codomain_basis = Family(codomain.basis()) if isinstance(codomain_basis, TrivialFamily): - # assume that codomain basis keys are to be ignored - key_pairs = enumerate(basis.keys()) + # assume that codomain basis keys are to be ignored; + # need them several times, can't keep as generators + key_pairs = tuple(enumerate(basis.keys())) + basis_by_codomain_key = basis else: # assume that the keys of the codomain should be used - key_pairs = zip(codomain_basis.keys(), basis.keys()) - # Need them several times, can't keep as generators - key_pairs = tuple(key_pairs) + # need them several times, can't keep as generators + key_pairs = tuple(zip(codomain_basis.keys(), basis.keys())) + basis_by_codomain_key = {} + for codomain_key, domain_key in key_pairs: + basis_by_codomain_key[codomain_key] = basis[domain_key] def _isomorphism(x): r""" @@ -955,7 +995,21 @@ def _isomorphism(x): return codomain.sum(x[basis, domain_key] * codomain_basis[codomain_key] for codomain_key, domain_key in key_pairs) - return self.module_morphism(function=_isomorphism, codomain=codomain) + def _inverse(y): + r""" + Concrete isomorphism from ``codomain`` to ``self``. + """ + return self.linear_combination( + (basis_by_codomain_key[codomain_key], coefficient) + for codomain_key, coefficient in y.monomial_coefficients().items()) + + category = Modules(self.base_ring()) + homset = Hom(self, codomain, category) + isomorphism = SetIsomorphism(homset, _isomorphism) + inverse = SetIsomorphism(homset.reversed(), _inverse) + isomorphism._set_inverse(inverse) + inverse._set_inverse(isomorphism) + return isomorphism def _test_isomorphism_with_fixed_basis(self, **options): r""" @@ -3160,7 +3214,6 @@ def hom(self, codomain, matrix_rep, bases=None, name=None, for more documentation. """ - from sage.categories.homset import Hom homset = Hom(self, codomain) return homset(matrix_rep, bases=bases, name=name, latex_name=latex_name) From 9a95ad4a2a465c7150e638a7912808ada5364de5 Mon Sep 17 00:00:00 2001 From: gmou3 <32706872+gmou3@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:33:35 +0300 Subject: [PATCH 132/183] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Matthias Köppe --- .../groups/abelian_gps/abelian_group_element.py | 4 ++-- src/sage/groups/affine_gps/affine_group.py | 2 +- src/sage/groups/class_function.py | 2 +- src/sage/groups/finitely_presented.py | 2 +- src/sage/groups/galois_group.py | 4 ++-- src/sage/groups/generic.py | 8 ++++---- src/sage/groups/group.pyx | 2 +- src/sage/groups/group_exp.py | 2 +- src/sage/groups/libgap_morphism.py | 3 ++- src/sage/groups/libgap_wrapper.pyx | 4 ++-- src/sage/groups/matrix_gps/isometries.py | 2 +- .../perm_gps/partn_ref/refinement_binary.pyx | 14 +++++++------- .../perm_gps/partn_ref/refinement_matrices.pyx | 6 +++--- .../perm_gps/partn_ref/refinement_python.pyx | 14 +++++++------- .../groups/perm_gps/partn_ref/refinement_sets.pyx | 2 +- src/sage/groups/perm_gps/permgroup_element.pyx | 2 +- src/sage/groups/perm_gps/permgroup_named.py | 6 +++--- 17 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/sage/groups/abelian_gps/abelian_group_element.py b/src/sage/groups/abelian_gps/abelian_group_element.py index 3dc764dd7d0..ac279f71011 100644 --- a/src/sage/groups/abelian_gps/abelian_group_element.py +++ b/src/sage/groups/abelian_gps/abelian_group_element.py @@ -49,8 +49,8 @@ def is_AbelianGroupElement(x): """ - Return ``True`` if x is an abelian group element, i.e., an element of - type ``AbelianGroupElement``. + Return ``True`` if ``x`` is an abelian group element, i.e., an element of + type :class:`AbelianGroupElement`. EXAMPLES: Though the integer 3 is in the integers, and the integers have an abelian group structure, 3 is not an AbelianGroupElement:: diff --git a/src/sage/groups/affine_gps/affine_group.py b/src/sage/groups/affine_gps/affine_group.py index f0e4b3d27f4..7d27488ec59 100644 --- a/src/sage/groups/affine_gps/affine_group.py +++ b/src/sage/groups/affine_gps/affine_group.py @@ -186,7 +186,7 @@ def __init__(self, degree, ring): INPUT: - - ``degree`` -- integer; The degree of the affine group, that + - ``degree`` -- integer; the degree of the affine group, that is, the dimension of the affine space the group is acting on naturally diff --git a/src/sage/groups/class_function.py b/src/sage/groups/class_function.py index c7978b4283e..5d4dc0c1505 100644 --- a/src/sage/groups/class_function.py +++ b/src/sage/groups/class_function.py @@ -349,7 +349,7 @@ def __mul__(self, other): INPUT: - ``other`` -- either a number or a :class:`ClassFunction` of - the same group as ``self``; A number can be anything that + the same group as ``self``; a number can be anything that can be converted into GAP: integers, rational, and elements of certain number fields diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index 69bc261a17c..75a33a190f6 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -1536,7 +1536,7 @@ def epimorphisms(self, H): INPUT: - - `H` -- another group + - ``H`` -- another group EXAMPLES:: diff --git a/src/sage/groups/galois_group.py b/src/sage/groups/galois_group.py index b3460f32be8..36495c846ad 100644 --- a/src/sage/groups/galois_group.py +++ b/src/sage/groups/galois_group.py @@ -315,7 +315,7 @@ def fixed_field(self, name=None, polred=None, threshold=None): - ``name`` -- a variable name for the new field - ``polred`` -- whether to optimize the generator of the newly created field - for a simpler polynomial, using pari's polredbest; + for a simpler polynomial, using Pari's :pari:`polredbest`; defaults to ``True`` when the degree of the fixed field is at most 8 - ``threshold`` -- positive number; polred only performed if the cost @@ -381,7 +381,7 @@ def is_galois(self): @lazy_attribute def _gcdata(self): r""" - Return the Galois closure (ie, the finite field itself) together with the identity. + Return the Galois closure (i.e., the finite field itself) together with the identity. EXAMPLES:: diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index 86aebc74709..e69462ecc6b 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -698,8 +698,8 @@ def discrete_log(a, base, ord=None, bounds=None, operation='*', identity=None, i - ``bounds`` -- a priori bounds on the log - ``operation`` -- string: ``'*'``, ``'+'``, other - ``identity`` -- the group's identity - - ``inverse()`` - function of 1 argument ``x``, returning inverse of ``x`` - - ``op()`` - function of 2 arguments ``x``, ``y``, returning ``x*y`` in the group + - ``inverse`` -- function of 1 argument ``x``, returning inverse of ``x`` + - ``op`` -- function of 2 arguments ``x``, ``y``, returning ``x*y`` in the group - ``algorithm`` -- string denoting what algorithm to use for prime-order logarithms: ``'bsgs'``, ``'rho'``, ``'lambda'`` @@ -1211,8 +1211,8 @@ def order_from_multiple(P, m, plist=None, factorization=None, check=True, prefer the use of ``factorization`` - ``operation`` -- string: ``'+'`` (default), ``'*'`` or ``None`` - ``identity`` -- the identity element of the group - - ``inverse()`` -- function of 1 argument ``x``, returning inverse of ``x`` - - ``op()`` - function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group + - ``inverse`` -- function of 1 argument ``x``, returning inverse of ``x`` + - ``op`` -- function of 2 arguments ``x``, ``y`` returning ``x*y`` in the group .. NOTE:: diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index 32fe6d13941..3f1fb92e756 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -221,7 +221,7 @@ cdef class Group(Parent): def is_multiplicative(self): r""" - Return ``True`` if the group operation is given by \* (rather than +). + Return ``True`` if the group operation is given by ``*`` (rather than ``+``). Override for additive groups. diff --git a/src/sage/groups/group_exp.py b/src/sage/groups/group_exp.py index ccf6d62f147..49f2315eae3 100644 --- a/src/sage/groups/group_exp.py +++ b/src/sage/groups/group_exp.py @@ -147,7 +147,7 @@ def _apply_functor_to_morphism(self, f): - The above homomorphism, but between the corresponding multiplicative groups. - In the following example, ``self`` is the functor `GroupExp()` and `f` + In the following example, ``self`` is the functor :class:`GroupExp` and `f` is an endomorphism of the additive group of integers. EXAMPLES:: diff --git a/src/sage/groups/libgap_morphism.py b/src/sage/groups/libgap_morphism.py index ec48dda3776..e0f75e7bd4f 100644 --- a/src/sage/groups/libgap_morphism.py +++ b/src/sage/groups/libgap_morphism.py @@ -557,7 +557,8 @@ def preimage(self, S): def section(self): r""" - This method returns a section map of ``self`` by use of :meth:`lift`. + Return a section map of ``self`` by use of :meth:`lift`. + See :meth:`section` of :class:`sage.categories.map.Map`, as well. OUTPUT: an instance of :class:`sage.categories.morphism.SetMorphism` diff --git a/src/sage/groups/libgap_wrapper.pyx b/src/sage/groups/libgap_wrapper.pyx index abaf17f11d9..0cf0e8bfb31 100644 --- a/src/sage/groups/libgap_wrapper.pyx +++ b/src/sage/groups/libgap_wrapper.pyx @@ -260,7 +260,7 @@ class ParentLibGAP(SageObject): def gap(self): """ - Return the gap representation of ``self``. + Return the GAP representation of ``self``. OUTPUT: a :class:`~sage.libs.gap.element.GapElement` @@ -400,7 +400,7 @@ class ParentLibGAP(SageObject): INPUT: - ``i`` -- integer between `0` (inclusive) and :meth:`ngens` - (exclusive); The index of the generator + (exclusive); the index of the generator OUTPUT: the `i`-th generator of the group diff --git a/src/sage/groups/matrix_gps/isometries.py b/src/sage/groups/matrix_gps/isometries.py index baf0925d706..4763b13721a 100644 --- a/src/sage/groups/matrix_gps/isometries.py +++ b/src/sage/groups/matrix_gps/isometries.py @@ -47,7 +47,7 @@ class GroupOfIsometries(FinitelyGeneratedMatrixGroup_gap): A base class for Orthogonal matrix groups with a gap backend. Main difference to :class:`~sage.groups.matrix_gps.orthogonal.OrthogonalMatrixGroup_gap` - is that we can specify generators and a bilinear form. Following gap the group action is + is that we can specify generators and a bilinear form. Following GAP, the group action is from the right. INPUT: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx index 41891938e7a..1abbf635d9c 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx @@ -118,7 +118,7 @@ cdef class LinearBinaryCodeStruct(BinaryCodeStruct): INPUT: - - partition -- an optional list of lists partition of the columns; + - ``partition`` -- an optional list of lists partition of the columns; default is the unit partition EXAMPLES:: @@ -1055,15 +1055,15 @@ cdef inline int sort_by_function_codes(PartitionStack *PS, int start, int *degre def random_tests(num=50, n_max=50, k_max=6, nwords_max=200, perms_per_code=10, density_range=(.1,.9)): """ - Test to make sure that C(gamma(B)) == C(B) for random permutations gamma - and random codes B, and that is_isomorphic returns an isomorphism. + Test to make sure that ``C(gamma(B)) == C(B)`` for random permutations ``gamma`` + and random codes ``B``, and that :meth:`is_isomorphic` returns an isomorphism. INPUT: - - num -- run tests for this many codes - - n_max -- test codes with at most this many columns - - k_max -- test codes with at most this for dimension - - perms_per_code -- test each code with this many random permutations + - ``num`` -- run tests for this many codes + - ``n_max`` -- test codes with at most this many columns + - ``k_max`` -- test codes with at most this for dimension + - ``perms_per_code`` -- test each code with this many random permutations DISCUSSION: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx index 9fb97741746..7fa11c28343 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx @@ -130,7 +130,7 @@ cdef class MatrixStruct: INPUT: - - partition -- an optional list of lists partition of the columns; + - ``partition`` -- an optional list of lists partition of the columns; default is the unit partition. EXAMPLES:: @@ -298,8 +298,8 @@ cdef bint all_matrix_children_are_equivalent(PartitionStack *PS, void *S) noexce def random_tests(n=10, nrows_max=50, ncols_max=50, nsymbols_max=10, perms_per_matrix=5, density_range=(.1,.9)): """ - Test to make sure that C(gamma(M)) == C(M) for random permutations gamma - and random matrices M, and that M.is_isomorphic(gamma(M)) returns an + Test to make sure that ``C(gamma(M)) == C(M)`` for random permutations ``gamma`` + and random matrices ``M``, and that ``M.is_isomorphic(gamma(M))`` returns an isomorphism. INPUT: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx index 0dd869c1c95..96e3497fe42 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx @@ -408,9 +408,9 @@ def aut_gp_and_can_lab_python(S, partition, n, INPUT: - - S -- the object to examine - - partition -- an ordered partition, as a list of lists - - n -- the degree of the automorphism group to be computed + - ``S`` -- the object to examine + - ``partition`` -- an ordered partition, as a list of lists + - ``n`` -- the degree of the automorphism group to be computed :: @@ -493,10 +493,10 @@ def double_coset_python(S1, S2, partition1, ordering2, n, INPUT: - - S1, S2 -- the objects to examine - - partition1 -- an ordered partition, as a list of lists - - ordering2 -- represents a partition of the points of S2, as a relabeling of partition1 - - n -- the degree + - ``S1``, ``S2`` -- the objects to examine + - ``partition1`` -- an ordered partition, as a list of lists + - ``ordering2`` -- represents a partition of the points of ``S2``, as a relabeling of ``partition1`` + - ``n`` -- the degree :: diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx index a613b7b9c4a..0f951e7e097 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx @@ -697,7 +697,7 @@ def sets_modulo_perm_group(list generators, int max_size, - ``generators`` -- (list of lists) list of generators in list form - ``max_size`` -- (int) maximum size of subsets to be generated - ``indicate_mem_err`` -- (bool) whether to raise an error - if we run out of memory, or simply append a MemoryError + if we run out of memory, or simply append a :class:`MemoryError` instance to the end of the output EXAMPLES:: diff --git a/src/sage/groups/perm_gps/permgroup_element.pyx b/src/sage/groups/perm_gps/permgroup_element.pyx index 4c52b386294..c2a462d9727 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pyx +++ b/src/sage/groups/perm_gps/permgroup_element.pyx @@ -1119,7 +1119,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): cpdef ClonableIntArray _act_on_array_on_position(self, ClonableIntArray x): r""" - Return the right action of ``self`` on the ClonableIntArray + Return the right action of ``self`` on the :class:`ClonableIntArray` ``x``. This is the action on positions. EXAMPLES:: diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index cfc38b639de..c000d2cf105 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -1394,8 +1394,8 @@ def __init__(self, factors): gens.append([tuple(range(jumppoint, jumppoint + a))]) # make contribution to the generator that dihedralizes the # abelian group - genx.extend((jumppoint+i, jumppoint+a-i) - for i in range(1, (a//2)+1) if i != a-i) + genx.extend((jumppoint + i, jumppoint + a - i) + for i in range(1, (a//2) + 1) if i != a - i) jumppoint += a # If all of the direct factors are C2, then the action turning # each element into its inverse is trivial, and the @@ -2214,7 +2214,7 @@ class PrimitiveGroup(PermutationGroup_unique): - ``n`` -- positive integer. the index of the group in the GAP database, starting at 1 - OUTPUT: Tthe ``n``-th primitive group of degree ``d`` + OUTPUT: the ``n``-th primitive group of degree ``d`` EXAMPLES:: From 19f157ea4f57cd226f1cb30bd2e164abfd2cbb0a Mon Sep 17 00:00:00 2001 From: Giorgos Mousa Date: Fri, 12 Apr 2024 09:44:50 +0300 Subject: [PATCH 133/183] Revert abelian_gps/all.py and move a dash --- src/sage/groups/abelian_gps/all.py | 7 +++---- src/sage/groups/finitely_presented.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index fa418e36c0c..2bb91f85f3b 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -20,11 +20,10 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -# from dual_abelian_group import DualAbelianGroup +#from dual_abelian_group import DualAbelianGroup from .abelian_group import AbelianGroup, word_problem from .values import AbelianGroupWithValues -# .. TODO:: - -# Implement group homset, conversion of generator images to morphism +# TODO: +# Implement group homset, conversion of generator images to morphism from .abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index 75a33a190f6..a6ef6bb7395 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -1725,7 +1725,7 @@ def characteristic_varieties(self, ring=QQ, matrix_ideal=None, groebner=False): group `G`, see e.g. [CS1999a]_. Let `\Lambda` be the group algebra of `G/G'` and `\mathbb{T}` its associated algebraic variety (a torus). Each element `\xi\in\mathbb{T}` defines a local system of coefficients - and the `k` th-characteristic variety is + and the `k`-th characteristic variety is .. MATH:: From b807676f91e4b3027f9617d45a161670869db65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Fri, 12 Apr 2024 13:10:10 +0200 Subject: [PATCH 134/183] fix the doctests to use "in Fields()" --- src/sage/combinat/descent_algebra.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/sage/combinat/descent_algebra.py b/src/sage/combinat/descent_algebra.py index 3cc463b54bb..8ab3886012f 100644 --- a/src/sage/combinat/descent_algebra.py +++ b/src/sage/combinat/descent_algebra.py @@ -146,10 +146,10 @@ def __init__(self, R, n): True sage: B = DescentAlgebra(QQ, 4).B() - sage: B.is_field() + sage: B in Fields() False sage: B = DescentAlgebra(QQ, 1).B() - sage: B.is_field() + sage: B in Fields() True """ self._n = n @@ -161,7 +161,7 @@ def __init__(self, R, n): self._category = cat Parent.__init__(self, base=R, category=self._category.WithRealizations()) - def _repr_(self): + def _repr_(self) -> str: r""" Return a string representation of ``self``. @@ -261,7 +261,7 @@ def _element_constructor_(self, x): return CombinatorialFreeModule._element_constructor_(self, x) # We need to overwrite this since our basis elements must be indexed by tuples - def _repr_term(self, S): + def _repr_term(self, S) -> str: r""" EXAMPLES:: @@ -285,7 +285,7 @@ def product_on_basis(self, S, T): return self(self.to_B_basis(S) * self.to_B_basis(T)) @cached_method - def one_basis(self): + def one_basis(self) -> tuple: r""" Return the identity element, as per ``AlgebrasWithBasis.ParentMethods.one_basis``. @@ -331,7 +331,8 @@ def to_B_basis(self, S): n = self.realization_of()._n C = Compositions(n) - return B.sum_of_terms([(C.from_subset(T, n), (-1)**(len(S) - len(T))) + lenS = len(S) + return B.sum_of_terms([(C.from_subset(T, n), (-1)**(lenS - len(T))) for T in SubsetsSorted(S)]) def to_symmetric_group_algebra_on_basis(self, S): @@ -873,7 +874,7 @@ def _repr_(self) -> str: """ return "Category of bases of {}".format(self.base()) - def super_categories(self): + def super_categories(self) -> list: r""" The super categories of ``self``. @@ -889,7 +890,7 @@ def super_categories(self): return [self.base()._category, Realizations(self.base())] class ParentMethods: - def _repr_(self): + def _repr_(self) -> str: """ Text representation of this basis of a descent algebra. From f16eb4b17801d9f8b9ae333a3a14289410da0c3a Mon Sep 17 00:00:00 2001 From: David Roe Date: Sat, 13 Apr 2024 02:36:51 -0400 Subject: [PATCH 135/183] Revert "gh-36964: Add `# sage_setup: distribution` directives to all files, remove remaining `# coding: utf-8`" This reverts commit 6ecb1d8532bc9b59ec03a1c7f3b1ce86c6b43cdb, reversing changes made to 8ea5214695f742eccd34bd88600771b7121cdb9f. --- bootstrap | 3 +- build/bin/write-dockerfile.sh | 2 +- .../version_requirements.txt | 2 +- .../known-test-failures.json | 24 +- pkgs/sagemath-standard/setup.cfg | 1 + pkgs/sagemath-standard/setup.cfg.m4 | 1 + pkgs/sagemath-standard/setup.py | 73 ++--- pkgs/sagemath-standard/tox.ini | 4 +- src/Pipfile.m4 | 8 +- src/doc/en/developer/coding_basics.rst | 4 +- src/doc/en/developer/coding_in_python.rst | 5 +- .../en/developer/packaging_sage_library.rst | 25 +- src/doc/en/reference/calculus/index.rst | 2 - src/pyproject.toml.m4 | 164 ++--------- .../algebras/affine_nil_temperley_lieb.py | 1 - src/sage/algebras/algebra.py | 1 - src/sage/algebras/all.py | 59 +++- src/sage/algebras/all__sagemath_combinat.py | 37 --- src/sage/algebras/all__sagemath_modules.py | 14 - src/sage/algebras/all__sagemath_singular.py | 0 src/sage/algebras/askey_wilson.py | 1 - src/sage/algebras/associated_graded.py | 1 - src/sage/algebras/catalog.py | 1 - src/sage/algebras/cellular_basis.py | 1 - src/sage/algebras/clifford_algebra.py | 1 - .../algebras/clifford_algebra_element.pxd | 1 - .../algebras/clifford_algebra_element.pyx | 1 - src/sage/algebras/cluster_algebra.py | 1 - src/sage/algebras/commutative_dga.py | 1 - src/sage/algebras/down_up_algebra.py | 1 - .../algebras/exterior_algebra_groebner.pxd | 1 - .../algebras/exterior_algebra_groebner.pyx | 1 - .../finite_dimensional_algebras/all.py | 3 +- .../finite_dimensional_algebra.py | 1 - .../finite_dimensional_algebra_element.pxd | 1 - .../finite_dimensional_algebra_element.pyx | 1 - .../finite_dimensional_algebra_ideal.py | 1 - .../finite_dimensional_algebra_morphism.py | 1 - src/sage/algebras/finite_gca.py | 1 - src/sage/algebras/free_algebra.py | 1 - src/sage/algebras/free_algebra_element.py | 1 - src/sage/algebras/free_algebra_quotient.py | 1 - .../algebras/free_algebra_quotient_element.py | 1 - src/sage/algebras/free_zinbiel_algebra.py | 1 - src/sage/algebras/fusion_rings/all.py | 2 - src/sage/algebras/fusion_rings/f_matrix.py | 1 - .../fast_parallel_fmats_methods.pxd | 1 - .../fast_parallel_fmats_methods.pyx | 1 - .../fast_parallel_fusion_ring_braid_repn.pxd | 2 - .../fast_parallel_fusion_ring_braid_repn.pyx | 1 - .../algebras/fusion_rings/fusion_double.py | 1 - src/sage/algebras/fusion_rings/fusion_ring.py | 1 - .../algebras/fusion_rings/poly_tup_engine.pxd | 1 - .../algebras/fusion_rings/poly_tup_engine.pyx | 1 - .../algebras/fusion_rings/shm_managers.pxd | 1 - .../algebras/fusion_rings/shm_managers.pyx | 1 - src/sage/algebras/group_algebra.py | 1 - src/sage/algebras/hall_algebra.py | 1 - src/sage/algebras/hecke_algebras/all.py | 2 +- .../hecke_algebras/ariki_koike_algebra.py | 1 - .../hecke_algebras/cubic_hecke_algebra.py | 1 - .../hecke_algebras/cubic_hecke_base_ring.py | 1 - .../hecke_algebras/cubic_hecke_matrix_rep.py | 1 - src/sage/algebras/iwahori_hecke_algebra.py | 1 - src/sage/algebras/jordan_algebra.py | 1 - src/sage/algebras/letterplace/all.py | 1 - .../free_algebra_element_letterplace.pxd | 1 - .../free_algebra_element_letterplace.pyx | 1 - .../letterplace/free_algebra_letterplace.pxd | 1 - .../letterplace/free_algebra_letterplace.pyx | 1 - .../letterplace/letterplace_ideal.pyx | 1 - src/sage/algebras/lie_algebras/all.py | 9 +- .../lie_algebras/all__sagemath_modules.py | 0 .../lie_algebras/lie_algebra_element.pxd | 1 - .../lie_algebras/lie_algebra_element.pyx | 1 - .../abelian_lie_conformal_algebra.py | 1 - .../affine_lie_conformal_algebra.py | 1 - .../algebras/lie_conformal_algebras/all.py | 14 +- .../bosonic_ghosts_lie_conformal_algebra.py | 1 - .../lie_conformal_algebras/examples.py | 1 - .../fermionic_ghosts_lie_conformal_algebra.py | 1 - .../finitely_freely_generated_lca.py | 1 - .../free_bosons_lie_conformal_algebra.py | 1 - .../free_fermions_lie_conformal_algebra.py | 1 - .../freely_generated_lie_conformal_algebra.py | 1 - .../graded_lie_conformal_algebra.py | 1 - .../lie_conformal_algebra.py | 1 - .../lie_conformal_algebra_element.py | 1 - .../lie_conformal_algebra_with_basis.py | 1 - ..._conformal_algebra_with_structure_coefs.py | 1 - .../n2_lie_conformal_algebra.py | 1 - .../neveu_schwarz_lie_conformal_algebra.py | 1 - .../virasoro_lie_conformal_algebra.py | 1 - .../weyl_lie_conformal_algebra.py | 1 - src/sage/algebras/nil_coxeter_algebra.py | 1 - src/sage/algebras/octonion_algebra.pxd | 1 - src/sage/algebras/octonion_algebra.pyx | 1 - src/sage/algebras/orlik_solomon.py | 1 - src/sage/algebras/orlik_terao.py | 1 - src/sage/algebras/q_commuting_polynomials.py | 1 - src/sage/algebras/q_system.py | 1 - src/sage/algebras/quantum_clifford.py | 1 - .../quantum_groups/ace_quantum_onsager.py | 1 - src/sage/algebras/quantum_groups/all.py | 2 - .../algebras/quantum_groups/fock_space.py | 1 - src/sage/algebras/quantum_groups/q_numbers.py | 1 - .../quantum_groups/quantum_group_gap.py | 1 - .../quantum_groups/representations.py | 1 - .../quantum_matrix_coordinate_algebra.py | 1 - src/sage/algebras/quatalg/all.py | 3 +- .../algebras/quatalg/quaternion_algebra.py | 1 - .../quatalg/quaternion_algebra_cython.pyx | 1 - .../quatalg/quaternion_algebra_element.pxd | 1 - .../quatalg/quaternion_algebra_element.pyx | 1 - src/sage/algebras/quaternion_algebra.py | 1 - .../algebras/quaternion_algebra_element.py | 1 - .../algebras/rational_cherednik_algebra.py | 1 - src/sage/algebras/schur_algebra.py | 1 - src/sage/algebras/shuffle_algebra.py | 1 - src/sage/algebras/splitting_algebra.py | 1 - src/sage/algebras/steenrod/all.py | 4 +- .../algebras/steenrod/steenrod_algebra.py | 1 - .../steenrod/steenrod_algebra_bases.py | 1 - .../steenrod/steenrod_algebra_misc.py | 1 - .../steenrod/steenrod_algebra_mult.py | 1 - src/sage/algebras/tensor_algebra.py | 1 - src/sage/algebras/weyl_algebra.py | 1 - src/sage/algebras/yangian.py | 1 - src/sage/algebras/yokonuma_hecke_algebra.py | 1 - src/sage/all.py | 119 ++++---- src/sage/all__sagemath_bliss.py | 1 - src/sage/all__sagemath_categories.py | 3 +- src/sage/all__sagemath_coxeter3.py | 1 - src/sage/all__sagemath_environment.py | 1 - src/sage/all__sagemath_mcqd.py | 1 - src/sage/all__sagemath_meataxe.py | 1 - src/sage/all__sagemath_objects.py | 13 +- src/sage/all__sagemath_repl.py | 40 ++- src/sage/all__sagemath_sirocco.py | 1 - src/sage/all__sagemath_tdlib.py | 1 - src/sage/all_cmdline.py | 2 +- src/sage/arith/all.py | 109 ++++++-- src/sage/arith/all__sagemath_objects.py | 3 - src/sage/arith/constants.pxd | 1 - src/sage/arith/functions.pxd | 2 - src/sage/arith/functions.pyx | 1 - src/sage/arith/long.pxd | 1 - src/sage/arith/misc.py | 2 +- src/sage/arith/multi_modular.pxd | 1 - src/sage/arith/multi_modular.pyx | 1 - src/sage/arith/numerical_approx.pxd | 1 - src/sage/arith/numerical_approx.pyx | 1 - src/sage/arith/power.pxd | 1 - src/sage/arith/power.pyx | 1 - src/sage/arith/rational_reconstruction.pxd | 1 - src/sage/arith/rational_reconstruction.pyx | 1 - src/sage/arith/srange.pyx | 1 - src/sage/calculus/all.py | 242 ++++++++++++++++- src/sage/calculus/all__sagemath_categories.py | 1 - src/sage/calculus/all__sagemath_modules.py | 18 -- src/sage/calculus/calculus.py | 1 - src/sage/calculus/desolvers.py | 1 - src/sage/calculus/expr.py | 203 -------------- src/sage/calculus/functional.py | 1 - src/sage/calculus/functions.py | 1 - src/sage/calculus/integration.pyx | 1 - src/sage/calculus/interpolation.pxd | 1 - src/sage/calculus/interpolation.pyx | 1 - src/sage/calculus/interpolators.pyx | 1 - src/sage/calculus/ode.pxd | 1 - src/sage/calculus/ode.pyx | 1 - src/sage/calculus/predefined.py | 1 - src/sage/calculus/riemann.pyx | 1 - src/sage/calculus/test_sympy.py | 1 - src/sage/calculus/tests.py | 1 - src/sage/calculus/transforms/all.py | 4 +- src/sage/calculus/transforms/dft.py | 1 - src/sage/calculus/transforms/dwt.pxd | 1 - src/sage/calculus/transforms/dwt.pyx | 1 - src/sage/calculus/transforms/fft.pxd | 1 - src/sage/calculus/transforms/fft.pyx | 1 - src/sage/calculus/var.pyx | 1 - src/sage/calculus/wester.py | 1 - src/sage/categories/action.pxd | 1 - src/sage/categories/action.pyx | 1 - src/sage/categories/additive_groups.py | 1 - src/sage/categories/additive_magmas.py | 1 - src/sage/categories/additive_monoids.py | 1 - src/sage/categories/additive_semigroups.py | 1 - src/sage/categories/affine_weyl_groups.py | 1 - src/sage/categories/algebra_functor.py | 1 - src/sage/categories/algebra_ideals.py | 1 - src/sage/categories/algebra_modules.py | 1 - src/sage/categories/algebras.py | 1 - src/sage/categories/algebras_with_basis.py | 1 - src/sage/categories/all.py | 35 ++- src/sage/categories/all__sagemath_objects.py | 9 +- src/sage/categories/aperiodic_semigroups.py | 1 - src/sage/categories/associative_algebras.py | 1 - src/sage/categories/basic.py | 1 - src/sage/categories/bialgebras.py | 1 - src/sage/categories/bialgebras_with_basis.py | 1 - src/sage/categories/bimodules.py | 1 - src/sage/categories/cartesian_product.py | 1 - src/sage/categories/category.py | 1 - src/sage/categories/category_cy_helper.pxd | 2 - src/sage/categories/category_cy_helper.pyx | 1 - src/sage/categories/category_singleton.pxd | 1 - src/sage/categories/category_singleton.pyx | 1 - src/sage/categories/category_types.py | 1 - src/sage/categories/category_with_axiom.py | 1 - src/sage/categories/chain_complexes.py | 1 - src/sage/categories/classical_crystals.py | 1 - src/sage/categories/coalgebras.py | 1 - src/sage/categories/coalgebras_with_basis.py | 1 - src/sage/categories/coercion_methods.pyx | 1 - .../categories/commutative_additive_groups.py | 1 - .../commutative_additive_monoids.py | 1 - .../commutative_additive_semigroups.py | 1 - .../categories/commutative_algebra_ideals.py | 1 - src/sage/categories/commutative_algebras.py | 1 - .../categories/commutative_ring_ideals.py | 1 - src/sage/categories/commutative_rings.py | 1 - .../categories/complete_discrete_valuation.py | 1 - .../categories/complex_reflection_groups.py | 1 - ...eflection_or_generalized_coxeter_groups.py | 1 - .../covariant_functorial_construction.py | 1 - src/sage/categories/coxeter_group_algebras.py | 1 - src/sage/categories/coxeter_groups.py | 1 - src/sage/categories/crystals.py | 1 - src/sage/categories/cw_complexes.py | 1 - src/sage/categories/discrete_valuation.py | 1 - ...distributive_magmas_and_additive_magmas.py | 1 - src/sage/categories/division_rings.py | 1 - src/sage/categories/domains.py | 1 - src/sage/categories/drinfeld_modules.py | 1 - src/sage/categories/dual.py | 1 - src/sage/categories/enumerated_sets.py | 1 - src/sage/categories/euclidean_domains.py | 1 - .../examples/algebras_with_basis.py | 1 - src/sage/categories/examples/all.py | 1 - .../examples/commutative_additive_monoids.py | 1 - .../commutative_additive_semigroups.py | 1 - .../categories/examples/coxeter_groups.py | 1 - src/sage/categories/examples/crystals.py | 1 - src/sage/categories/examples/cw_complexes.py | 1 - src/sage/categories/examples/facade_sets.py | 1 - .../examples/filtered_algebras_with_basis.py | 1 - .../examples/filtered_modules_with_basis.py | 1 - .../examples/finite_coxeter_groups.py | 1 - .../finite_dimensional_algebras_with_basis.py | 1 - ...ite_dimensional_lie_algebras_with_basis.py | 1 - .../examples/finite_enumerated_sets.py | 1 - .../categories/examples/finite_monoids.py | 1 - .../categories/examples/finite_semigroups.py | 1 - .../categories/examples/finite_weyl_groups.py | 1 - ...aded_connected_hopf_algebras_with_basis.py | 1 - .../examples/graded_modules_with_basis.py | 1 - src/sage/categories/examples/graphs.py | 1 - .../examples/hopf_algebras_with_basis.py | 1 - .../examples/infinite_enumerated_sets.py | 1 - src/sage/categories/examples/lie_algebras.py | 1 - .../examples/lie_algebras_with_basis.py | 1 - src/sage/categories/examples/magmas.py | 1 - src/sage/categories/examples/manifolds.py | 1 - src/sage/categories/examples/monoids.py | 1 - src/sage/categories/examples/posets.py | 1 - src/sage/categories/examples/semigroups.py | 1 - .../categories/examples/semigroups_cython.pyx | 1 - src/sage/categories/examples/sets_cat.py | 1 - .../categories/examples/sets_with_grading.py | 1 - .../categories/examples/with_realizations.py | 1 - src/sage/categories/facade_sets.py | 1 - src/sage/categories/fields.py | 1 - src/sage/categories/filtered_algebras.py | 1 - .../filtered_algebras_with_basis.py | 1 - .../filtered_hopf_algebras_with_basis.py | 1 - src/sage/categories/filtered_modules.py | 1 - .../categories/filtered_modules_with_basis.py | 1 - .../finite_complex_reflection_groups.py | 1 - src/sage/categories/finite_coxeter_groups.py | 1 - src/sage/categories/finite_crystals.py | 1 - .../finite_dimensional_algebras_with_basis.py | 1 - ...inite_dimensional_bialgebras_with_basis.py | 1 - ...inite_dimensional_coalgebras_with_basis.py | 1 - ...ensional_graded_lie_algebras_with_basis.py | 1 - ...te_dimensional_hopf_algebras_with_basis.py | 1 - ...ite_dimensional_lie_algebras_with_basis.py | 1 - .../finite_dimensional_modules_with_basis.py | 1 - ...ional_nilpotent_lie_algebras_with_basis.py | 1 - ...ensional_semisimple_algebras_with_basis.py | 1 - src/sage/categories/finite_enumerated_sets.py | 1 - src/sage/categories/finite_fields.py | 1 - src/sage/categories/finite_groups.py | 1 - src/sage/categories/finite_lattice_posets.py | 1 - src/sage/categories/finite_monoids.py | 1 - .../categories/finite_permutation_groups.py | 1 - src/sage/categories/finite_posets.py | 1 - src/sage/categories/finite_semigroups.py | 1 - src/sage/categories/finite_sets.py | 1 - src/sage/categories/finite_weyl_groups.py | 1 - ...itely_generated_lambda_bracket_algebras.py | 1 - ...nitely_generated_lie_conformal_algebras.py | 1 - .../categories/finitely_generated_magmas.py | 1 - .../finitely_generated_semigroups.py | 1 - src/sage/categories/function_fields.py | 1 - src/sage/categories/functor.pxd | 1 - src/sage/categories/functor.pyx | 1 - src/sage/categories/g_sets.py | 1 - src/sage/categories/gcd_domains.py | 1 - .../categories/generalized_coxeter_groups.py | 1 - src/sage/categories/graded_algebras.py | 1 - .../categories/graded_algebras_with_basis.py | 1 - src/sage/categories/graded_bialgebras.py | 1 - .../graded_bialgebras_with_basis.py | 1 - src/sage/categories/graded_coalgebras.py | 1 - .../graded_coalgebras_with_basis.py | 1 - src/sage/categories/graded_hopf_algebras.py | 1 - .../graded_hopf_algebras_with_basis.py | 1 - src/sage/categories/graded_lie_algebras.py | 1 - .../graded_lie_algebras_with_basis.py | 1 - .../graded_lie_conformal_algebras.py | 1 - src/sage/categories/graded_modules.py | 1 - .../categories/graded_modules_with_basis.py | 1 - src/sage/categories/graphs.py | 1 - src/sage/categories/group_algebras.py | 1 - src/sage/categories/groupoid.py | 1 - src/sage/categories/groups.py | 1 - src/sage/categories/h_trivial_semigroups.py | 1 - src/sage/categories/hecke_modules.py | 1 - .../categories/highest_weight_crystals.py | 1 - src/sage/categories/homset.py | 1 - src/sage/categories/homsets.py | 1 - src/sage/categories/hopf_algebras.py | 1 - .../categories/hopf_algebras_with_basis.py | 1 - .../categories/infinite_enumerated_sets.py | 1 - src/sage/categories/integral_domains.py | 1 - src/sage/categories/isomorphic_objects.py | 1 - src/sage/categories/j_trivial_semigroups.py | 1 - src/sage/categories/kac_moody_algebras.py | 1 - src/sage/categories/l_trivial_semigroups.py | 1 - .../categories/lambda_bracket_algebras.py | 1 - .../lambda_bracket_algebras_with_basis.py | 1 - src/sage/categories/lattice_posets.py | 1 - src/sage/categories/left_modules.py | 1 - src/sage/categories/lie_algebras.py | 1 - .../categories/lie_algebras_with_basis.py | 1 - src/sage/categories/lie_conformal_algebras.py | 1 - .../lie_conformal_algebras_with_basis.py | 1 - src/sage/categories/lie_groups.py | 1 - src/sage/categories/loop_crystals.py | 1 - src/sage/categories/magmas.py | 1 - .../categories/magmas_and_additive_magmas.py | 1 - src/sage/categories/magmatic_algebras.py | 1 - src/sage/categories/manifolds.py | 1 - src/sage/categories/map.pxd | 1 - src/sage/categories/map.pyx | 1 - src/sage/categories/matrix_algebras.py | 1 - src/sage/categories/metric_spaces.py | 1 - .../categories/modular_abelian_varieties.py | 1 - src/sage/categories/modules.py | 1 - src/sage/categories/modules_with_basis.py | 1 - src/sage/categories/monoid_algebras.py | 1 - src/sage/categories/monoids.py | 1 - src/sage/categories/morphism.pxd | 1 - src/sage/categories/morphism.pyx | 1 - src/sage/categories/number_fields.py | 1 - src/sage/categories/objects.py | 1 - .../categories/partially_ordered_monoids.py | 1 - src/sage/categories/permutation_groups.py | 1 - src/sage/categories/pointed_sets.py | 1 - src/sage/categories/polyhedra.py | 1 - src/sage/categories/poor_man_map.py | 1 - src/sage/categories/posets.py | 1 - src/sage/categories/primer.py | 1 - .../categories/principal_ideal_domains.py | 1 - src/sage/categories/pushout.py | 1 - .../quantum_group_representations.py | 1 - src/sage/categories/quotient_fields.py | 1 - src/sage/categories/quotients.py | 1 - src/sage/categories/r_trivial_semigroups.py | 1 - src/sage/categories/realizations.py | 1 - src/sage/categories/regular_crystals.py | 1 - src/sage/categories/regular_supercrystals.py | 1 - src/sage/categories/right_modules.py | 1 - src/sage/categories/ring_ideals.py | 1 - src/sage/categories/rings.py | 1 - src/sage/categories/rngs.py | 1 - src/sage/categories/schemes.py | 1 - src/sage/categories/semigroups.py | 1 - src/sage/categories/semirings.py | 1 - src/sage/categories/semisimple_algebras.py | 1 - src/sage/categories/sets_cat.py | 1 - src/sage/categories/sets_with_grading.py | 1 - src/sage/categories/sets_with_partial_maps.py | 1 - src/sage/categories/shephard_groups.py | 1 - src/sage/categories/signed_tensor.py | 1 - src/sage/categories/simplicial_complexes.py | 1 - src/sage/categories/simplicial_sets.py | 1 - src/sage/categories/subobjects.py | 1 - src/sage/categories/subquotients.py | 1 - src/sage/categories/super_algebras.py | 1 - .../categories/super_algebras_with_basis.py | 1 - .../super_hopf_algebras_with_basis.py | 1 - .../super_lie_conformal_algebras.py | 1 - src/sage/categories/super_modules.py | 1 - .../categories/super_modules_with_basis.py | 1 - .../categories/supercommutative_algebras.py | 1 - src/sage/categories/supercrystals.py | 1 - src/sage/categories/tensor.py | 1 - src/sage/categories/topological_spaces.py | 1 - .../triangular_kac_moody_algebras.py | 1 - src/sage/categories/tutorial.py | 1 - .../unique_factorization_domains.py | 1 - src/sage/categories/unital_algebras.py | 1 - src/sage/categories/vector_bundles.py | 1 - src/sage/categories/vector_spaces.py | 1 - src/sage/categories/weyl_groups.py | 1 - src/sage/categories/with_realizations.py | 1 - src/sage/coding/abstract_code.py | 1 - src/sage/coding/ag_code.py | 1 - src/sage/coding/ag_code_decoders.pyx | 1 - src/sage/coding/all.py | 15 +- src/sage/coding/all__sagemath_gap.py | 0 src/sage/coding/bch_code.py | 1 - src/sage/coding/binary_code.pxd | 1 - src/sage/coding/binary_code.pyx | 1 - src/sage/coding/bounds_catalog.py | 1 - src/sage/coding/channel.py | 1 - src/sage/coding/channels_catalog.py | 1 - src/sage/coding/code_bounds.py | 1 - src/sage/coding/code_constructions.py | 1 - src/sage/coding/codecan/all.py | 1 - src/sage/coding/codecan/all__sagemath_gap.py | 0 .../coding/codecan/autgroup_can_label.pyx | 1 - src/sage/coding/codecan/codecan.pxd | 1 - src/sage/coding/codecan/codecan.pyx | 1 - src/sage/coding/codes_catalog.py | 1 - src/sage/coding/cyclic_code.py | 1 - src/sage/coding/databases.py | 1 - src/sage/coding/decoder.py | 1 - src/sage/coding/decoders_catalog.py | 1 - src/sage/coding/delsarte_bounds.py | 1 - src/sage/coding/encoder.py | 1 - src/sage/coding/encoders_catalog.py | 1 - src/sage/coding/extended_code.py | 1 - src/sage/coding/gabidulin_code.py | 1 - src/sage/coding/golay_code.py | 1 - src/sage/coding/goppa_code.py | 1 - src/sage/coding/grs_code.py | 1 - src/sage/coding/guava.py | 1 - src/sage/coding/guruswami_sudan/all.py | 1 - src/sage/coding/guruswami_sudan/gs_decoder.py | 1 - .../coding/guruswami_sudan/interpolation.py | 1 - src/sage/coding/guruswami_sudan/utils.py | 1 - src/sage/coding/hamming_code.py | 1 - src/sage/coding/information_set_decoder.py | 1 - src/sage/coding/kasami_codes.pyx | 1 - src/sage/coding/linear_code.py | 1 - src/sage/coding/linear_code_no_metric.py | 1 - src/sage/coding/linear_rank_metric.py | 1 - src/sage/coding/parity_check_code.py | 1 - src/sage/coding/punctured_code.py | 1 - src/sage/coding/reed_muller_code.py | 1 - src/sage/coding/self_dual_codes.py | 1 - src/sage/coding/source_coding/all.py | 4 +- src/sage/coding/source_coding/huffman.py | 1 - src/sage/coding/subfield_subcode.py | 1 - src/sage/coding/two_weight_db.py | 1 - src/sage/combinat/abstract_tree.py | 1 - src/sage/combinat/affine_permutation.py | 1 - src/sage/combinat/algebraic_combinatorics.py | 1 - src/sage/combinat/all.py | 256 +++++++++++++++++- src/sage/combinat/all__sagemath_categories.py | 33 --- src/sage/combinat/all__sagemath_combinat.py | 201 -------------- src/sage/combinat/all__sagemath_flint.py | 0 src/sage/combinat/all__sagemath_gap.py | 0 src/sage/combinat/all__sagemath_graphs.py | 33 --- src/sage/combinat/all__sagemath_modules.py | 6 - src/sage/combinat/alternating_sign_matrix.py | 1 - src/sage/combinat/backtrack.py | 1 - src/sage/combinat/baxter_permutations.py | 1 - src/sage/combinat/bijectionist.py | 1 - .../combinat/binary_recurrence_sequences.py | 1 - src/sage/combinat/binary_tree.py | 1 - src/sage/combinat/blob_algebra.py | 1 - src/sage/combinat/cartesian_product.py | 1 - src/sage/combinat/catalog_partitions.py | 1 - src/sage/combinat/chas/all.py | 3 - src/sage/combinat/chas/fsym.py | 1 - src/sage/combinat/chas/wqsym.py | 1 - .../combinat/cluster_algebra_quiver/all.py | 4 +- .../cluster_algebra_quiver/cluster_seed.py | 1 - .../cluster_algebra_quiver/interact.py | 1 - .../cluster_algebra_quiver/mutation_class.py | 1 - .../cluster_algebra_quiver/mutation_type.py | 1 - .../combinat/cluster_algebra_quiver/quiver.py | 1 - .../quiver_mutation_type.py | 1 - src/sage/combinat/cluster_complex.py | 1 - src/sage/combinat/colored_permutations.py | 1 - src/sage/combinat/combinat.py | 1 - src/sage/combinat/combinat_cython.pxd | 1 - src/sage/combinat/combinat_cython.pyx | 1 - src/sage/combinat/combination.py | 1 - src/sage/combinat/combinatorial_map.py | 1 - src/sage/combinat/composition.py | 1 - src/sage/combinat/composition_signed.py | 1 - src/sage/combinat/composition_tableau.py | 1 - src/sage/combinat/constellation.py | 1 - src/sage/combinat/core.py | 1 - src/sage/combinat/counting.py | 1 - src/sage/combinat/crystals/affine.py | 1 - .../combinat/crystals/affine_factorization.py | 1 - src/sage/combinat/crystals/affinization.py | 1 - src/sage/combinat/crystals/alcove_path.py | 1 - src/sage/combinat/crystals/all.py | 3 - src/sage/combinat/crystals/bkk_crystals.py | 1 - src/sage/combinat/crystals/catalog.py | 1 - .../crystals/catalog_elementary_crystals.py | 1 - .../crystals/catalog_infinity_crystals.py | 1 - .../crystals/catalog_kirillov_reshetikhin.py | 1 - src/sage/combinat/crystals/crystals.py | 1 - src/sage/combinat/crystals/direct_sum.py | 1 - .../combinat/crystals/elementary_crystals.py | 1 - src/sage/combinat/crystals/fast_crystals.py | 1 - .../fully_commutative_stable_grothendieck.py | 1 - .../crystals/generalized_young_walls.py | 1 - .../crystals/highest_weight_crystals.py | 1 - .../combinat/crystals/induced_structure.py | 1 - .../combinat/crystals/infinity_crystals.py | 1 - src/sage/combinat/crystals/kac_modules.py | 1 - .../combinat/crystals/kirillov_reshetikhin.py | 1 - .../combinat/crystals/kyoto_path_model.py | 1 - src/sage/combinat/crystals/letters.pxd | 1 - src/sage/combinat/crystals/letters.pyx | 1 - src/sage/combinat/crystals/littelmann_path.py | 1 - .../combinat/crystals/monomial_crystals.py | 1 - src/sage/combinat/crystals/multisegments.py | 1 - src/sage/combinat/crystals/mv_polytopes.py | 1 - src/sage/combinat/crystals/pbw_crystal.py | 1 - src/sage/combinat/crystals/pbw_datum.pxd | 2 - src/sage/combinat/crystals/pbw_datum.pyx | 1 - .../crystals/polyhedral_realization.py | 1 - src/sage/combinat/crystals/spins.pxd | 1 - src/sage/combinat/crystals/spins.pyx | 1 - src/sage/combinat/crystals/star_crystal.py | 1 - src/sage/combinat/crystals/subcrystal.py | 1 - src/sage/combinat/crystals/tensor_product.py | 1 - .../crystals/tensor_product_element.pxd | 1 - .../crystals/tensor_product_element.pyx | 1 - src/sage/combinat/crystals/virtual_crystal.py | 1 - .../combinat/cyclic_sieving_phenomenon.py | 1 - src/sage/combinat/debruijn_sequence.pyx | 2 +- src/sage/combinat/decorated_permutation.py | 1 - src/sage/combinat/degree_sequences.pyx | 1 - src/sage/combinat/derangements.py | 1 - src/sage/combinat/descent_algebra.py | 1 - src/sage/combinat/designs/all.py | 8 +- src/sage/combinat/designs/bibd.py | 1 - src/sage/combinat/designs/block_design.py | 1 - src/sage/combinat/designs/covering_array.py | 1 - src/sage/combinat/designs/covering_design.py | 1 - src/sage/combinat/designs/database.py | 1 - src/sage/combinat/designs/design_catalog.py | 1 - src/sage/combinat/designs/designs_pyx.pxd | 1 - src/sage/combinat/designs/designs_pyx.pyx | 1 - .../combinat/designs/difference_family.py | 1 - .../combinat/designs/difference_matrices.py | 1 - .../designs/evenly_distributed_sets.pyx | 1 - src/sage/combinat/designs/ext_rep.py | 1 - .../designs/gen_quadrangles_with_spread.pyx | 1 - .../designs/group_divisible_designs.py | 1 - .../combinat/designs/incidence_structures.py | 1 - src/sage/combinat/designs/latin_squares.py | 1 - .../combinat/designs/orthogonal_arrays.py | 1 - .../orthogonal_arrays_build_recursive.py | 1 - .../orthogonal_arrays_find_recursive.pyx | 1 - src/sage/combinat/designs/resolvable_bibd.py | 1 - .../designs/steiner_quadruple_systems.py | 1 - .../combinat/designs/subhypergraph_search.pyx | 1 - src/sage/combinat/designs/twographs.py | 1 - src/sage/combinat/diagram.py | 1 - src/sage/combinat/diagram_algebras.py | 1 - src/sage/combinat/dlx.py | 1 - src/sage/combinat/dyck_word.py | 1 - src/sage/combinat/e_one_star.py | 1 - src/sage/combinat/enumerated_sets.py | 1 - .../combinat/enumeration_mod_permgroup.pxd | 1 - .../combinat/enumeration_mod_permgroup.pyx | 1 - src/sage/combinat/expnums.pyx | 1 - src/sage/combinat/family.py | 1 - src/sage/combinat/fast_vector_partitions.pyx | 2 +- src/sage/combinat/finite_state_machine.py | 1 - .../finite_state_machine_generators.py | 1 - src/sage/combinat/fqsym.py | 1 - src/sage/combinat/free_dendriform_algebra.py | 1 - src/sage/combinat/free_module.py | 1 - src/sage/combinat/free_prelie_algebra.py | 1 - .../combinat/fully_commutative_elements.py | 1 - src/sage/combinat/fully_packed_loop.py | 1 - src/sage/combinat/gelfand_tsetlin_patterns.py | 1 - src/sage/combinat/graph_path.py | 1 - src/sage/combinat/gray_codes.py | 1 - src/sage/combinat/grossman_larson_algebras.py | 1 - src/sage/combinat/growth.py | 1 - src/sage/combinat/hall_polynomial.py | 1 - src/sage/combinat/hillman_grassl.py | 1 - src/sage/combinat/integer_lists/__init__.py | 1 - src/sage/combinat/integer_lists/base.pxd | 1 - src/sage/combinat/integer_lists/base.pyx | 1 - src/sage/combinat/integer_lists/invlex.pxd | 1 - src/sage/combinat/integer_lists/invlex.pyx | 1 - src/sage/combinat/integer_lists/lists.py | 1 - src/sage/combinat/integer_lists/nn.py | 1 - src/sage/combinat/integer_matrices.py | 1 - src/sage/combinat/integer_vector.py | 1 - src/sage/combinat/integer_vector_weighted.py | 1 - .../combinat/integer_vectors_mod_permgroup.py | 1 - src/sage/combinat/interval_posets.py | 1 - src/sage/combinat/k_tableau.py | 1 - src/sage/combinat/kazhdan_lusztig.py | 1 - src/sage/combinat/key_polynomial.py | 1 - src/sage/combinat/knutson_tao_puzzles.py | 1 - src/sage/combinat/lr_tableau.py | 1 - src/sage/combinat/matrices/all.py | 7 +- .../matrices/all__sagemath_categories.py | 4 - src/sage/combinat/matrices/dancing_links.pyx | 2 +- src/sage/combinat/matrices/dlxcpp.py | 1 - src/sage/combinat/matrices/hadamard_matrix.py | 1 - src/sage/combinat/matrices/latin.py | 1 - src/sage/combinat/misc.py | 1 - .../multiset_partition_into_sets_ordered.py | 1 - src/sage/combinat/ncsf_qsym/all.py | 10 +- src/sage/combinat/ncsf_qsym/combinatorics.py | 1 - .../combinat/ncsf_qsym/generic_basis_code.py | 1 - src/sage/combinat/ncsf_qsym/ncsf.py | 1 - src/sage/combinat/ncsf_qsym/qsym.py | 1 - src/sage/combinat/ncsf_qsym/tutorial.py | 1 - src/sage/combinat/ncsym/all.py | 10 +- src/sage/combinat/ncsym/bases.py | 1 - src/sage/combinat/ncsym/dual.py | 1 - src/sage/combinat/ncsym/ncsym.py | 1 - src/sage/combinat/necklace.py | 1 - .../non_decreasing_parking_function.py | 1 - src/sage/combinat/nu_dyck_word.py | 1 - src/sage/combinat/nu_tamari_lattice.py | 1 - src/sage/combinat/ordered_tree.py | 1 - src/sage/combinat/output.py | 1 - src/sage/combinat/parallelogram_polyomino.py | 1 - src/sage/combinat/parking_functions.py | 1 - src/sage/combinat/partition.py | 1 - src/sage/combinat/partition_algebra.py | 1 - src/sage/combinat/partition_kleshchev.py | 1 - .../combinat/partition_shifting_algebras.py | 1 - src/sage/combinat/partition_tuple.py | 1 - src/sage/combinat/partitions.pyx | 1 - src/sage/combinat/path_tableaux/all.py | 2 - src/sage/combinat/path_tableaux/catalog.py | 1 - src/sage/combinat/path_tableaux/dyck_path.py | 1 - src/sage/combinat/path_tableaux/frieze.py | 1 - .../combinat/path_tableaux/path_tableau.py | 1 - .../combinat/path_tableaux/semistandard.py | 1 - src/sage/combinat/perfect_matching.py | 1 - src/sage/combinat/permutation.py | 1 - src/sage/combinat/permutation_cython.pxd | 1 - src/sage/combinat/permutation_cython.pyx | 1 - src/sage/combinat/plane_partition.py | 1 - src/sage/combinat/posets/all.py | 9 +- .../combinat/posets/all__sagemath_flint.py | 0 src/sage/combinat/posets/cartesian_product.py | 1 - src/sage/combinat/posets/d_complete.py | 1 - src/sage/combinat/posets/elements.py | 1 - src/sage/combinat/posets/forest.py | 1 - src/sage/combinat/posets/hasse_cython.pyx | 1 - .../combinat/posets/hasse_cython_flint.pyx | 1 - src/sage/combinat/posets/hasse_diagram.py | 1 - .../combinat/posets/incidence_algebras.py | 1 - src/sage/combinat/posets/lattices.py | 1 - .../posets/linear_extension_iterator.pyx | 1 - src/sage/combinat/posets/linear_extensions.py | 1 - src/sage/combinat/posets/mobile.py | 1 - src/sage/combinat/posets/moebius_algebra.py | 1 - src/sage/combinat/posets/poset_examples.py | 1 - src/sage/combinat/posets/posets.py | 1 - src/sage/combinat/q_analogues.py | 1 - src/sage/combinat/q_bernoulli.pyx | 1 - src/sage/combinat/quickref.py | 1 - src/sage/combinat/ranker.py | 1 - src/sage/combinat/recognizable_series.py | 1 - src/sage/combinat/regular_sequence.py | 1 - src/sage/combinat/restricted_growth.py | 1 - src/sage/combinat/ribbon.py | 1 - src/sage/combinat/ribbon_shaped_tableau.py | 1 - src/sage/combinat/ribbon_tableau.py | 1 - .../combinat/rigged_configurations/all.py | 3 - .../bij_abstract_class.py | 1 - .../rigged_configurations/bij_infinity.py | 1 - .../rigged_configurations/bij_type_A.py | 1 - .../rigged_configurations/bij_type_A2_dual.py | 1 - .../rigged_configurations/bij_type_A2_even.py | 1 - .../rigged_configurations/bij_type_A2_odd.py | 1 - .../rigged_configurations/bij_type_B.py | 1 - .../rigged_configurations/bij_type_C.py | 1 - .../rigged_configurations/bij_type_D.py | 1 - .../rigged_configurations/bij_type_D_tri.py | 1 - .../bij_type_D_twisted.py | 1 - .../rigged_configurations/bij_type_E67.py | 1 - .../rigged_configurations/bijection.py | 1 - .../rigged_configurations/kleber_tree.py | 1 - .../rigged_configurations/kr_tableaux.py | 1 - .../rigged_configurations/rc_crystal.py | 1 - .../rigged_configurations/rc_infinity.py | 1 - .../rigged_configuration_element.py | 1 - .../rigged_configurations.py | 1 - .../rigged_partition.pxd | 1 - .../rigged_partition.pyx | 1 - .../tensor_product_kr_tableaux.py | 1 - .../tensor_product_kr_tableaux_element.py | 1 - src/sage/combinat/root_system/all.py | 25 +- .../combinat/root_system/all__sagemath_gap.py | 0 .../combinat/root_system/ambient_space.py | 1 - .../combinat/root_system/associahedron.py | 1 - .../root_system/braid_move_calculator.py | 1 - src/sage/combinat/root_system/braid_orbit.pyx | 1 - .../combinat/root_system/branching_rules.py | 1 - .../combinat/root_system/cartan_matrix.py | 1 - src/sage/combinat/root_system/cartan_type.py | 1 - .../combinat/root_system/coxeter_group.py | 1 - .../combinat/root_system/coxeter_matrix.py | 1 - src/sage/combinat/root_system/coxeter_type.py | 1 - .../combinat/root_system/dynkin_diagram.py | 1 - .../root_system/extended_affine_weyl_group.py | 1 - .../combinat/root_system/fundamental_group.py | 1 - .../hecke_algebra_representation.py | 1 - .../root_system/integrable_representations.py | 1 - .../non_symmetric_macdonald_polynomials.py | 1 - .../combinat/root_system/pieri_factors.py | 1 - src/sage/combinat/root_system/plot.py | 1 - .../root_system/reflection_group_c.pyx | 1 - .../root_system/reflection_group_complex.py | 1 - .../root_system/reflection_group_element.pxd | 1 - .../root_system/reflection_group_element.pyx | 1 - .../root_system/reflection_group_real.py | 1 - .../root_lattice_realization_algebras.py | 1 - .../root_system/root_lattice_realizations.py | 1 - src/sage/combinat/root_system/root_space.py | 1 - src/sage/combinat/root_system/root_system.py | 1 - src/sage/combinat/root_system/type_A.py | 1 - .../combinat/root_system/type_A_affine.py | 1 - .../combinat/root_system/type_A_infinity.py | 1 - src/sage/combinat/root_system/type_B.py | 1 - .../combinat/root_system/type_BC_affine.py | 1 - .../combinat/root_system/type_B_affine.py | 1 - src/sage/combinat/root_system/type_C.py | 1 - .../combinat/root_system/type_C_affine.py | 1 - src/sage/combinat/root_system/type_D.py | 1 - .../combinat/root_system/type_D_affine.py | 1 - src/sage/combinat/root_system/type_E.py | 1 - .../combinat/root_system/type_E_affine.py | 1 - src/sage/combinat/root_system/type_F.py | 1 - .../combinat/root_system/type_F_affine.py | 1 - src/sage/combinat/root_system/type_G.py | 1 - .../combinat/root_system/type_G_affine.py | 1 - src/sage/combinat/root_system/type_H.py | 1 - src/sage/combinat/root_system/type_I.py | 1 - src/sage/combinat/root_system/type_Q.py | 1 - src/sage/combinat/root_system/type_affine.py | 1 - src/sage/combinat/root_system/type_dual.py | 1 - src/sage/combinat/root_system/type_folded.py | 1 - src/sage/combinat/root_system/type_marked.py | 1 - .../combinat/root_system/type_reducible.py | 1 - src/sage/combinat/root_system/type_relabel.py | 1 - src/sage/combinat/root_system/type_super_A.py | 1 - .../weight_lattice_realizations.py | 1 - src/sage/combinat/root_system/weight_space.py | 1 - .../combinat/root_system/weyl_characters.py | 1 - src/sage/combinat/root_system/weyl_group.py | 1 - src/sage/combinat/rooted_tree.py | 1 - src/sage/combinat/rsk.py | 1 - src/sage/combinat/schubert_polynomial.py | 1 - src/sage/combinat/set_partition.py | 1 - src/sage/combinat/set_partition_iterator.pyx | 1 - src/sage/combinat/set_partition_ordered.py | 1 - src/sage/combinat/sf/all.py | 5 +- src/sage/combinat/sf/character.py | 1 - src/sage/combinat/sf/classical.py | 1 - src/sage/combinat/sf/dual.py | 1 - src/sage/combinat/sf/elementary.py | 1 - src/sage/combinat/sf/hall_littlewood.py | 1 - src/sage/combinat/sf/hecke.py | 1 - src/sage/combinat/sf/homogeneous.py | 1 - src/sage/combinat/sf/jack.py | 1 - src/sage/combinat/sf/k_dual.py | 1 - src/sage/combinat/sf/kfpoly.py | 1 - src/sage/combinat/sf/llt.py | 1 - src/sage/combinat/sf/macdonald.py | 1 - src/sage/combinat/sf/monomial.py | 1 - src/sage/combinat/sf/multiplicative.py | 1 - src/sage/combinat/sf/new_kschur.py | 1 - src/sage/combinat/sf/ns_macdonald.py | 1 - src/sage/combinat/sf/orthogonal.py | 1 - src/sage/combinat/sf/orthotriang.py | 1 - src/sage/combinat/sf/powersum.py | 1 - src/sage/combinat/sf/schur.py | 1 - src/sage/combinat/sf/sf.py | 1 - src/sage/combinat/sf/sfa.py | 1 - src/sage/combinat/sf/symplectic.py | 1 - src/sage/combinat/sf/witt.py | 1 - src/sage/combinat/shard_order.py | 1 - src/sage/combinat/shifted_primed_tableau.py | 1 - src/sage/combinat/shuffle.py | 1 - src/sage/combinat/sidon_sets.py | 1 - src/sage/combinat/similarity_class_type.py | 1 - src/sage/combinat/sine_gordon.py | 1 - src/sage/combinat/six_vertex_model.py | 1 - src/sage/combinat/skew_partition.py | 1 - src/sage/combinat/skew_tableau.py | 1 - src/sage/combinat/sloane_functions.py | 1 - src/sage/combinat/specht_module.py | 1 - src/sage/combinat/species/all.py | 2 - .../species/characteristic_species.py | 1 - .../combinat/species/composition_species.py | 1 - src/sage/combinat/species/cycle_species.py | 1 - src/sage/combinat/species/empty_species.py | 1 - .../species/functorial_composition_species.py | 1 - .../combinat/species/generating_series.py | 1 - src/sage/combinat/species/library.py | 1 - .../combinat/species/linear_order_species.py | 1 - src/sage/combinat/species/misc.py | 1 - .../combinat/species/partition_species.py | 1 - .../combinat/species/permutation_species.py | 1 - src/sage/combinat/species/product_species.py | 1 - .../combinat/species/recursive_species.py | 1 - src/sage/combinat/species/set_species.py | 1 - src/sage/combinat/species/species.py | 1 - src/sage/combinat/species/structure.py | 1 - src/sage/combinat/species/subset_species.py | 1 - src/sage/combinat/species/sum_species.py | 1 - src/sage/combinat/subset.py | 1 - src/sage/combinat/subsets_hereditary.py | 1 - src/sage/combinat/subsets_pairwise.py | 1 - src/sage/combinat/subword.py | 1 - src/sage/combinat/subword_complex.py | 1 - src/sage/combinat/subword_complex_c.pyx | 1 - src/sage/combinat/super_tableau.py | 1 - src/sage/combinat/superpartition.py | 1 - src/sage/combinat/symmetric_group_algebra.py | 1 - .../symmetric_group_representations.py | 1 - src/sage/combinat/t_sequences.py | 1 - src/sage/combinat/tableau.py | 1 - src/sage/combinat/tableau_residues.py | 1 - src/sage/combinat/tableau_tuple.py | 1 - src/sage/combinat/tamari_lattices.py | 1 - src/sage/combinat/tiling.py | 1 - src/sage/combinat/tools.py | 1 - src/sage/combinat/triangles_FHM.py | 1 - src/sage/combinat/tuple.py | 1 - src/sage/combinat/tutorial.py | 1 - src/sage/combinat/vector_partition.py | 1 - src/sage/combinat/words/abstract_word.py | 1 - src/sage/combinat/words/all.py | 22 +- src/sage/combinat/words/alphabet.py | 1 - src/sage/combinat/words/finite_word.py | 1 - src/sage/combinat/words/infinite_word.py | 1 - src/sage/combinat/words/lyndon_word.py | 1 - src/sage/combinat/words/morphic.py | 1 - src/sage/combinat/words/morphism.py | 1 - src/sage/combinat/words/paths.py | 1 - src/sage/combinat/words/shuffle_product.py | 1 - src/sage/combinat/words/suffix_trees.py | 1 - src/sage/combinat/words/word.py | 1 - src/sage/combinat/words/word_char.pyx | 1 - src/sage/combinat/words/word_datatypes.pxd | 1 - src/sage/combinat/words/word_datatypes.pyx | 1 - src/sage/combinat/words/word_generators.py | 1 - .../combinat/words/word_infinite_datatypes.py | 1 - src/sage/combinat/words/word_options.py | 1 - src/sage/combinat/words/words.py | 1 - src/sage/combinat/yang_baxter_graph.py | 1 - src/sage/cpython/__init__.py | 1 - src/sage/cpython/_py2_random.py | 1 - src/sage/cpython/all.py | 1 - src/sage/cpython/atexit.pyx | 2 +- src/sage/cpython/builtin_types.pyx | 1 - src/sage/cpython/cython_metaclass.pxd | 1 - src/sage/cpython/cython_metaclass.pyx | 1 - src/sage/cpython/debug.pyx | 1 - src/sage/cpython/dict_del_by_value.pxd | 1 - src/sage/cpython/dict_del_by_value.pyx | 1 - src/sage/cpython/getattr.pxd | 1 - src/sage/cpython/getattr.pyx | 1 - src/sage/cpython/pycore_long.pxd | 1 - src/sage/cpython/python_debug.pxd | 1 - src/sage/cpython/string.pxd | 1 - src/sage/cpython/string.pyx | 2 +- src/sage/cpython/type.pxd | 1 - src/sage/cpython/type.pyx | 1 - src/sage/cpython/wrapperdescr.pxd | 1 - src/sage/cpython/wrapperdescr.pyx | 1 - src/sage/crypto/__init__.py | 1 - src/sage/crypto/all.py | 8 +- src/sage/crypto/block_cipher/all.py | 2 - src/sage/crypto/block_cipher/des.py | 1 - src/sage/crypto/block_cipher/miniaes.py | 1 - src/sage/crypto/block_cipher/present.py | 1 - src/sage/crypto/block_cipher/sdes.py | 1 - src/sage/crypto/boolean_function.pxd | 1 - src/sage/crypto/boolean_function.pyx | 2 +- src/sage/crypto/cipher.py | 1 - src/sage/crypto/classical.py | 1 - src/sage/crypto/classical_cipher.py | 1 - src/sage/crypto/cryptosystem.py | 1 - src/sage/crypto/lattice.py | 1 - src/sage/crypto/lfsr.py | 1 - src/sage/crypto/lwe.py | 1 - src/sage/crypto/mq/__init__.py | 1 - .../crypto/mq/mpolynomialsystemgenerator.py | 1 - src/sage/crypto/mq/rijndael_gf.py | 1 - src/sage/crypto/mq/sbox.py | 1 - src/sage/crypto/mq/sr.py | 1 - src/sage/crypto/public_key/all.py | 2 - src/sage/crypto/public_key/blum_goldwasser.py | 1 - src/sage/crypto/sbox.pyx | 1 - src/sage/crypto/sboxes.py | 1 - src/sage/crypto/stream.py | 1 - src/sage/crypto/stream_cipher.py | 1 - src/sage/crypto/util.py | 1 - src/sage/data_structures/all.py | 3 +- .../all__sagemath_categories.py | 1 - .../data_structures/all__sagemath_combinat.py | 0 .../data_structures/all__sagemath_flint.py | 0 src/sage/data_structures/binary_matrix.pxd | 1 - src/sage/data_structures/binary_search.pxd | 3 +- src/sage/data_structures/binary_search.pyx | 1 - src/sage/data_structures/bitset.pxd | 1 - src/sage/data_structures/bitset.pyx | 1 - src/sage/data_structures/bitset_base.pxd | 1 - src/sage/data_structures/bitset_base.pyx | 1 - src/sage/data_structures/blas_dict.pxd | 1 - src/sage/data_structures/blas_dict.pyx | 2 +- .../bounded_integer_sequences.pxd | 1 - .../bounded_integer_sequences.pyx | 1 - src/sage/data_structures/list_of_pairs.pxd | 1 - src/sage/data_structures/list_of_pairs.pyx | 1 - src/sage/data_structures/mutable_poset.py | 1 - src/sage/data_structures/sparse_bitset.pxd | 1 - src/sage/data_structures/stream.py | 1 - src/sage/databases/all.py | 21 +- src/sage/databases/all__sagemath_graphs.py | 0 src/sage/databases/conway.py | 1 + src/sage/databases/cubic_hecke_db.py | 1 + src/sage/databases/findstat.py | 1 + src/sage/databases/knotinfo_db.py | 2 +- src/sage/databases/oeis.py | 1 + src/sage/databases/sql_db.py | 1 + src/sage/doctest/__init__.py | 1 - src/sage/doctest/all.py | 2 - src/sage/doctest/control.py | 1 - src/sage/doctest/external.py | 1 - src/sage/doctest/fixtures.py | 1 - src/sage/doctest/forker.py | 13 +- src/sage/doctest/parsing.py | 2 +- src/sage/doctest/reporting.py | 2 +- src/sage/doctest/sources.py | 1 - src/sage/doctest/test.py | 1 - src/sage/doctest/util.py | 1 - src/sage/dynamics/all.py | 14 +- src/sage/dynamics/all__sagemath_schemes.py | 1 - src/sage/dynamics/all__sagemath_symbolics.py | 5 - .../dynamics/arithmetic_dynamics/affine_ds.py | 1 - src/sage/dynamics/arithmetic_dynamics/all.py | 18 +- .../arithmetic_dynamics/berkovich_ds.py | 1 - .../dynamical_semigroup.py | 1 - .../endPN_automorphism_group.py | 1 - .../endPN_minimal_model.py | 1 - .../arithmetic_dynamics/generic_ds.py | 1 - .../product_projective_ds.py | 1 - .../arithmetic_dynamics/projective_ds.py | 2 +- .../projective_ds_helper.pyx | 1 - .../dynamics/arithmetic_dynamics/wehlerK3.py | 1 - src/sage/dynamics/cellular_automata/all.py | 1 - .../dynamics/cellular_automata/elementary.py | 1 + src/sage/dynamics/cellular_automata/glca.py | 1 + src/sage/dynamics/complex_dynamics/all.py | 2 - .../dynamics/complex_dynamics/mandel_julia.py | 1 - .../complex_dynamics/mandel_julia_helper.pyx | 1 - src/sage/env.py | 1 - src/sage/ext/all__sagemath_categories.py | 2 - src/sage/ext/all__sagemath_modules.py | 0 src/sage/ext/all__sagemath_objects.py | 1 - src/sage/ext/all__sagemath_pari.py | 0 src/sage/ext/all__sagemath_symbolics.py | 0 src/sage/ext/cplusplus.pxd | 1 - src/sage/ext/fast_callable.pxd | 1 - src/sage/ext/fast_callable.pyx | 1 - src/sage/ext/fast_eval.pxd | 1 - src/sage/ext/fast_eval.pyx | 1 - src/sage/ext/memory.pyx | 1 - src/sage/ext/mod_int.pxd | 1 - src/sage/ext/stdsage.pxd | 1 - src/sage/ext_data/all__sagemath_gap.py | 0 src/sage/ext_data/all__sagemath_singular.py | 0 src/sage/features/__init__.py | 2 +- src/sage/features/all.py | 1 - src/sage/features/bliss.py | 1 - src/sage/features/cddlib.py | 1 - src/sage/features/csdp.py | 2 +- src/sage/features/cython.py | 1 - src/sage/features/databases.py | 1 - src/sage/features/dvipng.py | 1 - src/sage/features/ffmpeg.py | 1 - src/sage/features/four_ti_2.py | 1 - src/sage/features/fricas.py | 1 - src/sage/features/gap.py | 1 - src/sage/features/gfan.py | 1 - src/sage/features/graph_generators.py | 1 - src/sage/features/graphviz.py | 1 - src/sage/features/igraph.py | 1 - src/sage/features/imagemagick.py | 1 - src/sage/features/interfaces.py | 1 - src/sage/features/internet.py | 1 - src/sage/features/join_feature.py | 1 - src/sage/features/kenzo.py | 1 - src/sage/features/latex.py | 1 - src/sage/features/latte.py | 1 - src/sage/features/lrs.py | 2 +- src/sage/features/mcqd.py | 1 - src/sage/features/meataxe.py | 1 - src/sage/features/mip_backends.py | 1 - src/sage/features/msolve.py | 2 +- src/sage/features/nauty.py | 1 - src/sage/features/normaliz.py | 1 - src/sage/features/palp.py | 1 - src/sage/features/pandoc.py | 2 +- src/sage/features/pdf2svg.py | 1 - src/sage/features/phitigra.py | 1 - src/sage/features/pkg_systems.py | 1 - src/sage/features/polymake.py | 1 - src/sage/features/poppler.py | 1 - src/sage/features/rubiks.py | 1 - src/sage/features/sagemath.py | 1 - src/sage/features/singular.py | 1 - src/sage/features/sphinx.py | 1 - src/sage/features/standard.py | 1 - src/sage/features/symengine_py.py | 1 - src/sage/features/tdlib.py | 1 - src/sage/functions/airy.py | 1 - src/sage/functions/all.py | 128 +++++---- src/sage/functions/bessel.py | 1 - src/sage/functions/error.py | 1 - src/sage/functions/exp_integral.py | 1 - src/sage/functions/gamma.py | 1 - src/sage/functions/generalized.py | 1 - src/sage/functions/hyperbolic.py | 1 - src/sage/functions/hypergeometric.py | 1 - src/sage/functions/jacobi.py | 1 - src/sage/functions/log.py | 1 - src/sage/functions/min_max.py | 1 - src/sage/functions/orthogonal_polys.py | 1 - src/sage/functions/other.py | 1 - src/sage/functions/piecewise.py | 1 - src/sage/functions/prime_pi.pyx | 1 - src/sage/functions/special.py | 1 - src/sage/functions/spike_function.py | 1 - src/sage/functions/transcendental.py | 1 - src/sage/functions/trig.py | 1 - src/sage/functions/wigner.py | 1 - src/sage/game_theory/all.py | 2 - src/sage/game_theory/catalog.py | 1 - .../game_theory/catalog_normal_form_games.py | 1 - src/sage/game_theory/cooperative_game.py | 1 - src/sage/game_theory/gambit_docs.py | 1 - src/sage/game_theory/matching_game.py | 1 - src/sage/game_theory/normal_form_game.py | 2 +- src/sage/game_theory/parser.py | 1 - src/sage/games/all.py | 9 +- src/sage/games/hexad.py | 1 - src/sage/games/quantumino.py | 2 +- src/sage/games/sudoku.py | 1 - src/sage/games/sudoku_backtrack.pyx | 1 - src/sage/geometry/abc.pyx | 1 - src/sage/geometry/all.py | 29 +- src/sage/geometry/all__sagemath_categories.py | 0 src/sage/geometry/all__sagemath_gap.py | 5 - src/sage/geometry/all__sagemath_linbox.py | 0 src/sage/geometry/all__sagemath_modules.py | 4 - src/sage/geometry/all__sagemath_polyhedra.py | 20 -- src/sage/geometry/all__sagemath_symbolics.py | 7 - src/sage/geometry/cone.py | 1 - src/sage/geometry/cone_catalog.py | 1 - src/sage/geometry/convex_set.py | 1 - src/sage/geometry/fan.py | 1 - src/sage/geometry/fan_isomorphism.py | 1 - src/sage/geometry/fan_morphism.py | 1 - src/sage/geometry/hasse_diagram.py | 1 - src/sage/geometry/hyperbolic_space/all.py | 2 - .../hyperbolic_space/hyperbolic_coercion.py | 1 - .../hyperbolic_space/hyperbolic_constants.py | 1 - .../hyperbolic_space/hyperbolic_geodesic.py | 1 - .../hyperbolic_space/hyperbolic_interface.py | 1 - .../hyperbolic_space/hyperbolic_isometry.py | 1 - .../hyperbolic_space/hyperbolic_model.py | 1 - .../hyperbolic_space/hyperbolic_point.py | 1 - .../hyperplane_arrangement/affine_subspace.py | 1 - .../geometry/hyperplane_arrangement/all.py | 1 - .../hyperplane_arrangement/arrangement.py | 1 - .../hyperplane_arrangement/check_freeness.py | 1 - .../hyperplane_arrangement/hyperplane.py | 1 - .../hyperplane_arrangement/library.py | 1 - .../geometry/hyperplane_arrangement/plot.py | 1 - src/sage/geometry/integral_points.pxi | 1 - src/sage/geometry/integral_points.py | 1 - .../integral_points_generic_dense.pyx | 1 - .../integral_points_integer_dense.pyx | 1 - src/sage/geometry/lattice_polytope.py | 1 - src/sage/geometry/linear_expression.py | 1 - src/sage/geometry/newton_polygon.py | 1 - src/sage/geometry/palp_normal_form.pyx | 1 - src/sage/geometry/point_collection.pyx | 1 - src/sage/geometry/polyhedral_complex.py | 1 - src/sage/geometry/polyhedron/all.py | 5 +- src/sage/geometry/polyhedron/backend_cdd.py | 1 - .../geometry/polyhedron/backend_cdd_rdf.py | 1 - src/sage/geometry/polyhedron/backend_field.py | 1 - .../geometry/polyhedron/backend_normaliz.py | 1 - .../polyhedron/backend_number_field.py | 1 - .../geometry/polyhedron/backend_polymake.py | 1 - src/sage/geometry/polyhedron/backend_ppl.py | 1 - src/sage/geometry/polyhedron/base.py | 1 - src/sage/geometry/polyhedron/base0.py | 1 - src/sage/geometry/polyhedron/base1.py | 1 - src/sage/geometry/polyhedron/base2.py | 1 - src/sage/geometry/polyhedron/base3.py | 1 - src/sage/geometry/polyhedron/base4.py | 1 - src/sage/geometry/polyhedron/base5.py | 1 - src/sage/geometry/polyhedron/base6.py | 1 - src/sage/geometry/polyhedron/base7.py | 1 - src/sage/geometry/polyhedron/base_QQ.py | 1 - src/sage/geometry/polyhedron/base_RDF.py | 1 - src/sage/geometry/polyhedron/base_ZZ.py | 1 - src/sage/geometry/polyhedron/base_mutable.py | 1 - .../geometry/polyhedron/base_number_field.py | 1 - .../geometry/polyhedron/cdd_file_format.py | 1 - .../combinatorial_polyhedron/all.py | 1 - .../combinatorial_polyhedron/base.pxd | 1 - .../combinatorial_polyhedron/base.pyx | 1 - .../combinatorial_face.pxd | 1 - .../combinatorial_face.pyx | 1 - .../combinatorial_polyhedron/conversions.pxd | 1 - .../combinatorial_polyhedron/conversions.pyx | 1 - .../face_data_structure.pxd | 1 - .../face_iterator.pxd | 1 - .../face_iterator.pyx | 1 - .../face_list_data_structure.pxd | 1 - .../face_list_data_structure.pyx | 1 - .../list_of_faces.pxd | 1 - .../list_of_faces.pyx | 1 - .../polyhedron_face_lattice.pxd | 1 - .../polyhedron_face_lattice.pyx | 1 - src/sage/geometry/polyhedron/constructor.py | 1 - .../geometry/polyhedron/double_description.py | 1 - .../double_description_inhomogeneous.py | 1 - src/sage/geometry/polyhedron/face.py | 1 - .../polyhedron/generating_function.py | 1 - .../lattice_euclidean_group_element.py | 1 - src/sage/geometry/polyhedron/library.py | 1 - src/sage/geometry/polyhedron/misc.py | 1 - src/sage/geometry/polyhedron/modules/all.py | 1 - .../modules/formal_polyhedra_module.py | 1 - src/sage/geometry/polyhedron/palp_database.py | 1 - src/sage/geometry/polyhedron/parent.py | 1 - src/sage/geometry/polyhedron/plot.py | 1 - .../polyhedron/ppl_lattice_polygon.py | 1 - .../polyhedron/ppl_lattice_polytope.py | 1 - .../geometry/polyhedron/representation.py | 1 - src/sage/geometry/pseudolines.py | 1 - src/sage/geometry/relative_interior.py | 1 - src/sage/geometry/ribbon_graph.py | 1 - src/sage/geometry/riemannian_manifolds/all.py | 2 - .../parametrized_surface3d.py | 1 - .../surface3d_generators.py | 1 - src/sage/geometry/toric_lattice.py | 1 - src/sage/geometry/toric_lattice_element.pyx | 1 - src/sage/geometry/toric_plotter.py | 1 - src/sage/geometry/triangulation/all.py | 4 +- src/sage/geometry/triangulation/base.pyx | 1 - src/sage/geometry/triangulation/data.pxd | 1 - src/sage/geometry/triangulation/element.py | 1 - src/sage/geometry/triangulation/functions.pxd | 1 - .../triangulation/point_configuration.py | 1 - .../geometry/triangulation/triangulations.pxd | 1 - src/sage/geometry/voronoi_diagram.py | 1 - src/sage/graphs/all.py | 13 +- src/sage/graphs/all__sagemath_bliss.py | 1 - src/sage/graphs/all__sagemath_flint.py | 0 src/sage/graphs/all__sagemath_mcqd.py | 1 - src/sage/graphs/all__sagemath_tdlib.py | 1 - src/sage/graphs/asteroidal_triples.pyx | 1 - src/sage/graphs/base/all.py | 1 - src/sage/graphs/base/boost_graph.pxd | 1 - src/sage/graphs/base/boost_graph.pyx | 1 - src/sage/graphs/base/c_graph.pxd | 1 - src/sage/graphs/base/c_graph.pyx | 1 - src/sage/graphs/base/dense_graph.pxd | 1 - src/sage/graphs/base/dense_graph.pyx | 1 - src/sage/graphs/base/graph_backends.pxd | 1 - src/sage/graphs/base/graph_backends.pyx | 2 +- src/sage/graphs/base/overview.py | 1 - src/sage/graphs/base/sparse_graph.pxd | 1 - src/sage/graphs/base/sparse_graph.pyx | 1 - src/sage/graphs/base/static_dense_graph.pxd | 1 - src/sage/graphs/base/static_dense_graph.pyx | 1 - .../graphs/base/static_sparse_backend.pxd | 1 - .../graphs/base/static_sparse_backend.pyx | 1 - src/sage/graphs/base/static_sparse_graph.pxd | 1 - src/sage/graphs/base/static_sparse_graph.pyx | 1 - src/sage/graphs/bipartite_graph.py | 1 - src/sage/graphs/centrality.pyx | 1 - src/sage/graphs/chrompoly.pyx | 1 - src/sage/graphs/cliquer.pxd | 1 - src/sage/graphs/cliquer.pyx | 1 - src/sage/graphs/comparability.pyx | 1 - src/sage/graphs/connectivity.pxd | 1 - src/sage/graphs/connectivity.pyx | 1 - src/sage/graphs/convexity_properties.pxd | 1 - src/sage/graphs/convexity_properties.pyx | 1 - src/sage/graphs/digraph.py | 1 - src/sage/graphs/digraph_generators.py | 1 - src/sage/graphs/distances_all_pairs.pxd | 1 - src/sage/graphs/distances_all_pairs.pyx | 1 - src/sage/graphs/domination.py | 1 - src/sage/graphs/dot2tex_utils.py | 1 - src/sage/graphs/edge_connectivity.pyx | 1 - src/sage/graphs/generators/all.py | 1 - src/sage/graphs/generators/basic.py | 1 - src/sage/graphs/generators/chessboard.py | 1 - .../graphs/generators/classical_geometries.py | 1 - src/sage/graphs/generators/degree_sequence.py | 1 - .../graphs/generators/distance_regular.pyx | 1 - src/sage/graphs/generators/families.py | 1 - src/sage/graphs/generators/intersection.py | 1 - src/sage/graphs/generators/platonic_solids.py | 1 - src/sage/graphs/generators/random.py | 1 - src/sage/graphs/generators/smallgraphs.py | 1 - src/sage/graphs/generators/world_map.py | 1 - src/sage/graphs/generic_graph.py | 1 - src/sage/graphs/generic_graph_pyx.pxd | 1 - src/sage/graphs/generic_graph_pyx.pyx | 2 +- src/sage/graphs/genus.pyx | 1 - src/sage/graphs/graph.py | 1 - src/sage/graphs/graph_coloring.pyx | 1 - src/sage/graphs/graph_database.py | 1 - src/sage/graphs/graph_decompositions/all.py | 1 - .../all__sagemath_tdlib.py | 1 - .../graphs/graph_decompositions/bandwidth.pyx | 1 - .../clique_separators.pyx | 2 +- .../graphs/graph_decompositions/cutwidth.pyx | 1 - .../graph_decompositions/fast_digraph.pxd | 1 - .../graph_decompositions/fast_digraph.pyx | 1 - .../graph_decompositions/graph_products.pyx | 1 - .../modular_decomposition.py | 1 - .../graphs/graph_decompositions/rankwidth.pxd | 1 - .../graphs/graph_decompositions/rankwidth.pyx | 1 - .../tree_decomposition.pxd | 1 - .../tree_decomposition.pyx | 1 - .../vertex_separation.pxd | 1 - .../vertex_separation.pyx | 1 - src/sage/graphs/graph_editor.py | 1 - src/sage/graphs/graph_generators.py | 1 - src/sage/graphs/graph_generators_pyx.pyx | 1 - src/sage/graphs/graph_input.py | 1 - src/sage/graphs/graph_latex.py | 1 - src/sage/graphs/graph_list.py | 1 - src/sage/graphs/graph_plot.py | 1 - src/sage/graphs/graph_plot_js.py | 1 - src/sage/graphs/hyperbolicity.pyx | 1 - src/sage/graphs/hypergraph_generators.py | 1 - src/sage/graphs/independent_sets.pxd | 1 - src/sage/graphs/independent_sets.pyx | 1 - src/sage/graphs/isgci.py | 1 - .../graphs/isoperimetric_inequalities.pyx | 1 - src/sage/graphs/line_graph.pyx | 1 - src/sage/graphs/lovasz_theta.py | 1 - src/sage/graphs/matchpoly.pyx | 1 - src/sage/graphs/orientations.py | 1 - src/sage/graphs/partial_cube.py | 1 - src/sage/graphs/path_enumeration.pyx | 2 +- src/sage/graphs/planarity.pyx | 1 - src/sage/graphs/pq_trees.py | 1 - src/sage/graphs/print_graphs.py | 1 - src/sage/graphs/schnyder.py | 1 - src/sage/graphs/spanning_tree.pyx | 1 - src/sage/graphs/strongly_regular_db.pyx | 2 +- src/sage/graphs/traversals.pxd | 1 - src/sage/graphs/traversals.pyx | 2 +- src/sage/graphs/trees.pxd | 1 - src/sage/graphs/trees.pyx | 1 - src/sage/graphs/tutte_polynomial.py | 1 - src/sage/graphs/views.pyx | 1 - src/sage/graphs/weakly_chordal.pyx | 1 - src/sage/groups/abelian_gps/abelian_aut.py | 1 - src/sage/groups/abelian_gps/abelian_group.py | 1 - .../abelian_gps/abelian_group_element.py | 1 - .../groups/abelian_gps/abelian_group_gap.py | 1 - .../abelian_gps/abelian_group_morphism.py | 1 - src/sage/groups/abelian_gps/all.py | 16 +- .../groups/abelian_gps/all__sagemath_gap.py | 5 - .../abelian_gps/all__sagemath_modules.py | 4 - .../groups/abelian_gps/dual_abelian_group.py | 1 - .../abelian_gps/dual_abelian_group_element.py | 1 - src/sage/groups/abelian_gps/element_base.py | 1 - src/sage/groups/abelian_gps/values.py | 1 - .../additive_abelian_group.py | 1 - .../additive_abelian_wrapper.py | 1 - src/sage/groups/additive_abelian/all.py | 5 +- src/sage/groups/additive_abelian/qmodnz.py | 1 - .../groups/additive_abelian/qmodnz_element.py | 1 - src/sage/groups/affine_gps/affine_group.py | 1 - src/sage/groups/affine_gps/all.py | 1 - src/sage/groups/affine_gps/catalog.py | 1 - src/sage/groups/affine_gps/euclidean_group.py | 1 - src/sage/groups/affine_gps/group_element.py | 1 - src/sage/groups/all.py | 41 ++- src/sage/groups/all__sagemath_categories.py | 10 - src/sage/groups/all__sagemath_combinat.py | 0 src/sage/groups/all__sagemath_gap.py | 3 - src/sage/groups/all__sagemath_graphs.py | 0 src/sage/groups/all__sagemath_groups.py | 32 --- src/sage/groups/all__sagemath_modules.py | 11 - src/sage/groups/all__sagemath_objects.py | 0 src/sage/groups/all__sagemath_pari.py | 2 - src/sage/groups/artin.py | 1 - src/sage/groups/braid.py | 1 - src/sage/groups/cactus_group.py | 1 - src/sage/groups/class_function.py | 1 - src/sage/groups/conjugacy_classes.py | 1 - src/sage/groups/cubic_braid.py | 1 - src/sage/groups/finitely_presented.py | 1 - src/sage/groups/finitely_presented_catalog.py | 1 - src/sage/groups/finitely_presented_named.py | 1 - src/sage/groups/fqf_orthogonal.py | 1 - src/sage/groups/free_group.py | 1 - src/sage/groups/galois_group.py | 1 - src/sage/groups/galois_group_perm.py | 1 - src/sage/groups/generic.py | 1 - src/sage/groups/group.pxd | 1 - src/sage/groups/group.pyx | 1 - src/sage/groups/group_exp.py | 1 - src/sage/groups/group_semidirect_product.py | 1 - src/sage/groups/groups_catalog.py | 1 - src/sage/groups/indexed_free_group.py | 1 - src/sage/groups/kernel_subgroup.py | 1 - src/sage/groups/libgap_group.py | 1 - src/sage/groups/libgap_mixin.py | 1 - src/sage/groups/libgap_morphism.py | 1 - src/sage/groups/libgap_wrapper.pxd | 1 - src/sage/groups/libgap_wrapper.pyx | 1 - src/sage/groups/lie_gps/all.py | 1 - src/sage/groups/lie_gps/catalog.py | 1 - .../groups/lie_gps/nilpotent_lie_group.py | 1 - src/sage/groups/matrix_gps/all.py | 12 +- .../groups/matrix_gps/all__sagemath_gap.py | 0 .../matrix_gps/all__sagemath_modules.py | 12 - src/sage/groups/matrix_gps/binary_dihedral.py | 1 - src/sage/groups/matrix_gps/catalog.py | 1 - src/sage/groups/matrix_gps/coxeter_group.py | 1 - .../groups/matrix_gps/finitely_generated.py | 1 - .../matrix_gps/finitely_generated_gap.py | 1 - src/sage/groups/matrix_gps/group_element.pxd | 1 - src/sage/groups/matrix_gps/group_element.pyx | 1 - .../groups/matrix_gps/group_element_gap.pxd | 1 - .../groups/matrix_gps/group_element_gap.pyx | 1 - src/sage/groups/matrix_gps/heisenberg.py | 1 - src/sage/groups/matrix_gps/isometries.py | 1 - src/sage/groups/matrix_gps/linear.py | 1 - src/sage/groups/matrix_gps/linear_gap.py | 1 - src/sage/groups/matrix_gps/matrix_group.py | 1 - .../groups/matrix_gps/matrix_group_gap.py | 1 - src/sage/groups/matrix_gps/named_group.py | 1 - src/sage/groups/matrix_gps/named_group_gap.py | 1 - src/sage/groups/matrix_gps/orthogonal.py | 1 - src/sage/groups/matrix_gps/orthogonal_gap.py | 1 - src/sage/groups/matrix_gps/symplectic.py | 1 - src/sage/groups/matrix_gps/symplectic_gap.py | 1 - src/sage/groups/matrix_gps/unitary.py | 1 - src/sage/groups/matrix_gps/unitary_gap.py | 1 - src/sage/groups/misc_gps/all.py | 1 - src/sage/groups/misc_gps/argument_groups.py | 1 - src/sage/groups/misc_gps/imaginary_groups.py | 1 - src/sage/groups/misc_gps/misc_groups.py | 1 - .../groups/misc_gps/misc_groups_catalog.py | 1 - src/sage/groups/old.pxd | 1 - src/sage/groups/old.pyx | 1 - src/sage/groups/pari_group.py | 1 - src/sage/groups/perm_gps/all.py | 32 +-- .../perm_gps/all__sagemath_categories.py | 0 .../groups/perm_gps/all__sagemath_graphs.py | 0 .../groups/perm_gps/all__sagemath_modules.py | 0 src/sage/groups/perm_gps/constructor.py | 1 - src/sage/groups/perm_gps/cubegroup.py | 1 - src/sage/groups/perm_gps/partn_ref/all.py | 1 - .../partn_ref/all__sagemath_categories.py | 0 .../perm_gps/partn_ref/all__sagemath_gap.py | 0 .../partn_ref/all__sagemath_graphs.py | 0 .../partn_ref/all__sagemath_modules.py | 0 .../automorphism_group_canonical_label.pxd | 1 - .../automorphism_group_canonical_label.pyx | 1 - .../partn_ref/canonical_augmentation.pxd | 1 - .../partn_ref/canonical_augmentation.pyx | 1 - .../perm_gps/partn_ref/data_structures.pxd | 1 - .../perm_gps/partn_ref/data_structures.pyx | 1 - .../perm_gps/partn_ref/double_coset.pxd | 1 - .../perm_gps/partn_ref/double_coset.pyx | 1 - .../perm_gps/partn_ref/refinement_binary.pxd | 1 - .../perm_gps/partn_ref/refinement_binary.pyx | 1 - .../perm_gps/partn_ref/refinement_graphs.pxd | 1 - .../perm_gps/partn_ref/refinement_graphs.pyx | 1 - .../perm_gps/partn_ref/refinement_lists.pxd | 1 - .../perm_gps/partn_ref/refinement_lists.pyx | 1 - .../partn_ref/refinement_matrices.pxd | 1 - .../partn_ref/refinement_matrices.pyx | 1 - .../perm_gps/partn_ref/refinement_python.pxd | 1 - .../perm_gps/partn_ref/refinement_python.pyx | 1 - .../perm_gps/partn_ref/refinement_sets.pxd | 1 - .../perm_gps/partn_ref/refinement_sets.pyx | 1 - src/sage/groups/perm_gps/partn_ref2/all.py | 1 - .../partn_ref2/refinement_generic.pxd | 1 - .../partn_ref2/refinement_generic.pyx | 1 - src/sage/groups/perm_gps/permgroup.py | 1 - .../groups/perm_gps/permgroup_element.pxd | 1 - .../groups/perm_gps/permgroup_element.pyx | 1 - .../groups/perm_gps/permgroup_morphism.py | 1 - src/sage/groups/perm_gps/permgroup_named.py | 1 - .../perm_gps/permutation_groups_catalog.py | 1 - .../groups/perm_gps/symgp_conjugacy_class.py | 1 - src/sage/groups/raag.py | 1 - .../semimonomial_transformations/all.py | 1 - .../semimonomial_transformation.pxd | 1 - .../semimonomial_transformation.pyx | 1 - .../semimonomial_transformation_group.py | 1 - .../homology/algebraic_topological_model.py | 1 - src/sage/homology/all.py | 7 +- src/sage/homology/all__sagemath_modules.py | 7 - src/sage/homology/chain_complex.py | 2 +- src/sage/homology/chain_complex_homspace.py | 1 - src/sage/homology/chain_complex_morphism.py | 1 - src/sage/homology/chain_homotopy.py | 2 +- src/sage/homology/chains.py | 1 - src/sage/homology/free_resolution.py | 1 - src/sage/homology/graded_resolution.py | 1 - src/sage/homology/hochschild_complex.py | 1 - src/sage/homology/homology_group.py | 1 - src/sage/homology/homology_morphism.py | 1 - .../homology_vector_space_with_basis.py | 1 - src/sage/homology/koszul_complex.py | 1 - src/sage/homology/matrix_utils.py | 1 - src/sage/interacts/all.py | 11 +- src/sage/interfaces/abc.py | 1 - src/sage/interfaces/all.py | 16 +- .../interfaces/all__sagemath_categories.py | 0 src/sage/interfaces/all__sagemath_gap.py | 0 src/sage/interfaces/all__sagemath_libecm.py | 0 src/sage/interfaces/all__sagemath_pari.py | 0 src/sage/interfaces/all__sagemath_plot.py | 0 .../interfaces/all__sagemath_polyhedra.py | 1 - .../interfaces/all__sagemath_symbolics.py | 0 src/sage/interfaces/cleaner.py | 1 - src/sage/interfaces/ecm.py | 1 - src/sage/interfaces/expect.py | 1 - src/sage/interfaces/four_ti_2.py | 1 - src/sage/interfaces/fricas.py | 1 - src/sage/interfaces/frobby.py | 1 + src/sage/interfaces/gap.py | 2 +- src/sage/interfaces/gap3.py | 1 - src/sage/interfaces/gap_workspace.py | 1 - src/sage/interfaces/genus2reduction.py | 1 + src/sage/interfaces/giac.py | 1 - src/sage/interfaces/gnuplot.py | 1 - src/sage/interfaces/gp.py | 1 - src/sage/interfaces/interface.py | 1 - src/sage/interfaces/jmoldata.py | 1 - src/sage/interfaces/latte.py | 1 - src/sage/interfaces/magma.py | 1 - src/sage/interfaces/magma_free.py | 1 - src/sage/interfaces/maple.py | 1 - src/sage/interfaces/mathematica.py | 1 - src/sage/interfaces/mathics.py | 1 - src/sage/interfaces/maxima.py | 1 - src/sage/interfaces/maxima_abstract.py | 2 +- src/sage/interfaces/maxima_lib.py | 1 - src/sage/interfaces/povray.py | 1 - src/sage/interfaces/process.pxd | 1 - src/sage/interfaces/process.pyx | 1 - src/sage/interfaces/qepcad.py | 1 - src/sage/interfaces/quit.py | 1 - src/sage/interfaces/r.py | 1 + src/sage/interfaces/sage0.py | 1 - src/sage/interfaces/sagespawn.pyx | 1 - src/sage/interfaces/sympy.py | 1 - src/sage/interfaces/sympy_wrapper.py | 1 - src/sage/interfaces/tab_completion.py | 1 - src/sage/interfaces/tachyon.py | 1 - src/sage/interfaces/tides.py | 1 - src/sage/knots/all.py | 1 - src/sage/knots/gauss_code.py | 2 +- src/sage/knots/knot.py | 2 +- src/sage/knots/knot_table.py | 1 - src/sage/knots/knotinfo.py | 2 +- src/sage/knots/link.py | 1 - src/sage/lfunctions/all.py | 12 +- src/sage/lfunctions/all__sagemath_lcalc.py | 0 src/sage/lfunctions/lcalc.py | 1 - src/sage/lfunctions/pari.py | 1 + src/sage/libs/all.py | 30 +- src/sage/libs/all__sagemath_brial.py | 0 src/sage/libs/all__sagemath_combinat.py | 5 - src/sage/libs/all__sagemath_coxeter3.py | 1 - src/sage/libs/all__sagemath_eclib.py | 10 - src/sage/libs/all__sagemath_flint.py | 16 -- src/sage/libs/all__sagemath_gap.py | 3 - src/sage/libs/all__sagemath_giac.py | 0 src/sage/libs/all__sagemath_glpk.py | 0 src/sage/libs/all__sagemath_homfly.py | 0 src/sage/libs/all__sagemath_lcalc.py | 0 src/sage/libs/all__sagemath_libbraiding.py | 0 src/sage/libs/all__sagemath_libecm.py | 0 src/sage/libs/all__sagemath_linbox.py | 0 src/sage/libs/all__sagemath_meataxe.py | 1 - src/sage/libs/all__sagemath_modules.py | 0 src/sage/libs/all__sagemath_mpmath.py | 0 src/sage/libs/all__sagemath_ntl.py | 2 - src/sage/libs/all__sagemath_objects.py | 1 - src/sage/libs/all__sagemath_pari.py | 1 - src/sage/libs/all__sagemath_singular.py | 0 src/sage/libs/all__sagemath_sirocco.py | 1 - src/sage/libs/all__sagemath_symbolics.py | 4 - src/sage/libs/arb/__init__.py | 1 - src/sage/libs/arb/acb.pxd | 2 - src/sage/libs/arb/acb_calc.pxd | 2 - src/sage/libs/arb/acb_elliptic.pxd | 2 - src/sage/libs/arb/acb_hypgeom.pxd | 2 - src/sage/libs/arb/acb_mat.pxd | 2 - src/sage/libs/arb/acb_modular.pxd | 2 - src/sage/libs/arb/acb_poly.pxd | 2 - src/sage/libs/arb/arb.pxd | 2 - src/sage/libs/arb/arb_fmpz_poly.pxd | 2 - src/sage/libs/arb/arb_hypgeom.pxd | 2 - src/sage/libs/arb/arf.pxd | 2 - src/sage/libs/arb/arith.pyx | 1 - src/sage/libs/arb/bernoulli.pxd | 2 - src/sage/libs/arb/mag.pxd | 2 - src/sage/libs/arb/types.pxd | 2 - src/sage/libs/braiding.pyx | 1 - src/sage/libs/ecl.pxd | 1 - src/sage/libs/ecl.pyx | 1 - src/sage/libs/eclib/__init__.pxd | 1 - src/sage/libs/eclib/__init__.py | 1 - src/sage/libs/eclib/all.py | 10 +- src/sage/libs/eclib/constructor.py | 1 - src/sage/libs/eclib/homspace.pxd | 1 - src/sage/libs/eclib/homspace.pyx | 1 - src/sage/libs/eclib/interface.py | 1 - src/sage/libs/eclib/mat.pxd | 1 - src/sage/libs/eclib/mat.pyx | 1 - src/sage/libs/eclib/mwrank.pyx | 1 - src/sage/libs/eclib/newforms.pxd | 1 - src/sage/libs/eclib/newforms.pyx | 1 - src/sage/libs/flint/__init__.py | 1 - src/sage/libs/flint/arith.pxd | 1 - src/sage/libs/flint/arith.pyx | 2 - src/sage/libs/flint/flint.pxd | 1 - src/sage/libs/flint/fmpq.pxd | 1 - src/sage/libs/flint/fmpq_mat.pxd | 1 - src/sage/libs/flint/fmpq_poly.pxd | 1 - src/sage/libs/flint/fmpq_poly_sage.pyx | 1 - src/sage/libs/flint/fmpz.pxd | 1 - src/sage/libs/flint/fmpz_factor.pxd | 1 - src/sage/libs/flint/fmpz_factor_sage.pyx | 1 - src/sage/libs/flint/fmpz_mat.pxd | 1 - src/sage/libs/flint/fmpz_mod.pxd | 1 - src/sage/libs/flint/fmpz_mod_poly.pxd | 1 - src/sage/libs/flint/fmpz_poly.pxd | 1 - src/sage/libs/flint/fmpz_poly.pyx | 2 - src/sage/libs/flint/fmpz_poly_mat.pxd | 1 - src/sage/libs/flint/fmpz_poly_q.pxd | 1 - src/sage/libs/flint/fmpz_vec.pxd | 1 - src/sage/libs/flint/fq.pxd | 1 - src/sage/libs/flint/fq_nmod.pxd | 1 - src/sage/libs/flint/nmod_poly.pxd | 1 - src/sage/libs/flint/nmod_poly_linkage.pxi | 1 - src/sage/libs/flint/nmod_vec.pxd | 1 - src/sage/libs/flint/ntl_interface.pxd | 1 - src/sage/libs/flint/padic.pxd | 1 - src/sage/libs/flint/padic_poly.pxd | 1 - src/sage/libs/flint/qadic.pxd | 1 - src/sage/libs/flint/qsieve.pxd | 1 - src/sage/libs/flint/qsieve.pyx | 2 - src/sage/libs/flint/thread_pool.pxd | 1 - src/sage/libs/flint/types.pxd | 1 - src/sage/libs/flint/ulong_extras.pxd | 1 - src/sage/libs/flint/ulong_extras.pyx | 2 - src/sage/libs/gap/all.py | 1 - src/sage/libs/gap/all_documented_functions.py | 1 - src/sage/libs/gap/assigned_names.py | 1 - src/sage/libs/gap/context_managers.py | 1 - src/sage/libs/gap/element.pxd | 1 - src/sage/libs/gap/element.pyx | 1 - src/sage/libs/gap/gap_functions.py | 1 - src/sage/libs/gap/gap_globals.py | 1 - src/sage/libs/gap/gap_includes.pxd | 1 - src/sage/libs/gap/libgap.pyx | 1 - src/sage/libs/gap/operations.py | 1 - src/sage/libs/gap/saved_workspace.py | 1 - src/sage/libs/gap/test.py | 1 - src/sage/libs/gap/test_long.py | 1 - src/sage/libs/gap/util.pxd | 1 - src/sage/libs/gap/util.pyx | 1 - src/sage/libs/giac/__init__.py | 2 +- src/sage/libs/giac/auto-methods.pxi | 1 - src/sage/libs/giac/giac.pxd | 1 - src/sage/libs/giac/giac.pyx | 1 - src/sage/libs/giac/keywords.pxi | 1 - src/sage/libs/glpk/__init__.py | 1 - src/sage/libs/glpk/constants.pxd | 1 - src/sage/libs/glpk/env.pxd | 1 - src/sage/libs/glpk/error.pyx | 1 - src/sage/libs/glpk/graph.pxd | 1 - src/sage/libs/glpk/lp.pxd | 1 - src/sage/libs/glpk/types.pxd | 1 - src/sage/libs/gmp/__init__.py | 1 - src/sage/libs/gmp/all.pxd | 1 - src/sage/libs/gmp/binop.pxd | 1 - src/sage/libs/gmp/misc.pxd | 1 - src/sage/libs/gmp/mpf.pxd | 1 - src/sage/libs/gmp/mpn.pxd | 1 - src/sage/libs/gmp/mpq.pxd | 1 - src/sage/libs/gmp/mpz.pxd | 1 - src/sage/libs/gmp/pylong.pxd | 1 - src/sage/libs/gmp/pylong.pyx | 1 - src/sage/libs/gmp/random.pxd | 1 - src/sage/libs/gmp/randomize.pxd | 1 - src/sage/libs/gmp/types.pxd | 1 - src/sage/libs/gmpxx.pxd | 1 - src/sage/libs/gsl/__init__.py | 1 - src/sage/libs/gsl/airy.pxd | 1 - src/sage/libs/gsl/all.pxd | 1 - src/sage/libs/gsl/array.pxd | 1 - src/sage/libs/gsl/array.pyx | 1 - src/sage/libs/gsl/bessel.pxd | 1 - src/sage/libs/gsl/blas.pxd | 1 - src/sage/libs/gsl/blas_types.pxd | 1 - src/sage/libs/gsl/block.pxd | 1 - src/sage/libs/gsl/chebyshev.pxd | 1 - src/sage/libs/gsl/clausen.pxd | 1 - src/sage/libs/gsl/combination.pxd | 1 - src/sage/libs/gsl/complex.pxd | 1 - src/sage/libs/gsl/coulomb.pxd | 1 - src/sage/libs/gsl/coupling.pxd | 1 - src/sage/libs/gsl/dawson.pxd | 1 - src/sage/libs/gsl/debye.pxd | 1 - src/sage/libs/gsl/dilog.pxd | 1 - src/sage/libs/gsl/eigen.pxd | 1 - src/sage/libs/gsl/elementary.pxd | 1 - src/sage/libs/gsl/ellint.pxd | 1 - src/sage/libs/gsl/elljac.pxd | 1 - src/sage/libs/gsl/erf.pxd | 1 - src/sage/libs/gsl/errno.pxd | 1 - src/sage/libs/gsl/exp.pxd | 1 - src/sage/libs/gsl/expint.pxd | 1 - src/sage/libs/gsl/fermi_dirac.pxd | 1 - src/sage/libs/gsl/fft.pxd | 1 - src/sage/libs/gsl/fit.pxd | 1 - src/sage/libs/gsl/gamma.pxd | 1 - src/sage/libs/gsl/gegenbauer.pxd | 1 - src/sage/libs/gsl/histogram.pxd | 1 - src/sage/libs/gsl/hyperg.pxd | 1 - src/sage/libs/gsl/integration.pxd | 1 - src/sage/libs/gsl/interp.pxd | 1 - src/sage/libs/gsl/laguerre.pxd | 1 - src/sage/libs/gsl/lambert.pxd | 1 - src/sage/libs/gsl/legendre.pxd | 1 - src/sage/libs/gsl/linalg.pxd | 1 - src/sage/libs/gsl/log.pxd | 1 - src/sage/libs/gsl/math.pxd | 1 - src/sage/libs/gsl/matrix.pxd | 1 - src/sage/libs/gsl/matrix_complex.pxd | 1 - src/sage/libs/gsl/min.pxd | 1 - src/sage/libs/gsl/monte.pxd | 1 - src/sage/libs/gsl/ntuple.pxd | 1 - src/sage/libs/gsl/odeiv.pxd | 1 - src/sage/libs/gsl/permutation.pxd | 1 - src/sage/libs/gsl/poly.pxd | 1 - src/sage/libs/gsl/pow_int.pxd | 1 - src/sage/libs/gsl/psi.pxd | 1 - src/sage/libs/gsl/qrng.pxd | 1 - src/sage/libs/gsl/random.pxd | 1 - src/sage/libs/gsl/rng.pxd | 1 - src/sage/libs/gsl/roots.pxd | 1 - src/sage/libs/gsl/sort.pxd | 1 - src/sage/libs/gsl/statistics.pxd | 1 - src/sage/libs/gsl/sum.pxd | 1 - src/sage/libs/gsl/synchrotron.pxd | 1 - src/sage/libs/gsl/transport.pxd | 1 - src/sage/libs/gsl/trig.pxd | 1 - src/sage/libs/gsl/types.pxd | 1 - src/sage/libs/gsl/vector.pxd | 1 - src/sage/libs/gsl/vector_complex.pxd | 1 - src/sage/libs/gsl/wavelet.pxd | 1 - src/sage/libs/gsl/zeta.pxd | 1 - src/sage/libs/homfly.pyx | 1 - src/sage/libs/iml.pxd | 3 +- src/sage/libs/lcalc/__init__.py | 1 - src/sage/libs/lcalc/lcalc_Lfunction.pxd | 1 - src/sage/libs/lcalc/lcalc_Lfunction.pyx | 1 - src/sage/libs/libecm.pyx | 1 - src/sage/libs/linbox/__init__.py | 1 - src/sage/libs/linbox/conversion.pxd | 1 - src/sage/libs/linbox/fflas.pxd | 1 - src/sage/libs/linbox/givaro.pxd | 1 - src/sage/libs/linbox/linbox.pxd | 1 - .../libs/linbox/linbox_flint_interface.pxd | 1 - .../libs/linbox/linbox_flint_interface.pyx | 1 - src/sage/libs/linkages/__init__.py | 1 - src/sage/libs/linkages/padics/API.pxi | 1 - .../libs/linkages/padics/Polynomial_ram.pxi | 2 +- .../linkages/padics/Polynomial_shared.pxi | 1 - src/sage/libs/linkages/padics/__init__.py | 1 - .../libs/linkages/padics/fmpz_poly_unram.pxi | 1 - src/sage/libs/linkages/padics/mpz.pxi | 1 - src/sage/libs/linkages/padics/relaxed/API.pxi | 1 - .../libs/linkages/padics/relaxed/__init__.py | 1 - .../libs/linkages/padics/relaxed/flint.pxi | 1 - .../libs/linkages/padics/unram_shared.pxi | 1 - src/sage/libs/lrcalc/__init__.py | 1 - src/sage/libs/lrcalc/lrcalc.py | 1 - src/sage/libs/m4ri.pxd | 1 - src/sage/libs/m4rie.pxd | 1 - src/sage/libs/mpc/__init__.pxd | 1 - src/sage/libs/mpc/types.pxd | 1 - src/sage/libs/mpfi/__init__.pxd | 1 - src/sage/libs/mpfi/types.pxd | 1 - src/sage/libs/mpfr/__init__.pxd | 1 - src/sage/libs/mpfr/types.pxd | 1 - src/sage/libs/mpmath/all.py | 14 +- src/sage/libs/mpmath/ext_impl.pxd | 1 - src/sage/libs/mpmath/ext_impl.pyx | 1 - src/sage/libs/mpmath/ext_libmp.pyx | 1 - src/sage/libs/mpmath/ext_main.pxd | 1 - src/sage/libs/mpmath/ext_main.pyx | 1 - src/sage/libs/mpmath/utils.pyx | 1 - src/sage/libs/ntl/GF2.pxd | 1 - src/sage/libs/ntl/GF2E.pxd | 1 - src/sage/libs/ntl/GF2EX.pxd | 1 - src/sage/libs/ntl/GF2X.pxd | 1 - src/sage/libs/ntl/ZZ.pxd | 1 - src/sage/libs/ntl/ZZX.pxd | 1 - src/sage/libs/ntl/ZZ_p.pxd | 1 - src/sage/libs/ntl/ZZ_pE.pxd | 1 - src/sage/libs/ntl/ZZ_pEX.pxd | 1 - src/sage/libs/ntl/ZZ_pX.pxd | 1 - src/sage/libs/ntl/__init__.py | 1 - src/sage/libs/ntl/all.py | 9 +- src/sage/libs/ntl/conversion.pxd | 1 - src/sage/libs/ntl/convert.pxd | 1 - src/sage/libs/ntl/convert.pyx | 1 - src/sage/libs/ntl/decl.pxi | 1 - src/sage/libs/ntl/error.pyx | 1 - src/sage/libs/ntl/lzz_p.pxd | 1 - src/sage/libs/ntl/lzz_pX.pxd | 1 - src/sage/libs/ntl/mat_GF2.pxd | 1 - src/sage/libs/ntl/mat_GF2E.pxd | 1 - src/sage/libs/ntl/mat_ZZ.pxd | 1 - src/sage/libs/ntl/misc.pxi | 1 - src/sage/libs/ntl/ntl_GF2.pxd | 1 - src/sage/libs/ntl/ntl_GF2.pyx | 1 - src/sage/libs/ntl/ntl_GF2E.pxd | 1 - src/sage/libs/ntl/ntl_GF2E.pyx | 1 - src/sage/libs/ntl/ntl_GF2EContext.pxd | 1 - src/sage/libs/ntl/ntl_GF2EContext.pyx | 1 - src/sage/libs/ntl/ntl_GF2EX.pxd | 1 - src/sage/libs/ntl/ntl_GF2EX.pyx | 1 - src/sage/libs/ntl/ntl_GF2X.pxd | 1 - src/sage/libs/ntl/ntl_GF2X.pyx | 1 - src/sage/libs/ntl/ntl_GF2X_linkage.pxi | 1 - src/sage/libs/ntl/ntl_ZZ.pxd | 1 - src/sage/libs/ntl/ntl_ZZ.pyx | 1 - src/sage/libs/ntl/ntl_ZZX.pxd | 1 - src/sage/libs/ntl/ntl_ZZX.pyx | 1 - src/sage/libs/ntl/ntl_ZZ_p.pxd | 1 - src/sage/libs/ntl/ntl_ZZ_p.pyx | 1 - src/sage/libs/ntl/ntl_ZZ_pContext.pxd | 1 - src/sage/libs/ntl/ntl_ZZ_pContext.pyx | 1 - src/sage/libs/ntl/ntl_ZZ_pE.pxd | 1 - src/sage/libs/ntl/ntl_ZZ_pE.pyx | 1 - src/sage/libs/ntl/ntl_ZZ_pEContext.pxd | 1 - src/sage/libs/ntl/ntl_ZZ_pEContext.pyx | 1 - src/sage/libs/ntl/ntl_ZZ_pEX.pxd | 1 - src/sage/libs/ntl/ntl_ZZ_pEX.pyx | 1 - src/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi | 1 - src/sage/libs/ntl/ntl_ZZ_pX.pxd | 1 - src/sage/libs/ntl/ntl_ZZ_pX.pyx | 1 - src/sage/libs/ntl/ntl_lzz_p.pxd | 1 - src/sage/libs/ntl/ntl_lzz_p.pyx | 1 - src/sage/libs/ntl/ntl_lzz_pContext.pxd | 1 - src/sage/libs/ntl/ntl_lzz_pContext.pyx | 1 - src/sage/libs/ntl/ntl_lzz_pX.pxd | 1 - src/sage/libs/ntl/ntl_lzz_pX.pyx | 1 - src/sage/libs/ntl/ntl_mat_GF2.pxd | 1 - src/sage/libs/ntl/ntl_mat_GF2.pyx | 1 - src/sage/libs/ntl/ntl_mat_GF2E.pxd | 1 - src/sage/libs/ntl/ntl_mat_GF2E.pyx | 1 - src/sage/libs/ntl/ntl_mat_ZZ.pxd | 1 - src/sage/libs/ntl/ntl_mat_ZZ.pyx | 1 - src/sage/libs/ntl/ntl_tools.pxd | 1 - src/sage/libs/ntl/types.pxd | 1 - src/sage/libs/ntl/vec_GF2.pxd | 1 - src/sage/libs/ntl/vec_GF2E.pxd | 1 - src/sage/libs/pari/__init__.py | 1 - src/sage/libs/pari/all.py | 3 +- src/sage/libs/pari/all__sagemath_flint.py | 0 src/sage/libs/pari/convert_flint.pxd | 1 - src/sage/libs/pari/convert_flint.pyx | 1 - src/sage/libs/pari/convert_gmp.pxd | 1 - src/sage/libs/pari/convert_gmp.pyx | 1 - src/sage/libs/pari/convert_sage.pxd | 1 - src/sage/libs/pari/convert_sage.pyx | 1 - .../libs/pari/convert_sage_complex_double.pxd | 1 - .../libs/pari/convert_sage_complex_double.pyx | 1 - src/sage/libs/pari/convert_sage_matrix.pyx | 1 - .../libs/pari/convert_sage_real_double.pxd | 1 - .../libs/pari/convert_sage_real_double.pyx | 1 - src/sage/libs/pari/convert_sage_real_mpfr.pxd | 1 - src/sage/libs/pari/convert_sage_real_mpfr.pyx | 1 - src/sage/libs/pari/misc.pxd | 1 - src/sage/libs/pari/misc.pyx | 1 - src/sage/libs/pari/tests.py | 1 - src/sage/libs/polybori/__init__.pxd | 1 - src/sage/libs/polybori/decl.pxd | 1 - src/sage/libs/pynac/__init__.py | 1 - src/sage/libs/pynac/pynac.py | 1 - src/sage/libs/singular/__init__.py | 1 - src/sage/libs/singular/decl.pxd | 1 - src/sage/libs/singular/function.pxd | 1 - src/sage/libs/singular/function.pyx | 1 - src/sage/libs/singular/function_factory.py | 1 - src/sage/libs/singular/groebner_strategy.pxd | 1 - src/sage/libs/singular/groebner_strategy.pyx | 1 - src/sage/libs/singular/option.pyx | 1 - src/sage/libs/singular/polynomial.pxd | 1 - src/sage/libs/singular/polynomial.pyx | 1 - src/sage/libs/singular/ring.pxd | 1 - src/sage/libs/singular/ring.pyx | 1 - src/sage/libs/singular/singular.pxd | 1 - src/sage/libs/singular/singular.pyx | 1 - src/sage/libs/singular/standard_options.py | 1 - src/sage/libs/symmetrica/__init__.py | 1 - src/sage/libs/symmetrica/all.py | 198 +++++++------- src/sage/libs/symmetrica/kostka.pxi | 1 - src/sage/libs/symmetrica/part.pxi | 1 - src/sage/libs/symmetrica/plet.pxi | 1 - src/sage/libs/symmetrica/sab.pxi | 1 - src/sage/libs/symmetrica/sb.pxi | 1 - src/sage/libs/symmetrica/sc.pxi | 1 - src/sage/libs/symmetrica/schur.pxi | 1 - src/sage/libs/symmetrica/symmetrica.pxi | 1 - src/sage/libs/symmetrica/symmetrica.pyx | 1 - src/sage/logic/all.py | 4 +- src/sage/manifolds/all.py | 2 - src/sage/manifolds/calculus_method.py | 1 - src/sage/manifolds/catalog.py | 1 - src/sage/manifolds/chart.py | 1 - src/sage/manifolds/chart_func.py | 1 - src/sage/manifolds/continuous_map.py | 1 - src/sage/manifolds/continuous_map_image.py | 1 - .../differentiable/affine_connection.py | 1 - src/sage/manifolds/differentiable/all.py | 1 - .../differentiable/automorphismfield.py | 1 - .../differentiable/automorphismfield_group.py | 1 - .../differentiable/bundle_connection.py | 1 - .../characteristic_cohomology_class.py | 1 - src/sage/manifolds/differentiable/chart.py | 1 - src/sage/manifolds/differentiable/curve.py | 1 - .../differentiable/de_rham_cohomology.py | 1 - .../manifolds/differentiable/degenerate.py | 1 - .../differentiable/degenerate_submanifold.py | 1 - .../manifolds/differentiable/diff_form.py | 1 - .../differentiable/diff_form_module.py | 1 - src/sage/manifolds/differentiable/diff_map.py | 1 - .../differentiable_submanifold.py | 1 - .../manifolds/differentiable/examples/all.py | 1 - .../differentiable/examples/euclidean.py | 1 - .../differentiable/examples/real_line.py | 1 - .../differentiable/examples/sphere.py | 1 - .../examples/symplectic_space.py | 1 - .../examples/symplectic_space_test.py | 1 - .../differentiable/integrated_curve.py | 2 +- .../differentiable/levi_civita_connection.py | 2 +- src/sage/manifolds/differentiable/manifold.py | 2 +- .../differentiable/manifold_homset.py | 1 - src/sage/manifolds/differentiable/metric.py | 1 - .../manifolds/differentiable/mixed_form.py | 1 - .../differentiable/mixed_form_algebra.py | 1 - .../differentiable/multivector_module.py | 1 - .../differentiable/multivectorfield.py | 1 - .../differentiable/poisson_tensor.py | 1 - .../differentiable/pseudo_riemannian.py | 1 - .../pseudo_riemannian_submanifold.py | 1 - .../manifolds/differentiable/scalarfield.py | 1 - .../differentiable/scalarfield_algebra.py | 1 - .../differentiable/symplectic_form.py | 1 - .../differentiable/symplectic_form_test.py | 1 - .../manifolds/differentiable/tangent_space.py | 1 - .../differentiable/tangent_vector.py | 1 - .../manifolds/differentiable/tensorfield.py | 1 - .../differentiable/tensorfield_module.py | 1 - .../differentiable/tensorfield_paral.py | 1 - .../differentiable/tensorfield_paral_test.py | 1 - .../manifolds/differentiable/vector_bundle.py | 1 - .../manifolds/differentiable/vectorfield.py | 1 - .../differentiable/vectorfield_module.py | 1 - .../manifolds/differentiable/vectorframe.py | 1 - src/sage/manifolds/family.py | 1 - src/sage/manifolds/local_frame.py | 1 - src/sage/manifolds/manifold.py | 1 - src/sage/manifolds/manifold_homset.py | 1 - src/sage/manifolds/operators.py | 1 - src/sage/manifolds/point.py | 1 - src/sage/manifolds/scalarfield.py | 1 - src/sage/manifolds/scalarfield_algebra.py | 1 - src/sage/manifolds/section.py | 1 - src/sage/manifolds/section_module.py | 2 +- src/sage/manifolds/structure.py | 1 - src/sage/manifolds/subset.py | 2 +- src/sage/manifolds/subsets/all.py | 1 - src/sage/manifolds/subsets/closure.py | 1 - src/sage/manifolds/subsets/pullback.py | 1 - src/sage/manifolds/topological_submanifold.py | 1 - src/sage/manifolds/trivialization.py | 1 - src/sage/manifolds/utilities.py | 1 - src/sage/manifolds/vector_bundle.py | 2 +- src/sage/manifolds/vector_bundle_fiber.py | 1 - .../manifolds/vector_bundle_fiber_element.py | 1 - src/sage/matrix/action.pxd | 1 - src/sage/matrix/action.pyx | 1 - src/sage/matrix/all.py | 12 +- src/sage/matrix/all__sagemath_flint.py | 0 src/sage/matrix/all__sagemath_gap.py | 0 src/sage/matrix/all__sagemath_linbox.py | 0 src/sage/matrix/all__sagemath_meataxe.py | 1 - src/sage/matrix/all__sagemath_ntl.py | 0 src/sage/matrix/all__sagemath_singular.py | 0 src/sage/matrix/all__sagemath_symbolics.py | 0 src/sage/matrix/args.pxd | 1 - src/sage/matrix/args.pyx | 1 - src/sage/matrix/benchmark.py | 1 - src/sage/matrix/berlekamp_massey.py | 1 - src/sage/matrix/change_ring.pyx | 1 - src/sage/matrix/compute_J_ideal.py | 1 - src/sage/matrix/constructor.pyx | 1 - src/sage/matrix/docs.py | 1 - src/sage/matrix/echelon_matrix.pyx | 1 - src/sage/matrix/matrix.pxd | 1 - src/sage/matrix/matrix0.pxd | 1 - src/sage/matrix/matrix0.pyx | 2 +- src/sage/matrix/matrix1.pxd | 1 - src/sage/matrix/matrix1.pyx | 1 - src/sage/matrix/matrix2.pxd | 1 - src/sage/matrix/matrix2.pyx | 1 - src/sage/matrix/matrix_cdv.pxd | 1 - src/sage/matrix/matrix_cdv.pyx | 1 - src/sage/matrix/matrix_complex_ball_dense.pxd | 2 - src/sage/matrix/matrix_complex_ball_dense.pyx | 1 - .../matrix/matrix_complex_double_dense.pxd | 1 - .../matrix/matrix_complex_double_dense.pyx | 1 - src/sage/matrix/matrix_cyclo_dense.pxd | 1 - src/sage/matrix/matrix_cyclo_dense.pyx | 1 - src/sage/matrix/matrix_dense.pxd | 1 - src/sage/matrix/matrix_dense.pyx | 1 - src/sage/matrix/matrix_domain_dense.pxd | 1 - src/sage/matrix/matrix_domain_sparse.pxd | 1 - src/sage/matrix/matrix_double_dense.pxd | 1 - src/sage/matrix/matrix_double_dense.pyx | 1 - src/sage/matrix/matrix_double_sparse.pxd | 1 - src/sage/matrix/matrix_double_sparse.pyx | 1 - src/sage/matrix/matrix_gap.pxd | 1 - src/sage/matrix/matrix_gap.pyx | 1 - src/sage/matrix/matrix_generic_dense.pxd | 1 - src/sage/matrix/matrix_generic_dense.pyx | 1 - src/sage/matrix/matrix_generic_sparse.pxd | 1 - src/sage/matrix/matrix_generic_sparse.pyx | 1 - src/sage/matrix/matrix_gf2e_dense.pxd | 1 - src/sage/matrix/matrix_gf2e_dense.pyx | 2 +- src/sage/matrix/matrix_integer_dense.pxd | 1 - src/sage/matrix/matrix_integer_dense.pyx | 2 +- src/sage/matrix/matrix_integer_dense_hnf.py | 1 - .../matrix/matrix_integer_dense_saturation.py | 1 - src/sage/matrix/matrix_integer_sparse.pxd | 1 - src/sage/matrix/matrix_integer_sparse.pyx | 2 +- .../matrix_laurent_mpolynomial_dense.pxd | 1 - .../matrix_laurent_mpolynomial_dense.pyx | 1 - src/sage/matrix/matrix_misc.py | 1 - src/sage/matrix/matrix_mod2_dense.pxd | 1 - src/sage/matrix/matrix_mod2_dense.pyx | 2 +- src/sage/matrix/matrix_modn_dense_double.pxd | 1 - src/sage/matrix/matrix_modn_dense_double.pyx | 1 - src/sage/matrix/matrix_modn_dense_float.pxd | 1 - src/sage/matrix/matrix_modn_dense_float.pyx | 1 - .../matrix/matrix_modn_dense_template.pxi | 1 - .../matrix_modn_dense_template_header.pxi | 1 - src/sage/matrix/matrix_modn_sparse.pxd | 1 - src/sage/matrix/matrix_modn_sparse.pyx | 1 - src/sage/matrix/matrix_mpolynomial_dense.pxd | 1 - src/sage/matrix/matrix_mpolynomial_dense.pyx | 1 - src/sage/matrix/matrix_numpy_dense.pxd | 1 - src/sage/matrix/matrix_numpy_dense.pyx | 1 - .../matrix/matrix_numpy_integer_dense.pxd | 1 - .../matrix/matrix_numpy_integer_dense.pyx | 1 - src/sage/matrix/matrix_polynomial_dense.pxd | 1 - src/sage/matrix/matrix_polynomial_dense.pyx | 1 - src/sage/matrix/matrix_rational_dense.pxd | 1 - src/sage/matrix/matrix_rational_dense.pyx | 1 - src/sage/matrix/matrix_rational_sparse.pxd | 1 - src/sage/matrix/matrix_rational_sparse.pyx | 1 - src/sage/matrix/matrix_real_double_dense.pxd | 1 - src/sage/matrix/matrix_real_double_dense.pyx | 1 - src/sage/matrix/matrix_space.py | 1 - src/sage/matrix/matrix_sparse.pxd | 1 - src/sage/matrix/matrix_sparse.pyx | 1 - src/sage/matrix/matrix_symbolic_dense.pxd | 1 - src/sage/matrix/matrix_symbolic_dense.pyx | 1 - src/sage/matrix/matrix_symbolic_sparse.pxd | 1 - src/sage/matrix/matrix_symbolic_sparse.pyx | 1 - src/sage/matrix/matrix_window.pxd | 1 - src/sage/matrix/matrix_window.pyx | 1 - src/sage/matrix/misc.pyx | 1 - src/sage/matrix/misc_flint.pyx | 1 - src/sage/matrix/misc_mpfr.pyx | 1 - src/sage/matrix/operation_table.py | 1 - src/sage/matrix/special.py | 2 +- src/sage/matrix/strassen.pyx | 1 - src/sage/matrix/symplectic_basis.py | 1 - src/sage/matrix/template.pxd | 1 - src/sage/matrix/tests.py | 1 - src/sage/matroids/advanced.py | 1 - src/sage/matroids/all.py | 3 - src/sage/matroids/basis_exchange_matroid.pxd | 1 - src/sage/matroids/basis_exchange_matroid.pyx | 1 - src/sage/matroids/basis_matroid.pxd | 1 - src/sage/matroids/basis_matroid.pyx | 1 - src/sage/matroids/catalog.py | 1 - .../matroids/circuit_closures_matroid.pxd | 1 - .../matroids/circuit_closures_matroid.pyx | 1 - src/sage/matroids/constructor.py | 1 - src/sage/matroids/database_matroids.py | 1 - src/sage/matroids/dual_matroid.py | 1 - src/sage/matroids/extension.pxd | 1 - src/sage/matroids/extension.pyx | 1 - src/sage/matroids/graphic_matroid.py | 1 - src/sage/matroids/lean_matrix.pxd | 1 - src/sage/matroids/lean_matrix.pyx | 1 - src/sage/matroids/linear_matroid.pxd | 1 - src/sage/matroids/linear_matroid.pyx | 1 - src/sage/matroids/matroid.pxd | 1 - src/sage/matroids/matroid.pyx | 2 +- src/sage/matroids/matroids_catalog.py | 1 - src/sage/matroids/matroids_plot_helpers.py | 1 - src/sage/matroids/minor_matroid.py | 1 - src/sage/matroids/named_matroids.py | 1 - src/sage/matroids/rank_matroid.py | 1 - src/sage/matroids/set_system.pxd | 1 - src/sage/matroids/set_system.pyx | 1 - src/sage/matroids/union_matroid.pxd | 1 - src/sage/matroids/union_matroid.pyx | 1 - src/sage/matroids/unpickling.pyx | 1 - src/sage/matroids/utilities.py | 1 - src/sage/misc/abstract_method.py | 3 +- src/sage/misc/all.py | 125 +++++++-- src/sage/misc/all__sagemath_categories.py | 77 ------ src/sage/misc/all__sagemath_environment.py | 1 - src/sage/misc/all__sagemath_modules.py | 20 -- src/sage/misc/all__sagemath_ntl.py | 0 src/sage/misc/all__sagemath_objects.py | 3 +- src/sage/misc/all__sagemath_repl.py | 13 - src/sage/misc/allocator.pxd | 1 - src/sage/misc/allocator.pyx | 1 - src/sage/misc/banner.py | 1 - src/sage/misc/binary_tree.pxd | 1 - src/sage/misc/binary_tree.pyx | 1 - src/sage/misc/bindable_class.py | 1 - src/sage/misc/c3.pyx | 1 - src/sage/misc/c3_controlled.pxd | 2 - src/sage/misc/c3_controlled.pyx | 1 - src/sage/misc/cachefunc.pxd | 1 - src/sage/misc/cachefunc.pyx | 1 - src/sage/misc/call.py | 1 - src/sage/misc/callable_dict.pyx | 2 +- src/sage/misc/classcall_metaclass.pxd | 1 - src/sage/misc/classcall_metaclass.pyx | 1 - src/sage/misc/compat.py | 1 - src/sage/misc/constant_function.pyx | 1 - src/sage/misc/converting_dict.py | 1 - src/sage/misc/cython.py | 1 - src/sage/misc/decorators.py | 1 - src/sage/misc/defaults.py | 1 - src/sage/misc/derivative.pyx | 1 - src/sage/misc/dev_tools.py | 2 - src/sage/misc/edit_module.py | 1 - src/sage/misc/element_with_label.py | 1 - src/sage/misc/explain_pickle.py | 1 - src/sage/misc/fast_methods.pxd | 1 - src/sage/misc/fast_methods.pyx | 1 - src/sage/misc/flatten.py | 1 - src/sage/misc/fpickle.pyx | 1 - src/sage/misc/func_persist.py | 1 - src/sage/misc/function_mangling.pxd | 1 - src/sage/misc/function_mangling.pyx | 1 - src/sage/misc/functional.py | 1 - src/sage/misc/html.py | 1 - src/sage/misc/inherit_comparison.pxd | 1 - src/sage/misc/inherit_comparison.pyx | 1 - src/sage/misc/inline_fortran.py | 1 - src/sage/misc/instancedoc.pyx | 1 - src/sage/misc/latex.py | 1 - src/sage/misc/latex_macros.py | 1 - src/sage/misc/latex_standalone.py | 1 - src/sage/misc/lazy_attribute.pyx | 3 +- src/sage/misc/lazy_format.py | 1 - src/sage/misc/lazy_import.pyx | 1 - src/sage/misc/lazy_import_cache.py | 1 - src/sage/misc/lazy_list.pxd | 1 - src/sage/misc/lazy_list.pyx | 1 - src/sage/misc/lazy_string.pxd | 1 - src/sage/misc/lazy_string.pyx | 2 +- src/sage/misc/map_threaded.py | 1 - src/sage/misc/mathml.py | 1 - src/sage/misc/method_decorator.py | 1 - src/sage/misc/misc.py | 1 - src/sage/misc/misc_c.pxd | 1 - src/sage/misc/misc_c.pyx | 1 - src/sage/misc/mrange.py | 1 - src/sage/misc/multireplace.py | 1 - src/sage/misc/namespace_package.py | 1 - src/sage/misc/nested_class.pxd | 1 - src/sage/misc/nested_class.pyx | 1 - src/sage/misc/object_multiplexer.py | 1 - src/sage/misc/package.py | 1 - src/sage/misc/package_dir.py | 29 +- src/sage/misc/pager.py | 1 - src/sage/misc/parser.pyx | 2 +- src/sage/misc/persist.pyx | 1 - src/sage/misc/pickle_old.pyx | 1 - src/sage/misc/prandom.py | 1 - src/sage/misc/profiler.py | 1 - src/sage/misc/proof.py | 1 - src/sage/misc/random_testing.py | 1 - src/sage/misc/randstate.pxd | 1 - src/sage/misc/randstate.pyx | 1 - src/sage/misc/replace_dot_all.py | 3 +- src/sage/misc/repr.py | 1 - src/sage/misc/reset.pyx | 1 - src/sage/misc/rest_index_of_methods.py | 1 - src/sage/misc/sage_eval.py | 1 - src/sage/misc/sage_input.py | 1 - src/sage/misc/sage_ostools.pyx | 1 - src/sage/misc/sage_timeit.py | 1 - src/sage/misc/sage_timeit_class.pyx | 1 - src/sage/misc/sage_unittest.py | 1 - src/sage/misc/sagedoc.py | 1 - src/sage/misc/sagedoc_conf.py | 1 - src/sage/misc/sageinspect.py | 12 +- src/sage/misc/search.pxd | 4 +- src/sage/misc/search.pyx | 1 - src/sage/misc/session.pyx | 1 - src/sage/misc/sphinxify.py | 1 - src/sage/misc/stopgap.pyx | 1 - src/sage/misc/superseded.py | 1 - src/sage/misc/table.py | 1 - src/sage/misc/temporary_file.py | 1 - src/sage/misc/test_class_pickling.py | 1 - src/sage/misc/test_nested_class.py | 1 - src/sage/misc/timing.py | 1 - src/sage/misc/trace.py | 1 - src/sage/misc/unknown.py | 1 - src/sage/misc/verbose.py | 1 - src/sage/misc/viewer.py | 1 - src/sage/misc/weak_dict.pxd | 1 - src/sage/misc/weak_dict.pyx | 1 - src/sage/modular/abvar/abvar.py | 1 - .../modular/abvar/abvar_ambient_jacobian.py | 1 - src/sage/modular/abvar/abvar_newform.py | 1 - src/sage/modular/abvar/all.py | 5 +- src/sage/modular/abvar/constructor.py | 1 - src/sage/modular/abvar/cuspidal_subgroup.py | 1 - src/sage/modular/abvar/finite_subgroup.py | 1 - src/sage/modular/abvar/homology.py | 1 - src/sage/modular/abvar/homspace.py | 1 - src/sage/modular/abvar/lseries.py | 1 - src/sage/modular/abvar/morphism.py | 1 - src/sage/modular/abvar/torsion_point.py | 1 - src/sage/modular/abvar/torsion_subgroup.py | 1 - src/sage/modular/all.py | 42 ++- src/sage/modular/arithgroup/all.py | 22 +- .../modular/arithgroup/arithgroup_element.pyx | 1 - .../modular/arithgroup/arithgroup_generic.py | 1 - .../modular/arithgroup/arithgroup_perm.py | 1 - src/sage/modular/arithgroup/congroup.pyx | 1 - src/sage/modular/arithgroup/congroup_gamma.py | 1 - .../modular/arithgroup/congroup_gamma0.py | 1 - .../modular/arithgroup/congroup_gamma1.py | 1 - .../modular/arithgroup/congroup_gammaH.py | 1 - .../modular/arithgroup/congroup_generic.py | 1 - src/sage/modular/arithgroup/congroup_sl2z.py | 1 - src/sage/modular/arithgroup/farey_symbol.pyx | 1 - src/sage/modular/arithgroup/tests.py | 1 - src/sage/modular/btquotients/all.py | 8 +- src/sage/modular/btquotients/btquotient.py | 1 - .../modular/btquotients/pautomorphicform.py | 1 - src/sage/modular/buzzard.py | 1 - src/sage/modular/congroup.py | 1 - src/sage/modular/congroup_element.py | 1 - src/sage/modular/cusps.py | 1 - src/sage/modular/cusps_nf.py | 1 - src/sage/modular/dims.py | 1 - src/sage/modular/dirichlet.py | 1 - src/sage/modular/etaproducts.py | 1 - src/sage/modular/hecke/algebra.py | 1 - src/sage/modular/hecke/all.py | 24 +- src/sage/modular/hecke/ambient_module.py | 1 - src/sage/modular/hecke/degenmap.py | 1 - src/sage/modular/hecke/element.py | 1 - src/sage/modular/hecke/hecke_operator.py | 1 - src/sage/modular/hecke/homspace.py | 1 - src/sage/modular/hecke/module.py | 1 - src/sage/modular/hecke/morphism.py | 1 - src/sage/modular/hecke/submodule.py | 1 - src/sage/modular/hypergeometric_misc.pxd | 1 - src/sage/modular/hypergeometric_misc.pyx | 1 - src/sage/modular/hypergeometric_motive.py | 1 - src/sage/modular/local_comp/all.py | 4 +- src/sage/modular/local_comp/liftings.py | 1 - src/sage/modular/local_comp/local_comp.py | 1 - src/sage/modular/local_comp/smoothchar.py | 1 - src/sage/modular/local_comp/type_space.py | 1 - src/sage/modular/modform/all.py | 20 +- src/sage/modular/modform/ambient.py | 1 - src/sage/modular/modform/ambient_R.py | 1 - src/sage/modular/modform/ambient_eps.py | 1 - src/sage/modular/modform/ambient_g0.py | 1 - src/sage/modular/modform/ambient_g1.py | 1 - src/sage/modular/modform/constructor.py | 1 - .../modular/modform/cuspidal_submodule.py | 1 - src/sage/modular/modform/defaults.py | 1 - src/sage/modular/modform/eis_series.py | 1 - .../modular/modform/eisenstein_submodule.py | 1 - src/sage/modular/modform/element.py | 1 - src/sage/modular/modform/find_generators.py | 1 - src/sage/modular/modform/half_integral.py | 1 - .../modular/modform/hecke_operator_on_qexp.py | 1 - src/sage/modular/modform/j_invariant.py | 1 - .../modular/modform/l_series_gross_zagier.py | 1 - .../modform/l_series_gross_zagier_coeffs.pyx | 1 - src/sage/modular/modform/notes.py | 1 - src/sage/modular/modform/numerical.py | 1 - src/sage/modular/modform/periods.py | 1 - src/sage/modular/modform/ring.py | 1 - src/sage/modular/modform/space.py | 1 - src/sage/modular/modform/submodule.py | 1 - src/sage/modular/modform/tests.py | 1 - src/sage/modular/modform/theta.py | 1 - src/sage/modular/modform/vm_basis.py | 1 - src/sage/modular/modform/weight1.py | 1 - .../modform_hecketriangle/abstract_ring.py | 1 - .../modform_hecketriangle/abstract_space.py | 1 - src/sage/modular/modform_hecketriangle/all.py | 25 +- .../modform_hecketriangle/analytic_type.py | 1 - .../modform_hecketriangle/constructor.py | 1 - .../modular/modform_hecketriangle/element.py | 1 - .../modular/modform_hecketriangle/functors.py | 1 - .../modform_hecketriangle/graded_ring.py | 1 - .../graded_ring_element.py | 1 - .../hecke_triangle_group_element.py | 1 - .../hecke_triangle_groups.py | 1 - .../modular/modform_hecketriangle/readme.py | 1 - .../series_constructor.py | 1 - .../modular/modform_hecketriangle/space.py | 1 - .../modular/modform_hecketriangle/subspace.py | 1 - src/sage/modular/modsym/all.py | 14 +- src/sage/modular/modsym/ambient.py | 1 - src/sage/modular/modsym/boundary.py | 1 - src/sage/modular/modsym/element.py | 1 - src/sage/modular/modsym/g1list.py | 1 - src/sage/modular/modsym/ghlist.py | 1 - src/sage/modular/modsym/hecke_operator.py | 1 - src/sage/modular/modsym/manin_symbol.pxd | 1 - src/sage/modular/modsym/manin_symbol.pyx | 1 - src/sage/modular/modsym/manin_symbol_list.py | 1 - src/sage/modular/modsym/modsym.py | 1 - src/sage/modular/modsym/modular_symbols.py | 1 - src/sage/modular/modsym/p1list.pxd | 1 - src/sage/modular/modsym/p1list.pyx | 1 - src/sage/modular/modsym/p1list_nf.py | 1 - src/sage/modular/modsym/relation_matrix.py | 1 - .../modular/modsym/relation_matrix_pyx.pyx | 1 - src/sage/modular/modsym/space.py | 1 - src/sage/modular/modsym/subspace.py | 1 - src/sage/modular/modsym/tests.py | 1 - src/sage/modular/multiple_zeta.py | 1 - src/sage/modular/multiple_zeta_F_algebra.py | 1 - src/sage/modular/overconvergent/all.py | 8 +- src/sage/modular/overconvergent/genus0.py | 1 - .../modular/overconvergent/hecke_series.py | 1 - .../modular/overconvergent/weightspace.py | 1 - src/sage/modular/pollack_stevens/all.py | 8 +- src/sage/modular/pollack_stevens/dist.pyx | 1 + .../modular/pollack_stevens/distributions.py | 1 - .../modular/pollack_stevens/fund_domain.py | 1 - src/sage/modular/pollack_stevens/manin_map.py | 1 - src/sage/modular/pollack_stevens/modsym.py | 1 - .../modular/pollack_stevens/padic_lseries.py | 1 - src/sage/modular/pollack_stevens/sigma0.py | 1 - src/sage/modular/pollack_stevens/space.py | 1 - src/sage/modular/quasimodform/all.py | 3 +- src/sage/modular/quasimodform/element.py | 1 - src/sage/modular/quasimodform/ring.py | 1 - src/sage/modular/quatalg/all.py | 3 +- src/sage/modular/quatalg/brandt.py | 1 - src/sage/modular/ssmod/all.py | 2 - src/sage/modular/ssmod/ssmod.py | 1 - src/sage/modules/all.py | 2 - src/sage/modules/all__sagemath_linbox.py | 0 src/sage/modules/all__sagemath_objects.py | 0 src/sage/modules/all__sagemath_symbolics.py | 0 src/sage/modules/complex_double_vector.py | 1 - src/sage/modules/diamond_cutting.py | 1 - src/sage/modules/fg_pid/all.py | 1 - src/sage/modules/fg_pid/fgp_element.py | 1 - src/sage/modules/fg_pid/fgp_module.py | 1 - src/sage/modules/fg_pid/fgp_morphism.py | 1 - src/sage/modules/filtered_vector_space.py | 1 - src/sage/modules/finite_submodule_iter.pxd | 1 - src/sage/modules/finite_submodule_iter.pyx | 1 - src/sage/modules/free_module.py | 1 - src/sage/modules/free_module_element.pxd | 1 - src/sage/modules/free_module_element.pyx | 1 - src/sage/modules/free_module_homspace.py | 1 - src/sage/modules/free_module_integer.py | 1 - src/sage/modules/free_module_morphism.py | 1 - src/sage/modules/free_quadratic_module.py | 1 - ...free_quadratic_module_integer_symmetric.py | 1 - src/sage/modules/matrix_morphism.py | 1 - src/sage/modules/misc.py | 1 - src/sage/modules/module.pxd | 1 - src/sage/modules/module.pyx | 1 - src/sage/modules/module_functors.py | 1 - .../modules/multi_filtered_vector_space.py | 1 - src/sage/modules/quotient_module.py | 1 - src/sage/modules/real_double_vector.py | 1 - src/sage/modules/submodule.py | 1 - src/sage/modules/tensor_operations.py | 1 - src/sage/modules/torsion_quadratic_module.py | 1 - src/sage/modules/tutorial_free_modules.py | 1 - .../modules/vector_callable_symbolic_dense.py | 1 - .../modules/vector_complex_double_dense.pxd | 1 - .../modules/vector_complex_double_dense.pyx | 1 - src/sage/modules/vector_double_dense.pxd | 1 - src/sage/modules/vector_double_dense.pyx | 1 - src/sage/modules/vector_integer_dense.pxd | 1 - src/sage/modules/vector_integer_dense.pyx | 1 - src/sage/modules/vector_integer_sparse.pxd | 1 - src/sage/modules/vector_integer_sparse.pyx | 1 - src/sage/modules/vector_mod2_dense.pxd | 1 - src/sage/modules/vector_mod2_dense.pyx | 1 - src/sage/modules/vector_modn_dense.pxd | 1 - src/sage/modules/vector_modn_dense.pyx | 1 - src/sage/modules/vector_modn_sparse.pxd | 1 - src/sage/modules/vector_modn_sparse.pyx | 1 - src/sage/modules/vector_numpy_dense.pxd | 1 - src/sage/modules/vector_numpy_dense.pyx | 1 - .../modules/vector_numpy_integer_dense.pxd | 1 - .../modules/vector_numpy_integer_dense.pyx | 1 - src/sage/modules/vector_rational_dense.pxd | 1 - src/sage/modules/vector_rational_dense.pyx | 1 - src/sage/modules/vector_rational_sparse.pxd | 1 - src/sage/modules/vector_rational_sparse.pyx | 1 - src/sage/modules/vector_real_double_dense.pxd | 1 - src/sage/modules/vector_real_double_dense.pyx | 1 - src/sage/modules/vector_space_homspace.py | 1 - src/sage/modules/vector_space_morphism.py | 1 - src/sage/modules/vector_symbolic_dense.py | 1 - src/sage/modules/vector_symbolic_sparse.py | 1 - src/sage/modules/with_basis/all.py | 2 - src/sage/modules/with_basis/cell_module.py | 1 - .../modules/with_basis/indexed_element.pxd | 1 - .../modules/with_basis/indexed_element.pyx | 2 +- src/sage/modules/with_basis/invariant.py | 1 - src/sage/modules/with_basis/morphism.py | 1 - src/sage/modules/with_basis/representation.py | 1 - src/sage/modules/with_basis/subquotient.py | 1 - src/sage/monoids/all.py | 11 +- src/sage/monoids/all__sagemath_categories.py | 0 src/sage/monoids/automatic_semigroup.py | 1 - src/sage/monoids/free_abelian_monoid.py | 1 - .../monoids/free_abelian_monoid_element.pxd | 1 - .../monoids/free_abelian_monoid_element.pyx | 1 - src/sage/monoids/free_monoid.py | 1 - src/sage/monoids/free_monoid_element.py | 1 - src/sage/monoids/hecke_monoid.py | 1 - src/sage/monoids/indexed_free_monoid.py | 1 - src/sage/monoids/monoid.py | 1 - src/sage/monoids/string_monoid.py | 1 - src/sage/monoids/string_monoid_element.py | 1 - src/sage/monoids/string_ops.py | 1 - src/sage/monoids/trace_monoid.py | 1 - src/sage/numerical/all.py | 9 +- .../numerical/all__sagemath_categories.py | 0 src/sage/numerical/all__sagemath_glpk.py | 0 src/sage/numerical/all__sagemath_modules.py | 5 - src/sage/numerical/all__sagemath_polyhedra.py | 2 - src/sage/numerical/backends/all.py | 1 - .../backends/all__sagemath_categories.py | 0 .../numerical/backends/all__sagemath_glpk.py | 0 .../backends/all__sagemath_polyhedra.py | 1 - .../numerical/backends/cvxopt_backend.pyx | 1 - .../numerical/backends/cvxopt_backend_test.py | 1 - .../numerical/backends/cvxopt_sdp_backend.pyx | 1 - src/sage/numerical/backends/cvxpy_backend.pxd | 1 - src/sage/numerical/backends/cvxpy_backend.pyx | 1 - .../numerical/backends/cvxpy_backend_test.py | 1 - .../numerical/backends/generic_backend.pxd | 1 - .../numerical/backends/generic_backend.pyx | 1 - .../backends/generic_backend_test.py | 1 - .../backends/generic_sdp_backend.pxd | 1 - .../backends/generic_sdp_backend.pyx | 1 - src/sage/numerical/backends/glpk_backend.pxd | 1 - src/sage/numerical/backends/glpk_backend.pyx | 1 - .../numerical/backends/glpk_exact_backend.pxd | 1 - .../numerical/backends/glpk_exact_backend.pyx | 1 - .../numerical/backends/glpk_graph_backend.pxd | 1 - .../numerical/backends/glpk_graph_backend.pyx | 1 - .../backends/interactivelp_backend.pxd | 1 - .../backends/interactivelp_backend.pyx | 1 - .../backends/interactivelp_backend_test.py | 1 - .../numerical/backends/logging_backend.py | 1 - .../numerical/backends/matrix_sdp_backend.pxd | 1 - .../numerical/backends/matrix_sdp_backend.pyx | 1 - src/sage/numerical/backends/ppl_backend.pyx | 1 - .../numerical/backends/ppl_backend_test.py | 1 - src/sage/numerical/backends/scip_backend.pxd | 1 - src/sage/numerical/backends/scip_backend.pyx | 1 - .../numerical/backends/scip_backend_test.py | 1 - src/sage/numerical/gauss_legendre.pyx | 1 - .../numerical/interactive_simplex_method.py | 1 - src/sage/numerical/knapsack.py | 1 - src/sage/numerical/linear_functions.pxd | 1 - src/sage/numerical/linear_functions.pyx | 1 - src/sage/numerical/linear_tensor.py | 1 - .../numerical/linear_tensor_constraints.py | 1 - src/sage/numerical/linear_tensor_element.pxd | 1 - src/sage/numerical/linear_tensor_element.pyx | 1 - src/sage/numerical/mip.pxd | 1 - src/sage/numerical/mip.pyx | 1 - src/sage/numerical/optimize.py | 1 - src/sage/numerical/sdp.pxd | 1 - src/sage/numerical/sdp.pyx | 1 - src/sage/parallel/all.py | 4 +- src/sage/parallel/decorate.py | 1 - src/sage/parallel/map_reduce.py | 2 +- src/sage/parallel/multiprocessing_sage.py | 1 - src/sage/parallel/ncpus.py | 1 - src/sage/parallel/parallelism.py | 1 - src/sage/parallel/reference.py | 1 - src/sage/parallel/use_fork.py | 1 - src/sage/plot/all.py | 64 ++--- src/sage/plot/animate.py | 1 - src/sage/plot/arc.py | 1 - src/sage/plot/arrow.py | 1 - src/sage/plot/bar_chart.py | 1 - src/sage/plot/bezier_path.py | 1 - src/sage/plot/circle.py | 1 - src/sage/plot/colors.py | 1 - src/sage/plot/complex_plot.pyx | 1 - src/sage/plot/contour_plot.py | 1 - src/sage/plot/density_plot.py | 1 - src/sage/plot/disk.py | 1 - src/sage/plot/ellipse.py | 1 - src/sage/plot/graphics.py | 2 +- src/sage/plot/histogram.py | 1 - src/sage/plot/hyperbolic_arc.py | 1 - src/sage/plot/hyperbolic_polygon.py | 1 - src/sage/plot/hyperbolic_regular_polygon.py | 1 - src/sage/plot/line.py | 1 - src/sage/plot/matrix_plot.py | 1 - src/sage/plot/misc.py | 1 - src/sage/plot/multigraphics.py | 1 - src/sage/plot/plot.py | 1 - src/sage/plot/plot3d/all.py | 26 +- src/sage/plot/plot3d/base.pxd | 1 - src/sage/plot/plot3d/base.pyx | 1 - src/sage/plot/plot3d/implicit_plot3d.py | 1 - src/sage/plot/plot3d/implicit_surface.pyx | 1 - src/sage/plot/plot3d/index_face_set.pxd | 1 - src/sage/plot/plot3d/index_face_set.pyx | 1 - src/sage/plot/plot3d/introduction.py | 1 - src/sage/plot/plot3d/list_plot3d.py | 1 - src/sage/plot/plot3d/parametric_plot3d.py | 1 - src/sage/plot/plot3d/parametric_surface.pxd | 1 - src/sage/plot/plot3d/parametric_surface.pyx | 1 - src/sage/plot/plot3d/platonic.py | 1 - src/sage/plot/plot3d/plot3d.py | 1 - src/sage/plot/plot3d/plot_field3d.py | 1 - src/sage/plot/plot3d/point_c.pxi | 1 - src/sage/plot/plot3d/revolution_plot3d.py | 1 - src/sage/plot/plot3d/shapes.pxd | 1 - src/sage/plot/plot3d/shapes.pyx | 1 - src/sage/plot/plot3d/shapes2.py | 1 - src/sage/plot/plot3d/tachyon.py | 1 - src/sage/plot/plot3d/texture.py | 1 - src/sage/plot/plot3d/transform.pxd | 1 - src/sage/plot/plot3d/transform.pyx | 1 - src/sage/plot/plot3d/tri_plot.py | 1 - src/sage/plot/plot_field.py | 1 - src/sage/plot/point.py | 2 +- src/sage/plot/polygon.py | 1 - src/sage/plot/primitive.py | 1 - src/sage/plot/scatter_plot.py | 1 - src/sage/plot/step.py | 1 - src/sage/plot/streamline_plot.py | 1 - src/sage/plot/text.py | 1 - src/sage/probability/all.py | 11 +- .../probability/probability_distribution.pyx | 1 - src/sage/probability/random_variable.py | 1 - src/sage/quadratic_forms/all.py | 21 +- .../quadratic_forms/all__sagemath_modules.py | 12 - .../quadratic_forms/all__sagemath_pari.py | 6 - src/sage/quadratic_forms/binary_qf.py | 1 - src/sage/quadratic_forms/bqf_class_group.py | 1 - src/sage/quadratic_forms/constructions.py | 1 - src/sage/quadratic_forms/count_local_2.pyx | 1 - src/sage/quadratic_forms/extras.py | 1 - src/sage/quadratic_forms/genera/all.py | 3 +- src/sage/quadratic_forms/genera/genus.py | 1 - .../quadratic_forms/genera/normal_form.py | 1 - .../quadratic_forms/genera/spinor_genus.py | 1 - src/sage/quadratic_forms/qfsolve.py | 1 - src/sage/quadratic_forms/quadratic_form.py | 1 - .../quadratic_form__automorphisms.py | 1 - .../quadratic_form__count_local_2.py | 1 - .../quadratic_form__equivalence_testing.py | 1 - .../quadratic_form__evaluate.pyx | 1 - .../quadratic_forms/quadratic_form__genus.py | 1 - ...uadratic_form__local_density_congruence.py | 1 - ...uadratic_form__local_density_interfaces.py | 1 - .../quadratic_form__local_field_invariants.py | 1 - .../quadratic_form__local_normal_form.py | 1 - ...c_form__local_representation_conditions.py | 1 - .../quadratic_forms/quadratic_form__mass.py | 1 - ...dratic_form__mass__Conway_Sloane_masses.py | 1 - .../quadratic_form__mass__Siegel_densities.py | 1 - .../quadratic_form__neighbors.py | 1 - .../quadratic_form__reduction_theory.py | 1 - .../quadratic_form__siegel_product.py | 1 - .../quadratic_form__split_local_covering.py | 1 - .../quadratic_form__ternary_Tornaria.py | 1 - .../quadratic_forms/quadratic_form__theta.py | 1 - .../quadratic_form__variable_substitutions.py | 1 - .../quadratic_forms/random_quadraticform.py | 1 - src/sage/quadratic_forms/special_values.py | 1 - src/sage/quadratic_forms/ternary.pyx | 1 - src/sage/quadratic_forms/ternary_qf.py | 1 - src/sage/quivers/algebra.py | 1 - src/sage/quivers/algebra_elements.pxd | 1 - src/sage/quivers/algebra_elements.pxi | 1 - src/sage/quivers/algebra_elements.pyx | 1 - src/sage/quivers/all.py | 1 - src/sage/quivers/homspace.py | 1 - src/sage/quivers/morphism.py | 1 - src/sage/quivers/path_semigroup.py | 2 +- src/sage/quivers/paths.pxd | 1 - src/sage/quivers/paths.pyx | 1 - src/sage/quivers/representation.py | 1 - src/sage/repl/__init__.py | 1 - src/sage/repl/all.py | 6 +- src/sage/repl/attach.py | 1 - src/sage/repl/configuration.py | 1 - src/sage/repl/display/__init__.py | 1 - src/sage/repl/display/fancy_repr.py | 2 +- src/sage/repl/display/formatter.py | 2 +- src/sage/repl/display/jsmol_iframe.py | 1 - src/sage/repl/display/pretty_print.py | 2 +- src/sage/repl/display/util.py | 2 +- src/sage/repl/image.py | 2 +- src/sage/repl/inputhook.py | 1 - src/sage/repl/interface_magic.py | 1 - src/sage/repl/interpreter.py | 1 - src/sage/repl/ipython_extension.py | 1 - src/sage/repl/ipython_kernel/__init__.py | 1 - src/sage/repl/ipython_kernel/__main__.py | 1 - src/sage/repl/ipython_kernel/all_jupyter.py | 7 +- src/sage/repl/ipython_kernel/install.py | 1 - src/sage/repl/ipython_kernel/interact.py | 2 +- src/sage/repl/ipython_kernel/kernel.py | 2 +- src/sage/repl/ipython_kernel/widgets.py | 1 - .../repl/ipython_kernel/widgets_sagenb.py | 2 +- src/sage/repl/ipython_tests.py | 1 - src/sage/repl/load.py | 1 - src/sage/repl/preparse.py | 2 +- src/sage/repl/prompts.py | 1 - src/sage/repl/rich_output/__init__.py | 2 +- src/sage/repl/rich_output/backend_base.py | 2 +- src/sage/repl/rich_output/backend_doctest.py | 2 +- src/sage/repl/rich_output/backend_emacs.py | 2 +- src/sage/repl/rich_output/backend_ipython.py | 2 +- src/sage/repl/rich_output/buffer.py | 2 +- src/sage/repl/rich_output/display_manager.py | 2 +- src/sage/repl/rich_output/output_basic.py | 2 +- src/sage/repl/rich_output/output_browser.py | 2 +- src/sage/repl/rich_output/output_catalog.py | 2 +- src/sage/repl/rich_output/output_graphics.py | 2 +- .../repl/rich_output/output_graphics3d.py | 2 +- src/sage/repl/rich_output/output_video.py | 2 +- src/sage/repl/rich_output/preferences.py | 2 +- src/sage/repl/rich_output/pretty_print.py | 2 +- src/sage/repl/rich_output/test_backend.py | 2 +- src/sage/repl/user_globals.py | 1 - src/sage/rings/abc.pxd | 1 - src/sage/rings/abc.pyx | 1 - .../rings/algebraic_closure_finite_field.py | 1 - src/sage/rings/all.py | 112 ++++++-- src/sage/rings/all__sagemath_brial.py | 0 src/sage/rings/all__sagemath_categories.py | 27 +- src/sage/rings/all__sagemath_combinat.py | 9 - src/sage/rings/all__sagemath_flint.py | 36 --- src/sage/rings/all__sagemath_gap.py | 6 - src/sage/rings/all__sagemath_linbox.py | 0 src/sage/rings/all__sagemath_modules.py | 24 -- src/sage/rings/all__sagemath_ntl.py | 6 - src/sage/rings/all__sagemath_objects.py | 1 - src/sage/rings/all__sagemath_pari.py | 12 - src/sage/rings/all__sagemath_singular.py | 0 src/sage/rings/all__sagemath_symbolics.py | 1 - src/sage/rings/asymptotic/all.py | 4 +- src/sage/rings/bernmm.pyx | 1 - src/sage/rings/bernoulli_mod_p.pyx | 1 - src/sage/rings/big_oh.py | 1 - src/sage/rings/cc.py | 1 - src/sage/rings/cif.py | 1 - src/sage/rings/complex_arb.pxd | 2 - src/sage/rings/complex_arb.pyx | 2 +- src/sage/rings/complex_conversion.pxd | 1 - src/sage/rings/complex_conversion.pyx | 1 - src/sage/rings/complex_double.pxd | 1 - src/sage/rings/complex_double.pyx | 1 - src/sage/rings/complex_interval.pxd | 1 - src/sage/rings/complex_interval.pyx | 1 - src/sage/rings/complex_interval_field.py | 1 - src/sage/rings/complex_mpc.pxd | 1 - src/sage/rings/complex_mpc.pyx | 1 - src/sage/rings/complex_mpfr.pxd | 1 - src/sage/rings/complex_mpfr.pyx | 1 - src/sage/rings/continued_fraction.py | 2 +- src/sage/rings/continued_fraction_gosper.py | 2 +- src/sage/rings/convert/all.py | 1 - src/sage/rings/convert/mpfi.pxd | 1 - src/sage/rings/convert/mpfi.pyx | 1 - src/sage/rings/derivation.py | 1 - src/sage/rings/factorint.pyx | 2 +- src/sage/rings/factorint_flint.pyx | 1 - src/sage/rings/factorint_pari.pyx | 1 - src/sage/rings/fast_arith.pxd | 2 - src/sage/rings/fast_arith.pyx | 1 - src/sage/rings/finite_rings/all.py | 10 +- .../finite_rings/all__sagemath_categories.py | 8 - .../finite_rings/all__sagemath_linbox.py | 0 .../finite_rings/all__sagemath_modules.py | 0 .../rings/finite_rings/all__sagemath_ntl.py | 0 .../rings/finite_rings/all__sagemath_pari.py | 0 .../rings/finite_rings/conway_polynomials.py | 1 - src/sage/rings/finite_rings/element_base.pxd | 1 - src/sage/rings/finite_rings/element_base.pyx | 1 - .../rings/finite_rings/element_givaro.pxd | 1 - .../rings/finite_rings/element_givaro.pyx | 1 - .../rings/finite_rings/element_ntl_gf2e.pxd | 1 - .../rings/finite_rings/element_ntl_gf2e.pyx | 1 - .../rings/finite_rings/element_pari_ffelt.pxd | 1 - .../rings/finite_rings/element_pari_ffelt.pyx | 1 - .../rings/finite_rings/finite_field_base.pxd | 1 - .../rings/finite_rings/finite_field_base.pyx | 1 - .../finite_rings/finite_field_constructor.py | 1 - .../rings/finite_rings/finite_field_givaro.py | 1 - .../finite_rings/finite_field_ntl_gf2e.py | 1 - .../finite_rings/finite_field_pari_ffelt.py | 1 - .../finite_rings/finite_field_prime_modn.py | 1 - src/sage/rings/finite_rings/galois_group.py | 1 - .../rings/finite_rings/hom_finite_field.pxd | 1 - .../rings/finite_rings/hom_finite_field.pyx | 1 - .../finite_rings/hom_finite_field_givaro.pxd | 1 - .../finite_rings/hom_finite_field_givaro.pyx | 1 - .../finite_rings/hom_prime_finite_field.pxd | 1 - .../finite_rings/hom_prime_finite_field.pyx | 1 - src/sage/rings/finite_rings/homset.py | 1 - src/sage/rings/finite_rings/integer_mod.pxd | 1 - src/sage/rings/finite_rings/integer_mod.pyx | 1 - .../rings/finite_rings/integer_mod_ring.py | 1 - .../rings/finite_rings/maps_finite_field.py | 1 - src/sage/rings/finite_rings/residue_field.pxd | 1 - src/sage/rings/finite_rings/residue_field.pyx | 1 - .../finite_rings/residue_field_givaro.pyx | 1 - .../finite_rings/residue_field_ntl_gf2e.pyx | 1 - .../finite_rings/residue_field_pari_ffelt.pyx | 1 - src/sage/rings/finite_rings/stdint.pxd | 1 - src/sage/rings/fraction_field.py | 2 +- src/sage/rings/fraction_field_FpT.pxd | 1 - src/sage/rings/fraction_field_FpT.pyx | 1 - src/sage/rings/fraction_field_element.pyx | 1 - src/sage/rings/function_field/all.py | 10 +- .../all__sagemath_categories.py | 1 - .../function_field/all__sagemath_modules.py | 1 - .../function_field/all__sagemath_pari.py | 0 .../function_field/all__sagemath_singular.py | 0 .../function_field/all__sagemath_symbolics.py | 1 - src/sage/rings/function_field/constructor.py | 1 - src/sage/rings/function_field/derivations.py | 1 - .../function_field/derivations_polymod.py | 1 - .../function_field/derivations_rational.py | 1 - src/sage/rings/function_field/differential.py | 1 - src/sage/rings/function_field/divisor.py | 1 - src/sage/rings/function_field/element.pxd | 1 - src/sage/rings/function_field/element.pyx | 1 - .../rings/function_field/element_polymod.pyx | 1 - .../rings/function_field/element_rational.pyx | 1 - src/sage/rings/function_field/extensions.py | 1 - .../rings/function_field/function_field.py | 1 - .../function_field/function_field_polymod.py | 1 - .../function_field/function_field_rational.py | 1 - .../hermite_form_polynomial.pyx | 1 - src/sage/rings/function_field/ideal.py | 1 - .../rings/function_field/ideal_polymod.py | 1 - .../rings/function_field/ideal_rational.py | 1 - src/sage/rings/function_field/maps.py | 1 - src/sage/rings/function_field/order.py | 1 - src/sage/rings/function_field/order_basis.py | 1 - .../rings/function_field/order_polymod.py | 1 - .../rings/function_field/order_rational.py | 1 - src/sage/rings/function_field/place.py | 1 - .../rings/function_field/place_polymod.py | 1 - .../rings/function_field/place_rational.py | 1 - src/sage/rings/function_field/valuation.py | 1 - src/sage/rings/generic.py | 1 - src/sage/rings/homset.py | 1 - src/sage/rings/ideal.py | 1 - src/sage/rings/ideal_monoid.py | 1 - src/sage/rings/imaginary_unit.py | 2 +- src/sage/rings/infinity.py | 1 - src/sage/rings/integer.pxd | 1 - src/sage/rings/integer.pyx | 1 - src/sage/rings/integer_fake.pxd | 1 - src/sage/rings/integer_ring.pxd | 1 - src/sage/rings/integer_ring.pyx | 1 - src/sage/rings/invariants/all.py | 2 - src/sage/rings/invariants/invariant_theory.py | 1 - src/sage/rings/invariants/reconstruction.py | 1 - src/sage/rings/laurent_series_ring.py | 1 - .../rings/laurent_series_ring_element.pxd | 1 - .../rings/laurent_series_ring_element.pyx | 1 - src/sage/rings/lazy_series.py | 2 +- src/sage/rings/lazy_series_ring.py | 1 - src/sage/rings/localization.py | 1 - src/sage/rings/monomials.py | 1 - src/sage/rings/morphism.pxd | 1 - src/sage/rings/morphism.pyx | 2 +- src/sage/rings/multi_power_series_ring.py | 1 - .../rings/multi_power_series_ring_element.py | 1 - src/sage/rings/noncommutative_ideals.pyx | 1 - src/sage/rings/number_field/S_unit_solver.py | 1 - src/sage/rings/number_field/all.py | 25 +- .../number_field/all__sagemath_categories.py | 0 .../rings/number_field/all__sagemath_flint.py | 0 .../rings/number_field/all__sagemath_pari.py | 0 src/sage/rings/number_field/bdd_height.py | 1 - src/sage/rings/number_field/class_group.py | 2 +- src/sage/rings/number_field/galois_group.py | 1 - src/sage/rings/number_field/homset.py | 1 - src/sage/rings/number_field/maps.py | 1 - src/sage/rings/number_field/morphism.py | 1 - src/sage/rings/number_field/number_field.py | 1 - .../rings/number_field/number_field_base.pxd | 1 - .../rings/number_field/number_field_base.pyx | 1 - .../number_field/number_field_element.pxd | 1 - .../number_field/number_field_element.pyx | 1 - .../number_field_element_base.pxd | 1 - .../number_field_element_base.pyx | 1 - .../number_field_element_quadratic.pxd | 1 - .../number_field_element_quadratic.pyx | 1 - .../rings/number_field/number_field_ideal.py | 1 - .../number_field/number_field_ideal_rel.py | 1 - .../number_field/number_field_morphisms.pyx | 1 - .../rings/number_field/number_field_rel.py | 1 - src/sage/rings/number_field/order.py | 1 - src/sage/rings/number_field/selmer_group.py | 2 +- .../small_primes_of_degree_one.py | 1 - .../rings/number_field/splitting_field.py | 1 - src/sage/rings/number_field/structure.py | 1 - src/sage/rings/number_field/totallyreal.pyx | 1 - .../rings/number_field/totallyreal_data.pxd | 1 - .../rings/number_field/totallyreal_data.pyx | 1 - .../rings/number_field/totallyreal_phc.py | 1 - .../rings/number_field/totallyreal_rel.py | 1 - src/sage/rings/number_field/unit_group.py | 1 - src/sage/rings/padics/CA_template.pxi | 1 - src/sage/rings/padics/CA_template_header.pxi | 1 - src/sage/rings/padics/CR_template.pxi | 1 - src/sage/rings/padics/CR_template_header.pxi | 1 - src/sage/rings/padics/FM_template.pxi | 1 - src/sage/rings/padics/FM_template_header.pxi | 1 - src/sage/rings/padics/FP_template.pxi | 1 - src/sage/rings/padics/FP_template_header.pxi | 1 - src/sage/rings/padics/all.py | 9 +- .../rings/padics/all__sagemath_categories.py | 1 - src/sage/rings/padics/all__sagemath_flint.py | 2 - src/sage/rings/padics/all__sagemath_ntl.py | 4 - src/sage/rings/padics/all__sagemath_pari.py | 10 - src/sage/rings/padics/common_conversion.pxd | 1 - src/sage/rings/padics/common_conversion.pyx | 1 - .../padics/eisenstein_extension_generic.py | 1 - src/sage/rings/padics/factory.py | 1 - src/sage/rings/padics/generic_nodes.py | 1 - src/sage/rings/padics/lattice_precision.py | 1 - src/sage/rings/padics/local_generic.py | 1 - .../rings/padics/local_generic_element.pxd | 1 - .../rings/padics/local_generic_element.pyx | 1 - src/sage/rings/padics/misc.py | 2 +- src/sage/rings/padics/morphism.pxd | 1 - src/sage/rings/padics/morphism.pyx | 1 - .../rings/padics/padic_ZZ_pX_CA_element.pxd | 1 - .../rings/padics/padic_ZZ_pX_CA_element.pyx | 1 - .../rings/padics/padic_ZZ_pX_CR_element.pxd | 1 - .../rings/padics/padic_ZZ_pX_CR_element.pyx | 1 - .../rings/padics/padic_ZZ_pX_FM_element.pxd | 1 - .../rings/padics/padic_ZZ_pX_FM_element.pyx | 1 - src/sage/rings/padics/padic_ZZ_pX_element.pxd | 1 - src/sage/rings/padics/padic_ZZ_pX_element.pyx | 1 - src/sage/rings/padics/padic_base_generic.py | 1 - src/sage/rings/padics/padic_base_leaves.py | 1 - .../padics/padic_capped_absolute_element.pxd | 1 - .../padics/padic_capped_absolute_element.pyx | 1 - .../padics/padic_capped_relative_element.pxd | 1 - .../padics/padic_capped_relative_element.pyx | 1 - src/sage/rings/padics/padic_ext_element.pxd | 1 - src/sage/rings/padics/padic_ext_element.pyx | 1 - .../rings/padics/padic_extension_generic.py | 1 - .../rings/padics/padic_extension_leaves.py | 1 - .../rings/padics/padic_fixed_mod_element.pxd | 1 - .../rings/padics/padic_fixed_mod_element.pyx | 1 - .../padics/padic_floating_point_element.pxd | 1 - .../padics/padic_floating_point_element.pyx | 1 - src/sage/rings/padics/padic_generic.py | 1 - .../rings/padics/padic_generic_element.pxd | 1 - .../rings/padics/padic_generic_element.pyx | 1 - .../rings/padics/padic_lattice_element.py | 1 - src/sage/rings/padics/padic_printing.pxd | 1 - src/sage/rings/padics/padic_printing.pyx | 1 - .../rings/padics/padic_relaxed_element.pxd | 1 - .../rings/padics/padic_relaxed_element.pyx | 1 - .../rings/padics/padic_relaxed_errors.pxd | 1 - .../rings/padics/padic_relaxed_errors.pyx | 1 - .../rings/padics/padic_template_element.pxi | 1 - .../padics/padic_template_element_header.pxi | 1 - src/sage/rings/padics/padic_valuation.py | 2 +- src/sage/rings/padics/pow_computer.pxd | 1 - src/sage/rings/padics/pow_computer.pyx | 1 - src/sage/rings/padics/pow_computer_ext.pxd | 1 - src/sage/rings/padics/pow_computer_ext.pyx | 1 - src/sage/rings/padics/pow_computer_flint.pxd | 1 - src/sage/rings/padics/pow_computer_flint.pyx | 1 - .../rings/padics/pow_computer_relative.pxd | 2 +- .../rings/padics/pow_computer_relative.pyx | 2 +- src/sage/rings/padics/precision_error.py | 1 - src/sage/rings/padics/qadic_flint_CA.pxd | 1 - src/sage/rings/padics/qadic_flint_CA.pyx | 1 - src/sage/rings/padics/qadic_flint_CR.pxd | 1 - src/sage/rings/padics/qadic_flint_CR.pyx | 1 - src/sage/rings/padics/qadic_flint_FM.pxd | 1 - src/sage/rings/padics/qadic_flint_FM.pyx | 1 - src/sage/rings/padics/qadic_flint_FP.pxd | 1 - src/sage/rings/padics/qadic_flint_FP.pyx | 1 - .../rings/padics/relative_extension_leaves.py | 1 - .../rings/padics/relative_ramified_CA.pxd | 1 - .../rings/padics/relative_ramified_CA.pyx | 1 - .../rings/padics/relative_ramified_CR.pxd | 1 - .../rings/padics/relative_ramified_CR.pyx | 1 - .../rings/padics/relative_ramified_FM.pxd | 1 - .../rings/padics/relative_ramified_FM.pyx | 1 - .../rings/padics/relative_ramified_FP.pxd | 1 - .../rings/padics/relative_ramified_FP.pyx | 1 - src/sage/rings/padics/relaxed_template.pxi | 1 - .../rings/padics/relaxed_template_header.pxi | 1 - src/sage/rings/padics/tests.py | 1 - src/sage/rings/padics/tutorial.py | 1 - .../padics/unramified_extension_generic.py | 1 - src/sage/rings/pari_ring.py | 1 - src/sage/rings/polynomial/all.py | 26 +- .../rings/polynomial/all__sagemath_brial.py | 0 .../polynomial/all__sagemath_categories.py | 21 -- .../rings/polynomial/all__sagemath_flint.py | 0 .../rings/polynomial/all__sagemath_linbox.py | 0 .../rings/polynomial/all__sagemath_modules.py | 7 - .../rings/polynomial/all__sagemath_ntl.py | 0 .../rings/polynomial/all__sagemath_pari.py | 0 .../polynomial/all__sagemath_singular.py | 0 .../polynomial/all__sagemath_symbolics.py | 0 .../rings/polynomial/binary_form_reduce.py | 1 + .../polynomial/commutative_polynomial.pxd | 1 - .../polynomial/commutative_polynomial.pyx | 1 - src/sage/rings/polynomial/complex_roots.py | 1 - src/sage/rings/polynomial/cyclotomic.pyx | 2 +- .../rings/polynomial/evaluation_flint.pxd | 1 - .../rings/polynomial/evaluation_flint.pyx | 1 - src/sage/rings/polynomial/evaluation_ntl.pxd | 1 - src/sage/rings/polynomial/evaluation_ntl.pyx | 1 - src/sage/rings/polynomial/flatten.py | 2 +- src/sage/rings/polynomial/hilbert.pyx | 2 +- src/sage/rings/polynomial/ideal.py | 2 +- .../polynomial/infinite_polynomial_element.py | 1 - .../polynomial/infinite_polynomial_ring.py | 1 - .../rings/polynomial/laurent_polynomial.pxd | 1 - .../rings/polynomial/laurent_polynomial.pyx | 1 - .../polynomial/laurent_polynomial_ideal.py | 1 - .../polynomial/laurent_polynomial_mpair.pxd | 1 - .../polynomial/laurent_polynomial_mpair.pyx | 1 - .../polynomial/laurent_polynomial_ring.py | 1 - .../laurent_polynomial_ring_base.py | 1 - src/sage/rings/polynomial/msolve.py | 1 + .../rings/polynomial/multi_polynomial.pxd | 1 - .../rings/polynomial/multi_polynomial.pyx | 1 - .../polynomial/multi_polynomial_element.py | 1 - .../polynomial/multi_polynomial_ideal.py | 1 - .../multi_polynomial_ideal_libsingular.pxd | 1 - .../multi_polynomial_ideal_libsingular.pyx | 1 - .../multi_polynomial_libsingular.pxd | 1 - .../multi_polynomial_libsingular.pyx | 1 - .../rings/polynomial/multi_polynomial_ring.py | 1 - .../polynomial/multi_polynomial_ring_base.pxd | 2 - .../polynomial/multi_polynomial_ring_base.pyx | 1 - .../polynomial/multi_polynomial_sequence.py | 1 - .../rings/polynomial/ore_function_element.py | 1 - .../rings/polynomial/ore_function_field.py | 1 - .../polynomial/ore_polynomial_element.pxd | 1 - .../polynomial/ore_polynomial_element.pyx | 1 - .../rings/polynomial/ore_polynomial_ring.py | 1 - src/sage/rings/polynomial/padics/all.py | 1 - .../polynomial/padics/polynomial_padic.py | 1 - .../polynomial_padic_capped_relative_dense.py | 1 - .../padics/polynomial_padic_flat.py | 1 - src/sage/rings/polynomial/pbori/PyPolyBoRi.py | 1 - src/sage/rings/polynomial/pbori/__init__.py | 1 - src/sage/rings/polynomial/pbori/blocks.py | 1 - src/sage/rings/polynomial/pbori/cnf.py | 1 - .../polynomial/pbori/easy_polynomials.py | 1 - src/sage/rings/polynomial/pbori/fglm.py | 1 - src/sage/rings/polynomial/pbori/frontend.py | 1 - src/sage/rings/polynomial/pbori/gbcore.py | 1 - src/sage/rings/polynomial/pbori/gbrefs.py | 1 - src/sage/rings/polynomial/pbori/heuristics.py | 1 - .../rings/polynomial/pbori/interpolate.py | 1 - src/sage/rings/polynomial/pbori/interred.py | 1 - src/sage/rings/polynomial/pbori/ll.py | 1 - src/sage/rings/polynomial/pbori/nf.py | 1 - src/sage/rings/polynomial/pbori/parallel.py | 1 - src/sage/rings/polynomial/pbori/pbori.pxd | 1 - src/sage/rings/polynomial/pbori/pbori.pyx | 1 - src/sage/rings/polynomial/pbori/randompoly.py | 1 - src/sage/rings/polynomial/pbori/rank.py | 1 - .../rings/polynomial/pbori/specialsets.py | 1 - src/sage/rings/polynomial/pbori/statistics.py | 1 - src/sage/rings/polynomial/plural.pxd | 1 - src/sage/rings/polynomial/plural.pyx | 1 - src/sage/rings/polynomial/polydict.pxd | 1 - src/sage/rings/polynomial/polydict.pyx | 1 - .../rings/polynomial/polynomial_compiled.pxd | 1 - .../rings/polynomial/polynomial_compiled.pyx | 1 - .../polynomial/polynomial_complex_arb.pxd | 2 - .../polynomial/polynomial_complex_arb.pyx | 2 +- .../rings/polynomial/polynomial_element.pxd | 1 - .../rings/polynomial/polynomial_element.pyx | 2 +- .../polynomial/polynomial_element_generic.py | 1 - .../rings/polynomial/polynomial_fateman.py | 1 - src/sage/rings/polynomial/polynomial_gf2x.pxd | 1 - src/sage/rings/polynomial/polynomial_gf2x.pyx | 1 - .../polynomial_integer_dense_flint.pxd | 1 - .../polynomial_integer_dense_flint.pyx | 1 - .../polynomial_integer_dense_ntl.pxd | 1 - .../polynomial_integer_dense_ntl.pyx | 1 - .../polynomial/polynomial_modn_dense_ntl.pxd | 1 - .../polynomial/polynomial_modn_dense_ntl.pyx | 1 - .../polynomial/polynomial_number_field.pyx | 1 - .../polynomial/polynomial_quotient_ring.py | 1 - .../polynomial_quotient_ring_element.py | 1 - .../polynomial/polynomial_rational_flint.pxd | 1 - .../polynomial/polynomial_rational_flint.pyx | 1 - .../polynomial/polynomial_real_mpfr_dense.pyx | 1 - src/sage/rings/polynomial/polynomial_ring.py | 2 +- .../polynomial/polynomial_ring_constructor.py | 1 - .../polynomial_ring_homomorphism.pxd | 1 - .../polynomial_ring_homomorphism.pyx | 1 - .../polynomial_singular_interface.py | 1 - .../rings/polynomial/polynomial_template.pxi | 1 - .../polynomial/polynomial_template_header.pxi | 1 - .../polynomial/polynomial_zmod_flint.pxd | 1 - .../polynomial/polynomial_zmod_flint.pyx | 1 - .../rings/polynomial/polynomial_zz_pex.pxd | 1 - .../rings/polynomial/polynomial_zz_pex.pyx | 1 - src/sage/rings/polynomial/real_roots.pxd | 1 - src/sage/rings/polynomial/real_roots.pyx | 1 - src/sage/rings/polynomial/refine_root.pyx | 1 - .../polynomial/skew_polynomial_element.pxd | 1 - .../polynomial/skew_polynomial_element.pyx | 1 - .../skew_polynomial_finite_field.pxd | 1 - .../skew_polynomial_finite_field.pyx | 1 - .../skew_polynomial_finite_order.pxd | 1 - .../skew_polynomial_finite_order.pyx | 1 - .../rings/polynomial/skew_polynomial_ring.py | 1 - src/sage/rings/polynomial/symmetric_ideal.py | 1 - .../rings/polynomial/symmetric_reduction.pxd | 1 - .../rings/polynomial/symmetric_reduction.pyx | 1 - src/sage/rings/polynomial/term_order.py | 1 - src/sage/rings/polynomial/toy_buchberger.py | 1 - src/sage/rings/polynomial/toy_d_basis.py | 1 - src/sage/rings/polynomial/toy_variety.py | 1 - src/sage/rings/polynomial/weil/all.py | 2 - .../polynomial/weil/weil_polynomials.pyx | 1 - src/sage/rings/power_series_mpoly.pxd | 1 - src/sage/rings/power_series_mpoly.pyx | 1 - src/sage/rings/power_series_pari.pxd | 1 - src/sage/rings/power_series_pari.pyx | 1 - src/sage/rings/power_series_poly.pxd | 1 - src/sage/rings/power_series_poly.pyx | 2 +- src/sage/rings/power_series_ring.py | 1 - src/sage/rings/power_series_ring_element.pxd | 1 - src/sage/rings/power_series_ring_element.pyx | 1 - src/sage/rings/puiseux_series_ring.py | 2 +- .../rings/puiseux_series_ring_element.pxd | 1 - .../rings/puiseux_series_ring_element.pyx | 2 +- src/sage/rings/qqbar.py | 1 - src/sage/rings/qqbar_decorators.py | 1 - src/sage/rings/quotient_ring.py | 1 - src/sage/rings/quotient_ring_element.py | 1 - src/sage/rings/rational.pxd | 1 - src/sage/rings/rational.pyx | 1 - src/sage/rings/rational_field.py | 1 - src/sage/rings/real_arb.pxd | 2 - src/sage/rings/real_arb.pyx | 2 +- src/sage/rings/real_double.pxd | 1 - src/sage/rings/real_double.pyx | 1 - src/sage/rings/real_double_element_gsl.pxd | 1 - src/sage/rings/real_double_element_gsl.pyx | 1 - src/sage/rings/real_field.py | 1 - src/sage/rings/real_interval_absolute.pyx | 1 - src/sage/rings/real_lazy.pxd | 1 - src/sage/rings/real_lazy.pyx | 1 - src/sage/rings/real_mpfi.pxd | 1 - src/sage/rings/real_mpfi.pyx | 1 - src/sage/rings/real_mpfr.pxd | 1 - src/sage/rings/real_mpfr.pyx | 1 - src/sage/rings/ring.pxd | 1 - src/sage/rings/ring.pyx | 1 - src/sage/rings/ring_extension.pxd | 1 - src/sage/rings/ring_extension.pyx | 1 - src/sage/rings/ring_extension_conversion.pxd | 1 - src/sage/rings/ring_extension_conversion.pyx | 1 - src/sage/rings/ring_extension_element.pxd | 1 - src/sage/rings/ring_extension_element.pyx | 1 - src/sage/rings/ring_extension_homset.py | 1 - src/sage/rings/ring_extension_morphism.pxd | 1 - src/sage/rings/ring_extension_morphism.pyx | 1 - src/sage/rings/semirings/all.py | 6 +- .../non_negative_integer_semiring.py | 1 - .../rings/semirings/tropical_semiring.pyx | 1 - src/sage/rings/sum_of_squares.pxd | 1 - src/sage/rings/sum_of_squares.pyx | 1 - src/sage/rings/tate_algebra.py | 1 - src/sage/rings/tate_algebra_element.pxd | 1 - src/sage/rings/tate_algebra_element.pyx | 1 - src/sage/rings/tate_algebra_ideal.pxd | 1 - src/sage/rings/tate_algebra_ideal.pyx | 1 - src/sage/rings/tests.py | 1 - src/sage/rings/universal_cyclotomic_field.py | 1 - src/sage/rings/valuation/all.py | 2 - .../rings/valuation/augmented_valuation.py | 1 - .../rings/valuation/developing_valuation.py | 2 +- src/sage/rings/valuation/gauss_valuation.py | 2 +- .../rings/valuation/inductive_valuation.py | 2 +- src/sage/rings/valuation/limit_valuation.py | 2 +- src/sage/rings/valuation/mapped_valuation.py | 2 +- src/sage/rings/valuation/scaled_valuation.py | 2 +- src/sage/rings/valuation/trivial_valuation.py | 2 +- src/sage/rings/valuation/valuation.py | 2 +- src/sage/rings/valuation/valuation_space.py | 2 +- .../rings/valuation/valuations_catalog.py | 1 - src/sage/rings/valuation/value_group.py | 2 +- src/sage/sandpiles/all.py | 2 - src/sage/sandpiles/examples.py | 2 +- src/sage/sandpiles/sandpile.py | 1 - src/sage/sat/all.py | 2 - src/sage/sat/boolean_polynomials.py | 1 - src/sage/sat/converters/__init__.py | 1 - src/sage/sat/converters/anf2cnf.py | 1 - src/sage/sat/converters/polybori.py | 1 - src/sage/sat/solvers/__init__.py | 1 - src/sage/sat/solvers/cryptominisat.py | 1 - src/sage/sat/solvers/dimacs.py | 1 - src/sage/sat/solvers/picosat.py | 1 - src/sage/sat/solvers/sat_lp.py | 1 - src/sage/sat/solvers/satsolver.pxd | 1 - src/sage/sat/solvers/satsolver.pyx | 1 - src/sage/schemes/affine/affine_homset.py | 1 - src/sage/schemes/affine/affine_morphism.py | 1 - src/sage/schemes/affine/affine_point.py | 1 - .../schemes/affine/affine_rational_point.py | 1 - src/sage/schemes/affine/affine_space.py | 1 - src/sage/schemes/affine/affine_subscheme.py | 1 - src/sage/schemes/affine/all.py | 11 +- src/sage/schemes/all.py | 34 ++- src/sage/schemes/all__sagemath_categories.py | 4 - src/sage/schemes/all__sagemath_ntl.py | 0 src/sage/schemes/all__sagemath_polyhedra.py | 1 - src/sage/schemes/berkovich/all.py | 3 +- .../schemes/berkovich/berkovich_cp_element.py | 1 - src/sage/schemes/berkovich/berkovich_space.py | 1 - src/sage/schemes/curves/affine_curve.py | 1 - src/sage/schemes/curves/all.py | 11 +- src/sage/schemes/curves/closed_point.py | 1 - src/sage/schemes/curves/constructor.py | 1 - src/sage/schemes/curves/curve.py | 1 - src/sage/schemes/curves/point.py | 1 - src/sage/schemes/curves/projective_curve.py | 1 - src/sage/schemes/curves/zariski_vankampen.py | 1 - src/sage/schemes/cyclic_covers/all.py | 4 +- .../cyclic_covers/charpoly_frobenius.py | 1 - src/sage/schemes/cyclic_covers/constructor.py | 1 - .../cyclic_covers/cycliccover_finite_field.py | 1 - .../cyclic_covers/cycliccover_generic.py | 1 - src/sage/schemes/elliptic_curves/BSD.py | 1 - src/sage/schemes/elliptic_curves/Qcurves.py | 1 - src/sage/schemes/elliptic_curves/all.py | 36 ++- .../schemes/elliptic_curves/cardinality.py | 1 - src/sage/schemes/elliptic_curves/cm.py | 1 - .../schemes/elliptic_curves/constructor.py | 1 - .../schemes/elliptic_curves/ec_database.py | 1 - .../elliptic_curves/ell_curve_isogeny.py | 1 - src/sage/schemes/elliptic_curves/ell_egros.py | 1 - src/sage/schemes/elliptic_curves/ell_field.py | 1 - .../elliptic_curves/ell_finite_field.py | 1 - .../schemes/elliptic_curves/ell_generic.py | 1 - .../schemes/elliptic_curves/ell_local_data.py | 1 - .../elliptic_curves/ell_modular_symbols.py | 1 - .../elliptic_curves/ell_number_field.py | 1 - .../elliptic_curves/ell_padic_field.py | 1 - src/sage/schemes/elliptic_curves/ell_point.py | 1 - .../elliptic_curves/ell_rational_field.py | 1 - .../schemes/elliptic_curves/ell_tate_curve.py | 1 - .../schemes/elliptic_curves/ell_torsion.py | 1 - src/sage/schemes/elliptic_curves/ell_wp.py | 1 - .../schemes/elliptic_curves/formal_group.py | 1 - src/sage/schemes/elliptic_curves/gal_reps.py | 1 - .../elliptic_curves/gal_reps_number_field.py | 1 - src/sage/schemes/elliptic_curves/gp_simon.py | 1 - src/sage/schemes/elliptic_curves/heegner.py | 1 - src/sage/schemes/elliptic_curves/height.py | 1 - src/sage/schemes/elliptic_curves/hom.py | 1 - .../schemes/elliptic_curves/hom_composite.py | 1 - .../schemes/elliptic_curves/hom_frobenius.py | 1 - .../schemes/elliptic_curves/hom_scalar.py | 1 - src/sage/schemes/elliptic_curves/hom_sum.py | 1 - .../schemes/elliptic_curves/hom_velusqrt.py | 1 - .../schemes/elliptic_curves/isogeny_class.py | 1 - .../elliptic_curves/isogeny_small_degree.py | 1 - src/sage/schemes/elliptic_curves/jacobian.py | 1 - .../schemes/elliptic_curves/kodaira_symbol.py | 1 - src/sage/schemes/elliptic_curves/kraus.py | 1 - .../schemes/elliptic_curves/lseries_ell.py | 1 - .../schemes/elliptic_curves/mod5family.py | 1 - src/sage/schemes/elliptic_curves/mod_poly.py | 1 - .../schemes/elliptic_curves/mod_sym_num.pyx | 2 +- .../modular_parametrization.py | 1 - .../schemes/elliptic_curves/padic_lseries.py | 1 - src/sage/schemes/elliptic_curves/padics.py | 1 - .../schemes/elliptic_curves/period_lattice.py | 1 - .../elliptic_curves/period_lattice_region.pyx | 1 - .../schemes/elliptic_curves/saturation.py | 1 - src/sage/schemes/elliptic_curves/sha_tate.py | 1 - .../elliptic_curves/weierstrass_morphism.py | 1 - .../elliptic_curves/weierstrass_transform.py | 1 - src/sage/schemes/generic/algebraic_scheme.py | 1 - src/sage/schemes/generic/all.py | 5 +- src/sage/schemes/generic/ambient_space.py | 1 - src/sage/schemes/generic/divisor.py | 1 - src/sage/schemes/generic/divisor_group.py | 1 - src/sage/schemes/generic/glue.py | 1 - src/sage/schemes/generic/homset.py | 1 - src/sage/schemes/generic/hypersurface.py | 1 - src/sage/schemes/generic/morphism.py | 1 - src/sage/schemes/generic/point.py | 1 - src/sage/schemes/generic/scheme.py | 1 - src/sage/schemes/generic/spec.py | 1 - src/sage/schemes/hyperelliptic_curves/all.py | 11 +- .../hyperelliptic_curves/all__sagemath_ntl.py | 0 .../hyperelliptic_curves/constructor.py | 1 - .../hyperelliptic_curves/hypellfrob.pyx | 1 - .../hyperelliptic_finite_field.py | 1 - .../hyperelliptic_curves/hyperelliptic_g2.py | 1 - .../hyperelliptic_generic.py | 1 - .../hyperelliptic_padic_field.py | 1 - .../hyperelliptic_rational_field.py | 1 - .../hyperelliptic_curves/invariants.py | 1 - .../jacobian_endomorphism_utils.py | 1 - .../hyperelliptic_curves/jacobian_g2.py | 1 - .../hyperelliptic_curves/jacobian_generic.py | 1 - .../hyperelliptic_curves/jacobian_homset.py | 1 - .../hyperelliptic_curves/jacobian_morphism.py | 1 - .../hyperelliptic_curves/kummer_surface.py | 1 - .../schemes/hyperelliptic_curves/mestre.py | 1 - .../hyperelliptic_curves/monsky_washnitzer.py | 1 - .../schemes/jacobians/abstract_jacobian.py | 1 - src/sage/schemes/jacobians/all.py | 4 +- src/sage/schemes/overview.py | 1 - src/sage/schemes/plane_conics/all.py | 3 +- src/sage/schemes/plane_conics/con_field.py | 1 - .../schemes/plane_conics/con_finite_field.py | 1 - .../schemes/plane_conics/con_number_field.py | 1 - .../plane_conics/con_rational_field.py | 1 - .../con_rational_function_field.py | 1 - src/sage/schemes/plane_conics/constructor.py | 1 - src/sage/schemes/plane_quartics/all.py | 4 +- .../plane_quartics/quartic_constructor.py | 1 - .../schemes/plane_quartics/quartic_generic.py | 1 - src/sage/schemes/product_projective/all.py | 2 - src/sage/schemes/product_projective/homset.py | 1 - .../schemes/product_projective/morphism.py | 1 - src/sage/schemes/product_projective/point.py | 1 - .../product_projective/rational_point.py | 1 - src/sage/schemes/product_projective/space.py | 1 - .../schemes/product_projective/subscheme.py | 1 - src/sage/schemes/projective/all.py | 9 +- .../schemes/projective/proj_bdd_height.py | 1 - .../schemes/projective/projective_homset.py | 1 - .../schemes/projective/projective_morphism.py | 1 - .../schemes/projective/projective_point.py | 1 - .../projective/projective_rational_point.py | 1 - .../schemes/projective/projective_space.py | 1 - .../projective/projective_subscheme.py | 1 - src/sage/schemes/riemann_surfaces/all.py | 1 - .../riemann_surfaces/riemann_surface.py | 1 - src/sage/schemes/toric/all.py | 2 - src/sage/schemes/toric/chow_group.py | 1 - src/sage/schemes/toric/divisor.py | 1 - src/sage/schemes/toric/divisor_class.pyx | 1 - src/sage/schemes/toric/fano_variety.py | 1 - src/sage/schemes/toric/homset.py | 1 - src/sage/schemes/toric/ideal.py | 1 - src/sage/schemes/toric/library.py | 1 - src/sage/schemes/toric/morphism.py | 1 - src/sage/schemes/toric/points.py | 1 - src/sage/schemes/toric/sheaf/all.py | 1 - src/sage/schemes/toric/sheaf/constructor.py | 1 - src/sage/schemes/toric/sheaf/klyachko.py | 1 - src/sage/schemes/toric/toric_subscheme.py | 1 - src/sage/schemes/toric/variety.py | 1 - src/sage/schemes/toric/weierstrass.py | 1 - .../schemes/toric/weierstrass_covering.py | 1 - src/sage/schemes/toric/weierstrass_higher.py | 1 - src/sage/sets/all.py | 28 +- src/sage/sets/all__sagemath_objects.py | 1 - src/sage/sets/cartesian_product.py | 1 - src/sage/sets/condition_set.py | 1 - src/sage/sets/disjoint_set.pxd | 1 - src/sage/sets/disjoint_set.pyx | 2 +- .../sets/disjoint_union_enumerated_sets.py | 1 - src/sage/sets/family.pxd | 1 - src/sage/sets/family.pyx | 1 - src/sage/sets/finite_enumerated_set.py | 1 - src/sage/sets/finite_set_map_cy.pxd | 1 - src/sage/sets/finite_set_map_cy.pyx | 1 - src/sage/sets/finite_set_maps.py | 1 - src/sage/sets/image_set.py | 1 - src/sage/sets/integer_range.py | 1 - src/sage/sets/non_negative_integers.py | 1 - src/sage/sets/positive_integers.py | 1 - src/sage/sets/primes.py | 1 - src/sage/sets/pythonclass.pxd | 1 - src/sage/sets/pythonclass.pyx | 1 - src/sage/sets/real_set.py | 1 - src/sage/sets/recursively_enumerated_set.pxd | 1 - src/sage/sets/recursively_enumerated_set.pyx | 2 +- src/sage/sets/set.py | 1 - src/sage/sets/set_from_iterator.py | 1 - src/sage/sets/totally_ordered_finite_set.py | 1 - src/sage/stats/all.py | 13 +- src/sage/stats/basic_stats.py | 1 - src/sage/stats/distributions/all.py | 1 - src/sage/stats/distributions/dgs.pxd | 1 - .../discrete_gaussian_integer.pxd | 1 - .../discrete_gaussian_integer.pyx | 1 - .../discrete_gaussian_lattice.py | 2 +- .../discrete_gaussian_polynomial.py | 2 +- src/sage/stats/hmm/all.py | 7 +- src/sage/stats/hmm/chmm.pyx | 1 - src/sage/stats/hmm/distributions.pxd | 1 - src/sage/stats/hmm/distributions.pyx | 1 - src/sage/stats/hmm/hmm.pxd | 1 - src/sage/stats/hmm/hmm.pyx | 1 - src/sage/stats/hmm/util.pxd | 1 - src/sage/stats/hmm/util.pyx | 1 - src/sage/stats/intlist.pxd | 1 - src/sage/stats/intlist.pyx | 1 - src/sage/stats/r.py | 1 - src/sage/stats/time_series.pxd | 1 - src/sage/stats/time_series.pyx | 1 - src/sage/structure/__init__.py | 1 - src/sage/structure/all.py | 3 +- src/sage/structure/category_object.pxd | 1 - src/sage/structure/category_object.pyx | 1 - src/sage/structure/coerce.pxd | 1 - src/sage/structure/coerce.pyx | 1 - src/sage/structure/coerce_actions.pxd | 1 - src/sage/structure/coerce_actions.pyx | 1 - src/sage/structure/coerce_dict.pxd | 1 - src/sage/structure/coerce_dict.pyx | 1 - src/sage/structure/coerce_exceptions.py | 1 - src/sage/structure/coerce_maps.pxd | 1 - src/sage/structure/coerce_maps.pyx | 1 - src/sage/structure/debug_options.pxd | 1 - src/sage/structure/debug_options.pyx | 1 - src/sage/structure/dynamic_class.py | 1 - src/sage/structure/element.pxd | 1 - src/sage/structure/element.pyx | 1 - src/sage/structure/element_wrapper.pxd | 1 - src/sage/structure/element_wrapper.pyx | 2 +- src/sage/structure/factorization.py | 1 - src/sage/structure/factorization_integer.py | 1 - src/sage/structure/factory.pyx | 1 - src/sage/structure/formal_sum.py | 1 - src/sage/structure/gens_py.py | 1 - src/sage/structure/global_options.py | 1 - src/sage/structure/indexed_generators.py | 2 +- src/sage/structure/list_clone.pxd | 1 - src/sage/structure/list_clone.pyx | 1 - src/sage/structure/list_clone_demo.pyx | 1 - src/sage/structure/list_clone_timings.py | 2 +- src/sage/structure/list_clone_timings_cy.pyx | 1 - src/sage/structure/mutability.pxd | 3 +- src/sage/structure/mutability.pyx | 1 - src/sage/structure/nonexact.py | 1 - src/sage/structure/parent.pxd | 1 - src/sage/structure/parent.pyx | 1 - src/sage/structure/parent_base.pxd | 1 - src/sage/structure/parent_base.pyx | 1 - src/sage/structure/parent_gens.pxd | 1 - src/sage/structure/parent_gens.pyx | 1 - src/sage/structure/parent_old.pxd | 1 - src/sage/structure/parent_old.pyx | 1 - src/sage/structure/proof/__init__.py | 1 - src/sage/structure/proof/all.py | 15 +- src/sage/structure/proof/proof.py | 1 - src/sage/structure/richcmp.pxd | 1 - src/sage/structure/richcmp.pyx | 1 - src/sage/structure/sage_object.pxd | 1 - src/sage/structure/sage_object.pyx | 2 +- src/sage/structure/sage_object_test.py | 1 - src/sage/structure/sequence.py | 1 - src/sage/structure/set_factories.py | 1 - src/sage/structure/set_factories_example.py | 1 - src/sage/structure/support_view.py | 1 - src/sage/structure/test_factory.py | 1 - src/sage/structure/unique_representation.py | 1 - src/sage/symbolic/all.py | 16 +- src/sage/symbolic/all__sagemath_categories.py | 0 .../all__sagemath_standard_no_symbolics.py | 0 src/sage/symbolic/assumptions.py | 1 - src/sage/symbolic/benchmark.py | 1 - src/sage/symbolic/callable.py | 1 - src/sage/symbolic/comparison_impl.pxi | 1 - src/sage/symbolic/complexity_measures.py | 1 - src/sage/symbolic/constants.py | 1 - src/sage/symbolic/constants_c_impl.pxi | 1 - src/sage/symbolic/expression.pxd | 2 - src/sage/symbolic/expression.pyx | 2 +- .../expression_conversion_algebraic.py | 1 - .../symbolic/expression_conversion_sympy.py | 1 - src/sage/symbolic/expression_conversions.py | 1 - src/sage/symbolic/function.pxd | 1 - src/sage/symbolic/function.pyx | 1 - src/sage/symbolic/function_factory.py | 1 - src/sage/symbolic/getitem_impl.pxi | 1 - src/sage/symbolic/integration/all.py | 1 - src/sage/symbolic/integration/external.py | 1 - src/sage/symbolic/integration/integral.py | 1 - src/sage/symbolic/maxima_wrapper.py | 1 - src/sage/symbolic/operators.py | 1 - src/sage/symbolic/pynac.pxi | 1 - src/sage/symbolic/pynac_constant_impl.pxi | 1 - src/sage/symbolic/pynac_function_impl.pxi | 1 - src/sage/symbolic/pynac_impl.pxi | 1 - src/sage/symbolic/random_tests.py | 1 - src/sage/symbolic/relation.py | 1 - src/sage/symbolic/ring.pxd | 1 - src/sage/symbolic/ring.pyx | 2 +- src/sage/symbolic/series_impl.pxi | 1 - src/sage/symbolic/subring.py | 1 - src/sage/symbolic/substitution_map_impl.pxi | 1 - src/sage/symbolic/symbols.py | 1 - src/sage/symbolic/symengine.py | 1 - src/sage/symbolic/tests.py | 1 - src/sage/symbolic/units.py | 1 - src/sage/tensor/all.py | 4 +- src/sage/tensor/modules/all.py | 2 - .../modules/alternating_contr_tensor.py | 1 - src/sage/tensor/modules/comp.py | 1 - .../tensor/modules/ext_pow_free_module.py | 1 - .../tensor/modules/finite_rank_free_module.py | 1 - src/sage/tensor/modules/format_utilities.py | 1 - .../tensor/modules/free_module_alt_form.py | 1 - .../modules/free_module_automorphism.py | 1 - src/sage/tensor/modules/free_module_basis.py | 1 - .../tensor/modules/free_module_element.py | 1 - src/sage/tensor/modules/free_module_homset.py | 1 - .../modules/free_module_linear_group.py | 1 - .../tensor/modules/free_module_morphism.py | 1 - src/sage/tensor/modules/free_module_tensor.py | 1 - src/sage/tensor/modules/reflexive_module.py | 1 - src/sage/tensor/modules/tensor_free_module.py | 1 - .../tensor/modules/tensor_free_submodule.py | 1 - .../modules/tensor_free_submodule_basis.py | 1 - .../tensor/modules/tensor_with_indices.py | 1 - src/sage/tests/__init__.py | 1 - src/sage/tests/all.py | 1 - ...ticle_heuberger_krenn_kropf_fsm-in-sage.py | 1 - src/sage/tests/arxiv_0812_2725.py | 1 - src/sage/tests/benchmark.py | 1 - .../book_schilling_zabrocki_kschur_primer.py | 1 - src/sage/tests/book_stein_ent.py | 1 - .../__init__.py | 1 - .../calculus_doctest.py | 2 +- .../combinat_doctest.py | 2 +- .../domaines_doctest.py | 2 +- .../float_doctest.py | 2 +- .../graphique_doctest.py | 2 +- .../graphtheory_doctest.py | 2 +- .../integration_doctest.py | 2 +- .../linalg_doctest.py | 2 +- .../linsolve_doctest.py | 2 +- .../lp_doctest.py | 2 +- .../mpoly_doctest.py | 2 +- .../nonlinear_doctest.py | 2 +- .../numbertheory_doctest.py | 2 +- .../polynomes_doctest.py | 2 +- .../premierspas_doctest.py | 2 +- .../programmation_doctest.py | 2 +- .../recequadiff_doctest.py | 2 +- .../sol/__init__.py | 1 - .../sol/calculus_doctest.py | 2 +- .../sol/combinat_doctest.py | 2 +- .../sol/domaines_doctest.py | 2 +- .../sol/float_doctest.py | 2 +- .../sol/graphique_doctest.py | 2 +- .../sol/graphtheory_doctest.py | 2 +- .../sol/integration_doctest.py | 2 +- .../sol/linalg_doctest.py | 2 +- .../sol/linsolve_doctest.py | 2 +- .../sol/lp_doctest.py | 2 +- .../sol/mpoly_doctest.py | 2 +- .../sol/nonlinear_doctest.py | 2 +- .../sol/numbertheory_doctest.py | 2 +- .../sol/polynomes_doctest.py | 2 +- .../sol/recequadiff_doctest.py | 2 +- .../books/judson-abstract-algebra/__init__.py | 1 - .../actions-sage-exercises.py | 2 +- .../judson-abstract-algebra/actions-sage.py | 2 +- .../judson-abstract-algebra/algcodes-sage.py | 2 +- .../judson-abstract-algebra/boolean-sage.py | 2 +- .../cosets-sage-exercises.py | 2 +- .../judson-abstract-algebra/cosets-sage.py | 2 +- .../judson-abstract-algebra/crypt-sage.py | 2 +- .../judson-abstract-algebra/cyclic-sage.py | 2 +- .../judson-abstract-algebra/domains-sage.py | 2 +- .../judson-abstract-algebra/fields-sage.py | 2 +- .../judson-abstract-algebra/finite-sage.py | 2 +- .../judson-abstract-algebra/galois-sage.py | 2 +- .../judson-abstract-algebra/groups-sage.py | 2 +- .../homomorph-sage-exercises.py | 2 +- .../judson-abstract-algebra/homomorph-sage.py | 2 +- .../judson-abstract-algebra/integers-sage.py | 2 +- .../judson-abstract-algebra/isomorph-sage.py | 2 +- .../judson-abstract-algebra/normal-sage.py | 2 +- .../judson-abstract-algebra/permute-sage.py | 2 +- .../judson-abstract-algebra/poly-sage.py | 2 +- .../judson-abstract-algebra/rings-sage.py | 2 +- .../judson-abstract-algebra/sets-sage.py | 2 +- .../judson-abstract-algebra/struct-sage.py | 2 +- .../judson-abstract-algebra/sylow-sage.py | 2 +- .../vect-sage-exercises.py | 2 +- .../judson-abstract-algebra/vect-sage.py | 2 +- src/sage/tests/cmdline.py | 1 - src/sage/tests/combinatorial_hopf_algebras.py | 1 - src/sage/tests/cython.pyx | 1 - src/sage/tests/finite_poset.py | 1 - src/sage/tests/functools_partial_src.py | 1 - src/sage/tests/gosper-sum.py | 1 - src/sage/tests/lazy_imports.py | 1 - src/sage/tests/memcheck/__init__.py | 1 - src/sage/tests/memcheck/run_tests.py | 1 - .../tests/memcheck/run_tests_in_valgrind.py | 1 - .../tests/memcheck/symbolic_expression.py | 1 - src/sage/tests/memcheck/verify_no_leak.py | 1 - src/sage/tests/modular_group_cohomology.py | 1 - src/sage/tests/numpy.py | 1 - src/sage/tests/parigp.py | 1 - src/sage/tests/startup.py | 1 - src/sage/tests/stl_vector.pyx | 1 - src/sage/tests/symbolic-series.py | 1 - src/sage/tests/sympy.py | 1 - src/sage/tests/test_deprecation.py | 1 - src/sage/topology/all.py | 10 +- src/sage/topology/cell_complex.py | 1 - src/sage/topology/cubical_complex.py | 1 - src/sage/topology/delta_complex.py | 1 - .../topology/filtered_simplicial_complex.py | 1 - src/sage/topology/moment_angle_complex.py | 1 - src/sage/topology/simplicial_complex.py | 1 - .../topology/simplicial_complex_catalog.py | 1 - .../topology/simplicial_complex_examples.py | 1 - .../topology/simplicial_complex_homset.py | 1 - .../topology/simplicial_complex_morphism.py | 1 - src/sage/topology/simplicial_set.py | 1 - src/sage/topology/simplicial_set_catalog.py | 1 - .../topology/simplicial_set_constructions.py | 1 - src/sage/topology/simplicial_set_examples.py | 1 - src/sage/topology/simplicial_set_morphism.py | 1 - src/sage/typeset/all.py | 2 - src/sage/typeset/ascii_art.py | 2 +- src/sage/typeset/character_art.py | 2 +- src/sage/typeset/character_art_factory.py | 2 +- src/sage/typeset/symbols.py | 2 +- src/sage/typeset/unicode_art.py | 2 +- src/sage/typeset/unicode_characters.py | 1 - .../flint/templates/flint_sage.pyx.template | 1 - src/sage_setup/find.py | 4 +- src/setup.cfg.m4 | 133 +++++++++ 3547 files changed, 2061 insertions(+), 5665 deletions(-) create mode 120000 pkgs/sagemath-standard/setup.cfg create mode 120000 pkgs/sagemath-standard/setup.cfg.m4 delete mode 100644 src/sage/algebras/all__sagemath_combinat.py delete mode 100644 src/sage/algebras/all__sagemath_modules.py delete mode 100644 src/sage/algebras/all__sagemath_singular.py delete mode 100644 src/sage/algebras/lie_algebras/all__sagemath_modules.py delete mode 100644 src/sage/calculus/all__sagemath_categories.py delete mode 100644 src/sage/calculus/all__sagemath_modules.py delete mode 100644 src/sage/calculus/expr.py delete mode 100644 src/sage/coding/all__sagemath_gap.py delete mode 100644 src/sage/coding/codecan/all__sagemath_gap.py delete mode 100644 src/sage/combinat/all__sagemath_categories.py delete mode 100644 src/sage/combinat/all__sagemath_combinat.py delete mode 100644 src/sage/combinat/all__sagemath_flint.py delete mode 100644 src/sage/combinat/all__sagemath_gap.py delete mode 100644 src/sage/combinat/all__sagemath_graphs.py delete mode 100644 src/sage/combinat/all__sagemath_modules.py delete mode 100644 src/sage/combinat/matrices/all__sagemath_categories.py delete mode 100644 src/sage/combinat/posets/all__sagemath_flint.py delete mode 100644 src/sage/combinat/root_system/all__sagemath_gap.py delete mode 100644 src/sage/data_structures/all__sagemath_categories.py delete mode 100644 src/sage/data_structures/all__sagemath_combinat.py delete mode 100644 src/sage/data_structures/all__sagemath_flint.py delete mode 100644 src/sage/databases/all__sagemath_graphs.py delete mode 100644 src/sage/dynamics/all__sagemath_schemes.py delete mode 100644 src/sage/dynamics/all__sagemath_symbolics.py delete mode 100644 src/sage/ext/all__sagemath_categories.py delete mode 100644 src/sage/ext/all__sagemath_modules.py delete mode 100644 src/sage/ext/all__sagemath_pari.py delete mode 100644 src/sage/ext/all__sagemath_symbolics.py delete mode 100644 src/sage/ext_data/all__sagemath_gap.py delete mode 100644 src/sage/ext_data/all__sagemath_singular.py delete mode 100644 src/sage/geometry/all__sagemath_categories.py delete mode 100644 src/sage/geometry/all__sagemath_gap.py delete mode 100644 src/sage/geometry/all__sagemath_linbox.py delete mode 100644 src/sage/geometry/all__sagemath_modules.py delete mode 100644 src/sage/geometry/all__sagemath_polyhedra.py delete mode 100644 src/sage/geometry/all__sagemath_symbolics.py delete mode 100644 src/sage/graphs/all__sagemath_flint.py delete mode 100644 src/sage/groups/abelian_gps/all__sagemath_gap.py delete mode 100644 src/sage/groups/abelian_gps/all__sagemath_modules.py delete mode 100644 src/sage/groups/all__sagemath_categories.py delete mode 100644 src/sage/groups/all__sagemath_combinat.py delete mode 100644 src/sage/groups/all__sagemath_gap.py delete mode 100644 src/sage/groups/all__sagemath_graphs.py delete mode 100644 src/sage/groups/all__sagemath_groups.py delete mode 100644 src/sage/groups/all__sagemath_modules.py delete mode 100644 src/sage/groups/all__sagemath_objects.py delete mode 100644 src/sage/groups/all__sagemath_pari.py delete mode 100644 src/sage/groups/matrix_gps/all__sagemath_gap.py delete mode 100644 src/sage/groups/matrix_gps/all__sagemath_modules.py delete mode 100644 src/sage/groups/perm_gps/all__sagemath_categories.py delete mode 100644 src/sage/groups/perm_gps/all__sagemath_graphs.py delete mode 100644 src/sage/groups/perm_gps/all__sagemath_modules.py delete mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py delete mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py delete mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py delete mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py delete mode 100644 src/sage/homology/all__sagemath_modules.py delete mode 100644 src/sage/interfaces/all__sagemath_categories.py delete mode 100644 src/sage/interfaces/all__sagemath_gap.py delete mode 100644 src/sage/interfaces/all__sagemath_libecm.py delete mode 100644 src/sage/interfaces/all__sagemath_pari.py delete mode 100644 src/sage/interfaces/all__sagemath_plot.py delete mode 100644 src/sage/interfaces/all__sagemath_symbolics.py delete mode 100644 src/sage/lfunctions/all__sagemath_lcalc.py delete mode 100644 src/sage/libs/all__sagemath_brial.py delete mode 100644 src/sage/libs/all__sagemath_combinat.py delete mode 100644 src/sage/libs/all__sagemath_eclib.py delete mode 100644 src/sage/libs/all__sagemath_flint.py delete mode 100644 src/sage/libs/all__sagemath_gap.py delete mode 100644 src/sage/libs/all__sagemath_giac.py delete mode 100644 src/sage/libs/all__sagemath_glpk.py delete mode 100644 src/sage/libs/all__sagemath_homfly.py delete mode 100644 src/sage/libs/all__sagemath_lcalc.py delete mode 100644 src/sage/libs/all__sagemath_libbraiding.py delete mode 100644 src/sage/libs/all__sagemath_libecm.py delete mode 100644 src/sage/libs/all__sagemath_linbox.py delete mode 100644 src/sage/libs/all__sagemath_modules.py delete mode 100644 src/sage/libs/all__sagemath_mpmath.py delete mode 100644 src/sage/libs/all__sagemath_ntl.py delete mode 100644 src/sage/libs/all__sagemath_pari.py delete mode 100644 src/sage/libs/all__sagemath_singular.py delete mode 100644 src/sage/libs/all__sagemath_symbolics.py delete mode 100644 src/sage/libs/pari/all__sagemath_flint.py delete mode 100644 src/sage/matrix/all__sagemath_flint.py delete mode 100644 src/sage/matrix/all__sagemath_gap.py delete mode 100644 src/sage/matrix/all__sagemath_linbox.py delete mode 100644 src/sage/matrix/all__sagemath_ntl.py delete mode 100644 src/sage/matrix/all__sagemath_singular.py delete mode 100644 src/sage/matrix/all__sagemath_symbolics.py delete mode 100644 src/sage/misc/all__sagemath_categories.py delete mode 100644 src/sage/misc/all__sagemath_modules.py delete mode 100644 src/sage/misc/all__sagemath_ntl.py delete mode 100644 src/sage/modules/all__sagemath_linbox.py delete mode 100644 src/sage/modules/all__sagemath_objects.py delete mode 100644 src/sage/modules/all__sagemath_symbolics.py delete mode 100644 src/sage/monoids/all__sagemath_categories.py delete mode 100644 src/sage/numerical/all__sagemath_categories.py delete mode 100644 src/sage/numerical/all__sagemath_glpk.py delete mode 100644 src/sage/numerical/all__sagemath_modules.py delete mode 100644 src/sage/numerical/backends/all__sagemath_categories.py delete mode 100644 src/sage/numerical/backends/all__sagemath_glpk.py delete mode 100644 src/sage/quadratic_forms/all__sagemath_modules.py delete mode 100644 src/sage/quadratic_forms/all__sagemath_pari.py delete mode 100644 src/sage/rings/all__sagemath_brial.py delete mode 100644 src/sage/rings/all__sagemath_combinat.py delete mode 100644 src/sage/rings/all__sagemath_flint.py delete mode 100644 src/sage/rings/all__sagemath_gap.py delete mode 100644 src/sage/rings/all__sagemath_linbox.py delete mode 100644 src/sage/rings/all__sagemath_modules.py delete mode 100644 src/sage/rings/all__sagemath_ntl.py delete mode 100644 src/sage/rings/all__sagemath_pari.py delete mode 100644 src/sage/rings/all__sagemath_singular.py delete mode 100644 src/sage/rings/all__sagemath_symbolics.py delete mode 100644 src/sage/rings/finite_rings/all__sagemath_categories.py delete mode 100644 src/sage/rings/finite_rings/all__sagemath_linbox.py delete mode 100644 src/sage/rings/finite_rings/all__sagemath_modules.py delete mode 100644 src/sage/rings/finite_rings/all__sagemath_ntl.py delete mode 100644 src/sage/rings/finite_rings/all__sagemath_pari.py delete mode 100644 src/sage/rings/function_field/all__sagemath_categories.py delete mode 100644 src/sage/rings/function_field/all__sagemath_modules.py delete mode 100644 src/sage/rings/function_field/all__sagemath_pari.py delete mode 100644 src/sage/rings/function_field/all__sagemath_singular.py delete mode 100644 src/sage/rings/function_field/all__sagemath_symbolics.py delete mode 100644 src/sage/rings/number_field/all__sagemath_categories.py delete mode 100644 src/sage/rings/number_field/all__sagemath_flint.py delete mode 100644 src/sage/rings/number_field/all__sagemath_pari.py delete mode 100644 src/sage/rings/padics/all__sagemath_categories.py delete mode 100644 src/sage/rings/padics/all__sagemath_flint.py delete mode 100644 src/sage/rings/padics/all__sagemath_ntl.py delete mode 100644 src/sage/rings/padics/all__sagemath_pari.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_brial.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_categories.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_flint.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_linbox.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_modules.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_ntl.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_pari.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_singular.py delete mode 100644 src/sage/rings/polynomial/all__sagemath_symbolics.py delete mode 100644 src/sage/schemes/all__sagemath_categories.py delete mode 100644 src/sage/schemes/all__sagemath_ntl.py delete mode 100644 src/sage/schemes/all__sagemath_polyhedra.py delete mode 100644 src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py delete mode 100644 src/sage/symbolic/all__sagemath_categories.py delete mode 100644 src/sage/symbolic/all__sagemath_standard_no_symbolics.py create mode 100644 src/setup.cfg.m4 diff --git a/bootstrap b/bootstrap index f7776186f37..14eb56c9981 100755 --- a/bootstrap +++ b/bootstrap @@ -232,7 +232,8 @@ save () { src/environment-optional-3.[89].yml src/environment-optional-3.1[0-9].yml \ src/Pipfile \ src/pyproject.toml \ - src/requirements.txt + src/requirements.txt \ + src/setup.cfg # Update version echo "$NEWCONFVERSION" >$PKG/package-version.txt diff --git a/build/bin/write-dockerfile.sh b/build/bin/write-dockerfile.sh index 36cf4862626..3c62d6082e4 100755 --- a/build/bin/write-dockerfile.sh +++ b/build/bin/write-dockerfile.sh @@ -236,7 +236,7 @@ $ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap- $ADD config/config.rpath config/config.rpath $ADD src/doc/bootstrap src/doc/bootstrap $ADD src/bin src/bin -$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/VERSION.txt src/ +$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt src/ $ADD m4 ./m4 $ADD pkgs pkgs $ADD build ./build diff --git a/build/pkgs/typing_extensions/version_requirements.txt b/build/pkgs/typing_extensions/version_requirements.txt index d10f4dffbd3..e1a912109ed 100644 --- a/build/pkgs/typing_extensions/version_requirements.txt +++ b/build/pkgs/typing_extensions/version_requirements.txt @@ -1,3 +1,3 @@ # According to https://github.com/python/typing_extensions/blob/main/CHANGELOG.md, # version 4.4.0 adds another Python 3.11 typing backport -typing_extensions >= 4.4.0; python_version<"3.11" +typing_extensions >= 4.4.0; python_version<'3.11' diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index 3f7973d7fee..ddae185a7d9 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -26,7 +26,7 @@ "ntests": 28 }, "sage.categories.affine_weyl_groups": { - "ntests": 15 + "ntests": 14 }, "sage.categories.algebra_ideals": { "failed": true, @@ -148,7 +148,7 @@ }, "sage.categories.coxeter_groups": { "failed": true, - "ntests": 363 + "ntests": 362 }, "sage.categories.cw_complexes": { "failed": true, @@ -301,7 +301,7 @@ }, "sage.categories.finite_complex_reflection_groups": { "failed": true, - "ntests": 199 + "ntests": 178 }, "sage.categories.finite_coxeter_groups": { "ntests": 6 @@ -493,6 +493,10 @@ "failed": true, "ntests": 13 }, + "sage.categories.inner_product_spaces": { + "failed": true, + "ntests": 9 + }, "sage.categories.integral_domains": { "failed": true, "ntests": 22 @@ -779,7 +783,7 @@ }, "sage.cpython.debug": { "failed": true, - "ntests": 13 + "ntests": 14 }, "sage.cpython.dict_del_by_value": { "failed": true, @@ -822,6 +826,7 @@ "ntests": 321 }, "sage.doctest.reporting": { + "failed": true, "ntests": 124 }, "sage.doctest.sources": { @@ -1086,7 +1091,7 @@ }, "sage.misc.sageinspect": { "failed": true, - "ntests": 332 + "ntests": 329 }, "sage.misc.superseded": { "failed": true, @@ -1119,7 +1124,6 @@ "ntests": 128 }, "sage.repl.configuration": { - "failed": true, "ntests": 22 }, "sage.repl.display.fancy_repr": { @@ -1145,7 +1149,6 @@ "ntests": 42 }, "sage.repl.inputhook": { - "failed": true, "ntests": 7 }, "sage.repl.interface_magic": { @@ -1154,7 +1157,7 @@ }, "sage.repl.interpreter": { "failed": true, - "ntests": 114 + "ntests": 118 }, "sage.repl.ipython_extension": { "failed": true, @@ -1185,7 +1188,7 @@ }, "sage.repl.load": { "failed": true, - "ntests": 38 + "ntests": 42 }, "sage.repl.preparse": { "failed": true, @@ -1312,6 +1315,9 @@ "sage.structure.global_options": { "ntests": 145 }, + "sage.structure.graphics_file": { + "ntests": 8 + }, "sage.structure.indexed_generators": { "failed": true, "ntests": 90 diff --git a/pkgs/sagemath-standard/setup.cfg b/pkgs/sagemath-standard/setup.cfg new file mode 120000 index 00000000000..ba9b315730a --- /dev/null +++ b/pkgs/sagemath-standard/setup.cfg @@ -0,0 +1 @@ +../../src/setup.cfg \ No newline at end of file diff --git a/pkgs/sagemath-standard/setup.cfg.m4 b/pkgs/sagemath-standard/setup.cfg.m4 new file mode 120000 index 00000000000..8934d7b5955 --- /dev/null +++ b/pkgs/sagemath-standard/setup.cfg.m4 @@ -0,0 +1 @@ +../../src/setup.cfg.m4 \ No newline at end of file diff --git a/pkgs/sagemath-standard/setup.py b/pkgs/sagemath-standard/setup.py index 4f9c4370746..29c8744f910 100755 --- a/pkgs/sagemath-standard/setup.py +++ b/pkgs/sagemath-standard/setup.py @@ -69,60 +69,25 @@ from sage_setup.autogen import autogen_all autogen_all() - # TODO: This should be quiet by default - print("Discovering Python/Cython source code....") - t = time.time() - from sage.misc.package import is_package_installed_and_updated - - distributions = [ - '', - "sagemath-brial", - "sagemath-categories", - "sagemath-combinat", - "sagemath-eclib", - "sagemath-environment", - "sagemath-flint", - "sagemath-gap", - "sagemath-giac", - "sagemath-glpk", - "sagemath-graphs", - "sagemath-groups", - "sagemath-homfly", - "sagemath-lcalc", - "sagemath-libbraiding", - "sagemath-libecm", - "sagemath-linbox", - "sagemath-modules", - "sagemath-mpmath", - "sagemath-ntl", - "sagemath-objects", - "sagemath-pari", - "sagemath-plot", - "sagemath-polyhedra", - "sagemath-repl", - "sagemath-schemes", - "sagemath-singular", - "sagemath-symbolics", - ] - - optional_packages_with_extensions = os.environ.get('SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS', '').split(',') - distributions += ['sagemath-{}'.format(pkg) - for pkg in optional_packages_with_extensions - if is_package_installed_and_updated(pkg)] - log.warn('distributions = {0}'.format(distributions)) - from sage_setup.find import find_python_sources - python_packages, python_modules, cython_modules = find_python_sources( - SAGE_SRC, ['sage'], distributions=distributions) - - log.debug('python_packages = {0}'.format(python_packages)) - log.debug('python_modules = {0}'.format(python_modules)) - log.debug('cython_modules = {0}'.format(cython_modules)) - - print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t)) -else: - # sdist, egg_info, dist_info - python_packages = [] - cython_modules = [] +# TODO: This should be quiet by default +print("Discovering Python/Cython source code....") +t = time.time() +from sage.misc.package import is_package_installed_and_updated +distributions = [''] +optional_packages_with_extensions = os.environ.get('SAGE_OPTIONAL_PACKAGES_WITH_EXTENSIONS', '').split(',') +distributions += ['sagemath-{}'.format(pkg) + for pkg in optional_packages_with_extensions + if is_package_installed_and_updated(pkg)] +log.warn('distributions = {0}'.format(distributions)) +from sage_setup.find import find_python_sources +python_packages, python_modules, cython_modules = find_python_sources( + SAGE_SRC, ['sage'], distributions=distributions) + +log.debug('python_packages = {0}'.format(python_packages)) +log.debug('python_modules = {0}'.format(python_modules)) +log.debug('cython_modules = {0}'.format(cython_modules)) + +print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t)) ######################################################### ### Distutils diff --git a/pkgs/sagemath-standard/tox.ini b/pkgs/sagemath-standard/tox.ini index fcd32d0764b..6aae1ef1bfa 100644 --- a/pkgs/sagemath-standard/tox.ini +++ b/pkgs/sagemath-standard/tox.ini @@ -17,7 +17,7 @@ [tox] envlist = # Build and test without using the concrete dependencies specified by requirements.txt, - # using the dependencies declared in pyproject.toml (build-system requires, dependencies) only: + # using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only: # Still use ONLY the wheels built and stored by the Sage distribution (no PyPI). # # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-nopypi-norequirements)' @@ -45,7 +45,7 @@ envlist = # # ./sage -sh -c '(cd pkgs/sagemath-standard && tox -v -v -v -e sagepython-sagewheels-pipenv-dist)' # - # Build using the dependencies declared in pyproject.toml (build-system requires, dependencies) only: + # Build using the dependencies declared in pyproject.toml and setup.cfg (install-requires) only. # Use the wheels built and stored by the Sage distribution, # and additionally allow packages from PyPI. # diff --git a/src/Pipfile.m4 b/src/Pipfile.m4 index d03a2a12814..feca57f7de9 100644 --- a/src/Pipfile.m4 +++ b/src/Pipfile.m4 @@ -6,8 +6,8 @@ url = "https://pypi.org/simple" verify_ssl = true [dev-packages] -## We do not list packages that are already declared as dependencies (install_requires) -## in pyproject.toml +## We do not list packages that are already declared as install_requires +## in setup.cfg pycodestyle = "*" tox = "*" pytest = "*" @@ -15,8 +15,8 @@ rope = "*" six = "*" [packages] -## We do not list packages that are already declared as dependencies (install_requires) -## in pyproject.toml +## We do not list packages that are already declared as install_requires +## in setup.cfg [packages.e1839a8] path = "." diff --git a/src/doc/en/developer/coding_basics.rst b/src/doc/en/developer/coding_basics.rst index b87654b8306..c586b030ed8 100644 --- a/src/doc/en/developer/coding_basics.rst +++ b/src/doc/en/developer/coding_basics.rst @@ -193,8 +193,8 @@ included in one of the following places: This practice is deprecated, see :issue:`33037`. In all cases, the files must be listed (explicitly or via wildcards) in -the section ``[tool.setuptools.package-data]`` of the file -:sage_root:`SAGE_ROOT/pkgs/sagemath-standard/pyproject.toml.m4` (or the corresponding +the section ``options.package_data`` of the file +:sage_root:`pkgs/sagemath-standard/setup.cfg.m4` (or the corresponding file of another distribution). Large data files should not be added to the Sage source tree. Instead, it diff --git a/src/doc/en/developer/coding_in_python.rst b/src/doc/en/developer/coding_in_python.rst index 9a325f01e52..37552e5bcfe 100644 --- a/src/doc/en/developer/coding_in_python.rst +++ b/src/doc/en/developer/coding_in_python.rst @@ -14,9 +14,8 @@ Python language standard Sage library code needs to be compatible with all versions of Python that Sage supports. The information regarding the supported versions -can be found in the files ``build/pkgs/python3/spkg-configure.m4`` -(for the Sage distribution), ``m4/pyproject_toml_metadata.m4`` (for -the Sage library and most other distribution packages in ``pkgs/``). +can be found in the files ``build/pkgs/python3/spkg-configure.m4`` and +``src/setup.cfg.m4``. Python 3.9 is the oldest supported version. Hence, all language and library features that are available in Python 3.9 can diff --git a/src/doc/en/developer/packaging_sage_library.rst b/src/doc/en/developer/packaging_sage_library.rst index a88e33b93ca..9fbb4271727 100644 --- a/src/doc/en/developer/packaging_sage_library.rst +++ b/src/doc/en/developer/packaging_sage_library.rst @@ -174,7 +174,8 @@ The source directory of a distribution package, such as $ ./sage --fixdistributions --set all --from-egg-info -- `pyproject.toml `_ +- `pyproject.toml `_, + `setup.cfg `_, and `requirements.txt `_ -- standard Python packaging metadata, declaring the distribution name, dependencies, etc. @@ -287,9 +288,8 @@ modules must be part of the distribution, or provided by another distribution -- which then must be declared as a run-time dependency. *Declaring run-time dependencies:* These dependencies are declared in -``pyproject.toml`` (generated from ``pyproject.toml.m4``) as -`[project] dependencies `_ (in the older terminology of ``setup.cfg`` and ``setup.py``, -these dependencies were known as ``install_requires``). +``setup.cfg`` (generated from ``setup.cfg.m4``) as +`install_requires `_. *Reducing module-level run-time dependencies:* @@ -467,17 +467,14 @@ features, which will only be working if the user also has installed **sagemath-symbolics**. *Declaring optional run-time dependencies:* It is possible to declare -such dependencies as `[project.optional-dependencies] `_ in ``pyproject.toml`` -(generated from ``pyproject.toml.m4``). -(In the older terminology of ``setup.cfg`` and ``setup.py``, -these optional dependencies were known as ``extras_require``.) -This is a very limited mechanism +such optional dependencies as `extras_require `_ in ``setup.cfg`` +(generated from ``setup.cfg.m4``). This is a very limited mechanism -- in particular it does not affect the build phase of the distribution in any way. It basically only provides a way to give a nickname to a distribution that can be installed as an add-on. -In our example, we could declare an optional dependency so that users -could use ``pip install "sagemath-coding[symbolics]"``. +In our example, we could declare an ``extras_require`` so that users +could use ``pip install sagemath-coding[symbolics]``. Doctest-only dependencies @@ -519,7 +516,7 @@ The version information for dependencies comes from the files ``build/pkgs/*/package-version.txt``. We use the `m4 `_ macro processor to insert the version information in the generated files -``pyproject.toml`` and ``requirements.txt``. +``pyproject.toml``, ``setup.cfg``, ``requirements.txt``. Hierarchy of distribution packages @@ -549,8 +546,8 @@ Hierarchy of distribution packages sphinx_plot(g, figsize=(8, 4), axes=False) -Solid arrows indicate declared runtime dependencies (``install_requires``). -Dashed arrows indicate declared optional runtime dependencies (``extras_require``). +Solid arrows indicate ``install_requires``, i.e., a declared runtime dependency. +Dashed arrows indicate ``extras_require``, i.e., a declared optional runtime dependency. Not shown in the diagram are build dependencies and optional dependencies for testing. - `sage_conf `_ is a configuration diff --git a/src/doc/en/reference/calculus/index.rst b/src/doc/en/reference/calculus/index.rst index 0f451a50613..c9a5158e522 100644 --- a/src/doc/en/reference/calculus/index.rst +++ b/src/doc/en/reference/calculus/index.rst @@ -23,7 +23,6 @@ Using calculus - :doc:`More about symbolic variables and functions ` - :doc:`Main operations on symbolic expressions ` -- :doc:`sage/calculus/expr` - :doc:`Assumptions about symbols and functions ` - :doc:`sage/symbolic/relation` - :doc:`sage/symbolic/integration/integral` @@ -66,7 +65,6 @@ Internal functionality supporting calculus sage/symbolic/expression sage/symbolic/callable - sage/calculus/expr sage/symbolic/assumptions sage/symbolic/relation sage/calculus/calculus diff --git a/src/pyproject.toml.m4 b/src/pyproject.toml.m4 index 65e486244cb..7065ba1468c 100644 --- a/src/pyproject.toml.m4 +++ b/src/pyproject.toml.m4 @@ -1,4 +1,3 @@ -include(`sage_spkg_versions_toml.m4')dnl' -*- conf-toml -*- [build-system] # Minimum requirements for the build system to execute. requires = [ @@ -6,156 +5,25 @@ requires = [ # Some version of sage-conf is required. # Note that PEP517/518 have no notion of optional sage_spkg dependencies: # https://github.com/pypa/pip/issues/6144 - SPKG_INSTALL_REQUIRES_sage_conf - SPKG_INSTALL_REQUIRES_setuptools - SPKG_INSTALL_REQUIRES_wheel - SPKG_INSTALL_REQUIRES_sage_setup - SPKG_INSTALL_REQUIRES_cypari - SPKG_INSTALL_REQUIRES_cysignals - SPKG_INSTALL_REQUIRES_cython - SPKG_INSTALL_REQUIRES_gmpy2 - SPKG_INSTALL_REQUIRES_jupyter_core - SPKG_INSTALL_REQUIRES_memory_allocator - SPKG_INSTALL_REQUIRES_numpy - SPKG_INSTALL_REQUIRES_pkgconfig - SPKG_INSTALL_REQUIRES_pplpy -] + esyscmd(`sage-get-system-packages install-requires-toml \ + sage_conf \ + setuptools \ + wheel \ + sage_setup \ + cypari \ + cysignals \ + cython \ + gmpy2 \ + jinja2 \ + jupyter_core \ + numpy \ + pkgconfig \ + pplpy \ + memory_allocator \ + ')] build-backend = "setuptools.build_meta" -[project] -name = "sagemath-standard" -description = "Sage: Open Source Mathematics Software: Standard Python Library" -dependencies = [ - SPKG_INSTALL_REQUIRES_sage_conf - SPKG_INSTALL_REQUIRES_six -dnl From build/pkgs/sagelib/dependencies - SPKG_INSTALL_REQUIRES_conway_polynomials - SPKG_INSTALL_REQUIRES_cypari - SPKG_INSTALL_REQUIRES_cysignals - SPKG_INSTALL_REQUIRES_cython - SPKG_INSTALL_REQUIRES_gmpy2 - SPKG_INSTALL_REQUIRES_importlib_metadata - SPKG_INSTALL_REQUIRES_importlib_resources - SPKG_INSTALL_REQUIRES_jupyter_core - SPKG_INSTALL_REQUIRES_lrcalc_python - SPKG_INSTALL_REQUIRES_memory_allocator - SPKG_INSTALL_REQUIRES_numpy - SPKG_INSTALL_REQUIRES_pkgconfig - SPKG_INSTALL_REQUIRES_pplpy - SPKG_INSTALL_REQUIRES_primecountpy - SPKG_INSTALL_REQUIRES_requests - SPKG_INSTALL_REQUIRES_typing_extensions -dnl From Makefile.in: SAGERUNTIME - SPKG_INSTALL_REQUIRES_ipython - SPKG_INSTALL_REQUIRES_pexpect -dnl From Makefile.in: DOC_DEPENDENCIES - SPKG_INSTALL_REQUIRES_sphinx - SPKG_INSTALL_REQUIRES_networkx - SPKG_INSTALL_REQUIRES_scipy - SPKG_INSTALL_REQUIRES_sympy - SPKG_INSTALL_REQUIRES_matplotlib - SPKG_INSTALL_REQUIRES_pillow - SPKG_INSTALL_REQUIRES_mpmath - SPKG_INSTALL_REQUIRES_ipykernel - SPKG_INSTALL_REQUIRES_jupyter_client - SPKG_INSTALL_REQUIRES_ipywidgets - SPKG_INSTALL_REQUIRES_fpylll -dnl pycryptosat # Sage distribution installs it as part of cryptominisat. According to its README on https://pypi.org/project/pycryptosat/: "The pycryptosat python package compiles while compiling CryptoMiniSat. It cannot be compiled on its own, it must be compiled at the same time as CryptoMiniSat." -dnl Packages with important upper version bounds - SPKG_INSTALL_REQUIRES_ptyprocess -] -dynamic = ["version"] -include(`pyproject_toml_metadata.m4')dnl' - -[project.optional-dependencies] -R = [ - SPKG_INSTALL_REQUIRES_rpy2 -] - -[project.readme] -file = "README.rst" -content-type = "text/x-rst" - [tool.conda-lock] platforms = [ 'osx-64', 'linux-64', 'linux-aarch64', 'osx-arm64' ] - -[tool.setuptools] -script-files = [ - # The sage script - "bin/sage", - # Other scripts that should be in the path also for OS packaging of sage: - "bin/sage-eval", - # Included because it is useful for doctesting/coverage testing user scripts too: - "bin/sage-runtests", - "bin/sage-fixdoctests", - "bin/sage-coverage", - # The following is deprecated but might still be used in user package install scripts - "bin/sage-cython", - # Helper scripts invoked by sage script - # (they would actually belong to something like libexec) - "bin/sage-cachegrind", - "bin/sage-callgrind", - "bin/sage-massif", - "bin/sage-omega", - "bin/sage-valgrind", - "bin/sage-venv-config", - "bin/sage-version.sh", - "bin/sage-cleaner", - # Only makes sense in sage-the-distribution. TODO: Move to another installation script. - "bin/sage-list-packages", - # Uncategorized scripts in alphabetical order - "bin/math-readline", - "bin/sage-env", - # sage-env-config -- installed by sage_conf - # sage-env-config.in -- not to be installed - "bin/sage-grep", - "bin/sage-grepdoc", - "bin/sage-inline-fortran", - "bin/sage-ipynb2rst", - "bin/sage-ipython", - "bin/sage-notebook", - "bin/sage-num-threads.py", - "bin/sage-preparse", - "bin/sage-python", - "bin/sage-run", - "bin/sage-run-cython", - "bin/sage-startuptime.py", - "bin/sage-update-version", -] -license-files = ["LICENSE.txt"] -include-package-data = false - -[tool.setuptools.package-data] -"sage.libs.gap" = ["sage.gaprc"] -"sage.interfaces" = ["sage-maxima.lisp"] -"sage.doctest" = ["tests/*"] -"sage.repl.rich_output" = ["example*"] -sage = [ - "ext_data/*", - "ext_data/kenzo/*", - "ext_data/singular/*", - "ext_data/singular/function_field/*", - "ext_data/images/*", - "ext_data/doctest/*", - "ext_data/doctest/invalid/*", - "ext_data/gap/*", - "ext_data/gap/joyner/*", - "ext_data/mwrank/*", - "ext_data/notebook-ipython/*", - "ext_data/nbconvert/*", - "ext_data/graphs/*", - "ext_data/pari/*", - "ext_data/pari/dokchitser/*", - "ext_data/pari/buzzard/*", - "ext_data/pari/simon/*", - "ext_data/magma/*", - "ext_data/magma/latex/*", - "ext_data/magma/sage/*", - "ext_data/valgrind/*", - "ext_data/threejs/*", -] - -[tool.setuptools.dynamic] -version = {file = ["VERSION.txt"]} diff --git a/src/sage/algebras/affine_nil_temperley_lieb.py b/src/sage/algebras/affine_nil_temperley_lieb.py index e40b0b24969..ae3e8e87464 100644 --- a/src/sage/algebras/affine_nil_temperley_lieb.py +++ b/src/sage/algebras/affine_nil_temperley_lieb.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Affine nilTemperley Lieb Algebra of type A diff --git a/src/sage/algebras/algebra.py b/src/sage/algebras/algebra.py index c2e8f37cd25..a63aae4e217 100644 --- a/src/sage/algebras/algebra.py +++ b/src/sage/algebras/algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.modules """ Abstract base class for algebras diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index 2fc072c5aaf..a98f5284eca 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Algebras """ @@ -15,12 +14,56 @@ # The full text of the GPL is available at: # # https://www.gnu.org/licenses/ -# ***************************************************************************** +# **************************************************************************** +from sage.misc.lazy_import import lazy_import + +# old-style class for associative algebras, use Parent instead +from sage.rings.ring import Algebra + +import sage.algebras.catalog as algebras + +from .quatalg.all import * +from .steenrod.all import * +from .fusion_rings.all import * +from .lie_algebras.all import * +from .quantum_groups.all import * +from .lie_conformal_algebras.all import * + +# Algebra base classes +from .free_algebra import FreeAlgebra +from .free_algebra_quotient import FreeAlgebraQuotient + +from .finite_dimensional_algebras.all import FiniteDimensionalAlgebra + +lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') + +lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') +lazy_import('sage.algebras.affine_nil_temperley_lieb', + 'AffineNilTemperleyLiebTypeA') +lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') +lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', + 'SchurTensorModule']) + +lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') + +lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') + +lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') + +lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') + +from .clifford_algebra import CliffordAlgebra, ExteriorAlgebra +from .weyl_algebra import DifferentialWeylAlgebra + +lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') + +lazy_import('sage.algebras.rational_cherednik_algebra', + 'RationalCherednikAlgebra') + +lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') + +lazy_import('sage.algebras.q_system', 'QSystem') -from sage.algebras.all__sagemath_modules import * -from sage.algebras.all__sagemath_combinat import * +lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') -from sage.algebras.quatalg.all import * -from sage.algebras.fusion_rings.all import * -from sage.algebras.lie_algebras.all import * -from sage.algebras.lie_conformal_algebras.all import * +lazy_import('sage.algebras.yangian', 'Yangian') diff --git a/src/sage/algebras/all__sagemath_combinat.py b/src/sage/algebras/all__sagemath_combinat.py deleted file mode 100644 index eb86573ec54..00000000000 --- a/src/sage/algebras/all__sagemath_combinat.py +++ /dev/null @@ -1,37 +0,0 @@ -from sage.misc.lazy_import import lazy_import - - -# Algebra base classes -from sage.algebras.free_algebra import FreeAlgebra -from sage.algebras.free_algebra_quotient import FreeAlgebraQuotient - -from sage.algebras.steenrod.all import * -from sage.algebras.quantum_groups.all import * - -lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') -lazy_import('sage.algebras.affine_nil_temperley_lieb', - 'AffineNilTemperleyLiebTypeA') -lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') -lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', - 'SchurTensorModule']) - -lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') - -lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') - -lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') - -lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') - -lazy_import('sage.algebras.rational_cherednik_algebra', - 'RationalCherednikAlgebra') - -lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') - -lazy_import('sage.algebras.q_system', 'QSystem') - -lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') - -lazy_import('sage.algebras.yangian', 'Yangian') - -del lazy_import diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py deleted file mode 100644 index fc74dabe241..00000000000 --- a/src/sage/algebras/all__sagemath_modules.py +++ /dev/null @@ -1,14 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') - -# old-style class for associative algebras, use Parent instead -from sage.rings.ring import Algebra - -from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra -from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra -from sage.algebras.weyl_algebra import DifferentialWeylAlgebra -lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') - -import sage.algebras.catalog as algebras -del lazy_import diff --git a/src/sage/algebras/all__sagemath_singular.py b/src/sage/algebras/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/algebras/askey_wilson.py b/src/sage/algebras/askey_wilson.py index 1624ecdd8e2..4943c73b36d 100644 --- a/src/sage/algebras/askey_wilson.py +++ b/src/sage/algebras/askey_wilson.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Askey-Wilson Algebras diff --git a/src/sage/algebras/associated_graded.py b/src/sage/algebras/associated_graded.py index 1831e6fcf52..5dd01321114 100644 --- a/src/sage/algebras/associated_graded.py +++ b/src/sage/algebras/associated_graded.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules r""" Associated Graded Algebras To Filtered Algebras diff --git a/src/sage/algebras/catalog.py b/src/sage/algebras/catalog.py index 51490d1378c..afa5db12e8e 100644 --- a/src/sage/algebras/catalog.py +++ b/src/sage/algebras/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Catalog of Algebras diff --git a/src/sage/algebras/cellular_basis.py b/src/sage/algebras/cellular_basis.py index 5d82b9e280d..8c474420378 100644 --- a/src/sage/algebras/cellular_basis.py +++ b/src/sage/algebras/cellular_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Cellular Basis diff --git a/src/sage/algebras/clifford_algebra.py b/src/sage/algebras/clifford_algebra.py index dcca9556d99..f87d52c94ce 100644 --- a/src/sage/algebras/clifford_algebra.py +++ b/src/sage/algebras/clifford_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules r""" Clifford Algebras diff --git a/src/sage/algebras/clifford_algebra_element.pxd b/src/sage/algebras/clifford_algebra_element.pxd index 1f298519605..14d5a7a625c 100644 --- a/src/sage/algebras/clifford_algebra_element.pxd +++ b/src/sage/algebras/clifford_algebra_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Clifford algebra elements """ diff --git a/src/sage/algebras/clifford_algebra_element.pyx b/src/sage/algebras/clifford_algebra_element.pyx index afb70566a78..52b994f48af 100644 --- a/src/sage/algebras/clifford_algebra_element.pyx +++ b/src/sage/algebras/clifford_algebra_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules """ Clifford algebra elements diff --git a/src/sage/algebras/cluster_algebra.py b/src/sage/algebras/cluster_algebra.py index ecec679d7a8..17bc36b1661 100644 --- a/src/sage/algebras/cluster_algebra.py +++ b/src/sage/algebras/cluster_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.graphs sage.modules r""" Cluster algebras diff --git a/src/sage/algebras/commutative_dga.py b/src/sage/algebras/commutative_dga.py index 19daa46eb78..13565314140 100644 --- a/src/sage/algebras/commutative_dga.py +++ b/src/sage/algebras/commutative_dga.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Commutative Differential Graded Algebras diff --git a/src/sage/algebras/down_up_algebra.py b/src/sage/algebras/down_up_algebra.py index a40ac03ab06..088e7ac30ad 100644 --- a/src/sage/algebras/down_up_algebra.py +++ b/src/sage/algebras/down_up_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules r""" Down-Up Algebras diff --git a/src/sage/algebras/exterior_algebra_groebner.pxd b/src/sage/algebras/exterior_algebra_groebner.pxd index 517fd43c65e..2f2a0ff5cd8 100644 --- a/src/sage/algebras/exterior_algebra_groebner.pxd +++ b/src/sage/algebras/exterior_algebra_groebner.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Exterior algebras Gröbner bases """ diff --git a/src/sage/algebras/exterior_algebra_groebner.pyx b/src/sage/algebras/exterior_algebra_groebner.pyx index c57284fd01f..d296bae64f3 100644 --- a/src/sage/algebras/exterior_algebra_groebner.pyx +++ b/src/sage/algebras/exterior_algebra_groebner.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules r""" Exterior algebras Gröbner bases diff --git a/src/sage/algebras/finite_dimensional_algebras/all.py b/src/sage/algebras/finite_dimensional_algebras/all.py index ff747bdec4d..add5ff8ecd6 100644 --- a/src/sage/algebras/finite_dimensional_algebras/all.py +++ b/src/sage/algebras/finite_dimensional_algebras/all.py @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-modules -from sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra import FiniteDimensionalAlgebra +from .finite_dimensional_algebra import FiniteDimensionalAlgebra diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py index fb513c7a371..a3b8742b4e0 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Finite-Dimensional Algebras """ diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd index 77a504b0258..c13b8dbab07 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport AlgebraElement, Element, Vector from sage.matrix.matrix cimport Matrix diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx index ca7d3b552ed..08feb228e5e 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Elements of Finite Algebras """ diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py index 46b9141cd0b..15f0881bb8b 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.finite_rings (because all doctests use GF) """ Ideals of Finite Algebras diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py index 3dff53425c6..d2114511ae6 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Morphisms Between Finite Algebras """ diff --git a/src/sage/algebras/finite_gca.py b/src/sage/algebras/finite_gca.py index 0110373ec92..4fb15147900 100644 --- a/src/sage/algebras/finite_gca.py +++ b/src/sage/algebras/finite_gca.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules r""" Finite dimensional graded commutative algebras diff --git a/src/sage/algebras/free_algebra.py b/src/sage/algebras/free_algebra.py index 2c58a1c2157..e84a6b03f24 100644 --- a/src/sage/algebras/free_algebra.py +++ b/src/sage/algebras/free_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Free algebras diff --git a/src/sage/algebras/free_algebra_element.py b/src/sage/algebras/free_algebra_element.py index fd86d48b7c8..9fe2dcfb554 100644 --- a/src/sage/algebras/free_algebra_element.py +++ b/src/sage/algebras/free_algebra_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Free algebra elements diff --git a/src/sage/algebras/free_algebra_quotient.py b/src/sage/algebras/free_algebra_quotient.py index 2fe8554eb62..94be310a0b1 100644 --- a/src/sage/algebras/free_algebra_quotient.py +++ b/src/sage/algebras/free_algebra_quotient.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Finite dimensional free algebra quotients diff --git a/src/sage/algebras/free_algebra_quotient_element.py b/src/sage/algebras/free_algebra_quotient_element.py index 4e78802996e..559d4246ac0 100644 --- a/src/sage/algebras/free_algebra_quotient_element.py +++ b/src/sage/algebras/free_algebra_quotient_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Free algebra quotient elements diff --git a/src/sage/algebras/free_zinbiel_algebra.py b/src/sage/algebras/free_zinbiel_algebra.py index 99e830664ed..720ee803d9b 100644 --- a/src/sage/algebras/free_zinbiel_algebra.py +++ b/src/sage/algebras/free_zinbiel_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Free Zinbiel Algebras diff --git a/src/sage/algebras/fusion_rings/all.py b/src/sage/algebras/fusion_rings/all.py index 78410e74818..bf9c016510f 100644 --- a/src/sage/algebras/fusion_rings/all.py +++ b/src/sage/algebras/fusion_rings/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Fusion Rings """ @@ -16,4 +15,3 @@ lazy_import('sage.algebras.fusion_rings.fusion_ring', ['FusionRing']) lazy_import('sage.algebras.fusion_rings.fusion_double', ['FusionDouble']) -del lazy_import diff --git a/src/sage/algebras/fusion_rings/f_matrix.py b/src/sage/algebras/fusion_rings/f_matrix.py index 950eb94f121..47f5976cf03 100644 --- a/src/sage/algebras/fusion_rings/f_matrix.py +++ b/src/sage/algebras/fusion_rings/f_matrix.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular r""" The F-Matrix of a Fusion Ring """ diff --git a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd index 65a159a3e54..e0908ab5884 100644 --- a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +++ b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular cdef _fmat(fvars, Nk_ij, one, a, b, c, d, x, y) cpdef _backward_subs(factory, bint flatten=*) cpdef executor(tuple params) diff --git a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx index 23eadf9559d..a9b7eb50fab 100644 --- a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +++ b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Fast F-Matrix Methods """ diff --git a/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd b/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd index 8a32ad1bc2e..a992f0339a4 100644 --- a/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +++ b/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd @@ -1,4 +1,2 @@ -# sage_setup: distribution = sagemath-singular - cpdef _unflatten_entries(factory, list entries) cpdef executor(tuple params) diff --git a/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx b/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx index 881a2ac6e29..ad6e8a1621e 100644 --- a/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +++ b/src/sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Fast Fusion Ring Methods for Computing Braid Group Representations """ diff --git a/src/sage/algebras/fusion_rings/fusion_double.py b/src/sage/algebras/fusion_rings/fusion_double.py index d4238db749e..d87a7a782a7 100644 --- a/src/sage/algebras/fusion_rings/fusion_double.py +++ b/src/sage/algebras/fusion_rings/fusion_double.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ The Fusion Ring of the Drinfeld Double of a Finite Group """ diff --git a/src/sage/algebras/fusion_rings/fusion_ring.py b/src/sage/algebras/fusion_rings/fusion_ring.py index 31bba004e55..72bc0f8600c 100644 --- a/src/sage/algebras/fusion_rings/fusion_ring.py +++ b/src/sage/algebras/fusion_rings/fusion_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Fusion Rings """ diff --git a/src/sage/algebras/fusion_rings/poly_tup_engine.pxd b/src/sage/algebras/fusion_rings/poly_tup_engine.pxd index 88048320646..50493691f29 100644 --- a/src/sage/algebras/fusion_rings/poly_tup_engine.pxd +++ b/src/sage/algebras/fusion_rings/poly_tup_engine.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.algebras.fusion_rings.shm_managers cimport KSHandler from sage.rings.number_field.number_field_element cimport NumberFieldElement_absolute from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular, MPolynomialRing_libsingular diff --git a/src/sage/algebras/fusion_rings/poly_tup_engine.pyx b/src/sage/algebras/fusion_rings/poly_tup_engine.pyx index 38b2f28efc3..e44fb68b836 100644 --- a/src/sage/algebras/fusion_rings/poly_tup_engine.pyx +++ b/src/sage/algebras/fusion_rings/poly_tup_engine.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Arithmetic Engine for Polynomials as Tuples """ diff --git a/src/sage/algebras/fusion_rings/shm_managers.pxd b/src/sage/algebras/fusion_rings/shm_managers.pxd index 0ef39036de0..5b1576bb677 100644 --- a/src/sage/algebras/fusion_rings/shm_managers.pxd +++ b/src/sage/algebras/fusion_rings/shm_managers.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular cimport numpy as np from sage.rings.number_field.number_field_base cimport NumberField from sage.rings.number_field.number_field_element cimport NumberFieldElement_absolute diff --git a/src/sage/algebras/fusion_rings/shm_managers.pyx b/src/sage/algebras/fusion_rings/shm_managers.pyx index de1fad2f0e7..40d2eb9c805 100644 --- a/src/sage/algebras/fusion_rings/shm_managers.pyx +++ b/src/sage/algebras/fusion_rings/shm_managers.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular r""" Shared Memory Managers for F-Symbol Attributes diff --git a/src/sage/algebras/group_algebra.py b/src/sage/algebras/group_algebra.py index a0e3ac01aab..5d9f56cd6d1 100644 --- a/src/sage/algebras/group_algebra.py +++ b/src/sage/algebras/group_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.groups sage.modules r""" Group algebras diff --git a/src/sage/algebras/hall_algebra.py b/src/sage/algebras/hall_algebra.py index a24aa1e0873..aef0df7ce5a 100644 --- a/src/sage/algebras/hall_algebra.py +++ b/src/sage/algebras/hall_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Hall Algebras diff --git a/src/sage/algebras/hecke_algebras/all.py b/src/sage/algebras/hecke_algebras/all.py index cade22cbaea..20f53ea58fe 100644 --- a/src/sage/algebras/hecke_algebras/all.py +++ b/src/sage/algebras/hecke_algebras/all.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-combinat """ Hecke Algebras """ +#from sage.misc.lazy_import import lazy_import diff --git a/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py b/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py index de54fe413d8..f34beb5a1f8 100644 --- a/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py +++ b/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Ariki-Koike Algebras diff --git a/src/sage/algebras/hecke_algebras/cubic_hecke_algebra.py b/src/sage/algebras/hecke_algebras/cubic_hecke_algebra.py index 1d4dbf530fe..4f2a604aa8b 100644 --- a/src/sage/algebras/hecke_algebras/cubic_hecke_algebra.py +++ b/src/sage/algebras/hecke_algebras/cubic_hecke_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups sage.modules r""" Cubic Hecke Algebras diff --git a/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py b/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py index 5cc0920512b..90d6657d309 100644 --- a/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +++ b/src/sage/algebras/hecke_algebras/cubic_hecke_base_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.libs.pari (for factorization) r""" Cubic Hecke Base Rings diff --git a/src/sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py b/src/sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py index d232c974a95..c0587117753 100644 --- a/src/sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py +++ b/src/sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules r""" Cubic Hecke matrix representations diff --git a/src/sage/algebras/iwahori_hecke_algebra.py b/src/sage/algebras/iwahori_hecke_algebra.py index aff140d2a6d..31f15e50c1a 100644 --- a/src/sage/algebras/iwahori_hecke_algebra.py +++ b/src/sage/algebras/iwahori_hecke_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Iwahori-Hecke Algebras diff --git a/src/sage/algebras/jordan_algebra.py b/src/sage/algebras/jordan_algebra.py index 986f892093a..f783dc890c8 100644 --- a/src/sage/algebras/jordan_algebra.py +++ b/src/sage/algebras/jordan_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Jordan Algebras diff --git a/src/sage/algebras/letterplace/all.py b/src/sage/algebras/letterplace/all.py index 84ec2b51067..e69de29bb2d 100644 --- a/src/sage/algebras/letterplace/all.py +++ b/src/sage/algebras/letterplace/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-singular diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pxd b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pxd index d10eeec0317..d22fe4e9a40 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pxd +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular ############################################################################### # # Copyright (C) 2011 Simon King diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx index f9c33e8c531..0e23ed2feea 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Weighted homogeneous elements of free algebras, in letterplace implementation diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pxd b/src/sage/algebras/letterplace/free_algebra_letterplace.pxd index 766f1e2c569..47a7275aba0 100644 --- a/src/sage/algebras/letterplace/free_algebra_letterplace.pxd +++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular ############################################################################### # # Copyright (C) 2011 Simon King diff --git a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx index b9b202f7f63..278596cc177 100644 --- a/src/sage/algebras/letterplace/free_algebra_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_letterplace.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular ############################################################################### # # Copyright (C) 2011 Simon King diff --git a/src/sage/algebras/letterplace/letterplace_ideal.pyx b/src/sage/algebras/letterplace/letterplace_ideal.pyx index 30f86256afa..eeebf4422a4 100644 --- a/src/sage/algebras/letterplace/letterplace_ideal.pyx +++ b/src/sage/algebras/letterplace/letterplace_ideal.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Homogeneous ideals of free algebras diff --git a/src/sage/algebras/lie_algebras/all.py b/src/sage/algebras/lie_algebras/all.py index cf2fd88ac76..73ea8361ff1 100644 --- a/src/sage/algebras/lie_algebras/all.py +++ b/src/sage/algebras/lie_algebras/all.py @@ -2,7 +2,7 @@ Lie Algebras """ -# ***************************************************************************** +#***************************************************************************** # Copyright (C) 2013 Travis Scrimshaw # # Distributed under the terms of the GNU General Public License (GPL) @@ -14,11 +14,10 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** from sage.misc.lazy_import import lazy_import lazy_import('sage.algebras.lie_algebras.lie_algebra', 'LieAlgebra') -# from kac_moody import KacMoodyAlgebra +#from kac_moody import KacMoodyAlgebra lazy_import('sage.algebras.lie_algebras', 'examples', 'lie_algebras') -del lazy_import diff --git a/src/sage/algebras/lie_algebras/all__sagemath_modules.py b/src/sage/algebras/lie_algebras/all__sagemath_modules.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/algebras/lie_algebras/lie_algebra_element.pxd b/src/sage/algebras/lie_algebras/lie_algebra_element.pxd index 12e3c4f467c..3677eb29587 100644 --- a/src/sage/algebras/lie_algebras/lie_algebra_element.pxd +++ b/src/sage/algebras/lie_algebras/lie_algebra_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport Element from sage.structure.element_wrapper cimport ElementWrapper from sage.structure.sage_object cimport SageObject diff --git a/src/sage/algebras/lie_algebras/lie_algebra_element.pyx b/src/sage/algebras/lie_algebras/lie_algebra_element.pyx index 814f17a8e6b..635b30c49da 100644 --- a/src/sage/algebras/lie_algebras/lie_algebra_element.pyx +++ b/src/sage/algebras/lie_algebras/lie_algebra_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat """ Lie Algebra Elements diff --git a/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py index e6ce883a81c..80df46c57d3 100644 --- a/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Abelian Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py index fe68daf6072..f5d39cacbf2 100644 --- a/src/sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Affine Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/all.py b/src/sage/algebras/lie_conformal_algebras/all.py index 24a6e4efeee..7d78e0a260c 100644 --- a/src/sage/algebras/lie_conformal_algebras/all.py +++ b/src/sage/algebras/lie_conformal_algebras/all.py @@ -1,18 +1,14 @@ -# sage_setup: distribution = sagemath-combinat -# ****************************************************************************** +#****************************************************************************** # Copyright (C) 2020 Reimundo Heluani # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** from sage.misc.lazy_import import lazy_import -lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra', - 'LieConformalAlgebra') -lazy_import('sage.algebras.lie_conformal_algebras', - 'examples', 'lie_conformal_algebras') -del lazy_import +lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra','LieConformalAlgebra') +lazy_import('sage.algebras.lie_conformal_algebras', 'examples', 'lie_conformal_algebras') diff --git a/src/sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py index f320fc173a7..0b0b61b4e25 100644 --- a/src/sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bosonic Ghosts Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/examples.py b/src/sage/algebras/lie_conformal_algebras/examples.py index 317f349006c..3d520e449db 100644 --- a/src/sage/algebras/lie_conformal_algebras/examples.py +++ b/src/sage/algebras/lie_conformal_algebras/examples.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Examples of Lie Conformal Algebras diff --git a/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py index bab3c118065..098644908e6 100644 --- a/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Fermionic Ghosts Super Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py b/src/sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py index 62e4805ad92..8aefdd9d3a6 100644 --- a/src/sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py +++ b/src/sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Finitely and Freely Generated Lie Conformal Algebras. diff --git a/src/sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py index 23c6f67e015..0787226252d 100644 --- a/src/sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Free Bosons Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py index ae1da4cdb00..1e7525ae1d3 100644 --- a/src/sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Free Fermions Super Lie Conformal Algebra. diff --git a/src/sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py index 2eea86a4a14..9a6a74a62bb 100644 --- a/src/sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Freely Generated Lie Conformal Algebras diff --git a/src/sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py index dbf3536a5f1..c335daf98f7 100644 --- a/src/sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Graded Lie Conformal Algebras diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py index 34c3508d2ca..5ca0c8f6d07 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py index 82f70ff4819..09fb63a0a4c 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Lie Conformal Algebra Element diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py index 77fa9eec482..4fef0fcf2e6 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Lie Conformal Algebras With Basis diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py index 4b7f2291e5d..9f4d129ba36 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Lie Conformal Algebras With Structure Coefficients diff --git a/src/sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py index 6b9139e5f7c..baf7a896144 100644 --- a/src/sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules sage.rings.number_field r""" N=2 Super Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py index 3a531d47a28..5542b9fc097 100644 --- a/src/sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Neveu-Schwarz Super Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py index 3f92b8691a0..0db2d545290 100644 --- a/src/sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Virasoro Lie Conformal Algebra diff --git a/src/sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py b/src/sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py index bf71e8364e9..3c319db7ca3 100644 --- a/src/sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py +++ b/src/sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Weyl Lie Conformal Algebra diff --git a/src/sage/algebras/nil_coxeter_algebra.py b/src/sage/algebras/nil_coxeter_algebra.py index ee30bf6272a..b5dbd2d62c8 100644 --- a/src/sage/algebras/nil_coxeter_algebra.py +++ b/src/sage/algebras/nil_coxeter_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Nil-Coxeter Algebra diff --git a/src/sage/algebras/octonion_algebra.pxd b/src/sage/algebras/octonion_algebra.pxd index cf790a0b99f..78500729bdc 100644 --- a/src/sage/algebras/octonion_algebra.pxd +++ b/src/sage/algebras/octonion_algebra.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Octonions """ diff --git a/src/sage/algebras/octonion_algebra.pyx b/src/sage/algebras/octonion_algebra.pyx index ebe6909f801..3c1d28c2106 100644 --- a/src/sage/algebras/octonion_algebra.pyx +++ b/src/sage/algebras/octonion_algebra.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules """ Octonion Algebras diff --git a/src/sage/algebras/orlik_solomon.py b/src/sage/algebras/orlik_solomon.py index 16737723b12..caea1a60d37 100644 --- a/src/sage/algebras/orlik_solomon.py +++ b/src/sage/algebras/orlik_solomon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules r""" Orlik-Solomon Algebras diff --git a/src/sage/algebras/orlik_terao.py b/src/sage/algebras/orlik_terao.py index afd7f2f1db4..d1f3fb38af7 100644 --- a/src/sage/algebras/orlik_terao.py +++ b/src/sage/algebras/orlik_terao.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules r""" Orlik-Terao Algebras diff --git a/src/sage/algebras/q_commuting_polynomials.py b/src/sage/algebras/q_commuting_polynomials.py index c00cb1de9df..10f5f55a987 100644 --- a/src/sage/algebras/q_commuting_polynomials.py +++ b/src/sage/algebras/q_commuting_polynomials.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups sage.modules r""" `q`-Commuting Polynomials diff --git a/src/sage/algebras/q_system.py b/src/sage/algebras/q_system.py index 9b20b2df965..8099f98aa8c 100644 --- a/src/sage/algebras/q_system.py +++ b/src/sage/algebras/q_system.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Q-Systems diff --git a/src/sage/algebras/quantum_clifford.py b/src/sage/algebras/quantum_clifford.py index c8e76f68cc7..dc61084f2f8 100644 --- a/src/sage/algebras/quantum_clifford.py +++ b/src/sage/algebras/quantum_clifford.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules r""" Quantum Clifford Algebras diff --git a/src/sage/algebras/quantum_groups/ace_quantum_onsager.py b/src/sage/algebras/quantum_groups/ace_quantum_onsager.py index 3eae5a80ce3..9d983529c73 100644 --- a/src/sage/algebras/quantum_groups/ace_quantum_onsager.py +++ b/src/sage/algebras/quantum_groups/ace_quantum_onsager.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Alternating Central Extension Quantum Onsager Algebra diff --git a/src/sage/algebras/quantum_groups/all.py b/src/sage/algebras/quantum_groups/all.py index d9003faed40..9d249f02100 100644 --- a/src/sage/algebras/quantum_groups/all.py +++ b/src/sage/algebras/quantum_groups/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Quantum Groups """ @@ -6,4 +5,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.algebras.quantum_groups.fock_space', 'FockSpace') lazy_import('sage.algebras.quantum_groups.quantum_group_gap', 'QuantumGroup') -del lazy_import diff --git a/src/sage/algebras/quantum_groups/fock_space.py b/src/sage/algebras/quantum_groups/fock_space.py index a76240439ec..d31af4593e1 100644 --- a/src/sage/algebras/quantum_groups/fock_space.py +++ b/src/sage/algebras/quantum_groups/fock_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Fock Space diff --git a/src/sage/algebras/quantum_groups/q_numbers.py b/src/sage/algebras/quantum_groups/q_numbers.py index d69ac9e0aef..243846bf13c 100644 --- a/src/sage/algebras/quantum_groups/q_numbers.py +++ b/src/sage/algebras/quantum_groups/q_numbers.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" `q`-Numbers diff --git a/src/sage/algebras/quantum_groups/quantum_group_gap.py b/src/sage/algebras/quantum_groups/quantum_group_gap.py index aa180c18bba..997fe0f3b04 100644 --- a/src/sage/algebras/quantum_groups/quantum_group_gap.py +++ b/src/sage/algebras/quantum_groups/quantum_group_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: optional - gap_package_quagroup sage.combinat sage.libs.gap sage.modules """ Quantum Groups Using GAP's QuaGroup Package diff --git a/src/sage/algebras/quantum_groups/representations.py b/src/sage/algebras/quantum_groups/representations.py index 754f339ffdf..cea110137db 100644 --- a/src/sage/algebras/quantum_groups/representations.py +++ b/src/sage/algebras/quantum_groups/representations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Quantum Group Representations diff --git a/src/sage/algebras/quantum_matrix_coordinate_algebra.py b/src/sage/algebras/quantum_matrix_coordinate_algebra.py index ec79a2d731c..c9f7e312788 100644 --- a/src/sage/algebras/quantum_matrix_coordinate_algebra.py +++ b/src/sage/algebras/quantum_matrix_coordinate_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Quantum Matrix Coordinate Algebras diff --git a/src/sage/algebras/quatalg/all.py b/src/sage/algebras/quatalg/all.py index 8e90f44fe2a..0f0d45c0217 100644 --- a/src/sage/algebras/quatalg/all.py +++ b/src/sage/algebras/quatalg/all.py @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-singular -from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra +from .quaternion_algebra import QuaternionAlgebra diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 40f695bbd6d..b0d8cb25c0e 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Quaternion Algebras diff --git a/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx b/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx index c757d6ada7f..130c9f5d43a 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx +++ b/src/sage/algebras/quatalg/quaternion_algebra_cython.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # distutils: language = c++ # distutils: libraries = gmp m NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/algebras/quatalg/quaternion_algebra_element.pxd b/src/sage/algebras/quatalg/quaternion_algebra_element.pxd index 53f5802bf91..93c98b3e045 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_element.pxd +++ b/src/sage/algebras/quatalg/quaternion_algebra_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.libs.gmp.types cimport mpz_t from sage.libs.flint.types cimport fmpz_poly_t diff --git a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx index 1b2df20594d..d17566c8c22 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra_element.pyx +++ b/src/sage/algebras/quatalg/quaternion_algebra_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # distutils: language = c++ # distutils: libraries = gmp m NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/algebras/quaternion_algebra.py b/src/sage/algebras/quaternion_algebra.py index 0694175bf13..4e92b73de69 100644 --- a/src/sage/algebras/quaternion_algebra.py +++ b/src/sage/algebras/quaternion_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules ############################################################ diff --git a/src/sage/algebras/quaternion_algebra_element.py b/src/sage/algebras/quaternion_algebra_element.py index 809f551d2a2..ed0baaf0152 100644 --- a/src/sage/algebras/quaternion_algebra_element.py +++ b/src/sage/algebras/quaternion_algebra_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules ####################################################################### diff --git a/src/sage/algebras/rational_cherednik_algebra.py b/src/sage/algebras/rational_cherednik_algebra.py index 0333e4b55df..58b3ce5441d 100644 --- a/src/sage/algebras/rational_cherednik_algebra.py +++ b/src/sage/algebras/rational_cherednik_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Rational Cherednik Algebras diff --git a/src/sage/algebras/schur_algebra.py b/src/sage/algebras/schur_algebra.py index 389bd86a2d4..6e0b6ad8583 100644 --- a/src/sage/algebras/schur_algebra.py +++ b/src/sage/algebras/schur_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups sage.modules r""" Schur algebras for `GL_n` diff --git a/src/sage/algebras/shuffle_algebra.py b/src/sage/algebras/shuffle_algebra.py index 0926f180ade..2db55513d66 100644 --- a/src/sage/algebras/shuffle_algebra.py +++ b/src/sage/algebras/shuffle_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Shuffle algebras diff --git a/src/sage/algebras/splitting_algebra.py b/src/sage/algebras/splitting_algebra.py index 57c809ba2f4..991d6240a09 100644 --- a/src/sage/algebras/splitting_algebra.py +++ b/src/sage/algebras/splitting_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.libs.pari sage.modules r""" Splitting Algebras diff --git a/src/sage/algebras/steenrod/all.py b/src/sage/algebras/steenrod/all.py index f10017c5d3a..134b2b032cf 100644 --- a/src/sage/algebras/steenrod/all.py +++ b/src/sage/algebras/steenrod/all.py @@ -1,10 +1,8 @@ -# sage_setup: distribution = sagemath-combinat """ The Steenrod algebra """ +from .steenrod_algebra import SteenrodAlgebra, Sq from sage.misc.lazy_import import lazy_import -lazy_import('sage.algebras.steenrod.steenrod_algebra', ['SteenrodAlgebra', 'Sq']) lazy_import('sage.algebras.steenrod.steenrod_algebra_bases', 'steenrod_algebra_basis', deprecation=(32647, 'removed from namespace')) -del lazy_import diff --git a/src/sage/algebras/steenrod/steenrod_algebra.py b/src/sage/algebras/steenrod/steenrod_algebra.py index 49745df290d..3f9153cf962 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra.py +++ b/src/sage/algebras/steenrod/steenrod_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" The Steenrod algebra diff --git a/src/sage/algebras/steenrod/steenrod_algebra_bases.py b/src/sage/algebras/steenrod/steenrod_algebra_bases.py index fcbba639c03..f439827ff69 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra_bases.py +++ b/src/sage/algebras/steenrod/steenrod_algebra_bases.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Steenrod algebra bases diff --git a/src/sage/algebras/steenrod/steenrod_algebra_misc.py b/src/sage/algebras/steenrod/steenrod_algebra_misc.py index 5984f6b9e84..c2cb488ab4a 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra_misc.py +++ b/src/sage/algebras/steenrod/steenrod_algebra_misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Miscellaneous functions for the Steenrod algebra and its elements diff --git a/src/sage/algebras/steenrod/steenrod_algebra_mult.py b/src/sage/algebras/steenrod/steenrod_algebra_mult.py index 73a65f3849a..5672755f3fa 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra_mult.py +++ b/src/sage/algebras/steenrod/steenrod_algebra_mult.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.rings.finite_rings r""" Multiplication for elements of the Steenrod algebra diff --git a/src/sage/algebras/tensor_algebra.py b/src/sage/algebras/tensor_algebra.py index ceeba471da2..a14ab916336 100644 --- a/src/sage/algebras/tensor_algebra.py +++ b/src/sage/algebras/tensor_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Tensor Algebras diff --git a/src/sage/algebras/weyl_algebra.py b/src/sage/algebras/weyl_algebra.py index 505b5766fcc..e439f3c3217 100644 --- a/src/sage/algebras/weyl_algebra.py +++ b/src/sage/algebras/weyl_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.modules r""" Weyl Algebras diff --git a/src/sage/algebras/yangian.py b/src/sage/algebras/yangian.py index 62ac37bbeef..8e19b92ba07 100644 --- a/src/sage/algebras/yangian.py +++ b/src/sage/algebras/yangian.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Yangians diff --git a/src/sage/algebras/yokonuma_hecke_algebra.py b/src/sage/algebras/yokonuma_hecke_algebra.py index 55e87f833bf..747169d7abb 100644 --- a/src/sage/algebras/yokonuma_hecke_algebra.py +++ b/src/sage/algebras/yokonuma_hecke_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules """ Yokonuma-Hecke Algebras diff --git a/src/sage/all.py b/src/sage/all.py index 2bf07cdfb79..b1f35e3a738 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -57,95 +57,98 @@ import operator import math -# includes .all__sagemath_objects, .all__sagemath_environment -from sage.all__sagemath_repl import * +################ end setup warnings ############################### + +from .all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment + +################################################################### # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, - sig_on_reset as sig_on_count) + sig_on_reset as sig_on_count) -from time import sleep +from time import sleep from functools import reduce # in order to keep reduce in python3 import sage.misc.lazy_import -from sage.misc.all import * # takes a while -from sage.typeset.all import * +from sage.misc.all import * # takes a while +from sage.typeset.all import * from sage.misc.sh import sh -from sage.libs.all import * +from sage.libs.all import * from sage.data_structures.all import * -from sage.structure.all import * -from sage.rings.all import * -from sage.arith.all import * -from sage.matrix.all import * - -from sage.symbolic.all import * -from sage.modules.all import * -from sage.monoids.all import * -from sage.algebras.all import * -from sage.modular.all import * -from sage.sat.all import * -from sage.schemes.all import * -from sage.graphs.all import * -from sage.groups.all import * -from sage.arith.power import generic_power as power -from sage.databases.all import * +from sage.structure.all import * +from sage.rings.all import * +from sage.arith.all import * +from sage.matrix.all import * + +from sage.symbolic.all import * +from sage.modules.all import * +from sage.monoids.all import * +from sage.algebras.all import * +from sage.modular.all import * +from sage.sat.all import * +from sage.schemes.all import * +from sage.graphs.all import * +from sage.groups.all import * +from sage.arith.power import generic_power as power +from sage.databases.all import * from sage.categories.all import * -from sage.sets.all import * +from sage.sets.all import * from sage.probability.all import * from sage.interfaces.all import * -from sage.functions.all import * -from sage.calculus.all import * +from sage.functions.all import * +from sage.calculus.all import * lazy_import('sage.tests', 'all', as_='tests', deprecation=27337) -from sage.cpython.all import * +from sage.cpython.all import * -from sage.crypto.all import * +from sage.crypto.all import * import sage.crypto.mq as mq -from sage.plot.all import * -from sage.plot.plot3d.all import * +from sage.plot.all import * +from sage.plot.plot3d.all import * -from sage.coding.all import * -from sage.combinat.all import * +from sage.coding.all import * +from sage.combinat.all import * from sage.lfunctions.all import * -from sage.geometry.all import * -from sage.geometry.triangulation.all import * -from sage.geometry.riemannian_manifolds.all import * +from sage.geometry.all import * +from sage.geometry.triangulation.all import * +from sage.geometry.riemannian_manifolds.all import * -from sage.dynamics.all import * +from sage.dynamics.all import * -from sage.homology.all import * +from sage.homology.all import * -from sage.topology.all import * +from sage.topology.all import * from sage.quadratic_forms.all import * -from sage.games.all import * +from sage.games.all import * -from sage.logic.all import * +from sage.logic.all import * -from sage.numerical.all import * +from sage.numerical.all import * -from sage.stats.all import * +from sage.stats.all import * import sage.stats.all as stats -from sage.parallel.all import * +from sage.parallel.all import * -from sage.ext.fast_callable import fast_callable -from sage.ext.fast_eval import fast_float +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float from sage.sandpiles.all import * -from sage.tensor.all import * +from sage.tensor.all import * -from sage.matroids.all import * +from sage.matroids.all import * from sage.game_theory.all import * @@ -165,7 +168,7 @@ _init_qqbar() ########################################################### -# WARNING: +#### WARNING: # DO *not* import numpy / matplotlib / networkx here!! # Each takes a surprisingly long time to initialize, # and that initialization should be done more on-the-fly @@ -187,37 +190,31 @@ copying = license copyright = license - def quit_sage(verbose=True): """ Does nothing. Code that needs cleanup should register its own handler using the atexit module. """ from sage.misc.superseded import deprecation - deprecation( - 8784, 'quit_sage is deprecated and now does nothing; please simply delete it') + deprecation(8784, 'quit_sage is deprecated and now does nothing; please simply delete it') from sage.misc.persist import register_unpickle_override register_unpickle_override('sage.categories.category', 'Sets', Sets) -register_unpickle_override('sage.categories.category_types', - 'HeckeModules', HeckeModules) +register_unpickle_override('sage.categories.category_types', 'HeckeModules', HeckeModules) register_unpickle_override('sage.categories.category_types', 'Objects', Objects) register_unpickle_override('sage.categories.category_types', 'Rings', Rings) register_unpickle_override('sage.categories.category_types', 'Fields', Fields) -register_unpickle_override('sage.categories.category_types', - 'VectorSpaces', VectorSpaces) -register_unpickle_override('sage.categories.category_types', - 'Schemes_over_base', sage.categories.schemes.Schemes_over_base) -register_unpickle_override('sage.categories.category_types', - 'ModularAbelianVarieties', ModularAbelianVarieties) +register_unpickle_override('sage.categories.category_types', 'VectorSpaces', VectorSpaces) +register_unpickle_override('sage.categories.category_types', 'Schemes_over_base', sage.categories.schemes.Schemes_over_base) +register_unpickle_override('sage.categories.category_types', 'ModularAbelianVarieties', ModularAbelianVarieties) register_unpickle_override('sage.libs.pari.gen_py', 'pari', pari) # Cache the contents of star imports. sage.misc.lazy_import.save_cache_file() -# Debugging for Singular, see trac #10903 +### Debugging for Singular, see trac #10903 # from sage.libs.singular.ring import poison_currRing # sys.settrace(poison_currRing) @@ -244,7 +241,7 @@ def quit_sage(verbose=True): sage.misc.lazy_import.finish_startup() -# Python broke large ints; see trac #34506 +### Python broke large ints; see trac #34506 if hasattr(sys, "set_int_max_str_digits"): sys.set_int_max_str_digits(0) diff --git a/src/sage/all__sagemath_bliss.py b/src/sage/all__sagemath_bliss.py index 00e01e7dfe7..e69de29bb2d 100644 --- a/src/sage/all__sagemath_bliss.py +++ b/src/sage/all__sagemath_bliss.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-bliss diff --git a/src/sage/all__sagemath_categories.py b/src/sage/all__sagemath_categories.py index cb37b0baf2f..4f438a77cbe 100644 --- a/src/sage/all__sagemath_categories.py +++ b/src/sage/all__sagemath_categories.py @@ -1,5 +1,4 @@ -# sage_setup: distribution = sagemath-categories -from sage.all__sagemath_objects import * +from .all__sagemath_objects import * from sage.categories.all import * diff --git a/src/sage/all__sagemath_coxeter3.py b/src/sage/all__sagemath_coxeter3.py index 61138b7bc1a..e69de29bb2d 100644 --- a/src/sage/all__sagemath_coxeter3.py +++ b/src/sage/all__sagemath_coxeter3.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-coxeter3 diff --git a/src/sage/all__sagemath_environment.py b/src/sage/all__sagemath_environment.py index 4baf97bae83..f68c74ab115 100644 --- a/src/sage/all__sagemath_environment.py +++ b/src/sage/all__sagemath_environment.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment from sage.env import SAGE_ROOT, SAGE_SRC, SAGE_DOC_SRC, SAGE_LOCAL, DOT_SAGE, SAGE_ENV from sage.misc.all__sagemath_environment import * diff --git a/src/sage/all__sagemath_mcqd.py b/src/sage/all__sagemath_mcqd.py index 9d46f0ff6ba..e69de29bb2d 100644 --- a/src/sage/all__sagemath_mcqd.py +++ b/src/sage/all__sagemath_mcqd.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-mcqd diff --git a/src/sage/all__sagemath_meataxe.py b/src/sage/all__sagemath_meataxe.py index fd1e327ee2f..e69de29bb2d 100644 --- a/src/sage/all__sagemath_meataxe.py +++ b/src/sage/all__sagemath_meataxe.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-meataxe diff --git a/src/sage/all__sagemath_objects.py b/src/sage/all__sagemath_objects.py index e5861c865a4..7780f245aae 100644 --- a/src/sage/all__sagemath_objects.py +++ b/src/sage/all__sagemath_objects.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects import os import sys import operator @@ -10,16 +9,16 @@ # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, - sig_on_reset as sig_on_count) + sig_on_reset as sig_on_count) -from time import sleep +from time import sleep -from sage.misc.all__sagemath_objects import * -from sage.structure.all import * -from sage.arith.power import generic_power as power +from sage.misc.all__sagemath_objects import * +from sage.structure.all import * +from sage.arith.power import generic_power as power from sage.categories.all__sagemath_objects import * -from sage.cpython.all import * +from sage.cpython.all import * from cysignals.alarm import alarm, cancel_alarm diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index 2bbf2476a74..d77919bc8bd 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -1,12 +1,8 @@ -# sage_setup: distribution = sagemath-repl - -# Set up warning filters before importing Sage stuff - +############ setup warning filters before importing Sage stuff #### import sys import warnings -# This is a Python debug build (--with-pydebug) -__with_pydebug = hasattr(sys, 'gettotalrefcount') +__with_pydebug = hasattr(sys, 'gettotalrefcount') # This is a Python debug build (--with-pydebug) if __with_pydebug: # a debug build does not install the default warning filters. Sadly, this breaks doctests so we # have to re-add them: @@ -20,38 +16,38 @@ # Ignore all deprecations from IPython etc. warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)') + module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)') # scipy 1.18 introduced reprecation warnings on a number of things they are moving to # numpy, e.g. DeprecationWarning: scipy.array is deprecated # and will be removed in SciPy 2.0.0, use numpy.array instead # This affects networkx 2.2 up and including 2.4 (cf. :issue:29766) warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(scipy|networkx)') + module='(scipy|networkx)') # However, be sure to keep OUR deprecation warnings warnings.filterwarnings('default', category=DeprecationWarning, - message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.') + message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.') # Ignore Python 3.9 deprecation warnings warnings.filterwarnings('ignore', category=DeprecationWarning, - module='ast') + module='ast') # Ignore packaging 20.5 deprecation warnings warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(.*[.]_vendor[.])?packaging') + module='(.*[.]_vendor[.])?packaging') # Ignore a few warnings triggered by pythran 0.12.1 warnings.filterwarnings('ignore', category=DeprecationWarning, - message='\n\n `numpy.distutils` is deprecated since NumPy 1.23.0', - module='pythran.dist') + message='\n\n `numpy.distutils` is deprecated since NumPy 1.23.0', + module='pythran.dist') warnings.filterwarnings('ignore', category=DeprecationWarning, - message='pkg_resources is deprecated as an API|' - 'Deprecated call to `pkg_resources.declare_namespace(.*)`', - module='pkg_resources|setuptools.sandbox') + message='pkg_resources is deprecated as an API|' + 'Deprecated call to `pkg_resources.declare_namespace(.*)`', + module='pkg_resources|setuptools.sandbox') warnings.filterwarnings('ignore', category=DeprecationWarning, - message='msvccompiler is deprecated and slated to be removed', - module='distutils.msvccompiler') + message='msvccompiler is deprecated and slated to be removed', + module='distutils.msvccompiler') warnings.filterwarnings('ignore', category=DeprecationWarning, message='The distutils(.sysconfig module| package) is deprecated', @@ -101,11 +97,11 @@ r"removed from itertools in Python 3.14.") -from sage.all__sagemath_objects import * -from sage.all__sagemath_environment import * +from .all__sagemath_objects import * +from .all__sagemath_environment import * -from sage.doctest.all import * -from sage.repl.all import * +from sage.doctest.all import * +from sage.repl.all import * from sage.misc.all__sagemath_repl import * # For doctesting. These are overwritten later diff --git a/src/sage/all__sagemath_sirocco.py b/src/sage/all__sagemath_sirocco.py index 44db2511e89..e69de29bb2d 100644 --- a/src/sage/all__sagemath_sirocco.py +++ b/src/sage/all__sagemath_sirocco.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-sirocco diff --git a/src/sage/all__sagemath_tdlib.py b/src/sage/all__sagemath_tdlib.py index e26612c8409..e69de29bb2d 100644 --- a/src/sage/all__sagemath_tdlib.py +++ b/src/sage/all__sagemath_tdlib.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-tdlib diff --git a/src/sage/all_cmdline.py b/src/sage/all_cmdline.py index 33d0712c996..197d34ebc90 100644 --- a/src/sage/all_cmdline.py +++ b/src/sage/all_cmdline.py @@ -19,7 +19,7 @@ from sage.misc.lazy_import import lazy_import -for pkg in ['axiom', 'fricas', 'gap', 'gap3', 'giac', 'gp', +for pkg in ['axiom', 'fricas', 'gap' , 'gap3', 'giac', 'gp', 'gnuplot', 'kash', 'magma', 'macaulay2', 'maple', 'mathematica', 'mathics', 'matlab', 'mupad', 'mwrank', 'octave', 'qepcad', 'singular', diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index 705fb82ed52..3446336de68 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -1,37 +1,96 @@ -# sage_setup: distribution = sagemath-categories from sage.misc.lazy_import import lazy_import -from sage.arith.misc import (algdep, bernoulli, is_prime, is_prime_power, - is_pseudoprime, is_pseudoprime_power, - prime_powers, primes_first_n, eratosthenes, primes, - next_prime_power, next_probable_prime, next_prime, - previous_prime, previous_prime_power, random_prime, - divisors, sigma, gcd, GCD, xlcm, xgcd, xkcd, - inverse_mod, get_gcd, get_inverse_mod, power_mod, - rational_reconstruction, mqrr_rational_reconstruction, - trial_division, factor, prime_divisors, odd_part, prime_to_m_part, - is_square, is_squarefree, euler_phi, carmichael_lambda, crt, CRT, - CRT_list, CRT_basis, CRT_vectors, multinomial, multinomial_coefficients, - binomial, factorial, kronecker_symbol, kronecker, legendre_symbol, - primitive_root, nth_prime, quadratic_residues, moebius, - continuant, number_of_divisors, hilbert_symbol, hilbert_conductor, - hilbert_conductor_inverse, falling_factorial, rising_factorial, - integer_ceil, integer_floor, - two_squares, three_squares, four_squares, sum_of_k_squares, - subfactorial, is_power_of_two, differences, - sort_complex_numbers_for_display, - fundamental_discriminant, squarefree_divisors, - radical, binomial_coefficients, jacobi_symbol, - dedekind_sum, - prime_factors, prime_range, valuation) +from sage.arith.misc import ( + algdep, + bernoulli, + is_prime, + is_prime_power, + is_pseudoprime, + is_pseudoprime_power, + prime_powers, + primes_first_n, + eratosthenes, + primes, + next_prime_power, + next_probable_prime, + next_prime, + previous_prime, + previous_prime_power, + random_prime, + divisors, + sigma, + gcd, + GCD, + xlcm, + xgcd, + xkcd, + inverse_mod, + get_gcd, + get_inverse_mod, + power_mod, + rational_reconstruction, + mqrr_rational_reconstruction, + trial_division, + factor, + prime_divisors, + odd_part, + prime_to_m_part, + is_square, + is_squarefree, + euler_phi, + carmichael_lambda, + crt, + CRT, + CRT_list, + CRT_basis, + CRT_vectors, + multinomial, + multinomial_coefficients, + binomial, + factorial, + kronecker_symbol, + kronecker, + legendre_symbol, + primitive_root, + nth_prime, + quadratic_residues, + moebius, + continuant, + number_of_divisors, + hilbert_symbol, + hilbert_conductor, + hilbert_conductor_inverse, + falling_factorial, + rising_factorial, + integer_ceil, + integer_floor, + two_squares, + three_squares, + four_squares, + sum_of_k_squares, + subfactorial, + is_power_of_two, + differences, + sort_complex_numbers_for_display, + fundamental_discriminant, + squarefree_divisors, + radical, + binomial_coefficients, + jacobi_symbol, + dedekind_sum, + prime_factors, + prime_range, + valuation, +) lazy_import("sage.arith.misc", ("Sigma", "Moebius", "Euler_Phi"), deprecation=30322) from sage.arith.functions import lcm + LCM = lcm from sage.arith.srange import xsrange, srange, ellipsis_iter, ellipsis_range + sxrange = xsrange σ = sigma -del lazy_import diff --git a/src/sage/arith/all__sagemath_objects.py b/src/sage/arith/all__sagemath_objects.py index 31d80d17daa..38e44245ad3 100644 --- a/src/sage/arith/all__sagemath_objects.py +++ b/src/sage/arith/all__sagemath_objects.py @@ -1,5 +1,2 @@ -# sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package - -from sage.arith.power import generic_power as power diff --git a/src/sage/arith/constants.pxd b/src/sage/arith/constants.pxd index b588791fd66..371960ec3bc 100644 --- a/src/sage/arith/constants.pxd +++ b/src/sage/arith/constants.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # # Various mathematical constants, represented as double precision hex # float. We use these instead of decimal constants like 3.1415... diff --git a/src/sage/arith/functions.pxd b/src/sage/arith/functions.pxd index af3c4e6afc3..9ddfc38b38b 100644 --- a/src/sage/arith/functions.pxd +++ b/src/sage/arith/functions.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-categories - cpdef LCM_list(v) cdef LCM_generic(itr, ret) diff --git a/src/sage/arith/functions.pyx b/src/sage/arith/functions.pyx index 5d9b1c81f82..a3a9c4ae216 100644 --- a/src/sage/arith/functions.pyx +++ b/src/sage/arith/functions.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Fast Arithmetic Functions """ diff --git a/src/sage/arith/long.pxd b/src/sage/arith/long.pxd index 44923f802da..76c7d7f015d 100644 --- a/src/sage/arith/long.pxd +++ b/src/sage/arith/long.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # sage.doctest: needs sage.misc.cython r""" Fast conversion of Python objects to C long diff --git a/src/sage/arith/misc.py b/src/sage/arith/misc.py index 20fbb3fcf78..6d11707f785 100644 --- a/src/sage/arith/misc.py +++ b/src/sage/arith/misc.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Miscellaneous arithmetic functions diff --git a/src/sage/arith/multi_modular.pxd b/src/sage/arith/multi_modular.pxd index 3409268b33f..300bbf29008 100644 --- a/src/sage/arith/multi_modular.pxd +++ b/src/sage/arith/multi_modular.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.ext.mod_int cimport * from sage.libs.gmp.types cimport mpz_t diff --git a/src/sage/arith/multi_modular.pyx b/src/sage/arith/multi_modular.pyx index 566466da805..f9252624eec 100644 --- a/src/sage/arith/multi_modular.pyx +++ b/src/sage/arith/multi_modular.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: optional - primecountpy """ Utility classes for multi-modular algorithms diff --git a/src/sage/arith/numerical_approx.pxd b/src/sage/arith/numerical_approx.pxd index 794e443e449..85f92eca336 100644 --- a/src/sage/arith/numerical_approx.pxd +++ b/src/sage/arith/numerical_approx.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # sage.doctest: needs sage.rings.real_mpfr cpdef inline long digits_to_bits(d) except -1: diff --git a/src/sage/arith/numerical_approx.pyx b/src/sage/arith/numerical_approx.pyx index 642b9418646..6698a0ec317 100644 --- a/src/sage/arith/numerical_approx.pyx +++ b/src/sage/arith/numerical_approx.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # sage.doctest: needs sage.rings.real_mpfr r""" Generic numerical approximation function diff --git a/src/sage/arith/power.pxd b/src/sage/arith/power.pxd index 8fe386ad09d..7651245d2eb 100644 --- a/src/sage/arith/power.pxd +++ b/src/sage/arith/power.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from cpython.number cimport PyNumber_TrueDivide from sage.structure.element cimport Element diff --git a/src/sage/arith/power.pyx b/src/sage/arith/power.pyx index 85096b6c703..e9a1f7972eb 100644 --- a/src/sage/arith/power.pyx +++ b/src/sage/arith/power.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Generic implementation of powering diff --git a/src/sage/arith/rational_reconstruction.pxd b/src/sage/arith/rational_reconstruction.pxd index cf1182c58a2..6bbd246c2df 100644 --- a/src/sage/arith/rational_reconstruction.pxd +++ b/src/sage/arith/rational_reconstruction.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.libs.gmp.types cimport mpz_t, mpq_t cdef int mpq_rational_reconstruction(mpq_t answer, mpz_t a, mpz_t m) except -1 diff --git a/src/sage/arith/rational_reconstruction.pyx b/src/sage/arith/rational_reconstruction.pyx index 47991a9862b..bd07977411a 100644 --- a/src/sage/arith/rational_reconstruction.pyx +++ b/src/sage/arith/rational_reconstruction.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Rational reconstruction diff --git a/src/sage/arith/srange.pyx b/src/sage/arith/srange.pyx index fed04106ddb..d4815ae60b7 100644 --- a/src/sage/arith/srange.pyx +++ b/src/sage/arith/srange.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Ranges and the ``[1,2,..,n]`` notation diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index 90a2f2f8d7a..c83a97f6eb4 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,15 +1,233 @@ -# sage_setup: distribution = sagemath-symbolics -from sage.calculus.all__sagemath_modules import * +from .calculus import maxima as maxima_calculus +from .calculus import (laplace, inverse_laplace, + limit, lim) -from sage.calculus import desolvers -from sage.calculus.calculus import maxima as maxima_calculus -from sage.calculus.calculus import (laplace, inverse_laplace, - limit, lim) +from .integration import numerical_integral, monte_carlo_integral +integral_numerical = numerical_integral -from sage.calculus.desolvers import (desolve, desolve_laplace, desolve_system, - eulers_method, eulers_method_2x2, - eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, - desolve_odeint, desolve_mintides, desolve_tides_mpfr) -from sage.calculus.expr import symbolic_expression -from sage.calculus.var import (var, function, clear_vars) +from .interpolation import spline, Spline + +from .functional import (diff, derivative, + expand, + taylor, simplify) + +from .functions import (wronskian, jacobian) + +from .ode import ode_solver, ode_system + +from .desolvers import (desolve, desolve_laplace, desolve_system, + eulers_method, eulers_method_2x2, + eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, + desolve_odeint, desolve_mintides, desolve_tides_mpfr) + +from .var import (var, function, clear_vars) + +from .transforms.all import * + +# We lazy_import the following modules since they import numpy which slows down sage startup +from sage.misc.lazy_import import lazy_import +lazy_import("sage.calculus.riemann", ["Riemann_Map"]) +lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"]) + +from sage.modules.free_module_element import vector +from sage.matrix.constructor import matrix + + +def symbolic_expression(x): + """ + Create a symbolic expression or vector of symbolic expressions from x. + + INPUT: + + - ``x`` - an object + + OUTPUT: + + - a symbolic expression. + + EXAMPLES:: + + sage: a = symbolic_expression(3/2); a + 3/2 + sage: type(a) + + sage: R. = QQ[]; type(x) + + sage: a = symbolic_expression(2*x^2 + 3); a + 2*x^2 + 3 + sage: type(a) + + sage: from sage.structure.element import Expression + sage: isinstance(a, Expression) + True + sage: a in SR + True + sage: a.parent() + Symbolic Ring + + Note that equations exist in the symbolic ring:: + + sage: E = EllipticCurve('15a'); E + Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field + sage: symbolic_expression(E) + x*y + y^2 + y == x^3 + x^2 - 10*x - 10 + sage: symbolic_expression(E) in SR + True + + If ``x`` is a list or tuple, create a vector of symbolic expressions:: + + sage: v = symbolic_expression([x,1]); v + (x, 1) + sage: v.base_ring() + Symbolic Ring + sage: v = symbolic_expression((x,1)); v + (x, 1) + sage: v.base_ring() + Symbolic Ring + sage: v = symbolic_expression((3,1)); v + (3, 1) + sage: v.base_ring() + Symbolic Ring + sage: E = EllipticCurve('15a'); E + Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field + sage: v = symbolic_expression([E,E]); v + (x*y + y^2 + y == x^3 + x^2 - 10*x - 10, x*y + y^2 + y == x^3 + x^2 - 10*x - 10) + sage: v.base_ring() + Symbolic Ring + + Likewise, if ``x`` is a vector, create a vector of symbolic expressions:: + + sage: u = vector([1, 2, 3]) + sage: v = symbolic_expression(u); v + (1, 2, 3) + sage: v.parent() + Vector space of dimension 3 over Symbolic Ring + + If ``x`` is a list or tuple of lists/tuples/vectors, create a matrix of symbolic expressions:: + + sage: M = symbolic_expression([[1, x, x^2], (x, x^2, x^3), vector([x^2, x^3, x^4])]); M + [ 1 x x^2] + [ x x^2 x^3] + [x^2 x^3 x^4] + sage: M.parent() + Full MatrixSpace of 3 by 3 dense matrices over Symbolic Ring + + If ``x`` is a matrix, create a matrix of symbolic expressions:: + + sage: A = matrix([[1, 2, 3], [4, 5, 6]]) + sage: B = symbolic_expression(A); B + [1 2 3] + [4 5 6] + sage: B.parent() + Full MatrixSpace of 2 by 3 dense matrices over Symbolic Ring + + If ``x`` is a function, for example defined by a ``lambda`` expression, create a + symbolic function:: + + sage: f = symbolic_expression(lambda z: z^2 + 1); f + z |--> z^2 + 1 + sage: f.parent() + Callable function ring with argument z + sage: f(7) + 50 + + If ``x`` is a list or tuple of functions, or if ``x`` is a function that returns a list + or tuple, create a callable symbolic vector:: + + sage: symbolic_expression([lambda mu, nu: mu^2 + nu^2, lambda mu, nu: mu^2 - nu^2]) + (mu, nu) |--> (mu^2 + nu^2, mu^2 - nu^2) + sage: f = symbolic_expression(lambda uwu: [1, uwu, uwu^2]); f + uwu |--> (1, uwu, uwu^2) + sage: f.parent() + Vector space of dimension 3 over Callable function ring with argument uwu + sage: f(5) + (1, 5, 25) + sage: f(5).parent() + Vector space of dimension 3 over Symbolic Ring + + TESTS: + + Lists, tuples, and vectors of length 0 become vectors over a symbolic ring:: + + sage: symbolic_expression([]).parent() + Vector space of dimension 0 over Symbolic Ring + sage: symbolic_expression(()).parent() + Vector space of dimension 0 over Symbolic Ring + sage: symbolic_expression(vector(QQ, 0)).parent() + Vector space of dimension 0 over Symbolic Ring + + If a matrix has dimension 0, the result is still a matrix over a symbolic ring:: + + sage: symbolic_expression(matrix(QQ, 2, 0)).parent() + Full MatrixSpace of 2 by 0 dense matrices over Symbolic Ring + sage: symbolic_expression(matrix(QQ, 0, 3)).parent() + Full MatrixSpace of 0 by 3 dense matrices over Symbolic Ring + + Also functions defined using ``def`` can be used, but we do not advertise it as a use case:: + + sage: def sos(x, y): + ....: return x^2 + y^2 + sage: symbolic_expression(sos) + (x, y) |--> x^2 + y^2 + + Functions that take a varying number of arguments or keyword-only arguments are not accepted:: + + sage: def variadic(x, *y): + ....: return x + sage: symbolic_expression(variadic) + Traceback (most recent call last): + ... + TypeError: unable to convert to a symbolic expression + + sage: def function_with_keyword_only_arg(x, *, sign=1): + ....: return sign * x + sage: symbolic_expression(function_with_keyword_only_arg) + Traceback (most recent call last): + ... + TypeError: unable to convert + to a symbolic expression + """ + from sage.symbolic.expression import Expression + from sage.symbolic.ring import SR + from sage.modules.free_module_element import is_FreeModuleElement + from sage.structure.element import is_Matrix + + if isinstance(x, Expression): + return x + elif hasattr(x, '_symbolic_'): + return x._symbolic_(SR) + elif isinstance(x, (tuple, list)) or is_FreeModuleElement(x): + expressions = [symbolic_expression(item) for item in x] + if not expressions: + # Make sure it is symbolic also when length is 0 + return vector(SR, 0) + if is_FreeModuleElement(expressions[0]): + return matrix(expressions) + return vector(expressions) + elif is_Matrix(x): + if not x.nrows() or not x.ncols(): + # Make sure it is symbolic and of correct dimensions + # also when a matrix dimension is 0 + return matrix(SR, x.nrows(), x.ncols()) + rows = [symbolic_expression(row) for row in x.rows()] + return matrix(rows) + elif callable(x): + from inspect import signature, Parameter + try: + s = signature(x) + except ValueError: + pass + else: + if all(param.kind in (Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD) + for param in s.parameters.values()): + vars = [SR.var(name) for name in s.parameters.keys()] + result = x(*vars) + if isinstance(result, (tuple, list)): + return vector(SR, result).function(*vars) + else: + return SR(result).function(*vars) + return SR(x) + + +from . import desolvers diff --git a/src/sage/calculus/all__sagemath_categories.py b/src/sage/calculus/all__sagemath_categories.py deleted file mode 100644 index cf9a7fbd0b2..00000000000 --- a/src/sage/calculus/all__sagemath_categories.py +++ /dev/null @@ -1 +0,0 @@ -from sage.calculus.functional import diff, derivative, expand, simplify, taylor diff --git a/src/sage/calculus/all__sagemath_modules.py b/src/sage/calculus/all__sagemath_modules.py deleted file mode 100644 index f12d63a3b7f..00000000000 --- a/src/sage/calculus/all__sagemath_modules.py +++ /dev/null @@ -1,18 +0,0 @@ -from sage.calculus.all__sagemath_categories import * - -from sage.calculus.integration import numerical_integral, monte_carlo_integral -integral_numerical = numerical_integral - -from sage.calculus.interpolation import spline, Spline - -from sage.calculus.functions import wronskian, jacobian - -from sage.calculus.ode import ode_solver, ode_system - -# We lazy_import the following modules since they import numpy which slows down sage startup -from sage.misc.lazy_import import lazy_import -lazy_import("sage.calculus.riemann", ["Riemann_Map"]) -lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"]) - -from sage.calculus.transforms.all import * -del lazy_import diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py index 0f71699bc2f..5bf4c0eec49 100644 --- a/src/sage/calculus/calculus.py +++ b/src/sage/calculus/calculus.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Symbolic Computation diff --git a/src/sage/calculus/desolvers.py b/src/sage/calculus/desolvers.py index c601c605642..afeee69ce89 100644 --- a/src/sage/calculus/desolvers.py +++ b/src/sage/calculus/desolvers.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Solving ordinary differential equations diff --git a/src/sage/calculus/expr.py b/src/sage/calculus/expr.py deleted file mode 100644 index 0aa62851d24..00000000000 --- a/src/sage/calculus/expr.py +++ /dev/null @@ -1,203 +0,0 @@ -r""" -Constructor for symbolic expressions -""" - -from sage.misc.lazy_import import lazy_import -from sage.structure.element import is_Matrix -from sage.symbolic.expression import Expression -from sage.symbolic.ring import SR - -lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) -lazy_import('sage.matrix.constructor', 'matrix') - - -def symbolic_expression(x): - """ - Create a symbolic expression or vector of symbolic expressions from x. - - INPUT: - - - ``x`` - an object - - OUTPUT: - - - a symbolic expression. - - EXAMPLES:: - - sage: a = symbolic_expression(3/2); a - 3/2 - sage: type(a) - - sage: R. = QQ[]; type(x) - - sage: a = symbolic_expression(2*x^2 + 3); a - 2*x^2 + 3 - sage: type(a) - - sage: from sage.structure.element import Expression - sage: isinstance(a, Expression) - True - sage: a in SR - True - sage: a.parent() - Symbolic Ring - - Note that equations exist in the symbolic ring:: - - sage: # needs sage.schemes - sage: E = EllipticCurve('15a'); E - Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field - sage: symbolic_expression(E) - x*y + y^2 + y == x^3 + x^2 - 10*x - 10 - sage: symbolic_expression(E) in SR - True - - If ``x`` is a list or tuple, create a vector of symbolic expressions:: - - sage: v = symbolic_expression([x,1]); v - (x, 1) - sage: v.base_ring() - Symbolic Ring - sage: v = symbolic_expression((x,1)); v - (x, 1) - sage: v.base_ring() - Symbolic Ring - sage: v = symbolic_expression((3,1)); v - (3, 1) - sage: v.base_ring() - Symbolic Ring - sage: E = EllipticCurve('15a'); E - Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field - sage: v = symbolic_expression([E,E]); v - (x*y + y^2 + y == x^3 + x^2 - 10*x - 10, x*y + y^2 + y == x^3 + x^2 - 10*x - 10) - sage: v.base_ring() - Symbolic Ring - - Likewise, if ``x`` is a vector, create a vector of symbolic expressions:: - - sage: u = vector([1, 2, 3]) - sage: v = symbolic_expression(u); v - (1, 2, 3) - sage: v.parent() - Vector space of dimension 3 over Symbolic Ring - - If ``x`` is a list or tuple of lists/tuples/vectors, create a matrix of symbolic expressions:: - - sage: M = symbolic_expression([[1, x, x^2], (x, x^2, x^3), vector([x^2, x^3, x^4])]); M - [ 1 x x^2] - [ x x^2 x^3] - [x^2 x^3 x^4] - sage: M.parent() - Full MatrixSpace of 3 by 3 dense matrices over Symbolic Ring - - If ``x`` is a matrix, create a matrix of symbolic expressions:: - - sage: A = matrix([[1, 2, 3], [4, 5, 6]]) - sage: B = symbolic_expression(A); B - [1 2 3] - [4 5 6] - sage: B.parent() - Full MatrixSpace of 2 by 3 dense matrices over Symbolic Ring - - If ``x`` is a function, for example defined by a ``lambda`` expression, create a - symbolic function:: - - sage: f = symbolic_expression(lambda z: z^2 + 1); f - z |--> z^2 + 1 - sage: f.parent() - Callable function ring with argument z - sage: f(7) - 50 - - If ``x`` is a list or tuple of functions, or if ``x`` is a function that returns a list - or tuple, create a callable symbolic vector:: - - sage: symbolic_expression([lambda mu, nu: mu^2 + nu^2, lambda mu, nu: mu^2 - nu^2]) - (mu, nu) |--> (mu^2 + nu^2, mu^2 - nu^2) - sage: f = symbolic_expression(lambda uwu: [1, uwu, uwu^2]); f - uwu |--> (1, uwu, uwu^2) - sage: f.parent() - Vector space of dimension 3 over Callable function ring with argument uwu - sage: f(5) - (1, 5, 25) - sage: f(5).parent() - Vector space of dimension 3 over Symbolic Ring - - TESTS: - - Lists, tuples, and vectors of length 0 become vectors over a symbolic ring:: - - sage: symbolic_expression([]).parent() - Vector space of dimension 0 over Symbolic Ring - sage: symbolic_expression(()).parent() - Vector space of dimension 0 over Symbolic Ring - sage: symbolic_expression(vector(QQ, 0)).parent() - Vector space of dimension 0 over Symbolic Ring - - If a matrix has dimension 0, the result is still a matrix over a symbolic ring:: - - sage: symbolic_expression(matrix(QQ, 2, 0)).parent() - Full MatrixSpace of 2 by 0 dense matrices over Symbolic Ring - sage: symbolic_expression(matrix(QQ, 0, 3)).parent() - Full MatrixSpace of 0 by 3 dense matrices over Symbolic Ring - - Also functions defined using ``def`` can be used, but we do not advertise it as a use case:: - - sage: def sos(x, y): - ....: return x^2 + y^2 - sage: symbolic_expression(sos) - (x, y) |--> x^2 + y^2 - - Functions that take a varying number of arguments or keyword-only arguments are not accepted:: - - sage: def variadic(x, *y): - ....: return x - sage: symbolic_expression(variadic) - Traceback (most recent call last): - ... - TypeError: unable to convert to a symbolic expression - - sage: def function_with_keyword_only_arg(x, *, sign=1): - ....: return sign * x - sage: symbolic_expression(function_with_keyword_only_arg) - Traceback (most recent call last): - ... - TypeError: unable to convert - to a symbolic expression - """ - if isinstance(x, Expression): - return x - elif hasattr(x, '_symbolic_'): - return x._symbolic_(SR) - elif isinstance(x, (tuple, list, FreeModuleElement)): - expressions = [symbolic_expression(item) for item in x] - if not expressions: - # Make sure it is symbolic also when length is 0 - return vector(SR, 0) - if isinstance(expressions[0], FreeModuleElement): - return matrix(expressions) - return vector(expressions) - elif is_Matrix(x): - if not x.nrows() or not x.ncols(): - # Make sure it is symbolic and of correct dimensions - # also when a matrix dimension is 0 - return matrix(SR, x.nrows(), x.ncols()) - rows = [symbolic_expression(row) for row in x.rows()] - return matrix(rows) - elif callable(x): - from inspect import signature, Parameter - try: - s = signature(x) - except ValueError: - pass - else: - if all(param.kind in (Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD) - for param in s.parameters.values()): - vars = [SR.var(name) for name in s.parameters.keys()] - result = x(*vars) - if isinstance(result, (tuple, list)): - return vector(SR, result).function(*vars) - else: - return SR(result).function(*vars) - return SR(x) diff --git a/src/sage/calculus/functional.py b/src/sage/calculus/functional.py index 1d1ae4791b7..109de21a5d9 100644 --- a/src/sage/calculus/functional.py +++ b/src/sage/calculus/functional.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.symbolic """ Functional notation support for common calculus methods diff --git a/src/sage/calculus/functions.py b/src/sage/calculus/functions.py index 77eaba98343..11a23aac323 100644 --- a/src/sage/calculus/functions.py +++ b/src/sage/calculus/functions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.symbolic r""" Calculus functions diff --git a/src/sage/calculus/integration.pyx b/src/sage/calculus/integration.pyx index 8faaf040e3b..f0cd3a9f1ca 100644 --- a/src/sage/calculus/integration.pyx +++ b/src/sage/calculus/integration.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.symbolic """ Numerical Integration diff --git a/src/sage/calculus/interpolation.pxd b/src/sage/calculus/interpolation.pxd index d5d5b0c983a..9d60459a03b 100644 --- a/src/sage/calculus/interpolation.pxd +++ b/src/sage/calculus/interpolation.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gsl.interp cimport * cdef class Spline: diff --git a/src/sage/calculus/interpolation.pyx b/src/sage/calculus/interpolation.pyx index bb5d2144990..c2acab64fd9 100644 --- a/src/sage/calculus/interpolation.pyx +++ b/src/sage/calculus/interpolation.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Real Interpolation using GSL """ diff --git a/src/sage/calculus/interpolators.pyx b/src/sage/calculus/interpolators.pyx index bf2b1b759da..0e1f5fc7209 100644 --- a/src/sage/calculus/interpolators.pyx +++ b/src/sage/calculus/interpolators.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs numpy """ Complex Interpolation diff --git a/src/sage/calculus/ode.pxd b/src/sage/calculus/ode.pxd index 6be7660f5f7..2de37b91764 100644 --- a/src/sage/calculus/ode.pxd +++ b/src/sage/calculus/ode.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cdef class ode_system: cdef int c_j(self,double , double *, double *,double *) noexcept diff --git a/src/sage/calculus/ode.pyx b/src/sage/calculus/ode.pyx index 1a58e0ef1dc..081b4f6bd83 100644 --- a/src/sage/calculus/ode.pyx +++ b/src/sage/calculus/ode.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Solving ODE numerically by GSL diff --git a/src/sage/calculus/predefined.py b/src/sage/calculus/predefined.py index fcfb0b17208..8e7f499b1ae 100644 --- a/src/sage/calculus/predefined.py +++ b/src/sage/calculus/predefined.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics from sage.symbolic.ring import var as _var a = _var('a') diff --git a/src/sage/calculus/riemann.pyx b/src/sage/calculus/riemann.pyx index b6c88377430..a4f9545bffb 100644 --- a/src/sage/calculus/riemann.pyx +++ b/src/sage/calculus/riemann.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs numpy sage.symbolic """ Riemann Mapping diff --git a/src/sage/calculus/test_sympy.py b/src/sage/calculus/test_sympy.py index ba9853bb356..20736fcf6a6 100644 --- a/src/sage/calculus/test_sympy.py +++ b/src/sage/calculus/test_sympy.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.symbolic r""" A Sample Session using SymPy diff --git a/src/sage/calculus/tests.py b/src/sage/calculus/tests.py index 32b13c0dd3f..ac76b5e4f70 100644 --- a/src/sage/calculus/tests.py +++ b/src/sage/calculus/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Calculus Tests and Examples diff --git a/src/sage/calculus/transforms/all.py b/src/sage/calculus/transforms/all.py index 6ade15d66c0..379b3b69c37 100644 --- a/src/sage/calculus/transforms/all.py +++ b/src/sage/calculus/transforms/all.py @@ -1,7 +1,5 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import("sage.calculus.transforms.fft", ["FastFourierTransform", "FFT"]) lazy_import("sage.calculus.transforms.dwt", ["WaveletTransform", "DWT"]) -from sage.calculus.transforms.dft import IndexedSequence -del lazy_import +from .dft import IndexedSequence diff --git a/src/sage/calculus/transforms/dft.py b/src/sage/calculus/transforms/dft.py index 3a6d6f18db0..1b165fa6503 100644 --- a/src/sage/calculus/transforms/dft.py +++ b/src/sage/calculus/transforms/dft.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Discrete Fourier Transforms diff --git a/src/sage/calculus/transforms/dwt.pxd b/src/sage/calculus/transforms/dwt.pxd index eaa49e2d9d5..c4087a7f7e0 100644 --- a/src/sage/calculus/transforms/dwt.pxd +++ b/src/sage/calculus/transforms/dwt.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gsl.wavelet cimport * from sage.libs.gsl.array cimport GSLDoubleArray diff --git a/src/sage/calculus/transforms/dwt.pyx b/src/sage/calculus/transforms/dwt.pyx index 15cd94445b1..1330f6ac063 100644 --- a/src/sage/calculus/transforms/dwt.pyx +++ b/src/sage/calculus/transforms/dwt.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Discrete Wavelet Transform diff --git a/src/sage/calculus/transforms/fft.pxd b/src/sage/calculus/transforms/fft.pxd index 67d416159dd..780483318f1 100644 --- a/src/sage/calculus/transforms/fft.pxd +++ b/src/sage/calculus/transforms/fft.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gsl.fft cimport * cdef class FastFourierTransform_base: diff --git a/src/sage/calculus/transforms/fft.pyx b/src/sage/calculus/transforms/fft.pyx index 0afa7432442..363fa65a836 100644 --- a/src/sage/calculus/transforms/fft.pyx +++ b/src/sage/calculus/transforms/fft.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Fast Fourier Transforms Using GSL diff --git a/src/sage/calculus/var.pyx b/src/sage/calculus/var.pyx index 2ebaf1583ca..12958b0970a 100644 --- a/src/sage/calculus/var.pyx +++ b/src/sage/calculus/var.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # cython: old_style_globals=True """ Symbolic variables diff --git a/src/sage/calculus/wester.py b/src/sage/calculus/wester.py index 95b35e0bb0b..e33409a49ac 100644 --- a/src/sage/calculus/wester.py +++ b/src/sage/calculus/wester.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.symbolic r""" Further examples from Wester's paper diff --git a/src/sage/categories/action.pxd b/src/sage/categories/action.pxd index 0cedf7be6b5..5883adebc97 100644 --- a/src/sage/categories/action.pxd +++ b/src/sage/categories/action.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.element cimport Element from sage.categories.morphism cimport Morphism from sage.categories.map cimport Map diff --git a/src/sage/categories/action.pyx b/src/sage/categories/action.pyx index 5379dbda101..27cf3e0b26c 100644 --- a/src/sage/categories/action.pyx +++ b/src/sage/categories/action.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Group, ring, etc. actions on objects diff --git a/src/sage/categories/additive_groups.py b/src/sage/categories/additive_groups.py index cf079c79406..25623d0eeb3 100644 --- a/src/sage/categories/additive_groups.py +++ b/src/sage/categories/additive_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Additive groups """ diff --git a/src/sage/categories/additive_magmas.py b/src/sage/categories/additive_magmas.py index ce01324c6b0..cfd518fa32b 100644 --- a/src/sage/categories/additive_magmas.py +++ b/src/sage/categories/additive_magmas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Additive magmas """ diff --git a/src/sage/categories/additive_monoids.py b/src/sage/categories/additive_monoids.py index 3d76c87113b..c0576cd8616 100644 --- a/src/sage/categories/additive_monoids.py +++ b/src/sage/categories/additive_monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Additive monoids """ diff --git a/src/sage/categories/additive_semigroups.py b/src/sage/categories/additive_semigroups.py index 2df1cb6e997..038221fe5be 100644 --- a/src/sage/categories/additive_semigroups.py +++ b/src/sage/categories/additive_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Additive semigroups """ diff --git a/src/sage/categories/affine_weyl_groups.py b/src/sage/categories/affine_weyl_groups.py index 9a26f8c5590..7ae931201a9 100644 --- a/src/sage/categories/affine_weyl_groups.py +++ b/src/sage/categories/affine_weyl_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Affine Weyl groups """ diff --git a/src/sage/categories/algebra_functor.py b/src/sage/categories/algebra_functor.py index 005e0f3669f..051374fa43c 100644 --- a/src/sage/categories/algebra_functor.py +++ b/src/sage/categories/algebra_functor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # sage.doctest: needs sage.groups r""" Group algebras and beyond: the Algebra functorial construction diff --git a/src/sage/categories/algebra_ideals.py b/src/sage/categories/algebra_ideals.py index c973743adc1..c33fa0ef7b0 100644 --- a/src/sage/categories/algebra_ideals.py +++ b/src/sage/categories/algebra_ideals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Algebra ideals """ diff --git a/src/sage/categories/algebra_modules.py b/src/sage/categories/algebra_modules.py index 8a84fa109d7..e827cc7130d 100644 --- a/src/sage/categories/algebra_modules.py +++ b/src/sage/categories/algebra_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Algebra modules """ diff --git a/src/sage/categories/algebras.py b/src/sage/categories/algebras.py index 7dcf02467ff..e4c54abf7c1 100644 --- a/src/sage/categories/algebras.py +++ b/src/sage/categories/algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Algebras diff --git a/src/sage/categories/algebras_with_basis.py b/src/sage/categories/algebras_with_basis.py index ac7bc6f8040..0d1f72eb17c 100644 --- a/src/sage/categories/algebras_with_basis.py +++ b/src/sage/categories/algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Algebras With Basis """ diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index 0be0369ef76..a344ed2a296 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Sage categories quickref @@ -110,31 +109,31 @@ # * with basis from sage.categories.modules_with_basis import ModulesWithBasis FreeModules = ModulesWithBasis -from sage.categories.hecke_modules import HeckeModules -from sage.categories.algebras_with_basis import AlgebrasWithBasis -from sage.categories.coalgebras_with_basis import CoalgebrasWithBasis -from sage.categories.bialgebras_with_basis import BialgebrasWithBasis +from sage.categories.hecke_modules import HeckeModules +from sage.categories.algebras_with_basis import AlgebrasWithBasis +from sage.categories.coalgebras_with_basis import CoalgebrasWithBasis +from sage.categories.bialgebras_with_basis import BialgebrasWithBasis from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis # finite dimensional * with basis -from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis -from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis -from sage.categories.finite_dimensional_coalgebras_with_basis import FiniteDimensionalCoalgebrasWithBasis -from sage.categories.finite_dimensional_bialgebras_with_basis import FiniteDimensionalBialgebrasWithBasis +from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis +from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis +from sage.categories.finite_dimensional_coalgebras_with_basis import FiniteDimensionalCoalgebrasWithBasis +from sage.categories.finite_dimensional_bialgebras_with_basis import FiniteDimensionalBialgebrasWithBasis from sage.categories.finite_dimensional_hopf_algebras_with_basis import FiniteDimensionalHopfAlgebrasWithBasis # graded * -from sage.categories.graded_modules import GradedModules -from sage.categories.graded_algebras import GradedAlgebras -from sage.categories.graded_coalgebras import GradedCoalgebras -from sage.categories.graded_bialgebras import GradedBialgebras +from sage.categories.graded_modules import GradedModules +from sage.categories.graded_algebras import GradedAlgebras +from sage.categories.graded_coalgebras import GradedCoalgebras +from sage.categories.graded_bialgebras import GradedBialgebras from sage.categories.graded_hopf_algebras import GradedHopfAlgebras # graded * with basis -from sage.categories.graded_modules_with_basis import GradedModulesWithBasis -from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis -from sage.categories.graded_coalgebras_with_basis import GradedCoalgebrasWithBasis -from sage.categories.graded_bialgebras_with_basis import GradedBialgebrasWithBasis +from sage.categories.graded_modules_with_basis import GradedModulesWithBasis +from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis +from sage.categories.graded_coalgebras_with_basis import GradedCoalgebrasWithBasis +from sage.categories.graded_bialgebras_with_basis import GradedBialgebrasWithBasis from sage.categories.graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis # Coxeter groups @@ -156,5 +155,3 @@ # lie conformal algebras lazy_import('sage.categories.lie_conformal_algebras', 'LieConformalAlgebras') -del lazy_import -del install_doc diff --git a/src/sage/categories/all__sagemath_objects.py b/src/sage/categories/all__sagemath_objects.py index 42d003d22e1..d87b4a1d20e 100644 --- a/src/sage/categories/all__sagemath_objects.py +++ b/src/sage/categories/all__sagemath_objects.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # Subset of sage.categories.all that is made available by the sage-objects distribution from sage.misc.lazy_import import lazy_import @@ -18,16 +17,12 @@ from sage.categories.cartesian_product import cartesian_product -from sage.categories.functor import (ForgetfulFunctor, - IdentityFunctor) +from sage.categories.functor import ForgetfulFunctor, IdentityFunctor -from sage.categories.homset import (Hom, hom, - End, end, - Homset, HomsetWithBase) +from sage.categories.homset import Hom, hom, End, end, Homset, HomsetWithBase from sage.categories.morphism import Morphism from sage.categories.realizations import Realizations from sage.categories.sets_with_partial_maps import SetsWithPartialMaps -del lazy_import diff --git a/src/sage/categories/aperiodic_semigroups.py b/src/sage/categories/aperiodic_semigroups.py index b7ecff10622..474930f2525 100644 --- a/src/sage/categories/aperiodic_semigroups.py +++ b/src/sage/categories/aperiodic_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Aperiodic semigroups """ diff --git a/src/sage/categories/associative_algebras.py b/src/sage/categories/associative_algebras.py index f478602d5d4..268c9054e97 100644 --- a/src/sage/categories/associative_algebras.py +++ b/src/sage/categories/associative_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Associative algebras """ diff --git a/src/sage/categories/basic.py b/src/sage/categories/basic.py index cfc385513cb..568c9b7c114 100644 --- a/src/sage/categories/basic.py +++ b/src/sage/categories/basic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" A subset of sage.categories.all with just the basic categories needed for sage startup (i.e. to define ZZ, QQ, ...). diff --git a/src/sage/categories/bialgebras.py b/src/sage/categories/bialgebras.py index 92df3723ad1..b927766568b 100644 --- a/src/sage/categories/bialgebras.py +++ b/src/sage/categories/bialgebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat r""" Bialgebras diff --git a/src/sage/categories/bialgebras_with_basis.py b/src/sage/categories/bialgebras_with_basis.py index ece28d15f06..ced37464419 100644 --- a/src/sage/categories/bialgebras_with_basis.py +++ b/src/sage/categories/bialgebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Bialgebras with basis """ diff --git a/src/sage/categories/bimodules.py b/src/sage/categories/bimodules.py index ec5c6fc21ea..4e92f890cd0 100644 --- a/src/sage/categories/bimodules.py +++ b/src/sage/categories/bimodules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Bimodules """ diff --git a/src/sage/categories/cartesian_product.py b/src/sage/categories/cartesian_product.py index f4d5f0a630f..bfedd135b2e 100644 --- a/src/sage/categories/cartesian_product.py +++ b/src/sage/categories/cartesian_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Cartesian Product Functorial Construction diff --git a/src/sage/categories/category.py b/src/sage/categories/category.py index 18ac6c211f4..84ba7163bd8 100644 --- a/src/sage/categories/category.py +++ b/src/sage/categories/category.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Categories diff --git a/src/sage/categories/category_cy_helper.pxd b/src/sage/categories/category_cy_helper.pxd index 3883df6685e..f50ce4e8226 100644 --- a/src/sage/categories/category_cy_helper.pxd +++ b/src/sage/categories/category_cy_helper.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-objects - cpdef tuple _sort_uniq(categories) cdef class AxiomContainer(dict): pass diff --git a/src/sage/categories/category_cy_helper.pyx b/src/sage/categories/category_cy_helper.pyx index dc5cf578daa..d3859221c13 100644 --- a/src/sage/categories/category_cy_helper.pyx +++ b/src/sage/categories/category_cy_helper.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Fast functions for the category framework diff --git a/src/sage/categories/category_singleton.pxd b/src/sage/categories/category_singleton.pxd index b001228a042..b9b4a703b8d 100644 --- a/src/sage/categories/category_singleton.pxd +++ b/src/sage/categories/category_singleton.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects cdef class Category_contains_method_by_parent_class: cdef type _parent_class_of_category diff --git a/src/sage/categories/category_singleton.pyx b/src/sage/categories/category_singleton.pyx index 446c3f5ee33..543ce0375f7 100644 --- a/src/sage/categories/category_singleton.pyx +++ b/src/sage/categories/category_singleton.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Singleton categories """ diff --git a/src/sage/categories/category_types.py b/src/sage/categories/category_types.py index aba27e4dade..d80f5aa7bac 100644 --- a/src/sage/categories/category_types.py +++ b/src/sage/categories/category_types.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Specific category classes diff --git a/src/sage/categories/category_with_axiom.py b/src/sage/categories/category_with_axiom.py index 30d306d77bb..005e86d7b87 100644 --- a/src/sage/categories/category_with_axiom.py +++ b/src/sage/categories/category_with_axiom.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Axioms diff --git a/src/sage/categories/chain_complexes.py b/src/sage/categories/chain_complexes.py index c2cd0e92c38..9616aa608c4 100644 --- a/src/sage/categories/chain_complexes.py +++ b/src/sage/categories/chain_complexes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Category of chain complexes """ diff --git a/src/sage/categories/classical_crystals.py b/src/sage/categories/classical_crystals.py index 777eb16dddc..fb5d2c7cde8 100644 --- a/src/sage/categories/classical_crystals.py +++ b/src/sage/categories/classical_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.graphs sage.combinat r""" Classical Crystals diff --git a/src/sage/categories/coalgebras.py b/src/sage/categories/coalgebras.py index 2b79d9d3fc6..07b18882d49 100644 --- a/src/sage/categories/coalgebras.py +++ b/src/sage/categories/coalgebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat r""" Coalgebras diff --git a/src/sage/categories/coalgebras_with_basis.py b/src/sage/categories/coalgebras_with_basis.py index 03e6fd2a5cd..1a3ecfe8302 100644 --- a/src/sage/categories/coalgebras_with_basis.py +++ b/src/sage/categories/coalgebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Coalgebras with basis """ diff --git a/src/sage/categories/coercion_methods.pyx b/src/sage/categories/coercion_methods.pyx index 0084b39d5eb..830bd238c66 100644 --- a/src/sage/categories/coercion_methods.pyx +++ b/src/sage/categories/coercion_methods.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Coercion methods for categories diff --git a/src/sage/categories/commutative_additive_groups.py b/src/sage/categories/commutative_additive_groups.py index b4ef4794212..ce1dfc5186a 100644 --- a/src/sage/categories/commutative_additive_groups.py +++ b/src/sage/categories/commutative_additive_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative additive groups """ diff --git a/src/sage/categories/commutative_additive_monoids.py b/src/sage/categories/commutative_additive_monoids.py index 1b38ab845a2..ac0bceaf43b 100644 --- a/src/sage/categories/commutative_additive_monoids.py +++ b/src/sage/categories/commutative_additive_monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative additive monoids """ diff --git a/src/sage/categories/commutative_additive_semigroups.py b/src/sage/categories/commutative_additive_semigroups.py index db28e51221b..93c0f2eab5c 100644 --- a/src/sage/categories/commutative_additive_semigroups.py +++ b/src/sage/categories/commutative_additive_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative additive semigroups """ diff --git a/src/sage/categories/commutative_algebra_ideals.py b/src/sage/categories/commutative_algebra_ideals.py index 3df812635e8..e47e1c4f87e 100644 --- a/src/sage/categories/commutative_algebra_ideals.py +++ b/src/sage/categories/commutative_algebra_ideals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative algebra ideals """ diff --git a/src/sage/categories/commutative_algebras.py b/src/sage/categories/commutative_algebras.py index f7dded587dc..986a45db3e3 100644 --- a/src/sage/categories/commutative_algebras.py +++ b/src/sage/categories/commutative_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative algebras """ diff --git a/src/sage/categories/commutative_ring_ideals.py b/src/sage/categories/commutative_ring_ideals.py index 630070dd526..8659b0c793b 100644 --- a/src/sage/categories/commutative_ring_ideals.py +++ b/src/sage/categories/commutative_ring_ideals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative ring ideals """ diff --git a/src/sage/categories/commutative_rings.py b/src/sage/categories/commutative_rings.py index 9296f27d10a..4e63eb8b594 100644 --- a/src/sage/categories/commutative_rings.py +++ b/src/sage/categories/commutative_rings.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Commutative rings """ diff --git a/src/sage/categories/complete_discrete_valuation.py b/src/sage/categories/complete_discrete_valuation.py index ac3fddcf460..7376d947530 100644 --- a/src/sage/categories/complete_discrete_valuation.py +++ b/src/sage/categories/complete_discrete_valuation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Complete Discrete Valuation Rings (CDVR) and Fields (CDVF) """ diff --git a/src/sage/categories/complex_reflection_groups.py b/src/sage/categories/complex_reflection_groups.py index d94d928216d..d9d30d41e40 100644 --- a/src/sage/categories/complex_reflection_groups.py +++ b/src/sage/categories/complex_reflection_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Complex reflection groups """ diff --git a/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py b/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py index b3ccdbc7195..ca2f1e09235 100644 --- a/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py +++ b/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups r""" Common category for Generalized Coxeter Groups or Complex Reflection Groups diff --git a/src/sage/categories/covariant_functorial_construction.py b/src/sage/categories/covariant_functorial_construction.py index 039b31b736e..c38fe295dbf 100644 --- a/src/sage/categories/covariant_functorial_construction.py +++ b/src/sage/categories/covariant_functorial_construction.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Covariant Functorial Constructions diff --git a/src/sage/categories/coxeter_group_algebras.py b/src/sage/categories/coxeter_group_algebras.py index 97ae4942578..5cececc3fef 100644 --- a/src/sage/categories/coxeter_group_algebras.py +++ b/src/sage/categories/coxeter_group_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.groups r""" Coxeter Group Algebras diff --git a/src/sage/categories/coxeter_groups.py b/src/sage/categories/coxeter_groups.py index d80c9aa0287..7bbb286778d 100644 --- a/src/sage/categories/coxeter_groups.py +++ b/src/sage/categories/coxeter_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Coxeter Groups """ diff --git a/src/sage/categories/crystals.py b/src/sage/categories/crystals.py index 138b77bd3b4..5bf8f46d201 100644 --- a/src/sage/categories/crystals.py +++ b/src/sage/categories/crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.graphs sage.combinat r""" Crystals diff --git a/src/sage/categories/cw_complexes.py b/src/sage/categories/cw_complexes.py index c0c4e178da9..69faafeeb83 100644 --- a/src/sage/categories/cw_complexes.py +++ b/src/sage/categories/cw_complexes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" CW Complexes """ diff --git a/src/sage/categories/discrete_valuation.py b/src/sage/categories/discrete_valuation.py index 830c148c95b..24b15bca488 100644 --- a/src/sage/categories/discrete_valuation.py +++ b/src/sage/categories/discrete_valuation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Discrete Valuation Rings (DVR) and Fields (DVF) """ diff --git a/src/sage/categories/distributive_magmas_and_additive_magmas.py b/src/sage/categories/distributive_magmas_and_additive_magmas.py index 830c6c77c8c..6d1c7511c11 100644 --- a/src/sage/categories/distributive_magmas_and_additive_magmas.py +++ b/src/sage/categories/distributive_magmas_and_additive_magmas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Distributive Magmas and Additive Magmas """ diff --git a/src/sage/categories/division_rings.py b/src/sage/categories/division_rings.py index ff6cee76ed6..cd26f46acae 100644 --- a/src/sage/categories/division_rings.py +++ b/src/sage/categories/division_rings.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Division rings """ diff --git a/src/sage/categories/domains.py b/src/sage/categories/domains.py index 4902bb89897..18e2907b8ef 100644 --- a/src/sage/categories/domains.py +++ b/src/sage/categories/domains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Domains """ diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 56264109214..380318c37ff 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings r""" Drinfeld modules over a base diff --git a/src/sage/categories/dual.py b/src/sage/categories/dual.py index 60503a8e83a..2b21f81cbda 100644 --- a/src/sage/categories/dual.py +++ b/src/sage/categories/dual.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Dual functorial construction diff --git a/src/sage/categories/enumerated_sets.py b/src/sage/categories/enumerated_sets.py index 9a8ff91ef1e..08150e61360 100644 --- a/src/sage/categories/enumerated_sets.py +++ b/src/sage/categories/enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumerated sets """ diff --git a/src/sage/categories/euclidean_domains.py b/src/sage/categories/euclidean_domains.py index 8ba23dcb876..eb02736f6e1 100644 --- a/src/sage/categories/euclidean_domains.py +++ b/src/sage/categories/euclidean_domains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Euclidean domains diff --git a/src/sage/categories/examples/algebras_with_basis.py b/src/sage/categories/examples/algebras_with_basis.py index 1540bb50c6d..e19d74ff3c9 100644 --- a/src/sage/categories/examples/algebras_with_basis.py +++ b/src/sage/categories/examples/algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat r""" Examples of algebras with basis diff --git a/src/sage/categories/examples/all.py b/src/sage/categories/examples/all.py index b230a6a2ad9..e69de29bb2d 100644 --- a/src/sage/categories/examples/all.py +++ b/src/sage/categories/examples/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-categories diff --git a/src/sage/categories/examples/commutative_additive_monoids.py b/src/sage/categories/examples/commutative_additive_monoids.py index c805471fa52..20728722d9f 100644 --- a/src/sage/categories/examples/commutative_additive_monoids.py +++ b/src/sage/categories/examples/commutative_additive_monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of commutative additive monoids """ diff --git a/src/sage/categories/examples/commutative_additive_semigroups.py b/src/sage/categories/examples/commutative_additive_semigroups.py index f30288675fe..0b3cb314e74 100644 --- a/src/sage/categories/examples/commutative_additive_semigroups.py +++ b/src/sage/categories/examples/commutative_additive_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of commutative additive semigroups """ diff --git a/src/sage/categories/examples/coxeter_groups.py b/src/sage/categories/examples/coxeter_groups.py index f2791ac09ca..ac76a708bec 100644 --- a/src/sage/categories/examples/coxeter_groups.py +++ b/src/sage/categories/examples/coxeter_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of Coxeter groups """ diff --git a/src/sage/categories/examples/crystals.py b/src/sage/categories/examples/crystals.py index 4786a4ed6fd..520b97c34d5 100644 --- a/src/sage/categories/examples/crystals.py +++ b/src/sage/categories/examples/crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.graphs r""" Example of a crystal diff --git a/src/sage/categories/examples/cw_complexes.py b/src/sage/categories/examples/cw_complexes.py index 89262cd6b43..0fefb254c20 100644 --- a/src/sage/categories/examples/cw_complexes.py +++ b/src/sage/categories/examples/cw_complexes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of CW complexes """ diff --git a/src/sage/categories/examples/facade_sets.py b/src/sage/categories/examples/facade_sets.py index f088ca106c6..bff442e2c5c 100644 --- a/src/sage/categories/examples/facade_sets.py +++ b/src/sage/categories/examples/facade_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Example of facade set """ diff --git a/src/sage/categories/examples/filtered_algebras_with_basis.py b/src/sage/categories/examples/filtered_algebras_with_basis.py index fd3e6b67968..57d106e4555 100644 --- a/src/sage/categories/examples/filtered_algebras_with_basis.py +++ b/src/sage/categories/examples/filtered_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of filtered algebra with basis """ diff --git a/src/sage/categories/examples/filtered_modules_with_basis.py b/src/sage/categories/examples/filtered_modules_with_basis.py index d62c3d906ff..a76726099bc 100644 --- a/src/sage/categories/examples/filtered_modules_with_basis.py +++ b/src/sage/categories/examples/filtered_modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat r""" Examples of filtered modules with basis diff --git a/src/sage/categories/examples/finite_coxeter_groups.py b/src/sage/categories/examples/finite_coxeter_groups.py index 9abf9304929..84e4c1f95b4 100644 --- a/src/sage/categories/examples/finite_coxeter_groups.py +++ b/src/sage/categories/examples/finite_coxeter_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.groups r""" Examples of finite Coxeter groups diff --git a/src/sage/categories/examples/finite_dimensional_algebras_with_basis.py b/src/sage/categories/examples/finite_dimensional_algebras_with_basis.py index 9fb25719a25..df8957dbaf7 100644 --- a/src/sage/categories/examples/finite_dimensional_algebras_with_basis.py +++ b/src/sage/categories/examples/finite_dimensional_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules r""" Example of a finite dimensional algebra with basis diff --git a/src/sage/categories/examples/finite_dimensional_lie_algebras_with_basis.py b/src/sage/categories/examples/finite_dimensional_lie_algebras_with_basis.py index 7a88557d47a..e8db64d11a9 100644 --- a/src/sage/categories/examples/finite_dimensional_lie_algebras_with_basis.py +++ b/src/sage/categories/examples/finite_dimensional_lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules r""" Examples of a finite dimensional Lie algebra with basis diff --git a/src/sage/categories/examples/finite_enumerated_sets.py b/src/sage/categories/examples/finite_enumerated_sets.py index 264b9bc13ba..6a606f7b9e3 100644 --- a/src/sage/categories/examples/finite_enumerated_sets.py +++ b/src/sage/categories/examples/finite_enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of finite enumerated sets """ diff --git a/src/sage/categories/examples/finite_monoids.py b/src/sage/categories/examples/finite_monoids.py index 20119abac66..0a4c1374893 100644 --- a/src/sage/categories/examples/finite_monoids.py +++ b/src/sage/categories/examples/finite_monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of finite monoids """ diff --git a/src/sage/categories/examples/finite_semigroups.py b/src/sage/categories/examples/finite_semigroups.py index d019e6895e4..13712de76fe 100644 --- a/src/sage/categories/examples/finite_semigroups.py +++ b/src/sage/categories/examples/finite_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of finite semigroups """ diff --git a/src/sage/categories/examples/finite_weyl_groups.py b/src/sage/categories/examples/finite_weyl_groups.py index b3321bdb58b..10fef899c94 100644 --- a/src/sage/categories/examples/finite_weyl_groups.py +++ b/src/sage/categories/examples/finite_weyl_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of finite Weyl groups """ diff --git a/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py b/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py index 28699e17256..2290419adb3 100644 --- a/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py +++ b/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules r""" Examples of graded connected Hopf algebras with basis diff --git a/src/sage/categories/examples/graded_modules_with_basis.py b/src/sage/categories/examples/graded_modules_with_basis.py index 348bc5b9568..8ddfb7eed04 100644 --- a/src/sage/categories/examples/graded_modules_with_basis.py +++ b/src/sage/categories/examples/graded_modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat r""" Examples of graded modules with basis diff --git a/src/sage/categories/examples/graphs.py b/src/sage/categories/examples/graphs.py index f67427d311b..063eeff1427 100644 --- a/src/sage/categories/examples/graphs.py +++ b/src/sage/categories/examples/graphs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of graphs """ diff --git a/src/sage/categories/examples/hopf_algebras_with_basis.py b/src/sage/categories/examples/hopf_algebras_with_basis.py index ea876abcbcf..7f05827c28a 100644 --- a/src/sage/categories/examples/hopf_algebras_with_basis.py +++ b/src/sage/categories/examples/hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups sage.modules r""" Examples of Hopf algebras with basis diff --git a/src/sage/categories/examples/infinite_enumerated_sets.py b/src/sage/categories/examples/infinite_enumerated_sets.py index 8f23d276988..df4151f21c2 100644 --- a/src/sage/categories/examples/infinite_enumerated_sets.py +++ b/src/sage/categories/examples/infinite_enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of infinite enumerated sets """ diff --git a/src/sage/categories/examples/lie_algebras.py b/src/sage/categories/examples/lie_algebras.py index 23deb1c7a7c..135c122efa2 100644 --- a/src/sage/categories/examples/lie_algebras.py +++ b/src/sage/categories/examples/lie_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules r""" Examples of a Lie algebra diff --git a/src/sage/categories/examples/lie_algebras_with_basis.py b/src/sage/categories/examples/lie_algebras_with_basis.py index 8366503691a..ca711e1cdb4 100644 --- a/src/sage/categories/examples/lie_algebras_with_basis.py +++ b/src/sage/categories/examples/lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.modules r""" Examples of a Lie algebra with basis diff --git a/src/sage/categories/examples/magmas.py b/src/sage/categories/examples/magmas.py index 538929c70a0..a4858bc2606 100644 --- a/src/sage/categories/examples/magmas.py +++ b/src/sage/categories/examples/magmas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of magmas """ diff --git a/src/sage/categories/examples/manifolds.py b/src/sage/categories/examples/manifolds.py index ce433618dc2..6a748884eec 100644 --- a/src/sage/categories/examples/manifolds.py +++ b/src/sage/categories/examples/manifolds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of manifolds """ diff --git a/src/sage/categories/examples/monoids.py b/src/sage/categories/examples/monoids.py index fe0646eab6c..1d2b87279d2 100644 --- a/src/sage/categories/examples/monoids.py +++ b/src/sage/categories/examples/monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of monoids """ diff --git a/src/sage/categories/examples/posets.py b/src/sage/categories/examples/posets.py index 6cd523ceb96..20f461860c9 100644 --- a/src/sage/categories/examples/posets.py +++ b/src/sage/categories/examples/posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Examples of posets """ diff --git a/src/sage/categories/examples/semigroups.py b/src/sage/categories/examples/semigroups.py index 7e45dd8434e..797fd1b4b03 100644 --- a/src/sage/categories/examples/semigroups.py +++ b/src/sage/categories/examples/semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of semigroups """ diff --git a/src/sage/categories/examples/semigroups_cython.pyx b/src/sage/categories/examples/semigroups_cython.pyx index 4f7a6990586..b456c2868f8 100644 --- a/src/sage/categories/examples/semigroups_cython.pyx +++ b/src/sage/categories/examples/semigroups_cython.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of semigroups in cython """ diff --git a/src/sage/categories/examples/sets_cat.py b/src/sage/categories/examples/sets_cat.py index 2c91d652726..fbadb9ca405 100644 --- a/src/sage/categories/examples/sets_cat.py +++ b/src/sage/categories/examples/sets_cat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.pari """ Examples of sets diff --git a/src/sage/categories/examples/sets_with_grading.py b/src/sage/categories/examples/sets_with_grading.py index 487c5100578..9968d83942b 100644 --- a/src/sage/categories/examples/sets_with_grading.py +++ b/src/sage/categories/examples/sets_with_grading.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Example of a set with grading """ diff --git a/src/sage/categories/examples/with_realizations.py b/src/sage/categories/examples/with_realizations.py index 2ff92851892..85b4b86daa0 100644 --- a/src/sage/categories/examples/with_realizations.py +++ b/src/sage/categories/examples/with_realizations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.modules r""" Examples of parents endowed with multiple realizations diff --git a/src/sage/categories/facade_sets.py b/src/sage/categories/facade_sets.py index 4719c9b9ec3..3f7fcf98abb 100644 --- a/src/sage/categories/facade_sets.py +++ b/src/sage/categories/facade_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Facade Sets diff --git a/src/sage/categories/fields.py b/src/sage/categories/fields.py index 3c3db094252..7407632a93f 100644 --- a/src/sage/categories/fields.py +++ b/src/sage/categories/fields.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Fields """ diff --git a/src/sage/categories/filtered_algebras.py b/src/sage/categories/filtered_algebras.py index bb16bc0374b..d0db31a98eb 100644 --- a/src/sage/categories/filtered_algebras.py +++ b/src/sage/categories/filtered_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Filtered Algebras """ diff --git a/src/sage/categories/filtered_algebras_with_basis.py b/src/sage/categories/filtered_algebras_with_basis.py index dd8074ab474..1abddc81a18 100644 --- a/src/sage/categories/filtered_algebras_with_basis.py +++ b/src/sage/categories/filtered_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Filtered Algebras With Basis diff --git a/src/sage/categories/filtered_hopf_algebras_with_basis.py b/src/sage/categories/filtered_hopf_algebras_with_basis.py index 5efd48c6f02..dadd10dd70e 100644 --- a/src/sage/categories/filtered_hopf_algebras_with_basis.py +++ b/src/sage/categories/filtered_hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Filtered Hopf algebras with basis """ diff --git a/src/sage/categories/filtered_modules.py b/src/sage/categories/filtered_modules.py index e6ad7e0d918..780ef974956 100644 --- a/src/sage/categories/filtered_modules.py +++ b/src/sage/categories/filtered_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Filtered Modules diff --git a/src/sage/categories/filtered_modules_with_basis.py b/src/sage/categories/filtered_modules_with_basis.py index 4da72b5b762..2705c2c3d55 100644 --- a/src/sage/categories/filtered_modules_with_basis.py +++ b/src/sage/categories/filtered_modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Filtered Modules With Basis diff --git a/src/sage/categories/finite_complex_reflection_groups.py b/src/sage/categories/finite_complex_reflection_groups.py index f77ca9058a7..2fdc9912f89 100644 --- a/src/sage/categories/finite_complex_reflection_groups.py +++ b/src/sage/categories/finite_complex_reflection_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite Complex Reflection Groups """ diff --git a/src/sage/categories/finite_coxeter_groups.py b/src/sage/categories/finite_coxeter_groups.py index ceadffa942a..afc4ca43a40 100644 --- a/src/sage/categories/finite_coxeter_groups.py +++ b/src/sage/categories/finite_coxeter_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.groups r""" Finite Coxeter Groups diff --git a/src/sage/categories/finite_crystals.py b/src/sage/categories/finite_crystals.py index b934c692375..4d5fdda550d 100644 --- a/src/sage/categories/finite_crystals.py +++ b/src/sage/categories/finite_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.graphs r""" Finite Crystals diff --git a/src/sage/categories/finite_dimensional_algebras_with_basis.py b/src/sage/categories/finite_dimensional_algebras_with_basis.py index 58516af5b96..e1df9318ec3 100644 --- a/src/sage/categories/finite_dimensional_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite dimensional algebras with basis diff --git a/src/sage/categories/finite_dimensional_bialgebras_with_basis.py b/src/sage/categories/finite_dimensional_bialgebras_with_basis.py index 54a7479fd0b..02f1005e0de 100644 --- a/src/sage/categories/finite_dimensional_bialgebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_bialgebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite dimensional bialgebras with basis """ diff --git a/src/sage/categories/finite_dimensional_coalgebras_with_basis.py b/src/sage/categories/finite_dimensional_coalgebras_with_basis.py index 69cede64fd1..60b135080da 100644 --- a/src/sage/categories/finite_dimensional_coalgebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_coalgebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite dimensional coalgebras with basis """ diff --git a/src/sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py b/src/sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py index 6eb17b4ad0a..bb0cb5db92d 100644 --- a/src/sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite Dimensional Graded Lie Algebras With Basis diff --git a/src/sage/categories/finite_dimensional_hopf_algebras_with_basis.py b/src/sage/categories/finite_dimensional_hopf_algebras_with_basis.py index f90e1dfd1c7..da3f1365584 100644 --- a/src/sage/categories/finite_dimensional_hopf_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite dimensional Hopf algebras with basis """ diff --git a/src/sage/categories/finite_dimensional_lie_algebras_with_basis.py b/src/sage/categories/finite_dimensional_lie_algebras_with_basis.py index 70268b73041..4c8e00b9fc2 100644 --- a/src/sage/categories/finite_dimensional_lie_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite Dimensional Lie Algebras With Basis diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 7cf24baa57d..ab22cd355d5 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite dimensional modules with basis """ diff --git a/src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py b/src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py index ae3a38d9dda..78d801a5ef4 100644 --- a/src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite Dimensional Nilpotent Lie Algebras With Basis diff --git a/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py b/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py index 2cbcc8aac61..da4b297ddde 100644 --- a/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite dimensional semisimple algebras with basis """ diff --git a/src/sage/categories/finite_enumerated_sets.py b/src/sage/categories/finite_enumerated_sets.py index b3b9ede2deb..38958d8d024 100644 --- a/src/sage/categories/finite_enumerated_sets.py +++ b/src/sage/categories/finite_enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite Enumerated Sets """ diff --git a/src/sage/categories/finite_fields.py b/src/sage/categories/finite_fields.py index 6219c8dc357..d9333c80707 100644 --- a/src/sage/categories/finite_fields.py +++ b/src/sage/categories/finite_fields.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite fields """ diff --git a/src/sage/categories/finite_groups.py b/src/sage/categories/finite_groups.py index a88a56e96cf..70cc029e389 100644 --- a/src/sage/categories/finite_groups.py +++ b/src/sage/categories/finite_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups r""" Finite groups diff --git a/src/sage/categories/finite_lattice_posets.py b/src/sage/categories/finite_lattice_posets.py index 773d8c4914d..96f2385404c 100644 --- a/src/sage/categories/finite_lattice_posets.py +++ b/src/sage/categories/finite_lattice_posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite lattice posets """ diff --git a/src/sage/categories/finite_monoids.py b/src/sage/categories/finite_monoids.py index 9b26acb459c..b446dc925cb 100644 --- a/src/sage/categories/finite_monoids.py +++ b/src/sage/categories/finite_monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite monoids """ diff --git a/src/sage/categories/finite_permutation_groups.py b/src/sage/categories/finite_permutation_groups.py index dcc4bfa66db..a8c008ac170 100644 --- a/src/sage/categories/finite_permutation_groups.py +++ b/src/sage/categories/finite_permutation_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups r""" Finite Permutation Groups diff --git a/src/sage/categories/finite_posets.py b/src/sage/categories/finite_posets.py index c1f9a4e6f76..68317bbb4c3 100644 --- a/src/sage/categories/finite_posets.py +++ b/src/sage/categories/finite_posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.graphs r""" Finite posets diff --git a/src/sage/categories/finite_semigroups.py b/src/sage/categories/finite_semigroups.py index b699e33c9ab..ad384fc2b79 100644 --- a/src/sage/categories/finite_semigroups.py +++ b/src/sage/categories/finite_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite semigroups """ diff --git a/src/sage/categories/finite_sets.py b/src/sage/categories/finite_sets.py index 0f464e2cb9c..494ec2cdc6c 100644 --- a/src/sage/categories/finite_sets.py +++ b/src/sage/categories/finite_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite sets """ diff --git a/src/sage/categories/finite_weyl_groups.py b/src/sage/categories/finite_weyl_groups.py index 3e790d78965..8e0346eb5ab 100644 --- a/src/sage/categories/finite_weyl_groups.py +++ b/src/sage/categories/finite_weyl_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite Weyl Groups """ diff --git a/src/sage/categories/finitely_generated_lambda_bracket_algebras.py b/src/sage/categories/finitely_generated_lambda_bracket_algebras.py index ac1e775b90a..5ff1634ca43 100644 --- a/src/sage/categories/finitely_generated_lambda_bracket_algebras.py +++ b/src/sage/categories/finitely_generated_lambda_bracket_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Finitely Generated Lambda bracket Algebras diff --git a/src/sage/categories/finitely_generated_lie_conformal_algebras.py b/src/sage/categories/finitely_generated_lie_conformal_algebras.py index 11066c7d160..90b18df668f 100644 --- a/src/sage/categories/finitely_generated_lie_conformal_algebras.py +++ b/src/sage/categories/finitely_generated_lie_conformal_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Finitely Generated Lie Conformal Algebras diff --git a/src/sage/categories/finitely_generated_magmas.py b/src/sage/categories/finitely_generated_magmas.py index d89f2477045..fe845e8b92a 100644 --- a/src/sage/categories/finitely_generated_magmas.py +++ b/src/sage/categories/finitely_generated_magmas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finitely generated magmas """ diff --git a/src/sage/categories/finitely_generated_semigroups.py b/src/sage/categories/finitely_generated_semigroups.py index b3e2a46f3a4..369e6375a16 100644 --- a/src/sage/categories/finitely_generated_semigroups.py +++ b/src/sage/categories/finitely_generated_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finitely generated semigroups """ diff --git a/src/sage/categories/function_fields.py b/src/sage/categories/function_fields.py index 02ba3021741..6c949b6197a 100644 --- a/src/sage/categories/function_fields.py +++ b/src/sage/categories/function_fields.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Function fields """ diff --git a/src/sage/categories/functor.pxd b/src/sage/categories/functor.pxd index 76fa0fe1c6e..22eec36f7ad 100644 --- a/src/sage/categories/functor.pxd +++ b/src/sage/categories/functor.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.sage_object cimport SageObject cdef class Functor(SageObject): diff --git a/src/sage/categories/functor.pyx b/src/sage/categories/functor.pyx index 8d6af8b7639..889de1d7e7d 100644 --- a/src/sage/categories/functor.pyx +++ b/src/sage/categories/functor.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Functors diff --git a/src/sage/categories/g_sets.py b/src/sage/categories/g_sets.py index d49f790a9e0..5967fcf7d5f 100644 --- a/src/sage/categories/g_sets.py +++ b/src/sage/categories/g_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" G-Sets """ diff --git a/src/sage/categories/gcd_domains.py b/src/sage/categories/gcd_domains.py index 6ffb6456625..e946db6fa29 100644 --- a/src/sage/categories/gcd_domains.py +++ b/src/sage/categories/gcd_domains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Gcd domains """ diff --git a/src/sage/categories/generalized_coxeter_groups.py b/src/sage/categories/generalized_coxeter_groups.py index 5e0641ed37e..844472ba6be 100644 --- a/src/sage/categories/generalized_coxeter_groups.py +++ b/src/sage/categories/generalized_coxeter_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Generalized Coxeter Groups """ diff --git a/src/sage/categories/graded_algebras.py b/src/sage/categories/graded_algebras.py index dc48ad19d54..190355b59c5 100644 --- a/src/sage/categories/graded_algebras.py +++ b/src/sage/categories/graded_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded Algebras """ diff --git a/src/sage/categories/graded_algebras_with_basis.py b/src/sage/categories/graded_algebras_with_basis.py index 9b44bc9567b..62d4816b208 100644 --- a/src/sage/categories/graded_algebras_with_basis.py +++ b/src/sage/categories/graded_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded algebras with basis """ diff --git a/src/sage/categories/graded_bialgebras.py b/src/sage/categories/graded_bialgebras.py index ceb0c7fe26e..eff325b320e 100644 --- a/src/sage/categories/graded_bialgebras.py +++ b/src/sage/categories/graded_bialgebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded bialgebras """ diff --git a/src/sage/categories/graded_bialgebras_with_basis.py b/src/sage/categories/graded_bialgebras_with_basis.py index f97855196e7..d1727c0f40c 100644 --- a/src/sage/categories/graded_bialgebras_with_basis.py +++ b/src/sage/categories/graded_bialgebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded bialgebras with basis """ diff --git a/src/sage/categories/graded_coalgebras.py b/src/sage/categories/graded_coalgebras.py index 12d07b0f679..1b3a3c1d154 100644 --- a/src/sage/categories/graded_coalgebras.py +++ b/src/sage/categories/graded_coalgebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded Coalgebras """ diff --git a/src/sage/categories/graded_coalgebras_with_basis.py b/src/sage/categories/graded_coalgebras_with_basis.py index bb4a44c676b..9efb1854780 100644 --- a/src/sage/categories/graded_coalgebras_with_basis.py +++ b/src/sage/categories/graded_coalgebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded coalgebras with basis """ diff --git a/src/sage/categories/graded_hopf_algebras.py b/src/sage/categories/graded_hopf_algebras.py index 97daf47ebfc..60d5befd6f5 100644 --- a/src/sage/categories/graded_hopf_algebras.py +++ b/src/sage/categories/graded_hopf_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded Hopf algebras """ diff --git a/src/sage/categories/graded_hopf_algebras_with_basis.py b/src/sage/categories/graded_hopf_algebras_with_basis.py index 3c0458c0e03..60cf4977eae 100644 --- a/src/sage/categories/graded_hopf_algebras_with_basis.py +++ b/src/sage/categories/graded_hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded Hopf algebras with basis """ diff --git a/src/sage/categories/graded_lie_algebras.py b/src/sage/categories/graded_lie_algebras.py index ee8ab5df338..fac1436c428 100644 --- a/src/sage/categories/graded_lie_algebras.py +++ b/src/sage/categories/graded_lie_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded Lie Algebras diff --git a/src/sage/categories/graded_lie_algebras_with_basis.py b/src/sage/categories/graded_lie_algebras_with_basis.py index ddf5d8616a2..8552218e074 100644 --- a/src/sage/categories/graded_lie_algebras_with_basis.py +++ b/src/sage/categories/graded_lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded Lie Algebras With Basis """ diff --git a/src/sage/categories/graded_lie_conformal_algebras.py b/src/sage/categories/graded_lie_conformal_algebras.py index 75924494963..a17c067ae4e 100644 --- a/src/sage/categories/graded_lie_conformal_algebras.py +++ b/src/sage/categories/graded_lie_conformal_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Graded Lie Conformal Algebras diff --git a/src/sage/categories/graded_modules.py b/src/sage/categories/graded_modules.py index b24f210ad31..ff66b885913 100644 --- a/src/sage/categories/graded_modules.py +++ b/src/sage/categories/graded_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded modules """ diff --git a/src/sage/categories/graded_modules_with_basis.py b/src/sage/categories/graded_modules_with_basis.py index 057f1e793f5..adb16235761 100644 --- a/src/sage/categories/graded_modules_with_basis.py +++ b/src/sage/categories/graded_modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Graded modules with basis """ diff --git a/src/sage/categories/graphs.py b/src/sage/categories/graphs.py index 572156be286..7142081516e 100644 --- a/src/sage/categories/graphs.py +++ b/src/sage/categories/graphs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Graphs """ diff --git a/src/sage/categories/group_algebras.py b/src/sage/categories/group_algebras.py index 6329899f2d7..c5cceb53633 100644 --- a/src/sage/categories/group_algebras.py +++ b/src/sage/categories/group_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Group Algebras diff --git a/src/sage/categories/groupoid.py b/src/sage/categories/groupoid.py index 0f67bd47608..95af5df164c 100644 --- a/src/sage/categories/groupoid.py +++ b/src/sage/categories/groupoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups r""" Groupoid diff --git a/src/sage/categories/groups.py b/src/sage/categories/groups.py index 332185e5b7a..54c23ae3176 100644 --- a/src/sage/categories/groups.py +++ b/src/sage/categories/groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Groups """ diff --git a/src/sage/categories/h_trivial_semigroups.py b/src/sage/categories/h_trivial_semigroups.py index 9b1f0ab57b0..5630068d671 100644 --- a/src/sage/categories/h_trivial_semigroups.py +++ b/src/sage/categories/h_trivial_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" H-trivial semigroups """ diff --git a/src/sage/categories/hecke_modules.py b/src/sage/categories/hecke_modules.py index ba767c3b74c..6a575fd17d6 100644 --- a/src/sage/categories/hecke_modules.py +++ b/src/sage/categories/hecke_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Hecke modules """ diff --git a/src/sage/categories/highest_weight_crystals.py b/src/sage/categories/highest_weight_crystals.py index 8a4afe675d1..32cbf77c87a 100644 --- a/src/sage/categories/highest_weight_crystals.py +++ b/src/sage/categories/highest_weight_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.graphs r""" Highest Weight Crystals diff --git a/src/sage/categories/homset.py b/src/sage/categories/homset.py index e20a5faaf99..deb489a9042 100644 --- a/src/sage/categories/homset.py +++ b/src/sage/categories/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Homsets diff --git a/src/sage/categories/homsets.py b/src/sage/categories/homsets.py index bdf8c482cc0..b915dbb12fe 100644 --- a/src/sage/categories/homsets.py +++ b/src/sage/categories/homsets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Homset categories """ diff --git a/src/sage/categories/hopf_algebras.py b/src/sage/categories/hopf_algebras.py index acc85774aff..49091b3de60 100644 --- a/src/sage/categories/hopf_algebras.py +++ b/src/sage/categories/hopf_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Hopf algebras """ diff --git a/src/sage/categories/hopf_algebras_with_basis.py b/src/sage/categories/hopf_algebras_with_basis.py index f4bbb6af51d..d56adc36eb1 100644 --- a/src/sage/categories/hopf_algebras_with_basis.py +++ b/src/sage/categories/hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Hopf algebras with basis """ diff --git a/src/sage/categories/infinite_enumerated_sets.py b/src/sage/categories/infinite_enumerated_sets.py index c5f5df3ffd9..e65bf944b87 100644 --- a/src/sage/categories/infinite_enumerated_sets.py +++ b/src/sage/categories/infinite_enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Infinite Enumerated Sets diff --git a/src/sage/categories/integral_domains.py b/src/sage/categories/integral_domains.py index ae47e5205f6..b6e6f59a196 100644 --- a/src/sage/categories/integral_domains.py +++ b/src/sage/categories/integral_domains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Integral domains """ diff --git a/src/sage/categories/isomorphic_objects.py b/src/sage/categories/isomorphic_objects.py index 658402aea09..f1473997c14 100644 --- a/src/sage/categories/isomorphic_objects.py +++ b/src/sage/categories/isomorphic_objects.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Isomorphic Objects Functorial Construction diff --git a/src/sage/categories/j_trivial_semigroups.py b/src/sage/categories/j_trivial_semigroups.py index c09e1cea144..8ca78c83a1e 100644 --- a/src/sage/categories/j_trivial_semigroups.py +++ b/src/sage/categories/j_trivial_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" J-trivial semigroups """ diff --git a/src/sage/categories/kac_moody_algebras.py b/src/sage/categories/kac_moody_algebras.py index ed2ba241bdf..52f738243b8 100644 --- a/src/sage/categories/kac_moody_algebras.py +++ b/src/sage/categories/kac_moody_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Kac-Moody Algebras diff --git a/src/sage/categories/l_trivial_semigroups.py b/src/sage/categories/l_trivial_semigroups.py index 478003e0e48..ef4a8c41016 100644 --- a/src/sage/categories/l_trivial_semigroups.py +++ b/src/sage/categories/l_trivial_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" L-trivial semigroups """ diff --git a/src/sage/categories/lambda_bracket_algebras.py b/src/sage/categories/lambda_bracket_algebras.py index 9c93d417489..56818bf4d04 100644 --- a/src/sage/categories/lambda_bracket_algebras.py +++ b/src/sage/categories/lambda_bracket_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Lambda Bracket Algebras diff --git a/src/sage/categories/lambda_bracket_algebras_with_basis.py b/src/sage/categories/lambda_bracket_algebras_with_basis.py index c79d1cc8c8a..62fe41f3336 100644 --- a/src/sage/categories/lambda_bracket_algebras_with_basis.py +++ b/src/sage/categories/lambda_bracket_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Lambda Bracket Algebras With Basis diff --git a/src/sage/categories/lattice_posets.py b/src/sage/categories/lattice_posets.py index 29b1738c6ac..f14fa364415 100644 --- a/src/sage/categories/lattice_posets.py +++ b/src/sage/categories/lattice_posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Lattice posets """ diff --git a/src/sage/categories/left_modules.py b/src/sage/categories/left_modules.py index a6394582d4d..51de3497a53 100644 --- a/src/sage/categories/left_modules.py +++ b/src/sage/categories/left_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Left modules """ diff --git a/src/sage/categories/lie_algebras.py b/src/sage/categories/lie_algebras.py index c0b80226c9a..d0958f12d89 100644 --- a/src/sage/categories/lie_algebras.py +++ b/src/sage/categories/lie_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Lie Algebras diff --git a/src/sage/categories/lie_algebras_with_basis.py b/src/sage/categories/lie_algebras_with_basis.py index 7cdf3fd7bca..67570b611b3 100644 --- a/src/sage/categories/lie_algebras_with_basis.py +++ b/src/sage/categories/lie_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Lie Algebras With Basis diff --git a/src/sage/categories/lie_conformal_algebras.py b/src/sage/categories/lie_conformal_algebras.py index 561d9e1e693..d1e77c3c56b 100644 --- a/src/sage/categories/lie_conformal_algebras.py +++ b/src/sage/categories/lie_conformal_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Lie Conformal Algebras diff --git a/src/sage/categories/lie_conformal_algebras_with_basis.py b/src/sage/categories/lie_conformal_algebras_with_basis.py index d0bac7f4087..bedf8934fc4 100644 --- a/src/sage/categories/lie_conformal_algebras_with_basis.py +++ b/src/sage/categories/lie_conformal_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Lie Conformal Algebras With Basis diff --git a/src/sage/categories/lie_groups.py b/src/sage/categories/lie_groups.py index fe64f6f1a97..2d32a158fa3 100644 --- a/src/sage/categories/lie_groups.py +++ b/src/sage/categories/lie_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Lie Groups """ diff --git a/src/sage/categories/loop_crystals.py b/src/sage/categories/loop_crystals.py index 76e4e1adba7..ad5f913cabc 100644 --- a/src/sage/categories/loop_crystals.py +++ b/src/sage/categories/loop_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.graphs sage.combinat r""" Loop Crystals diff --git a/src/sage/categories/magmas.py b/src/sage/categories/magmas.py index 882cb4d1052..247603d3d31 100644 --- a/src/sage/categories/magmas.py +++ b/src/sage/categories/magmas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Magmas """ diff --git a/src/sage/categories/magmas_and_additive_magmas.py b/src/sage/categories/magmas_and_additive_magmas.py index 5b7796ecbfa..784cf625ec6 100644 --- a/src/sage/categories/magmas_and_additive_magmas.py +++ b/src/sage/categories/magmas_and_additive_magmas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Magmas and Additive Magmas """ diff --git a/src/sage/categories/magmatic_algebras.py b/src/sage/categories/magmatic_algebras.py index 049645af1ce..763f5aab764 100644 --- a/src/sage/categories/magmatic_algebras.py +++ b/src/sage/categories/magmatic_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Non-unital non-associative algebras """ diff --git a/src/sage/categories/manifolds.py b/src/sage/categories/manifolds.py index 554e7053f8c..f8dc1da4de0 100644 --- a/src/sage/categories/manifolds.py +++ b/src/sage/categories/manifolds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Manifolds """ diff --git a/src/sage/categories/map.pxd b/src/sage/categories/map.pxd index 6f3b3bb8a91..0467b872353 100644 --- a/src/sage/categories/map.pxd +++ b/src/sage/categories/map.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.parent cimport Parent from sage.structure.element cimport Element diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx index c814bd2d8ff..b41b7538c59 100644 --- a/src/sage/categories/map.pyx +++ b/src/sage/categories/map.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Base class for maps diff --git a/src/sage/categories/matrix_algebras.py b/src/sage/categories/matrix_algebras.py index 57953f5af2e..08b102d7451 100644 --- a/src/sage/categories/matrix_algebras.py +++ b/src/sage/categories/matrix_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Matrix algebras """ diff --git a/src/sage/categories/metric_spaces.py b/src/sage/categories/metric_spaces.py index ecf43e9c361..205e8746363 100644 --- a/src/sage/categories/metric_spaces.py +++ b/src/sage/categories/metric_spaces.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Metric Spaces """ diff --git a/src/sage/categories/modular_abelian_varieties.py b/src/sage/categories/modular_abelian_varieties.py index 4fd64663291..804361a7f99 100644 --- a/src/sage/categories/modular_abelian_varieties.py +++ b/src/sage/categories/modular_abelian_varieties.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Modular abelian varieties """ diff --git a/src/sage/categories/modules.py b/src/sage/categories/modules.py index 0fd23631072..c5b1aa2afb5 100644 --- a/src/sage/categories/modules.py +++ b/src/sage/categories/modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Modules """ diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 2a1fe2dd117..e1fa796ba3b 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Modules With Basis diff --git a/src/sage/categories/monoid_algebras.py b/src/sage/categories/monoid_algebras.py index 70bf7b9f881..a387d7f74f4 100644 --- a/src/sage/categories/monoid_algebras.py +++ b/src/sage/categories/monoid_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Monoid algebras """ diff --git a/src/sage/categories/monoids.py b/src/sage/categories/monoids.py index dad363c876b..7d763bb59b7 100644 --- a/src/sage/categories/monoids.py +++ b/src/sage/categories/monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Monoids """ diff --git a/src/sage/categories/morphism.pxd b/src/sage/categories/morphism.pxd index 88cda6baf93..e5befc8207e 100644 --- a/src/sage/categories/morphism.pxd +++ b/src/sage/categories/morphism.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.element cimport Element from sage.categories.map cimport Map diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx index 24e36f1295c..0e4805ef1b4 100644 --- a/src/sage/categories/morphism.pyx +++ b/src/sage/categories/morphism.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Morphisms diff --git a/src/sage/categories/number_fields.py b/src/sage/categories/number_fields.py index 8c6ed11d4c3..6f9829cd499 100644 --- a/src/sage/categories/number_fields.py +++ b/src/sage/categories/number_fields.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Number fields """ diff --git a/src/sage/categories/objects.py b/src/sage/categories/objects.py index 742be48099f..0b72e0f5d6f 100644 --- a/src/sage/categories/objects.py +++ b/src/sage/categories/objects.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Objects """ diff --git a/src/sage/categories/partially_ordered_monoids.py b/src/sage/categories/partially_ordered_monoids.py index 81c9b58734b..0f41b6c330f 100644 --- a/src/sage/categories/partially_ordered_monoids.py +++ b/src/sage/categories/partially_ordered_monoids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Partially ordered monoids """ diff --git a/src/sage/categories/permutation_groups.py b/src/sage/categories/permutation_groups.py index 59dfaaeaaf8..7e71ad4d857 100644 --- a/src/sage/categories/permutation_groups.py +++ b/src/sage/categories/permutation_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Permutation groups """ diff --git a/src/sage/categories/pointed_sets.py b/src/sage/categories/pointed_sets.py index 3a16a61988d..27376140dbe 100644 --- a/src/sage/categories/pointed_sets.py +++ b/src/sage/categories/pointed_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Pointed sets """ diff --git a/src/sage/categories/polyhedra.py b/src/sage/categories/polyhedra.py index 9b65b40bcd9..256eb99498d 100644 --- a/src/sage/categories/polyhedra.py +++ b/src/sage/categories/polyhedra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Polyhedral subsets of free ZZ, QQ or RR-modules. """ diff --git a/src/sage/categories/poor_man_map.py b/src/sage/categories/poor_man_map.py index b20aa7977c5..6fc55a02104 100644 --- a/src/sage/categories/poor_man_map.py +++ b/src/sage/categories/poor_man_map.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Poor Man's map """ diff --git a/src/sage/categories/posets.py b/src/sage/categories/posets.py index 0d846648e6f..cd08f65ad45 100644 --- a/src/sage/categories/posets.py +++ b/src/sage/categories/posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.graphs, sage.combinat r""" Posets diff --git a/src/sage/categories/primer.py b/src/sage/categories/primer.py index 3e1a5aee832..c7339b712e3 100644 --- a/src/sage/categories/primer.py +++ b/src/sage/categories/primer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Elements, parents, and categories in Sage: a primer diff --git a/src/sage/categories/principal_ideal_domains.py b/src/sage/categories/principal_ideal_domains.py index 4155dc764a5..f020cfb383d 100644 --- a/src/sage/categories/principal_ideal_domains.py +++ b/src/sage/categories/principal_ideal_domains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Principal ideal domains """ diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py index f1e4674a790..e8eee82998d 100644 --- a/src/sage/categories/pushout.py +++ b/src/sage/categories/pushout.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Coercion via construction functors """ diff --git a/src/sage/categories/quantum_group_representations.py b/src/sage/categories/quantum_group_representations.py index 6b79ca4ea08..fc8a4697941 100644 --- a/src/sage/categories/quantum_group_representations.py +++ b/src/sage/categories/quantum_group_representations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Quantum Group Representations diff --git a/src/sage/categories/quotient_fields.py b/src/sage/categories/quotient_fields.py index 9ab5393c976..e33a48d4ceb 100644 --- a/src/sage/categories/quotient_fields.py +++ b/src/sage/categories/quotient_fields.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Quotient fields """ diff --git a/src/sage/categories/quotients.py b/src/sage/categories/quotients.py index 97b6243d7b1..bda06208d80 100644 --- a/src/sage/categories/quotients.py +++ b/src/sage/categories/quotients.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Quotients Functorial Construction diff --git a/src/sage/categories/r_trivial_semigroups.py b/src/sage/categories/r_trivial_semigroups.py index 840970e97c8..a73f28931eb 100644 --- a/src/sage/categories/r_trivial_semigroups.py +++ b/src/sage/categories/r_trivial_semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" R-trivial semigroups """ diff --git a/src/sage/categories/realizations.py b/src/sage/categories/realizations.py index f73652b8357..d22b6f6a80a 100644 --- a/src/sage/categories/realizations.py +++ b/src/sage/categories/realizations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Realizations Covariant Functorial Construction diff --git a/src/sage/categories/regular_crystals.py b/src/sage/categories/regular_crystals.py index 3af41941d42..5a0ac6291b5 100644 --- a/src/sage/categories/regular_crystals.py +++ b/src/sage/categories/regular_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.graphs r""" Regular Crystals diff --git a/src/sage/categories/regular_supercrystals.py b/src/sage/categories/regular_supercrystals.py index f7f6f3fa80e..044f556a1f7 100644 --- a/src/sage/categories/regular_supercrystals.py +++ b/src/sage/categories/regular_supercrystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.graphs r""" Regular Supercrystals diff --git a/src/sage/categories/right_modules.py b/src/sage/categories/right_modules.py index aa6582f2400..47a8081d2a9 100644 --- a/src/sage/categories/right_modules.py +++ b/src/sage/categories/right_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Right modules """ diff --git a/src/sage/categories/ring_ideals.py b/src/sage/categories/ring_ideals.py index 2b28d4c0e2f..fd634f1caef 100644 --- a/src/sage/categories/ring_ideals.py +++ b/src/sage/categories/ring_ideals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ring ideals """ diff --git a/src/sage/categories/rings.py b/src/sage/categories/rings.py index e3e2fba3190..9685fb80dd4 100644 --- a/src/sage/categories/rings.py +++ b/src/sage/categories/rings.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Rings """ diff --git a/src/sage/categories/rngs.py b/src/sage/categories/rngs.py index e1a04c939c8..1841b45d1d5 100644 --- a/src/sage/categories/rngs.py +++ b/src/sage/categories/rngs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Rngs """ diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 5b6d1939a54..cf78a901209 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Schemes """ diff --git a/src/sage/categories/semigroups.py b/src/sage/categories/semigroups.py index fe34b5e9b22..7c894a03112 100644 --- a/src/sage/categories/semigroups.py +++ b/src/sage/categories/semigroups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Semigroups """ diff --git a/src/sage/categories/semirings.py b/src/sage/categories/semirings.py index 624a867608a..62e6f7d918f 100644 --- a/src/sage/categories/semirings.py +++ b/src/sage/categories/semirings.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Semirngs """ diff --git a/src/sage/categories/semisimple_algebras.py b/src/sage/categories/semisimple_algebras.py index 7837a140608..453b854b7e7 100644 --- a/src/sage/categories/semisimple_algebras.py +++ b/src/sage/categories/semisimple_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Semisimple Algebras """ diff --git a/src/sage/categories/sets_cat.py b/src/sage/categories/sets_cat.py index 60b42e527d5..0a523f00903 100644 --- a/src/sage/categories/sets_cat.py +++ b/src/sage/categories/sets_cat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Sets """ diff --git a/src/sage/categories/sets_with_grading.py b/src/sage/categories/sets_with_grading.py index 9f9037e94b5..a29d8c9c59c 100644 --- a/src/sage/categories/sets_with_grading.py +++ b/src/sage/categories/sets_with_grading.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Sets With a Grading """ diff --git a/src/sage/categories/sets_with_partial_maps.py b/src/sage/categories/sets_with_partial_maps.py index 01993c2fb82..4210548b0fd 100644 --- a/src/sage/categories/sets_with_partial_maps.py +++ b/src/sage/categories/sets_with_partial_maps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" SetsWithPartialMaps """ diff --git a/src/sage/categories/shephard_groups.py b/src/sage/categories/shephard_groups.py index 2b68f4d37d8..945274bcd84 100644 --- a/src/sage/categories/shephard_groups.py +++ b/src/sage/categories/shephard_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Shephard Groups """ diff --git a/src/sage/categories/signed_tensor.py b/src/sage/categories/signed_tensor.py index f11c9a9f2bb..c5281b7275a 100644 --- a/src/sage/categories/signed_tensor.py +++ b/src/sage/categories/signed_tensor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Signed Tensor Product Functorial Construction diff --git a/src/sage/categories/simplicial_complexes.py b/src/sage/categories/simplicial_complexes.py index 6cd81a778cb..9750dcab686 100644 --- a/src/sage/categories/simplicial_complexes.py +++ b/src/sage/categories/simplicial_complexes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Simplicial Complexes """ diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index 6d5ac1823a3..7b7bbf827af 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Simplicial Sets """ diff --git a/src/sage/categories/subobjects.py b/src/sage/categories/subobjects.py index 367b599d05a..53ad660d75a 100644 --- a/src/sage/categories/subobjects.py +++ b/src/sage/categories/subobjects.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Subobjects Functorial Construction diff --git a/src/sage/categories/subquotients.py b/src/sage/categories/subquotients.py index d4ced65976d..ede07cadec1 100644 --- a/src/sage/categories/subquotients.py +++ b/src/sage/categories/subquotients.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Subquotient Functorial Construction diff --git a/src/sage/categories/super_algebras.py b/src/sage/categories/super_algebras.py index abb2d404002..329ebebe420 100644 --- a/src/sage/categories/super_algebras.py +++ b/src/sage/categories/super_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Super Algebras """ diff --git a/src/sage/categories/super_algebras_with_basis.py b/src/sage/categories/super_algebras_with_basis.py index 46731a1609f..014fe6e563e 100644 --- a/src/sage/categories/super_algebras_with_basis.py +++ b/src/sage/categories/super_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Super algebras with basis """ diff --git a/src/sage/categories/super_hopf_algebras_with_basis.py b/src/sage/categories/super_hopf_algebras_with_basis.py index f66ada295e7..b3b86d0973d 100644 --- a/src/sage/categories/super_hopf_algebras_with_basis.py +++ b/src/sage/categories/super_hopf_algebras_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Super Hopf algebras with basis """ diff --git a/src/sage/categories/super_lie_conformal_algebras.py b/src/sage/categories/super_lie_conformal_algebras.py index 8e6c0865cfb..9e38c4aa3e1 100644 --- a/src/sage/categories/super_lie_conformal_algebras.py +++ b/src/sage/categories/super_lie_conformal_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Super Lie Conformal Algebras diff --git a/src/sage/categories/super_modules.py b/src/sage/categories/super_modules.py index 9dd6cc0675c..a6d17ea32b0 100644 --- a/src/sage/categories/super_modules.py +++ b/src/sage/categories/super_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Super modules """ diff --git a/src/sage/categories/super_modules_with_basis.py b/src/sage/categories/super_modules_with_basis.py index 3992deb600e..ef4bbc048e8 100644 --- a/src/sage/categories/super_modules_with_basis.py +++ b/src/sage/categories/super_modules_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Super modules with basis """ diff --git a/src/sage/categories/supercommutative_algebras.py b/src/sage/categories/supercommutative_algebras.py index 2b35e4de93c..1928c7057dc 100644 --- a/src/sage/categories/supercommutative_algebras.py +++ b/src/sage/categories/supercommutative_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Supercommutative Algebras """ diff --git a/src/sage/categories/supercrystals.py b/src/sage/categories/supercrystals.py index 0f3fc9702e4..239aa8c0a86 100644 --- a/src/sage/categories/supercrystals.py +++ b/src/sage/categories/supercrystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.graphs sage.combinat r""" Supercrystals diff --git a/src/sage/categories/tensor.py b/src/sage/categories/tensor.py index 11e470e378f..01208e6217e 100644 --- a/src/sage/categories/tensor.py +++ b/src/sage/categories/tensor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Tensor Product Functorial Construction diff --git a/src/sage/categories/topological_spaces.py b/src/sage/categories/topological_spaces.py index 5a4d0affb51..7ab806e6a2b 100644 --- a/src/sage/categories/topological_spaces.py +++ b/src/sage/categories/topological_spaces.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Topological Spaces """ diff --git a/src/sage/categories/triangular_kac_moody_algebras.py b/src/sage/categories/triangular_kac_moody_algebras.py index 0a7988282d3..f5730707d36 100644 --- a/src/sage/categories/triangular_kac_moody_algebras.py +++ b/src/sage/categories/triangular_kac_moody_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Kac-Moody Algebras With Triangular Decomposition Basis diff --git a/src/sage/categories/tutorial.py b/src/sage/categories/tutorial.py index 2c4ae1b2447..fc2e2abe6f9 100644 --- a/src/sage/categories/tutorial.py +++ b/src/sage/categories/tutorial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Implementing a new parent: a tutorial diff --git a/src/sage/categories/unique_factorization_domains.py b/src/sage/categories/unique_factorization_domains.py index a4a66111f4b..3f5467b0a16 100644 --- a/src/sage/categories/unique_factorization_domains.py +++ b/src/sage/categories/unique_factorization_domains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Unique factorization domains """ diff --git a/src/sage/categories/unital_algebras.py b/src/sage/categories/unital_algebras.py index 2b90b404f26..0f4fa24600d 100644 --- a/src/sage/categories/unital_algebras.py +++ b/src/sage/categories/unital_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Unital algebras """ diff --git a/src/sage/categories/vector_bundles.py b/src/sage/categories/vector_bundles.py index 7f190a3ed81..3f3bed1f2d0 100644 --- a/src/sage/categories/vector_bundles.py +++ b/src/sage/categories/vector_bundles.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.symbolic r""" Vector Bundles diff --git a/src/sage/categories/vector_spaces.py b/src/sage/categories/vector_spaces.py index 1cae70f1d45..570fe58254b 100644 --- a/src/sage/categories/vector_spaces.py +++ b/src/sage/categories/vector_spaces.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Vector Spaces """ diff --git a/src/sage/categories/weyl_groups.py b/src/sage/categories/weyl_groups.py index 9779d6b4a93..9d5d6f28daa 100644 --- a/src/sage/categories/weyl_groups.py +++ b/src/sage/categories/weyl_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.combinat sage.groups r""" Weyl Groups diff --git a/src/sage/categories/with_realizations.py b/src/sage/categories/with_realizations.py index b747bdbedeb..eaabcdaf04a 100644 --- a/src/sage/categories/with_realizations.py +++ b/src/sage/categories/with_realizations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ With Realizations Covariant Functorial Construction diff --git a/src/sage/coding/abstract_code.py b/src/sage/coding/abstract_code.py index e1d8a8922da..0b2031a74f2 100644 --- a/src/sage/coding/abstract_code.py +++ b/src/sage/coding/abstract_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Codes diff --git a/src/sage/coding/ag_code.py b/src/sage/coding/ag_code.py index 32832f0550d..0f189bb69a0 100644 --- a/src/sage/coding/ag_code.py +++ b/src/sage/coding/ag_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.rings.finite_rings sage.schemes """ AG codes diff --git a/src/sage/coding/ag_code_decoders.pyx b/src/sage/coding/ag_code_decoders.pyx index 555f42c90f1..9ce2aa2f8ce 100644 --- a/src/sage/coding/ag_code_decoders.pyx +++ b/src/sage/coding/ag_code_decoders.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.rings.finite_rings sage.schemes r""" Decoders for AG codes diff --git a/src/sage/coding/all.py b/src/sage/coding/all.py index ea26cb7ecaf..e5ff88308b7 100644 --- a/src/sage/coding/all.py +++ b/src/sage/coding/all.py @@ -1,15 +1,12 @@ -# sage_setup: distribution = sagemath-modules -from sage.misc.lazy_import import lazy_import +from sage.misc.lazy_import import lazy_import as _lazy_import -lazy_import("sage.coding.code_constructions", ["permutation_action", - "walsh_matrix"]) +_lazy_import("sage.coding.code_constructions", ["permutation_action", + "walsh_matrix"]) -lazy_import("sage.coding.linear_code", "LinearCode") +_lazy_import("sage.coding.linear_code", "LinearCode") # Functions removed from the global namespace -lazy_import('sage.coding', 'codes_catalog', 'codes') -lazy_import('sage.coding', 'channels_catalog', 'channels') - -del lazy_import +_lazy_import('sage.coding', 'codes_catalog', 'codes') +_lazy_import('sage.coding', 'channels_catalog', 'channels') diff --git a/src/sage/coding/all__sagemath_gap.py b/src/sage/coding/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/coding/bch_code.py b/src/sage/coding/bch_code.py index 2532f189e92..40fa088354a 100644 --- a/src/sage/coding/bch_code.py +++ b/src/sage/coding/bch_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" BCH code diff --git a/src/sage/coding/binary_code.pxd b/src/sage/coding/binary_code.pxd index 1a1f0f95220..38be220c731 100644 --- a/src/sage/coding/binary_code.pxd +++ b/src/sage/coding/binary_code.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cdef int *hamming_weights() noexcept ctypedef unsigned int codeword diff --git a/src/sage/coding/binary_code.pyx b/src/sage/coding/binary_code.pyx index ace250d3e2c..81065a7dbd3 100644 --- a/src/sage/coding/binary_code.pyx +++ b/src/sage/coding/binary_code.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Optimized low-level binary code representation diff --git a/src/sage/coding/bounds_catalog.py b/src/sage/coding/bounds_catalog.py index ef354485820..aa4c2dd9996 100644 --- a/src/sage/coding/bounds_catalog.py +++ b/src/sage/coding/bounds_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Index of bounds on the parameters of codes diff --git a/src/sage/coding/channel.py b/src/sage/coding/channel.py index 0a8be025e2d..353c540575c 100644 --- a/src/sage/coding/channel.py +++ b/src/sage/coding/channel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Channels diff --git a/src/sage/coding/channels_catalog.py b/src/sage/coding/channels_catalog.py index 464c06c1906..b121fe847d8 100644 --- a/src/sage/coding/channels_catalog.py +++ b/src/sage/coding/channels_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Index of channels diff --git a/src/sage/coding/code_bounds.py b/src/sage/coding/code_bounds.py index 3c6b5234fcd..7b80eec172a 100644 --- a/src/sage/coding/code_bounds.py +++ b/src/sage/coding/code_bounds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Bounds for parameters of codes diff --git a/src/sage/coding/code_constructions.py b/src/sage/coding/code_constructions.py index 0c1fa8eceff..6870c28ec87 100644 --- a/src/sage/coding/code_constructions.py +++ b/src/sage/coding/code_constructions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Linear code constructors that do not preserve the structural information diff --git a/src/sage/coding/codecan/all.py b/src/sage/coding/codecan/all.py index dd59a6da735..e69de29bb2d 100644 --- a/src/sage/coding/codecan/all.py +++ b/src/sage/coding/codecan/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-gap diff --git a/src/sage/coding/codecan/all__sagemath_gap.py b/src/sage/coding/codecan/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/coding/codecan/autgroup_can_label.pyx b/src/sage/coding/codecan/autgroup_can_label.pyx index 21a6b4dfaa5..f656771e179 100644 --- a/src/sage/coding/codecan/autgroup_can_label.pyx +++ b/src/sage/coding/codecan/autgroup_can_label.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.libs.pari r""" Canonical forms and automorphisms for linear codes over finite fields diff --git a/src/sage/coding/codecan/codecan.pxd b/src/sage/coding/codecan/codecan.pxd index fc6d8e0844b..279688d2333 100644 --- a/src/sage/coding/codecan/codecan.pxd +++ b/src/sage/coding/codecan/codecan.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.groups.perm_gps.permgroup_element cimport PermutationGroupElement from sage.groups.semimonomial_transformations.semimonomial_transformation cimport SemimonomialTransformation from sage.modules.free_module_element cimport FreeModuleElement diff --git a/src/sage/coding/codecan/codecan.pyx b/src/sage/coding/codecan/codecan.pyx index f110fb8c7d6..89a04d61433 100644 --- a/src/sage/coding/codecan/codecan.pyx +++ b/src/sage/coding/codecan/codecan.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Canonical forms and automorphism group computation for linear codes over finite fields diff --git a/src/sage/coding/codes_catalog.py b/src/sage/coding/codes_catalog.py index b8b855ef5d6..96021d5fdd3 100644 --- a/src/sage/coding/codes_catalog.py +++ b/src/sage/coding/codes_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Index of code constructions diff --git a/src/sage/coding/cyclic_code.py b/src/sage/coding/cyclic_code.py index fb0905c0f9b..8cab59c2504 100644 --- a/src/sage/coding/cyclic_code.py +++ b/src/sage/coding/cyclic_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Cyclic code diff --git a/src/sage/coding/databases.py b/src/sage/coding/databases.py index 3e0b19e7485..989d67e89d8 100644 --- a/src/sage/coding/databases.py +++ b/src/sage/coding/databases.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Access functions to online databases for coding theory diff --git a/src/sage/coding/decoder.py b/src/sage/coding/decoder.py index 865effc82a4..503c31a3b39 100644 --- a/src/sage/coding/decoder.py +++ b/src/sage/coding/decoder.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Decoders diff --git a/src/sage/coding/decoders_catalog.py b/src/sage/coding/decoders_catalog.py index 0db103c8b09..a9f2417880e 100644 --- a/src/sage/coding/decoders_catalog.py +++ b/src/sage/coding/decoders_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Index of decoders diff --git a/src/sage/coding/delsarte_bounds.py b/src/sage/coding/delsarte_bounds.py index 0af010a4242..0f8fa305a08 100644 --- a/src/sage/coding/delsarte_bounds.py +++ b/src/sage/coding/delsarte_bounds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Delsarte (or linear programming) bounds diff --git a/src/sage/coding/encoder.py b/src/sage/coding/encoder.py index 61179556be5..f603f337008 100644 --- a/src/sage/coding/encoder.py +++ b/src/sage/coding/encoder.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Encoders diff --git a/src/sage/coding/encoders_catalog.py b/src/sage/coding/encoders_catalog.py index a22a897c8da..e6ac68267fd 100644 --- a/src/sage/coding/encoders_catalog.py +++ b/src/sage/coding/encoders_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Index of encoders diff --git a/src/sage/coding/extended_code.py b/src/sage/coding/extended_code.py index 0082156c89f..c27acc58066 100644 --- a/src/sage/coding/extended_code.py +++ b/src/sage/coding/extended_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Extended code diff --git a/src/sage/coding/gabidulin_code.py b/src/sage/coding/gabidulin_code.py index 513cad4a82a..0ba1d13ec41 100644 --- a/src/sage/coding/gabidulin_code.py +++ b/src/sage/coding/gabidulin_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Gabidulin Code diff --git a/src/sage/coding/golay_code.py b/src/sage/coding/golay_code.py index 69ef064b766..e698605825e 100644 --- a/src/sage/coding/golay_code.py +++ b/src/sage/coding/golay_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Golay code diff --git a/src/sage/coding/goppa_code.py b/src/sage/coding/goppa_code.py index 6de6742ad11..a642fb86049 100644 --- a/src/sage/coding/goppa_code.py +++ b/src/sage/coding/goppa_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Goppa code diff --git a/src/sage/coding/grs_code.py b/src/sage/coding/grs_code.py index 8b46bde5c34..7a39d548c44 100644 --- a/src/sage/coding/grs_code.py +++ b/src/sage/coding/grs_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Reed-Solomon codes and Generalized Reed-Solomon codes diff --git a/src/sage/coding/guava.py b/src/sage/coding/guava.py index 6916d5ae290..92e2dc80451 100644 --- a/src/sage/coding/guava.py +++ b/src/sage/coding/guava.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.libs.gap sage.modules sage.rings.finite_rings r""" Constructions of generator matrices using the GUAVA package for GAP diff --git a/src/sage/coding/guruswami_sudan/all.py b/src/sage/coding/guruswami_sudan/all.py index 6f6ab52d0f2..e69de29bb2d 100644 --- a/src/sage/coding/guruswami_sudan/all.py +++ b/src/sage/coding/guruswami_sudan/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-modules diff --git a/src/sage/coding/guruswami_sudan/gs_decoder.py b/src/sage/coding/guruswami_sudan/gs_decoder.py index 48fa955258c..d992a881c04 100644 --- a/src/sage/coding/guruswami_sudan/gs_decoder.py +++ b/src/sage/coding/guruswami_sudan/gs_decoder.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" Guruswami-Sudan decoder for (Generalized) Reed-Solomon codes diff --git a/src/sage/coding/guruswami_sudan/interpolation.py b/src/sage/coding/guruswami_sudan/interpolation.py index b5723a43eeb..62ed9f3a8f1 100644 --- a/src/sage/coding/guruswami_sudan/interpolation.py +++ b/src/sage/coding/guruswami_sudan/interpolation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings """ Interpolation algorithms for the Guruswami-Sudan decoder diff --git a/src/sage/coding/guruswami_sudan/utils.py b/src/sage/coding/guruswami_sudan/utils.py index 23b0ed0112c..d899bd0e12e 100644 --- a/src/sage/coding/guruswami_sudan/utils.py +++ b/src/sage/coding/guruswami_sudan/utils.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Guruswami-Sudan utility methods diff --git a/src/sage/coding/hamming_code.py b/src/sage/coding/hamming_code.py index a15a0c1cd63..5209a0c3754 100644 --- a/src/sage/coding/hamming_code.py +++ b/src/sage/coding/hamming_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Hamming codes diff --git a/src/sage/coding/information_set_decoder.py b/src/sage/coding/information_set_decoder.py index 013fc579fd4..dad1f2b06f3 100644 --- a/src/sage/coding/information_set_decoder.py +++ b/src/sage/coding/information_set_decoder.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Information-set decoding for linear codes diff --git a/src/sage/coding/kasami_codes.pyx b/src/sage/coding/kasami_codes.pyx index ffc137a8fb1..4c35ed34e33 100644 --- a/src/sage/coding/kasami_codes.pyx +++ b/src/sage/coding/kasami_codes.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Kasami code diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py index 7cb4bd974b8..1a0f037ddad 100644 --- a/src/sage/coding/linear_code.py +++ b/src/sage/coding/linear_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Generic structures for linear codes over the Hamming metric diff --git a/src/sage/coding/linear_code_no_metric.py b/src/sage/coding/linear_code_no_metric.py index 5ef951d5cd8..95963d8a2a1 100644 --- a/src/sage/coding/linear_code_no_metric.py +++ b/src/sage/coding/linear_code_no_metric.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Generic structures for linear codes of any metric diff --git a/src/sage/coding/linear_rank_metric.py b/src/sage/coding/linear_rank_metric.py index c65d79b03e4..6a7cd14cb62 100644 --- a/src/sage/coding/linear_rank_metric.py +++ b/src/sage/coding/linear_rank_metric.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Generic structures for linear codes over the rank metric diff --git a/src/sage/coding/parity_check_code.py b/src/sage/coding/parity_check_code.py index 6ba44d2d4a7..0adafbbba57 100644 --- a/src/sage/coding/parity_check_code.py +++ b/src/sage/coding/parity_check_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Parity-check code diff --git a/src/sage/coding/punctured_code.py b/src/sage/coding/punctured_code.py index 06b6408b65d..3caab922b1b 100644 --- a/src/sage/coding/punctured_code.py +++ b/src/sage/coding/punctured_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Punctured code diff --git a/src/sage/coding/reed_muller_code.py b/src/sage/coding/reed_muller_code.py index 0dd83061609..1d55ba6fa38 100644 --- a/src/sage/coding/reed_muller_code.py +++ b/src/sage/coding/reed_muller_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Reed-Muller code diff --git a/src/sage/coding/self_dual_codes.py b/src/sage/coding/self_dual_codes.py index 14f2989d9bd..d60d161d28d 100644 --- a/src/sage/coding/self_dual_codes.py +++ b/src/sage/coding/self_dual_codes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.groups sage.modules r""" Enumerating binary self-dual codes diff --git a/src/sage/coding/source_coding/all.py b/src/sage/coding/source_coding/all.py index 756fb6c6df0..dc95b1fb9f3 100644 --- a/src/sage/coding/source_coding/all.py +++ b/src/sage/coding/source_coding/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-modules - -from sage.coding.source_coding.huffman import Huffman +from .huffman import Huffman diff --git a/src/sage/coding/source_coding/huffman.py b/src/sage/coding/source_coding/huffman.py index f8f2f4367c8..1d41f84d77f 100644 --- a/src/sage/coding/source_coding/huffman.py +++ b/src/sage/coding/source_coding/huffman.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Huffman encoding diff --git a/src/sage/coding/subfield_subcode.py b/src/sage/coding/subfield_subcode.py index f74356a4939..c876ef73e63 100644 --- a/src/sage/coding/subfield_subcode.py +++ b/src/sage/coding/subfield_subcode.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Subfield subcode diff --git a/src/sage/coding/two_weight_db.py b/src/sage/coding/two_weight_db.py index e42edbf39f7..1ad3d584310 100644 --- a/src/sage/coding/two_weight_db.py +++ b/src/sage/coding/two_weight_db.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings r""" Database of two-weight codes diff --git a/src/sage/combinat/abstract_tree.py b/src/sage/combinat/abstract_tree.py index aa213eee58e..126185b4eb4 100644 --- a/src/sage/combinat/abstract_tree.py +++ b/src/sage/combinat/abstract_tree.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Abstract Recursive Trees diff --git a/src/sage/combinat/affine_permutation.py b/src/sage/combinat/affine_permutation.py index e6cd7b42bf2..193d1f1c966 100644 --- a/src/sage/combinat/affine_permutation.py +++ b/src/sage/combinat/affine_permutation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups r""" Affine Permutations diff --git a/src/sage/combinat/algebraic_combinatorics.py b/src/sage/combinat/algebraic_combinatorics.py index 16cbd1de52a..3dd16bf7799 100644 --- a/src/sage/combinat/algebraic_combinatorics.py +++ b/src/sage/combinat/algebraic_combinatorics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Algebraic combinatorics diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index 2b7d906d02f..d1f391013e2 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Combinatorics @@ -51,15 +50,256 @@ install_doc(__package__, __doc__) # install modules quickref and tutorial to the containing package -from sage.combinat import quickref, tutorial +from . import quickref, tutorial install_dict(__package__, {'quickref': quickref, 'tutorial': tutorial}) del quickref, tutorial from sage.misc.lazy_import import lazy_import -from sage.combinat.all__sagemath_combinat import * -from sage.combinat.all__sagemath_modules import * -from sage.combinat.all__sagemath_graphs import * -del lazy_import -del install_dict -del install_doc +from .combinat import (CombinatorialClass, CombinatorialObject, + MapCombinatorialClass, + bell_number, bell_polynomial, bernoulli_polynomial, + catalan_number, euler_number, + fibonacci, fibonacci_sequence, fibonacci_xrange, + lucas_number1, lucas_number2, + number_of_tuples, number_of_unordered_tuples, + polygonal_number, stirling_number1, stirling_number2, + tuples, unordered_tuples) + +lazy_import('sage.combinat.combinat', + ('InfiniteAbstractCombinatorialClass', 'UnionCombinatorialClass', + 'FilteredCombinatorialClass'), + deprecation=(31545, 'this class is deprecated, do not use')) + + +from .expnums import expnums + +from sage.combinat.chas.all import * +from sage.combinat.crystals.all import * +from .rigged_configurations.all import * + +from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover + +# block designs, etc +from sage.combinat.designs.all import * + +# Free modules and friends +from .free_module import CombinatorialFreeModule +from .debruijn_sequence import DeBruijnSequences + +from .schubert_polynomial import SchubertPolynomialRing +lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') +from .symmetric_group_algebra import SymmetricGroupAlgebra, HeckeAlgebraSymmetricGroupT +from .symmetric_group_representations import SymmetricGroupRepresentation, SymmetricGroupRepresentations +from .yang_baxter_graph import YangBaxterGraph + +# Permutations +from .permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition +from .affine_permutation import AffinePermutationGroup +lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', + 'SignedPermutation', + 'SignedPermutations']) +from .derangements import Derangements +lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) + +# RSK +from .rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules + +# HillmanGrassl +lazy_import("sage.combinat.hillman_grassl", ["WeakReversePlanePartition", "WeakReversePlanePartitions"]) + +# PerfectMatchings +from .perfect_matching import PerfectMatching, PerfectMatchings + +# Integer lists +from .integer_lists import IntegerListsLex + +# Compositions +from .composition import Composition, Compositions +from .composition_signed import SignedCompositions + +# Partitions +from .partition import (Partition, Partitions, PartitionsInBox, + OrderedPartitions, PartitionsGreatestLE, + PartitionsGreatestEQ, number_of_partitions) + +lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) +lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) +lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) + +# Partition algebra +from .partition_algebra import SetPartitionsAk, SetPartitionsPk, SetPartitionsTk, SetPartitionsIk, SetPartitionsBk, SetPartitionsSk, SetPartitionsRk, SetPartitionsPRk + +# Raising operators +lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') + +# Diagram algebra +from .diagram_algebras import PartitionAlgebra, BrauerAlgebra, TemperleyLiebAlgebra, PlanarAlgebra, PropagatingIdeal + +# Descent algebra +lazy_import('sage.combinat.descent_algebra', 'DescentAlgebra') + +# Vector Partitions +lazy_import('sage.combinat.vector_partition', + ['VectorPartition', 'VectorPartitions']) + +# Similarity class types +from .similarity_class_type import PrimarySimilarityClassType, PrimarySimilarityClassTypes, SimilarityClassType, SimilarityClassTypes + +# Cores +from .core import Core, Cores + +# Tableaux +lazy_import('sage.combinat.tableau', + ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", + "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) +from .skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux +from .ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux +from .ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux +from .composition_tableau import CompositionTableau, CompositionTableaux + +lazy_import('sage.combinat.tableau_tuple', + ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', + 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) +from .k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux +lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', + 'LittlewoodRichardsonTableaux']) +lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', + 'ShiftedPrimedTableau']) + +# SuperTableaux +lazy_import('sage.combinat.super_tableau', + ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) + +# Words +from .words.all import * + +lazy_import('sage.combinat.subword', 'Subwords') + +from .graph_path import GraphPaths + +# Tuples +from .tuple import Tuples, UnorderedTuples + +# Alternating sign matrices +lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', + 'AlternatingSignMatrices', + 'MonotoneTriangles', + 'ContreTableaux', + 'TruncatedStaircases')) + +# Decorated Permutations +lazy_import('sage.combinat.decorated_permutation', ('DecoratedPermutation', + 'DecoratedPermutations')) + +# Plane Partitions +lazy_import('sage.combinat.plane_partition', ('PlanePartition', + 'PlanePartitions')) + +# Parking Functions +lazy_import('sage.combinat.non_decreasing_parking_function', + ['NonDecreasingParkingFunctions', 'NonDecreasingParkingFunction']) +lazy_import('sage.combinat.parking_functions', + ['ParkingFunctions', 'ParkingFunction']) + +# Trees and Tamari interval posets +from .ordered_tree import (OrderedTree, OrderedTrees, + LabelledOrderedTree, LabelledOrderedTrees) +from .binary_tree import (BinaryTree, BinaryTrees, + LabelledBinaryTree, LabelledBinaryTrees) +lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets']) +lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', + 'LabelledRootedTree', 'LabelledRootedTrees')) + +from .combination import Combinations + +from .set_partition import SetPartition, SetPartitions +from .set_partition_ordered import OrderedSetPartition, OrderedSetPartitions +lazy_import('sage.combinat.multiset_partition_into_sets_ordered', + ['OrderedMultisetPartitionIntoSets', + 'OrderedMultisetPartitionsIntoSets']) +from .subset import Subsets, subsets, powerset, uniq +from .necklace import Necklaces +lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) +lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) +from .sloane_functions import sloane +lazy_import('sage.combinat.superpartition', ('SuperPartition', + 'SuperPartitions')) + +lazy_import('sage.combinat.parallelogram_polyomino', + ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) + +from .root_system.all import * +from .sf.all import * +from .ncsf_qsym.all import * +from .ncsym.all import * +lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') +from .matrices.all import * +# Posets +from .posets.all import * + +# Cluster Algebras and Quivers +from .cluster_algebra_quiver.all import * + +from . import ranker + +from .integer_vector import IntegerVectors +from .integer_vector_weighted import WeightedIntegerVectors +from .integer_vectors_mod_permgroup import IntegerVectorsModPermutationGroup + +lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials']) + +from .species.all import * + +lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') + +lazy_import('sage.combinat.degree_sequences', 'DegreeSequences') + +lazy_import('sage.combinat.cyclic_sieving_phenomenon', + ['CyclicSievingPolynomial', 'CyclicSievingCheck']) + +lazy_import('sage.combinat.sidon_sets', 'sidon_sets') + +# Puzzles +lazy_import('sage.combinat.knutson_tao_puzzles', 'KnutsonTaoPuzzleSolver') + +# Gelfand-Tsetlin patterns +lazy_import('sage.combinat.gelfand_tsetlin_patterns', + ['GelfandTsetlinPattern', 'GelfandTsetlinPatterns']) + +# Finite State Machines (Automaton, Transducer) +lazy_import('sage.combinat.finite_state_machine', + ['Automaton', 'Transducer', 'FiniteStateMachine']) +lazy_import('sage.combinat.finite_state_machine_generators', + ['automata', 'transducers']) + +# Sequences +lazy_import('sage.combinat.binary_recurrence_sequences', + 'BinaryRecurrenceSequence') +lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') +lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') + +# Six Vertex Model +lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') + +# sine-Gordon Y-systems +lazy_import('sage.combinat.sine_gordon', 'SineGordonYsystem') + +# Fully Packed Loop +lazy_import('sage.combinat.fully_packed_loop', ['FullyPackedLoop', 'FullyPackedLoops']) + +# Subword complex and cluster complex +lazy_import('sage.combinat.subword_complex', 'SubwordComplex') +lazy_import("sage.combinat.cluster_complex", "ClusterComplex") + +# Constellations +lazy_import('sage.combinat.constellation', ['Constellation', 'Constellations']) + +# Growth diagrams +lazy_import('sage.combinat.growth', 'GrowthDiagram') + +# Path Tableaux +lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') + +# Bijectionist +lazy_import('sage.combinat.bijectionist', 'Bijectionist') diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py deleted file mode 100644 index 854cf866f40..00000000000 --- a/src/sage/combinat/all__sagemath_categories.py +++ /dev/null @@ -1,33 +0,0 @@ -from sage.combinat.matrices.all__sagemath_categories import * - -from sage.misc.lazy_import import lazy_import - -# Integer lists -from sage.combinat.integer_lists import IntegerListsLex -from sage.combinat.integer_vector import IntegerVectors - -from sage.combinat.combinat import (CombinatorialClass, CombinatorialObject, - MapCombinatorialClass, - bell_number, bell_polynomial, bernoulli_polynomial, - catalan_number, euler_number, - fibonacci, fibonacci_sequence, fibonacci_xrange, - lucas_number1, lucas_number2, - number_of_tuples, number_of_unordered_tuples, - polygonal_number, stirling_number1, stirling_number2, - tuples, unordered_tuples) - -lazy_import('sage.combinat.combinat', - ('InfiniteAbstractCombinatorialClass', 'UnionCombinatorialClass', - 'FilteredCombinatorialClass'), - deprecation=(31545, 'this class is deprecated, do not use')) - -from sage.combinat.combination import Combinations -from sage.combinat.composition import Composition, Compositions -from sage.combinat.permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition -from sage.combinat.subset import Subsets, subsets, powerset, uniq -from sage.combinat.tuple import Tuples, UnorderedTuples - - -from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover - -del lazy_import diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py deleted file mode 100644 index 7968f3fde4a..00000000000 --- a/src/sage/combinat/all__sagemath_combinat.py +++ /dev/null @@ -1,201 +0,0 @@ -from sage.combinat.all__sagemath_categories import * - -from sage.misc.lazy_import import lazy_import - -from sage.combinat.expnums import expnums - -from sage.combinat.chas.all import * -from sage.combinat.crystals.all import * -from sage.combinat.rigged_configurations.all import * - -# Free modules and friends -from sage.combinat.debruijn_sequence import DeBruijnSequences - -lazy_import('sage.combinat.schubert_polynomial', 'SchubertPolynomialRing') -lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') -lazy_import('sage.combinat.symmetric_group_algebra', [ - 'SymmetricGroupAlgebra', 'HeckeAlgebraSymmetricGroupT']) -lazy_import('sage.combinat.symmetric_group_representations', [ - 'SymmetricGroupRepresentation', 'SymmetricGroupRepresentations']) - -# Permutations -lazy_import('sage.combinat.affine_permutation', 'AffinePermutationGroup') -lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', - 'SignedPermutation', - 'SignedPermutations']) -from sage.combinat.derangements import Derangements -lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) - -# RSK -from sage.combinat.rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules - -# HillmanGrassl -lazy_import("sage.combinat.hillman_grassl", [ - "WeakReversePlanePartition", "WeakReversePlanePartitions"]) - -# PerfectMatchings -from sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings - -# Compositions -from sage.combinat.composition_signed import SignedCompositions - -# Partitions -from sage.combinat.partition import (Partition, Partitions, PartitionsInBox, - OrderedPartitions, PartitionsGreatestLE, - PartitionsGreatestEQ, number_of_partitions) - -lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) -lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) -lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) - -# Partition algebra -from sage.combinat.partition_algebra import (SetPartitionsAk, SetPartitionsPk, - SetPartitionsTk, SetPartitionsIk, - SetPartitionsBk, SetPartitionsSk, - SetPartitionsRk, SetPartitionsPRk) - -# Raising operators -lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') - -# Diagram algebra -lazy_import('sage.combinat.diagram_algebras', ['PartitionAlgebra', 'BrauerAlgebra', 'TemperleyLiebAlgebra', - 'PlanarAlgebra', 'PropagatingIdeal']) - -# Descent algebra -lazy_import('sage.combinat.descent_algebra', 'DescentAlgebra') - -# Vector Partitions -lazy_import('sage.combinat.vector_partition', - ['VectorPartition', 'VectorPartitions']) - -# Similarity class types -lazy_import('sage.combinat.similarity_class_type', ['PrimarySimilarityClassType', 'PrimarySimilarityClassTypes', - 'SimilarityClassType', 'SimilarityClassTypes']) - -# Cores -from sage.combinat.core import Core, Cores - -# Tableaux -lazy_import('sage.combinat.tableau', - ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", - "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) -from sage.combinat.skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux -from sage.combinat.ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux -from sage.combinat.ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux -from sage.combinat.composition_tableau import CompositionTableau, CompositionTableaux - -lazy_import('sage.combinat.tableau_tuple', - ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', - 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) -from sage.combinat.k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux -lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', - 'LittlewoodRichardsonTableaux']) -lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', - 'ShiftedPrimedTableau']) - -# SuperTableaux -lazy_import('sage.combinat.super_tableau', - ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) - -# Words -from sage.combinat.words.all import * - -lazy_import('sage.combinat.subword', 'Subwords') - -# Alternating sign matrices -lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', - 'AlternatingSignMatrices', - 'MonotoneTriangles', - 'ContreTableaux', - 'TruncatedStaircases')) - -# Decorated Permutations -lazy_import('sage.combinat.decorated_permutation', ('DecoratedPermutation', - 'DecoratedPermutations')) - -# Plane Partitions -lazy_import('sage.combinat.plane_partition', ('PlanePartition', - 'PlanePartitions')) - -# Parking Functions -lazy_import('sage.combinat.non_decreasing_parking_function', - ['NonDecreasingParkingFunctions', 'NonDecreasingParkingFunction']) -lazy_import('sage.combinat.parking_functions', - ['ParkingFunctions', 'ParkingFunction']) - -from sage.combinat.set_partition import SetPartition, SetPartitions -from sage.combinat.set_partition_ordered import OrderedSetPartition, OrderedSetPartitions -lazy_import('sage.combinat.multiset_partition_into_sets_ordered', - ['OrderedMultisetPartitionIntoSets', - 'OrderedMultisetPartitionsIntoSets']) -from sage.combinat.necklace import Necklaces -lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) -lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) -from sage.combinat.sloane_functions import sloane -lazy_import('sage.combinat.superpartition', ('SuperPartition', - 'SuperPartitions')) - -lazy_import('sage.combinat.parallelogram_polyomino', - ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) - -from sage.combinat.sf.all import * -from sage.combinat.ncsf_qsym.all import * -from sage.combinat.ncsym.all import * -lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') -from sage.combinat.matrices.all import * - -lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors') -lazy_import('sage.combinat.integer_vectors_mod_permgroup', - 'IntegerVectorsModPermutationGroup') - -lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials']) - -from sage.combinat.species.all import * - -lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') - -lazy_import('sage.combinat.degree_sequences', 'DegreeSequences') - -lazy_import('sage.combinat.cyclic_sieving_phenomenon', - ['CyclicSievingPolynomial', 'CyclicSievingCheck']) - -lazy_import('sage.combinat.sidon_sets', 'sidon_sets') - -# Puzzles -lazy_import('sage.combinat.knutson_tao_puzzles', 'KnutsonTaoPuzzleSolver') - -# Gelfand-Tsetlin patterns -lazy_import('sage.combinat.gelfand_tsetlin_patterns', - ['GelfandTsetlinPattern', 'GelfandTsetlinPatterns']) - -# Sequences -lazy_import('sage.combinat.binary_recurrence_sequences', - 'BinaryRecurrenceSequence') -lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') -lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') - -# Six Vertex Model -lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') - -# sine-Gordon Y-systems -lazy_import('sage.combinat.sine_gordon', 'SineGordonYsystem') - -# Fully Packed Loop -lazy_import('sage.combinat.fully_packed_loop', ['FullyPackedLoop', 'FullyPackedLoops']) - -# Subword complex and cluster complex -lazy_import('sage.combinat.subword_complex', 'SubwordComplex') -lazy_import("sage.combinat.cluster_complex", "ClusterComplex") - -# Constellations -lazy_import('sage.combinat.constellation', ['Constellation', 'Constellations']) - -# Growth diagrams -lazy_import('sage.combinat.growth', 'GrowthDiagram') - -# Path Tableaux -lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') - -# Bijectionist -lazy_import('sage.combinat.bijectionist', 'Bijectionist') -del lazy_import diff --git a/src/sage/combinat/all__sagemath_flint.py b/src/sage/combinat/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/combinat/all__sagemath_gap.py b/src/sage/combinat/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/combinat/all__sagemath_graphs.py b/src/sage/combinat/all__sagemath_graphs.py deleted file mode 100644 index d789b89078b..00000000000 --- a/src/sage/combinat/all__sagemath_graphs.py +++ /dev/null @@ -1,33 +0,0 @@ -from sage.combinat.all__sagemath_categories import * - -from sage.misc.lazy_import import lazy_import - -# Posets -from sage.combinat.posets.all import * - -# Trees and Tamari interval posets -from sage.combinat.ordered_tree import (OrderedTree, OrderedTrees, - LabelledOrderedTree, LabelledOrderedTrees) -from sage.combinat.binary_tree import (BinaryTree, BinaryTrees, - LabelledBinaryTree, LabelledBinaryTrees) -lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', - 'LabelledRootedTree', 'LabelledRootedTrees')) -lazy_import('sage.combinat.interval_posets', [ - 'TamariIntervalPoset', 'TamariIntervalPosets']) - -from sage.combinat.graph_path import GraphPaths - -from sage.combinat.yang_baxter_graph import YangBaxterGraph - -# block designs, etc -from sage.combinat.designs.all import * - -# Cluster Algebras and Quivers -from sage.combinat.cluster_algebra_quiver.all import * - -# Finite State Machines (Automaton, Transducer) -lazy_import('sage.combinat.finite_state_machine', - ['Automaton', 'Transducer', 'FiniteStateMachine']) -lazy_import('sage.combinat.finite_state_machine_generators', - ['automata', 'transducers']) -del lazy_import diff --git a/src/sage/combinat/all__sagemath_modules.py b/src/sage/combinat/all__sagemath_modules.py deleted file mode 100644 index a2459fcafc0..00000000000 --- a/src/sage/combinat/all__sagemath_modules.py +++ /dev/null @@ -1,6 +0,0 @@ -from sage.combinat.all__sagemath_categories import * - -from sage.combinat.free_module import CombinatorialFreeModule -from sage.combinat import ranker - -from sage.combinat.root_system.all import * diff --git a/src/sage/combinat/alternating_sign_matrix.py b/src/sage/combinat/alternating_sign_matrix.py index 64b119553cf..d327d84ae1d 100644 --- a/src/sage/combinat/alternating_sign_matrix.py +++ b/src/sage/combinat/alternating_sign_matrix.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Alternating Sign Matrices diff --git a/src/sage/combinat/backtrack.py b/src/sage/combinat/backtrack.py index 6e473a7f8fa..ab9c35bc23c 100644 --- a/src/sage/combinat/backtrack.py +++ b/src/sage/combinat/backtrack.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Backtracking diff --git a/src/sage/combinat/baxter_permutations.py b/src/sage/combinat/baxter_permutations.py index 0b8bd1c3a10..648ce9c6a26 100644 --- a/src/sage/combinat/baxter_permutations.py +++ b/src/sage/combinat/baxter_permutations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Baxter permutations """ diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 7cfe72e3246..6f34e76b883 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.numerical.mip r""" A bijectionist's toolkit diff --git a/src/sage/combinat/binary_recurrence_sequences.py b/src/sage/combinat/binary_recurrence_sequences.py index b993cda3b1b..9c1b9bdf931 100644 --- a/src/sage/combinat/binary_recurrence_sequences.py +++ b/src/sage/combinat/binary_recurrence_sequences.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Binary Recurrence Sequences diff --git a/src/sage/combinat/binary_tree.py b/src/sage/combinat/binary_tree.py index c736e7a36d6..26e459e13e3 100644 --- a/src/sage/combinat/binary_tree.py +++ b/src/sage/combinat/binary_tree.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Binary Trees diff --git a/src/sage/combinat/blob_algebra.py b/src/sage/combinat/blob_algebra.py index 10a5d171569..595063a69fd 100644 --- a/src/sage/combinat/blob_algebra.py +++ b/src/sage/combinat/blob_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Blob Algebras diff --git a/src/sage/combinat/cartesian_product.py b/src/sage/combinat/cartesian_product.py index 83e329c1ed2..c5a16d3f8ee 100644 --- a/src/sage/combinat/cartesian_product.py +++ b/src/sage/combinat/cartesian_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Cartesian Products """ diff --git a/src/sage/combinat/catalog_partitions.py b/src/sage/combinat/catalog_partitions.py index 14cdccd8592..302e8f112d6 100644 --- a/src/sage/combinat/catalog_partitions.py +++ b/src/sage/combinat/catalog_partitions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Enumerated sets of partitions, tableaux, ... diff --git a/src/sage/combinat/chas/all.py b/src/sage/combinat/chas/all.py index 14146102882..5833abbe49c 100644 --- a/src/sage/combinat/chas/all.py +++ b/src/sage/combinat/chas/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Combinatorial Hopf algebras @@ -19,5 +18,3 @@ lazy_import('sage.combinat.chas.fsym', ['FreeSymmetricFunctions']) lazy_import('sage.combinat.chas.wqsym', ['WordQuasiSymmetricFunctions']) -del lazy_import -del install_doc diff --git a/src/sage/combinat/chas/fsym.py b/src/sage/combinat/chas/fsym.py index d671bb7f68c..10210028932 100644 --- a/src/sage/combinat/chas/fsym.py +++ b/src/sage/combinat/chas/fsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Poirier-Reutenauer Hopf algebra of standard tableaux diff --git a/src/sage/combinat/chas/wqsym.py b/src/sage/combinat/chas/wqsym.py index 1e4df78da9e..567e1f1b9f5 100644 --- a/src/sage/combinat/chas/wqsym.py +++ b/src/sage/combinat/chas/wqsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Word Quasi-symmetric functions diff --git a/src/sage/combinat/cluster_algebra_quiver/all.py b/src/sage/combinat/cluster_algebra_quiver/all.py index 4a7344218aa..5b28d09d1c6 100644 --- a/src/sage/combinat/cluster_algebra_quiver/all.py +++ b/src/sage/combinat/cluster_algebra_quiver/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Cluster algebras and quivers @@ -13,8 +12,7 @@ install_doc(__package__, __doc__) from sage.misc.lazy_import import lazy_import -lazy_import("sage.combinat.cluster_algebra_quiver.quiver_mutation_type", - "QuiverMutationType") +lazy_import("sage.combinat.cluster_algebra_quiver.quiver_mutation_type", "QuiverMutationType") lazy_import("sage.combinat.cluster_algebra_quiver.quiver", "ClusterQuiver") lazy_import("sage.combinat.cluster_algebra_quiver.cluster_seed", "ClusterSeed") diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py index 6531fcabeef..8656b47152c 100644 --- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py +++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs sage.modules r""" ClusterSeed diff --git a/src/sage/combinat/cluster_algebra_quiver/interact.py b/src/sage/combinat/cluster_algebra_quiver/interact.py index c054ab64a89..695e3d1d449 100644 --- a/src/sage/combinat/cluster_algebra_quiver/interact.py +++ b/src/sage/combinat/cluster_algebra_quiver/interact.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs import ipywidgets as widgets from sage.misc.latex import latex from sage.repl.rich_output.pretty_print import pretty_print diff --git a/src/sage/combinat/cluster_algebra_quiver/mutation_class.py b/src/sage/combinat/cluster_algebra_quiver/mutation_class.py index 5792be84044..1278cd159ab 100644 --- a/src/sage/combinat/cluster_algebra_quiver/mutation_class.py +++ b/src/sage/combinat/cluster_algebra_quiver/mutation_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" mutation_class diff --git a/src/sage/combinat/cluster_algebra_quiver/mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/mutation_type.py index 6bba2f1a452..6c5edc6aa3f 100644 --- a/src/sage/combinat/cluster_algebra_quiver/mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/mutation_type.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Helper functions for mutation types of quivers diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver.py b/src/sage/combinat/cluster_algebra_quiver/quiver.py index d77059af6b6..3fc3499ef67 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs sage.modules r""" Quiver diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py index f39ea4216c7..d4b99fc9c23 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Quiver mutation types diff --git a/src/sage/combinat/cluster_complex.py b/src/sage/combinat/cluster_complex.py index f63c7a6b9f3..a1f7489f1ad 100644 --- a/src/sage/combinat/cluster_complex.py +++ b/src/sage/combinat/cluster_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs r""" Cluster complex (or generalized dual associahedron) diff --git a/src/sage/combinat/colored_permutations.py b/src/sage/combinat/colored_permutations.py index 1617a7f5db4..44950aada12 100644 --- a/src/sage/combinat/colored_permutations.py +++ b/src/sage/combinat/colored_permutations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Colored Permutations diff --git a/src/sage/combinat/combinat.py b/src/sage/combinat/combinat.py index e9efdc3ea6e..bd5e7102d66 100644 --- a/src/sage/combinat/combinat.py +++ b/src/sage/combinat/combinat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Combinatorial Functions diff --git a/src/sage/combinat/combinat_cython.pxd b/src/sage/combinat/combinat_cython.pxd index 01be51d4a3d..40cae00a781 100644 --- a/src/sage/combinat/combinat_cython.pxd +++ b/src/sage/combinat/combinat_cython.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.libs.gmp.all cimport mpz_t cdef mpz_stirling_s2(mpz_t s, unsigned long n, unsigned long k) diff --git a/src/sage/combinat/combinat_cython.pyx b/src/sage/combinat/combinat_cython.pyx index 223cf6ce01a..421994394c2 100644 --- a/src/sage/combinat/combinat_cython.pyx +++ b/src/sage/combinat/combinat_cython.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # cython: binding=True """ Fast computation of combinatorial functions (Cython + mpz) diff --git a/src/sage/combinat/combination.py b/src/sage/combinat/combination.py index 51407c49aac..916ca836c6b 100644 --- a/src/sage/combinat/combination.py +++ b/src/sage/combinat/combination.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Combinations diff --git a/src/sage/combinat/combinatorial_map.py b/src/sage/combinat/combinatorial_map.py index aff4782781b..84876e52f56 100644 --- a/src/sage/combinat/combinatorial_map.py +++ b/src/sage/combinat/combinatorial_map.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Combinatorial maps diff --git a/src/sage/combinat/composition.py b/src/sage/combinat/composition.py index 862d81f58bd..e528aea368b 100644 --- a/src/sage/combinat/composition.py +++ b/src/sage/combinat/composition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Integer compositions diff --git a/src/sage/combinat/composition_signed.py b/src/sage/combinat/composition_signed.py index 09a790bf88c..03e9acfe31e 100644 --- a/src/sage/combinat/composition_signed.py +++ b/src/sage/combinat/composition_signed.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Signed Compositions """ diff --git a/src/sage/combinat/composition_tableau.py b/src/sage/combinat/composition_tableau.py index cff29fdb772..8ee363fb275 100644 --- a/src/sage/combinat/composition_tableau.py +++ b/src/sage/combinat/composition_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Composition Tableaux diff --git a/src/sage/combinat/constellation.py b/src/sage/combinat/constellation.py index 73499121b19..0ad3151925e 100644 --- a/src/sage/combinat/constellation.py +++ b/src/sage/combinat/constellation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups r""" Constellations diff --git a/src/sage/combinat/core.py b/src/sage/combinat/core.py index 7fbe02f7e16..41265d793db 100644 --- a/src/sage/combinat/core.py +++ b/src/sage/combinat/core.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Cores diff --git a/src/sage/combinat/counting.py b/src/sage/combinat/counting.py index a77803c1e46..a067d781dec 100644 --- a/src/sage/combinat/counting.py +++ b/src/sage/combinat/counting.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Counting diff --git a/src/sage/combinat/crystals/affine.py b/src/sage/combinat/crystals/affine.py index 81ee3e29fd5..186d2ea373e 100644 --- a/src/sage/combinat/crystals/affine.py +++ b/src/sage/combinat/crystals/affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Affine Crystals diff --git a/src/sage/combinat/crystals/affine_factorization.py b/src/sage/combinat/crystals/affine_factorization.py index ee8d8343799..b1d820032af 100644 --- a/src/sage/combinat/crystals/affine_factorization.py +++ b/src/sage/combinat/crystals/affine_factorization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Affine factorization crystal of type `A` diff --git a/src/sage/combinat/crystals/affinization.py b/src/sage/combinat/crystals/affinization.py index 4b7a81c5f4b..d849e407c3f 100644 --- a/src/sage/combinat/crystals/affinization.py +++ b/src/sage/combinat/crystals/affinization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Affinization Crystals diff --git a/src/sage/combinat/crystals/alcove_path.py b/src/sage/combinat/crystals/alcove_path.py index ef39ccb164f..2bec96841a2 100644 --- a/src/sage/combinat/crystals/alcove_path.py +++ b/src/sage/combinat/crystals/alcove_path.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Alcove paths diff --git a/src/sage/combinat/crystals/all.py b/src/sage/combinat/crystals/all.py index 5fc1f5f4d71..397639405c9 100644 --- a/src/sage/combinat/crystals/all.py +++ b/src/sage/combinat/crystals/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Crystals @@ -29,5 +28,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.crystals', 'catalog', 'crystals') -del lazy_import -del install_doc diff --git a/src/sage/combinat/crystals/bkk_crystals.py b/src/sage/combinat/crystals/bkk_crystals.py index 2163195aacb..b3658fd28a4 100644 --- a/src/sage/combinat/crystals/bkk_crystals.py +++ b/src/sage/combinat/crystals/bkk_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Benkart-Kang-Kashiwara crystals for the general-linear Lie superalgebra diff --git a/src/sage/combinat/crystals/catalog.py b/src/sage/combinat/crystals/catalog.py index 79744ccd7bc..0c884314255 100644 --- a/src/sage/combinat/crystals/catalog.py +++ b/src/sage/combinat/crystals/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Catalog Of Crystals diff --git a/src/sage/combinat/crystals/catalog_elementary_crystals.py b/src/sage/combinat/crystals/catalog_elementary_crystals.py index 02c97006d5a..51db8aa065a 100644 --- a/src/sage/combinat/crystals/catalog_elementary_crystals.py +++ b/src/sage/combinat/crystals/catalog_elementary_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Catalog Of Elementary Crystals diff --git a/src/sage/combinat/crystals/catalog_infinity_crystals.py b/src/sage/combinat/crystals/catalog_infinity_crystals.py index cbec9d97205..7f09b0f04f8 100644 --- a/src/sage/combinat/crystals/catalog_infinity_crystals.py +++ b/src/sage/combinat/crystals/catalog_infinity_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Catalog Of Crystal Models For `B(\infty)` diff --git a/src/sage/combinat/crystals/catalog_kirillov_reshetikhin.py b/src/sage/combinat/crystals/catalog_kirillov_reshetikhin.py index cfd82ccd9b4..62b196e4ed6 100644 --- a/src/sage/combinat/crystals/catalog_kirillov_reshetikhin.py +++ b/src/sage/combinat/crystals/catalog_kirillov_reshetikhin.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Catalog Of Crystal Models For Kirillov-Reshetikhin Crystals diff --git a/src/sage/combinat/crystals/crystals.py b/src/sage/combinat/crystals/crystals.py index 12efae47147..fb8f150e479 100644 --- a/src/sage/combinat/crystals/crystals.py +++ b/src/sage/combinat/crystals/crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" An introduction to crystals diff --git a/src/sage/combinat/crystals/direct_sum.py b/src/sage/combinat/crystals/direct_sum.py index 92474bfe3c1..190a3279513 100644 --- a/src/sage/combinat/crystals/direct_sum.py +++ b/src/sage/combinat/crystals/direct_sum.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Direct Sum of Crystals diff --git a/src/sage/combinat/crystals/elementary_crystals.py b/src/sage/combinat/crystals/elementary_crystals.py index 27b18fcd2a1..c89dd7504fd 100644 --- a/src/sage/combinat/crystals/elementary_crystals.py +++ b/src/sage/combinat/crystals/elementary_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Elementary Crystals diff --git a/src/sage/combinat/crystals/fast_crystals.py b/src/sage/combinat/crystals/fast_crystals.py index d8c205bf228..aebc499e9fb 100644 --- a/src/sage/combinat/crystals/fast_crystals.py +++ b/src/sage/combinat/crystals/fast_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Fast Rank Two Crystals diff --git a/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py b/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py index 92c19eb2c52..e63e1a4a3ce 100644 --- a/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py +++ b/src/sage/combinat/crystals/fully_commutative_stable_grothendieck.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Fully commutative stable Grothendieck crystal diff --git a/src/sage/combinat/crystals/generalized_young_walls.py b/src/sage/combinat/crystals/generalized_young_walls.py index 6986d2a5cc8..12ab091f6cd 100644 --- a/src/sage/combinat/crystals/generalized_young_walls.py +++ b/src/sage/combinat/crystals/generalized_young_walls.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Crystals of Generalized Young Walls diff --git a/src/sage/combinat/crystals/highest_weight_crystals.py b/src/sage/combinat/crystals/highest_weight_crystals.py index 1272c24f027..96d7377c029 100644 --- a/src/sage/combinat/crystals/highest_weight_crystals.py +++ b/src/sage/combinat/crystals/highest_weight_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Highest weight crystals diff --git a/src/sage/combinat/crystals/induced_structure.py b/src/sage/combinat/crystals/induced_structure.py index 1d308b0b9b2..95ed85bf5f8 100644 --- a/src/sage/combinat/crystals/induced_structure.py +++ b/src/sage/combinat/crystals/induced_structure.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Induced Crystals diff --git a/src/sage/combinat/crystals/infinity_crystals.py b/src/sage/combinat/crystals/infinity_crystals.py index bc2d3d892ff..6219da38391 100644 --- a/src/sage/combinat/crystals/infinity_crystals.py +++ b/src/sage/combinat/crystals/infinity_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" `\mathcal{B}(\infty)` Crystals of Tableaux in Nonexceptional Types and `G_2` diff --git a/src/sage/combinat/crystals/kac_modules.py b/src/sage/combinat/crystals/kac_modules.py index ddcd8492af1..23ed28b90c2 100644 --- a/src/sage/combinat/crystals/kac_modules.py +++ b/src/sage/combinat/crystals/kac_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Crystals of Kac modules of the general-linear Lie superalgebra diff --git a/src/sage/combinat/crystals/kirillov_reshetikhin.py b/src/sage/combinat/crystals/kirillov_reshetikhin.py index dac5a48f7a9..1e58c8ead35 100644 --- a/src/sage/combinat/crystals/kirillov_reshetikhin.py +++ b/src/sage/combinat/crystals/kirillov_reshetikhin.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Kirillov-Reshetikhin Crystals diff --git a/src/sage/combinat/crystals/kyoto_path_model.py b/src/sage/combinat/crystals/kyoto_path_model.py index 06589da80f3..e7ae0b47275 100644 --- a/src/sage/combinat/crystals/kyoto_path_model.py +++ b/src/sage/combinat/crystals/kyoto_path_model.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Kyoto Path Model for Affine Highest Weight Crystals diff --git a/src/sage/combinat/crystals/letters.pxd b/src/sage/combinat/crystals/letters.pxd index da06502c59c..4f8e25da411 100644 --- a/src/sage/combinat/crystals/letters.pxd +++ b/src/sage/combinat/crystals/letters.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from sage.structure.element cimport Element cdef class Letter(Element): diff --git a/src/sage/combinat/crystals/letters.pyx b/src/sage/combinat/crystals/letters.pyx index ffdf8d0d519..f54a4705047 100644 --- a/src/sage/combinat/crystals/letters.pyx +++ b/src/sage/combinat/crystals/letters.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Crystals of letters diff --git a/src/sage/combinat/crystals/littelmann_path.py b/src/sage/combinat/crystals/littelmann_path.py index c26f801f0bb..c2d8397f737 100644 --- a/src/sage/combinat/crystals/littelmann_path.py +++ b/src/sage/combinat/crystals/littelmann_path.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Littelmann paths diff --git a/src/sage/combinat/crystals/monomial_crystals.py b/src/sage/combinat/crystals/monomial_crystals.py index 8ebf0124876..7ba4b52bb51 100644 --- a/src/sage/combinat/crystals/monomial_crystals.py +++ b/src/sage/combinat/crystals/monomial_crystals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Crystals of Modified Nakajima Monomials diff --git a/src/sage/combinat/crystals/multisegments.py b/src/sage/combinat/crystals/multisegments.py index bb0a0bc3ccf..92de6809f4f 100644 --- a/src/sage/combinat/crystals/multisegments.py +++ b/src/sage/combinat/crystals/multisegments.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Crystal of Bernstein-Zelevinsky Multisegments diff --git a/src/sage/combinat/crystals/mv_polytopes.py b/src/sage/combinat/crystals/mv_polytopes.py index 6d78a4e3ce3..341ad417443 100644 --- a/src/sage/combinat/crystals/mv_polytopes.py +++ b/src/sage/combinat/crystals/mv_polytopes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Crystal Of Mirković-Vilonen (MV) Polytopes diff --git a/src/sage/combinat/crystals/pbw_crystal.py b/src/sage/combinat/crystals/pbw_crystal.py index 6db2bf4d99a..9859438ae58 100644 --- a/src/sage/combinat/crystals/pbw_crystal.py +++ b/src/sage/combinat/crystals/pbw_crystal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" `\mathcal{B}(\infty)` Crystal Of PBW Monomials diff --git a/src/sage/combinat/crystals/pbw_datum.pxd b/src/sage/combinat/crystals/pbw_datum.pxd index 643d297b9df..9c3aab083df 100644 --- a/src/sage/combinat/crystals/pbw_datum.pxd +++ b/src/sage/combinat/crystals/pbw_datum.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-combinat - cpdef tuple compute_new_lusztig_datum(list enhanced_braid_chain, initial_lusztig_datum) cpdef tuple tropical_plucker_relation(tuple a, lusztig_datum) cpdef list enhance_braid_move_chain(braid_move_chain, cartan_type) diff --git a/src/sage/combinat/crystals/pbw_datum.pyx b/src/sage/combinat/crystals/pbw_datum.pyx index 429c58640ca..2adcb09d902 100644 --- a/src/sage/combinat/crystals/pbw_datum.pyx +++ b/src/sage/combinat/crystals/pbw_datum.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" PBW Data diff --git a/src/sage/combinat/crystals/polyhedral_realization.py b/src/sage/combinat/crystals/polyhedral_realization.py index a9007307d32..c4193b44655 100644 --- a/src/sage/combinat/crystals/polyhedral_realization.py +++ b/src/sage/combinat/crystals/polyhedral_realization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Polyhedral Realization of `B(\infty)` diff --git a/src/sage/combinat/crystals/spins.pxd b/src/sage/combinat/crystals/spins.pxd index 715c44ba815..3ef5e0b7c5f 100644 --- a/src/sage/combinat/crystals/spins.pxd +++ b/src/sage/combinat/crystals/spins.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from sage.structure.element cimport Element cdef class Spin(Element): diff --git a/src/sage/combinat/crystals/spins.pyx b/src/sage/combinat/crystals/spins.pyx index d3d66730179..62299a434f5 100644 --- a/src/sage/combinat/crystals/spins.pyx +++ b/src/sage/combinat/crystals/spins.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Spin Crystals diff --git a/src/sage/combinat/crystals/star_crystal.py b/src/sage/combinat/crystals/star_crystal.py index 45bffe85726..02427149ed4 100644 --- a/src/sage/combinat/crystals/star_crystal.py +++ b/src/sage/combinat/crystals/star_crystal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Star-Crystal Structure On `B(\infty)` diff --git a/src/sage/combinat/crystals/subcrystal.py b/src/sage/combinat/crystals/subcrystal.py index 7e227aa96a6..b9caabafd72 100644 --- a/src/sage/combinat/crystals/subcrystal.py +++ b/src/sage/combinat/crystals/subcrystal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Subcrystals diff --git a/src/sage/combinat/crystals/tensor_product.py b/src/sage/combinat/crystals/tensor_product.py index 09382e5834a..726c974e781 100644 --- a/src/sage/combinat/crystals/tensor_product.py +++ b/src/sage/combinat/crystals/tensor_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Tensor Products of Crystals diff --git a/src/sage/combinat/crystals/tensor_product_element.pxd b/src/sage/combinat/crystals/tensor_product_element.pxd index e05c1cf4d59..792d6d3351e 100644 --- a/src/sage/combinat/crystals/tensor_product_element.pxd +++ b/src/sage/combinat/crystals/tensor_product_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from sage.structure.list_clone cimport ClonableArray cdef class ImmutableListWithParent(ClonableArray): diff --git a/src/sage/combinat/crystals/tensor_product_element.pyx b/src/sage/combinat/crystals/tensor_product_element.pyx index 226942ea7c8..42a7f271092 100644 --- a/src/sage/combinat/crystals/tensor_product_element.pyx +++ b/src/sage/combinat/crystals/tensor_product_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Tensor Products of Crystal Elements diff --git a/src/sage/combinat/crystals/virtual_crystal.py b/src/sage/combinat/crystals/virtual_crystal.py index 7bdf411852a..e7286e58c01 100644 --- a/src/sage/combinat/crystals/virtual_crystal.py +++ b/src/sage/combinat/crystals/virtual_crystal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Virtual Crystals diff --git a/src/sage/combinat/cyclic_sieving_phenomenon.py b/src/sage/combinat/cyclic_sieving_phenomenon.py index fe52a18d788..8ad3bfc1f0c 100644 --- a/src/sage/combinat/cyclic_sieving_phenomenon.py +++ b/src/sage/combinat/cyclic_sieving_phenomenon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Cyclic sieving phenomenon diff --git a/src/sage/combinat/debruijn_sequence.pyx b/src/sage/combinat/debruijn_sequence.pyx index a2962c3d174..02e224283c2 100644 --- a/src/sage/combinat/debruijn_sequence.pyx +++ b/src/sage/combinat/debruijn_sequence.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-combinat +# -*- coding: utf-8 -*- r""" De Bruijn sequences diff --git a/src/sage/combinat/decorated_permutation.py b/src/sage/combinat/decorated_permutation.py index e427b16becc..f687818ef25 100644 --- a/src/sage/combinat/decorated_permutation.py +++ b/src/sage/combinat/decorated_permutation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Decorated permutations diff --git a/src/sage/combinat/degree_sequences.pyx b/src/sage/combinat/degree_sequences.pyx index 4bd259945bb..6a0b070a44e 100644 --- a/src/sage/combinat/degree_sequences.pyx +++ b/src/sage/combinat/degree_sequences.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Degree sequences diff --git a/src/sage/combinat/derangements.py b/src/sage/combinat/derangements.py index 0bc68e99bf5..e9e1de647e8 100644 --- a/src/sage/combinat/derangements.py +++ b/src/sage/combinat/derangements.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Derangements diff --git a/src/sage/combinat/descent_algebra.py b/src/sage/combinat/descent_algebra.py index 39893e43f6a..bb7db9e326e 100644 --- a/src/sage/combinat/descent_algebra.py +++ b/src/sage/combinat/descent_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Descent Algebras diff --git a/src/sage/combinat/designs/all.py b/src/sage/combinat/designs/all.py index 32d2aa35bac..0948c6fa281 100644 --- a/src/sage/combinat/designs/all.py +++ b/src/sage/combinat/designs/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Combinatorial designs and incidence structures @@ -44,8 +43,7 @@ lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure') -lazy_import('sage.combinat.designs.incidence_structures', - 'IncidenceStructure', 'BlockDesign') +lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure', 'BlockDesign') lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure', as_='Hypergraph') @@ -53,6 +51,4 @@ lazy_import('sage.combinat.designs.covering_design', ['CoveringDesign', 'schonheim', 'trivial_covering_design']) -from sage.combinat.designs import design_catalog as designs -del lazy_import -del install_doc +from . import design_catalog as designs diff --git a/src/sage/combinat/designs/bibd.py b/src/sage/combinat/designs/bibd.py index 4d1050c174a..d17c325bdc0 100644 --- a/src/sage/combinat/designs/bibd.py +++ b/src/sage/combinat/designs/bibd.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Balanced Incomplete Block Designs (BIBD) diff --git a/src/sage/combinat/designs/block_design.py b/src/sage/combinat/designs/block_design.py index 22c5466a31d..08a92c6fe54 100644 --- a/src/sage/combinat/designs/block_design.py +++ b/src/sage/combinat/designs/block_design.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings r""" Block designs diff --git a/src/sage/combinat/designs/covering_array.py b/src/sage/combinat/designs/covering_array.py index 7053c66a048..1596c708152 100644 --- a/src/sage/combinat/designs/covering_array.py +++ b/src/sage/combinat/designs/covering_array.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Covering Arrays (CA) diff --git a/src/sage/combinat/designs/covering_design.py b/src/sage/combinat/designs/covering_design.py index 8cb182f31b8..a855dc601dc 100644 --- a/src/sage/combinat/designs/covering_design.py +++ b/src/sage/combinat/designs/covering_design.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Covering designs: coverings of `t`-element subsets of a `v`-set by `k`-sets diff --git a/src/sage/combinat/designs/database.py b/src/sage/combinat/designs/database.py index c3200a07adf..e4d80442f3c 100644 --- a/src/sage/combinat/designs/database.py +++ b/src/sage/combinat/designs/database.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Database of small combinatorial designs diff --git a/src/sage/combinat/designs/design_catalog.py b/src/sage/combinat/designs/design_catalog.py index 4f77341f9f1..8bf7f14fd0b 100644 --- a/src/sage/combinat/designs/design_catalog.py +++ b/src/sage/combinat/designs/design_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Catalog of designs diff --git a/src/sage/combinat/designs/designs_pyx.pxd b/src/sage/combinat/designs/designs_pyx.pxd index fef0692369c..345a41f2945 100644 --- a/src/sage/combinat/designs/designs_pyx.pxd +++ b/src/sage/combinat/designs/designs_pyx.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # Cached informations about OA(k,n) # # - max_true: max k such that OA(k,n,existence=True) previously returned True diff --git a/src/sage/combinat/designs/designs_pyx.pyx b/src/sage/combinat/designs/designs_pyx.pyx index 11c9c5abe9d..4a237ec82b3 100644 --- a/src/sage/combinat/designs/designs_pyx.pyx +++ b/src/sage/combinat/designs/designs_pyx.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Cython functions for combinatorial designs diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index f3c228ffca3..8c2b2b0b01c 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Difference families diff --git a/src/sage/combinat/designs/difference_matrices.py b/src/sage/combinat/designs/difference_matrices.py index 7e1a53f99e2..25986ca2c79 100644 --- a/src/sage/combinat/designs/difference_matrices.py +++ b/src/sage/combinat/designs/difference_matrices.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings r""" Difference Matrices diff --git a/src/sage/combinat/designs/evenly_distributed_sets.pyx b/src/sage/combinat/designs/evenly_distributed_sets.pyx index 566c4973cda..013288872e4 100644 --- a/src/sage/combinat/designs/evenly_distributed_sets.pyx +++ b/src/sage/combinat/designs/evenly_distributed_sets.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings r""" Evenly distributed sets in finite fields diff --git a/src/sage/combinat/designs/ext_rep.py b/src/sage/combinat/designs/ext_rep.py index b12fd7d9846..2227a1e9f63 100644 --- a/src/sage/combinat/designs/ext_rep.py +++ b/src/sage/combinat/designs/ext_rep.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" External Representations of Block Designs diff --git a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx index d7d0e956954..72baf1a5d28 100644 --- a/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx +++ b/src/sage/combinat/designs/gen_quadrangles_with_spread.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.libs.gap r""" Database of generalised quadrangles with spread diff --git a/src/sage/combinat/designs/group_divisible_designs.py b/src/sage/combinat/designs/group_divisible_designs.py index 6342049e2e4..aee3bcc96cf 100644 --- a/src/sage/combinat/designs/group_divisible_designs.py +++ b/src/sage/combinat/designs/group_divisible_designs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings r""" Group-Divisible Designs (GDD) diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index 97dcf4f366b..79c95d2c4fb 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Incidence structures (i.e. hypergraphs, i.e. set systems) diff --git a/src/sage/combinat/designs/latin_squares.py b/src/sage/combinat/designs/latin_squares.py index 6dc87323a47..58662fbeb88 100644 --- a/src/sage/combinat/designs/latin_squares.py +++ b/src/sage/combinat/designs/latin_squares.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.modules r""" Mutually Orthogonal Latin Squares (MOLS) diff --git a/src/sage/combinat/designs/orthogonal_arrays.py b/src/sage/combinat/designs/orthogonal_arrays.py index f621b51a54c..b4a14b0e7b6 100644 --- a/src/sage/combinat/designs/orthogonal_arrays.py +++ b/src/sage/combinat/designs/orthogonal_arrays.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings sage.schemes r""" Orthogonal arrays (OA) diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index 021bab7e2c4..56f7cbc3bac 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings r""" Orthogonal arrays (build recursive constructions) diff --git a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx index bb172b96e3a..7e80ab00034 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx +++ b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings sage.schemes # cython: cdivision=True r""" diff --git a/src/sage/combinat/designs/resolvable_bibd.py b/src/sage/combinat/designs/resolvable_bibd.py index 0efc8d163bf..e79e996dcb5 100644 --- a/src/sage/combinat/designs/resolvable_bibd.py +++ b/src/sage/combinat/designs/resolvable_bibd.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.rings.finite_rings r""" Resolvable Balanced Incomplete Block Design (RBIBD) diff --git a/src/sage/combinat/designs/steiner_quadruple_systems.py b/src/sage/combinat/designs/steiner_quadruple_systems.py index aa09e6582de..7c7819c4138 100644 --- a/src/sage/combinat/designs/steiner_quadruple_systems.py +++ b/src/sage/combinat/designs/steiner_quadruple_systems.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Steiner Quadruple Systems diff --git a/src/sage/combinat/designs/subhypergraph_search.pyx b/src/sage/combinat/designs/subhypergraph_search.pyx index 12ad945fdc4..968159b9012 100644 --- a/src/sage/combinat/designs/subhypergraph_search.pyx +++ b/src/sage/combinat/designs/subhypergraph_search.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Hypergraph isomorphic copy search diff --git a/src/sage/combinat/designs/twographs.py b/src/sage/combinat/designs/twographs.py index dca9ea623ff..8ba2bc12681 100644 --- a/src/sage/combinat/designs/twographs.py +++ b/src/sage/combinat/designs/twographs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Two-graphs diff --git a/src/sage/combinat/diagram.py b/src/sage/combinat/diagram.py index b8561c0f28d..00b94920726 100644 --- a/src/sage/combinat/diagram.py +++ b/src/sage/combinat/diagram.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Combinatorial diagrams diff --git a/src/sage/combinat/diagram_algebras.py b/src/sage/combinat/diagram_algebras.py index 7311e10257a..0f82ee78430 100644 --- a/src/sage/combinat/diagram_algebras.py +++ b/src/sage/combinat/diagram_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Diagram and Partition Algebras diff --git a/src/sage/combinat/dlx.py b/src/sage/combinat/dlx.py index df63635e961..58bb1bc624f 100644 --- a/src/sage/combinat/dlx.py +++ b/src/sage/combinat/dlx.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Exact Cover Problem via Dancing Links """ diff --git a/src/sage/combinat/dyck_word.py b/src/sage/combinat/dyck_word.py index 5061b08f483..6316e1f9ba6 100644 --- a/src/sage/combinat/dyck_word.py +++ b/src/sage/combinat/dyck_word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Dyck Words diff --git a/src/sage/combinat/e_one_star.py b/src/sage/combinat/e_one_star.py index 85c0c5a02a1..2d04619f393 100644 --- a/src/sage/combinat/e_one_star.py +++ b/src/sage/combinat/e_one_star.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Substitutions over unit cube faces (Rauzy fractals) diff --git a/src/sage/combinat/enumerated_sets.py b/src/sage/combinat/enumerated_sets.py index 1554a2c5786..f529886da82 100644 --- a/src/sage/combinat/enumerated_sets.py +++ b/src/sage/combinat/enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Enumerated sets and combinatorial objects diff --git a/src/sage/combinat/enumeration_mod_permgroup.pxd b/src/sage/combinat/enumeration_mod_permgroup.pxd index aace492701b..24a0e15217c 100644 --- a/src/sage/combinat/enumeration_mod_permgroup.pxd +++ b/src/sage/combinat/enumeration_mod_permgroup.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.structure.list_clone cimport ClonableIntArray cpdef list all_children(ClonableIntArray v, int max_part) diff --git a/src/sage/combinat/enumeration_mod_permgroup.pyx b/src/sage/combinat/enumeration_mod_permgroup.pyx index 9ea12608ec9..70b05c6276b 100644 --- a/src/sage/combinat/enumeration_mod_permgroup.pyx +++ b/src/sage/combinat/enumeration_mod_permgroup.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.combinat r""" Tools for enumeration modulo the action of a permutation group diff --git a/src/sage/combinat/expnums.pyx b/src/sage/combinat/expnums.pyx index 4b03dfa0957..216850b43f1 100644 --- a/src/sage/combinat/expnums.pyx +++ b/src/sage/combinat/expnums.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Compute Bell and Uppuluri-Carpenter numbers diff --git a/src/sage/combinat/family.py b/src/sage/combinat/family.py index 359dcc80e47..a7b2c592b3e 100644 --- a/src/sage/combinat/family.py +++ b/src/sage/combinat/family.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Families diff --git a/src/sage/combinat/fast_vector_partitions.pyx b/src/sage/combinat/fast_vector_partitions.pyx index 84550e3e222..fe937b75ee7 100644 --- a/src/sage/combinat/fast_vector_partitions.pyx +++ b/src/sage/combinat/fast_vector_partitions.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-combinat +# -*- coding: utf-8 -*- r""" Brent Yorgey's fast algorithm for integer vector (multiset) partitions. diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finite_state_machine.py index 7f64dc181b9..2955d037769 100644 --- a/src/sage/combinat/finite_state_machine.py +++ b/src/sage/combinat/finite_state_machine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs sage.modules r""" Finite state machines, automata, transducers diff --git a/src/sage/combinat/finite_state_machine_generators.py b/src/sage/combinat/finite_state_machine_generators.py index 90ee5aa0b15..86307f490f9 100644 --- a/src/sage/combinat/finite_state_machine_generators.py +++ b/src/sage/combinat/finite_state_machine_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs sage.modules r""" Common Automata and Transducers (Finite State Machines Generators) diff --git a/src/sage/combinat/fqsym.py b/src/sage/combinat/fqsym.py index 98595ccfad5..fbfbf7b54bc 100644 --- a/src/sage/combinat/fqsym.py +++ b/src/sage/combinat/fqsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Free Quasi-symmetric functions diff --git a/src/sage/combinat/free_dendriform_algebra.py b/src/sage/combinat/free_dendriform_algebra.py index 0a1c4cd2e2b..900b9a7ca5d 100644 --- a/src/sage/combinat/free_dendriform_algebra.py +++ b/src/sage/combinat/free_dendriform_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Free Dendriform Algebras diff --git a/src/sage/combinat/free_module.py b/src/sage/combinat/free_module.py index 306d56f0a32..12bbd4385db 100644 --- a/src/sage/combinat/free_module.py +++ b/src/sage/combinat/free_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Free modules """ diff --git a/src/sage/combinat/free_prelie_algebra.py b/src/sage/combinat/free_prelie_algebra.py index 5454c0ca0ee..88d54b1f443 100644 --- a/src/sage/combinat/free_prelie_algebra.py +++ b/src/sage/combinat/free_prelie_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Free Pre-Lie Algebras diff --git a/src/sage/combinat/fully_commutative_elements.py b/src/sage/combinat/fully_commutative_elements.py index 9da2ee91d46..c6d072eb432 100644 --- a/src/sage/combinat/fully_commutative_elements.py +++ b/src/sage/combinat/fully_commutative_elements.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Fully commutative elements of Coxeter groups diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py index 755865bc203..949ee9c6504 100644 --- a/src/sage/combinat/fully_packed_loop.py +++ b/src/sage/combinat/fully_packed_loop.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Fully packed loops diff --git a/src/sage/combinat/gelfand_tsetlin_patterns.py b/src/sage/combinat/gelfand_tsetlin_patterns.py index ccb065167e1..354c440c58b 100644 --- a/src/sage/combinat/gelfand_tsetlin_patterns.py +++ b/src/sage/combinat/gelfand_tsetlin_patterns.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Gelfand-Tsetlin Patterns diff --git a/src/sage/combinat/graph_path.py b/src/sage/combinat/graph_path.py index bf732904ab3..2fb255579dd 100644 --- a/src/sage/combinat/graph_path.py +++ b/src/sage/combinat/graph_path.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Paths in Directed Acyclic Graphs """ diff --git a/src/sage/combinat/gray_codes.py b/src/sage/combinat/gray_codes.py index 8572fc8b183..e2508e0e01c 100644 --- a/src/sage/combinat/gray_codes.py +++ b/src/sage/combinat/gray_codes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Gray codes diff --git a/src/sage/combinat/grossman_larson_algebras.py b/src/sage/combinat/grossman_larson_algebras.py index 6520f47e2a7..db2f1de5eca 100644 --- a/src/sage/combinat/grossman_larson_algebras.py +++ b/src/sage/combinat/grossman_larson_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Grossman-Larson Hopf Algebras diff --git a/src/sage/combinat/growth.py b/src/sage/combinat/growth.py index bf2ae12b401..b940fec97b8 100644 --- a/src/sage/combinat/growth.py +++ b/src/sage/combinat/growth.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs r""" Growth diagrams and dual graded graphs diff --git a/src/sage/combinat/hall_polynomial.py b/src/sage/combinat/hall_polynomial.py index aa52259eaf0..9d2326e60f8 100644 --- a/src/sage/combinat/hall_polynomial.py +++ b/src/sage/combinat/hall_polynomial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Hall Polynomials diff --git a/src/sage/combinat/hillman_grassl.py b/src/sage/combinat/hillman_grassl.py index 1eddaffd9ce..5a85d4e48d3 100644 --- a/src/sage/combinat/hillman_grassl.py +++ b/src/sage/combinat/hillman_grassl.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" The Hillman-Grassl correspondence diff --git a/src/sage/combinat/integer_lists/__init__.py b/src/sage/combinat/integer_lists/__init__.py index b0f381d27bf..4e0c59ff8a6 100644 --- a/src/sage/combinat/integer_lists/__init__.py +++ b/src/sage/combinat/integer_lists/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from .base import IntegerListsBackend, Envelope from .lists import IntegerLists from .invlex import IntegerListsLex diff --git a/src/sage/combinat/integer_lists/base.pxd b/src/sage/combinat/integer_lists/base.pxd index 03af138ca01..3d373a64fe0 100644 --- a/src/sage/combinat/integer_lists/base.pxd +++ b/src/sage/combinat/integer_lists/base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef class Envelope(): cdef readonly sign cdef f diff --git a/src/sage/combinat/integer_lists/base.pyx b/src/sage/combinat/integer_lists/base.pyx index 0a463195426..6da2125396e 100644 --- a/src/sage/combinat/integer_lists/base.pyx +++ b/src/sage/combinat/integer_lists/base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumerated set of lists of integers with constraints: base classes diff --git a/src/sage/combinat/integer_lists/invlex.pxd b/src/sage/combinat/integer_lists/invlex.pxd index 087a4f1cc9d..143306b4448 100644 --- a/src/sage/combinat/integer_lists/invlex.pxd +++ b/src/sage/combinat/integer_lists/invlex.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.combinat.integer_lists.base cimport IntegerListsBackend cdef class IntegerListsBackend_invlex(IntegerListsBackend): cdef public bint check diff --git a/src/sage/combinat/integer_lists/invlex.pyx b/src/sage/combinat/integer_lists/invlex.pyx index b78c0a5353a..d8ab12b0a3d 100644 --- a/src/sage/combinat/integer_lists/invlex.pyx +++ b/src/sage/combinat/integer_lists/invlex.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumerated set of lists of integers with constraints, in inverse lexicographic order diff --git a/src/sage/combinat/integer_lists/lists.py b/src/sage/combinat/integer_lists/lists.py index cc2661d38fc..8e121461056 100644 --- a/src/sage/combinat/integer_lists/lists.py +++ b/src/sage/combinat/integer_lists/lists.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumerated set of lists of integers with constraints: front-end diff --git a/src/sage/combinat/integer_lists/nn.py b/src/sage/combinat/integer_lists/nn.py index 8788dbc6ca8..4329c6164d9 100644 --- a/src/sage/combinat/integer_lists/nn.py +++ b/src/sage/combinat/integer_lists/nn.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.sets.family import Family from sage.combinat.integer_lists import IntegerListsLex from sage.rings.semirings.non_negative_integer_semiring import NN diff --git a/src/sage/combinat/integer_matrices.py b/src/sage/combinat/integer_matrices.py index cefc635fbf0..238d0ef4091 100644 --- a/src/sage/combinat/integer_matrices.py +++ b/src/sage/combinat/integer_matrices.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Counting, generating, and manipulating non-negative integer matrices diff --git a/src/sage/combinat/integer_vector.py b/src/sage/combinat/integer_vector.py index 1da722d945c..61a3229e5d0 100644 --- a/src/sage/combinat/integer_vector.py +++ b/src/sage/combinat/integer_vector.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ (Non-negative) Integer vectors diff --git a/src/sage/combinat/integer_vector_weighted.py b/src/sage/combinat/integer_vector_weighted.py index 5b482f42939..7540aca9a07 100644 --- a/src/sage/combinat/integer_vector_weighted.py +++ b/src/sage/combinat/integer_vector_weighted.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Weighted Integer Vectors diff --git a/src/sage/combinat/integer_vectors_mod_permgroup.py b/src/sage/combinat/integer_vectors_mod_permgroup.py index 65b6def8d87..7877fedee44 100644 --- a/src/sage/combinat/integer_vectors_mod_permgroup.py +++ b/src/sage/combinat/integer_vectors_mod_permgroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups r""" Integer vectors modulo the action of a permutation group diff --git a/src/sage/combinat/interval_posets.py b/src/sage/combinat/interval_posets.py index 70f962f20ca..bc0cada6c37 100644 --- a/src/sage/combinat/interval_posets.py +++ b/src/sage/combinat/interval_posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Tamari Interval-posets diff --git a/src/sage/combinat/k_tableau.py b/src/sage/combinat/k_tableau.py index bbca259484e..c7d58d17686 100644 --- a/src/sage/combinat/k_tableau.py +++ b/src/sage/combinat/k_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Strong and weak tableaux diff --git a/src/sage/combinat/kazhdan_lusztig.py b/src/sage/combinat/kazhdan_lusztig.py index 25c5447e32a..11e50379d1d 100644 --- a/src/sage/combinat/kazhdan_lusztig.py +++ b/src/sage/combinat/kazhdan_lusztig.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Kazhdan-Lusztig Polynomials diff --git a/src/sage/combinat/key_polynomial.py b/src/sage/combinat/key_polynomial.py index b565b471420..43db18cc72f 100644 --- a/src/sage/combinat/key_polynomial.py +++ b/src/sage/combinat/key_polynomial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Key polynomials diff --git a/src/sage/combinat/knutson_tao_puzzles.py b/src/sage/combinat/knutson_tao_puzzles.py index e5e76ccbb57..1c0215fa093 100644 --- a/src/sage/combinat/knutson_tao_puzzles.py +++ b/src/sage/combinat/knutson_tao_puzzles.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Knutson-Tao Puzzles diff --git a/src/sage/combinat/lr_tableau.py b/src/sage/combinat/lr_tableau.py index c424dbdbb67..a94f576a134 100644 --- a/src/sage/combinat/lr_tableau.py +++ b/src/sage/combinat/lr_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Littlewood-Richardson tableaux diff --git a/src/sage/combinat/matrices/all.py b/src/sage/combinat/matrices/all.py index cca0aef31ad..0f6adbb5355 100644 --- a/src/sage/combinat/matrices/all.py +++ b/src/sage/combinat/matrices/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Combinatorics on matrices @@ -11,14 +10,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.combinat.matrices.all__sagemath_categories import * - from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.matrices.latin', ['LatinSquare', 'LatinSquare_generator']) +lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') lazy_import('sage.combinat.matrices.hadamard_matrix', ['hadamard_matrix', 'hadamard_matrix_www']) - -del install_doc -del lazy_import diff --git a/src/sage/combinat/matrices/all__sagemath_categories.py b/src/sage/combinat/matrices/all__sagemath_categories.py deleted file mode 100644 index b168b0b1127..00000000000 --- a/src/sage/combinat/matrices/all__sagemath_categories.py +++ /dev/null @@ -1,4 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') -del lazy_import diff --git a/src/sage/combinat/matrices/dancing_links.pyx b/src/sage/combinat/matrices/dancing_links.pyx index e58974c4914..0ef6eed0026 100644 --- a/src/sage/combinat/matrices/dancing_links.pyx +++ b/src/sage/combinat/matrices/dancing_links.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- # distutils: language = c++ """ Dancing Links internal pyx code diff --git a/src/sage/combinat/matrices/dlxcpp.py b/src/sage/combinat/matrices/dlxcpp.py index 7c41db0a8f7..3cdc3774d76 100644 --- a/src/sage/combinat/matrices/dlxcpp.py +++ b/src/sage/combinat/matrices/dlxcpp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Dancing links C++ wrapper """ diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 7652da0a179..14d6a30a8f5 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.graphs sage.modules r""" Hadamard matrices diff --git a/src/sage/combinat/matrices/latin.py b/src/sage/combinat/matrices/latin.py index d70f6d2d55b..cba9aefa694 100644 --- a/src/sage/combinat/matrices/latin.py +++ b/src/sage/combinat/matrices/latin.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups sage.modules r""" Latin Squares diff --git a/src/sage/combinat/misc.py b/src/sage/combinat/misc.py index 81a3b80c9c5..2a4341e8f4c 100644 --- a/src/sage/combinat/misc.py +++ b/src/sage/combinat/misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Miscellaneous """ diff --git a/src/sage/combinat/multiset_partition_into_sets_ordered.py b/src/sage/combinat/multiset_partition_into_sets_ordered.py index 0e688693f75..967f6ad93af 100755 --- a/src/sage/combinat/multiset_partition_into_sets_ordered.py +++ b/src/sage/combinat/multiset_partition_into_sets_ordered.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Ordered Multiset Partitions into Sets and the Minimaj Crystal diff --git a/src/sage/combinat/ncsf_qsym/all.py b/src/sage/combinat/ncsf_qsym/all.py index 768eb014edf..db6cb1f065e 100644 --- a/src/sage/combinat/ncsf_qsym/all.py +++ b/src/sage/combinat/ncsf_qsym/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Non-commutative symmetric functions and quasi-symmetric functions @@ -13,10 +12,5 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.combinat.ncsf_qsym.qsym', 'QuasiSymmetricFunctions') -lazy_import('sage.combinat.ncsf_qsym.ncsf', 'NonCommutativeSymmetricFunctions') - -del install_doc -del lazy_import +from .qsym import QuasiSymmetricFunctions +from .ncsf import NonCommutativeSymmetricFunctions diff --git a/src/sage/combinat/ncsf_qsym/combinatorics.py b/src/sage/combinat/ncsf_qsym/combinatorics.py index f53a782d82b..cba0de3d45b 100644 --- a/src/sage/combinat/ncsf_qsym/combinatorics.py +++ b/src/sage/combinat/ncsf_qsym/combinatorics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Common combinatorial tools diff --git a/src/sage/combinat/ncsf_qsym/generic_basis_code.py b/src/sage/combinat/ncsf_qsym/generic_basis_code.py index a11f23cdf67..4fe908d727c 100644 --- a/src/sage/combinat/ncsf_qsym/generic_basis_code.py +++ b/src/sage/combinat/ncsf_qsym/generic_basis_code.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Generic code for bases diff --git a/src/sage/combinat/ncsf_qsym/ncsf.py b/src/sage/combinat/ncsf_qsym/ncsf.py index d14f2720286..db4492da607 100644 --- a/src/sage/combinat/ncsf_qsym/ncsf.py +++ b/src/sage/combinat/ncsf_qsym/ncsf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Non-Commutative Symmetric Functions diff --git a/src/sage/combinat/ncsf_qsym/qsym.py b/src/sage/combinat/ncsf_qsym/qsym.py index 410399ddf58..de940bda556 100644 --- a/src/sage/combinat/ncsf_qsym/qsym.py +++ b/src/sage/combinat/ncsf_qsym/qsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Quasisymmetric functions diff --git a/src/sage/combinat/ncsf_qsym/tutorial.py b/src/sage/combinat/ncsf_qsym/tutorial.py index e4efe77d997..4b7f1d199ae 100644 --- a/src/sage/combinat/ncsf_qsym/tutorial.py +++ b/src/sage/combinat/ncsf_qsym/tutorial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Introduction to Quasisymmetric Functions diff --git a/src/sage/combinat/ncsym/all.py b/src/sage/combinat/ncsym/all.py index fb16bc191ce..7a174e45ccf 100644 --- a/src/sage/combinat/ncsym/all.py +++ b/src/sage/combinat/ncsym/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Symmetric functions in non-commuting variables @@ -12,10 +11,5 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.combinat.ncsym.ncsym', 'SymmetricFunctionsNonCommutingVariables') -lazy_import('sage.combinat.ncsym.dual', 'SymmetricFunctionsNonCommutingVariablesDual') - -del install_doc -del lazy_import +from .ncsym import SymmetricFunctionsNonCommutingVariables +from .dual import SymmetricFunctionsNonCommutingVariablesDual diff --git a/src/sage/combinat/ncsym/bases.py b/src/sage/combinat/ncsym/bases.py index 6fe3c6635ab..466d1ad42e5 100644 --- a/src/sage/combinat/ncsym/bases.py +++ b/src/sage/combinat/ncsym/bases.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bases for `NCSym` diff --git a/src/sage/combinat/ncsym/dual.py b/src/sage/combinat/ncsym/dual.py index db2b7350cb8..38ae7135882 100644 --- a/src/sage/combinat/ncsym/dual.py +++ b/src/sage/combinat/ncsym/dual.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Dual Symmetric Functions in Non-Commuting Variables diff --git a/src/sage/combinat/ncsym/ncsym.py b/src/sage/combinat/ncsym/ncsym.py index 5514ecd324f..8ebc0b899bd 100644 --- a/src/sage/combinat/ncsym/ncsym.py +++ b/src/sage/combinat/ncsym/ncsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Symmetric Functions in Non-Commuting Variables diff --git a/src/sage/combinat/necklace.py b/src/sage/combinat/necklace.py index abba40c9186..54a3dc992f0 100644 --- a/src/sage/combinat/necklace.py +++ b/src/sage/combinat/necklace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Necklaces diff --git a/src/sage/combinat/non_decreasing_parking_function.py b/src/sage/combinat/non_decreasing_parking_function.py index ec573aa6272..532b4bf8762 100644 --- a/src/sage/combinat/non_decreasing_parking_function.py +++ b/src/sage/combinat/non_decreasing_parking_function.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Non-Decreasing Parking Functions diff --git a/src/sage/combinat/nu_dyck_word.py b/src/sage/combinat/nu_dyck_word.py index f47fb7c63ba..ddc54a03612 100644 --- a/src/sage/combinat/nu_dyck_word.py +++ b/src/sage/combinat/nu_dyck_word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" `\nu`-Dyck Words diff --git a/src/sage/combinat/nu_tamari_lattice.py b/src/sage/combinat/nu_tamari_lattice.py index 386a36a4c1b..d28faf6c7ed 100644 --- a/src/sage/combinat/nu_tamari_lattice.py +++ b/src/sage/combinat/nu_tamari_lattice.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.combinat r""" `\nu`-Tamari lattice diff --git a/src/sage/combinat/ordered_tree.py b/src/sage/combinat/ordered_tree.py index d7b515e4f15..e46e02fc971 100644 --- a/src/sage/combinat/ordered_tree.py +++ b/src/sage/combinat/ordered_tree.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Ordered Rooted Trees diff --git a/src/sage/combinat/output.py b/src/sage/combinat/output.py index 9f33b726dd1..7f223921d7e 100644 --- a/src/sage/combinat/output.py +++ b/src/sage/combinat/output.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Output functions diff --git a/src/sage/combinat/parallelogram_polyomino.py b/src/sage/combinat/parallelogram_polyomino.py index d0c59f32bb1..53d35bca831 100644 --- a/src/sage/combinat/parallelogram_polyomino.py +++ b/src/sage/combinat/parallelogram_polyomino.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Parallelogram Polyominoes diff --git a/src/sage/combinat/parking_functions.py b/src/sage/combinat/parking_functions.py index 436f402503a..fc677e47f90 100644 --- a/src/sage/combinat/parking_functions.py +++ b/src/sage/combinat/parking_functions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Parking Functions diff --git a/src/sage/combinat/partition.py b/src/sage/combinat/partition.py index f5c83e8bb3a..cb65aec8aec 100644 --- a/src/sage/combinat/partition.py +++ b/src/sage/combinat/partition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Integer partitions diff --git a/src/sage/combinat/partition_algebra.py b/src/sage/combinat/partition_algebra.py index 586fce9d615..d1d9db36979 100644 --- a/src/sage/combinat/partition_algebra.py +++ b/src/sage/combinat/partition_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Partition/Diagram Algebras diff --git a/src/sage/combinat/partition_kleshchev.py b/src/sage/combinat/partition_kleshchev.py index bcf454ad36e..44204aad33b 100644 --- a/src/sage/combinat/partition_kleshchev.py +++ b/src/sage/combinat/partition_kleshchev.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Kleshchev partitions diff --git a/src/sage/combinat/partition_shifting_algebras.py b/src/sage/combinat/partition_shifting_algebras.py index c32dad544af..90f1f10d59f 100644 --- a/src/sage/combinat/partition_shifting_algebras.py +++ b/src/sage/combinat/partition_shifting_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Partition Shifting Algebras diff --git a/src/sage/combinat/partition_tuple.py b/src/sage/combinat/partition_tuple.py index c0eafc6c14d..182c0b8813d 100644 --- a/src/sage/combinat/partition_tuple.py +++ b/src/sage/combinat/partition_tuple.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Partition tuples diff --git a/src/sage/combinat/partitions.pyx b/src/sage/combinat/partitions.pyx index fe4c5c3b65d..c461797067c 100644 --- a/src/sage/combinat/partitions.pyx +++ b/src/sage/combinat/partitions.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Iterators over the partitions of an integer diff --git a/src/sage/combinat/path_tableaux/all.py b/src/sage/combinat/path_tableaux/all.py index 38c8bbbc181..42a2e8ca4a5 100644 --- a/src/sage/combinat/path_tableaux/all.py +++ b/src/sage/combinat/path_tableaux/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Path tableaux @@ -11,4 +10,3 @@ # install the docstring of this module to the containing package from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -del install_doc diff --git a/src/sage/combinat/path_tableaux/catalog.py b/src/sage/combinat/path_tableaux/catalog.py index 77cd5a33722..0605c6da583 100644 --- a/src/sage/combinat/path_tableaux/catalog.py +++ b/src/sage/combinat/path_tableaux/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Catalog of Path Tableaux diff --git a/src/sage/combinat/path_tableaux/dyck_path.py b/src/sage/combinat/path_tableaux/dyck_path.py index 0286b65e827..c3c24929e99 100644 --- a/src/sage/combinat/path_tableaux/dyck_path.py +++ b/src/sage/combinat/path_tableaux/dyck_path.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Dyck Paths diff --git a/src/sage/combinat/path_tableaux/frieze.py b/src/sage/combinat/path_tableaux/frieze.py index 63f0131b2d7..7e667743e4a 100644 --- a/src/sage/combinat/path_tableaux/frieze.py +++ b/src/sage/combinat/path_tableaux/frieze.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Frieze Patterns diff --git a/src/sage/combinat/path_tableaux/path_tableau.py b/src/sage/combinat/path_tableaux/path_tableau.py index afc2a7cfba6..66bec5fe5d2 100644 --- a/src/sage/combinat/path_tableaux/path_tableau.py +++ b/src/sage/combinat/path_tableaux/path_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Path Tableaux diff --git a/src/sage/combinat/path_tableaux/semistandard.py b/src/sage/combinat/path_tableaux/semistandard.py index 394b2ebede7..040710d48f0 100644 --- a/src/sage/combinat/path_tableaux/semistandard.py +++ b/src/sage/combinat/path_tableaux/semistandard.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Semistandard Tableaux ===================== diff --git a/src/sage/combinat/perfect_matching.py b/src/sage/combinat/perfect_matching.py index a1004d66429..84e481cb621 100644 --- a/src/sage/combinat/perfect_matching.py +++ b/src/sage/combinat/perfect_matching.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Perfect matchings diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index 0a7b7f851ae..3919d9866da 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Permutations diff --git a/src/sage/combinat/permutation_cython.pxd b/src/sage/combinat/permutation_cython.pxd index 45e190dc059..094dafc8ddc 100644 --- a/src/sage/combinat/permutation_cython.pxd +++ b/src/sage/combinat/permutation_cython.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from cpython.array cimport array cdef void reset_swap(int n, int *c, int *o) noexcept diff --git a/src/sage/combinat/permutation_cython.pyx b/src/sage/combinat/permutation_cython.pyx index 38bfe1ec8a5..d16a0b175a9 100644 --- a/src/sage/combinat/permutation_cython.pyx +++ b/src/sage/combinat/permutation_cython.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Permutations (Cython file) diff --git a/src/sage/combinat/plane_partition.py b/src/sage/combinat/plane_partition.py index 58ddb02d616..f4fe1286cef 100644 --- a/src/sage/combinat/plane_partition.py +++ b/src/sage/combinat/plane_partition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Plane Partitions diff --git a/src/sage/combinat/posets/all.py b/src/sage/combinat/posets/all.py index f481f16e446..f7f8bdcc7fc 100644 --- a/src/sage/combinat/posets/all.py +++ b/src/sage/combinat/posets/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Posets @@ -37,10 +36,8 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.combinat.posets.posets import Poset +from .posets import Poset -from sage.combinat.posets.lattices import LatticePoset, MeetSemilattice, JoinSemilattice +from .lattices import LatticePoset, MeetSemilattice, JoinSemilattice -from sage.combinat.posets.poset_examples import posets, Posets - -del install_doc +from .poset_examples import posets, Posets diff --git a/src/sage/combinat/posets/all__sagemath_flint.py b/src/sage/combinat/posets/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/combinat/posets/cartesian_product.py b/src/sage/combinat/posets/cartesian_product.py index 12322b39274..325789a6269 100644 --- a/src/sage/combinat/posets/cartesian_product.py +++ b/src/sage/combinat/posets/cartesian_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Cartesian products of Posets diff --git a/src/sage/combinat/posets/d_complete.py b/src/sage/combinat/posets/d_complete.py index 9d2a6ca2ae3..aa3c527ef8f 100644 --- a/src/sage/combinat/posets/d_complete.py +++ b/src/sage/combinat/posets/d_complete.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.combinat sage.modules r""" D-Complete Posets diff --git a/src/sage/combinat/posets/elements.py b/src/sage/combinat/posets/elements.py index 97de070ceb9..5d033c5c26a 100644 --- a/src/sage/combinat/posets/elements.py +++ b/src/sage/combinat/posets/elements.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.modules r""" Elements of posets, lattices, semilattices, etc. diff --git a/src/sage/combinat/posets/forest.py b/src/sage/combinat/posets/forest.py index 73b97c8d1f4..f730b4147de 100644 --- a/src/sage/combinat/posets/forest.py +++ b/src/sage/combinat/posets/forest.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Forest Posets diff --git a/src/sage/combinat/posets/hasse_cython.pyx b/src/sage/combinat/posets/hasse_cython.pyx index f53b47a878c..2048febd192 100644 --- a/src/sage/combinat/posets/hasse_cython.pyx +++ b/src/sage/combinat/posets/hasse_cython.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Some fast computations for finite posets diff --git a/src/sage/combinat/posets/hasse_cython_flint.pyx b/src/sage/combinat/posets/hasse_cython_flint.pyx index 79e1ccfaaed..5d2c5b967ae 100644 --- a/src/sage/combinat/posets/hasse_cython_flint.pyx +++ b/src/sage/combinat/posets/hasse_cython_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # cython: binding=True # sage.doctest: needs sage.libs.flint sage.graphs sage.modules r""" diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index d8d25a11fa5..3622c934234 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Hasse diagrams of posets diff --git a/src/sage/combinat/posets/incidence_algebras.py b/src/sage/combinat/posets/incidence_algebras.py index aef6d739669..3fc3f2a0b76 100644 --- a/src/sage/combinat/posets/incidence_algebras.py +++ b/src/sage/combinat/posets/incidence_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.modules r""" Incidence Algebras diff --git a/src/sage/combinat/posets/lattices.py b/src/sage/combinat/posets/lattices.py index 74fc21a48cc..b626b2eb81f 100644 --- a/src/sage/combinat/posets/lattices.py +++ b/src/sage/combinat/posets/lattices.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.modules r""" Finite lattices and semilattices diff --git a/src/sage/combinat/posets/linear_extension_iterator.pyx b/src/sage/combinat/posets/linear_extension_iterator.pyx index dbd927e8956..142287d88c2 100644 --- a/src/sage/combinat/posets/linear_extension_iterator.pyx +++ b/src/sage/combinat/posets/linear_extension_iterator.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Fast linear extension iterator diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index b47821257f9..640dff1e708 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Linear Extensions of Posets diff --git a/src/sage/combinat/posets/mobile.py b/src/sage/combinat/posets/mobile.py index 3ae921afd97..5e18f5c4856 100644 --- a/src/sage/combinat/posets/mobile.py +++ b/src/sage/combinat/posets/mobile.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Mobile posets """ diff --git a/src/sage/combinat/posets/moebius_algebra.py b/src/sage/combinat/posets/moebius_algebra.py index 8239cebda60..5a8074c3272 100644 --- a/src/sage/combinat/posets/moebius_algebra.py +++ b/src/sage/combinat/posets/moebius_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.modules r""" Möbius Algebras diff --git a/src/sage/combinat/posets/poset_examples.py b/src/sage/combinat/posets/poset_examples.py index 0b9503cf32c..ae6887e5e89 100644 --- a/src/sage/combinat/posets/poset_examples.py +++ b/src/sage/combinat/posets/poset_examples.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.combinat sage.modules r""" Catalog of posets and lattices diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/posets.py index de8f9028545..bea6feab369 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs sage.modules r""" Finite posets diff --git a/src/sage/combinat/q_analogues.py b/src/sage/combinat/q_analogues.py index 1c6bb90ea46..561372ff2b0 100644 --- a/src/sage/combinat/q_analogues.py +++ b/src/sage/combinat/q_analogues.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" `q`-Analogues """ diff --git a/src/sage/combinat/q_bernoulli.pyx b/src/sage/combinat/q_bernoulli.pyx index ec22bcdcdd9..854a80190f3 100644 --- a/src/sage/combinat/q_bernoulli.pyx +++ b/src/sage/combinat/q_bernoulli.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ `q`-Bernoulli Numbers and Polynomials """ diff --git a/src/sage/combinat/quickref.py b/src/sage/combinat/quickref.py index 17ca1fd9d47..ee7d9ca8ec1 100644 --- a/src/sage/combinat/quickref.py +++ b/src/sage/combinat/quickref.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Combinatorics quickref diff --git a/src/sage/combinat/ranker.py b/src/sage/combinat/ranker.py index feb8409b6f4..d56dbd54f45 100644 --- a/src/sage/combinat/ranker.py +++ b/src/sage/combinat/ranker.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Rankers """ diff --git a/src/sage/combinat/recognizable_series.py b/src/sage/combinat/recognizable_series.py index 2f2f1c2b331..8194e695d13 100644 --- a/src/sage/combinat/recognizable_series.py +++ b/src/sage/combinat/recognizable_series.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Recognizable Series diff --git a/src/sage/combinat/regular_sequence.py b/src/sage/combinat/regular_sequence.py index 6dab274aa98..6822fc7dd3d 100644 --- a/src/sage/combinat/regular_sequence.py +++ b/src/sage/combinat/regular_sequence.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules sage.symbolic r""" `k`-regular sequences diff --git a/src/sage/combinat/restricted_growth.py b/src/sage/combinat/restricted_growth.py index 37e33b3688c..b638356e4db 100644 --- a/src/sage/combinat/restricted_growth.py +++ b/src/sage/combinat/restricted_growth.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Restricted growth arrays diff --git a/src/sage/combinat/ribbon.py b/src/sage/combinat/ribbon.py index 557ed1aa9a6..6c662f505c7 100644 --- a/src/sage/combinat/ribbon.py +++ b/src/sage/combinat/ribbon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Ribbons """ diff --git a/src/sage/combinat/ribbon_shaped_tableau.py b/src/sage/combinat/ribbon_shaped_tableau.py index 3effad089c1..84458d104f3 100644 --- a/src/sage/combinat/ribbon_shaped_tableau.py +++ b/src/sage/combinat/ribbon_shaped_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Ribbon Shaped Tableaux """ diff --git a/src/sage/combinat/ribbon_tableau.py b/src/sage/combinat/ribbon_tableau.py index 67d8485c315..db82cbfd660 100644 --- a/src/sage/combinat/ribbon_tableau.py +++ b/src/sage/combinat/ribbon_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Ribbon Tableaux """ diff --git a/src/sage/combinat/rigged_configurations/all.py b/src/sage/combinat/rigged_configurations/all.py index 5c22fa880ba..36a10774a89 100644 --- a/src/sage/combinat/rigged_configurations/all.py +++ b/src/sage/combinat/rigged_configurations/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Rigged configurations @@ -42,5 +41,3 @@ lazy_import('sage.combinat.rigged_configurations.rigged_configurations', 'RiggedConfigurations') -del lazy_import -del install_doc diff --git a/src/sage/combinat/rigged_configurations/bij_abstract_class.py b/src/sage/combinat/rigged_configurations/bij_abstract_class.py index 5c553841531..520ce241d57 100644 --- a/src/sage/combinat/rigged_configurations/bij_abstract_class.py +++ b/src/sage/combinat/rigged_configurations/bij_abstract_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Abstract classes for the rigged configuration bijections diff --git a/src/sage/combinat/rigged_configurations/bij_infinity.py b/src/sage/combinat/rigged_configurations/bij_infinity.py index 03ad4f03aeb..0fd8ee7fdc9 100644 --- a/src/sage/combinat/rigged_configurations/bij_infinity.py +++ b/src/sage/combinat/rigged_configurations/bij_infinity.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection between rigged configurations for `B(\infty)` and marginally large tableaux diff --git a/src/sage/combinat/rigged_configurations/bij_type_A.py b/src/sage/combinat/rigged_configurations/bij_type_A.py index 6a5dbdb7e02..2a623f322da 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_A.py +++ b/src/sage/combinat/rigged_configurations/bij_type_A.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `A_n^{(1)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_A2_dual.py b/src/sage/combinat/rigged_configurations/bij_type_A2_dual.py index 080b73e900d..ceb6ad8f1b8 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_A2_dual.py +++ b/src/sage/combinat/rigged_configurations/bij_type_A2_dual.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `A_{2n}^{(2)\dagger}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_A2_even.py b/src/sage/combinat/rigged_configurations/bij_type_A2_even.py index b28430bd836..8fa552a1077 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_A2_even.py +++ b/src/sage/combinat/rigged_configurations/bij_type_A2_even.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `A_{2n}^{(2)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_A2_odd.py b/src/sage/combinat/rigged_configurations/bij_type_A2_odd.py index cbedbae3fe6..ea7862ef3ef 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_A2_odd.py +++ b/src/sage/combinat/rigged_configurations/bij_type_A2_odd.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `A_{2n-1}^{(2)}`. diff --git a/src/sage/combinat/rigged_configurations/bij_type_B.py b/src/sage/combinat/rigged_configurations/bij_type_B.py index 46889635bd6..51fd8f198bc 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_B.py +++ b/src/sage/combinat/rigged_configurations/bij_type_B.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `B_n^{(1)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_C.py b/src/sage/combinat/rigged_configurations/bij_type_C.py index 182f178230a..9e0997e1479 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_C.py +++ b/src/sage/combinat/rigged_configurations/bij_type_C.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `C_n^{(1)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_D.py b/src/sage/combinat/rigged_configurations/bij_type_D.py index 9b102414dfd..ab9b41b89bd 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_D.py +++ b/src/sage/combinat/rigged_configurations/bij_type_D.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `D_n^{(1)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_D_tri.py b/src/sage/combinat/rigged_configurations/bij_type_D_tri.py index 37770d2a07b..b82ff955642 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_D_tri.py +++ b/src/sage/combinat/rigged_configurations/bij_type_D_tri.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `D_4^{(3)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_D_twisted.py b/src/sage/combinat/rigged_configurations/bij_type_D_twisted.py index 431e137223c..ce177ffb468 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_D_twisted.py +++ b/src/sage/combinat/rigged_configurations/bij_type_D_twisted.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `D_{n+1}^{(2)}` diff --git a/src/sage/combinat/rigged_configurations/bij_type_E67.py b/src/sage/combinat/rigged_configurations/bij_type_E67.py index 7c14ca00739..af59d3048f5 100644 --- a/src/sage/combinat/rigged_configurations/bij_type_E67.py +++ b/src/sage/combinat/rigged_configurations/bij_type_E67.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection classes for type `E_{6,7}^{(1)}` diff --git a/src/sage/combinat/rigged_configurations/bijection.py b/src/sage/combinat/rigged_configurations/bijection.py index e236611bfd2..850270930a6 100644 --- a/src/sage/combinat/rigged_configurations/bijection.py +++ b/src/sage/combinat/rigged_configurations/bijection.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Bijection between rigged configurations and KR tableaux diff --git a/src/sage/combinat/rigged_configurations/kleber_tree.py b/src/sage/combinat/rigged_configurations/kleber_tree.py index cebc4b277ea..c3a2bbeaf0a 100644 --- a/src/sage/combinat/rigged_configurations/kleber_tree.py +++ b/src/sage/combinat/rigged_configurations/kleber_tree.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Kleber Trees diff --git a/src/sage/combinat/rigged_configurations/kr_tableaux.py b/src/sage/combinat/rigged_configurations/kr_tableaux.py index 7073cbb3a05..8bdc1d275b9 100644 --- a/src/sage/combinat/rigged_configurations/kr_tableaux.py +++ b/src/sage/combinat/rigged_configurations/kr_tableaux.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Kirillov-Reshetikhin Tableaux diff --git a/src/sage/combinat/rigged_configurations/rc_crystal.py b/src/sage/combinat/rigged_configurations/rc_crystal.py index 8e171da5871..171928862ef 100644 --- a/src/sage/combinat/rigged_configurations/rc_crystal.py +++ b/src/sage/combinat/rigged_configurations/rc_crystal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Crystal of Rigged Configurations diff --git a/src/sage/combinat/rigged_configurations/rc_infinity.py b/src/sage/combinat/rigged_configurations/rc_infinity.py index d5dc63dfc49..5d5ec854771 100644 --- a/src/sage/combinat/rigged_configurations/rc_infinity.py +++ b/src/sage/combinat/rigged_configurations/rc_infinity.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Rigged Configurations of `\mathcal{B}(\infty)` diff --git a/src/sage/combinat/rigged_configurations/rigged_configuration_element.py b/src/sage/combinat/rigged_configurations/rigged_configuration_element.py index 0f8572f04cf..8e1e76ed41d 100644 --- a/src/sage/combinat/rigged_configurations/rigged_configuration_element.py +++ b/src/sage/combinat/rigged_configurations/rigged_configuration_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Rigged Configuration Elements diff --git a/src/sage/combinat/rigged_configurations/rigged_configurations.py b/src/sage/combinat/rigged_configurations/rigged_configurations.py index e55947bb1f3..33de9927c12 100644 --- a/src/sage/combinat/rigged_configurations/rigged_configurations.py +++ b/src/sage/combinat/rigged_configurations/rigged_configurations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Rigged Configurations diff --git a/src/sage/combinat/rigged_configurations/rigged_partition.pxd b/src/sage/combinat/rigged_configurations/rigged_partition.pxd index 1da1c05cf64..e99258f33b2 100644 --- a/src/sage/combinat/rigged_configurations/rigged_partition.pxd +++ b/src/sage/combinat/rigged_configurations/rigged_partition.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from sage.structure.sage_object cimport SageObject cdef class RiggedPartition(SageObject): diff --git a/src/sage/combinat/rigged_configurations/rigged_partition.pyx b/src/sage/combinat/rigged_configurations/rigged_partition.pyx index 77618dc2afc..97ff48d7918 100644 --- a/src/sage/combinat/rigged_configurations/rigged_partition.pyx +++ b/src/sage/combinat/rigged_configurations/rigged_partition.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Rigged Partitions diff --git a/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py b/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py index f78e8821dc1..a2ccd72e902 100644 --- a/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py +++ b/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Tensor Product of Kirillov-Reshetikhin Tableaux diff --git a/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py b/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py index ed33700bb28..8db94443af2 100644 --- a/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py +++ b/src/sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Tensor Product of Kirillov-Reshetikhin Tableaux Elements diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 645b64640c4..263a4d916d2 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root Systems @@ -122,12 +121,12 @@ from sage.misc.lazy_import import lazy_import -from sage.combinat.root_system.cartan_type import CartanType -lazy_import('sage.combinat.root_system.dynkin_diagram', 'DynkinDiagram') -lazy_import('sage.combinat.root_system.cartan_matrix', 'CartanMatrix') -lazy_import('sage.combinat.root_system.coxeter_matrix', 'CoxeterMatrix') -from sage.combinat.root_system.coxeter_type import CoxeterType -from sage.combinat.root_system.root_system import RootSystem, WeylDim +from .cartan_type import CartanType +from .dynkin_diagram import DynkinDiagram +from .cartan_matrix import CartanMatrix +from .coxeter_matrix import CoxeterMatrix +from .coxeter_type import CoxeterType +from .root_system import RootSystem, WeylDim lazy_import('sage.combinat.root_system.weyl_group', ['WeylGroup', 'WeylGroupElement']) lazy_import('sage.combinat.root_system.reflection_group_real', @@ -137,11 +136,7 @@ lazy_import('sage.combinat.root_system.coxeter_group', 'CoxeterGroup') lazy_import('sage.combinat.root_system.weyl_characters', ['WeylCharacterRing', 'WeightRing']) -from sage.combinat.root_system.branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule - -lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', - 'NonSymmetricMacdonaldPolynomials') -lazy_import('sage.combinat.root_system.integrable_representations', - 'IntegrableRepresentation') -del lazy_import -del install_doc +from .branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule + +lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') +lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') diff --git a/src/sage/combinat/root_system/all__sagemath_gap.py b/src/sage/combinat/root_system/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/combinat/root_system/ambient_space.py b/src/sage/combinat/root_system/ambient_space.py index 54b1461762b..a8aa765ee5d 100644 --- a/src/sage/combinat/root_system/ambient_space.py +++ b/src/sage/combinat/root_system/ambient_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Ambient lattices and ambient spaces """ diff --git a/src/sage/combinat/root_system/associahedron.py b/src/sage/combinat/root_system/associahedron.py index 8f111dbbf0c..448b1009036 100644 --- a/src/sage/combinat/root_system/associahedron.py +++ b/src/sage/combinat/root_system/associahedron.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.geometry.polyhedron r""" Associahedron diff --git a/src/sage/combinat/root_system/braid_move_calculator.py b/src/sage/combinat/root_system/braid_move_calculator.py index aa89a038084..38931a00229 100644 --- a/src/sage/combinat/root_system/braid_move_calculator.py +++ b/src/sage/combinat/root_system/braid_move_calculator.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.gap """ Braid Move Calculator diff --git a/src/sage/combinat/root_system/braid_orbit.pyx b/src/sage/combinat/root_system/braid_orbit.pyx index e43a69d3cc0..5107038df4c 100644 --- a/src/sage/combinat/root_system/braid_orbit.pyx +++ b/src/sage/combinat/root_system/braid_orbit.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # cython: wraparound=False, boundscheck=False """ Braid Orbit diff --git a/src/sage/combinat/root_system/branching_rules.py b/src/sage/combinat/root_system/branching_rules.py index 25c1644e9f0..b2ace92a56d 100644 --- a/src/sage/combinat/root_system/branching_rules.py +++ b/src/sage/combinat/root_system/branching_rules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.gap """ Branching Rules diff --git a/src/sage/combinat/root_system/cartan_matrix.py b/src/sage/combinat/root_system/cartan_matrix.py index e1d266159c3..23da5ab2e4b 100644 --- a/src/sage/combinat/root_system/cartan_matrix.py +++ b/src/sage/combinat/root_system/cartan_matrix.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Cartan matrices diff --git a/src/sage/combinat/root_system/cartan_type.py b/src/sage/combinat/root_system/cartan_type.py index d8c79be478d..e4526d5f079 100644 --- a/src/sage/combinat/root_system/cartan_type.py +++ b/src/sage/combinat/root_system/cartan_type.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Cartan types diff --git a/src/sage/combinat/root_system/coxeter_group.py b/src/sage/combinat/root_system/coxeter_group.py index b7b7deb7fe4..012daffdf87 100644 --- a/src/sage/combinat/root_system/coxeter_group.py +++ b/src/sage/combinat/root_system/coxeter_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Coxeter Groups """ diff --git a/src/sage/combinat/root_system/coxeter_matrix.py b/src/sage/combinat/root_system/coxeter_matrix.py index d4e97a18b49..4ac8ea335ed 100644 --- a/src/sage/combinat/root_system/coxeter_matrix.py +++ b/src/sage/combinat/root_system/coxeter_matrix.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs """ Coxeter Matrices diff --git a/src/sage/combinat/root_system/coxeter_type.py b/src/sage/combinat/root_system/coxeter_type.py index fc4e0d824bf..88a53e4bd98 100644 --- a/src/sage/combinat/root_system/coxeter_type.py +++ b/src/sage/combinat/root_system/coxeter_type.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Coxeter Types """ diff --git a/src/sage/combinat/root_system/dynkin_diagram.py b/src/sage/combinat/root_system/dynkin_diagram.py index 4f5ca0c1e11..f5aa29ba129 100644 --- a/src/sage/combinat/root_system/dynkin_diagram.py +++ b/src/sage/combinat/root_system/dynkin_diagram.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.graphs """ Dynkin diagrams diff --git a/src/sage/combinat/root_system/extended_affine_weyl_group.py b/src/sage/combinat/root_system/extended_affine_weyl_group.py index f257dc7e455..e81477653c2 100644 --- a/src/sage/combinat/root_system/extended_affine_weyl_group.py +++ b/src/sage/combinat/root_system/extended_affine_weyl_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.gap r""" Extended Affine Weyl Groups diff --git a/src/sage/combinat/root_system/fundamental_group.py b/src/sage/combinat/root_system/fundamental_group.py index 2024231334e..8905471a5ab 100644 --- a/src/sage/combinat/root_system/fundamental_group.py +++ b/src/sage/combinat/root_system/fundamental_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs sage.groups r""" Fundamental Group of an Extended Affine Weyl Group diff --git a/src/sage/combinat/root_system/hecke_algebra_representation.py b/src/sage/combinat/root_system/hecke_algebra_representation.py index dea69183500..1dc8d16ad59 100644 --- a/src/sage/combinat/root_system/hecke_algebra_representation.py +++ b/src/sage/combinat/root_system/hecke_algebra_representation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.gap sage.groups r""" Hecke algebra representations diff --git a/src/sage/combinat/root_system/integrable_representations.py b/src/sage/combinat/root_system/integrable_representations.py index 10cd1427782..a1cb764e19a 100644 --- a/src/sage/combinat/root_system/integrable_representations.py +++ b/src/sage/combinat/root_system/integrable_representations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs sage.modules """ Integrable Representations of Affine Lie Algebras diff --git a/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py b/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py index a4c211f12e4..34e7e0817f1 100644 --- a/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +++ b/src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs r""" Nonsymmetric Macdonald polynomials diff --git a/src/sage/combinat/root_system/pieri_factors.py b/src/sage/combinat/root_system/pieri_factors.py index ee8e22e1f66..28b26d8bf6f 100644 --- a/src/sage/combinat/root_system/pieri_factors.py +++ b/src/sage/combinat/root_system/pieri_factors.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.gap r""" Pieri Factors diff --git a/src/sage/combinat/root_system/plot.py b/src/sage/combinat/root_system/plot.py index 4ace75da390..5d591febe43 100644 --- a/src/sage/combinat/root_system/plot.py +++ b/src/sage/combinat/root_system/plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.geometry.polyhedron sage.plot sage.symbolic r""" Tutorial: visualizing root systems diff --git a/src/sage/combinat/root_system/reflection_group_c.pyx b/src/sage/combinat/root_system/reflection_group_c.pyx index 0a5c4d6792a..dbfc76282f8 100644 --- a/src/sage/combinat/root_system/reflection_group_c.pyx +++ b/src/sage/combinat/root_system/reflection_group_c.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # cython: wraparound=False, boundscheck=False # sage.doctest: needs sage.graphs r""" diff --git a/src/sage/combinat/root_system/reflection_group_complex.py b/src/sage/combinat/root_system/reflection_group_complex.py index 91405dfb630..0b80aa73a71 100644 --- a/src/sage/combinat/root_system/reflection_group_complex.py +++ b/src/sage/combinat/root_system/reflection_group_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: optional - gap3, needs sage.libs.gap r""" Finite complex reflection groups diff --git a/src/sage/combinat/root_system/reflection_group_element.pxd b/src/sage/combinat/root_system/reflection_group_element.pxd index 8c2e98cbb2a..218dd6c2575 100644 --- a/src/sage/combinat/root_system/reflection_group_element.pxd +++ b/src/sage/combinat/root_system/reflection_group_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.groups.perm_gps.permgroup_element cimport PermutationGroupElement cdef class ComplexReflectionGroupElement(PermutationGroupElement): diff --git a/src/sage/combinat/root_system/reflection_group_element.pyx b/src/sage/combinat/root_system/reflection_group_element.pyx index 42912520be8..3d81a84ff4b 100644 --- a/src/sage/combinat/root_system/reflection_group_element.pyx +++ b/src/sage/combinat/root_system/reflection_group_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Reflection group elements diff --git a/src/sage/combinat/root_system/reflection_group_real.py b/src/sage/combinat/root_system/reflection_group_real.py index 7cdf6216596..8ae2acee1c8 100644 --- a/src/sage/combinat/root_system/reflection_group_real.py +++ b/src/sage/combinat/root_system/reflection_group_real.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: optional - gap3 r""" Finite real reflection groups diff --git a/src/sage/combinat/root_system/root_lattice_realization_algebras.py b/src/sage/combinat/root_system/root_lattice_realization_algebras.py index adac4a1090b..30251e983a7 100644 --- a/src/sage/combinat/root_system/root_lattice_realization_algebras.py +++ b/src/sage/combinat/root_system/root_lattice_realization_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Group algebras of root lattice realizations """ diff --git a/src/sage/combinat/root_system/root_lattice_realizations.py b/src/sage/combinat/root_system/root_lattice_realizations.py index ea7a29e0d9c..ea1f4d285b2 100644 --- a/src/sage/combinat/root_system/root_lattice_realizations.py +++ b/src/sage/combinat/root_system/root_lattice_realizations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root lattice realizations """ diff --git a/src/sage/combinat/root_system/root_space.py b/src/sage/combinat/root_system/root_space.py index a6436855d98..a375b3b8074 100644 --- a/src/sage/combinat/root_system/root_space.py +++ b/src/sage/combinat/root_system/root_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root lattices and root spaces """ diff --git a/src/sage/combinat/root_system/root_system.py b/src/sage/combinat/root_system/root_system.py index e3d5e0048bd..c80cffbdb87 100644 --- a/src/sage/combinat/root_system/root_system.py +++ b/src/sage/combinat/root_system/root_system.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Root systems ============ diff --git a/src/sage/combinat/root_system/type_A.py b/src/sage/combinat/root_system/type_A.py index 6f9ba424e59..48d1474c1f4 100644 --- a/src/sage/combinat/root_system/type_A.py +++ b/src/sage/combinat/root_system/type_A.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type A """ diff --git a/src/sage/combinat/root_system/type_A_affine.py b/src/sage/combinat/root_system/type_A_affine.py index cbd0b2798a4..57ed18afd01 100644 --- a/src/sage/combinat/root_system/type_A_affine.py +++ b/src/sage/combinat/root_system/type_A_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type A affine """ diff --git a/src/sage/combinat/root_system/type_A_infinity.py b/src/sage/combinat/root_system/type_A_infinity.py index 9b7a2c3a112..9e0f4711ccd 100644 --- a/src/sage/combinat/root_system/type_A_infinity.py +++ b/src/sage/combinat/root_system/type_A_infinity.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type A infinity """ diff --git a/src/sage/combinat/root_system/type_B.py b/src/sage/combinat/root_system/type_B.py index 2e59dec208f..8e9cb6e75a5 100644 --- a/src/sage/combinat/root_system/type_B.py +++ b/src/sage/combinat/root_system/type_B.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type B """ diff --git a/src/sage/combinat/root_system/type_BC_affine.py b/src/sage/combinat/root_system/type_BC_affine.py index 3dd5c47a511..740dfa2e5f3 100644 --- a/src/sage/combinat/root_system/type_BC_affine.py +++ b/src/sage/combinat/root_system/type_BC_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type BC affine """ diff --git a/src/sage/combinat/root_system/type_B_affine.py b/src/sage/combinat/root_system/type_B_affine.py index 0f6a07310e6..047144f02d6 100644 --- a/src/sage/combinat/root_system/type_B_affine.py +++ b/src/sage/combinat/root_system/type_B_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type B affine """ diff --git a/src/sage/combinat/root_system/type_C.py b/src/sage/combinat/root_system/type_C.py index fdd1426c107..8c7ebce3359 100644 --- a/src/sage/combinat/root_system/type_C.py +++ b/src/sage/combinat/root_system/type_C.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type C """ diff --git a/src/sage/combinat/root_system/type_C_affine.py b/src/sage/combinat/root_system/type_C_affine.py index cdb2763f75b..adaf5c77562 100644 --- a/src/sage/combinat/root_system/type_C_affine.py +++ b/src/sage/combinat/root_system/type_C_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type C affine """ diff --git a/src/sage/combinat/root_system/type_D.py b/src/sage/combinat/root_system/type_D.py index b116f2e7979..5f1469e48a8 100644 --- a/src/sage/combinat/root_system/type_D.py +++ b/src/sage/combinat/root_system/type_D.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type D """ diff --git a/src/sage/combinat/root_system/type_D_affine.py b/src/sage/combinat/root_system/type_D_affine.py index b33f999c56c..f77204e4a01 100644 --- a/src/sage/combinat/root_system/type_D_affine.py +++ b/src/sage/combinat/root_system/type_D_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type D affine """ diff --git a/src/sage/combinat/root_system/type_E.py b/src/sage/combinat/root_system/type_E.py index 1720211b977..22e81d52b34 100644 --- a/src/sage/combinat/root_system/type_E.py +++ b/src/sage/combinat/root_system/type_E.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type E """ diff --git a/src/sage/combinat/root_system/type_E_affine.py b/src/sage/combinat/root_system/type_E_affine.py index 47ae656d984..3268d0603e5 100644 --- a/src/sage/combinat/root_system/type_E_affine.py +++ b/src/sage/combinat/root_system/type_E_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type E affine """ diff --git a/src/sage/combinat/root_system/type_F.py b/src/sage/combinat/root_system/type_F.py index 699bd011188..5d699d31c5a 100644 --- a/src/sage/combinat/root_system/type_F.py +++ b/src/sage/combinat/root_system/type_F.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type F """ diff --git a/src/sage/combinat/root_system/type_F_affine.py b/src/sage/combinat/root_system/type_F_affine.py index ee2ccfe3275..3d2dc8350ee 100644 --- a/src/sage/combinat/root_system/type_F_affine.py +++ b/src/sage/combinat/root_system/type_F_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type F affine """ diff --git a/src/sage/combinat/root_system/type_G.py b/src/sage/combinat/root_system/type_G.py index bc4c065d715..a2a1612f8df 100644 --- a/src/sage/combinat/root_system/type_G.py +++ b/src/sage/combinat/root_system/type_G.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type G """ diff --git a/src/sage/combinat/root_system/type_G_affine.py b/src/sage/combinat/root_system/type_G_affine.py index e7321b348c2..582f7d9ed03 100644 --- a/src/sage/combinat/root_system/type_G_affine.py +++ b/src/sage/combinat/root_system/type_G_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for (untwisted) type G affine """ diff --git a/src/sage/combinat/root_system/type_H.py b/src/sage/combinat/root_system/type_H.py index 8ad752fb01a..44f4b15db55 100644 --- a/src/sage/combinat/root_system/type_H.py +++ b/src/sage/combinat/root_system/type_H.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type H """ diff --git a/src/sage/combinat/root_system/type_I.py b/src/sage/combinat/root_system/type_I.py index 66876b41e55..76a24817bf9 100644 --- a/src/sage/combinat/root_system/type_I.py +++ b/src/sage/combinat/root_system/type_I.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type I """ diff --git a/src/sage/combinat/root_system/type_Q.py b/src/sage/combinat/root_system/type_Q.py index 4184b396d75..b2aa3748e71 100644 --- a/src/sage/combinat/root_system/type_Q.py +++ b/src/sage/combinat/root_system/type_Q.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for type Q """ diff --git a/src/sage/combinat/root_system/type_affine.py b/src/sage/combinat/root_system/type_affine.py index cf28cf89d8b..f903f40bf92 100644 --- a/src/sage/combinat/root_system/type_affine.py +++ b/src/sage/combinat/root_system/type_affine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for affine Cartan types """ diff --git a/src/sage/combinat/root_system/type_dual.py b/src/sage/combinat/root_system/type_dual.py index 05d936adeb4..d7ec7e262a3 100644 --- a/src/sage/combinat/root_system/type_dual.py +++ b/src/sage/combinat/root_system/type_dual.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for dual Cartan types """ diff --git a/src/sage/combinat/root_system/type_folded.py b/src/sage/combinat/root_system/type_folded.py index b3be9273f5e..58f4911c361 100644 --- a/src/sage/combinat/root_system/type_folded.py +++ b/src/sage/combinat/root_system/type_folded.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Root system data for folded Cartan types diff --git a/src/sage/combinat/root_system/type_marked.py b/src/sage/combinat/root_system/type_marked.py index b2c54c37249..a9ca7d15a35 100644 --- a/src/sage/combinat/root_system/type_marked.py +++ b/src/sage/combinat/root_system/type_marked.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for Cartan types with marked nodes """ diff --git a/src/sage/combinat/root_system/type_reducible.py b/src/sage/combinat/root_system/type_reducible.py index b733a6e8189..3b2e6bbedc4 100644 --- a/src/sage/combinat/root_system/type_reducible.py +++ b/src/sage/combinat/root_system/type_reducible.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for reducible Cartan types """ diff --git a/src/sage/combinat/root_system/type_relabel.py b/src/sage/combinat/root_system/type_relabel.py index c7032804dd4..d90e97cd375 100644 --- a/src/sage/combinat/root_system/type_relabel.py +++ b/src/sage/combinat/root_system/type_relabel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for relabelled Cartan types """ diff --git a/src/sage/combinat/root_system/type_super_A.py b/src/sage/combinat/root_system/type_super_A.py index fc93a52b8a4..c2717a572ff 100644 --- a/src/sage/combinat/root_system/type_super_A.py +++ b/src/sage/combinat/root_system/type_super_A.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Root system data for super type A """ diff --git a/src/sage/combinat/root_system/weight_lattice_realizations.py b/src/sage/combinat/root_system/weight_lattice_realizations.py index 5fe021d55f9..82f076c2475 100644 --- a/src/sage/combinat/root_system/weight_lattice_realizations.py +++ b/src/sage/combinat/root_system/weight_lattice_realizations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Weight lattice realizations """ diff --git a/src/sage/combinat/root_system/weight_space.py b/src/sage/combinat/root_system/weight_space.py index 2f8d71444d3..8a5118714c7 100644 --- a/src/sage/combinat/root_system/weight_space.py +++ b/src/sage/combinat/root_system/weight_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Weight lattices and weight spaces """ diff --git a/src/sage/combinat/root_system/weyl_characters.py b/src/sage/combinat/root_system/weyl_characters.py index 36fc6d23977..a42929606b1 100644 --- a/src/sage/combinat/root_system/weyl_characters.py +++ b/src/sage/combinat/root_system/weyl_characters.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs sage.groups sage.modules """ Weyl Character Rings diff --git a/src/sage/combinat/root_system/weyl_group.py b/src/sage/combinat/root_system/weyl_group.py index f51d63f9dd6..2c8091e7e41 100644 --- a/src/sage/combinat/root_system/weyl_group.py +++ b/src/sage/combinat/root_system/weyl_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.groups sage.modules """ Weyl Groups diff --git a/src/sage/combinat/rooted_tree.py b/src/sage/combinat/rooted_tree.py index 5ad58e2d6d7..74aeeff0bba 100644 --- a/src/sage/combinat/rooted_tree.py +++ b/src/sage/combinat/rooted_tree.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Rooted (Unordered) Trees diff --git a/src/sage/combinat/rsk.py b/src/sage/combinat/rsk.py index ee058c24f4d..21557d306de 100644 --- a/src/sage/combinat/rsk.py +++ b/src/sage/combinat/rsk.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Robinson-Schensted-Knuth correspondence diff --git a/src/sage/combinat/schubert_polynomial.py b/src/sage/combinat/schubert_polynomial.py index 8e6097c3d94..1fd435591de 100644 --- a/src/sage/combinat/schubert_polynomial.py +++ b/src/sage/combinat/schubert_polynomial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Schubert Polynomials diff --git a/src/sage/combinat/set_partition.py b/src/sage/combinat/set_partition.py index a820cd9bd69..0c22c6a2edc 100644 --- a/src/sage/combinat/set_partition.py +++ b/src/sage/combinat/set_partition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Set Partitions diff --git a/src/sage/combinat/set_partition_iterator.pyx b/src/sage/combinat/set_partition_iterator.pyx index 66d2d829acc..ff7d2e7c6c3 100644 --- a/src/sage/combinat/set_partition_iterator.pyx +++ b/src/sage/combinat/set_partition_iterator.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # cython: binding=True r""" Fast set partition iterators diff --git a/src/sage/combinat/set_partition_ordered.py b/src/sage/combinat/set_partition_ordered.py index d5cc5c8f250..782b13df638 100644 --- a/src/sage/combinat/set_partition_ordered.py +++ b/src/sage/combinat/set_partition_ordered.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Ordered Set Partitions diff --git a/src/sage/combinat/sf/all.py b/src/sage/combinat/sf/all.py index 36b1fc6cf20..00f8e4f2bdf 100644 --- a/src/sage/combinat/sf/all.py +++ b/src/sage/combinat/sf/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Symmetric Functions @@ -37,7 +36,7 @@ # In the long run, this will be the single entry point # Nothing else will be exported -from sage.combinat.sf.sf import SymmetricFunctions +lazy_import('sage.combinat.sf.sf', 'SymmetricFunctions') # Advanced stuff: @@ -46,5 +45,3 @@ lazy_import('sage.combinat.sf.ns_macdonald', ['NonattackingFillings', 'AugmentedLatticeDiagramFilling', 'LatticeDiagram']) -del lazy_import -del install_doc diff --git a/src/sage/combinat/sf/character.py b/src/sage/combinat/sf/character.py index 60881eaf63f..6fd2490ff11 100644 --- a/src/sage/combinat/sf/character.py +++ b/src/sage/combinat/sf/character.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Characters of the symmetric group as bases of the symmetric functions diff --git a/src/sage/combinat/sf/classical.py b/src/sage/combinat/sf/classical.py index b8cb0b7b481..792272417a8 100644 --- a/src/sage/combinat/sf/classical.py +++ b/src/sage/combinat/sf/classical.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Classical symmetric functions diff --git a/src/sage/combinat/sf/dual.py b/src/sage/combinat/sf/dual.py index edb13f5d681..207e411a2c6 100644 --- a/src/sage/combinat/sf/dual.py +++ b/src/sage/combinat/sf/dual.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Generic dual bases symmetric functions diff --git a/src/sage/combinat/sf/elementary.py b/src/sage/combinat/sf/elementary.py index 1e6b080e4c1..f0942314323 100644 --- a/src/sage/combinat/sf/elementary.py +++ b/src/sage/combinat/sf/elementary.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Elementary symmetric functions diff --git a/src/sage/combinat/sf/hall_littlewood.py b/src/sage/combinat/sf/hall_littlewood.py index 887600864e2..8d656533166 100644 --- a/src/sage/combinat/sf/hall_littlewood.py +++ b/src/sage/combinat/sf/hall_littlewood.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Hall-Littlewood Polynomials diff --git a/src/sage/combinat/sf/hecke.py b/src/sage/combinat/sf/hecke.py index 1c3793f2f5f..e0b7f965ba7 100644 --- a/src/sage/combinat/sf/hecke.py +++ b/src/sage/combinat/sf/hecke.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Hecke Character Basis diff --git a/src/sage/combinat/sf/homogeneous.py b/src/sage/combinat/sf/homogeneous.py index 99e7185e8db..29cf294ea80 100644 --- a/src/sage/combinat/sf/homogeneous.py +++ b/src/sage/combinat/sf/homogeneous.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Homogeneous symmetric functions diff --git a/src/sage/combinat/sf/jack.py b/src/sage/combinat/sf/jack.py index c47d2b29b64..8c62cfb08df 100644 --- a/src/sage/combinat/sf/jack.py +++ b/src/sage/combinat/sf/jack.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Jack Symmetric Functions diff --git a/src/sage/combinat/sf/k_dual.py b/src/sage/combinat/sf/k_dual.py index 5dcb12701cc..add64a28fdf 100644 --- a/src/sage/combinat/sf/k_dual.py +++ b/src/sage/combinat/sf/k_dual.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Quotient of symmetric function space by ideal generated by Hall-Littlewood symmetric functions diff --git a/src/sage/combinat/sf/kfpoly.py b/src/sage/combinat/sf/kfpoly.py index 869d2169e32..09283745aa5 100644 --- a/src/sage/combinat/sf/kfpoly.py +++ b/src/sage/combinat/sf/kfpoly.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Kostka-Foulkes Polynomials diff --git a/src/sage/combinat/sf/llt.py b/src/sage/combinat/sf/llt.py index 63019625fb4..05a4f50c92a 100644 --- a/src/sage/combinat/sf/llt.py +++ b/src/sage/combinat/sf/llt.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" LLT symmetric functions diff --git a/src/sage/combinat/sf/macdonald.py b/src/sage/combinat/sf/macdonald.py index 7f1e2177ae7..c6021ac25de 100644 --- a/src/sage/combinat/sf/macdonald.py +++ b/src/sage/combinat/sf/macdonald.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Macdonald Polynomials diff --git a/src/sage/combinat/sf/monomial.py b/src/sage/combinat/sf/monomial.py index 594dffa7a54..583008830af 100644 --- a/src/sage/combinat/sf/monomial.py +++ b/src/sage/combinat/sf/monomial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Monomial symmetric functions diff --git a/src/sage/combinat/sf/multiplicative.py b/src/sage/combinat/sf/multiplicative.py index a11ff5d8b7e..7ff9797f81a 100644 --- a/src/sage/combinat/sf/multiplicative.py +++ b/src/sage/combinat/sf/multiplicative.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Multiplicative symmetric functions diff --git a/src/sage/combinat/sf/new_kschur.py b/src/sage/combinat/sf/new_kschur.py index 97596200c96..59ce50c74e2 100644 --- a/src/sage/combinat/sf/new_kschur.py +++ b/src/sage/combinat/sf/new_kschur.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ `k`-Schur Functions diff --git a/src/sage/combinat/sf/ns_macdonald.py b/src/sage/combinat/sf/ns_macdonald.py index 61443cc6865..582e2f99568 100644 --- a/src/sage/combinat/sf/ns_macdonald.py +++ b/src/sage/combinat/sf/ns_macdonald.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Non-symmetric Macdonald Polynomials diff --git a/src/sage/combinat/sf/orthogonal.py b/src/sage/combinat/sf/orthogonal.py index 38017601031..3ab5f56debc 100644 --- a/src/sage/combinat/sf/orthogonal.py +++ b/src/sage/combinat/sf/orthogonal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Orthogonal Symmetric Functions diff --git a/src/sage/combinat/sf/orthotriang.py b/src/sage/combinat/sf/orthotriang.py index b5b325873ef..17c636ce5ea 100644 --- a/src/sage/combinat/sf/orthotriang.py +++ b/src/sage/combinat/sf/orthotriang.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Symmetric functions defined by orthogonality and triangularity diff --git a/src/sage/combinat/sf/powersum.py b/src/sage/combinat/sf/powersum.py index 049c18e48ad..9521eaccd32 100644 --- a/src/sage/combinat/sf/powersum.py +++ b/src/sage/combinat/sf/powersum.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Power sum symmetric functions diff --git a/src/sage/combinat/sf/schur.py b/src/sage/combinat/sf/schur.py index c553fd411df..40e1de75812 100644 --- a/src/sage/combinat/sf/schur.py +++ b/src/sage/combinat/sf/schur.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Schur symmetric functions diff --git a/src/sage/combinat/sf/sf.py b/src/sage/combinat/sf/sf.py index 99f8ab93aec..cca184e91c3 100644 --- a/src/sage/combinat/sf/sf.py +++ b/src/sage/combinat/sf/sf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Symmetric functions, with their multiple realizations diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 56a32dea180..05abd332b08 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Symmetric Functions diff --git a/src/sage/combinat/sf/symplectic.py b/src/sage/combinat/sf/symplectic.py index ed3c4459a28..f6db1782489 100644 --- a/src/sage/combinat/sf/symplectic.py +++ b/src/sage/combinat/sf/symplectic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Symplectic Symmetric Functions diff --git a/src/sage/combinat/sf/witt.py b/src/sage/combinat/sf/witt.py index 27fe3bcd6e2..c856e8fe399 100644 --- a/src/sage/combinat/sf/witt.py +++ b/src/sage/combinat/sf/witt.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Witt symmetric functions diff --git a/src/sage/combinat/shard_order.py b/src/sage/combinat/shard_order.py index f995284fe07..d33bc2173f6 100644 --- a/src/sage/combinat/shard_order.py +++ b/src/sage/combinat/shard_order.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Shard intersection order diff --git a/src/sage/combinat/shifted_primed_tableau.py b/src/sage/combinat/shifted_primed_tableau.py index 18b948c424d..a05a8b0bee8 100644 --- a/src/sage/combinat/shifted_primed_tableau.py +++ b/src/sage/combinat/shifted_primed_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules """ Shifted primed tableaux diff --git a/src/sage/combinat/shuffle.py b/src/sage/combinat/shuffle.py index 72a73e731eb..846a214e30d 100644 --- a/src/sage/combinat/shuffle.py +++ b/src/sage/combinat/shuffle.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Shuffle product of iterables diff --git a/src/sage/combinat/sidon_sets.py b/src/sage/combinat/sidon_sets.py index 7841a665d77..9ba6bdb5c71 100644 --- a/src/sage/combinat/sidon_sets.py +++ b/src/sage/combinat/sidon_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Sidon sets and their generalizations, Sidon `g`-sets diff --git a/src/sage/combinat/similarity_class_type.py b/src/sage/combinat/similarity_class_type.py index 8cba310930f..64acd5696dc 100644 --- a/src/sage/combinat/similarity_class_type.py +++ b/src/sage/combinat/similarity_class_type.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Similarity class types of matrices with entries in a finite field diff --git a/src/sage/combinat/sine_gordon.py b/src/sage/combinat/sine_gordon.py index 4514a5169d0..209acd4486e 100644 --- a/src/sage/combinat/sine_gordon.py +++ b/src/sage/combinat/sine_gordon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" sine-Gordon Y-system plotter diff --git a/src/sage/combinat/six_vertex_model.py b/src/sage/combinat/six_vertex_model.py index f94444c529b..11b3267eb61 100644 --- a/src/sage/combinat/six_vertex_model.py +++ b/src/sage/combinat/six_vertex_model.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Six Vertex Model """ diff --git a/src/sage/combinat/skew_partition.py b/src/sage/combinat/skew_partition.py index 9b894d5abf8..3337d6b2fb7 100644 --- a/src/sage/combinat/skew_partition.py +++ b/src/sage/combinat/skew_partition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Skew Partitions diff --git a/src/sage/combinat/skew_tableau.py b/src/sage/combinat/skew_tableau.py index e47cfe0c2eb..a342e7005e8 100644 --- a/src/sage/combinat/skew_tableau.py +++ b/src/sage/combinat/skew_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Skew Tableaux diff --git a/src/sage/combinat/sloane_functions.py b/src/sage/combinat/sloane_functions.py index 643db7ca2a7..76a05d6dc18 100644 --- a/src/sage/combinat/sloane_functions.py +++ b/src/sage/combinat/sloane_functions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.libs.gap sage.libs.flint sage.libs.pari sage.modules r""" Functions that compute some of the sequences in Sloane's tables diff --git a/src/sage/combinat/specht_module.py b/src/sage/combinat/specht_module.py index fd93cf0bdf8..127903829f7 100644 --- a/src/sage/combinat/specht_module.py +++ b/src/sage/combinat/specht_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.groups sage.modules r""" Specht Modules diff --git a/src/sage/combinat/species/all.py b/src/sage/combinat/species/all.py index bec54ab9161..6bda0eab5db 100644 --- a/src/sage/combinat/species/all.py +++ b/src/sage/combinat/species/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Combinatorial species @@ -49,4 +48,3 @@ lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies") lazy_import("sage.combinat.species", "library", as_="species") del lazy_import -del install_doc diff --git a/src/sage/combinat/species/characteristic_species.py b/src/sage/combinat/species/characteristic_species.py index 1ef62596491..37ce75abe28 100644 --- a/src/sage/combinat/species/characteristic_species.py +++ b/src/sage/combinat/species/characteristic_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Characteristic Species """ diff --git a/src/sage/combinat/species/composition_species.py b/src/sage/combinat/species/composition_species.py index a11ae4b731c..ccfe0141803 100644 --- a/src/sage/combinat/species/composition_species.py +++ b/src/sage/combinat/species/composition_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Composition species """ diff --git a/src/sage/combinat/species/cycle_species.py b/src/sage/combinat/species/cycle_species.py index 9d27db8761e..c808f6a0db1 100644 --- a/src/sage/combinat/species/cycle_species.py +++ b/src/sage/combinat/species/cycle_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Cycle Species """ diff --git a/src/sage/combinat/species/empty_species.py b/src/sage/combinat/species/empty_species.py index 98c544d8c66..5c4762cb34d 100644 --- a/src/sage/combinat/species/empty_species.py +++ b/src/sage/combinat/species/empty_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Empty Species """ diff --git a/src/sage/combinat/species/functorial_composition_species.py b/src/sage/combinat/species/functorial_composition_species.py index c2f49c42e67..b327492a54a 100644 --- a/src/sage/combinat/species/functorial_composition_species.py +++ b/src/sage/combinat/species/functorial_composition_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Functorial composition species """ diff --git a/src/sage/combinat/species/generating_series.py b/src/sage/combinat/species/generating_series.py index d6d3ca62708..b7b208c3d87 100644 --- a/src/sage/combinat/species/generating_series.py +++ b/src/sage/combinat/species/generating_series.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Generating Series diff --git a/src/sage/combinat/species/library.py b/src/sage/combinat/species/library.py index 8d6bb4679c9..c50a9fe75fa 100644 --- a/src/sage/combinat/species/library.py +++ b/src/sage/combinat/species/library.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Examples of Combinatorial Species """ diff --git a/src/sage/combinat/species/linear_order_species.py b/src/sage/combinat/species/linear_order_species.py index ca63ba6db40..0761dea576d 100644 --- a/src/sage/combinat/species/linear_order_species.py +++ b/src/sage/combinat/species/linear_order_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Linear-order Species """ diff --git a/src/sage/combinat/species/misc.py b/src/sage/combinat/species/misc.py index 2cf4ecee33e..12a9b2c8f70 100644 --- a/src/sage/combinat/species/misc.py +++ b/src/sage/combinat/species/misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.groups """ Miscellaneous Functions diff --git a/src/sage/combinat/species/partition_species.py b/src/sage/combinat/species/partition_species.py index 414c2717c34..8d9a83d1e00 100644 --- a/src/sage/combinat/species/partition_species.py +++ b/src/sage/combinat/species/partition_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.libs.flint """ Partition Species diff --git a/src/sage/combinat/species/permutation_species.py b/src/sage/combinat/species/permutation_species.py index 8acc9d49a79..eebcc2cddce 100644 --- a/src/sage/combinat/species/permutation_species.py +++ b/src/sage/combinat/species/permutation_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.groups sage.libs.flint """ Permutation species diff --git a/src/sage/combinat/species/product_species.py b/src/sage/combinat/species/product_species.py index e0ef889faa1..90209e64776 100644 --- a/src/sage/combinat/species/product_species.py +++ b/src/sage/combinat/species/product_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Product species """ diff --git a/src/sage/combinat/species/recursive_species.py b/src/sage/combinat/species/recursive_species.py index c35e7843b2c..8eaabf0d2a8 100644 --- a/src/sage/combinat/species/recursive_species.py +++ b/src/sage/combinat/species/recursive_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Recursive Species """ diff --git a/src/sage/combinat/species/set_species.py b/src/sage/combinat/species/set_species.py index 1d837ba723b..94aa893cf46 100644 --- a/src/sage/combinat/species/set_species.py +++ b/src/sage/combinat/species/set_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Set Species """ diff --git a/src/sage/combinat/species/species.py b/src/sage/combinat/species/species.py index af092883c79..705dbd22494 100644 --- a/src/sage/combinat/species/species.py +++ b/src/sage/combinat/species/species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Combinatorial Species diff --git a/src/sage/combinat/species/structure.py b/src/sage/combinat/species/structure.py index 6fd7396888b..b3003ed0f13 100644 --- a/src/sage/combinat/species/structure.py +++ b/src/sage/combinat/species/structure.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Species structures diff --git a/src/sage/combinat/species/subset_species.py b/src/sage/combinat/species/subset_species.py index fff66dd3f63..2e7a6697e29 100644 --- a/src/sage/combinat/species/subset_species.py +++ b/src/sage/combinat/species/subset_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Subset Species """ diff --git a/src/sage/combinat/species/sum_species.py b/src/sage/combinat/species/sum_species.py index ff3ebbe8f94..b3ff129dc55 100644 --- a/src/sage/combinat/species/sum_species.py +++ b/src/sage/combinat/species/sum_species.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Sum species """ diff --git a/src/sage/combinat/subset.py b/src/sage/combinat/subset.py index cc485a9ee8f..4d036ad6c93 100644 --- a/src/sage/combinat/subset.py +++ b/src/sage/combinat/subset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subsets diff --git a/src/sage/combinat/subsets_hereditary.py b/src/sage/combinat/subsets_hereditary.py index 12f62cd64ce..33b576e3cf1 100644 --- a/src/sage/combinat/subsets_hereditary.py +++ b/src/sage/combinat/subsets_hereditary.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subsets satisfying a hereditary property """ diff --git a/src/sage/combinat/subsets_pairwise.py b/src/sage/combinat/subsets_pairwise.py index 9f207f5cc4d..ed5613157f2 100644 --- a/src/sage/combinat/subsets_pairwise.py +++ b/src/sage/combinat/subsets_pairwise.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subsets whose elements satisfy a predicate pairwise """ diff --git a/src/sage/combinat/subword.py b/src/sage/combinat/subword.py index dcf22a70a5a..e5a9afcb804 100644 --- a/src/sage/combinat/subword.py +++ b/src/sage/combinat/subword.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Subwords diff --git a/src/sage/combinat/subword_complex.py b/src/sage/combinat/subword_complex.py index 314fad7f9a2..f280a5901f3 100644 --- a/src/sage/combinat/subword_complex.py +++ b/src/sage/combinat/subword_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.graphs sage.modules r""" Subword complex diff --git a/src/sage/combinat/subword_complex_c.pyx b/src/sage/combinat/subword_complex_c.pyx index 6a015a14791..5b155efda75 100644 --- a/src/sage/combinat/subword_complex_c.pyx +++ b/src/sage/combinat/subword_complex_c.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.modules cpdef int _flip_c(W, set positions, list extended_root_conf_indices, diff --git a/src/sage/combinat/super_tableau.py b/src/sage/combinat/super_tableau.py index 199841b1117..ffcdb0fc374 100644 --- a/src/sage/combinat/super_tableau.py +++ b/src/sage/combinat/super_tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Super Tableaux diff --git a/src/sage/combinat/superpartition.py b/src/sage/combinat/superpartition.py index 8a22d17c089..e16e87fa9f0 100644 --- a/src/sage/combinat/superpartition.py +++ b/src/sage/combinat/superpartition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Super Partitions diff --git a/src/sage/combinat/symmetric_group_algebra.py b/src/sage/combinat/symmetric_group_algebra.py index 9d1a436656d..b0214063e3b 100644 --- a/src/sage/combinat/symmetric_group_algebra.py +++ b/src/sage/combinat/symmetric_group_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules sage.groups r""" Symmetric Group Algebra diff --git a/src/sage/combinat/symmetric_group_representations.py b/src/sage/combinat/symmetric_group_representations.py index 50f5c0d2ada..d95317335ab 100644 --- a/src/sage/combinat/symmetric_group_representations.py +++ b/src/sage/combinat/symmetric_group_representations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules sage.groups r""" Representations of the Symmetric Group diff --git a/src/sage/combinat/t_sequences.py b/src/sage/combinat/t_sequences.py index 8e9c8111818..7f0e8492ca4 100644 --- a/src/sage/combinat/t_sequences.py +++ b/src/sage/combinat/t_sequences.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" T-sequences diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index c5c8adb78d3..bb1aeaf28be 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Tableaux diff --git a/src/sage/combinat/tableau_residues.py b/src/sage/combinat/tableau_residues.py index a1f79ee4ad2..db94461f6ef 100644 --- a/src/sage/combinat/tableau_residues.py +++ b/src/sage/combinat/tableau_residues.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Residue sequences of tableaux diff --git a/src/sage/combinat/tableau_tuple.py b/src/sage/combinat/tableau_tuple.py index 77d6a68d9b9..511b98d3e1b 100644 --- a/src/sage/combinat/tableau_tuple.py +++ b/src/sage/combinat/tableau_tuple.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" TableauTuples diff --git a/src/sage/combinat/tamari_lattices.py b/src/sage/combinat/tamari_lattices.py index 87bef01f18f..f3e4de13a28 100644 --- a/src/sage/combinat/tamari_lattices.py +++ b/src/sage/combinat/tamari_lattices.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.modules r""" Generalized Tamari lattices diff --git a/src/sage/combinat/tiling.py b/src/sage/combinat/tiling.py index 16f46e9d845..43c7817f13a 100644 --- a/src/sage/combinat/tiling.py +++ b/src/sage/combinat/tiling.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Tiling Solver diff --git a/src/sage/combinat/tools.py b/src/sage/combinat/tools.py index feb2c5d4975..63c611581c8 100644 --- a/src/sage/combinat/tools.py +++ b/src/sage/combinat/tools.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Transitive ideal closure tool """ diff --git a/src/sage/combinat/triangles_FHM.py b/src/sage/combinat/triangles_FHM.py index 39313e439da..8e3399d4da4 100644 --- a/src/sage/combinat/triangles_FHM.py +++ b/src/sage/combinat/triangles_FHM.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Combinatorial triangles for posets and fans diff --git a/src/sage/combinat/tuple.py b/src/sage/combinat/tuple.py index 1ce84561b94..196d869769d 100644 --- a/src/sage/combinat/tuple.py +++ b/src/sage/combinat/tuple.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Tuples """ diff --git a/src/sage/combinat/tutorial.py b/src/sage/combinat/tutorial.py index 5279e06b03e..6f9fad1c5dd 100644 --- a/src/sage/combinat/tutorial.py +++ b/src/sage/combinat/tutorial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Introduction to combinatorics in Sage diff --git a/src/sage/combinat/vector_partition.py b/src/sage/combinat/vector_partition.py index e7b42038796..2bd89dbb244 100644 --- a/src/sage/combinat/vector_partition.py +++ b/src/sage/combinat/vector_partition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Vector Partitions diff --git a/src/sage/combinat/words/abstract_word.py b/src/sage/combinat/words/abstract_word.py index 20da53699ec..4b385e3e79f 100644 --- a/src/sage/combinat/words/abstract_word.py +++ b/src/sage/combinat/words/abstract_word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Abstract word (finite or infinite) diff --git a/src/sage/combinat/words/all.py b/src/sage/combinat/words/all.py index 64c4ab6b47a..687b572c8e5 100644 --- a/src/sage/combinat/words/all.py +++ b/src/sage/combinat/words/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Combinatorics on words @@ -44,16 +43,11 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.misc.lazy_import import lazy_import - -from sage.combinat.words.alphabet import Alphabet, build_alphabet -from sage.combinat.words.morphism import WordMorphism -lazy_import('sage.combinat.words.paths', 'WordPaths') -from sage.combinat.words.word import Word -from sage.combinat.words.word_options import WordOptions -from sage.combinat.words.word_generators import words -from sage.combinat.words.words import Words, FiniteWords, InfiniteWords -from sage.combinat.words.lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords - -del install_doc -del lazy_import +from .alphabet import Alphabet, build_alphabet +from .morphism import WordMorphism +from .paths import WordPaths +from .word import Word +from .word_options import WordOptions +from .word_generators import words +from .words import Words, FiniteWords, InfiniteWords +from .lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords diff --git a/src/sage/combinat/words/alphabet.py b/src/sage/combinat/words/alphabet.py index ea53ac437d0..19ac17054b8 100644 --- a/src/sage/combinat/words/alphabet.py +++ b/src/sage/combinat/words/alphabet.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Alphabet diff --git a/src/sage/combinat/words/finite_word.py b/src/sage/combinat/words/finite_word.py index 6ac287f2679..1bdd38e92c7 100644 --- a/src/sage/combinat/words/finite_word.py +++ b/src/sage/combinat/words/finite_word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Finite word diff --git a/src/sage/combinat/words/infinite_word.py b/src/sage/combinat/words/infinite_word.py index 1fee1c7c8cf..8baae7c1c3c 100644 --- a/src/sage/combinat/words/infinite_word.py +++ b/src/sage/combinat/words/infinite_word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Infinite word diff --git a/src/sage/combinat/words/lyndon_word.py b/src/sage/combinat/words/lyndon_word.py index 81c91897c2d..c466166d78a 100644 --- a/src/sage/combinat/words/lyndon_word.py +++ b/src/sage/combinat/words/lyndon_word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Lyndon words """ diff --git a/src/sage/combinat/words/morphic.py b/src/sage/combinat/words/morphic.py index b5da6376fa5..6a7a7877185 100644 --- a/src/sage/combinat/words/morphic.py +++ b/src/sage/combinat/words/morphic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Morphic words diff --git a/src/sage/combinat/words/morphism.py b/src/sage/combinat/words/morphism.py index eb3b6b5a485..9424a3370b7 100644 --- a/src/sage/combinat/words/morphism.py +++ b/src/sage/combinat/words/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Word morphisms/substitutions diff --git a/src/sage/combinat/words/paths.py b/src/sage/combinat/words/paths.py index 7601062f6d1..f5506152d44 100644 --- a/src/sage/combinat/words/paths.py +++ b/src/sage/combinat/words/paths.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat sage.modules r""" Word paths diff --git a/src/sage/combinat/words/shuffle_product.py b/src/sage/combinat/words/shuffle_product.py index 1ee79610a48..719e0122e5c 100644 --- a/src/sage/combinat/words/shuffle_product.py +++ b/src/sage/combinat/words/shuffle_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Shuffle product of words diff --git a/src/sage/combinat/words/suffix_trees.py b/src/sage/combinat/words/suffix_trees.py index dc87e6ace61..8c56ba3d4b3 100644 --- a/src/sage/combinat/words/suffix_trees.py +++ b/src/sage/combinat/words/suffix_trees.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Suffix Tries and Suffix Trees """ diff --git a/src/sage/combinat/words/word.py b/src/sage/combinat/words/word.py index 9bfc13c6d89..222501a5dfd 100644 --- a/src/sage/combinat/words/word.py +++ b/src/sage/combinat/words/word.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Word classes diff --git a/src/sage/combinat/words/word_char.pyx b/src/sage/combinat/words/word_char.pyx index 142d041a107..069f17fbcbc 100644 --- a/src/sage/combinat/words/word_char.pyx +++ b/src/sage/combinat/words/word_char.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Fast word datatype using an array of unsigned char """ diff --git a/src/sage/combinat/words/word_datatypes.pxd b/src/sage/combinat/words/word_datatypes.pxd index 5a2019651ec..c3329bd5a78 100644 --- a/src/sage/combinat/words/word_datatypes.pxd +++ b/src/sage/combinat/words/word_datatypes.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef class WordDatatype(): cdef public _parent cdef _hash diff --git a/src/sage/combinat/words/word_datatypes.pyx b/src/sage/combinat/words/word_datatypes.pyx index 4c31a02959a..62132c64032 100644 --- a/src/sage/combinat/words/word_datatypes.pyx +++ b/src/sage/combinat/words/word_datatypes.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Datatypes for finite words """ diff --git a/src/sage/combinat/words/word_generators.py b/src/sage/combinat/words/word_generators.py index afa595bac30..3c38103cff4 100644 --- a/src/sage/combinat/words/word_generators.py +++ b/src/sage/combinat/words/word_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Common words diff --git a/src/sage/combinat/words/word_infinite_datatypes.py b/src/sage/combinat/words/word_infinite_datatypes.py index f20eac6c730..8dbf97ed59a 100644 --- a/src/sage/combinat/words/word_infinite_datatypes.py +++ b/src/sage/combinat/words/word_infinite_datatypes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Datatypes for words defined by iterators and callables """ diff --git a/src/sage/combinat/words/word_options.py b/src/sage/combinat/words/word_options.py index 7a6d553f3cb..2d2bf3bc7ff 100644 --- a/src/sage/combinat/words/word_options.py +++ b/src/sage/combinat/words/word_options.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" User-customizable options for words """ diff --git a/src/sage/combinat/words/words.py b/src/sage/combinat/words/words.py index 0ebb653d0bd..9cdc76c7eac 100644 --- a/src/sage/combinat/words/words.py +++ b/src/sage/combinat/words/words.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Set of words diff --git a/src/sage/combinat/yang_baxter_graph.py b/src/sage/combinat/yang_baxter_graph.py index 6b10cb086dc..f2fdb7a5a47 100644 --- a/src/sage/combinat/yang_baxter_graph.py +++ b/src/sage/combinat/yang_baxter_graph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Yang-Baxter Graphs """ diff --git a/src/sage/cpython/__init__.py b/src/sage/cpython/__init__.py index 1742d8853b4..0e4de12a8b1 100644 --- a/src/sage/cpython/__init__.py +++ b/src/sage/cpython/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # sage.cpython is an ordinary package, not a namespace package. # This package is imported very early, which is why workarounds/monkey-patching diff --git a/src/sage/cpython/_py2_random.py b/src/sage/cpython/_py2_random.py index 0da28217eec..38ca23416ed 100644 --- a/src/sage/cpython/_py2_random.py +++ b/src/sage/cpython/_py2_random.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Except from the `random` module from Python 2.7.14 used solely for consistency in the doctest suite for random results that depend on the Python PRNG. diff --git a/src/sage/cpython/all.py b/src/sage/cpython/all.py index f17f7a6559a..d48ee4c7d45 100644 --- a/src/sage/cpython/all.py +++ b/src/sage/cpython/all.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects from sage.cpython.debug import getattr_debug, type_debug from sage.cpython.getattr import raw_getattr diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx index dc132a9d25d..e5a82735137 100644 --- a/src/sage/cpython/atexit.pyx +++ b/src/sage/cpython/atexit.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- encoding: utf-8 -*- """Utilities for interfacing with the standard library's atexit module.""" diff --git a/src/sage/cpython/builtin_types.pyx b/src/sage/cpython/builtin_types.pyx index f094d909dbf..bfac8c414a7 100644 --- a/src/sage/cpython/builtin_types.pyx +++ b/src/sage/cpython/builtin_types.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from cpython.object cimport PyTypeObject cdef extern from *: diff --git a/src/sage/cpython/cython_metaclass.pxd b/src/sage/cpython/cython_metaclass.pxd index fc4bb020ed0..189eb04f1c4 100644 --- a/src/sage/cpython/cython_metaclass.pxd +++ b/src/sage/cpython/cython_metaclass.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects cdef extern from "cython_metaclass.h": PyMethodDescr_CallSelf(desc, self) diff --git a/src/sage/cpython/cython_metaclass.pyx b/src/sage/cpython/cython_metaclass.pyx index 6447ed19e6d..a8fa92fc1a8 100644 --- a/src/sage/cpython/cython_metaclass.pyx +++ b/src/sage/cpython/cython_metaclass.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Metaclasses for Cython extension types diff --git a/src/sage/cpython/debug.pyx b/src/sage/cpython/debug.pyx index 79aba1a7fbe..09680986673 100644 --- a/src/sage/cpython/debug.pyx +++ b/src/sage/cpython/debug.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Various functions to debug Python internals """ diff --git a/src/sage/cpython/dict_del_by_value.pxd b/src/sage/cpython/dict_del_by_value.pxd index 1bb9f8bd1c5..71572b8951f 100644 --- a/src/sage/cpython/dict_del_by_value.pxd +++ b/src/sage/cpython/dict_del_by_value.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from cpython.object cimport PyObject cdef extern from "Python.h": ctypedef struct PyDictObject diff --git a/src/sage/cpython/dict_del_by_value.pyx b/src/sage/cpython/dict_del_by_value.pyx index 44f0700206e..e00b4bcd611 100644 --- a/src/sage/cpython/dict_del_by_value.pyx +++ b/src/sage/cpython/dict_del_by_value.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Delete item from PyDict by exact value and hash diff --git a/src/sage/cpython/getattr.pxd b/src/sage/cpython/getattr.pxd index adf20ae9766..e0987cfa4c5 100644 --- a/src/sage/cpython/getattr.pxd +++ b/src/sage/cpython/getattr.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # A class that allows for a more efficient creation # of attribute errors, so that raising them requires # less time. diff --git a/src/sage/cpython/getattr.pyx b/src/sage/cpython/getattr.pyx index 899fbe62ecc..d8a5795c0c4 100644 --- a/src/sage/cpython/getattr.pyx +++ b/src/sage/cpython/getattr.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Variants of getattr() """ diff --git a/src/sage/cpython/pycore_long.pxd b/src/sage/cpython/pycore_long.pxd index 4fe503a247e..41de637ff18 100644 --- a/src/sage/cpython/pycore_long.pxd +++ b/src/sage/cpython/pycore_long.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from cpython.longintrepr cimport py_long, digit cdef extern from "pycore_long.h": diff --git a/src/sage/cpython/python_debug.pxd b/src/sage/cpython/python_debug.pxd index f43779e5362..a7a2f112d00 100644 --- a/src/sage/cpython/python_debug.pxd +++ b/src/sage/cpython/python_debug.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # Python can be built with extensive debugging support. This file lets # Sage know about which debugging options are enabled. # diff --git a/src/sage/cpython/string.pxd b/src/sage/cpython/string.pxd index 58c80d14987..1fde0aec0de 100644 --- a/src/sage/cpython/string.pxd +++ b/src/sage/cpython/string.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # **************************************************************************** # Copyright (C) 2017 Erik M. Bray # diff --git a/src/sage/cpython/string.pyx b/src/sage/cpython/string.pyx index fe472fd95bc..a35fbd41881 100644 --- a/src/sage/cpython/string.pyx +++ b/src/sage/cpython/string.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- encoding: utf-8 -*- """ String <-> bytes encoding/decoding diff --git a/src/sage/cpython/type.pxd b/src/sage/cpython/type.pxd index 2f77fe0a88e..f3f80c7a6c6 100644 --- a/src/sage/cpython/type.pxd +++ b/src/sage/cpython/type.pxd @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-objects cpdef bint can_assign_class(obj) noexcept diff --git a/src/sage/cpython/type.pyx b/src/sage/cpython/type.pyx index d2041c13ab5..f9dcabc5df4 100644 --- a/src/sage/cpython/type.pyx +++ b/src/sage/cpython/type.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Type internals """ diff --git a/src/sage/cpython/wrapperdescr.pxd b/src/sage/cpython/wrapperdescr.pxd index 100d3a758bb..b6775860710 100644 --- a/src/sage/cpython/wrapperdescr.pxd +++ b/src/sage/cpython/wrapperdescr.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from cpython.object cimport PyObject, PyTypeObject cdef extern from *: diff --git a/src/sage/cpython/wrapperdescr.pyx b/src/sage/cpython/wrapperdescr.pyx index 1e74353e798..776e4fe94a8 100644 --- a/src/sage/cpython/wrapperdescr.pyx +++ b/src/sage/cpython/wrapperdescr.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Slot wrappers diff --git a/src/sage/crypto/__init__.py b/src/sage/crypto/__init__.py index 8d79ceb4559..107a9733a62 100644 --- a/src/sage/crypto/__init__.py +++ b/src/sage/crypto/__init__.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.crypto.lattice', 'gen_lattice') diff --git a/src/sage/crypto/all.py b/src/sage/crypto/all.py index e878d30ac8f..1ea6c8f20a7 100644 --- a/src/sage/crypto/all.py +++ b/src/sage/crypto/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules import sage.crypto.sbox from sage.misc.persist import register_unpickle_override register_unpickle_override('sage.crypto.mq.sbox', 'SBox', sage.crypto.sbox.SBox) @@ -11,14 +10,13 @@ 'ShiftCryptosystem', 'TranspositionCryptosystem', 'VigenereCryptosystem', - ]) + ]) lazy_import('sage.crypto.stream', ['LFSRCryptosystem', 'ShrinkingGeneratorCryptosystem', - ]) + ]) lazy_import('sage.crypto.lfsr', ['lfsr_sequence', 'lfsr_autocorrelation', 'lfsr_connection_polynomial', - ]) -del lazy_import + ]) diff --git a/src/sage/crypto/block_cipher/all.py b/src/sage/crypto/block_cipher/all.py index 822866ce5ec..0a5ec657f5d 100644 --- a/src/sage/crypto/block_cipher/all.py +++ b/src/sage/crypto/block_cipher/all.py @@ -1,7 +1,5 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.crypto.block_cipher.miniaes', 'MiniAES') lazy_import('sage.crypto.block_cipher.sdes', 'SimplifiedDES') lazy_import('sage.crypto.block_cipher.present', 'PRESENT') -del lazy_import diff --git a/src/sage/crypto/block_cipher/des.py b/src/sage/crypto/block_cipher/des.py index 2af44a9473f..6799dd8e4c1 100644 --- a/src/sage/crypto/block_cipher/des.py +++ b/src/sage/crypto/block_cipher/des.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" DES diff --git a/src/sage/crypto/block_cipher/miniaes.py b/src/sage/crypto/block_cipher/miniaes.py index 45cf03ad43c..6eb9568b9fc 100644 --- a/src/sage/crypto/block_cipher/miniaes.py +++ b/src/sage/crypto/block_cipher/miniaes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.modules sage.rings.finite_rings r""" Mini-AES diff --git a/src/sage/crypto/block_cipher/present.py b/src/sage/crypto/block_cipher/present.py index b69b54fb74d..d6f6146af3a 100644 --- a/src/sage/crypto/block_cipher/present.py +++ b/src/sage/crypto/block_cipher/present.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" PRESENT diff --git a/src/sage/crypto/block_cipher/sdes.py b/src/sage/crypto/block_cipher/sdes.py index 04f8d373ef8..30b8cf2516c 100644 --- a/src/sage/crypto/block_cipher/sdes.py +++ b/src/sage/crypto/block_cipher/sdes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.rings.finite_rings r""" Simplified DES diff --git a/src/sage/crypto/boolean_function.pxd b/src/sage/crypto/boolean_function.pxd index 50ba8283b1c..5703943123c 100644 --- a/src/sage/crypto/boolean_function.pxd +++ b/src/sage/crypto/boolean_function.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cdef inline unsigned int hamming_weight(unsigned int x) noexcept: # valid for 32bits x -= (x>>1) & 0x55555555UL # 0-2 in 2 bits diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index 0a5cb43da49..70833c63dc3 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- """ Boolean functions diff --git a/src/sage/crypto/cipher.py b/src/sage/crypto/cipher.py index 0b5403415f7..14e9df6a504 100644 --- a/src/sage/crypto/cipher.py +++ b/src/sage/crypto/cipher.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat """ Ciphers diff --git a/src/sage/crypto/classical.py b/src/sage/crypto/classical.py index 8d7b820fc10..e88ad4924bb 100644 --- a/src/sage/crypto/classical.py +++ b/src/sage/crypto/classical.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Classical Cryptosystems diff --git a/src/sage/crypto/classical_cipher.py b/src/sage/crypto/classical_cipher.py index d071c537d13..b775c426058 100644 --- a/src/sage/crypto/classical_cipher.py +++ b/src/sage/crypto/classical_cipher.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat """ Classical Ciphers diff --git a/src/sage/crypto/cryptosystem.py b/src/sage/crypto/cryptosystem.py index 6524ecc0185..488b9a014b5 100644 --- a/src/sage/crypto/cryptosystem.py +++ b/src/sage/crypto/cryptosystem.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Cryptosystems diff --git a/src/sage/crypto/lattice.py b/src/sage/crypto/lattice.py index a5d81c1bb7c..513730ff89f 100644 --- a/src/sage/crypto/lattice.py +++ b/src/sage/crypto/lattice.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules """ Hard Lattice Generator diff --git a/src/sage/crypto/lfsr.py b/src/sage/crypto/lfsr.py index 5b25196d732..869bdcf5990 100644 --- a/src/sage/crypto/lfsr.py +++ b/src/sage/crypto/lfsr.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.finite_rings r""" Linear feedback shift register (LFSR) sequence commands diff --git a/src/sage/crypto/lwe.py b/src/sage/crypto/lwe.py index 5d70e237f5d..40281916b19 100644 --- a/src/sage/crypto/lwe.py +++ b/src/sage/crypto/lwe.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs scipy sage.symbolic """ (Ring-)LWE oracle generators diff --git a/src/sage/crypto/mq/__init__.py b/src/sage/crypto/mq/__init__.py index a0b767f60a5..bc96f8eb607 100644 --- a/src/sage/crypto/mq/__init__.py +++ b/src/sage/crypto/mq/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.crypto.mq.rijndael_gf', 'RijndaelGF') lazy_import('sage.crypto.mq.sr', 'SR') diff --git a/src/sage/crypto/mq/mpolynomialsystemgenerator.py b/src/sage/crypto/mq/mpolynomialsystemgenerator.py index 31690a55e34..4416d9ef7f6 100644 --- a/src/sage/crypto/mq/mpolynomialsystemgenerator.py +++ b/src/sage/crypto/mq/mpolynomialsystemgenerator.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Abstract base class for generators of polynomial systems diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index 5192c742694..55ae295f2cd 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" Rijndael-GF diff --git a/src/sage/crypto/mq/sbox.py b/src/sage/crypto/mq/sbox.py index ea2e3ea529e..b05411fe0d3 100644 --- a/src/sage/crypto/mq/sbox.py +++ b/src/sage/crypto/mq/sbox.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.crypto.sbox', ['SBox', diff --git a/src/sage/crypto/mq/sr.py b/src/sage/crypto/mq/sr.py index 80ff73420bb..5fcffef726d 100644 --- a/src/sage/crypto/mq/sr.py +++ b/src/sage/crypto/mq/sr.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" Small Scale Variants of the AES (SR) Polynomial System Generator diff --git a/src/sage/crypto/public_key/all.py b/src/sage/crypto/public_key/all.py index c19d3da50f3..56416dd76b5 100644 --- a/src/sage/crypto/public_key/all.py +++ b/src/sage/crypto/public_key/all.py @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.crypto.public_key.blum_goldwasser', 'BlumGoldwasser') -del lazy_import diff --git a/src/sage/crypto/public_key/blum_goldwasser.py b/src/sage/crypto/public_key/blum_goldwasser.py index c759cc2784f..1d090673400 100644 --- a/src/sage/crypto/public_key/blum_goldwasser.py +++ b/src/sage/crypto/public_key/blum_goldwasser.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Blum-Goldwasser Probabilistic Encryption diff --git a/src/sage/crypto/sbox.pyx b/src/sage/crypto/sbox.pyx index 45f958ad0cc..322f7ca5f45 100644 --- a/src/sage/crypto/sbox.pyx +++ b/src/sage/crypto/sbox.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" S-Boxes and Their Algebraic Representations diff --git a/src/sage/crypto/sboxes.py b/src/sage/crypto/sboxes.py index 5f16103a641..749593c401b 100644 --- a/src/sage/crypto/sboxes.py +++ b/src/sage/crypto/sboxes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.modules sage.rings.finite_rings r""" S-Boxes used in cryptographic schemes diff --git a/src/sage/crypto/stream.py b/src/sage/crypto/stream.py index a7d8760d7d5..636f588ad97 100644 --- a/src/sage/crypto/stream.py +++ b/src/sage/crypto/stream.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.rings.finite_rings """ Stream Cryptosystems diff --git a/src/sage/crypto/stream_cipher.py b/src/sage/crypto/stream_cipher.py index f2262ee43de..7eb69e3c7b7 100644 --- a/src/sage/crypto/stream_cipher.py +++ b/src/sage/crypto/stream_cipher.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.rings.finite_rings """ Stream Ciphers diff --git a/src/sage/crypto/util.py b/src/sage/crypto/util.py index 1610427b90e..8590c83db5c 100644 --- a/src/sage/crypto/util.py +++ b/src/sage/crypto/util.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat """ Utility Functions for Cryptography diff --git a/src/sage/data_structures/all.py b/src/sage/data_structures/all.py index 86dc95c5bd8..eac1b4b8931 100644 --- a/src/sage/data_structures/all.py +++ b/src/sage/data_structures/all.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-categories -from sage.data_structures.all__sagemath_categories import * +from sage.data_structures.bitset import Bitset, FrozenBitset diff --git a/src/sage/data_structures/all__sagemath_categories.py b/src/sage/data_structures/all__sagemath_categories.py deleted file mode 100644 index fe98668667d..00000000000 --- a/src/sage/data_structures/all__sagemath_categories.py +++ /dev/null @@ -1 +0,0 @@ -from sage.data_structures.bitset import Bitset, FrozenBitset diff --git a/src/sage/data_structures/all__sagemath_combinat.py b/src/sage/data_structures/all__sagemath_combinat.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/data_structures/all__sagemath_flint.py b/src/sage/data_structures/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/data_structures/binary_matrix.pxd b/src/sage/data_structures/binary_matrix.pxd index 6c4a8598797..a2eb8d709bb 100644 --- a/src/sage/data_structures/binary_matrix.pxd +++ b/src/sage/data_structures/binary_matrix.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" A binary matrix datatype in Cython diff --git a/src/sage/data_structures/binary_search.pxd b/src/sage/data_structures/binary_search.pxd index 88b025a3766..5eee088e8b8 100644 --- a/src/sage/data_structures/binary_search.pxd +++ b/src/sage/data_structures/binary_search.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-categories cdef Py_ssize_t binary_search(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x, Py_ssize_t* ins) noexcept -cdef Py_ssize_t binary_search0(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x) noexcept +cdef Py_ssize_t binary_search0(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x) noexcept \ No newline at end of file diff --git a/src/sage/data_structures/binary_search.pyx b/src/sage/data_structures/binary_search.pyx index 47d92ca3a16..173affa5687 100644 --- a/src/sage/data_structures/binary_search.pyx +++ b/src/sage/data_structures/binary_search.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # We can probably get away with only having the mpz_binary_searches in here. # I'm too scared to get rid of it at 2am though. cdef Py_ssize_t binary_search(Py_ssize_t* v, Py_ssize_t n, Py_ssize_t x, Py_ssize_t* ins) noexcept: diff --git a/src/sage/data_structures/bitset.pxd b/src/sage/data_structures/bitset.pxd index 6f980b21837..35343fa28ae 100644 --- a/src/sage/data_structures/bitset.pxd +++ b/src/sage/data_structures/bitset.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2008 Robert Bradshaw # diff --git a/src/sage/data_structures/bitset.pyx b/src/sage/data_structures/bitset.pyx index 8c3c28f281f..8a5e91c0a9a 100644 --- a/src/sage/data_structures/bitset.pyx +++ b/src/sage/data_structures/bitset.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Bitsets diff --git a/src/sage/data_structures/bitset_base.pxd b/src/sage/data_structures/bitset_base.pxd index df569e4fddf..df40d666d86 100644 --- a/src/sage/data_structures/bitset_base.pxd +++ b/src/sage/data_structures/bitset_base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # distutils: depends = bitset_intrinsics.h # distutils: libraries = gmp """ diff --git a/src/sage/data_structures/bitset_base.pyx b/src/sage/data_structures/bitset_base.pyx index bb94d74e131..182812a891f 100644 --- a/src/sage/data_structures/bitset_base.pyx +++ b/src/sage/data_structures/bitset_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Few functions from ``bitset_base.pxd`` that are not inlined. """ diff --git a/src/sage/data_structures/blas_dict.pxd b/src/sage/data_structures/blas_dict.pxd index b40130c88d5..7464c0daba8 100644 --- a/src/sage/data_structures/blas_dict.pxd +++ b/src/sage/data_structures/blas_dict.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cpdef int iaxpy(a, dict X, dict Y, bint remove_zeros=*, bint factor_on_left=*) except -1 cpdef dict axpy(a, dict X, dict Y, bint factor_on_left=*) cpdef dict negate(dict D) diff --git a/src/sage/data_structures/blas_dict.pyx b/src/sage/data_structures/blas_dict.pyx index b53b102377a..c13cab2aab9 100644 --- a/src/sage/data_structures/blas_dict.pyx +++ b/src/sage/data_structures/blas_dict.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Basic Linear Algebra Subroutines on dictionaries diff --git a/src/sage/data_structures/bounded_integer_sequences.pxd b/src/sage/data_structures/bounded_integer_sequences.pxd index 0abfd7d3082..c87fc914921 100644 --- a/src/sage/data_structures/bounded_integer_sequences.pxd +++ b/src/sage/data_structures/bounded_integer_sequences.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.gmp.types cimport * from sage.data_structures.bitset cimport * diff --git a/src/sage/data_structures/bounded_integer_sequences.pyx b/src/sage/data_structures/bounded_integer_sequences.pyx index faed83a1d5e..40638ab399c 100644 --- a/src/sage/data_structures/bounded_integer_sequences.pyx +++ b/src/sage/data_structures/bounded_integer_sequences.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Sequences of bounded integers diff --git a/src/sage/data_structures/list_of_pairs.pxd b/src/sage/data_structures/list_of_pairs.pxd index e16c6ae628c..4dbb57c201c 100644 --- a/src/sage/data_structures/list_of_pairs.pxd +++ b/src/sage/data_structures/list_of_pairs.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cimport cython cdef struct pair_s: diff --git a/src/sage/data_structures/list_of_pairs.pyx b/src/sage/data_structures/list_of_pairs.pyx index a8e213aea36..258320353a0 100644 --- a/src/sage/data_structures/list_of_pairs.pyx +++ b/src/sage/data_structures/list_of_pairs.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" A data structure to store lists of integer pairs of large size. """ diff --git a/src/sage/data_structures/mutable_poset.py b/src/sage/data_structures/mutable_poset.py index 852a29cd534..03b5a7019c2 100644 --- a/src/sage/data_structures/mutable_poset.py +++ b/src/sage/data_structures/mutable_poset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Mutable Poset diff --git a/src/sage/data_structures/sparse_bitset.pxd b/src/sage/data_structures/sparse_bitset.pxd index 9bebdb48b22..9b95c55675b 100644 --- a/src/sage/data_structures/sparse_bitset.pxd +++ b/src/sage/data_structures/sparse_bitset.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Sparse bitset. diff --git a/src/sage/data_structures/stream.py b/src/sage/data_structures/stream.py index 0841c040c75..c67c2b3de04 100644 --- a/src/sage/data_structures/stream.py +++ b/src/sage/data_structures/stream.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Streams diff --git a/src/sage/databases/all.py b/src/sage/databases/all.py index 1f1e9ace1d8..a6571c7a5df 100644 --- a/src/sage/databases/all.py +++ b/src/sage/databases/all.py @@ -5,7 +5,7 @@ * CremonaDatabase() - Cremona's tables of elliptic curves and related data. - * findstat -- The FindStat database (https://www.findstat.org/). + * findstat -- The FindStat database (http://www.findstat.org/). * JonesDatabase() -- returns the John Jones table of number fields with bounded ramification and degree <= 6. @@ -48,7 +48,7 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from sage.databases.sql_db import SQLQuery, SQLDatabase +from .sql_db import SQLQuery, SQLDatabase lazy_import('sage.databases.conway', 'ConwayPolynomials') @@ -67,17 +67,16 @@ lazy_import('sage.databases.odlyzko', 'zeta_zeros') -from sage.databases.db_modular_polynomials import \ - ClassicalModularPolynomialDatabase, \ - DedekindEtaModularPolynomialDatabase, \ - DedekindEtaModularCorrespondenceDatabase, \ - AtkinModularPolynomialDatabase, \ - AtkinModularCorrespondenceDatabase +from .db_modular_polynomials import \ + ClassicalModularPolynomialDatabase, \ + DedekindEtaModularPolynomialDatabase, \ + DedekindEtaModularCorrespondenceDatabase, \ + AtkinModularPolynomialDatabase, \ + AtkinModularCorrespondenceDatabase -from sage.databases.db_class_polynomials import \ - HilbertClassPolynomialDatabase +from .db_class_polynomials import \ + HilbertClassPolynomialDatabase lazy_import('sage.databases.cunningham_tables', 'cunningham_prime_factors') lazy_import('sage.databases.findstat', ['findstat', 'findmap']) -del lazy_import diff --git a/src/sage/databases/all__sagemath_graphs.py b/src/sage/databases/all__sagemath_graphs.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/databases/conway.py b/src/sage/databases/conway.py index 393f8428468..b1f76292ce8 100644 --- a/src/sage/databases/conway.py +++ b/src/sage/databases/conway.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Frank Lübeck's tables of Conway polynomials over finite fields """ diff --git a/src/sage/databases/cubic_hecke_db.py b/src/sage/databases/cubic_hecke_db.py index c4c2eab0f8c..ad3dc8cd399 100644 --- a/src/sage/databases/cubic_hecke_db.py +++ b/src/sage/databases/cubic_hecke_db.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Cubic Hecke database diff --git a/src/sage/databases/findstat.py b/src/sage/databases/findstat.py index 3b27e18a06d..062bde84b74 100644 --- a/src/sage/databases/findstat.py +++ b/src/sage/databases/findstat.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" FindStat - the search engine for combinatorial statistics and maps diff --git a/src/sage/databases/knotinfo_db.py b/src/sage/databases/knotinfo_db.py index 251ffb224fe..8817a304d85 100644 --- a/src/sage/databases/knotinfo_db.py +++ b/src/sage/databases/knotinfo_db.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- r""" KnotInfo database diff --git a/src/sage/databases/oeis.py b/src/sage/databases/oeis.py index 83024b84db2..040a2460289 100644 --- a/src/sage/databases/oeis.py +++ b/src/sage/databases/oeis.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" The On-Line Encyclopedia of Integer Sequences (OEIS) diff --git a/src/sage/databases/sql_db.py b/src/sage/databases/sql_db.py index cae2b9c8430..ebc6d5f0eea 100644 --- a/src/sage/databases/sql_db.py +++ b/src/sage/databases/sql_db.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Relational (sqlite) Databases Module diff --git a/src/sage/doctest/__init__.py b/src/sage/doctest/__init__.py index d0892b4ed55..95280f2c603 100644 --- a/src/sage/doctest/__init__.py +++ b/src/sage/doctest/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # This flag gets set to True by sage.doctest.forker.init_sage at the # beginning of each doctest run. DOCTEST_MODE = False diff --git a/src/sage/doctest/all.py b/src/sage/doctest/all.py index 626c4fb42b1..bc363e7830c 100644 --- a/src/sage/doctest/all.py +++ b/src/sage/doctest/all.py @@ -1,4 +1,2 @@ -# sage_setup: distribution = sagemath-repl from sage.misc.lazy_import import lazy_import lazy_import('sage.doctest.control', 'run_doctests') -del lazy_import diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py index 602b5276543..767a9978a87 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Classes involved in doctesting diff --git a/src/sage/doctest/external.py b/src/sage/doctest/external.py index 5dc1ed7b823..85eefc27119 100644 --- a/src/sage/doctest/external.py +++ b/src/sage/doctest/external.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Detecting external software diff --git a/src/sage/doctest/fixtures.py b/src/sage/doctest/fixtures.py index 01f931727df..9fbfdf86db9 100644 --- a/src/sage/doctest/fixtures.py +++ b/src/sage/doctest/fixtures.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Fixtures to help testing functionality diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index 48b991316dd..3e5b4c52811 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Processes for running doctests @@ -1208,7 +1207,7 @@ def _failure_header(self, test, example, message='Failed example:'): sage: ex = doctests[0].examples[0] sage: print(DTR._failure_header(doctests[0], ex)) ********************************************************************** - File ".../sage/doctest/forker.py", line 12, in sage.doctest.forker + File ".../sage/doctest/forker.py", line 11, in sage.doctest.forker Failed example: doctest_var = 42; doctest_var^2 @@ -1218,7 +1217,7 @@ def _failure_header(self, test, example, message='Failed example:'): sage: import doctest sage: print(doctest.DocTestRunner._failure_header(DTR, doctests[0], ex)) ********************************************************************** - File ".../sage/doctest/forker.py", line 12, in sage.doctest.forker + File ".../sage/doctest/forker.py", line 11, in sage.doctest.forker Failed example: doctest_var = Integer(42); doctest_var**Integer(2) @@ -1227,7 +1226,7 @@ def _failure_header(self, test, example, message='Failed example:'): sage: print(DTR._failure_header(doctests[0], ex, message='Hello there!')) ********************************************************************** - File ".../sage/doctest/forker.py", line 12, in sage.doctest.forker + File ".../sage/doctest/forker.py", line 11, in sage.doctest.forker Hello there! doctest_var = 42; doctest_var^2 @@ -1318,7 +1317,7 @@ def report_start(self, out, test, example): sage: doctests, extras = FDS.create_doctests(globals()) sage: ex = doctests[0].examples[0] sage: DTR.report_start(sys.stdout.write, doctests[0], ex) - Trying (line 12): doctest_var = 42; doctest_var^2 + Trying (line 11): doctest_var = 42; doctest_var^2 Expecting: 1764 """ @@ -1413,7 +1412,7 @@ def report_failure(self, out, test, example, got, globs): sage: DTR.no_failure_yet = True sage: DTR.report_failure(sys.stdout.write, doctests[0], ex, 'BAD ANSWER\n', {}) ********************************************************************** - File ".../sage/doctest/forker.py", line 12, in sage.doctest.forker + File ".../sage/doctest/forker.py", line 11, in sage.doctest.forker Failed example: doctest_var = 42; doctest_var^2 Expected: @@ -1546,7 +1545,7 @@ def report_overtime(self, out, test, example, got, *, check_duration=0): sage: ex.walltime = 1.23 sage: DTR.report_overtime(sys.stdout.write, doctests[0], ex, 'BAD ANSWER\n', check_duration=2.34) ********************************************************************** - File ".../sage/doctest/forker.py", line 12, in sage.doctest.forker + File ".../sage/doctest/forker.py", line 11, in sage.doctest.forker Warning, slow doctest: doctest_var = 42; doctest_var^2 Test ran for 1.23 s, check ran for 2.34 s diff --git a/src/sage/doctest/parsing.py b/src/sage/doctest/parsing.py index 06d504f6d41..8485525f8e0 100644 --- a/src/sage/doctest/parsing.py +++ b/src/sage/doctest/parsing.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- """ Parsing docstrings diff --git a/src/sage/doctest/reporting.py b/src/sage/doctest/reporting.py index c1ac8a6c7b8..600a18b0e8d 100644 --- a/src/sage/doctest/reporting.py +++ b/src/sage/doctest/reporting.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- r""" Reporting doctest results diff --git a/src/sage/doctest/sources.py b/src/sage/doctest/sources.py index 61165b62aeb..eff2a853e2b 100644 --- a/src/sage/doctest/sources.py +++ b/src/sage/doctest/sources.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Classes for sources of doctests diff --git a/src/sage/doctest/test.py b/src/sage/doctest/test.py index 4907d30d58d..cb2cecc0b8b 100644 --- a/src/sage/doctest/test.py +++ b/src/sage/doctest/test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Test the doctesting framework diff --git a/src/sage/doctest/util.py b/src/sage/doctest/util.py index 3fe9d3408bd..b68068a0ce1 100644 --- a/src/sage/doctest/util.py +++ b/src/sage/doctest/util.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Utility functions diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index fddc4e83a98..e5c553a3d54 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -20,22 +20,14 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.dynamics.all__sagemath_schemes import * - -try: - from sage.dynamics.all__sagemath_symbolics import * -except ImportError: - pass - from sage.misc.lazy_import import lazy_import +from sage.dynamics.arithmetic_dynamics.all import * +from sage.dynamics.complex_dynamics.all import * from sage.dynamics.cellular_automata.all import * # Discrete dynamical systems lazy_import('sage.dynamics.finite_dynamical_system', ['DiscreteDynamicalSystem']) -lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', - 'finite_dynamical_systems') -del lazy_import -del install_doc +lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', 'finite_dynamical_systems') diff --git a/src/sage/dynamics/all__sagemath_schemes.py b/src/sage/dynamics/all__sagemath_schemes.py deleted file mode 100644 index b1eac4ead2f..00000000000 --- a/src/sage/dynamics/all__sagemath_schemes.py +++ /dev/null @@ -1 +0,0 @@ -from sage.dynamics.arithmetic_dynamics.all import * diff --git a/src/sage/dynamics/all__sagemath_symbolics.py b/src/sage/dynamics/all__sagemath_symbolics.py deleted file mode 100644 index 1bffe1dffa6..00000000000 --- a/src/sage/dynamics/all__sagemath_symbolics.py +++ /dev/null @@ -1,5 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.dynamics.complex_dynamics.mandel_julia', - ["mandelbrot_plot", "external_ray", "kneading_sequence", "julia_plot"]) -del lazy_import diff --git a/src/sage/dynamics/arithmetic_dynamics/affine_ds.py b/src/sage/dynamics/arithmetic_dynamics/affine_ds.py index d89c79ee259..6938068bbc6 100644 --- a/src/sage/dynamics/arithmetic_dynamics/affine_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/affine_ds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Dynamical systems on affine schemes diff --git a/src/sage/dynamics/arithmetic_dynamics/all.py b/src/sage/dynamics/arithmetic_dynamics/all.py index 563f3f5205b..f536734b5d9 100644 --- a/src/sage/dynamics/arithmetic_dynamics/all.py +++ b/src/sage/dynamics/arithmetic_dynamics/all.py @@ -1,14 +1,12 @@ -# sage_setup: distribution = sagemath-schemes from sage.misc.lazy_import import lazy_import -from sage.dynamics.arithmetic_dynamics.generic_ds import DynamicalSystem -from sage.dynamics.arithmetic_dynamics.affine_ds import DynamicalSystem_affine -from sage.dynamics.arithmetic_dynamics.projective_ds import DynamicalSystem_projective -from sage.dynamics.arithmetic_dynamics.product_projective_ds import DynamicalSystem_product_projective -from sage.dynamics.arithmetic_dynamics.berkovich_ds import DynamicalSystem_Berkovich -from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup -from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup_affine -from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup_projective +from .generic_ds import DynamicalSystem +from .affine_ds import DynamicalSystem_affine +from .projective_ds import DynamicalSystem_projective +from .product_projective_ds import DynamicalSystem_product_projective +from .berkovich_ds import DynamicalSystem_Berkovich +from .dynamical_semigroup import DynamicalSemigroup +from .dynamical_semigroup import DynamicalSemigroup_affine +from .dynamical_semigroup import DynamicalSemigroup_projective lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'WehlerK3Surface') lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'random_WehlerK3Surface') -del lazy_import diff --git a/src/sage/dynamics/arithmetic_dynamics/berkovich_ds.py b/src/sage/dynamics/arithmetic_dynamics/berkovich_ds.py index 976d00fe6fd..5559a48ecce 100644 --- a/src/sage/dynamics/arithmetic_dynamics/berkovich_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/berkovich_ds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Dynamical systems on Berkovich space over `\CC_p`. diff --git a/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py b/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py index 540f633d545..ebb8702a7db 100644 --- a/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +++ b/src/sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Dynamical semigroups diff --git a/src/sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py b/src/sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py index 10c7ef51ce3..c82f10aed0d 100644 --- a/src/sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +++ b/src/sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Automorphism groups of dynamical systems of the projective line diff --git a/src/sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py b/src/sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py index af921d7fc96..9a2e5fd6e15 100644 --- a/src/sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +++ b/src/sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Sage functions to compute minimal models of rational functions under the conjugation action of `PGL_2(QQ)`. diff --git a/src/sage/dynamics/arithmetic_dynamics/generic_ds.py b/src/sage/dynamics/arithmetic_dynamics/generic_ds.py index 3ed33e439a1..0afff17895c 100644 --- a/src/sage/dynamics/arithmetic_dynamics/generic_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/generic_ds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Generic dynamical systems on schemes diff --git a/src/sage/dynamics/arithmetic_dynamics/product_projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/product_projective_ds.py index 12a032a7d63..44565197717 100644 --- a/src/sage/dynamics/arithmetic_dynamics/product_projective_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/product_projective_ds.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Dynamical systems for products of projective spaces diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py index 876704c49e6..353eb1ea041 100644 --- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-schemes +# -*- coding: utf-8 -*- r""" Dynamical systems on projective schemes diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx b/src/sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx index 9f7b8d6523f..f05806f4935 100644 --- a/src/sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Dynamical systems on projective varieties (Cython helper) diff --git a/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py b/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py index bc05c39dc98..7d775faf96a 100644 --- a/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py +++ b/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Wehler K3 Surfaces diff --git a/src/sage/dynamics/cellular_automata/all.py b/src/sage/dynamics/cellular_automata/all.py index ff4151c0588..9f13ad1c13a 100644 --- a/src/sage/dynamics/cellular_automata/all.py +++ b/src/sage/dynamics/cellular_automata/all.py @@ -3,4 +3,3 @@ from sage.misc.lazy_import import lazy_import lazy_import("sage.dynamics.cellular_automata.solitons", ["SolitonCellularAutomata", "PeriodicSolitonCellularAutomata"]) -del lazy_import diff --git a/src/sage/dynamics/cellular_automata/elementary.py b/src/sage/dynamics/cellular_automata/elementary.py index 77d5b705fcb..26e68c37b01 100644 --- a/src/sage/dynamics/cellular_automata/elementary.py +++ b/src/sage/dynamics/cellular_automata/elementary.py @@ -1,3 +1,4 @@ +# -*- encoding: utf-8 -*- """ Elementary Cellular Automata diff --git a/src/sage/dynamics/cellular_automata/glca.py b/src/sage/dynamics/cellular_automata/glca.py index 8c896a981e9..6b062f2a441 100644 --- a/src/sage/dynamics/cellular_automata/glca.py +++ b/src/sage/dynamics/cellular_automata/glca.py @@ -1,3 +1,4 @@ +# -*- encoding: utf-8 -*- """ Graftal Lace Cellular Automata diff --git a/src/sage/dynamics/complex_dynamics/all.py b/src/sage/dynamics/complex_dynamics/all.py index 9bd84366db6..a4f82d614e5 100644 --- a/src/sage/dynamics/complex_dynamics/all.py +++ b/src/sage/dynamics/complex_dynamics/all.py @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics from sage.misc.lazy_import import lazy_import lazy_import("sage.dynamics.complex_dynamics.mandel_julia", ["mandelbrot_plot", "external_ray", "kneading_sequence", "julia_plot"]) -del lazy_import diff --git a/src/sage/dynamics/complex_dynamics/mandel_julia.py b/src/sage/dynamics/complex_dynamics/mandel_julia.py index 43810d6582b..f3d6fbfa5a0 100644 --- a/src/sage/dynamics/complex_dynamics/mandel_julia.py +++ b/src/sage/dynamics/complex_dynamics/mandel_julia.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Mandelbrot and Julia sets diff --git a/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx b/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx index b3731884dda..43ce0effd58 100644 --- a/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx +++ b/src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # cython: binding=True # sage.doctest: needs sage.plot r""" diff --git a/src/sage/env.py b/src/sage/env.py index 80101c829e4..bb228e7f041 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Sage Runtime Environment diff --git a/src/sage/ext/all__sagemath_categories.py b/src/sage/ext/all__sagemath_categories.py deleted file mode 100644 index ec13d6e405f..00000000000 --- a/src/sage/ext/all__sagemath_categories.py +++ /dev/null @@ -1,2 +0,0 @@ -from sage.ext.fast_callable import fast_callable -from sage.ext.fast_eval import fast_float diff --git a/src/sage/ext/all__sagemath_modules.py b/src/sage/ext/all__sagemath_modules.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/ext/all__sagemath_objects.py b/src/sage/ext/all__sagemath_objects.py index 40da49fdd73..38e44245ad3 100644 --- a/src/sage/ext/all__sagemath_objects.py +++ b/src/sage/ext/all__sagemath_objects.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package diff --git a/src/sage/ext/all__sagemath_pari.py b/src/sage/ext/all__sagemath_pari.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/ext/all__sagemath_symbolics.py b/src/sage/ext/all__sagemath_symbolics.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/ext/cplusplus.pxd b/src/sage/ext/cplusplus.pxd index d5d2035ebe3..d748bf2347a 100644 --- a/src/sage/ext/cplusplus.pxd +++ b/src/sage/ext/cplusplus.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects #***************************************************************************** # Copyright (C) 2017 Jeroen Demeyer # diff --git a/src/sage/ext/fast_callable.pxd b/src/sage/ext/fast_callable.pxd index 9e03efad5d5..73dd0311c12 100644 --- a/src/sage/ext/fast_callable.pxd +++ b/src/sage/ext/fast_callable.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef class Wrapper: cdef readonly object _orig_args cdef readonly object _metadata diff --git a/src/sage/ext/fast_callable.pyx b/src/sage/ext/fast_callable.pyx index 64f2e5be722..b9072da61c5 100644 --- a/src/sage/ext/fast_callable.pyx +++ b/src/sage/ext/fast_callable.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Fast Expression Evaluation diff --git a/src/sage/ext/fast_eval.pxd b/src/sage/ext/fast_eval.pxd index b230a6a2ad9..e69de29bb2d 100644 --- a/src/sage/ext/fast_eval.pxd +++ b/src/sage/ext/fast_eval.pxd @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-categories diff --git a/src/sage/ext/fast_eval.pyx b/src/sage/ext/fast_eval.pyx index 961b0825c8b..52fbc8f7406 100644 --- a/src/sage/ext/fast_eval.pyx +++ b/src/sage/ext/fast_eval.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Fast Numerical Evaluation diff --git a/src/sage/ext/memory.pyx b/src/sage/ext/memory.pyx index c8671fa37cb..26a5c848bb5 100644 --- a/src/sage/ext/memory.pyx +++ b/src/sage/ext/memory.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Low-level memory allocation functions diff --git a/src/sage/ext/mod_int.pxd b/src/sage/ext/mod_int.pxd index 98be0ab54dd..f2ef6fe5527 100644 --- a/src/sage/ext/mod_int.pxd +++ b/src/sage/ext/mod_int.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ The `mod_int` Data Type diff --git a/src/sage/ext/stdsage.pxd b/src/sage/ext/stdsage.pxd index e8e8f3823f3..ddd3fd76504 100644 --- a/src/sage/ext/stdsage.pxd +++ b/src/sage/ext/stdsage.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Standard C helper code for Cython modules """ diff --git a/src/sage/ext_data/all__sagemath_gap.py b/src/sage/ext_data/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/ext_data/all__sagemath_singular.py b/src/sage/ext_data/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/features/__init__.py b/src/sage/features/__init__.py index 5fdefceb7ee..a8b11ef7db5 100644 --- a/src/sage/features/__init__.py +++ b/src/sage/features/__init__.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-environment +# -*- coding: utf-8 -*- r""" Testing for features of the environment at runtime diff --git a/src/sage/features/all.py b/src/sage/features/all.py index a53d095c596..599bc575dd7 100644 --- a/src/sage/features/all.py +++ b/src/sage/features/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Enumeration of all defined features """ diff --git a/src/sage/features/bliss.py b/src/sage/features/bliss.py index cfdd84da1c7..37fc4d7f8c3 100644 --- a/src/sage/features/bliss.py +++ b/src/sage/features/bliss.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``bliss`` """ diff --git a/src/sage/features/cddlib.py b/src/sage/features/cddlib.py index 24b67ef9f8e..b8fdb6fed8e 100644 --- a/src/sage/features/cddlib.py +++ b/src/sage/features/cddlib.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``cddlib`` """ diff --git a/src/sage/features/csdp.py b/src/sage/features/csdp.py index 866ca1c21d1..8f2e18dc182 100644 --- a/src/sage/features/csdp.py +++ b/src/sage/features/csdp.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-environment +# -*- coding: utf-8 -*- r""" Feature for testing the presence of ``csdp`` """ diff --git a/src/sage/features/cython.py b/src/sage/features/cython.py index 30f66eb3426..8f03155ac2f 100644 --- a/src/sage/features/cython.py +++ b/src/sage/features/cython.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``cython`` """ diff --git a/src/sage/features/databases.py b/src/sage/features/databases.py index 7a05270532c..844ed54de17 100644 --- a/src/sage/features/databases.py +++ b/src/sage/features/databases.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of various databases """ diff --git a/src/sage/features/dvipng.py b/src/sage/features/dvipng.py index 66fbee39561..281084a6e72 100644 --- a/src/sage/features/dvipng.py +++ b/src/sage/features/dvipng.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``dvipng`` """ diff --git a/src/sage/features/ffmpeg.py b/src/sage/features/ffmpeg.py index 366249875d7..36a23594162 100644 --- a/src/sage/features/ffmpeg.py +++ b/src/sage/features/ffmpeg.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``ffmpeg`` """ diff --git a/src/sage/features/four_ti_2.py b/src/sage/features/four_ti_2.py index 655674cbde1..2af1c1e25d2 100644 --- a/src/sage/features/four_ti_2.py +++ b/src/sage/features/four_ti_2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``4ti2`` """ diff --git a/src/sage/features/fricas.py b/src/sage/features/fricas.py index d5b7d469207..a52e082d114 100644 --- a/src/sage/features/fricas.py +++ b/src/sage/features/fricas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``fricas`` """ diff --git a/src/sage/features/gap.py b/src/sage/features/gap.py index fdcbceee102..314ba1cc514 100644 --- a/src/sage/features/gap.py +++ b/src/sage/features/gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of the SageMath interfaces to ``gap`` and of GAP packages """ diff --git a/src/sage/features/gfan.py b/src/sage/features/gfan.py index e3545392934..a58090b4c91 100644 --- a/src/sage/features/gfan.py +++ b/src/sage/features/gfan.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``gfan`` """ diff --git a/src/sage/features/graph_generators.py b/src/sage/features/graph_generators.py index 8f384af9ed3..47c4557241c 100644 --- a/src/sage/features/graph_generators.py +++ b/src/sage/features/graph_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of graph generator programs ``benzene``, ``buckygen``, ``plantri`` """ diff --git a/src/sage/features/graphviz.py b/src/sage/features/graphviz.py index 4e6ae9a6c4a..abf9b7615fa 100644 --- a/src/sage/features/graphviz.py +++ b/src/sage/features/graphviz.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``graphviz`` """ diff --git a/src/sage/features/igraph.py b/src/sage/features/igraph.py index 00d260f2ac7..bcf81f9cec7 100644 --- a/src/sage/features/igraph.py +++ b/src/sage/features/igraph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Check for igraph """ diff --git a/src/sage/features/imagemagick.py b/src/sage/features/imagemagick.py index 526ac278877..fceeed8b727 100644 --- a/src/sage/features/imagemagick.py +++ b/src/sage/features/imagemagick.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``imagemagick`` diff --git a/src/sage/features/interfaces.py b/src/sage/features/interfaces.py index 6d5249ab443..ddfc3b9b7ee 100644 --- a/src/sage/features/interfaces.py +++ b/src/sage/features/interfaces.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing whether interpreter interfaces to ``magma``, ``maple``, ``mathematica`` etc. are functional """ diff --git a/src/sage/features/internet.py b/src/sage/features/internet.py index bba178bd326..576b0136926 100644 --- a/src/sage/features/internet.py +++ b/src/sage/features/internet.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing if the Internet is available """ diff --git a/src/sage/features/join_feature.py b/src/sage/features/join_feature.py index ae95d073da4..24c6583c123 100644 --- a/src/sage/features/join_feature.py +++ b/src/sage/features/join_feature.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Join features """ diff --git a/src/sage/features/kenzo.py b/src/sage/features/kenzo.py index 39b8dd9a936..72f703da15f 100644 --- a/src/sage/features/kenzo.py +++ b/src/sage/features/kenzo.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``kenzo`` """ diff --git a/src/sage/features/latex.py b/src/sage/features/latex.py index 6f366ff86f6..874c5ca7bfb 100644 --- a/src/sage/features/latex.py +++ b/src/sage/features/latex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``latex`` and equivalent programs """ diff --git a/src/sage/features/latte.py b/src/sage/features/latte.py index 7e973978c24..4df8b1cd586 100644 --- a/src/sage/features/latte.py +++ b/src/sage/features/latte.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``latte_int`` """ diff --git a/src/sage/features/lrs.py b/src/sage/features/lrs.py index 52506e496e5..6eb0a11b642 100644 --- a/src/sage/features/lrs.py +++ b/src/sage/features/lrs.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-environment +# -*- coding: utf-8 -*- r""" Feature for testing the presence of ``lrslib`` """ diff --git a/src/sage/features/mcqd.py b/src/sage/features/mcqd.py index 25dc159f8d3..036e8fc727b 100644 --- a/src/sage/features/mcqd.py +++ b/src/sage/features/mcqd.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``mcqd`` """ diff --git a/src/sage/features/meataxe.py b/src/sage/features/meataxe.py index 319b58866ca..cc2a69cfeff 100644 --- a/src/sage/features/meataxe.py +++ b/src/sage/features/meataxe.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``meataxe`` """ diff --git a/src/sage/features/mip_backends.py b/src/sage/features/mip_backends.py index a6aa0ff2525..98b4766c1f5 100644 --- a/src/sage/features/mip_backends.py +++ b/src/sage/features/mip_backends.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of :class:`MixedIntegerLinearProgram` backends """ diff --git a/src/sage/features/msolve.py b/src/sage/features/msolve.py index 4328af54876..c90f7e5aaf6 100644 --- a/src/sage/features/msolve.py +++ b/src/sage/features/msolve.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-environment +# -*- coding: utf-8 -*- r""" Feature for testing the presence of msolve diff --git a/src/sage/features/nauty.py b/src/sage/features/nauty.py index 79542de74fc..4a07264f927 100644 --- a/src/sage/features/nauty.py +++ b/src/sage/features/nauty.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of nauty executables """ diff --git a/src/sage/features/normaliz.py b/src/sage/features/normaliz.py index 6d1de88bf58..80b3891daf3 100644 --- a/src/sage/features/normaliz.py +++ b/src/sage/features/normaliz.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``pynormaliz`` """ diff --git a/src/sage/features/palp.py b/src/sage/features/palp.py index b35634ac800..b58a8fc2e54 100644 --- a/src/sage/features/palp.py +++ b/src/sage/features/palp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``palp`` """ diff --git a/src/sage/features/pandoc.py b/src/sage/features/pandoc.py index 1c4450b9b0c..00ee6055024 100644 --- a/src/sage/features/pandoc.py +++ b/src/sage/features/pandoc.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-environment +# -*- coding: utf-8 -*- r""" Feature for testing the presence of ``pandoc`` """ diff --git a/src/sage/features/pdf2svg.py b/src/sage/features/pdf2svg.py index af20d011ac3..98578ecb6a1 100644 --- a/src/sage/features/pdf2svg.py +++ b/src/sage/features/pdf2svg.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``pdf2svg`` """ diff --git a/src/sage/features/phitigra.py b/src/sage/features/phitigra.py index ea4d855cf53..6c1896bd8df 100644 --- a/src/sage/features/phitigra.py +++ b/src/sage/features/phitigra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Check for ``phitigra`` """ diff --git a/src/sage/features/pkg_systems.py b/src/sage/features/pkg_systems.py index 4f6db21b735..72ecd494344 100644 --- a/src/sage/features/pkg_systems.py +++ b/src/sage/features/pkg_systems.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of package systems ``sage_spkg``, ``conda``, ``pip``, ``debian``, ``fedora`` etc. """ diff --git a/src/sage/features/polymake.py b/src/sage/features/polymake.py index 10dfab73346..d2b433b1c7f 100644 --- a/src/sage/features/polymake.py +++ b/src/sage/features/polymake.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Feature for testing the presence of ``jupymake``, the Python interface to polymake """ diff --git a/src/sage/features/poppler.py b/src/sage/features/poppler.py index c4777e9c6ca..b8f8586e7f5 100644 --- a/src/sage/features/poppler.py +++ b/src/sage/features/poppler.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Check for poppler features diff --git a/src/sage/features/rubiks.py b/src/sage/features/rubiks.py index 2429645d2ff..07250532cb6 100644 --- a/src/sage/features/rubiks.py +++ b/src/sage/features/rubiks.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``rubiks`` """ diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py index 207fa37ce15..75a925895c5 100644 --- a/src/sage/features/sagemath.py +++ b/src/sage/features/sagemath.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of Python modules in the Sage library diff --git a/src/sage/features/singular.py b/src/sage/features/singular.py index d6469b6f7f4..fce89a8e91c 100644 --- a/src/sage/features/singular.py +++ b/src/sage/features/singular.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``singular`` and the SageMath interfaces to it """ diff --git a/src/sage/features/sphinx.py b/src/sage/features/sphinx.py index ec7c8be17b6..a70e8a11eee 100644 --- a/src/sage/features/sphinx.py +++ b/src/sage/features/sphinx.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``sphinx`` """ diff --git a/src/sage/features/standard.py b/src/sage/features/standard.py index 94272802aad..c2090fc53a4 100644 --- a/src/sage/features/standard.py +++ b/src/sage/features/standard.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Check for various standard packages (for modularized distributions) diff --git a/src/sage/features/symengine_py.py b/src/sage/features/symengine_py.py index 0e602e0b84d..d32492085b7 100644 --- a/src/sage/features/symengine_py.py +++ b/src/sage/features/symengine_py.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Check for symengine_py """ diff --git a/src/sage/features/tdlib.py b/src/sage/features/tdlib.py index eb0b3b10c93..128c056a49c 100644 --- a/src/sage/features/tdlib.py +++ b/src/sage/features/tdlib.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Features for testing the presence of ``tdlib`` """ diff --git a/src/sage/functions/airy.py b/src/sage/functions/airy.py index 11bd49f5339..11f4c56be8c 100644 --- a/src/sage/functions/airy.py +++ b/src/sage/functions/airy.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Airy functions diff --git a/src/sage/functions/all.py b/src/sage/functions/all.py index cd3ef41a7ab..4cf9005f7e3 100644 --- a/src/sage/functions/all.py +++ b/src/sage/functions/all.py @@ -1,97 +1,93 @@ -# sage_setup: distribution = sagemath-categories from sage.misc.lazy_import import lazy_import lazy_import('sage.functions.piecewise', 'piecewise') lazy_import('sage.functions.error', ['erf', 'erfc', 'erfi', 'erfinv', - 'fresnel_sin', 'fresnel_cos']) + 'fresnel_sin', 'fresnel_cos']) -from sage.functions.trig import (sin, cos, sec, csc, cot, tan, - asin, acos, atan, - acot, acsc, asec, - arcsin, arccos, arctan, - arccot, arccsc, arcsec, - arctan2, atan2) +from .trig import ( sin, cos, sec, csc, cot, tan, + asin, acos, atan, + acot, acsc, asec, + arcsin, arccos, arctan, + arccot, arccsc, arcsec, + arctan2, atan2) -from sage.functions.hyperbolic import (tanh, sinh, cosh, coth, sech, csch, - asinh, acosh, atanh, acoth, asech, acsch, - arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch) +from .hyperbolic import ( tanh, sinh, cosh, coth, sech, csch, + asinh, acosh, atanh, acoth, asech, acsch, + arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch ) -reciprocal_trig_functions = {'sec': cos, 'csc': sin, - 'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh} +reciprocal_trig_functions = {'sec': cos, 'csc': sin, 'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh} -from sage.functions.other import (ceil, floor, abs_symbolic, sqrt, real_nth_root, - arg, real_part, real, frac, - factorial, binomial, - imag_part, imag, imaginary, conjugate, cases, - complex_root_of) +from .other import ( ceil, floor, abs_symbolic, sqrt, real_nth_root, + arg, real_part, real, frac, + factorial, binomial, + imag_part, imag, imaginary, conjugate, cases, + complex_root_of) -from sage.functions.log import (exp, exp_polar, log, ln, - polylog, dilog, lambert_w, harmonic_number) +from .log import (exp, exp_polar, log, ln, polylog, dilog, lambert_w, harmonic_number) -from sage.functions.transcendental import (zeta, zetaderiv, zeta_symmetric, hurwitz_zeta, - dickman_rho, stieltjes) +from .transcendental import (zeta, zetaderiv, zeta_symmetric, hurwitz_zeta, + dickman_rho, stieltjes) -from sage.functions.bessel import (bessel_I, bessel_J, bessel_K, bessel_Y, - Bessel, struve_H, struve_L, hankel1, hankel2, +from .bessel import (bessel_I, bessel_J, bessel_K, bessel_Y, + Bessel, struve_H, struve_L, hankel1, hankel2, spherical_bessel_J, spherical_bessel_Y, spherical_hankel1, spherical_hankel2) -from sage.functions.special import (spherical_harmonic, elliptic_e, - elliptic_f, elliptic_ec, elliptic_eu, - elliptic_kc, elliptic_pi, elliptic_j) +from .special import (spherical_harmonic, elliptic_e, + elliptic_f, elliptic_ec, elliptic_eu, + elliptic_kc, elliptic_pi, elliptic_j) -from sage.functions.jacobi import (jacobi, inverse_jacobi, jacobi_nd, jacobi_ns, jacobi_nc, - jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd, - jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am, - inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc, - inverse_jacobi_dn, inverse_jacobi_ds, inverse_jacobi_dc, - inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc, - inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs) +from .jacobi import (jacobi, inverse_jacobi, jacobi_nd, jacobi_ns, jacobi_nc, + jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd, + jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am, + inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc, + inverse_jacobi_dn, inverse_jacobi_ds, inverse_jacobi_dc, + inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc, + inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs) -from sage.functions.orthogonal_polys import (chebyshev_T, - chebyshev_U, - gen_laguerre, - gen_legendre_P, - gen_legendre_Q, - hermite, - jacobi_P, - laguerre, - legendre_P, - legendre_Q, - ultraspherical, - gegenbauer, - krawtchouk, - meixner, - hahn) +from .orthogonal_polys import (chebyshev_T, + chebyshev_U, + gen_laguerre, + gen_legendre_P, + gen_legendre_Q, + hermite, + jacobi_P, + laguerre, + legendre_P, + legendre_Q, + ultraspherical, + gegenbauer, + krawtchouk, + meixner, + hahn) -from sage.functions.spike_function import spike_function +from .spike_function import spike_function -from sage.functions.prime_pi import legendre_phi, partial_sieve_function, prime_pi +from .prime_pi import legendre_phi, partial_sieve_function, prime_pi -from sage.functions.wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j, - wigner_9j, gaunt) +from .wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j, + wigner_9j, gaunt) -from sage.functions.generalized import (dirac_delta, heaviside, unit_step, sgn, sign, - kronecker_delta) +from .generalized import (dirac_delta, heaviside, unit_step, sgn, sign, + kronecker_delta) -from sage.functions.min_max import max_symbolic, min_symbolic +from .min_max import max_symbolic, min_symbolic -from sage.functions.airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime +from .airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime -from sage.functions.exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li, - log_integral_offset, - sin_integral, cos_integral, Si, Ci, - sinh_integral, cosh_integral, Shi, Chi, - exponential_integral_1, Ei, exp_integral_ei) +from .exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li, + log_integral_offset, + sin_integral, cos_integral, Si, Ci, + sinh_integral, cosh_integral, Shi, Chi, + exponential_integral_1, Ei, exp_integral_ei) -from sage.functions.hypergeometric import hypergeometric, hypergeometric_M, hypergeometric_U +from .hypergeometric import hypergeometric, hypergeometric_M, hypergeometric_U -from sage.functions.gamma import (gamma, psi, beta, log_gamma, - gamma_inc, gamma_inc_lower) +from .gamma import (gamma, psi, beta, log_gamma, + gamma_inc, gamma_inc_lower) Γ = gamma ψ = psi ζ = zeta -del lazy_import diff --git a/src/sage/functions/bessel.py b/src/sage/functions/bessel.py index 76fc6a6a3ae..cedbe56c00e 100644 --- a/src/sage/functions/bessel.py +++ b/src/sage/functions/bessel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Bessel functions diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py index 3467e18ddd2..76509ce5ef0 100644 --- a/src/sage/functions/error.py +++ b/src/sage/functions/error.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Error functions diff --git a/src/sage/functions/exp_integral.py b/src/sage/functions/exp_integral.py index edc2b1debc4..913cb577bef 100644 --- a/src/sage/functions/exp_integral.py +++ b/src/sage/functions/exp_integral.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Exponential integrals diff --git a/src/sage/functions/gamma.py b/src/sage/functions/gamma.py index a19795b8100..0af99e5dc20 100644 --- a/src/sage/functions/gamma.py +++ b/src/sage/functions/gamma.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Gamma and related functions """ diff --git a/src/sage/functions/generalized.py b/src/sage/functions/generalized.py index 9f31b8acc46..5e66d267828 100644 --- a/src/sage/functions/generalized.py +++ b/src/sage/functions/generalized.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Generalized functions diff --git a/src/sage/functions/hyperbolic.py b/src/sage/functions/hyperbolic.py index 5bf71461c2d..7c94892ba9d 100644 --- a/src/sage/functions/hyperbolic.py +++ b/src/sage/functions/hyperbolic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Hyperbolic functions diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py index 9c7859bbd90..6e2b26d284a 100644 --- a/src/sage/functions/hypergeometric.py +++ b/src/sage/functions/hypergeometric.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Hypergeometric functions diff --git a/src/sage/functions/jacobi.py b/src/sage/functions/jacobi.py index c817ab0638c..063dc8c7b78 100644 --- a/src/sage/functions/jacobi.py +++ b/src/sage/functions/jacobi.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Jacobi elliptic functions diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py index 4268ea8b122..37e5f601e59 100644 --- a/src/sage/functions/log.py +++ b/src/sage/functions/log.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Logarithmic functions diff --git a/src/sage/functions/min_max.py b/src/sage/functions/min_max.py index 38b68ba4314..caaed6f1193 100644 --- a/src/sage/functions/min_max.py +++ b/src/sage/functions/min_max.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Symbolic minimum and maximum diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py index ee6e32738b2..8976001bc62 100644 --- a/src/sage/functions/orthogonal_polys.py +++ b/src/sage/functions/orthogonal_polys.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Orthogonal polynomials diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py index d5bf3e29425..3da7beec8ce 100644 --- a/src/sage/functions/other.py +++ b/src/sage/functions/other.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Other functions diff --git a/src/sage/functions/piecewise.py b/src/sage/functions/piecewise.py index c5da81f777f..f621c324cc4 100644 --- a/src/sage/functions/piecewise.py +++ b/src/sage/functions/piecewise.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.symbolic r""" Piecewise functions diff --git a/src/sage/functions/prime_pi.pyx b/src/sage/functions/prime_pi.pyx index 2ecc6525e93..8dede094229 100644 --- a/src/sage/functions/prime_pi.pyx +++ b/src/sage/functions/prime_pi.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs primecountpy r""" Counting primes diff --git a/src/sage/functions/special.py b/src/sage/functions/special.py index 4eed8e0c2f8..e100ba3ee23 100644 --- a/src/sage/functions/special.py +++ b/src/sage/functions/special.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Miscellaneous special functions diff --git a/src/sage/functions/spike_function.py b/src/sage/functions/spike_function.py index 737486e6e54..4739ca7ffb4 100644 --- a/src/sage/functions/spike_function.py +++ b/src/sage/functions/spike_function.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Spike functions diff --git a/src/sage/functions/transcendental.py b/src/sage/functions/transcendental.py index a9fe2588a88..c0debecdc0d 100644 --- a/src/sage/functions/transcendental.py +++ b/src/sage/functions/transcendental.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Number-theoretic functions """ diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py index 6c98de24eb0..d4e723ec6e2 100644 --- a/src/sage/functions/trig.py +++ b/src/sage/functions/trig.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Trigonometric functions """ diff --git a/src/sage/functions/wigner.py b/src/sage/functions/wigner.py index 4b740bb2bfd..0bafe13a246 100644 --- a/src/sage/functions/wigner.py +++ b/src/sage/functions/wigner.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Wigner, Clebsch-Gordan, Racah, and Gaunt coefficients diff --git a/src/sage/game_theory/all.py b/src/sage/game_theory/all.py index f5caf04e6b7..4658885c3ab 100644 --- a/src/sage/game_theory/all.py +++ b/src/sage/game_theory/all.py @@ -1,8 +1,6 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.misc.lazy_import import lazy_import lazy_import('sage.game_theory', 'catalog', 'game_theory') lazy_import('sage.game_theory.cooperative_game', 'CooperativeGame') lazy_import('sage.game_theory.normal_form_game', 'NormalFormGame') lazy_import('sage.game_theory.matching_game', 'MatchingGame') -del lazy_import diff --git a/src/sage/game_theory/catalog.py b/src/sage/game_theory/catalog.py index 58c3fb02a80..9abb2c74151 100644 --- a/src/sage/game_theory/catalog.py +++ b/src/sage/game_theory/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Catalog Of Games """ diff --git a/src/sage/game_theory/catalog_normal_form_games.py b/src/sage/game_theory/catalog_normal_form_games.py index 7733b970269..ab7b48a4dc0 100644 --- a/src/sage/game_theory/catalog_normal_form_games.py +++ b/src/sage/game_theory/catalog_normal_form_games.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" A catalog of normal form games diff --git a/src/sage/game_theory/cooperative_game.py b/src/sage/game_theory/cooperative_game.py index 1394c132960..b95ba0f655a 100644 --- a/src/sage/game_theory/cooperative_game.py +++ b/src/sage/game_theory/cooperative_game.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Co-operative Games With Finite Players diff --git a/src/sage/game_theory/gambit_docs.py b/src/sage/game_theory/gambit_docs.py index e6acc5e6b69..b2d8af991e9 100644 --- a/src/sage/game_theory/gambit_docs.py +++ b/src/sage/game_theory/gambit_docs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Using Gambit as a standalone package diff --git a/src/sage/game_theory/matching_game.py b/src/sage/game_theory/matching_game.py index e356132be82..11c04f6e5b1 100644 --- a/src/sage/game_theory/matching_game.py +++ b/src/sage/game_theory/matching_game.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Matching games diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py index ce5002b3e9f..b053f3160b8 100644 --- a/src/sage/game_theory/normal_form_game.py +++ b/src/sage/game_theory/normal_form_game.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-polyhedra +# -*- coding: utf-8 -*- r""" Normal form games with N players. diff --git a/src/sage/game_theory/parser.py b/src/sage/game_theory/parser.py index 0fd8892a6b1..d528116f244 100644 --- a/src/sage/game_theory/parser.py +++ b/src/sage/game_theory/parser.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Parser For gambit And lrs Nash Equilibria """ diff --git a/src/sage/games/all.py b/src/sage/games/all.py index cef064e1383..e3e31bcf03e 100644 --- a/src/sage/games/all.py +++ b/src/sage/games/all.py @@ -1,7 +1,2 @@ -# sage_setup: distribution = sagemath-combinat - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.games.sudoku', ['Sudoku', 'sudoku']) -lazy_import('sage.games.hexad', ['Minimog']) -del lazy_import +from .sudoku import Sudoku, sudoku +from .hexad import Minimog diff --git a/src/sage/games/hexad.py b/src/sage/games/hexad.py index 64138d012e3..ddc08530b08 100644 --- a/src/sage/games/hexad.py +++ b/src/sage/games/hexad.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Hexads in S(5, 6, 12) diff --git a/src/sage/games/quantumino.py b/src/sage/games/quantumino.py index 16485d7ea42..d5646406882 100644 --- a/src/sage/games/quantumino.py +++ b/src/sage/games/quantumino.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-combinat +# -*- coding: utf-8 -*- r""" Family Games America's Quantumino solver diff --git a/src/sage/games/sudoku.py b/src/sage/games/sudoku.py index a98632df734..abcadd08ca3 100644 --- a/src/sage/games/sudoku.py +++ b/src/sage/games/sudoku.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Sudoku Puzzles diff --git a/src/sage/games/sudoku_backtrack.pyx b/src/sage/games/sudoku_backtrack.pyx index 28504c3f109..9d02c4fcf9a 100644 --- a/src/sage/games/sudoku_backtrack.pyx +++ b/src/sage/games/sudoku_backtrack.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" This module contains Cython code for a backtracking algorithm to solve Sudoku puzzles. diff --git a/src/sage/geometry/abc.pyx b/src/sage/geometry/abc.pyx index a40fc1933e4..f3aee46d324 100644 --- a/src/sage/geometry/abc.pyx +++ b/src/sage/geometry/abc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Abstract base classes for classes in :mod:`~sage.geometry` """ diff --git a/src/sage/geometry/all.py b/src/sage/geometry/all.py index ebf0d36f808..3b7dcf756d8 100644 --- a/src/sage/geometry/all.py +++ b/src/sage/geometry/all.py @@ -1,12 +1,19 @@ -from sage.geometry.all__sagemath_polyhedra import * +from .polyhedron.all import * +from .hyperbolic_space.all import * +from .polyhedral_complex import PolyhedralComplex +from sage.misc.lazy_import import lazy_import -try: - from sage.geometry.all__sagemath_symbolics import * -except ImportError: - pass - - -try: - from sage.geometry.all__sagemath_gap import * -except ImportError: - pass +lazy_import('sage.geometry.cone', ['Cone', 'random_cone']) +lazy_import('sage.geometry', 'cone_catalog', 'cones') +lazy_import('sage.geometry.fan', ['Fan', 'FaceFan', 'NormalFan', 'Fan2d']) +lazy_import('sage.geometry.fan_morphism', 'FanMorphism') +lazy_import('sage.geometry.lattice_polytope', + ['LatticePolytope', 'NefPartition', + 'ReflexivePolytope', 'ReflexivePolytopes']) +lazy_import('sage.geometry', 'lattice_polytope') +lazy_import('sage.geometry.toric_lattice', 'ToricLattice') +lazy_import('sage.geometry', 'toric_plotter') +lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') +lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') +lazy_import('sage.geometry.hyperplane_arrangement.arrangement', 'HyperplaneArrangements') +lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') diff --git a/src/sage/geometry/all__sagemath_categories.py b/src/sage/geometry/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/geometry/all__sagemath_gap.py b/src/sage/geometry/all__sagemath_gap.py deleted file mode 100644 index 34dc2709543..00000000000 --- a/src/sage/geometry/all__sagemath_gap.py +++ /dev/null @@ -1,5 +0,0 @@ - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') -del lazy_import diff --git a/src/sage/geometry/all__sagemath_linbox.py b/src/sage/geometry/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/geometry/all__sagemath_modules.py b/src/sage/geometry/all__sagemath_modules.py deleted file mode 100644 index 4ea1510f4ab..00000000000 --- a/src/sage/geometry/all__sagemath_modules.py +++ /dev/null @@ -1,4 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.geometry.toric_lattice', 'ToricLattice') -del lazy_import diff --git a/src/sage/geometry/all__sagemath_polyhedra.py b/src/sage/geometry/all__sagemath_polyhedra.py deleted file mode 100644 index 0b1852de7a5..00000000000 --- a/src/sage/geometry/all__sagemath_polyhedra.py +++ /dev/null @@ -1,20 +0,0 @@ -from sage.geometry.all__sagemath_modules import * - -from sage.geometry.polyhedron.all import * -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.geometry.polyhedral_complex', 'PolyhedralComplex') -lazy_import('sage.geometry.cone', ['Cone', 'random_cone']) -lazy_import('sage.geometry', 'cone_catalog', 'cones') -lazy_import('sage.geometry.fan', ['Fan', 'FaceFan', 'NormalFan', 'Fan2d']) -lazy_import('sage.geometry.fan_morphism', 'FanMorphism') -lazy_import('sage.geometry.lattice_polytope', - ['LatticePolytope', 'NefPartition', - 'ReflexivePolytope', 'ReflexivePolytopes']) -lazy_import('sage.geometry', 'lattice_polytope') -lazy_import('sage.geometry', 'toric_plotter') -lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') -lazy_import('sage.geometry.hyperplane_arrangement.arrangement', - 'HyperplaneArrangements') -lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') -del lazy_import diff --git a/src/sage/geometry/all__sagemath_symbolics.py b/src/sage/geometry/all__sagemath_symbolics.py deleted file mode 100644 index fb690c97312..00000000000 --- a/src/sage/geometry/all__sagemath_symbolics.py +++ /dev/null @@ -1,7 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.geometry.hyperbolic_space.hyperbolic_interface', 'HyperbolicPlane') - -from sage.geometry.riemannian_manifolds.all import * - -del lazy_import diff --git a/src/sage/geometry/cone.py b/src/sage/geometry/cone.py index 91cfaf85ab0..fc0b3731945 100644 --- a/src/sage/geometry/cone.py +++ b/src/sage/geometry/cone.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Convex rational polyhedral cones diff --git a/src/sage/geometry/cone_catalog.py b/src/sage/geometry/cone_catalog.py index 015fb5aad12..d6898d40087 100644 --- a/src/sage/geometry/cone_catalog.py +++ b/src/sage/geometry/cone_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Catalog of common polyhedral convex cones diff --git a/src/sage/geometry/convex_set.py b/src/sage/geometry/convex_set.py index ab7b74341e3..dd7237f0e30 100644 --- a/src/sage/geometry/convex_set.py +++ b/src/sage/geometry/convex_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Convex Sets """ diff --git a/src/sage/geometry/fan.py b/src/sage/geometry/fan.py index 34caa8a427a..832a76bb65d 100644 --- a/src/sage/geometry/fan.py +++ b/src/sage/geometry/fan.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.graphs sage.combinat r""" Rational polyhedral fans diff --git a/src/sage/geometry/fan_isomorphism.py b/src/sage/geometry/fan_isomorphism.py index e59604f59e9..2cf79c13442 100644 --- a/src/sage/geometry/fan_isomorphism.py +++ b/src/sage/geometry/fan_isomorphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Find isomorphisms between fans """ diff --git a/src/sage/geometry/fan_morphism.py b/src/sage/geometry/fan_morphism.py index fa1d82889d9..6f4fa78c5a3 100644 --- a/src/sage/geometry/fan_morphism.py +++ b/src/sage/geometry/fan_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.graphs, sage.combinat r""" Morphisms between toric lattices compatible with fans diff --git a/src/sage/geometry/hasse_diagram.py b/src/sage/geometry/hasse_diagram.py index 96048cc817e..d30f08ac8d5 100644 --- a/src/sage/geometry/hasse_diagram.py +++ b/src/sage/geometry/hasse_diagram.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Construction of finite atomic and coatomic lattices from incidences diff --git a/src/sage/geometry/hyperbolic_space/all.py b/src/sage/geometry/hyperbolic_space/all.py index 88d94a913e4..d1b2a930e04 100644 --- a/src/sage/geometry/hyperbolic_space/all.py +++ b/src/sage/geometry/hyperbolic_space/all.py @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.hyperbolic_space.hyperbolic_interface', 'HyperbolicPlane') -del lazy_import diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_coercion.py b/src/sage/geometry/hyperbolic_space/hyperbolic_coercion.py index fc0f68e417b..ff509d0d97f 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_coercion.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_coercion.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Coercion Maps Between Hyperbolic Plane Models diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_constants.py b/src/sage/geometry/hyperbolic_space/hyperbolic_constants.py index b42f519014a..1ea800e58b0 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_constants.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_constants.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics from sage.matrix.constructor import matrix EPSILON = 10 ** -9 diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py index 381fe39a9e4..802de09a9f0 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Hyperbolic Geodesics diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_interface.py b/src/sage/geometry/hyperbolic_space/hyperbolic_interface.py index e0d4055e09e..11f4c08add9 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_interface.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_interface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to Hyperbolic Models diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py b/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py index f25205a8192..89e73b83a07 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Hyperbolic Isometries diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_model.py b/src/sage/geometry/hyperbolic_space/hyperbolic_model.py index fd8c12ed990..33e5f0008fe 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_model.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_model.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Hyperbolic Models diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_point.py b/src/sage/geometry/hyperbolic_space/hyperbolic_point.py index e12330e1908..650c90a4403 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_point.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Hyperbolic Points diff --git a/src/sage/geometry/hyperplane_arrangement/affine_subspace.py b/src/sage/geometry/hyperplane_arrangement/affine_subspace.py index 74150f422f0..7c1065553c4 100644 --- a/src/sage/geometry/hyperplane_arrangement/affine_subspace.py +++ b/src/sage/geometry/hyperplane_arrangement/affine_subspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Affine Subspaces of a Vector Space diff --git a/src/sage/geometry/hyperplane_arrangement/all.py b/src/sage/geometry/hyperplane_arrangement/all.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/geometry/hyperplane_arrangement/all.py +++ b/src/sage/geometry/hyperplane_arrangement/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/geometry/hyperplane_arrangement/arrangement.py b/src/sage/geometry/hyperplane_arrangement/arrangement.py index 68ec59accc4..bb1e04efabe 100644 --- a/src/sage/geometry/hyperplane_arrangement/arrangement.py +++ b/src/sage/geometry/hyperplane_arrangement/arrangement.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Hyperplane Arrangements diff --git a/src/sage/geometry/hyperplane_arrangement/check_freeness.py b/src/sage/geometry/hyperplane_arrangement/check_freeness.py index 385f83788f9..e99c8ee9b39 100644 --- a/src/sage/geometry/hyperplane_arrangement/check_freeness.py +++ b/src/sage/geometry/hyperplane_arrangement/check_freeness.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.libs.singular r""" Helper Functions For Freeness Of Hyperplane Arrangements diff --git a/src/sage/geometry/hyperplane_arrangement/hyperplane.py b/src/sage/geometry/hyperplane_arrangement/hyperplane.py index 2a4f8eea174..9ca1a7c42ac 100644 --- a/src/sage/geometry/hyperplane_arrangement/hyperplane.py +++ b/src/sage/geometry/hyperplane_arrangement/hyperplane.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Hyperplanes diff --git a/src/sage/geometry/hyperplane_arrangement/library.py b/src/sage/geometry/hyperplane_arrangement/library.py index 280ac089c87..cdfaca2faf0 100644 --- a/src/sage/geometry/hyperplane_arrangement/library.py +++ b/src/sage/geometry/hyperplane_arrangement/library.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Library of Hyperplane Arrangements diff --git a/src/sage/geometry/hyperplane_arrangement/plot.py b/src/sage/geometry/hyperplane_arrangement/plot.py index 93a8112cd54..be468c111bc 100644 --- a/src/sage/geometry/hyperplane_arrangement/plot.py +++ b/src/sage/geometry/hyperplane_arrangement/plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Plotting of Hyperplane Arrangements diff --git a/src/sage/geometry/integral_points.pxi b/src/sage/geometry/integral_points.pxi index 613e917f4fe..40f26e39d69 100644 --- a/src/sage/geometry/integral_points.pxi +++ b/src/sage/geometry/integral_points.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox r""" Cython helper methods to compute integral points in polyhedra. """ diff --git a/src/sage/geometry/integral_points.py b/src/sage/geometry/integral_points.py index bc6e4a0626f..48153591bcf 100644 --- a/src/sage/geometry/integral_points.py +++ b/src/sage/geometry/integral_points.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra try: from .integral_points_integer_dense import ( parallelotope_points, diff --git a/src/sage/geometry/integral_points_generic_dense.pyx b/src/sage/geometry/integral_points_generic_dense.pyx index 99b0a60e49e..5ff619f44d4 100644 --- a/src/sage/geometry/integral_points_generic_dense.pyx +++ b/src/sage/geometry/integral_points_generic_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra #cython: wraparound=False, boundscheck=False from sage.modules.vector_integer_dense cimport Vector_integer_dense as VectorClass diff --git a/src/sage/geometry/integral_points_integer_dense.pyx b/src/sage/geometry/integral_points_integer_dense.pyx index 67b5009f191..0151ffed5c0 100644 --- a/src/sage/geometry/integral_points_integer_dense.pyx +++ b/src/sage/geometry/integral_points_integer_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox #cython: wraparound=False, boundscheck=False from sage.modules.vector_integer_dense cimport Vector_integer_dense as VectorClass diff --git a/src/sage/geometry/lattice_polytope.py b/src/sage/geometry/lattice_polytope.py index a35bbecbf70..b652e68c946 100644 --- a/src/sage/geometry/lattice_polytope.py +++ b/src/sage/geometry/lattice_polytope.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Lattice and reflexive polytopes diff --git a/src/sage/geometry/linear_expression.py b/src/sage/geometry/linear_expression.py index 9c6d3cd7cfd..547d2eeb5a3 100644 --- a/src/sage/geometry/linear_expression.py +++ b/src/sage/geometry/linear_expression.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Linear Expressions diff --git a/src/sage/geometry/newton_polygon.py b/src/sage/geometry/newton_polygon.py index b0b3209f426..28101e70646 100644 --- a/src/sage/geometry/newton_polygon.py +++ b/src/sage/geometry/newton_polygon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Newton Polygons diff --git a/src/sage/geometry/palp_normal_form.pyx b/src/sage/geometry/palp_normal_form.pyx index baaedefa467..fa756fe65b0 100644 --- a/src/sage/geometry/palp_normal_form.pyx +++ b/src/sage/geometry/palp_normal_form.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.groups r""" PALP normal form of vertices of a lattice polytope diff --git a/src/sage/geometry/point_collection.pyx b/src/sage/geometry/point_collection.pyx index 162269b3a5f..aabb0bdcde3 100644 --- a/src/sage/geometry/point_collection.pyx +++ b/src/sage/geometry/point_collection.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Point collections diff --git a/src/sage/geometry/polyhedral_complex.py b/src/sage/geometry/polyhedral_complex.py index 6194595c2c8..09200a60be9 100644 --- a/src/sage/geometry/polyhedral_complex.py +++ b/src/sage/geometry/polyhedral_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.graphs r""" Finite polyhedral complexes diff --git a/src/sage/geometry/polyhedron/all.py b/src/sage/geometry/polyhedron/all.py index 848763439fb..3668a0b8b50 100644 --- a/src/sage/geometry/polyhedron/all.py +++ b/src/sage/geometry/polyhedron/all.py @@ -1,8 +1,5 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.polyhedron.constructor', 'Polyhedron') lazy_import('sage.geometry.polyhedron.library', 'polytopes') -lazy_import('sage.geometry.polyhedron.combinatorial_polyhedron.base', - 'CombinatorialPolyhedron') -del lazy_import +lazy_import('sage.geometry.polyhedron.combinatorial_polyhedron.base' , 'CombinatorialPolyhedron') diff --git a/src/sage/geometry/polyhedron/backend_cdd.py b/src/sage/geometry/polyhedron/backend_cdd.py index 1f497350727..e59f05d09a3 100644 --- a/src/sage/geometry/polyhedron/backend_cdd.py +++ b/src/sage/geometry/polyhedron/backend_cdd.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" The cdd backend for polyhedral computations """ diff --git a/src/sage/geometry/polyhedron/backend_cdd_rdf.py b/src/sage/geometry/polyhedron/backend_cdd_rdf.py index 3dc339a74f5..756e8df7b4a 100644 --- a/src/sage/geometry/polyhedron/backend_cdd_rdf.py +++ b/src/sage/geometry/polyhedron/backend_cdd_rdf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.rings.real_double r""" diff --git a/src/sage/geometry/polyhedron/backend_field.py b/src/sage/geometry/polyhedron/backend_field.py index 8c8c977124c..7026cca98b8 100644 --- a/src/sage/geometry/polyhedron/backend_field.py +++ b/src/sage/geometry/polyhedron/backend_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ The Python backend diff --git a/src/sage/geometry/polyhedron/backend_normaliz.py b/src/sage/geometry/polyhedron/backend_normaliz.py index f7e7b0ee782..29b914531c4 100644 --- a/src/sage/geometry/polyhedron/backend_normaliz.py +++ b/src/sage/geometry/polyhedron/backend_normaliz.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - pynormaliz """ The Normaliz backend for polyhedral computations diff --git a/src/sage/geometry/polyhedron/backend_number_field.py b/src/sage/geometry/polyhedron/backend_number_field.py index 22834a0755f..e79688bea5f 100644 --- a/src/sage/geometry/polyhedron/backend_number_field.py +++ b/src/sage/geometry/polyhedron/backend_number_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" The Python backend, using number fields internally """ diff --git a/src/sage/geometry/polyhedron/backend_polymake.py b/src/sage/geometry/polyhedron/backend_polymake.py index ce75370f3ef..a2bce697e1c 100644 --- a/src/sage/geometry/polyhedron/backend_polymake.py +++ b/src/sage/geometry/polyhedron/backend_polymake.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ The polymake backend for polyhedral computations diff --git a/src/sage/geometry/polyhedron/backend_ppl.py b/src/sage/geometry/polyhedron/backend_ppl.py index 106362e6031..bb1a77e9f5d 100644 --- a/src/sage/geometry/polyhedron/backend_ppl.py +++ b/src/sage/geometry/polyhedron/backend_ppl.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ The PPL (Parma Polyhedra Library) backend for polyhedral computations """ diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py index 1d032ee1df2..f9ce84be09d 100644 --- a/src/sage/geometry/polyhedron/base.py +++ b/src/sage/geometry/polyhedron/base.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Miscellaneous methods """ diff --git a/src/sage/geometry/polyhedron/base0.py b/src/sage/geometry/polyhedron/base0.py index 2504976552f..ea6a08837c5 100644 --- a/src/sage/geometry/polyhedron/base0.py +++ b/src/sage/geometry/polyhedron/base0.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Initialization and access to Vrepresentation and Hrepresentation """ diff --git a/src/sage/geometry/polyhedron/base1.py b/src/sage/geometry/polyhedron/base1.py index 1e9d7a26bde..507316f26a3 100644 --- a/src/sage/geometry/polyhedron/base1.py +++ b/src/sage/geometry/polyhedron/base1.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Implementation of the :class:`ConvexSet_base` API diff --git a/src/sage/geometry/polyhedron/base2.py b/src/sage/geometry/polyhedron/base2.py index ab1c8063a3b..3b72b5088c7 100644 --- a/src/sage/geometry/polyhedron/base2.py +++ b/src/sage/geometry/polyhedron/base2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Methods related to lattice points """ diff --git a/src/sage/geometry/polyhedron/base3.py b/src/sage/geometry/polyhedron/base3.py index 9bd0bf01ab1..d64cf38d26d 100644 --- a/src/sage/geometry/polyhedron/base3.py +++ b/src/sage/geometry/polyhedron/base3.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Methods regarding the combinatorics of a polyhedron diff --git a/src/sage/geometry/polyhedron/base4.py b/src/sage/geometry/polyhedron/base4.py index 9601d7df1ce..bc31ab76102 100644 --- a/src/sage/geometry/polyhedron/base4.py +++ b/src/sage/geometry/polyhedron/base4.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.graphs r""" Base class for polyhedra: Graph-theoretic methods diff --git a/src/sage/geometry/polyhedron/base5.py b/src/sage/geometry/polyhedron/base5.py index b36b7ebf6e3..a1e57a63b99 100644 --- a/src/sage/geometry/polyhedron/base5.py +++ b/src/sage/geometry/polyhedron/base5.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Methods for constructing new polyhedra diff --git a/src/sage/geometry/polyhedron/base6.py b/src/sage/geometry/polyhedron/base6.py index 35341f122c2..aaa18f5b541 100644 --- a/src/sage/geometry/polyhedron/base6.py +++ b/src/sage/geometry/polyhedron/base6.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Methods for plotting and affine hull projection """ diff --git a/src/sage/geometry/polyhedron/base7.py b/src/sage/geometry/polyhedron/base7.py index bbe6737c843..55f9d23ea0b 100644 --- a/src/sage/geometry/polyhedron/base7.py +++ b/src/sage/geometry/polyhedron/base7.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra: Methods for triangulation and volume computation """ diff --git a/src/sage/geometry/polyhedron/base_QQ.py b/src/sage/geometry/polyhedron/base_QQ.py index 426b73b359f..ff0872b7dd7 100644 --- a/src/sage/geometry/polyhedron/base_QQ.py +++ b/src/sage/geometry/polyhedron/base_QQ.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra over `\QQ` """ diff --git a/src/sage/geometry/polyhedron/base_RDF.py b/src/sage/geometry/polyhedron/base_RDF.py index 4fbbf52750c..b3ba587746e 100644 --- a/src/sage/geometry/polyhedron/base_RDF.py +++ b/src/sage/geometry/polyhedron/base_RDF.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.rings.real_double """ diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py index 7cc1432f0a5..c450fbda0e0 100644 --- a/src/sage/geometry/polyhedron/base_ZZ.py +++ b/src/sage/geometry/polyhedron/base_ZZ.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for polyhedra over `\ZZ` """ diff --git a/src/sage/geometry/polyhedron/base_mutable.py b/src/sage/geometry/polyhedron/base_mutable.py index 3b6842da210..42e77a8fcf0 100644 --- a/src/sage/geometry/polyhedron/base_mutable.py +++ b/src/sage/geometry/polyhedron/base_mutable.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Base class for mutable polyhedra. diff --git a/src/sage/geometry/polyhedron/base_number_field.py b/src/sage/geometry/polyhedron/base_number_field.py index 148248f6e46..ef912a5e501 100644 --- a/src/sage/geometry/polyhedron/base_number_field.py +++ b/src/sage/geometry/polyhedron/base_number_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Support for internal use of number fields in backends for polyhedral computations """ diff --git a/src/sage/geometry/polyhedron/cdd_file_format.py b/src/sage/geometry/polyhedron/cdd_file_format.py index 6934ebfd26c..728f20bb9b5 100644 --- a/src/sage/geometry/polyhedron/cdd_file_format.py +++ b/src/sage/geometry/polyhedron/cdd_file_format.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Generate cdd ``.ext`` / ``.ine`` file format """ diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/all.py b/src/sage/geometry/polyhedron/combinatorial_polyhedron/all.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/all.py +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd index 9418e743553..a04a1186876 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cimport cython from sage.data_structures.list_of_pairs cimport ListOfPairs from sage.structure.sage_object cimport SageObject diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index c4c4502bb8b..367049b9fc0 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Combinatorial polyhedron diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd index 71456157430..f39284ace68 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cimport cython from sage.structure.sage_object cimport SageObject from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx index b701f6a25c4..fb780e29353 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Combinatorial face of a polyhedron diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd index 9d876fa72f5..2a0e950b469 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_t diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx index f26e00cb65d..951dd9e5420 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Conversions diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd index ef347d8e9a9..3ed71a664e1 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Cython data structure for combinatorial faces. """ diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd index b13c0cd7be0..3c015973dd1 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cimport cython from sage.structure.sage_object cimport SageObject from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index 1b2b8362864..ca5634d31a7 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # distutils: extra_compile_args = OPENMP_CFLAGS # distutils: extra_link_args = OPENMP_CFLAGS r""" diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd index 4768c7809f2..50bbd7c4026 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Inline cython methods for lists of faces. """ diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx index 6b95606d751..34adfb092dd 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Sorting of a list of faces. """ diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd index 6f704dd760b..62ba5b987cf 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cimport cython from sage.geometry.polyhedron.combinatorial_polyhedron.face_list_data_structure cimport face_list_t, face_t diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx index 6a2b5960c32..468347f5256 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" List of faces diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd index 72b4dd30889..824b832f238 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cimport cython from sage.geometry.polyhedron.combinatorial_polyhedron.list_of_faces cimport ListOfFaces from sage.geometry.polyhedron.combinatorial_polyhedron.face_data_structure cimport face_t diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx index 0e1f0df82bc..d0064795fa5 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" PolyhedronFaceLattice diff --git a/src/sage/geometry/polyhedron/constructor.py b/src/sage/geometry/polyhedron/constructor.py index 9b6e01a0367..ef95c2fb457 100644 --- a/src/sage/geometry/polyhedron/constructor.py +++ b/src/sage/geometry/polyhedron/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Polyhedra diff --git a/src/sage/geometry/polyhedron/double_description.py b/src/sage/geometry/polyhedron/double_description.py index 08a18bfaa82..089580e3146 100644 --- a/src/sage/geometry/polyhedron/double_description.py +++ b/src/sage/geometry/polyhedron/double_description.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Double Description Algorithm for Cones diff --git a/src/sage/geometry/polyhedron/double_description_inhomogeneous.py b/src/sage/geometry/polyhedron/double_description_inhomogeneous.py index 28f4bbc6a17..9b7882a5bcd 100644 --- a/src/sage/geometry/polyhedron/double_description_inhomogeneous.py +++ b/src/sage/geometry/polyhedron/double_description_inhomogeneous.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Double Description for Arbitrary Polyhedra diff --git a/src/sage/geometry/polyhedron/face.py b/src/sage/geometry/polyhedron/face.py index bc67c1504c5..97319ed1740 100644 --- a/src/sage/geometry/polyhedron/face.py +++ b/src/sage/geometry/polyhedron/face.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ A class to keep information about faces of a polyhedron diff --git a/src/sage/geometry/polyhedron/generating_function.py b/src/sage/geometry/polyhedron/generating_function.py index 0d287fbe4d0..7a33bd528b9 100644 --- a/src/sage/geometry/polyhedron/generating_function.py +++ b/src/sage/geometry/polyhedron/generating_function.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - sage.combinat r""" Generating Function of Polyhedron's Integral Points diff --git a/src/sage/geometry/polyhedron/lattice_euclidean_group_element.py b/src/sage/geometry/polyhedron/lattice_euclidean_group_element.py index 95a8fd63633..79331133960 100644 --- a/src/sage/geometry/polyhedron/lattice_euclidean_group_element.py +++ b/src/sage/geometry/polyhedron/lattice_euclidean_group_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Lattice Euclidean Group Elements diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhedron/library.py index da5e400f8c8..81cf67b2d8b 100644 --- a/src/sage/geometry/polyhedron/library.py +++ b/src/sage/geometry/polyhedron/library.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Library of commonly used, famous, or interesting polytopes diff --git a/src/sage/geometry/polyhedron/misc.py b/src/sage/geometry/polyhedron/misc.py index 28ed9250c5a..b47e51f79b8 100644 --- a/src/sage/geometry/polyhedron/misc.py +++ b/src/sage/geometry/polyhedron/misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Miscellaneous helper functions """ diff --git a/src/sage/geometry/polyhedron/modules/all.py b/src/sage/geometry/polyhedron/modules/all.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/geometry/polyhedron/modules/all.py +++ b/src/sage/geometry/polyhedron/modules/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/geometry/polyhedron/modules/formal_polyhedra_module.py b/src/sage/geometry/polyhedron/modules/formal_polyhedra_module.py index d375d26ae7b..6255650b84f 100644 --- a/src/sage/geometry/polyhedron/modules/formal_polyhedra_module.py +++ b/src/sage/geometry/polyhedron/modules/formal_polyhedra_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Formal modules generated by polyhedra """ diff --git a/src/sage/geometry/polyhedron/palp_database.py b/src/sage/geometry/polyhedron/palp_database.py index 4534cb992ab..60846d8df23 100644 --- a/src/sage/geometry/polyhedron/palp_database.py +++ b/src/sage/geometry/polyhedron/palp_database.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - polytopes_db palp """ Access the PALP database(s) of reflexive lattice polytopes diff --git a/src/sage/geometry/polyhedron/parent.py b/src/sage/geometry/polyhedron/parent.py index dac8f2d438b..2d87ac6f202 100644 --- a/src/sage/geometry/polyhedron/parent.py +++ b/src/sage/geometry/polyhedron/parent.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Parents for Polyhedra """ diff --git a/src/sage/geometry/polyhedron/plot.py b/src/sage/geometry/polyhedron/plot.py index 46a024f3188..283d5163f81 100644 --- a/src/sage/geometry/polyhedron/plot.py +++ b/src/sage/geometry/polyhedron/plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Functions for plotting polyhedra """ diff --git a/src/sage/geometry/polyhedron/ppl_lattice_polygon.py b/src/sage/geometry/polyhedron/ppl_lattice_polygon.py index 95404238463..933275357d8 100644 --- a/src/sage/geometry/polyhedron/ppl_lattice_polygon.py +++ b/src/sage/geometry/polyhedron/ppl_lattice_polygon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Fast Lattice Polygons using PPL diff --git a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py index 837723aa173..3cde1c6af81 100644 --- a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py +++ b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Fast Lattice Polytopes using PPL. diff --git a/src/sage/geometry/polyhedron/representation.py b/src/sage/geometry/polyhedron/representation.py index de62ece29da..ea803b2e558 100644 --- a/src/sage/geometry/polyhedron/representation.py +++ b/src/sage/geometry/polyhedron/representation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ H(yperplane) and V(ertex) representation objects for polyhedra """ diff --git a/src/sage/geometry/pseudolines.py b/src/sage/geometry/pseudolines.py index 034848ab63e..cc52979b577 100644 --- a/src/sage/geometry/pseudolines.py +++ b/src/sage/geometry/pseudolines.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Pseudolines diff --git a/src/sage/geometry/relative_interior.py b/src/sage/geometry/relative_interior.py index df303f0ac72..8f4a63a8a14 100644 --- a/src/sage/geometry/relative_interior.py +++ b/src/sage/geometry/relative_interior.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Relative Interiors of Polyhedra and Cones """ diff --git a/src/sage/geometry/ribbon_graph.py b/src/sage/geometry/ribbon_graph.py index 8e927bdedea..12918ae29b5 100644 --- a/src/sage/geometry/ribbon_graph.py +++ b/src/sage/geometry/ribbon_graph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Ribbon Graphs diff --git a/src/sage/geometry/riemannian_manifolds/all.py b/src/sage/geometry/riemannian_manifolds/all.py index b379b366f24..b375f473546 100644 --- a/src/sage/geometry/riemannian_manifolds/all.py +++ b/src/sage/geometry/riemannian_manifolds/all.py @@ -1,7 +1,5 @@ -# sage_setup: distribution = sagemath-symbolics from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.riemannian_manifolds.parametrized_surface3d', 'ParametrizedSurface3D') lazy_import('sage.geometry.riemannian_manifolds.surface3d_generators', 'surfaces') -del lazy_import diff --git a/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py b/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py index 95eab06a3da..98362a2f70f 100644 --- a/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py +++ b/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Differential Geometry of Parametrized Surfaces diff --git a/src/sage/geometry/riemannian_manifolds/surface3d_generators.py b/src/sage/geometry/riemannian_manifolds/surface3d_generators.py index 576f420783d..a75fdb0f2f2 100644 --- a/src/sage/geometry/riemannian_manifolds/surface3d_generators.py +++ b/src/sage/geometry/riemannian_manifolds/surface3d_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Common parametrized surfaces in 3D. diff --git a/src/sage/geometry/toric_lattice.py b/src/sage/geometry/toric_lattice.py index cbf20caeb58..2759a2b1281 100644 --- a/src/sage/geometry/toric_lattice.py +++ b/src/sage/geometry/toric_lattice.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Toric lattices diff --git a/src/sage/geometry/toric_lattice_element.pyx b/src/sage/geometry/toric_lattice_element.pyx index 18cb15c212f..8a2f87762eb 100644 --- a/src/sage/geometry/toric_lattice_element.pyx +++ b/src/sage/geometry/toric_lattice_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Toric lattice elements diff --git a/src/sage/geometry/toric_plotter.py b/src/sage/geometry/toric_plotter.py index 7a7f1976cc7..2943daa49bd 100644 --- a/src/sage/geometry/toric_plotter.py +++ b/src/sage/geometry/toric_plotter.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Toric plotter diff --git a/src/sage/geometry/triangulation/all.py b/src/sage/geometry/triangulation/all.py index 9bbbc0f6270..d40e50321f8 100644 --- a/src/sage/geometry/triangulation/all.py +++ b/src/sage/geometry/triangulation/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-polyhedra - -from sage.geometry.triangulation.point_configuration import PointConfiguration +from .point_configuration import PointConfiguration diff --git a/src/sage/geometry/triangulation/base.pyx b/src/sage/geometry/triangulation/base.pyx index 4331f0c24fd..cb9cb948256 100644 --- a/src/sage/geometry/triangulation/base.pyx +++ b/src/sage/geometry/triangulation/base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # distutils: sources = sage/geometry/triangulation/functions.cc sage/geometry/triangulation/data.cc sage/geometry/triangulation/triangulations.cc # distutils: depends = sage/geometry/triangulation/functions.h sage/geometry/triangulation/data.h sage/geometry/triangulation/triangulations.h # distutils: language = c++ diff --git a/src/sage/geometry/triangulation/data.pxd b/src/sage/geometry/triangulation/data.pxd index 13bdc971669..1baf9381ef7 100644 --- a/src/sage/geometry/triangulation/data.pxd +++ b/src/sage/geometry/triangulation/data.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cdef extern from "data.h": cdef cppclass compact_simplices(): void push_back(int encoded_simplex) diff --git a/src/sage/geometry/triangulation/element.py b/src/sage/geometry/triangulation/element.py index f40e555ae99..e8c8d7e1a51 100644 --- a/src/sage/geometry/triangulation/element.py +++ b/src/sage/geometry/triangulation/element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ A triangulation diff --git a/src/sage/geometry/triangulation/functions.pxd b/src/sage/geometry/triangulation/functions.pxd index 875adc3fdba..fa981e5215b 100644 --- a/src/sage/geometry/triangulation/functions.pxd +++ b/src/sage/geometry/triangulation/functions.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cdef extern from "functions.h": int factorial(int n) int binomial(int n, int D) diff --git a/src/sage/geometry/triangulation/point_configuration.py b/src/sage/geometry/triangulation/point_configuration.py index 88f306b177c..89d486b1e4f 100644 --- a/src/sage/geometry/triangulation/point_configuration.py +++ b/src/sage/geometry/triangulation/point_configuration.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Triangulations of a point configuration diff --git a/src/sage/geometry/triangulation/triangulations.pxd b/src/sage/geometry/triangulation/triangulations.pxd index 0caca05228c..0111fb0dd5f 100644 --- a/src/sage/geometry/triangulation/triangulations.pxd +++ b/src/sage/geometry/triangulation/triangulations.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cdef extern from "triangulations.h": ctypedef void* triangulations_ptr cdef triangulations_ptr init_triangulations \ diff --git a/src/sage/geometry/voronoi_diagram.py b/src/sage/geometry/voronoi_diagram.py index d2954a310fa..0cea1e91377 100644 --- a/src/sage/geometry/voronoi_diagram.py +++ b/src/sage/geometry/voronoi_diagram.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Voronoi diagram diff --git a/src/sage/graphs/all.py b/src/sage/graphs/all.py index 4986f777404..68529637000 100644 --- a/src/sage/graphs/all.py +++ b/src/sage/graphs/all.py @@ -1,19 +1,17 @@ -# sage_setup: distribution = sagemath-graphs from sage.misc.lazy_import import lazy_import lazy_import("sage.graphs.graph_generators", "graphs") lazy_import("sage.graphs.digraph_generators", "digraphs") lazy_import("sage.graphs.hypergraph_generators", "hypergraphs") -lazy_import("sage.graphs.graph_database", [ - "GraphDatabase", "GenericGraphQuery", "GraphQuery"]) -from sage.graphs.graph import Graph -from sage.graphs.digraph import DiGraph -from sage.graphs.bipartite_graph import BipartiteGraph +lazy_import("sage.graphs.graph_database", ["GraphDatabase", "GenericGraphQuery", "GraphQuery"]) +from .graph import Graph +from .digraph import DiGraph +from .bipartite_graph import BipartiteGraph import sage.graphs.weakly_chordal import sage.graphs.lovasz_theta import sage.graphs.partial_cube -from sage.graphs import graph_list as graphs_list +from . import graph_list as graphs_list lazy_import("sage.graphs", "graph_coloring") lazy_import("sage.graphs.graph_database", "graph_db_info") lazy_import("sage.graphs.graph_editor", "graph_editor") @@ -39,4 +37,3 @@ ... NameError: name 'clique_number' is not defined """ -del lazy_import diff --git a/src/sage/graphs/all__sagemath_bliss.py b/src/sage/graphs/all__sagemath_bliss.py index 00e01e7dfe7..e69de29bb2d 100644 --- a/src/sage/graphs/all__sagemath_bliss.py +++ b/src/sage/graphs/all__sagemath_bliss.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-bliss diff --git a/src/sage/graphs/all__sagemath_flint.py b/src/sage/graphs/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/graphs/all__sagemath_mcqd.py b/src/sage/graphs/all__sagemath_mcqd.py index 9d46f0ff6ba..e69de29bb2d 100644 --- a/src/sage/graphs/all__sagemath_mcqd.py +++ b/src/sage/graphs/all__sagemath_mcqd.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-mcqd diff --git a/src/sage/graphs/all__sagemath_tdlib.py b/src/sage/graphs/all__sagemath_tdlib.py index e26612c8409..e69de29bb2d 100644 --- a/src/sage/graphs/all__sagemath_tdlib.py +++ b/src/sage/graphs/all__sagemath_tdlib.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-tdlib diff --git a/src/sage/graphs/asteroidal_triples.pyx b/src/sage/graphs/asteroidal_triples.pyx index bf70c6dc4e1..d2423c912e3 100644 --- a/src/sage/graphs/asteroidal_triples.pyx +++ b/src/sage/graphs/asteroidal_triples.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Asteroidal triples diff --git a/src/sage/graphs/base/all.py b/src/sage/graphs/base/all.py index 9d0d23c0337..e69de29bb2d 100644 --- a/src/sage/graphs/base/all.py +++ b/src/sage/graphs/base/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-graphs diff --git a/src/sage/graphs/base/boost_graph.pxd b/src/sage/graphs/base/boost_graph.pxd index c0b41e8b5cc..7c7333a525b 100644 --- a/src/sage/graphs/base/boost_graph.pxd +++ b/src/sage/graphs/base/boost_graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # distutils: language = c++ # distutils: extra_compile_args = -std=c++11 diff --git a/src/sage/graphs/base/boost_graph.pyx b/src/sage/graphs/base/boost_graph.pyx index f69bcba3615..b4474a96bd6 100644 --- a/src/sage/graphs/base/boost_graph.pyx +++ b/src/sage/graphs/base/boost_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Interface to run Boost algorithms diff --git a/src/sage/graphs/base/c_graph.pxd b/src/sage/graphs/base/c_graph.pxd index 19710b4326d..9cd670ccbc5 100644 --- a/src/sage/graphs/base/c_graph.pxd +++ b/src/sage/graphs/base/c_graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs #************************************************************************** # Copyright (C) 2008-9 Robert L. Miller # diff --git a/src/sage/graphs/base/c_graph.pyx b/src/sage/graphs/base/c_graph.pyx index c1ac19eab2b..c8d68c4837f 100644 --- a/src/sage/graphs/base/c_graph.pyx +++ b/src/sage/graphs/base/c_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # distutils: language = c++ r""" Fast compiled graphs diff --git a/src/sage/graphs/base/dense_graph.pxd b/src/sage/graphs/base/dense_graph.pxd index 6fe1fa722e2..82659713bd9 100644 --- a/src/sage/graphs/base/dense_graph.pxd +++ b/src/sage/graphs/base/dense_graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs #***************************************************************************** # Copyright (C) 2008-2009 Robert L. Miller # diff --git a/src/sage/graphs/base/dense_graph.pyx b/src/sage/graphs/base/dense_graph.pyx index 3237a0cfbc6..eca8de6afed 100644 --- a/src/sage/graphs/base/dense_graph.pyx +++ b/src/sage/graphs/base/dense_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Fast dense graphs diff --git a/src/sage/graphs/base/graph_backends.pxd b/src/sage/graphs/base/graph_backends.pxd index ad412643bab..063e70e575e 100644 --- a/src/sage/graphs/base/graph_backends.pxd +++ b/src/sage/graphs/base/graph_backends.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.structure.sage_object cimport SageObject cdef class GenericGraphBackend(SageObject): diff --git a/src/sage/graphs/base/graph_backends.pyx b/src/sage/graphs/base/graph_backends.pyx index dff96353d59..77961c33cf6 100644 --- a/src/sage/graphs/base/graph_backends.pyx +++ b/src/sage/graphs/base/graph_backends.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- r""" Backends for Sage (di)graphs diff --git a/src/sage/graphs/base/overview.py b/src/sage/graphs/base/overview.py index a1c781f1afc..e349d84b828 100644 --- a/src/sage/graphs/base/overview.py +++ b/src/sage/graphs/base/overview.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Overview of (di)graph data structures diff --git a/src/sage/graphs/base/sparse_graph.pxd b/src/sage/graphs/base/sparse_graph.pxd index 78633ff96ce..540a8827801 100644 --- a/src/sage/graphs/base/sparse_graph.pxd +++ b/src/sage/graphs/base/sparse_graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # **************************************************************************** # Copyright (C) 2008-2009 Robert L. Miller # diff --git a/src/sage/graphs/base/sparse_graph.pyx b/src/sage/graphs/base/sparse_graph.pyx index c0ddfa11f1f..8672940c404 100644 --- a/src/sage/graphs/base/sparse_graph.pyx +++ b/src/sage/graphs/base/sparse_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Fast sparse graphs diff --git a/src/sage/graphs/base/static_dense_graph.pxd b/src/sage/graphs/base/static_dense_graph.pxd index 4f513679c41..0e580a02b57 100644 --- a/src/sage/graphs/base/static_dense_graph.pxd +++ b/src/sage/graphs/base/static_dense_graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.data_structures.binary_matrix cimport binary_matrix_t from libc.stdint cimport uint32_t, uint64_t diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index eb8fda3c547..b23eab66a3b 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Static dense graphs diff --git a/src/sage/graphs/base/static_sparse_backend.pxd b/src/sage/graphs/base/static_sparse_backend.pxd index 5e1a48a4f75..31f3b172a94 100644 --- a/src/sage/graphs/base/static_sparse_backend.pxd +++ b/src/sage/graphs/base/static_sparse_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from libc.stdint cimport uint64_t, uint32_t, INT32_MAX, UINT32_MAX from sage.data_structures.bitset cimport * diff --git a/src/sage/graphs/base/static_sparse_backend.pyx b/src/sage/graphs/base/static_sparse_backend.pyx index 2432cf7d5dd..1dc517a957a 100644 --- a/src/sage/graphs/base/static_sparse_backend.pyx +++ b/src/sage/graphs/base/static_sparse_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Static sparse graph backend diff --git a/src/sage/graphs/base/static_sparse_graph.pxd b/src/sage/graphs/base/static_sparse_graph.pxd index dd77fe1b3f0..bece6946be3 100644 --- a/src/sage/graphs/base/static_sparse_graph.pxd +++ b/src/sage/graphs/base/static_sparse_graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from cpython.object cimport PyObject from libc.stdint cimport uint32_t, uint64_t, UINT32_MAX from sage.data_structures.bitset cimport * diff --git a/src/sage/graphs/base/static_sparse_graph.pyx b/src/sage/graphs/base/static_sparse_graph.pyx index cffc224dd07..4c68f4043d3 100644 --- a/src/sage/graphs/base/static_sparse_graph.pyx +++ b/src/sage/graphs/base/static_sparse_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True # distutils: language = c++ r""" diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index dbff11deafd..6d8e909fa57 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # autopep8: off r""" Bipartite graphs diff --git a/src/sage/graphs/centrality.pyx b/src/sage/graphs/centrality.pyx index 3e6dcf681c4..d73c7571d18 100755 --- a/src/sage/graphs/centrality.pyx +++ b/src/sage/graphs/centrality.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Centrality diff --git a/src/sage/graphs/chrompoly.pyx b/src/sage/graphs/chrompoly.pyx index 2dbec41de2a..920a2b0eee0 100644 --- a/src/sage/graphs/chrompoly.pyx +++ b/src/sage/graphs/chrompoly.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # cython: binding=True # sage.doctest: needs sage.libs.flint sage.graphs """ diff --git a/src/sage/graphs/cliquer.pxd b/src/sage/graphs/cliquer.pxd index 05f6ad93ab0..df1576b164e 100644 --- a/src/sage/graphs/cliquer.pxd +++ b/src/sage/graphs/cliquer.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # distutils: libraries = cliquer cdef extern from "cliquer/graph.h": diff --git a/src/sage/graphs/cliquer.pyx b/src/sage/graphs/cliquer.pyx index f1f18fd992a..62ce4816ccd 100644 --- a/src/sage/graphs/cliquer.pyx +++ b/src/sage/graphs/cliquer.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Interface with Cliquer (clique-related problems) diff --git a/src/sage/graphs/comparability.pyx b/src/sage/graphs/comparability.pyx index d30fa021066..b10ce489268 100644 --- a/src/sage/graphs/comparability.pyx +++ b/src/sage/graphs/comparability.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Comparability and permutation graphs diff --git a/src/sage/graphs/connectivity.pxd b/src/sage/graphs/connectivity.pxd index ba23b20f2ba..f529d2ebdea 100644 --- a/src/sage/graphs/connectivity.pxd +++ b/src/sage/graphs/connectivity.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from memory_allocator cimport MemoryAllocator from sage.graphs.generic_graph_pyx cimport GenericGraph_pyx diff --git a/src/sage/graphs/connectivity.pyx b/src/sage/graphs/connectivity.pyx index 3d9e1a1eda5..ee387ab352b 100644 --- a/src/sage/graphs/connectivity.pyx +++ b/src/sage/graphs/connectivity.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Connectivity related functions diff --git a/src/sage/graphs/convexity_properties.pxd b/src/sage/graphs/convexity_properties.pxd index 7f9fc85c3c1..f6c1b68b6b8 100644 --- a/src/sage/graphs/convexity_properties.pxd +++ b/src/sage/graphs/convexity_properties.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.data_structures.bitset cimport bitset_t from sage.data_structures.binary_matrix cimport binary_matrix_t diff --git a/src/sage/graphs/convexity_properties.pyx b/src/sage/graphs/convexity_properties.pyx index aa107fb4dee..60c7941147d 100644 --- a/src/sage/graphs/convexity_properties.pyx +++ b/src/sage/graphs/convexity_properties.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Convexity properties of graphs diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py index dcfd111c3cb..e59b62bff9e 100644 --- a/src/sage/graphs/digraph.py +++ b/src/sage/graphs/digraph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Directed graphs diff --git a/src/sage/graphs/digraph_generators.py b/src/sage/graphs/digraph_generators.py index 073bb5a8dfc..a5804ab9c8e 100644 --- a/src/sage/graphs/digraph_generators.py +++ b/src/sage/graphs/digraph_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Common digraphs diff --git a/src/sage/graphs/distances_all_pairs.pxd b/src/sage/graphs/distances_all_pairs.pxd index 3b6287215a0..d87a001d143 100644 --- a/src/sage/graphs/distances_all_pairs.pxd +++ b/src/sage/graphs/distances_all_pairs.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from libc.stdint cimport uint32_t cdef unsigned short * c_shortest_path_all_pairs(G, vertex_list=*) except NULL diff --git a/src/sage/graphs/distances_all_pairs.pyx b/src/sage/graphs/distances_all_pairs.pyx index eae58b0319e..3eb15129d19 100644 --- a/src/sage/graphs/distances_all_pairs.pyx +++ b/src/sage/graphs/distances_all_pairs.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Distances/shortest paths between all pairs of vertices diff --git a/src/sage/graphs/domination.py b/src/sage/graphs/domination.py index 7a651fb9bce..6b119afed25 100644 --- a/src/sage/graphs/domination.py +++ b/src/sage/graphs/domination.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Domination diff --git a/src/sage/graphs/dot2tex_utils.py b/src/sage/graphs/dot2tex_utils.py index 4c653e06598..f8eb55485ac 100644 --- a/src/sage/graphs/dot2tex_utils.py +++ b/src/sage/graphs/dot2tex_utils.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" This file contains some utility functions for the interface with dot2tex """ diff --git a/src/sage/graphs/edge_connectivity.pyx b/src/sage/graphs/edge_connectivity.pyx index 8e9a088eb6c..aef8e43d98e 100644 --- a/src/sage/graphs/edge_connectivity.pyx +++ b/src/sage/graphs/edge_connectivity.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True # distutils: language = c++ r""" diff --git a/src/sage/graphs/generators/all.py b/src/sage/graphs/generators/all.py index 9d0d23c0337..e69de29bb2d 100644 --- a/src/sage/graphs/generators/all.py +++ b/src/sage/graphs/generators/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-graphs diff --git a/src/sage/graphs/generators/basic.py b/src/sage/graphs/generators/basic.py index 405eeab95a1..216ac0b4e39 100644 --- a/src/sage/graphs/generators/basic.py +++ b/src/sage/graphs/generators/basic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Basic graphs diff --git a/src/sage/graphs/generators/chessboard.py b/src/sage/graphs/generators/chessboard.py index 79f08fe6492..a76d6f98de7 100644 --- a/src/sage/graphs/generators/chessboard.py +++ b/src/sage/graphs/generators/chessboard.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Chessboard graphs diff --git a/src/sage/graphs/generators/classical_geometries.py b/src/sage/graphs/generators/classical_geometries.py index 5b465cd3bb1..e27f7e11b6d 100644 --- a/src/sage/graphs/generators/classical_geometries.py +++ b/src/sage/graphs/generators/classical_geometries.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: optional - sage.modules r""" Families of graphs derived from classical geometries over finite fields diff --git a/src/sage/graphs/generators/degree_sequence.py b/src/sage/graphs/generators/degree_sequence.py index ab226e3eaf8..5250bd9cb1a 100644 --- a/src/sage/graphs/generators/degree_sequence.py +++ b/src/sage/graphs/generators/degree_sequence.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Graphs with a given degree sequence diff --git a/src/sage/graphs/generators/distance_regular.pyx b/src/sage/graphs/generators/distance_regular.pyx index 442f88883f6..f05e4d714f7 100644 --- a/src/sage/graphs/generators/distance_regular.pyx +++ b/src/sage/graphs/generators/distance_regular.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Database of distance regular graphs diff --git a/src/sage/graphs/generators/families.py b/src/sage/graphs/generators/families.py index 8e97803ea37..0d039d8db05 100644 --- a/src/sage/graphs/generators/families.py +++ b/src/sage/graphs/generators/families.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Various families of graphs diff --git a/src/sage/graphs/generators/intersection.py b/src/sage/graphs/generators/intersection.py index ff948504a82..0434806fb73 100644 --- a/src/sage/graphs/generators/intersection.py +++ b/src/sage/graphs/generators/intersection.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Intersection graphs diff --git a/src/sage/graphs/generators/platonic_solids.py b/src/sage/graphs/generators/platonic_solids.py index db52f5a9ae8..5a572611539 100644 --- a/src/sage/graphs/generators/platonic_solids.py +++ b/src/sage/graphs/generators/platonic_solids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" 1-skeletons of Platonic solids diff --git a/src/sage/graphs/generators/random.py b/src/sage/graphs/generators/random.py index 8bf3614ecda..9459124a0fe 100644 --- a/src/sage/graphs/generators/random.py +++ b/src/sage/graphs/generators/random.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Random graphs diff --git a/src/sage/graphs/generators/smallgraphs.py b/src/sage/graphs/generators/smallgraphs.py index d19f712c904..f1eaa816d6c 100644 --- a/src/sage/graphs/generators/smallgraphs.py +++ b/src/sage/graphs/generators/smallgraphs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Various small graphs diff --git a/src/sage/graphs/generators/world_map.py b/src/sage/graphs/generators/world_map.py index f3c53f2219b..588689d516c 100644 --- a/src/sage/graphs/generators/world_map.py +++ b/src/sage/graphs/generators/world_map.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Graphs from the World Map diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index f9cf7f8961a..4d147efcd2f 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Generic graphs (common to directed/undirected) diff --git a/src/sage/graphs/generic_graph_pyx.pxd b/src/sage/graphs/generic_graph_pyx.pxd index 317832d3b7a..a09c1d69333 100644 --- a/src/sage/graphs/generic_graph_pyx.pxd +++ b/src/sage/graphs/generic_graph_pyx.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.structure.sage_object cimport SageObject from sage.graphs.base.dense_graph cimport DenseGraph from memory_allocator cimport MemoryAllocator diff --git a/src/sage/graphs/generic_graph_pyx.pyx b/src/sage/graphs/generic_graph_pyx.pyx index f67f51df11b..74a6f13c1c6 100644 --- a/src/sage/graphs/generic_graph_pyx.pyx +++ b/src/sage/graphs/generic_graph_pyx.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- """ GenericGraph Cython functions diff --git a/src/sage/graphs/genus.pyx b/src/sage/graphs/genus.pyx index 24d9ba36d0e..dae6f71308f 100644 --- a/src/sage/graphs/genus.pyx +++ b/src/sage/graphs/genus.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Genus diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index 862d94354a4..d4f2e18a555 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Undirected graphs diff --git a/src/sage/graphs/graph_coloring.pyx b/src/sage/graphs/graph_coloring.pyx index 900aede0ece..e4b6dd9873e 100644 --- a/src/sage/graphs/graph_coloring.pyx +++ b/src/sage/graphs/graph_coloring.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True # distutils: language = c++ diff --git a/src/sage/graphs/graph_database.py b/src/sage/graphs/graph_database.py index f6f1dfc99f6..653201c3d10 100644 --- a/src/sage/graphs/graph_database.py +++ b/src/sage/graphs/graph_database.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Graph database diff --git a/src/sage/graphs/graph_decompositions/all.py b/src/sage/graphs/graph_decompositions/all.py index 9d0d23c0337..e69de29bb2d 100644 --- a/src/sage/graphs/graph_decompositions/all.py +++ b/src/sage/graphs/graph_decompositions/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-graphs diff --git a/src/sage/graphs/graph_decompositions/all__sagemath_tdlib.py b/src/sage/graphs/graph_decompositions/all__sagemath_tdlib.py index e26612c8409..e69de29bb2d 100644 --- a/src/sage/graphs/graph_decompositions/all__sagemath_tdlib.py +++ b/src/sage/graphs/graph_decompositions/all__sagemath_tdlib.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-tdlib diff --git a/src/sage/graphs/graph_decompositions/bandwidth.pyx b/src/sage/graphs/graph_decompositions/bandwidth.pyx index 659c9eefdb2..61bacd2daf5 100644 --- a/src/sage/graphs/graph_decompositions/bandwidth.pyx +++ b/src/sage/graphs/graph_decompositions/bandwidth.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Bandwidth of undirected graphs diff --git a/src/sage/graphs/graph_decompositions/clique_separators.pyx b/src/sage/graphs/graph_decompositions/clique_separators.pyx index e6d60adc6ac..0989a5a9dae 100644 --- a/src/sage/graphs/graph_decompositions/clique_separators.pyx +++ b/src/sage/graphs/graph_decompositions/clique_separators.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- # cython: binding=True # distutils: language = c++ r""" diff --git a/src/sage/graphs/graph_decompositions/cutwidth.pyx b/src/sage/graphs/graph_decompositions/cutwidth.pyx index f2fc9ee9951..8aa99a242c9 100644 --- a/src/sage/graphs/graph_decompositions/cutwidth.pyx +++ b/src/sage/graphs/graph_decompositions/cutwidth.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Cutwidth diff --git a/src/sage/graphs/graph_decompositions/fast_digraph.pxd b/src/sage/graphs/graph_decompositions/fast_digraph.pxd index b2b2f44b989..2687f8f974d 100644 --- a/src/sage/graphs/graph_decompositions/fast_digraph.pxd +++ b/src/sage/graphs/graph_decompositions/fast_digraph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from libc.stdint cimport uint8_t cdef class FastDigraph: diff --git a/src/sage/graphs/graph_decompositions/fast_digraph.pyx b/src/sage/graphs/graph_decompositions/fast_digraph.pyx index 5e0924e06ff..2d28ccf4d05 100644 --- a/src/sage/graphs/graph_decompositions/fast_digraph.pyx +++ b/src/sage/graphs/graph_decompositions/fast_digraph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Compact structure for fast operations on less than 32 vertices diff --git a/src/sage/graphs/graph_decompositions/graph_products.pyx b/src/sage/graphs/graph_decompositions/graph_products.pyx index df053ac937a..98bfb6ec0f5 100644 --- a/src/sage/graphs/graph_decompositions/graph_products.pyx +++ b/src/sage/graphs/graph_decompositions/graph_products.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Products of graphs diff --git a/src/sage/graphs/graph_decompositions/modular_decomposition.py b/src/sage/graphs/graph_decompositions/modular_decomposition.py index d62c28c7922..6b1e825ba2e 100644 --- a/src/sage/graphs/graph_decompositions/modular_decomposition.py +++ b/src/sage/graphs/graph_decompositions/modular_decomposition.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Modular Decomposition diff --git a/src/sage/graphs/graph_decompositions/rankwidth.pxd b/src/sage/graphs/graph_decompositions/rankwidth.pxd index a970d155391..a23faceac4f 100644 --- a/src/sage/graphs/graph_decompositions/rankwidth.pxd +++ b/src/sage/graphs/graph_decompositions/rankwidth.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs cdef extern from "rw.h": ctypedef int uint_fast8_t ctypedef int uint_fast32_t diff --git a/src/sage/graphs/graph_decompositions/rankwidth.pyx b/src/sage/graphs/graph_decompositions/rankwidth.pyx index 438b0a9e1b2..d817cf04a5d 100644 --- a/src/sage/graphs/graph_decompositions/rankwidth.pyx +++ b/src/sage/graphs/graph_decompositions/rankwidth.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True # distutils: libraries = rw r""" diff --git a/src/sage/graphs/graph_decompositions/tree_decomposition.pxd b/src/sage/graphs/graph_decompositions/tree_decomposition.pxd index ace3fd5a327..2de876e8889 100644 --- a/src/sage/graphs/graph_decompositions/tree_decomposition.pxd +++ b/src/sage/graphs/graph_decompositions/tree_decomposition.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.graphs.generic_graph_pyx cimport GenericGraph_pyx cdef class TreelengthConnected: diff --git a/src/sage/graphs/graph_decompositions/tree_decomposition.pyx b/src/sage/graphs/graph_decompositions/tree_decomposition.pyx index 64bf05b0889..0fb9f87c6ee 100644 --- a/src/sage/graphs/graph_decompositions/tree_decomposition.pyx +++ b/src/sage/graphs/graph_decompositions/tree_decomposition.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Tree decompositions diff --git a/src/sage/graphs/graph_decompositions/vertex_separation.pxd b/src/sage/graphs/graph_decompositions/vertex_separation.pxd index 94a46c33c26..fa757b2c28e 100644 --- a/src/sage/graphs/graph_decompositions/vertex_separation.pxd +++ b/src/sage/graphs/graph_decompositions/vertex_separation.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from libc.stdint cimport uint8_t from sage.graphs.graph_decompositions.fast_digraph cimport FastDigraph diff --git a/src/sage/graphs/graph_decompositions/vertex_separation.pyx b/src/sage/graphs/graph_decompositions/vertex_separation.pyx index bc1f8c8dade..2d49f4bdb29 100644 --- a/src/sage/graphs/graph_decompositions/vertex_separation.pyx +++ b/src/sage/graphs/graph_decompositions/vertex_separation.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Vertex separation diff --git a/src/sage/graphs/graph_editor.py b/src/sage/graphs/graph_editor.py index e09368db17a..fc1fc72ccc8 100644 --- a/src/sage/graphs/graph_editor.py +++ b/src/sage/graphs/graph_editor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Graph editor widget diff --git a/src/sage/graphs/graph_generators.py b/src/sage/graphs/graph_generators.py index 6708600eb31..5a09c617ba2 100644 --- a/src/sage/graphs/graph_generators.py +++ b/src/sage/graphs/graph_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Common graphs diff --git a/src/sage/graphs/graph_generators_pyx.pyx b/src/sage/graphs/graph_generators_pyx.pyx index 1817e99c497..033e8b22adc 100644 --- a/src/sage/graphs/graph_generators_pyx.pyx +++ b/src/sage/graphs/graph_generators_pyx.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Common graphs and digraphs generators (Cython) diff --git a/src/sage/graphs/graph_input.py b/src/sage/graphs/graph_input.py index 1da45c63e35..52941853359 100644 --- a/src/sage/graphs/graph_input.py +++ b/src/sage/graphs/graph_input.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Functions for reading/building graphs/digraphs diff --git a/src/sage/graphs/graph_latex.py b/src/sage/graphs/graph_latex.py index 9c18c959a29..42cc1b369ab 100644 --- a/src/sage/graphs/graph_latex.py +++ b/src/sage/graphs/graph_latex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.plot r""" LaTeX options for graphs diff --git a/src/sage/graphs/graph_list.py b/src/sage/graphs/graph_list.py index d6bfcfd1369..6994a821948 100644 --- a/src/sage/graphs/graph_list.py +++ b/src/sage/graphs/graph_list.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Lists of graphs diff --git a/src/sage/graphs/graph_plot.py b/src/sage/graphs/graph_plot.py index 8794587bab6..6e36a195197 100644 --- a/src/sage/graphs/graph_plot.py +++ b/src/sage/graphs/graph_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: optional - sage.plot r""" Graph plotting diff --git a/src/sage/graphs/graph_plot_js.py b/src/sage/graphs/graph_plot_js.py index 95440d5560b..cd9c635c736 100644 --- a/src/sage/graphs/graph_plot_js.py +++ b/src/sage/graphs/graph_plot_js.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.plot r""" Graph plotting in Javascript with d3.js diff --git a/src/sage/graphs/hyperbolicity.pyx b/src/sage/graphs/hyperbolicity.pyx index 6cc36695efd..78b3205b6fd 100644 --- a/src/sage/graphs/hyperbolicity.pyx +++ b/src/sage/graphs/hyperbolicity.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Hyperbolicity diff --git a/src/sage/graphs/hypergraph_generators.py b/src/sage/graphs/hypergraph_generators.py index 5141c02e968..f5218e225f1 100644 --- a/src/sage/graphs/hypergraph_generators.py +++ b/src/sage/graphs/hypergraph_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Hypergraph generators diff --git a/src/sage/graphs/independent_sets.pxd b/src/sage/graphs/independent_sets.pxd index 7089adec2ae..91f65b64ff7 100644 --- a/src/sage/graphs/independent_sets.pxd +++ b/src/sage/graphs/independent_sets.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from libc.stdint cimport uint32_t, uint64_t from sage.data_structures.binary_matrix cimport * diff --git a/src/sage/graphs/independent_sets.pyx b/src/sage/graphs/independent_sets.pyx index 22303abefd5..3064ccbc86f 100644 --- a/src/sage/graphs/independent_sets.pyx +++ b/src/sage/graphs/independent_sets.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Independent sets diff --git a/src/sage/graphs/isgci.py b/src/sage/graphs/isgci.py index a573bce2fd7..2315ea4679d 100644 --- a/src/sage/graphs/isgci.py +++ b/src/sage/graphs/isgci.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" ISGCI: Information System on Graph Classes and their Inclusions diff --git a/src/sage/graphs/isoperimetric_inequalities.pyx b/src/sage/graphs/isoperimetric_inequalities.pyx index 0b17d17f59f..1d01e311c1c 100644 --- a/src/sage/graphs/isoperimetric_inequalities.pyx +++ b/src/sage/graphs/isoperimetric_inequalities.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding = True r""" Isoperimetric inequalities diff --git a/src/sage/graphs/line_graph.pyx b/src/sage/graphs/line_graph.pyx index e17bcdb767e..796e15d44ab 100644 --- a/src/sage/graphs/line_graph.pyx +++ b/src/sage/graphs/line_graph.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Line graphs diff --git a/src/sage/graphs/lovasz_theta.py b/src/sage/graphs/lovasz_theta.py index 8ebd37e2372..5335a597ebf 100644 --- a/src/sage/graphs/lovasz_theta.py +++ b/src/sage/graphs/lovasz_theta.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Lovász theta-function of graphs diff --git a/src/sage/graphs/matchpoly.pyx b/src/sage/graphs/matchpoly.pyx index f04c258e8a2..03b15c066d1 100644 --- a/src/sage/graphs/matchpoly.pyx +++ b/src/sage/graphs/matchpoly.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # cython: binding=True # sage.doctest: needs sage.libs.flint sage.graphs """ diff --git a/src/sage/graphs/orientations.py b/src/sage/graphs/orientations.py index 2658c416470..1ecb283ba2a 100644 --- a/src/sage/graphs/orientations.py +++ b/src/sage/graphs/orientations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Orientations diff --git a/src/sage/graphs/partial_cube.py b/src/sage/graphs/partial_cube.py index 5f181f557d0..79b1edc957c 100644 --- a/src/sage/graphs/partial_cube.py +++ b/src/sage/graphs/partial_cube.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Partial cubes diff --git a/src/sage/graphs/path_enumeration.pyx b/src/sage/graphs/path_enumeration.pyx index 4ca9a5d21f8..78832f89134 100644 --- a/src/sage/graphs/path_enumeration.pyx +++ b/src/sage/graphs/path_enumeration.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- # cython: binding=True # distutils: language = c++ r""" diff --git a/src/sage/graphs/planarity.pyx b/src/sage/graphs/planarity.pyx index 351238ffacd..987669d97fe 100644 --- a/src/sage/graphs/planarity.pyx +++ b/src/sage/graphs/planarity.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # distutils: libraries = planarity """ Wrapper for Boyer's (C) planarity algorithm diff --git a/src/sage/graphs/pq_trees.py b/src/sage/graphs/pq_trees.py index 3530bf7a0d7..66f0c9aaf67 100644 --- a/src/sage/graphs/pq_trees.py +++ b/src/sage/graphs/pq_trees.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" PQ-Trees diff --git a/src/sage/graphs/print_graphs.py b/src/sage/graphs/print_graphs.py index e0248c86806..e89610d0424 100644 --- a/src/sage/graphs/print_graphs.py +++ b/src/sage/graphs/print_graphs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Print graph diff --git a/src/sage/graphs/schnyder.py b/src/sage/graphs/schnyder.py index 4371f22ceae..b22ab6d3302 100644 --- a/src/sage/graphs/schnyder.py +++ b/src/sage/graphs/schnyder.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Schnyder's algorithm for straight-line planar embeddings diff --git a/src/sage/graphs/spanning_tree.pyx b/src/sage/graphs/spanning_tree.pyx index 84088d585d0..ccddfa7f5b4 100644 --- a/src/sage/graphs/spanning_tree.pyx +++ b/src/sage/graphs/spanning_tree.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Spanning trees diff --git a/src/sage/graphs/strongly_regular_db.pyx b/src/sage/graphs/strongly_regular_db.pyx index 267ee25170e..27cfd3da535 100644 --- a/src/sage/graphs/strongly_regular_db.pyx +++ b/src/sage/graphs/strongly_regular_db.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- r""" Database of strongly regular graphs diff --git a/src/sage/graphs/traversals.pxd b/src/sage/graphs/traversals.pxd index f937451fc7e..a81c72dcd9d 100644 --- a/src/sage/graphs/traversals.pxd +++ b/src/sage/graphs/traversals.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.graphs.base.static_sparse_graph cimport short_digraph cdef maximum_cardinality_search_M_short_digraph(short_digraph sd, diff --git a/src/sage/graphs/traversals.pyx b/src/sage/graphs/traversals.pyx index 06bf346271d..d7dfad47a30 100644 --- a/src/sage/graphs/traversals.pyx +++ b/src/sage/graphs/traversals.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- # cython: binding=True # distutils: language = c++ r""" diff --git a/src/sage/graphs/trees.pxd b/src/sage/graphs/trees.pxd index 953d29c1f7e..f2c81ab49a7 100644 --- a/src/sage/graphs/trees.pxd +++ b/src/sage/graphs/trees.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs cdef class TreeIterator: cdef int vertices diff --git a/src/sage/graphs/trees.pyx b/src/sage/graphs/trees.pyx index 6e87c647667..2fd64e9ef43 100644 --- a/src/sage/graphs/trees.pyx +++ b/src/sage/graphs/trees.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Generation of trees diff --git a/src/sage/graphs/tutte_polynomial.py b/src/sage/graphs/tutte_polynomial.py index 58012201b26..6206b963b50 100644 --- a/src/sage/graphs/tutte_polynomial.py +++ b/src/sage/graphs/tutte_polynomial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Tutte polynomial diff --git a/src/sage/graphs/views.pyx b/src/sage/graphs/views.pyx index 19660e48fd1..d8eb1b3eae6 100644 --- a/src/sage/graphs/views.pyx +++ b/src/sage/graphs/views.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" View classes diff --git a/src/sage/graphs/weakly_chordal.pyx b/src/sage/graphs/weakly_chordal.pyx index f337d0d3281..ea82042f996 100644 --- a/src/sage/graphs/weakly_chordal.pyx +++ b/src/sage/graphs/weakly_chordal.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # cython: binding=True r""" Weakly chordal graphs diff --git a/src/sage/groups/abelian_gps/abelian_aut.py b/src/sage/groups/abelian_gps/abelian_aut.py index 5b9f8f53b32..b27f9bdb220 100644 --- a/src/sage/groups/abelian_gps/abelian_aut.py +++ b/src/sage/groups/abelian_gps/abelian_aut.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Automorphisms of abelian groups diff --git a/src/sage/groups/abelian_gps/abelian_group.py b/src/sage/groups/abelian_gps/abelian_group.py index 356e3e20284..73fbd379358 100644 --- a/src/sage/groups/abelian_gps/abelian_group.py +++ b/src/sage/groups/abelian_gps/abelian_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Multiplicative Abelian Groups diff --git a/src/sage/groups/abelian_gps/abelian_group_element.py b/src/sage/groups/abelian_gps/abelian_group_element.py index e7a95a13bba..b081f1e1c4e 100644 --- a/src/sage/groups/abelian_gps/abelian_group_element.py +++ b/src/sage/groups/abelian_gps/abelian_group_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Abelian group elements diff --git a/src/sage/groups/abelian_gps/abelian_group_gap.py b/src/sage/groups/abelian_gps/abelian_group_gap.py index c51857fa4a3..9ce83a6e33c 100644 --- a/src/sage/groups/abelian_gps/abelian_group_gap.py +++ b/src/sage/groups/abelian_gps/abelian_group_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Finitely generated abelian groups with GAP. diff --git a/src/sage/groups/abelian_gps/abelian_group_morphism.py b/src/sage/groups/abelian_gps/abelian_group_morphism.py index 650567fe07d..e4b7b82b42b 100644 --- a/src/sage/groups/abelian_gps/abelian_group_morphism.py +++ b/src/sage/groups/abelian_gps/abelian_group_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Homomorphisms of abelian groups diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index 6d1dd159ba6..2bb91f85f3b 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -1,9 +1,8 @@ -# sage_setup: distribution = sagemath-groups """ all.py -- export of abelian groups to Sage """ -# ***************************************************************************** +#***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,8 +17,13 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.groups.abelian_gps.all__sagemath_modules import * -from sage.groups.abelian_gps.all__sagemath_gap import * +#from dual_abelian_group import DualAbelianGroup +from .abelian_group import AbelianGroup, word_problem +from .values import AbelianGroupWithValues + +# TODO: +# Implement group homset, conversion of generator images to morphism +from .abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/abelian_gps/all__sagemath_gap.py b/src/sage/groups/abelian_gps/all__sagemath_gap.py deleted file mode 100644 index 80c0bd46216..00000000000 --- a/src/sage/groups/abelian_gps/all__sagemath_gap.py +++ /dev/null @@ -1,5 +0,0 @@ - -# TODO: -# Implement group homset, conversion of generator images to morphism - -from sage.groups.abelian_gps.abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/abelian_gps/all__sagemath_modules.py b/src/sage/groups/abelian_gps/all__sagemath_modules.py deleted file mode 100644 index 32a1f65f720..00000000000 --- a/src/sage/groups/abelian_gps/all__sagemath_modules.py +++ /dev/null @@ -1,4 +0,0 @@ - -# from dual_abelian_group import DualAbelianGroup -from sage.groups.abelian_gps.abelian_group import AbelianGroup, word_problem -from sage.groups.abelian_gps.values import AbelianGroupWithValues diff --git a/src/sage/groups/abelian_gps/dual_abelian_group.py b/src/sage/groups/abelian_gps/dual_abelian_group.py index 2d8970e6897..4aecfd69816 100644 --- a/src/sage/groups/abelian_gps/dual_abelian_group.py +++ b/src/sage/groups/abelian_gps/dual_abelian_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.number_field r""" Dual groups of Finite Multiplicative Abelian Groups diff --git a/src/sage/groups/abelian_gps/dual_abelian_group_element.py b/src/sage/groups/abelian_gps/dual_abelian_group_element.py index 08afe59ecd5..6fdb8a68c4e 100644 --- a/src/sage/groups/abelian_gps/dual_abelian_group_element.py +++ b/src/sage/groups/abelian_gps/dual_abelian_group_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.number_field """ Elements (characters) of the dual group of a finite Abelian group diff --git a/src/sage/groups/abelian_gps/element_base.py b/src/sage/groups/abelian_gps/element_base.py index 9ed358c9807..0435c9835b9 100644 --- a/src/sage/groups/abelian_gps/element_base.py +++ b/src/sage/groups/abelian_gps/element_base.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Base class for abelian group elements diff --git a/src/sage/groups/abelian_gps/values.py b/src/sage/groups/abelian_gps/values.py index 32992e04eb9..3db117123f0 100644 --- a/src/sage/groups/abelian_gps/values.py +++ b/src/sage/groups/abelian_gps/values.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Multiplicative Abelian Groups With Values diff --git a/src/sage/groups/additive_abelian/additive_abelian_group.py b/src/sage/groups/additive_abelian/additive_abelian_group.py index 05ed10d52c2..167b38a9cc0 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_group.py +++ b/src/sage/groups/additive_abelian/additive_abelian_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Additive Abelian Groups diff --git a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py index 05e017aa78d..bf16874d97f 100644 --- a/src/sage/groups/additive_abelian/additive_abelian_wrapper.py +++ b/src/sage/groups/additive_abelian/additive_abelian_wrapper.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Wrapper class for abelian groups diff --git a/src/sage/groups/additive_abelian/all.py b/src/sage/groups/additive_abelian/all.py index 6b2648bb3dc..956cf00614e 100644 --- a/src/sage/groups/additive_abelian/all.py +++ b/src/sage/groups/additive_abelian/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules -from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup -from sage.groups.additive_abelian.additive_abelian_wrapper import * +from .additive_abelian_group import AdditiveAbelianGroup +from .additive_abelian_wrapper import * diff --git a/src/sage/groups/additive_abelian/qmodnz.py b/src/sage/groups/additive_abelian/qmodnz.py index 8c1b60ee80f..db0b23d5fe4 100644 --- a/src/sage/groups/additive_abelian/qmodnz.py +++ b/src/sage/groups/additive_abelian/qmodnz.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" This module implements `\Q/n\Z` for `n \in \Q`. diff --git a/src/sage/groups/additive_abelian/qmodnz_element.py b/src/sage/groups/additive_abelian/qmodnz_element.py index ea0191212f9..10f92f76bf9 100644 --- a/src/sage/groups/additive_abelian/qmodnz_element.py +++ b/src/sage/groups/additive_abelian/qmodnz_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements of `\Q/n\Z`. diff --git a/src/sage/groups/affine_gps/affine_group.py b/src/sage/groups/affine_gps/affine_group.py index 8e5662d5855..a811640c3c0 100644 --- a/src/sage/groups/affine_gps/affine_group.py +++ b/src/sage/groups/affine_gps/affine_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Affine Groups diff --git a/src/sage/groups/affine_gps/all.py b/src/sage/groups/affine_gps/all.py index 6f6ab52d0f2..e69de29bb2d 100644 --- a/src/sage/groups/affine_gps/all.py +++ b/src/sage/groups/affine_gps/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-modules diff --git a/src/sage/groups/affine_gps/catalog.py b/src/sage/groups/affine_gps/catalog.py index 5e86c8ded23..cefcfeb97bf 100644 --- a/src/sage/groups/affine_gps/catalog.py +++ b/src/sage/groups/affine_gps/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Type ``groups.affine.`` to access examples of groups implemented as affine groups. diff --git a/src/sage/groups/affine_gps/euclidean_group.py b/src/sage/groups/affine_gps/euclidean_group.py index 467d64eb017..3154eee7a01 100644 --- a/src/sage/groups/affine_gps/euclidean_group.py +++ b/src/sage/groups/affine_gps/euclidean_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Euclidean Groups diff --git a/src/sage/groups/affine_gps/group_element.py b/src/sage/groups/affine_gps/group_element.py index 6b33bcf95d7..42546194bb6 100644 --- a/src/sage/groups/affine_gps/group_element.py +++ b/src/sage/groups/affine_gps/group_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements of Affine Groups diff --git a/src/sage/groups/all.py b/src/sage/groups/all.py index eda2cdcbe5b..5fa9ccfac39 100644 --- a/src/sage/groups/all.py +++ b/src/sage/groups/all.py @@ -1,6 +1,37 @@ -# sage_setup: distribution = sagemath-groups +from sage.misc.lazy_import import lazy_import -from sage.groups.all__sagemath_modules import * -from sage.groups.all__sagemath_gap import * -from sage.groups.all__sagemath_pari import * -from sage.groups.all__sagemath_groups import * +from .pari_group import PariGroup + +from .matrix_gps.all import * +from .abelian_gps.all import * + +from .perm_gps.all import * + +from .generic import (discrete_log, discrete_log_rho, discrete_log_lambda, + linear_relation, multiple, multiples, order_from_multiple) + +lazy_import('sage.groups.class_function', 'ClassFunction') + +from .additive_abelian.all import * + +lazy_import('sage.groups.conjugacy_classes', ['ConjugacyClass', 'ConjugacyClassGAP']) + +lazy_import('sage.groups.free_group', 'FreeGroup') +lazy_import('sage.groups.braid', 'BraidGroup') +lazy_import('sage.groups.cubic_braid', 'CubicBraidGroup') +lazy_import('sage.groups.cubic_braid', 'AssionGroupU') +lazy_import('sage.groups.cubic_braid', 'AssionGroupS') + +lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') +lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') + +lazy_import('sage.groups.artin', 'ArtinGroup') +lazy_import('sage.groups.raag', 'RightAngledArtinGroup') + +lazy_import('sage.groups', 'groups_catalog', 'groups') + +lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', 'SemimonomialTransformationGroup') + +lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) + +lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py deleted file mode 100644 index cf28b7d6bff..00000000000 --- a/src/sage/groups/all__sagemath_categories.py +++ /dev/null @@ -1,10 +0,0 @@ -from sage.groups.all__sagemath_objects import * - -from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, - linear_relation, multiple, multiples, order_from_multiple) - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.groups', 'groups_catalog', 'groups') - -del lazy_import diff --git a/src/sage/groups/all__sagemath_combinat.py b/src/sage/groups/all__sagemath_combinat.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/all__sagemath_gap.py b/src/sage/groups/all__sagemath_gap.py deleted file mode 100644 index 15278ba12aa..00000000000 --- a/src/sage/groups/all__sagemath_gap.py +++ /dev/null @@ -1,3 +0,0 @@ - -from sage.groups.perm_gps.all import * -from sage.groups.abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/all__sagemath_graphs.py b/src/sage/groups/all__sagemath_graphs.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/all__sagemath_groups.py b/src/sage/groups/all__sagemath_groups.py deleted file mode 100644 index c27a9ca05c5..00000000000 --- a/src/sage/groups/all__sagemath_groups.py +++ /dev/null @@ -1,32 +0,0 @@ -from sage.groups.all__sagemath_modules import * - -try: - from sage.groups.all__sagemath_pari import * -except ImportError: - pass - -from sage.groups.all__sagemath_gap import * - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.groups.class_function', 'ClassFunction') - -lazy_import('sage.groups.conjugacy_classes', ['ConjugacyClass', 'ConjugacyClassGAP']) - -lazy_import('sage.groups.free_group', 'FreeGroup') -lazy_import('sage.groups.braid', 'BraidGroup') -lazy_import('sage.groups.cubic_braid', 'CubicBraidGroup') -lazy_import('sage.groups.cubic_braid', 'AssionGroupU') -lazy_import('sage.groups.cubic_braid', 'AssionGroupS') - -lazy_import('sage.groups.artin', 'ArtinGroup') -lazy_import('sage.groups.raag', 'RightAngledArtinGroup') - -lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', - 'SemimonomialTransformationGroup') - -lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) - -lazy_import('sage.groups.group_semidirect_product', [ - 'GroupSemidirectProduct', 'GroupSemidirectProductElement']) -del lazy_import diff --git a/src/sage/groups/all__sagemath_modules.py b/src/sage/groups/all__sagemath_modules.py deleted file mode 100644 index 6a3eb638a9b..00000000000 --- a/src/sage/groups/all__sagemath_modules.py +++ /dev/null @@ -1,11 +0,0 @@ -from sage.groups.all__sagemath_categories import * - -from sage.groups.additive_abelian.all import * -from sage.groups.abelian_gps.all__sagemath_modules import * -from sage.groups.matrix_gps.all__sagemath_modules import * - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') -lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') -del lazy_import diff --git a/src/sage/groups/all__sagemath_objects.py b/src/sage/groups/all__sagemath_objects.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/all__sagemath_pari.py b/src/sage/groups/all__sagemath_pari.py deleted file mode 100644 index 97f61bbfc2c..00000000000 --- a/src/sage/groups/all__sagemath_pari.py +++ /dev/null @@ -1,2 +0,0 @@ - -from sage.groups.pari_group import PariGroup diff --git a/src/sage/groups/artin.py b/src/sage/groups/artin.py index c3b747b8595..afb40463206 100644 --- a/src/sage/groups/artin.py +++ b/src/sage/groups/artin.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups """ Artin Groups diff --git a/src/sage/groups/braid.py b/src/sage/groups/braid.py index 4a2e081d2b7..fb52b074218 100644 --- a/src/sage/groups/braid.py +++ b/src/sage/groups/braid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups """ Braid groups diff --git a/src/sage/groups/cactus_group.py b/src/sage/groups/cactus_group.py index e4e1c41833e..a4a6fe629b0 100644 --- a/src/sage/groups/cactus_group.py +++ b/src/sage/groups/cactus_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups # sage.doctest: needs sage.rings.number_field r""" Cactus Groups diff --git a/src/sage/groups/class_function.py b/src/sage/groups/class_function.py index af465b4c8b0..901b0083b49 100644 --- a/src/sage/groups/class_function.py +++ b/src/sage/groups/class_function.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups # sage.doctest: needs sage.rings.number_field r""" Class functions of groups. diff --git a/src/sage/groups/conjugacy_classes.py b/src/sage/groups/conjugacy_classes.py index 873d420b547..147cc803842 100644 --- a/src/sage/groups/conjugacy_classes.py +++ b/src/sage/groups/conjugacy_classes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Conjugacy classes of groups diff --git a/src/sage/groups/cubic_braid.py b/src/sage/groups/cubic_braid.py index 36fccfebbc3..9dd59e069f9 100644 --- a/src/sage/groups/cubic_braid.py +++ b/src/sage/groups/cubic_braid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Cubic Braid Groups diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index d1152a17740..3388c41d954 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups """ Finitely Presented Groups diff --git a/src/sage/groups/finitely_presented_catalog.py b/src/sage/groups/finitely_presented_catalog.py index a21d3e582cb..512e851628b 100644 --- a/src/sage/groups/finitely_presented_catalog.py +++ b/src/sage/groups/finitely_presented_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups """ Type ``groups.presentation.`` to access examples of groups implemented as finite presentations (quotients of diff --git a/src/sage/groups/finitely_presented_named.py b/src/sage/groups/finitely_presented_named.py index 262d205ccf4..d800bf014d0 100644 --- a/src/sage/groups/finitely_presented_named.py +++ b/src/sage/groups/finitely_presented_named.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Named Finitely Presented Groups diff --git a/src/sage/groups/fqf_orthogonal.py b/src/sage/groups/fqf_orthogonal.py index fd14f5142cf..8c996ad3c6a 100644 --- a/src/sage/groups/fqf_orthogonal.py +++ b/src/sage/groups/fqf_orthogonal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Orthogonal Groups of Torsion Quadratic Forms diff --git a/src/sage/groups/free_group.py b/src/sage/groups/free_group.py index 2639df59f55..471940f6b95 100644 --- a/src/sage/groups/free_group.py +++ b/src/sage/groups/free_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups """ Free Groups diff --git a/src/sage/groups/galois_group.py b/src/sage/groups/galois_group.py index d7d479305fa..a7439d18ab3 100644 --- a/src/sage/groups/galois_group.py +++ b/src/sage/groups/galois_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Galois groups of field extensions. diff --git a/src/sage/groups/galois_group_perm.py b/src/sage/groups/galois_group_perm.py index 0c348e603a8..7a640bcfe29 100644 --- a/src/sage/groups/galois_group_perm.py +++ b/src/sage/groups/galois_group_perm.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Galois groups of field extensions as permutation groups """ diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py index bf710fb566b..cb406b444af 100644 --- a/src/sage/groups/generic.py +++ b/src/sage/groups/generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Miscellaneous generic functions diff --git a/src/sage/groups/group.pxd b/src/sage/groups/group.pxd index 771408df9ab..8a38ba4b583 100644 --- a/src/sage/groups/group.pxd +++ b/src/sage/groups/group.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.parent cimport Parent cdef class Group(Parent): diff --git a/src/sage/groups/group.pyx b/src/sage/groups/group.pyx index d26829cc694..9ecbfde9d6f 100644 --- a/src/sage/groups/group.pyx +++ b/src/sage/groups/group.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Base class for groups """ diff --git a/src/sage/groups/group_exp.py b/src/sage/groups/group_exp.py index fe3567e5801..ffae5e73cb2 100644 --- a/src/sage/groups/group_exp.py +++ b/src/sage/groups/group_exp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Functor that converts a commutative additive group into a multiplicative group. diff --git a/src/sage/groups/group_semidirect_product.py b/src/sage/groups/group_semidirect_product.py index e5e7077f271..1805dbbc53a 100644 --- a/src/sage/groups/group_semidirect_product.py +++ b/src/sage/groups/group_semidirect_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Semidirect product of groups diff --git a/src/sage/groups/groups_catalog.py b/src/sage/groups/groups_catalog.py index d2c87813273..a95ffaefb4a 100644 --- a/src/sage/groups/groups_catalog.py +++ b/src/sage/groups/groups_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Examples of Groups diff --git a/src/sage/groups/indexed_free_group.py b/src/sage/groups/indexed_free_group.py index a2735e7ea6b..79be1df663d 100644 --- a/src/sage/groups/indexed_free_group.py +++ b/src/sage/groups/indexed_free_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.combinat """ Indexed Free Groups diff --git a/src/sage/groups/kernel_subgroup.py b/src/sage/groups/kernel_subgroup.py index bcbca50b37f..dec7a0be573 100644 --- a/src/sage/groups/kernel_subgroup.py +++ b/src/sage/groups/kernel_subgroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Kernel Subgroups diff --git a/src/sage/groups/libgap_group.py b/src/sage/groups/libgap_group.py index 3a181ff46ba..09889de4af5 100644 --- a/src/sage/groups/libgap_group.py +++ b/src/sage/groups/libgap_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Generic LibGAP-based Group diff --git a/src/sage/groups/libgap_mixin.py b/src/sage/groups/libgap_mixin.py index 7da19cf8ada..50f8fdf2678 100644 --- a/src/sage/groups/libgap_mixin.py +++ b/src/sage/groups/libgap_mixin.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.modules """ Mix-in Class for GAP-based Groups diff --git a/src/sage/groups/libgap_morphism.py b/src/sage/groups/libgap_morphism.py index 1b7a6d953ec..daac871629b 100644 --- a/src/sage/groups/libgap_morphism.py +++ b/src/sage/groups/libgap_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Group homomorphisms for groups with a GAP backend diff --git a/src/sage/groups/libgap_wrapper.pxd b/src/sage/groups/libgap_wrapper.pxd index 42214521586..0c43b098140 100644 --- a/src/sage/groups/libgap_wrapper.pxd +++ b/src/sage/groups/libgap_wrapper.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.structure.element cimport MultiplicativeGroupElement from sage.libs.gap.element cimport GapElement diff --git a/src/sage/groups/libgap_wrapper.pyx b/src/sage/groups/libgap_wrapper.pyx index 8e4c7ba883c..3d27ec44ea0 100644 --- a/src/sage/groups/libgap_wrapper.pyx +++ b/src/sage/groups/libgap_wrapper.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ LibGAP-based Groups diff --git a/src/sage/groups/lie_gps/all.py b/src/sage/groups/lie_gps/all.py index 11f290a2a34..e69de29bb2d 100644 --- a/src/sage/groups/lie_gps/all.py +++ b/src/sage/groups/lie_gps/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-groups diff --git a/src/sage/groups/lie_gps/catalog.py b/src/sage/groups/lie_gps/catalog.py index 976df6bc1ac..1b35d31d6b7 100644 --- a/src/sage/groups/lie_gps/catalog.py +++ b/src/sage/groups/lie_gps/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Type ``groups.lie.`` to access examples of Lie groups. """ diff --git a/src/sage/groups/lie_gps/nilpotent_lie_group.py b/src/sage/groups/lie_gps/nilpotent_lie_group.py index 9ee3d58da1a..1164f28e056 100644 --- a/src/sage/groups/lie_gps/nilpotent_lie_group.py +++ b/src/sage/groups/lie_gps/nilpotent_lie_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Nilpotent Lie groups diff --git a/src/sage/groups/matrix_gps/all.py b/src/sage/groups/matrix_gps/all.py index 503b377f675..c6360cd6a03 100644 --- a/src/sage/groups/matrix_gps/all.py +++ b/src/sage/groups/matrix_gps/all.py @@ -1,5 +1,13 @@ -# sage_setup: distribution = sagemath-modules +from sage.misc.lazy_import import lazy_import -from sage.groups.matrix_gps.all__sagemath_modules import * +lazy_import('sage.groups.matrix_gps.linear', 'GL') +lazy_import('sage.groups.matrix_gps.linear', 'SL') +lazy_import('sage.groups.matrix_gps.symplectic', 'Sp') +lazy_import('sage.groups.matrix_gps.unitary', 'SU') +lazy_import('sage.groups.matrix_gps.unitary', 'GU') +lazy_import('sage.groups.matrix_gps.orthogonal', 'GO') +lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') +lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') +lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') import sage.groups.matrix_gps.pickling_overrides diff --git a/src/sage/groups/matrix_gps/all__sagemath_gap.py b/src/sage/groups/matrix_gps/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/matrix_gps/all__sagemath_modules.py b/src/sage/groups/matrix_gps/all__sagemath_modules.py deleted file mode 100644 index e8ff9cf4fa6..00000000000 --- a/src/sage/groups/matrix_gps/all__sagemath_modules.py +++ /dev/null @@ -1,12 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.groups.matrix_gps.linear', 'GL') -lazy_import('sage.groups.matrix_gps.linear', 'SL') -lazy_import('sage.groups.matrix_gps.symplectic', 'Sp') -lazy_import('sage.groups.matrix_gps.unitary', 'SU') -lazy_import('sage.groups.matrix_gps.unitary', 'GU') -lazy_import('sage.groups.matrix_gps.orthogonal', 'GO') -lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') -lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') -lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') -del lazy_import diff --git a/src/sage/groups/matrix_gps/binary_dihedral.py b/src/sage/groups/matrix_gps/binary_dihedral.py index bf2a1b69342..ccce9eeb17b 100644 --- a/src/sage/groups/matrix_gps/binary_dihedral.py +++ b/src/sage/groups/matrix_gps/binary_dihedral.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.libs.gap sage.modules sage.rings.number_field """ Binary Dihedral Groups diff --git a/src/sage/groups/matrix_gps/catalog.py b/src/sage/groups/matrix_gps/catalog.py index 2419053f843..a9687740649 100644 --- a/src/sage/groups/matrix_gps/catalog.py +++ b/src/sage/groups/matrix_gps/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Library of Interesting Groups diff --git a/src/sage/groups/matrix_gps/coxeter_group.py b/src/sage/groups/matrix_gps/coxeter_group.py index 99aefbddf97..b6a9e211ff0 100644 --- a/src/sage/groups/matrix_gps/coxeter_group.py +++ b/src/sage/groups/matrix_gps/coxeter_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs """ Coxeter Groups As Matrix Groups diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py index e621ea4e82d..6d487e5d123 100644 --- a/src/sage/groups/matrix_gps/finitely_generated.py +++ b/src/sage/groups/matrix_gps/finitely_generated.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Finitely Generated Matrix Groups diff --git a/src/sage/groups/matrix_gps/finitely_generated_gap.py b/src/sage/groups/matrix_gps/finitely_generated_gap.py index 11cc0a45b42..14bf551789f 100644 --- a/src/sage/groups/matrix_gps/finitely_generated_gap.py +++ b/src/sage/groups/matrix_gps/finitely_generated_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Finitely Generated Matrix Groups with GAP """ diff --git a/src/sage/groups/matrix_gps/group_element.pxd b/src/sage/groups/matrix_gps/group_element.pxd index fadcded4ef9..36a5a9fc4ce 100644 --- a/src/sage/groups/matrix_gps/group_element.pxd +++ b/src/sage/groups/matrix_gps/group_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport MultiplicativeGroupElement, Element, MonoidElement, Matrix cpdef is_MatrixGroupElement(x) diff --git a/src/sage/groups/matrix_gps/group_element.pyx b/src/sage/groups/matrix_gps/group_element.pyx index c123d0d1820..38bf1f03279 100644 --- a/src/sage/groups/matrix_gps/group_element.pyx +++ b/src/sage/groups/matrix_gps/group_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Matrix Group Elements diff --git a/src/sage/groups/matrix_gps/group_element_gap.pxd b/src/sage/groups/matrix_gps/group_element_gap.pxd index 2c99c0d4e9a..e0ecbefea5c 100644 --- a/src/sage/groups/matrix_gps/group_element_gap.pxd +++ b/src/sage/groups/matrix_gps/group_element_gap.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.groups.libgap_wrapper cimport ElementLibGAP cdef class MatrixGroupElement_gap(ElementLibGAP): diff --git a/src/sage/groups/matrix_gps/group_element_gap.pyx b/src/sage/groups/matrix_gps/group_element_gap.pyx index 9e5e2922590..b07c0f01a44 100644 --- a/src/sage/groups/matrix_gps/group_element_gap.pyx +++ b/src/sage/groups/matrix_gps/group_element_gap.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Matrix group elements implemented in GAP """ diff --git a/src/sage/groups/matrix_gps/heisenberg.py b/src/sage/groups/matrix_gps/heisenberg.py index 21ab7db9d45..8a262ddf1c7 100644 --- a/src/sage/groups/matrix_gps/heisenberg.py +++ b/src/sage/groups/matrix_gps/heisenberg.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.libs.gap sage.modules """ Heisenberg Group diff --git a/src/sage/groups/matrix_gps/isometries.py b/src/sage/groups/matrix_gps/isometries.py index b351f5533b2..424e5a0edf0 100644 --- a/src/sage/groups/matrix_gps/isometries.py +++ b/src/sage/groups/matrix_gps/isometries.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Groups of isometries diff --git a/src/sage/groups/matrix_gps/linear.py b/src/sage/groups/matrix_gps/linear.py index 1fa9dca7984..ef2bf1aa0be 100644 --- a/src/sage/groups/matrix_gps/linear.py +++ b/src/sage/groups/matrix_gps/linear.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Linear Groups diff --git a/src/sage/groups/matrix_gps/linear_gap.py b/src/sage/groups/matrix_gps/linear_gap.py index 62d84711f6f..f5c16f1c9fe 100644 --- a/src/sage/groups/matrix_gps/linear_gap.py +++ b/src/sage/groups/matrix_gps/linear_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Linear Groups with GAP """ diff --git a/src/sage/groups/matrix_gps/matrix_group.py b/src/sage/groups/matrix_gps/matrix_group.py index 10bf5786f0e..2b87493fbc5 100644 --- a/src/sage/groups/matrix_gps/matrix_group.py +++ b/src/sage/groups/matrix_gps/matrix_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Base classes for Matrix Groups diff --git a/src/sage/groups/matrix_gps/matrix_group_gap.py b/src/sage/groups/matrix_gps/matrix_group_gap.py index 29c40bb22be..84fd3d74996 100644 --- a/src/sage/groups/matrix_gps/matrix_group_gap.py +++ b/src/sage/groups/matrix_gps/matrix_group_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Matrix group over a ring that GAP understands """ diff --git a/src/sage/groups/matrix_gps/named_group.py b/src/sage/groups/matrix_gps/named_group.py index 59766f21cfa..90c01e232e7 100644 --- a/src/sage/groups/matrix_gps/named_group.py +++ b/src/sage/groups/matrix_gps/named_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Base for Classical Matrix Groups diff --git a/src/sage/groups/matrix_gps/named_group_gap.py b/src/sage/groups/matrix_gps/named_group_gap.py index 3e4f0131a54..b8b1f54722c 100644 --- a/src/sage/groups/matrix_gps/named_group_gap.py +++ b/src/sage/groups/matrix_gps/named_group_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Base for Classical Matrix Groups with GAP """ diff --git a/src/sage/groups/matrix_gps/orthogonal.py b/src/sage/groups/matrix_gps/orthogonal.py index d38ed37bd1a..3ce9915dfec 100644 --- a/src/sage/groups/matrix_gps/orthogonal.py +++ b/src/sage/groups/matrix_gps/orthogonal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Orthogonal Linear Groups diff --git a/src/sage/groups/matrix_gps/orthogonal_gap.py b/src/sage/groups/matrix_gps/orthogonal_gap.py index b06ac22dd31..39947bda211 100644 --- a/src/sage/groups/matrix_gps/orthogonal_gap.py +++ b/src/sage/groups/matrix_gps/orthogonal_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Orthogonal Linear Groups with GAP """ diff --git a/src/sage/groups/matrix_gps/symplectic.py b/src/sage/groups/matrix_gps/symplectic.py index 0476eb4b8f6..0e378b4d153 100644 --- a/src/sage/groups/matrix_gps/symplectic.py +++ b/src/sage/groups/matrix_gps/symplectic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Symplectic Linear Groups diff --git a/src/sage/groups/matrix_gps/symplectic_gap.py b/src/sage/groups/matrix_gps/symplectic_gap.py index a30ed541a78..d348ed9f40f 100644 --- a/src/sage/groups/matrix_gps/symplectic_gap.py +++ b/src/sage/groups/matrix_gps/symplectic_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Symplectic Linear Groups with GAP """ diff --git a/src/sage/groups/matrix_gps/unitary.py b/src/sage/groups/matrix_gps/unitary.py index 0c18107a260..43ac69c3983 100644 --- a/src/sage/groups/matrix_gps/unitary.py +++ b/src/sage/groups/matrix_gps/unitary.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Unitary Groups `GU(n,q)` and `SU(n,q)` diff --git a/src/sage/groups/matrix_gps/unitary_gap.py b/src/sage/groups/matrix_gps/unitary_gap.py index ce715e34903..ac2de20f96b 100644 --- a/src/sage/groups/matrix_gps/unitary_gap.py +++ b/src/sage/groups/matrix_gps/unitary_gap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.rings.finite_rings r""" Unitary Groups `GU(n,q)` and `SU(n,q)` with GAP diff --git a/src/sage/groups/misc_gps/all.py b/src/sage/groups/misc_gps/all.py index 11f290a2a34..e69de29bb2d 100644 --- a/src/sage/groups/misc_gps/all.py +++ b/src/sage/groups/misc_gps/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-groups diff --git a/src/sage/groups/misc_gps/argument_groups.py b/src/sage/groups/misc_gps/argument_groups.py index cc533de027c..1c949a57f51 100644 --- a/src/sage/groups/misc_gps/argument_groups.py +++ b/src/sage/groups/misc_gps/argument_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Groups of elements representing (complex) arguments. diff --git a/src/sage/groups/misc_gps/imaginary_groups.py b/src/sage/groups/misc_gps/imaginary_groups.py index e197273ec6c..41fe79f9959 100644 --- a/src/sage/groups/misc_gps/imaginary_groups.py +++ b/src/sage/groups/misc_gps/imaginary_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Groups of imaginary elements diff --git a/src/sage/groups/misc_gps/misc_groups.py b/src/sage/groups/misc_gps/misc_groups.py index 7b695bb6fab..fb6bcb30fb7 100644 --- a/src/sage/groups/misc_gps/misc_groups.py +++ b/src/sage/groups/misc_gps/misc_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Miscellaneous Groups diff --git a/src/sage/groups/misc_gps/misc_groups_catalog.py b/src/sage/groups/misc_gps/misc_groups_catalog.py index 2eb44762f04..5396677d0b1 100644 --- a/src/sage/groups/misc_gps/misc_groups_catalog.py +++ b/src/sage/groups/misc_gps/misc_groups_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups r""" Type ``groups.misc.`` to access examples of various groups not listed elsewhere. diff --git a/src/sage/groups/old.pxd b/src/sage/groups/old.pxd index 87b029a4992..3409c5b1764 100644 --- a/src/sage/groups/old.pxd +++ b/src/sage/groups/old.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cimport sage.structure.parent_gens cdef class Group(sage.structure.parent.Parent): diff --git a/src/sage/groups/old.pyx b/src/sage/groups/old.pyx index a625dbcfb07..1833b4a2b74 100644 --- a/src/sage/groups/old.pyx +++ b/src/sage/groups/old.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Deprecated base class for groups """ diff --git a/src/sage/groups/pari_group.py b/src/sage/groups/pari_group.py index ca7f41ff5b3..62dc75cb821 100644 --- a/src/sage/groups/pari_group.py +++ b/src/sage/groups/pari_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari r""" PARI Groups diff --git a/src/sage/groups/perm_gps/all.py b/src/sage/groups/perm_gps/all.py index 56571fafe06..ae405f298a2 100644 --- a/src/sage/groups/perm_gps/all.py +++ b/src/sage/groups/perm_gps/all.py @@ -1,22 +1,20 @@ -# sage_setup: distribution = sagemath-gap +from .permgroup_named import (SymmetricGroup, AlternatingGroup, + DihedralGroup, SplitMetacyclicGroup, + SemidihedralGroup, CyclicPermutationGroup, + DiCyclicGroup, TransitiveGroup, + PGL, PSL, PSp, PSU, PGU, + MathieuGroup, KleinFourGroup, QuaternionGroup, + PrimitiveGroup, PrimitiveGroups, + SuzukiGroup, TransitiveGroups, + GeneralDihedralGroup, SmallPermutationGroup) -from sage.groups.perm_gps.permgroup_named import (SymmetricGroup, AlternatingGroup, - DihedralGroup, SplitMetacyclicGroup, - SemidihedralGroup, CyclicPermutationGroup, - DiCyclicGroup, TransitiveGroup, - PGL, PSL, PSp, PSU, PGU, - MathieuGroup, KleinFourGroup, QuaternionGroup, - PrimitiveGroup, PrimitiveGroups, - SuzukiGroup, TransitiveGroups, - GeneralDihedralGroup, SmallPermutationGroup) +from .permgroup import PermutationGroup, PermutationGroup_generic, PermutationGroup_subgroup, direct_product_permgroups -from sage.groups.perm_gps.permgroup import PermutationGroup, PermutationGroup_generic, PermutationGroup_subgroup, direct_product_permgroups +from .constructor import PermutationGroupElement -from sage.groups.perm_gps.constructor import PermutationGroupElement - -from sage.groups.perm_gps.permgroup_morphism import (PermutationGroupMorphism as PermutationGroupMap, - PermutationGroupMorphism_im_gens, - PermutationGroupMorphism_id) +from .permgroup_morphism import (PermutationGroupMorphism as PermutationGroupMap, + PermutationGroupMorphism_im_gens, + PermutationGroupMorphism_id) PermutationGroupMorphism = PermutationGroupMorphism_im_gens -from sage.groups.perm_gps.cubegroup import CubeGroup, RubiksCube +from .cubegroup import CubeGroup, RubiksCube diff --git a/src/sage/groups/perm_gps/all__sagemath_categories.py b/src/sage/groups/perm_gps/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/all__sagemath_graphs.py b/src/sage/groups/perm_gps/all__sagemath_graphs.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/all__sagemath_modules.py b/src/sage/groups/perm_gps/all__sagemath_modules.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/constructor.py b/src/sage/groups/perm_gps/constructor.py index 2061c514436..5a130eb19be 100644 --- a/src/sage/groups/perm_gps/constructor.py +++ b/src/sage/groups/perm_gps/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Constructor for permutations diff --git a/src/sage/groups/perm_gps/cubegroup.py b/src/sage/groups/perm_gps/cubegroup.py index ebd667a7d2a..5a802bb4f48 100644 --- a/src/sage/groups/perm_gps/cubegroup.py +++ b/src/sage/groups/perm_gps/cubegroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Rubik's cube group functions diff --git a/src/sage/groups/perm_gps/partn_ref/all.py b/src/sage/groups/perm_gps/partn_ref/all.py index b230a6a2ad9..e69de29bb2d 100644 --- a/src/sage/groups/perm_gps/partn_ref/all.py +++ b/src/sage/groups/perm_gps/partn_ref/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-categories diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd index 62c9b138371..52f75a3df9c 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx index 15838965934..803f2533b7d 100644 --- a/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +++ b/src/sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups r""" Automorphism groups and canonical labels diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd index 70ff0198384..49e2f3cdbde 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Declaration file for canonical augmentation diff --git a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx index 95faace2536..6143e509caa 100644 --- a/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +++ b/src/sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Canonical augmentation diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd index 0589ad87d07..f53184bd082 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pyx b/src/sage/groups/perm_gps/partn_ref/data_structures.pyx index 089ed979891..cb25f23a4d3 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pyx +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Data structures diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pxd b/src/sage/groups/perm_gps/partn_ref/double_coset.pxd index a0c86f1bcb5..6c5d9e0f279 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pxd +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx index 58b8c73381b..73631b395c4 100644 --- a/src/sage/groups/perm_gps/partn_ref/double_coset.pyx +++ b/src/sage/groups/perm_gps/partn_ref/double_coset.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.groups r""" Double cosets diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd index dbcaa574b8e..4af69f4b5f5 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx index 3590d950164..6a3c07ac75d 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_binary.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules sage.rings.finite_rings """ Partition backtrack functions for binary codes diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd index 3dbbb6f8c5a..464ddde015d 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx index f5042c7bf58..1b588487d1c 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_graphs.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Graph-theoretic partition backtrack functions diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd index d8462ad64af..e7b6cf42f6d 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # Copyright (C) 2009 Nicolas Borie diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx index 7959f355a02..00365bcbd3c 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_lists.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Partition backtrack functions for lists -- a simple example of using partn_ref diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd index 15a8c8a045b..2cf087e9915 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx index 616b45e6dba..c8d4f86a8f1 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_matrices.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Partition backtrack functions for matrices diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd index 96e68132042..9f46107a1c1 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2006 - 2011 Robert L. Miller # diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx index cef8a50bc58..23d5e7576c7 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_python.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Python interface to partition backtrack functions diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd index 452dbd8a772..94bcbe5bf95 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Declaration file for simple set datastructures diff --git a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx index 232e4745c4c..6ccc0b28c45 100644 --- a/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx +++ b/src/sage/groups/perm_gps/partn_ref/refinement_sets.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Partition backtrack functions for sets diff --git a/src/sage/groups/perm_gps/partn_ref2/all.py b/src/sage/groups/perm_gps/partn_ref2/all.py index dd59a6da735..e69de29bb2d 100644 --- a/src/sage/groups/perm_gps/partn_ref2/all.py +++ b/src/sage/groups/perm_gps/partn_ref2/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-gap diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pxd b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pxd index bef4ff59121..9ba66caff70 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pxd +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap #******************************************************************************* # Copyright (C) 2012 Thomas Feulner # diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx index b229fb8852d..261d1987897 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Automorphism groups and canonical labels. diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index 4b33600db9f..f001126ed84 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Permutation groups diff --git a/src/sage/groups/perm_gps/permgroup_element.pxd b/src/sage/groups/perm_gps/permgroup_element.pxd index 81f767526b1..21b509f06d1 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pxd +++ b/src/sage/groups/perm_gps/permgroup_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.structure.element cimport MultiplicativeGroupElement, MonoidElement, Element from sage.structure.list_clone cimport ClonableIntArray from sage.rings.polynomial.polydict cimport ETuple diff --git a/src/sage/groups/perm_gps/permgroup_element.pyx b/src/sage/groups/perm_gps/permgroup_element.pyx index 00851d078c1..0d80d04a8af 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pyx +++ b/src/sage/groups/perm_gps/permgroup_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Permutation group elements diff --git a/src/sage/groups/perm_gps/permgroup_morphism.py b/src/sage/groups/perm_gps/permgroup_morphism.py index a5a69f12d68..206828b4e1a 100644 --- a/src/sage/groups/perm_gps/permgroup_morphism.py +++ b/src/sage/groups/perm_gps/permgroup_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Permutation group homomorphisms diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index 0840a1224f1..69014066364 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" "Named" Permutation groups (such as the symmetric group, S_n) diff --git a/src/sage/groups/perm_gps/permutation_groups_catalog.py b/src/sage/groups/perm_gps/permutation_groups_catalog.py index e91742a3e11..52f99920307 100644 --- a/src/sage/groups/perm_gps/permutation_groups_catalog.py +++ b/src/sage/groups/perm_gps/permutation_groups_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Catalog of permutation groups diff --git a/src/sage/groups/perm_gps/symgp_conjugacy_class.py b/src/sage/groups/perm_gps/symgp_conjugacy_class.py index 8a2a75b8f97..23f5cdab15c 100644 --- a/src/sage/groups/perm_gps/symgp_conjugacy_class.py +++ b/src/sage/groups/perm_gps/symgp_conjugacy_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Conjugacy Classes Of The Symmetric Group diff --git a/src/sage/groups/raag.py b/src/sage/groups/raag.py index 342f2a21d7d..22c44cb2312 100644 --- a/src/sage/groups/raag.py +++ b/src/sage/groups/raag.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups # sage.doctest: needs sage.graphs sage.rings.number_field r""" Right-Angled Artin Groups diff --git a/src/sage/groups/semimonomial_transformations/all.py b/src/sage/groups/semimonomial_transformations/all.py index 11f290a2a34..e69de29bb2d 100644 --- a/src/sage/groups/semimonomial_transformations/all.py +++ b/src/sage/groups/semimonomial_transformations/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-groups diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pxd b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pxd index 178bd872df8..bd4f62d497f 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pxd +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups from sage.structure.element cimport Element, MonoidElement, MultiplicativeGroupElement cdef class SemimonomialTransformation(MultiplicativeGroupElement): diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx index 460b7f566b3..baaefa1950e 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups # sage.doctest: needs sage.rings.finite_rings r""" Elements of a semimonomial transformation group diff --git a/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py b/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py index 8b91afca6cc..e61c7bf64c7 100644 --- a/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py +++ b/src/sage/groups/semimonomial_transformations/semimonomial_transformation_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-groups # sage.doctest: needs sage.rings.finite_rings r""" Semimonomial transformation group diff --git a/src/sage/homology/algebraic_topological_model.py b/src/sage/homology/algebraic_topological_model.py index caab0e0e6a7..c7856836f28 100644 --- a/src/sage/homology/algebraic_topological_model.py +++ b/src/sage/homology/algebraic_topological_model.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs r""" Algebraic topological model for a cell complex diff --git a/src/sage/homology/all.py b/src/sage/homology/all.py index 4be53743f0a..d9306c19daa 100644 --- a/src/sage/homology/all.py +++ b/src/sage/homology/all.py @@ -1,3 +1,6 @@ -# sage_setup: distribution = sagemath-modules +from .chain_complex import ChainComplex -from sage.homology.all__sagemath_modules import * +from .chain_complex_morphism import ChainComplexMorphism + +from sage.misc.lazy_import import lazy_import +lazy_import('sage.homology.koszul_complex', 'KoszulComplex') diff --git a/src/sage/homology/all__sagemath_modules.py b/src/sage/homology/all__sagemath_modules.py deleted file mode 100644 index 5ebb7604432..00000000000 --- a/src/sage/homology/all__sagemath_modules.py +++ /dev/null @@ -1,7 +0,0 @@ -from sage.homology.chain_complex import ChainComplex - -from sage.homology.chain_complex_morphism import ChainComplexMorphism - -from sage.misc.lazy_import import lazy_import -lazy_import('sage.homology.koszul_complex', 'KoszulComplex') -del lazy_import diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index c01151ee7ed..0d692df4709 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- r""" Chain complexes diff --git a/src/sage/homology/chain_complex_homspace.py b/src/sage/homology/chain_complex_homspace.py index eb550837a41..ad7a6bf9b84 100644 --- a/src/sage/homology/chain_complex_homspace.py +++ b/src/sage/homology/chain_complex_homspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs (because all doctests use SimplicialComplex) r""" Homspaces between chain complexes diff --git a/src/sage/homology/chain_complex_morphism.py b/src/sage/homology/chain_complex_morphism.py index 0e6264c1b09..afefe44eb79 100644 --- a/src/sage/homology/chain_complex_morphism.py +++ b/src/sage/homology/chain_complex_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Morphisms of chain complexes diff --git a/src/sage/homology/chain_homotopy.py b/src/sage/homology/chain_homotopy.py index 8d5a1dd6351..91ae14eda11 100644 --- a/src/sage/homology/chain_homotopy.py +++ b/src/sage/homology/chain_homotopy.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- r""" Chain homotopies and chain contractions diff --git a/src/sage/homology/chains.py b/src/sage/homology/chains.py index 1bddf164ba4..b9a54940943 100644 --- a/src/sage/homology/chains.py +++ b/src/sage/homology/chains.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs (because all doctests use the catalogs simplicial_complexes, cubical_complexes) r""" Chains and cochains diff --git a/src/sage/homology/free_resolution.py b/src/sage/homology/free_resolution.py index 887713fb541..29c33e4e2a6 100644 --- a/src/sage/homology/free_resolution.py +++ b/src/sage/homology/free_resolution.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.singular r""" Free resolutions diff --git a/src/sage/homology/graded_resolution.py b/src/sage/homology/graded_resolution.py index 7a46eb963d8..ceadd15c2de 100644 --- a/src/sage/homology/graded_resolution.py +++ b/src/sage/homology/graded_resolution.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.singular r""" Graded free resolutions diff --git a/src/sage/homology/hochschild_complex.py b/src/sage/homology/hochschild_complex.py index 0845517bcd6..ea42164ef9d 100644 --- a/src/sage/homology/hochschild_complex.py +++ b/src/sage/homology/hochschild_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat (because all doctests use FreeAlgebra, SymmetricGroupAlgebra, etc.) """ Hochschild Complexes diff --git a/src/sage/homology/homology_group.py b/src/sage/homology/homology_group.py index 12e07b61c07..8d86d477ad8 100644 --- a/src/sage/homology/homology_group.py +++ b/src/sage/homology/homology_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Homology Groups diff --git a/src/sage/homology/homology_morphism.py b/src/sage/homology/homology_morphism.py index 06eba661b3c..1b4a69c2e7e 100644 --- a/src/sage/homology/homology_morphism.py +++ b/src/sage/homology/homology_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs (because all doctests use the catalog simplicial_complexes) r""" Induced morphisms on homology diff --git a/src/sage/homology/homology_vector_space_with_basis.py b/src/sage/homology/homology_vector_space_with_basis.py index cc945e528ed..ace9775d56b 100644 --- a/src/sage/homology/homology_vector_space_with_basis.py +++ b/src/sage/homology/homology_vector_space_with_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.graphs (because all doctests use the catalogs simplicial_complexes, cubical_complexes) """ diff --git a/src/sage/homology/koszul_complex.py b/src/sage/homology/koszul_complex.py index 5d0716e9772..22a1ceb5d80 100644 --- a/src/sage/homology/koszul_complex.py +++ b/src/sage/homology/koszul_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Koszul Complexes """ diff --git a/src/sage/homology/matrix_utils.py b/src/sage/homology/matrix_utils.py index 50a9ff6dba3..4f10ae415a3 100644 --- a/src/sage/homology/matrix_utils.py +++ b/src/sage/homology/matrix_utils.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Utility Functions for Matrices diff --git a/src/sage/interacts/all.py b/src/sage/interacts/all.py index 87d00072798..c53a1e11ecf 100644 --- a/src/sage/interacts/all.py +++ b/src/sage/interacts/all.py @@ -17,10 +17,9 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from sage.interacts import calculus -from sage.interacts import geometry -from sage.interacts import statistics -from sage.interacts import fractals -from sage.interacts import algebra +from . import calculus +from . import geometry +from . import statistics +from . import fractals +from . import algebra lazy_import('sage.interacts.library', 'demo') -del lazy_import diff --git a/src/sage/interfaces/abc.py b/src/sage/interfaces/abc.py index e285fc0218b..9c451733631 100644 --- a/src/sage/interfaces/abc.py +++ b/src/sage/interfaces/abc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Abstract base classes for interface elements """ diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index 5bc6576d935..ed71b662362 100644 --- a/src/sage/interfaces/all.py +++ b/src/sage/interfaces/all.py @@ -1,16 +1,15 @@ -# sage_setup: distribution = sagemath-categories # interfaces to other interpreters -from sage.interfaces.sage0 import sage0, sage0_version, Sage -from sage.interfaces.gap import gap, gap_reset_workspace, Gap -from sage.interfaces.gp import gp, gp_version, Gp +from .sage0 import sage0, sage0_version, Sage +from .gap import gap, gap_reset_workspace, Gap +from .gp import gp, gp_version, Gp # import problems # from maxima_lib import maxima_lib -from sage.interfaces.maxima import maxima, Maxima -from sage.interfaces.singular import singular, singular_version, Singular +from .maxima import maxima, Maxima +from .singular import singular, singular_version, Singular -from sage.interfaces.magma import magma, Magma -from sage.interfaces.polymake import polymake +from .magma import magma, Magma +from .polymake import polymake from sage.misc.lazy_import import lazy_import @@ -49,4 +48,3 @@ 'kash', 'magma', 'macaulay2', 'maple', 'maxima', 'mathematica', 'mwrank', 'octave', 'r', 'singular', 'sage0', 'sage'] -del lazy_import diff --git a/src/sage/interfaces/all__sagemath_categories.py b/src/sage/interfaces/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/interfaces/all__sagemath_gap.py b/src/sage/interfaces/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/interfaces/all__sagemath_libecm.py b/src/sage/interfaces/all__sagemath_libecm.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/interfaces/all__sagemath_pari.py b/src/sage/interfaces/all__sagemath_pari.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/interfaces/all__sagemath_plot.py b/src/sage/interfaces/all__sagemath_plot.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/interfaces/all__sagemath_polyhedra.py b/src/sage/interfaces/all__sagemath_polyhedra.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/interfaces/all__sagemath_polyhedra.py +++ b/src/sage/interfaces/all__sagemath_polyhedra.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/interfaces/all__sagemath_symbolics.py b/src/sage/interfaces/all__sagemath_symbolics.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/interfaces/cleaner.py b/src/sage/interfaces/cleaner.py index 2d72be495e1..54bfac779ac 100644 --- a/src/sage/interfaces/cleaner.py +++ b/src/sage/interfaces/cleaner.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Interface to the Sage cleaner diff --git a/src/sage/interfaces/ecm.py b/src/sage/interfaces/ecm.py index 0dc08138b35..ae1379861f2 100644 --- a/src/sage/interfaces/ecm.py +++ b/src/sage/interfaces/ecm.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-libecm r""" The Elliptic Curve Factorization Method diff --git a/src/sage/interfaces/expect.py b/src/sage/interfaces/expect.py index e2e9b6687ba..340ada3f185 100644 --- a/src/sage/interfaces/expect.py +++ b/src/sage/interfaces/expect.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.gap sage.libs.pari sage.libs.singular sage.symbolic """ Common Interface Functionality through Pexpect diff --git a/src/sage/interfaces/four_ti_2.py b/src/sage/interfaces/four_ti_2.py index ff56f832365..42fa64d0155 100644 --- a/src/sage/interfaces/four_ti_2.py +++ b/src/sage/interfaces/four_ti_2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Interface to 4ti2 diff --git a/src/sage/interfaces/fricas.py b/src/sage/interfaces/fricas.py index 6b2036d2a64..87feb554d16 100644 --- a/src/sage/interfaces/fricas.py +++ b/src/sage/interfaces/fricas.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # sage.doctest: optional - fricas r""" Interface to FriCAS diff --git a/src/sage/interfaces/frobby.py b/src/sage/interfaces/frobby.py index 498a5a6da58..75e6da5b4d9 100644 --- a/src/sage/interfaces/frobby.py +++ b/src/sage/interfaces/frobby.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Interface to Frobby for fast computations on monomial ideals. diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py index d087f32293a..ee5861ac785 100644 --- a/src/sage/interfaces/gap.py +++ b/src/sage/interfaces/gap.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-gap +# -*- coding: utf-8 -*- r""" Interface to GAP diff --git a/src/sage/interfaces/gap3.py b/src/sage/interfaces/gap3.py index 310f5a965a7..de2a7fe4289 100644 --- a/src/sage/interfaces/gap3.py +++ b/src/sage/interfaces/gap3.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Interface to GAP3 diff --git a/src/sage/interfaces/gap_workspace.py b/src/sage/interfaces/gap_workspace.py index fdb4d87f577..70bb584fdef 100644 --- a/src/sage/interfaces/gap_workspace.py +++ b/src/sage/interfaces/gap_workspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Support for (lib)GAP workspace files """ diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index f2e3b7ab2e1..28d9d58473d 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Conductor and reduction types for genus 2 curves diff --git a/src/sage/interfaces/giac.py b/src/sage/interfaces/giac.py index 4dc0ac9660b..9c4a3b5e1c1 100644 --- a/src/sage/interfaces/giac.py +++ b/src/sage/interfaces/giac.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Pexpect Interface to Giac diff --git a/src/sage/interfaces/gnuplot.py b/src/sage/interfaces/gnuplot.py index b5e6c32d145..dc9b3f3e320 100644 --- a/src/sage/interfaces/gnuplot.py +++ b/src/sage/interfaces/gnuplot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Interface to the Gnuplot interpreter """ diff --git a/src/sage/interfaces/gp.py b/src/sage/interfaces/gp.py index 2b18888818e..2e6a20339be 100644 --- a/src/sage/interfaces/gp.py +++ b/src/sage/interfaces/gp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari r""" Interface to the GP calculator of PARI/GP diff --git a/src/sage/interfaces/interface.py b/src/sage/interfaces/interface.py index e49d5e19d3f..517c0c6fc7a 100644 --- a/src/sage/interfaces/interface.py +++ b/src/sage/interfaces/interface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.gap sage.libs.pari sage.libs.singular sage.symbolic r""" Common Interface Functionality diff --git a/src/sage/interfaces/jmoldata.py b/src/sage/interfaces/jmoldata.py index d0a1571fa3b..add4b453b3d 100644 --- a/src/sage/interfaces/jmoldata.py +++ b/src/sage/interfaces/jmoldata.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Interface for extracting data and generating images from Jmol readable files. diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py index c2a1f0dfb23..6923be55d53 100644 --- a/src/sage/interfaces/latte.py +++ b/src/sage/interfaces/latte.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Interface to LattE integrale programs """ diff --git a/src/sage/interfaces/magma.py b/src/sage/interfaces/magma.py index 9f0c2420571..48ed6deb722 100644 --- a/src/sage/interfaces/magma.py +++ b/src/sage/interfaces/magma.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to Magma diff --git a/src/sage/interfaces/magma_free.py b/src/sage/interfaces/magma_free.py index e31e12b7e4c..34d5b70f29a 100644 --- a/src/sage/interfaces/magma_free.py +++ b/src/sage/interfaces/magma_free.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics "Interface to the free online MAGMA calculator" # **************************************************************************** diff --git a/src/sage/interfaces/maple.py b/src/sage/interfaces/maple.py index 59a9713a704..92e7d7c9200 100644 --- a/src/sage/interfaces/maple.py +++ b/src/sage/interfaces/maple.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to Maple diff --git a/src/sage/interfaces/mathematica.py b/src/sage/interfaces/mathematica.py index 7797f34b4ef..99b531e80eb 100644 --- a/src/sage/interfaces/mathematica.py +++ b/src/sage/interfaces/mathematica.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to Mathematica diff --git a/src/sage/interfaces/mathics.py b/src/sage/interfaces/mathics.py index 48e222078f8..48328d1b083 100644 --- a/src/sage/interfaces/mathics.py +++ b/src/sage/interfaces/mathics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to Mathics diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py index e6b48c39b06..de0f6aad7fc 100644 --- a/src/sage/interfaces/maxima.py +++ b/src/sage/interfaces/maxima.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Pexpect interface to Maxima diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py index 539e8854403..767b5173823 100644 --- a/src/sage/interfaces/maxima_abstract.py +++ b/src/sage/interfaces/maxima_abstract.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Abstract interface to Maxima diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py index 13102783576..3efeed0bbee 100644 --- a/src/sage/interfaces/maxima_lib.py +++ b/src/sage/interfaces/maxima_lib.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Library interface to Maxima diff --git a/src/sage/interfaces/povray.py b/src/sage/interfaces/povray.py index bfc8d445f6f..b892cb112cd 100644 --- a/src/sage/interfaces/povray.py +++ b/src/sage/interfaces/povray.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" POV-Ray, The Persistence of Vision Ray Tracer """ diff --git a/src/sage/interfaces/process.pxd b/src/sage/interfaces/process.pxd index 99a14e6bb43..3f1ae3f0dc8 100644 --- a/src/sage/interfaces/process.pxd +++ b/src/sage/interfaces/process.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef class ContainChildren(): cdef int parentpid cdef int exitcode, exceptcode diff --git a/src/sage/interfaces/process.pyx b/src/sage/interfaces/process.pyx index e8cda516797..016de82a30f 100644 --- a/src/sage/interfaces/process.pyx +++ b/src/sage/interfaces/process.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Utilities for subprocess management """ diff --git a/src/sage/interfaces/qepcad.py b/src/sage/interfaces/qepcad.py index 732309f9c69..6aa5b008859 100644 --- a/src/sage/interfaces/qepcad.py +++ b/src/sage/interfaces/qepcad.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to QEPCAD =================== diff --git a/src/sage/interfaces/quit.py b/src/sage/interfaces/quit.py index d2757356784..d93cdf2730a 100644 --- a/src/sage/interfaces/quit.py +++ b/src/sage/interfaces/quit.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Quitting interfaces """ diff --git a/src/sage/interfaces/r.py b/src/sage/interfaces/r.py index 2d0b393ab0c..232d767c944 100644 --- a/src/sage/interfaces/r.py +++ b/src/sage/interfaces/r.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Interfaces to R diff --git a/src/sage/interfaces/sage0.py b/src/sage/interfaces/sage0.py index 8da8f5017e3..12aa8447eff 100644 --- a/src/sage/interfaces/sage0.py +++ b/src/sage/interfaces/sage0.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.all r""" Interface to Sage diff --git a/src/sage/interfaces/sagespawn.pyx b/src/sage/interfaces/sagespawn.pyx index 7db6da52348..f146fa01ddb 100644 --- a/src/sage/interfaces/sagespawn.pyx +++ b/src/sage/interfaces/sagespawn.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: optional - ptyprocess """ Sage wrapper around pexpect's ``spawn`` class and diff --git a/src/sage/interfaces/sympy.py b/src/sage/interfaces/sympy.py index c245a2c9da6..d291727ee0e 100644 --- a/src/sage/interfaces/sympy.py +++ b/src/sage/interfaces/sympy.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # sage.doctest: optional - sympy """ SymPy --> Sage conversion diff --git a/src/sage/interfaces/sympy_wrapper.py b/src/sage/interfaces/sympy_wrapper.py index 56f00a036c6..5ad6095a787 100644 --- a/src/sage/interfaces/sympy_wrapper.py +++ b/src/sage/interfaces/sympy_wrapper.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # sage.doctest: optional - sympy """ Wrapper Class for Sage Sets as SymPy Sets diff --git a/src/sage/interfaces/tab_completion.py b/src/sage/interfaces/tab_completion.py index 1cc27554350..ca106a67273 100644 --- a/src/sage/interfaces/tab_completion.py +++ b/src/sage/interfaces/tab_completion.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Mixin For Extra Tab Completions diff --git a/src/sage/interfaces/tachyon.py b/src/sage/interfaces/tachyon.py index 46b76d6a563..253253620bd 100644 --- a/src/sage/interfaces/tachyon.py +++ b/src/sage/interfaces/tachyon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" The Tachyon Ray Tracer diff --git a/src/sage/interfaces/tides.py b/src/sage/interfaces/tides.py index 2bf8218ed33..309046f30ac 100644 --- a/src/sage/interfaces/tides.py +++ b/src/sage/interfaces/tides.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to TIDES diff --git a/src/sage/knots/all.py b/src/sage/knots/all.py index 68945068849..d25acbda1a3 100644 --- a/src/sage/knots/all.py +++ b/src/sage/knots/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.misc.lazy_import import lazy_import from sage.features.databases import DatabaseKnotInfo diff --git a/src/sage/knots/gauss_code.py b/src/sage/knots/gauss_code.py index 2438808364d..0a631bdd0d5 100644 --- a/src/sage/knots/gauss_code.py +++ b/src/sage/knots/gauss_code.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- """ Helper functions related to Gauss codes of knots diff --git a/src/sage/knots/knot.py b/src/sage/knots/knot.py index 76119f6c593..10f0e241608 100644 --- a/src/sage/knots/knot.py +++ b/src/sage/knots/knot.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- r""" Knots diff --git a/src/sage/knots/knot_table.py b/src/sage/knots/knot_table.py index 85e1a156574..8defab899c4 100644 --- a/src/sage/knots/knot_table.py +++ b/src/sage/knots/knot_table.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Rolfsen database of knots with at most 10 crossings. diff --git a/src/sage/knots/knotinfo.py b/src/sage/knots/knotinfo.py index ea94af29ff2..d30fd678735 100644 --- a/src/sage/knots/knotinfo.py +++ b/src/sage/knots/knotinfo.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- r""" Access to the KnotInfo database diff --git a/src/sage/knots/link.py b/src/sage/knots/link.py index 9d988d877cf..7ddbe5879c3 100644 --- a/src/sage/knots/link.py +++ b/src/sage/knots/link.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs r""" Links diff --git a/src/sage/lfunctions/all.py b/src/sage/lfunctions/all.py index 80b30c2ec6e..9281f97ebbe 100644 --- a/src/sage/lfunctions/all.py +++ b/src/sage/lfunctions/all.py @@ -1,8 +1,6 @@ -from sage.misc.lazy_import import lazy_import +from sage.misc.lazy_import import lazy_import as _lazy_import_ -lazy_import("sage.lfunctions.dokchitser", "Dokchitser") -lazy_import("sage.lfunctions.sympow", "sympow") -lazy_import("sage.lfunctions.zero_sums", "LFunctionZeroSum") -lazy_import("sage.lfunctions.lcalc", "lcalc") - -del lazy_import +_lazy_import_("sage.lfunctions.dokchitser", "Dokchitser") +_lazy_import_("sage.lfunctions.sympow", "sympow") +_lazy_import_("sage.lfunctions.zero_sums", "LFunctionZeroSum") +_lazy_import_("sage.lfunctions.lcalc", "lcalc") diff --git a/src/sage/lfunctions/all__sagemath_lcalc.py b/src/sage/lfunctions/all__sagemath_lcalc.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/lfunctions/lcalc.py b/src/sage/lfunctions/lcalc.py index e8b4c728575..73246cdd81e 100644 --- a/src/sage/lfunctions/lcalc.py +++ b/src/sage/lfunctions/lcalc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-lcalc r""" Rubinstein's `L`-function calculator diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py index 770d59c02b5..732eb115584 100644 --- a/src/sage/lfunctions/pari.py +++ b/src/sage/lfunctions/pari.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ `L`-functions from PARI diff --git a/src/sage/libs/all.py b/src/sage/libs/all.py index 7c6e14767cf..f85115a4da2 100644 --- a/src/sage/libs/all.py +++ b/src/sage/libs/all.py @@ -1,11 +1,19 @@ -from sage.libs.all__sagemath_combinat import * -from sage.libs.all__sagemath_gap import * -from sage.libs.all__sagemath_flint import * -from sage.libs.all__sagemath_ntl import * -from sage.libs.all__sagemath_pari import * -from sage.libs.all__sagemath_eclib import * - -try: - from sage.libs.all__sagemath_symbolics import * -except ImportError: - pass + +import sage.libs.ntl.all as ntl + +from sage.libs.pari.all import pari, pari_gen, PariError + +import sage.libs.symmetrica.all as symmetrica + +from sage.misc.lazy_import import lazy_import +lazy_import('sage.libs.gap.libgap', 'libgap') + +lazy_import('sage.libs.eclib.constructor', 'CremonaModularSymbols') +lazy_import('sage.libs.eclib.interface', ['mwrank_EllipticCurve', 'mwrank_MordellWeil']) +lazy_import('sage.libs.eclib.mwrank', 'get_precision', 'mwrank_get_precision') +lazy_import('sage.libs.eclib.mwrank', 'set_precision', 'mwrank_set_precision') +lazy_import('sage.libs.eclib.mwrank', 'initprimes', 'mwrank_initprimes') + +lazy_import('sage.libs.flint.qsieve_sage', 'qsieve') + +lazy_import('sage.libs.giac.giac', 'libgiac') diff --git a/src/sage/libs/all__sagemath_brial.py b/src/sage/libs/all__sagemath_brial.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_combinat.py b/src/sage/libs/all__sagemath_combinat.py deleted file mode 100644 index 49fc95742c3..00000000000 --- a/src/sage/libs/all__sagemath_combinat.py +++ /dev/null @@ -1,5 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.libs.symmetrica', 'all', as_='symmetrica') - -del lazy_import diff --git a/src/sage/libs/all__sagemath_coxeter3.py b/src/sage/libs/all__sagemath_coxeter3.py index 61138b7bc1a..e69de29bb2d 100644 --- a/src/sage/libs/all__sagemath_coxeter3.py +++ b/src/sage/libs/all__sagemath_coxeter3.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-coxeter3 diff --git a/src/sage/libs/all__sagemath_eclib.py b/src/sage/libs/all__sagemath_eclib.py deleted file mode 100644 index 23d7839846c..00000000000 --- a/src/sage/libs/all__sagemath_eclib.py +++ /dev/null @@ -1,10 +0,0 @@ - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.libs.eclib.constructor', 'CremonaModularSymbols') -lazy_import('sage.libs.eclib.interface', ['mwrank_EllipticCurve', 'mwrank_MordellWeil']) -lazy_import('sage.libs.eclib.mwrank', 'get_precision', 'mwrank_get_precision') -lazy_import('sage.libs.eclib.mwrank', 'set_precision', 'mwrank_set_precision') -lazy_import('sage.libs.eclib.mwrank', 'initprimes', 'mwrank_initprimes') - -del lazy_import diff --git a/src/sage/libs/all__sagemath_flint.py b/src/sage/libs/all__sagemath_flint.py deleted file mode 100644 index b5e330d8329..00000000000 --- a/src/sage/libs/all__sagemath_flint.py +++ /dev/null @@ -1,16 +0,0 @@ - -try: - from sage.libs.all__sagemath_pari import * -except ImportError: - pass - -try: - from sage.libs.all__sagemath_ntl import * -except ImportError: - pass - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.libs.flint.qsieve_sage', 'qsieve') - -del lazy_import diff --git a/src/sage/libs/all__sagemath_gap.py b/src/sage/libs/all__sagemath_gap.py deleted file mode 100644 index e4b82d9deb5..00000000000 --- a/src/sage/libs/all__sagemath_gap.py +++ /dev/null @@ -1,3 +0,0 @@ -from sage.misc.lazy_import import lazy_import -lazy_import('sage.libs.gap.libgap', 'libgap') -del lazy_import diff --git a/src/sage/libs/all__sagemath_giac.py b/src/sage/libs/all__sagemath_giac.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_glpk.py b/src/sage/libs/all__sagemath_glpk.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_homfly.py b/src/sage/libs/all__sagemath_homfly.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_lcalc.py b/src/sage/libs/all__sagemath_lcalc.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_libbraiding.py b/src/sage/libs/all__sagemath_libbraiding.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_libecm.py b/src/sage/libs/all__sagemath_libecm.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_linbox.py b/src/sage/libs/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_meataxe.py b/src/sage/libs/all__sagemath_meataxe.py index fd1e327ee2f..e69de29bb2d 100644 --- a/src/sage/libs/all__sagemath_meataxe.py +++ b/src/sage/libs/all__sagemath_meataxe.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-meataxe diff --git a/src/sage/libs/all__sagemath_modules.py b/src/sage/libs/all__sagemath_modules.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_mpmath.py b/src/sage/libs/all__sagemath_mpmath.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_ntl.py b/src/sage/libs/all__sagemath_ntl.py deleted file mode 100644 index ad98922f701..00000000000 --- a/src/sage/libs/all__sagemath_ntl.py +++ /dev/null @@ -1,2 +0,0 @@ - -import sage.libs.ntl.all as ntl diff --git a/src/sage/libs/all__sagemath_objects.py b/src/sage/libs/all__sagemath_objects.py index 40da49fdd73..38e44245ad3 100644 --- a/src/sage/libs/all__sagemath_objects.py +++ b/src/sage/libs/all__sagemath_objects.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package diff --git a/src/sage/libs/all__sagemath_pari.py b/src/sage/libs/all__sagemath_pari.py deleted file mode 100644 index 3babb25ee71..00000000000 --- a/src/sage/libs/all__sagemath_pari.py +++ /dev/null @@ -1 +0,0 @@ -from sage.libs.pari.all import pari, pari_gen, PariError diff --git a/src/sage/libs/all__sagemath_singular.py b/src/sage/libs/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/all__sagemath_sirocco.py b/src/sage/libs/all__sagemath_sirocco.py index 44db2511e89..e69de29bb2d 100644 --- a/src/sage/libs/all__sagemath_sirocco.py +++ b/src/sage/libs/all__sagemath_sirocco.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-sirocco diff --git a/src/sage/libs/all__sagemath_symbolics.py b/src/sage/libs/all__sagemath_symbolics.py deleted file mode 100644 index 9c096062eb5..00000000000 --- a/src/sage/libs/all__sagemath_symbolics.py +++ /dev/null @@ -1,4 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.libs.giac.giac', 'libgiac') -del lazy_import diff --git a/src/sage/libs/arb/__init__.py b/src/sage/libs/arb/__init__.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/libs/arb/__init__.py +++ b/src/sage/libs/arb/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/libs/arb/acb.pxd b/src/sage/libs/arb/acb.pxd index 212ae927fcf..9dac39b52a6 100644 --- a/src/sage/libs/arb/acb.pxd +++ b/src/sage/libs/arb/acb.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/acb_calc.pxd b/src/sage/libs/arb/acb_calc.pxd index b2d79e9416d..c06d7c5ad39 100644 --- a/src/sage/libs/arb/acb_calc.pxd +++ b/src/sage/libs/arb/acb_calc.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb_calc.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/acb_elliptic.pxd b/src/sage/libs/arb/acb_elliptic.pxd index 4bbd36ab55b..d1899d64b94 100644 --- a/src/sage/libs/arb/acb_elliptic.pxd +++ b/src/sage/libs/arb/acb_elliptic.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb_elliptic.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/acb_hypgeom.pxd b/src/sage/libs/arb/acb_hypgeom.pxd index 240a71df996..641dd595004 100644 --- a/src/sage/libs/arb/acb_hypgeom.pxd +++ b/src/sage/libs/arb/acb_hypgeom.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb_hypgeom.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/acb_mat.pxd b/src/sage/libs/arb/acb_mat.pxd index eab8badd5f8..5c16b9481a4 100644 --- a/src/sage/libs/arb/acb_mat.pxd +++ b/src/sage/libs/arb/acb_mat.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb_mat.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/acb_modular.pxd b/src/sage/libs/arb/acb_modular.pxd index fcab53d4124..46ef451ddd4 100644 --- a/src/sage/libs/arb/acb_modular.pxd +++ b/src/sage/libs/arb/acb_modular.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb_modular.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/acb_poly.pxd b/src/sage/libs/arb/acb_poly.pxd index 1fa3dee2c7d..42f4eae1ad4 100644 --- a/src/sage/libs/arb/acb_poly.pxd +++ b/src/sage/libs/arb/acb_poly.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/acb_poly.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/arb.pxd b/src/sage/libs/arb/arb.pxd index acc5bdc5cde..704a5419c2f 100644 --- a/src/sage/libs/arb/arb.pxd +++ b/src/sage/libs/arb/arb.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/arb.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/arb_fmpz_poly.pxd b/src/sage/libs/arb/arb_fmpz_poly.pxd index f0b3750967e..a1de902aeb4 100644 --- a/src/sage/libs/arb/arb_fmpz_poly.pxd +++ b/src/sage/libs/arb/arb_fmpz_poly.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/arb_fmpz_poly.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/arb_hypgeom.pxd b/src/sage/libs/arb/arb_hypgeom.pxd index e7e0389f5c6..09ef72742a1 100644 --- a/src/sage/libs/arb/arb_hypgeom.pxd +++ b/src/sage/libs/arb/arb_hypgeom.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/arb_hypgeom.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/arf.pxd b/src/sage/libs/arb/arf.pxd index 92a71f24bba..bfdca642bc9 100644 --- a/src/sage/libs/arb/arf.pxd +++ b/src/sage/libs/arb/arf.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/arf.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/arith.pyx b/src/sage/libs/arb/arith.pyx index d95977e4176..8bc843aa2a3 100644 --- a/src/sage/libs/arb/arith.pyx +++ b/src/sage/libs/arb/arith.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Arithmetic functions using the arb library """ diff --git a/src/sage/libs/arb/bernoulli.pxd b/src/sage/libs/arb/bernoulli.pxd index 4b9901c4895..a347f8e8378 100644 --- a/src/sage/libs/arb/bernoulli.pxd +++ b/src/sage/libs/arb/bernoulli.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/bernoulli.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/mag.pxd b/src/sage/libs/arb/mag.pxd index 4a65282aaa6..7c75a4343cc 100644 --- a/src/sage/libs/arb/mag.pxd +++ b/src/sage/libs/arb/mag.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/mag.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/arb/types.pxd b/src/sage/libs/arb/types.pxd index 7582aa556e8..85969f380b8 100644 --- a/src/sage/libs/arb/types.pxd +++ b/src/sage/libs/arb/types.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - # Deprecated header file; use sage/libs/flint/types.pxd instead # See https://github.com/sagemath/sage/pull/36449 diff --git a/src/sage/libs/braiding.pyx b/src/sage/libs/braiding.pyx index c10601dfe56..f3849a55d7e 100644 --- a/src/sage/libs/braiding.pyx +++ b/src/sage/libs/braiding.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-libbraiding # distutils: libraries = braiding # distutils: language = c++ r""" diff --git a/src/sage/libs/ecl.pxd b/src/sage/libs/ecl.pxd index 24d872c59ff..19472171403 100644 --- a/src/sage/libs/ecl.pxd +++ b/src/sage/libs/ecl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # distutils: extra_compile_args = ECL_CFLAGS # distutils: include_dirs = ECL_INCDIR # distutils: libraries = ECL_LIBRARIES diff --git a/src/sage/libs/ecl.pyx b/src/sage/libs/ecl.pyx index 9095c57f38c..1cc38a3ab3a 100644 --- a/src/sage/libs/ecl.pyx +++ b/src/sage/libs/ecl.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Library interface to Embeddable Common Lisp (ECL) """ diff --git a/src/sage/libs/eclib/__init__.pxd b/src/sage/libs/eclib/__init__.pxd index 8bade99e170..d44d4fba865 100644 --- a/src/sage/libs/eclib/__init__.pxd +++ b/src/sage/libs/eclib/__init__.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib # distutils: language = c++ # distutils: libraries = ec NTL_LIBRARIES pari gmp m # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/libs/eclib/__init__.py b/src/sage/libs/eclib/__init__.py index 95995325cb0..e69de29bb2d 100644 --- a/src/sage/libs/eclib/__init__.py +++ b/src/sage/libs/eclib/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-eclib diff --git a/src/sage/libs/eclib/all.py b/src/sage/libs/eclib/all.py index 0be330b09e4..717a66fae7b 100644 --- a/src/sage/libs/eclib/all.py +++ b/src/sage/libs/eclib/all.py @@ -1,6 +1,4 @@ -# sage_setup: distribution = sagemath-eclib - -from sage.libs.eclib.constructor import CremonaModularSymbols -from sage.libs.eclib.interface import mwrank_EllipticCurve, mwrank_MordellWeil -from sage.libs.eclib.mwrank import get_precision, set_precision -from sage.libs.eclib.mwrank import initprimes as mwrank_initprimes +from .constructor import CremonaModularSymbols +from .interface import mwrank_EllipticCurve, mwrank_MordellWeil +from .mwrank import get_precision, set_precision +from .mwrank import initprimes as mwrank_initprimes diff --git a/src/sage/libs/eclib/constructor.py b/src/sage/libs/eclib/constructor.py index 37e2e373a2b..7c1c21377d0 100644 --- a/src/sage/libs/eclib/constructor.py +++ b/src/sage/libs/eclib/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib "Cremona modular symbols" def CremonaModularSymbols(level, sign=0, cuspidal=False, verbose=0): diff --git a/src/sage/libs/eclib/homspace.pxd b/src/sage/libs/eclib/homspace.pxd index f9fdefe66f4..d3600547f1e 100644 --- a/src/sage/libs/eclib/homspace.pxd +++ b/src/sage/libs/eclib/homspace.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib from sage.libs.eclib cimport homspace cdef class ModularSymbols: diff --git a/src/sage/libs/eclib/homspace.pyx b/src/sage/libs/eclib/homspace.pyx index 77bf76b299a..723bdc8c30e 100644 --- a/src/sage/libs/eclib/homspace.pyx +++ b/src/sage/libs/eclib/homspace.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib "Cremona modular symbols" from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/eclib/interface.py b/src/sage/libs/eclib/interface.py index bc78e4c47c4..7b2b07b1f3f 100644 --- a/src/sage/libs/eclib/interface.py +++ b/src/sage/libs/eclib/interface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib r""" Sage interface to Cremona's ``eclib`` library (also known as ``mwrank``) diff --git a/src/sage/libs/eclib/mat.pxd b/src/sage/libs/eclib/mat.pxd index f582ab4a21f..509bd4d0ce8 100644 --- a/src/sage/libs/eclib/mat.pxd +++ b/src/sage/libs/eclib/mat.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib from sage.libs.eclib cimport mat cdef class Matrix: diff --git a/src/sage/libs/eclib/mat.pyx b/src/sage/libs/eclib/mat.pyx index 80499d89297..b4b607ef083 100644 --- a/src/sage/libs/eclib/mat.pyx +++ b/src/sage/libs/eclib/mat.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib """ Cremona matrices """ diff --git a/src/sage/libs/eclib/mwrank.pyx b/src/sage/libs/eclib/mwrank.pyx index a74860db330..bc475f907b6 100644 --- a/src/sage/libs/eclib/mwrank.pyx +++ b/src/sage/libs/eclib/mwrank.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib """ Cython interface to Cremona's ``eclib`` library (also known as ``mwrank``) diff --git a/src/sage/libs/eclib/newforms.pxd b/src/sage/libs/eclib/newforms.pxd index 04398ec7748..7f78a4f9f63 100644 --- a/src/sage/libs/eclib/newforms.pxd +++ b/src/sage/libs/eclib/newforms.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib from sage.libs.eclib cimport newforms cdef class ECModularSymbol: diff --git a/src/sage/libs/eclib/newforms.pyx b/src/sage/libs/eclib/newforms.pyx index 1cec125a369..a1dffcbe1e3 100644 --- a/src/sage/libs/eclib/newforms.pyx +++ b/src/sage/libs/eclib/newforms.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-eclib """ Modular symbols using eclib newforms """ diff --git a/src/sage/libs/flint/__init__.py b/src/sage/libs/flint/__init__.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/libs/flint/__init__.py +++ b/src/sage/libs/flint/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/libs/flint/arith.pxd b/src/sage/libs/flint/arith.pxd index 357c53ee0c8..70e7f5e5d29 100644 --- a/src/sage/libs/flint/arith.pxd +++ b/src/sage/libs/flint/arith.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/arith.h diff --git a/src/sage/libs/flint/arith.pyx b/src/sage/libs/flint/arith.pyx index 1ecabf5c1da..fe599af4dfc 100644 --- a/src/sage/libs/flint/arith.pyx +++ b/src/sage/libs/flint/arith.pyx @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - r""" Deprecated module. diff --git a/src/sage/libs/flint/flint.pxd b/src/sage/libs/flint/flint.pxd index f685ba9ced4..33af77f9c16 100644 --- a/src/sage/libs/flint/flint.pxd +++ b/src/sage/libs/flint/flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/flint.h diff --git a/src/sage/libs/flint/fmpq.pxd b/src/sage/libs/flint/fmpq.pxd index 80eac6af702..61ebabac2b0 100644 --- a/src/sage/libs/flint/fmpq.pxd +++ b/src/sage/libs/flint/fmpq.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpq.h diff --git a/src/sage/libs/flint/fmpq_mat.pxd b/src/sage/libs/flint/fmpq_mat.pxd index 5da5c44bfcc..0227b8523a6 100644 --- a/src/sage/libs/flint/fmpq_mat.pxd +++ b/src/sage/libs/flint/fmpq_mat.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpq_mat.h diff --git a/src/sage/libs/flint/fmpq_poly.pxd b/src/sage/libs/flint/fmpq_poly.pxd index db45362e456..f8622ebfd41 100644 --- a/src/sage/libs/flint/fmpq_poly.pxd +++ b/src/sage/libs/flint/fmpq_poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpq_poly.h diff --git a/src/sage/libs/flint/fmpq_poly_sage.pyx b/src/sage/libs/flint/fmpq_poly_sage.pyx index 0c6813cf7b9..fcaf6407bfc 100644 --- a/src/sage/libs/flint/fmpq_poly_sage.pyx +++ b/src/sage/libs/flint/fmpq_poly_sage.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # Functions removed from flint but still needed in Sage. Code adapted from # earlier versions of flint. diff --git a/src/sage/libs/flint/fmpz.pxd b/src/sage/libs/flint/fmpz.pxd index ba4ee32db9b..237ac135cd9 100644 --- a/src/sage/libs/flint/fmpz.pxd +++ b/src/sage/libs/flint/fmpz.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz.h diff --git a/src/sage/libs/flint/fmpz_factor.pxd b/src/sage/libs/flint/fmpz_factor.pxd index 7e1aaefbe70..1e93305c7f5 100644 --- a/src/sage/libs/flint/fmpz_factor.pxd +++ b/src/sage/libs/flint/fmpz_factor.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_factor.h diff --git a/src/sage/libs/flint/fmpz_factor_sage.pyx b/src/sage/libs/flint/fmpz_factor_sage.pyx index 71a898fa15c..330ba3d4d4e 100644 --- a/src/sage/libs/flint/fmpz_factor_sage.pyx +++ b/src/sage/libs/flint/fmpz_factor_sage.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from cysignals.signals cimport sig_check from sage.libs.flint.fmpz cimport fmpz_get_mpz from sage.rings.integer cimport Integer diff --git a/src/sage/libs/flint/fmpz_mat.pxd b/src/sage/libs/flint/fmpz_mat.pxd index 871172b28aa..abde570c32f 100644 --- a/src/sage/libs/flint/fmpz_mat.pxd +++ b/src/sage/libs/flint/fmpz_mat.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_mat.h diff --git a/src/sage/libs/flint/fmpz_mod.pxd b/src/sage/libs/flint/fmpz_mod.pxd index 6fa63df8209..4089589dd53 100644 --- a/src/sage/libs/flint/fmpz_mod.pxd +++ b/src/sage/libs/flint/fmpz_mod.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_mod.h diff --git a/src/sage/libs/flint/fmpz_mod_poly.pxd b/src/sage/libs/flint/fmpz_mod_poly.pxd index f70a19f852a..302113e191b 100644 --- a/src/sage/libs/flint/fmpz_mod_poly.pxd +++ b/src/sage/libs/flint/fmpz_mod_poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_mod_poly.h diff --git a/src/sage/libs/flint/fmpz_poly.pxd b/src/sage/libs/flint/fmpz_poly.pxd index 0a07a50b357..59508fe6c19 100644 --- a/src/sage/libs/flint/fmpz_poly.pxd +++ b/src/sage/libs/flint/fmpz_poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_poly.h diff --git a/src/sage/libs/flint/fmpz_poly.pyx b/src/sage/libs/flint/fmpz_poly.pyx index d33c23cad33..ca3997316e7 100644 --- a/src/sage/libs/flint/fmpz_poly.pyx +++ b/src/sage/libs/flint/fmpz_poly.pyx @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - r""" Deprecated module diff --git a/src/sage/libs/flint/fmpz_poly_mat.pxd b/src/sage/libs/flint/fmpz_poly_mat.pxd index 56977d1ff3f..83ed1d8bced 100644 --- a/src/sage/libs/flint/fmpz_poly_mat.pxd +++ b/src/sage/libs/flint/fmpz_poly_mat.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_poly_mat.h diff --git a/src/sage/libs/flint/fmpz_poly_q.pxd b/src/sage/libs/flint/fmpz_poly_q.pxd index 88bafa5fc1e..26de673bb6c 100644 --- a/src/sage/libs/flint/fmpz_poly_q.pxd +++ b/src/sage/libs/flint/fmpz_poly_q.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_poly_q.h diff --git a/src/sage/libs/flint/fmpz_vec.pxd b/src/sage/libs/flint/fmpz_vec.pxd index 0cfc343b8aa..0418fbc6242 100644 --- a/src/sage/libs/flint/fmpz_vec.pxd +++ b/src/sage/libs/flint/fmpz_vec.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fmpz_vec.h diff --git a/src/sage/libs/flint/fq.pxd b/src/sage/libs/flint/fq.pxd index e2b65e3a46d..01c8f5887a2 100644 --- a/src/sage/libs/flint/fq.pxd +++ b/src/sage/libs/flint/fq.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fq.h diff --git a/src/sage/libs/flint/fq_nmod.pxd b/src/sage/libs/flint/fq_nmod.pxd index 4f2f7402b8c..83085408d29 100644 --- a/src/sage/libs/flint/fq_nmod.pxd +++ b/src/sage/libs/flint/fq_nmod.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/fq_nmod.h diff --git a/src/sage/libs/flint/nmod_poly.pxd b/src/sage/libs/flint/nmod_poly.pxd index 2f98a8e6fee..eb5cd984fd6 100644 --- a/src/sage/libs/flint/nmod_poly.pxd +++ b/src/sage/libs/flint/nmod_poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/nmod_poly.h diff --git a/src/sage/libs/flint/nmod_poly_linkage.pxi b/src/sage/libs/flint/nmod_poly_linkage.pxi index fb429ccf20e..461679cba20 100644 --- a/src/sage/libs/flint/nmod_poly_linkage.pxi +++ b/src/sage/libs/flint/nmod_poly_linkage.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Linkage for arithmetic with FLINT's nmod_poly_t elements. diff --git a/src/sage/libs/flint/nmod_vec.pxd b/src/sage/libs/flint/nmod_vec.pxd index 66d5cb63990..326ea21b98a 100644 --- a/src/sage/libs/flint/nmod_vec.pxd +++ b/src/sage/libs/flint/nmod_vec.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/nmod_vec.h diff --git a/src/sage/libs/flint/ntl_interface.pxd b/src/sage/libs/flint/ntl_interface.pxd index cf25aa73004..d6112383330 100644 --- a/src/sage/libs/flint/ntl_interface.pxd +++ b/src/sage/libs/flint/ntl_interface.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: language = c++ # distutils: libraries = flint # distutils: depends = flint/NTL-interface.h diff --git a/src/sage/libs/flint/padic.pxd b/src/sage/libs/flint/padic.pxd index fd46053d501..ef190a51a9e 100644 --- a/src/sage/libs/flint/padic.pxd +++ b/src/sage/libs/flint/padic.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/padic.h diff --git a/src/sage/libs/flint/padic_poly.pxd b/src/sage/libs/flint/padic_poly.pxd index 09481dc9955..caca76b79db 100644 --- a/src/sage/libs/flint/padic_poly.pxd +++ b/src/sage/libs/flint/padic_poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/padic_poly.h diff --git a/src/sage/libs/flint/qadic.pxd b/src/sage/libs/flint/qadic.pxd index 93d3ec98267..86db643ec2a 100644 --- a/src/sage/libs/flint/qadic.pxd +++ b/src/sage/libs/flint/qadic.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/qadic.h diff --git a/src/sage/libs/flint/qsieve.pxd b/src/sage/libs/flint/qsieve.pxd index c5628bb377d..fe25087758c 100644 --- a/src/sage/libs/flint/qsieve.pxd +++ b/src/sage/libs/flint/qsieve.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/qsieve.h diff --git a/src/sage/libs/flint/qsieve.pyx b/src/sage/libs/flint/qsieve.pyx index 3a405dfa316..7168a3beac8 100644 --- a/src/sage/libs/flint/qsieve.pyx +++ b/src/sage/libs/flint/qsieve.pyx @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - r""" Deprecated module. diff --git a/src/sage/libs/flint/thread_pool.pxd b/src/sage/libs/flint/thread_pool.pxd index 778245ef9cb..137eae2b7a6 100644 --- a/src/sage/libs/flint/thread_pool.pxd +++ b/src/sage/libs/flint/thread_pool.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/thread_pool.h diff --git a/src/sage/libs/flint/types.pxd b/src/sage/libs/flint/types.pxd index d8c27deb02c..9e227fd87b0 100644 --- a/src/sage/libs/flint/types.pxd +++ b/src/sage/libs/flint/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: depends = flint/acb.h flint/acb_calc.h flint/acb_dft.h flint/acb_dirichlet.h flint/acb_elliptic.h flint/acb_hypgeom.h flint/acb_mat.h flint/acb_modular.h flint/acb_poly.h flint/acf.h flint/aprcl.h flint/arb.h flint/arb_calc.h flint/arb_fmpz_poly.h flint/arb_fpwrap.h flint/arb_hypgeom.h flint/arb_mat.h flint/arb_poly.h flint/arf.h flint/arith.h flint/bernoulli.h flint/bool_mat.h flint/ca.h flint/ca_ext.h flint/ca_field.h flint/ca_mat.h flint/ca_poly.h flint/ca_vec.h flint/calcium.h flint/d_mat.h flint/d_vec.h flint/dirichlet.h flint/dlog.h flint/double_extras.h flint/double_interval.h flint/fexpr.h flint/fexpr_builtin.h flint/fft.h flint/flint.h flint/fmpq.h flint/fmpq_mat.h flint/fmpq_mpoly.h flint/fmpq_mpoly_factor.h flint/fmpq_poly.h flint/fmpq_vec.h flint/fmpz.h flint/fmpz_extras.h flint/fmpz_factor.h flint/fmpz_lll.h flint/fmpz_mat.h flint/fmpz_mod.h flint/fmpz_mod_mat.h flint/fmpz_mod_mpoly.h flint/fmpz_mod_mpoly_factor.h flint/fmpz_mod_poly.h flint/fmpz_mod_poly_factor.h flint/fmpz_mod_vec.h flint/fmpz_mpoly.h flint/fmpz_mpoly_factor.h flint/fmpz_mpoly_q.h flint/fmpz_poly.h flint/fmpz_poly_factor.h flint/fmpz_poly_mat.h flint/fmpz_poly_q.h flint/fmpz_vec.h flint/fmpzi.h flint/fq.h flint/fq_default.h flint/fq_default_mat.h flint/fq_default_poly.h flint/fq_default_poly_factor.h flint/fq_embed.h flint/fq_mat.h flint/fq_nmod.h flint/fq_nmod_embed.h flint/fq_nmod_mat.h flint/fq_nmod_mpoly.h flint/fq_nmod_mpoly_factor.h flint/fq_nmod_poly.h flint/fq_nmod_poly_factor.h flint/fq_nmod_vec.h flint/fq_poly.h flint/fq_poly_factor.h flint/fq_vec.h flint/fq_zech.h flint/fq_zech_embed.h flint/fq_zech_mat.h flint/fq_zech_poly.h flint/fq_zech_poly_factor.h flint/fq_zech_vec.h flint/gr.h flint/gr_generic.h flint/gr_mat.h flint/gr_mpoly.h flint/gr_poly.h flint/gr_special.h flint/gr_vec.h flint/hypgeom.h flint/long_extras.h flint/mag.h flint/mpf_mat.h flint/mpf_vec.h flint/mpfr_mat.h flint/mpfr_vec.h flint/mpn_extras.h flint/mpoly.h flint/nf.h flint/nf_elem.h flint/nmod.h flint/nmod_mat.h flint/nmod_mpoly.h flint/nmod_mpoly_factor.h flint/nmod_poly.h flint/nmod_poly_factor.h flint/nmod_poly_mat.h flint/nmod_types.h flint/nmod_vec.h flint/padic.h flint/padic_mat.h flint/padic_poly.h flint/partitions.h flint/perm.h flint/profiler.h flint/qadic.h flint/qfb.h flint/qqbar.h flint/qsieve.h flint/thread_pool.h flint/ulong_extras.h # WARNING: src/sage/libs/flint/types.pxd is generated from diff --git a/src/sage/libs/flint/ulong_extras.pxd b/src/sage/libs/flint/ulong_extras.pxd index d9ad42c0d9c..8593c3725f2 100644 --- a/src/sage/libs/flint/ulong_extras.pxd +++ b/src/sage/libs/flint/ulong_extras.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint # distutils: depends = flint/ulong_extras.h diff --git a/src/sage/libs/flint/ulong_extras.pyx b/src/sage/libs/flint/ulong_extras.pyx index 7a414d9ceb9..e4eee95b119 100644 --- a/src/sage/libs/flint/ulong_extras.pyx +++ b/src/sage/libs/flint/ulong_extras.pyx @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - r""" Deprecated modules. diff --git a/src/sage/libs/gap/all.py b/src/sage/libs/gap/all.py index dd59a6da735..e69de29bb2d 100644 --- a/src/sage/libs/gap/all.py +++ b/src/sage/libs/gap/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-gap diff --git a/src/sage/libs/gap/all_documented_functions.py b/src/sage/libs/gap/all_documented_functions.py index f680ddff75a..0820dc71064 100644 --- a/src/sage/libs/gap/all_documented_functions.py +++ b/src/sage/libs/gap/all_documented_functions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """nodoctest All Documented GAP Functions diff --git a/src/sage/libs/gap/assigned_names.py b/src/sage/libs/gap/assigned_names.py index e136e95f5e0..e8d1f1707cc 100644 --- a/src/sage/libs/gap/assigned_names.py +++ b/src/sage/libs/gap/assigned_names.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """nodoctest List of assigned names in GAP diff --git a/src/sage/libs/gap/context_managers.py b/src/sage/libs/gap/context_managers.py index 9252c3ee510..b42e9c02f4f 100644 --- a/src/sage/libs/gap/context_managers.py +++ b/src/sage/libs/gap/context_managers.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Context Managers for LibGAP diff --git a/src/sage/libs/gap/element.pxd b/src/sage/libs/gap/element.pxd index db7ac3be9f9..ba4028cd91c 100644 --- a/src/sage/libs/gap/element.pxd +++ b/src/sage/libs/gap/element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap #***************************************************************************** # Copyright (C) 2012 Volker Braun # diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index 83d2286113e..f1482997b86 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ GAP element wrapper diff --git a/src/sage/libs/gap/gap_functions.py b/src/sage/libs/gap/gap_functions.py index 7df65a0db51..5e35ca672bf 100644 --- a/src/sage/libs/gap/gap_functions.py +++ b/src/sage/libs/gap/gap_functions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """Common global functions defined by GAP.""" ############################################################################### diff --git a/src/sage/libs/gap/gap_globals.py b/src/sage/libs/gap/gap_globals.py index b2a413c06d9..4c3e6eb3aae 100644 --- a/src/sage/libs/gap/gap_globals.py +++ b/src/sage/libs/gap/gap_globals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """Common globals defined by GAP.""" ############################################################################### diff --git a/src/sage/libs/gap/gap_includes.pxd b/src/sage/libs/gap/gap_includes.pxd index 67746723817..1ed4378a6c7 100644 --- a/src/sage/libs/gap/gap_includes.pxd +++ b/src/sage/libs/gap/gap_includes.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # distutils: libraries = gap gmp m ############################################################################### # Copyright (C) 2009, William Stein diff --git a/src/sage/libs/gap/libgap.pyx b/src/sage/libs/gap/libgap.pyx index 5683b632fb1..328a5096160 100644 --- a/src/sage/libs/gap/libgap.pyx +++ b/src/sage/libs/gap/libgap.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Library Interface to GAP diff --git a/src/sage/libs/gap/operations.py b/src/sage/libs/gap/operations.py index 0cbfb8ffa5a..434d1a01511 100644 --- a/src/sage/libs/gap/operations.py +++ b/src/sage/libs/gap/operations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Operations for LibGAP Elements diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py index 43e5e066ed4..fdaf18f4644 100644 --- a/src/sage/libs/gap/saved_workspace.py +++ b/src/sage/libs/gap/saved_workspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ LibGAP Workspace Support diff --git a/src/sage/libs/gap/test.py b/src/sage/libs/gap/test.py index c96c6ceddf9..eee697218ee 100644 --- a/src/sage/libs/gap/test.py +++ b/src/sage/libs/gap/test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Short tests for GAP """ diff --git a/src/sage/libs/gap/test_long.py b/src/sage/libs/gap/test_long.py index a365b2c4a4a..262db5ad287 100644 --- a/src/sage/libs/gap/test_long.py +++ b/src/sage/libs/gap/test_long.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Long tests for GAP diff --git a/src/sage/libs/gap/util.pxd b/src/sage/libs/gap/util.pxd index eb5d5711ad3..bb559f7c6a3 100644 --- a/src/sage/libs/gap/util.pxd +++ b/src/sage/libs/gap/util.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap #***************************************************************************** # Copyright (C) 2012 Volker Braun # diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx index 3586bee9211..3e75d71ff06 100644 --- a/src/sage/libs/gap/util.pyx +++ b/src/sage/libs/gap/util.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap """ Utility functions for GAP """ diff --git a/src/sage/libs/giac/__init__.py b/src/sage/libs/giac/__init__.py index ffc5714017a..e7d7bc67d14 100644 --- a/src/sage/libs/giac/__init__.py +++ b/src/sage/libs/giac/__init__.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-giac +# -*- coding: utf-8 -*- """ Wrappers for Giac functions diff --git a/src/sage/libs/giac/auto-methods.pxi b/src/sage/libs/giac/auto-methods.pxi index 92166556652..9af4c0023bf 100644 --- a/src/sage/libs/giac/auto-methods.pxi +++ b/src/sage/libs/giac/auto-methods.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-giac # file auto generated by mkkeywords.py cdef class GiacMethods_base: """ diff --git a/src/sage/libs/giac/giac.pxd b/src/sage/libs/giac/giac.pxd index b1c57995763..1d9da88d8d4 100644 --- a/src/sage/libs/giac/giac.pxd +++ b/src/sage/libs/giac/giac.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-giac # distutils: language = c++ # **************************************************************************** # Copyright (C) 2012, Frederic Han diff --git a/src/sage/libs/giac/giac.pyx b/src/sage/libs/giac/giac.pyx index 628d457eb20..74e4587440f 100644 --- a/src/sage/libs/giac/giac.pyx +++ b/src/sage/libs/giac/giac.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-giac # distutils: libraries = giac # distutils: language = c++ r""" diff --git a/src/sage/libs/giac/keywords.pxi b/src/sage/libs/giac/keywords.pxi index e1253b9746a..9bc7eebe0b5 100644 --- a/src/sage/libs/giac/keywords.pxi +++ b/src/sage/libs/giac/keywords.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-giac # file auto generated by mkkeywords.py blacklist = ['eval', 'cas_setup', 'i', 'list', 'input', 'in', 'sto', 'string', 'and', 'break', 'continue', 'else', 'for', 'from', 'if', 'not', 'or', 'pow', 'print', 'return', 'set[]', 'try', 'while', 'open', 'output', 'do', 'of', 'Request', 'i[]', '[]', 'ffunction', 'sleep', '[..]'] diff --git a/src/sage/libs/glpk/__init__.py b/src/sage/libs/glpk/__init__.py index b555a29542b..e69de29bb2d 100644 --- a/src/sage/libs/glpk/__init__.py +++ b/src/sage/libs/glpk/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-glpk diff --git a/src/sage/libs/glpk/constants.pxd b/src/sage/libs/glpk/constants.pxd index f75107a9ae6..55fd165dcd3 100644 --- a/src/sage/libs/glpk/constants.pxd +++ b/src/sage/libs/glpk/constants.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk #***************************************************************************** # Copyright (C) 2010 Nathann Cohen # Copyright (C) 2015 Jeroen Demeyer diff --git a/src/sage/libs/glpk/env.pxd b/src/sage/libs/glpk/env.pxd index 8da2da5c261..80d5153d3c9 100644 --- a/src/sage/libs/glpk/env.pxd +++ b/src/sage/libs/glpk/env.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk # distutils: libraries = glpk z gmp cdef extern from "glpk.h": diff --git a/src/sage/libs/glpk/error.pyx b/src/sage/libs/glpk/error.pyx index 4948f0969ad..4fb01782205 100644 --- a/src/sage/libs/glpk/error.pyx +++ b/src/sage/libs/glpk/error.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk """ Error handler for the GLPK library """ diff --git a/src/sage/libs/glpk/graph.pxd b/src/sage/libs/glpk/graph.pxd index 94ebbb91c47..2266952444c 100644 --- a/src/sage/libs/glpk/graph.pxd +++ b/src/sage/libs/glpk/graph.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk # distutils: libraries = glpk z gmp #***************************************************************************** diff --git a/src/sage/libs/glpk/lp.pxd b/src/sage/libs/glpk/lp.pxd index d3260e30f60..cc4f05e5368 100644 --- a/src/sage/libs/glpk/lp.pxd +++ b/src/sage/libs/glpk/lp.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk # distutils: libraries = glpk z gmp #***************************************************************************** diff --git a/src/sage/libs/glpk/types.pxd b/src/sage/libs/glpk/types.pxd index 33db76589d4..2d02df5dad4 100644 --- a/src/sage/libs/glpk/types.pxd +++ b/src/sage/libs/glpk/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk #***************************************************************************** # Copyright (C) 2010 Nathann Cohen # Copyright (C) 2015 Jeroen Demeyer diff --git a/src/sage/libs/gmp/__init__.py b/src/sage/libs/gmp/__init__.py index f9b8167c3cd..e69de29bb2d 100644 --- a/src/sage/libs/gmp/__init__.py +++ b/src/sage/libs/gmp/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-objects diff --git a/src/sage/libs/gmp/all.pxd b/src/sage/libs/gmp/all.pxd index ee59521494e..cf1f3fa6417 100644 --- a/src/sage/libs/gmp/all.pxd +++ b/src/sage/libs/gmp/all.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.libs.gmp.types cimport * from sage.libs.gmp.random cimport * from sage.libs.gmp.mpz cimport * diff --git a/src/sage/libs/gmp/binop.pxd b/src/sage/libs/gmp/binop.pxd index 94b6db1a8db..6b56c24a1b5 100644 --- a/src/sage/libs/gmp/binop.pxd +++ b/src/sage/libs/gmp/binop.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Fast binary operations for basic types """ diff --git a/src/sage/libs/gmp/misc.pxd b/src/sage/libs/gmp/misc.pxd index c64528d0e9c..3ad4f2a89db 100644 --- a/src/sage/libs/gmp/misc.pxd +++ b/src/sage/libs/gmp/misc.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: libraries = gmp cdef extern from "gmp.h": diff --git a/src/sage/libs/gmp/mpf.pxd b/src/sage/libs/gmp/mpf.pxd index a1bbfd46df3..b63d84009c0 100644 --- a/src/sage/libs/gmp/mpf.pxd +++ b/src/sage/libs/gmp/mpf.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: libraries = gmp from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/gmp/mpn.pxd b/src/sage/libs/gmp/mpn.pxd index 34b045e1f4b..890c5b63da7 100644 --- a/src/sage/libs/gmp/mpn.pxd +++ b/src/sage/libs/gmp/mpn.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: libraries = gmp from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/gmp/mpq.pxd b/src/sage/libs/gmp/mpq.pxd index 068988ffbc4..d865630aee0 100644 --- a/src/sage/libs/gmp/mpq.pxd +++ b/src/sage/libs/gmp/mpq.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: libraries = gmp from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/gmp/mpz.pxd b/src/sage/libs/gmp/mpz.pxd index 66c44773d17..71d1e5e3069 100644 --- a/src/sage/libs/gmp/mpz.pxd +++ b/src/sage/libs/gmp/mpz.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: libraries = gmp from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/gmp/pylong.pxd b/src/sage/libs/gmp/pylong.pxd index fbc8e5671f7..325d747f57b 100644 --- a/src/sage/libs/gmp/pylong.pxd +++ b/src/sage/libs/gmp/pylong.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Various functions to deal with conversion mpz <-> Python int/long """ diff --git a/src/sage/libs/gmp/pylong.pyx b/src/sage/libs/gmp/pylong.pyx index 660cdbbae58..80f9843e07c 100644 --- a/src/sage/libs/gmp/pylong.pyx +++ b/src/sage/libs/gmp/pylong.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Various functions to deal with conversion mpz <-> Python int/long diff --git a/src/sage/libs/gmp/random.pxd b/src/sage/libs/gmp/random.pxd index ef3cde3c4ea..a50657454ca 100644 --- a/src/sage/libs/gmp/random.pxd +++ b/src/sage/libs/gmp/random.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: libraries = gmp from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/gmp/randomize.pxd b/src/sage/libs/gmp/randomize.pxd index ac4d155c694..3876c0dda13 100644 --- a/src/sage/libs/gmp/randomize.pxd +++ b/src/sage/libs/gmp/randomize.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Generate random rationals in Sage """ diff --git a/src/sage/libs/gmp/types.pxd b/src/sage/libs/gmp/types.pxd index 0047df1194e..a8a4a6a35c4 100644 --- a/src/sage/libs/gmp/types.pxd +++ b/src/sage/libs/gmp/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from libc.stdio cimport FILE cdef extern from "gmp.h": diff --git a/src/sage/libs/gmpxx.pxd b/src/sage/libs/gmpxx.pxd index 227e62fe9c3..8ad41212dbf 100644 --- a/src/sage/libs/gmpxx.pxd +++ b/src/sage/libs/gmpxx.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # distutils: language = c++ # distutils: libraries = gmpxx gmp diff --git a/src/sage/libs/gsl/__init__.py b/src/sage/libs/gsl/__init__.py index 6f6ab52d0f2..e69de29bb2d 100644 --- a/src/sage/libs/gsl/__init__.py +++ b/src/sage/libs/gsl/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-modules diff --git a/src/sage/libs/gsl/airy.pxd b/src/sage/libs/gsl/airy.pxd index d4f8c8806ee..7e996d5af81 100644 --- a/src/sage/libs/gsl/airy.pxd +++ b/src/sage/libs/gsl/airy.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/all.pxd b/src/sage/libs/gsl/all.pxd index 5d90292969a..099399d9f3f 100644 --- a/src/sage/libs/gsl/all.pxd +++ b/src/sage/libs/gsl/all.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gsl.types cimport * from sage.libs.gsl.math cimport * diff --git a/src/sage/libs/gsl/array.pxd b/src/sage/libs/gsl/array.pxd index 0860ade618f..45ed04e45d0 100644 --- a/src/sage/libs/gsl/array.pxd +++ b/src/sage/libs/gsl/array.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cdef class GSLDoubleArray: cdef size_t n cdef size_t stride diff --git a/src/sage/libs/gsl/array.pyx b/src/sage/libs/gsl/array.pyx index ac01868f01e..3916929cca4 100644 --- a/src/sage/libs/gsl/array.pyx +++ b/src/sage/libs/gsl/array.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ GSL arrays """ diff --git a/src/sage/libs/gsl/bessel.pxd b/src/sage/libs/gsl/bessel.pxd index 64f06a36db9..8a0a521aa3d 100644 --- a/src/sage/libs/gsl/bessel.pxd +++ b/src/sage/libs/gsl/bessel.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/blas.pxd b/src/sage/libs/gsl/blas.pxd index 0648ecf42a2..7b195751993 100644 --- a/src/sage/libs/gsl/blas.pxd +++ b/src/sage/libs/gsl/blas.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/blas_types.pxd b/src/sage/libs/gsl/blas_types.pxd index 9b09ddc36c4..7292912a641 100644 --- a/src/sage/libs/gsl/blas_types.pxd +++ b/src/sage/libs/gsl/blas_types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: include_dirs = GSL_INCDIR cdef extern from "gsl/gsl_cblas.h": cdef enum CBLAS_ORDER: diff --git a/src/sage/libs/gsl/block.pxd b/src/sage/libs/gsl/block.pxd index f0ddd7ecb52..69ee5251dda 100644 --- a/src/sage/libs/gsl/block.pxd +++ b/src/sage/libs/gsl/block.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/chebyshev.pxd b/src/sage/libs/gsl/chebyshev.pxd index 87158ebd611..06d2da41732 100644 --- a/src/sage/libs/gsl/chebyshev.pxd +++ b/src/sage/libs/gsl/chebyshev.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/clausen.pxd b/src/sage/libs/gsl/clausen.pxd index f45676f2673..2f92518e171 100644 --- a/src/sage/libs/gsl/clausen.pxd +++ b/src/sage/libs/gsl/clausen.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/combination.pxd b/src/sage/libs/gsl/combination.pxd index 8e382d71d97..6072fb2417a 100644 --- a/src/sage/libs/gsl/combination.pxd +++ b/src/sage/libs/gsl/combination.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/complex.pxd b/src/sage/libs/gsl/complex.pxd index 98db853b947..87fd3957b62 100644 --- a/src/sage/libs/gsl/complex.pxd +++ b/src/sage/libs/gsl/complex.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/coulomb.pxd b/src/sage/libs/gsl/coulomb.pxd index 7b6d8be0640..7941dff093d 100644 --- a/src/sage/libs/gsl/coulomb.pxd +++ b/src/sage/libs/gsl/coulomb.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/coupling.pxd b/src/sage/libs/gsl/coupling.pxd index 29a3fc89ce9..cd5f4d301a6 100644 --- a/src/sage/libs/gsl/coupling.pxd +++ b/src/sage/libs/gsl/coupling.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/dawson.pxd b/src/sage/libs/gsl/dawson.pxd index 553527d588a..9eccc6c4485 100644 --- a/src/sage/libs/gsl/dawson.pxd +++ b/src/sage/libs/gsl/dawson.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/debye.pxd b/src/sage/libs/gsl/debye.pxd index 07273be89a6..ca6d5722e56 100644 --- a/src/sage/libs/gsl/debye.pxd +++ b/src/sage/libs/gsl/debye.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/dilog.pxd b/src/sage/libs/gsl/dilog.pxd index 3af4655c653..30f633dd5d2 100644 --- a/src/sage/libs/gsl/dilog.pxd +++ b/src/sage/libs/gsl/dilog.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/eigen.pxd b/src/sage/libs/gsl/eigen.pxd index 11f849b3715..a0568b1f464 100644 --- a/src/sage/libs/gsl/eigen.pxd +++ b/src/sage/libs/gsl/eigen.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/elementary.pxd b/src/sage/libs/gsl/elementary.pxd index da6f0dcae56..66e3d39b1e9 100644 --- a/src/sage/libs/gsl/elementary.pxd +++ b/src/sage/libs/gsl/elementary.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/ellint.pxd b/src/sage/libs/gsl/ellint.pxd index 49bda769ce4..2c6cdfb9662 100644 --- a/src/sage/libs/gsl/ellint.pxd +++ b/src/sage/libs/gsl/ellint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/elljac.pxd b/src/sage/libs/gsl/elljac.pxd index ace72b4ec73..b343222e1a0 100644 --- a/src/sage/libs/gsl/elljac.pxd +++ b/src/sage/libs/gsl/elljac.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/erf.pxd b/src/sage/libs/gsl/erf.pxd index 836629ec3f5..3035944ae47 100644 --- a/src/sage/libs/gsl/erf.pxd +++ b/src/sage/libs/gsl/erf.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/errno.pxd b/src/sage/libs/gsl/errno.pxd index d273be21303..02d599289fd 100644 --- a/src/sage/libs/gsl/errno.pxd +++ b/src/sage/libs/gsl/errno.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/exp.pxd b/src/sage/libs/gsl/exp.pxd index 9c47c1a8237..875f5564053 100644 --- a/src/sage/libs/gsl/exp.pxd +++ b/src/sage/libs/gsl/exp.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/expint.pxd b/src/sage/libs/gsl/expint.pxd index 5bb6c70cf52..66e2e7b2091 100644 --- a/src/sage/libs/gsl/expint.pxd +++ b/src/sage/libs/gsl/expint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/fermi_dirac.pxd b/src/sage/libs/gsl/fermi_dirac.pxd index af5ca2d2ec7..367fe60f293 100644 --- a/src/sage/libs/gsl/fermi_dirac.pxd +++ b/src/sage/libs/gsl/fermi_dirac.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/fft.pxd b/src/sage/libs/gsl/fft.pxd index d798b153755..8d0bbff58c1 100644 --- a/src/sage/libs/gsl/fft.pxd +++ b/src/sage/libs/gsl/fft.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/fit.pxd b/src/sage/libs/gsl/fit.pxd index ca20f893822..7a052d157dd 100644 --- a/src/sage/libs/gsl/fit.pxd +++ b/src/sage/libs/gsl/fit.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/gamma.pxd b/src/sage/libs/gsl/gamma.pxd index aae7e4228dc..59bcced37be 100644 --- a/src/sage/libs/gsl/gamma.pxd +++ b/src/sage/libs/gsl/gamma.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/gegenbauer.pxd b/src/sage/libs/gsl/gegenbauer.pxd index b9affccfb27..8b3c802a9b9 100644 --- a/src/sage/libs/gsl/gegenbauer.pxd +++ b/src/sage/libs/gsl/gegenbauer.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/histogram.pxd b/src/sage/libs/gsl/histogram.pxd index 7f504a71b41..6e83a5e48a8 100644 --- a/src/sage/libs/gsl/histogram.pxd +++ b/src/sage/libs/gsl/histogram.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/hyperg.pxd b/src/sage/libs/gsl/hyperg.pxd index e80953d372c..3e85ebfb0e4 100644 --- a/src/sage/libs/gsl/hyperg.pxd +++ b/src/sage/libs/gsl/hyperg.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/integration.pxd b/src/sage/libs/gsl/integration.pxd index 8542bf36b56..0a584a90ecd 100644 --- a/src/sage/libs/gsl/integration.pxd +++ b/src/sage/libs/gsl/integration.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/interp.pxd b/src/sage/libs/gsl/interp.pxd index cea79d3f8ad..c64fa0bd4f7 100644 --- a/src/sage/libs/gsl/interp.pxd +++ b/src/sage/libs/gsl/interp.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/laguerre.pxd b/src/sage/libs/gsl/laguerre.pxd index c7505bc7475..14a2bcbee83 100644 --- a/src/sage/libs/gsl/laguerre.pxd +++ b/src/sage/libs/gsl/laguerre.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/lambert.pxd b/src/sage/libs/gsl/lambert.pxd index 850279a8c36..e30e41f0bd9 100644 --- a/src/sage/libs/gsl/lambert.pxd +++ b/src/sage/libs/gsl/lambert.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/legendre.pxd b/src/sage/libs/gsl/legendre.pxd index 62a61a9cf63..f9a69910bc2 100644 --- a/src/sage/libs/gsl/legendre.pxd +++ b/src/sage/libs/gsl/legendre.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/linalg.pxd b/src/sage/libs/gsl/linalg.pxd index 38075323f51..389ec2e7997 100644 --- a/src/sage/libs/gsl/linalg.pxd +++ b/src/sage/libs/gsl/linalg.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/log.pxd b/src/sage/libs/gsl/log.pxd index 64877bf51a7..35798b2b150 100644 --- a/src/sage/libs/gsl/log.pxd +++ b/src/sage/libs/gsl/log.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/math.pxd b/src/sage/libs/gsl/math.pxd index 6e71fca54bf..0f0a27a58e1 100644 --- a/src/sage/libs/gsl/math.pxd +++ b/src/sage/libs/gsl/math.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/matrix.pxd b/src/sage/libs/gsl/matrix.pxd index 4e5ab16ed79..e1e2009b609 100644 --- a/src/sage/libs/gsl/matrix.pxd +++ b/src/sage/libs/gsl/matrix.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/matrix_complex.pxd b/src/sage/libs/gsl/matrix_complex.pxd index ea894c74893..6cbc983a45e 100644 --- a/src/sage/libs/gsl/matrix_complex.pxd +++ b/src/sage/libs/gsl/matrix_complex.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/min.pxd b/src/sage/libs/gsl/min.pxd index 67982bde2b5..25a9770eba0 100644 --- a/src/sage/libs/gsl/min.pxd +++ b/src/sage/libs/gsl/min.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/monte.pxd b/src/sage/libs/gsl/monte.pxd index 8d9ba8cd657..92142abdbcc 100644 --- a/src/sage/libs/gsl/monte.pxd +++ b/src/sage/libs/gsl/monte.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/ntuple.pxd b/src/sage/libs/gsl/ntuple.pxd index c94f3a2211f..c47ab38d289 100644 --- a/src/sage/libs/gsl/ntuple.pxd +++ b/src/sage/libs/gsl/ntuple.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/odeiv.pxd b/src/sage/libs/gsl/odeiv.pxd index 3ad312bb68a..25924ff86aa 100644 --- a/src/sage/libs/gsl/odeiv.pxd +++ b/src/sage/libs/gsl/odeiv.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/permutation.pxd b/src/sage/libs/gsl/permutation.pxd index 443dffa4c4b..49b10e0611d 100644 --- a/src/sage/libs/gsl/permutation.pxd +++ b/src/sage/libs/gsl/permutation.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/poly.pxd b/src/sage/libs/gsl/poly.pxd index 8ad7eb86ed2..ae172cbf07f 100644 --- a/src/sage/libs/gsl/poly.pxd +++ b/src/sage/libs/gsl/poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/pow_int.pxd b/src/sage/libs/gsl/pow_int.pxd index 155f1bc0629..af5de0263b8 100644 --- a/src/sage/libs/gsl/pow_int.pxd +++ b/src/sage/libs/gsl/pow_int.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/psi.pxd b/src/sage/libs/gsl/psi.pxd index 885f4001489..fd33ccd636c 100644 --- a/src/sage/libs/gsl/psi.pxd +++ b/src/sage/libs/gsl/psi.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/qrng.pxd b/src/sage/libs/gsl/qrng.pxd index 6987fb3f5e7..24f0702f6c1 100644 --- a/src/sage/libs/gsl/qrng.pxd +++ b/src/sage/libs/gsl/qrng.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/random.pxd b/src/sage/libs/gsl/random.pxd index 89f792cdbb1..21f531265bc 100644 --- a/src/sage/libs/gsl/random.pxd +++ b/src/sage/libs/gsl/random.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/rng.pxd b/src/sage/libs/gsl/rng.pxd index 0b976df3586..b1ab233715e 100644 --- a/src/sage/libs/gsl/rng.pxd +++ b/src/sage/libs/gsl/rng.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/roots.pxd b/src/sage/libs/gsl/roots.pxd index 4380949a3ba..2bf1ccf9403 100644 --- a/src/sage/libs/gsl/roots.pxd +++ b/src/sage/libs/gsl/roots.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/sort.pxd b/src/sage/libs/gsl/sort.pxd index bc1932a57db..68493a8a1a8 100644 --- a/src/sage/libs/gsl/sort.pxd +++ b/src/sage/libs/gsl/sort.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/statistics.pxd b/src/sage/libs/gsl/statistics.pxd index 62ef3dbde6c..5f5dcaa426e 100644 --- a/src/sage/libs/gsl/statistics.pxd +++ b/src/sage/libs/gsl/statistics.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/sum.pxd b/src/sage/libs/gsl/sum.pxd index 3a75e8fc666..83966b8eb34 100644 --- a/src/sage/libs/gsl/sum.pxd +++ b/src/sage/libs/gsl/sum.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/synchrotron.pxd b/src/sage/libs/gsl/synchrotron.pxd index fd642e85113..a02c9964fc2 100644 --- a/src/sage/libs/gsl/synchrotron.pxd +++ b/src/sage/libs/gsl/synchrotron.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/transport.pxd b/src/sage/libs/gsl/transport.pxd index 86691a48b05..6700511a9c9 100644 --- a/src/sage/libs/gsl/transport.pxd +++ b/src/sage/libs/gsl/transport.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/trig.pxd b/src/sage/libs/gsl/trig.pxd index b7ebe9e14f2..c9da72206af 100644 --- a/src/sage/libs/gsl/trig.pxd +++ b/src/sage/libs/gsl/trig.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/types.pxd b/src/sage/libs/gsl/types.pxd index 00ffe3fb4ea..7076e2f8861 100644 --- a/src/sage/libs/gsl/types.pxd +++ b/src/sage/libs/gsl/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: include_dirs = GSL_INCDIR from libc.stdio cimport FILE diff --git a/src/sage/libs/gsl/vector.pxd b/src/sage/libs/gsl/vector.pxd index a00611fced0..30960a2d1ef 100644 --- a/src/sage/libs/gsl/vector.pxd +++ b/src/sage/libs/gsl/vector.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/vector_complex.pxd b/src/sage/libs/gsl/vector_complex.pxd index 7629f946720..a784c32880a 100644 --- a/src/sage/libs/gsl/vector_complex.pxd +++ b/src/sage/libs/gsl/vector_complex.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/wavelet.pxd b/src/sage/libs/gsl/wavelet.pxd index 2f94e13e6d9..c74052e8bfc 100644 --- a/src/sage/libs/gsl/wavelet.pxd +++ b/src/sage/libs/gsl/wavelet.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/gsl/zeta.pxd b/src/sage/libs/gsl/zeta.pxd index b89442a28fa..9b6edbd74b9 100644 --- a/src/sage/libs/gsl/zeta.pxd +++ b/src/sage/libs/gsl/zeta.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = GSL_LIBRARIES # distutils: library_dirs = GSL_LIBDIR # distutils: include_dirs = GSL_INCDIR diff --git a/src/sage/libs/homfly.pyx b/src/sage/libs/homfly.pyx index 1cc3f591f8a..550c5f02a65 100644 --- a/src/sage/libs/homfly.pyx +++ b/src/sage/libs/homfly.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-homfly # distutils: libraries = homfly gc r""" Cython wrapper for libhomfly library diff --git a/src/sage/libs/iml.pxd b/src/sage/libs/iml.pxd index 9796c931db4..274a05f4313 100644 --- a/src/sage/libs/iml.pxd +++ b/src/sage/libs/iml.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from sage.libs.gmp.types cimport mpz_t cdef extern from "iml.h": @@ -7,4 +6,4 @@ cdef extern from "iml.h": RightSolu cdef long nullspaceMP(long n, long m, const mpz_t *A, mpz_t * *mp_N_pass) - cdef void nonsingSolvLlhsMM(SOLU_POS solupos, long n, long m, mpz_t *mp_A, mpz_t *mp_B, mpz_t *mp_N, mpz_t mp_D) + cdef void nonsingSolvLlhsMM(SOLU_POS solupos, long n, long m, mpz_t *mp_A, mpz_t *mp_B, mpz_t *mp_N, mpz_t mp_D) \ No newline at end of file diff --git a/src/sage/libs/lcalc/__init__.py b/src/sage/libs/lcalc/__init__.py index 35fac988d13..e69de29bb2d 100644 --- a/src/sage/libs/lcalc/__init__.py +++ b/src/sage/libs/lcalc/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-lcalc diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pxd b/src/sage/libs/lcalc/lcalc_Lfunction.pxd index 1da49c00755..715fa46bba0 100644 --- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd +++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-lcalc cdef extern from "lcalc_sage.h": ctypedef struct doublevec "std::vector": int (*size)() diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pyx b/src/sage/libs/lcalc/lcalc_Lfunction.pyx index 88d9ecfd987..2bb8fb200ea 100644 --- a/src/sage/libs/lcalc/lcalc_Lfunction.pyx +++ b/src/sage/libs/lcalc/lcalc_Lfunction.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-lcalc # distutils: libraries = m NTL_LIBRARIES Lfunction # distutils: extra_compile_args = NTL_CFLAGS -O3 -ffast-math # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/libecm.pyx b/src/sage/libs/libecm.pyx index a9c52bde1dd..90b98bcaa1e 100644 --- a/src/sage/libs/libecm.pyx +++ b/src/sage/libs/libecm.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-libecm # distutils: libraries = ecm # distutils: extra_link_args = LINUX_NOEXECSTACK r""" diff --git a/src/sage/libs/linbox/__init__.py b/src/sage/libs/linbox/__init__.py index d3fe8dc3de9..e69de29bb2d 100644 --- a/src/sage/libs/linbox/__init__.py +++ b/src/sage/libs/linbox/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-linbox diff --git a/src/sage/libs/linbox/conversion.pxd b/src/sage/libs/linbox/conversion.pxd index fde69391470..a443431adbb 100644 --- a/src/sage/libs/linbox/conversion.pxd +++ b/src/sage/libs/linbox/conversion.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox r""" Inline conversions between LinBox and Sage diff --git a/src/sage/libs/linbox/fflas.pxd b/src/sage/libs/linbox/fflas.pxd index f962d26b000..d5b077cf045 100644 --- a/src/sage/libs/linbox/fflas.pxd +++ b/src/sage/libs/linbox/fflas.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # Issue #33153: fflas-ffpack-2.4.3 is missing a return value in one of # its functions and runs afoul of -Werror=return-type. Compounding the # problem on openSUSE tumbleweed, the CFLAGS in python's sysconfig diff --git a/src/sage/libs/linbox/givaro.pxd b/src/sage/libs/linbox/givaro.pxd index 4a1fa3beebc..e6b5a06c3b0 100644 --- a/src/sage/libs/linbox/givaro.pxd +++ b/src/sage/libs/linbox/givaro.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: extra_compile_args = GIVARO_CFLAGS # distutils: include_dirs = GIVARO_INCDIR # distutils: libraries = GIVARO_LIBRARIES FFLASFFPACK_LIBRARIES diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd index e4064118461..6792e260a34 100644 --- a/src/sage/libs/linbox/linbox.pxd +++ b/src/sage/libs/linbox/linbox.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: extra_compile_args = LINBOX_CFLAGS # distutils: include_dirs = LINBOX_INCDIR # distutils: libraries = LINBOX_LIBRARIES diff --git a/src/sage/libs/linbox/linbox_flint_interface.pxd b/src/sage/libs/linbox/linbox_flint_interface.pxd index 72cf727e886..f47d5386a01 100644 --- a/src/sage/libs/linbox/linbox_flint_interface.pxd +++ b/src/sage/libs/linbox/linbox_flint_interface.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: libraries = LINBOX_LIBRARIES # distutils: library_dirs = LINBOX_LIBDIR # distutils: extra_link_args = LINBOX_LIBEXTRA diff --git a/src/sage/libs/linbox/linbox_flint_interface.pyx b/src/sage/libs/linbox/linbox_flint_interface.pyx index e508685c9ca..ed3fa183032 100644 --- a/src/sage/libs/linbox/linbox_flint_interface.pyx +++ b/src/sage/libs/linbox/linbox_flint_interface.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox r""" Interface between flint matrices and linbox diff --git a/src/sage/libs/linkages/__init__.py b/src/sage/libs/linkages/__init__.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/libs/linkages/__init__.py +++ b/src/sage/libs/linkages/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/libs/linkages/padics/API.pxi b/src/sage/libs/linkages/padics/API.pxi index bfc8583dbbd..ec69c5bbaa3 100644 --- a/src/sage/libs/linkages/padics/API.pxi +++ b/src/sage/libs/linkages/padics/API.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file defines the common API for p-adic elements. Elements using different precision models (e.g. capped relative, diff --git a/src/sage/libs/linkages/padics/Polynomial_ram.pxi b/src/sage/libs/linkages/padics/Polynomial_ram.pxi index e02be61091c..e0584ecb8ad 100644 --- a/src/sage/libs/linkages/padics/Polynomial_ram.pxi +++ b/src/sage/libs/linkages/padics/Polynomial_ram.pxi @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" This linkage file implements the padics API for ramified extensions using Sage Polynomials. diff --git a/src/sage/libs/linkages/padics/Polynomial_shared.pxi b/src/sage/libs/linkages/padics/Polynomial_shared.pxi index 80d58c3fd52..367bbc2f33d 100644 --- a/src/sage/libs/linkages/padics/Polynomial_shared.pxi +++ b/src/sage/libs/linkages/padics/Polynomial_shared.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" This linkage file implements the padics API using Sage Polynomials. diff --git a/src/sage/libs/linkages/padics/__init__.py b/src/sage/libs/linkages/padics/__init__.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/libs/linkages/padics/__init__.py +++ b/src/sage/libs/linkages/padics/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi b/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi index 38e49a8d8fe..2171b426911 100644 --- a/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi +++ b/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This linkage file implements the API for unramified extensions of the padics using FLINT's fmpz_poly_t. diff --git a/src/sage/libs/linkages/padics/mpz.pxi b/src/sage/libs/linkages/padics/mpz.pxi index e122fee1962..3a555e441dc 100644 --- a/src/sage/libs/linkages/padics/mpz.pxi +++ b/src/sage/libs/linkages/padics/mpz.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This linkage file implements the padics API using MPIR mpz_t multiprecision integers. diff --git a/src/sage/libs/linkages/padics/relaxed/API.pxi b/src/sage/libs/linkages/padics/relaxed/API.pxi index 8ebfda5e115..4e9ea075bb2 100644 --- a/src/sage/libs/linkages/padics/relaxed/API.pxi +++ b/src/sage/libs/linkages/padics/relaxed/API.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" This file defines the common API for relaxed `p`-adic numbers. diff --git a/src/sage/libs/linkages/padics/relaxed/__init__.py b/src/sage/libs/linkages/padics/relaxed/__init__.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/libs/linkages/padics/relaxed/__init__.py +++ b/src/sage/libs/linkages/padics/relaxed/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/libs/linkages/padics/relaxed/flint.pxi b/src/sage/libs/linkages/padics/relaxed/flint.pxi index 31867021907..7085fd76ac8 100644 --- a/src/sage/libs/linkages/padics/relaxed/flint.pxi +++ b/src/sage/libs/linkages/padics/relaxed/flint.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" This linkage file implements the relaxed padics API using flint. diff --git a/src/sage/libs/linkages/padics/unram_shared.pxi b/src/sage/libs/linkages/padics/unram_shared.pxi index c82f9be18ec..7ffbebc5f52 100644 --- a/src/sage/libs/linkages/padics/unram_shared.pxi +++ b/src/sage/libs/linkages/padics/unram_shared.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari cimport cython @cython.binding(True) diff --git a/src/sage/libs/lrcalc/__init__.py b/src/sage/libs/lrcalc/__init__.py index 28c48d66b20..e69de29bb2d 100644 --- a/src/sage/libs/lrcalc/__init__.py +++ b/src/sage/libs/lrcalc/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-combinat diff --git a/src/sage/libs/lrcalc/lrcalc.py b/src/sage/libs/lrcalc/lrcalc.py index ec5942a5789..cd9248f59d9 100644 --- a/src/sage/libs/lrcalc/lrcalc.py +++ b/src/sage/libs/lrcalc/lrcalc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" An interface to Anders Buch's Littlewood-Richardson Calculator ``lrcalc`` diff --git a/src/sage/libs/m4ri.pxd b/src/sage/libs/m4ri.pxd index 5a55204b7c4..a9c6c792c05 100644 --- a/src/sage/libs/m4ri.pxd +++ b/src/sage/libs/m4ri.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: extra_compile_args = -std=c++11 # distutils: language = c++ diff --git a/src/sage/libs/m4rie.pxd b/src/sage/libs/m4rie.pxd index f769003b8f5..4bc99aba4d7 100644 --- a/src/sage/libs/m4rie.pxd +++ b/src/sage/libs/m4rie.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox ############################################################################## # Copyright (C) 2010 Martin Albrecht # Distributed under the terms of the GNU General Public License (GPL) diff --git a/src/sage/libs/mpc/__init__.pxd b/src/sage/libs/mpc/__init__.pxd index 7f27ba719e8..4930a636c41 100644 --- a/src/sage/libs/mpc/__init__.pxd +++ b/src/sage/libs/mpc/__init__.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = gmp mpfr mpc from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/mpc/types.pxd b/src/sage/libs/mpc/types.pxd index 2221e931726..72565c08630 100644 --- a/src/sage/libs/mpc/types.pxd +++ b/src/sage/libs/mpc/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.mpfr.types cimport mpfr_t cdef extern from "mpc.h": diff --git a/src/sage/libs/mpfi/__init__.pxd b/src/sage/libs/mpfi/__init__.pxd index 1c83243299e..b55a5129d18 100644 --- a/src/sage/libs/mpfi/__init__.pxd +++ b/src/sage/libs/mpfi/__init__.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = gmp mpfr mpfi from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/mpfi/types.pxd b/src/sage/libs/mpfi/types.pxd index efc8552675e..073a2e719ac 100644 --- a/src/sage/libs/mpfi/types.pxd +++ b/src/sage/libs/mpfi/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.mpfr.types cimport __mpfr_struct cdef extern from "mpfi.h": diff --git a/src/sage/libs/mpfr/__init__.pxd b/src/sage/libs/mpfr/__init__.pxd index a6c222d600f..facac9aa6c7 100644 --- a/src/sage/libs/mpfr/__init__.pxd +++ b/src/sage/libs/mpfr/__init__.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: libraries = gmp mpfr from sage.libs.gmp.types cimport * diff --git a/src/sage/libs/mpfr/types.pxd b/src/sage/libs/mpfr/types.pxd index 9cfbc0e96fd..45f8a161361 100644 --- a/src/sage/libs/mpfr/types.pxd +++ b/src/sage/libs/mpfr/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gmp.types cimport mp_limb_t cdef extern from "mpfr.h": diff --git a/src/sage/libs/mpmath/all.py b/src/sage/libs/mpmath/all.py index 87a32ed5014..cae40f79314 100644 --- a/src/sage/libs/mpmath/all.py +++ b/src/sage/libs/mpmath/all.py @@ -1,8 +1,7 @@ -# sage_setup: distribution = sagemath-mpmath import mpmath # Patch mpmath to use Cythonized functions -from sage.libs.mpmath import utils as _utils +from . import utils as _utils # Also import internal functions from mpmath.libmp import * @@ -11,17 +10,16 @@ from mpmath import * # Utilities -from sage.libs.mpmath.utils import call, mpmath_to_sage, sage_to_mpmath +from .utils import call, mpmath_to_sage, sage_to_mpmath # Use mpmath internal functions for constants, to avoid unnecessary overhead _constants_funcs = { - 'glaisher': glaisher_fixed, - 'khinchin': khinchin_fixed, - 'twinprime': twinprime_fixed, - 'mertens': mertens_fixed + 'glaisher': glaisher_fixed, + 'khinchin': khinchin_fixed, + 'twinprime': twinprime_fixed, + 'mertens': mertens_fixed } - def eval_constant(name, ring): prec = ring.precision() + 20 return ring(_constants_funcs[name](prec)) >> prec diff --git a/src/sage/libs/mpmath/ext_impl.pxd b/src/sage/libs/mpmath/ext_impl.pxd index d4ff28112f2..586d10d17f2 100644 --- a/src/sage/libs/mpmath/ext_impl.pxd +++ b/src/sage/libs/mpmath/ext_impl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-mpmath from sage.libs.gmp.all cimport mpz_t ctypedef struct MPopts: diff --git a/src/sage/libs/mpmath/ext_impl.pyx b/src/sage/libs/mpmath/ext_impl.pyx index d9ed3bda4bb..0d57c8f2882 100644 --- a/src/sage/libs/mpmath/ext_impl.pyx +++ b/src/sage/libs/mpmath/ext_impl.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-mpmath """ This module provides the core implementation of multiprecision floating-point arithmetic. Operations are done in-place. diff --git a/src/sage/libs/mpmath/ext_libmp.pyx b/src/sage/libs/mpmath/ext_libmp.pyx index d59d1d268cd..10d1b32eb36 100644 --- a/src/sage/libs/mpmath/ext_libmp.pyx +++ b/src/sage/libs/mpmath/ext_libmp.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-mpmath """ Faster versions of some key functions in mpmath.libmp """ diff --git a/src/sage/libs/mpmath/ext_main.pxd b/src/sage/libs/mpmath/ext_main.pxd index ea3f7bba6d4..8a3bf740b0e 100644 --- a/src/sage/libs/mpmath/ext_main.pxd +++ b/src/sage/libs/mpmath/ext_main.pxd @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-mpmath from sage.libs.mpmath.ext_impl cimport * diff --git a/src/sage/libs/mpmath/ext_main.pyx b/src/sage/libs/mpmath/ext_main.pyx index 19462b1d21e..36a035f7570 100644 --- a/src/sage/libs/mpmath/ext_main.pyx +++ b/src/sage/libs/mpmath/ext_main.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-mpmath """ mpmath floating-point numbers diff --git a/src/sage/libs/mpmath/utils.pyx b/src/sage/libs/mpmath/utils.pyx index 7d98a5fd324..b7a4f532823 100644 --- a/src/sage/libs/mpmath/utils.pyx +++ b/src/sage/libs/mpmath/utils.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-mpmath """ Utilities for Sage-mpmath interaction diff --git a/src/sage/libs/ntl/GF2.pxd b/src/sage/libs/ntl/GF2.pxd index 1d5d9ea49d7..5be7f496766 100644 --- a/src/sage/libs/ntl/GF2.pxd +++ b/src/sage/libs/ntl/GF2.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2_c diff --git a/src/sage/libs/ntl/GF2E.pxd b/src/sage/libs/ntl/GF2E.pxd index 901df87a4ef..5a72efec6a4 100644 --- a/src/sage/libs/ntl/GF2E.pxd +++ b/src/sage/libs/ntl/GF2E.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2E_c, GF2X_c, GF2_c, GF2XModulus_c, ZZ_c diff --git a/src/sage/libs/ntl/GF2EX.pxd b/src/sage/libs/ntl/GF2EX.pxd index 4648aaa7429..4a0df45c9f1 100644 --- a/src/sage/libs/ntl/GF2EX.pxd +++ b/src/sage/libs/ntl/GF2EX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2EX_c diff --git a/src/sage/libs/ntl/GF2X.pxd b/src/sage/libs/ntl/GF2X.pxd index e3da7f38126..9342f63244c 100644 --- a/src/sage/libs/ntl/GF2X.pxd +++ b/src/sage/libs/ntl/GF2X.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2X_c, GF2_c, GF2XModulus_c, vec_GF2_c, ZZ_c diff --git a/src/sage/libs/ntl/ZZ.pxd b/src/sage/libs/ntl/ZZ.pxd index faf139e6848..fc8901fc31a 100644 --- a/src/sage/libs/ntl/ZZ.pxd +++ b/src/sage/libs/ntl/ZZ.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport ZZ_c diff --git a/src/sage/libs/ntl/ZZX.pxd b/src/sage/libs/ntl/ZZX.pxd index e5511934cca..bc2780e3a83 100644 --- a/src/sage/libs/ntl/ZZX.pxd +++ b/src/sage/libs/ntl/ZZX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.gmp.types cimport mpz_t diff --git a/src/sage/libs/ntl/ZZ_p.pxd b/src/sage/libs/ntl/ZZ_p.pxd index 0611bc4e1b6..1d7d95e4007 100644 --- a/src/sage/libs/ntl/ZZ_p.pxd +++ b/src/sage/libs/ntl/ZZ_p.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport ZZ_c, ZZ_p_c diff --git a/src/sage/libs/ntl/ZZ_pE.pxd b/src/sage/libs/ntl/ZZ_pE.pxd index f8842659911..bdfb04cb783 100644 --- a/src/sage/libs/ntl/ZZ_pE.pxd +++ b/src/sage/libs/ntl/ZZ_pE.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport ZZ_c, ZZ_p_c, ZZ_pX_c, ZZ_pE_c diff --git a/src/sage/libs/ntl/ZZ_pEX.pxd b/src/sage/libs/ntl/ZZ_pEX.pxd index e5f2b12d62e..78be3ee13ea 100644 --- a/src/sage/libs/ntl/ZZ_pEX.pxd +++ b/src/sage/libs/ntl/ZZ_pEX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport (ZZ_c, ZZ_p_c, ZZ_pContext_c, ZZ_pE_c, vec_ZZ_p_c, diff --git a/src/sage/libs/ntl/ZZ_pX.pxd b/src/sage/libs/ntl/ZZ_pX.pxd index d54625fcebf..8c9f609f1cd 100644 --- a/src/sage/libs/ntl/ZZ_pX.pxd +++ b/src/sage/libs/ntl/ZZ_pX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport (ZZ_c, ZZX_c, ZZ_p_c, vec_ZZ_p_c, ZZ_pContext_c, diff --git a/src/sage/libs/ntl/__init__.py b/src/sage/libs/ntl/__init__.py index ba2e4477f9f..0ab0a2c43e7 100644 --- a/src/sage/libs/ntl/__init__.py +++ b/src/sage/libs/ntl/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.error import setup_NTL_error_callback setup_NTL_error_callback() diff --git a/src/sage/libs/ntl/all.py b/src/sage/libs/ntl/all.py index ade13735e1f..e9d4271879a 100644 --- a/src/sage/libs/ntl/all.py +++ b/src/sage/libs/ntl/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl r""" Victor Shoup's NTL C++ Library @@ -30,12 +29,12 @@ from sage.libs.ntl.ntl_ZZ_pContext import ntl_ZZ_pContext as ZZ_pContext from sage.libs.ntl.ntl_ZZ_p import ( - ntl_ZZ_p as ZZ_p, - ntl_ZZ_p_random_element as ZZ_p_random) + ntl_ZZ_p as ZZ_p, + ntl_ZZ_p_random_element as ZZ_p_random ) from sage.libs.ntl.ntl_ZZX import ( - ntl_ZZX as ZZX, - zero_ZZX, one_ZZX) + ntl_ZZX as ZZX, + zero_ZZX, one_ZZX ) from sage.libs.ntl.ntl_ZZ_pX import ntl_ZZ_pX as ZZ_pX diff --git a/src/sage/libs/ntl/conversion.pxd b/src/sage/libs/ntl/conversion.pxd index a24de983a12..e46cc66284e 100644 --- a/src/sage/libs/ntl/conversion.pxd +++ b/src/sage/libs/ntl/conversion.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl r""" Inline conversions between NTL and Sage diff --git a/src/sage/libs/ntl/convert.pxd b/src/sage/libs/ntl/convert.pxd index 42d2f01dc1b..58420abb94c 100644 --- a/src/sage/libs/ntl/convert.pxd +++ b/src/sage/libs/ntl/convert.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_c from sage.libs.gmp.types cimport mpz_t, mpz_srcptr diff --git a/src/sage/libs/ntl/convert.pyx b/src/sage/libs/ntl/convert.pyx index 3002ce3061d..5924c9f2e79 100644 --- a/src/sage/libs/ntl/convert.pyx +++ b/src/sage/libs/ntl/convert.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/libs/ntl/decl.pxi b/src/sage/libs/ntl/decl.pxi index 79b9592d199..ae4eb5500f5 100644 --- a/src/sage/libs/ntl/decl.pxi +++ b/src/sage/libs/ntl/decl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport * from sage.libs.ntl.ZZ cimport * from sage.libs.ntl.ZZ_pX cimport * diff --git a/src/sage/libs/ntl/error.pyx b/src/sage/libs/ntl/error.pyx index 54693d1c87f..c729cd4c1fb 100644 --- a/src/sage/libs/ntl/error.pyx +++ b/src/sage/libs/ntl/error.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = ntl gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/lzz_p.pxd b/src/sage/libs/ntl/lzz_p.pxd index 3d30b2f38c4..14d81bc8ab0 100644 --- a/src/sage/libs/ntl/lzz_p.pxd +++ b/src/sage/libs/ntl/lzz_p.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport zz_p_c diff --git a/src/sage/libs/ntl/lzz_pX.pxd b/src/sage/libs/ntl/lzz_pX.pxd index e747309ceb9..72905fd1d54 100644 --- a/src/sage/libs/ntl/lzz_pX.pxd +++ b/src/sage/libs/ntl/lzz_pX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from sage.libs.ntl.types cimport ZZ_c, zz_p_c, zz_pX_c, zz_pX_Modulus_c diff --git a/src/sage/libs/ntl/mat_GF2.pxd b/src/sage/libs/ntl/mat_GF2.pxd index 0405a90c646..db535d800fc 100644 --- a/src/sage/libs/ntl/mat_GF2.pxd +++ b/src/sage/libs/ntl/mat_GF2.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport mat_GF2_c, vec_GF2_c, GF2_c diff --git a/src/sage/libs/ntl/mat_GF2E.pxd b/src/sage/libs/ntl/mat_GF2E.pxd index c6d2c615dbd..e6c3b5fc622 100644 --- a/src/sage/libs/ntl/mat_GF2E.pxd +++ b/src/sage/libs/ntl/mat_GF2E.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport mat_GF2E_c, vec_GF2E_c, GF2E_c diff --git a/src/sage/libs/ntl/mat_ZZ.pxd b/src/sage/libs/ntl/mat_ZZ.pxd index a33fc2b1a1a..a676c90fb1b 100644 --- a/src/sage/libs/ntl/mat_ZZ.pxd +++ b/src/sage/libs/ntl/mat_ZZ.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport mat_ZZ_c, ZZ_c, ZZX_c diff --git a/src/sage/libs/ntl/misc.pxi b/src/sage/libs/ntl/misc.pxi index 3f6a69149d2..e9dcd9807b0 100644 --- a/src/sage/libs/ntl/misc.pxi +++ b/src/sage/libs/ntl/misc.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h from cysignals.memory cimport sig_free diff --git a/src/sage/libs/ntl/ntl_GF2.pxd b/src/sage/libs/ntl/ntl_GF2.pxd index 1f388a00ff0..2be873c950c 100644 --- a/src/sage/libs/ntl/ntl_GF2.pxd +++ b/src/sage/libs/ntl/ntl_GF2.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2_c cdef class ntl_GF2(): diff --git a/src/sage/libs/ntl/ntl_GF2.pyx b/src/sage/libs/ntl/ntl_GF2.pyx index 9933db5ffe9..9d4d8a0b5e4 100644 --- a/src/sage/libs/ntl/ntl_GF2.pyx +++ b/src/sage/libs/ntl/ntl_GF2.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_GF2E.pxd b/src/sage/libs/ntl/ntl_GF2E.pxd index fd3825f9b37..c36292c8748 100644 --- a/src/sage/libs/ntl/ntl_GF2E.pxd +++ b/src/sage/libs/ntl/ntl_GF2E.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2E_c from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class diff --git a/src/sage/libs/ntl/ntl_GF2E.pyx b/src/sage/libs/ntl/ntl_GF2E.pyx index f452aadf609..e162f21ddc9 100644 --- a/src/sage/libs/ntl/ntl_GF2E.pyx +++ b/src/sage/libs/ntl/ntl_GF2E.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_GF2EContext.pxd b/src/sage/libs/ntl/ntl_GF2EContext.pxd index c7256683a56..01fc4676e58 100644 --- a/src/sage/libs/ntl/ntl_GF2EContext.pxd +++ b/src/sage/libs/ntl/ntl_GF2EContext.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2EContext_c from sage.libs.ntl.ntl_GF2X cimport ntl_GF2X diff --git a/src/sage/libs/ntl/ntl_GF2EContext.pyx b/src/sage/libs/ntl/ntl_GF2EContext.pyx index 5ee4bbbc249..ad3b08aa9dc 100644 --- a/src/sage/libs/ntl/ntl_GF2EContext.pyx +++ b/src/sage/libs/ntl/ntl_GF2EContext.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_GF2EX.pxd b/src/sage/libs/ntl/ntl_GF2EX.pxd index 5113ee1f612..becd89a9c57 100644 --- a/src/sage/libs/ntl/ntl_GF2EX.pxd +++ b/src/sage/libs/ntl/ntl_GF2EX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2EX_c from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class from sage.libs.ntl.ntl_GF2E cimport ntl_GF2E diff --git a/src/sage/libs/ntl/ntl_GF2EX.pyx b/src/sage/libs/ntl/ntl_GF2EX.pyx index ecdbba594d0..0b7beb873df 100644 --- a/src/sage/libs/ntl/ntl_GF2EX.pyx +++ b/src/sage/libs/ntl/ntl_GF2EX.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_GF2X.pxd b/src/sage/libs/ntl/ntl_GF2X.pxd index f72db7c0404..8d50c9d17d8 100644 --- a/src/sage/libs/ntl/ntl_GF2X.pxd +++ b/src/sage/libs/ntl/ntl_GF2X.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2X_c cdef class ntl_GF2X(): diff --git a/src/sage/libs/ntl/ntl_GF2X.pyx b/src/sage/libs/ntl/ntl_GF2X.pyx index 57329a65e90..5e6ef736763 100644 --- a/src/sage/libs/ntl/ntl_GF2X.pyx +++ b/src/sage/libs/ntl/ntl_GF2X.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_GF2X_linkage.pxi b/src/sage/libs/ntl/ntl_GF2X_linkage.pxi index ea29db53969..8f5edce14c1 100644 --- a/src/sage/libs/ntl/ntl_GF2X_linkage.pxi +++ b/src/sage/libs/ntl/ntl_GF2X_linkage.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl r""" Linkage for arithmetic with NTL's GF2X elements. diff --git a/src/sage/libs/ntl/ntl_ZZ.pxd b/src/sage/libs/ntl/ntl_ZZ.pxd index bab369973a5..2ada3d8398c 100644 --- a/src/sage/libs/ntl/ntl_ZZ.pxd +++ b/src/sage/libs/ntl/ntl_ZZ.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_c cdef class ntl_ZZ(): diff --git a/src/sage/libs/ntl/ntl_ZZ.pyx b/src/sage/libs/ntl/ntl_ZZ.pyx index 68d1a0cb4c8..3f4a412a5e1 100644 --- a/src/sage/libs/ntl/ntl_ZZ.pyx +++ b/src/sage/libs/ntl/ntl_ZZ.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZX.pxd b/src/sage/libs/ntl/ntl_ZZX.pxd index 287d3fec8af..63e588c1d42 100644 --- a/src/sage/libs/ntl/ntl_ZZX.pxd +++ b/src/sage/libs/ntl/ntl_ZZX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZX_c cdef class ntl_ZZX(): diff --git a/src/sage/libs/ntl/ntl_ZZX.pyx b/src/sage/libs/ntl/ntl_ZZX.pyx index 4e142c3cff8..3e23bcd1250 100644 --- a/src/sage/libs/ntl/ntl_ZZX.pyx +++ b/src/sage/libs/ntl/ntl_ZZX.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZ_p.pxd b/src/sage/libs/ntl/ntl_ZZ_p.pxd index 9a15f92452c..8bac6e012e4 100644 --- a/src/sage/libs/ntl/ntl_ZZ_p.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_p.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_p_c from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class diff --git a/src/sage/libs/ntl/ntl_ZZ_p.pyx b/src/sage/libs/ntl/ntl_ZZ_p.pyx index c804b8a7f8b..f4e84667d2b 100644 --- a/src/sage/libs/ntl/ntl_ZZ_p.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_p.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZ_pContext.pxd b/src/sage/libs/ntl/ntl_ZZ_pContext.pxd index 1224b0900b8..1cab7b77e35 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pContext.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pContext.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_pContext_c from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ from sage.libs.ntl.types cimport ZZ_c diff --git a/src/sage/libs/ntl/ntl_ZZ_pContext.pyx b/src/sage/libs/ntl/ntl_ZZ_pContext.pyx index e8a277f296a..38f211a5ea1 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pContext.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pContext.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZ_pE.pxd b/src/sage/libs/ntl/ntl_ZZ_pE.pxd index 965b531d702..c60eaba4ad5 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pE.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pE.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_pE_c from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX diff --git a/src/sage/libs/ntl/ntl_ZZ_pE.pyx b/src/sage/libs/ntl/ntl_ZZ_pE.pyx index 1f202626a43..00644a8bd84 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pE.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pE.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZ_pEContext.pxd b/src/sage/libs/ntl/ntl_ZZ_pEContext.pxd index 8db9e1e8741..70041817a63 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pEContext.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pEContext.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_pContext_c, ZZ_pEContext_c from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX diff --git a/src/sage/libs/ntl/ntl_ZZ_pEContext.pyx b/src/sage/libs/ntl/ntl_ZZ_pEContext.pyx index 01a5260fe5e..03ff00f21d4 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pEContext.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pEContext.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZ_pEX.pxd b/src/sage/libs/ntl/ntl_ZZ_pEX.pxd index 10c3b0a4627..b56b85519a3 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pEX.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pEX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_pEX_c from sage.libs.ntl.ntl_ZZ_pEContext cimport ntl_ZZ_pEContext_class diff --git a/src/sage/libs/ntl/ntl_ZZ_pEX.pyx b/src/sage/libs/ntl/ntl_ZZ_pEX.pyx index ea323040d72..c12df77c2f0 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pEX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pEX.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi b/src/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi index 62027822f20..76ec8770f3f 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi +++ b/src/sage/libs/ntl/ntl_ZZ_pEX_linkage.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl r""" Linkage for arithmetic with NTL's ZZ_pEX elements. diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pxd b/src/sage/libs/ntl/ntl_ZZ_pX.pxd index 62b98f25e21..d02596b5128 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pxd +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.ZZ_pX cimport * from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class diff --git a/src/sage/libs/ntl/ntl_ZZ_pX.pyx b/src/sage/libs/ntl/ntl_ZZ_pX.pyx index 5de5ae27c92..c93d263cb10 100644 --- a/src/sage/libs/ntl/ntl_ZZ_pX.pyx +++ b/src/sage/libs/ntl/ntl_ZZ_pX.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_lzz_p.pxd b/src/sage/libs/ntl/ntl_lzz_p.pxd index dd35d65da88..6e8c43d8997 100644 --- a/src/sage/libs/ntl/ntl_lzz_p.pxd +++ b/src/sage/libs/ntl/ntl_lzz_p.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.lzz_p cimport * from sage.libs.ntl.ntl_lzz_pContext cimport ntl_zz_pContext_class diff --git a/src/sage/libs/ntl/ntl_lzz_p.pyx b/src/sage/libs/ntl/ntl_lzz_p.pyx index 2188192156f..af86b9bcf69 100644 --- a/src/sage/libs/ntl/ntl_lzz_p.pyx +++ b/src/sage/libs/ntl/ntl_lzz_p.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_lzz_pContext.pxd b/src/sage/libs/ntl/ntl_lzz_pContext.pxd index 075f7dfbfdf..3fd7452197d 100644 --- a/src/sage/libs/ntl/ntl_lzz_pContext.pxd +++ b/src/sage/libs/ntl/ntl_lzz_pContext.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport zz_pContext_c cdef class ntl_zz_pContext_class(): diff --git a/src/sage/libs/ntl/ntl_lzz_pContext.pyx b/src/sage/libs/ntl/ntl_lzz_pContext.pyx index 97751af9741..2c1c941b9e8 100644 --- a/src/sage/libs/ntl/ntl_lzz_pContext.pyx +++ b/src/sage/libs/ntl/ntl_lzz_pContext.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_lzz_pX.pxd b/src/sage/libs/ntl/ntl_lzz_pX.pxd index 5684627847d..3ab79084299 100644 --- a/src/sage/libs/ntl/ntl_lzz_pX.pxd +++ b/src/sage/libs/ntl/ntl_lzz_pX.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.lzz_p cimport * from sage.libs.ntl.lzz_pX cimport * diff --git a/src/sage/libs/ntl/ntl_lzz_pX.pyx b/src/sage/libs/ntl/ntl_lzz_pX.pyx index 9fc6f22c9d5..7d19cc55e37 100644 --- a/src/sage/libs/ntl/ntl_lzz_pX.pyx +++ b/src/sage/libs/ntl/ntl_lzz_pX.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_mat_GF2.pxd b/src/sage/libs/ntl/ntl_mat_GF2.pxd index 63fdbdd41b9..5617ef98915 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2.pxd +++ b/src/sage/libs/ntl/ntl_mat_GF2.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport mat_GF2_c from sage.libs.ntl.ntl_GF2 cimport ntl_GF2 diff --git a/src/sage/libs/ntl/ntl_mat_GF2.pyx b/src/sage/libs/ntl/ntl_mat_GF2.pyx index 87cc2b56795..318747e9ade 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2.pyx +++ b/src/sage/libs/ntl/ntl_mat_GF2.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_mat_GF2E.pxd b/src/sage/libs/ntl/ntl_mat_GF2E.pxd index 47748a341b7..fbb58382368 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2E.pxd +++ b/src/sage/libs/ntl/ntl_mat_GF2E.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport mat_GF2E_c from sage.libs.ntl.ntl_GF2EContext cimport ntl_GF2EContext_class from sage.libs.ntl.ntl_GF2E cimport ntl_GF2E diff --git a/src/sage/libs/ntl/ntl_mat_GF2E.pyx b/src/sage/libs/ntl/ntl_mat_GF2E.pyx index 67875771ea5..7ab9b92c020 100644 --- a/src/sage/libs/ntl/ntl_mat_GF2E.pyx +++ b/src/sage/libs/ntl/ntl_mat_GF2E.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_mat_ZZ.pxd b/src/sage/libs/ntl/ntl_mat_ZZ.pxd index bb51160564a..472ef698704 100644 --- a/src/sage/libs/ntl/ntl_mat_ZZ.pxd +++ b/src/sage/libs/ntl/ntl_mat_ZZ.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport mat_ZZ_c cdef class ntl_mat_ZZ(): diff --git a/src/sage/libs/ntl/ntl_mat_ZZ.pyx b/src/sage/libs/ntl/ntl_mat_ZZ.pyx index 89968c7e46f..ed4e012bb33 100644 --- a/src/sage/libs/ntl/ntl_mat_ZZ.pyx +++ b/src/sage/libs/ntl/ntl_mat_ZZ.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/libs/ntl/ntl_tools.pxd b/src/sage/libs/ntl/ntl_tools.pxd index ae88c987f42..3cb8c0567f2 100644 --- a/src/sage/libs/ntl/ntl_tools.pxd +++ b/src/sage/libs/ntl/ntl_tools.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-ntl cdef extern from "NTL/tools.h" namespace "NTL": void (*ErrorMsgCallback)(const char *) except * diff --git a/src/sage/libs/ntl/types.pxd b/src/sage/libs/ntl/types.pxd index ed7f61beddb..22e16968943 100644 --- a/src/sage/libs/ntl/types.pxd +++ b/src/sage/libs/ntl/types.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: depends = NTL/ZZ.h cdef extern from "ntlwrap.h": diff --git a/src/sage/libs/ntl/vec_GF2.pxd b/src/sage/libs/ntl/vec_GF2.pxd index 38d1751410d..81a3736b49f 100644 --- a/src/sage/libs/ntl/vec_GF2.pxd +++ b/src/sage/libs/ntl/vec_GF2.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport vec_GF2_c, GF2_c diff --git a/src/sage/libs/ntl/vec_GF2E.pxd b/src/sage/libs/ntl/vec_GF2E.pxd index 2d0d6436d51..8e53bad0517 100644 --- a/src/sage/libs/ntl/vec_GF2E.pxd +++ b/src/sage/libs/ntl/vec_GF2E.pxd @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport vec_GF2E_c diff --git a/src/sage/libs/pari/__init__.py b/src/sage/libs/pari/__init__.py index 9ece55f0ba3..44d159ef3c1 100644 --- a/src/sage/libs/pari/__init__.py +++ b/src/sage/libs/pari/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.rings.real_mpfr """ Interface between Sage and PARI diff --git a/src/sage/libs/pari/all.py b/src/sage/libs/pari/all.py index dff1eaf985f..8bcf5d827df 100644 --- a/src/sage/libs/pari/all.py +++ b/src/sage/libs/pari/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen import Gen as pari_gen from cypari2 import PariError -from sage.libs.pari import pari +from . import pari diff --git a/src/sage/libs/pari/all__sagemath_flint.py b/src/sage/libs/pari/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/libs/pari/convert_flint.pxd b/src/sage/libs/pari/convert_flint.pxd index cce1636463a..c139703b9a5 100644 --- a/src/sage/libs/pari/convert_flint.pxd +++ b/src/sage/libs/pari/convert_flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from cypari2.types cimport GEN from cypari2.gen cimport Gen from sage.libs.flint.types cimport fmpz_t, fmpz_mat_t, fmpq_t, fmpq_mat_t diff --git a/src/sage/libs/pari/convert_flint.pyx b/src/sage/libs/pari/convert_flint.pyx index 59aee3b93f9..fe0e4f7648d 100644 --- a/src/sage/libs/pari/convert_flint.pyx +++ b/src/sage/libs/pari/convert_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Convert PARI objects to/from Flint objects diff --git a/src/sage/libs/pari/convert_gmp.pxd b/src/sage/libs/pari/convert_gmp.pxd index 3c087f57ec9..8e984eedce8 100644 --- a/src/sage/libs/pari/convert_gmp.pxd +++ b/src/sage/libs/pari/convert_gmp.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.types cimport GEN from cypari2.gen cimport Gen from sage.libs.gmp.types cimport mpz_t, mpq_t, mpz_ptr, mpq_ptr diff --git a/src/sage/libs/pari/convert_gmp.pyx b/src/sage/libs/pari/convert_gmp.pyx index 05e81de8b22..9162f7d9a27 100644 --- a/src/sage/libs/pari/convert_gmp.pyx +++ b/src/sage/libs/pari/convert_gmp.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Convert PARI objects to/from GMP objects diff --git a/src/sage/libs/pari/convert_sage.pxd b/src/sage/libs/pari/convert_sage.pxd index ee45f16fe33..ef80ff4030f 100644 --- a/src/sage/libs/pari/convert_sage.pxd +++ b/src/sage/libs/pari/convert_sage.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen cimport Gen from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational diff --git a/src/sage/libs/pari/convert_sage.pyx b/src/sage/libs/pari/convert_sage.pyx index be14c4a8ff0..a163dbf2b33 100644 --- a/src/sage/libs/pari/convert_sage.pyx +++ b/src/sage/libs/pari/convert_sage.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Convert PARI objects to Sage types """ diff --git a/src/sage/libs/pari/convert_sage_complex_double.pxd b/src/sage/libs/pari/convert_sage_complex_double.pxd index 8511c788eec..51299d77759 100644 --- a/src/sage/libs/pari/convert_sage_complex_double.pxd +++ b/src/sage/libs/pari/convert_sage_complex_double.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen cimport Gen from sage.rings.complex_double cimport ComplexDoubleElement diff --git a/src/sage/libs/pari/convert_sage_complex_double.pyx b/src/sage/libs/pari/convert_sage_complex_double.pyx index 18ab028ae63..d7d7c5333a1 100644 --- a/src/sage/libs/pari/convert_sage_complex_double.pyx +++ b/src/sage/libs/pari/convert_sage_complex_double.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.rings.complex_double from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/pari/convert_sage_matrix.pyx b/src/sage/libs/pari/convert_sage_matrix.pyx index d686d2b6164..1efcea03e72 100644 --- a/src/sage/libs/pari/convert_sage_matrix.pyx +++ b/src/sage/libs/pari/convert_sage_matrix.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.modules from cypari2.gen cimport Gen diff --git a/src/sage/libs/pari/convert_sage_real_double.pxd b/src/sage/libs/pari/convert_sage_real_double.pxd index d72730f0770..12fa7418e69 100644 --- a/src/sage/libs/pari/convert_sage_real_double.pxd +++ b/src/sage/libs/pari/convert_sage_real_double.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen cimport Gen from sage.rings.real_double cimport RealDoubleElement diff --git a/src/sage/libs/pari/convert_sage_real_double.pyx b/src/sage/libs/pari/convert_sage_real_double.pyx index 8a81836407e..6d7ffe7038e 100644 --- a/src/sage/libs/pari/convert_sage_real_double.pyx +++ b/src/sage/libs/pari/convert_sage_real_double.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.convert cimport new_gen_from_double cpdef Gen new_gen_from_real_double_element(RealDoubleElement self): diff --git a/src/sage/libs/pari/convert_sage_real_mpfr.pxd b/src/sage/libs/pari/convert_sage_real_mpfr.pxd index 73d8260d4e6..34fbd2bbe45 100644 --- a/src/sage/libs/pari/convert_sage_real_mpfr.pxd +++ b/src/sage/libs/pari/convert_sage_real_mpfr.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen cimport Gen from sage.rings.real_mpfr cimport RealNumber diff --git a/src/sage/libs/pari/convert_sage_real_mpfr.pyx b/src/sage/libs/pari/convert_sage_real_mpfr.pyx index 312aec30473..4546c3def24 100644 --- a/src/sage/libs/pari/convert_sage_real_mpfr.pyx +++ b/src/sage/libs/pari/convert_sage_real_mpfr.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.rings.real_mpfr from cypari2.stack cimport new_gen diff --git a/src/sage/libs/pari/misc.pxd b/src/sage/libs/pari/misc.pxd index 710ffefb6ca..ae89aff0b84 100644 --- a/src/sage/libs/pari/misc.pxd +++ b/src/sage/libs/pari/misc.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen cimport Gen cdef Gen new_t_POL_from_int_star(int* vals, unsigned long length, long varnum) diff --git a/src/sage/libs/pari/misc.pyx b/src/sage/libs/pari/misc.pyx index 45d265e0d62..1ed774d417c 100644 --- a/src/sage/libs/pari/misc.pyx +++ b/src/sage/libs/pari/misc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cysignals.signals cimport sig_on from cypari2.paridecl cimport * from cypari2.stack cimport new_gen diff --git a/src/sage/libs/pari/tests.py b/src/sage/libs/pari/tests.py index e46281c1ef2..43018a338d6 100644 --- a/src/sage/libs/pari/tests.py +++ b/src/sage/libs/pari/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Tests for the Sage <-> PARI interface diff --git a/src/sage/libs/polybori/__init__.pxd b/src/sage/libs/polybori/__init__.pxd index bc6ce2d1ff6..361d7520c13 100644 --- a/src/sage/libs/polybori/__init__.pxd +++ b/src/sage/libs/polybori/__init__.pxd @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-brial # Insert a comment here to prevent repo corruption. diff --git a/src/sage/libs/polybori/decl.pxd b/src/sage/libs/polybori/decl.pxd index b516710851c..dd6a3aaf0b6 100644 --- a/src/sage/libs/polybori/decl.pxd +++ b/src/sage/libs/polybori/decl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial # distutils: language = c++ # distutils: extra_compile_args = -std=c++11 diff --git a/src/sage/libs/pynac/__init__.py b/src/sage/libs/pynac/__init__.py index 332eaf1cdb6..e69de29bb2d 100644 --- a/src/sage/libs/pynac/__init__.py +++ b/src/sage/libs/pynac/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-symbolics diff --git a/src/sage/libs/pynac/pynac.py b/src/sage/libs/pynac/pynac.py index dbc8660b51c..ae39f63c4c2 100644 --- a/src/sage/libs/pynac/pynac.py +++ b/src/sage/libs/pynac/pynac.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Interface to the pynac library (deprecated module) diff --git a/src/sage/libs/singular/__init__.py b/src/sage/libs/singular/__init__.py index 84ec2b51067..e69de29bb2d 100644 --- a/src/sage/libs/singular/__init__.py +++ b/src/sage/libs/singular/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-singular diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd index 27ddad438fc..e36216d6395 100644 --- a/src/sage/libs/singular/decl.pxd +++ b/src/sage/libs/singular/decl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # distutils: include_dirs = SINGULAR_INCDIR # distutils: extra_compile_args = SINGULAR_CFLAGS # distutils: libraries = SINGULAR_LIBRARIES diff --git a/src/sage/libs/singular/function.pxd b/src/sage/libs/singular/function.pxd index 1f680cafcfb..facdcae674a 100644 --- a/src/sage/libs/singular/function.pxd +++ b/src/sage/libs/singular/function.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Direct Access to Singular's Functions via libSingular diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx index 4d551b3a82f..4a5ab6d78f6 100644 --- a/src/sage/libs/singular/function.pyx +++ b/src/sage/libs/singular/function.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ libSingular: Functions diff --git a/src/sage/libs/singular/function_factory.py b/src/sage/libs/singular/function_factory.py index 09d45a85e97..c4b0b52372f 100644 --- a/src/sage/libs/singular/function_factory.py +++ b/src/sage/libs/singular/function_factory.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ libSingular: Function Factory diff --git a/src/sage/libs/singular/groebner_strategy.pxd b/src/sage/libs/singular/groebner_strategy.pxd index 342c4e0955f..605e2679228 100644 --- a/src/sage/libs/singular/groebner_strategy.pxd +++ b/src/sage/libs/singular/groebner_strategy.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.libs.singular.decl cimport skStrategy, ring from sage.rings.polynomial.multi_polynomial_libsingular cimport \ diff --git a/src/sage/libs/singular/groebner_strategy.pyx b/src/sage/libs/singular/groebner_strategy.pyx index 5e34073dd38..e9c00e7d1fd 100644 --- a/src/sage/libs/singular/groebner_strategy.pyx +++ b/src/sage/libs/singular/groebner_strategy.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Singular's Groebner Strategy Objects diff --git a/src/sage/libs/singular/option.pyx b/src/sage/libs/singular/option.pyx index a21bf28a668..d35415c2864 100644 --- a/src/sage/libs/singular/option.pyx +++ b/src/sage/libs/singular/option.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ libSingular: Options diff --git a/src/sage/libs/singular/polynomial.pxd b/src/sage/libs/singular/polynomial.pxd index 0b7dd0079e0..52b19fbba75 100644 --- a/src/sage/libs/singular/polynomial.pxd +++ b/src/sage/libs/singular/polynomial.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Wrapper for Singular's Polynomial Arithmetic diff --git a/src/sage/libs/singular/polynomial.pyx b/src/sage/libs/singular/polynomial.pyx index 3699eefd811..e3a5881383d 100644 --- a/src/sage/libs/singular/polynomial.pyx +++ b/src/sage/libs/singular/polynomial.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Wrapper for Singular's Polynomial Arithmetic diff --git a/src/sage/libs/singular/ring.pxd b/src/sage/libs/singular/ring.pxd index 6e336b94b57..55403521886 100644 --- a/src/sage/libs/singular/ring.pxd +++ b/src/sage/libs/singular/ring.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Wrapper for Singular's Rings diff --git a/src/sage/libs/singular/ring.pyx b/src/sage/libs/singular/ring.pyx index 73bd0a07ce4..0efff45904d 100644 --- a/src/sage/libs/singular/ring.pyx +++ b/src/sage/libs/singular/ring.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Wrapper for Singular's Rings diff --git a/src/sage/libs/singular/singular.pxd b/src/sage/libs/singular/singular.pxd index bb7686dea30..05f32b68079 100644 --- a/src/sage/libs/singular/singular.pxd +++ b/src/sage/libs/singular/singular.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.libs.singular.decl cimport ring, poly, number, intvec from sage.libs.singular.function cimport Resolution diff --git a/src/sage/libs/singular/singular.pyx b/src/sage/libs/singular/singular.pyx index 79aa1e15aac..e256949298e 100644 --- a/src/sage/libs/singular/singular.pyx +++ b/src/sage/libs/singular/singular.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ libSingular: Conversion Routines and Initialisation diff --git a/src/sage/libs/singular/standard_options.py b/src/sage/libs/singular/standard_options.py index aa4cc17b9a3..341650fa6ba 100644 --- a/src/sage/libs/singular/standard_options.py +++ b/src/sage/libs/singular/standard_options.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Highlevel functions for managing options of the libSingular interface diff --git a/src/sage/libs/symmetrica/__init__.py b/src/sage/libs/symmetrica/__init__.py index 28c48d66b20..e69de29bb2d 100644 --- a/src/sage/libs/symmetrica/__init__.py +++ b/src/sage/libs/symmetrica/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-combinat diff --git a/src/sage/libs/symmetrica/all.py b/src/sage/libs/symmetrica/all.py index 817d568b03e..7c5215f6444 100644 --- a/src/sage/libs/symmetrica/all.py +++ b/src/sage/libs/symmetrica/all.py @@ -1,102 +1,100 @@ -# sage_setup: distribution = sagemath-combinat - -# from symmetrica import * - -from sage.libs.symmetrica.symmetrica import start - -# kostka -from sage.libs.symmetrica.symmetrica import kostka_number_symmetrica as kostka_number -from sage.libs.symmetrica.symmetrica import kostka_tab_symmetrica as kostka_tab -from sage.libs.symmetrica.symmetrica import kostka_tafel_symmetrica as kostka_tafel - - -# sab -from sage.libs.symmetrica.symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization -from sage.libs.symmetrica.symmetrica import bdg_symmetrica as bdg -from sage.libs.symmetrica.symmetrica import sdg_symmetrica as sdg -from sage.libs.symmetrica.symmetrica import odg_symmetrica as odg -from sage.libs.symmetrica.symmetrica import specht_dg_symmetrica as specht_dg -from sage.libs.symmetrica.symmetrica import ndg_symmetrica as ndg -# from symmetrica import glmndg_symmetrica as glmndg - - -# sc -from sage.libs.symmetrica.symmetrica import chartafel_symmetrica as chartafel -from sage.libs.symmetrica.symmetrica import charvalue_symmetrica as charvalue -from sage.libs.symmetrica.symmetrica import kranztafel_symmetrica as kranztafel -# from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn - -# part -from sage.libs.symmetrica.symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part -from sage.libs.symmetrica.symmetrica import odd_to_strict_part_symmetrica as odd_to_strict -from sage.libs.symmetrica.symmetrica import q_core_symmetrica as q_core -from sage.libs.symmetrica.symmetrica import gupta_nm_symmetrica as gupta_nm -from sage.libs.symmetrica.symmetrica import gupta_tafel_symmetrica as gupta_tafel -from sage.libs.symmetrica.symmetrica import random_partition_symmetrica as random_partition - - -# schur -from sage.libs.symmetrica.symmetrica import outerproduct_schur_symmetrica as outerproduct_schur -from sage.libs.symmetrica.symmetrica import dimension_schur_symmetrica as dimension_schur -from sage.libs.symmetrica.symmetrica import part_part_skewschur_symmetrica as part_part_skewschur -from sage.libs.symmetrica.symmetrica import newtrans_symmetrica as newtrans -from sage.libs.symmetrica.symmetrica import compute_schur_with_alphabet_symmetrica as compute_schur_with_alphabet -from sage.libs.symmetrica.symmetrica import compute_homsym_with_alphabet_symmetrica as compute_homsym_with_alphabet -from sage.libs.symmetrica.symmetrica import compute_elmsym_with_alphabet_symmetrica as compute_elmsym_with_alphabet -from sage.libs.symmetrica.symmetrica import compute_monomial_with_alphabet_symmetrica as compute_monomial_with_alphabet -from sage.libs.symmetrica.symmetrica import compute_powsym_with_alphabet_symmetrica as compute_powsym_with_alphabet -from sage.libs.symmetrica.symmetrica import compute_schur_with_alphabet_det_symmetrica as compute_schur_with_alphabet_det - -from sage.libs.symmetrica.symmetrica import t_SCHUR_MONOMIAL_symmetrica as t_SCHUR_MONOMIAL -from sage.libs.symmetrica.symmetrica import t_SCHUR_HOMSYM_symmetrica as t_SCHUR_HOMSYM -from sage.libs.symmetrica.symmetrica import t_SCHUR_POWSYM_symmetrica as t_SCHUR_POWSYM -from sage.libs.symmetrica.symmetrica import t_SCHUR_ELMSYM_symmetrica as t_SCHUR_ELMSYM - -from sage.libs.symmetrica.symmetrica import t_MONOMIAL_SCHUR_symmetrica as t_MONOMIAL_SCHUR -from sage.libs.symmetrica.symmetrica import t_MONOMIAL_HOMSYM_symmetrica as t_MONOMIAL_HOMSYM -from sage.libs.symmetrica.symmetrica import t_MONOMIAL_POWSYM_symmetrica as t_MONOMIAL_POWSYM -from sage.libs.symmetrica.symmetrica import t_MONOMIAL_ELMSYM_symmetrica as t_MONOMIAL_ELMSYM - -from sage.libs.symmetrica.symmetrica import t_ELMSYM_SCHUR_symmetrica as t_ELMSYM_SCHUR -from sage.libs.symmetrica.symmetrica import t_ELMSYM_MONOMIAL_symmetrica as t_ELMSYM_MONOMIAL -from sage.libs.symmetrica.symmetrica import t_ELMSYM_HOMSYM_symmetrica as t_ELMSYM_HOMSYM -from sage.libs.symmetrica.symmetrica import t_ELMSYM_POWSYM_symmetrica as t_ELMSYM_POWSYM - -from sage.libs.symmetrica.symmetrica import t_HOMSYM_SCHUR_symmetrica as t_HOMSYM_SCHUR -from sage.libs.symmetrica.symmetrica import t_HOMSYM_MONOMIAL_symmetrica as t_HOMSYM_MONOMIAL -from sage.libs.symmetrica.symmetrica import t_HOMSYM_POWSYM_symmetrica as t_HOMSYM_POWSYM -from sage.libs.symmetrica.symmetrica import t_HOMSYM_ELMSYM_symmetrica as t_HOMSYM_ELMSYM - -from sage.libs.symmetrica.symmetrica import t_POWSYM_SCHUR_symmetrica as t_POWSYM_SCHUR -from sage.libs.symmetrica.symmetrica import t_POWSYM_HOMSYM_symmetrica as t_POWSYM_HOMSYM -from sage.libs.symmetrica.symmetrica import t_POWSYM_ELMSYM_symmetrica as t_POWSYM_ELMSYM -from sage.libs.symmetrica.symmetrica import t_POWSYM_MONOMIAL_symmetrica as t_POWSYM_MONOMIAL - - -from sage.libs.symmetrica.symmetrica import mult_schur_schur_symmetrica as mult_schur_schur -from sage.libs.symmetrica.symmetrica import mult_monomial_monomial_symmetrica as mult_monomial_monomial - - -from sage.libs.symmetrica.symmetrica import hall_littlewood_symmetrica as hall_littlewood - -from sage.libs.symmetrica.symmetrica import t_POLYNOM_POWER_symmetrica as t_POLYNOM_POWER -from sage.libs.symmetrica.symmetrica import t_POLYNOM_SCHUR_symmetrica as t_POLYNOM_SCHUR -from sage.libs.symmetrica.symmetrica import t_POLYNOM_ELMSYM_symmetrica as t_POLYNOM_ELMSYM -from sage.libs.symmetrica.symmetrica import t_POLYNOM_MONOMIAL_symmetrica as t_POLYNOM_MONOMIAL - -from sage.libs.symmetrica.symmetrica import scalarproduct_schur_symmetrica as scalarproduct_schur - -# plet -from sage.libs.symmetrica.symmetrica import plethysm_symmetrica as plethysm -from sage.libs.symmetrica.symmetrica import schur_schur_plet_symmetrica as schur_schur_plet - -# sb -from sage.libs.symmetrica.symmetrica import mult_schubert_schubert_symmetrica as mult_schubert_schubert -from sage.libs.symmetrica.symmetrica import t_SCHUBERT_POLYNOM_symmetrica as t_SCHUBERT_POLYNOM -from sage.libs.symmetrica.symmetrica import t_POLYNOM_SCHUBERT_symmetrica as t_POLYNOM_SCHUBERT -from sage.libs.symmetrica.symmetrica import mult_schubert_variable_symmetrica as mult_schubert_variable -from sage.libs.symmetrica.symmetrica import divdiff_perm_schubert_symmetrica as divdiff_perm_schubert -from sage.libs.symmetrica.symmetrica import scalarproduct_schubert_symmetrica as scalarproduct_schubert -from sage.libs.symmetrica.symmetrica import divdiff_schubert_symmetrica as divdiff_schubert +#from symmetrica import * + +from .symmetrica import start + +#kostka +from .symmetrica import kostka_number_symmetrica as kostka_number +from .symmetrica import kostka_tab_symmetrica as kostka_tab +from .symmetrica import kostka_tafel_symmetrica as kostka_tafel + + +#sab +from .symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization +from .symmetrica import bdg_symmetrica as bdg +from .symmetrica import sdg_symmetrica as sdg +from .symmetrica import odg_symmetrica as odg +from .symmetrica import specht_dg_symmetrica as specht_dg +from .symmetrica import ndg_symmetrica as ndg +#from symmetrica import glmndg_symmetrica as glmndg + + +#sc +from .symmetrica import chartafel_symmetrica as chartafel +from .symmetrica import charvalue_symmetrica as charvalue +from .symmetrica import kranztafel_symmetrica as kranztafel +#from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn + +#part +from .symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part +from .symmetrica import odd_to_strict_part_symmetrica as odd_to_strict +from .symmetrica import q_core_symmetrica as q_core +from .symmetrica import gupta_nm_symmetrica as gupta_nm +from .symmetrica import gupta_tafel_symmetrica as gupta_tafel +from .symmetrica import random_partition_symmetrica as random_partition + + +#schur +from .symmetrica import outerproduct_schur_symmetrica as outerproduct_schur +from .symmetrica import dimension_schur_symmetrica as dimension_schur +from .symmetrica import part_part_skewschur_symmetrica as part_part_skewschur +from .symmetrica import newtrans_symmetrica as newtrans +from .symmetrica import compute_schur_with_alphabet_symmetrica as compute_schur_with_alphabet +from .symmetrica import compute_homsym_with_alphabet_symmetrica as compute_homsym_with_alphabet +from .symmetrica import compute_elmsym_with_alphabet_symmetrica as compute_elmsym_with_alphabet +from .symmetrica import compute_monomial_with_alphabet_symmetrica as compute_monomial_with_alphabet +from .symmetrica import compute_powsym_with_alphabet_symmetrica as compute_powsym_with_alphabet +from .symmetrica import compute_schur_with_alphabet_det_symmetrica as compute_schur_with_alphabet_det + +from .symmetrica import t_SCHUR_MONOMIAL_symmetrica as t_SCHUR_MONOMIAL +from .symmetrica import t_SCHUR_HOMSYM_symmetrica as t_SCHUR_HOMSYM +from .symmetrica import t_SCHUR_POWSYM_symmetrica as t_SCHUR_POWSYM +from .symmetrica import t_SCHUR_ELMSYM_symmetrica as t_SCHUR_ELMSYM + +from .symmetrica import t_MONOMIAL_SCHUR_symmetrica as t_MONOMIAL_SCHUR +from .symmetrica import t_MONOMIAL_HOMSYM_symmetrica as t_MONOMIAL_HOMSYM +from .symmetrica import t_MONOMIAL_POWSYM_symmetrica as t_MONOMIAL_POWSYM +from .symmetrica import t_MONOMIAL_ELMSYM_symmetrica as t_MONOMIAL_ELMSYM + +from .symmetrica import t_ELMSYM_SCHUR_symmetrica as t_ELMSYM_SCHUR +from .symmetrica import t_ELMSYM_MONOMIAL_symmetrica as t_ELMSYM_MONOMIAL +from .symmetrica import t_ELMSYM_HOMSYM_symmetrica as t_ELMSYM_HOMSYM +from .symmetrica import t_ELMSYM_POWSYM_symmetrica as t_ELMSYM_POWSYM + +from .symmetrica import t_HOMSYM_SCHUR_symmetrica as t_HOMSYM_SCHUR +from .symmetrica import t_HOMSYM_MONOMIAL_symmetrica as t_HOMSYM_MONOMIAL +from .symmetrica import t_HOMSYM_POWSYM_symmetrica as t_HOMSYM_POWSYM +from .symmetrica import t_HOMSYM_ELMSYM_symmetrica as t_HOMSYM_ELMSYM + +from .symmetrica import t_POWSYM_SCHUR_symmetrica as t_POWSYM_SCHUR +from .symmetrica import t_POWSYM_HOMSYM_symmetrica as t_POWSYM_HOMSYM +from .symmetrica import t_POWSYM_ELMSYM_symmetrica as t_POWSYM_ELMSYM +from .symmetrica import t_POWSYM_MONOMIAL_symmetrica as t_POWSYM_MONOMIAL + + +from .symmetrica import mult_schur_schur_symmetrica as mult_schur_schur +from .symmetrica import mult_monomial_monomial_symmetrica as mult_monomial_monomial + + +from .symmetrica import hall_littlewood_symmetrica as hall_littlewood + +from .symmetrica import t_POLYNOM_POWER_symmetrica as t_POLYNOM_POWER +from .symmetrica import t_POLYNOM_SCHUR_symmetrica as t_POLYNOM_SCHUR +from .symmetrica import t_POLYNOM_ELMSYM_symmetrica as t_POLYNOM_ELMSYM +from .symmetrica import t_POLYNOM_MONOMIAL_symmetrica as t_POLYNOM_MONOMIAL + +from .symmetrica import scalarproduct_schur_symmetrica as scalarproduct_schur + +#plet +from .symmetrica import plethysm_symmetrica as plethysm +from .symmetrica import schur_schur_plet_symmetrica as schur_schur_plet + +#sb +from .symmetrica import mult_schubert_schubert_symmetrica as mult_schubert_schubert +from .symmetrica import t_SCHUBERT_POLYNOM_symmetrica as t_SCHUBERT_POLYNOM +from .symmetrica import t_POLYNOM_SCHUBERT_symmetrica as t_POLYNOM_SCHUBERT +from .symmetrica import mult_schubert_variable_symmetrica as mult_schubert_variable +from .symmetrica import divdiff_perm_schubert_symmetrica as divdiff_perm_schubert +from .symmetrica import scalarproduct_schubert_symmetrica as scalarproduct_schubert +from .symmetrica import divdiff_schubert_symmetrica as divdiff_schubert start() diff --git a/src/sage/libs/symmetrica/kostka.pxi b/src/sage/libs/symmetrica/kostka.pxi index 76409a73383..690e5d5a096 100644 --- a/src/sage/libs/symmetrica/kostka.pxi +++ b/src/sage/libs/symmetrica/kostka.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from cpython.object cimport * from cysignals.signals cimport sig_on, sig_off diff --git a/src/sage/libs/symmetrica/part.pxi b/src/sage/libs/symmetrica/part.pxi index 28e49fd261c..37a3c0ff8f0 100644 --- a/src/sage/libs/symmetrica/part.pxi +++ b/src/sage/libs/symmetrica/part.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef extern from 'symmetrica/def.h': INT strict_to_odd_part(OP s, OP o) INT odd_to_strict_part(OP o, OP s) diff --git a/src/sage/libs/symmetrica/plet.pxi b/src/sage/libs/symmetrica/plet.pxi index a1c4a4cf785..b1f8450c621 100644 --- a/src/sage/libs/symmetrica/plet.pxi +++ b/src/sage/libs/symmetrica/plet.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef extern from 'symmetrica/def.h': INT plethysm(OP s1, OP s2, OP res) INT schur_schur_plet(OP p1, OP p2, OP res) diff --git a/src/sage/libs/symmetrica/sab.pxi b/src/sage/libs/symmetrica/sab.pxi index 3750d9263d9..de2838e7ed5 100644 --- a/src/sage/libs/symmetrica/sab.pxi +++ b/src/sage/libs/symmetrica/sab.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef extern from 'symmetrica/def.h': INT dimension_symmetrization(OP n, OP part, OP a) INT bdg(OP part, OP perm, OP D) diff --git a/src/sage/libs/symmetrica/sb.pxi b/src/sage/libs/symmetrica/sb.pxi index 908edbb7201..b884d33dafd 100644 --- a/src/sage/libs/symmetrica/sb.pxi +++ b/src/sage/libs/symmetrica/sb.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef extern from 'symmetrica/def.h': INT mult_schubert_schubert(OP a, OP b, OP result) INT m_perm_sch(OP a, OP b) diff --git a/src/sage/libs/symmetrica/sc.pxi b/src/sage/libs/symmetrica/sc.pxi index f1a20b359e0..4d9fa4f009d 100644 --- a/src/sage/libs/symmetrica/sc.pxi +++ b/src/sage/libs/symmetrica/sc.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef extern from 'symmetrica/def.h': INT chartafel(OP degree, OP result) INT charvalue(OP irred, OP cls, OP result, OP table) diff --git a/src/sage/libs/symmetrica/schur.pxi b/src/sage/libs/symmetrica/schur.pxi index 9e8ca73cd80..501acf5b7e0 100644 --- a/src/sage/libs/symmetrica/schur.pxi +++ b/src/sage/libs/symmetrica/schur.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat cdef extern from 'symmetrica/def.h': INT outerproduct_schur(OP parta, OP partb, OP result) INT dimension_schur(OP a, OP result) diff --git a/src/sage/libs/symmetrica/symmetrica.pxi b/src/sage/libs/symmetrica/symmetrica.pxi index f10450d69be..2bdb51f1a8e 100644 --- a/src/sage/libs/symmetrica/symmetrica.pxi +++ b/src/sage/libs/symmetrica/symmetrica.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # We put all definitions together, whether they appear in def.h or # macro.h cdef extern from 'symmetrica/def.h': diff --git a/src/sage/libs/symmetrica/symmetrica.pyx b/src/sage/libs/symmetrica/symmetrica.pyx index 56e3ede0bf3..7ca41fbc82b 100644 --- a/src/sage/libs/symmetrica/symmetrica.pyx +++ b/src/sage/libs/symmetrica/symmetrica.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # distutils: libraries = symmetrica """ Symmetrica library diff --git a/src/sage/logic/all.py b/src/sage/logic/all.py index 6fe860ea538..c8604a624e8 100644 --- a/src/sage/logic/all.py +++ b/src/sage/logic/all.py @@ -1,3 +1,3 @@ -from sage.logic.logic import SymbolicLogic +from .logic import SymbolicLogic -from sage.logic import propcalc +from . import propcalc diff --git a/src/sage/manifolds/all.py b/src/sage/manifolds/all.py index dc9bc48616c..68a489d08d0 100644 --- a/src/sage/manifolds/all.py +++ b/src/sage/manifolds/all.py @@ -1,8 +1,6 @@ -# sage_setup: distribution = sagemath-symbolics from sage.misc.lazy_import import lazy_import lazy_import('sage.manifolds.manifold', 'Manifold') lazy_import('sage.manifolds.differentiable.examples.real_line', ('OpenInterval', 'RealLine'), deprecation=31881) lazy_import('sage.manifolds.differentiable.examples.euclidean', 'EuclideanSpace') lazy_import('sage.manifolds', 'catalog', 'manifolds') -del lazy_import diff --git a/src/sage/manifolds/calculus_method.py b/src/sage/manifolds/calculus_method.py index 57dea6677a4..ddbad8a11ef 100644 --- a/src/sage/manifolds/calculus_method.py +++ b/src/sage/manifolds/calculus_method.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Coordinate calculus methods diff --git a/src/sage/manifolds/catalog.py b/src/sage/manifolds/catalog.py index 9cad91acc65..bb09ed8885d 100644 --- a/src/sage/manifolds/catalog.py +++ b/src/sage/manifolds/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Manifolds Catalog diff --git a/src/sage/manifolds/chart.py b/src/sage/manifolds/chart.py index dc256321d12..2bd980fb465 100644 --- a/src/sage/manifolds/chart.py +++ b/src/sage/manifolds/chart.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Coordinate Charts diff --git a/src/sage/manifolds/chart_func.py b/src/sage/manifolds/chart_func.py index 42a9c5ced84..6363ed61841 100644 --- a/src/sage/manifolds/chart_func.py +++ b/src/sage/manifolds/chart_func.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Chart Functions diff --git a/src/sage/manifolds/continuous_map.py b/src/sage/manifolds/continuous_map.py index 478af258542..dc9f9b5d12c 100644 --- a/src/sage/manifolds/continuous_map.py +++ b/src/sage/manifolds/continuous_map.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Continuous Maps Between Topological Manifolds diff --git a/src/sage/manifolds/continuous_map_image.py b/src/sage/manifolds/continuous_map_image.py index eebd214dbb6..303117f7978 100644 --- a/src/sage/manifolds/continuous_map_image.py +++ b/src/sage/manifolds/continuous_map_image.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Images of Manifold Subsets under Continuous Maps as Subsets of the Codomain diff --git a/src/sage/manifolds/differentiable/affine_connection.py b/src/sage/manifolds/differentiable/affine_connection.py index e29e8e1f984..1a45b219872 100644 --- a/src/sage/manifolds/differentiable/affine_connection.py +++ b/src/sage/manifolds/differentiable/affine_connection.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Affine Connections diff --git a/src/sage/manifolds/differentiable/all.py b/src/sage/manifolds/differentiable/all.py index 332eaf1cdb6..e69de29bb2d 100644 --- a/src/sage/manifolds/differentiable/all.py +++ b/src/sage/manifolds/differentiable/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-symbolics diff --git a/src/sage/manifolds/differentiable/automorphismfield.py b/src/sage/manifolds/differentiable/automorphismfield.py index aa52d4e1f27..89cc87aef32 100644 --- a/src/sage/manifolds/differentiable/automorphismfield.py +++ b/src/sage/manifolds/differentiable/automorphismfield.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Tangent-Space Automorphism Fields diff --git a/src/sage/manifolds/differentiable/automorphismfield_group.py b/src/sage/manifolds/differentiable/automorphismfield_group.py index 8293a71e31b..c0e782798aa 100644 --- a/src/sage/manifolds/differentiable/automorphismfield_group.py +++ b/src/sage/manifolds/differentiable/automorphismfield_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Group of Tangent-Space Automorphism Fields diff --git a/src/sage/manifolds/differentiable/bundle_connection.py b/src/sage/manifolds/differentiable/bundle_connection.py index e16a3485b05..a3353b820cb 100644 --- a/src/sage/manifolds/differentiable/bundle_connection.py +++ b/src/sage/manifolds/differentiable/bundle_connection.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Bundle Connections diff --git a/src/sage/manifolds/differentiable/characteristic_cohomology_class.py b/src/sage/manifolds/differentiable/characteristic_cohomology_class.py index fa8642eadaa..91ebbf00ccc 100644 --- a/src/sage/manifolds/differentiable/characteristic_cohomology_class.py +++ b/src/sage/manifolds/differentiable/characteristic_cohomology_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Characteristic cohomology classes diff --git a/src/sage/manifolds/differentiable/chart.py b/src/sage/manifolds/differentiable/chart.py index 83be8302afd..a40ebb8e5b2 100644 --- a/src/sage/manifolds/differentiable/chart.py +++ b/src/sage/manifolds/differentiable/chart.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Coordinate Charts on Differentiable Manifolds diff --git a/src/sage/manifolds/differentiable/curve.py b/src/sage/manifolds/differentiable/curve.py index 44f621f8b83..7ea264565ae 100644 --- a/src/sage/manifolds/differentiable/curve.py +++ b/src/sage/manifolds/differentiable/curve.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Curves in Manifolds diff --git a/src/sage/manifolds/differentiable/de_rham_cohomology.py b/src/sage/manifolds/differentiable/de_rham_cohomology.py index 845a6225625..403f9f37f00 100644 --- a/src/sage/manifolds/differentiable/de_rham_cohomology.py +++ b/src/sage/manifolds/differentiable/de_rham_cohomology.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" De Rham Cohomology diff --git a/src/sage/manifolds/differentiable/degenerate.py b/src/sage/manifolds/differentiable/degenerate.py index 34a146454bc..82de8c39d74 100644 --- a/src/sage/manifolds/differentiable/degenerate.py +++ b/src/sage/manifolds/differentiable/degenerate.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Degenerate manifolds """ diff --git a/src/sage/manifolds/differentiable/degenerate_submanifold.py b/src/sage/manifolds/differentiable/degenerate_submanifold.py index ee2ef289a89..581162b88f5 100644 --- a/src/sage/manifolds/differentiable/degenerate_submanifold.py +++ b/src/sage/manifolds/differentiable/degenerate_submanifold.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Degenerate submanifolds diff --git a/src/sage/manifolds/differentiable/diff_form.py b/src/sage/manifolds/differentiable/diff_form.py index 6ee84daf4ae..0fc837b8cc4 100644 --- a/src/sage/manifolds/differentiable/diff_form.py +++ b/src/sage/manifolds/differentiable/diff_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Differential Forms diff --git a/src/sage/manifolds/differentiable/diff_form_module.py b/src/sage/manifolds/differentiable/diff_form_module.py index 3495398d7a2..b10de21c07c 100644 --- a/src/sage/manifolds/differentiable/diff_form_module.py +++ b/src/sage/manifolds/differentiable/diff_form_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Differential Form Modules diff --git a/src/sage/manifolds/differentiable/diff_map.py b/src/sage/manifolds/differentiable/diff_map.py index 5a020f54594..8a64694b38b 100644 --- a/src/sage/manifolds/differentiable/diff_map.py +++ b/src/sage/manifolds/differentiable/diff_map.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Differentiable Maps between Differentiable Manifolds diff --git a/src/sage/manifolds/differentiable/differentiable_submanifold.py b/src/sage/manifolds/differentiable/differentiable_submanifold.py index 46624e8fc70..7387ea3a44e 100644 --- a/src/sage/manifolds/differentiable/differentiable_submanifold.py +++ b/src/sage/manifolds/differentiable/differentiable_submanifold.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Submanifolds of differentiable manifolds diff --git a/src/sage/manifolds/differentiable/examples/all.py b/src/sage/manifolds/differentiable/examples/all.py index 332eaf1cdb6..e69de29bb2d 100644 --- a/src/sage/manifolds/differentiable/examples/all.py +++ b/src/sage/manifolds/differentiable/examples/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-symbolics diff --git a/src/sage/manifolds/differentiable/examples/euclidean.py b/src/sage/manifolds/differentiable/examples/euclidean.py index 494c01849e4..eb96b6da587 100644 --- a/src/sage/manifolds/differentiable/examples/euclidean.py +++ b/src/sage/manifolds/differentiable/examples/euclidean.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Euclidean Spaces diff --git a/src/sage/manifolds/differentiable/examples/real_line.py b/src/sage/manifolds/differentiable/examples/real_line.py index a1029c4b507..5ff4f969b49 100644 --- a/src/sage/manifolds/differentiable/examples/real_line.py +++ b/src/sage/manifolds/differentiable/examples/real_line.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" The Real Line and Open Intervals diff --git a/src/sage/manifolds/differentiable/examples/sphere.py b/src/sage/manifolds/differentiable/examples/sphere.py index 41cb847cc3a..4ccc6f7440b 100644 --- a/src/sage/manifolds/differentiable/examples/sphere.py +++ b/src/sage/manifolds/differentiable/examples/sphere.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Spheres smoothly embedded in Euclidean Space diff --git a/src/sage/manifolds/differentiable/examples/symplectic_space.py b/src/sage/manifolds/differentiable/examples/symplectic_space.py index e92e29d9ab4..623979ed7f3 100644 --- a/src/sage/manifolds/differentiable/examples/symplectic_space.py +++ b/src/sage/manifolds/differentiable/examples/symplectic_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Symplectic vector spaces diff --git a/src/sage/manifolds/differentiable/examples/symplectic_space_test.py b/src/sage/manifolds/differentiable/examples/symplectic_space_test.py index 01e19bcb351..0372470bd73 100644 --- a/src/sage/manifolds/differentiable/examples/symplectic_space_test.py +++ b/src/sage/manifolds/differentiable/examples/symplectic_space_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics import sage.all from sage.manifolds.differentiable.symplectic_form import SymplecticForm from sage.manifolds.differentiable.examples.symplectic_space import ( diff --git a/src/sage/manifolds/differentiable/integrated_curve.py b/src/sage/manifolds/differentiable/integrated_curve.py index 00c834a9a3c..063611becce 100644 --- a/src/sage/manifolds/differentiable/integrated_curve.py +++ b/src/sage/manifolds/differentiable/integrated_curve.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Integrated Curves and Geodesics in Manifolds diff --git a/src/sage/manifolds/differentiable/levi_civita_connection.py b/src/sage/manifolds/differentiable/levi_civita_connection.py index c0ed5664ce2..00ebf69b47f 100644 --- a/src/sage/manifolds/differentiable/levi_civita_connection.py +++ b/src/sage/manifolds/differentiable/levi_civita_connection.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Levi-Civita Connections diff --git a/src/sage/manifolds/differentiable/manifold.py b/src/sage/manifolds/differentiable/manifold.py index f4c80365be1..4b5a793f762 100644 --- a/src/sage/manifolds/differentiable/manifold.py +++ b/src/sage/manifolds/differentiable/manifold.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Differentiable Manifolds diff --git a/src/sage/manifolds/differentiable/manifold_homset.py b/src/sage/manifolds/differentiable/manifold_homset.py index 1475161de7c..20660a01652 100644 --- a/src/sage/manifolds/differentiable/manifold_homset.py +++ b/src/sage/manifolds/differentiable/manifold_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Sets of Morphisms between Differentiable Manifolds diff --git a/src/sage/manifolds/differentiable/metric.py b/src/sage/manifolds/differentiable/metric.py index 87278c3e9ff..74fdd076e45 100644 --- a/src/sage/manifolds/differentiable/metric.py +++ b/src/sage/manifolds/differentiable/metric.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Pseudo-Riemannian Metrics and Degenerate Metrics diff --git a/src/sage/manifolds/differentiable/mixed_form.py b/src/sage/manifolds/differentiable/mixed_form.py index ba984871a7c..4ca5cf56c49 100644 --- a/src/sage/manifolds/differentiable/mixed_form.py +++ b/src/sage/manifolds/differentiable/mixed_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Mixed Differential Forms diff --git a/src/sage/manifolds/differentiable/mixed_form_algebra.py b/src/sage/manifolds/differentiable/mixed_form_algebra.py index 762b73fa0a7..15bd856c476 100644 --- a/src/sage/manifolds/differentiable/mixed_form_algebra.py +++ b/src/sage/manifolds/differentiable/mixed_form_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Graded Algebra of Mixed Differential Forms diff --git a/src/sage/manifolds/differentiable/multivector_module.py b/src/sage/manifolds/differentiable/multivector_module.py index 92f2a3cbfa1..83c741fa8af 100644 --- a/src/sage/manifolds/differentiable/multivector_module.py +++ b/src/sage/manifolds/differentiable/multivector_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Multivector Field Modules diff --git a/src/sage/manifolds/differentiable/multivectorfield.py b/src/sage/manifolds/differentiable/multivectorfield.py index da8ef3b183b..9a4b03fb369 100644 --- a/src/sage/manifolds/differentiable/multivectorfield.py +++ b/src/sage/manifolds/differentiable/multivectorfield.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Multivector Fields diff --git a/src/sage/manifolds/differentiable/poisson_tensor.py b/src/sage/manifolds/differentiable/poisson_tensor.py index 86c00eb79fe..41f178dff5c 100644 --- a/src/sage/manifolds/differentiable/poisson_tensor.py +++ b/src/sage/manifolds/differentiable/poisson_tensor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Poisson tensors diff --git a/src/sage/manifolds/differentiable/pseudo_riemannian.py b/src/sage/manifolds/differentiable/pseudo_riemannian.py index d9028905e97..3b811883cd6 100644 --- a/src/sage/manifolds/differentiable/pseudo_riemannian.py +++ b/src/sage/manifolds/differentiable/pseudo_riemannian.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Pseudo-Riemannian Manifolds diff --git a/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py b/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py index 19f18097c71..219ccfc580e 100644 --- a/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +++ b/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Pseudo-Riemannian submanifolds diff --git a/src/sage/manifolds/differentiable/scalarfield.py b/src/sage/manifolds/differentiable/scalarfield.py index 08b0e5da099..ba5c5d70f2c 100644 --- a/src/sage/manifolds/differentiable/scalarfield.py +++ b/src/sage/manifolds/differentiable/scalarfield.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Differentiable Scalar Fields diff --git a/src/sage/manifolds/differentiable/scalarfield_algebra.py b/src/sage/manifolds/differentiable/scalarfield_algebra.py index a640ce829b0..44e6e16bff4 100644 --- a/src/sage/manifolds/differentiable/scalarfield_algebra.py +++ b/src/sage/manifolds/differentiable/scalarfield_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Algebra of Differentiable Scalar Fields diff --git a/src/sage/manifolds/differentiable/symplectic_form.py b/src/sage/manifolds/differentiable/symplectic_form.py index e3c3a99d805..381fab1e72c 100644 --- a/src/sage/manifolds/differentiable/symplectic_form.py +++ b/src/sage/manifolds/differentiable/symplectic_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Symplectic structures diff --git a/src/sage/manifolds/differentiable/symplectic_form_test.py b/src/sage/manifolds/differentiable/symplectic_form_test.py index 5b25b439e66..5bc519af6d3 100644 --- a/src/sage/manifolds/differentiable/symplectic_form_test.py +++ b/src/sage/manifolds/differentiable/symplectic_form_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # pylint: disable=missing-function-docstring from _pytest.fixtures import FixtureRequest import pytest diff --git a/src/sage/manifolds/differentiable/tangent_space.py b/src/sage/manifolds/differentiable/tangent_space.py index 7a95ad1a09e..98a60cede2a 100644 --- a/src/sage/manifolds/differentiable/tangent_space.py +++ b/src/sage/manifolds/differentiable/tangent_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Tangent Spaces diff --git a/src/sage/manifolds/differentiable/tangent_vector.py b/src/sage/manifolds/differentiable/tangent_vector.py index 2d6a848965d..97abcea54e1 100644 --- a/src/sage/manifolds/differentiable/tangent_vector.py +++ b/src/sage/manifolds/differentiable/tangent_vector.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Tangent Vectors diff --git a/src/sage/manifolds/differentiable/tensorfield.py b/src/sage/manifolds/differentiable/tensorfield.py index 61904583db4..df54270dde0 100644 --- a/src/sage/manifolds/differentiable/tensorfield.py +++ b/src/sage/manifolds/differentiable/tensorfield.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Tensor Fields diff --git a/src/sage/manifolds/differentiable/tensorfield_module.py b/src/sage/manifolds/differentiable/tensorfield_module.py index f3849336a6d..8d31d670137 100644 --- a/src/sage/manifolds/differentiable/tensorfield_module.py +++ b/src/sage/manifolds/differentiable/tensorfield_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Tensor Field Modules diff --git a/src/sage/manifolds/differentiable/tensorfield_paral.py b/src/sage/manifolds/differentiable/tensorfield_paral.py index f8832b0a602..7cf7c40896c 100644 --- a/src/sage/manifolds/differentiable/tensorfield_paral.py +++ b/src/sage/manifolds/differentiable/tensorfield_paral.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Tensor Fields with Values on a Parallelizable Manifold diff --git a/src/sage/manifolds/differentiable/tensorfield_paral_test.py b/src/sage/manifolds/differentiable/tensorfield_paral_test.py index a71a5571fd9..7eda28c5c49 100644 --- a/src/sage/manifolds/differentiable/tensorfield_paral_test.py +++ b/src/sage/manifolds/differentiable/tensorfield_paral_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # pylint: disable=missing-function-docstring,missing-class-docstring import pytest diff --git a/src/sage/manifolds/differentiable/vector_bundle.py b/src/sage/manifolds/differentiable/vector_bundle.py index d0497025c07..18d1169064d 100644 --- a/src/sage/manifolds/differentiable/vector_bundle.py +++ b/src/sage/manifolds/differentiable/vector_bundle.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Differentiable Vector Bundles diff --git a/src/sage/manifolds/differentiable/vectorfield.py b/src/sage/manifolds/differentiable/vectorfield.py index 480aa7e5b60..04018ba9916 100644 --- a/src/sage/manifolds/differentiable/vectorfield.py +++ b/src/sage/manifolds/differentiable/vectorfield.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Vector Fields diff --git a/src/sage/manifolds/differentiable/vectorfield_module.py b/src/sage/manifolds/differentiable/vectorfield_module.py index ea2c104b24e..78cc259ca41 100644 --- a/src/sage/manifolds/differentiable/vectorfield_module.py +++ b/src/sage/manifolds/differentiable/vectorfield_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Vector Field Modules diff --git a/src/sage/manifolds/differentiable/vectorframe.py b/src/sage/manifolds/differentiable/vectorframe.py index fd6d9544016..539c08b8050 100644 --- a/src/sage/manifolds/differentiable/vectorframe.py +++ b/src/sage/manifolds/differentiable/vectorframe.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Vector Frames diff --git a/src/sage/manifolds/family.py b/src/sage/manifolds/family.py index 7fe5c67d396..61c74f54469 100644 --- a/src/sage/manifolds/family.py +++ b/src/sage/manifolds/family.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Families of Manifold Objects diff --git a/src/sage/manifolds/local_frame.py b/src/sage/manifolds/local_frame.py index 1cc02af1a0f..fffe607efda 100644 --- a/src/sage/manifolds/local_frame.py +++ b/src/sage/manifolds/local_frame.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Local Frames diff --git a/src/sage/manifolds/manifold.py b/src/sage/manifolds/manifold.py index 2da8c991fb2..0e09530ad54 100644 --- a/src/sage/manifolds/manifold.py +++ b/src/sage/manifolds/manifold.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Topological Manifolds diff --git a/src/sage/manifolds/manifold_homset.py b/src/sage/manifolds/manifold_homset.py index 9458f7d286e..71773c5d3ce 100644 --- a/src/sage/manifolds/manifold_homset.py +++ b/src/sage/manifolds/manifold_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Sets of Morphisms between Topological Manifolds diff --git a/src/sage/manifolds/operators.py b/src/sage/manifolds/operators.py index 1982ca9c0d3..dae39bdcad2 100644 --- a/src/sage/manifolds/operators.py +++ b/src/sage/manifolds/operators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Operators for vector calculus diff --git a/src/sage/manifolds/point.py b/src/sage/manifolds/point.py index 7191edb1fd1..ff0009db15b 100644 --- a/src/sage/manifolds/point.py +++ b/src/sage/manifolds/point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Points of Topological Manifolds diff --git a/src/sage/manifolds/scalarfield.py b/src/sage/manifolds/scalarfield.py index c394589ee12..1cc865564fc 100644 --- a/src/sage/manifolds/scalarfield.py +++ b/src/sage/manifolds/scalarfield.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Scalar Fields diff --git a/src/sage/manifolds/scalarfield_algebra.py b/src/sage/manifolds/scalarfield_algebra.py index 9c1a4b36be1..f8573b8f635 100644 --- a/src/sage/manifolds/scalarfield_algebra.py +++ b/src/sage/manifolds/scalarfield_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Algebra of Scalar Fields diff --git a/src/sage/manifolds/section.py b/src/sage/manifolds/section.py index 76bf19fc34e..e48b2b5ee29 100644 --- a/src/sage/manifolds/section.py +++ b/src/sage/manifolds/section.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Sections diff --git a/src/sage/manifolds/section_module.py b/src/sage/manifolds/section_module.py index 0fcbb87a884..975113ca2c9 100644 --- a/src/sage/manifolds/section_module.py +++ b/src/sage/manifolds/section_module.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Section Modules diff --git a/src/sage/manifolds/structure.py b/src/sage/manifolds/structure.py index 8fae887fa7d..dd9fc2a3f8a 100644 --- a/src/sage/manifolds/structure.py +++ b/src/sage/manifolds/structure.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Manifold Structures diff --git a/src/sage/manifolds/subset.py b/src/sage/manifolds/subset.py index b55f405b0bd..d6de3069a6f 100644 --- a/src/sage/manifolds/subset.py +++ b/src/sage/manifolds/subset.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Subsets of Topological Manifolds diff --git a/src/sage/manifolds/subsets/all.py b/src/sage/manifolds/subsets/all.py index 332eaf1cdb6..e69de29bb2d 100644 --- a/src/sage/manifolds/subsets/all.py +++ b/src/sage/manifolds/subsets/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-symbolics diff --git a/src/sage/manifolds/subsets/closure.py b/src/sage/manifolds/subsets/closure.py index 965cc576b2f..4a5c056ef68 100644 --- a/src/sage/manifolds/subsets/closure.py +++ b/src/sage/manifolds/subsets/closure.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Topological Closures of Manifold Subsets diff --git a/src/sage/manifolds/subsets/pullback.py b/src/sage/manifolds/subsets/pullback.py index 2804aa0ca17..6ab4a28059f 100644 --- a/src/sage/manifolds/subsets/pullback.py +++ b/src/sage/manifolds/subsets/pullback.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Manifold Subsets Defined as Pullbacks of Subsets under Continuous Maps """ diff --git a/src/sage/manifolds/topological_submanifold.py b/src/sage/manifolds/topological_submanifold.py index b2685c77f5e..9b722907152 100644 --- a/src/sage/manifolds/topological_submanifold.py +++ b/src/sage/manifolds/topological_submanifold.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Submanifolds of topological manifolds diff --git a/src/sage/manifolds/trivialization.py b/src/sage/manifolds/trivialization.py index 3246eee3fdc..ed3a8b4ed9f 100644 --- a/src/sage/manifolds/trivialization.py +++ b/src/sage/manifolds/trivialization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Trivializations diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py index 83b040ac202..20bac910900 100644 --- a/src/sage/manifolds/utilities.py +++ b/src/sage/manifolds/utilities.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Utilities for Calculus diff --git a/src/sage/manifolds/vector_bundle.py b/src/sage/manifolds/vector_bundle.py index 9e4315e7069..b851fa64fe7 100644 --- a/src/sage/manifolds/vector_bundle.py +++ b/src/sage/manifolds/vector_bundle.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- r""" Topological Vector Bundle diff --git a/src/sage/manifolds/vector_bundle_fiber.py b/src/sage/manifolds/vector_bundle_fiber.py index 0e3feb4a9b8..90a59e97169 100644 --- a/src/sage/manifolds/vector_bundle_fiber.py +++ b/src/sage/manifolds/vector_bundle_fiber.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Vector Bundle Fibers diff --git a/src/sage/manifolds/vector_bundle_fiber_element.py b/src/sage/manifolds/vector_bundle_fiber_element.py index 010846ec488..048275a8495 100644 --- a/src/sage/manifolds/vector_bundle_fiber_element.py +++ b/src/sage/manifolds/vector_bundle_fiber_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Vector Bundle Fiber Elements diff --git a/src/sage/matrix/action.pxd b/src/sage/matrix/action.pxd index befbb54c2d1..d50965dc8f5 100644 --- a/src/sage/matrix/action.pxd +++ b/src/sage/matrix/action.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport Element, Matrix, Vector from sage.structure.parent cimport Parent from sage.categories.action cimport Action diff --git a/src/sage/matrix/action.pyx b/src/sage/matrix/action.pyx index d538369f57d..0db343c9eed 100644 --- a/src/sage/matrix/action.pyx +++ b/src/sage/matrix/action.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Actions used by the coercion model for matrix and vector multiplications diff --git a/src/sage/matrix/all.py b/src/sage/matrix/all.py index 1e1b590dad6..041624f3853 100644 --- a/src/sage/matrix/all.py +++ b/src/sage/matrix/all.py @@ -1,9 +1,7 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import -from sage.matrix.matrix_space import MatrixSpace -from sage.matrix.constructor import (matrix, Matrix, column_matrix, random_matrix, - diagonal_matrix, identity_matrix, block_matrix, - block_diagonal_matrix, jordan_block, zero_matrix, - ones_matrix, elementary_matrix, companion_matrix) +from .matrix_space import MatrixSpace +from .constructor import (matrix, Matrix, column_matrix, random_matrix, + diagonal_matrix, identity_matrix, block_matrix, + block_diagonal_matrix, jordan_block, zero_matrix, + ones_matrix, elementary_matrix, companion_matrix) Mat = MatrixSpace -del lazy_import diff --git a/src/sage/matrix/all__sagemath_flint.py b/src/sage/matrix/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/matrix/all__sagemath_gap.py b/src/sage/matrix/all__sagemath_gap.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/matrix/all__sagemath_linbox.py b/src/sage/matrix/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/matrix/all__sagemath_meataxe.py b/src/sage/matrix/all__sagemath_meataxe.py index fd1e327ee2f..e69de29bb2d 100644 --- a/src/sage/matrix/all__sagemath_meataxe.py +++ b/src/sage/matrix/all__sagemath_meataxe.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-meataxe diff --git a/src/sage/matrix/all__sagemath_ntl.py b/src/sage/matrix/all__sagemath_ntl.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/matrix/all__sagemath_singular.py b/src/sage/matrix/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/matrix/all__sagemath_symbolics.py b/src/sage/matrix/all__sagemath_symbolics.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/matrix/args.pxd b/src/sage/matrix/args.pxd index ad840522297..9ab004e1887 100644 --- a/src/sage/matrix/args.pxd +++ b/src/sage/matrix/args.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from cpython.object cimport PyObject from sage.structure.element cimport Element, Matrix from sage.structure.parent cimport Parent diff --git a/src/sage/matrix/args.pyx b/src/sage/matrix/args.pyx index fa496a05de8..6e272858156 100644 --- a/src/sage/matrix/args.pyx +++ b/src/sage/matrix/args.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # cython: wraparound=False # cython: boundscheck=False """ diff --git a/src/sage/matrix/benchmark.py b/src/sage/matrix/benchmark.py index fd316cdc532..5e29a19f48c 100644 --- a/src/sage/matrix/benchmark.py +++ b/src/sage/matrix/benchmark.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.flint """ Benchmarks for matrices diff --git a/src/sage/matrix/berlekamp_massey.py b/src/sage/matrix/berlekamp_massey.py index d84969d556c..a6fe70c50e6 100644 --- a/src/sage/matrix/berlekamp_massey.py +++ b/src/sage/matrix/berlekamp_massey.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Minimal Polynomials of Linear Recurrence Sequences diff --git a/src/sage/matrix/change_ring.pyx b/src/sage/matrix/change_ring.pyx index 7a26f2a0efa..f942b753275 100644 --- a/src/sage/matrix/change_ring.pyx +++ b/src/sage/matrix/change_ring.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox """ Functions for changing the base ring of matrices quickly """ diff --git a/src/sage/matrix/compute_J_ideal.py b/src/sage/matrix/compute_J_ideal.py index 2f1aac2164b..f7005c04d31 100644 --- a/src/sage/matrix/compute_J_ideal.py +++ b/src/sage/matrix/compute_J_ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.libs.pari (for charpoly, minimal_polynomial in __init__) r""" `J`-ideals of matrices diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx index c35c84468d7..d7b209b93ca 100644 --- a/src/sage/matrix/constructor.pyx +++ b/src/sage/matrix/constructor.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # cython: binding=True """ General matrix Constructor and display options diff --git a/src/sage/matrix/docs.py b/src/sage/matrix/docs.py index 8667e053d1f..6a76d6fb331 100644 --- a/src/sage/matrix/docs.py +++ b/src/sage/matrix/docs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Matrices over an arbitrary ring diff --git a/src/sage/matrix/echelon_matrix.pyx b/src/sage/matrix/echelon_matrix.pyx index b544211f8b2..7f5457a7f7b 100644 --- a/src/sage/matrix/echelon_matrix.pyx +++ b/src/sage/matrix/echelon_matrix.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Echelon matrices over finite fields. """ diff --git a/src/sage/matrix/matrix.pxd b/src/sage/matrix/matrix.pxd index 7899379dc45..b67ed5b4969 100644 --- a/src/sage/matrix/matrix.pxd +++ b/src/sage/matrix/matrix.pxd @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix2 cimport Matrix diff --git a/src/sage/matrix/matrix0.pxd b/src/sage/matrix/matrix0.pxd index 3be1da7c607..c18c7cdc4a3 100644 --- a/src/sage/matrix/matrix0.pxd +++ b/src/sage/matrix/matrix0.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Generic matrices """ diff --git a/src/sage/matrix/matrix0.pyx b/src/sage/matrix/matrix0.pyx index 26311b91ee8..3dc47b9df07 100644 --- a/src/sage/matrix/matrix0.pyx +++ b/src/sage/matrix/matrix0.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- """ Base class for matrices, part 0 diff --git a/src/sage/matrix/matrix1.pxd b/src/sage/matrix/matrix1.pxd index 72226127f27..d24468b80e1 100644 --- a/src/sage/matrix/matrix1.pxd +++ b/src/sage/matrix/matrix1.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix0 cimport Matrix as Matrix0 cdef class Matrix(Matrix0): diff --git a/src/sage/matrix/matrix1.pyx b/src/sage/matrix/matrix1.pyx index e1dd532b21a..d446030473f 100644 --- a/src/sage/matrix/matrix1.pyx +++ b/src/sage/matrix/matrix1.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Base class for matrices, part 1 diff --git a/src/sage/matrix/matrix2.pxd b/src/sage/matrix/matrix2.pxd index dc1104dfdbe..a2e0297228c 100644 --- a/src/sage/matrix/matrix2.pxd +++ b/src/sage/matrix/matrix2.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Generic matrices """ diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx index 608b9fd47bd..9a7fdd393c5 100644 --- a/src/sage/matrix/matrix2.pyx +++ b/src/sage/matrix/matrix2.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Base class for matrices, part 2 diff --git a/src/sage/matrix/matrix_cdv.pxd b/src/sage/matrix/matrix_cdv.pxd index fb7f4b29b60..f7684da49f2 100644 --- a/src/sage/matrix/matrix_cdv.pxd +++ b/src/sage/matrix/matrix_cdv.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense cpdef hessenbergize_cdvf(Matrix_generic_dense) diff --git a/src/sage/matrix/matrix_cdv.pyx b/src/sage/matrix/matrix_cdv.pyx index a035e52b16a..7a6b1887518 100644 --- a/src/sage/matrix/matrix_cdv.pyx +++ b/src/sage/matrix/matrix_cdv.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Special methods for matrices over discrete valuation rings/fields. """ diff --git a/src/sage/matrix/matrix_complex_ball_dense.pxd b/src/sage/matrix/matrix_complex_ball_dense.pxd index 9d901f1c65c..effa0413026 100644 --- a/src/sage/matrix/matrix_complex_ball_dense.pxd +++ b/src/sage/matrix/matrix_complex_ball_dense.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - from sage.libs.flint.types cimport acb_mat_t from sage.matrix.matrix_dense cimport Matrix_dense from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense diff --git a/src/sage/matrix/matrix_complex_ball_dense.pyx b/src/sage/matrix/matrix_complex_ball_dense.pyx index 9888f4b7f33..07857217309 100644 --- a/src/sage/matrix/matrix_complex_ball_dense.pyx +++ b/src/sage/matrix/matrix_complex_ball_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint r""" Arbitrary precision complex ball matrices diff --git a/src/sage/matrix/matrix_complex_double_dense.pxd b/src/sage/matrix/matrix_complex_double_dense.pxd index 1626912bb9d..a9041564e43 100644 --- a/src/sage/matrix/matrix_complex_double_dense.pxd +++ b/src/sage/matrix/matrix_complex_double_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_double_dense cimport Matrix_double_dense cdef class Matrix_complex_double_dense(Matrix_double_dense): diff --git a/src/sage/matrix/matrix_complex_double_dense.pyx b/src/sage/matrix/matrix_complex_double_dense.pyx index e499dd9fa97..b86516fd121 100644 --- a/src/sage/matrix/matrix_complex_double_dense.pyx +++ b/src/sage/matrix/matrix_complex_double_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy """ Dense matrices over the Complex Double Field using NumPy diff --git a/src/sage/matrix/matrix_cyclo_dense.pxd b/src/sage/matrix/matrix_cyclo_dense.pxd index 3a1eaaea796..13f72389cf5 100644 --- a/src/sage/matrix/matrix_cyclo_dense.pxd +++ b/src/sage/matrix/matrix_cyclo_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from sage.libs.gmp.types cimport mpz_t from sage.matrix.matrix_dense cimport Matrix_dense from sage.matrix.matrix_rational_dense cimport Matrix_rational_dense diff --git a/src/sage/matrix/matrix_cyclo_dense.pyx b/src/sage/matrix/matrix_cyclo_dense.pyx index 52c4fabac5d..8bffbb905d8 100644 --- a/src/sage/matrix/matrix_cyclo_dense.pyx +++ b/src/sage/matrix/matrix_cyclo_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: language = c++ # distutils: libraries = NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/matrix/matrix_dense.pxd b/src/sage/matrix/matrix_dense.pxd index f8da138b44c..30c3effe02a 100644 --- a/src/sage/matrix/matrix_dense.pxd +++ b/src/sage/matrix/matrix_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix cimport Matrix cdef class Matrix_dense(Matrix): diff --git a/src/sage/matrix/matrix_dense.pyx b/src/sage/matrix/matrix_dense.pyx index caebc788af1..a954dde39d2 100644 --- a/src/sage/matrix/matrix_dense.pyx +++ b/src/sage/matrix/matrix_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Base class for dense matrices diff --git a/src/sage/matrix/matrix_domain_dense.pxd b/src/sage/matrix/matrix_domain_dense.pxd index f924ac01457..8a6e487c493 100644 --- a/src/sage/matrix/matrix_domain_dense.pxd +++ b/src/sage/matrix/matrix_domain_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix cimport Matrix cdef class Matrix_domain_dense(Matrix): diff --git a/src/sage/matrix/matrix_domain_sparse.pxd b/src/sage/matrix/matrix_domain_sparse.pxd index 2c95dd4f418..c5882238632 100644 --- a/src/sage/matrix/matrix_domain_sparse.pxd +++ b/src/sage/matrix/matrix_domain_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix cimport Matrix cdef class Matrix_domain_sparse(Matrix): diff --git a/src/sage/matrix/matrix_double_dense.pxd b/src/sage/matrix/matrix_double_dense.pxd index ac4ee7ce6b7..3f2cb525b10 100644 --- a/src/sage/matrix/matrix_double_dense.pxd +++ b/src/sage/matrix/matrix_double_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_numpy_dense cimport Matrix_numpy_dense diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx index 3544adc96cc..31a03fb7e28 100644 --- a/src/sage/matrix/matrix_double_dense.pyx +++ b/src/sage/matrix/matrix_double_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy """ Dense matrices using a NumPy backend diff --git a/src/sage/matrix/matrix_double_sparse.pxd b/src/sage/matrix/matrix_double_sparse.pxd index ce2502bdc53..0a292404338 100644 --- a/src/sage/matrix/matrix_double_sparse.pxd +++ b/src/sage/matrix/matrix_double_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_generic_sparse cimport Matrix_generic_sparse diff --git a/src/sage/matrix/matrix_double_sparse.pyx b/src/sage/matrix/matrix_double_sparse.pyx index f1ffd1bb8fb..cac826d7777 100644 --- a/src/sage/matrix/matrix_double_sparse.pyx +++ b/src/sage/matrix/matrix_double_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix2 cimport Matrix from sage.matrix.matrix_generic_sparse cimport Matrix_generic_sparse diff --git a/src/sage/matrix/matrix_gap.pxd b/src/sage/matrix/matrix_gap.pxd index 19674a56d0a..f378adbfc2a 100644 --- a/src/sage/matrix/matrix_gap.pxd +++ b/src/sage/matrix/matrix_gap.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap from sage.matrix.matrix_dense cimport Matrix_dense from sage.libs.gap.element cimport GapElement diff --git a/src/sage/matrix/matrix_gap.pyx b/src/sage/matrix/matrix_gap.pyx index b4294c4f7ed..f5a6e1d10e7 100644 --- a/src/sage/matrix/matrix_gap.pyx +++ b/src/sage/matrix/matrix_gap.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap r""" Wrappers on GAP matrices """ diff --git a/src/sage/matrix/matrix_generic_dense.pxd b/src/sage/matrix/matrix_generic_dense.pxd index c81e2f6f8a1..ba37428cb1f 100644 --- a/src/sage/matrix/matrix_generic_dense.pxd +++ b/src/sage/matrix/matrix_generic_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_dense cimport Matrix_dense diff --git a/src/sage/matrix/matrix_generic_dense.pyx b/src/sage/matrix/matrix_generic_dense.pyx index 1720ef12da1..441138560b0 100644 --- a/src/sage/matrix/matrix_generic_dense.pyx +++ b/src/sage/matrix/matrix_generic_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Dense Matrices over a general ring """ diff --git a/src/sage/matrix/matrix_generic_sparse.pxd b/src/sage/matrix/matrix_generic_sparse.pxd index f674a3b3a56..461fb38e18b 100644 --- a/src/sage/matrix/matrix_generic_sparse.pxd +++ b/src/sage/matrix/matrix_generic_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_sparse cimport Matrix_sparse diff --git a/src/sage/matrix/matrix_generic_sparse.pyx b/src/sage/matrix/matrix_generic_sparse.pyx index 0d5583f25d7..055746a8664 100644 --- a/src/sage/matrix/matrix_generic_sparse.pyx +++ b/src/sage/matrix/matrix_generic_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Sparse Matrices over a general ring diff --git a/src/sage/matrix/matrix_gf2e_dense.pxd b/src/sage/matrix/matrix_gf2e_dense.pxd index 9357616496b..dcd1019f230 100644 --- a/src/sage/matrix/matrix_gf2e_dense.pxd +++ b/src/sage/matrix/matrix_gf2e_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from sage.libs.m4rie cimport mzed_t from sage.libs.m4ri cimport m4ri_word from sage.matrix.matrix_dense cimport Matrix_dense diff --git a/src/sage/matrix/matrix_gf2e_dense.pyx b/src/sage/matrix/matrix_gf2e_dense.pyx index 15e8328b1c7..a089770ef4c 100644 --- a/src/sage/matrix/matrix_gf2e_dense.pyx +++ b/src/sage/matrix/matrix_gf2e_dense.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-linbox +# -*- coding: utf-8 -*- # distutils: libraries = m4rie M4RI_LIBRARIES m # distutils: library_dirs = M4RI_LIBDIR # distutils: include_dirs = M4RI_INCDIR diff --git a/src/sage/matrix/matrix_integer_dense.pxd b/src/sage/matrix/matrix_integer_dense.pxd index d644241bbc3..c60b4422e97 100644 --- a/src/sage/matrix/matrix_integer_dense.pxd +++ b/src/sage/matrix/matrix_integer_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.gmp.types cimport * from sage.libs.flint.types cimport fmpz_mat_t diff --git a/src/sage/matrix/matrix_integer_dense.pyx b/src/sage/matrix/matrix_integer_dense.pyx index 26e5af5bf0c..e06e5af4c35 100644 --- a/src/sage/matrix/matrix_integer_dense.pyx +++ b/src/sage/matrix/matrix_integer_dense.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-linbox +# -*- coding: utf-8 -*- # distutils: extra_compile_args = NTL_CFLAGS M4RI_CFLAGS # distutils: libraries = iml NTL_LIBRARIES gmp m CBLAS_LIBRARIES # distutils: library_dirs = NTL_LIBDIR CBLAS_LIBDIR diff --git a/src/sage/matrix/matrix_integer_dense_hnf.py b/src/sage/matrix/matrix_integer_dense_hnf.py index 829746c0e00..30db173966f 100644 --- a/src/sage/matrix/matrix_integer_dense_hnf.py +++ b/src/sage/matrix/matrix_integer_dense_hnf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox """ Modular algorithm to compute Hermite normal forms of integer matrices diff --git a/src/sage/matrix/matrix_integer_dense_saturation.py b/src/sage/matrix/matrix_integer_dense_saturation.py index 75d645f0e51..65d3cc66495 100644 --- a/src/sage/matrix/matrix_integer_dense_saturation.py +++ b/src/sage/matrix/matrix_integer_dense_saturation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox """ Saturation over ZZ """ diff --git a/src/sage/matrix/matrix_integer_sparse.pxd b/src/sage/matrix/matrix_integer_sparse.pxd index 6d2ad42805e..fbfa9c9a793 100644 --- a/src/sage/matrix/matrix_integer_sparse.pxd +++ b/src/sage/matrix/matrix_integer_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.modules.vector_integer_sparse cimport mpz_vector from sage.ext.mod_int cimport mod_int from sage.matrix.matrix_sparse cimport Matrix_sparse diff --git a/src/sage/matrix/matrix_integer_sparse.pyx b/src/sage/matrix/matrix_integer_sparse.pyx index c068a55b35d..31c6c1e9d1a 100644 --- a/src/sage/matrix/matrix_integer_sparse.pyx +++ b/src/sage/matrix/matrix_integer_sparse.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-linbox +# -*- coding: utf-8 -*- r""" Sparse integer matrices diff --git a/src/sage/matrix/matrix_laurent_mpolynomial_dense.pxd b/src/sage/matrix/matrix_laurent_mpolynomial_dense.pxd index 5edd4f07346..2a1170d0bc5 100644 --- a/src/sage/matrix/matrix_laurent_mpolynomial_dense.pxd +++ b/src/sage/matrix/matrix_laurent_mpolynomial_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense cdef class Matrix_Laurent_mpolynomial_dense(Matrix_generic_dense): diff --git a/src/sage/matrix/matrix_laurent_mpolynomial_dense.pyx b/src/sage/matrix/matrix_laurent_mpolynomial_dense.pyx index d7877f812da..1f345a68ba6 100644 --- a/src/sage/matrix/matrix_laurent_mpolynomial_dense.pyx +++ b/src/sage/matrix/matrix_laurent_mpolynomial_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Dense matrices over multivariate polynomials over fields. diff --git a/src/sage/matrix/matrix_misc.py b/src/sage/matrix/matrix_misc.py index 9b464fa65c2..84ddd3819c7 100644 --- a/src/sage/matrix/matrix_misc.py +++ b/src/sage/matrix/matrix_misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Miscellaneous matrix functions diff --git a/src/sage/matrix/matrix_mod2_dense.pxd b/src/sage/matrix/matrix_mod2_dense.pxd index 7844c8d1e34..ea3575ef3be 100644 --- a/src/sage/matrix/matrix_mod2_dense.pxd +++ b/src/sage/matrix/matrix_mod2_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from .matrix_dense cimport Matrix_dense from sage.libs.m4ri cimport * diff --git a/src/sage/matrix/matrix_mod2_dense.pyx b/src/sage/matrix/matrix_mod2_dense.pyx index afdee68abe3..f7689c60b07 100644 --- a/src/sage/matrix/matrix_mod2_dense.pyx +++ b/src/sage/matrix/matrix_mod2_dense.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-linbox +# -*- coding: utf-8 -*- # distutils: libraries = M4RI_LIBRARIES GDLIB_LIBRARIES LIBPNG_LIBRARIES ZLIB_LIBRARIES # distutils: library_dirs = M4RI_LIBDIR GDLIB_LIBDIR LIBPNG_LIBDIR ZLIB_LIBDIR # distutils: include_dirs = M4RI_INCDIR GDLIB_INCDIR LIBPNG_INCDIR ZLIB_INCDIR diff --git a/src/sage/matrix/matrix_modn_dense_double.pxd b/src/sage/matrix/matrix_modn_dense_double.pxd index 33e60ee9660..8cea9f2993b 100644 --- a/src/sage/matrix/matrix_modn_dense_double.pxd +++ b/src/sage/matrix/matrix_modn_dense_double.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl ctypedef double celement include "matrix_modn_dense_template_header.pxi" diff --git a/src/sage/matrix/matrix_modn_dense_double.pyx b/src/sage/matrix/matrix_modn_dense_double.pyx index 902339e81e5..b112ffba912 100644 --- a/src/sage/matrix/matrix_modn_dense_double.pyx +++ b/src/sage/matrix/matrix_modn_dense_double.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: language = c++ # distutils: libraries = CBLAS_LIBRARIES # distutils: library_dirs = CBLAS_LIBDIR diff --git a/src/sage/matrix/matrix_modn_dense_float.pxd b/src/sage/matrix/matrix_modn_dense_float.pxd index 99d9e4ed1ca..697e1e79e57 100644 --- a/src/sage/matrix/matrix_modn_dense_float.pxd +++ b/src/sage/matrix/matrix_modn_dense_float.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl ctypedef float celement include "matrix_modn_dense_template_header.pxi" diff --git a/src/sage/matrix/matrix_modn_dense_float.pyx b/src/sage/matrix/matrix_modn_dense_float.pyx index fd216c68386..73fbe175d95 100644 --- a/src/sage/matrix/matrix_modn_dense_float.pyx +++ b/src/sage/matrix/matrix_modn_dense_float.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: language = c++ # distutils: libraries = CBLAS_LIBRARIES # distutils: library_dirs = CBLAS_LIBDIR diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi index a0b83d63875..08f01205da1 100644 --- a/src/sage/matrix/matrix_modn_dense_template.pxi +++ b/src/sage/matrix/matrix_modn_dense_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl r""" Dense matrices over `\ZZ/n\ZZ` for `n` small using the LinBox library (FFLAS/FFPACK) diff --git a/src/sage/matrix/matrix_modn_dense_template_header.pxi b/src/sage/matrix/matrix_modn_dense_template_header.pxi index 90ca36aaedd..b5f12c69397 100644 --- a/src/sage/matrix/matrix_modn_dense_template_header.pxi +++ b/src/sage/matrix/matrix_modn_dense_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl """ Dense Matrix Template for C/C++ Library Interfaces """ diff --git a/src/sage/matrix/matrix_modn_sparse.pxd b/src/sage/matrix/matrix_modn_sparse.pxd index c808458ab3a..dded069b3d8 100644 --- a/src/sage/matrix/matrix_modn_sparse.pxd +++ b/src/sage/matrix/matrix_modn_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.matrix.matrix_sparse cimport Matrix_sparse from sage.modules.vector_modn_sparse cimport * diff --git a/src/sage/matrix/matrix_modn_sparse.pyx b/src/sage/matrix/matrix_modn_sparse.pyx index c7984d5a222..bffe9c31aa1 100644 --- a/src/sage/matrix/matrix_modn_sparse.pyx +++ b/src/sage/matrix/matrix_modn_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox r""" Sparse matrices over `\ZZ/n\ZZ` for `n` small diff --git a/src/sage/matrix/matrix_mpolynomial_dense.pxd b/src/sage/matrix/matrix_mpolynomial_dense.pxd index 0a4891f5e18..e4d70ba9dd0 100644 --- a/src/sage/matrix/matrix_mpolynomial_dense.pxd +++ b/src/sage/matrix/matrix_mpolynomial_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense from sage.libs.singular.decl cimport ideal diff --git a/src/sage/matrix/matrix_mpolynomial_dense.pyx b/src/sage/matrix/matrix_mpolynomial_dense.pyx index ec982d1f411..5b4e1c398ee 100644 --- a/src/sage/matrix/matrix_mpolynomial_dense.pyx +++ b/src/sage/matrix/matrix_mpolynomial_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Dense matrices over multivariate polynomials over fields diff --git a/src/sage/matrix/matrix_numpy_dense.pxd b/src/sage/matrix/matrix_numpy_dense.pxd index 2218cbc7b70..4fe2c65e0fc 100644 --- a/src/sage/matrix/matrix_numpy_dense.pxd +++ b/src/sage/matrix/matrix_numpy_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cimport numpy as cnumpy from sage.matrix.matrix_dense cimport Matrix_dense diff --git a/src/sage/matrix/matrix_numpy_dense.pyx b/src/sage/matrix/matrix_numpy_dense.pyx index 725f36ce34c..401f115ed78 100644 --- a/src/sage/matrix/matrix_numpy_dense.pyx +++ b/src/sage/matrix/matrix_numpy_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy """ Dense matrices using a NumPy backend diff --git a/src/sage/matrix/matrix_numpy_integer_dense.pxd b/src/sage/matrix/matrix_numpy_integer_dense.pxd index 6d63f9808e4..3116f89d8e2 100644 --- a/src/sage/matrix/matrix_numpy_integer_dense.pxd +++ b/src/sage/matrix/matrix_numpy_integer_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_numpy_dense cimport Matrix_numpy_dense diff --git a/src/sage/matrix/matrix_numpy_integer_dense.pyx b/src/sage/matrix/matrix_numpy_integer_dense.pyx index d09f354195a..8c449a86abf 100644 --- a/src/sage/matrix/matrix_numpy_integer_dense.pyx +++ b/src/sage/matrix/matrix_numpy_integer_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Dense integer matrices using a NumPy backend diff --git a/src/sage/matrix/matrix_polynomial_dense.pxd b/src/sage/matrix/matrix_polynomial_dense.pxd index 1ed11b24e3c..14caadea50c 100644 --- a/src/sage/matrix/matrix_polynomial_dense.pxd +++ b/src/sage/matrix/matrix_polynomial_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense cdef class Matrix_polynomial_dense(Matrix_generic_dense): diff --git a/src/sage/matrix/matrix_polynomial_dense.pyx b/src/sage/matrix/matrix_polynomial_dense.pyx index 54c2983eca9..7c0c1cd71eb 100644 --- a/src/sage/matrix/matrix_polynomial_dense.pyx +++ b/src/sage/matrix/matrix_polynomial_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Dense matrices over univariate polynomials over fields diff --git a/src/sage/matrix/matrix_rational_dense.pxd b/src/sage/matrix/matrix_rational_dense.pxd index 0f196e53f9e..d2d9955fefc 100644 --- a/src/sage/matrix/matrix_rational_dense.pxd +++ b/src/sage/matrix/matrix_rational_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.flint.types cimport fmpz_t, fmpq_mat_t from sage.matrix.matrix_dense cimport Matrix_dense diff --git a/src/sage/matrix/matrix_rational_dense.pyx b/src/sage/matrix/matrix_rational_dense.pyx index d44e223147e..7b6067892de 100644 --- a/src/sage/matrix/matrix_rational_dense.pyx +++ b/src/sage/matrix/matrix_rational_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: extra_compile_args = -D_XPG6 NTL_CFLAGS M4RI_CFLAGS # distutils: extra_link_args = NTL_LIBEXTRA # distutils: libraries = iml NTL_LIBRARIES m CBLAS_LIBRARIES diff --git a/src/sage/matrix/matrix_rational_sparse.pxd b/src/sage/matrix/matrix_rational_sparse.pxd index e6753ac0f4d..c754850bee9 100644 --- a/src/sage/matrix/matrix_rational_sparse.pxd +++ b/src/sage/matrix/matrix_rational_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.gmp.types cimport mpz_t from sage.modules.vector_rational_sparse cimport mpq_vector from sage.matrix.matrix_sparse cimport Matrix_sparse diff --git a/src/sage/matrix/matrix_rational_sparse.pyx b/src/sage/matrix/matrix_rational_sparse.pyx index 40d212811a8..dac06a3cfd3 100644 --- a/src/sage/matrix/matrix_rational_sparse.pyx +++ b/src/sage/matrix/matrix_rational_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox """ Sparse rational matrices diff --git a/src/sage/matrix/matrix_real_double_dense.pxd b/src/sage/matrix/matrix_real_double_dense.pxd index 4601c94cbd5..d781a84ce40 100644 --- a/src/sage/matrix/matrix_real_double_dense.pxd +++ b/src/sage/matrix/matrix_real_double_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_double_dense cimport Matrix_double_dense diff --git a/src/sage/matrix/matrix_real_double_dense.pyx b/src/sage/matrix/matrix_real_double_dense.pyx index a24098bb2f6..10eaeac4e56 100644 --- a/src/sage/matrix/matrix_real_double_dense.pyx +++ b/src/sage/matrix/matrix_real_double_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy """ Dense matrices over the Real Double Field using NumPy diff --git a/src/sage/matrix/matrix_space.py b/src/sage/matrix/matrix_space.py index 377afa9a5ee..aa9a6fe6111 100644 --- a/src/sage/matrix/matrix_space.py +++ b/src/sage/matrix/matrix_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Matrix Spaces diff --git a/src/sage/matrix/matrix_sparse.pxd b/src/sage/matrix/matrix_sparse.pxd index 46b4f668b26..7546645a6c9 100644 --- a/src/sage/matrix/matrix_sparse.pxd +++ b/src/sage/matrix/matrix_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from .matrix cimport Matrix cdef class Matrix_sparse(Matrix): diff --git a/src/sage/matrix/matrix_sparse.pyx b/src/sage/matrix/matrix_sparse.pyx index 3a1ffd931f1..d8b2e65127a 100644 --- a/src/sage/matrix/matrix_sparse.pyx +++ b/src/sage/matrix/matrix_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Base class for sparse matrices """ diff --git a/src/sage/matrix/matrix_symbolic_dense.pxd b/src/sage/matrix/matrix_symbolic_dense.pxd index 13d37e45f43..aa85e4c6a21 100644 --- a/src/sage/matrix/matrix_symbolic_dense.pxd +++ b/src/sage/matrix/matrix_symbolic_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics from sage.matrix.matrix_generic_dense cimport Matrix_generic_dense diff --git a/src/sage/matrix/matrix_symbolic_dense.pyx b/src/sage/matrix/matrix_symbolic_dense.pyx index e9c4213273e..7a0dab316d8 100644 --- a/src/sage/matrix/matrix_symbolic_dense.pyx +++ b/src/sage/matrix/matrix_symbolic_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Symbolic dense matrices diff --git a/src/sage/matrix/matrix_symbolic_sparse.pxd b/src/sage/matrix/matrix_symbolic_sparse.pxd index 6837cad281d..c90e0161119 100644 --- a/src/sage/matrix/matrix_symbolic_sparse.pxd +++ b/src/sage/matrix/matrix_symbolic_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics from sage.matrix.matrix_generic_sparse cimport Matrix_generic_sparse diff --git a/src/sage/matrix/matrix_symbolic_sparse.pyx b/src/sage/matrix/matrix_symbolic_sparse.pyx index 66907facf8e..680e36c5c6c 100644 --- a/src/sage/matrix/matrix_symbolic_sparse.pyx +++ b/src/sage/matrix/matrix_symbolic_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Symbolic sparse matrices diff --git a/src/sage/matrix/matrix_window.pxd b/src/sage/matrix/matrix_window.pxd index e167c351937..070f1deaf25 100644 --- a/src/sage/matrix/matrix_window.pxd +++ b/src/sage/matrix/matrix_window.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix cimport Matrix diff --git a/src/sage/matrix/matrix_window.pyx b/src/sage/matrix/matrix_window.pyx index 4ece8e027ce..11a8c0ed1b2 100644 --- a/src/sage/matrix/matrix_window.pyx +++ b/src/sage/matrix/matrix_window.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Matrix windows """ diff --git a/src/sage/matrix/misc.pyx b/src/sage/matrix/misc.pyx index 272a2838e50..5ff93f4accb 100644 --- a/src/sage/matrix/misc.pyx +++ b/src/sage/matrix/misc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox """ Misc matrix algorithms """ diff --git a/src/sage/matrix/misc_flint.pyx b/src/sage/matrix/misc_flint.pyx index 8bd45e68f2d..3e829df4d22 100644 --- a/src/sage/matrix/misc_flint.pyx +++ b/src/sage/matrix/misc_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Misc matrix algorithms using FLINT """ diff --git a/src/sage/matrix/misc_mpfr.pyx b/src/sage/matrix/misc_mpfr.pyx index 9e9905c6b47..91613b16492 100644 --- a/src/sage/matrix/misc_mpfr.pyx +++ b/src/sage/matrix/misc_mpfr.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Misc matrix algorithms using MPFR """ diff --git a/src/sage/matrix/operation_table.py b/src/sage/matrix/operation_table.py index a73d2bf92b8..50fe4f257dd 100644 --- a/src/sage/matrix/operation_table.py +++ b/src/sage/matrix/operation_table.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Operation Tables diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py index 3beab71b0b9..0399db53a03 100644 --- a/src/sage/matrix/special.py +++ b/src/sage/matrix/special.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- """ Constructors for special matrices diff --git a/src/sage/matrix/strassen.pyx b/src/sage/matrix/strassen.pyx index 4f0d877c2b5..e568011adb7 100644 --- a/src/sage/matrix/strassen.pyx +++ b/src/sage/matrix/strassen.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Generic Asymptotically Fast Strassen Algorithms diff --git a/src/sage/matrix/symplectic_basis.py b/src/sage/matrix/symplectic_basis.py index ca6581baea3..db38f5f3611 100644 --- a/src/sage/matrix/symplectic_basis.py +++ b/src/sage/matrix/symplectic_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Calculate symplectic bases for matrices over fields and the integers. diff --git a/src/sage/matrix/template.pxd b/src/sage/matrix/template.pxd index 4db874af5d2..69123a38f2d 100644 --- a/src/sage/matrix/template.pxd +++ b/src/sage/matrix/template.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matrix.matrix_dense cimport Matrix_dense diff --git a/src/sage/matrix/tests.py b/src/sage/matrix/tests.py index ef893bc931b..b4747bff5c9 100644 --- a/src/sage/matrix/tests.py +++ b/src/sage/matrix/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ TESTS: diff --git a/src/sage/matroids/advanced.py b/src/sage/matroids/advanced.py index e6221026371..8a9509efddc 100644 --- a/src/sage/matroids/advanced.py +++ b/src/sage/matroids/advanced.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Advanced matroid functionality. diff --git a/src/sage/matroids/all.py b/src/sage/matroids/all.py index 8d0105373c0..e647629c988 100644 --- a/src/sage/matroids/all.py +++ b/src/sage/matroids/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Matroids """ @@ -11,5 +10,3 @@ # import matroids_catalog as matroids lazy_import('sage.matroids.constructor', 'Matroid') lazy_import('sage.matroids', 'matroids_catalog', 'matroids') -del lazy_import -del install_doc diff --git a/src/sage/matroids/basis_exchange_matroid.pxd b/src/sage/matroids/basis_exchange_matroid.pxd index 473533eebe8..97cc4391633 100644 --- a/src/sage/matroids/basis_exchange_matroid.pxd +++ b/src/sage/matroids/basis_exchange_matroid.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.data_structures.bitset cimport * from sage.data_structures.bitset_base cimport bitset_t, bitset_s diff --git a/src/sage/matroids/basis_exchange_matroid.pyx b/src/sage/matroids/basis_exchange_matroid.pyx index ed0e8909a8c..835092678e2 100644 --- a/src/sage/matroids/basis_exchange_matroid.pyx +++ b/src/sage/matroids/basis_exchange_matroid.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Basis exchange matroids diff --git a/src/sage/matroids/basis_matroid.pxd b/src/sage/matroids/basis_matroid.pxd index ecb0baf8ed1..3782b51c5fa 100644 --- a/src/sage/matroids/basis_matroid.pxd +++ b/src/sage/matroids/basis_matroid.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.data_structures.bitset cimport bitset_t from sage.matroids.matroid cimport Matroid from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index d9d08183c3b..e0bdf394a0a 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Basis matroids diff --git a/src/sage/matroids/catalog.py b/src/sage/matroids/catalog.py index 87f2613ab3a..55dd69d2ef4 100644 --- a/src/sage/matroids/catalog.py +++ b/src/sage/matroids/catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Individual matroids in the catalog diff --git a/src/sage/matroids/circuit_closures_matroid.pxd b/src/sage/matroids/circuit_closures_matroid.pxd index 6bbbc072bac..7c7b61ec35f 100644 --- a/src/sage/matroids/circuit_closures_matroid.pxd +++ b/src/sage/matroids/circuit_closures_matroid.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matroids.matroid cimport Matroid diff --git a/src/sage/matroids/circuit_closures_matroid.pyx b/src/sage/matroids/circuit_closures_matroid.pyx index 385d314d8ea..4f029a7316d 100644 --- a/src/sage/matroids/circuit_closures_matroid.pyx +++ b/src/sage/matroids/circuit_closures_matroid.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Circuit closures matroids diff --git a/src/sage/matroids/constructor.py b/src/sage/matroids/constructor.py index ac9f489aade..cecfead568a 100644 --- a/src/sage/matroids/constructor.py +++ b/src/sage/matroids/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Matroid construction diff --git a/src/sage/matroids/database_matroids.py b/src/sage/matroids/database_matroids.py index 40ce2519b86..0017ce0627e 100644 --- a/src/sage/matroids/database_matroids.py +++ b/src/sage/matroids/database_matroids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Database of matroids diff --git a/src/sage/matroids/dual_matroid.py b/src/sage/matroids/dual_matroid.py index 3c0a824a943..37b9e6c046b 100644 --- a/src/sage/matroids/dual_matroid.py +++ b/src/sage/matroids/dual_matroid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Dual matroids diff --git a/src/sage/matroids/extension.pxd b/src/sage/matroids/extension.pxd index ad7e5899733..b48a9a7e02d 100644 --- a/src/sage/matroids/extension.pxd +++ b/src/sage/matroids/extension.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.data_structures.bitset cimport bitset_t from sage.matroids.basis_matroid cimport BasisMatroid diff --git a/src/sage/matroids/extension.pyx b/src/sage/matroids/extension.pyx index 5d1b166a138..d73b4581674 100644 --- a/src/sage/matroids/extension.pyx +++ b/src/sage/matroids/extension.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Iterators for linear subclasses diff --git a/src/sage/matroids/graphic_matroid.py b/src/sage/matroids/graphic_matroid.py index 6aedb5e3702..d29187c393f 100644 --- a/src/sage/matroids/graphic_matroid.py +++ b/src/sage/matroids/graphic_matroid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.graphs r""" Graphic Matroids diff --git a/src/sage/matroids/lean_matrix.pxd b/src/sage/matroids/lean_matrix.pxd index 26647ba3025..3091af107d0 100644 --- a/src/sage/matroids/lean_matrix.pxd +++ b/src/sage/matroids/lean_matrix.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.data_structures.bitset cimport bitset_t from sage.libs.gmp.types cimport mpq_t diff --git a/src/sage/matroids/lean_matrix.pyx b/src/sage/matroids/lean_matrix.pyx index 5a4e6bea6e5..ff511148392 100644 --- a/src/sage/matroids/lean_matrix.pyx +++ b/src/sage/matroids/lean_matrix.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.rings.finite_rings """ Lean matrices diff --git a/src/sage/matroids/linear_matroid.pxd b/src/sage/matroids/linear_matroid.pxd index bc496cb72d7..4902ccef6ef 100644 --- a/src/sage/matroids/linear_matroid.pxd +++ b/src/sage/matroids/linear_matroid.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.data_structures.bitset cimport bitset_t from sage.matroids.matroid cimport Matroid diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 33e78d7a586..f9b33fedab8 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Linear matroids diff --git a/src/sage/matroids/matroid.pxd b/src/sage/matroids/matroid.pxd index f60cfdca452..5103bcf2a4b 100644 --- a/src/sage/matroids/matroid.pxd +++ b/src/sage/matroids/matroid.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.sage_object cimport SageObject cdef class Matroid(SageObject): diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx index 2ba5d962067..940ef632016 100644 --- a/src/sage/matroids/matroid.pyx +++ b/src/sage/matroids/matroid.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- r""" The abstract Matroid class diff --git a/src/sage/matroids/matroids_catalog.py b/src/sage/matroids/matroids_catalog.py index ef7401119fb..4fbeddac9e8 100644 --- a/src/sage/matroids/matroids_catalog.py +++ b/src/sage/matroids/matroids_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Catalog of matroids diff --git a/src/sage/matroids/matroids_plot_helpers.py b/src/sage/matroids/matroids_plot_helpers.py index 1d6d28cc040..b7a3d7d6d03 100644 --- a/src/sage/matroids/matroids_plot_helpers.py +++ b/src/sage/matroids/matroids_plot_helpers.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - scipy r""" Helper functions for plotting the geometric representation of matroids diff --git a/src/sage/matroids/minor_matroid.py b/src/sage/matroids/minor_matroid.py index 79b15ac4d29..721dd653d8d 100644 --- a/src/sage/matroids/minor_matroid.py +++ b/src/sage/matroids/minor_matroid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Minors of matroids diff --git a/src/sage/matroids/named_matroids.py b/src/sage/matroids/named_matroids.py index 708d3ad2680..7fcd63b92c9 100644 --- a/src/sage/matroids/named_matroids.py +++ b/src/sage/matroids/named_matroids.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.superseded import deprecation from sage.matroids.database_matroids import * deprecation(36842, "named_matroids is deprecated, use catalog instead") diff --git a/src/sage/matroids/rank_matroid.py b/src/sage/matroids/rank_matroid.py index 9f1251512d6..c2ca7ccb980 100644 --- a/src/sage/matroids/rank_matroid.py +++ b/src/sage/matroids/rank_matroid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Rank function matroids diff --git a/src/sage/matroids/set_system.pxd b/src/sage/matroids/set_system.pxd index c80cec843e0..a283244b53b 100644 --- a/src/sage/matroids/set_system.pxd +++ b/src/sage/matroids/set_system.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.data_structures.bitset cimport bitset_t cdef class SetSystem: diff --git a/src/sage/matroids/set_system.pyx b/src/sage/matroids/set_system.pyx index dfe0fa175d2..606231a1734 100644 --- a/src/sage/matroids/set_system.pyx +++ b/src/sage/matroids/set_system.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Set systems diff --git a/src/sage/matroids/union_matroid.pxd b/src/sage/matroids/union_matroid.pxd index f286413eaee..d03ae476bda 100644 --- a/src/sage/matroids/union_matroid.pxd +++ b/src/sage/matroids/union_matroid.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matroids.matroid cimport Matroid diff --git a/src/sage/matroids/union_matroid.pyx b/src/sage/matroids/union_matroid.pyx index 19b3b45d143..817f9c4a222 100644 --- a/src/sage/matroids/union_matroid.pyx +++ b/src/sage/matroids/union_matroid.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.matroids.matroid cimport Matroid diff --git a/src/sage/matroids/unpickling.pyx b/src/sage/matroids/unpickling.pyx index 2785326c11a..9e41c28a477 100644 --- a/src/sage/matroids/unpickling.pyx +++ b/src/sage/matroids/unpickling.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Unpickling methods diff --git a/src/sage/matroids/utilities.py b/src/sage/matroids/utilities.py index d5561bb4067..a0cf14f5276 100644 --- a/src/sage/matroids/utilities.py +++ b/src/sage/matroids/utilities.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Some useful functions for the matroid class. diff --git a/src/sage/misc/abstract_method.py b/src/sage/misc/abstract_method.py index 3160c89344b..6179c5a2b8f 100644 --- a/src/sage/misc/abstract_method.py +++ b/src/sage/misc/abstract_method.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Abstract methods """ @@ -194,7 +193,7 @@ def _sage_src_lines_(self): sage: src[0] 'def version():\n' sage: lines - 19 + 18 """ from sage.misc.sageinspect import sage_getsourcelines return sage_getsourcelines(self._f) diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index dfa47c89ca6..8aee092368c 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,35 +1,129 @@ -# from sage.misc.all__sagemath_objects import * +from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute +from sage.misc.lazy_import import lazy_import + +from sage.misc.all__sagemath_objects import * from sage.misc.all__sagemath_environment import * -from sage.misc.all__sagemath_modules import * from sage.misc.all__sagemath_repl import * from sage.misc.misc import (BackslashOperator, - exists, forall, is_iterator, - random_sublist, - pad_zeros, - SAGE_DB, - newton_method_sizes, compose, - nest) + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) lazy_import('sage.misc.misc', 'union', deprecation=32096) +from sage.misc.banner import version + from sage.misc.dev_tools import import_statements +from sage.misc.html import html, pretty_print_default + +from sage.misc.table import table + +from sage.misc.sage_timeit_class import timeit + from sage.misc.edit_module import edit +from sage.misc.map_threaded import map_threaded + +from sage.misc.session import load_session, save_session, show_identifiers + from sage.misc.remote_file import get_remote_file +from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator + +from sage.misc.fpickle import pickle_function, unpickle_function + lazy_import('sage.misc.pager', 'pager') +lazy_import('sage.misc.sagedoc', ['browse_sage_doc', + 'search_src', 'search_def', 'search_doc', + 'tutorial', 'reference', 'manual', 'developer', + 'constructions', 'help']) +lazy_import('pydoc', 'help', 'python_help') + from sage.misc.classgraph import class_graph +from sage.misc.reset import reset, restore + +from sage.misc.mathml import mathml + +from sage.misc.defaults import (set_default_variable_name, + series_precision, set_series_precision) + lazy_import("sage.misc.cython", "cython_lambda") lazy_import("sage.misc.cython", "cython_compile", "cython") -# Following will go to all__sagemath_repl.py in #36566 -from sage.misc.explain_pickle import (explain_pickle, unpickle_newobj, unpickle_build, - unpickle_instantiate, unpickle_persistent, - unpickle_extension, unpickle_appends) +from sage.misc.func_persist import func_persist + +from sage.misc.functional import (additive_order, + base_ring, + base_field, + basis, + category, + charpoly, + characteristic_polynomial, + coerce, + cyclotomic_polynomial, + decomposition, + denominator, + det, + dimension, + dim, + discriminant, + disc, + eta, + fcp, + gen, + gens, + hecke_operator, + image, + integral, integrate, + integral_closure, + interval, + xinterval, + is_even, + is_odd, + kernel, + krull_dimension, + lift, + log as log_b, + minimal_polynomial, + minpoly, + multiplicative_order, + ngens, + norm, + numerator, + numerical_approx, + n, N, + objgens, + objgen, + order, + rank, + regulator, + round, + quotient, + quo, + isqrt, + squarefree_part, + sqrt, + symbolic_sum as sum, + symbolic_prod as product, + transpose) + + +from sage.misc.latex import LatexExpr, latex, view + +from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate + +from sage.misc.prandom import * + +from sage.misc.timing import walltime, cputime + +from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_global, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends lazy_import('sage.misc.inline_fortran', 'fortran') @@ -45,10 +139,3 @@ deprecation=34259) lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259) - -# Following will go to all__sagemath_objects.py in #36566 -from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate -from sage.misc.prandom import * -from sage.misc.sage_timeit_class import timeit -from sage.misc.session import load_session, save_session, show_identifiers -from sage.misc.reset import reset, restore diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py deleted file mode 100644 index 0806bdf7aec..00000000000 --- a/src/sage/misc/all__sagemath_categories.py +++ /dev/null @@ -1,77 +0,0 @@ - -from sage.misc.all__sagemath_objects import * - -from sage.misc.html import html, pretty_print_default - -from sage.misc.mathml import mathml - -from sage.misc.table import table - -from sage.misc.map_threaded import map_threaded - -from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator - -from sage.misc.defaults import (set_default_variable_name, - series_precision, set_series_precision) - - -from sage.misc.functional import (additive_order, - base_ring, - base_field, - basis, - category, - charpoly, - characteristic_polynomial, - coerce, - cyclotomic_polynomial, - decomposition, - denominator, - det, - dimension, - dim, - discriminant, - disc, - eta, - fcp, - gen, - gens, - hecke_operator, - image, - integral, integrate, - integral_closure, - interval, - xinterval, - is_even, - is_odd, - kernel, - krull_dimension, - lift, - log as log_b, - minimal_polynomial, - minpoly, - multiplicative_order, - ngens, - norm, - numerator, - numerical_approx, - n, N, - objgens, - objgen, - order, - rank, - regulator, - round, - quotient, - quo, - isqrt, - squarefree_part, - sqrt, - symbolic_sum as sum, - symbolic_prod as product, - transpose) - -from sage.misc.latex import LatexExpr, latex, view - -from sage.misc.fpickle import pickle_function, unpickle_function - -from sage.misc.persist import unpickle_global diff --git a/src/sage/misc/all__sagemath_environment.py b/src/sage/misc/all__sagemath_environment.py index 2f09e9c4d56..9ebcc85870b 100644 --- a/src/sage/misc/all__sagemath_environment.py +++ b/src/sage/misc/all__sagemath_environment.py @@ -1,2 +1 @@ -# sage_setup: distribution = sagemath-environment from sage.misc.temporary_file import tmp_dir, tmp_filename diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py deleted file mode 100644 index 8111aee2a29..00000000000 --- a/src/sage/misc/all__sagemath_modules.py +++ /dev/null @@ -1,20 +0,0 @@ -# All of sage.misc.all except for development tools, session management, -# and deprecated functionality - -from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute - -from sage.misc.all__sagemath_categories import * - -from sage.misc.misc import (BackslashOperator, # Depends on sage.env -- can lower to sagemath-objects after splitting this module - exists, forall, is_iterator, - random_sublist, - pad_zeros, - SAGE_DB, - newton_method_sizes, compose, - nest) - -from sage.misc.temporary_file import tmp_dir, tmp_filename # Depends on sage.env - -from sage.misc.mathml import mathml - -from sage.misc.func_persist import func_persist diff --git a/src/sage/misc/all__sagemath_ntl.py b/src/sage/misc/all__sagemath_ntl.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index 634584c5567..30a76f38fab 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # Subset of sage.misc.all that is made available by the sage-objects distribution import sage.structure.all # to break a cyclic import @@ -7,7 +6,7 @@ from sage.misc.lazy_import import lazy_import from sage.misc.verbose import (set_verbose, set_verbose_files, - get_verbose_files, unset_verbose_files, get_verbose) + get_verbose_files, unset_verbose_files, get_verbose) lazy_import('sage.misc.verbose', 'verbose', deprecation=17815) from sage.misc.call import attrcall diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 9c29d75ac03..c7acba4ab07 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -1,16 +1,3 @@ -# sage_setup: distribution = sagemath-repl - -from sage.misc.all__sagemath_objects import * - from sage.misc.sage_eval import sage_eval, sageobj from sage.misc.sage_input import sage_input - -from sage.misc.banner import version - -lazy_import('sage.misc.sagedoc', ['browse_sage_doc', - 'search_src', 'search_def', 'search_doc', - 'tutorial', 'reference', 'manual', 'developer', - 'constructions', 'help']) - -lazy_import('pydoc', 'help', 'python_help') diff --git a/src/sage/misc/allocator.pxd b/src/sage/misc/allocator.pxd index 63943541273..7945a75241f 100644 --- a/src/sage/misc/allocator.pxd +++ b/src/sage/misc/allocator.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from cpython.object cimport * cdef hook_tp_functions_type(object t, newfunc tp_new, destructor tp_dealloc, bint useGC) diff --git a/src/sage/misc/allocator.pyx b/src/sage/misc/allocator.pyx index 9448bbff2c1..b7fafdce286 100644 --- a/src/sage/misc/allocator.pyx +++ b/src/sage/misc/allocator.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from cpython.ref cimport Py_INCREF cdef _hook_tp_functions_type(PyTypeObject *t, newfunc tp_new, destructor tp_dealloc, bint useGC): diff --git a/src/sage/misc/banner.py b/src/sage/misc/banner.py index 0ecac1d75b9..9d231926705 100644 --- a/src/sage/misc/banner.py +++ b/src/sage/misc/banner.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" SageMath version and banner info """ diff --git a/src/sage/misc/binary_tree.pxd b/src/sage/misc/binary_tree.pxd index 4b0c1213363..4e54f74a71a 100644 --- a/src/sage/misc/binary_tree.pxd +++ b/src/sage/misc/binary_tree.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef struct binary_tree_node: int key binary_tree_node *left diff --git a/src/sage/misc/binary_tree.pyx b/src/sage/misc/binary_tree.pyx index 0f739946805..8451e0b1e04 100644 --- a/src/sage/misc/binary_tree.pyx +++ b/src/sage/misc/binary_tree.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Binary trees diff --git a/src/sage/misc/bindable_class.py b/src/sage/misc/bindable_class.py index d9cfa536dc9..8739bab3002 100644 --- a/src/sage/misc/bindable_class.py +++ b/src/sage/misc/bindable_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Bindable classes """ diff --git a/src/sage/misc/c3.pyx b/src/sage/misc/c3.pyx index a4452f4a7e6..a3f37380faf 100644 --- a/src/sage/misc/c3.pyx +++ b/src/sage/misc/c3.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ The C3 algorithm diff --git a/src/sage/misc/c3_controlled.pxd b/src/sage/misc/c3_controlled.pxd index 2340a4db9a8..d5dd5c23183 100644 --- a/src/sage/misc/c3_controlled.pxd +++ b/src/sage/misc/c3_controlled.pxd @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-objects - cpdef tuple C3_sorted_merge(list lists, key=?) diff --git a/src/sage/misc/c3_controlled.pyx b/src/sage/misc/c3_controlled.pyx index e120c578a86..befaa7b5b32 100644 --- a/src/sage/misc/c3_controlled.pyx +++ b/src/sage/misc/c3_controlled.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ The C3 algorithm, under control of a total order diff --git a/src/sage/misc/cachefunc.pxd b/src/sage/misc/cachefunc.pxd index a08889f22cb..1ebd6f25a9d 100644 --- a/src/sage/misc/cachefunc.pxd +++ b/src/sage/misc/cachefunc.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.misc.function_mangling cimport ArgumentFixer cpdef dict_key(o) diff --git a/src/sage/misc/cachefunc.pyx b/src/sage/misc/cachefunc.pyx index 094f036cbd3..7b95ce26779 100644 --- a/src/sage/misc/cachefunc.pyx +++ b/src/sage/misc/cachefunc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Cached Functions and Methods diff --git a/src/sage/misc/call.py b/src/sage/misc/call.py index 959b3143666..6de02981882 100644 --- a/src/sage/misc/call.py +++ b/src/sage/misc/call.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Attribute and method calling """ diff --git a/src/sage/misc/callable_dict.pyx b/src/sage/misc/callable_dict.pyx index 28555e7b3da..b1f93240a6a 100644 --- a/src/sage/misc/callable_dict.pyx +++ b/src/sage/misc/callable_dict.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- """ Callable dictionaries """ diff --git a/src/sage/misc/classcall_metaclass.pxd b/src/sage/misc/classcall_metaclass.pxd index 1ae792f074b..85ea3bd5eef 100644 --- a/src/sage/misc/classcall_metaclass.pxd +++ b/src/sage/misc/classcall_metaclass.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects #***************************************************************************** # Copyright (C) 2012 Florent Hivert # diff --git a/src/sage/misc/classcall_metaclass.pyx b/src/sage/misc/classcall_metaclass.pyx index 691f7fec01e..65351cb2756 100644 --- a/src/sage/misc/classcall_metaclass.pyx +++ b/src/sage/misc/classcall_metaclass.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Special Methods for Classes diff --git a/src/sage/misc/compat.py b/src/sage/misc/compat.py index 6bbe90e810e..e374cf97aac 100644 --- a/src/sage/misc/compat.py +++ b/src/sage/misc/compat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """Cross-platform compatibility routines and wrappers.""" #***************************************************************************** diff --git a/src/sage/misc/constant_function.pyx b/src/sage/misc/constant_function.pyx index 4eb58d7599a..e94f36da403 100644 --- a/src/sage/misc/constant_function.pyx +++ b/src/sage/misc/constant_function.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Constant functions """ diff --git a/src/sage/misc/converting_dict.py b/src/sage/misc/converting_dict.py index 2ae4bf1f47e..0cd7a47916e 100644 --- a/src/sage/misc/converting_dict.py +++ b/src/sage/misc/converting_dict.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Converting Dictionary diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py index 2ab17cad6d5..93ce994c537 100644 --- a/src/sage/misc/cython.py +++ b/src/sage/misc/cython.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.misc.cython """ Cython support functions diff --git a/src/sage/misc/decorators.py b/src/sage/misc/decorators.py index ba005138f14..9ded4260e3b 100644 --- a/src/sage/misc/decorators.py +++ b/src/sage/misc/decorators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Decorators diff --git a/src/sage/misc/defaults.py b/src/sage/misc/defaults.py index fb1bc4779da..3d75021d198 100644 --- a/src/sage/misc/defaults.py +++ b/src/sage/misc/defaults.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Default Settings diff --git a/src/sage/misc/derivative.pyx b/src/sage/misc/derivative.pyx index 8196074a492..9788e82e06e 100644 --- a/src/sage/misc/derivative.pyx +++ b/src/sage/misc/derivative.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2008 William Stein # diff --git a/src/sage/misc/dev_tools.py b/src/sage/misc/dev_tools.py index 5b1832c27bd..8a4420f2314 100644 --- a/src/sage/misc/dev_tools.py +++ b/src/sage/misc/dev_tools.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Some tools for developers @@ -149,7 +148,6 @@ def load_submodules(module=None, exclude_pattern=None): EXAMPLES:: sage: sage.misc.dev_tools.load_submodules(sage.combinat) - load sage.combinat.affine_permutation... succeeded load sage.combinat.algebraic_combinatorics... succeeded ... load sage.combinat.words.suffix_trees... succeeded diff --git a/src/sage/misc/edit_module.py b/src/sage/misc/edit_module.py index e4594c2476b..58a3ab15a2a 100644 --- a/src/sage/misc/edit_module.py +++ b/src/sage/misc/edit_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Edit the source code of Sage interactively diff --git a/src/sage/misc/element_with_label.py b/src/sage/misc/element_with_label.py index 3fca93b08a3..e7ae38264be 100644 --- a/src/sage/misc/element_with_label.py +++ b/src/sage/misc/element_with_label.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements with labels. diff --git a/src/sage/misc/explain_pickle.py b/src/sage/misc/explain_pickle.py index 5171927aa91..a0c6323270c 100644 --- a/src/sage/misc/explain_pickle.py +++ b/src/sage/misc/explain_pickle.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ A tool for inspecting Python pickles diff --git a/src/sage/misc/fast_methods.pxd b/src/sage/misc/fast_methods.pxd index 8a1070a263b..4df34feab62 100644 --- a/src/sage/misc/fast_methods.pxd +++ b/src/sage/misc/fast_methods.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cdef extern from "Python.h": cdef size_t SIZEOF_VOID_P diff --git a/src/sage/misc/fast_methods.pyx b/src/sage/misc/fast_methods.pyx index 6ac4a020da2..ce7f918cccd 100644 --- a/src/sage/misc/fast_methods.pyx +++ b/src/sage/misc/fast_methods.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Fast methods via Cython diff --git a/src/sage/misc/flatten.py b/src/sage/misc/flatten.py index 3b857fcb3d8..5ebc8c2ceaa 100644 --- a/src/sage/misc/flatten.py +++ b/src/sage/misc/flatten.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects "Flatten nested lists" import sys diff --git a/src/sage/misc/fpickle.pyx b/src/sage/misc/fpickle.pyx index b233b9cd7ae..37c26e431ba 100644 --- a/src/sage/misc/fpickle.pyx +++ b/src/sage/misc/fpickle.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # cython: old_style_globals=True # cython: binding=True """ diff --git a/src/sage/misc/func_persist.py b/src/sage/misc/func_persist.py index 8e157af0d94..65b6d536d79 100644 --- a/src/sage/misc/func_persist.py +++ b/src/sage/misc/func_persist.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Support for persistent functions in .sage files diff --git a/src/sage/misc/function_mangling.pxd b/src/sage/misc/function_mangling.pxd index e7c6cfd8780..01604088adc 100644 --- a/src/sage/misc/function_mangling.pxd +++ b/src/sage/misc/function_mangling.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cdef class ArgumentFixer: cdef public object f cdef public int _ndefault diff --git a/src/sage/misc/function_mangling.pyx b/src/sage/misc/function_mangling.pyx index 7efeb31e09b..1392fc4f2fd 100644 --- a/src/sage/misc/function_mangling.pyx +++ b/src/sage/misc/function_mangling.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # Copyright (c) 2009, Tom Boothby # All rights reserved. # diff --git a/src/sage/misc/functional.py b/src/sage/misc/functional.py index 2f58fd92df0..4ae9ecd6a2c 100644 --- a/src/sage/misc/functional.py +++ b/src/sage/misc/functional.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Functional notation diff --git a/src/sage/misc/html.py b/src/sage/misc/html.py index e6bd805bae5..0c7524674bc 100644 --- a/src/sage/misc/html.py +++ b/src/sage/misc/html.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ HTML Fragments diff --git a/src/sage/misc/inherit_comparison.pxd b/src/sage/misc/inherit_comparison.pxd index 86207223782..28a29270a25 100644 --- a/src/sage/misc/inherit_comparison.pxd +++ b/src/sage/misc/inherit_comparison.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cimport sage.cpython.cython_metaclass cdef class InheritComparisonMetaclass(type): diff --git a/src/sage/misc/inherit_comparison.pyx b/src/sage/misc/inherit_comparison.pyx index 9758d25574d..394044d8a9a 100644 --- a/src/sage/misc/inherit_comparison.pyx +++ b/src/sage/misc/inherit_comparison.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Metaclass for inheriting comparison functions diff --git a/src/sage/misc/inline_fortran.py b/src/sage/misc/inline_fortran.py index 2c131f77cc6..82da6982bec 100644 --- a/src/sage/misc/inline_fortran.py +++ b/src/sage/misc/inline_fortran.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Fortran compiler """ diff --git a/src/sage/misc/instancedoc.pyx b/src/sage/misc/instancedoc.pyx index 852cde57220..44ee70f64ba 100644 --- a/src/sage/misc/instancedoc.pyx +++ b/src/sage/misc/instancedoc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Dynamic documentation for instances of classes diff --git a/src/sage/misc/latex.py b/src/sage/misc/latex.py index 1769a31dea6..db573d16e66 100644 --- a/src/sage/misc/latex.py +++ b/src/sage/misc/latex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ LaTeX printing support diff --git a/src/sage/misc/latex_macros.py b/src/sage/misc/latex_macros.py index f2109e8cc9d..93fb11fbf48 100644 --- a/src/sage/misc/latex_macros.py +++ b/src/sage/misc/latex_macros.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" LaTeX macros diff --git a/src/sage/misc/latex_standalone.py b/src/sage/misc/latex_standalone.py index e539d2912d8..c21bdefb643 100644 --- a/src/sage/misc/latex_standalone.py +++ b/src/sage/misc/latex_standalone.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Standalone LaTeX Document class and TikzPicture diff --git a/src/sage/misc/lazy_attribute.pyx b/src/sage/misc/lazy_attribute.pyx index 4210fb7e081..e2dee7b58ac 100644 --- a/src/sage/misc/lazy_attribute.pyx +++ b/src/sage/misc/lazy_attribute.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Lazy attributes @@ -88,7 +87,7 @@ cdef class _lazy_attribute(): sage: src[0] 'def banner():\n' sage: lines - 89 + 88 """ from sage.misc.sageinspect import sage_getsourcelines return sage_getsourcelines(self.f) diff --git a/src/sage/misc/lazy_format.py b/src/sage/misc/lazy_format.py index d5e411ff005..b58ea155862 100644 --- a/src/sage/misc/lazy_format.py +++ b/src/sage/misc/lazy_format.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Lazy format strings """ diff --git a/src/sage/misc/lazy_import.pyx b/src/sage/misc/lazy_import.pyx index 800ae4bff85..d25b24a10dc 100644 --- a/src/sage/misc/lazy_import.pyx +++ b/src/sage/misc/lazy_import.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Lazy imports diff --git a/src/sage/misc/lazy_import_cache.py b/src/sage/misc/lazy_import_cache.py index 7ae240e8ee0..d47b6d5edfd 100644 --- a/src/sage/misc/lazy_import_cache.py +++ b/src/sage/misc/lazy_import_cache.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Lazy import cache """ diff --git a/src/sage/misc/lazy_list.pxd b/src/sage/misc/lazy_list.pxd index 13221457695..f8b51b47835 100644 --- a/src/sage/misc/lazy_list.pxd +++ b/src/sage/misc/lazy_list.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cdef class lazy_list_generic(): cdef list cache # the cache cdef lazy_list_generic master # a reference if self is a slice diff --git a/src/sage/misc/lazy_list.pyx b/src/sage/misc/lazy_list.pyx index 202f629b693..cd750933860 100644 --- a/src/sage/misc/lazy_list.pyx +++ b/src/sage/misc/lazy_list.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Lazy lists diff --git a/src/sage/misc/lazy_string.pxd b/src/sage/misc/lazy_string.pxd index aa8faae784e..7f7354e03ca 100644 --- a/src/sage/misc/lazy_string.pxd +++ b/src/sage/misc/lazy_string.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cdef class _LazyString(): cdef func cdef args diff --git a/src/sage/misc/lazy_string.pyx b/src/sage/misc/lazy_string.pyx index 1af6efd42ee..a0efbb186bf 100644 --- a/src/sage/misc/lazy_string.pyx +++ b/src/sage/misc/lazy_string.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- coding: utf-8 -*- """ Lazy strings diff --git a/src/sage/misc/map_threaded.py b/src/sage/misc/map_threaded.py index 8c2a9db5ed4..db525e0ef6f 100644 --- a/src/sage/misc/map_threaded.py +++ b/src/sage/misc/map_threaded.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Threaded map function """ diff --git a/src/sage/misc/mathml.py b/src/sage/misc/mathml.py index 5b0a047c7cd..bdb0e6fffe0 100644 --- a/src/sage/misc/mathml.py +++ b/src/sage/misc/mathml.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ MathML output support diff --git a/src/sage/misc/method_decorator.py b/src/sage/misc/method_decorator.py index 48cc2f64faf..2e7cf206da2 100644 --- a/src/sage/misc/method_decorator.py +++ b/src/sage/misc/method_decorator.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Base Class to Support Method Decorators diff --git a/src/sage/misc/misc.py b/src/sage/misc/misc.py index 50b4053534b..39a6ecffd14 100644 --- a/src/sage/misc/misc.py +++ b/src/sage/misc/misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Miscellaneous functions diff --git a/src/sage/misc/misc_c.pxd b/src/sage/misc/misc_c.pxd index ad553008767..acb36ab6d99 100644 --- a/src/sage/misc/misc_c.pxd +++ b/src/sage/misc/misc_c.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects cpdef list normalize_index(object key, int size) diff --git a/src/sage/misc/misc_c.pyx b/src/sage/misc/misc_c.pyx index be5e05e441b..56e7a323258 100644 --- a/src/sage/misc/misc_c.pyx +++ b/src/sage/misc/misc_c.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Miscellaneous functions (Cython) diff --git a/src/sage/misc/mrange.py b/src/sage/misc/mrange.py index bd01e44972d..47cf9d32e81 100644 --- a/src/sage/misc/mrange.py +++ b/src/sage/misc/mrange.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Multidimensional enumeration diff --git a/src/sage/misc/multireplace.py b/src/sage/misc/multireplace.py index debdd5d56b7..3b70d60e50c 100644 --- a/src/sage/misc/multireplace.py +++ b/src/sage/misc/multireplace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories "multi_replace" ########################################################################## diff --git a/src/sage/misc/namespace_package.py b/src/sage/misc/namespace_package.py index 61ba9e25727..eaa05bdfd71 100644 --- a/src/sage/misc/namespace_package.py +++ b/src/sage/misc/namespace_package.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Utility functions for namespace packages in Sage """ diff --git a/src/sage/misc/nested_class.pxd b/src/sage/misc/nested_class.pxd index ce96f44df8e..ac64c28422e 100644 --- a/src/sage/misc/nested_class.pxd +++ b/src/sage/misc/nested_class.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects cdef class NestedClassMetaclass(type): pass diff --git a/src/sage/misc/nested_class.pyx b/src/sage/misc/nested_class.pyx index 637d4c9c792..97ed312b08c 100644 --- a/src/sage/misc/nested_class.pyx +++ b/src/sage/misc/nested_class.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Fixing pickle for nested classes diff --git a/src/sage/misc/object_multiplexer.py b/src/sage/misc/object_multiplexer.py index 202310f41f2..00fd89d6652 100644 --- a/src/sage/misc/object_multiplexer.py +++ b/src/sage/misc/object_multiplexer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Multiplex calls to one object to calls to many objects diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py index 39d87ce6aa4..cc7ac5fdfb2 100644 --- a/src/sage/misc/package.py +++ b/src/sage/misc/package.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Listing Sage packages diff --git a/src/sage/misc/package_dir.py b/src/sage/misc/package_dir.py index 05432ebebbe..16c78d18462 100644 --- a/src/sage/misc/package_dir.py +++ b/src/sage/misc/package_dir.py @@ -116,7 +116,7 @@ def read_distribution(src_file): sage: read_distribution(os.path.join(SAGE_SRC, 'sage', 'graphs', 'graph_decompositions', 'tdlib.pyx')) 'sagemath-tdlib' sage: read_distribution(os.path.join(SAGE_SRC, 'sage', 'graphs', 'graph_decompositions', 'modular_decomposition.py')) - 'sagemath-graphs' + '' """ with open(src_file, encoding='utf-8', errors='ignore') as fh: for line in fh: @@ -200,8 +200,8 @@ def update_distribution(src_file, distribution, *, verbose=False): try: with open(src_file, 'r') as f: src_lines = f.read().splitlines() - except (UnicodeDecodeError, FileNotFoundError): - # Silently skip binary files, nonexisting files + except UnicodeDecodeError: + # Silently skip binary files return any_found = False any_change = False @@ -262,8 +262,6 @@ def is_package_or_sage_namespace_package_dir(path, *, distribution_filter=None): :mod:`sage.cpython` is an ordinary package:: sage: from sage.misc.package_dir import is_package_or_sage_namespace_package_dir - sage: len(sage.cpython.__path__) - 1 sage: directory = sage.cpython.__path__[0]; directory '.../sage/cpython' sage: is_package_or_sage_namespace_package_dir(directory) @@ -272,26 +270,23 @@ def is_package_or_sage_namespace_package_dir(path, *, distribution_filter=None): :mod:`sage.libs.mpfr` only has an ``__init__.pxd`` file, but we consider it a package directory for consistency with Cython:: - sage: directories = [os.path.join(p, 'mpfr') - ....: for p in sage.libs.__path__]; directories - ['.../sage/libs/mpfr'...] - sage: any(is_package_or_sage_namespace_package_dir(d) for d in directories) + sage: directory = os.path.join(sage.libs.__path__[0], 'mpfr'); directory + '.../sage/libs/mpfr' + sage: is_package_or_sage_namespace_package_dir(directory) True - :mod:`sage` is an implicit namespace package:: + :mod:`sage` is designated to become an implicit namespace package:: - sage: sage.__path__[0] + sage: directory = sage.__path__[0]; directory '.../sage' - sage: all(is_package_or_sage_namespace_package_dir(p) for p in sage.__path__) + sage: is_package_or_sage_namespace_package_dir(directory) True Not a package:: - sage: directories = [os.path.join(p, 'ginac') # needs sage.symbolic - ....: for p in sage.symbolic.__path__]; directories - ['.../sage/symbolic/ginac'...] - sage: any(is_package_or_sage_namespace_package_dir(d) # needs sage.symbolic - ....: for d in directories) + sage: directory = os.path.join(sage.symbolic.__path__[0], 'ginac'); directory # needs sage.symbolic + '.../sage/symbolic/ginac' + sage: is_package_or_sage_namespace_package_dir(directory) # needs sage.symbolic False """ if os.path.exists(os.path.join(path, '__init__.py')): # ordinary package diff --git a/src/sage/misc/pager.py b/src/sage/misc/pager.py index 2e5cd592676..84833d6135a 100644 --- a/src/sage/misc/pager.py +++ b/src/sage/misc/pager.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Pager for showing strings diff --git a/src/sage/misc/parser.pyx b/src/sage/misc/parser.pyx index 08179df444f..a028e953f90 100644 --- a/src/sage/misc/parser.pyx +++ b/src/sage/misc/parser.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- """ A parser for symbolic equations and expressions diff --git a/src/sage/misc/persist.pyx b/src/sage/misc/persist.pyx index 51be391958f..3e56e249d45 100644 --- a/src/sage/misc/persist.pyx +++ b/src/sage/misc/persist.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # cython: old_style_globals=True # The old_style_globals directive is important for load() to work correctly. # However, this should be removed in favor of user_globals; see diff --git a/src/sage/misc/pickle_old.pyx b/src/sage/misc/pickle_old.pyx index 58e9a02d0c1..ede0c6abe06 100644 --- a/src/sage/misc/pickle_old.pyx +++ b/src/sage/misc/pickle_old.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.superseded import deprecation_cython as deprecation import sage.rings.fraction_field_element diff --git a/src/sage/misc/prandom.py b/src/sage/misc/prandom.py index e49bf2af7ea..800ed60aedd 100644 --- a/src/sage/misc/prandom.py +++ b/src/sage/misc/prandom.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Random Numbers with Python API diff --git a/src/sage/misc/profiler.py b/src/sage/misc/profiler.py index 1f0592ede6c..a8e3592d935 100644 --- a/src/sage/misc/profiler.py +++ b/src/sage/misc/profiler.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Simple profiling tool diff --git a/src/sage/misc/proof.py b/src/sage/misc/proof.py index d4197bc7419..12a14869fd5 100644 --- a/src/sage/misc/proof.py +++ b/src/sage/misc/proof.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Whether or not computations are provably correct by default """ diff --git a/src/sage/misc/random_testing.py b/src/sage/misc/random_testing.py index f371642bb13..9dfb866bbc4 100644 --- a/src/sage/misc/random_testing.py +++ b/src/sage/misc/random_testing.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Random testing diff --git a/src/sage/misc/randstate.pxd b/src/sage/misc/randstate.pxd index 1e882164901..fc5e955eb79 100644 --- a/src/sage/misc/randstate.pxd +++ b/src/sage/misc/randstate.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.libs.gmp.types cimport gmp_randstate_t # The c_random() method on randstate objects gives a value diff --git a/src/sage/misc/randstate.pyx b/src/sage/misc/randstate.pyx index 6e909df0a9f..5809e4d7cb4 100644 --- a/src/sage/misc/randstate.pyx +++ b/src/sage/misc/randstate.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # sage.doctest: needs sage.groups sage.libs.gap sage.libs.ntl sage.libs.pari r""" Random Number States diff --git a/src/sage/misc/replace_dot_all.py b/src/sage/misc/replace_dot_all.py index 0160601bf63..117b7f6892b 100644 --- a/src/sage/misc/replace_dot_all.py +++ b/src/sage/misc/replace_dot_all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Implementation of the command ``sage --fiximports``. @@ -299,7 +298,7 @@ def process_line(location, line, replacements, row_index, verbose=False): sage: from sage.misc.replace_dot_all import * sage: location = os.path.join(sage.env.SAGE_SRC, 'sage/plot/arc.py') sage: replacements = find_replacements(location, package_regex='sage[.]plot[.]all', verbose=True); replacements - [[478, 24, 'from sage.plot.graphics import Graphics']] + [[477, 24, 'from sage.plot.graphics import Graphics']] sage: with open(location, "r") as file: ....: lines = file.readlines() sage: row_index, col_number, *_ = replacements[0] diff --git a/src/sage/misc/repr.py b/src/sage/misc/repr.py index 656319e0683..e6dc42d56a3 100644 --- a/src/sage/misc/repr.py +++ b/src/sage/misc/repr.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Repr formatting support """ diff --git a/src/sage/misc/reset.pyx b/src/sage/misc/reset.pyx index 561127fd7f0..1d979197d3d 100644 --- a/src/sage/misc/reset.pyx +++ b/src/sage/misc/reset.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # cython: old_style_globals=True """ Interpreter reset diff --git a/src/sage/misc/rest_index_of_methods.py b/src/sage/misc/rest_index_of_methods.py index 0dfc461d92b..d1b102829c9 100644 --- a/src/sage/misc/rest_index_of_methods.py +++ b/src/sage/misc/rest_index_of_methods.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" ReST index of functions diff --git a/src/sage/misc/sage_eval.py b/src/sage/misc/sage_eval.py index 3f0a62931d6..ec6d94543f9 100644 --- a/src/sage/misc/sage_eval.py +++ b/src/sage/misc/sage_eval.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Evaluating a String in Sage """ diff --git a/src/sage/misc/sage_input.py b/src/sage/misc/sage_input.py index a71a9d98c63..be38a27d683 100644 --- a/src/sage/misc/sage_input.py +++ b/src/sage/misc/sage_input.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Sage Input Formatting diff --git a/src/sage/misc/sage_ostools.pyx b/src/sage/misc/sage_ostools.pyx index 4db8638daf7..8a91afe54c2 100644 --- a/src/sage/misc/sage_ostools.pyx +++ b/src/sage/misc/sage_ostools.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Miscellaneous operating system functions """ diff --git a/src/sage/misc/sage_timeit.py b/src/sage/misc/sage_timeit.py index b1591b944fb..89c813e563b 100644 --- a/src/sage/misc/sage_timeit.py +++ b/src/sage/misc/sage_timeit.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Accurate timing information for Sage commands diff --git a/src/sage/misc/sage_timeit_class.pyx b/src/sage/misc/sage_timeit_class.pyx index 06afeb391ad..f568886574f 100644 --- a/src/sage/misc/sage_timeit_class.pyx +++ b/src/sage/misc/sage_timeit_class.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # This is here in Cython so we can access the interpreter globals # cython: old_style_globals=True """ diff --git a/src/sage/misc/sage_unittest.py b/src/sage/misc/sage_unittest.py index 1da0a3d72c7..9d3ce5db1e8 100644 --- a/src/sage/misc/sage_unittest.py +++ b/src/sage/misc/sage_unittest.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Unit testing for Sage objects """ diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py index f3e5e93ec12..308fa7d8340 100644 --- a/src/sage/misc/sagedoc.py +++ b/src/sage/misc/sagedoc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Format Sage documentation for viewing with IPython and the notebook diff --git a/src/sage/misc/sagedoc_conf.py b/src/sage/misc/sagedoc_conf.py index 723898b01c8..2cacfcf8327 100644 --- a/src/sage/misc/sagedoc_conf.py +++ b/src/sage/misc/sagedoc_conf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Sphinx configuration shared by sage.misc.sphinxify and sage_docbuild """ diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index 27d4ac54e9a..f79aeafb937 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Inspect Python, Sage, and Cython objects @@ -17,7 +16,7 @@ sage: sage_getdoc(sage.rings.rational).lstrip() 'Rational Numbers...' sage: sage_getsource(sage.rings.rational) - '# sage_setup: distribution = sagemath-categories...# distutils: ...Rational Numbers...' + '# distutils: ...Rational Numbers...' Python modules:: @@ -25,7 +24,7 @@ '.../sageinspect.py' sage: print(sage_getdoc(sage.misc.sageinspect).lstrip()[:40]) Inspect Python, Sage, and Cython objects - sage: sage_getsource(sage.misc.sageinspect).lstrip()[51:-1] + sage: sage_getsource(sage.misc.sageinspect).lstrip()[5:-1] 'Inspect Python, Sage, and Cython objects...' Test introspection of classes defined in Python and Cython files: @@ -1309,7 +1308,6 @@ def sage_getfile(obj): sage: from sage.misc.sageinspect import sage_getfile sage: sage_getfile(sage.rings.rational) '...sage/rings/rational.pyx' - sage: from sage.algebras.steenrod.steenrod_algebra import Sq # needs sage.combinat sage.modules sage: sage_getfile(Sq) # needs sage.combinat sage.modules '...sage/algebras/steenrod/steenrod_algebra.py' sage: sage_getfile(x) # needs sage.symbolic @@ -1388,7 +1386,6 @@ def sage_getfile_relative(obj): sage: from sage.misc.sageinspect import sage_getfile_relative sage: sage_getfile_relative(sage.rings.rational) 'sage/rings/rational.pyx' - sage: from sage.algebras.steenrod.steenrod_algebra import Sq # needs sage.combinat sage.modules sage: sage_getfile_relative(Sq) # needs sage.combinat sage.modules 'sage/algebras/steenrod/steenrod_algebra.py' sage: sage_getfile_relative(x) # needs sage.symbolic @@ -2270,9 +2267,8 @@ def sage_getsourcelines(obj): sage: from sage.misc.sageinspect import sage_getsourcelines sage: # needs sage.modules - sage: from sage.matrix.constructor import matrix sage: sage_getsourcelines(matrix)[1] - 22 + 21 sage: sage_getsourcelines(matrix)[0][0] 'def matrix(*args, **kwds):\n' @@ -2301,7 +2297,7 @@ def sage_getsourcelines(obj): sage: sage_getsourcelines(test_func) (['def base(x):\n', ... - ' return x\n'], 8) + ' return x\n'], 7) Here are some cases that were covered in :issue:`11298`; note that line numbers may easily change, and therefore we do diff --git a/src/sage/misc/search.pxd b/src/sage/misc/search.pxd index b4cef51a1f2..8cc43ba1b0f 100644 --- a/src/sage/misc/search.pxd +++ b/src/sage/misc/search.pxd @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-categories - -cpdef search(object v, object x) +cpdef search(object v, object x) \ No newline at end of file diff --git a/src/sage/misc/search.pyx b/src/sage/misc/search.pyx index 8463285daf4..a9e7149113e 100644 --- a/src/sage/misc/search.pyx +++ b/src/sage/misc/search.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Searching a sorted list diff --git a/src/sage/misc/session.pyx b/src/sage/misc/session.pyx index a727e759430..53b732309da 100644 --- a/src/sage/misc/session.pyx +++ b/src/sage/misc/session.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Loading and saving sessions and listing all variables diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py index e89137113f0..2fb6e95395c 100644 --- a/src/sage/misc/sphinxify.py +++ b/src/sage/misc/sphinxify.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sphinx r""" Process docstrings with Sphinx diff --git a/src/sage/misc/stopgap.pyx b/src/sage/misc/stopgap.pyx index 9aedd5ef1b1..0ca72e9fe1a 100644 --- a/src/sage/misc/stopgap.pyx +++ b/src/sage/misc/stopgap.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Stopgaps """ diff --git a/src/sage/misc/superseded.py b/src/sage/misc/superseded.py index 61f34b59cea..4c4cddddc5c 100644 --- a/src/sage/misc/superseded.py +++ b/src/sage/misc/superseded.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Handling Superseded Functionality diff --git a/src/sage/misc/table.py b/src/sage/misc/table.py index e3c521b4c31..33532ee2610 100644 --- a/src/sage/misc/table.py +++ b/src/sage/misc/table.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Tables diff --git a/src/sage/misc/temporary_file.py b/src/sage/misc/temporary_file.py index 375bd157f02..daf3cbac8e7 100644 --- a/src/sage/misc/temporary_file.py +++ b/src/sage/misc/temporary_file.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment """ Temporary file handling diff --git a/src/sage/misc/test_class_pickling.py b/src/sage/misc/test_class_pickling.py index c4af34f2132..f9c8003fa4a 100644 --- a/src/sage/misc/test_class_pickling.py +++ b/src/sage/misc/test_class_pickling.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules import copyreg diff --git a/src/sage/misc/test_nested_class.py b/src/sage/misc/test_nested_class.py index 747eecab5e4..40712bfc9fb 100644 --- a/src/sage/misc/test_nested_class.py +++ b/src/sage/misc/test_nested_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Test for nested class Parent diff --git a/src/sage/misc/timing.py b/src/sage/misc/timing.py index 5d82fa5f538..5e5c49b9594 100644 --- a/src/sage/misc/timing.py +++ b/src/sage/misc/timing.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Timing functions """ diff --git a/src/sage/misc/trace.py b/src/sage/misc/trace.py index a530a416f81..0c9210bfd19 100644 --- a/src/sage/misc/trace.py +++ b/src/sage/misc/trace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Interactively tracing execution of a command """ diff --git a/src/sage/misc/unknown.py b/src/sage/misc/unknown.py index 7c4e71a5f18..b87a3e67506 100644 --- a/src/sage/misc/unknown.py +++ b/src/sage/misc/unknown.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ The Unknown truth value diff --git a/src/sage/misc/verbose.py b/src/sage/misc/verbose.py index 2c186b445aa..184f8d10053 100644 --- a/src/sage/misc/verbose.py +++ b/src/sage/misc/verbose.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Verbosity System and Logging in SageMath diff --git a/src/sage/misc/viewer.py b/src/sage/misc/viewer.py index caca6647acf..85ff09aa341 100644 --- a/src/sage/misc/viewer.py +++ b/src/sage/misc/viewer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-environment r""" Determination of programs for viewing web pages, etc. diff --git a/src/sage/misc/weak_dict.pxd b/src/sage/misc/weak_dict.pxd index 7be392b79f3..f1e85012be7 100644 --- a/src/sage/misc/weak_dict.pxd +++ b/src/sage/misc/weak_dict.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cdef class WeakValueDictionary(dict): cdef __weakref__ cdef callback diff --git a/src/sage/misc/weak_dict.pyx b/src/sage/misc/weak_dict.pyx index f4b20c0fcd1..d806335d0e9 100644 --- a/src/sage/misc/weak_dict.pyx +++ b/src/sage/misc/weak_dict.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Fast and safe weak value dictionary diff --git a/src/sage/modular/abvar/abvar.py b/src/sage/modular/abvar/abvar.py index c64ae540afb..8e0906e45a8 100644 --- a/src/sage/modular/abvar/abvar.py +++ b/src/sage/modular/abvar/abvar.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Base class for modular abelian varieties diff --git a/src/sage/modular/abvar/abvar_ambient_jacobian.py b/src/sage/modular/abvar/abvar_ambient_jacobian.py index bb5d66cb327..32a006b3729 100644 --- a/src/sage/modular/abvar/abvar_ambient_jacobian.py +++ b/src/sage/modular/abvar/abvar_ambient_jacobian.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Ambient Jacobian abelian variety diff --git a/src/sage/modular/abvar/abvar_newform.py b/src/sage/modular/abvar/abvar_newform.py index af2be64c305..5d4976d5d54 100644 --- a/src/sage/modular/abvar/abvar_newform.py +++ b/src/sage/modular/abvar/abvar_newform.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Abelian varieties attached to newforms diff --git a/src/sage/modular/abvar/all.py b/src/sage/modular/abvar/all.py index e15363355dc..f0971bc0b42 100644 --- a/src/sage/modular/abvar/all.py +++ b/src/sage/modular/abvar/all.py @@ -1,8 +1,7 @@ -# sage_setup: distribution = sagemath-schemes ########################################################################### # Copyright (C) 2007 William Stein # # Distributed under the terms of the GNU General Public License (GPL) # -# https://www.gnu.org/licenses/ # +# http://www.gnu.org/licenses/ # ########################################################################### -from sage.modular.abvar.constructor import J0, J1, JH, AbelianVariety +from .constructor import J0, J1, JH, AbelianVariety diff --git a/src/sage/modular/abvar/constructor.py b/src/sage/modular/abvar/constructor.py index 0155acf27c9..5dd6a77b4ca 100644 --- a/src/sage/modular/abvar/constructor.py +++ b/src/sage/modular/abvar/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Constructors for certain modular abelian varieties diff --git a/src/sage/modular/abvar/cuspidal_subgroup.py b/src/sage/modular/abvar/cuspidal_subgroup.py index efacd8d21c5..82e373ad716 100644 --- a/src/sage/modular/abvar/cuspidal_subgroup.py +++ b/src/sage/modular/abvar/cuspidal_subgroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Cuspidal subgroups of modular abelian varieties diff --git a/src/sage/modular/abvar/finite_subgroup.py b/src/sage/modular/abvar/finite_subgroup.py index 8df71f0fc0e..2725e11a387 100644 --- a/src/sage/modular/abvar/finite_subgroup.py +++ b/src/sage/modular/abvar/finite_subgroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Finite subgroups of modular abelian varieties diff --git a/src/sage/modular/abvar/homology.py b/src/sage/modular/abvar/homology.py index 447e21ed6c7..da586d7c0e0 100644 --- a/src/sage/modular/abvar/homology.py +++ b/src/sage/modular/abvar/homology.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari r""" Homology of modular abelian varieties diff --git a/src/sage/modular/abvar/homspace.py b/src/sage/modular/abvar/homspace.py index 77a9e372777..e914e11cc8e 100644 --- a/src/sage/modular/abvar/homspace.py +++ b/src/sage/modular/abvar/homspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Spaces of homomorphisms between modular abelian varieties diff --git a/src/sage/modular/abvar/lseries.py b/src/sage/modular/abvar/lseries.py index a27812b222b..4d67f7b2dfd 100644 --- a/src/sage/modular/abvar/lseries.py +++ b/src/sage/modular/abvar/lseries.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ `L`-series of modular abelian varieties diff --git a/src/sage/modular/abvar/morphism.py b/src/sage/modular/abvar/morphism.py index b85cc670df9..cc7e5a22ab2 100644 --- a/src/sage/modular/abvar/morphism.py +++ b/src/sage/modular/abvar/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint r""" Hecke operators and morphisms between modular abelian varieties diff --git a/src/sage/modular/abvar/torsion_point.py b/src/sage/modular/abvar/torsion_point.py index 849b9451f30..6702a231cbb 100644 --- a/src/sage/modular/abvar/torsion_point.py +++ b/src/sage/modular/abvar/torsion_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field """ Torsion points on modular abelian varieties diff --git a/src/sage/modular/abvar/torsion_subgroup.py b/src/sage/modular/abvar/torsion_subgroup.py index 25cd48ada24..5993a611355 100644 --- a/src/sage/modular/abvar/torsion_subgroup.py +++ b/src/sage/modular/abvar/torsion_subgroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Torsion subgroups of modular abelian varieties diff --git a/src/sage/modular/all.py b/src/sage/modular/all.py index 19c03a95049..cfccb18e65f 100644 --- a/src/sage/modular/all.py +++ b/src/sage/modular/all.py @@ -1,25 +1,24 @@ -# sage_setup: distribution = sagemath-schemes from sage.misc.lazy_import import lazy_import -from sage.modular.quatalg.all import * +from .quatalg.all import * -from sage.modular.modsym.all import * +from .modsym.all import * -from sage.modular.modform.all import * +from .modform.all import * -from sage.modular.ssmod.all import * +from .ssmod.all import * -from sage.modular.abvar.all import * +from .abvar.all import * -from sage.modular.dirichlet import (DirichletGroup, - kronecker_character, kronecker_character_upside_down, - trivial_character) +from .dirichlet import (DirichletGroup, + kronecker_character, kronecker_character_upside_down, + trivial_character) -from sage.modular.arithgroup.all import (Gamma0, Gamma1, GammaH, Gamma, SL2Z, - ArithmeticSubgroup_Permutation, - CongruenceSubgroup, FareySymbol) +from .arithgroup.all import (Gamma0, Gamma1, GammaH, Gamma, SL2Z, + ArithmeticSubgroup_Permutation, + CongruenceSubgroup, FareySymbol) -from sage.modular.cusps import Cusp, Cusps +from .cusps import Cusp, Cusps lazy_import('sage.modular.dims', ('dimension_cusp_forms', 'dimension_new_cusp_forms', @@ -28,20 +27,19 @@ 'sturm_bound'), deprecation=(32647, 'removed from main namespace')) -from sage.modular.etaproducts import (EtaGroup, EtaProduct, EtaGroupElement, - AllCusps, CuspFamily) +from .etaproducts import (EtaGroup, EtaProduct, EtaGroupElement, + AllCusps, CuspFamily) lazy_import('sage.modular.multiple_zeta', ['Multizeta', 'Multizetas']) -from sage.modular.overconvergent.all import * +from .overconvergent.all import * -from sage.modular.local_comp.all import * +from .local_comp.all import * -from sage.modular.cusps_nf import NFCusp, NFCusps, Gamma0_NFCusps +from .cusps_nf import NFCusp, NFCusps, Gamma0_NFCusps -from sage.modular.btquotients.all import * +from .btquotients.all import * -from sage.modular.pollack_stevens.all import * +from .pollack_stevens.all import * -from sage.modular.quasimodform.all import * -del lazy_import +from .quasimodform.all import * diff --git a/src/sage/modular/arithgroup/all.py b/src/sage/modular/arithgroup/all.py index 4dd543b8e14..d4fb241d1f9 100644 --- a/src/sage/modular/arithgroup/all.py +++ b/src/sage/modular/arithgroup/all.py @@ -1,20 +1,18 @@ -# sage_setup: distribution = sagemath-schemes # Note: the is_xxx functions are imported to here, but not from here up to sage.modular.all, so # they are invisible to the user but easy to import all in one go by other code that needs them. -from sage.modular.arithgroup.arithgroup_generic import is_ArithmeticSubgroup -from sage.modular.arithgroup.congroup_generic import is_CongruenceSubgroup, CongruenceSubgroup_constructor as CongruenceSubgroup -from sage.modular.arithgroup.congroup_gammaH import GammaH_constructor as GammaH, is_GammaH -from sage.modular.arithgroup.congroup_gamma1 import Gamma1_constructor as Gamma1, is_Gamma1 -from sage.modular.arithgroup.congroup_gamma0 import Gamma0_constructor as Gamma0, is_Gamma0 -from sage.modular.arithgroup.congroup_gamma import Gamma_constructor as Gamma, is_Gamma -from sage.modular.arithgroup.congroup_sl2z import SL2Z, is_SL2Z +from .arithgroup_generic import is_ArithmeticSubgroup +from .congroup_generic import is_CongruenceSubgroup, CongruenceSubgroup_constructor as CongruenceSubgroup +from .congroup_gammaH import GammaH_constructor as GammaH, is_GammaH +from .congroup_gamma1 import Gamma1_constructor as Gamma1, is_Gamma1 +from .congroup_gamma0 import Gamma0_constructor as Gamma0, is_Gamma0 +from .congroup_gamma import Gamma_constructor as Gamma, is_Gamma +from .congroup_sl2z import SL2Z, is_SL2Z from sage.misc.lazy_import import lazy_import lazy_import('sage.modular.arithgroup.arithgroup_perm', 'ArithmeticSubgroup_Permutation') -from sage.modular.arithgroup.congroup import (degeneracy_coset_representatives_gamma0, - degeneracy_coset_representatives_gamma1) +from .congroup import (degeneracy_coset_representatives_gamma0, + degeneracy_coset_representatives_gamma1) -from sage.modular.arithgroup.farey_symbol import Farey as FareySymbol -del lazy_import +from .farey_symbol import Farey as FareySymbol diff --git a/src/sage/modular/arithgroup/arithgroup_element.pyx b/src/sage/modular/arithgroup/arithgroup_element.pyx index b0602f1ec0b..1b3db34a04c 100644 --- a/src/sage/modular/arithgroup/arithgroup_element.pyx +++ b/src/sage/modular/arithgroup/arithgroup_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Elements of arithmetic subgroups """ diff --git a/src/sage/modular/arithgroup/arithgroup_generic.py b/src/sage/modular/arithgroup/arithgroup_generic.py index 90be418efae..105eaed623b 100644 --- a/src/sage/modular/arithgroup/arithgroup_generic.py +++ b/src/sage/modular/arithgroup/arithgroup_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Arithmetic subgroups, finite index subgroups of `\SL_2(\ZZ)` diff --git a/src/sage/modular/arithgroup/arithgroup_perm.py b/src/sage/modular/arithgroup/arithgroup_perm.py index e9ec3094d8b..6ff94e3bcac 100644 --- a/src/sage/modular/arithgroup/arithgroup_perm.py +++ b/src/sage/modular/arithgroup/arithgroup_perm.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.groups r""" Arithmetic subgroups defined by permutations of cosets diff --git a/src/sage/modular/arithgroup/congroup.pyx b/src/sage/modular/arithgroup/congroup.pyx index 90a4b113392..002e3bb02da 100644 --- a/src/sage/modular/arithgroup/congroup.pyx +++ b/src/sage/modular/arithgroup/congroup.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Helper functions for congruence subgroups diff --git a/src/sage/modular/arithgroup/congroup_gamma.py b/src/sage/modular/arithgroup/congroup_gamma.py index 2c90bd49a7c..fee74dcce8e 100644 --- a/src/sage/modular/arithgroup/congroup_gamma.py +++ b/src/sage/modular/arithgroup/congroup_gamma.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Congruence subgroup `\Gamma(N)` """ diff --git a/src/sage/modular/arithgroup/congroup_gamma0.py b/src/sage/modular/arithgroup/congroup_gamma0.py index 21231c5fab1..aecf1582f98 100644 --- a/src/sage/modular/arithgroup/congroup_gamma0.py +++ b/src/sage/modular/arithgroup/congroup_gamma0.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Congruence subgroup `\Gamma_0(N)` diff --git a/src/sage/modular/arithgroup/congroup_gamma1.py b/src/sage/modular/arithgroup/congroup_gamma1.py index 4b73021bf33..0e417904b0e 100644 --- a/src/sage/modular/arithgroup/congroup_gamma1.py +++ b/src/sage/modular/arithgroup/congroup_gamma1.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Congruence subgroup `\Gamma_1(N)` diff --git a/src/sage/modular/arithgroup/congroup_gammaH.py b/src/sage/modular/arithgroup/congroup_gammaH.py index 2162c8fa684..0b97c83ecf7 100644 --- a/src/sage/modular/arithgroup/congroup_gammaH.py +++ b/src/sage/modular/arithgroup/congroup_gammaH.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Congruence subgroup `\Gamma_H(N)` diff --git a/src/sage/modular/arithgroup/congroup_generic.py b/src/sage/modular/arithgroup/congroup_generic.py index 7cabf15d855..3fd60c06165 100644 --- a/src/sage/modular/arithgroup/congroup_generic.py +++ b/src/sage/modular/arithgroup/congroup_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.gap sage.libs.pari r""" Congruence arithmetic subgroups of `\SL_2(\ZZ)` diff --git a/src/sage/modular/arithgroup/congroup_sl2z.py b/src/sage/modular/arithgroup/congroup_sl2z.py index baa20b48463..d870f207b38 100644 --- a/src/sage/modular/arithgroup/congroup_sl2z.py +++ b/src/sage/modular/arithgroup/congroup_sl2z.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" The modular group `\SL_2(\ZZ)` diff --git a/src/sage/modular/arithgroup/farey_symbol.pyx b/src/sage/modular/arithgroup/farey_symbol.pyx index f43abc157b7..61c2446a16b 100644 --- a/src/sage/modular/arithgroup/farey_symbol.pyx +++ b/src/sage/modular/arithgroup/farey_symbol.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # distutils: sources = sage/modular/arithgroup/sl2z.cpp sage/modular/arithgroup/farey.cpp # distutils: language = c++ # distutils: extra_compile_args = -std=c++11 diff --git a/src/sage/modular/arithgroup/tests.py b/src/sage/modular/arithgroup/tests.py index 080067913e6..d30ead3ac4c 100644 --- a/src/sage/modular/arithgroup/tests.py +++ b/src/sage/modular/arithgroup/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.groups r""" Testing arithmetic subgroup diff --git a/src/sage/modular/btquotients/all.py b/src/sage/modular/btquotients/all.py index 15c39012db2..3807442da70 100644 --- a/src/sage/modular/btquotients/all.py +++ b/src/sage/modular/btquotients/all.py @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-schemes - -from sage.modular.btquotients.btquotient import BruhatTitsQuotient -# from pautomorphicform import pAdicAutomorphicForms -# from pautomorphicform import BruhatTitsHarmonicCocycles +from .btquotient import BruhatTitsQuotient +#from pautomorphicform import pAdicAutomorphicForms +#from pautomorphicform import BruhatTitsHarmonicCocycles diff --git a/src/sage/modular/btquotients/btquotient.py b/src/sage/modular/btquotients/btquotient.py index 29be990dd5d..828a003b0ab 100644 --- a/src/sage/modular/btquotients/btquotient.py +++ b/src/sage/modular/btquotients/btquotient.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Quotients of the Bruhat-Tits tree diff --git a/src/sage/modular/btquotients/pautomorphicform.py b/src/sage/modular/btquotients/pautomorphicform.py index 03298554a01..fc06af86c38 100644 --- a/src/sage/modular/btquotients/pautomorphicform.py +++ b/src/sage/modular/btquotients/pautomorphicform.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari ######################################################################### # Copyright (C) 2011 Cameron Franc and Marc Masdeu diff --git a/src/sage/modular/buzzard.py b/src/sage/modular/buzzard.py index 06583f1a435..72e72e745cc 100644 --- a/src/sage/modular/buzzard.py +++ b/src/sage/modular/buzzard.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Conjectural slopes of Hecke polynomials diff --git a/src/sage/modular/congroup.py b/src/sage/modular/congroup.py index 57ae81ec647..23a6679fdcc 100644 --- a/src/sage/modular/congroup.py +++ b/src/sage/modular/congroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes ########################################################### # Re-bindings for unpickling # diff --git a/src/sage/modular/congroup_element.py b/src/sage/modular/congroup_element.py index f599fcf9c64..61ae5071e46 100644 --- a/src/sage/modular/congroup_element.py +++ b/src/sage/modular/congroup_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes ########################################################### # Re-bindings for unpickling # diff --git a/src/sage/modular/cusps.py b/src/sage/modular/cusps.py index f9857528547..263eb61308a 100644 --- a/src/sage/modular/cusps.py +++ b/src/sage/modular/cusps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" The set `\mathbb{P}^1(\QQ)` of cusps diff --git a/src/sage/modular/cusps_nf.py b/src/sage/modular/cusps_nf.py index 73f020879ad..8d8b580a74e 100644 --- a/src/sage/modular/cusps_nf.py +++ b/src/sage/modular/cusps_nf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" The set `\mathbb{P}^1(K)` of cusps of a number field `K` diff --git a/src/sage/modular/dims.py b/src/sage/modular/dims.py index e7d6e79c2a1..b8b83e87b57 100644 --- a/src/sage/modular/dims.py +++ b/src/sage/modular/dims.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Dimensions of spaces of modular forms diff --git a/src/sage/modular/dirichlet.py b/src/sage/modular/dirichlet.py index b73169fc7fb..7b0c28c5c32 100644 --- a/src/sage/modular/dirichlet.py +++ b/src/sage/modular/dirichlet.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Dirichlet characters diff --git a/src/sage/modular/etaproducts.py b/src/sage/modular/etaproducts.py index 51bbebac142..54442f02ec8 100644 --- a/src/sage/modular/etaproducts.py +++ b/src/sage/modular/etaproducts.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Eta-products on modular curves `X_0(N)` diff --git a/src/sage/modular/hecke/algebra.py b/src/sage/modular/hecke/algebra.py index 0d932ab23c3..2f314e5d3ef 100644 --- a/src/sage/modular/hecke/algebra.py +++ b/src/sage/modular/hecke/algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Hecke algebras diff --git a/src/sage/modular/hecke/all.py b/src/sage/modular/hecke/all.py index 144d82f1ca3..0aaa2232773 100644 --- a/src/sage/modular/hecke/all.py +++ b/src/sage/modular/hecke/all.py @@ -1,21 +1,19 @@ -# sage_setup: distribution = sagemath-schemes +from .homspace import HeckeModuleHomspace, is_HeckeModuleHomspace -from sage.modular.hecke.homspace import HeckeModuleHomspace, is_HeckeModuleHomspace +from .module import HeckeModule_free_module, HeckeModule_generic, is_HeckeModule -from sage.modular.hecke.module import HeckeModule_free_module, HeckeModule_generic, is_HeckeModule +from .hecke_operator import HeckeOperator, is_HeckeOperator -from sage.modular.hecke.hecke_operator import HeckeOperator, is_HeckeOperator +from .degenmap import DegeneracyMap -from sage.modular.hecke.degenmap import DegeneracyMap +from .algebra import HeckeAlgebra, is_HeckeAlgebra -from sage.modular.hecke.algebra import HeckeAlgebra, is_HeckeAlgebra +from .morphism import (HeckeModuleMorphism, HeckeModuleMorphism_matrix, + is_HeckeModuleMorphism, + is_HeckeModuleMorphism_matrix) -from sage.modular.hecke.morphism import (HeckeModuleMorphism, HeckeModuleMorphism_matrix, - is_HeckeModuleMorphism, - is_HeckeModuleMorphism_matrix) +from .element import HeckeModuleElement, is_HeckeModuleElement -from sage.modular.hecke.element import HeckeModuleElement, is_HeckeModuleElement +from .submodule import HeckeSubmodule, is_HeckeSubmodule -from sage.modular.hecke.submodule import HeckeSubmodule, is_HeckeSubmodule - -from sage.modular.hecke.ambient_module import AmbientHeckeModule, is_AmbientHeckeModule +from .ambient_module import AmbientHeckeModule, is_AmbientHeckeModule diff --git a/src/sage/modular/hecke/ambient_module.py b/src/sage/modular/hecke/ambient_module.py index b1f758c3e6a..7805cd2d364 100644 --- a/src/sage/modular/hecke/ambient_module.py +++ b/src/sage/modular/hecke/ambient_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Ambient Hecke modules diff --git a/src/sage/modular/hecke/degenmap.py b/src/sage/modular/hecke/degenmap.py index 1590a691f19..887506e7559 100644 --- a/src/sage/modular/hecke/degenmap.py +++ b/src/sage/modular/hecke/degenmap.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Degeneracy maps diff --git a/src/sage/modular/hecke/element.py b/src/sage/modular/hecke/element.py index f0ce2337bee..f45a29f6b31 100644 --- a/src/sage/modular/hecke/element.py +++ b/src/sage/modular/hecke/element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Elements of Hecke modules diff --git a/src/sage/modular/hecke/hecke_operator.py b/src/sage/modular/hecke/hecke_operator.py index d21262f91e7..b1e6ea9707c 100644 --- a/src/sage/modular/hecke/hecke_operator.py +++ b/src/sage/modular/hecke/hecke_operator.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Hecke operators diff --git a/src/sage/modular/hecke/homspace.py b/src/sage/modular/hecke/homspace.py index 34b9a8ec3d6..194162faba4 100644 --- a/src/sage/modular/hecke/homspace.py +++ b/src/sage/modular/hecke/homspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Hom spaces between Hecke modules diff --git a/src/sage/modular/hecke/module.py b/src/sage/modular/hecke/module.py index 7757f83ba10..65536b4a043 100644 --- a/src/sage/modular/hecke/module.py +++ b/src/sage/modular/hecke/module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Hecke modules diff --git a/src/sage/modular/hecke/morphism.py b/src/sage/modular/hecke/morphism.py index b3f105807e2..ac9cfbf4e84 100644 --- a/src/sage/modular/hecke/morphism.py +++ b/src/sage/modular/hecke/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Morphisms of Hecke modules diff --git a/src/sage/modular/hecke/submodule.py b/src/sage/modular/hecke/submodule.py index c9873c05b48..5e9bf127496 100644 --- a/src/sage/modular/hecke/submodule.py +++ b/src/sage/modular/hecke/submodule.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Submodules of Hecke modules diff --git a/src/sage/modular/hypergeometric_misc.pxd b/src/sage/modular/hypergeometric_misc.pxd index 79a8931c3ce..00bf9a97e9a 100644 --- a/src/sage/modular/hypergeometric_misc.pxd +++ b/src/sage/modular/hypergeometric_misc.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-schemes cpdef hgm_coeffs(long long p, int f, int prec, gamma, m, int D, gtable, int gtable_prec, bint use_longs) diff --git a/src/sage/modular/hypergeometric_misc.pyx b/src/sage/modular/hypergeometric_misc.pyx index 77f351c3e1a..b8c39aeefa7 100644 --- a/src/sage/modular/hypergeometric_misc.pyx +++ b/src/sage/modular/hypergeometric_misc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Some utility routines for the hypergeometric motives package that benefit significantly from Cythonization. diff --git a/src/sage/modular/hypergeometric_motive.py b/src/sage/modular/hypergeometric_motive.py index afe857d0e40..26a9ff00c7c 100644 --- a/src/sage/modular/hypergeometric_motive.py +++ b/src/sage/modular/hypergeometric_motive.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Hypergeometric motives diff --git a/src/sage/modular/local_comp/all.py b/src/sage/modular/local_comp/all.py index 60806b8c93f..1df1ec59fd6 100644 --- a/src/sage/modular/local_comp/all.py +++ b/src/sage/modular/local_comp/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-schemes - -from sage.modular.local_comp.local_comp import LocalComponent +from .local_comp import LocalComponent diff --git a/src/sage/modular/local_comp/liftings.py b/src/sage/modular/local_comp/liftings.py index fa5ef7d369a..dcb901cc3a1 100644 --- a/src/sage/modular/local_comp/liftings.py +++ b/src/sage/modular/local_comp/liftings.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Helper functions for local components diff --git a/src/sage/modular/local_comp/local_comp.py b/src/sage/modular/local_comp/local_comp.py index 21f62500928..0fb990c17de 100644 --- a/src/sage/modular/local_comp/local_comp.py +++ b/src/sage/modular/local_comp/local_comp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Local components of modular forms diff --git a/src/sage/modular/local_comp/smoothchar.py b/src/sage/modular/local_comp/smoothchar.py index e278c6b2106..cfce7550fda 100644 --- a/src/sage/modular/local_comp/smoothchar.py +++ b/src/sage/modular/local_comp/smoothchar.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari sage.rings.number_field r""" Smooth characters of `p`-adic fields diff --git a/src/sage/modular/local_comp/type_space.py b/src/sage/modular/local_comp/type_space.py index a85005966a8..a808ef48743 100644 --- a/src/sage/modular/local_comp/type_space.py +++ b/src/sage/modular/local_comp/type_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Type spaces of newforms diff --git a/src/sage/modular/modform/all.py b/src/sage/modular/modform/all.py index 18afdf8401e..feb1521d3ca 100644 --- a/src/sage/modular/modform/all.py +++ b/src/sage/modular/modform/all.py @@ -1,30 +1,28 @@ -# sage_setup: distribution = sagemath-schemes ######################################################################### # Copyright (C) 2004--2006 William Stein # # Distributed under the terms of the GNU General Public License (GPL) # -# https://www.gnu.org/licenses/ +# http://www.gnu.org/licenses/ ######################################################################### -from sage.modular.modform.constructor import ModularForms, CuspForms, EisensteinForms, Newforms, Newform +from .constructor import ModularForms, CuspForms, EisensteinForms, Newforms, Newform -from sage.modular.modform.eis_series import eisenstein_series_qexp, eisenstein_series_lseries +from .eis_series import eisenstein_series_qexp, eisenstein_series_lseries -from sage.modular.modform.half_integral import half_integral_weight_modform_basis +from .half_integral import half_integral_weight_modform_basis -from sage.modular.modform.theta import theta_qexp, theta2_qexp +from .theta import theta_qexp, theta2_qexp from sage.misc.lazy_import import lazy_import lazy_import('sage.modular.modform.j_invariant', 'j_invariant_qexp') lazy_import('sage.modular.modform.vm_basis', ['victor_miller_basis', 'delta_qexp']) -from sage.modular.modform.hecke_operator_on_qexp import hecke_operator_on_qexp, hecke_operator_on_basis +from .hecke_operator_on_qexp import hecke_operator_on_qexp, hecke_operator_on_basis -from sage.modular.modform.numerical import NumericalEigenforms as numerical_eigenforms +from .numerical import NumericalEigenforms as numerical_eigenforms -from sage.modular.modform.element import delta_lseries +from .element import delta_lseries -from sage.modular.modform.ring import ModularFormsRing -del lazy_import +from .ring import ModularFormsRing diff --git a/src/sage/modular/modform/ambient.py b/src/sage/modular/modform/ambient.py index 2267b67247a..dac59731ec5 100644 --- a/src/sage/modular/modform/ambient.py +++ b/src/sage/modular/modform/ambient.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Ambient spaces of modular forms diff --git a/src/sage/modular/modform/ambient_R.py b/src/sage/modular/modform/ambient_R.py index 76ce3658725..9f416f49169 100644 --- a/src/sage/modular/modform/ambient_R.py +++ b/src/sage/modular/modform/ambient_R.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Modular forms over a non-minimal base ring diff --git a/src/sage/modular/modform/ambient_eps.py b/src/sage/modular/modform/ambient_eps.py index 0fe07aef281..57bad5752eb 100644 --- a/src/sage/modular/modform/ambient_eps.py +++ b/src/sage/modular/modform/ambient_eps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari sage.rings.number_field r""" Modular forms with character diff --git a/src/sage/modular/modform/ambient_g0.py b/src/sage/modular/modform/ambient_g0.py index 17186291d89..0b2ffb8fb83 100644 --- a/src/sage/modular/modform/ambient_g0.py +++ b/src/sage/modular/modform/ambient_g0.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Modular forms for `\Gamma_0(N)` over `\QQ` diff --git a/src/sage/modular/modform/ambient_g1.py b/src/sage/modular/modform/ambient_g1.py index 02a660951b9..40c6c579e2d 100644 --- a/src/sage/modular/modform/ambient_g1.py +++ b/src/sage/modular/modform/ambient_g1.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Modular forms for `\Gamma_1(N)` and `\Gamma_H(N)` over `\QQ` diff --git a/src/sage/modular/modform/constructor.py b/src/sage/modular/modform/constructor.py index 2ba3f3b9889..02107b2f9d7 100644 --- a/src/sage/modular/modform/constructor.py +++ b/src/sage/modular/modform/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Creating spaces of modular forms diff --git a/src/sage/modular/modform/cuspidal_submodule.py b/src/sage/modular/modform/cuspidal_submodule.py index a0f28881dfe..0bf53873ed3 100644 --- a/src/sage/modular/modform/cuspidal_submodule.py +++ b/src/sage/modular/modform/cuspidal_submodule.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ The cuspidal subspace diff --git a/src/sage/modular/modform/defaults.py b/src/sage/modular/modform/defaults.py index 4a7d07edb69..e818030eebf 100644 --- a/src/sage/modular/modform/defaults.py +++ b/src/sage/modular/modform/defaults.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes ######################################################################### # Copyright (C) 2004--2006 William Stein # diff --git a/src/sage/modular/modform/eis_series.py b/src/sage/modular/modform/eis_series.py index 8037c6bd0ec..bb3e89697c2 100644 --- a/src/sage/modular/modform/eis_series.py +++ b/src/sage/modular/modform/eis_series.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Eisenstein series diff --git a/src/sage/modular/modform/eisenstein_submodule.py b/src/sage/modular/modform/eisenstein_submodule.py index 41332b31d18..034d94479d5 100644 --- a/src/sage/modular/modform/eisenstein_submodule.py +++ b/src/sage/modular/modform/eisenstein_submodule.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ The Eisenstein subspace diff --git a/src/sage/modular/modform/element.py b/src/sage/modular/modform/element.py index 5703faada50..999b8dc93b9 100644 --- a/src/sage/modular/modform/element.py +++ b/src/sage/modular/modform/element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Elements of modular forms spaces diff --git a/src/sage/modular/modform/find_generators.py b/src/sage/modular/modform/find_generators.py index b3a8c039864..3fb00a3f9af 100644 --- a/src/sage/modular/modform/find_generators.py +++ b/src/sage/modular/modform/find_generators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint r""" This module is now called ``ring.py`` (see :issue:`31559`). Do not import from here as diff --git a/src/sage/modular/modform/half_integral.py b/src/sage/modular/modform/half_integral.py index bee31db4d92..bf6c33e73a1 100644 --- a/src/sage/modular/modform/half_integral.py +++ b/src/sage/modular/modform/half_integral.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Compute spaces of half-integral weight modular forms diff --git a/src/sage/modular/modform/hecke_operator_on_qexp.py b/src/sage/modular/modform/hecke_operator_on_qexp.py index 6aea5bc9717..33d26b5f43b 100644 --- a/src/sage/modular/modform/hecke_operator_on_qexp.py +++ b/src/sage/modular/modform/hecke_operator_on_qexp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Hecke operators on `q`-expansions diff --git a/src/sage/modular/modform/j_invariant.py b/src/sage/modular/modform/j_invariant.py index 3297b0509e7..48b7c91fcb0 100644 --- a/src/sage/modular/modform/j_invariant.py +++ b/src/sage/modular/modform/j_invariant.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint r""" `q`-expansion of `j`-invariant diff --git a/src/sage/modular/modform/l_series_gross_zagier.py b/src/sage/modular/modform/l_series_gross_zagier.py index 39728eb87b9..28acdeeb978 100644 --- a/src/sage/modular/modform/l_series_gross_zagier.py +++ b/src/sage/modular/modform/l_series_gross_zagier.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes from sage.rings.integer import Integer from sage.structure.sage_object import SageObject from sage.lfunctions.dokchitser import Dokchitser diff --git a/src/sage/modular/modform/l_series_gross_zagier_coeffs.pyx b/src/sage/modular/modform/l_series_gross_zagier_coeffs.pyx index a6deb180a79..f91a3e256f0 100644 --- a/src/sage/modular/modform/l_series_gross_zagier_coeffs.pyx +++ b/src/sage/modular/modform/l_series_gross_zagier_coeffs.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes from cysignals.memory cimport check_allocarray, check_calloc, sig_free from cysignals.signals cimport sig_check, sig_on, sig_off diff --git a/src/sage/modular/modform/notes.py b/src/sage/modular/modform/notes.py index 61064b6f40b..833bb017bfd 100644 --- a/src/sage/modular/modform/notes.py +++ b/src/sage/modular/modform/notes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Design notes diff --git a/src/sage/modular/modform/numerical.py b/src/sage/modular/modform/numerical.py index 278bb977f66..362caee0038 100644 --- a/src/sage/modular/modform/numerical.py +++ b/src/sage/modular/modform/numerical.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Numerical computation of newforms diff --git a/src/sage/modular/modform/periods.py b/src/sage/modular/modform/periods.py index 8c6fce42899..d1b3dd72245 100644 --- a/src/sage/modular/modform/periods.py +++ b/src/sage/modular/modform/periods.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Periods of modular forms """ diff --git a/src/sage/modular/modform/ring.py b/src/sage/modular/modform/ring.py index 365f9f2a504..c0a69717cfa 100644 --- a/src/sage/modular/modform/ring.py +++ b/src/sage/modular/modform/ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Graded rings of modular forms diff --git a/src/sage/modular/modform/space.py b/src/sage/modular/modform/space.py index 186d353398a..289119f9d37 100644 --- a/src/sage/modular/modform/space.py +++ b/src/sage/modular/modform/space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Generic spaces of modular forms diff --git a/src/sage/modular/modform/submodule.py b/src/sage/modular/modform/submodule.py index 3fe00bbee78..f2bc33f5782 100644 --- a/src/sage/modular/modform/submodule.py +++ b/src/sage/modular/modform/submodule.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Submodules of spaces of modular forms diff --git a/src/sage/modular/modform/tests.py b/src/sage/modular/modform/tests.py index 62902dfb3c6..9ca5b54a194 100644 --- a/src/sage/modular/modform/tests.py +++ b/src/sage/modular/modform/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ TESTS: diff --git a/src/sage/modular/modform/theta.py b/src/sage/modular/modform/theta.py index d2e247c5e61..ea0a88c81ba 100644 --- a/src/sage/modular/modform/theta.py +++ b/src/sage/modular/modform/theta.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ `q`-expansions of theta series diff --git a/src/sage/modular/modform/vm_basis.py b/src/sage/modular/modform/vm_basis.py index 0588ee3c5e1..244a305e324 100644 --- a/src/sage/modular/modform/vm_basis.py +++ b/src/sage/modular/modform/vm_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint r""" The Victor Miller basis diff --git a/src/sage/modular/modform/weight1.py b/src/sage/modular/modform/weight1.py index b9c5eb31d5e..c2ce006decb 100644 --- a/src/sage/modular/modform/weight1.py +++ b/src/sage/modular/modform/weight1.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" Weight 1 modular forms diff --git a/src/sage/modular/modform_hecketriangle/abstract_ring.py b/src/sage/modular/modform_hecketriangle/abstract_ring.py index 4342a229740..3b68a6e505c 100644 --- a/src/sage/modular/modform_hecketriangle/abstract_ring.py +++ b/src/sage/modular/modform_hecketriangle/abstract_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Graded rings of modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/abstract_space.py b/src/sage/modular/modform_hecketriangle/abstract_space.py index b6652b51412..47bd1e6c766 100644 --- a/src/sage/modular/modform_hecketriangle/abstract_space.py +++ b/src/sage/modular/modform_hecketriangle/abstract_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/all.py b/src/sage/modular/modform_hecketriangle/all.py index bfb8f6b8239..cd236efc334 100644 --- a/src/sage/modular/modform_hecketriangle/all.py +++ b/src/sage/modular/modform_hecketriangle/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" AUTHORS: @@ -12,19 +11,19 @@ # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.modular.modform_hecketriangle.hecke_triangle_groups import HeckeTriangleGroup +from .hecke_triangle_groups import HeckeTriangleGroup -from sage.modular.modform_hecketriangle.series_constructor import MFSeriesConstructor +from .series_constructor import MFSeriesConstructor -from sage.modular.modform_hecketriangle.graded_ring import (QuasiMeromorphicModularFormsRing, - QuasiWeakModularFormsRing, QuasiModularFormsRing, - QuasiCuspFormsRing, MeromorphicModularFormsRing, - WeakModularFormsRing, - ModularFormsRing, CuspFormsRing) +from .graded_ring import (QuasiMeromorphicModularFormsRing, + QuasiWeakModularFormsRing, QuasiModularFormsRing, + QuasiCuspFormsRing, MeromorphicModularFormsRing, + WeakModularFormsRing, + ModularFormsRing, CuspFormsRing) -from sage.modular.modform_hecketriangle.space import (QuasiMeromorphicModularForms, QuasiWeakModularForms, - QuasiModularForms, QuasiCuspForms, - MeromorphicModularForms, WeakModularForms, ModularForms, - CuspForms, ZeroForm) +from .space import (QuasiMeromorphicModularForms, QuasiWeakModularForms, + QuasiModularForms, QuasiCuspForms, + MeromorphicModularForms, WeakModularForms, ModularForms, + CuspForms, ZeroForm) -from sage.modular.modform_hecketriangle.subspace import ModularFormsSubSpace +from .subspace import ModularFormsSubSpace diff --git a/src/sage/modular/modform_hecketriangle/analytic_type.py b/src/sage/modular/modform_hecketriangle/analytic_type.py index 33a8a3bb15d..e5fc53abb25 100644 --- a/src/sage/modular/modform_hecketriangle/analytic_type.py +++ b/src/sage/modular/modform_hecketriangle/analytic_type.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.graphs r""" Analytic types of modular forms diff --git a/src/sage/modular/modform_hecketriangle/constructor.py b/src/sage/modular/modform_hecketriangle/constructor.py index 835ce412ef6..040aa01add7 100644 --- a/src/sage/modular/modform_hecketriangle/constructor.py +++ b/src/sage/modular/modform_hecketriangle/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Constructor for spaces of modular forms for Hecke triangle groups based on a type diff --git a/src/sage/modular/modform_hecketriangle/element.py b/src/sage/modular/modform_hecketriangle/element.py index ae7855e47eb..4f58baafff5 100644 --- a/src/sage/modular/modform_hecketriangle/element.py +++ b/src/sage/modular/modform_hecketriangle/element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Elements of Hecke modular forms spaces diff --git a/src/sage/modular/modform_hecketriangle/functors.py b/src/sage/modular/modform_hecketriangle/functors.py index 332afdff963..3ba9c865231 100644 --- a/src/sage/modular/modform_hecketriangle/functors.py +++ b/src/sage/modular/modform_hecketriangle/functors.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Functor construction for all spaces diff --git a/src/sage/modular/modform_hecketriangle/graded_ring.py b/src/sage/modular/modform_hecketriangle/graded_ring.py index df2fca9cf93..877f6562235 100644 --- a/src/sage/modular/modform_hecketriangle/graded_ring.py +++ b/src/sage/modular/modform_hecketriangle/graded_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Graded rings of modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/graded_ring_element.py b/src/sage/modular/modform_hecketriangle/graded_ring_element.py index 63974cfc322..0de1562677b 100644 --- a/src/sage/modular/modform_hecketriangle/graded_ring_element.py +++ b/src/sage/modular/modform_hecketriangle/graded_ring_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Elements of graded rings of modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py b/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py index 258711a730e..2d52c934adf 100644 --- a/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +++ b/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.gap r""" Hecke triangle group elements diff --git a/src/sage/modular/modform_hecketriangle/hecke_triangle_groups.py b/src/sage/modular/modform_hecketriangle/hecke_triangle_groups.py index 7860990c17b..b6a4da172dc 100644 --- a/src/sage/modular/modform_hecketriangle/hecke_triangle_groups.py +++ b/src/sage/modular/modform_hecketriangle/hecke_triangle_groups.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.gap r""" Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/readme.py b/src/sage/modular/modform_hecketriangle/readme.py index a6b6e92a180..920822a2257 100644 --- a/src/sage/modular/modform_hecketriangle/readme.py +++ b/src/sage/modular/modform_hecketriangle/readme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.gap r""" Overview of Hecke triangle groups and modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/series_constructor.py b/src/sage/modular/modform_hecketriangle/series_constructor.py index 61fb99edd69..b44f41a09a0 100644 --- a/src/sage/modular/modform_hecketriangle/series_constructor.py +++ b/src/sage/modular/modform_hecketriangle/series_constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.gap r""" Series constructor for modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/space.py b/src/sage/modular/modform_hecketriangle/space.py index a6b152e39a1..e897808ef23 100644 --- a/src/sage/modular/modform_hecketriangle/space.py +++ b/src/sage/modular/modform_hecketriangle/space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Modular forms for Hecke triangle groups diff --git a/src/sage/modular/modform_hecketriangle/subspace.py b/src/sage/modular/modform_hecketriangle/subspace.py index 7a896bf7165..504c5fc1936 100644 --- a/src/sage/modular/modform_hecketriangle/subspace.py +++ b/src/sage/modular/modform_hecketriangle/subspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat sage.graphs r""" Subspaces of modular forms for Hecke triangle groups diff --git a/src/sage/modular/modsym/all.py b/src/sage/modular/modsym/all.py index 09838f3a306..798a4a7d55f 100644 --- a/src/sage/modular/modsym/all.py +++ b/src/sage/modular/modsym/all.py @@ -1,17 +1,15 @@ -# sage_setup: distribution = sagemath-schemes from sage.misc.lazy_import import lazy_import -from sage.modular.modsym.element import set_modsym_print_mode +from .element import set_modsym_print_mode -from sage.modular.modsym.modsym import ModularSymbols, ModularSymbols_clear_cache +from .modsym import ModularSymbols, ModularSymbols_clear_cache lazy_import('sage.modular.modsym.heilbronn', ['HeilbronnCremona', 'HeilbronnMerel']) -from sage.modular.modsym.p1list import P1List, lift_to_sl2z +from .p1list import P1List, lift_to_sl2z -from sage.modular.modsym.p1list_nf import P1NFList, MSymbol +from .p1list_nf import P1NFList, MSymbol -from sage.modular.modsym.ghlist import GHlist +from .ghlist import GHlist -from sage.modular.modsym.g1list import G1list -del lazy_import +from .g1list import G1list diff --git a/src/sage/modular/modsym/ambient.py b/src/sage/modular/modsym/ambient.py index 8b9dbeb39ed..00c97e59789 100644 --- a/src/sage/modular/modsym/ambient.py +++ b/src/sage/modular/modsym/ambient.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari r""" Ambient spaces of modular symbols diff --git a/src/sage/modular/modsym/boundary.py b/src/sage/modular/modsym/boundary.py index 52a6e04f7ba..fab48aab6a3 100644 --- a/src/sage/modular/modsym/boundary.py +++ b/src/sage/modular/modsym/boundary.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari r""" Space of boundary modular symbols diff --git a/src/sage/modular/modsym/element.py b/src/sage/modular/modsym/element.py index 3debfdddcae..686e64e96d8 100644 --- a/src/sage/modular/modsym/element.py +++ b/src/sage/modular/modsym/element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ A single element of an ambient space of modular symbols diff --git a/src/sage/modular/modsym/g1list.py b/src/sage/modular/modsym/g1list.py index 857e43b7944..4485a52814a 100644 --- a/src/sage/modular/modsym/g1list.py +++ b/src/sage/modular/modsym/g1list.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" List of coset representatives for `\Gamma_1(N)` in `\SL_2(\ZZ)` """ diff --git a/src/sage/modular/modsym/ghlist.py b/src/sage/modular/modsym/ghlist.py index 6ad9359d795..62989e22105 100644 --- a/src/sage/modular/modsym/ghlist.py +++ b/src/sage/modular/modsym/ghlist.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari r""" List of coset representatives for `\Gamma_H(N)` in `\SL_2(\ZZ)` diff --git a/src/sage/modular/modsym/hecke_operator.py b/src/sage/modular/modsym/hecke_operator.py index a018ffafc41..818de55e97e 100644 --- a/src/sage/modular/modsym/hecke_operator.py +++ b/src/sage/modular/modsym/hecke_operator.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Sparse action of Hecke operators diff --git a/src/sage/modular/modsym/manin_symbol.pxd b/src/sage/modular/modsym/manin_symbol.pxd index 014fd3b7fd8..d7f6c7adeae 100644 --- a/src/sage/modular/modsym/manin_symbol.pxd +++ b/src/sage/modular/modsym/manin_symbol.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes from sage.structure.element cimport Element cdef class ManinSymbol(Element): diff --git a/src/sage/modular/modsym/manin_symbol.pyx b/src/sage/modular/modsym/manin_symbol.pyx index 91698dd2138..6da79e21b2d 100644 --- a/src/sage/modular/modsym/manin_symbol.pyx +++ b/src/sage/modular/modsym/manin_symbol.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint r""" Manin symbols diff --git a/src/sage/modular/modsym/manin_symbol_list.py b/src/sage/modular/modsym/manin_symbol_list.py index 5889bfd024f..7499b6fb500 100644 --- a/src/sage/modular/modsym/manin_symbol_list.py +++ b/src/sage/modular/modsym/manin_symbol_list.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Manin symbol lists diff --git a/src/sage/modular/modsym/modsym.py b/src/sage/modular/modsym/modsym.py index 965249c4436..51108d1e84a 100644 --- a/src/sage/modular/modsym/modsym.py +++ b/src/sage/modular/modsym/modsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari r""" Creation of modular symbols spaces diff --git a/src/sage/modular/modsym/modular_symbols.py b/src/sage/modular/modsym/modular_symbols.py index adc91cd8644..57dc8f23a2b 100644 --- a/src/sage/modular/modsym/modular_symbols.py +++ b/src/sage/modular/modsym/modular_symbols.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint r""" Modular symbols `\{\alpha`, `\beta\}` diff --git a/src/sage/modular/modsym/p1list.pxd b/src/sage/modular/modsym/p1list.pxd index 83af443a0a3..b66f28b8ad6 100644 --- a/src/sage/modular/modsym/p1list.pxd +++ b/src/sage/modular/modsym/p1list.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes cdef class export: diff --git a/src/sage/modular/modsym/p1list.pyx b/src/sage/modular/modsym/p1list.pyx index 57fc3612084..1613d90729a 100644 --- a/src/sage/modular/modsym/p1list.pyx +++ b/src/sage/modular/modsym/p1list.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # distutils: libraries = gmp # distutils: extra_compile_args = -D_XPG6 diff --git a/src/sage/modular/modsym/p1list_nf.py b/src/sage/modular/modsym/p1list_nf.py index d238da98811..25c68137e0c 100644 --- a/src/sage/modular/modsym/p1list_nf.py +++ b/src/sage/modular/modsym/p1list_nf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" Lists of Manin symbols over number fields, elements of `\mathbb{P}^1(R/N)` diff --git a/src/sage/modular/modsym/relation_matrix.py b/src/sage/modular/modsym/relation_matrix.py index e59020bb209..609d70c2446 100644 --- a/src/sage/modular/modsym/relation_matrix.py +++ b/src/sage/modular/modsym/relation_matrix.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Relation matrices for ambient modular symbols spaces diff --git a/src/sage/modular/modsym/relation_matrix_pyx.pyx b/src/sage/modular/modsym/relation_matrix_pyx.pyx index 328dc2177d5..46d8d716e62 100644 --- a/src/sage/modular/modsym/relation_matrix_pyx.pyx +++ b/src/sage/modular/modsym/relation_matrix_pyx.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Optimized computing of relation matrices in certain cases """ diff --git a/src/sage/modular/modsym/space.py b/src/sage/modular/modsym/space.py index 78b610da298..a097c1b0c8d 100644 --- a/src/sage/modular/modsym/space.py +++ b/src/sage/modular/modsym/space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Base class of the space of modular symbols diff --git a/src/sage/modular/modsym/subspace.py b/src/sage/modular/modsym/subspace.py index 95b15921db4..fdc69b18b9a 100644 --- a/src/sage/modular/modsym/subspace.py +++ b/src/sage/modular/modsym/subspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Subspace of ambient spaces of modular symbols diff --git a/src/sage/modular/modsym/tests.py b/src/sage/modular/modsym/tests.py index b710d716956..3af2ffb1d87 100644 --- a/src/sage/modular/modsym/tests.py +++ b/src/sage/modular/modsym/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari """ Testing modular symbols spaces diff --git a/src/sage/modular/multiple_zeta.py b/src/sage/modular/multiple_zeta.py index d93951b6aa4..a6eac6dbacb 100644 --- a/src/sage/modular/multiple_zeta.py +++ b/src/sage/modular/multiple_zeta.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat r""" Algebra of motivic multiple zeta values diff --git a/src/sage/modular/multiple_zeta_F_algebra.py b/src/sage/modular/multiple_zeta_F_algebra.py index 25bee87d69c..863a369940c 100644 --- a/src/sage/modular/multiple_zeta_F_algebra.py +++ b/src/sage/modular/multiple_zeta_F_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.combinat r""" F-algebra for motivic multiple zeta values. diff --git a/src/sage/modular/overconvergent/all.py b/src/sage/modular/overconvergent/all.py index ca1ff92f993..11e23071854 100644 --- a/src/sage/modular/overconvergent/all.py +++ b/src/sage/modular/overconvergent/all.py @@ -1,7 +1,5 @@ -# sage_setup: distribution = sagemath-schemes +from .weightspace import WeightSpace_constructor as pAdicWeightSpace -from sage.modular.overconvergent.weightspace import WeightSpace_constructor as pAdicWeightSpace +from .genus0 import OverconvergentModularForms -from sage.modular.overconvergent.genus0 import OverconvergentModularForms - -from sage.modular.overconvergent.hecke_series import hecke_series +from .hecke_series import hecke_series diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index 56a8c220e05..58f31f4af0c 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari sage.rings.padics r""" Overconvergent `p`-adic modular forms for small primes diff --git a/src/sage/modular/overconvergent/hecke_series.py b/src/sage/modular/overconvergent/hecke_series.py index 8311cfd8ced..1e10c6386a9 100644 --- a/src/sage/modular/overconvergent/hecke_series.py +++ b/src/sage/modular/overconvergent/hecke_series.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint sage.libs.pari r""" Atkin/Hecke series for overconvergent modular forms diff --git a/src/sage/modular/overconvergent/weightspace.py b/src/sage/modular/overconvergent/weightspace.py index bc6ea3ef7e4..e9478c40a90 100644 --- a/src/sage/modular/overconvergent/weightspace.py +++ b/src/sage/modular/overconvergent/weightspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" The space of `p`-adic weights diff --git a/src/sage/modular/pollack_stevens/all.py b/src/sage/modular/pollack_stevens/all.py index 86fa7d86ccb..a51787d6fd2 100644 --- a/src/sage/modular/pollack_stevens/all.py +++ b/src/sage/modular/pollack_stevens/all.py @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-schemes - -from sage.modular.pollack_stevens.space import PollackStevensModularSymbols -from sage.modular.pollack_stevens.distributions import Symk -from sage.modular.pollack_stevens.distributions import OverconvergentDistributions +from .space import PollackStevensModularSymbols +from .distributions import Symk +from .distributions import OverconvergentDistributions diff --git a/src/sage/modular/pollack_stevens/dist.pyx b/src/sage/modular/pollack_stevens/dist.pyx index f1a656c6e60..1f79133f2f5 100644 --- a/src/sage/modular/pollack_stevens/dist.pyx +++ b/src/sage/modular/pollack_stevens/dist.pyx @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # distutils: libraries = gmp # distutils: extra_compile_args = -D_XPG6 """ diff --git a/src/sage/modular/pollack_stevens/distributions.py b/src/sage/modular/pollack_stevens/distributions.py index 49b702b3cb9..f33b4022842 100644 --- a/src/sage/modular/pollack_stevens/distributions.py +++ b/src/sage/modular/pollack_stevens/distributions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Spaces of distributions for Pollack-Stevens modular symbols diff --git a/src/sage/modular/pollack_stevens/fund_domain.py b/src/sage/modular/pollack_stevens/fund_domain.py index b55cecdbc90..cab712a95bf 100644 --- a/src/sage/modular/pollack_stevens/fund_domain.py +++ b/src/sage/modular/pollack_stevens/fund_domain.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Manin relations for overconvergent modular symbols diff --git a/src/sage/modular/pollack_stevens/manin_map.py b/src/sage/modular/pollack_stevens/manin_map.py index e78cd0e51ce..0af3ed946d0 100644 --- a/src/sage/modular/pollack_stevens/manin_map.py +++ b/src/sage/modular/pollack_stevens/manin_map.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Manin map diff --git a/src/sage/modular/pollack_stevens/modsym.py b/src/sage/modular/pollack_stevens/modsym.py index c9c5a536df2..914f0447992 100644 --- a/src/sage/modular/pollack_stevens/modsym.py +++ b/src/sage/modular/pollack_stevens/modsym.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Element class for Pollack-Stevens' modular symbols diff --git a/src/sage/modular/pollack_stevens/padic_lseries.py b/src/sage/modular/pollack_stevens/padic_lseries.py index ee69a93a7cf..748b5dc9993 100644 --- a/src/sage/modular/pollack_stevens/padic_lseries.py +++ b/src/sage/modular/pollack_stevens/padic_lseries.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.ring.padics r""" `p`-adic `L`-series attached to overconvergent eigensymbols diff --git a/src/sage/modular/pollack_stevens/sigma0.py b/src/sage/modular/pollack_stevens/sigma0.py index 24b9ff99393..ce52830f070 100644 --- a/src/sage/modular/pollack_stevens/sigma0.py +++ b/src/sage/modular/pollack_stevens/sigma0.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" The matrix monoid `\Sigma_0(N)`. diff --git a/src/sage/modular/pollack_stevens/space.py b/src/sage/modular/pollack_stevens/space.py index 7cd0e1410bd..c0464dd61d8 100644 --- a/src/sage/modular/pollack_stevens/space.py +++ b/src/sage/modular/pollack_stevens/space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Pollack-Stevens' modular symbols spaces diff --git a/src/sage/modular/quasimodform/all.py b/src/sage/modular/quasimodform/all.py index 935b04bc09e..114783b2e37 100644 --- a/src/sage/modular/quasimodform/all.py +++ b/src/sage/modular/quasimodform/all.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-schemes # Quasimodular forms rings -from sage.modular.quasimodform.ring import QuasiModularForms +from .ring import QuasiModularForms diff --git a/src/sage/modular/quasimodform/element.py b/src/sage/modular/quasimodform/element.py index ac7e2d2b8d7..dd45fca7713 100644 --- a/src/sage/modular/quasimodform/element.py +++ b/src/sage/modular/quasimodform/element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.flint """ Elements of quasimodular forms rings diff --git a/src/sage/modular/quasimodform/ring.py b/src/sage/modular/quasimodform/ring.py index 4c1984171bc..dcdf8e470c2 100644 --- a/src/sage/modular/quasimodform/ring.py +++ b/src/sage/modular/quasimodform/ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Graded quasimodular forms ring diff --git a/src/sage/modular/quatalg/all.py b/src/sage/modular/quatalg/all.py index 7328385e126..e554527d96c 100644 --- a/src/sage/modular/quatalg/all.py +++ b/src/sage/modular/quatalg/all.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-schemes -from sage.modular.quatalg.brandt import BrandtModule +from .brandt import BrandtModule diff --git a/src/sage/modular/quatalg/brandt.py b/src/sage/modular/quatalg/brandt.py index abb49610a04..28ae7e6201b 100644 --- a/src/sage/modular/quatalg/brandt.py +++ b/src/sage/modular/quatalg/brandt.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Brandt modules diff --git a/src/sage/modular/ssmod/all.py b/src/sage/modular/ssmod/all.py index 4e7d2356d18..1257c107a99 100644 --- a/src/sage/modular/ssmod/all.py +++ b/src/sage/modular/ssmod/all.py @@ -1,8 +1,6 @@ -# sage_setup: distribution = sagemath-schemes from sage.misc.lazy_import import lazy_import lazy_import("sage.modular.ssmod.ssmod", ['dimension_supersingular_module', 'supersingular_j', 'SupersingularModule', 'supersingular_D']) -del lazy_import diff --git a/src/sage/modular/ssmod/ssmod.py b/src/sage/modular/ssmod/ssmod.py index 82417142980..d2d2d717cbc 100644 --- a/src/sage/modular/ssmod/ssmod.py +++ b/src/sage/modular/ssmod/ssmod.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Module of supersingular points diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index bbecf800f09..929d16b79d0 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # ***************************************************************************** # Copyright (C) 2005 William Stein # @@ -39,4 +38,3 @@ lazy_import("sage.modules.multi_filtered_vector_space", "MultiFilteredVectorSpace") lazy_import("sage.modules.free_quadratic_module_integer_symmetric", "IntegralLattice") lazy_import("sage.modules.torsion_quadratic_module", "TorsionQuadraticForm") -del lazy_import diff --git a/src/sage/modules/all__sagemath_linbox.py b/src/sage/modules/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/modules/all__sagemath_objects.py b/src/sage/modules/all__sagemath_objects.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/modules/all__sagemath_symbolics.py b/src/sage/modules/all__sagemath_symbolics.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/modules/complex_double_vector.py b/src/sage/modules/complex_double_vector.py index fad12406262..728d862e8fc 100644 --- a/src/sage/modules/complex_double_vector.py +++ b/src/sage/modules/complex_double_vector.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Pickling for the old CDF vector class diff --git a/src/sage/modules/diamond_cutting.py b/src/sage/modules/diamond_cutting.py index b1e25c1fc88..14adddd4b54 100644 --- a/src/sage/modules/diamond_cutting.py +++ b/src/sage/modules/diamond_cutting.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.geometry.polyhedron """ Diamond cutting implementation diff --git a/src/sage/modules/fg_pid/all.py b/src/sage/modules/fg_pid/all.py index 6f6ab52d0f2..e69de29bb2d 100644 --- a/src/sage/modules/fg_pid/all.py +++ b/src/sage/modules/fg_pid/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-modules diff --git a/src/sage/modules/fg_pid/fgp_element.py b/src/sage/modules/fg_pid/fgp_element.py index 99e93b32b20..9152c09d187 100644 --- a/src/sage/modules/fg_pid/fgp_element.py +++ b/src/sage/modules/fg_pid/fgp_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements of finitely generated modules over a PID diff --git a/src/sage/modules/fg_pid/fgp_module.py b/src/sage/modules/fg_pid/fgp_module.py index 5a39cdd5b57..6965b4281b7 100644 --- a/src/sage/modules/fg_pid/fgp_module.py +++ b/src/sage/modules/fg_pid/fgp_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Finitely generated modules over a PID diff --git a/src/sage/modules/fg_pid/fgp_morphism.py b/src/sage/modules/fg_pid/fgp_morphism.py index f4e5edbb6bd..c3b5374f706 100644 --- a/src/sage/modules/fg_pid/fgp_morphism.py +++ b/src/sage/modules/fg_pid/fgp_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Morphisms between finitely generated modules over a PID diff --git a/src/sage/modules/filtered_vector_space.py b/src/sage/modules/filtered_vector_space.py index 95fce5e5c12..68bbff12c8d 100644 --- a/src/sage/modules/filtered_vector_space.py +++ b/src/sage/modules/filtered_vector_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" `\ZZ`-filtered vector spaces diff --git a/src/sage/modules/finite_submodule_iter.pxd b/src/sage/modules/finite_submodule_iter.pxd index 9817e2855be..8173f265673 100644 --- a/src/sage/modules/finite_submodule_iter.pxd +++ b/src/sage/modules/finite_submodule_iter.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport ModuleElement cdef class FiniteZZsubmodule_iterator: diff --git a/src/sage/modules/finite_submodule_iter.pyx b/src/sage/modules/finite_submodule_iter.pyx index c157111a16f..f3ef152cb86 100644 --- a/src/sage/modules/finite_submodule_iter.pyx +++ b/src/sage/modules/finite_submodule_iter.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.finite_rings r""" Iterators over finite submodules of a `\ZZ`-module diff --git a/src/sage/modules/free_module.py b/src/sage/modules/free_module.py index c0e709829e1..6e2c9e4dc1d 100644 --- a/src/sage/modules/free_module.py +++ b/src/sage/modules/free_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free modules diff --git a/src/sage/modules/free_module_element.pxd b/src/sage/modules/free_module_element.pxd index 4712c53e72c..084423a2714 100644 --- a/src/sage/modules/free_module_element.pxd +++ b/src/sage/modules/free_module_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport Vector cdef class FreeModuleElement(Vector): diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx index b0a64351969..c93c71f195e 100644 --- a/src/sage/modules/free_module_element.pyx +++ b/src/sage/modules/free_module_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements of free modules diff --git a/src/sage/modules/free_module_homspace.py b/src/sage/modules/free_module_homspace.py index 2d8a6e656b8..9513a56ea56 100644 --- a/src/sage/modules/free_module_homspace.py +++ b/src/sage/modules/free_module_homspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Homspaces between free modules diff --git a/src/sage/modules/free_module_integer.py b/src/sage/modules/free_module_integer.py index bded2894baf..9602d04fde0 100644 --- a/src/sage/modules/free_module_integer.py +++ b/src/sage/modules/free_module_integer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Discrete subgroups of `\\ZZ^n` diff --git a/src/sage/modules/free_module_morphism.py b/src/sage/modules/free_module_morphism.py index 3fdd76bff6f..147dbe5b57a 100644 --- a/src/sage/modules/free_module_morphism.py +++ b/src/sage/modules/free_module_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Morphisms of free modules diff --git a/src/sage/modules/free_quadratic_module.py b/src/sage/modules/free_quadratic_module.py index 46363438dc6..78b3b179b33 100644 --- a/src/sage/modules/free_quadratic_module.py +++ b/src/sage/modules/free_quadratic_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free quadratic modules diff --git a/src/sage/modules/free_quadratic_module_integer_symmetric.py b/src/sage/modules/free_quadratic_module_integer_symmetric.py index eab90951ccc..c899c5203fb 100644 --- a/src/sage/modules/free_quadratic_module_integer_symmetric.py +++ b/src/sage/modules/free_quadratic_module_integer_symmetric.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Integral lattices diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index ab194038d93..dc4b3817eca 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Morphisms defined by a matrix diff --git a/src/sage/modules/misc.py b/src/sage/modules/misc.py index 0b2af8bc192..abcdfa01a20 100644 --- a/src/sage/modules/misc.py +++ b/src/sage/modules/misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Miscellaneous module-related functions diff --git a/src/sage/modules/module.pxd b/src/sage/modules/module.pxd index 31eb027b970..032cce6d69e 100644 --- a/src/sage/modules/module.pxd +++ b/src/sage/modules/module.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.parent cimport Parent cdef class Module(Parent): diff --git a/src/sage/modules/module.pyx b/src/sage/modules/module.pyx index 08dc1d5eb31..2d7d21422ac 100644 --- a/src/sage/modules/module.pyx +++ b/src/sage/modules/module.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Abstract base class for modules diff --git a/src/sage/modules/module_functors.py b/src/sage/modules/module_functors.py index 00da40a67f5..c3977183c56 100644 --- a/src/sage/modules/module_functors.py +++ b/src/sage/modules/module_functors.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Module Functors diff --git a/src/sage/modules/multi_filtered_vector_space.py b/src/sage/modules/multi_filtered_vector_space.py index bd206f7956b..8190c69793b 100644 --- a/src/sage/modules/multi_filtered_vector_space.py +++ b/src/sage/modules/multi_filtered_vector_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Multiple `\ZZ`-graded filtrations of a single vector space diff --git a/src/sage/modules/quotient_module.py b/src/sage/modules/quotient_module.py index 3a122a8d98a..be3e3735175 100644 --- a/src/sage/modules/quotient_module.py +++ b/src/sage/modules/quotient_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Quotients of free modules diff --git a/src/sage/modules/real_double_vector.py b/src/sage/modules/real_double_vector.py index 69bd0c28bdc..5430e175f11 100644 --- a/src/sage/modules/real_double_vector.py +++ b/src/sage/modules/real_double_vector.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Pickling for the old RDF vector class diff --git a/src/sage/modules/submodule.py b/src/sage/modules/submodule.py index 512555524b5..4576d6c4bbd 100644 --- a/src/sage/modules/submodule.py +++ b/src/sage/modules/submodule.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Submodules and subquotients of free modules diff --git a/src/sage/modules/tensor_operations.py b/src/sage/modules/tensor_operations.py index f4e87f1995f..8ca968133a2 100644 --- a/src/sage/modules/tensor_operations.py +++ b/src/sage/modules/tensor_operations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Helper classes to implement tensor operations diff --git a/src/sage/modules/torsion_quadratic_module.py b/src/sage/modules/torsion_quadratic_module.py index 83ce6ac4754..28428a08f51 100644 --- a/src/sage/modules/torsion_quadratic_module.py +++ b/src/sage/modules/torsion_quadratic_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Finite `\ZZ`-modules with bilinear and quadratic forms diff --git a/src/sage/modules/tutorial_free_modules.py b/src/sage/modules/tutorial_free_modules.py index dc1b10524bb..8fe8cd8c7df 100644 --- a/src/sage/modules/tutorial_free_modules.py +++ b/src/sage/modules/tutorial_free_modules.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Tutorial: Using free modules and vector spaces diff --git a/src/sage/modules/vector_callable_symbolic_dense.py b/src/sage/modules/vector_callable_symbolic_dense.py index d008a4a85a8..5727003a22d 100644 --- a/src/sage/modules/vector_callable_symbolic_dense.py +++ b/src/sage/modules/vector_callable_symbolic_dense.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Vectors over callable symbolic rings diff --git a/src/sage/modules/vector_complex_double_dense.pxd b/src/sage/modules/vector_complex_double_dense.pxd index 194f26f3d69..955c0a414d2 100644 --- a/src/sage/modules/vector_complex_double_dense.pxd +++ b/src/sage/modules/vector_complex_double_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.modules.vector_double_dense cimport Vector_double_dense diff --git a/src/sage/modules/vector_complex_double_dense.pyx b/src/sage/modules/vector_complex_double_dense.pyx index 50d35e2ec82..59b585f912c 100644 --- a/src/sage/modules/vector_complex_double_dense.pyx +++ b/src/sage/modules/vector_complex_double_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Dense complex double vectors using a NumPy backend diff --git a/src/sage/modules/vector_double_dense.pxd b/src/sage/modules/vector_double_dense.pxd index e6111cb8a08..f4f1f47cbce 100644 --- a/src/sage/modules/vector_double_dense.pxd +++ b/src/sage/modules/vector_double_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.modules.vector_numpy_dense cimport Vector_numpy_dense diff --git a/src/sage/modules/vector_double_dense.pyx b/src/sage/modules/vector_double_dense.pyx index e401d783145..b07fc9e71c2 100644 --- a/src/sage/modules/vector_double_dense.pyx +++ b/src/sage/modules/vector_double_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Dense vectors using a NumPy backend diff --git a/src/sage/modules/vector_integer_dense.pxd b/src/sage/modules/vector_integer_dense.pxd index e878e882ffe..ff2843f481f 100644 --- a/src/sage/modules/vector_integer_dense.pxd +++ b/src/sage/modules/vector_integer_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gmp.types cimport mpz_t from sage.modules.free_module_element cimport FreeModuleElement from sage.structure.parent cimport Parent diff --git a/src/sage/modules/vector_integer_dense.pyx b/src/sage/modules/vector_integer_dense.pyx index 80faf6f78e6..c078db11fff 100644 --- a/src/sage/modules/vector_integer_dense.pyx +++ b/src/sage/modules/vector_integer_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Vectors with integer entries diff --git a/src/sage/modules/vector_integer_sparse.pxd b/src/sage/modules/vector_integer_sparse.pxd index 7a8dc1ec770..42818124a82 100644 --- a/src/sage/modules/vector_integer_sparse.pxd +++ b/src/sage/modules/vector_integer_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################# # # Sparse Vector over mpz_t (the GMP integers) diff --git a/src/sage/modules/vector_integer_sparse.pyx b/src/sage/modules/vector_integer_sparse.pyx index 737c63272f5..57a7b70bde4 100644 --- a/src/sage/modules/vector_integer_sparse.pyx +++ b/src/sage/modules/vector_integer_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################# # # Sparse Vector over mpz_t (the GMP integers) diff --git a/src/sage/modules/vector_mod2_dense.pxd b/src/sage/modules/vector_mod2_dense.pxd index 3fb7fcf8a87..4535fe3273d 100644 --- a/src/sage/modules/vector_mod2_dense.pxd +++ b/src/sage/modules/vector_mod2_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from sage.modules.free_module_element cimport FreeModuleElement from sage.libs.m4ri cimport mzd_t diff --git a/src/sage/modules/vector_mod2_dense.pyx b/src/sage/modules/vector_mod2_dense.pyx index d965443f932..e6c2408b1f0 100644 --- a/src/sage/modules/vector_mod2_dense.pyx +++ b/src/sage/modules/vector_mod2_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: libraries = M4RI_LIBRARIES GDLIB_LIBRARIES LIBPNG_LIBRARIES # distutils: library_dirs = M4RI_LIBDIR GDLIB_LIBDIR LIBPNG_LIBDIR # distutils: include_dirs = M4RI_INCDIR GDLIB_INCDIR LIBPNG_INCDIR diff --git a/src/sage/modules/vector_modn_dense.pxd b/src/sage/modules/vector_modn_dense.pxd index c1aa84f770e..5de166f1b85 100644 --- a/src/sage/modules/vector_modn_dense.pxd +++ b/src/sage/modules/vector_modn_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.ext.mod_int cimport mod_int from sage.modules.free_module_element cimport FreeModuleElement diff --git a/src/sage/modules/vector_modn_dense.pyx b/src/sage/modules/vector_modn_dense.pyx index f09fb7d5547..ed98d3e573d 100644 --- a/src/sage/modules/vector_modn_dense.pyx +++ b/src/sage/modules/vector_modn_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Vectors with integer mod `n` entries, with small `n` diff --git a/src/sage/modules/vector_modn_sparse.pxd b/src/sage/modules/vector_modn_sparse.pxd index 0be082a95aa..049b9ba27e8 100644 --- a/src/sage/modules/vector_modn_sparse.pxd +++ b/src/sage/modules/vector_modn_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.finite_rings.stdint cimport * cdef struct c_vector_modint: diff --git a/src/sage/modules/vector_modn_sparse.pyx b/src/sage/modules/vector_modn_sparse.pyx index 92b785c2168..a6b59ae9ca5 100644 --- a/src/sage/modules/vector_modn_sparse.pyx +++ b/src/sage/modules/vector_modn_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################################# # Copyright (C) 2004, 2007 William Stein # Distributed under the terms of the GNU General Public License (GPL) diff --git a/src/sage/modules/vector_numpy_dense.pxd b/src/sage/modules/vector_numpy_dense.pxd index cda44c4664e..ec60da7a865 100644 --- a/src/sage/modules/vector_numpy_dense.pxd +++ b/src/sage/modules/vector_numpy_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cimport numpy from sage.modules.free_module_element cimport FreeModuleElement diff --git a/src/sage/modules/vector_numpy_dense.pyx b/src/sage/modules/vector_numpy_dense.pyx index 0ccbd577225..9b16a6c354d 100644 --- a/src/sage/modules/vector_numpy_dense.pyx +++ b/src/sage/modules/vector_numpy_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Dense vectors using a NumPy backend. diff --git a/src/sage/modules/vector_numpy_integer_dense.pxd b/src/sage/modules/vector_numpy_integer_dense.pxd index 2c1f640bcd0..31bc1cf8f6b 100644 --- a/src/sage/modules/vector_numpy_integer_dense.pxd +++ b/src/sage/modules/vector_numpy_integer_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.modules.vector_numpy_dense cimport Vector_numpy_dense diff --git a/src/sage/modules/vector_numpy_integer_dense.pyx b/src/sage/modules/vector_numpy_integer_dense.pyx index 4ff577e1004..ba3537436d5 100644 --- a/src/sage/modules/vector_numpy_integer_dense.pyx +++ b/src/sage/modules/vector_numpy_integer_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Dense integer vectors using a NumPy backend. diff --git a/src/sage/modules/vector_rational_dense.pxd b/src/sage/modules/vector_rational_dense.pxd index cd81899227d..c5f2a4a7c3f 100644 --- a/src/sage/modules/vector_rational_dense.pxd +++ b/src/sage/modules/vector_rational_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gmp.types cimport mpq_t from sage.modules.free_module_element cimport FreeModuleElement from sage.structure.parent cimport Parent diff --git a/src/sage/modules/vector_rational_dense.pyx b/src/sage/modules/vector_rational_dense.pyx index f6779a507ca..864628f10c7 100644 --- a/src/sage/modules/vector_rational_dense.pyx +++ b/src/sage/modules/vector_rational_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Vectors with rational entries diff --git a/src/sage/modules/vector_rational_sparse.pxd b/src/sage/modules/vector_rational_sparse.pxd index b7e731619e1..4dfbed73d6d 100644 --- a/src/sage/modules/vector_rational_sparse.pxd +++ b/src/sage/modules/vector_rational_sparse.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################# # # Sparse Vector over mpq_t (the GMP rationals) diff --git a/src/sage/modules/vector_rational_sparse.pyx b/src/sage/modules/vector_rational_sparse.pyx index 54bbb4f4f54..37466bab2da 100644 --- a/src/sage/modules/vector_rational_sparse.pyx +++ b/src/sage/modules/vector_rational_sparse.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################# # # Sparse Vector over mpq_t (the GMP rationals) diff --git a/src/sage/modules/vector_real_double_dense.pxd b/src/sage/modules/vector_real_double_dense.pxd index efd4a7833fe..4dd3b43ab25 100644 --- a/src/sage/modules/vector_real_double_dense.pxd +++ b/src/sage/modules/vector_real_double_dense.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.modules.vector_double_dense cimport Vector_double_dense diff --git a/src/sage/modules/vector_real_double_dense.pyx b/src/sage/modules/vector_real_double_dense.pyx index db0969e8d5a..a5d4c236722 100644 --- a/src/sage/modules/vector_real_double_dense.pyx +++ b/src/sage/modules/vector_real_double_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Dense real double vectors using a NumPy backend diff --git a/src/sage/modules/vector_space_homspace.py b/src/sage/modules/vector_space_homspace.py index 743163acb62..b815051171a 100644 --- a/src/sage/modules/vector_space_homspace.py +++ b/src/sage/modules/vector_space_homspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Space of morphisms of vector spaces (linear transformations) diff --git a/src/sage/modules/vector_space_morphism.py b/src/sage/modules/vector_space_morphism.py index d605a4f4d30..6585da0b047 100644 --- a/src/sage/modules/vector_space_morphism.py +++ b/src/sage/modules/vector_space_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Morphisms of vector spaces (linear transformations) diff --git a/src/sage/modules/vector_symbolic_dense.py b/src/sage/modules/vector_symbolic_dense.py index 8d21c3c1367..bd50cedec7b 100644 --- a/src/sage/modules/vector_symbolic_dense.py +++ b/src/sage/modules/vector_symbolic_dense.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Dense vectors over the symbolic ring diff --git a/src/sage/modules/vector_symbolic_sparse.py b/src/sage/modules/vector_symbolic_sparse.py index fc1e8734343..41cbbda5241 100644 --- a/src/sage/modules/vector_symbolic_sparse.py +++ b/src/sage/modules/vector_symbolic_sparse.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Sparse vectors over the symbolic ring diff --git a/src/sage/modules/with_basis/all.py b/src/sage/modules/with_basis/all.py index 3374803a1a5..1f352bcc768 100644 --- a/src/sage/modules/with_basis/all.py +++ b/src/sage/modules/with_basis/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Concrete classes related to modules with a distinguished basis @@ -12,4 +11,3 @@ # install the docstring of this module to the containing package from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -del install_doc diff --git a/src/sage/modules/with_basis/cell_module.py b/src/sage/modules/with_basis/cell_module.py index f43365bbb0a..2c5f54de21b 100644 --- a/src/sage/modules/with_basis/cell_module.py +++ b/src/sage/modules/with_basis/cell_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Cell modules diff --git a/src/sage/modules/with_basis/indexed_element.pxd b/src/sage/modules/with_basis/indexed_element.pxd index 574ba288b84..ebc785d7ccf 100644 --- a/src/sage/modules/with_basis/indexed_element.pxd +++ b/src/sage/modules/with_basis/indexed_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport Element, ModuleElement cdef class IndexedFreeModuleElement(ModuleElement): diff --git a/src/sage/modules/with_basis/indexed_element.pyx b/src/sage/modules/with_basis/indexed_element.pyx index c9dba690a36..1e8c8d9fb75 100644 --- a/src/sage/modules/with_basis/indexed_element.pyx +++ b/src/sage/modules/with_basis/indexed_element.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- r""" An element in an indexed free module diff --git a/src/sage/modules/with_basis/invariant.py b/src/sage/modules/with_basis/invariant.py index 03b4f3e0050..7e7600f3069 100644 --- a/src/sage/modules/with_basis/invariant.py +++ b/src/sage/modules/with_basis/invariant.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.groups r""" Invariant modules diff --git a/src/sage/modules/with_basis/morphism.py b/src/sage/modules/with_basis/morphism.py index d7448d694b1..ea1dcf93f65 100644 --- a/src/sage/modules/with_basis/morphism.py +++ b/src/sage/modules/with_basis/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Morphisms of modules with a basis diff --git a/src/sage/modules/with_basis/representation.py b/src/sage/modules/with_basis/representation.py index dbf7e42c2d7..c484cd657d6 100644 --- a/src/sage/modules/with_basis/representation.py +++ b/src/sage/modules/with_basis/representation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.groups """ Representations of a semigroup diff --git a/src/sage/modules/with_basis/subquotient.py b/src/sage/modules/with_basis/subquotient.py index 4999a799760..48a235b4ab9 100644 --- a/src/sage/modules/with_basis/subquotient.py +++ b/src/sage/modules/with_basis/subquotient.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Quotients of modules with basis """ diff --git a/src/sage/monoids/all.py b/src/sage/monoids/all.py index 83541093f6c..cd2812c89f1 100644 --- a/src/sage/monoids/all.py +++ b/src/sage/monoids/all.py @@ -1,12 +1,11 @@ -# sage_setup: distribution = sagemath-combinat -from sage.monoids.free_monoid import FreeMonoid -from sage.monoids.string_monoid import (BinaryStrings, OctalStrings, HexadecimalStrings, - Radix64Strings, AlphabeticStrings) +from .free_monoid import FreeMonoid +from .string_monoid import (BinaryStrings, OctalStrings, HexadecimalStrings, + Radix64Strings, AlphabeticStrings) -from sage.monoids.free_abelian_monoid import FreeAbelianMonoid +from .free_abelian_monoid import FreeAbelianMonoid -from sage.monoids.string_ops import ( +from .string_ops import ( strip_encoding, frequency_distribution, coincidence_index, diff --git a/src/sage/monoids/all__sagemath_categories.py b/src/sage/monoids/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/monoids/automatic_semigroup.py b/src/sage/monoids/automatic_semigroup.py index f5d454b3a4d..2d0b595dd7f 100644 --- a/src/sage/monoids/automatic_semigroup.py +++ b/src/sage/monoids/automatic_semigroup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Automatic Semigroups diff --git a/src/sage/monoids/free_abelian_monoid.py b/src/sage/monoids/free_abelian_monoid.py index a00d4236b83..590a20eaa1a 100644 --- a/src/sage/monoids/free_abelian_monoid.py +++ b/src/sage/monoids/free_abelian_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Free abelian monoids diff --git a/src/sage/monoids/free_abelian_monoid_element.pxd b/src/sage/monoids/free_abelian_monoid_element.pxd index add273ebedb..092cd343f05 100644 --- a/src/sage/monoids/free_abelian_monoid_element.pxd +++ b/src/sage/monoids/free_abelian_monoid_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from sage.structure.element cimport MonoidElement from sage.libs.gmp.types cimport mpz_t from sage.structure.parent cimport Parent diff --git a/src/sage/monoids/free_abelian_monoid_element.pyx b/src/sage/monoids/free_abelian_monoid_element.pyx index 9afee5095a8..c81c1fa5575 100644 --- a/src/sage/monoids/free_abelian_monoid_element.pyx +++ b/src/sage/monoids/free_abelian_monoid_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Abelian Monoid Elements diff --git a/src/sage/monoids/free_monoid.py b/src/sage/monoids/free_monoid.py index 0ec5dd59568..88277320a63 100644 --- a/src/sage/monoids/free_monoid.py +++ b/src/sage/monoids/free_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Free Monoids diff --git a/src/sage/monoids/free_monoid_element.py b/src/sage/monoids/free_monoid_element.py index 83de7a36bb4..e540f408f1d 100644 --- a/src/sage/monoids/free_monoid_element.py +++ b/src/sage/monoids/free_monoid_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Elements of Free Monoids diff --git a/src/sage/monoids/hecke_monoid.py b/src/sage/monoids/hecke_monoid.py index f42e23c6fc0..179446d24e6 100644 --- a/src/sage/monoids/hecke_monoid.py +++ b/src/sage/monoids/hecke_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Hecke Monoids """ diff --git a/src/sage/monoids/indexed_free_monoid.py b/src/sage/monoids/indexed_free_monoid.py index 62c3d1daaf0..66af0a2fb5c 100644 --- a/src/sage/monoids/indexed_free_monoid.py +++ b/src/sage/monoids/indexed_free_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Indexed Monoids diff --git a/src/sage/monoids/monoid.py b/src/sage/monoids/monoid.py index ec04f116088..97c0dfa6ad3 100644 --- a/src/sage/monoids/monoid.py +++ b/src/sage/monoids/monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Monoids """ diff --git a/src/sage/monoids/string_monoid.py b/src/sage/monoids/string_monoid.py index 87a51a834a4..7aa51ad9776 100644 --- a/src/sage/monoids/string_monoid.py +++ b/src/sage/monoids/string_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Free String Monoids diff --git a/src/sage/monoids/string_monoid_element.py b/src/sage/monoids/string_monoid_element.py index 69087d3e251..0299359c7f7 100644 --- a/src/sage/monoids/string_monoid_element.py +++ b/src/sage/monoids/string_monoid_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ String Monoid Elements diff --git a/src/sage/monoids/string_ops.py b/src/sage/monoids/string_ops.py index 8c19574527c..e34164712fb 100644 --- a/src/sage/monoids/string_ops.py +++ b/src/sage/monoids/string_ops.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat "Utility functions on strings" # **************************************************************************** diff --git a/src/sage/monoids/trace_monoid.py b/src/sage/monoids/trace_monoid.py index c3769ca7c5b..bc7edc7ab08 100644 --- a/src/sage/monoids/trace_monoid.py +++ b/src/sage/monoids/trace_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Module of trace monoids (free partially commutative monoids). diff --git a/src/sage/numerical/all.py b/src/sage/numerical/all.py index c2b17a60f65..8b69da18652 100644 --- a/src/sage/numerical/all.py +++ b/src/sage/numerical/all.py @@ -1,9 +1,7 @@ -# sage_setup: distribution = sagemath-polyhedra - -from sage.numerical.all__sagemath_modules import * - from sage.misc.lazy_import import lazy_import - +lazy_import("sage.numerical.optimize", + ["find_fit", "find_local_maximum", "find_local_minimum", + "find_root", "minimize", "minimize_constrained"]) lazy_import("sage.numerical.mip", ["MixedIntegerLinearProgram"]) lazy_import("sage.numerical.sdp", ["SemidefiniteProgram"]) lazy_import("sage.numerical.backends.generic_backend", ["default_mip_solver"]) @@ -11,4 +9,3 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) -del lazy_import diff --git a/src/sage/numerical/all__sagemath_categories.py b/src/sage/numerical/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/numerical/all__sagemath_glpk.py b/src/sage/numerical/all__sagemath_glpk.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/numerical/all__sagemath_modules.py b/src/sage/numerical/all__sagemath_modules.py deleted file mode 100644 index 7a2c2778373..00000000000 --- a/src/sage/numerical/all__sagemath_modules.py +++ /dev/null @@ -1,5 +0,0 @@ -from sage.misc.lazy_import import lazy_import -lazy_import("sage.numerical.optimize", - ["find_fit", "find_local_maximum", "find_local_minimum", - "find_root", "minimize", "minimize_constrained"]) -del lazy_import diff --git a/src/sage/numerical/all__sagemath_polyhedra.py b/src/sage/numerical/all__sagemath_polyhedra.py index 6589c9f5fc0..6de2a9af502 100644 --- a/src/sage/numerical/all__sagemath_polyhedra.py +++ b/src/sage/numerical/all__sagemath_polyhedra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.misc.lazy_import import lazy_import lazy_import("sage.numerical.mip", ["MixedIntegerLinearProgram"]) @@ -8,4 +7,3 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) -del lazy_import diff --git a/src/sage/numerical/backends/all.py b/src/sage/numerical/backends/all.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/numerical/backends/all.py +++ b/src/sage/numerical/backends/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/numerical/backends/all__sagemath_categories.py b/src/sage/numerical/backends/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/numerical/backends/all__sagemath_glpk.py b/src/sage/numerical/backends/all__sagemath_glpk.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/numerical/backends/all__sagemath_polyhedra.py b/src/sage/numerical/backends/all__sagemath_polyhedra.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/numerical/backends/all__sagemath_polyhedra.py +++ b/src/sage/numerical/backends/all__sagemath_polyhedra.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/numerical/backends/cvxopt_backend.pyx b/src/sage/numerical/backends/cvxopt_backend.pyx index 64d9537f000..1d7ef20625c 100644 --- a/src/sage/numerical/backends/cvxopt_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs cvxopt r""" CVXOPT Backend diff --git a/src/sage/numerical/backends/cvxopt_backend_test.py b/src/sage/numerical/backends/cvxopt_backend_test.py index d2567569187..6029221fda2 100644 --- a/src/sage/numerical/backends/cvxopt_backend_test.py +++ b/src/sage/numerical/backends/cvxopt_backend_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra import pytest from sage.structure.sage_object import SageObject diff --git a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx index 4364877c36b..5a5cf2c11a2 100644 --- a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs cvxopt r""" CVXOPT SDP Backend diff --git a/src/sage/numerical/backends/cvxpy_backend.pxd b/src/sage/numerical/backends/cvxpy_backend.pxd index f3b14def032..ed4d63ccc63 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pxd +++ b/src/sage/numerical/backends/cvxpy_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra ############################################################################## # Copyright (C) 2010 Nathann Cohen # Copyright (C) 2022 Matthias Koeppe diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 883de3ca891..145f84b363a 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - cvxpy r""" CVXPY Backend diff --git a/src/sage/numerical/backends/cvxpy_backend_test.py b/src/sage/numerical/backends/cvxpy_backend_test.py index 4082cc414de..1f5f030248e 100644 --- a/src/sage/numerical/backends/cvxpy_backend_test.py +++ b/src/sage/numerical/backends/cvxpy_backend_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra import pytest from sage.numerical.backends.generic_backend_test import GenericBackendTests from sage.numerical.backends.generic_backend import GenericBackend diff --git a/src/sage/numerical/backends/generic_backend.pxd b/src/sage/numerical/backends/generic_backend.pxd index fb14079c2b2..f2d315d249c 100644 --- a/src/sage/numerical/backends/generic_backend.pxd +++ b/src/sage/numerical/backends/generic_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories ############################################################################## # Copyright (C) 2010 Nathann Cohen # Distributed under the terms of the GNU General Public License (GPL) diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index a283a956566..00909eb25a8 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Generic Backend for LP solvers diff --git a/src/sage/numerical/backends/generic_backend_test.py b/src/sage/numerical/backends/generic_backend_test.py index 5aa004a23b9..3c5416eb63c 100644 --- a/src/sage/numerical/backends/generic_backend_test.py +++ b/src/sage/numerical/backends/generic_backend_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra import pytest from sage.numerical.backends.generic_backend import GenericBackend from sage.structure.sage_object import SageObject diff --git a/src/sage/numerical/backends/generic_sdp_backend.pxd b/src/sage/numerical/backends/generic_sdp_backend.pxd index d30fa4fc2d6..023f95653d6 100644 --- a/src/sage/numerical/backends/generic_sdp_backend.pxd +++ b/src/sage/numerical/backends/generic_sdp_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2014 Ingolfur Edvardsson # diff --git a/src/sage/numerical/backends/generic_sdp_backend.pyx b/src/sage/numerical/backends/generic_sdp_backend.pyx index 853ca4641fa..66876c68119 100644 --- a/src/sage/numerical/backends/generic_sdp_backend.pyx +++ b/src/sage/numerical/backends/generic_sdp_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Generic Backend for SDP solvers diff --git a/src/sage/numerical/backends/glpk_backend.pxd b/src/sage/numerical/backends/glpk_backend.pxd index 87625876548..5ff4a90a211 100644 --- a/src/sage/numerical/backends/glpk_backend.pxd +++ b/src/sage/numerical/backends/glpk_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk #***************************************************************************** # Copyright (C) 2010 Nathann Cohen # diff --git a/src/sage/numerical/backends/glpk_backend.pyx b/src/sage/numerical/backends/glpk_backend.pyx index 2d241955512..10ab452e1fa 100644 --- a/src/sage/numerical/backends/glpk_backend.pyx +++ b/src/sage/numerical/backends/glpk_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk """ GLPK Backend diff --git a/src/sage/numerical/backends/glpk_exact_backend.pxd b/src/sage/numerical/backends/glpk_exact_backend.pxd index 2b94d5ad968..8207347ce51 100644 --- a/src/sage/numerical/backends/glpk_exact_backend.pxd +++ b/src/sage/numerical/backends/glpk_exact_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk #***************************************************************************** # Copyright (C) 2016 Matthias Koeppe # diff --git a/src/sage/numerical/backends/glpk_exact_backend.pyx b/src/sage/numerical/backends/glpk_exact_backend.pyx index c50a1c85a87..3031748eb42 100644 --- a/src/sage/numerical/backends/glpk_exact_backend.pyx +++ b/src/sage/numerical/backends/glpk_exact_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk """ GLPK/exact Backend (simplex method in exact rational arithmetic) diff --git a/src/sage/numerical/backends/glpk_graph_backend.pxd b/src/sage/numerical/backends/glpk_graph_backend.pxd index 3ac3b0b616e..2e4b29a25a9 100644 --- a/src/sage/numerical/backends/glpk_graph_backend.pxd +++ b/src/sage/numerical/backends/glpk_graph_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk #***************************************************************************** # Copyright (C) 2012 Christian Kuper # Copyright (C) 2015 Jeroen Demeyer diff --git a/src/sage/numerical/backends/glpk_graph_backend.pyx b/src/sage/numerical/backends/glpk_graph_backend.pyx index 6398ef4e577..63bc2a76305 100644 --- a/src/sage/numerical/backends/glpk_graph_backend.pyx +++ b/src/sage/numerical/backends/glpk_graph_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-glpk # sage.doctest: needs sage.graphs """ GLPK Backend for access to GLPK graph functions diff --git a/src/sage/numerical/backends/interactivelp_backend.pxd b/src/sage/numerical/backends/interactivelp_backend.pxd index c450d6d2353..07e63a7bb44 100644 --- a/src/sage/numerical/backends/interactivelp_backend.pxd +++ b/src/sage/numerical/backends/interactivelp_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra ############################################################################## # Copyright (C) 2010 Nathann Cohen # Copyright (C) 2016 Matthias Koeppe diff --git a/src/sage/numerical/backends/interactivelp_backend.pyx b/src/sage/numerical/backends/interactivelp_backend.pyx index 98bc5b553cf..64ef561375a 100644 --- a/src/sage/numerical/backends/interactivelp_backend.pyx +++ b/src/sage/numerical/backends/interactivelp_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" InteractiveLP Backend diff --git a/src/sage/numerical/backends/interactivelp_backend_test.py b/src/sage/numerical/backends/interactivelp_backend_test.py index bb18bb4f4f1..0f0af51250d 100644 --- a/src/sage/numerical/backends/interactivelp_backend_test.py +++ b/src/sage/numerical/backends/interactivelp_backend_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra import pytest from sage.numerical.backends.generic_backend_test import GenericBackendTests from sage.numerical.backends.generic_backend import GenericBackend diff --git a/src/sage/numerical/backends/logging_backend.py b/src/sage/numerical/backends/logging_backend.py index e85fe353254..2efb77eaf08 100644 --- a/src/sage/numerical/backends/logging_backend.py +++ b/src/sage/numerical/backends/logging_backend.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Logging Backend diff --git a/src/sage/numerical/backends/matrix_sdp_backend.pxd b/src/sage/numerical/backends/matrix_sdp_backend.pxd index ba209f6fb02..9038955f83a 100644 --- a/src/sage/numerical/backends/matrix_sdp_backend.pxd +++ b/src/sage/numerical/backends/matrix_sdp_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.numerical.backends.generic_sdp_backend cimport GenericSDPBackend diff --git a/src/sage/numerical/backends/matrix_sdp_backend.pyx b/src/sage/numerical/backends/matrix_sdp_backend.pyx index e20dad1b614..f4e7ecb13f0 100644 --- a/src/sage/numerical/backends/matrix_sdp_backend.pyx +++ b/src/sage/numerical/backends/matrix_sdp_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Matrix Backend for SDP solvers diff --git a/src/sage/numerical/backends/ppl_backend.pyx b/src/sage/numerical/backends/ppl_backend.pyx index 2d02f3bec71..987842f728c 100644 --- a/src/sage/numerical/backends/ppl_backend.pyx +++ b/src/sage/numerical/backends/ppl_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: optional - pplpy """ PPL Backend diff --git a/src/sage/numerical/backends/ppl_backend_test.py b/src/sage/numerical/backends/ppl_backend_test.py index d0c9dea1fb3..852c3be82c1 100644 --- a/src/sage/numerical/backends/ppl_backend_test.py +++ b/src/sage/numerical/backends/ppl_backend_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra import pytest from sage.numerical.backends.generic_backend_test import GenericBackendTests diff --git a/src/sage/numerical/backends/scip_backend.pxd b/src/sage/numerical/backends/scip_backend.pxd index 634197437ea..0cd0600f955 100644 --- a/src/sage/numerical/backends/scip_backend.pxd +++ b/src/sage/numerical/backends/scip_backend.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra #***************************************************************************** # Copyright (C) 2017 Matthias Koeppe # diff --git a/src/sage/numerical/backends/scip_backend.pyx b/src/sage/numerical/backends/scip_backend.pyx index c1e226fb971..ad53659857b 100644 --- a/src/sage/numerical/backends/scip_backend.pyx +++ b/src/sage/numerical/backends/scip_backend.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # distutils: language = c++ # sage.doctest: optional - pyscipopt """ diff --git a/src/sage/numerical/backends/scip_backend_test.py b/src/sage/numerical/backends/scip_backend_test.py index 3ad30d8a779..136d3ce914b 100644 --- a/src/sage/numerical/backends/scip_backend_test.py +++ b/src/sage/numerical/backends/scip_backend_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra import pytest from sage.numerical.backends.generic_backend_test import GenericBackendTests from sage.numerical.backends.generic_backend import GenericBackend diff --git a/src/sage/numerical/gauss_legendre.pyx b/src/sage/numerical/gauss_legendre.pyx index bc3b6e76663..fceda721c53 100644 --- a/src/sage/numerical/gauss_legendre.pyx +++ b/src/sage/numerical/gauss_legendre.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Gauss-Legendre Integration for Vector-Valued Functions diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 6861c304e27..c2a10d6a4f6 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Interactive Simplex Method diff --git a/src/sage/numerical/knapsack.py b/src/sage/numerical/knapsack.py index fe26317d7a0..3f80f517998 100644 --- a/src/sage/numerical/knapsack.py +++ b/src/sage/numerical/knapsack.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Knapsack Problems diff --git a/src/sage/numerical/linear_functions.pxd b/src/sage/numerical/linear_functions.pxd index fb0a4b27ee2..568f04b75af 100644 --- a/src/sage/numerical/linear_functions.pxd +++ b/src/sage/numerical/linear_functions.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.structure.parent cimport Parent, Parent_richcmp_element_without_coercion from sage.structure.element cimport ModuleElement, RingElement, Element diff --git a/src/sage/numerical/linear_functions.pyx b/src/sage/numerical/linear_functions.pyx index 1f564fc53f8..9c7e10744f2 100644 --- a/src/sage/numerical/linear_functions.pyx +++ b/src/sage/numerical/linear_functions.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Linear Functions and Constraints diff --git a/src/sage/numerical/linear_tensor.py b/src/sage/numerical/linear_tensor.py index 99774536f32..2402845b896 100644 --- a/src/sage/numerical/linear_tensor.py +++ b/src/sage/numerical/linear_tensor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Matrix/Vector-Valued Linear Functions: Parents diff --git a/src/sage/numerical/linear_tensor_constraints.py b/src/sage/numerical/linear_tensor_constraints.py index 9cfc62bb323..24f94f3b3d6 100644 --- a/src/sage/numerical/linear_tensor_constraints.py +++ b/src/sage/numerical/linear_tensor_constraints.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Constraints on Linear Functions Tensored with a Free Module diff --git a/src/sage/numerical/linear_tensor_element.pxd b/src/sage/numerical/linear_tensor_element.pxd index 0318924471e..1cd84d3e33f 100644 --- a/src/sage/numerical/linear_tensor_element.pxd +++ b/src/sage/numerical/linear_tensor_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.structure.element cimport Element, ModuleElement cdef class LinearTensor(ModuleElement): diff --git a/src/sage/numerical/linear_tensor_element.pyx b/src/sage/numerical/linear_tensor_element.pyx index ceac8708599..c77aa290e21 100644 --- a/src/sage/numerical/linear_tensor_element.pyx +++ b/src/sage/numerical/linear_tensor_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra """ Matrix/Vector-Valued Linear Functions: Elements diff --git a/src/sage/numerical/mip.pxd b/src/sage/numerical/mip.pxd index 8422f0ade79..1422827e1e4 100644 --- a/src/sage/numerical/mip.pxd +++ b/src/sage/numerical/mip.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra cdef extern from *: cdef int BINARY = 1 cdef int REAL = -1 diff --git a/src/sage/numerical/mip.pyx b/src/sage/numerical/mip.pyx index b8e4bdc7b09..368b9e4b0e3 100644 --- a/src/sage/numerical/mip.pyx +++ b/src/sage/numerical/mip.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Mixed Integer Linear Programming diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py index d2e47deb97e..54262183b1b 100644 --- a/src/sage/numerical/optimize.py +++ b/src/sage/numerical/optimize.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - scipy """ Numerical Root Finding and Optimization diff --git a/src/sage/numerical/sdp.pxd b/src/sage/numerical/sdp.pxd index 49b7a4d186f..629e6c83f94 100644 --- a/src/sage/numerical/sdp.pxd +++ b/src/sage/numerical/sdp.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra from sage.structure.sage_object cimport SageObject from sage.structure.parent cimport Parent from sage.structure.element cimport Element diff --git a/src/sage/numerical/sdp.pyx b/src/sage/numerical/sdp.pyx index 1574fcf76b3..8701ed22150 100644 --- a/src/sage/numerical/sdp.pyx +++ b/src/sage/numerical/sdp.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra r""" Semidefinite Programming diff --git a/src/sage/parallel/all.py b/src/sage/parallel/all.py index 8badd23e060..85f69c86165 100644 --- a/src/sage/parallel/all.py +++ b/src/sage/parallel/all.py @@ -1,6 +1,4 @@ -# sage_setup: distribution = sagemath-categories -from sage.parallel.decorate import parallel, fork +from .decorate import parallel, fork from sage.misc.lazy_import import lazy_import lazy_import('sage.parallel.parallelism', 'Parallelism') -del lazy_import diff --git a/src/sage/parallel/decorate.py b/src/sage/parallel/decorate.py index 00b63dde8f5..b8ea5e75bb3 100644 --- a/src/sage/parallel/decorate.py +++ b/src/sage/parallel/decorate.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Decorate interface for parallel computation """ diff --git a/src/sage/parallel/map_reduce.py b/src/sage/parallel/map_reduce.py index f5d4b7bbde7..2765764cddf 100644 --- a/src/sage/parallel/map_reduce.py +++ b/src/sage/parallel/map_reduce.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Parallel computations using RecursivelyEnumeratedSet and Map-Reduce diff --git a/src/sage/parallel/multiprocessing_sage.py b/src/sage/parallel/multiprocessing_sage.py index 350c833afed..2ccab49ac0f 100644 --- a/src/sage/parallel/multiprocessing_sage.py +++ b/src/sage/parallel/multiprocessing_sage.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Parallel Iterator built using Python's multiprocessing module """ diff --git a/src/sage/parallel/ncpus.py b/src/sage/parallel/ncpus.py index 44771a9aa49..24e8c0c5743 100644 --- a/src/sage/parallel/ncpus.py +++ b/src/sage/parallel/ncpus.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ CPU Detection """ diff --git a/src/sage/parallel/parallelism.py b/src/sage/parallel/parallelism.py index cde870e2604..8aafe232fee 100644 --- a/src/sage/parallel/parallelism.py +++ b/src/sage/parallel/parallelism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Parallelization control diff --git a/src/sage/parallel/reference.py b/src/sage/parallel/reference.py index ccde2ebfd97..36dd7a8bb76 100644 --- a/src/sage/parallel/reference.py +++ b/src/sage/parallel/reference.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Reference Parallel Primitives diff --git a/src/sage/parallel/use_fork.py b/src/sage/parallel/use_fork.py index 2d964811766..19ee4b0e1d6 100644 --- a/src/sage/parallel/use_fork.py +++ b/src/sage/parallel/use_fork.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Parallel iterator built using the ``fork()`` system call """ diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index 00131580f87..1f16e2d6789 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -1,43 +1,39 @@ -# sage_setup: distribution = sagemath-plot - -from sage.plot.graphics import Graphics -from sage.plot.plot import (plot, graphics_array, multi_graphics, list_plot, - parametric_plot, polar_plot, plot_loglog, plot_semilogx, - plot_semilogy, list_plot_loglog, list_plot_semilogx, - list_plot_semilogy) -from sage.plot.line import line, line2d -from sage.plot.arrow import arrow, arrow2d -from sage.plot.bar_chart import bar_chart -from sage.plot.histogram import histogram -from sage.plot.bezier_path import bezier_path -from sage.plot.scatter_plot import scatter_plot -from sage.plot.disk import disk -from sage.plot.point import point, points, point2d -from sage.plot.matrix_plot import matrix_plot -from sage.plot.plot_field import plot_vector_field, plot_slope_field -from sage.plot.text import text -from sage.plot.polygon import polygon, polygon2d -from sage.plot.circle import circle -from sage.plot.ellipse import ellipse -from sage.plot.contour_plot import contour_plot, implicit_plot, region_plot -from sage.plot.density_plot import density_plot -from sage.plot.streamline_plot import streamline_plot +from .graphics import Graphics +from .plot import (plot, graphics_array, multi_graphics, list_plot, + parametric_plot, polar_plot, plot_loglog, plot_semilogx, + plot_semilogy, list_plot_loglog, list_plot_semilogx, + list_plot_semilogy) +from .line import line, line2d +from .arrow import arrow, arrow2d +from .bar_chart import bar_chart +from .histogram import histogram +from .bezier_path import bezier_path +from .scatter_plot import scatter_plot +from .disk import disk +from .point import point, points, point2d +from .matrix_plot import matrix_plot +from .plot_field import plot_vector_field, plot_slope_field +from .text import text +from .polygon import polygon, polygon2d +from .circle import circle +from .ellipse import ellipse +from .contour_plot import contour_plot, implicit_plot, region_plot +from .density_plot import density_plot +from .streamline_plot import streamline_plot from sage.misc.lazy_import import lazy_import -lazy_import("sage.plot.complex_plot", ["complex_plot"]) +lazy_import("sage.plot.complex_plot",["complex_plot"]) -from sage.plot.arc import arc +from .arc import arc -from sage.plot.animate import animate +from .animate import animate -from sage.plot.plot3d.tachyon import Tachyon +from .plot3d.tachyon import Tachyon -from sage.plot.colors import Color, hue, rainbow, colors, colormaps +from .colors import Color, hue, rainbow, colors, colormaps -from sage.plot.step import plot_step_function +from .step import plot_step_function -lazy_import("sage.plot.hyperbolic_arc", "hyperbolic_arc") -lazy_import("sage.plot.hyperbolic_polygon", [ - "hyperbolic_triangle", "hyperbolic_polygon"]) +from .hyperbolic_arc import hyperbolic_arc +from .hyperbolic_polygon import hyperbolic_triangle, hyperbolic_polygon lazy_import("sage.plot.hyperbolic_regular_polygon", "hyperbolic_regular_polygon") -del lazy_import diff --git a/src/sage/plot/animate.py b/src/sage/plot/animate.py index 328ebb0d30f..071bcd92622 100644 --- a/src/sage/plot/animate.py +++ b/src/sage/plot/animate.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" Animated plots diff --git a/src/sage/plot/arc.py b/src/sage/plot/arc.py index f27d2538361..8da333ee12b 100644 --- a/src/sage/plot/arc.py +++ b/src/sage/plot/arc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Arcs of circles and ellipses """ diff --git a/src/sage/plot/arrow.py b/src/sage/plot/arrow.py index 397da59735a..74da7b4b4f7 100644 --- a/src/sage/plot/arrow.py +++ b/src/sage/plot/arrow.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Arrows """ diff --git a/src/sage/plot/bar_chart.py b/src/sage/plot/bar_chart.py index 2f1dc0f27c9..34ed242af4c 100644 --- a/src/sage/plot/bar_chart.py +++ b/src/sage/plot/bar_chart.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Bar charts """ diff --git a/src/sage/plot/bezier_path.py b/src/sage/plot/bezier_path.py index b801f4a6ede..14958fbbba8 100644 --- a/src/sage/plot/bezier_path.py +++ b/src/sage/plot/bezier_path.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Bezier paths """ diff --git a/src/sage/plot/circle.py b/src/sage/plot/circle.py index f2543a7331d..c7fd3d9dfc0 100644 --- a/src/sage/plot/circle.py +++ b/src/sage/plot/circle.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Circles """ diff --git a/src/sage/plot/colors.py b/src/sage/plot/colors.py index 2012b32ee1d..3322c6cfdbc 100644 --- a/src/sage/plot/colors.py +++ b/src/sage/plot/colors.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.plot r""" Colors diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx index 1ad410467fc..f1f2671a803 100644 --- a/src/sage/plot/complex_plot.pyx +++ b/src/sage/plot/complex_plot.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Complex plots diff --git a/src/sage/plot/contour_plot.py b/src/sage/plot/contour_plot.py index f526c5de5dd..a0d9e2689f1 100644 --- a/src/sage/plot/contour_plot.py +++ b/src/sage/plot/contour_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Contour plots diff --git a/src/sage/plot/density_plot.py b/src/sage/plot/density_plot.py index 269fc73ef35..ff27f2d126b 100644 --- a/src/sage/plot/density_plot.py +++ b/src/sage/plot/density_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Density plots diff --git a/src/sage/plot/disk.py b/src/sage/plot/disk.py index e60b89a506e..4219cf35155 100644 --- a/src/sage/plot/disk.py +++ b/src/sage/plot/disk.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Disks """ diff --git a/src/sage/plot/ellipse.py b/src/sage/plot/ellipse.py index 135bbeee8f6..788db0fd76b 100644 --- a/src/sage/plot/ellipse.py +++ b/src/sage/plot/ellipse.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Ellipses """ diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py index 376bb2d25fa..8a61068887f 100644 --- a/src/sage/plot/graphics.py +++ b/src/sage/plot/graphics.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-plot +# -*- encoding: utf-8 -*- r""" Graphics objects diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py index e8de0f7262f..e10229417fc 100644 --- a/src/sage/plot/histogram.py +++ b/src/sage/plot/histogram.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Histograms """ diff --git a/src/sage/plot/hyperbolic_arc.py b/src/sage/plot/hyperbolic_arc.py index 17fdaf90c04..4e7fda8350d 100644 --- a/src/sage/plot/hyperbolic_arc.py +++ b/src/sage/plot/hyperbolic_arc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" Arcs in hyperbolic geometry diff --git a/src/sage/plot/hyperbolic_polygon.py b/src/sage/plot/hyperbolic_polygon.py index 446f66f9404..efe39697829 100644 --- a/src/sage/plot/hyperbolic_polygon.py +++ b/src/sage/plot/hyperbolic_polygon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Polygons and triangles in hyperbolic geometry diff --git a/src/sage/plot/hyperbolic_regular_polygon.py b/src/sage/plot/hyperbolic_regular_polygon.py index a48ba7200ca..9be2169ab63 100644 --- a/src/sage/plot/hyperbolic_regular_polygon.py +++ b/src/sage/plot/hyperbolic_regular_polygon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Regular polygons in the upper half model for hyperbolic plane diff --git a/src/sage/plot/line.py b/src/sage/plot/line.py index 1c96be6be9c..1160ade0825 100644 --- a/src/sage/plot/line.py +++ b/src/sage/plot/line.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Line plots """ diff --git a/src/sage/plot/matrix_plot.py b/src/sage/plot/matrix_plot.py index 3bc93640b48..96e966a6513 100644 --- a/src/sage/plot/matrix_plot.py +++ b/src/sage/plot/matrix_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Matrix plots """ diff --git a/src/sage/plot/misc.py b/src/sage/plot/misc.py index 231cc593459..45494f45698 100644 --- a/src/sage/plot/misc.py +++ b/src/sage/plot/misc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Plotting utilities diff --git a/src/sage/plot/multigraphics.py b/src/sage/plot/multigraphics.py index 48e6bdb2e2e..f22febca152 100644 --- a/src/sage/plot/multigraphics.py +++ b/src/sage/plot/multigraphics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" Graphics arrays and insets diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py index 9f081e8cfb4..20a71ef8bd1 100644 --- a/src/sage/plot/plot.py +++ b/src/sage/plot/plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" 2D plotting diff --git a/src/sage/plot/plot3d/all.py b/src/sage/plot/plot3d/all.py index 60c9dc491e6..16c647c6b50 100644 --- a/src/sage/plot/plot3d/all.py +++ b/src/sage/plot/plot3d/all.py @@ -1,23 +1,21 @@ -# sage_setup: distribution = sagemath-plot -from sage.plot.plot3d.plot3d import plot3d, cylindrical_plot3d, spherical_plot3d, Spherical, SphericalElevation, Cylindrical -from sage.plot.plot3d.parametric_plot3d import parametric_plot3d -from sage.plot.plot3d.plot_field3d import plot_vector_field3d +from .plot3d import plot3d, cylindrical_plot3d, spherical_plot3d, Spherical, SphericalElevation, Cylindrical +from .parametric_plot3d import parametric_plot3d +from .plot_field3d import plot_vector_field3d # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import -lazy_import("sage.plot.plot3d.implicit_plot3d", ["implicit_plot3d"]) +lazy_import("sage.plot.plot3d.implicit_plot3d",["implicit_plot3d"]) -from sage.plot.plot3d.list_plot3d import list_plot3d -from sage.plot.plot3d.revolution_plot3d import revolution_plot3d +from .list_plot3d import list_plot3d +from .revolution_plot3d import revolution_plot3d -from sage.plot.plot3d.platonic import tetrahedron, cube, octahedron, dodecahedron, icosahedron +from .platonic import tetrahedron, cube, octahedron, dodecahedron, icosahedron -from sage.plot.plot3d.shapes2 import sphere, line3d, polygon3d, polygons3d, point3d, text3d, bezier3d +from .shapes2 import sphere, line3d, polygon3d, polygons3d, point3d, text3d, bezier3d -from sage.plot.plot3d.shapes import arrow3d +from .shapes import arrow3d -# from shapes import Box, ColorCube, Cone, Cylinder, LineSegment, Arrow, Sphere, Torus, Text as Text3D -# from parametric_surface import ParametricSurface, MoebiusStrip -# from plot3d import plot3d, axes as axes3d -del lazy_import +#from shapes import Box, ColorCube, Cone, Cylinder, LineSegment, Arrow, Sphere, Torus, Text as Text3D +#from parametric_surface import ParametricSurface, MoebiusStrip +#from plot3d import plot3d, axes as axes3d diff --git a/src/sage/plot/plot3d/base.pxd b/src/sage/plot/plot3d/base.pxd index 49c0f9b3d82..0b7619ddd44 100644 --- a/src/sage/plot/plot3d/base.pxd +++ b/src/sage/plot/plot3d/base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot from sage.structure.sage_object cimport SageObject diff --git a/src/sage/plot/plot3d/base.pyx b/src/sage/plot/plot3d/base.pyx index 57804b2c979..66694f47a5f 100644 --- a/src/sage/plot/plot3d/base.pyx +++ b/src/sage/plot/plot3d/base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Base classes for 3D graphics objects and plotting diff --git a/src/sage/plot/plot3d/implicit_plot3d.py b/src/sage/plot/plot3d/implicit_plot3d.py index 1b304f9308d..89512e2ae87 100644 --- a/src/sage/plot/plot3d/implicit_plot3d.py +++ b/src/sage/plot/plot3d/implicit_plot3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Implicit plots diff --git a/src/sage/plot/plot3d/implicit_surface.pyx b/src/sage/plot/plot3d/implicit_surface.pyx index c508c73e604..df28f7c6e6b 100644 --- a/src/sage/plot/plot3d/implicit_surface.pyx +++ b/src/sage/plot/plot3d/implicit_surface.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" Graphics 3D object for representing and triangulating isosurfaces diff --git a/src/sage/plot/plot3d/index_face_set.pxd b/src/sage/plot/plot3d/index_face_set.pxd index e020fc3c265..5a81bd32de1 100644 --- a/src/sage/plot/plot3d/index_face_set.pxd +++ b/src/sage/plot/plot3d/index_face_set.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot from sage.plot.plot3d.base cimport PrimitiveObject from sage.plot.plot3d.transform cimport point_c, face_c, color_c diff --git a/src/sage/plot/plot3d/index_face_set.pyx b/src/sage/plot/plot3d/index_face_set.pyx index 4c84d7dfd39..4288db70005 100644 --- a/src/sage/plot/plot3d/index_face_set.pyx +++ b/src/sage/plot/plot3d/index_face_set.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Indexed face sets diff --git a/src/sage/plot/plot3d/introduction.py b/src/sage/plot/plot3d/introduction.py index 4424bcb2195..b297fdd180a 100644 --- a/src/sage/plot/plot3d/introduction.py +++ b/src/sage/plot/plot3d/introduction.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Introduction diff --git a/src/sage/plot/plot3d/list_plot3d.py b/src/sage/plot/plot3d/list_plot3d.py index ff2b8f85db4..7bfd84f76a4 100644 --- a/src/sage/plot/plot3d/list_plot3d.py +++ b/src/sage/plot/plot3d/list_plot3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ List plots """ diff --git a/src/sage/plot/plot3d/parametric_plot3d.py b/src/sage/plot/plot3d/parametric_plot3d.py index 38b01dc6d73..680cb187787 100644 --- a/src/sage/plot/plot3d/parametric_plot3d.py +++ b/src/sage/plot/plot3d/parametric_plot3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Parametric plots diff --git a/src/sage/plot/plot3d/parametric_surface.pxd b/src/sage/plot/plot3d/parametric_surface.pxd index a018fc00c27..82ac1164f8a 100644 --- a/src/sage/plot/plot3d/parametric_surface.pxd +++ b/src/sage/plot/plot3d/parametric_surface.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot from sage.plot.plot3d.index_face_set cimport IndexFaceSet from sage.plot.plot3d.transform cimport point_c diff --git a/src/sage/plot/plot3d/parametric_surface.pyx b/src/sage/plot/plot3d/parametric_surface.pyx index c47ed782a23..62e397030cd 100644 --- a/src/sage/plot/plot3d/parametric_surface.pyx +++ b/src/sage/plot/plot3d/parametric_surface.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" Parametric surface diff --git a/src/sage/plot/plot3d/platonic.py b/src/sage/plot/plot3d/platonic.py index 1df7fdfdb95..491179ede81 100644 --- a/src/sage/plot/plot3d/platonic.py +++ b/src/sage/plot/plot3d/platonic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Platonic solids diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py index 1f88e608846..2e027e87dd2 100644 --- a/src/sage/plot/plot3d/plot3d.py +++ b/src/sage/plot/plot3d/plot3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic r""" Plotting functions diff --git a/src/sage/plot/plot3d/plot_field3d.py b/src/sage/plot/plot3d/plot_field3d.py index d64cecd237d..a18c49215be 100644 --- a/src/sage/plot/plot3d/plot_field3d.py +++ b/src/sage/plot/plot3d/plot_field3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Plotting 3D fields diff --git a/src/sage/plot/plot3d/point_c.pxi b/src/sage/plot/plot3d/point_c.pxi index d8e8cb47f73..ba9561ab18c 100644 --- a/src/sage/plot/plot3d/point_c.pxi +++ b/src/sage/plot/plot3d/point_c.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # **************************************************************************** # Copyright (C) 2007 Robert Bradshaw # diff --git a/src/sage/plot/plot3d/revolution_plot3d.py b/src/sage/plot/plot3d/revolution_plot3d.py index 65d2d4820d7..f3220dcd1a3 100644 --- a/src/sage/plot/plot3d/revolution_plot3d.py +++ b/src/sage/plot/plot3d/revolution_plot3d.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.plot sage.symbolic """ Surfaces of revolution diff --git a/src/sage/plot/plot3d/shapes.pxd b/src/sage/plot/plot3d/shapes.pxd index aa385217dd3..d01e2a7460d 100644 --- a/src/sage/plot/plot3d/shapes.pxd +++ b/src/sage/plot/plot3d/shapes.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot from sage.plot.plot3d.parametric_surface cimport ParametricSurface diff --git a/src/sage/plot/plot3d/shapes.pyx b/src/sage/plot/plot3d/shapes.pyx index ccbb3d5cff5..694fca5bb4d 100644 --- a/src/sage/plot/plot3d/shapes.pyx +++ b/src/sage/plot/plot3d/shapes.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Basic objects such as Sphere, Box, Cone, etc. diff --git a/src/sage/plot/plot3d/shapes2.py b/src/sage/plot/plot3d/shapes2.py index 4587eaa6a2e..96e4646bbc4 100644 --- a/src/sage/plot/plot3d/shapes2.py +++ b/src/sage/plot/plot3d/shapes2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Classes for Lines, Frames, Rulers, Spheres, Points, Dots, and Text diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py index f7c80d56bce..4e8184a7816 100644 --- a/src/sage/plot/plot3d/tachyon.py +++ b/src/sage/plot/plot3d/tachyon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" The Tachyon 3D Ray Tracer diff --git a/src/sage/plot/plot3d/texture.py b/src/sage/plot/plot3d/texture.py index 5e0b1708594..c4dee5d3ad5 100644 --- a/src/sage/plot/plot3d/texture.py +++ b/src/sage/plot/plot3d/texture.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Texture support diff --git a/src/sage/plot/plot3d/transform.pxd b/src/sage/plot/plot3d/transform.pxd index 8113d48542c..39fd2bb6381 100644 --- a/src/sage/plot/plot3d/transform.pxd +++ b/src/sage/plot/plot3d/transform.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot cdef struct point_c: double x, y, z diff --git a/src/sage/plot/plot3d/transform.pyx b/src/sage/plot/plot3d/transform.pyx index a2633a4da4c..ad9aae98278 100644 --- a/src/sage/plot/plot3d/transform.pyx +++ b/src/sage/plot/plot3d/transform.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Transformations """ diff --git a/src/sage/plot/plot3d/tri_plot.py b/src/sage/plot/plot3d/tri_plot.py index 3b2e506d854..256b0d348c3 100644 --- a/src/sage/plot/plot3d/tri_plot.py +++ b/src/sage/plot/plot3d/tri_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot r""" Adaptive refinement code for 3d surface plotting diff --git a/src/sage/plot/plot_field.py b/src/sage/plot/plot_field.py index adafeb93fd8..a54a6db185b 100644 --- a/src/sage/plot/plot_field.py +++ b/src/sage/plot/plot_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Plotting fields diff --git a/src/sage/plot/point.py b/src/sage/plot/point.py index bc138f6ddff..9377d2bec85 100644 --- a/src/sage/plot/point.py +++ b/src/sage/plot/point.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-plot +# -*- coding: utf-8 -*- r""" Points diff --git a/src/sage/plot/polygon.py b/src/sage/plot/polygon.py index a49477805e0..a2159fcfb56 100644 --- a/src/sage/plot/polygon.py +++ b/src/sage/plot/polygon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Polygons """ diff --git a/src/sage/plot/primitive.py b/src/sage/plot/primitive.py index 01e1bf67b86..20c2987142f 100644 --- a/src/sage/plot/primitive.py +++ b/src/sage/plot/primitive.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Plotting primitives """ diff --git a/src/sage/plot/scatter_plot.py b/src/sage/plot/scatter_plot.py index e523c3320da..c78b33a5258 100644 --- a/src/sage/plot/scatter_plot.py +++ b/src/sage/plot/scatter_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Scatter plots """ diff --git a/src/sage/plot/step.py b/src/sage/plot/step.py index 81e3dc56870..4023686f9bd 100644 --- a/src/sage/plot/step.py +++ b/src/sage/plot/step.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Step function plots diff --git a/src/sage/plot/streamline_plot.py b/src/sage/plot/streamline_plot.py index 8d32bedb449..663d3aee70b 100644 --- a/src/sage/plot/streamline_plot.py +++ b/src/sage/plot/streamline_plot.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot # sage.doctest: needs sage.symbolic """ Streamline plots diff --git a/src/sage/plot/text.py b/src/sage/plot/text.py index 133f34bade6..602cdfebddf 100644 --- a/src/sage/plot/text.py +++ b/src/sage/plot/text.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-plot """ Text in plots """ diff --git a/src/sage/probability/all.py b/src/sage/probability/all.py index 5e82c1e7525..689ee7a7934 100644 --- a/src/sage/probability/all.py +++ b/src/sage/probability/all.py @@ -1,10 +1,9 @@ -# sage_setup: distribution = sagemath-modules -from sage.probability.random_variable import ( - DiscreteRandomVariable, - DiscreteProbabilitySpace) +from .random_variable import ( + DiscreteRandomVariable, + DiscreteProbabilitySpace ) -from sage.probability.probability_distribution import ( +from .probability_distribution import ( RealDistribution, SphericalDistribution, - GeneralDiscreteDistribution) + GeneralDiscreteDistribution ) diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx index 86c0dd17599..e2c71af9c25 100644 --- a/src/sage/probability/probability_distribution.pyx +++ b/src/sage/probability/probability_distribution.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Probability Distributions diff --git a/src/sage/probability/random_variable.py b/src/sage/probability/random_variable.py index 5950633e03f..4a385e55150 100644 --- a/src/sage/probability/random_variable.py +++ b/src/sage/probability/random_variable.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Random variables and probability spaces diff --git a/src/sage/quadratic_forms/all.py b/src/sage/quadratic_forms/all.py index f09471d0416..81d395f375c 100644 --- a/src/sage/quadratic_forms/all.py +++ b/src/sage/quadratic_forms/all.py @@ -1,4 +1,19 @@ -# sage_setup: distribution = sagemath-modules +from .binary_qf import BinaryQF, BinaryQF_reduced_representatives -from sage.quadratic_forms.all__sagemath_modules import * -from sage.quadratic_forms.all__sagemath_pari import * +from .bqf_class_group import BQFClassGroup + +from .ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc + +from .quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants + +from .random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, + random_ternaryqf, random_ternaryqf_with_conditions) + +from .extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number + +from .special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, + quadratic_L_function__exact, quadratic_L_function__numerical) + +from .genera.genus import Genus + +from .constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form diff --git a/src/sage/quadratic_forms/all__sagemath_modules.py b/src/sage/quadratic_forms/all__sagemath_modules.py deleted file mode 100644 index 62516aead2a..00000000000 --- a/src/sage/quadratic_forms/all__sagemath_modules.py +++ /dev/null @@ -1,12 +0,0 @@ -from sage.quadratic_forms.binary_qf import BinaryQF, BinaryQF_reduced_representatives - -from sage.quadratic_forms.ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc - -from sage.quadratic_forms.quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants - -from sage.quadratic_forms.random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, - random_ternaryqf, random_ternaryqf_with_conditions) - -from sage.quadratic_forms.extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number - -from sage.quadratic_forms.constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form diff --git a/src/sage/quadratic_forms/all__sagemath_pari.py b/src/sage/quadratic_forms/all__sagemath_pari.py deleted file mode 100644 index f6235960f54..00000000000 --- a/src/sage/quadratic_forms/all__sagemath_pari.py +++ /dev/null @@ -1,6 +0,0 @@ -from sage.quadratic_forms.bqf_class_group import BQFClassGroup - -from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, - quadratic_L_function__exact, quadratic_L_function__numerical) - -from sage.quadratic_forms.genera.genus import Genus diff --git a/src/sage/quadratic_forms/binary_qf.py b/src/sage/quadratic_forms/binary_qf.py index 5a5a16eaae9..2c36107a577 100755 --- a/src/sage/quadratic_forms/binary_qf.py +++ b/src/sage/quadratic_forms/binary_qf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Binary quadratic forms with integer coefficients diff --git a/src/sage/quadratic_forms/bqf_class_group.py b/src/sage/quadratic_forms/bqf_class_group.py index 2db1c637336..6d3aefed881 100644 --- a/src/sage/quadratic_forms/bqf_class_group.py +++ b/src/sage/quadratic_forms/bqf_class_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Class groups of binary quadratic forms diff --git a/src/sage/quadratic_forms/constructions.py b/src/sage/quadratic_forms/constructions.py index f24148f6d31..2fe117d2e29 100644 --- a/src/sage/quadratic_forms/constructions.py +++ b/src/sage/quadratic_forms/constructions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Constructions of quadratic forms """ diff --git a/src/sage/quadratic_forms/count_local_2.pyx b/src/sage/quadratic_forms/count_local_2.pyx index a00f1072d82..3ce05a3a413 100644 --- a/src/sage/quadratic_forms/count_local_2.pyx +++ b/src/sage/quadratic_forms/count_local_2.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Optimized counting of congruence solutions """ diff --git a/src/sage/quadratic_forms/extras.py b/src/sage/quadratic_forms/extras.py index e0ef56a2625..7bdba23c32e 100644 --- a/src/sage/quadratic_forms/extras.py +++ b/src/sage/quadratic_forms/extras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Extra functions for quadratic forms """ diff --git a/src/sage/quadratic_forms/genera/all.py b/src/sage/quadratic_forms/genera/all.py index 94beebc6290..b1f48b5b8f6 100644 --- a/src/sage/quadratic_forms/genera/all.py +++ b/src/sage/quadratic_forms/genera/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # **************************************************************************** # Copyright (C) 2007 David Kohel # @@ -6,4 +5,4 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.quadratic_forms.genera.genus import Genus, LocalGenusSymbol, is_GlobalGenus +from .genus import Genus, LocalGenusSymbol, is_GlobalGenus diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py index 7e9f7a7e557..d98b2416c3d 100644 --- a/src/sage/quadratic_forms/genera/genus.py +++ b/src/sage/quadratic_forms/genera/genus.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari r""" Genus diff --git a/src/sage/quadratic_forms/genera/normal_form.py b/src/sage/quadratic_forms/genera/normal_form.py index 237caa0ac62..829b4783226 100644 --- a/src/sage/quadratic_forms/genera/normal_form.py +++ b/src/sage/quadratic_forms/genera/normal_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari sage.rings.padics r""" Normal forms for `p`-adic quadratic and bilinear forms diff --git a/src/sage/quadratic_forms/genera/spinor_genus.py b/src/sage/quadratic_forms/genera/spinor_genus.py index f3bfebaf6f8..4f318a64d44 100644 --- a/src/sage/quadratic_forms/genera/spinor_genus.py +++ b/src/sage/quadratic_forms/genera/spinor_genus.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.groups r""" Spinor genus computations. diff --git a/src/sage/quadratic_forms/qfsolve.py b/src/sage/quadratic_forms/qfsolve.py index 5f418226e7c..83720128bfc 100644 --- a/src/sage/quadratic_forms/qfsolve.py +++ b/src/sage/quadratic_forms/qfsolve.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari """ Solving quadratic equations diff --git a/src/sage/quadratic_forms/quadratic_form.py b/src/sage/quadratic_forms/quadratic_form.py index eb7ccc893fe..b9a9767a54a 100644 --- a/src/sage/quadratic_forms/quadratic_form.py +++ b/src/sage/quadratic_forms/quadratic_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Quadratic forms overview diff --git a/src/sage/quadratic_forms/quadratic_form__automorphisms.py b/src/sage/quadratic_forms/quadratic_form__automorphisms.py index 4972cacee14..4b6e3594f83 100644 --- a/src/sage/quadratic_forms/quadratic_form__automorphisms.py +++ b/src/sage/quadratic_forms/quadratic_form__automorphisms.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari """ Automorphisms of Quadratic Forms diff --git a/src/sage/quadratic_forms/quadratic_form__count_local_2.py b/src/sage/quadratic_forms/quadratic_form__count_local_2.py index c98d2f4271e..b125d8d6840 100644 --- a/src/sage/quadratic_forms/quadratic_form__count_local_2.py +++ b/src/sage/quadratic_forms/quadratic_form__count_local_2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Counting Congruence Solutions diff --git a/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py b/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py index 78d8a22b509..89d4c281104 100644 --- a/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py +++ b/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Equivalence Testing diff --git a/src/sage/quadratic_forms/quadratic_form__evaluate.pyx b/src/sage/quadratic_forms/quadratic_form__evaluate.pyx index ddea5c0c112..95e82e669dc 100644 --- a/src/sage/quadratic_forms/quadratic_form__evaluate.pyx +++ b/src/sage/quadratic_forms/quadratic_form__evaluate.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules "Evaluation" diff --git a/src/sage/quadratic_forms/quadratic_form__genus.py b/src/sage/quadratic_forms/quadratic_form__genus.py index 7ff275be265..52468e9889a 100644 --- a/src/sage/quadratic_forms/quadratic_form__genus.py +++ b/src/sage/quadratic_forms/quadratic_form__genus.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari """ Local and Global Genus Symbols diff --git a/src/sage/quadratic_forms/quadratic_form__local_density_congruence.py b/src/sage/quadratic_forms/quadratic_form__local_density_congruence.py index f02d5aca212..a39637df8f0 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_density_congruence.py +++ b/src/sage/quadratic_forms/quadratic_form__local_density_congruence.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Local Density Congruence """ diff --git a/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py b/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py index dac1793a1be..ec39e489494 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py +++ b/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Local Density Interfaces """ diff --git a/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py b/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py index 90341e00ae0..aff8dad2d62 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py +++ b/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Local Field Invariants diff --git a/src/sage/quadratic_forms/quadratic_form__local_normal_form.py b/src/sage/quadratic_forms/quadratic_form__local_normal_form.py index fd3cebb8cbd..5770a3c22f0 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_normal_form.py +++ b/src/sage/quadratic_forms/quadratic_form__local_normal_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Local Normal Form """ diff --git a/src/sage/quadratic_forms/quadratic_form__local_representation_conditions.py b/src/sage/quadratic_forms/quadratic_form__local_representation_conditions.py index e7a1c2607f9..c337d2994a0 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_representation_conditions.py +++ b/src/sage/quadratic_forms/quadratic_form__local_representation_conditions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari sage.rings.number_field """ Local Representation Conditions diff --git a/src/sage/quadratic_forms/quadratic_form__mass.py b/src/sage/quadratic_forms/quadratic_form__mass.py index e951d8c1b29..67bf06d888a 100644 --- a/src/sage/quadratic_forms/quadratic_form__mass.py +++ b/src/sage/quadratic_forms/quadratic_form__mass.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Shimura Mass """ diff --git a/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py b/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py index 732e31bff96..894ee68cec9 100644 --- a/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py +++ b/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Conway-Sloane masses """ diff --git a/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py b/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py index a82406bce24..9133a84b76f 100644 --- a/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py +++ b/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Local Masses and Siegel Densities """ diff --git a/src/sage/quadratic_forms/quadratic_form__neighbors.py b/src/sage/quadratic_forms/quadratic_form__neighbors.py index 19577bd0585..0486e0a4acb 100644 --- a/src/sage/quadratic_forms/quadratic_form__neighbors.py +++ b/src/sage/quadratic_forms/quadratic_form__neighbors.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Neighbors """ diff --git a/src/sage/quadratic_forms/quadratic_form__reduction_theory.py b/src/sage/quadratic_forms/quadratic_form__reduction_theory.py index 1bafe1e2756..87323962097 100644 --- a/src/sage/quadratic_forms/quadratic_form__reduction_theory.py +++ b/src/sage/quadratic_forms/quadratic_form__reduction_theory.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Reduction Theory """ diff --git a/src/sage/quadratic_forms/quadratic_form__siegel_product.py b/src/sage/quadratic_forms/quadratic_form__siegel_product.py index 1aebfabb6bf..b481f5ad073 100644 --- a/src/sage/quadratic_forms/quadratic_form__siegel_product.py +++ b/src/sage/quadratic_forms/quadratic_form__siegel_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari """ Siegel Products diff --git a/src/sage/quadratic_forms/quadratic_form__split_local_covering.py b/src/sage/quadratic_forms/quadratic_form__split_local_covering.py index ca265e51056..4db788e5e44 100644 --- a/src/sage/quadratic_forms/quadratic_form__split_local_covering.py +++ b/src/sage/quadratic_forms/quadratic_form__split_local_covering.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Split Local Covering """ diff --git a/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py b/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py index 01fdced1bc1..cc7a6549312 100644 --- a/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +++ b/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Tornaria methods for computing with quadratic forms """ diff --git a/src/sage/quadratic_forms/quadratic_form__theta.py b/src/sage/quadratic_forms/quadratic_form__theta.py index 8320c6ac13a..c4f0606df4c 100644 --- a/src/sage/quadratic_forms/quadratic_form__theta.py +++ b/src/sage/quadratic_forms/quadratic_form__theta.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Theta Series of Quadratic Forms diff --git a/src/sage/quadratic_forms/quadratic_form__variable_substitutions.py b/src/sage/quadratic_forms/quadratic_form__variable_substitutions.py index f47efdbdc8f..cbcae91d9de 100644 --- a/src/sage/quadratic_forms/quadratic_form__variable_substitutions.py +++ b/src/sage/quadratic_forms/quadratic_form__variable_substitutions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Variable Substitution, Multiplication, Division, Scaling diff --git a/src/sage/quadratic_forms/random_quadraticform.py b/src/sage/quadratic_forms/random_quadraticform.py index d0b202dd919..e372c625f57 100644 --- a/src/sage/quadratic_forms/random_quadraticform.py +++ b/src/sage/quadratic_forms/random_quadraticform.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Random quadratic forms diff --git a/src/sage/quadratic_forms/special_values.py b/src/sage/quadratic_forms/special_values.py index 74f1882a7cb..2ee775e053d 100644 --- a/src/sage/quadratic_forms/special_values.py +++ b/src/sage/quadratic_forms/special_values.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Routines for computing special values of `L`-functions diff --git a/src/sage/quadratic_forms/ternary.pyx b/src/sage/quadratic_forms/ternary.pyx index 583f1f1c88d..3c1ca8832a8 100644 --- a/src/sage/quadratic_forms/ternary.pyx +++ b/src/sage/quadratic_forms/ternary.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Helper code for ternary quadratic forms """ diff --git a/src/sage/quadratic_forms/ternary_qf.py b/src/sage/quadratic_forms/ternary_qf.py index fda07dec2bb..d5384632694 100644 --- a/src/sage/quadratic_forms/ternary_qf.py +++ b/src/sage/quadratic_forms/ternary_qf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Ternary quadratic form with integer coefficients diff --git a/src/sage/quivers/algebra.py b/src/sage/quivers/algebra.py index fb2211c474a..393caa64f40 100644 --- a/src/sage/quivers/algebra.py +++ b/src/sage/quivers/algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Path Algebras """ diff --git a/src/sage/quivers/algebra_elements.pxd b/src/sage/quivers/algebra_elements.pxd index 91645ff60d2..3beb69914d0 100644 --- a/src/sage/quivers/algebra_elements.pxd +++ b/src/sage/quivers/algebra_elements.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Cython types for elements of path algebras """ diff --git a/src/sage/quivers/algebra_elements.pxi b/src/sage/quivers/algebra_elements.pxi index 2ca59dbd40d..45d18478f60 100644 --- a/src/sage/quivers/algebra_elements.pxi +++ b/src/sage/quivers/algebra_elements.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Boilerplate functions for a cython implementation of elements of path algebras diff --git a/src/sage/quivers/algebra_elements.pyx b/src/sage/quivers/algebra_elements.pyx index 8e1cbd0b8c6..3d05ba7e270 100644 --- a/src/sage/quivers/algebra_elements.pyx +++ b/src/sage/quivers/algebra_elements.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Path algebra elements diff --git a/src/sage/quivers/all.py b/src/sage/quivers/all.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/quivers/all.py +++ b/src/sage/quivers/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/quivers/homspace.py b/src/sage/quivers/homspace.py index 36e3eea2eca..414eafa5a89 100644 --- a/src/sage/quivers/homspace.py +++ b/src/sage/quivers/homspace.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Quiver Homspace """ diff --git a/src/sage/quivers/morphism.py b/src/sage/quivers/morphism.py index 4a67151a580..b2f3d33e0df 100644 --- a/src/sage/quivers/morphism.py +++ b/src/sage/quivers/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Quiver Morphisms """ diff --git a/src/sage/quivers/path_semigroup.py b/src/sage/quivers/path_semigroup.py index 6b42236d314..42ff7b0698e 100644 --- a/src/sage/quivers/path_semigroup.py +++ b/src/sage/quivers/path_semigroup.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- encoding: utf-8 -*- """ Path Semigroups """ diff --git a/src/sage/quivers/paths.pxd b/src/sage/quivers/paths.pxd index 26e5ad3ccf5..5757bf6e219 100644 --- a/src/sage/quivers/paths.pxd +++ b/src/sage/quivers/paths.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.structure.element cimport MonoidElement, Element from sage.data_structures.bounded_integer_sequences cimport biseq_t diff --git a/src/sage/quivers/paths.pyx b/src/sage/quivers/paths.pyx index 984d792621d..aead99670ab 100644 --- a/src/sage/quivers/paths.pyx +++ b/src/sage/quivers/paths.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Quiver Paths """ diff --git a/src/sage/quivers/representation.py b/src/sage/quivers/representation.py index 6e85af5af76..4d8b3cf7321 100644 --- a/src/sage/quivers/representation.py +++ b/src/sage/quivers/representation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Quiver Representations diff --git a/src/sage/repl/__init__.py b/src/sage/repl/__init__.py index dfa0bd2e536..1357b584ef3 100644 --- a/src/sage/repl/__init__.py +++ b/src/sage/repl/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # IPython calls this when "%load_ext sage.repl" is used. # The Sage application loads it when starting up. def load_ipython_extension(*args): diff --git a/src/sage/repl/all.py b/src/sage/repl/all.py index bf4b65b10fe..96fd6de5f6d 100644 --- a/src/sage/repl/all.py +++ b/src/sage/repl/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl from sage.misc.lazy_import import lazy_import from sage.repl.preparse import preparse, implicit_multiplication @@ -6,10 +5,9 @@ lazy_import('sage.repl.interpreter', 'preparser') lazy_import('sage.repl.attach', [ - 'attach', 'detach', 'attached_files', 'load_attach_path', - 'reset_load_attach_path', 'load_attach_mode']) + 'attach', 'detach', 'attached_files', 'load_attach_path', + 'reset_load_attach_path', 'load_attach_mode']) from sage.repl.rich_output.display_manager import get_display_manager from sage.repl.rich_output.pretty_print import pretty_print, show -del lazy_import diff --git a/src/sage/repl/attach.py b/src/sage/repl/attach.py index 52f3f12fa62..689759d50a8 100644 --- a/src/sage/repl/attach.py +++ b/src/sage/repl/attach.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Keep track of attached files diff --git a/src/sage/repl/configuration.py b/src/sage/repl/configuration.py index ad0870cca2e..90df44bdf81 100644 --- a/src/sage/repl/configuration.py +++ b/src/sage/repl/configuration.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Sage's IPython Configuration diff --git a/src/sage/repl/display/__init__.py b/src/sage/repl/display/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/repl/display/__init__.py +++ b/src/sage/repl/display/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/repl/display/fancy_repr.py b/src/sage/repl/display/fancy_repr.py index c2e88af33f0..1cfaf94c45f 100644 --- a/src/sage/repl/display/fancy_repr.py +++ b/src/sage/repl/display/fancy_repr.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- """ Representations of objects """ diff --git a/src/sage/repl/display/formatter.py b/src/sage/repl/display/formatter.py index 9d6eaf53894..822a9edfaba 100644 --- a/src/sage/repl/display/formatter.py +++ b/src/sage/repl/display/formatter.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- r""" IPython Displayhook Formatters diff --git a/src/sage/repl/display/jsmol_iframe.py b/src/sage/repl/display/jsmol_iframe.py index 1d1c9c8fb55..f8e69cfcb59 100644 --- a/src/sage/repl/display/jsmol_iframe.py +++ b/src/sage/repl/display/jsmol_iframe.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ HTML Generator for JSmol diff --git a/src/sage/repl/display/pretty_print.py b/src/sage/repl/display/pretty_print.py index 99bbe5013d0..95a5f86a520 100644 --- a/src/sage/repl/display/pretty_print.py +++ b/src/sage/repl/display/pretty_print.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- """ The Sage pretty printer diff --git a/src/sage/repl/display/util.py b/src/sage/repl/display/util.py index 8fcc6569a3a..a2033c69f4f 100644 --- a/src/sage/repl/display/util.py +++ b/src/sage/repl/display/util.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- """ Utility functions for pretty-printing diff --git a/src/sage/repl/image.py b/src/sage/repl/image.py index 500e60d97b0..c9b2001b016 100644 --- a/src/sage/repl/image.py +++ b/src/sage/repl/image.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- """ Sage Wrapper for Bitmap Images diff --git a/src/sage/repl/inputhook.py b/src/sage/repl/inputhook.py index 99fb4a0c871..8d79110ebbf 100644 --- a/src/sage/repl/inputhook.py +++ b/src/sage/repl/inputhook.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ The Sage Input Hook diff --git a/src/sage/repl/interface_magic.py b/src/sage/repl/interface_magic.py index b60355f5cae..b77bc09e972 100644 --- a/src/sage/repl/interface_magic.py +++ b/src/sage/repl/interface_magic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Magics for each of the Sage interfaces diff --git a/src/sage/repl/interpreter.py b/src/sage/repl/interpreter.py index 84af28f8cf7..abd2c4fcad1 100644 --- a/src/sage/repl/interpreter.py +++ b/src/sage/repl/interpreter.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Sage's IPython Modifications diff --git a/src/sage/repl/ipython_extension.py b/src/sage/repl/ipython_extension.py index a7fccf9aa99..f9b165847d8 100644 --- a/src/sage/repl/ipython_extension.py +++ b/src/sage/repl/ipython_extension.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Sage's IPython Extension diff --git a/src/sage/repl/ipython_kernel/__init__.py b/src/sage/repl/ipython_kernel/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/repl/ipython_kernel/__init__.py +++ b/src/sage/repl/ipython_kernel/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/repl/ipython_kernel/__main__.py b/src/sage/repl/ipython_kernel/__main__.py index 8f575facf67..a1657263bee 100644 --- a/src/sage/repl/ipython_kernel/__main__.py +++ b/src/sage/repl/ipython_kernel/__main__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl from ipykernel.kernelapp import IPKernelApp from sage.repl.ipython_kernel.kernel import SageKernel IPKernelApp.launch_instance(kernel_class=SageKernel) diff --git a/src/sage/repl/ipython_kernel/all_jupyter.py b/src/sage/repl/ipython_kernel/all_jupyter.py index 2d2677da27d..37899e1c080 100644 --- a/src/sage/repl/ipython_kernel/all_jupyter.py +++ b/src/sage/repl/ipython_kernel/all_jupyter.py @@ -1,10 +1,9 @@ -# sage_setup: distribution = sagemath-repl """ All imports for Jupyter """ from sage.all_cmdline import * -from sage.repl.ipython_kernel.widgets_sagenb import (input_box, text_control, slider, - range_slider, checkbox, selector, input_grid, color_selector) -from sage.repl.ipython_kernel.interact import interact +from .widgets_sagenb import (input_box, text_control, slider, + range_slider, checkbox, selector, input_grid, color_selector) +from .interact import interact diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py index d4feb9e06a3..9b5ab3486c7 100644 --- a/src/sage/repl/ipython_kernel/install.py +++ b/src/sage/repl/ipython_kernel/install.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Installing the SageMath Jupyter Kernel and Extensions diff --git a/src/sage/repl/ipython_kernel/interact.py b/src/sage/repl/ipython_kernel/interact.py index f62cf420fc1..c9c3d627657 100644 --- a/src/sage/repl/ipython_kernel/interact.py +++ b/src/sage/repl/ipython_kernel/interact.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- r""" Interacts for the Sage Jupyter notebook diff --git a/src/sage/repl/ipython_kernel/kernel.py b/src/sage/repl/ipython_kernel/kernel.py index 1de9df5ee44..5398270160e 100644 --- a/src/sage/repl/ipython_kernel/kernel.py +++ b/src/sage/repl/ipython_kernel/kernel.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- """ The Sage ZMQ Kernel diff --git a/src/sage/repl/ipython_kernel/widgets.py b/src/sage/repl/ipython_kernel/widgets.py index 93498c7e09a..14c879373a5 100644 --- a/src/sage/repl/ipython_kernel/widgets.py +++ b/src/sage/repl/ipython_kernel/widgets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Widgets to be used for the Sage Jupyter notebook diff --git a/src/sage/repl/ipython_kernel/widgets_sagenb.py b/src/sage/repl/ipython_kernel/widgets_sagenb.py index 4d3b1dbdedc..cedf713248a 100644 --- a/src/sage/repl/ipython_kernel/widgets_sagenb.py +++ b/src/sage/repl/ipython_kernel/widgets_sagenb.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- r""" Functions to construct widgets, based on the old SageNB interface. diff --git a/src/sage/repl/ipython_tests.py b/src/sage/repl/ipython_tests.py index 5070fc4fb35..74a76c84d68 100644 --- a/src/sage/repl/ipython_tests.py +++ b/src/sage/repl/ipython_tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl ''' Tests for the IPython integration diff --git a/src/sage/repl/load.py b/src/sage/repl/load.py index ea452873682..b0f4a269242 100644 --- a/src/sage/repl/load.py +++ b/src/sage/repl/load.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Load Python, Sage, Cython, Fortran and Magma files in Sage """ diff --git a/src/sage/repl/preparse.py b/src/sage/repl/preparse.py index e72d6d013fe..9eadcca6fb7 100644 --- a/src/sage/repl/preparse.py +++ b/src/sage/repl/preparse.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- """ The Sage Preparser diff --git a/src/sage/repl/prompts.py b/src/sage/repl/prompts.py index 5b1c66bb6f2..4bc2cae68e6 100644 --- a/src/sage/repl/prompts.py +++ b/src/sage/repl/prompts.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Sage Commandline Prompts """ diff --git a/src/sage/repl/rich_output/__init__.py b/src/sage/repl/rich_output/__init__.py index 558cd47d827..49e8325ba21 100644 --- a/src/sage/repl/rich_output/__init__.py +++ b/src/sage/repl/rich_output/__init__.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- from .display_manager import get_display_manager from .pretty_print import pretty_print diff --git a/src/sage/repl/rich_output/backend_base.py b/src/sage/repl/rich_output/backend_base.py index 98da01836cc..40019397733 100644 --- a/src/sage/repl/rich_output/backend_base.py +++ b/src/sage/repl/rich_output/backend_base.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Base Class for Backends diff --git a/src/sage/repl/rich_output/backend_doctest.py b/src/sage/repl/rich_output/backend_doctest.py index 430579f3f19..69905f7b067 100644 --- a/src/sage/repl/rich_output/backend_doctest.py +++ b/src/sage/repl/rich_output/backend_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- """ The backend used for doctests diff --git a/src/sage/repl/rich_output/backend_emacs.py b/src/sage/repl/rich_output/backend_emacs.py index 52e098720c4..112650270dd 100644 --- a/src/sage/repl/rich_output/backend_emacs.py +++ b/src/sage/repl/rich_output/backend_emacs.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Emacs sage-mode Backend for the Sage Rich Output System diff --git a/src/sage/repl/rich_output/backend_ipython.py b/src/sage/repl/rich_output/backend_ipython.py index 1fe536762d1..7f39e37bf8f 100644 --- a/src/sage/repl/rich_output/backend_ipython.py +++ b/src/sage/repl/rich_output/backend_ipython.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- coding: utf-8 -*- """ IPython Backend for the Sage Rich Output System diff --git a/src/sage/repl/rich_output/buffer.py b/src/sage/repl/rich_output/buffer.py index 19681fd1dc9..10b861e846e 100644 --- a/src/sage/repl/rich_output/buffer.py +++ b/src/sage/repl/rich_output/buffer.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Output Buffer diff --git a/src/sage/repl/rich_output/display_manager.py b/src/sage/repl/rich_output/display_manager.py index 1a3bb46ee1d..cfece92a810 100644 --- a/src/sage/repl/rich_output/display_manager.py +++ b/src/sage/repl/rich_output/display_manager.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Display Manager diff --git a/src/sage/repl/rich_output/output_basic.py b/src/sage/repl/rich_output/output_basic.py index ea538ca5c96..03f267896e6 100644 --- a/src/sage/repl/rich_output/output_basic.py +++ b/src/sage/repl/rich_output/output_basic.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Basic Output Types diff --git a/src/sage/repl/rich_output/output_browser.py b/src/sage/repl/rich_output/output_browser.py index 00072c96030..3d7cda599a1 100644 --- a/src/sage/repl/rich_output/output_browser.py +++ b/src/sage/repl/rich_output/output_browser.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Rich Output for the Browser """ diff --git a/src/sage/repl/rich_output/output_catalog.py b/src/sage/repl/rich_output/output_catalog.py index 542182eee69..748941c11fc 100644 --- a/src/sage/repl/rich_output/output_catalog.py +++ b/src/sage/repl/rich_output/output_catalog.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Catalog of all available output container types. diff --git a/src/sage/repl/rich_output/output_graphics.py b/src/sage/repl/rich_output/output_graphics.py index d8c29c553a7..010ffcb60c8 100644 --- a/src/sage/repl/rich_output/output_graphics.py +++ b/src/sage/repl/rich_output/output_graphics.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Graphics Output Types diff --git a/src/sage/repl/rich_output/output_graphics3d.py b/src/sage/repl/rich_output/output_graphics3d.py index 3cf42fafb4a..46ff6d67ad1 100644 --- a/src/sage/repl/rich_output/output_graphics3d.py +++ b/src/sage/repl/rich_output/output_graphics3d.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Three-Dimensional Graphics Output Types diff --git a/src/sage/repl/rich_output/output_video.py b/src/sage/repl/rich_output/output_video.py index 5171ac058ae..3a0d718aaab 100644 --- a/src/sage/repl/rich_output/output_video.py +++ b/src/sage/repl/rich_output/output_video.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Video Output Types diff --git a/src/sage/repl/rich_output/preferences.py b/src/sage/repl/rich_output/preferences.py index ca32aa1ea81..f26962dc29b 100644 --- a/src/sage/repl/rich_output/preferences.py +++ b/src/sage/repl/rich_output/preferences.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Display Preferences diff --git a/src/sage/repl/rich_output/pretty_print.py b/src/sage/repl/rich_output/pretty_print.py index 00b0c75465d..65d72068588 100644 --- a/src/sage/repl/rich_output/pretty_print.py +++ b/src/sage/repl/rich_output/pretty_print.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" The ``pretty_print`` command diff --git a/src/sage/repl/rich_output/test_backend.py b/src/sage/repl/rich_output/test_backend.py index a08d75624e1..f0750addb39 100644 --- a/src/sage/repl/rich_output/test_backend.py +++ b/src/sage/repl/rich_output/test_backend.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +# -*- encoding: utf-8 -*- r""" Test Backend diff --git a/src/sage/repl/user_globals.py b/src/sage/repl/user_globals.py index d39b1dd9aad..75686da1a55 100644 --- a/src/sage/repl/user_globals.py +++ b/src/sage/repl/user_globals.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.modules r""" User-interface globals diff --git a/src/sage/rings/abc.pxd b/src/sage/rings/abc.pxd index 991773f0359..a2d2e3f0ce4 100644 --- a/src/sage/rings/abc.pxd +++ b/src/sage/rings/abc.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.ring cimport CommutativeRing, Field cdef class RealField(Field): diff --git a/src/sage/rings/abc.pyx b/src/sage/rings/abc.pyx index cfbb74465a2..e8078f97743 100644 --- a/src/sage/rings/abc.pyx +++ b/src/sage/rings/abc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Abstract base classes for rings """ diff --git a/src/sage/rings/algebraic_closure_finite_field.py b/src/sage/rings/algebraic_closure_finite_field.py index 7920e04cba7..9e97df6517d 100644 --- a/src/sage/rings/algebraic_closure_finite_field.py +++ b/src/sage/rings/algebraic_closure_finite_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings r""" Algebraic closures of finite fields diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index 965f83d02f6..e3c7167fe12 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -14,22 +14,35 @@ from sage.rings.all__sagemath_categories import * -# Following will go to all__sagemath_categories.py in #36566 +# Ring base classes +from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, + PrincipalIdealDomain) + +lazy_import("sage.rings.ring", "DedekindDomain") + +# Ring element base classes +from sage.structure.element import (CommutativeAlgebraElement, + RingElement, CommutativeRingElement, IntegralDomainElement, + DedekindDomainElement, PrincipalIdealDomainElement, + EuclideanDomainElement, FieldElement) + +# Ideals +from sage.rings.ideal import Ideal +ideal = Ideal # Quotient from sage.rings.quotient_ring import QuotientRing # Infinities from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing -oo = infinity # Rational integers. from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis from sage.rings.integer import Integer # Rational numbers -from sage.rings.rational import Rational from sage.rings.rational_field import RationalField, QQ +from sage.rings.rational import Rational Rationals = RationalField # Integers modulo n. @@ -37,41 +50,70 @@ from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod Integers = IntegerModRing -# up to here (#36566) - # Finite fields from sage.rings.finite_rings.all import * -from sage.rings.all__sagemath_combinat import * -from sage.rings.all__sagemath_flint import * -from sage.rings.all__sagemath_gap import * -from sage.rings.all__sagemath_modules import * - -try: - from sage.rings.all__sagemath_symbolics import * -except ImportError: - pass +# Number field +from sage.rings.number_field.all import * # Function field from sage.rings.function_field.all import * -# Following will go to all__sagemath_categories.py in #36566 +# Finite residue fields +from sage.rings.finite_rings.residue_field import ResidueField + +# p-adic field +from sage.rings.padics.all import * +from sage.rings.padics.padic_printing import _printer_defaults as padic_printing + +# valuations +from sage.rings.valuation.all import * # Semirings from sage.rings.semirings.all import * -# Double precision floating point numbers +# Real numbers +from sage.rings.real_mpfr import (RealField, RR, + create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. +Reals = RealField + from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement -# Lazy reals from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF -# up to here (#36566) +from sage.rings.real_arb import RealBallField, RBF # Polynomial Rings and Polynomial Quotient Rings from sage.rings.polynomial.all import * -# Following will go to all__sagemath_categories.py in #36566 + +# Algebraic numbers +from sage.rings.qqbar import (AlgebraicRealField, AA, + AlgebraicReal, + AlgebraicField, QQbar, + AlgebraicNumber, + number_field_elements_from_algebraics) +from sage.rings.universal_cyclotomic_field import UniversalCyclotomicField, E + +# Intervals +from sage.rings.real_mpfi import (RealIntervalField, + RIF, + RealInterval) + +# Complex numbers +from sage.rings.complex_mpfr import ComplexField +from sage.rings.complex_mpfr import create_ComplexNumber as ComplexNumber +Complexes = ComplexField +from sage.rings.complex_interval_field import ComplexIntervalField +from sage.rings.complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) + +from sage.rings.complex_double import ComplexDoubleField, ComplexDoubleElement, CDF + +from sage.rings.complex_mpc import MPComplexField + +from sage.rings.complex_arb import ComplexBallField, CBF + +lazy_import("sage.rings.imaginary_unit", "I") # Power series rings from sage.rings.power_series_ring import PowerSeriesRing @@ -79,9 +121,19 @@ # Laurent series ring in one variable from sage.rings.laurent_series_ring import LaurentSeriesRing +# Lazy Laurent series ring +lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', + 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) + +# Tate algebras +from sage.rings.tate_algebra import TateAlgebra + # Puiseux series ring from sage.rings.puiseux_series_ring import PuiseuxSeriesRing +# Pseudo-ring of PARI objects. +from sage.rings.pari_ring import PariRing, Pari + # Big-oh notation from sage.rings.big_oh import O @@ -92,27 +144,27 @@ # Localization from sage.rings.localization import Localization -# up to here (#36566) - # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences -from sage.rings.fast_arith import prime_range +from sage.rings.bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single + +from sage.rings.monomials import monomials + +from sage.rings.cc import CC +from sage.rings.cif import CIF -# Following will go to all__sagemath_categories.py in #36566 +# invariant theory +from sage.rings.invariants.all import * + +from sage.rings.fast_arith import prime_range # continued fractions from sage.rings.continued_fraction import (continued_fraction, continued_fraction_list) -# up to here (#36566) - # asymptotic ring -# from sage.rings.asymptotic.all import * -lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') -lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', - 'asymptotic_expansions') +from sage.rings.asymptotic.all import * # Register classes in numbers abc from sage.rings import numbers_abc -del lazy_import diff --git a/src/sage/rings/all__sagemath_brial.py b/src/sage/rings/all__sagemath_brial.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 99a78aac8df..d03d1c6b483 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,29 +1,6 @@ -# sage_setup: distribution = sagemath-categories - -from sage.misc.lazy_import import lazy_import - # Ring base classes -from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, - PrincipalIdealDomain) - -lazy_import("sage.rings.ring", "DedekindDomain") - -# Ring element base classes -from sage.structure.element import (CommutativeAlgebraElement, - RingElement, CommutativeRingElement, IntegralDomainElement, - DedekindDomainElement, PrincipalIdealDomainElement, - EuclideanDomainElement, FieldElement) - +from sage.rings.ring import Ring # Ideals from sage.rings.ideal import Ideal -ideal = Ideal - -# To be added in #36566: -# from sage.rings.finite_rings.all__sagemath_categories import * -# from sage.rings.function_field.all__sagemath_categories import * -# from sage.rings.number_field.all__sagemath_categories import * -# from sage.rings.padics.all__sagemath_categories import * -# from sage.rings.polynomial.all__sagemath_categories import * - -del lazy_import +ideal = Ideal diff --git a/src/sage/rings/all__sagemath_combinat.py b/src/sage/rings/all__sagemath_combinat.py deleted file mode 100644 index 3e054b1da0b..00000000000 --- a/src/sage/rings/all__sagemath_combinat.py +++ /dev/null @@ -1,9 +0,0 @@ -from sage.rings.all__sagemath_categories import * - -from sage.misc.lazy_import import lazy_import - -# Lazy Laurent series ring -lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', - 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) - -del lazy_import diff --git a/src/sage/rings/all__sagemath_flint.py b/src/sage/rings/all__sagemath_flint.py deleted file mode 100644 index 098426b0e9b..00000000000 --- a/src/sage/rings/all__sagemath_flint.py +++ /dev/null @@ -1,36 +0,0 @@ - -from sage.rings.all__sagemath_ntl import * - -# Real numbers -from sage.rings.real_arb import RealBallField, RBF - -from sage.rings.complex_arb import ComplexBallField, CBF - -# Number field -from sage.rings.number_field.all import * - -from sage.rings.monomials import monomials - -# Algebraic numbers -from sage.rings.qqbar import (AlgebraicRealField, AA, - AlgebraicReal, - AlgebraicField, QQbar, - AlgebraicNumber, - number_field_elements_from_algebraics) - -# Intervals -from sage.rings.real_mpfi import (RealIntervalField, - RIF, - RealInterval) - -# Complex numbers -from sage.rings.complex_interval_field import ComplexIntervalField -from sage.rings.complex_interval import ( - create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) - -from sage.misc.lazy_import import lazy_import - -lazy_import("sage.rings.imaginary_unit", "I") - -from sage.rings.cif import CIF -del lazy_import diff --git a/src/sage/rings/all__sagemath_gap.py b/src/sage/rings/all__sagemath_gap.py deleted file mode 100644 index 82933d8cb54..00000000000 --- a/src/sage/rings/all__sagemath_gap.py +++ /dev/null @@ -1,6 +0,0 @@ - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.rings.universal_cyclotomic_field', ['UniversalCyclotomicField', 'E']) - -del lazy_import diff --git a/src/sage/rings/all__sagemath_linbox.py b/src/sage/rings/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/all__sagemath_modules.py b/src/sage/rings/all__sagemath_modules.py deleted file mode 100644 index c82909b5984..00000000000 --- a/src/sage/rings/all__sagemath_modules.py +++ /dev/null @@ -1,24 +0,0 @@ -from sage.rings.all__sagemath_categories import * - -from sage.rings.function_field.all__sagemath_modules import * -from sage.rings.polynomial.all__sagemath_modules import * - -# Real numbers -from sage.rings.real_mpfr import (RealField, RR, - create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. -Reals = RealField - -# Complex numbers - -from sage.rings.complex_mpfr import ComplexField -from sage.rings.complex_mpfr import create_ComplexNumber as ComplexNumber -Complexes = ComplexField - -from sage.rings.complex_double import ComplexDoubleField, ComplexDoubleElement, CDF - -from sage.rings.cc import CC - -from sage.rings.complex_mpc import MPComplexField - -# invariant theory -from sage.rings.invariants.all import * diff --git a/src/sage/rings/all__sagemath_ntl.py b/src/sage/rings/all__sagemath_ntl.py deleted file mode 100644 index c64b779350c..00000000000 --- a/src/sage/rings/all__sagemath_ntl.py +++ /dev/null @@ -1,6 +0,0 @@ - -from sage.rings.all__sagemath_pari import * - -from sage.rings.padics.all__sagemath_ntl import * - -from sage.rings.bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single diff --git a/src/sage/rings/all__sagemath_objects.py b/src/sage/rings/all__sagemath_objects.py index 40da49fdd73..38e44245ad3 100644 --- a/src/sage/rings/all__sagemath_objects.py +++ b/src/sage/rings/all__sagemath_objects.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package diff --git a/src/sage/rings/all__sagemath_pari.py b/src/sage/rings/all__sagemath_pari.py deleted file mode 100644 index 73f3230790e..00000000000 --- a/src/sage/rings/all__sagemath_pari.py +++ /dev/null @@ -1,12 +0,0 @@ - -# Pseudo-ring of PARI objects. -from sage.rings.pari_ring import PariRing, Pari - -# p-adic field -from sage.rings.padics.all__sagemath_pari import * - -# valuations -from sage.rings.valuation.all import * - -# Tate algebras -from sage.rings.tate_algebra import TateAlgebra diff --git a/src/sage/rings/all__sagemath_singular.py b/src/sage/rings/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/all__sagemath_symbolics.py b/src/sage/rings/all__sagemath_symbolics.py deleted file mode 100644 index be07e478a77..00000000000 --- a/src/sage/rings/all__sagemath_symbolics.py +++ /dev/null @@ -1 +0,0 @@ -from sage.rings.all__sagemath_modules import * diff --git a/src/sage/rings/asymptotic/all.py b/src/sage/rings/asymptotic/all.py index 27e4d289212..9353f267624 100644 --- a/src/sage/rings/asymptotic/all.py +++ b/src/sage/rings/asymptotic/all.py @@ -1,5 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') -lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', - 'asymptotic_expansions') -del lazy_import +lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', 'asymptotic_expansions') diff --git a/src/sage/rings/bernmm.pyx b/src/sage/rings/bernmm.pyx index d46c53e65f5..8c6539150a7 100644 --- a/src/sage/rings/bernmm.pyx +++ b/src/sage/rings/bernmm.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: sources = sage/rings/bernmm/bern_modp.cpp sage/rings/bernmm/bern_modp_util.cpp sage/rings/bernmm/bern_rat.cpp # distutils: libraries = NTL_LIBRARIES pthread gmp # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/rings/bernoulli_mod_p.pyx b/src/sage/rings/bernoulli_mod_p.pyx index a9dee686d40..ee73d6ad209 100644 --- a/src/sage/rings/bernoulli_mod_p.pyx +++ b/src/sage/rings/bernoulli_mod_p.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/big_oh.py b/src/sage/rings/big_oh.py index eafb46c83aa..917c81e0a3d 100644 --- a/src/sage/rings/big_oh.py +++ b/src/sage/rings/big_oh.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Big O for various types (power series, p-adics, etc.) diff --git a/src/sage/rings/cc.py b/src/sage/rings/cc.py index 93ec91d77a2..94e3093488b 100644 --- a/src/sage/rings/cc.py +++ b/src/sage/rings/cc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.complex_mpfr import ComplexField CC = ComplexField() diff --git a/src/sage/rings/cif.py b/src/sage/rings/cif.py index 98c15bd3d45..900c635e87b 100644 --- a/src/sage/rings/cif.py +++ b/src/sage/rings/cif.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.rings.complex_interval_field import ComplexIntervalField CIF = ComplexIntervalField() diff --git a/src/sage/rings/complex_arb.pxd b/src/sage/rings/complex_arb.pxd index 32339dd18a2..4cd016d0798 100644 --- a/src/sage/rings/complex_arb.pxd +++ b/src/sage/rings/complex_arb.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - from sage.libs.flint.acb cimport acb_t from sage.rings.complex_interval cimport ComplexIntervalFieldElement from sage.rings.real_arb cimport RealBall diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx index 5ad31f6a4f0..cb4ee0ff6b8 100644 --- a/src/sage/rings/complex_arb.pyx +++ b/src/sage/rings/complex_arb.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- coding: utf-8 r""" Arbitrary precision complex balls diff --git a/src/sage/rings/complex_conversion.pxd b/src/sage/rings/complex_conversion.pxd index da870969874..2053005e340 100644 --- a/src/sage/rings/complex_conversion.pxd +++ b/src/sage/rings/complex_conversion.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport Element from sage.categories.map cimport Map diff --git a/src/sage/rings/complex_conversion.pyx b/src/sage/rings/complex_conversion.pyx index 31afe86b5cd..f601b4d5420 100644 --- a/src/sage/rings/complex_conversion.pyx +++ b/src/sage/rings/complex_conversion.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.complex_double cimport ComplexDoubleElement from sage.rings.complex_mpfr cimport ComplexNumber from sage.libs.mpfr cimport mpfr_get_d, MPFR_RNDN diff --git a/src/sage/rings/complex_double.pxd b/src/sage/rings/complex_double.pxd index 4d43ae2b58f..7352520c769 100644 --- a/src/sage/rings/complex_double.pxd +++ b/src/sage/rings/complex_double.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.gsl.types cimport gsl_complex cimport sage.structure.element diff --git a/src/sage/rings/complex_double.pyx b/src/sage/rings/complex_double.pyx index 68cc6664478..1dfa7dbd505 100644 --- a/src/sage/rings/complex_double.pyx +++ b/src/sage/rings/complex_double.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # distutils: extra_compile_args = -D_XPG6 # distutils: libraries = m r""" diff --git a/src/sage/rings/complex_interval.pxd b/src/sage/rings/complex_interval.pxd index 2620dc480f5..f5c59de4d7a 100644 --- a/src/sage/rings/complex_interval.pxd +++ b/src/sage/rings/complex_interval.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.mpfr.types cimport mpfr_prec_t from sage.libs.mpfi.types cimport mpfi_t diff --git a/src/sage/rings/complex_interval.pyx b/src/sage/rings/complex_interval.pyx index 66a28104de4..d272a8e81db 100644 --- a/src/sage/rings/complex_interval.pyx +++ b/src/sage/rings/complex_interval.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Arbitrary precision complex intervals diff --git a/src/sage/rings/complex_interval_field.py b/src/sage/rings/complex_interval_field.py index fccb7d7b1c1..372d84abca8 100644 --- a/src/sage/rings/complex_interval_field.py +++ b/src/sage/rings/complex_interval_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Arbitrary precision complex intervals (parent class) diff --git a/src/sage/rings/complex_mpc.pxd b/src/sage/rings/complex_mpc.pxd index 37c0ee9939a..1c65618578b 100644 --- a/src/sage/rings/complex_mpc.pxd +++ b/src/sage/rings/complex_mpc.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.mpc.types cimport mpc_t, mpc_rnd_t cimport sage.structure.element diff --git a/src/sage/rings/complex_mpc.pyx b/src/sage/rings/complex_mpc.pyx index ba8b8272daf..79501000200 100644 --- a/src/sage/rings/complex_mpc.pyx +++ b/src/sage/rings/complex_mpc.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Arbitrary precision floating point complex numbers using GNU MPC diff --git a/src/sage/rings/complex_mpfr.pxd b/src/sage/rings/complex_mpfr.pxd index a676d407d40..385feec8c37 100644 --- a/src/sage/rings/complex_mpfr.pxd +++ b/src/sage/rings/complex_mpfr.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.mpfr.types cimport mpfr_t, mpfr_prec_t cimport sage.structure.element diff --git a/src/sage/rings/complex_mpfr.pyx b/src/sage/rings/complex_mpfr.pyx index 3bba71be085..616a25241b0 100644 --- a/src/sage/rings/complex_mpfr.pyx +++ b/src/sage/rings/complex_mpfr.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Arbitrary precision floating point complex numbers using GNU MPFR diff --git a/src/sage/rings/continued_fraction.py b/src/sage/rings/continued_fraction.py index 5c92420d7d8..13138a999ac 100644 --- a/src/sage/rings/continued_fraction.py +++ b/src/sage/rings/continued_fraction.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Continued fractions diff --git a/src/sage/rings/continued_fraction_gosper.py b/src/sage/rings/continued_fraction_gosper.py index c4ea81b0f8e..5c713ab41c7 100644 --- a/src/sage/rings/continued_fraction_gosper.py +++ b/src/sage/rings/continued_fraction_gosper.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- encoding: utf-8 -*- """ Gosper iterator for homographic transformations diff --git a/src/sage/rings/convert/all.py b/src/sage/rings/convert/all.py index d31bae41036..e69de29bb2d 100644 --- a/src/sage/rings/convert/all.py +++ b/src/sage/rings/convert/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-flint diff --git a/src/sage/rings/convert/mpfi.pxd b/src/sage/rings/convert/mpfi.pxd index 4c29da9a896..ea43d9383f2 100644 --- a/src/sage/rings/convert/mpfi.pxd +++ b/src/sage/rings/convert/mpfi.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.mpfi.types cimport mpfi_ptr cdef int mpfi_set_sage(mpfi_ptr re, mpfi_ptr im, x, field, int base) except -1 diff --git a/src/sage/rings/convert/mpfi.pyx b/src/sage/rings/convert/mpfi.pyx index e7e54e54d58..0d42927740a 100644 --- a/src/sage/rings/convert/mpfi.pyx +++ b/src/sage/rings/convert/mpfi.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Convert Sage/Python objects to real/complex intervals """ diff --git a/src/sage/rings/derivation.py b/src/sage/rings/derivation.py index 70da2e3f16f..2702f497d66 100644 --- a/src/sage/rings/derivation.py +++ b/src/sage/rings/derivation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Derivations diff --git a/src/sage/rings/factorint.pyx b/src/sage/rings/factorint.pyx index c1a49b5f3d7..3571c74bd8d 100644 --- a/src/sage/rings/factorint.pyx +++ b/src/sage/rings/factorint.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*-* r""" Integer factorization functions diff --git a/src/sage/rings/factorint_flint.pyx b/src/sage/rings/factorint_flint.pyx index 23f110abeec..cc50af04a1c 100644 --- a/src/sage/rings/factorint_flint.pyx +++ b/src/sage/rings/factorint_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.libs.flint r""" Integer factorization using FLINT diff --git a/src/sage/rings/factorint_pari.pyx b/src/sage/rings/factorint_pari.pyx index 683813aefb6..8dae96b047f 100644 --- a/src/sage/rings/factorint_pari.pyx +++ b/src/sage/rings/factorint_pari.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.pari r""" Integer factorization using PARI diff --git a/src/sage/rings/fast_arith.pxd b/src/sage/rings/fast_arith.pxd index 52be135488e..7a99e658b91 100644 --- a/src/sage/rings/fast_arith.pxd +++ b/src/sage/rings/fast_arith.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-categories - cpdef prime_range(start, stop=*, algorithm=*, bint py_ints=*) cdef class arith_int: diff --git a/src/sage/rings/fast_arith.pyx b/src/sage/rings/fast_arith.pyx index 817aadf7e54..4796122c1b6 100644 --- a/src/sage/rings/fast_arith.pyx +++ b/src/sage/rings/fast_arith.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.pari """ Basic arithmetic with C integers diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index a3dbfe5764f..5d3d3f21c73 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -2,7 +2,7 @@ Finite Fields """ -# ***************************************************************************** +#***************************************************************************** # Copyright (C) 2010 David Roe # William Stein # @@ -15,7 +15,9 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.rings.finite_rings.all__sagemath_categories import * +from .finite_field_constructor import FiniteField +from .conway_polynomials import conway_polynomial, exists_conway_polynomial +GF = FiniteField diff --git a/src/sage/rings/finite_rings/all__sagemath_categories.py b/src/sage/rings/finite_rings/all__sagemath_categories.py deleted file mode 100644 index a2330a07fe4..00000000000 --- a/src/sage/rings/finite_rings/all__sagemath_categories.py +++ /dev/null @@ -1,8 +0,0 @@ -from sage.rings.finite_rings.finite_field_constructor import FiniteField - -GF = FiniteField - -from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial - -# Finite residue fields -from sage.rings.finite_rings.residue_field import ResidueField diff --git a/src/sage/rings/finite_rings/all__sagemath_linbox.py b/src/sage/rings/finite_rings/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/finite_rings/all__sagemath_modules.py b/src/sage/rings/finite_rings/all__sagemath_modules.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/finite_rings/all__sagemath_ntl.py b/src/sage/rings/finite_rings/all__sagemath_ntl.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/finite_rings/all__sagemath_pari.py b/src/sage/rings/finite_rings/all__sagemath_pari.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/finite_rings/conway_polynomials.py b/src/sage/rings/finite_rings/conway_polynomials.py index cb12034851b..7d6e558f030 100644 --- a/src/sage/rings/finite_rings/conway_polynomials.py +++ b/src/sage/rings/finite_rings/conway_polynomials.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Routines for Conway and pseudo-Conway polynomials diff --git a/src/sage/rings/finite_rings/element_base.pxd b/src/sage/rings/finite_rings/element_base.pxd index 55269abe48d..c214e4745a9 100644 --- a/src/sage/rings/finite_rings/element_base.pxd +++ b/src/sage/rings/finite_rings/element_base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport CommutativeRingElement from sage.structure.sage_object cimport SageObject diff --git a/src/sage/rings/finite_rings/element_base.pyx b/src/sage/rings/finite_rings/element_base.pyx index 2011d066c8b..f6a450edfa2 100755 --- a/src/sage/rings/finite_rings/element_base.pyx +++ b/src/sage/rings/finite_rings/element_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings """ Base class for finite field elements diff --git a/src/sage/rings/finite_rings/element_givaro.pxd b/src/sage/rings/finite_rings/element_givaro.pxd index 12b4f9ada34..4b1e0430a1c 100644 --- a/src/sage/rings/finite_rings/element_givaro.pxd +++ b/src/sage/rings/finite_rings/element_givaro.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: extra_compile_args = GIVARO_CFLAGS -std=c++11 # distutils: include_dirs = GIVARO_INCDIR diff --git a/src/sage/rings/finite_rings/element_givaro.pyx b/src/sage/rings/finite_rings/element_givaro.pyx index 6f60aa089dc..c9b9e323181 100644 --- a/src/sage/rings/finite_rings/element_givaro.pyx +++ b/src/sage/rings/finite_rings/element_givaro.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: libraries = givaro gmp m # distutils: language = c++ r""" diff --git a/src/sage/rings/finite_rings/element_ntl_gf2e.pxd b/src/sage/rings/finite_rings/element_ntl_gf2e.pxd index e2b1f2cdb1d..e98744413b5 100644 --- a/src/sage/rings/finite_rings/element_ntl_gf2e.pxd +++ b/src/sage/rings/finite_rings/element_ntl_gf2e.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport GF2E_c, GF2EContext_c from sage.rings.finite_rings.finite_field_base cimport FiniteField from sage.rings.finite_rings.element_base cimport FinitePolyExtElement, Cache_base diff --git a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx index 3b56b679e6c..399bb76815b 100644 --- a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx +++ b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pxd b/src/sage/rings/finite_rings/element_pari_ffelt.pxd index 9db2a6401e0..06aabcaa6d5 100644 --- a/src/sage/rings/finite_rings/element_pari_ffelt.pxd +++ b/src/sage/rings/finite_rings/element_pari_ffelt.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.types cimport GEN from sage.rings.finite_rings.element_base cimport FinitePolyExtElement diff --git a/src/sage/rings/finite_rings/element_pari_ffelt.pyx b/src/sage/rings/finite_rings/element_pari_ffelt.pyx index a7013a7f5b4..989b0e20b9e 100644 --- a/src/sage/rings/finite_rings/element_pari_ffelt.pyx +++ b/src/sage/rings/finite_rings/element_pari_ffelt.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Finite field elements implemented via PARI's FFELT type diff --git a/src/sage/rings/finite_rings/finite_field_base.pxd b/src/sage/rings/finite_rings/finite_field_base.pxd index 2b66bd916aa..776c1f40137 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pxd +++ b/src/sage/rings/finite_rings/finite_field_base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.ring cimport Field cdef class FiniteField(Field): diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index 1e512d01cf6..2c49f3bc9ae 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings """ Base class for finite fields diff --git a/src/sage/rings/finite_rings/finite_field_constructor.py b/src/sage/rings/finite_rings/finite_field_constructor.py index 1191a37c6fb..78acc0a8873 100644 --- a/src/sage/rings/finite_rings/finite_field_constructor.py +++ b/src/sage/rings/finite_rings/finite_field_constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings r""" Finite fields diff --git a/src/sage/rings/finite_rings/finite_field_givaro.py b/src/sage/rings/finite_rings/finite_field_givaro.py index 096459ddd41..9f6abdb40b4 100644 --- a/src/sage/rings/finite_rings/finite_field_givaro.py +++ b/src/sage/rings/finite_rings/finite_field_givaro.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox """ Givaro finite fields diff --git a/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py b/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py index 758c1cedf4b..654f7a2b54b 100644 --- a/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py +++ b/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl """ Finite fields of characteristic 2 """ diff --git a/src/sage/rings/finite_rings/finite_field_pari_ffelt.py b/src/sage/rings/finite_rings/finite_field_pari_ffelt.py index 9c6caca35ca..c60a7a563a7 100644 --- a/src/sage/rings/finite_rings/finite_field_pari_ffelt.py +++ b/src/sage/rings/finite_rings/finite_field_pari_ffelt.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Finite fields implemented via PARI's FFELT type diff --git a/src/sage/rings/finite_rings/finite_field_prime_modn.py b/src/sage/rings/finite_rings/finite_field_prime_modn.py index c95a1413bc9..b51cf9fe7d5 100644 --- a/src/sage/rings/finite_rings/finite_field_prime_modn.py +++ b/src/sage/rings/finite_rings/finite_field_prime_modn.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Finite prime fields diff --git a/src/sage/rings/finite_rings/galois_group.py b/src/sage/rings/finite_rings/galois_group.py index e817e2bad44..f11b72bc681 100644 --- a/src/sage/rings/finite_rings/galois_group.py +++ b/src/sage/rings/finite_rings/galois_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules sage.rings.finite_rings r""" Galois groups of Finite Fields diff --git a/src/sage/rings/finite_rings/hom_finite_field.pxd b/src/sage/rings/finite_rings/hom_finite_field.pxd index e1f348b3db4..199d655d6d6 100644 --- a/src/sage/rings/finite_rings/hom_finite_field.pxd +++ b/src/sage/rings/finite_rings/hom_finite_field.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.morphism cimport RingHomomorphism_im_gens, FrobeniusEndomorphism_generic from sage.structure.element cimport Element from sage.categories.map cimport Section diff --git a/src/sage/rings/finite_rings/hom_finite_field.pyx b/src/sage/rings/finite_rings/hom_finite_field.pyx index 46aac2d153e..8a83bf48766 100644 --- a/src/sage/rings/finite_rings/hom_finite_field.pyx +++ b/src/sage/rings/finite_rings/hom_finite_field.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings """ Finite field morphisms diff --git a/src/sage/rings/finite_rings/hom_finite_field_givaro.pxd b/src/sage/rings/finite_rings/hom_finite_field_givaro.pxd index f01918b0267..dc401d526c0 100644 --- a/src/sage/rings/finite_rings/hom_finite_field_givaro.pxd +++ b/src/sage/rings/finite_rings/hom_finite_field_givaro.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from sage.rings.finite_rings.hom_finite_field cimport (SectionFiniteFieldHomomorphism_generic, FiniteFieldHomomorphism_generic, FrobeniusEndomorphism_finite_field) diff --git a/src/sage/rings/finite_rings/hom_finite_field_givaro.pyx b/src/sage/rings/finite_rings/hom_finite_field_givaro.pyx index a110aaad137..0e67cb6f123 100644 --- a/src/sage/rings/finite_rings/hom_finite_field_givaro.pyx +++ b/src/sage/rings/finite_rings/hom_finite_field_givaro.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: libraries = givaro NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/finite_rings/hom_prime_finite_field.pxd b/src/sage/rings/finite_rings/hom_prime_finite_field.pxd index af571b31f84..b146b0c9169 100644 --- a/src/sage/rings/finite_rings/hom_prime_finite_field.pxd +++ b/src/sage/rings/finite_rings/hom_prime_finite_field.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.finite_rings.hom_finite_field cimport (SectionFiniteFieldHomomorphism_generic, FiniteFieldHomomorphism_generic, FrobeniusEndomorphism_finite_field) diff --git a/src/sage/rings/finite_rings/hom_prime_finite_field.pyx b/src/sage/rings/finite_rings/hom_prime_finite_field.pyx index 7f1f88e2521..e45de1d83f9 100644 --- a/src/sage/rings/finite_rings/hom_prime_finite_field.pyx +++ b/src/sage/rings/finite_rings/hom_prime_finite_field.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Finite field morphisms for prime fields diff --git a/src/sage/rings/finite_rings/homset.py b/src/sage/rings/finite_rings/homset.py index d0441d2c795..ef72f35a1a5 100644 --- a/src/sage/rings/finite_rings/homset.py +++ b/src/sage/rings/finite_rings/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.finite_rings """ Homset for finite fields diff --git a/src/sage/rings/finite_rings/integer_mod.pxd b/src/sage/rings/finite_rings/integer_mod.pxd index 80dd01e2072..34e72472a3e 100644 --- a/src/sage/rings/finite_rings/integer_mod.pxd +++ b/src/sage/rings/finite_rings/integer_mod.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.libs.gmp.types cimport * from sage.rings.finite_rings.stdint cimport * from sage.rings.finite_rings.element_base cimport FiniteRingElement diff --git a/src/sage/rings/finite_rings/integer_mod.pyx b/src/sage/rings/finite_rings/integer_mod.pyx index da6f6102581..9a3f02b6ef0 100644 --- a/src/sage/rings/finite_rings/integer_mod.pyx +++ b/src/sage/rings/finite_rings/integer_mod.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Elements of `\ZZ/n\ZZ` diff --git a/src/sage/rings/finite_rings/integer_mod_ring.py b/src/sage/rings/finite_rings/integer_mod_ring.py index 6b91f4ee58c..177dd28460a 100644 --- a/src/sage/rings/finite_rings/integer_mod_ring.py +++ b/src/sage/rings/finite_rings/integer_mod_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ring `\ZZ/n\ZZ` of integers modulo `n` diff --git a/src/sage/rings/finite_rings/maps_finite_field.py b/src/sage/rings/finite_rings/maps_finite_field.py index 55da94bbd5b..0ae08a3d25d 100644 --- a/src/sage/rings/finite_rings/maps_finite_field.py +++ b/src/sage/rings/finite_rings/maps_finite_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.finite_rings """ Structure maps for finite fields diff --git a/src/sage/rings/finite_rings/residue_field.pxd b/src/sage/rings/finite_rings/residue_field.pxd index dc221970bfe..0acb8da0a9a 100644 --- a/src/sage/rings/finite_rings/residue_field.pxd +++ b/src/sage/rings/finite_rings/residue_field.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.morphism cimport RingHomomorphism from sage.structure.element cimport Element from sage.rings.finite_rings.integer_mod cimport NativeIntStruct diff --git a/src/sage/rings/finite_rings/residue_field.pyx b/src/sage/rings/finite_rings/residue_field.pyx index 4f503a5195c..83d78abb2aa 100644 --- a/src/sage/rings/finite_rings/residue_field.pyx +++ b/src/sage/rings/finite_rings/residue_field.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Finite residue fields diff --git a/src/sage/rings/finite_rings/residue_field_givaro.pyx b/src/sage/rings/finite_rings/residue_field_givaro.pyx index 9d89dabb553..a00bc5138fd 100644 --- a/src/sage/rings/finite_rings/residue_field_givaro.pyx +++ b/src/sage/rings/finite_rings/residue_field_givaro.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox r""" Finite residue fields (Givaro implementation) """ diff --git a/src/sage/rings/finite_rings/residue_field_ntl_gf2e.pyx b/src/sage/rings/finite_rings/residue_field_ntl_gf2e.pyx index c396ad2e04b..5071bc87137 100644 --- a/src/sage/rings/finite_rings/residue_field_ntl_gf2e.pyx +++ b/src/sage/rings/finite_rings/residue_field_ntl_gf2e.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl r""" Finite residue fields (NTL implementation) """ diff --git a/src/sage/rings/finite_rings/residue_field_pari_ffelt.pyx b/src/sage/rings/finite_rings/residue_field_pari_ffelt.pyx index 1fcc1fad260..e9962c3ccde 100644 --- a/src/sage/rings/finite_rings/residue_field_pari_ffelt.pyx +++ b/src/sage/rings/finite_rings/residue_field_pari_ffelt.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Finite residue fields (PARI implementation) """ diff --git a/src/sage/rings/finite_rings/stdint.pxd b/src/sage/rings/finite_rings/stdint.pxd index f82d61698aa..b2b96a90c39 100644 --- a/src/sage/rings/finite_rings/stdint.pxd +++ b/src/sage/rings/finite_rings/stdint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ C Integer Types Used in Finite Rings """ diff --git a/src/sage/rings/fraction_field.py b/src/sage/rings/fraction_field.py index efabe4960bb..32c9aed0afd 100644 --- a/src/sage/rings/fraction_field.py +++ b/src/sage/rings/fraction_field.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Fraction Field of Integral Domains diff --git a/src/sage/rings/fraction_field_FpT.pxd b/src/sage/rings/fraction_field_FpT.pxd index 4718131e2f7..7d5d960a0ca 100644 --- a/src/sage/rings/fraction_field_FpT.pxd +++ b/src/sage/rings/fraction_field_FpT.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.flint.types cimport nmod_poly_t from sage.rings.morphism cimport RingHomomorphism diff --git a/src/sage/rings/fraction_field_FpT.pyx b/src/sage/rings/fraction_field_FpT.pyx index 6598a7fe256..14857c66732 100644 --- a/src/sage/rings/fraction_field_FpT.pyx +++ b/src/sage/rings/fraction_field_FpT.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = gmp NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/fraction_field_element.pyx b/src/sage/rings/fraction_field_element.pyx index 84358475fc5..ea323e2709f 100644 --- a/src/sage/rings/fraction_field_element.pyx +++ b/src/sage/rings/fraction_field_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Fraction Field Elements diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index e536f198d16..455fa9fe19e 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,13 +1,5 @@ -# sage_setup: distribution = sagemath-categories - -from sage.rings.function_field.all__sagemath_modules import * - -try: - from sage.rings.function_field.all__sagemath_symbolics import * -except ImportError: - pass +from .constructor import FunctionField from sage.misc.lazy_import import lazy_import lazy_import("sage.rings.function_field.drinfeld_modules.drinfeld_module", "DrinfeldModule") -del lazy_import diff --git a/src/sage/rings/function_field/all__sagemath_categories.py b/src/sage/rings/function_field/all__sagemath_categories.py deleted file mode 100644 index 1cc1f1b8b2f..00000000000 --- a/src/sage/rings/function_field/all__sagemath_categories.py +++ /dev/null @@ -1 +0,0 @@ -from sage.rings.function_field.constructor import FunctionField diff --git a/src/sage/rings/function_field/all__sagemath_modules.py b/src/sage/rings/function_field/all__sagemath_modules.py deleted file mode 100644 index f1bd876653e..00000000000 --- a/src/sage/rings/function_field/all__sagemath_modules.py +++ /dev/null @@ -1 +0,0 @@ -from sage.rings.function_field.all__sagemath_categories import * diff --git a/src/sage/rings/function_field/all__sagemath_pari.py b/src/sage/rings/function_field/all__sagemath_pari.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/function_field/all__sagemath_singular.py b/src/sage/rings/function_field/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/function_field/all__sagemath_symbolics.py b/src/sage/rings/function_field/all__sagemath_symbolics.py deleted file mode 100644 index 7c97e664309..00000000000 --- a/src/sage/rings/function_field/all__sagemath_symbolics.py +++ /dev/null @@ -1 +0,0 @@ -from sage.rings.function_field.all__sagemath_modules import * diff --git a/src/sage/rings/function_field/constructor.py b/src/sage/rings/function_field/constructor.py index 4136b72575e..6dff57348a7 100644 --- a/src/sage/rings/function_field/constructor.py +++ b/src/sage/rings/function_field/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Factories to construct function fields diff --git a/src/sage/rings/function_field/derivations.py b/src/sage/rings/function_field/derivations.py index d727fa60843..9a6f0f613a9 100644 --- a/src/sage/rings/function_field/derivations.py +++ b/src/sage/rings/function_field/derivations.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Derivations of function fields diff --git a/src/sage/rings/function_field/derivations_polymod.py b/src/sage/rings/function_field/derivations_polymod.py index ffaefac3d00..2e0fe91a968 100644 --- a/src/sage/rings/function_field/derivations_polymod.py +++ b/src/sage/rings/function_field/derivations_polymod.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular r""" Derivations of function fields: extension """ diff --git a/src/sage/rings/function_field/derivations_rational.py b/src/sage/rings/function_field/derivations_rational.py index d6358ee9582..777f16d3e08 100644 --- a/src/sage/rings/function_field/derivations_rational.py +++ b/src/sage/rings/function_field/derivations_rational.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Derivations of function fields: rational """ diff --git a/src/sage/rings/function_field/differential.py b/src/sage/rings/function_field/differential.py index 9e5ca35474c..9b6fec9a72d 100644 --- a/src/sage/rings/function_field/differential.py +++ b/src/sage/rings/function_field/differential.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.modules """ Differentials of function fields diff --git a/src/sage/rings/function_field/divisor.py b/src/sage/rings/function_field/divisor.py index 15da31b1804..79d952e2247 100644 --- a/src/sage/rings/function_field/divisor.py +++ b/src/sage/rings/function_field/divisor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - sage.rings.finite_rings (because all doctests use finite fields) # sage.doctest: optional - sage.rings.function_field (because almost all doctests use function field extensions) """ diff --git a/src/sage/rings/function_field/element.pxd b/src/sage/rings/function_field/element.pxd index 79f46a7ccc5..09ac9221e76 100644 --- a/src/sage/rings/function_field/element.pxd +++ b/src/sage/rings/function_field/element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport FieldElement diff --git a/src/sage/rings/function_field/element.pyx b/src/sage/rings/function_field/element.pyx index 568dc15e9b2..2765b805aba 100644 --- a/src/sage/rings/function_field/element.pyx +++ b/src/sage/rings/function_field/element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Elements of function fields diff --git a/src/sage/rings/function_field/element_polymod.pyx b/src/sage/rings/function_field/element_polymod.pyx index 401f9a896e2..7a75bfe978e 100644 --- a/src/sage/rings/function_field/element_polymod.pyx +++ b/src/sage/rings/function_field/element_polymod.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # sage.doctest: optional - sage.rings.function_field r""" Elements of function fields: extension diff --git a/src/sage/rings/function_field/element_rational.pyx b/src/sage/rings/function_field/element_rational.pyx index 8538c9b5659..40d0d9734ef 100644 --- a/src/sage/rings/function_field/element_rational.pyx +++ b/src/sage/rings/function_field/element_rational.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Elements of function fields: rational """ diff --git a/src/sage/rings/function_field/extensions.py b/src/sage/rings/function_field/extensions.py index 24df382b34f..9e42e5bff6b 100644 --- a/src/sage/rings/function_field/extensions.py +++ b/src/sage/rings/function_field/extensions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Special extensions of function fields diff --git a/src/sage/rings/function_field/function_field.py b/src/sage/rings/function_field/function_field.py index 0ef020bad9a..16f83aaea84 100644 --- a/src/sage/rings/function_field/function_field.py +++ b/src/sage/rings/function_field/function_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Function Fields diff --git a/src/sage/rings/function_field/function_field_polymod.py b/src/sage/rings/function_field/function_field_polymod.py index 0fa7d1f3476..9c44f7cb908 100644 --- a/src/sage/rings/function_field/function_field_polymod.py +++ b/src/sage/rings/function_field/function_field_polymod.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # sage.doctest: optional - sage.rings.function_field r""" Function Fields: extension diff --git a/src/sage/rings/function_field/function_field_rational.py b/src/sage/rings/function_field/function_field_rational.py index 0fef4aa89f9..2226c086b00 100644 --- a/src/sage/rings/function_field/function_field_rational.py +++ b/src/sage/rings/function_field/function_field_rational.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Function Fields: rational """ diff --git a/src/sage/rings/function_field/hermite_form_polynomial.pyx b/src/sage/rings/function_field/hermite_form_polynomial.pyx index 6e5323c7518..12881615315 100644 --- a/src/sage/rings/function_field/hermite_form_polynomial.pyx +++ b/src/sage/rings/function_field/hermite_form_polynomial.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Hermite form computation for function fields diff --git a/src/sage/rings/function_field/ideal.py b/src/sage/rings/function_field/ideal.py index 76b568d349c..22aa15299b1 100644 --- a/src/sage/rings/function_field/ideal.py +++ b/src/sage/rings/function_field/ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ideals of function fields diff --git a/src/sage/rings/function_field/ideal_polymod.py b/src/sage/rings/function_field/ideal_polymod.py index dbb2fc1f4ae..da45bc508cf 100644 --- a/src/sage/rings/function_field/ideal_polymod.py +++ b/src/sage/rings/function_field/ideal_polymod.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # sage.doctest: optional - sage.rings.function_field r""" Ideals of function fields: extension diff --git a/src/sage/rings/function_field/ideal_rational.py b/src/sage/rings/function_field/ideal_rational.py index d441d765a6c..e6abe1ff605 100644 --- a/src/sage/rings/function_field/ideal_rational.py +++ b/src/sage/rings/function_field/ideal_rational.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ideals of function fields: rational """ diff --git a/src/sage/rings/function_field/maps.py b/src/sage/rings/function_field/maps.py index d533a42041f..85377f1c894 100644 --- a/src/sage/rings/function_field/maps.py +++ b/src/sage/rings/function_field/maps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Morphisms of function fields diff --git a/src/sage/rings/function_field/order.py b/src/sage/rings/function_field/order.py index df2a3400655..615cbab3690 100644 --- a/src/sage/rings/function_field/order.py +++ b/src/sage/rings/function_field/order.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Orders of function fields diff --git a/src/sage/rings/function_field/order_basis.py b/src/sage/rings/function_field/order_basis.py index b0a2f51fc07..eebaeab97d1 100644 --- a/src/sage/rings/function_field/order_basis.py +++ b/src/sage/rings/function_field/order_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules (because __init__ constructs a vector space) r""" Orders of function fields: basis diff --git a/src/sage/rings/function_field/order_polymod.py b/src/sage/rings/function_field/order_polymod.py index 41c5e44cf35..d6831fa7248 100644 --- a/src/sage/rings/function_field/order_polymod.py +++ b/src/sage/rings/function_field/order_polymod.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # sage.doctest: optional - sage.rings.function_field r""" Orders of function fields: extension diff --git a/src/sage/rings/function_field/order_rational.py b/src/sage/rings/function_field/order_rational.py index e63db9c9015..99da2af1ebd 100644 --- a/src/sage/rings/function_field/order_rational.py +++ b/src/sage/rings/function_field/order_rational.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Orders of function fields: rational """ diff --git a/src/sage/rings/function_field/place.py b/src/sage/rings/function_field/place.py index 73a8d145ceb..dbc3ab0e767 100644 --- a/src/sage/rings/function_field/place.py +++ b/src/sage/rings/function_field/place.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Places of function fields diff --git a/src/sage/rings/function_field/place_polymod.py b/src/sage/rings/function_field/place_polymod.py index aac0b9b32b4..f345c31129e 100644 --- a/src/sage/rings/function_field/place_polymod.py +++ b/src/sage/rings/function_field/place_polymod.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular # sage.doctest: optional - sage.rings.function_field """ Places of function fields: extension diff --git a/src/sage/rings/function_field/place_rational.py b/src/sage/rings/function_field/place_rational.py index 181efc08ba5..9b98397ba90 100644 --- a/src/sage/rings/function_field/place_rational.py +++ b/src/sage/rings/function_field/place_rational.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: optional - sage.rings.finite_rings (because all doctests use finite fields) """ Places of function fields: rational diff --git a/src/sage/rings/function_field/valuation.py b/src/sage/rings/function_field/valuation.py index 01644cd1f7a..aa127de2069 100644 --- a/src/sage/rings/function_field/valuation.py +++ b/src/sage/rings/function_field/valuation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Discrete valuations on function fields diff --git a/src/sage/rings/generic.py b/src/sage/rings/generic.py index f43c0c880fc..bfcb1d2bc50 100644 --- a/src/sage/rings/generic.py +++ b/src/sage/rings/generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Generic data structures and algorithms for rings diff --git a/src/sage/rings/homset.py b/src/sage/rings/homset.py index d9e1b93f395..b2f24a3800a 100644 --- a/src/sage/rings/homset.py +++ b/src/sage/rings/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Space of homomorphisms between two rings """ diff --git a/src/sage/rings/ideal.py b/src/sage/rings/ideal.py index c70495c7cd7..4dba8ec9d42 100644 --- a/src/sage/rings/ideal.py +++ b/src/sage/rings/ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ideals of commutative rings diff --git a/src/sage/rings/ideal_monoid.py b/src/sage/rings/ideal_monoid.py index 438b25b86e6..019348a6afe 100644 --- a/src/sage/rings/ideal_monoid.py +++ b/src/sage/rings/ideal_monoid.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Monoid of ideals in a commutative ring diff --git a/src/sage/rings/imaginary_unit.py b/src/sage/rings/imaginary_unit.py index cfe6c09bab2..bb29cd32630 100644 --- a/src/sage/rings/imaginary_unit.py +++ b/src/sage/rings/imaginary_unit.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# coding: utf-8 from sage.rings.number_field.number_field import GaussianField diff --git a/src/sage/rings/infinity.py b/src/sage/rings/infinity.py index e9cdab21aca..f37c72c35a0 100644 --- a/src/sage/rings/infinity.py +++ b/src/sage/rings/infinity.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Signed and Unsigned Infinities diff --git a/src/sage/rings/integer.pxd b/src/sage/rings/integer.pxd index 9fb5913b635..1165895729e 100644 --- a/src/sage/rings/integer.pxd +++ b/src/sage/rings/integer.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.libs.gmp.types cimport __mpz_struct, mpz_t, mpz_ptr from sage.libs.gmp.mpz cimport mpz_set diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx index 349d5efe460..70d11efaf7a 100644 --- a/src/sage/rings/integer.pyx +++ b/src/sage/rings/integer.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Elements of the ring `\ZZ` of integers diff --git a/src/sage/rings/integer_fake.pxd b/src/sage/rings/integer_fake.pxd index 73e9d802462..2bd7a91142e 100644 --- a/src/sage/rings/integer_fake.pxd +++ b/src/sage/rings/integer_fake.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Fake Integer interface diff --git a/src/sage/rings/integer_ring.pxd b/src/sage/rings/integer_ring.pxd index 54b05a9c6e1..d0af1bc068f 100644 --- a/src/sage/rings/integer_ring.pxd +++ b/src/sage/rings/integer_ring.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.ring cimport PrincipalIdealDomain from sage.rings.integer cimport Integer from sage.libs.gmp.types cimport mpz_t diff --git a/src/sage/rings/integer_ring.pyx b/src/sage/rings/integer_ring.pyx index b199f53b819..ab445056cc7 100644 --- a/src/sage/rings/integer_ring.pyx +++ b/src/sage/rings/integer_ring.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ring `\ZZ` of Integers diff --git a/src/sage/rings/invariants/all.py b/src/sage/rings/invariants/all.py index f9de850093c..eb0cce3175f 100644 --- a/src/sage/rings/invariants/all.py +++ b/src/sage/rings/invariants/all.py @@ -1,4 +1,2 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.invariants.invariant_theory', 'invariant_theory') -del lazy_import diff --git a/src/sage/rings/invariants/invariant_theory.py b/src/sage/rings/invariants/invariant_theory.py index 1555d66d58b..cda4138d5e4 100644 --- a/src/sage/rings/invariants/invariant_theory.py +++ b/src/sage/rings/invariants/invariant_theory.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Classical Invariant Theory diff --git a/src/sage/rings/invariants/reconstruction.py b/src/sage/rings/invariants/reconstruction.py index 5471aee15c9..8e98ad3f20f 100644 --- a/src/sage/rings/invariants/reconstruction.py +++ b/src/sage/rings/invariants/reconstruction.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Reconstruction of Algebraic Forms diff --git a/src/sage/rings/laurent_series_ring.py b/src/sage/rings/laurent_series_ring.py index 1d522366cac..4e0c6f0d557 100644 --- a/src/sage/rings/laurent_series_ring.py +++ b/src/sage/rings/laurent_series_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Laurent Series Rings diff --git a/src/sage/rings/laurent_series_ring_element.pxd b/src/sage/rings/laurent_series_ring_element.pxd index 2e6959c1272..8df5a92c9e7 100644 --- a/src/sage/rings/laurent_series_ring_element.pxd +++ b/src/sage/rings/laurent_series_ring_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport AlgebraElement, ModuleElement cdef class LaurentSeries(AlgebraElement): diff --git a/src/sage/rings/laurent_series_ring_element.pyx b/src/sage/rings/laurent_series_ring_element.pyx index ff350e07daa..8bbf227e302 100644 --- a/src/sage/rings/laurent_series_ring_element.pyx +++ b/src/sage/rings/laurent_series_ring_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Laurent Series diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index b582d1025ec..f4c46a03ca5 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-combinat +# -*- coding: utf-8 -*- r""" Lazy Series diff --git a/src/sage/rings/lazy_series_ring.py b/src/sage/rings/lazy_series_ring.py index 157454968fb..06fd7a5d595 100644 --- a/src/sage/rings/lazy_series_ring.py +++ b/src/sage/rings/lazy_series_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" Lazy Series Rings diff --git a/src/sage/rings/localization.py b/src/sage/rings/localization.py index b8efa0d025e..c55cfc48b40 100644 --- a/src/sage/rings/localization.py +++ b/src/sage/rings/localization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Localization diff --git a/src/sage/rings/monomials.py b/src/sage/rings/monomials.py index bfa396d79dc..ed154ab8c06 100644 --- a/src/sage/rings/monomials.py +++ b/src/sage/rings/monomials.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint "Monomials" def _monomials(gens, R, n, i): diff --git a/src/sage/rings/morphism.pxd b/src/sage/rings/morphism.pxd index b310b5381ef..4b8e8d052df 100644 --- a/src/sage/rings/morphism.pxd +++ b/src/sage/rings/morphism.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.integer cimport Integer from sage.structure.element cimport Element from sage.structure.parent cimport Parent diff --git a/src/sage/rings/morphism.pyx b/src/sage/rings/morphism.pyx index efc6973ac0e..6c78460a534 100644 --- a/src/sage/rings/morphism.pyx +++ b/src/sage/rings/morphism.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Homomorphisms of rings diff --git a/src/sage/rings/multi_power_series_ring.py b/src/sage/rings/multi_power_series_ring.py index 739420b280c..0b34dfa003b 100644 --- a/src/sage/rings/multi_power_series_ring.py +++ b/src/sage/rings/multi_power_series_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Multivariate Power Series Rings diff --git a/src/sage/rings/multi_power_series_ring_element.py b/src/sage/rings/multi_power_series_ring_element.py index 7cfcacfdccb..a92bb54377a 100644 --- a/src/sage/rings/multi_power_series_ring_element.py +++ b/src/sage/rings/multi_power_series_ring_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Multivariate Power Series diff --git a/src/sage/rings/noncommutative_ideals.pyx b/src/sage/rings/noncommutative_ideals.pyx index bc665c346f1..62484c9326b 100644 --- a/src/sage/rings/noncommutative_ideals.pyx +++ b/src/sage/rings/noncommutative_ideals.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules """ Ideals of non-commutative rings diff --git a/src/sage/rings/number_field/S_unit_solver.py b/src/sage/rings/number_field/S_unit_solver.py index f1916eeaeae..1bc9e07d9c0 100644 --- a/src/sage/rings/number_field/S_unit_solver.py +++ b/src/sage/rings/number_field/S_unit_solver.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.rings.number_field sage.rings.padics r""" Solver for the `S`-unit equation `x + y = 1` diff --git a/src/sage/rings/number_field/all.py b/src/sage/rings/number_field/all.py index 188951d9126..5c56f8cff58 100644 --- a/src/sage/rings/number_field/all.py +++ b/src/sage/rings/number_field/all.py @@ -1,20 +1,15 @@ -# sage_setup: distribution = sagemath-flint -from sage.rings.number_field.number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField, - is_fundamental_discriminant, is_real_place) -from sage.rings.number_field.number_field_element import NumberFieldElement +from .number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField, + is_fundamental_discriminant, is_real_place) +from .number_field_element import NumberFieldElement -from sage.rings.number_field.order import EquationOrder, GaussianIntegers, EisensteinIntegers +from .order import EquationOrder, GaussianIntegers, EisensteinIntegers -from sage.misc.lazy_import import lazy_import +from sage.misc.lazy_import import lazy_import as _lazy_import -lazy_import('sage.rings.number_field.totallyreal', 'enumerate_totallyreal_fields_prim') -lazy_import('sage.rings.number_field.totallyreal_data', 'hermite_constant') -lazy_import('sage.rings.number_field.totallyreal_rel', - 'enumerate_totallyreal_fields_all') -lazy_import('sage.rings.number_field.totallyreal_rel', - 'enumerate_totallyreal_fields_rel') +_lazy_import('sage.rings.number_field.totallyreal', 'enumerate_totallyreal_fields_prim') +_lazy_import('sage.rings.number_field.totallyreal_data', 'hermite_constant') +_lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_all') +_lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_rel') -from sage.rings.number_field.unit_group import UnitGroup - -del lazy_import +from .unit_group import UnitGroup diff --git a/src/sage/rings/number_field/all__sagemath_categories.py b/src/sage/rings/number_field/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/number_field/all__sagemath_flint.py b/src/sage/rings/number_field/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/number_field/all__sagemath_pari.py b/src/sage/rings/number_field/all__sagemath_pari.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/number_field/bdd_height.py b/src/sage/rings/number_field/bdd_height.py index 747c0f89756..beed9da5e20 100644 --- a/src/sage/rings/number_field/bdd_height.py +++ b/src/sage/rings/number_field/bdd_height.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.geometry.polyhedron r""" Elements of bounded height in number fields diff --git a/src/sage/rings/number_field/class_group.py b/src/sage/rings/number_field/class_group.py index 2f6c3c3c8cb..4f10c8d8f13 100644 --- a/src/sage/rings/number_field/class_group.py +++ b/src/sage/rings/number_field/class_group.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- coding: utf-8 -*- r""" Class groups of number fields diff --git a/src/sage/rings/number_field/galois_group.py b/src/sage/rings/number_field/galois_group.py index a9ae8f3fd2a..999089d49d0 100644 --- a/src/sage/rings/number_field/galois_group.py +++ b/src/sage/rings/number_field/galois_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.groups sage.rings.number_field """ Galois groups of number fields diff --git a/src/sage/rings/number_field/homset.py b/src/sage/rings/number_field/homset.py index c3565e4b90b..4e4a12a9c6f 100644 --- a/src/sage/rings/number_field/homset.py +++ b/src/sage/rings/number_field/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Sets of homomorphisms between number fields """ diff --git a/src/sage/rings/number_field/maps.py b/src/sage/rings/number_field/maps.py index ea83eca6e7a..b14c4ca48f3 100644 --- a/src/sage/rings/number_field/maps.py +++ b/src/sage/rings/number_field/maps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Structure maps for number fields diff --git a/src/sage/rings/number_field/morphism.py b/src/sage/rings/number_field/morphism.py index cc639fe183d..a16ccd2bbc6 100644 --- a/src/sage/rings/number_field/morphism.py +++ b/src/sage/rings/number_field/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Morphisms between number fields diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index cd61295310e..1413b1ea057 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.libs.linbox r""" Number fields diff --git a/src/sage/rings/number_field/number_field_base.pxd b/src/sage/rings/number_field/number_field_base.pxd index 52de3655c39..ba6a8e98143 100644 --- a/src/sage/rings/number_field/number_field_base.pxd +++ b/src/sage/rings/number_field/number_field_base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.ring cimport Field cdef class NumberField(Field): diff --git a/src/sage/rings/number_field/number_field_base.pyx b/src/sage/rings/number_field/number_field_base.pyx index cf0dc56e9ef..7f55d887a0f 100644 --- a/src/sage/rings/number_field/number_field_base.pyx +++ b/src/sage/rings/number_field/number_field_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.number_field """ Base class of number fields diff --git a/src/sage/rings/number_field/number_field_element.pxd b/src/sage/rings/number_field/number_field_element.pxd index 610e001dc00..df72e703017 100644 --- a/src/sage/rings/number_field/number_field_element.pxd +++ b/src/sage/rings/number_field/number_field_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint cimport sage.structure.element from sage.libs.gmp.types cimport mpz_t from sage.rings.integer cimport Integer diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 5a5f133c2fc..844a4ec3162 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/number_field/number_field_element_base.pxd b/src/sage/rings/number_field/number_field_element_base.pxd index 7575d280a1e..060f0c754c4 100644 --- a/src/sage/rings/number_field/number_field_element_base.pxd +++ b/src/sage/rings/number_field/number_field_element_base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport FieldElement diff --git a/src/sage/rings/number_field/number_field_element_base.pyx b/src/sage/rings/number_field/number_field_element_base.pyx index 0b2b17b9064..5fee5817cbc 100644 --- a/src/sage/rings/number_field/number_field_element_base.pyx +++ b/src/sage/rings/number_field/number_field_element_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Number field elements (abstract base class) """ diff --git a/src/sage/rings/number_field/number_field_element_quadratic.pxd b/src/sage/rings/number_field/number_field_element_quadratic.pxd index d196e735a99..6dce9c04d90 100644 --- a/src/sage/rings/number_field/number_field_element_quadratic.pxd +++ b/src/sage/rings/number_field/number_field_element_quadratic.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.gmp.types cimport mpz_t from sage.libs.flint.types cimport arb_t from sage.rings.integer cimport Integer diff --git a/src/sage/rings/number_field/number_field_element_quadratic.pyx b/src/sage/rings/number_field/number_field_element_quadratic.pyx index 7db9fdbaa81..f48df864b74 100644 --- a/src/sage/rings/number_field/number_field_element_quadratic.pyx +++ b/src/sage/rings/number_field/number_field_element_quadratic.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/number_field/number_field_ideal.py b/src/sage/rings/number_field/number_field_ideal.py index fe1ac8cc049..1be7a76f46f 100644 --- a/src/sage/rings/number_field/number_field_ideal.py +++ b/src/sage/rings/number_field/number_field_ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.pari sage.rings.number_field """ Ideals of number fields diff --git a/src/sage/rings/number_field/number_field_ideal_rel.py b/src/sage/rings/number_field/number_field_ideal_rel.py index f51c988f646..7c0e4daa7a2 100644 --- a/src/sage/rings/number_field/number_field_ideal_rel.py +++ b/src/sage/rings/number_field/number_field_ideal_rel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Ideals of relative number fields diff --git a/src/sage/rings/number_field/number_field_morphisms.pyx b/src/sage/rings/number_field/number_field_morphisms.pyx index f0512bf28b6..94a917b5322 100644 --- a/src/sage/rings/number_field/number_field_morphisms.pyx +++ b/src/sage/rings/number_field/number_field_morphisms.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.rings.number_field r""" Embeddings into ambient fields diff --git a/src/sage/rings/number_field/number_field_rel.py b/src/sage/rings/number_field/number_field_rel.py index 9009559c3ee..0fdc3a8e89c 100644 --- a/src/sage/rings/number_field/number_field_rel.py +++ b/src/sage/rings/number_field/number_field_rel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Relative number fields diff --git a/src/sage/rings/number_field/order.py b/src/sage/rings/number_field/order.py index 74bc0e5de21..94d0732704d 100644 --- a/src/sage/rings/number_field/order.py +++ b/src/sage/rings/number_field/order.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.libs.linbox """ Orders in number fields diff --git a/src/sage/rings/number_field/selmer_group.py b/src/sage/rings/number_field/selmer_group.py index 3eb7246ab25..87221473348 100644 --- a/src/sage/rings/number_field/selmer_group.py +++ b/src/sage/rings/number_field/selmer_group.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- coding: utf-8 -*- r""" `p`-Selmer groups of number fields diff --git a/src/sage/rings/number_field/small_primes_of_degree_one.py b/src/sage/rings/number_field/small_primes_of_degree_one.py index b22217f9d27..73f770c34dd 100644 --- a/src/sage/rings/number_field/small_primes_of_degree_one.py +++ b/src/sage/rings/number_field/small_primes_of_degree_one.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Small primes of degree one diff --git a/src/sage/rings/number_field/splitting_field.py b/src/sage/rings/number_field/splitting_field.py index 843fddbb6b0..4de3515f161 100644 --- a/src/sage/rings/number_field/splitting_field.py +++ b/src/sage/rings/number_field/splitting_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Splitting fields of polynomials over number fields diff --git a/src/sage/rings/number_field/structure.py b/src/sage/rings/number_field/structure.py index d092c1fc106..92be301645b 100644 --- a/src/sage/rings/number_field/structure.py +++ b/src/sage/rings/number_field/structure.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.rings.number_field r""" Helper classes for structural embeddings and isomorphisms of number fields diff --git a/src/sage/rings/number_field/totallyreal.pyx b/src/sage/rings/number_field/totallyreal.pyx index 3fa8249a662..3e591fb1baa 100644 --- a/src/sage/rings/number_field/totallyreal.pyx +++ b/src/sage/rings/number_field/totallyreal.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Enumeration of primitive totally real fields diff --git a/src/sage/rings/number_field/totallyreal_data.pxd b/src/sage/rings/number_field/totallyreal_data.pxd index abd99f90a69..61973829ddb 100644 --- a/src/sage/rings/number_field/totallyreal_data.pxd +++ b/src/sage/rings/number_field/totallyreal_data.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint cdef double eval_seq_as_poly(int *f, int n, double x) noexcept cdef double newton(int *f, int *df, int n, double x0, double eps) noexcept cdef void newton_in_intervals(int *f, int *df, int n, double *beta, double eps, double *rts) noexcept diff --git a/src/sage/rings/number_field/totallyreal_data.pyx b/src/sage/rings/number_field/totallyreal_data.pyx index fd67045b5f8..6336b16264b 100644 --- a/src/sage/rings/number_field/totallyreal_data.pyx +++ b/src/sage/rings/number_field/totallyreal_data.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = gmp """ Enumeration of totally real fields: data diff --git a/src/sage/rings/number_field/totallyreal_phc.py b/src/sage/rings/number_field/totallyreal_phc.py index 7ea5b5fc7d5..e564d760320 100644 --- a/src/sage/rings/number_field/totallyreal_phc.py +++ b/src/sage/rings/number_field/totallyreal_phc.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Enumeration of totally real fields: PHC interface diff --git a/src/sage/rings/number_field/totallyreal_rel.py b/src/sage/rings/number_field/totallyreal_rel.py index efa4aec9468..e4e96154838 100644 --- a/src/sage/rings/number_field/totallyreal_rel.py +++ b/src/sage/rings/number_field/totallyreal_rel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.geometry.polyhedron sage.libs.linbox sage.modules sage.rings.number_field r""" Enumeration of totally real fields: relative extensions diff --git a/src/sage/rings/number_field/unit_group.py b/src/sage/rings/number_field/unit_group.py index 98368a5fbae..a98c1dd0907 100644 --- a/src/sage/rings/number_field/unit_group.py +++ b/src/sage/rings/number_field/unit_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Units and `S`-unit groups of number fields diff --git a/src/sage/rings/padics/CA_template.pxi b/src/sage/rings/padics/CA_template.pxi index 94d02062ae4..e8d906b01c8 100644 --- a/src/sage/rings/padics/CA_template.pxi +++ b/src/sage/rings/padics/CA_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Capped absolute template for complete discrete valuation rings diff --git a/src/sage/rings/padics/CA_template_header.pxi b/src/sage/rings/padics/CA_template_header.pxi index 1b1c3262f37..d15a055cb4d 100644 --- a/src/sage/rings/padics/CA_template_header.pxi +++ b/src/sage/rings/padics/CA_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file provides the declaration for ``CAElement`` and the morphisms to the integers and rationals. diff --git a/src/sage/rings/padics/CR_template.pxi b/src/sage/rings/padics/CR_template.pxi index 7491720c26a..acdc4803670 100644 --- a/src/sage/rings/padics/CR_template.pxi +++ b/src/sage/rings/padics/CR_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Capped relative template for complete discrete valuation rings and their fraction fields diff --git a/src/sage/rings/padics/CR_template_header.pxi b/src/sage/rings/padics/CR_template_header.pxi index ebbe7b0b326..54c482f7ff2 100644 --- a/src/sage/rings/padics/CR_template_header.pxi +++ b/src/sage/rings/padics/CR_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file provides the declaration for ``CRElement`` and the morphisms to and from the integers and rationals. diff --git a/src/sage/rings/padics/FM_template.pxi b/src/sage/rings/padics/FM_template.pxi index 7a158d50a49..8ce93d797a8 100644 --- a/src/sage/rings/padics/FM_template.pxi +++ b/src/sage/rings/padics/FM_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Fixed modulus template for complete discrete valuation rings diff --git a/src/sage/rings/padics/FM_template_header.pxi b/src/sage/rings/padics/FM_template_header.pxi index 5de73d5478a..bd651167622 100644 --- a/src/sage/rings/padics/FM_template_header.pxi +++ b/src/sage/rings/padics/FM_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file provides the declaration for the ``FMElement`` and the morphisms to and from the integers and rationals. diff --git a/src/sage/rings/padics/FP_template.pxi b/src/sage/rings/padics/FP_template.pxi index 701a7c01298..5c7f94051e7 100644 --- a/src/sage/rings/padics/FP_template.pxi +++ b/src/sage/rings/padics/FP_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Floating point template for complete discrete valuation rings diff --git a/src/sage/rings/padics/FP_template_header.pxi b/src/sage/rings/padics/FP_template_header.pxi index d9510add4bf..fde598e05fd 100644 --- a/src/sage/rings/padics/FP_template_header.pxi +++ b/src/sage/rings/padics/FP_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file provides the declaration for ``FPElement`` and the morphisms to and from the integers and rationals. diff --git a/src/sage/rings/padics/all.py b/src/sage/rings/padics/all.py index d70d7c2f229..7014f5622d8 100644 --- a/src/sage/rings/padics/all.py +++ b/src/sage/rings/padics/all.py @@ -1,3 +1,6 @@ -# sage_setup: distribution = sagemath-flint - -from sage.rings.padics.all__sagemath_flint import * +from .factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER +from .factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER +from .factory import pAdicExtension +from .padic_generic import local_print_mode +from .pow_computer import PowComputer +from .pow_computer_ext import PowComputer_ext_maker diff --git a/src/sage/rings/padics/all__sagemath_categories.py b/src/sage/rings/padics/all__sagemath_categories.py deleted file mode 100644 index fec72979f02..00000000000 --- a/src/sage/rings/padics/all__sagemath_categories.py +++ /dev/null @@ -1 +0,0 @@ -from sage.rings.padics.padic_generic import local_print_mode diff --git a/src/sage/rings/padics/all__sagemath_flint.py b/src/sage/rings/padics/all__sagemath_flint.py deleted file mode 100644 index 6362a8551f0..00000000000 --- a/src/sage/rings/padics/all__sagemath_flint.py +++ /dev/null @@ -1,2 +0,0 @@ - -from sage.rings.padics.all__sagemath_ntl import * diff --git a/src/sage/rings/padics/all__sagemath_ntl.py b/src/sage/rings/padics/all__sagemath_ntl.py deleted file mode 100644 index dfa31e55f90..00000000000 --- a/src/sage/rings/padics/all__sagemath_ntl.py +++ /dev/null @@ -1,4 +0,0 @@ - -from sage.rings.padics.all__sagemath_pari import * - -from sage.rings.padics.pow_computer_ext import PowComputer_ext_maker diff --git a/src/sage/rings/padics/all__sagemath_pari.py b/src/sage/rings/padics/all__sagemath_pari.py deleted file mode 100644 index 5072418e856..00000000000 --- a/src/sage/rings/padics/all__sagemath_pari.py +++ /dev/null @@ -1,10 +0,0 @@ - -from sage.rings.padics.all__sagemath_categories import * - -from sage.rings.padics.factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER -from sage.rings.padics.factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER -from sage.rings.padics.factory import pAdicExtension - -from sage.rings.padics.padic_printing import _printer_defaults as padic_printing - -from sage.rings.padics.pow_computer import PowComputer diff --git a/src/sage/rings/padics/common_conversion.pxd b/src/sage/rings/padics/common_conversion.pxd index 936b97f105e..4e0edb8f8e6 100644 --- a/src/sage/rings/padics/common_conversion.pxd +++ b/src/sage/rings/padics/common_conversion.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.integer cimport Integer from sage.rings.padics.pow_computer cimport PowComputer_class from sage.libs.gmp.mpz cimport mpz_t, mpq_t diff --git a/src/sage/rings/padics/common_conversion.pyx b/src/sage/rings/padics/common_conversion.pyx index 61196c6e4da..0afddcc30a4 100644 --- a/src/sage/rings/padics/common_conversion.pyx +++ b/src/sage/rings/padics/common_conversion.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" The functions in this file are used in creating new p-adic elements. diff --git a/src/sage/rings/padics/eisenstein_extension_generic.py b/src/sage/rings/padics/eisenstein_extension_generic.py index 61db8ce062f..10e198abfb9 100644 --- a/src/sage/rings/padics/eisenstein_extension_generic.py +++ b/src/sage/rings/padics/eisenstein_extension_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Eisenstein Extension Generic diff --git a/src/sage/rings/padics/factory.py b/src/sage/rings/padics/factory.py index 35658ddd459..60c37322bd2 100644 --- a/src/sage/rings/padics/factory.py +++ b/src/sage/rings/padics/factory.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Factory diff --git a/src/sage/rings/padics/generic_nodes.py b/src/sage/rings/padics/generic_nodes.py index 4e3f174b55b..ecee8e4e5f3 100644 --- a/src/sage/rings/padics/generic_nodes.py +++ b/src/sage/rings/padics/generic_nodes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ `p`-adic Generic Nodes diff --git a/src/sage/rings/padics/lattice_precision.py b/src/sage/rings/padics/lattice_precision.py index 01bd1d00df3..51a510a4360 100644 --- a/src/sage/rings/padics/lattice_precision.py +++ b/src/sage/rings/padics/lattice_precision.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Lattice precision for the parents ``ZpLC``/``QpLC`` and ``ZpLF``/``QpLF`` diff --git a/src/sage/rings/padics/local_generic.py b/src/sage/rings/padics/local_generic.py index cc23c0e0894..066459c65a2 100644 --- a/src/sage/rings/padics/local_generic.py +++ b/src/sage/rings/padics/local_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.padics r""" Local Generic diff --git a/src/sage/rings/padics/local_generic_element.pxd b/src/sage/rings/padics/local_generic_element.pxd index daf1194956f..9111d2f173c 100644 --- a/src/sage/rings/padics/local_generic_element.pxd +++ b/src/sage/rings/padics/local_generic_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport CommutativeRingElement cdef class LocalGenericElement(CommutativeRingElement): diff --git a/src/sage/rings/padics/local_generic_element.pyx b/src/sage/rings/padics/local_generic_element.pyx index 4a88b75ba87..e1f5a7a04a0 100644 --- a/src/sage/rings/padics/local_generic_element.pyx +++ b/src/sage/rings/padics/local_generic_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.padics """ Local Generic Element diff --git a/src/sage/rings/padics/misc.py b/src/sage/rings/padics/misc.py index 3bde32a996a..984482bc39c 100644 --- a/src/sage/rings/padics/misc.py +++ b/src/sage/rings/padics/misc.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Miscellaneous Functions diff --git a/src/sage/rings/padics/morphism.pxd b/src/sage/rings/padics/morphism.pxd index 4fd8175c847..b6afedd2377 100644 --- a/src/sage/rings/padics/morphism.pxd +++ b/src/sage/rings/padics/morphism.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.morphism cimport RingHomomorphism from sage.structure.element cimport Element diff --git a/src/sage/rings/padics/morphism.pyx b/src/sage/rings/padics/morphism.pyx index 5418878a3ca..c8238bdc9fa 100644 --- a/src/sage/rings/padics/morphism.pyx +++ b/src/sage/rings/padics/morphism.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.ntl """ Frobenius endomorphisms on p-adic fields diff --git a/src/sage/rings/padics/padic_ZZ_pX_CA_element.pxd b/src/sage/rings/padics/padic_ZZ_pX_CA_element.pxd index 63b03c15e87..7afe94b1bf3 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CA_element.pxd +++ b/src/sage/rings/padics/padic_ZZ_pX_CA_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.gmp.types cimport mpq_t from sage.rings.padics.padic_ZZ_pX_element cimport pAdicZZpXElement from sage.structure.element cimport RingElement, ModuleElement diff --git a/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx index dd3090651b6..58f5670aa05 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_CA_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pxd b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pxd index 04f24b78377..9744b2a3f62 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pxd +++ b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.gmp.types cimport mpz_t, mpq_t from sage.rings.padics.padic_ZZ_pX_element cimport pAdicZZpXElement from sage.structure.element cimport RingElement, ModuleElement diff --git a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx index 94bc504a890..ec86b03535b 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_CR_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/padic_ZZ_pX_FM_element.pxd b/src/sage/rings/padics/padic_ZZ_pX_FM_element.pxd index 221b6dba2cb..90626089442 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_FM_element.pxd +++ b/src/sage/rings/padics/padic_ZZ_pX_FM_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZ_pX_c from sage.rings.padics.padic_ZZ_pX_element cimport pAdicZZpXElement from sage.structure.element cimport RingElement, ModuleElement diff --git a/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx index 910f7a5f3d0..44d549847a9 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_FM_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/padic_ZZ_pX_element.pxd b/src/sage/rings/padics/padic_ZZ_pX_element.pxd index 4fc388fbe36..1d2f9abcbdb 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_element.pxd +++ b/src/sage/rings/padics/padic_ZZ_pX_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.rings.padics.padic_ext_element cimport pAdicExtElement from sage.rings.padics.pow_computer_ext cimport PowComputer_ZZ_pX diff --git a/src/sage/rings/padics/padic_ZZ_pX_element.pyx b/src/sage/rings/padics/padic_ZZ_pX_element.pyx index 1c77027faee..b88bd5053bf 100644 --- a/src/sage/rings/padics/padic_ZZ_pX_element.pyx +++ b/src/sage/rings/padics/padic_ZZ_pX_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/padic_base_generic.py b/src/sage/rings/padics/padic_base_generic.py index f3e2ba82fa0..792e99996c5 100644 --- a/src/sage/rings/padics/padic_base_generic.py +++ b/src/sage/rings/padics/padic_base_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" `p`-adic Base Generic diff --git a/src/sage/rings/padics/padic_base_leaves.py b/src/sage/rings/padics/padic_base_leaves.py index 538d30b6b81..efd4073c30d 100644 --- a/src/sage/rings/padics/padic_base_leaves.py +++ b/src/sage/rings/padics/padic_base_leaves.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" `p`-adic Base Leaves diff --git a/src/sage/rings/padics/padic_capped_absolute_element.pxd b/src/sage/rings/padics/padic_capped_absolute_element.pxd index d2193ce373a..48c8500a678 100644 --- a/src/sage/rings/padics/padic_capped_absolute_element.pxd +++ b/src/sage/rings/padics/padic_capped_absolute_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.libs.gmp.types cimport mpz_t from cypari2.gen cimport Gen as pari_gen from sage.rings.padics.padic_capped_relative_element cimport CRElement diff --git a/src/sage/rings/padics/padic_capped_absolute_element.pyx b/src/sage/rings/padics/padic_capped_absolute_element.pyx index c5e5a235cb9..d21b2c18acb 100644 --- a/src/sage/rings/padics/padic_capped_absolute_element.pyx +++ b/src/sage/rings/padics/padic_capped_absolute_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ `p`-adic Capped Absolute Elements diff --git a/src/sage/rings/padics/padic_capped_relative_element.pxd b/src/sage/rings/padics/padic_capped_relative_element.pxd index e1d544ea9d0..2cf6d5276f5 100644 --- a/src/sage/rings/padics/padic_capped_relative_element.pxd +++ b/src/sage/rings/padics/padic_capped_relative_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.libs.gmp.types cimport mpz_t from cypari2.gen cimport Gen as pari_gen diff --git a/src/sage/rings/padics/padic_capped_relative_element.pyx b/src/sage/rings/padics/padic_capped_relative_element.pyx index ba7e2828429..701c9575417 100644 --- a/src/sage/rings/padics/padic_capped_relative_element.pyx +++ b/src/sage/rings/padics/padic_capped_relative_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ `p`-adic Capped Relative Elements diff --git a/src/sage/rings/padics/padic_ext_element.pxd b/src/sage/rings/padics/padic_ext_element.pxd index 62323933199..d8e2ca0a5a0 100644 --- a/src/sage/rings/padics/padic_ext_element.pxd +++ b/src/sage/rings/padics/padic_ext_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.rings.padics.padic_generic_element cimport pAdicGenericElement from sage.libs.ntl.types cimport ZZ_pX_c, ZZ_pE_c, ZZ_pEX_c, ZZ_p_c, ZZX_c from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class diff --git a/src/sage/rings/padics/padic_ext_element.pyx b/src/sage/rings/padics/padic_ext_element.pyx index ea2d2bc46bb..2327c8085a0 100644 --- a/src/sage/rings/padics/padic_ext_element.pyx +++ b/src/sage/rings/padics/padic_ext_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/padic_extension_generic.py b/src/sage/rings/padics/padic_extension_generic.py index 995f3ed2d06..42d58e9d229 100644 --- a/src/sage/rings/padics/padic_extension_generic.py +++ b/src/sage/rings/padics/padic_extension_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.ntl """ `p`-adic Extension Generic diff --git a/src/sage/rings/padics/padic_extension_leaves.py b/src/sage/rings/padics/padic_extension_leaves.py index 1bd9acd8e04..d6450039a82 100644 --- a/src/sage/rings/padics/padic_extension_leaves.py +++ b/src/sage/rings/padics/padic_extension_leaves.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" `p`-adic Extension Leaves diff --git a/src/sage/rings/padics/padic_fixed_mod_element.pxd b/src/sage/rings/padics/padic_fixed_mod_element.pxd index 105fe481850..cd619a1bcb2 100644 --- a/src/sage/rings/padics/padic_fixed_mod_element.pxd +++ b/src/sage/rings/padics/padic_fixed_mod_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.libs.gmp.types cimport mpz_t from cypari2.gen cimport Gen as pari_gen from sage.rings.padics.padic_floating_point_element cimport FPElement diff --git a/src/sage/rings/padics/padic_fixed_mod_element.pyx b/src/sage/rings/padics/padic_fixed_mod_element.pyx index 5fb895c4aad..bb4b8f3e0db 100644 --- a/src/sage/rings/padics/padic_fixed_mod_element.pyx +++ b/src/sage/rings/padics/padic_fixed_mod_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ `p`-adic Fixed-Mod Element diff --git a/src/sage/rings/padics/padic_floating_point_element.pxd b/src/sage/rings/padics/padic_floating_point_element.pxd index 434a4cc83f9..721c471d253 100644 --- a/src/sage/rings/padics/padic_floating_point_element.pxd +++ b/src/sage/rings/padics/padic_floating_point_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.libs.gmp.types cimport mpz_t from cypari2.gen cimport Gen as pari_gen diff --git a/src/sage/rings/padics/padic_floating_point_element.pyx b/src/sage/rings/padics/padic_floating_point_element.pyx index 4d0d4ee6620..ed80e7c853d 100644 --- a/src/sage/rings/padics/padic_floating_point_element.pyx +++ b/src/sage/rings/padics/padic_floating_point_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" `p`-adic Floating Point Elements diff --git a/src/sage/rings/padics/padic_generic.py b/src/sage/rings/padics/padic_generic.py index 28e80ad59b1..6452d77db22 100644 --- a/src/sage/rings/padics/padic_generic.py +++ b/src/sage/rings/padics/padic_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.padics r""" `p`-adic Generic diff --git a/src/sage/rings/padics/padic_generic_element.pxd b/src/sage/rings/padics/padic_generic_element.pxd index b3b04c85e86..dadf7099c00 100644 --- a/src/sage/rings/padics/padic_generic_element.pxd +++ b/src/sage/rings/padics/padic_generic_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cpython cimport array cimport sage.structure.element diff --git a/src/sage/rings/padics/padic_generic_element.pyx b/src/sage/rings/padics/padic_generic_element.pyx index 9e81dbb9d09..b8f02e31970 100644 --- a/src/sage/rings/padics/padic_generic_element.pyx +++ b/src/sage/rings/padics/padic_generic_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ `p`-adic Generic Element diff --git a/src/sage/rings/padics/padic_lattice_element.py b/src/sage/rings/padics/padic_lattice_element.py index 49e70df3fe5..d1b75efe6d6 100644 --- a/src/sage/rings/padics/padic_lattice_element.py +++ b/src/sage/rings/padics/padic_lattice_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" `p`-adic Elements with lattice precision. diff --git a/src/sage/rings/padics/padic_printing.pxd b/src/sage/rings/padics/padic_printing.pxd index 1a238054efa..44698b3d73d 100644 --- a/src/sage/rings/padics/padic_printing.pxd +++ b/src/sage/rings/padics/padic_printing.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.structure.sage_object cimport SageObject from sage.rings.padics.pow_computer cimport PowComputer_class from sage.rings.padics.padic_generic_element cimport pAdicGenericElement diff --git a/src/sage/rings/padics/padic_printing.pyx b/src/sage/rings/padics/padic_printing.pyx index e18ce08d5c4..fc9f15b07b1 100644 --- a/src/sage/rings/padics/padic_printing.pyx +++ b/src/sage/rings/padics/padic_printing.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/padic_relaxed_element.pxd b/src/sage/rings/padics/padic_relaxed_element.pxd index d21d4a2a88c..991af951643 100644 --- a/src/sage/rings/padics/padic_relaxed_element.pxd +++ b/src/sage/rings/padics/padic_relaxed_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.flint.types cimport fmpz, fmpz_t, fmpz_poly_t, flint_rand_t ctypedef fmpz_t cdigit diff --git a/src/sage/rings/padics/padic_relaxed_element.pyx b/src/sage/rings/padics/padic_relaxed_element.pyx index f696dde41e3..88b5003b0eb 100644 --- a/src/sage/rings/padics/padic_relaxed_element.pyx +++ b/src/sage/rings/padics/padic_relaxed_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint cdef inline type element_class_zero = pAdicRelaxedElement_zero cdef inline type element_class_one = pAdicRelaxedElement_one cdef inline type element_class_bound = pAdicRelaxedElement_bound diff --git a/src/sage/rings/padics/padic_relaxed_errors.pxd b/src/sage/rings/padics/padic_relaxed_errors.pxd index f0c31369c93..bfe375b8eee 100644 --- a/src/sage/rings/padics/padic_relaxed_errors.pxd +++ b/src/sage/rings/padics/padic_relaxed_errors.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl cdef inline int ERROR_ABANDON cdef inline int ERROR_NOTDEFINED cdef inline int ERROR_PRECISION diff --git a/src/sage/rings/padics/padic_relaxed_errors.pyx b/src/sage/rings/padics/padic_relaxed_errors.pyx index dce83aaec65..2157234f62b 100644 --- a/src/sage/rings/padics/padic_relaxed_errors.pyx +++ b/src/sage/rings/padics/padic_relaxed_errors.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # **************************************************************************** # Copyright (C) 2021 Xavier Caruso # diff --git a/src/sage/rings/padics/padic_template_element.pxi b/src/sage/rings/padics/padic_template_element.pxi index 2c25ff6c0b4..4b5b9c6dbe9 100644 --- a/src/sage/rings/padics/padic_template_element.pxi +++ b/src/sage/rings/padics/padic_template_element.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file gives a class from which all the `p`-adic templates inherit. diff --git a/src/sage/rings/padics/padic_template_element_header.pxi b/src/sage/rings/padics/padic_template_element_header.pxi index 08c9592e69c..11e1cc7fab7 100644 --- a/src/sage/rings/padics/padic_template_element_header.pxi +++ b/src/sage/rings/padics/padic_template_element_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file provides the declaration for the pAdicTemplateElement class, which collects common functionality for the different p-adic template diff --git a/src/sage/rings/padics/padic_valuation.py b/src/sage/rings/padics/padic_valuation.py index 457555bd5da..7b162228fbb 100644 --- a/src/sage/rings/padics/padic_valuation.py +++ b/src/sage/rings/padics/padic_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" `p`-adic Valuations on Number Fields and Their Subrings and Completions diff --git a/src/sage/rings/padics/pow_computer.pxd b/src/sage/rings/padics/pow_computer.pxd index ada2533961b..5cb6a474849 100644 --- a/src/sage/rings/padics/pow_computer.pxd +++ b/src/sage/rings/padics/pow_computer.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.libs.gmp.types cimport mpz_t, mpz_srcptr from sage.structure.sage_object cimport SageObject from sage.rings.integer cimport Integer diff --git a/src/sage/rings/padics/pow_computer.pyx b/src/sage/rings/padics/pow_computer.pyx index d26fe7d5b14..dda423f4a0f 100644 --- a/src/sage/rings/padics/pow_computer.pyx +++ b/src/sage/rings/padics/pow_computer.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/pow_computer_ext.pxd b/src/sage/rings/padics/pow_computer_ext.pxd index 1899c40057f..5d31790e02e 100644 --- a/src/sage/rings/padics/pow_computer_ext.pxd +++ b/src/sage/rings/padics/pow_computer_ext.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.rings.padics.pow_computer cimport PowComputer_class from sage.libs.ntl.ntl_ZZ_pContext cimport ntl_ZZ_pContext_class from sage.libs.ntl.types cimport * diff --git a/src/sage/rings/padics/pow_computer_ext.pyx b/src/sage/rings/padics/pow_computer_ext.pyx index 06b08444439..89a073550f5 100644 --- a/src/sage/rings/padics/pow_computer_ext.pyx +++ b/src/sage/rings/padics/pow_computer_ext.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/pow_computer_flint.pxd b/src/sage/rings/padics/pow_computer_flint.pxd index a2c853eca89..7b0d042115d 100644 --- a/src/sage/rings/padics/pow_computer_flint.pxd +++ b/src/sage/rings/padics/pow_computer_flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.gmp.mpz cimport mpz_t from sage.libs.flint.types cimport padic_ctx_t, fmpz_t, fmpz_poly_t from sage.rings.padics.pow_computer cimport PowComputer_class diff --git a/src/sage/rings/padics/pow_computer_flint.pyx b/src/sage/rings/padics/pow_computer_flint.pyx index de95d6b6955..2a9c937923f 100644 --- a/src/sage/rings/padics/pow_computer_flint.pyx +++ b/src/sage/rings/padics/pow_computer_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = gmp NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/padics/pow_computer_relative.pxd b/src/sage/rings/padics/pow_computer_relative.pxd index 0b99bc4b65a..df989768720 100644 --- a/src/sage/rings/padics/pow_computer_relative.pxd +++ b/src/sage/rings/padics/pow_computer_relative.pxd @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- from sage.rings.padics.pow_computer cimport PowComputer_class from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense diff --git a/src/sage/rings/padics/pow_computer_relative.pyx b/src/sage/rings/padics/pow_computer_relative.pyx index ff43b4b7082..98b3a6f5fa4 100644 --- a/src/sage/rings/padics/pow_computer_relative.pyx +++ b/src/sage/rings/padics/pow_computer_relative.pyx @@ -1,10 +1,10 @@ -# sage_setup: distribution = sagemath-pari # distutils: libraries = NTL_LIBRARIES gmp m # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR # distutils: library_dirs = NTL_LIBDIR # distutils: extra_link_args = NTL_LIBEXTRA # distutils: language = c++ +# -*- coding: utf-8 -*- r""" A ``PowComputer`` for relative extensions diff --git a/src/sage/rings/padics/precision_error.py b/src/sage/rings/padics/precision_error.py index fa5d577936a..a536fa1a104 100644 --- a/src/sage/rings/padics/precision_error.py +++ b/src/sage/rings/padics/precision_error.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Precision Error diff --git a/src/sage/rings/padics/qadic_flint_CA.pxd b/src/sage/rings/padics/qadic_flint_CA.pxd index 95ea3145a31..56cd4dbc03d 100644 --- a/src/sage/rings/padics/qadic_flint_CA.pxd +++ b/src/sage/rings/padics/qadic_flint_CA.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from cypari2.gen cimport Gen as pari_gen from sage.libs.flint.types cimport fmpz_poly_t from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram diff --git a/src/sage/rings/padics/qadic_flint_CA.pyx b/src/sage/rings/padics/qadic_flint_CA.pyx index 58e37de3141..a2a65359edc 100644 --- a/src/sage/rings/padics/qadic_flint_CA.pyx +++ b/src/sage/rings/padics/qadic_flint_CA.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint include "sage/libs/linkages/padics/fmpz_poly_unram.pxi" include "sage/libs/linkages/padics/unram_shared.pxi" include "CA_template.pxi" diff --git a/src/sage/rings/padics/qadic_flint_CR.pxd b/src/sage/rings/padics/qadic_flint_CR.pxd index b70f7bfe01e..1f1765bc61c 100644 --- a/src/sage/rings/padics/qadic_flint_CR.pxd +++ b/src/sage/rings/padics/qadic_flint_CR.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from cypari2.gen cimport Gen as pari_gen from sage.libs.flint.types cimport fmpz_poly_t from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram diff --git a/src/sage/rings/padics/qadic_flint_CR.pyx b/src/sage/rings/padics/qadic_flint_CR.pyx index fc3f59d908e..8f7f268b60e 100644 --- a/src/sage/rings/padics/qadic_flint_CR.pyx +++ b/src/sage/rings/padics/qadic_flint_CR.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint include "sage/libs/linkages/padics/fmpz_poly_unram.pxi" include "sage/libs/linkages/padics/unram_shared.pxi" include "CR_template.pxi" diff --git a/src/sage/rings/padics/qadic_flint_FM.pxd b/src/sage/rings/padics/qadic_flint_FM.pxd index ded2ef8b970..7c2facd3aaa 100644 --- a/src/sage/rings/padics/qadic_flint_FM.pxd +++ b/src/sage/rings/padics/qadic_flint_FM.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from cypari2.gen cimport Gen as pari_gen from sage.libs.flint.types cimport fmpz_poly_t from sage.rings.padics.qadic_flint_FP cimport FPElement diff --git a/src/sage/rings/padics/qadic_flint_FM.pyx b/src/sage/rings/padics/qadic_flint_FM.pyx index 526873888cf..0a5e0563101 100644 --- a/src/sage/rings/padics/qadic_flint_FM.pyx +++ b/src/sage/rings/padics/qadic_flint_FM.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint include "sage/libs/linkages/padics/fmpz_poly_unram.pxi" include "sage/libs/linkages/padics/unram_shared.pxi" include "FM_template.pxi" diff --git a/src/sage/rings/padics/qadic_flint_FP.pxd b/src/sage/rings/padics/qadic_flint_FP.pxd index 5526168e40a..1a25be2fc08 100644 --- a/src/sage/rings/padics/qadic_flint_FP.pxd +++ b/src/sage/rings/padics/qadic_flint_FP.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from cypari2.gen cimport Gen as pari_gen from sage.libs.flint.fmpz_poly cimport fmpz_poly_t from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram diff --git a/src/sage/rings/padics/qadic_flint_FP.pyx b/src/sage/rings/padics/qadic_flint_FP.pyx index 4faf12cbc83..2d080dba429 100644 --- a/src/sage/rings/padics/qadic_flint_FP.pyx +++ b/src/sage/rings/padics/qadic_flint_FP.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint include "sage/libs/linkages/padics/fmpz_poly_unram.pxi" diff --git a/src/sage/rings/padics/relative_extension_leaves.py b/src/sage/rings/padics/relative_extension_leaves.py index c2ff4c399c2..0310f2b21c3 100644 --- a/src/sage/rings/padics/relative_extension_leaves.py +++ b/src/sage/rings/padics/relative_extension_leaves.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Relative extensions of `p`-adic rings diff --git a/src/sage/rings/padics/relative_ramified_CA.pxd b/src/sage/rings/padics/relative_ramified_CA.pxd index 794f6305a7d..e87d051a24e 100644 --- a/src/sage/rings/padics/relative_ramified_CA.pxd +++ b/src/sage/rings/padics/relative_ramified_CA.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense_inexact as celement from sage.rings.padics.pow_computer_relative cimport PowComputer_relative_eis as PowComputer_ from sage.rings.padics.relative_ramified_CR cimport CRElement diff --git a/src/sage/rings/padics/relative_ramified_CA.pyx b/src/sage/rings/padics/relative_ramified_CA.pyx index 907110c5196..42337d04979 100644 --- a/src/sage/rings/padics/relative_ramified_CA.pyx +++ b/src/sage/rings/padics/relative_ramified_CA.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.flint include "sage/libs/linkages/padics/Polynomial_ram.pxi" include "CA_template.pxi" diff --git a/src/sage/rings/padics/relative_ramified_CR.pxd b/src/sage/rings/padics/relative_ramified_CR.pxd index 10607fa8a19..e7c5cdc04ca 100644 --- a/src/sage/rings/padics/relative_ramified_CR.pxd +++ b/src/sage/rings/padics/relative_ramified_CR.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense_inexact as celement from sage.rings.padics.pow_computer_relative cimport PowComputer_relative_eis as PowComputer_ diff --git a/src/sage/rings/padics/relative_ramified_CR.pyx b/src/sage/rings/padics/relative_ramified_CR.pyx index 633464e9968..5263c190966 100644 --- a/src/sage/rings/padics/relative_ramified_CR.pyx +++ b/src/sage/rings/padics/relative_ramified_CR.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.ntl include "sage/libs/linkages/padics/Polynomial_ram.pxi" include "CR_template.pxi" diff --git a/src/sage/rings/padics/relative_ramified_FM.pxd b/src/sage/rings/padics/relative_ramified_FM.pxd index 5e19bfde27a..cf2e1238463 100644 --- a/src/sage/rings/padics/relative_ramified_FM.pxd +++ b/src/sage/rings/padics/relative_ramified_FM.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense_inexact as celement from sage.rings.padics.pow_computer_relative cimport PowComputer_relative_eis as PowComputer_ from sage.rings.padics.relative_ramified_FP cimport FPElement diff --git a/src/sage/rings/padics/relative_ramified_FM.pyx b/src/sage/rings/padics/relative_ramified_FM.pyx index 93f734d084c..27d18035ccb 100644 --- a/src/sage/rings/padics/relative_ramified_FM.pyx +++ b/src/sage/rings/padics/relative_ramified_FM.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.flint include "sage/libs/linkages/padics/Polynomial_ram.pxi" include "FM_template.pxi" diff --git a/src/sage/rings/padics/relative_ramified_FP.pxd b/src/sage/rings/padics/relative_ramified_FP.pxd index 7528f6802f5..d060fbe1a3a 100644 --- a/src/sage/rings/padics/relative_ramified_FP.pxd +++ b/src/sage/rings/padics/relative_ramified_FP.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense_inexact as celement from sage.rings.padics.pow_computer_relative cimport PowComputer_relative_eis as PowComputer_ diff --git a/src/sage/rings/padics/relative_ramified_FP.pyx b/src/sage/rings/padics/relative_ramified_FP.pyx index 38b4e61fe67..3cbae5e55d3 100644 --- a/src/sage/rings/padics/relative_ramified_FP.pyx +++ b/src/sage/rings/padics/relative_ramified_FP.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.flint include "sage/libs/linkages/padics/Polynomial_ram.pxi" include "FP_template.pxi" diff --git a/src/sage/rings/padics/relaxed_template.pxi b/src/sage/rings/padics/relaxed_template.pxi index f7e2e376d22..7068a1425a2 100644 --- a/src/sage/rings/padics/relaxed_template.pxi +++ b/src/sage/rings/padics/relaxed_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.flint r""" Template for relaxed `p`-adic rings and fields. diff --git a/src/sage/rings/padics/relaxed_template_header.pxi b/src/sage/rings/padics/relaxed_template_header.pxi index 740c508d7ad..7a57141e922 100644 --- a/src/sage/rings/padics/relaxed_template_header.pxi +++ b/src/sage/rings/padics/relaxed_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ This file provides the declaration for the RelaxedElement class, which collects common functionality for the different relaxed p-adic diff --git a/src/sage/rings/padics/tests.py b/src/sage/rings/padics/tests.py index 55d786b8701..1d0e3f3c5d6 100644 --- a/src/sage/rings/padics/tests.py +++ b/src/sage/rings/padics/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ TESTS:: diff --git a/src/sage/rings/padics/tutorial.py b/src/sage/rings/padics/tutorial.py index b4f502440a9..45459711382 100644 --- a/src/sage/rings/padics/tutorial.py +++ b/src/sage/rings/padics/tutorial.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Introduction to the `p`-adics ========================================== diff --git a/src/sage/rings/padics/unramified_extension_generic.py b/src/sage/rings/padics/unramified_extension_generic.py index 049253423d4..3ca4d07b2b0 100644 --- a/src/sage/rings/padics/unramified_extension_generic.py +++ b/src/sage/rings/padics/unramified_extension_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Unramified Extension Generic diff --git a/src/sage/rings/pari_ring.py b/src/sage/rings/pari_ring.py index 20856a69849..f34a45829a0 100644 --- a/src/sage/rings/pari_ring.py +++ b/src/sage/rings/pari_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Ring of pari objects diff --git a/src/sage/rings/polynomial/all.py b/src/sage/rings/polynomial/all.py index 78e29ac0bb9..853f422bdc7 100644 --- a/src/sage/rings/polynomial/all.py +++ b/src/sage/rings/polynomial/all.py @@ -18,8 +18,18 @@ from sage.misc.lazy_import import lazy_import -from sage.rings.polynomial.all__sagemath_categories import * -from sage.rings.polynomial.all__sagemath_modules import * +# Quotient of polynomial ring +from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing +from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement + +# Univariate Polynomial Rings +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.polynomial.polynomial_ring import polygen, polygens +from sage.rings.polynomial.polynomial_element import Polynomial + +# Multivariate Polynomial Rings +from sage.rings.polynomial.term_order import TermOrder +from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function # Generic convolution from sage.rings.polynomial.convolution import convolution @@ -28,9 +38,19 @@ from sage.rings.polynomial.polynomial_ring_constructor import BooleanPolynomialRing_constructor as BooleanPolynomialRing # Laurent Polynomial Rings +from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing lazy_import('sage.rings.polynomial.omega', 'MacMahonOmega') +# Infinite Polynomial Rings +from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing + +# Ore Polynomial Rings +lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') +SkewPolynomialRing = OrePolynomialRing + +# Evaluation of cyclotomic polynomials +from sage.rings.polynomial.cyclotomic import cyclotomic_value + # Integer-valued Univariate Polynomial Ring lazy_import('sage.rings.polynomial.integer_valued_polynomials', 'IntegerValuedPolynomialRing') -del lazy_import diff --git a/src/sage/rings/polynomial/all__sagemath_brial.py b/src/sage/rings/polynomial/all__sagemath_brial.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/all__sagemath_categories.py b/src/sage/rings/polynomial/all__sagemath_categories.py deleted file mode 100644 index 2b79da92a4c..00000000000 --- a/src/sage/rings/polynomial/all__sagemath_categories.py +++ /dev/null @@ -1,21 +0,0 @@ -# Quotient of polynomial ring -from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing -from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement - -# Univariate Polynomial Rings -from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.polynomial_ring import polygen, polygens -from sage.rings.polynomial.polynomial_element import Polynomial - -# Multivariate Polynomial Rings -from sage.rings.polynomial.term_order import TermOrder -from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function - -# Infinite Polynomial Rings -from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing - -# Laurent Polynomial Rings -from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing - -# Evaluation of cyclotomic polynomials -from sage.rings.polynomial.cyclotomic import cyclotomic_value diff --git a/src/sage/rings/polynomial/all__sagemath_flint.py b/src/sage/rings/polynomial/all__sagemath_flint.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/all__sagemath_linbox.py b/src/sage/rings/polynomial/all__sagemath_linbox.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/all__sagemath_modules.py b/src/sage/rings/polynomial/all__sagemath_modules.py deleted file mode 100644 index 647d682eb84..00000000000 --- a/src/sage/rings/polynomial/all__sagemath_modules.py +++ /dev/null @@ -1,7 +0,0 @@ - -from sage.misc.lazy_import import lazy_import - -# Ore Polynomial Rings -lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') -SkewPolynomialRing = OrePolynomialRing -del lazy_import diff --git a/src/sage/rings/polynomial/all__sagemath_ntl.py b/src/sage/rings/polynomial/all__sagemath_ntl.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/all__sagemath_pari.py b/src/sage/rings/polynomial/all__sagemath_pari.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/all__sagemath_singular.py b/src/sage/rings/polynomial/all__sagemath_singular.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/all__sagemath_symbolics.py b/src/sage/rings/polynomial/all__sagemath_symbolics.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/rings/polynomial/binary_form_reduce.py b/src/sage/rings/polynomial/binary_form_reduce.py index 79f39cdd78d..bb6b4296d1a 100644 --- a/src/sage/rings/polynomial/binary_form_reduce.py +++ b/src/sage/rings/polynomial/binary_form_reduce.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- r""" Helper functions for reduction of binary forms. diff --git a/src/sage/rings/polynomial/commutative_polynomial.pxd b/src/sage/rings/polynomial/commutative_polynomial.pxd index ec6d99c1208..c4a8956daa5 100644 --- a/src/sage/rings/polynomial/commutative_polynomial.pxd +++ b/src/sage/rings/polynomial/commutative_polynomial.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport CommutativeAlgebraElement diff --git a/src/sage/rings/polynomial/commutative_polynomial.pyx b/src/sage/rings/polynomial/commutative_polynomial.pyx index 1fb3de6b803..dc9f2cab8b7 100644 --- a/src/sage/rings/polynomial/commutative_polynomial.pyx +++ b/src/sage/rings/polynomial/commutative_polynomial.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef class CommutativePolynomial(CommutativeAlgebraElement): r""" Abstract base class for commutative polynomials in any number of variables diff --git a/src/sage/rings/polynomial/complex_roots.py b/src/sage/rings/polynomial/complex_roots.py index 351a49cdada..602ba9ffc27 100644 --- a/src/sage/rings/polynomial/complex_roots.py +++ b/src/sage/rings/polynomial/complex_roots.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Isolate Complex Roots of Polynomials diff --git a/src/sage/rings/polynomial/cyclotomic.pyx b/src/sage/rings/polynomial/cyclotomic.pyx index 04cf7ad635b..a7339d23604 100644 --- a/src/sage/rings/polynomial/cyclotomic.pyx +++ b/src/sage/rings/polynomial/cyclotomic.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Fast calculation of cyclotomic polynomials diff --git a/src/sage/rings/polynomial/evaluation_flint.pxd b/src/sage/rings/polynomial/evaluation_flint.pxd index c8f9832b1d0..b699871ba0c 100644 --- a/src/sage/rings/polynomial/evaluation_flint.pxd +++ b/src/sage/rings/polynomial/evaluation_flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.flint.types cimport fmpz_poly_t from sage.libs.mpfr.types cimport mpfr_t from sage.libs.mpfi.types cimport mpfi_t diff --git a/src/sage/rings/polynomial/evaluation_flint.pyx b/src/sage/rings/polynomial/evaluation_flint.pyx index 7e5d2b6fb38..1c5909c37b0 100644 --- a/src/sage/rings/polynomial/evaluation_flint.pyx +++ b/src/sage/rings/polynomial/evaluation_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = flint r""" Fast evaluation of polynomials (Horner's rule) diff --git a/src/sage/rings/polynomial/evaluation_ntl.pxd b/src/sage/rings/polynomial/evaluation_ntl.pxd index f0e5e5d35c3..9af0a0b9d40 100644 --- a/src/sage/rings/polynomial/evaluation_ntl.pxd +++ b/src/sage/rings/polynomial/evaluation_ntl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZX_c from sage.libs.mpfr.types cimport mpfr_t from sage.libs.mpfi.types cimport mpfi_t diff --git a/src/sage/rings/polynomial/evaluation_ntl.pyx b/src/sage/rings/polynomial/evaluation_ntl.pyx index e30a4dfd79b..28b3917d3a1 100644 --- a/src/sage/rings/polynomial/evaluation_ntl.pyx +++ b/src/sage/rings/polynomial/evaluation_ntl.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/polynomial/flatten.py b/src/sage/rings/polynomial/flatten.py index 9f4e3661dcf..ca2a491b94d 100644 --- a/src/sage/rings/polynomial/flatten.py +++ b/src/sage/rings/polynomial/flatten.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Class to flatten polynomial rings over polynomial ring diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx index 8acf82c1ca9..439d2ed893e 100644 --- a/src/sage/rings/polynomial/hilbert.pyx +++ b/src/sage/rings/polynomial/hilbert.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- coding: utf-8 -*- r""" Compute Hilbert series of monomial ideals diff --git a/src/sage/rings/polynomial/ideal.py b/src/sage/rings/polynomial/ideal.py index 7637a067d9c..9719c81ba41 100644 --- a/src/sage/rings/polynomial/ideal.py +++ b/src/sage/rings/polynomial/ideal.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- """ Ideals in Univariate Polynomial Rings diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index 67c6d819ad5..b135404a020 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Elements of Infinite Polynomial Rings diff --git a/src/sage/rings/polynomial/infinite_polynomial_ring.py b/src/sage/rings/polynomial/infinite_polynomial_ring.py index 02e2949b1f9..dbb71289f89 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_ring.py +++ b/src/sage/rings/polynomial/infinite_polynomial_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Infinite Polynomial Rings diff --git a/src/sage/rings/polynomial/laurent_polynomial.pxd b/src/sage/rings/polynomial/laurent_polynomial.pxd index 7ebefd0ba0e..8e9107aeb47 100644 --- a/src/sage/rings/polynomial/laurent_polynomial.pxd +++ b/src/sage/rings/polynomial/laurent_polynomial.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport CommutativeAlgebraElement, ModuleElement, RingElement, Element diff --git a/src/sage/rings/polynomial/laurent_polynomial.pyx b/src/sage/rings/polynomial/laurent_polynomial.pyx index 831916cc804..a830ef7f510 100644 --- a/src/sage/rings/polynomial/laurent_polynomial.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Elements of Laurent polynomial rings """ diff --git a/src/sage/rings/polynomial/laurent_polynomial_ideal.py b/src/sage/rings/polynomial/laurent_polynomial_ideal.py index 5ebd560c0c0..d569dc06101 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ideal.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.singular sage.modules (because all doctests need laurent_polynomial_mpair, Groebner bases) r""" Ideals in Laurent polynomial rings. diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pxd b/src/sage/rings/polynomial/laurent_polynomial_mpair.pxd index a93da987a1c..79f09def6aa 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pxd +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.polynomial.laurent_polynomial cimport LaurentPolynomial from sage.rings.polynomial.multi_polynomial cimport MPolynomial from sage.rings.polynomial.polydict cimport ETuple, PolyDict diff --git a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx index 0122ba41ea2..c03239cebde 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx +++ b/src/sage/rings/polynomial/laurent_polynomial_mpair.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements of multivariate Laurent polynomial rings """ diff --git a/src/sage/rings/polynomial/laurent_polynomial_ring.py b/src/sage/rings/polynomial/laurent_polynomial_ring.py index b93926101a6..6d24de9f96f 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ring.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Ring of Laurent Polynomials diff --git a/src/sage/rings/polynomial/laurent_polynomial_ring_base.py b/src/sage/rings/polynomial/laurent_polynomial_ring_base.py index 47ed7486875..21cc29329e6 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ring_base.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ring_base.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.modules r""" Ring of Laurent Polynomials (base class) diff --git a/src/sage/rings/polynomial/msolve.py b/src/sage/rings/polynomial/msolve.py index d15d498c040..47775f9bd8c 100644 --- a/src/sage/rings/polynomial/msolve.py +++ b/src/sage/rings/polynomial/msolve.py @@ -1,3 +1,4 @@ +# coding: utf-8 r""" Solution of polynomial systems using msolve diff --git a/src/sage/rings/polynomial/multi_polynomial.pxd b/src/sage/rings/polynomial/multi_polynomial.pxd index e6792991411..9c96ce7a505 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pxd +++ b/src/sage/rings/polynomial/multi_polynomial.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.polynomial.commutative_polynomial cimport CommutativePolynomial diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index 2227d050886..37247f36571 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Base class for elements of multivariate polynomial rings """ diff --git a/src/sage/rings/polynomial/multi_polynomial_element.py b/src/sage/rings/polynomial/multi_polynomial_element.py index a2320652bbd..d2355aa257b 100644 --- a/src/sage/rings/polynomial/multi_polynomial_element.py +++ b/src/sage/rings/polynomial/multi_polynomial_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Generic Multivariate Polynomials diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal.py b/src/sage/rings/polynomial/multi_polynomial_ideal.py index 817f62b0f95..f80f7b141a7 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ideal.py +++ b/src/sage/rings/polynomial/multi_polynomial_ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.singular r""" Ideals in multivariate polynomial rings diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd b/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd index 8eb858d329f..58f853973dc 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +++ b/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.libs.singular.decl cimport ideal, ring cdef object singular_ideal_to_sage_sequence(ideal *i, ring *r, object parent) diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx index af6c00bd02e..14820418454 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular """ Direct low-level access to SINGULAR's Groebner basis engine via libSINGULAR diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd b/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd index c71bc792d00..5cc546112c9 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.libs.singular.decl cimport poly, ring from sage.rings.polynomial.multi_polynomial cimport MPolynomial_libsingular as MPolynomial_libsingular_base diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index c314072f338..40fbc8c69aa 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular r""" Multivariate Polynomials via libSINGULAR diff --git a/src/sage/rings/polynomial/multi_polynomial_ring.py b/src/sage/rings/polynomial/multi_polynomial_ring.py index 0b2761293ca..daed8502cdf 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring.py +++ b/src/sage/rings/polynomial/multi_polynomial_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Multivariate Polynomial Rings over Generic Rings diff --git a/src/sage/rings/polynomial/multi_polynomial_ring_base.pxd b/src/sage/rings/polynomial/multi_polynomial_ring_base.pxd index 5e83879afab..4ce9033dadb 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring_base.pxd +++ b/src/sage/rings/polynomial/multi_polynomial_ring_base.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-categories - from sage.rings.ring cimport CommutativeRing, Ring from sage.structure.parent cimport Parent diff --git a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx index 2d52adf36e7..4ad2a3f1fa9 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Base class for multivariate polynomial rings """ diff --git a/src/sage/rings/polynomial/multi_polynomial_sequence.py b/src/sage/rings/polynomial/multi_polynomial_sequence.py index 214743af282..e9476061b57 100644 --- a/src/sage/rings/polynomial/multi_polynomial_sequence.py +++ b/src/sage/rings/polynomial/multi_polynomial_sequence.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Polynomial Sequences diff --git a/src/sage/rings/polynomial/ore_function_element.py b/src/sage/rings/polynomial/ore_function_element.py index 2f74a939c6b..f44dd8ad880 100644 --- a/src/sage/rings/polynomial/ore_function_element.py +++ b/src/sage/rings/polynomial/ore_function_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Fraction field elements of Ore polynomial rings diff --git a/src/sage/rings/polynomial/ore_function_field.py b/src/sage/rings/polynomial/ore_function_field.py index aea971b1689..8bb86d0dba8 100644 --- a/src/sage/rings/polynomial/ore_function_field.py +++ b/src/sage/rings/polynomial/ore_function_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Fraction fields of Ore polynomial rings diff --git a/src/sage/rings/polynomial/ore_polynomial_element.pxd b/src/sage/rings/polynomial/ore_polynomial_element.pxd index f706b47fd7a..f38bcb0f0c5 100644 --- a/src/sage/rings/polynomial/ore_polynomial_element.pxd +++ b/src/sage/rings/polynomial/ore_polynomial_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport AlgebraElement from sage.structure.parent cimport Parent from sage.rings.integer cimport Integer diff --git a/src/sage/rings/polynomial/ore_polynomial_element.pyx b/src/sage/rings/polynomial/ore_polynomial_element.pyx index 7cf35766986..47b5b7e6ad7 100644 --- a/src/sage/rings/polynomial/ore_polynomial_element.pyx +++ b/src/sage/rings/polynomial/ore_polynomial_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Univariate Ore polynomials diff --git a/src/sage/rings/polynomial/ore_polynomial_ring.py b/src/sage/rings/polynomial/ore_polynomial_ring.py index c3452e5b7f3..c8af00da1ad 100644 --- a/src/sage/rings/polynomial/ore_polynomial_ring.py +++ b/src/sage/rings/polynomial/ore_polynomial_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Univariate Ore polynomial rings diff --git a/src/sage/rings/polynomial/padics/all.py b/src/sage/rings/polynomial/padics/all.py index 01c9cb07cd5..e69de29bb2d 100644 --- a/src/sage/rings/polynomial/padics/all.py +++ b/src/sage/rings/polynomial/padics/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-pari diff --git a/src/sage/rings/polynomial/padics/polynomial_padic.py b/src/sage/rings/polynomial/padics/polynomial_padic.py index 0ed7179909f..2e9e1f36da1 100644 --- a/src/sage/rings/polynomial/padics/polynomial_padic.py +++ b/src/sage/rings/polynomial/padics/polynomial_padic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Base class for generic `p`-adic polynomials diff --git a/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py b/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py index 8bfb7270eeb..ebae8acfcff 100644 --- a/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py +++ b/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari # sage.doctest: needs sage.libs.ntl """ p-adic Capped Relative Dense Polynomials diff --git a/src/sage/rings/polynomial/padics/polynomial_padic_flat.py b/src/sage/rings/polynomial/padics/polynomial_padic_flat.py index a4fced39029..6d25e6a0a5f 100644 --- a/src/sage/rings/polynomial/padics/polynomial_padic_flat.py +++ b/src/sage/rings/polynomial/padics/polynomial_padic_flat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ p-adic Flat Polynomials """ diff --git a/src/sage/rings/polynomial/pbori/PyPolyBoRi.py b/src/sage/rings/polynomial/pbori/PyPolyBoRi.py index a33da76b252..18ca366fb85 100644 --- a/src/sage/rings/polynomial/pbori/PyPolyBoRi.py +++ b/src/sage/rings/polynomial/pbori/PyPolyBoRi.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial r""" PolyBoRi's interface to libpolybori/BRiAL diff --git a/src/sage/rings/polynomial/pbori/__init__.py b/src/sage/rings/polynomial/pbori/__init__.py index 257a9b7d6a7..325ed646516 100644 --- a/src/sage/rings/polynomial/pbori/__init__.py +++ b/src/sage/rings/polynomial/pbori/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial """The PolyBoRi package implements a framework for computations with Polynomials in Boolean Ring. The core of PolyBoRi is a C++ library, which provides high-level data types for Boolean polynomials and monomials, diff --git a/src/sage/rings/polynomial/pbori/blocks.py b/src/sage/rings/polynomial/pbori/blocks.py index fac47ac31e6..ba6b9c7b493 100644 --- a/src/sage/rings/polynomial/pbori/blocks.py +++ b/src/sage/rings/polynomial/pbori/blocks.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial import sys from itertools import chain, islice diff --git a/src/sage/rings/polynomial/pbori/cnf.py b/src/sage/rings/polynomial/pbori/cnf.py index f09c33e7f78..266a6f0f8a8 100644 --- a/src/sage/rings/polynomial/pbori/cnf.py +++ b/src/sage/rings/polynomial/pbori/cnf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from random import Random from sage.rings.polynomial.pbori.pbori import if_then_else as ite from .PyPolyBoRi import Polynomial diff --git a/src/sage/rings/polynomial/pbori/easy_polynomials.py b/src/sage/rings/polynomial/pbori/easy_polynomials.py index 0b24da41ded..8451e7536ee 100644 --- a/src/sage/rings/polynomial/pbori/easy_polynomials.py +++ b/src/sage/rings/polynomial/pbori/easy_polynomials.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .interpolate import variety_lex_leading_terms, nf_lex_points from .pbori import easy_linear_factors diff --git a/src/sage/rings/polynomial/pbori/fglm.py b/src/sage/rings/polynomial/pbori/fglm.py index f9e0d3a4fe4..60559b31b85 100644 --- a/src/sage/rings/polynomial/pbori/fglm.py +++ b/src/sage/rings/polynomial/pbori/fglm.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .pbori import BooleSet, FGLMStrategy from .PyPolyBoRi import BoolePolynomialVector, Polynomial diff --git a/src/sage/rings/polynomial/pbori/frontend.py b/src/sage/rings/polynomial/pbori/frontend.py index 94f03a44490..b0072cd5abf 100644 --- a/src/sage/rings/polynomial/pbori/frontend.py +++ b/src/sage/rings/polynomial/pbori/frontend.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial # Import basic functionality r""" This module defines an initial ring, and patches the declare_ring to use diff --git a/src/sage/rings/polynomial/pbori/gbcore.py b/src/sage/rings/polynomial/pbori/gbcore.py index c33556d132b..3eb6a73ff25 100644 --- a/src/sage/rings/polynomial/pbori/gbcore.py +++ b/src/sage/rings/polynomial/pbori/gbcore.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from copy import copy from itertools import chain from inspect import getfullargspec as getargspec diff --git a/src/sage/rings/polynomial/pbori/gbrefs.py b/src/sage/rings/polynomial/pbori/gbrefs.py index 2f617e3192a..70dc795cbab 100644 --- a/src/sage/rings/polynomial/pbori/gbrefs.py +++ b/src/sage/rings/polynomial/pbori/gbrefs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial import gzip from io import StringIO import base64 as uu diff --git a/src/sage/rings/polynomial/pbori/heuristics.py b/src/sage/rings/polynomial/pbori/heuristics.py index 053694a7ba2..5dcfca16f87 100644 --- a/src/sage/rings/polynomial/pbori/heuristics.py +++ b/src/sage/rings/polynomial/pbori/heuristics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .PyPolyBoRi import Polynomial, gauss_on_polys diff --git a/src/sage/rings/polynomial/pbori/interpolate.py b/src/sage/rings/polynomial/pbori/interpolate.py index a804ccc8ae7..68f25d57bb2 100644 --- a/src/sage/rings/polynomial/pbori/interpolate.py +++ b/src/sage/rings/polynomial/pbori/interpolate.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial # Copyright (c) 2005-2007 by The PolyBoRi Team from time import process_time as clock from random import Random diff --git a/src/sage/rings/polynomial/pbori/interred.py b/src/sage/rings/polynomial/pbori/interred.py index 8d7c3608284..fe59be30896 100644 --- a/src/sage/rings/polynomial/pbori/interred.py +++ b/src/sage/rings/polynomial/pbori/interred.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .pbori import ReductionStrategy from .PyPolyBoRi import Polynomial diff --git a/src/sage/rings/polynomial/pbori/ll.py b/src/sage/rings/polynomial/pbori/ll.py index 581e61f24d6..71a01bd3b50 100644 --- a/src/sage/rings/polynomial/pbori/ll.py +++ b/src/sage/rings/polynomial/pbori/ll.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .pbori import (top_index, if_then_else, substitute_variables, BooleSet, ll_red_nf_redsb, ll_red_nf_noredsb, diff --git a/src/sage/rings/polynomial/pbori/nf.py b/src/sage/rings/polynomial/pbori/nf.py index d35208f814f..ac6e447c525 100644 --- a/src/sage/rings/polynomial/pbori/nf.py +++ b/src/sage/rings/polynomial/pbori/nf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from sage.rings.polynomial.pbori.pbori import mod_mon_set from .pbori import (BooleSet, GroebnerStrategy, ReductionStrategy, parallel_reduce, easy_linear_factors) diff --git a/src/sage/rings/polynomial/pbori/parallel.py b/src/sage/rings/polynomial/pbori/parallel.py index 8bd7ca89e8e..be10865dd50 100644 --- a/src/sage/rings/polynomial/pbori/parallel.py +++ b/src/sage/rings/polynomial/pbori/parallel.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial # coding=utf-8 r""" parallel.py diff --git a/src/sage/rings/polynomial/pbori/pbori.pxd b/src/sage/rings/polynomial/pbori/pbori.pxd index 1cb2e136f8b..ae4ac1353d2 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pxd +++ b/src/sage/rings/polynomial/pbori/pbori.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from libcpp.memory cimport unique_ptr, shared_ptr, make_shared from sage.rings.polynomial.multi_polynomial_ring_base cimport MPolynomialRing_base, BooleanPolynomialRing_base diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx index 426506e500f..702847ba332 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pyx +++ b/src/sage/rings/polynomial/pbori/pbori.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial # distutils: libraries = brial brial_groebner M4RI_LIBRARIES LIBPNG_LIBRARIES # distutils: library_dirs = M4RI_LIBDIR LIBPNG_LIBDIR # distutils: include_dirs = M4RI_INCDIR LIBPNG_INCDIR diff --git a/src/sage/rings/polynomial/pbori/randompoly.py b/src/sage/rings/polynomial/pbori/randompoly.py index bc9729c4749..1e0dcd56189 100644 --- a/src/sage/rings/polynomial/pbori/randompoly.py +++ b/src/sage/rings/polynomial/pbori/randompoly.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from random import Random from pprint import pformat diff --git a/src/sage/rings/polynomial/pbori/rank.py b/src/sage/rings/polynomial/pbori/rank.py index ec7160cb73c..bf16e6220ce 100644 --- a/src/sage/rings/polynomial/pbori/rank.py +++ b/src/sage/rings/polynomial/pbori/rank.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial def input_signals(p): return list((p + p.lex_lead()).vars_as_monomial().variables()) diff --git a/src/sage/rings/polynomial/pbori/specialsets.py b/src/sage/rings/polynomial/pbori/specialsets.py index 5fbe7ae560f..74f56c2faf5 100644 --- a/src/sage/rings/polynomial/pbori/specialsets.py +++ b/src/sage/rings/polynomial/pbori/specialsets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .pbori import (top_index, if_then_else, mod_mon_set, BooleSet, BooleConstant) from .PyPolyBoRi import (Polynomial, Monomial, Variable) diff --git a/src/sage/rings/polynomial/pbori/statistics.py b/src/sage/rings/polynomial/pbori/statistics.py index ad6563c6a99..93cced307a7 100644 --- a/src/sage/rings/polynomial/pbori/statistics.py +++ b/src/sage/rings/polynomial/pbori/statistics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-brial from .pbori import top_index, BooleConstant from .PyPolyBoRi import Monomial, Polynomial diff --git a/src/sage/rings/polynomial/plural.pxd b/src/sage/rings/polynomial/plural.pxd index 0c1eaa5ec53..90b79947592 100644 --- a/src/sage/rings/polynomial/plural.pxd +++ b/src/sage/rings/polynomial/plural.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular from sage.libs.singular.decl cimport * from sage.rings.ring cimport Ring from sage.structure.element cimport RingElement, Element diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx index 78e076c41cd..23dd2a11179 100644 --- a/src/sage/rings/polynomial/plural.pyx +++ b/src/sage/rings/polynomial/plural.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-singular r""" Noncommutative polynomials via libSINGULAR/Plural diff --git a/src/sage/rings/polynomial/polydict.pxd b/src/sage/rings/polynomial/polydict.pxd index 12c8f77843a..69ddc888378 100644 --- a/src/sage/rings/polynomial/polydict.pxd +++ b/src/sage/rings/polynomial/polydict.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef class PolyDict: cdef dict __repn diff --git a/src/sage/rings/polynomial/polydict.pyx b/src/sage/rings/polynomial/polydict.pyx index c66babde7cf..e579052df95 100644 --- a/src/sage/rings/polynomial/polydict.pyx +++ b/src/sage/rings/polynomial/polydict.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Generic data structures for multivariate polynomials diff --git a/src/sage/rings/polynomial/polynomial_compiled.pxd b/src/sage/rings/polynomial/polynomial_compiled.pxd index b0fee780414..e1b11ec1a41 100644 --- a/src/sage/rings/polynomial/polynomial_compiled.pxd +++ b/src/sage/rings/polynomial/polynomial_compiled.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.misc.binary_tree import BinaryTree from sage.misc.binary_tree cimport BinaryTree diff --git a/src/sage/rings/polynomial/polynomial_compiled.pyx b/src/sage/rings/polynomial/polynomial_compiled.pyx index fd54f9117bb..1a140067ad3 100644 --- a/src/sage/rings/polynomial/polynomial_compiled.pyx +++ b/src/sage/rings/polynomial/polynomial_compiled.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Polynomial Compilers diff --git a/src/sage/rings/polynomial/polynomial_complex_arb.pxd b/src/sage/rings/polynomial/polynomial_complex_arb.pxd index 4c198a4b945..bda5cc66008 100644 --- a/src/sage/rings/polynomial/polynomial_complex_arb.pxd +++ b/src/sage/rings/polynomial/polynomial_complex_arb.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - from sage.libs.flint.acb_poly cimport * from sage.rings.polynomial.polynomial_element cimport Polynomial diff --git a/src/sage/rings/polynomial/polynomial_complex_arb.pyx b/src/sage/rings/polynomial/polynomial_complex_arb.pyx index 305bae3595f..da1ade2edcb 100644 --- a/src/sage/rings/polynomial/polynomial_complex_arb.pyx +++ b/src/sage/rings/polynomial/polynomial_complex_arb.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- coding: utf-8 r""" Univariate polynomials over `\CC` with Arb ball coefficients. diff --git a/src/sage/rings/polynomial/polynomial_element.pxd b/src/sage/rings/polynomial/polynomial_element.pxd index f5b9363cc4c..a8f2cf3057b 100644 --- a/src/sage/rings/polynomial/polynomial_element.pxd +++ b/src/sage/rings/polynomial/polynomial_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element import Element from sage.structure.element cimport Element, CommutativeAlgebraElement, ModuleElement from sage.structure.parent cimport Parent diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 0c49f638fcf..e9b09e8f2b7 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# coding: utf-8 """ Univariate polynomial base class diff --git a/src/sage/rings/polynomial/polynomial_element_generic.py b/src/sage/rings/polynomial/polynomial_element_generic.py index ad49cf7aa7c..370d8f22fc6 100644 --- a/src/sage/rings/polynomial/polynomial_element_generic.py +++ b/src/sage/rings/polynomial/polynomial_element_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Univariate Polynomials over domains and fields diff --git a/src/sage/rings/polynomial/polynomial_fateman.py b/src/sage/rings/polynomial/polynomial_fateman.py index 4270fb68c16..8ccf13eba09 100644 --- a/src/sage/rings/polynomial/polynomial_fateman.py +++ b/src/sage/rings/polynomial/polynomial_fateman.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories "Polynomial multiplication by Kronecker substitution" ################################################################################ # Copyright (C) 2007 William Stein diff --git a/src/sage/rings/polynomial/polynomial_gf2x.pxd b/src/sage/rings/polynomial/polynomial_gf2x.pxd index 74ae9d5c08f..293715c0379 100644 --- a/src/sage/rings/polynomial/polynomial_gf2x.pxd +++ b/src/sage/rings/polynomial/polynomial_gf2x.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox from sage.libs.ntl.GF2X cimport GF2X_c ctypedef GF2X_c celement diff --git a/src/sage/rings/polynomial/polynomial_gf2x.pyx b/src/sage/rings/polynomial/polynomial_gf2x.pyx index 074a1d699e8..c3bafe951ca 100644 --- a/src/sage/rings/polynomial/polynomial_gf2x.pyx +++ b/src/sage/rings/polynomial/polynomial_gf2x.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-linbox # distutils: libraries = gmp NTL_LIBRARIES # distutils: library_dirs = NTL_LIBDIR # distutils: extra_link_args = NTL_LIBEXTRA diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_flint.pxd b/src/sage/rings/polynomial/polynomial_integer_dense_flint.pxd index 21feeec6c95..b1b593d6a26 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_flint.pxd +++ b/src/sage/rings/polynomial/polynomial_integer_dense_flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.flint.types cimport fmpz_poly_t from sage.rings.polynomial.polynomial_element cimport Polynomial diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx b/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx index 39552eb8939..3f38f23ffdc 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_integer_dense_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pxd b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pxd index 7df59e9bc75..fcd907e1abe 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pxd +++ b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.types cimport ZZX_c from sage.rings.polynomial.polynomial_element cimport Polynomial diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx index 02591322bdc..6a0747d40e9 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pxd b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pxd index 96409fb31d5..6934acfee8d 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pxd +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.structure.element cimport Element, ModuleElement, RingElement from sage.rings.polynomial.polynomial_element cimport Polynomial diff --git a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx index 454d70e3406..31dc850e982 100644 --- a/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/polynomial/polynomial_number_field.pyx b/src/sage/rings/polynomial/polynomial_number_field.pyx index 835e899c76e..5bd458e5d12 100644 --- a/src/sage/rings/polynomial/polynomial_number_field.pyx +++ b/src/sage/rings/polynomial/polynomial_number_field.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Univariate polynomials over number fields diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py index a8d17323190..9560ffc6ddc 100644 --- a/src/sage/rings/polynomial/polynomial_quotient_ring.py +++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.pari """ Quotients of Univariate Polynomial Rings diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring_element.py b/src/sage/rings/polynomial/polynomial_quotient_ring_element.py index ecc619159ee..b1414f7e715 100644 --- a/src/sage/rings/polynomial/polynomial_quotient_ring_element.py +++ b/src/sage/rings/polynomial/polynomial_quotient_ring_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.pari r""" Elements of Quotients of Univariate Polynomial Rings diff --git a/src/sage/rings/polynomial/polynomial_rational_flint.pxd b/src/sage/rings/polynomial/polynomial_rational_flint.pxd index b5983a1b8e1..f4644f19d04 100644 --- a/src/sage/rings/polynomial/polynomial_rational_flint.pxd +++ b/src/sage/rings/polynomial/polynomial_rational_flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint ############################################################################### # Copyright (C) 2010 Sebastian Pancratz # # # diff --git a/src/sage/rings/polynomial/polynomial_rational_flint.pyx b/src/sage/rings/polynomial/polynomial_rational_flint.pyx index 1f813eba8b6..c67ddf1a4c5 100644 --- a/src/sage/rings/polynomial/polynomial_rational_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_rational_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx b/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx index 57ab881c523..9aae84a3143 100644 --- a/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +++ b/src/sage/rings/polynomial/polynomial_real_mpfr_dense.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Dense univariate polynomials over `\RR`, implemented using MPFR diff --git a/src/sage/rings/polynomial/polynomial_ring.py b/src/sage/rings/polynomial/polynomial_ring.py index ac97b65130c..d2dab0db512 100644 --- a/src/sage/rings/polynomial/polynomial_ring.py +++ b/src/sage/rings/polynomial/polynomial_ring.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- """ Univariate Polynomial Rings diff --git a/src/sage/rings/polynomial/polynomial_ring_constructor.py b/src/sage/rings/polynomial/polynomial_ring_constructor.py index 3e1b6eaad2d..2a1fb99131f 100644 --- a/src/sage/rings/polynomial/polynomial_ring_constructor.py +++ b/src/sage/rings/polynomial/polynomial_ring_constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Constructors for polynomial rings diff --git a/src/sage/rings/polynomial/polynomial_ring_homomorphism.pxd b/src/sage/rings/polynomial/polynomial_ring_homomorphism.pxd index 5d6b14623c3..eccb83b1ec2 100644 --- a/src/sage/rings/polynomial/polynomial_ring_homomorphism.pxd +++ b/src/sage/rings/polynomial/polynomial_ring_homomorphism.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.morphism cimport RingHomomorphism_from_base cdef class PolynomialRingHomomorphism_from_base(RingHomomorphism_from_base): diff --git a/src/sage/rings/polynomial/polynomial_ring_homomorphism.pyx b/src/sage/rings/polynomial/polynomial_ring_homomorphism.pyx index a4476e0eec6..7e3e27dd520 100644 --- a/src/sage/rings/polynomial/polynomial_ring_homomorphism.pyx +++ b/src/sage/rings/polynomial/polynomial_ring_homomorphism.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Ring homomorphisms from a polynomial ring to another ring diff --git a/src/sage/rings/polynomial/polynomial_singular_interface.py b/src/sage/rings/polynomial/polynomial_singular_interface.py index 399b50f6d79..761fb0f0d69 100644 --- a/src/sage/rings/polynomial/polynomial_singular_interface.py +++ b/src/sage/rings/polynomial/polynomial_singular_interface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Polynomial Interfaces to Singular diff --git a/src/sage/rings/polynomial/polynomial_template.pxi b/src/sage/rings/polynomial/polynomial_template.pxi index 8c73afa0e74..6d9621eac67 100644 --- a/src/sage/rings/polynomial/polynomial_template.pxi +++ b/src/sage/rings/polynomial/polynomial_template.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl """ Polynomial Template for C/C++ Library Interfaces """ diff --git a/src/sage/rings/polynomial/polynomial_template_header.pxi b/src/sage/rings/polynomial/polynomial_template_header.pxi index 091f92a9d05..64ab106f314 100644 --- a/src/sage/rings/polynomial/polynomial_template_header.pxi +++ b/src/sage/rings/polynomial/polynomial_template_header.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl """ Polynomial Template for C/C++ Library Interfaces """ diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pxd b/src/sage/rings/polynomial/polynomial_zmod_flint.pxd index bfee3e8a037..c6a92f3df6c 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pxd +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.libs.flint.types cimport nmod_poly_t, nmod_poly_struct, fmpz_poly_t from sage.structure.parent cimport Parent from sage.rings.polynomial.polynomial_integer_dense_flint cimport Polynomial_integer_dense_flint diff --git a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx index ad4ac79fa5b..d08395dc8e8 100644 --- a/src/sage/rings/polynomial/polynomial_zmod_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_zmod_flint.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: libraries = gmp NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pxd b/src/sage/rings/polynomial/polynomial_zz_pex.pxd index 3107ef76a39..ca60398ef68 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pxd +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.ntl.ZZ_pEX cimport ZZ_pEX_c from sage.libs.ntl.ntl_ZZ_pEContext cimport ZZ_pEContext_ptrs diff --git a/src/sage/rings/polynomial/polynomial_zz_pex.pyx b/src/sage/rings/polynomial/polynomial_zz_pex.pyx index 006953f182f..b8c9d0bcbd8 100644 --- a/src/sage/rings/polynomial/polynomial_zz_pex.pyx +++ b/src/sage/rings/polynomial/polynomial_zz_pex.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # sage.doctest: needs sage.libs.ntl sage.rings.finite_rings # distutils: libraries = NTL_LIBRARIES gmp # distutils: extra_compile_args = NTL_CFLAGS diff --git a/src/sage/rings/polynomial/real_roots.pxd b/src/sage/rings/polynomial/real_roots.pxd index e625d82b2b7..17b3ef6d8b8 100644 --- a/src/sage/rings/polynomial/real_roots.pxd +++ b/src/sage/rings/polynomial/real_roots.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint from sage.rings.rational cimport Rational from sage.modules.vector_integer_dense cimport Vector_integer_dense from sage.modules.vector_real_double_dense cimport Vector_real_double_dense diff --git a/src/sage/rings/polynomial/real_roots.pyx b/src/sage/rings/polynomial/real_roots.pyx index 4952aa4a51a..99587194f5f 100644 --- a/src/sage/rings/polynomial/real_roots.pyx +++ b/src/sage/rings/polynomial/real_roots.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs numpy sage.libs.linbox """ Isolate Real Roots of Real Polynomials diff --git a/src/sage/rings/polynomial/refine_root.pyx b/src/sage/rings/polynomial/refine_root.pyx index 1d5b806abd3..32a9ce8c8e4 100644 --- a/src/sage/rings/polynomial/refine_root.pyx +++ b/src/sage/rings/polynomial/refine_root.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint """ Refine polynomial roots using Newton--Raphson diff --git a/src/sage/rings/polynomial/skew_polynomial_element.pxd b/src/sage/rings/polynomial/skew_polynomial_element.pxd index aad3d2791f9..1eb38b5b474 100644 --- a/src/sage/rings/polynomial/skew_polynomial_element.pxd +++ b/src/sage/rings/polynomial/skew_polynomial_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.polynomial.ore_polynomial_element cimport OrePolynomial_generic_dense cdef class SkewPolynomial_generic_dense(OrePolynomial_generic_dense): diff --git a/src/sage/rings/polynomial/skew_polynomial_element.pyx b/src/sage/rings/polynomial/skew_polynomial_element.pyx index 80d29f54703..cf5fd9bd090 100644 --- a/src/sage/rings/polynomial/skew_polynomial_element.pyx +++ b/src/sage/rings/polynomial/skew_polynomial_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Univariate skew polynomials diff --git a/src/sage/rings/polynomial/skew_polynomial_finite_field.pxd b/src/sage/rings/polynomial/skew_polynomial_finite_field.pxd index acb0e1bfe5e..f27cfdd6ff1 100644 --- a/src/sage/rings/polynomial/skew_polynomial_finite_field.pxd +++ b/src/sage/rings/polynomial/skew_polynomial_finite_field.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.polynomial.skew_polynomial_finite_order cimport SkewPolynomial_finite_order_dense cdef class SkewPolynomial_finite_field_dense (SkewPolynomial_finite_order_dense): diff --git a/src/sage/rings/polynomial/skew_polynomial_finite_field.pyx b/src/sage/rings/polynomial/skew_polynomial_finite_field.pyx index 35a8f87f910..b9538d07263 100644 --- a/src/sage/rings/polynomial/skew_polynomial_finite_field.pyx +++ b/src/sage/rings/polynomial/skew_polynomial_finite_field.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.rings.finite_rings r""" Univariate dense skew polynomials over finite fields diff --git a/src/sage/rings/polynomial/skew_polynomial_finite_order.pxd b/src/sage/rings/polynomial/skew_polynomial_finite_order.pxd index 876c15e505c..438773a39ef 100644 --- a/src/sage/rings/polynomial/skew_polynomial_finite_order.pxd +++ b/src/sage/rings/polynomial/skew_polynomial_finite_order.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.polynomial.skew_polynomial_element cimport SkewPolynomial_generic_dense cdef class SkewPolynomial_finite_order_dense (SkewPolynomial_generic_dense): diff --git a/src/sage/rings/polynomial/skew_polynomial_finite_order.pyx b/src/sage/rings/polynomial/skew_polynomial_finite_order.pyx index 28ed9e7e3fb..fcda4420378 100644 --- a/src/sage/rings/polynomial/skew_polynomial_finite_order.pyx +++ b/src/sage/rings/polynomial/skew_polynomial_finite_order.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat sage.rings.finite_rings r""" Univariate dense skew polynomials over a field with a finite order automorphism diff --git a/src/sage/rings/polynomial/skew_polynomial_ring.py b/src/sage/rings/polynomial/skew_polynomial_ring.py index f962fd1add5..db5285ff66f 100644 --- a/src/sage/rings/polynomial/skew_polynomial_ring.py +++ b/src/sage/rings/polynomial/skew_polynomial_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.combinat r""" Univariate skew polynomial rings diff --git a/src/sage/rings/polynomial/symmetric_ideal.py b/src/sage/rings/polynomial/symmetric_ideal.py index 927e0f95bbb..b8a5c2dea6f 100644 --- a/src/sage/rings/polynomial/symmetric_ideal.py +++ b/src/sage/rings/polynomial/symmetric_ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.singular """ Symmetric Ideals of Infinite Polynomial Rings diff --git a/src/sage/rings/polynomial/symmetric_reduction.pxd b/src/sage/rings/polynomial/symmetric_reduction.pxd index 5b6a616ca54..49bd292f995 100644 --- a/src/sage/rings/polynomial/symmetric_reduction.pxd +++ b/src/sage/rings/polynomial/symmetric_reduction.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories cdef class SymmetricReductionStrategy: cdef list _lm cdef list _lengths diff --git a/src/sage/rings/polynomial/symmetric_reduction.pyx b/src/sage/rings/polynomial/symmetric_reduction.pyx index ddac28e3431..e873fcc5397 100644 --- a/src/sage/rings/polynomial/symmetric_reduction.pyx +++ b/src/sage/rings/polynomial/symmetric_reduction.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.libs.singular r""" Symmetric Reduction of Infinite Polynomials diff --git a/src/sage/rings/polynomial/term_order.py b/src/sage/rings/polynomial/term_order.py index b8cd7e3615e..4a3e78fe879 100644 --- a/src/sage/rings/polynomial/term_order.py +++ b/src/sage/rings/polynomial/term_order.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Term orders diff --git a/src/sage/rings/polynomial/toy_buchberger.py b/src/sage/rings/polynomial/toy_buchberger.py index 1e63c1cdc35..4edd2491b6d 100644 --- a/src/sage/rings/polynomial/toy_buchberger.py +++ b/src/sage/rings/polynomial/toy_buchberger.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Educational versions of Groebner basis algorithms diff --git a/src/sage/rings/polynomial/toy_d_basis.py b/src/sage/rings/polynomial/toy_d_basis.py index 5a5f79169d4..ec783625140 100644 --- a/src/sage/rings/polynomial/toy_d_basis.py +++ b/src/sage/rings/polynomial/toy_d_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Educational version of the `d`-Groebner basis algorithm over PIDs diff --git a/src/sage/rings/polynomial/toy_variety.py b/src/sage/rings/polynomial/toy_variety.py index d413a6a9892..7a393595b61 100644 --- a/src/sage/rings/polynomial/toy_variety.py +++ b/src/sage/rings/polynomial/toy_variety.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Educational versions of Groebner basis algorithms: triangular factorization diff --git a/src/sage/rings/polynomial/weil/all.py b/src/sage/rings/polynomial/weil/all.py index 94578021f15..6b00c9bee88 100644 --- a/src/sage/rings/polynomial/weil/all.py +++ b/src/sage/rings/polynomial/weil/all.py @@ -1,4 +1,2 @@ -# sage_setup: distribution = sagemath-flint from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.polynomial.weil.weil_polynomials', 'WeilPolynomials') -del lazy_import diff --git a/src/sage/rings/polynomial/weil/weil_polynomials.pyx b/src/sage/rings/polynomial/weil/weil_polynomials.pyx index 8ba5b96d431..6a73e2748e4 100755 --- a/src/sage/rings/polynomial/weil/weil_polynomials.pyx +++ b/src/sage/rings/polynomial/weil/weil_polynomials.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Iterator for Weil polynomials. diff --git a/src/sage/rings/power_series_mpoly.pxd b/src/sage/rings/power_series_mpoly.pxd index ad0723ed59c..d8816e694b7 100644 --- a/src/sage/rings/power_series_mpoly.pxd +++ b/src/sage/rings/power_series_mpoly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport ModuleElement from sage.rings.power_series_ring_element cimport PowerSeries diff --git a/src/sage/rings/power_series_mpoly.pyx b/src/sage/rings/power_series_mpoly.pyx index 5da16c563f0..714d939c30b 100644 --- a/src/sage/rings/power_series_mpoly.pyx +++ b/src/sage/rings/power_series_mpoly.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # NOT ready to be used -- possibly should be deleted. from sage.rings.power_series_ring_element cimport PowerSeries diff --git a/src/sage/rings/power_series_pari.pxd b/src/sage/rings/power_series_pari.pxd index d421ff4eda0..35b37929c33 100644 --- a/src/sage/rings/power_series_pari.pxd +++ b/src/sage/rings/power_series_pari.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from cypari2.gen cimport Gen as pari_gen from sage.rings.power_series_ring_element cimport PowerSeries diff --git a/src/sage/rings/power_series_pari.pyx b/src/sage/rings/power_series_pari.pyx index dae90e27970..24792c94123 100644 --- a/src/sage/rings/power_series_pari.pyx +++ b/src/sage/rings/power_series_pari.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Power series implemented using PARI diff --git a/src/sage/rings/power_series_poly.pxd b/src/sage/rings/power_series_poly.pxd index e31c8bf6feb..e37e1fb26cf 100644 --- a/src/sage/rings/power_series_poly.pxd +++ b/src/sage/rings/power_series_poly.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.power_series_ring_element cimport PowerSeries from sage.rings.polynomial.polynomial_element cimport Polynomial from sage.categories.action cimport Action diff --git a/src/sage/rings/power_series_poly.pyx b/src/sage/rings/power_series_poly.pyx index 17cbdc8a6b8..e1c45ff5d51 100644 --- a/src/sage/rings/power_series_poly.pyx +++ b/src/sage/rings/power_series_poly.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- """ Power Series Methods diff --git a/src/sage/rings/power_series_ring.py b/src/sage/rings/power_series_ring.py index 757d77007ee..f4f97428011 100644 --- a/src/sage/rings/power_series_ring.py +++ b/src/sage/rings/power_series_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Power Series Rings diff --git a/src/sage/rings/power_series_ring_element.pxd b/src/sage/rings/power_series_ring_element.pxd index d9b04b287ed..e5c031ee147 100644 --- a/src/sage/rings/power_series_ring_element.pxd +++ b/src/sage/rings/power_series_ring_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport AlgebraElement, RingElement cdef class PowerSeries(AlgebraElement): diff --git a/src/sage/rings/power_series_ring_element.pyx b/src/sage/rings/power_series_ring_element.pyx index dd213ed786d..1505a49a995 100644 --- a/src/sage/rings/power_series_ring_element.pyx +++ b/src/sage/rings/power_series_ring_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Power Series diff --git a/src/sage/rings/puiseux_series_ring.py b/src/sage/rings/puiseux_series_ring.py index ab91427ce67..f5e02b28f82 100644 --- a/src/sage/rings/puiseux_series_ring.py +++ b/src/sage/rings/puiseux_series_ring.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Puiseux Series Ring diff --git a/src/sage/rings/puiseux_series_ring_element.pxd b/src/sage/rings/puiseux_series_ring_element.pxd index 1719cd3e118..50852a42d33 100644 --- a/src/sage/rings/puiseux_series_ring_element.pxd +++ b/src/sage/rings/puiseux_series_ring_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport AlgebraElement, ModuleElement from sage.rings.laurent_series_ring_element cimport LaurentSeries diff --git a/src/sage/rings/puiseux_series_ring_element.pyx b/src/sage/rings/puiseux_series_ring_element.pyx index b685ecf3335..21b1cb5b70f 100644 --- a/src/sage/rings/puiseux_series_ring_element.pyx +++ b/src/sage/rings/puiseux_series_ring_element.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Puiseux Series Ring Element diff --git a/src/sage/rings/qqbar.py b/src/sage/rings/qqbar.py index 1d29cd444d3..4e4454988ca 100644 --- a/src/sage/rings/qqbar.py +++ b/src/sage/rings/qqbar.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: needs sage.libs.linbox r""" Algebraic numbers diff --git a/src/sage/rings/qqbar_decorators.py b/src/sage/rings/qqbar_decorators.py index 32d05130a4e..13d6d562824 100644 --- a/src/sage/rings/qqbar_decorators.py +++ b/src/sage/rings/qqbar_decorators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.number_field """ QQbar decorators diff --git a/src/sage/rings/quotient_ring.py b/src/sage/rings/quotient_ring.py index df14fe04a86..de336620a34 100644 --- a/src/sage/rings/quotient_ring.py +++ b/src/sage/rings/quotient_ring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Quotient Rings diff --git a/src/sage/rings/quotient_ring_element.py b/src/sage/rings/quotient_ring_element.py index e94005cf7c6..cbedaf6ecdf 100644 --- a/src/sage/rings/quotient_ring_element.py +++ b/src/sage/rings/quotient_ring_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Quotient Ring Elements diff --git a/src/sage/rings/rational.pxd b/src/sage/rings/rational.pxd index aeb8ab68841..f42f86515d3 100644 --- a/src/sage/rings/rational.pxd +++ b/src/sage/rings/rational.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.libs.gmp.types cimport mpq_t cimport sage.structure.element diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx index bd0522a959e..92fa6fd8fc3 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # distutils: libraries = NTL_LIBRARIES # distutils: extra_compile_args = NTL_CFLAGS # distutils: include_dirs = NTL_INCDIR diff --git a/src/sage/rings/rational_field.py b/src/sage/rings/rational_field.py index c9849d68de9..7efb5e963d6 100644 --- a/src/sage/rings/rational_field.py +++ b/src/sage/rings/rational_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Field `\QQ` of Rational Numbers diff --git a/src/sage/rings/real_arb.pxd b/src/sage/rings/real_arb.pxd index 2ff63e73623..6743fa1c80b 100644 --- a/src/sage/rings/real_arb.pxd +++ b/src/sage/rings/real_arb.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-flint - from sage.libs.flint.arb cimport arb_t from sage.libs.mpfi.types cimport mpfi_t from sage.rings.real_mpfi cimport RealIntervalField_class, RealIntervalFieldElement diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx index fc919571eab..4e989f23695 100644 --- a/src/sage/rings/real_arb.pyx +++ b/src/sage/rings/real_arb.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-flint +# -*- coding: utf-8 r""" Arbitrary precision real balls diff --git a/src/sage/rings/real_double.pxd b/src/sage/rings/real_double.pxd index 8eb81cb039d..06d4121ef26 100644 --- a/src/sage/rings/real_double.pxd +++ b/src/sage/rings/real_double.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.element cimport RingElement, ModuleElement, Element, FieldElement from sage.rings.ring cimport Field cimport sage.rings.abc diff --git a/src/sage/rings/real_double.pyx b/src/sage/rings/real_double.pyx index fcfac14a96e..17842e7e80e 100644 --- a/src/sage/rings/real_double.pyx +++ b/src/sage/rings/real_double.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Double precision floating point real numbers diff --git a/src/sage/rings/real_double_element_gsl.pxd b/src/sage/rings/real_double_element_gsl.pxd index 7cc9786efa5..8025174d15c 100644 --- a/src/sage/rings/real_double_element_gsl.pxd +++ b/src/sage/rings/real_double_element_gsl.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.real_double cimport RealDoubleElement diff --git a/src/sage/rings/real_double_element_gsl.pyx b/src/sage/rings/real_double_element_gsl.pyx index d75682fe467..9d5f2d9a93b 100644 --- a/src/sage/rings/real_double_element_gsl.pyx +++ b/src/sage/rings/real_double_element_gsl.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Double Precision Real Numbers, implementation using GSL """ diff --git a/src/sage/rings/real_field.py b/src/sage/rings/real_field.py index 97e039fa20a..7b8e17eb5b9 100644 --- a/src/sage/rings/real_field.py +++ b/src/sage/rings/real_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules def create_RealField(prec=53, type="MPFR", rnd="RNDN", sci_not=0): """ Create a real field with given precision, type, rounding mode and diff --git a/src/sage/rings/real_interval_absolute.pyx b/src/sage/rings/real_interval_absolute.pyx index e8011bacb5a..d190329872e 100644 --- a/src/sage/rings/real_interval_absolute.pyx +++ b/src/sage/rings/real_interval_absolute.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # sage.doctest: # needs sage.symbolic """ Real intervals with a fixed absolute precision diff --git a/src/sage/rings/real_lazy.pxd b/src/sage/rings/real_lazy.pxd index 18dcaded7cc..60a6580a550 100644 --- a/src/sage/rings/real_lazy.pxd +++ b/src/sage/rings/real_lazy.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.rings.ring cimport Field from sage.structure.element cimport RingElement, ModuleElement, Element, FieldElement diff --git a/src/sage/rings/real_lazy.pyx b/src/sage/rings/real_lazy.pyx index 331a1d008b0..1ba394741fa 100644 --- a/src/sage/rings/real_lazy.pyx +++ b/src/sage/rings/real_lazy.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.real_interval_field sage.rings.real_mpfr """ Lazy real and complex numbers diff --git a/src/sage/rings/real_mpfi.pxd b/src/sage/rings/real_mpfi.pxd index d1275e93e6e..f107dbdd89a 100644 --- a/src/sage/rings/real_mpfi.pxd +++ b/src/sage/rings/real_mpfi.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl from sage.libs.mpfr.types cimport mpfr_prec_t from sage.libs.mpfi.types cimport mpfi_t diff --git a/src/sage/rings/real_mpfi.pyx b/src/sage/rings/real_mpfi.pyx index 9ef9464e93c..da282aceb3b 100644 --- a/src/sage/rings/real_mpfi.pyx +++ b/src/sage/rings/real_mpfi.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint r""" Arbitrary precision real intervals using MPFI diff --git a/src/sage/rings/real_mpfr.pxd b/src/sage/rings/real_mpfr.pxd index 25be80603e3..785d402836c 100644 --- a/src/sage/rings/real_mpfr.pxd +++ b/src/sage/rings/real_mpfr.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.libs.mpfr.types cimport mpfr_rnd_t, mpfr_t, mpfr_prec_t cimport sage.rings.abc diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx index 6d60172f2a7..1100a63e3fe 100644 --- a/src/sage/rings/real_mpfr.pyx +++ b/src/sage/rings/real_mpfr.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Arbitrary precision floating point real numbers using GNU MPFR diff --git a/src/sage/rings/ring.pxd b/src/sage/rings/ring.pxd index 9dcfcf56ef8..e74638b91e2 100644 --- a/src/sage/rings/ring.pxd +++ b/src/sage/rings/ring.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.parent_gens cimport ParentWithGens cpdef bint _is_Field(x) except -2 diff --git a/src/sage/rings/ring.pyx b/src/sage/rings/ring.pyx index b0920479290..fe346931ce5 100644 --- a/src/sage/rings/ring.pyx +++ b/src/sage/rings/ring.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Rings diff --git a/src/sage/rings/ring_extension.pxd b/src/sage/rings/ring_extension.pxd index 917cd952430..478bd6eef75 100644 --- a/src/sage/rings/ring_extension.pxd +++ b/src/sage/rings/ring_extension.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.categories.map cimport Map from sage.rings.ring cimport CommutativeRing diff --git a/src/sage/rings/ring_extension.pyx b/src/sage/rings/ring_extension.pyx index 4bd09913c03..9c214a1ffee 100644 --- a/src/sage/rings/ring_extension.pyx +++ b/src/sage/rings/ring_extension.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Extension of rings diff --git a/src/sage/rings/ring_extension_conversion.pxd b/src/sage/rings/ring_extension_conversion.pxd index 11c2b2b291c..e3815a411ba 100644 --- a/src/sage/rings/ring_extension_conversion.pxd +++ b/src/sage/rings/ring_extension_conversion.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.ring_extension cimport RingExtension_generic diff --git a/src/sage/rings/ring_extension_conversion.pyx b/src/sage/rings/ring_extension_conversion.pyx index dbe7d65954b..eeb6077cd0a 100644 --- a/src/sage/rings/ring_extension_conversion.pyx +++ b/src/sage/rings/ring_extension_conversion.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.finite_rings ############################################################################# diff --git a/src/sage/rings/ring_extension_element.pxd b/src/sage/rings/ring_extension_element.pxd index af53fd9876e..6b62ad58c06 100644 --- a/src/sage/rings/ring_extension_element.pxd +++ b/src/sage/rings/ring_extension_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.ring cimport CommutativeRing from sage.structure.element cimport Element from sage.structure.element cimport CommutativeAlgebraElement diff --git a/src/sage/rings/ring_extension_element.pyx b/src/sage/rings/ring_extension_element.pyx index c6785d71b39..729793d3bfa 100644 --- a/src/sage/rings/ring_extension_element.pyx +++ b/src/sage/rings/ring_extension_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements lying in extension of rings diff --git a/src/sage/rings/ring_extension_homset.py b/src/sage/rings/ring_extension_homset.py index df9e3fd149b..d2c13a11f0e 100644 --- a/src/sage/rings/ring_extension_homset.py +++ b/src/sage/rings/ring_extension_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.rings.finite_rings r""" Homset between extensions of rings diff --git a/src/sage/rings/ring_extension_morphism.pxd b/src/sage/rings/ring_extension_morphism.pxd index ad62ba49a81..a02aff31a50 100644 --- a/src/sage/rings/ring_extension_morphism.pxd +++ b/src/sage/rings/ring_extension_morphism.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.structure.element cimport Element from sage.categories.map cimport Map from sage.rings.morphism cimport RingMap diff --git a/src/sage/rings/ring_extension_morphism.pyx b/src/sage/rings/ring_extension_morphism.pyx index 2049aa2dabc..f861d015a35 100644 --- a/src/sage/rings/ring_extension_morphism.pyx +++ b/src/sage/rings/ring_extension_morphism.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Morphisms between extension of rings diff --git a/src/sage/rings/semirings/all.py b/src/sage/rings/semirings/all.py index d186e4b9fc7..b14da38328a 100644 --- a/src/sage/rings/semirings/all.py +++ b/src/sage/rings/semirings/all.py @@ -1,4 +1,2 @@ -# sage_setup: distribution = sagemath-categories - -from sage.rings.semirings.non_negative_integer_semiring import NonNegativeIntegerSemiring, NN -from sage.rings.semirings.tropical_semiring import TropicalSemiring +from .non_negative_integer_semiring import NonNegativeIntegerSemiring, NN +from .tropical_semiring import TropicalSemiring diff --git a/src/sage/rings/semirings/non_negative_integer_semiring.py b/src/sage/rings/semirings/non_negative_integer_semiring.py index b07e35ee970..1c01fc47eb5 100644 --- a/src/sage/rings/semirings/non_negative_integer_semiring.py +++ b/src/sage/rings/semirings/non_negative_integer_semiring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Non Negative Integer Semiring """ diff --git a/src/sage/rings/semirings/tropical_semiring.pyx b/src/sage/rings/semirings/tropical_semiring.pyx index d7c21b95a09..2922298e286 100644 --- a/src/sage/rings/semirings/tropical_semiring.pyx +++ b/src/sage/rings/semirings/tropical_semiring.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Tropical Semirings diff --git a/src/sage/rings/sum_of_squares.pxd b/src/sage/rings/sum_of_squares.pxd index a091a030d36..d9f2e5ae4fd 100644 --- a/src/sage/rings/sum_of_squares.pxd +++ b/src/sage/rings/sum_of_squares.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-categories from libc.stdint cimport uint_fast32_t, uint32_t cdef int two_squares_c(uint_fast32_t n, uint_fast32_t res[2]) noexcept diff --git a/src/sage/rings/sum_of_squares.pyx b/src/sage/rings/sum_of_squares.pyx index c296e2f58c9..5cd916690de 100644 --- a/src/sage/rings/sum_of_squares.pyx +++ b/src/sage/rings/sum_of_squares.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # distutils: libraries = m r""" Fast decomposition of small integers into sums of squares diff --git a/src/sage/rings/tate_algebra.py b/src/sage/rings/tate_algebra.py index 1fed9d9a386..61563f71497 100644 --- a/src/sage/rings/tate_algebra.py +++ b/src/sage/rings/tate_algebra.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Tate algebras diff --git a/src/sage/rings/tate_algebra_element.pxd b/src/sage/rings/tate_algebra_element.pxd index b6b3642bb55..3cafe330fb0 100644 --- a/src/sage/rings/tate_algebra_element.pxd +++ b/src/sage/rings/tate_algebra_element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.structure.element cimport Element from sage.structure.element cimport MonoidElement from sage.structure.element cimport CommutativeAlgebraElement diff --git a/src/sage/rings/tate_algebra_element.pyx b/src/sage/rings/tate_algebra_element.pyx index 5fc24fe4010..ffd400d5159 100644 --- a/src/sage/rings/tate_algebra_element.pyx +++ b/src/sage/rings/tate_algebra_element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Tate algebra element diff --git a/src/sage/rings/tate_algebra_ideal.pxd b/src/sage/rings/tate_algebra_ideal.pxd index 010c29201f1..e5581e06b8c 100644 --- a/src/sage/rings/tate_algebra_ideal.pxd +++ b/src/sage/rings/tate_algebra_ideal.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.rings.tate_algebra_element cimport TateAlgebraTerm from sage.rings.tate_algebra_element cimport TateAlgebraElement diff --git a/src/sage/rings/tate_algebra_ideal.pyx b/src/sage/rings/tate_algebra_ideal.pyx index 45e427280b5..802984874b7 100644 --- a/src/sage/rings/tate_algebra_ideal.pyx +++ b/src/sage/rings/tate_algebra_ideal.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari """ Ideals in Tate algebra diff --git a/src/sage/rings/tests.py b/src/sage/rings/tests.py index 6830c1bf96a..c7a00f83bc2 100644 --- a/src/sage/rings/tests.py +++ b/src/sage/rings/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Tests for rings diff --git a/src/sage/rings/universal_cyclotomic_field.py b/src/sage/rings/universal_cyclotomic_field.py index 1868f019600..a9b558bdb02 100644 --- a/src/sage/rings/universal_cyclotomic_field.py +++ b/src/sage/rings/universal_cyclotomic_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-gap # sage.doctest: needs sage.libs.gap r""" Universal cyclotomic field diff --git a/src/sage/rings/valuation/all.py b/src/sage/rings/valuation/all.py index 052f7265e1f..3f90ef9daa0 100644 --- a/src/sage/rings/valuation/all.py +++ b/src/sage/rings/valuation/all.py @@ -1,7 +1,5 @@ -# sage_setup: distribution = sagemath-pari from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.valuation.gauss_valuation', 'GaussValuation') lazy_import('sage.rings.valuation', 'valuations_catalog', 'valuations') lazy_import('sage.rings.valuation.value_group', 'DiscreteValueGroup') -del lazy_import diff --git a/src/sage/rings/valuation/augmented_valuation.py b/src/sage/rings/valuation/augmented_valuation.py index 75094ab06ca..3c98e082bc4 100644 --- a/src/sage/rings/valuation/augmented_valuation.py +++ b/src/sage/rings/valuation/augmented_valuation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari r""" Augmented valuations on polynomial rings diff --git a/src/sage/rings/valuation/developing_valuation.py b/src/sage/rings/valuation/developing_valuation.py index 88e48f7626a..d7724642415 100644 --- a/src/sage/rings/valuation/developing_valuation.py +++ b/src/sage/rings/valuation/developing_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Valuations on polynomial rings based on `\phi`-adic expansions diff --git a/src/sage/rings/valuation/gauss_valuation.py b/src/sage/rings/valuation/gauss_valuation.py index a9d135bfd49..a69977ae4b3 100644 --- a/src/sage/rings/valuation/gauss_valuation.py +++ b/src/sage/rings/valuation/gauss_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- """ Gauss valuations on polynomial rings diff --git a/src/sage/rings/valuation/inductive_valuation.py b/src/sage/rings/valuation/inductive_valuation.py index 5d5d6977ef0..9991aaac2e1 100644 --- a/src/sage/rings/valuation/inductive_valuation.py +++ b/src/sage/rings/valuation/inductive_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Inductive valuations on polynomial rings diff --git a/src/sage/rings/valuation/limit_valuation.py b/src/sage/rings/valuation/limit_valuation.py index 947581cb120..fa23e2c0a69 100644 --- a/src/sage/rings/valuation/limit_valuation.py +++ b/src/sage/rings/valuation/limit_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Valuations which are defined as limits of valuations. diff --git a/src/sage/rings/valuation/mapped_valuation.py b/src/sage/rings/valuation/mapped_valuation.py index 098ea95fd01..2c4aa42799d 100644 --- a/src/sage/rings/valuation/mapped_valuation.py +++ b/src/sage/rings/valuation/mapped_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Valuations which are implemented through a map to another valuation diff --git a/src/sage/rings/valuation/scaled_valuation.py b/src/sage/rings/valuation/scaled_valuation.py index 6a22cd18dc0..84249392e3a 100644 --- a/src/sage/rings/valuation/scaled_valuation.py +++ b/src/sage/rings/valuation/scaled_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Valuations which are scaled versions of another valuation diff --git a/src/sage/rings/valuation/trivial_valuation.py b/src/sage/rings/valuation/trivial_valuation.py index 03fc43be725..ddbf9d7e1b7 100644 --- a/src/sage/rings/valuation/trivial_valuation.py +++ b/src/sage/rings/valuation/trivial_valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Trivial valuations diff --git a/src/sage/rings/valuation/valuation.py b/src/sage/rings/valuation/valuation.py index e432478220d..0121f6a6b25 100644 --- a/src/sage/rings/valuation/valuation.py +++ b/src/sage/rings/valuation/valuation.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Discrete valuations diff --git a/src/sage/rings/valuation/valuation_space.py b/src/sage/rings/valuation/valuation_space.py index 1fee27025c7..485a622f33c 100644 --- a/src/sage/rings/valuation/valuation_space.py +++ b/src/sage/rings/valuation/valuation_space.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Spaces of valuations diff --git a/src/sage/rings/valuation/valuations_catalog.py b/src/sage/rings/valuation/valuations_catalog.py index 86227c4cf6b..64effaf13a6 100644 --- a/src/sage/rings/valuation/valuations_catalog.py +++ b/src/sage/rings/valuation/valuations_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-pari from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.padics.padic_valuation', 'pAdicValuation') diff --git a/src/sage/rings/valuation/value_group.py b/src/sage/rings/valuation/value_group.py index 6939504a732..b39eec60bdd 100644 --- a/src/sage/rings/valuation/value_group.py +++ b/src/sage/rings/valuation/value_group.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-pari +# -*- coding: utf-8 -*- r""" Value groups of discrete valuations diff --git a/src/sage/sandpiles/all.py b/src/sage/sandpiles/all.py index 32bf34baaa4..7ddccbf3869 100644 --- a/src/sage/sandpiles/all.py +++ b/src/sage/sandpiles/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs from sage.misc.lazy_import import lazy_import lazy_import('sage.sandpiles.sandpile', 'Sandpile') @@ -10,4 +9,3 @@ lazy_import('sage.sandpiles.sandpile', 'triangle_sandpile') lazy_import('sage.sandpiles.examples', 'sandpiles') -del lazy_import diff --git a/src/sage/sandpiles/examples.py b/src/sage/sandpiles/examples.py index 1b55dfd3a18..980dec77036 100644 --- a/src/sage/sandpiles/examples.py +++ b/src/sage/sandpiles/examples.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-graphs +# -*- coding: utf-8 -*- """ Examples of Sandpile diff --git a/src/sage/sandpiles/sandpile.py b/src/sage/sandpiles/sandpile.py index 198322b341d..57838f7647b 100644 --- a/src/sage/sandpiles/sandpile.py +++ b/src/sage/sandpiles/sandpile.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Sandpiles diff --git a/src/sage/sat/all.py b/src/sage/sat/all.py index a3300520490..d4beeb2a9a1 100644 --- a/src/sage/sat/all.py +++ b/src/sage/sat/all.py @@ -1,4 +1,2 @@ -# sage_setup: distribution = sagemath-combinat from sage.misc.lazy_import import lazy_import lazy_import('sage.sat.solvers.satsolver', 'SAT') -del lazy_import diff --git a/src/sage/sat/boolean_polynomials.py b/src/sage/sat/boolean_polynomials.py index 3cbbaa4d81e..08cf03cf18c 100644 --- a/src/sage/sat/boolean_polynomials.py +++ b/src/sage/sat/boolean_polynomials.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: optional - pycryptosat, needs sage.modules sage.rings.polynomial.pbori """ SAT Functions for Boolean Polynomials diff --git a/src/sage/sat/converters/__init__.py b/src/sage/sat/converters/__init__.py index 1a945d09d04..bb7b60bbb9c 100644 --- a/src/sage/sat/converters/__init__.py +++ b/src/sage/sat/converters/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from sage.misc.lazy_import import lazy_import from .anf2cnf import ANF2CNFConverter diff --git a/src/sage/sat/converters/anf2cnf.py b/src/sage/sat/converters/anf2cnf.py index 220be966e1e..e6dd330feff 100644 --- a/src/sage/sat/converters/anf2cnf.py +++ b/src/sage/sat/converters/anf2cnf.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Abstract ANF to CNF Converter diff --git a/src/sage/sat/converters/polybori.py b/src/sage/sat/converters/polybori.py index b23ff65496d..a159c7434f4 100644 --- a/src/sage/sat/converters/polybori.py +++ b/src/sage/sat/converters/polybori.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.rings.polynomial.pbori """ An ANF to CNF Converter using a Dense/Sparse Strategy diff --git a/src/sage/sat/solvers/__init__.py b/src/sage/sat/solvers/__init__.py index d3dbc2f9a75..27b47db2d51 100644 --- a/src/sage/sat/solvers/__init__.py +++ b/src/sage/sat/solvers/__init__.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat from .satsolver import SatSolver from .cryptominisat import CryptoMiniSat diff --git a/src/sage/sat/solvers/cryptominisat.py b/src/sage/sat/solvers/cryptominisat.py index ecc8281d72f..82f1ffd9086 100644 --- a/src/sage/sat/solvers/cryptominisat.py +++ b/src/sage/sat/solvers/cryptominisat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" CryptoMiniSat Solver diff --git a/src/sage/sat/solvers/dimacs.py b/src/sage/sat/solvers/dimacs.py index b23a1c19ead..0c3060eb4c3 100644 --- a/src/sage/sat/solvers/dimacs.py +++ b/src/sage/sat/solvers/dimacs.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ SAT-Solvers via DIMACS Files diff --git a/src/sage/sat/solvers/picosat.py b/src/sage/sat/solvers/picosat.py index 01b1997d085..a88f69da883 100644 --- a/src/sage/sat/solvers/picosat.py +++ b/src/sage/sat/solvers/picosat.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat r""" PicoSAT Solver diff --git a/src/sage/sat/solvers/sat_lp.py b/src/sage/sat/solvers/sat_lp.py index e7a50b6aee5..9b65b1d241d 100644 --- a/src/sage/sat/solvers/sat_lp.py +++ b/src/sage/sat/solvers/sat_lp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat # sage.doctest: needs sage.numerical.mip r""" Solve SAT problems Integer Linear Programming diff --git a/src/sage/sat/solvers/satsolver.pxd b/src/sage/sat/solvers/satsolver.pxd index 14d8d2cf880..7fd0ac7e798 100644 --- a/src/sage/sat/solvers/satsolver.pxd +++ b/src/sage/sat/solvers/satsolver.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-combinat cdef class SatSolver: pass diff --git a/src/sage/sat/solvers/satsolver.pyx b/src/sage/sat/solvers/satsolver.pyx index 6c82fb247db..521577fda71 100644 --- a/src/sage/sat/solvers/satsolver.pyx +++ b/src/sage/sat/solvers/satsolver.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-combinat """ Abstract SAT Solver diff --git a/src/sage/schemes/affine/affine_homset.py b/src/sage/schemes/affine/affine_homset.py index ccba02e4d92..b6570bd6f6d 100644 --- a/src/sage/schemes/affine/affine_homset.py +++ b/src/sage/schemes/affine/affine_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Set of homomorphisms between two affine schemes diff --git a/src/sage/schemes/affine/affine_morphism.py b/src/sage/schemes/affine/affine_morphism.py index 4a4335df7d9..e55f75b4e18 100644 --- a/src/sage/schemes/affine/affine_morphism.py +++ b/src/sage/schemes/affine/affine_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Morphisms on affine schemes diff --git a/src/sage/schemes/affine/affine_point.py b/src/sage/schemes/affine/affine_point.py index b271656bf90..00779dbb2d6 100644 --- a/src/sage/schemes/affine/affine_point.py +++ b/src/sage/schemes/affine/affine_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Points on affine varieties diff --git a/src/sage/schemes/affine/affine_rational_point.py b/src/sage/schemes/affine/affine_rational_point.py index 8b6837a63ef..4ac17a60d79 100644 --- a/src/sage/schemes/affine/affine_rational_point.py +++ b/src/sage/schemes/affine/affine_rational_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumeration of rational points on affine schemes diff --git a/src/sage/schemes/affine/affine_space.py b/src/sage/schemes/affine/affine_space.py index 766d7b34ea4..05d3c5b59e3 100644 --- a/src/sage/schemes/affine/affine_space.py +++ b/src/sage/schemes/affine/affine_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Affine `n` space over a ring """ diff --git a/src/sage/schemes/affine/affine_subscheme.py b/src/sage/schemes/affine/affine_subscheme.py index 5618c7b538f..c32b2d29e7c 100644 --- a/src/sage/schemes/affine/affine_subscheme.py +++ b/src/sage/schemes/affine/affine_subscheme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subschemes of affine space diff --git a/src/sage/schemes/affine/all.py b/src/sage/schemes/affine/all.py index ac08e989715..68a540a9f1f 100644 --- a/src/sage/schemes/affine/all.py +++ b/src/sage/schemes/affine/all.py @@ -1,9 +1,8 @@ -# sage_setup: distribution = sagemath-categories """nodoctest all.py -- export of affine to Sage """ -# ***************************************************************************** +#***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,8 +17,8 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.schemes.affine.affine_space import AffineSpace -from sage.schemes.affine.affine_rational_point import enum_affine_rational_field, enum_affine_finite_field +from .affine_space import AffineSpace +from .affine_rational_point import enum_affine_rational_field, enum_affine_finite_field diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index 412ade4da0d..23858c6f0c8 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -1,9 +1,8 @@ -# sage_setup: distribution = sagemath-schemes """ all.py -- export of schemes to Sage """ -# ***************************************************************************** +#***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,24 +17,31 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.schemes.all__sagemath_categories import * -from sage.schemes.all__sagemath_polyhedra import * +from .jacobians.all import * -from sage.schemes.jacobians.all import * +from .hyperelliptic_curves.all import * -from sage.schemes.hyperelliptic_curves.all import * +from .curves.all import * -from sage.schemes.curves.all import * +from .plane_conics.all import * -from sage.schemes.plane_conics.all import * +from .elliptic_curves.all import * -from sage.schemes.elliptic_curves.all import * +from .plane_quartics.all import * -from sage.schemes.plane_quartics.all import * +from .generic.all import * -from sage.schemes.cyclic_covers.all import * +from .toric.all import * -from sage.schemes.berkovich.all import * +from .affine.all import * + +from .projective.all import * + +from .product_projective.all import * + +from .cyclic_covers.all import * + +from .berkovich.all import * diff --git a/src/sage/schemes/all__sagemath_categories.py b/src/sage/schemes/all__sagemath_categories.py deleted file mode 100644 index 02c6722874e..00000000000 --- a/src/sage/schemes/all__sagemath_categories.py +++ /dev/null @@ -1,4 +0,0 @@ -from sage.schemes.generic.all import * -from sage.schemes.affine.all import * -from sage.schemes.projective.all import * -from sage.schemes.product_projective.all import * diff --git a/src/sage/schemes/all__sagemath_ntl.py b/src/sage/schemes/all__sagemath_ntl.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/schemes/all__sagemath_polyhedra.py b/src/sage/schemes/all__sagemath_polyhedra.py deleted file mode 100644 index 2dc39d42014..00000000000 --- a/src/sage/schemes/all__sagemath_polyhedra.py +++ /dev/null @@ -1 +0,0 @@ -from sage.schemes.toric.all import * diff --git a/src/sage/schemes/berkovich/all.py b/src/sage/schemes/berkovich/all.py index ca838f75500..cc7af01a057 100644 --- a/src/sage/schemes/berkovich/all.py +++ b/src/sage/schemes/berkovich/all.py @@ -1,6 +1,5 @@ -# sage_setup: distribution = sagemath-schemes """nodoctest all.py -- export of Berkovich spaces to all of Sage """ -from sage.schemes.berkovich.berkovich_space import Berkovich_Cp_Affine, Berkovich_Cp_Projective +from .berkovich_space import Berkovich_Cp_Affine, Berkovich_Cp_Projective diff --git a/src/sage/schemes/berkovich/berkovich_cp_element.py b/src/sage/schemes/berkovich/berkovich_cp_element.py index 637d30f491d..bc8307f29e5 100644 --- a/src/sage/schemes/berkovich/berkovich_cp_element.py +++ b/src/sage/schemes/berkovich/berkovich_cp_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Elements of Berkovich space. diff --git a/src/sage/schemes/berkovich/berkovich_space.py b/src/sage/schemes/berkovich/berkovich_space.py index fb915f6d85b..100c2807b9d 100644 --- a/src/sage/schemes/berkovich/berkovich_space.py +++ b/src/sage/schemes/berkovich/berkovich_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Berkovich Space over `\CC_p` diff --git a/src/sage/schemes/curves/affine_curve.py b/src/sage/schemes/curves/affine_curve.py index f0786bf4a04..992cd528803 100644 --- a/src/sage/schemes/curves/affine_curve.py +++ b/src/sage/schemes/curves/affine_curve.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.singular r""" Affine curves diff --git a/src/sage/schemes/curves/all.py b/src/sage/schemes/curves/all.py index a9177144f01..147c2e1e6fe 100644 --- a/src/sage/schemes/curves/all.py +++ b/src/sage/schemes/curves/all.py @@ -1,9 +1,8 @@ -# sage_setup: distribution = sagemath-schemes """ Plane curves """ -# ***************************************************************************** +#***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,9 +17,9 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.schemes.curves.constructor import Curve +from .constructor import Curve -from sage.schemes.curves.projective_curve import Hasse_bounds +from .projective_curve import Hasse_bounds diff --git a/src/sage/schemes/curves/closed_point.py b/src/sage/schemes/curves/closed_point.py index d7d04b9ae86..147d60b200a 100644 --- a/src/sage/schemes/curves/closed_point.py +++ b/src/sage/schemes/curves/closed_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Closed points of integral curves diff --git a/src/sage/schemes/curves/constructor.py b/src/sage/schemes/curves/constructor.py index 7b70740e5e9..3564cfd73cc 100644 --- a/src/sage/schemes/curves/constructor.py +++ b/src/sage/schemes/curves/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.singular """ Curve constructor diff --git a/src/sage/schemes/curves/curve.py b/src/sage/schemes/curves/curve.py index a4c353d097e..cacc05f884b 100644 --- a/src/sage/schemes/curves/curve.py +++ b/src/sage/schemes/curves/curve.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.singular """ Base class of curves diff --git a/src/sage/schemes/curves/point.py b/src/sage/schemes/curves/point.py index e379b73c813..373dc6ce19f 100644 --- a/src/sage/schemes/curves/point.py +++ b/src/sage/schemes/curves/point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.singular """ Rational points of curves diff --git a/src/sage/schemes/curves/projective_curve.py b/src/sage/schemes/curves/projective_curve.py index 2c95365167b..bb19979b3c4 100644 --- a/src/sage/schemes/curves/projective_curve.py +++ b/src/sage/schemes/curves/projective_curve.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.singular r""" Projective curves diff --git a/src/sage/schemes/curves/zariski_vankampen.py b/src/sage/schemes/curves/zariski_vankampen.py index af7703b62cc..0fc01b81347 100644 --- a/src/sage/schemes/curves/zariski_vankampen.py +++ b/src/sage/schemes/curves/zariski_vankampen.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.geometry.polyhedron sage.graphs sage.groups sage.rings.number_field r""" Zariski-Van Kampen method implementation diff --git a/src/sage/schemes/cyclic_covers/all.py b/src/sage/schemes/cyclic_covers/all.py index 1cb47c3ca74..b1fcd806e7a 100644 --- a/src/sage/schemes/cyclic_covers/all.py +++ b/src/sage/schemes/cyclic_covers/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-schemes - -from sage.schemes.cyclic_covers.constructor import CyclicCover +from .constructor import CyclicCover diff --git a/src/sage/schemes/cyclic_covers/charpoly_frobenius.py b/src/sage/schemes/cyclic_covers/charpoly_frobenius.py index 853fb442419..e28289e1d84 100644 --- a/src/sage/schemes/cyclic_covers/charpoly_frobenius.py +++ b/src/sage/schemes/cyclic_covers/charpoly_frobenius.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" Computation of the Frobenius polynomial using Newton's identities diff --git a/src/sage/schemes/cyclic_covers/constructor.py b/src/sage/schemes/cyclic_covers/constructor.py index 8e20721651f..99250257121 100644 --- a/src/sage/schemes/cyclic_covers/constructor.py +++ b/src/sage/schemes/cyclic_covers/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Cyclic cover curve constructor """ diff --git a/src/sage/schemes/cyclic_covers/cycliccover_finite_field.py b/src/sage/schemes/cyclic_covers/cycliccover_finite_field.py index df47239e67e..1f92bb1b0b7 100644 --- a/src/sage/schemes/cyclic_covers/cycliccover_finite_field.py +++ b/src/sage/schemes/cyclic_covers/cycliccover_finite_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.finite_rings r""" diff --git a/src/sage/schemes/cyclic_covers/cycliccover_generic.py b/src/sage/schemes/cyclic_covers/cycliccover_generic.py index b8a921ad788..9bca8814dad 100644 --- a/src/sage/schemes/cyclic_covers/cycliccover_generic.py +++ b/src/sage/schemes/cyclic_covers/cycliccover_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Cyclic covers curves over a general ring diff --git a/src/sage/schemes/elliptic_curves/BSD.py b/src/sage/schemes/elliptic_curves/BSD.py index c4c0beaf9af..90b4fdaad7f 100644 --- a/src/sage/schemes/elliptic_curves/BSD.py +++ b/src/sage/schemes/elliptic_curves/BSD.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes "Birch and Swinnerton-Dyer formulas" from sage.arith.misc import prime_divisors diff --git a/src/sage/schemes/elliptic_curves/Qcurves.py b/src/sage/schemes/elliptic_curves/Qcurves.py index 41c3edb19b9..e0f55597f90 100644 --- a/src/sage/schemes/elliptic_curves/Qcurves.py +++ b/src/sage/schemes/elliptic_curves/Qcurves.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Testing whether elliptic curves over number fields are `\QQ`-curves diff --git a/src/sage/schemes/elliptic_curves/all.py b/src/sage/schemes/elliptic_curves/all.py index 5010cebcdce..f4abce51a62 100644 --- a/src/sage/schemes/elliptic_curves/all.py +++ b/src/sage/schemes/elliptic_curves/all.py @@ -1,9 +1,8 @@ -# sage_setup: distribution = sagemath-schemes """ Exported elliptic curves functionality """ -# ***************************************************************************** +#***************************************************************************** # Copyright (C) 2005 William Stein # # Distributed under the terms of the GNU General Public License (GPL) @@ -15,35 +14,34 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.schemes.elliptic_curves.constructor import (EllipticCurve, - EllipticCurve_from_c4c6, - EllipticCurve_from_j, - EllipticCurve_from_cubic, - EllipticCurves_with_good_reduction_outside_S) +from .constructor import (EllipticCurve, + EllipticCurve_from_c4c6, + EllipticCurve_from_j, + EllipticCurve_from_cubic, + EllipticCurves_with_good_reduction_outside_S) from sage.misc.lazy_import import lazy_import lazy_import('sage.schemes.elliptic_curves.jacobian', 'Jacobian') -lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve') - lazy_import('sage.schemes.elliptic_curves.ell_rational_field', ['cremona_curves', 'cremona_optimal_curves']) -from sage.schemes.elliptic_curves.cm import (cm_orders, - cm_j_invariants, - cm_j_invariants_and_orders, - hilbert_class_polynomial) +lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve') + +from .cm import ( cm_orders, + cm_j_invariants, + cm_j_invariants_and_orders, + hilbert_class_polynomial ) lazy_import('sage.schemes.elliptic_curves.ec_database', 'elliptic_curves') -from sage.schemes.elliptic_curves.kodaira_symbol import KodairaSymbol +from .kodaira_symbol import KodairaSymbol -from sage.schemes.elliptic_curves.ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel +from .ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel lazy_import('sage.schemes.elliptic_curves.mod_poly', 'classical_modular_polynomial') -from sage.schemes.elliptic_curves.heegner import heegner_points, heegner_point -del lazy_import +from .heegner import heegner_points, heegner_point diff --git a/src/sage/schemes/elliptic_curves/cardinality.py b/src/sage/schemes/elliptic_curves/cardinality.py index da502f50767..aaa1cf85542 100644 --- a/src/sage/schemes/elliptic_curves/cardinality.py +++ b/src/sage/schemes/elliptic_curves/cardinality.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.finite_rings """ Specific algorithms to compute cardinality of elliptic curves over a finite field diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index 143ebee91f0..e893b07051f 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Complex multiplication for elliptic curves diff --git a/src/sage/schemes/elliptic_curves/constructor.py b/src/sage/schemes/elliptic_curves/constructor.py index 9e242437756..b99e0ab3458 100644 --- a/src/sage/schemes/elliptic_curves/constructor.py +++ b/src/sage/schemes/elliptic_curves/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Elliptic curve constructor diff --git a/src/sage/schemes/elliptic_curves/ec_database.py b/src/sage/schemes/elliptic_curves/ec_database.py index 21402f62d5e..34099d620bb 100644 --- a/src/sage/schemes/elliptic_curves/ec_database.py +++ b/src/sage/schemes/elliptic_curves/ec_database.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Tables of elliptic curves of given rank diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index b9bd9167195..3dc8ea0f11e 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Isogenies diff --git a/src/sage/schemes/elliptic_curves/ell_egros.py b/src/sage/schemes/elliptic_curves/ell_egros.py index aca2cdca48f..42c8d0738be 100644 --- a/src/sage/schemes/elliptic_curves/ell_egros.py +++ b/src/sage/schemes/elliptic_curves/ell_egros.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Elliptic curves with prescribed good reduction diff --git a/src/sage/schemes/elliptic_curves/ell_field.py b/src/sage/schemes/elliptic_curves/ell_field.py index a4a76d1b2ba..3efa79ff759 100644 --- a/src/sage/schemes/elliptic_curves/ell_field.py +++ b/src/sage/schemes/elliptic_curves/ell_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Elliptic curves over a general field diff --git a/src/sage/schemes/elliptic_curves/ell_finite_field.py b/src/sage/schemes/elliptic_curves/ell_finite_field.py index bbe54ddb55a..f67e15b5627 100644 --- a/src/sage/schemes/elliptic_curves/ell_finite_field.py +++ b/src/sage/schemes/elliptic_curves/ell_finite_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Elliptic curves over finite fields diff --git a/src/sage/schemes/elliptic_curves/ell_generic.py b/src/sage/schemes/elliptic_curves/ell_generic.py index 79fafe6a151..4719b914bde 100644 --- a/src/sage/schemes/elliptic_curves/ell_generic.py +++ b/src/sage/schemes/elliptic_curves/ell_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Elliptic curves over a general ring diff --git a/src/sage/schemes/elliptic_curves/ell_local_data.py b/src/sage/schemes/elliptic_curves/ell_local_data.py index 9fb84815993..8192b8ce84c 100644 --- a/src/sage/schemes/elliptic_curves/ell_local_data.py +++ b/src/sage/schemes/elliptic_curves/ell_local_data.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Local data for elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/ell_modular_symbols.py b/src/sage/schemes/elliptic_curves/ell_modular_symbols.py index bc16fea7a3d..6fc75d2cabb 100644 --- a/src/sage/schemes/elliptic_curves/ell_modular_symbols.py +++ b/src/sage/schemes/elliptic_curves/ell_modular_symbols.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Modular symbols attached to elliptic curves over `\QQ` diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py index 95ae59642ef..b0c07df78b6 100644 --- a/src/sage/schemes/elliptic_curves/ell_number_field.py +++ b/src/sage/schemes/elliptic_curves/ell_number_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" Elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/ell_padic_field.py b/src/sage/schemes/elliptic_curves/ell_padic_field.py index fb18afdaca7..2867ff51d23 100644 --- a/src/sage/schemes/elliptic_curves/ell_padic_field.py +++ b/src/sage/schemes/elliptic_curves/ell_padic_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics """ Elliptic curves over padic fields diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py index 64a4d8cdc0d..a1c1ff796ed 100644 --- a/src/sage/schemes/elliptic_curves/ell_point.py +++ b/src/sage/schemes/elliptic_curves/ell_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Points on elliptic curves diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py index 38be45180b0..f49ccfbc568 100644 --- a/src/sage/schemes/elliptic_curves/ell_rational_field.py +++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Elliptic curves over the rational numbers diff --git a/src/sage/schemes/elliptic_curves/ell_tate_curve.py b/src/sage/schemes/elliptic_curves/ell_tate_curve.py index c5fbe595f40..70697a4b036 100644 --- a/src/sage/schemes/elliptic_curves/ell_tate_curve.py +++ b/src/sage/schemes/elliptic_curves/ell_tate_curve.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Tate's parametrisation of `p`-adic curves with multiplicative reduction diff --git a/src/sage/schemes/elliptic_curves/ell_torsion.py b/src/sage/schemes/elliptic_curves/ell_torsion.py index 49d1e0470b5..cc543b339a4 100644 --- a/src/sage/schemes/elliptic_curves/ell_torsion.py +++ b/src/sage/schemes/elliptic_curves/ell_torsion.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Torsion subgroups of elliptic curves over number fields (including `\QQ`) diff --git a/src/sage/schemes/elliptic_curves/ell_wp.py b/src/sage/schemes/elliptic_curves/ell_wp.py index 28725bfc84b..e421b2c285c 100644 --- a/src/sage/schemes/elliptic_curves/ell_wp.py +++ b/src/sage/schemes/elliptic_curves/ell_wp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Weierstrass `\wp`-function for elliptic curves diff --git a/src/sage/schemes/elliptic_curves/formal_group.py b/src/sage/schemes/elliptic_curves/formal_group.py index 4eb070d2047..ae3dceb8555 100644 --- a/src/sage/schemes/elliptic_curves/formal_group.py +++ b/src/sage/schemes/elliptic_curves/formal_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Formal groups of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/gal_reps.py b/src/sage/schemes/elliptic_curves/gal_reps.py index b5d50b30627..e5b5c9bbe03 100644 --- a/src/sage/schemes/elliptic_curves/gal_reps.py +++ b/src/sage/schemes/elliptic_curves/gal_reps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Galois representations attached to elliptic curves diff --git a/src/sage/schemes/elliptic_curves/gal_reps_number_field.py b/src/sage/schemes/elliptic_curves/gal_reps_number_field.py index 69f40a8083b..ea9d3bdc2ed 100644 --- a/src/sage/schemes/elliptic_curves/gal_reps_number_field.py +++ b/src/sage/schemes/elliptic_curves/gal_reps_number_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" Galois representations for elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/gp_simon.py b/src/sage/schemes/elliptic_curves/gp_simon.py index 96dad566b71..39a60361ec6 100644 --- a/src/sage/schemes/elliptic_curves/gp_simon.py +++ b/src/sage/schemes/elliptic_curves/gp_simon.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.libs.pari """ Denis Simon's PARI scripts diff --git a/src/sage/schemes/elliptic_curves/heegner.py b/src/sage/schemes/elliptic_curves/heegner.py index c8d51392338..df91b74b280 100644 --- a/src/sage/schemes/elliptic_curves/heegner.py +++ b/src/sage/schemes/elliptic_curves/heegner.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" Heegner points on elliptic curves over the rational numbers diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py index 3dee2ee4a01..7ddd080d5b1 100644 --- a/src/sage/schemes/elliptic_curves/height.py +++ b/src/sage/schemes/elliptic_curves/height.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Canonical heights for elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/hom.py b/src/sage/schemes/elliptic_curves/hom.py index bf1b187c0e7..fe450c89c5c 100644 --- a/src/sage/schemes/elliptic_curves/hom.py +++ b/src/sage/schemes/elliptic_curves/hom.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Elliptic-curve morphisms diff --git a/src/sage/schemes/elliptic_curves/hom_composite.py b/src/sage/schemes/elliptic_curves/hom_composite.py index 76e289fe5bd..b9dcc197616 100644 --- a/src/sage/schemes/elliptic_curves/hom_composite.py +++ b/src/sage/schemes/elliptic_curves/hom_composite.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Composite morphisms of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/hom_frobenius.py b/src/sage/schemes/elliptic_curves/hom_frobenius.py index 2daa4348905..66aa3a5b5a4 100644 --- a/src/sage/schemes/elliptic_curves/hom_frobenius.py +++ b/src/sage/schemes/elliptic_curves/hom_frobenius.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.finite_rings r""" Frobenius isogenies of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/hom_scalar.py b/src/sage/schemes/elliptic_curves/hom_scalar.py index 8b9eb2292d2..de3a02c9b9d 100644 --- a/src/sage/schemes/elliptic_curves/hom_scalar.py +++ b/src/sage/schemes/elliptic_curves/hom_scalar.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Scalar-multiplication morphisms of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/hom_sum.py b/src/sage/schemes/elliptic_curves/hom_sum.py index 1492d0409d4..ab10ec0d530 100644 --- a/src/sage/schemes/elliptic_curves/hom_sum.py +++ b/src/sage/schemes/elliptic_curves/hom_sum.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Sums of morphisms of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/hom_velusqrt.py b/src/sage/schemes/elliptic_curves/hom_velusqrt.py index f12cfa9cdab..769611c61cd 100644 --- a/src/sage/schemes/elliptic_curves/hom_velusqrt.py +++ b/src/sage/schemes/elliptic_curves/hom_velusqrt.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Square‑root Vélu algorithm for elliptic-curve isogenies diff --git a/src/sage/schemes/elliptic_curves/isogeny_class.py b/src/sage/schemes/elliptic_curves/isogeny_class.py index 008c61856b5..b20e173cff9 100644 --- a/src/sage/schemes/elliptic_curves/isogeny_class.py +++ b/src/sage/schemes/elliptic_curves/isogeny_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" Isogeny class of elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py index 3299d407039..4623828ccc5 100644 --- a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py +++ b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Isogenies of small prime degree diff --git a/src/sage/schemes/elliptic_curves/jacobian.py b/src/sage/schemes/elliptic_curves/jacobian.py index 16bdf2d11b4..23151109453 100644 --- a/src/sage/schemes/elliptic_curves/jacobian.py +++ b/src/sage/schemes/elliptic_curves/jacobian.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Construct elliptic curves as Jacobians diff --git a/src/sage/schemes/elliptic_curves/kodaira_symbol.py b/src/sage/schemes/elliptic_curves/kodaira_symbol.py index c07e1d825e0..3b3b976fa66 100644 --- a/src/sage/schemes/elliptic_curves/kodaira_symbol.py +++ b/src/sage/schemes/elliptic_curves/kodaira_symbol.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Kodaira symbols diff --git a/src/sage/schemes/elliptic_curves/kraus.py b/src/sage/schemes/elliptic_curves/kraus.py index 3420569f896..b117e8f7ba7 100644 --- a/src/sage/schemes/elliptic_curves/kraus.py +++ b/src/sage/schemes/elliptic_curves/kraus.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Global and semi-global minimal models for elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/lseries_ell.py b/src/sage/schemes/elliptic_curves/lseries_ell.py index 65208647631..26d9042908f 100644 --- a/src/sage/schemes/elliptic_curves/lseries_ell.py +++ b/src/sage/schemes/elliptic_curves/lseries_ell.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ `L`-series for elliptic curves diff --git a/src/sage/schemes/elliptic_curves/mod5family.py b/src/sage/schemes/elliptic_curves/mod5family.py index 19943d6cf55..64069c342b7 100644 --- a/src/sage/schemes/elliptic_curves/mod5family.py +++ b/src/sage/schemes/elliptic_curves/mod5family.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Elliptic curves with congruent mod-5 representation diff --git a/src/sage/schemes/elliptic_curves/mod_poly.py b/src/sage/schemes/elliptic_curves/mod_poly.py index c139742a6d8..580e2aa7598 100644 --- a/src/sage/schemes/elliptic_curves/mod_poly.py +++ b/src/sage/schemes/elliptic_curves/mod_poly.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Modular polynomials for elliptic curves diff --git a/src/sage/schemes/elliptic_curves/mod_sym_num.pyx b/src/sage/schemes/elliptic_curves/mod_sym_num.pyx index ee40b5daceb..a131dc8a47c 100644 --- a/src/sage/schemes/elliptic_curves/mod_sym_num.pyx +++ b/src/sage/schemes/elliptic_curves/mod_sym_num.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-schemes +# -*- coding: utf-8 -*- #cdivision=False #cython: cdivision_warnings=False #cython: profile=False diff --git a/src/sage/schemes/elliptic_curves/modular_parametrization.py b/src/sage/schemes/elliptic_curves/modular_parametrization.py index 0f3e4d4bc04..2ed663e31cb 100644 --- a/src/sage/schemes/elliptic_curves/modular_parametrization.py +++ b/src/sage/schemes/elliptic_curves/modular_parametrization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Modular parametrization of elliptic curves over `\QQ` diff --git a/src/sage/schemes/elliptic_curves/padic_lseries.py b/src/sage/schemes/elliptic_curves/padic_lseries.py index 9e6e76c538f..113d7e16104 100644 --- a/src/sage/schemes/elliptic_curves/padic_lseries.py +++ b/src/sage/schemes/elliptic_curves/padic_lseries.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics r""" `p`-adic `L`-functions of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/padics.py b/src/sage/schemes/elliptic_curves/padics.py index c2f72ad18f9..63974e617f1 100644 --- a/src/sage/schemes/elliptic_curves/padics.py +++ b/src/sage/schemes/elliptic_curves/padics.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics # # All these methods are imported in EllipticCurve_rational_field, diff --git a/src/sage/schemes/elliptic_curves/period_lattice.py b/src/sage/schemes/elliptic_curves/period_lattice.py index 799863a93c2..7cdc5dd6eee 100644 --- a/src/sage/schemes/elliptic_curves/period_lattice.py +++ b/src/sage/schemes/elliptic_curves/period_lattice.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Period lattices of elliptic curves and related functions diff --git a/src/sage/schemes/elliptic_curves/period_lattice_region.pyx b/src/sage/schemes/elliptic_curves/period_lattice_region.pyx index e26f87a1d75..60c132db2d1 100644 --- a/src/sage/schemes/elliptic_curves/period_lattice_region.pyx +++ b/src/sage/schemes/elliptic_curves/period_lattice_region.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.complex_double sage.symbolic r""" Regions in fundamental domains of period lattices diff --git a/src/sage/schemes/elliptic_curves/saturation.py b/src/sage/schemes/elliptic_curves/saturation.py index f7149ffc198..5f3e1dcd629 100644 --- a/src/sage/schemes/elliptic_curves/saturation.py +++ b/src/sage/schemes/elliptic_curves/saturation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.finite_rings sage.rings.number_field r""" Saturation of Mordell-Weil groups of elliptic curves over number fields diff --git a/src/sage/schemes/elliptic_curves/sha_tate.py b/src/sage/schemes/elliptic_curves/sha_tate.py index 0c9f0c541cb..16bbf1d4a72 100644 --- a/src/sage/schemes/elliptic_curves/sha_tate.py +++ b/src/sage/schemes/elliptic_curves/sha_tate.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Tate-Shafarevich group diff --git a/src/sage/schemes/elliptic_curves/weierstrass_morphism.py b/src/sage/schemes/elliptic_curves/weierstrass_morphism.py index 376a833a0bc..422b28b67fe 100644 --- a/src/sage/schemes/elliptic_curves/weierstrass_morphism.py +++ b/src/sage/schemes/elliptic_curves/weierstrass_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Isomorphisms between Weierstrass models of elliptic curves diff --git a/src/sage/schemes/elliptic_curves/weierstrass_transform.py b/src/sage/schemes/elliptic_curves/weierstrass_transform.py index b5f1aab85fa..07f897fb315 100644 --- a/src/sage/schemes/elliptic_curves/weierstrass_transform.py +++ b/src/sage/schemes/elliptic_curves/weierstrass_transform.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Morphism to bring a genus-one curve into Weierstrass form diff --git a/src/sage/schemes/generic/algebraic_scheme.py b/src/sage/schemes/generic/algebraic_scheme.py index d9dd66a23dd..172256fa6a1 100644 --- a/src/sage/schemes/generic/algebraic_scheme.py +++ b/src/sage/schemes/generic/algebraic_scheme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Algebraic schemes diff --git a/src/sage/schemes/generic/all.py b/src/sage/schemes/generic/all.py index 58686520213..b8ba9585bfa 100644 --- a/src/sage/schemes/generic/all.py +++ b/src/sage/schemes/generic/all.py @@ -1,5 +1,4 @@ -# sage_setup: distribution = sagemath-categories # code exports -from sage.schemes.generic.spec import Spec -from sage.schemes.generic.hypersurface import ProjectiveHypersurface, AffineHypersurface +from .spec import Spec +from .hypersurface import ProjectiveHypersurface, AffineHypersurface diff --git a/src/sage/schemes/generic/ambient_space.py b/src/sage/schemes/generic/ambient_space.py index d99e17921b6..52b3f1e0e39 100644 --- a/src/sage/schemes/generic/ambient_space.py +++ b/src/sage/schemes/generic/ambient_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Ambient spaces """ diff --git a/src/sage/schemes/generic/divisor.py b/src/sage/schemes/generic/divisor.py index b8a9c0c32ca..c6d99b12204 100644 --- a/src/sage/schemes/generic/divisor.py +++ b/src/sage/schemes/generic/divisor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.schemes """ Divisors on schemes diff --git a/src/sage/schemes/generic/divisor_group.py b/src/sage/schemes/generic/divisor_group.py index 775bc38927a..5dfd66a1bb9 100644 --- a/src/sage/schemes/generic/divisor_group.py +++ b/src/sage/schemes/generic/divisor_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Divisor groups diff --git a/src/sage/schemes/generic/glue.py b/src/sage/schemes/generic/glue.py index bef3adf9009..e70aafa0507 100644 --- a/src/sage/schemes/generic/glue.py +++ b/src/sage/schemes/generic/glue.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Scheme obtained by gluing two other schemes """ diff --git a/src/sage/schemes/generic/homset.py b/src/sage/schemes/generic/homset.py index 55906516985..6fca9c1e257 100644 --- a/src/sage/schemes/generic/homset.py +++ b/src/sage/schemes/generic/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Set of homomorphisms between two schemes diff --git a/src/sage/schemes/generic/hypersurface.py b/src/sage/schemes/generic/hypersurface.py index 07b9683ec66..f4991527c78 100644 --- a/src/sage/schemes/generic/hypersurface.py +++ b/src/sage/schemes/generic/hypersurface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.schemes r""" Hypersurfaces in affine and projective space diff --git a/src/sage/schemes/generic/morphism.py b/src/sage/schemes/generic/morphism.py index f680193977c..7d91214e32a 100644 --- a/src/sage/schemes/generic/morphism.py +++ b/src/sage/schemes/generic/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Scheme morphism diff --git a/src/sage/schemes/generic/point.py b/src/sage/schemes/generic/point.py index 0eb63567253..7ef85645f56 100644 --- a/src/sage/schemes/generic/point.py +++ b/src/sage/schemes/generic/point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Points on schemes """ diff --git a/src/sage/schemes/generic/scheme.py b/src/sage/schemes/generic/scheme.py index 4865a5c1782..2c0e3100c86 100644 --- a/src/sage/schemes/generic/scheme.py +++ b/src/sage/schemes/generic/scheme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Schemes diff --git a/src/sage/schemes/generic/spec.py b/src/sage/schemes/generic/spec.py index 2a85eaa447e..93fc8b7e43c 100644 --- a/src/sage/schemes/generic/spec.py +++ b/src/sage/schemes/generic/spec.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ The Spec functor diff --git a/src/sage/schemes/hyperelliptic_curves/all.py b/src/sage/schemes/hyperelliptic_curves/all.py index 01603fb4b66..88733235129 100644 --- a/src/sage/schemes/hyperelliptic_curves/all.py +++ b/src/sage/schemes/hyperelliptic_curves/all.py @@ -1,7 +1,4 @@ -# sage_setup: distribution = sagemath-schemes - -from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve -from sage.schemes.hyperelliptic_curves.kummer_surface import KummerSurface -from sage.schemes.hyperelliptic_curves.mestre import ( - Mestre_conic, HyperellipticCurve_from_invariants) -from sage.schemes.hyperelliptic_curves import monsky_washnitzer +from .constructor import HyperellipticCurve +from .kummer_surface import KummerSurface +from .mestre import (Mestre_conic, HyperellipticCurve_from_invariants) +from . import monsky_washnitzer diff --git a/src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py b/src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/schemes/hyperelliptic_curves/constructor.py b/src/sage/schemes/hyperelliptic_curves/constructor.py index 60856b8cc2f..8ed20d9ce5a 100644 --- a/src/sage/schemes/hyperelliptic_curves/constructor.py +++ b/src/sage/schemes/hyperelliptic_curves/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Hyperelliptic curve constructor diff --git a/src/sage/schemes/hyperelliptic_curves/hypellfrob.pyx b/src/sage/schemes/hyperelliptic_curves/hypellfrob.pyx index cffccdfaabd..9f9bb04d0ea 100644 --- a/src/sage/schemes/hyperelliptic_curves/hypellfrob.pyx +++ b/src/sage/schemes/hyperelliptic_curves/hypellfrob.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-ntl # distutils: language = c++ # distutils: sources = sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp # distutils: depends = sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.h sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.h diff --git a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py index 05480eee5f3..f461132b1d1 100644 --- a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +++ b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.finite_rings r""" Hyperelliptic curves over a finite field diff --git a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py index 900327c2e54..b2850e39cbd 100644 --- a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +++ b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Hyperelliptic curves of genus 2 over a general ring """ diff --git a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py index 3b243677e18..c18732064d4 100644 --- a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +++ b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Hyperelliptic curves over a general ring diff --git a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py index 44e08e87627..018d60c22f8 100644 --- a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +++ b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.padics """ Hyperelliptic curves over a `p`-adic field diff --git a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py index a46d8a81cec..1e33f9b67fd 100644 --- a/src/sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +++ b/src/sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Hyperelliptic curves over the rationals """ diff --git a/src/sage/schemes/hyperelliptic_curves/invariants.py b/src/sage/schemes/hyperelliptic_curves/invariants.py index d1cf58258a0..258775c7bc6 100644 --- a/src/sage/schemes/hyperelliptic_curves/invariants.py +++ b/src/sage/schemes/hyperelliptic_curves/invariants.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Compute invariants of quintics and sextics via 'Ueberschiebung' diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py b/src/sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py index a073444055c..2ceb709b646 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Some functions regarding geometric endomorphism rings of Jacobians of hyperelliptic curves. diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_g2.py b/src/sage/schemes/hyperelliptic_curves/jacobian_g2.py index 9b17869dde1..b4b4259326e 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_g2.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_g2.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Jacobian of a hyperelliptic curve of genus 2 """ diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_generic.py b/src/sage/schemes/hyperelliptic_curves/jacobian_generic.py index 015efdd184d..2e91a96e02a 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_generic.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Jacobian of a general hyperelliptic curve """ diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py b/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py index 46cdca7851c..a5f4f63876c 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Rational point sets on a Jacobian diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py b/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py index daab2d2259e..72024866cb6 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Jacobian 'morphism' as a class in the Picard group diff --git a/src/sage/schemes/hyperelliptic_curves/kummer_surface.py b/src/sage/schemes/hyperelliptic_curves/kummer_surface.py index ead0f84dba6..dadf1200f01 100644 --- a/src/sage/schemes/hyperelliptic_curves/kummer_surface.py +++ b/src/sage/schemes/hyperelliptic_curves/kummer_surface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Kummer surfaces over a general ring """ diff --git a/src/sage/schemes/hyperelliptic_curves/mestre.py b/src/sage/schemes/hyperelliptic_curves/mestre.py index bccee0596ef..9da4995bcf3 100644 --- a/src/sage/schemes/hyperelliptic_curves/mestre.py +++ b/src/sage/schemes/hyperelliptic_curves/mestre.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Mestre's algorithm diff --git a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py index da9a6029d50..03b795a4704 100644 --- a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +++ b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Computation of Frobenius matrix on Monsky-Washnitzer cohomology diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index d5e7c831515..9ab2ef283ae 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Jacobians of curves diff --git a/src/sage/schemes/jacobians/all.py b/src/sage/schemes/jacobians/all.py index 9179802b171..ec769450947 100644 --- a/src/sage/schemes/jacobians/all.py +++ b/src/sage/schemes/jacobians/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-schemes - -# from abstract_jacobian import is_Jacobian, Jacobian +#from abstract_jacobian import is_Jacobian, Jacobian diff --git a/src/sage/schemes/overview.py b/src/sage/schemes/overview.py index ed71a5993a1..bd83daafac0 100644 --- a/src/sage/schemes/overview.py +++ b/src/sage/schemes/overview.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Scheme implementation overview diff --git a/src/sage/schemes/plane_conics/all.py b/src/sage/schemes/plane_conics/all.py index c3b1170b6b4..b0237ba2e7c 100644 --- a/src/sage/schemes/plane_conics/all.py +++ b/src/sage/schemes/plane_conics/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Plane conics """ @@ -19,4 +18,4 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.schemes.plane_conics.constructor import Conic +from .constructor import Conic diff --git a/src/sage/schemes/plane_conics/con_field.py b/src/sage/schemes/plane_conics/con_field.py index f7e213d57cc..edb6cc82eb4 100644 --- a/src/sage/schemes/plane_conics/con_field.py +++ b/src/sage/schemes/plane_conics/con_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Projective plane conics over a field diff --git a/src/sage/schemes/plane_conics/con_finite_field.py b/src/sage/schemes/plane_conics/con_finite_field.py index 30b2a19357d..e62d8db828f 100644 --- a/src/sage/schemes/plane_conics/con_finite_field.py +++ b/src/sage/schemes/plane_conics/con_finite_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.finite_rings r""" Projective plane conics over finite fields diff --git a/src/sage/schemes/plane_conics/con_number_field.py b/src/sage/schemes/plane_conics/con_number_field.py index b419664ee12..3f1c7c90414 100644 --- a/src/sage/schemes/plane_conics/con_number_field.py +++ b/src/sage/schemes/plane_conics/con_number_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs sage.rings.number_field r""" Projective plane conics over a number field diff --git a/src/sage/schemes/plane_conics/con_rational_field.py b/src/sage/schemes/plane_conics/con_rational_field.py index 51cd9e8248b..f59468d3b90 100644 --- a/src/sage/schemes/plane_conics/con_rational_field.py +++ b/src/sage/schemes/plane_conics/con_rational_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Projective plane conics over `\QQ` diff --git a/src/sage/schemes/plane_conics/con_rational_function_field.py b/src/sage/schemes/plane_conics/con_rational_function_field.py index 8caad318aa4..fec1a50fdbb 100644 --- a/src/sage/schemes/plane_conics/con_rational_function_field.py +++ b/src/sage/schemes/plane_conics/con_rational_function_field.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Projective plane conics over a rational function field diff --git a/src/sage/schemes/plane_conics/constructor.py b/src/sage/schemes/plane_conics/constructor.py index 293a8baf6fd..a078bc07d22 100644 --- a/src/sage/schemes/plane_conics/constructor.py +++ b/src/sage/schemes/plane_conics/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes r""" Plane conic constructor diff --git a/src/sage/schemes/plane_quartics/all.py b/src/sage/schemes/plane_quartics/all.py index d0e58a36de1..6986f1ec1fa 100644 --- a/src/sage/schemes/plane_quartics/all.py +++ b/src/sage/schemes/plane_quartics/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-schemes - -from sage.schemes.plane_quartics.quartic_constructor import QuarticCurve +from .quartic_constructor import QuarticCurve diff --git a/src/sage/schemes/plane_quartics/quartic_constructor.py b/src/sage/schemes/plane_quartics/quartic_constructor.py index d091cce9731..37c06a1f5c9 100644 --- a/src/sage/schemes/plane_quartics/quartic_constructor.py +++ b/src/sage/schemes/plane_quartics/quartic_constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Quartic curve constructor """ diff --git a/src/sage/schemes/plane_quartics/quartic_generic.py b/src/sage/schemes/plane_quartics/quartic_generic.py index fcdf38f3abf..ac2cdd84d82 100644 --- a/src/sage/schemes/plane_quartics/quartic_generic.py +++ b/src/sage/schemes/plane_quartics/quartic_generic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes """ Plane quartic curves over a general ring diff --git a/src/sage/schemes/product_projective/all.py b/src/sage/schemes/product_projective/all.py index 56ec5181f39..c9ee0d6b51f 100644 --- a/src/sage/schemes/product_projective/all.py +++ b/src/sage/schemes/product_projective/all.py @@ -1,6 +1,4 @@ -# sage_setup: distribution = sagemath-categories from sage.misc.lazy_import import lazy_import lazy_import('sage.schemes.product_projective.space', 'ProductProjectiveSpaces') lazy_import('sage.schemes.product_projective.space', 'is_ProductProjectiveSpaces') -del lazy_import diff --git a/src/sage/schemes/product_projective/homset.py b/src/sage/schemes/product_projective/homset.py index 0072d3eb97f..b0b8655a0ec 100644 --- a/src/sage/schemes/product_projective/homset.py +++ b/src/sage/schemes/product_projective/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Set of homomorphisms diff --git a/src/sage/schemes/product_projective/morphism.py b/src/sage/schemes/product_projective/morphism.py index 1326f3ea358..d5b1974164b 100644 --- a/src/sage/schemes/product_projective/morphism.py +++ b/src/sage/schemes/product_projective/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Polynomial morphisms for products of projective spaces diff --git a/src/sage/schemes/product_projective/point.py b/src/sage/schemes/product_projective/point.py index 456755d5c03..6de7cf74d7d 100644 --- a/src/sage/schemes/product_projective/point.py +++ b/src/sage/schemes/product_projective/point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Points for products of projective spaces diff --git a/src/sage/schemes/product_projective/rational_point.py b/src/sage/schemes/product_projective/rational_point.py index f4d55e60bbc..a4488647063 100644 --- a/src/sage/schemes/product_projective/rational_point.py +++ b/src/sage/schemes/product_projective/rational_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumeration of rational points on product projective schemes diff --git a/src/sage/schemes/product_projective/space.py b/src/sage/schemes/product_projective/space.py index 0dea77c2f2f..3fee46cc15a 100644 --- a/src/sage/schemes/product_projective/space.py +++ b/src/sage/schemes/product_projective/space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Products of projective spaces diff --git a/src/sage/schemes/product_projective/subscheme.py b/src/sage/schemes/product_projective/subscheme.py index 0627823f6b1..35433ba565b 100644 --- a/src/sage/schemes/product_projective/subscheme.py +++ b/src/sage/schemes/product_projective/subscheme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subschemes of products of projective spaces diff --git a/src/sage/schemes/projective/all.py b/src/sage/schemes/projective/all.py index 4dcc66d77da..44e92ee5f23 100644 --- a/src/sage/schemes/projective/all.py +++ b/src/sage/schemes/projective/all.py @@ -1,9 +1,8 @@ -# sage_setup: distribution = sagemath-categories """nodoctest all.py -- export of projective schemes to Sage """ -# ***************************************************************************** +#***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,7 +17,7 @@ # # The full text of the GPL is available at: # -# https://www.gnu.org/licenses/ -# ***************************************************************************** +# http://www.gnu.org/licenses/ +#***************************************************************************** -from sage.schemes.projective.projective_space import ProjectiveSpace, is_ProjectiveSpace +from .projective_space import ProjectiveSpace, is_ProjectiveSpace diff --git a/src/sage/schemes/projective/proj_bdd_height.py b/src/sage/schemes/projective/proj_bdd_height.py index 4ae7afd0ab6..0ea174ddc4d 100644 --- a/src/sage/schemes/projective/proj_bdd_height.py +++ b/src/sage/schemes/projective/proj_bdd_height.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Points of bounded height in projective spaces diff --git a/src/sage/schemes/projective/projective_homset.py b/src/sage/schemes/projective/projective_homset.py index c7a747dd0fe..91c01a51128 100644 --- a/src/sage/schemes/projective/projective_homset.py +++ b/src/sage/schemes/projective/projective_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Set of homomorphisms between two projective schemes diff --git a/src/sage/schemes/projective/projective_morphism.py b/src/sage/schemes/projective/projective_morphism.py index dfed249e18d..6d81b47abc2 100644 --- a/src/sage/schemes/projective/projective_morphism.py +++ b/src/sage/schemes/projective/projective_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Morphisms on projective schemes diff --git a/src/sage/schemes/projective/projective_point.py b/src/sage/schemes/projective/projective_point.py index 6e420bb8309..2f5576e6a12 100644 --- a/src/sage/schemes/projective/projective_point.py +++ b/src/sage/schemes/projective/projective_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Points on projective varieties diff --git a/src/sage/schemes/projective/projective_rational_point.py b/src/sage/schemes/projective/projective_rational_point.py index 48f94508f1c..8c2fa76599a 100644 --- a/src/sage/schemes/projective/projective_rational_point.py +++ b/src/sage/schemes/projective/projective_rational_point.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumeration of rational points on projective schemes diff --git a/src/sage/schemes/projective/projective_space.py b/src/sage/schemes/projective/projective_space.py index d4d041550cf..5c55a62106e 100644 --- a/src/sage/schemes/projective/projective_space.py +++ b/src/sage/schemes/projective/projective_space.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Projective `n` space over a ring diff --git a/src/sage/schemes/projective/projective_subscheme.py b/src/sage/schemes/projective/projective_subscheme.py index 7ea3a3ab251..3ea963e0e04 100644 --- a/src/sage/schemes/projective/projective_subscheme.py +++ b/src/sage/schemes/projective/projective_subscheme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subschemes of projective space diff --git a/src/sage/schemes/riemann_surfaces/all.py b/src/sage/schemes/riemann_surfaces/all.py index c05f67159dc..e69de29bb2d 100644 --- a/src/sage/schemes/riemann_surfaces/all.py +++ b/src/sage/schemes/riemann_surfaces/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-schemes diff --git a/src/sage/schemes/riemann_surfaces/riemann_surface.py b/src/sage/schemes/riemann_surfaces/riemann_surface.py index e3847b57038..fb6715f5f87 100644 --- a/src/sage/schemes/riemann_surfaces/riemann_surface.py +++ b/src/sage/schemes/riemann_surfaces/riemann_surface.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-schemes # sage.doctest: needs scipy sage.graphs sage.groups r""" Riemann matrices and endomorphism rings of algebraic Riemann surfaces diff --git a/src/sage/schemes/toric/all.py b/src/sage/schemes/toric/all.py index 95b4c41f292..71ad52ef5c6 100644 --- a/src/sage/schemes/toric/all.py +++ b/src/sage/schemes/toric/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs from sage.misc.lazy_import import lazy_import @@ -7,4 +6,3 @@ lazy_import('sage.schemes.toric.library', 'toric_varieties') lazy_import('sage.schemes.toric.fano_variety', 'CPRFanoToricVariety') lazy_import('sage.schemes.toric.ideal', 'ToricIdeal') -del lazy_import diff --git a/src/sage/schemes/toric/chow_group.py b/src/sage/schemes/toric/chow_group.py index b10ebba78f5..482bd5ce81b 100644 --- a/src/sage/schemes/toric/chow_group.py +++ b/src/sage/schemes/toric/chow_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" The Chow group of a toric variety diff --git a/src/sage/schemes/toric/divisor.py b/src/sage/schemes/toric/divisor.py index 223894f2e4f..3a72638ac2d 100644 --- a/src/sage/schemes/toric/divisor.py +++ b/src/sage/schemes/toric/divisor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Toric divisors and divisor classes diff --git a/src/sage/schemes/toric/divisor_class.pyx b/src/sage/schemes/toric/divisor_class.pyx index e333ee713ff..a0334faee88 100644 --- a/src/sage/schemes/toric/divisor_class.pyx +++ b/src/sage/schemes/toric/divisor_class.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Toric rational divisor classes diff --git a/src/sage/schemes/toric/fano_variety.py b/src/sage/schemes/toric/fano_variety.py index cae84527c8c..d6cbe751274 100644 --- a/src/sage/schemes/toric/fano_variety.py +++ b/src/sage/schemes/toric/fano_variety.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Fano toric varieties diff --git a/src/sage/schemes/toric/homset.py b/src/sage/schemes/toric/homset.py index 1c9bf503313..e02d0b92078 100644 --- a/src/sage/schemes/toric/homset.py +++ b/src/sage/schemes/toric/homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Set of homomorphisms between two toric varieties diff --git a/src/sage/schemes/toric/ideal.py b/src/sage/schemes/toric/ideal.py index 1129a115feb..8feca9114ad 100644 --- a/src/sage/schemes/toric/ideal.py +++ b/src/sage/schemes/toric/ideal.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs sage.libs.singular r""" Toric ideals diff --git a/src/sage/schemes/toric/library.py b/src/sage/schemes/toric/library.py index 800ed825f85..c09c404d64a 100644 --- a/src/sage/schemes/toric/library.py +++ b/src/sage/schemes/toric/library.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Library of toric varieties diff --git a/src/sage/schemes/toric/morphism.py b/src/sage/schemes/toric/morphism.py index c53f5016579..d5b61a651f1 100644 --- a/src/sage/schemes/toric/morphism.py +++ b/src/sage/schemes/toric/morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Morphisms of toric varieties diff --git a/src/sage/schemes/toric/points.py b/src/sage/schemes/toric/points.py index ce7dd62a7fb..20507e5c0af 100644 --- a/src/sage/schemes/toric/points.py +++ b/src/sage/schemes/toric/points.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs """ Enumerate points of a toric variety diff --git a/src/sage/schemes/toric/sheaf/all.py b/src/sage/schemes/toric/sheaf/all.py index ca4c26e905d..e69de29bb2d 100644 --- a/src/sage/schemes/toric/sheaf/all.py +++ b/src/sage/schemes/toric/sheaf/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-polyhedra diff --git a/src/sage/schemes/toric/sheaf/constructor.py b/src/sage/schemes/toric/sheaf/constructor.py index dccf6a9ff58..72ed52a0115 100644 --- a/src/sage/schemes/toric/sheaf/constructor.py +++ b/src/sage/schemes/toric/sheaf/constructor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Construct sheaves on toric varieties diff --git a/src/sage/schemes/toric/sheaf/klyachko.py b/src/sage/schemes/toric/sheaf/klyachko.py index 9db9dacc014..4325e77f186 100644 --- a/src/sage/schemes/toric/sheaf/klyachko.py +++ b/src/sage/schemes/toric/sheaf/klyachko.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs """ Klyachko bundles and sheaves diff --git a/src/sage/schemes/toric/toric_subscheme.py b/src/sage/schemes/toric/toric_subscheme.py index 7f3684833b9..8d3bd985ed2 100644 --- a/src/sage/schemes/toric/toric_subscheme.py +++ b/src/sage/schemes/toric/toric_subscheme.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Subschemes of toric space diff --git a/src/sage/schemes/toric/variety.py b/src/sage/schemes/toric/variety.py index 84ad819a1df..aee10319916 100644 --- a/src/sage/schemes/toric/variety.py +++ b/src/sage/schemes/toric/variety.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Toric varieties diff --git a/src/sage/schemes/toric/weierstrass.py b/src/sage/schemes/toric/weierstrass.py index 46afd489cc3..492f6b41126 100644 --- a/src/sage/schemes/toric/weierstrass.py +++ b/src/sage/schemes/toric/weierstrass.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Weierstrass form of a toric elliptic curve diff --git a/src/sage/schemes/toric/weierstrass_covering.py b/src/sage/schemes/toric/weierstrass_covering.py index b5a743210a7..128c30d33a8 100644 --- a/src/sage/schemes/toric/weierstrass_covering.py +++ b/src/sage/schemes/toric/weierstrass_covering.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Map to the Weierstrass form of a toric elliptic curve diff --git a/src/sage/schemes/toric/weierstrass_higher.py b/src/sage/schemes/toric/weierstrass_higher.py index 0c0fb57489d..48d683d53a4 100644 --- a/src/sage/schemes/toric/weierstrass_higher.py +++ b/src/sage/schemes/toric/weierstrass_higher.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-polyhedra # sage.doctest: needs sage.geometry.polyhedron sage.graphs r""" Weierstrass for elliptic curves in higher codimension diff --git a/src/sage/sets/all.py b/src/sage/sets/all.py index ce54f9cf6b1..1c1a69e57a7 100644 --- a/src/sage/sets/all.py +++ b/src/sage/sets/all.py @@ -1,17 +1,15 @@ -# sage_setup: distribution = sagemath-categories from sage.misc.lazy_import import lazy_import lazy_import('sage.sets.real_set', 'RealSet') -from sage.sets.set import Set -from sage.sets.integer_range import IntegerRange -from sage.sets.non_negative_integers import NonNegativeIntegers -from sage.sets.positive_integers import PositiveIntegers -from sage.sets.finite_enumerated_set import FiniteEnumeratedSet -lazy_import('sage.sets.recursively_enumerated_set', 'RecursivelyEnumeratedSet') -from sage.sets.totally_ordered_finite_set import TotallyOrderedFiniteSet -from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets -from sage.sets.primes import Primes -from sage.sets.family import Family -from sage.sets.disjoint_set import DisjointSet -from sage.sets.condition_set import ConditionSet -from sage.sets.finite_set_maps import FiniteSetMaps -del lazy_import +from .set import Set +from .integer_range import IntegerRange +from .non_negative_integers import NonNegativeIntegers +from .positive_integers import PositiveIntegers +from .finite_enumerated_set import FiniteEnumeratedSet +lazy_import('sage.sets.recursively_enumerated_set','RecursivelyEnumeratedSet') +from .totally_ordered_finite_set import TotallyOrderedFiniteSet +from .disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets +from .primes import Primes +from .family import Family +from .disjoint_set import DisjointSet +from .condition_set import ConditionSet +from .finite_set_maps import FiniteSetMaps diff --git a/src/sage/sets/all__sagemath_objects.py b/src/sage/sets/all__sagemath_objects.py index 40da49fdd73..38e44245ad3 100644 --- a/src/sage/sets/all__sagemath_objects.py +++ b/src/sage/sets/all__sagemath_objects.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package diff --git a/src/sage/sets/cartesian_product.py b/src/sage/sets/cartesian_product.py index 9dd9263a804..47b94b6d222 100644 --- a/src/sage/sets/cartesian_product.py +++ b/src/sage/sets/cartesian_product.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Cartesian products diff --git a/src/sage/sets/condition_set.py b/src/sage/sets/condition_set.py index 10e05f9ce1d..e29f0124224 100644 --- a/src/sage/sets/condition_set.py +++ b/src/sage/sets/condition_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Subsets of a Universe Defined by Predicates """ diff --git a/src/sage/sets/disjoint_set.pxd b/src/sage/sets/disjoint_set.pxd index 381af463cdf..1ec38f5966b 100644 --- a/src/sage/sets/disjoint_set.pxd +++ b/src/sage/sets/disjoint_set.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2009 Sebastien Labbe # diff --git a/src/sage/sets/disjoint_set.pyx b/src/sage/sets/disjoint_set.pyx index 703c443e9ec..e8ae11fc3a1 100644 --- a/src/sage/sets/disjoint_set.pyx +++ b/src/sage/sets/disjoint_set.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Disjoint-set data structure diff --git a/src/sage/sets/disjoint_union_enumerated_sets.py b/src/sage/sets/disjoint_union_enumerated_sets.py index d20af8caf4b..030834993fa 100644 --- a/src/sage/sets/disjoint_union_enumerated_sets.py +++ b/src/sage/sets/disjoint_union_enumerated_sets.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Disjoint union of enumerated sets diff --git a/src/sage/sets/family.pxd b/src/sage/sets/family.pxd index 5459ef38e0b..f5d8f755ecc 100644 --- a/src/sage/sets/family.pxd +++ b/src/sage/sets/family.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.parent cimport Parent diff --git a/src/sage/sets/family.pyx b/src/sage/sets/family.pyx index f4d4ab16b34..36a6b0d6b1f 100644 --- a/src/sage/sets/family.pyx +++ b/src/sage/sets/family.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Families diff --git a/src/sage/sets/finite_enumerated_set.py b/src/sage/sets/finite_enumerated_set.py index e67ae5dd886..6f205e5b70e 100644 --- a/src/sage/sets/finite_enumerated_set.py +++ b/src/sage/sets/finite_enumerated_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Finite Enumerated Sets """ diff --git a/src/sage/sets/finite_set_map_cy.pxd b/src/sage/sets/finite_set_map_cy.pxd index 2a18a9ff2f8..daa46c099e0 100644 --- a/src/sage/sets/finite_set_map_cy.pxd +++ b/src/sage/sets/finite_set_map_cy.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2010 Florent Hivert , # diff --git a/src/sage/sets/finite_set_map_cy.pyx b/src/sage/sets/finite_set_map_cy.pyx index 9825e8502de..a06dc0a2bd9 100644 --- a/src/sage/sets/finite_set_map_cy.pyx +++ b/src/sage/sets/finite_set_map_cy.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Data structures for maps between finite sets diff --git a/src/sage/sets/finite_set_maps.py b/src/sage/sets/finite_set_maps.py index 9429eee92ed..b0faa1ddd95 100644 --- a/src/sage/sets/finite_set_maps.py +++ b/src/sage/sets/finite_set_maps.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Maps between finite sets diff --git a/src/sage/sets/image_set.py b/src/sage/sets/image_set.py index 43650511660..0472d793c19 100644 --- a/src/sage/sets/image_set.py +++ b/src/sage/sets/image_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Image Sets """ diff --git a/src/sage/sets/integer_range.py b/src/sage/sets/integer_range.py index 9706facafc5..31602abb5a6 100644 --- a/src/sage/sets/integer_range.py +++ b/src/sage/sets/integer_range.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Integer Range diff --git a/src/sage/sets/non_negative_integers.py b/src/sage/sets/non_negative_integers.py index f76b8e6c6b0..a7995ff3e1e 100644 --- a/src/sage/sets/non_negative_integers.py +++ b/src/sage/sets/non_negative_integers.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Non Negative Integers """ diff --git a/src/sage/sets/positive_integers.py b/src/sage/sets/positive_integers.py index cfb44167fe2..70625fb53b7 100644 --- a/src/sage/sets/positive_integers.py +++ b/src/sage/sets/positive_integers.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Positive Integers """ diff --git a/src/sage/sets/primes.py b/src/sage/sets/primes.py index fc4e8b02d29..ac33901a73b 100644 --- a/src/sage/sets/primes.py +++ b/src/sage/sets/primes.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ The set of prime numbers diff --git a/src/sage/sets/pythonclass.pxd b/src/sage/sets/pythonclass.pxd index cb59baca759..4346d918386 100644 --- a/src/sage/sets/pythonclass.pxd +++ b/src/sage/sets/pythonclass.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.parent cimport Set_generic diff --git a/src/sage/sets/pythonclass.pyx b/src/sage/sets/pythonclass.pyx index 7b75bd7bf26..bfa7f3bc617 100644 --- a/src/sage/sets/pythonclass.pyx +++ b/src/sage/sets/pythonclass.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Set of all objects of a given Python class """ diff --git a/src/sage/sets/real_set.py b/src/sage/sets/real_set.py index 11f4aae9f78..168521ce6a8 100644 --- a/src/sage/sets/real_set.py +++ b/src/sage/sets/real_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories # sage.doctest: needs sage.rings.real_interval_field sage.rings.real_mpfr """ Subsets of the Real Line diff --git a/src/sage/sets/recursively_enumerated_set.pxd b/src/sage/sets/recursively_enumerated_set.pxd index 68ba0914c7b..48c8312456c 100644 --- a/src/sage/sets/recursively_enumerated_set.pxd +++ b/src/sage/sets/recursively_enumerated_set.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories #***************************************************************************** # Copyright (C) 2014 Sage # diff --git a/src/sage/sets/recursively_enumerated_set.pyx b/src/sage/sets/recursively_enumerated_set.pyx index cc388339b65..56bd8d16850 100644 --- a/src/sage/sets/recursively_enumerated_set.pyx +++ b/src/sage/sets/recursively_enumerated_set.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Recursively Enumerated Sets diff --git a/src/sage/sets/set.py b/src/sage/sets/set.py index adb8f2e9dbe..fe351298d0a 100644 --- a/src/sage/sets/set.py +++ b/src/sage/sets/set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Sets diff --git a/src/sage/sets/set_from_iterator.py b/src/sage/sets/set_from_iterator.py index 0a758dd5f77..81cb4f11bbc 100644 --- a/src/sage/sets/set_from_iterator.py +++ b/src/sage/sets/set_from_iterator.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Enumerated set from iterator diff --git a/src/sage/sets/totally_ordered_finite_set.py b/src/sage/sets/totally_ordered_finite_set.py index 51b0f67539a..7efba359dc0 100644 --- a/src/sage/sets/totally_ordered_finite_set.py +++ b/src/sage/sets/totally_ordered_finite_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories """ Totally Ordered Finite Sets diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 2636682e270..3b4c8c4ff52 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -1,16 +1,11 @@ -# sage_setup: distribution = sagemath-modules - -from sage.stats.basic_stats import (mean, mode, std, variance, median, moving_average) -from sage.stats.hmm import all as hmm import sage.stats.distributions.catalog as distributions -from sage.misc.lazy_import import lazy_import - -lazy_import("sage.stats.r", "ttest") +from .r import ttest +from .basic_stats import (mean, mode, std, variance, median, moving_average) +from .hmm import all as hmm # We lazy_import the following modules since they import numpy which # slows down sage startup - +from sage.misc.lazy_import import lazy_import lazy_import("sage.stats.time_series", ["TimeSeries", "autoregressive_fit"]) lazy_import("sage.stats.intlist", ["IntList"]) -del lazy_import diff --git a/src/sage/stats/basic_stats.py b/src/sage/stats/basic_stats.py index a3c8bbfe47f..83dc50b4e89 100644 --- a/src/sage/stats/basic_stats.py +++ b/src/sage/stats/basic_stats.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ Basic Statistics diff --git a/src/sage/stats/distributions/all.py b/src/sage/stats/distributions/all.py index 22eb34f328c..d37a8563ec6 100644 --- a/src/sage/stats/distributions/all.py +++ b/src/sage/stats/distributions/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # We lazy_import the following modules since they import numpy which # slows down sage startup from sage.misc.lazy_import import lazy_import diff --git a/src/sage/stats/distributions/dgs.pxd b/src/sage/stats/distributions/dgs.pxd index 328ae8d90d2..614db1388b5 100644 --- a/src/sage/stats/distributions/dgs.pxd +++ b/src/sage/stats/distributions/dgs.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ AUTHOR: Martin Albrecht """ diff --git a/src/sage/stats/distributions/discrete_gaussian_integer.pxd b/src/sage/stats/distributions/discrete_gaussian_integer.pxd index cadbd33f27f..d6edbe88d43 100644 --- a/src/sage/stats/distributions/discrete_gaussian_integer.pxd +++ b/src/sage/stats/distributions/discrete_gaussian_integer.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.rings.integer cimport Integer from sage.rings.real_mpfr cimport RealNumber from sage.stats.distributions.dgs cimport dgs_disc_gauss_mp_t, dgs_disc_gauss_dp_t diff --git a/src/sage/stats/distributions/discrete_gaussian_integer.pyx b/src/sage/stats/distributions/discrete_gaussian_integer.pyx index 55625af5320..6d50074102b 100644 --- a/src/sage/stats/distributions/discrete_gaussian_integer.pyx +++ b/src/sage/stats/distributions/discrete_gaussian_integer.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.symbolic # # distutils: sources = sage/stats/distributions/dgs_gauss_mp.c sage/stats/distributions/dgs_gauss_dp.c sage/stats/distributions/dgs_bern.c diff --git a/src/sage/stats/distributions/discrete_gaussian_lattice.py b/src/sage/stats/distributions/discrete_gaussian_lattice.py index fff0418624a..6667b2fb5cf 100644 --- a/src/sage/stats/distributions/discrete_gaussian_lattice.py +++ b/src/sage/stats/distributions/discrete_gaussian_lattice.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- r""" Discrete Gaussian Samplers over Lattices diff --git a/src/sage/stats/distributions/discrete_gaussian_polynomial.py b/src/sage/stats/distributions/discrete_gaussian_polynomial.py index 713d8b1264d..63c8f5b800a 100644 --- a/src/sage/stats/distributions/discrete_gaussian_polynomial.py +++ b/src/sage/stats/distributions/discrete_gaussian_polynomial.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-modules +# -*- coding: utf-8 -*- r""" Discrete Gaussian Samplers for `\ZZ[x]` diff --git a/src/sage/stats/hmm/all.py b/src/sage/stats/hmm/all.py index 1bea3cdd941..2e1bcacd23d 100644 --- a/src/sage/stats/hmm/all.py +++ b/src/sage/stats/hmm/all.py @@ -1,15 +1,12 @@ -# sage_setup: distribution = sagemath-modules ############################################################################# # Copyright (C) 2010 William Stein # Distributed under the terms of the GNU General Public License (GPL), v2+. # The full text of the GPL is available at: -# https://www.gnu.org/licenses/ +# http://www.gnu.org/licenses/ ############################################################################# # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import lazy_import("sage.stats.hmm.hmm", ["DiscreteHiddenMarkovModel"]) -lazy_import("sage.stats.hmm.chmm", [ - "GaussianHiddenMarkovModel", "GaussianMixtureHiddenMarkovModel"]) +lazy_import("sage.stats.hmm.chmm", ["GaussianHiddenMarkovModel","GaussianMixtureHiddenMarkovModel"]) lazy_import("sage.stats.hmm.distributions", ["GaussianMixtureDistribution"]) -del lazy_import diff --git a/src/sage/stats/hmm/chmm.pyx b/src/sage/stats/hmm/chmm.pyx index 0b189692a3f..f0940c5849d 100644 --- a/src/sage/stats/hmm/chmm.pyx +++ b/src/sage/stats/hmm/chmm.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs numpy r""" Continuous Emission Hidden Markov Models diff --git a/src/sage/stats/hmm/distributions.pxd b/src/sage/stats/hmm/distributions.pxd index c29cb5cf85a..73e4dbc6a9b 100644 --- a/src/sage/stats/hmm/distributions.pxd +++ b/src/sage/stats/hmm/distributions.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################################# # Copyright (C) 2010 William Stein # Distributed under the terms of the GNU General Public License (GPL) diff --git a/src/sage/stats/hmm/distributions.pyx b/src/sage/stats/hmm/distributions.pyx index 4bc3803094a..dd4860317e1 100644 --- a/src/sage/stats/hmm/distributions.pyx +++ b/src/sage/stats/hmm/distributions.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Distributions used in implementing Hidden Markov Models diff --git a/src/sage/stats/hmm/hmm.pxd b/src/sage/stats/hmm/hmm.pxd index db69471b83a..1abcb95392b 100644 --- a/src/sage/stats/hmm/hmm.pxd +++ b/src/sage/stats/hmm/hmm.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################################# # Copyright (C) 2010 William Stein # Distributed under the terms of the GNU General Public License (GPL) v2+. diff --git a/src/sage/stats/hmm/hmm.pyx b/src/sage/stats/hmm/hmm.pyx index 8b607a1d0be..0935c9398ee 100644 --- a/src/sage/stats/hmm/hmm.pyx +++ b/src/sage/stats/hmm/hmm.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs numpy sage.modules r""" Hidden Markov Models diff --git a/src/sage/stats/hmm/util.pxd b/src/sage/stats/hmm/util.pxd index 31a65495e31..b0d399d9aaf 100644 --- a/src/sage/stats/hmm/util.pxd +++ b/src/sage/stats/hmm/util.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules from sage.stats.time_series cimport TimeSeries cdef class HMM_Util: diff --git a/src/sage/stats/hmm/util.pyx b/src/sage/stats/hmm/util.pyx index 02fcf1b7855..553eb997364 100644 --- a/src/sage/stats/hmm/util.pyx +++ b/src/sage/stats/hmm/util.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy """ Hidden Markov Models -- Utility functions diff --git a/src/sage/stats/intlist.pxd b/src/sage/stats/intlist.pxd index e6708c7aaf0..d63971aac14 100644 --- a/src/sage/stats/intlist.pxd +++ b/src/sage/stats/intlist.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules ############################################################################# # Copyright (C) 2010 William Stein # Distributed under the terms of the GNU General Public License (GPL) v2+. diff --git a/src/sage/stats/intlist.pyx b/src/sage/stats/intlist.pyx index e8ab5c4a360..fccbb56e680 100644 --- a/src/sage/stats/intlist.pyx +++ b/src/sage/stats/intlist.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy """ C Int Lists diff --git a/src/sage/stats/r.py b/src/sage/stats/r.py index 5a9d5313de4..47f492eff61 100644 --- a/src/sage/stats/r.py +++ b/src/sage/stats/r.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules """ T-test using R diff --git a/src/sage/stats/time_series.pxd b/src/sage/stats/time_series.pxd index e127c87d15d..86a9095ba75 100644 --- a/src/sage/stats/time_series.pxd +++ b/src/sage/stats/time_series.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules cdef class TimeSeries: cdef double* _values cdef Py_ssize_t _length diff --git a/src/sage/stats/time_series.pyx b/src/sage/stats/time_series.pyx index 632c6c57fe8..d6823f85add 100644 --- a/src/sage/stats/time_series.pyx +++ b/src/sage/stats/time_series.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: optional - numpy r""" Time Series diff --git a/src/sage/structure/__init__.py b/src/sage/structure/__init__.py index bf977ccc379..8689eb1717f 100644 --- a/src/sage/structure/__init__.py +++ b/src/sage/structure/__init__.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects # Resolve a cyclic import import sage.structure.element diff --git a/src/sage/structure/all.py b/src/sage/structure/all.py index 40b9daa67e8..df0114c8382 100644 --- a/src/sage/structure/all.py +++ b/src/sage/structure/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.factorization import Factorization from sage.structure.sequence import Sequence, seq @@ -13,7 +12,7 @@ get_coercion_model, coercion_traceback, parent -) + ) from sage.structure.parent import Parent diff --git a/src/sage/structure/category_object.pxd b/src/sage/structure/category_object.pxd index 0f629e245ac..83d3d4967d4 100644 --- a/src/sage/structure/category_object.pxd +++ b/src/sage/structure/category_object.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects #***************************************************************************** # Copyright (C) 2006 William Stein # diff --git a/src/sage/structure/category_object.pyx b/src/sage/structure/category_object.pyx index 1f84a2ed2dc..48cee10c2bc 100644 --- a/src/sage/structure/category_object.pyx +++ b/src/sage/structure/category_object.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # cython: old_style_globals=True r""" Base class for objects of a category diff --git a/src/sage/structure/coerce.pxd b/src/sage/structure/coerce.pxd index 0d2cd13f1d8..71d519cf185 100644 --- a/src/sage/structure/coerce.pxd +++ b/src/sage/structure/coerce.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.parent cimport Parent from sage.structure.coerce_dict cimport TripleDict diff --git a/src/sage/structure/coerce.pyx b/src/sage/structure/coerce.pyx index 003af5718d1..888643314f5 100644 --- a/src/sage/structure/coerce.pyx +++ b/src/sage/structure/coerce.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" The coercion model diff --git a/src/sage/structure/coerce_actions.pxd b/src/sage/structure/coerce_actions.pxd index dc681f5a075..81a52ff5ad6 100644 --- a/src/sage/structure/coerce_actions.pxd +++ b/src/sage/structure/coerce_actions.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.categories.action cimport Action from sage.categories.map cimport Map diff --git a/src/sage/structure/coerce_actions.pyx b/src/sage/structure/coerce_actions.pyx index 1c54d7624ab..e1ff3b378e7 100644 --- a/src/sage/structure/coerce_actions.pyx +++ b/src/sage/structure/coerce_actions.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Coerce actions """ diff --git a/src/sage/structure/coerce_dict.pxd b/src/sage/structure/coerce_dict.pxd index 13d9e3ad0f1..2f7f8d3aef4 100644 --- a/src/sage/structure/coerce_dict.pxd +++ b/src/sage/structure/coerce_dict.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cimport cython from cpython.object cimport PyObject diff --git a/src/sage/structure/coerce_dict.pyx b/src/sage/structure/coerce_dict.pyx index ce9ea7811b5..bdec7ec97cd 100644 --- a/src/sage/structure/coerce_dict.pyx +++ b/src/sage/structure/coerce_dict.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Containers for storing coercion data diff --git a/src/sage/structure/coerce_exceptions.py b/src/sage/structure/coerce_exceptions.py index e60984f25ee..5859831e4fa 100644 --- a/src/sage/structure/coerce_exceptions.py +++ b/src/sage/structure/coerce_exceptions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects "Exceptions raised by the coercion model" ############################################################################### diff --git a/src/sage/structure/coerce_maps.pxd b/src/sage/structure/coerce_maps.pxd index cf8e1f6f51a..0afc1a96adb 100644 --- a/src/sage/structure/coerce_maps.pxd +++ b/src/sage/structure/coerce_maps.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.categories.map cimport Map diff --git a/src/sage/structure/coerce_maps.pyx b/src/sage/structure/coerce_maps.pyx index 272f4d9baf0..aabeafa6bc8 100644 --- a/src/sage/structure/coerce_maps.pyx +++ b/src/sage/structure/coerce_maps.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Coerce maps """ diff --git a/src/sage/structure/debug_options.pxd b/src/sage/structure/debug_options.pxd index 42a3411e76b..55db2332ed4 100644 --- a/src/sage/structure/debug_options.pxd +++ b/src/sage/structure/debug_options.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects cdef class DebugOptions_class: cdef public bint unique_parent_warnings cdef public bint refine_category_hash_check diff --git a/src/sage/structure/debug_options.pyx b/src/sage/structure/debug_options.pyx index 3afe5ca835a..05d7835f869 100644 --- a/src/sage/structure/debug_options.pyx +++ b/src/sage/structure/debug_options.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Debug options for the :mod:`sage.structure` modules diff --git a/src/sage/structure/dynamic_class.py b/src/sage/structure/dynamic_class.py index 51a2c333186..f8df20a02ae 100644 --- a/src/sage/structure/dynamic_class.py +++ b/src/sage/structure/dynamic_class.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Dynamic classes diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index cc1bf225710..2d360905783 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.sage_object cimport SageObject from sage.structure.parent cimport Parent from sage.misc.inherit_comparison cimport InheritComparisonMetaclass diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index a536004aba5..6ee4d7c8201 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # Compile this with -Os because it works around a bug with # GCC-4.7.3 + Cython 0.19 on Itanium, see Issue #14452. Moreover, it # actually results in faster code than -O3. diff --git a/src/sage/structure/element_wrapper.pxd b/src/sage/structure/element_wrapper.pxd index dda6630c84d..f8689c57947 100644 --- a/src/sage/structure/element_wrapper.pxd +++ b/src/sage/structure/element_wrapper.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from sage.structure.element cimport Element diff --git a/src/sage/structure/element_wrapper.pyx b/src/sage/structure/element_wrapper.pyx index f7fc4e38bad..0f0c25bdd8d 100644 --- a/src/sage/structure/element_wrapper.pyx +++ b/src/sage/structure/element_wrapper.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- coding: utf-8 -*- """ Element Wrapper diff --git a/src/sage/structure/factorization.py b/src/sage/structure/factorization.py index e699266caed..00ad9658e59 100644 --- a/src/sage/structure/factorization.py +++ b/src/sage/structure/factorization.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Factorizations diff --git a/src/sage/structure/factorization_integer.py b/src/sage/structure/factorization_integer.py index 542daf538dd..139a3580e48 100644 --- a/src/sage/structure/factorization_integer.py +++ b/src/sage/structure/factorization_integer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects "IntegerFactorization objects" from sage.structure.factorization import Factorization diff --git a/src/sage/structure/factory.pyx b/src/sage/structure/factory.pyx index 7484acc0e2c..75a043250c2 100644 --- a/src/sage/structure/factory.pyx +++ b/src/sage/structure/factory.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Factory for cached representations diff --git a/src/sage/structure/formal_sum.py b/src/sage/structure/formal_sum.py index b11865373b4..f8f9b4d16de 100644 --- a/src/sage/structure/formal_sum.py +++ b/src/sage/structure/formal_sum.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Formal sums diff --git a/src/sage/structure/gens_py.py b/src/sage/structure/gens_py.py index 6d3fcae2520..22555a74c92 100644 --- a/src/sage/structure/gens_py.py +++ b/src/sage/structure/gens_py.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Pure python code for abstract base class for objects with generators """ diff --git a/src/sage/structure/global_options.py b/src/sage/structure/global_options.py index 9d27e826f2d..01bbfd79ad9 100644 --- a/src/sage/structure/global_options.py +++ b/src/sage/structure/global_options.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Global options diff --git a/src/sage/structure/indexed_generators.py b/src/sage/structure/indexed_generators.py index de3a703baf9..f0d521bee87 100644 --- a/src/sage/structure/indexed_generators.py +++ b/src/sage/structure/indexed_generators.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- coding: utf-8 -*- """ Indexed Generators """ diff --git a/src/sage/structure/list_clone.pxd b/src/sage/structure/list_clone.pxd index 4366d7494e3..ef1d20f4bd3 100644 --- a/src/sage/structure/list_clone.pxd +++ b/src/sage/structure/list_clone.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects #***************************************************************************** # Copyright (C) 2009-2010 Florent Hivert # diff --git a/src/sage/structure/list_clone.pyx b/src/sage/structure/list_clone.pyx index ae8cb0de103..8ae709adc45 100644 --- a/src/sage/structure/list_clone.pyx +++ b/src/sage/structure/list_clone.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Elements, Array and Lists With Clone Protocol diff --git a/src/sage/structure/list_clone_demo.pyx b/src/sage/structure/list_clone_demo.pyx index df9cf81cd70..0bd018f57c0 100644 --- a/src/sage/structure/list_clone_demo.pyx +++ b/src/sage/structure/list_clone_demo.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Elements, Array and Lists With Clone Protocol, demonstration classes diff --git a/src/sage/structure/list_clone_timings.py b/src/sage/structure/list_clone_timings.py index 05320d6bc77..efe5d20efc7 100644 --- a/src/sage/structure/list_clone_timings.py +++ b/src/sage/structure/list_clone_timings.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- coding: utf-8 -*- """ Performance Test for Clone Protocol diff --git a/src/sage/structure/list_clone_timings_cy.pyx b/src/sage/structure/list_clone_timings_cy.pyx index 87039d3f94a..46152f1e68b 100644 --- a/src/sage/structure/list_clone_timings_cy.pyx +++ b/src/sage/structure/list_clone_timings_cy.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Cython Functions for Timing Clone Protocol """ diff --git a/src/sage/structure/mutability.pxd b/src/sage/structure/mutability.pxd index bb16ece621c..f5df8b89892 100644 --- a/src/sage/structure/mutability.pxd +++ b/src/sage/structure/mutability.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Mutability -- Pyrex Implementation """ @@ -18,4 +17,4 @@ cdef class Mutability: cpdef _require_mutable(self) cpdef _require_immutable(self) cpdef bint is_immutable(self) noexcept - cpdef bint is_mutable(self) noexcept + cpdef bint is_mutable(self) noexcept \ No newline at end of file diff --git a/src/sage/structure/mutability.pyx b/src/sage/structure/mutability.pyx index e33c2bf6b38..c61fd06c3dc 100644 --- a/src/sage/structure/mutability.pyx +++ b/src/sage/structure/mutability.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Mutability Cython Implementation """ diff --git a/src/sage/structure/nonexact.py b/src/sage/structure/nonexact.py index cef7a641f26..ffb39e5f579 100644 --- a/src/sage/structure/nonexact.py +++ b/src/sage/structure/nonexact.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Precision management for non-exact objects diff --git a/src/sage/structure/parent.pxd b/src/sage/structure/parent.pxd index 691bd78eb2a..1635ef8b36e 100644 --- a/src/sage/structure/parent.pxd +++ b/src/sage/structure/parent.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects #***************************************************************************** # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/structure/parent.pyx b/src/sage/structure/parent.pyx index 7c4737d8d7d..2b579cdc60a 100644 --- a/src/sage/structure/parent.pyx +++ b/src/sage/structure/parent.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Base class for parent objects diff --git a/src/sage/structure/parent_base.pxd b/src/sage/structure/parent_base.pxd index 3683c39d827..8ffac64eff2 100644 --- a/src/sage/structure/parent_base.pxd +++ b/src/sage/structure/parent_base.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects ############################################################################### # Sage: Open Source Mathematical Software # Copyright (C) 2006 William Stein diff --git a/src/sage/structure/parent_base.pyx b/src/sage/structure/parent_base.pyx index 7cef8f692c5..b41175b5bff 100644 --- a/src/sage/structure/parent_base.pyx +++ b/src/sage/structure/parent_base.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Base class for old-style parent objects with a base ring """ diff --git a/src/sage/structure/parent_gens.pxd b/src/sage/structure/parent_gens.pxd index 573db0c52fa..cf3b416317f 100644 --- a/src/sage/structure/parent_gens.pxd +++ b/src/sage/structure/parent_gens.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Parent objects with generators """ diff --git a/src/sage/structure/parent_gens.pyx b/src/sage/structure/parent_gens.pyx index 6f12c36670f..3f69b9daee4 100644 --- a/src/sage/structure/parent_gens.pyx +++ b/src/sage/structure/parent_gens.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Base class for old-style parent objects with generators diff --git a/src/sage/structure/parent_old.pxd b/src/sage/structure/parent_old.pxd index 6a26fba915e..54bb4753970 100644 --- a/src/sage/structure/parent_old.pxd +++ b/src/sage/structure/parent_old.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects # **************************************************************************** # Copyright (C) 2006 William Stein # diff --git a/src/sage/structure/parent_old.pyx b/src/sage/structure/parent_old.pyx index a34928ff8a2..7b8ce70b5a5 100644 --- a/src/sage/structure/parent_old.pyx +++ b/src/sage/structure/parent_old.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Base class for old-style parent objects diff --git a/src/sage/structure/proof/__init__.py b/src/sage/structure/proof/__init__.py index f9b8167c3cd..e69de29bb2d 100644 --- a/src/sage/structure/proof/__init__.py +++ b/src/sage/structure/proof/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-objects diff --git a/src/sage/structure/proof/all.py b/src/sage/structure/proof/all.py index d3a72dc1400..c006c56c36d 100644 --- a/src/sage/structure/proof/all.py +++ b/src/sage/structure/proof/all.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects def arithmetic(t=None): @@ -36,7 +35,7 @@ def arithmetic(t=None): sage: proof.arithmetic() True """ - from sage.structure.proof.proof import _proof_prefs + from .proof import _proof_prefs return _proof_prefs.arithmetic(t) @@ -74,7 +73,7 @@ def elliptic_curve(t=None): sage: proof.elliptic_curve() True """ - from sage.structure.proof.proof import _proof_prefs + from .proof import _proof_prefs return _proof_prefs.elliptic_curve(t) @@ -112,7 +111,7 @@ def linear_algebra(t=None): sage: proof.linear_algebra() True """ - from sage.structure.proof.proof import _proof_prefs + from .proof import _proof_prefs return _proof_prefs.linear_algebra(t) @@ -149,7 +148,7 @@ def number_field(t=None): sage: proof.number_field() True """ - from sage.structure.proof.proof import _proof_prefs + from .proof import _proof_prefs return _proof_prefs.number_field(t) @@ -186,7 +185,7 @@ def polynomial(t=None): sage: proof.polynomial() True """ - from sage.structure.proof.proof import _proof_prefs + from .proof import _proof_prefs return _proof_prefs.polynomial(t) @@ -235,11 +234,11 @@ def all(t=None): sage: proof.number_field() True """ - from sage.structure.proof.proof import _proof_prefs + from .proof import _proof_prefs if t is None: return _proof_prefs._require_proof.copy() for s in _proof_prefs._require_proof: _proof_prefs._require_proof[s] = bool(t) -from sage.structure.proof.proof import WithProof +from .proof import WithProof diff --git a/src/sage/structure/proof/proof.py b/src/sage/structure/proof/proof.py index bb02b6dce54..49d4ecebe5a 100644 --- a/src/sage/structure/proof/proof.py +++ b/src/sage/structure/proof/proof.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects "Global proof preferences" from sage.structure.sage_object import SageObject diff --git a/src/sage/structure/richcmp.pxd b/src/sage/structure/richcmp.pxd index ecbeaef391e..98bda696ec7 100644 --- a/src/sage/structure/richcmp.pxd +++ b/src/sage/structure/richcmp.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects from libc.stdint cimport uint32_t from cpython.object cimport (Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE, PyObject_RichCompare) diff --git a/src/sage/structure/richcmp.pyx b/src/sage/structure/richcmp.pyx index 934a49e7600..465f16e8274 100644 --- a/src/sage/structure/richcmp.pyx +++ b/src/sage/structure/richcmp.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Cython-like rich comparisons in Python diff --git a/src/sage/structure/sage_object.pxd b/src/sage/structure/sage_object.pxd index 40b753d1aa3..5e3e442c896 100644 --- a/src/sage/structure/sage_object.pxd +++ b/src/sage/structure/sage_object.pxd @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-objects cdef class SageObject: pass diff --git a/src/sage/structure/sage_object.pyx b/src/sage/structure/sage_object.pyx index 4c4bd56678e..b5b9f59334d 100644 --- a/src/sage/structure/sage_object.pyx +++ b/src/sage/structure/sage_object.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-objects +# -*- encoding: utf-8 -*- r""" Abstract base class for Sage objects """ diff --git a/src/sage/structure/sage_object_test.py b/src/sage/structure/sage_object_test.py index 644543e99f8..721c1ad7719 100644 --- a/src/sage/structure/sage_object_test.py +++ b/src/sage/structure/sage_object_test.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects import pytest from sage.structure.sage_object import SageObject diff --git a/src/sage/structure/sequence.py b/src/sage/structure/sequence.py index 5bbcfc1798a..92d464241e6 100644 --- a/src/sage/structure/sequence.py +++ b/src/sage/structure/sequence.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Finite Homogeneous Sequences diff --git a/src/sage/structure/set_factories.py b/src/sage/structure/set_factories.py index 46d8870379c..f8b8e3643c9 100644 --- a/src/sage/structure/set_factories.py +++ b/src/sage/structure/set_factories.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Set factories ============= diff --git a/src/sage/structure/set_factories_example.py b/src/sage/structure/set_factories_example.py index 8212f7ce525..df1d7d7f49c 100644 --- a/src/sage/structure/set_factories_example.py +++ b/src/sage/structure/set_factories_example.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" An example of set factory ========================= diff --git a/src/sage/structure/support_view.py b/src/sage/structure/support_view.py index bebae1a31f5..0778f2a47ed 100644 --- a/src/sage/structure/support_view.py +++ b/src/sage/structure/support_view.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Iterable of the keys of a Mapping associated with nonzero values """ diff --git a/src/sage/structure/test_factory.py b/src/sage/structure/test_factory.py index 9835a06f909..145311b9dd3 100644 --- a/src/sage/structure/test_factory.py +++ b/src/sage/structure/test_factory.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects """ Test of the :mod:`~sage.structure.factory` module """ diff --git a/src/sage/structure/unique_representation.py b/src/sage/structure/unique_representation.py index 5dd5072b45f..bef7563001e 100644 --- a/src/sage/structure/unique_representation.py +++ b/src/sage/structure/unique_representation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-objects r""" Unique Representation diff --git a/src/sage/symbolic/all.py b/src/sage/symbolic/all.py index 1ff2a51a3f8..b5a0883d202 100644 --- a/src/sage/symbolic/all.py +++ b/src/sage/symbolic/all.py @@ -1,16 +1,14 @@ -# sage_setup: distribution = sagemath-symbolics - -from sage.symbolic.ring import SR -from sage.symbolic.constants import (pi, e, NaN, golden_ratio, log2, euler_gamma, catalan, - khinchin, twinprime, mertens, glaisher) -from sage.symbolic.expression import Expression, solve_diophantine, hold -from sage.symbolic.callable import CallableSymbolicExpressionRing +from .ring import SR +from .constants import (pi, e, NaN, golden_ratio, log2, euler_gamma, catalan, + khinchin, twinprime, mertens, glaisher) +from .expression import Expression, solve_diophantine, hold +from .callable import CallableSymbolicExpressionRing from sage.symbolic.relation import solve, solve_mod, solve_ineq from sage.symbolic.assumptions import assume, forget, assumptions, assuming -from sage.symbolic.units import units +from .units import units π = pi -from sage.symbolic.operators import D +from .operators import D diff --git a/src/sage/symbolic/all__sagemath_categories.py b/src/sage/symbolic/all__sagemath_categories.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/symbolic/all__sagemath_standard_no_symbolics.py b/src/sage/symbolic/all__sagemath_standard_no_symbolics.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/sage/symbolic/assumptions.py b/src/sage/symbolic/assumptions.py index 9503aa9786f..9ef8dd39212 100644 --- a/src/sage/symbolic/assumptions.py +++ b/src/sage/symbolic/assumptions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Assumptions diff --git a/src/sage/symbolic/benchmark.py b/src/sage/symbolic/benchmark.py index f5aea55e97b..66d8217e315 100644 --- a/src/sage/symbolic/benchmark.py +++ b/src/sage/symbolic/benchmark.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Benchmarks diff --git a/src/sage/symbolic/callable.py b/src/sage/symbolic/callable.py index 44b5d8c957c..f578454706a 100644 --- a/src/sage/symbolic/callable.py +++ b/src/sage/symbolic/callable.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Callable Symbolic Expressions diff --git a/src/sage/symbolic/comparison_impl.pxi b/src/sage/symbolic/comparison_impl.pxi index 6dc61c2bab3..a1ef76bd778 100644 --- a/src/sage/symbolic/comparison_impl.pxi +++ b/src/sage/symbolic/comparison_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Comparison of Symbolic Expressions diff --git a/src/sage/symbolic/complexity_measures.py b/src/sage/symbolic/complexity_measures.py index dc6211f6486..528d1bf6906 100644 --- a/src/sage/symbolic/complexity_measures.py +++ b/src/sage/symbolic/complexity_measures.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Complexity Measures diff --git a/src/sage/symbolic/constants.py b/src/sage/symbolic/constants.py index 3b4bb3375c2..043a55aa0e4 100644 --- a/src/sage/symbolic/constants.py +++ b/src/sage/symbolic/constants.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Mathematical constants diff --git a/src/sage/symbolic/constants_c_impl.pxi b/src/sage/symbolic/constants_c_impl.pxi index 901dabb8772..63a90c71fd9 100644 --- a/src/sage/symbolic/constants_c_impl.pxi +++ b/src/sage/symbolic/constants_c_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ The constant `e` """ diff --git a/src/sage/symbolic/expression.pxd b/src/sage/symbolic/expression.pxd index afd28c1d25c..33e352b7f3d 100644 --- a/src/sage/symbolic/expression.pxd +++ b/src/sage/symbolic/expression.pxd @@ -1,5 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics - cpdef _repr_Expression(x) cpdef _latex_Expression(x) cpdef new_Expression(parent, x) diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index 053ad77b6e6..e14674678a0 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- # distutils: sources = sage/symbolic/ginac/add.cpp sage/symbolic/ginac/archive.cpp sage/symbolic/ginac/assume.cpp sage/symbolic/ginac/basic.cpp sage/symbolic/ginac/cmatcher.cpp sage/symbolic/ginac/constant.cpp sage/symbolic/ginac/context.cpp sage/symbolic/ginac/ex.cpp sage/symbolic/ginac/expair.cpp sage/symbolic/ginac/expairseq.cpp sage/symbolic/ginac/exprseq.cpp sage/symbolic/ginac/fderivative.cpp sage/symbolic/ginac/function.cpp sage/symbolic/ginac/function_info.cpp sage/symbolic/ginac/infinity.cpp sage/symbolic/ginac/infoflagbase.cpp sage/symbolic/ginac/inifcns.cpp sage/symbolic/ginac/inifcns_comb.cpp sage/symbolic/ginac/inifcns_gamma.cpp sage/symbolic/ginac/inifcns_hyperb.cpp sage/symbolic/ginac/inifcns_hyperg.cpp sage/symbolic/ginac/inifcns_nstdsums.cpp sage/symbolic/ginac/inifcns_orthopoly.cpp sage/symbolic/ginac/inifcns_trans.cpp sage/symbolic/ginac/inifcns_trig.cpp sage/symbolic/ginac/inifcns_zeta.cpp sage/symbolic/ginac/lst.cpp sage/symbolic/ginac/matrix.cpp sage/symbolic/ginac/mpoly-giac.cpp sage/symbolic/ginac/mpoly-ginac.cpp sage/symbolic/ginac/mpoly-singular.cpp sage/symbolic/ginac/mpoly.cpp sage/symbolic/ginac/mul.cpp sage/symbolic/ginac/normal.cpp sage/symbolic/ginac/numeric.cpp sage/symbolic/ginac/operators.cpp sage/symbolic/ginac/order.cpp sage/symbolic/ginac/power.cpp sage/symbolic/ginac/print.cpp sage/symbolic/ginac/pseries.cpp sage/symbolic/ginac/py_funcs.cpp sage/symbolic/ginac/registrar.cpp sage/symbolic/ginac/relational.cpp sage/symbolic/ginac/remember.cpp sage/symbolic/ginac/sum.cpp sage/symbolic/ginac/symbol.cpp sage/symbolic/ginac/templates.cpp sage/symbolic/ginac/upoly-ginac.cpp sage/symbolic/ginac/useries.cpp sage/symbolic/ginac/utils.cpp sage/symbolic/ginac/wildcard.cpp # distutils: language = c++ # distutils: libraries = flint gmp SINGULAR_LIBRARIES diff --git a/src/sage/symbolic/expression_conversion_algebraic.py b/src/sage/symbolic/expression_conversion_algebraic.py index 0a4e6b926cb..d5764cb2421 100644 --- a/src/sage/symbolic/expression_conversion_algebraic.py +++ b/src/sage/symbolic/expression_conversion_algebraic.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Conversion of symbolic expressions to algebraic numbers """ diff --git a/src/sage/symbolic/expression_conversion_sympy.py b/src/sage/symbolic/expression_conversion_sympy.py index 00c7dae8bbc..e7aaf3bd656 100644 --- a/src/sage/symbolic/expression_conversion_sympy.py +++ b/src/sage/symbolic/expression_conversion_sympy.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics # sage.doctest: needs sympy r""" Conversion of symbolic expressions to SymPy diff --git a/src/sage/symbolic/expression_conversions.py b/src/sage/symbolic/expression_conversions.py index fb29ef525c0..3944390c746 100644 --- a/src/sage/symbolic/expression_conversions.py +++ b/src/sage/symbolic/expression_conversions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Conversion of symbolic expressions to other types diff --git a/src/sage/symbolic/function.pxd b/src/sage/symbolic/function.pxd index a3235c3f4c0..db1ba6c5d54 100644 --- a/src/sage/symbolic/function.pxd +++ b/src/sage/symbolic/function.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories from sage.structure.sage_object cimport SageObject cdef class Function(SageObject): diff --git a/src/sage/symbolic/function.pyx b/src/sage/symbolic/function.pyx index 02dd2bffc19..f33b8eb47e6 100644 --- a/src/sage/symbolic/function.pyx +++ b/src/sage/symbolic/function.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Classes for symbolic functions diff --git a/src/sage/symbolic/function_factory.py b/src/sage/symbolic/function_factory.py index 25686ba839d..43779c4fb42 100644 --- a/src/sage/symbolic/function_factory.py +++ b/src/sage/symbolic/function_factory.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Factory for symbolic functions """ diff --git a/src/sage/symbolic/getitem_impl.pxi b/src/sage/symbolic/getitem_impl.pxi index 48b0097995f..c20cf1e6e31 100644 --- a/src/sage/symbolic/getitem_impl.pxi +++ b/src/sage/symbolic/getitem_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics "Operands" # **************************************************************************** diff --git a/src/sage/symbolic/integration/all.py b/src/sage/symbolic/integration/all.py index 332eaf1cdb6..e69de29bb2d 100644 --- a/src/sage/symbolic/integration/all.py +++ b/src/sage/symbolic/integration/all.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-symbolics diff --git a/src/sage/symbolic/integration/external.py b/src/sage/symbolic/integration/external.py index bf4ea9c180d..ea73c69ff74 100644 --- a/src/sage/symbolic/integration/external.py +++ b/src/sage/symbolic/integration/external.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """Symbolic Integration via External Software TESTS:: diff --git a/src/sage/symbolic/integration/integral.py b/src/sage/symbolic/integration/integral.py index 66105f0357e..61e1513d87f 100644 --- a/src/sage/symbolic/integration/integral.py +++ b/src/sage/symbolic/integration/integral.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Symbolic Integration """ diff --git a/src/sage/symbolic/maxima_wrapper.py b/src/sage/symbolic/maxima_wrapper.py index 3868ee20ad4..ca30af3efcf 100644 --- a/src/sage/symbolic/maxima_wrapper.py +++ b/src/sage/symbolic/maxima_wrapper.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics "Access to Maxima methods" ############################################################################### diff --git a/src/sage/symbolic/operators.py b/src/sage/symbolic/operators.py index 000f889da3a..07add13f71e 100644 --- a/src/sage/symbolic/operators.py +++ b/src/sage/symbolic/operators.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics "Operators" import operator diff --git a/src/sage/symbolic/pynac.pxi b/src/sage/symbolic/pynac.pxi index 885f4aef621..4bdbcd99526 100644 --- a/src/sage/symbolic/pynac.pxi +++ b/src/sage/symbolic/pynac.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Declarations for pynac, a Python frontend for ginac diff --git a/src/sage/symbolic/pynac_constant_impl.pxi b/src/sage/symbolic/pynac_constant_impl.pxi index 5ee32344043..442afbafbc3 100644 --- a/src/sage/symbolic/pynac_constant_impl.pxi +++ b/src/sage/symbolic/pynac_constant_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Wrapper around Pynac's constants """ diff --git a/src/sage/symbolic/pynac_function_impl.pxi b/src/sage/symbolic/pynac_function_impl.pxi index 218db113423..f20c8faf91a 100644 --- a/src/sage/symbolic/pynac_function_impl.pxi +++ b/src/sage/symbolic/pynac_function_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics cpdef call_registered_function(unsigned serial, int nargs, list args, diff --git a/src/sage/symbolic/pynac_impl.pxi b/src/sage/symbolic/pynac_impl.pxi index de896a0adee..f31a5498218 100644 --- a/src/sage/symbolic/pynac_impl.pxi +++ b/src/sage/symbolic/pynac_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Pynac interface """ diff --git a/src/sage/symbolic/random_tests.py b/src/sage/symbolic/random_tests.py index 609f3a42ef3..552cf61a5b6 100644 --- a/src/sage/symbolic/random_tests.py +++ b/src/sage/symbolic/random_tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Randomized tests of GiNaC / PyNaC """ diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py index dc567ec4b03..6d2e4ec79be 100644 --- a/src/sage/symbolic/relation.py +++ b/src/sage/symbolic/relation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Symbolic Equations and Inequalities diff --git a/src/sage/symbolic/ring.pxd b/src/sage/symbolic/ring.pxd index 7f5a96be693..9e628098dd1 100644 --- a/src/sage/symbolic/ring.pxd +++ b/src/sage/symbolic/ring.pxd @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics cimport sage.rings.abc cdef class SymbolicRing(sage.rings.abc.SymbolicRing): diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx index a380d091ed3..32a22e6f861 100644 --- a/src/sage/symbolic/ring.pyx +++ b/src/sage/symbolic/ring.pyx @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-symbolics +# -*- coding: utf-8 -*- """ The symbolic ring """ diff --git a/src/sage/symbolic/series_impl.pxi b/src/sage/symbolic/series_impl.pxi index 739da937d81..3f869920d6b 100644 --- a/src/sage/symbolic/series_impl.pxi +++ b/src/sage/symbolic/series_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Symbolic Series diff --git a/src/sage/symbolic/subring.py b/src/sage/symbolic/subring.py index 5bde515595b..2db60e8f915 100644 --- a/src/sage/symbolic/subring.py +++ b/src/sage/symbolic/subring.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" Subrings of the Symbolic Ring diff --git a/src/sage/symbolic/substitution_map_impl.pxi b/src/sage/symbolic/substitution_map_impl.pxi index 2484748c2c3..7d9e35cf630 100644 --- a/src/sage/symbolic/substitution_map_impl.pxi +++ b/src/sage/symbolic/substitution_map_impl.pxi @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Substitution Maps diff --git a/src/sage/symbolic/symbols.py b/src/sage/symbolic/symbols.py index 239e4912228..7fe7cdb4472 100644 --- a/src/sage/symbolic/symbols.py +++ b/src/sage/symbolic/symbols.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Symbol table """ diff --git a/src/sage/symbolic/symengine.py b/src/sage/symbolic/symengine.py index 5954616e336..5c3a46eb8b0 100644 --- a/src/sage/symbolic/symengine.py +++ b/src/sage/symbolic/symengine.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics r""" EXAMPLES:: diff --git a/src/sage/symbolic/tests.py b/src/sage/symbolic/tests.py index 2c7a1ba6f24..a7c6a9a6cb2 100644 --- a/src/sage/symbolic/tests.py +++ b/src/sage/symbolic/tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Tests for the Sage/Pynac interaction """ diff --git a/src/sage/symbolic/units.py b/src/sage/symbolic/units.py index 25837199d42..5e1abf675c9 100644 --- a/src/sage/symbolic/units.py +++ b/src/sage/symbolic/units.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-symbolics """ Units of measurement diff --git a/src/sage/tensor/all.py b/src/sage/tensor/all.py index 15ed68111f2..dc52f0b09ed 100644 --- a/src/sage/tensor/all.py +++ b/src/sage/tensor/all.py @@ -1,3 +1 @@ -# sage_setup: distribution = sagemath-modules - -from sage.tensor.modules.all import * +from .modules.all import * diff --git a/src/sage/tensor/modules/all.py b/src/sage/tensor/modules/all.py index 98108a4359d..92b555136b4 100644 --- a/src/sage/tensor/modules/all.py +++ b/src/sage/tensor/modules/all.py @@ -1,8 +1,6 @@ -# sage_setup: distribution = sagemath-modules from sage.misc.lazy_import import lazy_import lazy_import('sage.tensor.modules.finite_rank_free_module', 'FiniteRankFreeModule') # NB: in Sage 8.8.beta2, the lazy import of FiniteRankFreeModule is necessary # to avoid some import order issue when Chart is imported in # free_module_tensor, see comments 12 to 18 in :issue:`27655`. -del lazy_import diff --git a/src/sage/tensor/modules/alternating_contr_tensor.py b/src/sage/tensor/modules/alternating_contr_tensor.py index c0ef91fae35..3ef51967bc6 100644 --- a/src/sage/tensor/modules/alternating_contr_tensor.py +++ b/src/sage/tensor/modules/alternating_contr_tensor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Alternating contravariant tensors on free modules diff --git a/src/sage/tensor/modules/comp.py b/src/sage/tensor/modules/comp.py index 0e2da3c8953..7912b9269f8 100644 --- a/src/sage/tensor/modules/comp.py +++ b/src/sage/tensor/modules/comp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Components as indexed sets of ring elements diff --git a/src/sage/tensor/modules/ext_pow_free_module.py b/src/sage/tensor/modules/ext_pow_free_module.py index 789d7f36ea0..785b4ecc6bd 100644 --- a/src/sage/tensor/modules/ext_pow_free_module.py +++ b/src/sage/tensor/modules/ext_pow_free_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Exterior powers of free modules diff --git a/src/sage/tensor/modules/finite_rank_free_module.py b/src/sage/tensor/modules/finite_rank_free_module.py index 7b524054ab9..0434ed84c53 100644 --- a/src/sage/tensor/modules/finite_rank_free_module.py +++ b/src/sage/tensor/modules/finite_rank_free_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free modules of finite rank diff --git a/src/sage/tensor/modules/format_utilities.py b/src/sage/tensor/modules/format_utilities.py index 381eb470dbf..139fee85310 100644 --- a/src/sage/tensor/modules/format_utilities.py +++ b/src/sage/tensor/modules/format_utilities.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Formatting utilities diff --git a/src/sage/tensor/modules/free_module_alt_form.py b/src/sage/tensor/modules/free_module_alt_form.py index 934a7e1a3bd..4285b90cb41 100644 --- a/src/sage/tensor/modules/free_module_alt_form.py +++ b/src/sage/tensor/modules/free_module_alt_form.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Alternating forms on free modules diff --git a/src/sage/tensor/modules/free_module_automorphism.py b/src/sage/tensor/modules/free_module_automorphism.py index 0bb0e208433..ebe30d6255b 100644 --- a/src/sage/tensor/modules/free_module_automorphism.py +++ b/src/sage/tensor/modules/free_module_automorphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free module automorphisms diff --git a/src/sage/tensor/modules/free_module_basis.py b/src/sage/tensor/modules/free_module_basis.py index 0e58585a48e..9d112ef48d7 100644 --- a/src/sage/tensor/modules/free_module_basis.py +++ b/src/sage/tensor/modules/free_module_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free module bases diff --git a/src/sage/tensor/modules/free_module_element.py b/src/sage/tensor/modules/free_module_element.py index 96eec08c27b..d4e3f42a390 100644 --- a/src/sage/tensor/modules/free_module_element.py +++ b/src/sage/tensor/modules/free_module_element.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Elements of free modules of finite rank diff --git a/src/sage/tensor/modules/free_module_homset.py b/src/sage/tensor/modules/free_module_homset.py index 7f1da1fe73f..509ae146d49 100644 --- a/src/sage/tensor/modules/free_module_homset.py +++ b/src/sage/tensor/modules/free_module_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Sets of morphisms between free modules diff --git a/src/sage/tensor/modules/free_module_linear_group.py b/src/sage/tensor/modules/free_module_linear_group.py index 0e328a78ee1..a58bd3a8a72 100644 --- a/src/sage/tensor/modules/free_module_linear_group.py +++ b/src/sage/tensor/modules/free_module_linear_group.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" General linear group of a free module diff --git a/src/sage/tensor/modules/free_module_morphism.py b/src/sage/tensor/modules/free_module_morphism.py index 9c1ed019974..073cb91e60c 100644 --- a/src/sage/tensor/modules/free_module_morphism.py +++ b/src/sage/tensor/modules/free_module_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free module morphisms diff --git a/src/sage/tensor/modules/free_module_tensor.py b/src/sage/tensor/modules/free_module_tensor.py index 36d000435ab..2dd54a64c1a 100644 --- a/src/sage/tensor/modules/free_module_tensor.py +++ b/src/sage/tensor/modules/free_module_tensor.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Tensors on free modules diff --git a/src/sage/tensor/modules/reflexive_module.py b/src/sage/tensor/modules/reflexive_module.py index 82646094800..073f76e4659 100644 --- a/src/sage/tensor/modules/reflexive_module.py +++ b/src/sage/tensor/modules/reflexive_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Base classes for reflexive modules """ diff --git a/src/sage/tensor/modules/tensor_free_module.py b/src/sage/tensor/modules/tensor_free_module.py index d89fbce1245..8e56dbc0b76 100644 --- a/src/sage/tensor/modules/tensor_free_module.py +++ b/src/sage/tensor/modules/tensor_free_module.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Tensor products of free modules diff --git a/src/sage/tensor/modules/tensor_free_submodule.py b/src/sage/tensor/modules/tensor_free_submodule.py index 36e32ae9e8c..97d0446bc55 100644 --- a/src/sage/tensor/modules/tensor_free_submodule.py +++ b/src/sage/tensor/modules/tensor_free_submodule.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Free submodules of tensor modules defined by monoterm symmetries diff --git a/src/sage/tensor/modules/tensor_free_submodule_basis.py b/src/sage/tensor/modules/tensor_free_submodule_basis.py index da1b1c78979..6c88b05af23 100644 --- a/src/sage/tensor/modules/tensor_free_submodule_basis.py +++ b/src/sage/tensor/modules/tensor_free_submodule_basis.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules r""" Standard bases of free submodules of tensor modules defined by some monoterm symmetries diff --git a/src/sage/tensor/modules/tensor_with_indices.py b/src/sage/tensor/modules/tensor_with_indices.py index cf590f83a96..8a637315af8 100644 --- a/src/sage/tensor/modules/tensor_with_indices.py +++ b/src/sage/tensor/modules/tensor_with_indices.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-modules # sage.doctest: needs sage.groups r""" Index notation for tensors diff --git a/src/sage/tests/__init__.py b/src/sage/tests/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/tests/__init__.py +++ b/src/sage/tests/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/tests/all.py b/src/sage/tests/all.py index 382623d080e..c0f6f2877d5 100644 --- a/src/sage/tests/all.py +++ b/src/sage/tests/all.py @@ -1,3 +1,2 @@ -# sage_setup: distribution = sagemath-repl """ """ diff --git a/src/sage/tests/article_heuberger_krenn_kropf_fsm-in-sage.py b/src/sage/tests/article_heuberger_krenn_kropf_fsm-in-sage.py index f03f58a1517..d0a51a55eff 100644 --- a/src/sage/tests/article_heuberger_krenn_kropf_fsm-in-sage.py +++ b/src/sage/tests/article_heuberger_krenn_kropf_fsm-in-sage.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.graphs sage.modules r""" This file contains doctests of the article :: diff --git a/src/sage/tests/arxiv_0812_2725.py b/src/sage/tests/arxiv_0812_2725.py index b162a303708..62217b3e8d8 100644 --- a/src/sage/tests/arxiv_0812_2725.py +++ b/src/sage/tests/arxiv_0812_2725.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.combinat r""" Sage code for computing k-distant crossing numbers. diff --git a/src/sage/tests/benchmark.py b/src/sage/tests/benchmark.py index 4e6f6c4ede0..9445a3f7633 100644 --- a/src/sage/tests/benchmark.py +++ b/src/sage/tests/benchmark.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.symbolic """ Benchmarks diff --git a/src/sage/tests/book_schilling_zabrocki_kschur_primer.py b/src/sage/tests/book_schilling_zabrocki_kschur_primer.py index 3a0b26c36d1..4f91b77e036 100644 --- a/src/sage/tests/book_schilling_zabrocki_kschur_primer.py +++ b/src/sage/tests/book_schilling_zabrocki_kschur_primer.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.combinat sage.graphs sage.groups r""" This file contains doctests for the Chapter "k-Schur function primer" diff --git a/src/sage/tests/book_stein_ent.py b/src/sage/tests/book_stein_ent.py index ef63d9104a7..e7dbcaf37a1 100644 --- a/src/sage/tests/book_stein_ent.py +++ b/src/sage/tests/book_stein_ent.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.libs.pari """ This file contains all the example code from the published book diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/__init__.py b/src/sage/tests/books/computational-mathematics-with-sagemath/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/__init__.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py index 567174fc49c..976b912de2a 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./calculus_doctest.sage) was *autogenerated* from ./calculus.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py index b3349620ce6..864549d1958 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/combinat_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./combinat_doctest.sage) was *autogenerated* from ./combinat.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py index cee1d36e208..94c50977d79 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/domaines_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./domaines_doctest.sage) was *autogenerated* from ./domaines.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py index 7addbc668be..aa3eed32f3b 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/float_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./float_doctest.sage) was *autogenerated* from ./float.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py index 6b4d06a09dc..bdf2f5b1e1e 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./graphique_doctest.sage) was *autogenerated* from ./graphique.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py index 0f2c5270912..c1d8fa977e5 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/graphtheory_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./graphtheory_doctest.sage) was *autogenerated* from ./graphtheory.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py index 298aa799d79..dbe787aa5ff 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/integration_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./integration_doctest.sage) was *autogenerated* from ./integration.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py index cc4fce4af6f..b01729aa7b3 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/linalg_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./linalg_doctest.sage) was *autogenerated* from ./linalg.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py index 2fa092c2136..7c5b83423ea 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/linsolve_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- r""" This file (./linsolve_doctest.sage) was *autogenerated* from ./linsolve.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py index 9467c2c0daa..da89f065214 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/lp_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./lp_doctest.sage) was *autogenerated* from ./lp.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py index 163208bfbbf..bef4a2b6c62 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/mpoly_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./mpoly_doctest.sage) was *autogenerated* from ./mpoly.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py index 53877a43bf8..3a7104637ec 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/nonlinear_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./nonlinear_doctest.sage) was *autogenerated* from ./nonlinear.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py index 24b9588008f..46a4d4d2bec 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/numbertheory_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./numbertheory_doctest.sage) was *autogenerated* from ./numbertheory.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py index 0dfd1c5156e..5ac636c433a 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/polynomes_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./polynomes_doctest.sage) was *autogenerated* from ./polynomes.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py index ba9f281957b..42121f2f815 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./premierspas_doctest.sage) was *autogenerated* from ./premierspas.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py index 7c7c78dfcf6..3f036d5d362 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/programmation_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./programmation_doctest.sage) was *autogenerated* from ./programmation.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py index 2de80122ed5..95a6367dcee 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/recequadiff_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./recequadiff_doctest.sage) was *autogenerated* from ./recequadiff.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/__init__.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/__init__.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/calculus_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/calculus_doctest.py index 44306633eef..947f9f53a22 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/calculus_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/calculus_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/calculus_doctest.sage) was *autogenerated* from ./sol/calculus.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py index 3fa0c2fb145..5f372f505b0 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/combinat_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/combinat_doctest.sage) was *autogenerated* from ./sol/combinat.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py index 39468adf6e3..df3eb03d8fe 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/domaines_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/domaines_doctest.sage) was *autogenerated* from ./sol/domaines.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py index 7475406ba08..5d5d4686ec7 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/float_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/float_doctest.sage) was *autogenerated* from ./sol/float.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py index 1a828013596..a939dc4471c 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphique_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/graphique_doctest.sage) was *autogenerated* from ./sol/graphique.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py index 42b6cd5a1a3..27013d35ae8 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/graphtheory_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/graphtheory_doctest.sage) was *autogenerated* from ./sol/graphtheory.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py index 321e43ca881..bb9550918bf 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/integration_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/integration_doctest.sage) was *autogenerated* from ./sol/integration.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py index 2a3431985e3..7f7053fe39d 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linalg_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/linalg_doctest.sage) was *autogenerated* from ./sol/linalg.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py index bcb2bdda88c..e89d7c06fb5 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/linsolve_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/linsolve_doctest.sage) was *autogenerated* from ./sol/linsolve.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py index 8cdf67654cc..d60adc9dd8b 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/lp_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/lp_doctest.sage) was *autogenerated* from ./sol/lp.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py index 434065a5e6c..d4b92c1dfd6 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/mpoly_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/mpoly_doctest.sage) was *autogenerated* from ./sol/mpoly.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py index 0f18ca3696c..f99860f7b9c 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/nonlinear_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/nonlinear_doctest.sage) was *autogenerated* from ./sol/nonlinear.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py index f335c0bbf9e..2dbd0b018e5 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/numbertheory_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/numbertheory_doctest.sage) was *autogenerated* from ./sol/numbertheory.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py index 8e674bc6e1e..f8cefd2f6e8 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/polynomes_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/polynomes_doctest.sage) was *autogenerated* from ./sol/polynomes.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py index a28a4de5c7f..01d0e1bc143 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/sol/recequadiff_doctest.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- encoding: utf-8 -*- """ This file (./sol/recequadiff_doctest.sage) was *autogenerated* from ./sol/recequadiff.tex, with sagetex.sty version 2011/05/27 v2.3.1. diff --git a/src/sage/tests/books/judson-abstract-algebra/__init__.py b/src/sage/tests/books/judson-abstract-algebra/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/tests/books/judson-abstract-algebra/__init__.py +++ b/src/sage/tests/books/judson-abstract-algebra/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py b/src/sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py index 08d4cdaf852..eb93e40815f 100644 --- a/src/sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py +++ b/src/sage/tests/books/judson-abstract-algebra/actions-sage-exercises.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/actions-sage.py b/src/sage/tests/books/judson-abstract-algebra/actions-sage.py index 5f8395655c1..98eb03fcc64 100644 --- a/src/sage/tests/books/judson-abstract-algebra/actions-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/actions-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/algcodes-sage.py b/src/sage/tests/books/judson-abstract-algebra/algcodes-sage.py index bf1b76f8371..816ae050b95 100644 --- a/src/sage/tests/books/judson-abstract-algebra/algcodes-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/algcodes-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/boolean-sage.py b/src/sage/tests/books/judson-abstract-algebra/boolean-sage.py index b7861db1e3d..2d7b13c00f7 100644 --- a/src/sage/tests/books/judson-abstract-algebra/boolean-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/boolean-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py b/src/sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py index 788070ab821..57ab9ff0acf 100644 --- a/src/sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py +++ b/src/sage/tests/books/judson-abstract-algebra/cosets-sage-exercises.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/cosets-sage.py b/src/sage/tests/books/judson-abstract-algebra/cosets-sage.py index 734995be178..028dd8cb33c 100644 --- a/src/sage/tests/books/judson-abstract-algebra/cosets-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/cosets-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/crypt-sage.py b/src/sage/tests/books/judson-abstract-algebra/crypt-sage.py index 947b40be364..510761ddb6c 100644 --- a/src/sage/tests/books/judson-abstract-algebra/crypt-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/crypt-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py b/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py index 6ae22a7a184..5f8cd284b52 100644 --- a/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/domains-sage.py b/src/sage/tests/books/judson-abstract-algebra/domains-sage.py index d3836d3bf8e..965fe31b21e 100644 --- a/src/sage/tests/books/judson-abstract-algebra/domains-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/domains-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/fields-sage.py b/src/sage/tests/books/judson-abstract-algebra/fields-sage.py index 191267d14d4..de12e97030c 100644 --- a/src/sage/tests/books/judson-abstract-algebra/fields-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/fields-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/finite-sage.py b/src/sage/tests/books/judson-abstract-algebra/finite-sage.py index d8682a18a38..d6d85490a87 100644 --- a/src/sage/tests/books/judson-abstract-algebra/finite-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/finite-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/galois-sage.py b/src/sage/tests/books/judson-abstract-algebra/galois-sage.py index 084fe28ae68..b1ecf0d8d48 100644 --- a/src/sage/tests/books/judson-abstract-algebra/galois-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/galois-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/groups-sage.py b/src/sage/tests/books/judson-abstract-algebra/groups-sage.py index 9543f68ea9e..71e0ee12eba 100644 --- a/src/sage/tests/books/judson-abstract-algebra/groups-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/groups-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py b/src/sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py index cd8c6877675..31c4f1818fe 100644 --- a/src/sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py +++ b/src/sage/tests/books/judson-abstract-algebra/homomorph-sage-exercises.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/homomorph-sage.py b/src/sage/tests/books/judson-abstract-algebra/homomorph-sage.py index c374f29b3f2..dbc7bca8d96 100644 --- a/src/sage/tests/books/judson-abstract-algebra/homomorph-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/homomorph-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/integers-sage.py b/src/sage/tests/books/judson-abstract-algebra/integers-sage.py index ec4ba89521a..20a8228035e 100644 --- a/src/sage/tests/books/judson-abstract-algebra/integers-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/integers-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/isomorph-sage.py b/src/sage/tests/books/judson-abstract-algebra/isomorph-sage.py index 7e360a62ff7..43333ac1ea1 100644 --- a/src/sage/tests/books/judson-abstract-algebra/isomorph-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/isomorph-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/normal-sage.py b/src/sage/tests/books/judson-abstract-algebra/normal-sage.py index 6d4aeffe31d..3db475d41b0 100644 --- a/src/sage/tests/books/judson-abstract-algebra/normal-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/normal-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/permute-sage.py b/src/sage/tests/books/judson-abstract-algebra/permute-sage.py index 90267f518f7..625fb080a06 100644 --- a/src/sage/tests/books/judson-abstract-algebra/permute-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/permute-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/poly-sage.py b/src/sage/tests/books/judson-abstract-algebra/poly-sage.py index 3af6f81117e..0333425266d 100644 --- a/src/sage/tests/books/judson-abstract-algebra/poly-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/poly-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/rings-sage.py b/src/sage/tests/books/judson-abstract-algebra/rings-sage.py index a76cea542bd..6d9571d00cd 100644 --- a/src/sage/tests/books/judson-abstract-algebra/rings-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/rings-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/sets-sage.py b/src/sage/tests/books/judson-abstract-algebra/sets-sage.py index 8d5491f86dc..0825b227669 100644 --- a/src/sage/tests/books/judson-abstract-algebra/sets-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/sets-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/struct-sage.py b/src/sage/tests/books/judson-abstract-algebra/struct-sage.py index 6c30b93df29..ce825b56c3c 100644 --- a/src/sage/tests/books/judson-abstract-algebra/struct-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/struct-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py b/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py index c5d89ed0b14..cd78b147ca3 100644 --- a/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py b/src/sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py index 8dba35d0b27..45786b72a36 100644 --- a/src/sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py +++ b/src/sage/tests/books/judson-abstract-algebra/vect-sage-exercises.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/books/judson-abstract-algebra/vect-sage.py b/src/sage/tests/books/judson-abstract-algebra/vect-sage.py index 3af215cb318..46a9bd7cb68 100644 --- a/src/sage/tests/books/judson-abstract-algebra/vect-sage.py +++ b/src/sage/tests/books/judson-abstract-algebra/vect-sage.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-repl +## -*- coding: utf-8 -*- ## ## Sage Doctest File ## #**************************************# #* Generated from PreTeXt source *# diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py index c35e716f93a..523cbef436c 100644 --- a/src/sage/tests/cmdline.py +++ b/src/sage/tests/cmdline.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" This file contains some tests that Sage command line options actually do something. diff --git a/src/sage/tests/combinatorial_hopf_algebras.py b/src/sage/tests/combinatorial_hopf_algebras.py index 7e5010f22ea..33c0472f404 100644 --- a/src/sage/tests/combinatorial_hopf_algebras.py +++ b/src/sage/tests/combinatorial_hopf_algebras.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.combinat sage.modules r""" Tests For Combinatorial Hopf Algebras diff --git a/src/sage/tests/cython.pyx b/src/sage/tests/cython.pyx index fd028dc2901..431de078431 100644 --- a/src/sage/tests/cython.pyx +++ b/src/sage/tests/cython.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ This file collects tests requiring Cython. """ diff --git a/src/sage/tests/finite_poset.py b/src/sage/tests/finite_poset.py index 8f69c933628..d04221dcc13 100644 --- a/src/sage/tests/finite_poset.py +++ b/src/sage/tests/finite_poset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.graphs sage.modules """ This file contains test functions that can be used to search diff --git a/src/sage/tests/functools_partial_src.py b/src/sage/tests/functools_partial_src.py index 92044eccc01..d352d160230 100644 --- a/src/sage/tests/functools_partial_src.py +++ b/src/sage/tests/functools_partial_src.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Ensure that ``functools.partial`` is correctly handled by :func:`~sage.misc.sageinspect.sage_getsourcelines`. diff --git a/src/sage/tests/gosper-sum.py b/src/sage/tests/gosper-sum.py index 6c0f43340a2..84679ac0ff3 100644 --- a/src/sage/tests/gosper-sum.py +++ b/src/sage/tests/gosper-sum.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.symbolic """ Some tests about Gosper sums. diff --git a/src/sage/tests/lazy_imports.py b/src/sage/tests/lazy_imports.py index 63e015ebcc6..a1c72e64468 100644 --- a/src/sage/tests/lazy_imports.py +++ b/src/sage/tests/lazy_imports.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.all r""" TESTS: diff --git a/src/sage/tests/memcheck/__init__.py b/src/sage/tests/memcheck/__init__.py index 62acb4df510..e69de29bb2d 100644 --- a/src/sage/tests/memcheck/__init__.py +++ b/src/sage/tests/memcheck/__init__.py @@ -1 +0,0 @@ -# sage_setup: distribution = sagemath-repl diff --git a/src/sage/tests/memcheck/run_tests.py b/src/sage/tests/memcheck/run_tests.py index 69554601383..6ff4503a81b 100644 --- a/src/sage/tests/memcheck/run_tests.py +++ b/src/sage/tests/memcheck/run_tests.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl import types diff --git a/src/sage/tests/memcheck/run_tests_in_valgrind.py b/src/sage/tests/memcheck/run_tests_in_valgrind.py index 307154c11f2..df5ad0e92b2 100644 --- a/src/sage/tests/memcheck/run_tests_in_valgrind.py +++ b/src/sage/tests/memcheck/run_tests_in_valgrind.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Launch valgrind and run the memory leak tests diff --git a/src/sage/tests/memcheck/symbolic_expression.py b/src/sage/tests/memcheck/symbolic_expression.py index 80ae3b32fee..52182fbe62d 100644 --- a/src/sage/tests/memcheck/symbolic_expression.py +++ b/src/sage/tests/memcheck/symbolic_expression.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl from sage.tests.memcheck.verify_no_leak import verify_no_leak diff --git a/src/sage/tests/memcheck/verify_no_leak.py b/src/sage/tests/memcheck/verify_no_leak.py index b1671de64b4..89ca90cf89c 100644 --- a/src/sage/tests/memcheck/verify_no_leak.py +++ b/src/sage/tests/memcheck/verify_no_leak.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl from typing import Tuple, Sequence, List, Callable, Any import valgrind diff --git a/src/sage/tests/modular_group_cohomology.py b/src/sage/tests/modular_group_cohomology.py index db03cfb80e7..35bc8b5387f 100644 --- a/src/sage/tests/modular_group_cohomology.py +++ b/src/sage/tests/modular_group_cohomology.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: optional - p_group_cohomology r""" Tests for the optional ``p_group_cohomology`` package. diff --git a/src/sage/tests/numpy.py b/src/sage/tests/numpy.py index a532a9ea40b..e6dd28afb5a 100644 --- a/src/sage/tests/numpy.py +++ b/src/sage/tests/numpy.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs numpy r""" TESTS: diff --git a/src/sage/tests/parigp.py b/src/sage/tests/parigp.py index fba3fcef411..c7cf9ab5b96 100644 --- a/src/sage/tests/parigp.py +++ b/src/sage/tests/parigp.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.libs.pari sage.modules r""" This file is meant to catch errors in the PARI/GP package which are not diff --git a/src/sage/tests/startup.py b/src/sage/tests/startup.py index 69627375dd2..00142bc6ba7 100644 --- a/src/sage/tests/startup.py +++ b/src/sage/tests/startup.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl r""" Ensure that certain modules are not loaded on startup. diff --git a/src/sage/tests/stl_vector.pyx b/src/sage/tests/stl_vector.pyx index 17ff9ab1331..f3b29b30dfe 100644 --- a/src/sage/tests/stl_vector.pyx +++ b/src/sage/tests/stl_vector.pyx @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # distutils: language = c++ """ diff --git a/src/sage/tests/symbolic-series.py b/src/sage/tests/symbolic-series.py index 0fdaa6b1ce5..5e53d1e07af 100644 --- a/src/sage/tests/symbolic-series.py +++ b/src/sage/tests/symbolic-series.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: needs sage.symbolic """ Tests for the fast univariate series expansion in Pynac diff --git a/src/sage/tests/sympy.py b/src/sage/tests/sympy.py index e18f61074b5..6ff569cae57 100644 --- a/src/sage/tests/sympy.py +++ b/src/sage/tests/sympy.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl # sage.doctest: optional - sympy r""" TESTS: diff --git a/src/sage/tests/test_deprecation.py b/src/sage/tests/test_deprecation.py index a79e1a2bc79..a8e6ff9c99b 100644 --- a/src/sage/tests/test_deprecation.py +++ b/src/sage/tests/test_deprecation.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-repl """ Tests Deprecation diff --git a/src/sage/topology/all.py b/src/sage/topology/all.py index 16dfcf79d17..53b89564daa 100644 --- a/src/sage/topology/all.py +++ b/src/sage/topology/all.py @@ -1,12 +1,11 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs -from sage.topology.simplicial_complex import SimplicialComplex, Simplex +from .simplicial_complex import SimplicialComplex, Simplex -from sage.topology.simplicial_complex_morphism import SimplicialComplexMorphism +from .simplicial_complex_morphism import SimplicialComplexMorphism -from sage.topology.delta_complex import DeltaComplex, delta_complexes +from .delta_complex import DeltaComplex, delta_complexes -from sage.topology.cubical_complex import CubicalComplex, cubical_complexes +from .cubical_complex import CubicalComplex, cubical_complexes from sage.misc.lazy_import import lazy_import lazy_import('sage.topology.filtered_simplicial_complex', 'FilteredSimplicialComplex') @@ -19,4 +18,3 @@ # # For taking care of old pickles # from sage.misc.persist import register_unpickle_override # register_unpickle_override('sage.topology.simplicial_complex_examples', 'SimplicialSurface', SimplicialComplex) -del lazy_import diff --git a/src/sage/topology/cell_complex.py b/src/sage/topology/cell_complex.py index a752e2653da..c1f016ab34d 100644 --- a/src/sage/topology/cell_complex.py +++ b/src/sage/topology/cell_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Generic cell complexes diff --git a/src/sage/topology/cubical_complex.py b/src/sage/topology/cubical_complex.py index 3d53f3b1a4b..4e8e80a564b 100644 --- a/src/sage/topology/cubical_complex.py +++ b/src/sage/topology/cubical_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Finite cubical complexes diff --git a/src/sage/topology/delta_complex.py b/src/sage/topology/delta_complex.py index 731d916c269..d2b1bfd6931 100644 --- a/src/sage/topology/delta_complex.py +++ b/src/sage/topology/delta_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Finite Delta-complexes diff --git a/src/sage/topology/filtered_simplicial_complex.py b/src/sage/topology/filtered_simplicial_complex.py index 70e10d13770..95191dd1cd4 100644 --- a/src/sage/topology/filtered_simplicial_complex.py +++ b/src/sage/topology/filtered_simplicial_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Finite filtered complexes diff --git a/src/sage/topology/moment_angle_complex.py b/src/sage/topology/moment_angle_complex.py index d5a9a223a95..b4c4231d835 100644 --- a/src/sage/topology/moment_angle_complex.py +++ b/src/sage/topology/moment_angle_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs """ Moment-angle complexes diff --git a/src/sage/topology/simplicial_complex.py b/src/sage/topology/simplicial_complex.py index 625e270436d..aba3289607e 100644 --- a/src/sage/topology/simplicial_complex.py +++ b/src/sage/topology/simplicial_complex.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Finite simplicial complexes diff --git a/src/sage/topology/simplicial_complex_catalog.py b/src/sage/topology/simplicial_complex_catalog.py index 8a0b547e2c2..dff18de22a0 100644 --- a/src/sage/topology/simplicial_complex_catalog.py +++ b/src/sage/topology/simplicial_complex_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs """ Catalog of simplicial complexes diff --git a/src/sage/topology/simplicial_complex_examples.py b/src/sage/topology/simplicial_complex_examples.py index c9e5ee66062..9f5a4185eb2 100644 --- a/src/sage/topology/simplicial_complex_examples.py +++ b/src/sage/topology/simplicial_complex_examples.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs """ Examples of simplicial complexes diff --git a/src/sage/topology/simplicial_complex_homset.py b/src/sage/topology/simplicial_complex_homset.py index c5c8b872788..255e905a990 100644 --- a/src/sage/topology/simplicial_complex_homset.py +++ b/src/sage/topology/simplicial_complex_homset.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Homsets between simplicial complexes diff --git a/src/sage/topology/simplicial_complex_morphism.py b/src/sage/topology/simplicial_complex_morphism.py index 4b1ad9c994e..a043429ead7 100644 --- a/src/sage/topology/simplicial_complex_morphism.py +++ b/src/sage/topology/simplicial_complex_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Morphisms of simplicial complexes diff --git a/src/sage/topology/simplicial_set.py b/src/sage/topology/simplicial_set.py index 9ae9bfd8e98..904d79ab11c 100644 --- a/src/sage/topology/simplicial_set.py +++ b/src/sage/topology/simplicial_set.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Simplicial sets diff --git a/src/sage/topology/simplicial_set_catalog.py b/src/sage/topology/simplicial_set_catalog.py index 927cf7a3103..0269c8f6628 100644 --- a/src/sage/topology/simplicial_set_catalog.py +++ b/src/sage/topology/simplicial_set_catalog.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Catalog of simplicial sets diff --git a/src/sage/topology/simplicial_set_constructions.py b/src/sage/topology/simplicial_set_constructions.py index 3e8e8d92699..13f7c27e4f6 100644 --- a/src/sage/topology/simplicial_set_constructions.py +++ b/src/sage/topology/simplicial_set_constructions.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Methods of constructing simplicial sets diff --git a/src/sage/topology/simplicial_set_examples.py b/src/sage/topology/simplicial_set_examples.py index c0cb1e2fb32..1fc85df3f6e 100644 --- a/src/sage/topology/simplicial_set_examples.py +++ b/src/sage/topology/simplicial_set_examples.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Examples of simplicial sets. diff --git a/src/sage/topology/simplicial_set_morphism.py b/src/sage/topology/simplicial_set_morphism.py index fa1ee4a540a..3db0f1d7df1 100644 --- a/src/sage/topology/simplicial_set_morphism.py +++ b/src/sage/topology/simplicial_set_morphism.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-graphs # sage.doctest: needs sage.graphs r""" Morphisms and homsets for simplicial sets diff --git a/src/sage/typeset/all.py b/src/sage/typeset/all.py index c9a5d04d850..f2327dfdb20 100644 --- a/src/sage/typeset/all.py +++ b/src/sage/typeset/all.py @@ -1,6 +1,4 @@ -# sage_setup: distribution = sagemath-categories from sage.misc.lazy_import import lazy_import lazy_import('sage.typeset.ascii_art', 'ascii_art') lazy_import('sage.typeset.unicode_art', 'unicode_art') -del lazy_import diff --git a/src/sage/typeset/ascii_art.py b/src/sage/typeset/ascii_art.py index 28024405d27..395245c0df5 100644 --- a/src/sage/typeset/ascii_art.py +++ b/src/sage/typeset/ascii_art.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" ASCII Art diff --git a/src/sage/typeset/character_art.py b/src/sage/typeset/character_art.py index 389584f3bcf..d9ada8ac1c7 100644 --- a/src/sage/typeset/character_art.py +++ b/src/sage/typeset/character_art.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Base Class for Character-Based Art diff --git a/src/sage/typeset/character_art_factory.py b/src/sage/typeset/character_art_factory.py index cbde3611858..4439f7b7144 100644 --- a/src/sage/typeset/character_art_factory.py +++ b/src/sage/typeset/character_art_factory.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Factory for Character-Based Art """ diff --git a/src/sage/typeset/symbols.py b/src/sage/typeset/symbols.py index 1701603b408..00ddf81e63a 100644 --- a/src/sage/typeset/symbols.py +++ b/src/sage/typeset/symbols.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- """ Symbols for Character Art diff --git a/src/sage/typeset/unicode_art.py b/src/sage/typeset/unicode_art.py index 1d8e0933b5b..d9218e1df30 100644 --- a/src/sage/typeset/unicode_art.py +++ b/src/sage/typeset/unicode_art.py @@ -1,4 +1,4 @@ -# sage_setup: distribution = sagemath-categories +# -*- coding: utf-8 -*- r""" Unicode Art diff --git a/src/sage/typeset/unicode_characters.py b/src/sage/typeset/unicode_characters.py index bedea90565c..c4aa7bdd5fb 100644 --- a/src/sage/typeset/unicode_characters.py +++ b/src/sage/typeset/unicode_characters.py @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-categories r""" Unicode Characters diff --git a/src/sage_setup/autogen/flint/templates/flint_sage.pyx.template b/src/sage_setup/autogen/flint/templates/flint_sage.pyx.template index 806614f1a74..af50c1b256d 100644 --- a/src/sage_setup/autogen/flint/templates/flint_sage.pyx.template +++ b/src/sage_setup/autogen/flint/templates/flint_sage.pyx.template @@ -1,4 +1,3 @@ -# sage_setup: distribution = sagemath-flint # distutils: extra_compile_args = -D_XPG6 # WARNING: src/sage/libs/flint/flint_sage.pyx is generated from diff --git a/src/sage_setup/find.py b/src/sage_setup/find.py index 53681c1f1c5..61d91abc2eb 100644 --- a/src/sage_setup/find.py +++ b/src/sage_setup/find.py @@ -115,9 +115,7 @@ def find_python_sources(src_dir, modules=['sage'], distributions=None, Filtering by distribution (distribution package):: sage: find_python_sources(SAGE_SRC, distributions=['sagemath-tdlib']) - ([], - [...], - []) + ([], [], []) Benchmarking:: diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4 new file mode 100644 index 00000000000..e2a3330518d --- /dev/null +++ b/src/setup.cfg.m4 @@ -0,0 +1,133 @@ +include(`sage_spkg_versions.m4')dnl' -*- conf-unix -*- +[metadata] +name = sagemath-standard +version = file: VERSION.txt +description = Sage: Open Source Mathematics Software: Standard Python Library +long_description = file: README.rst +long_description_content_type = text/x-rst +license_files = LICENSE.txt +include(`setup_cfg_metadata.m4')dnl' + +[options] +python_requires = >=3.9, <3.13 +install_requires = + SPKG_INSTALL_REQUIRES_sage_conf + SPKG_INSTALL_REQUIRES_six +dnl From build/pkgs/sagelib/dependencies + SPKG_INSTALL_REQUIRES_conway_polynomials + SPKG_INSTALL_REQUIRES_cypari + SPKG_INSTALL_REQUIRES_cysignals + SPKG_INSTALL_REQUIRES_cython + SPKG_INSTALL_REQUIRES_gmpy2 + SPKG_INSTALL_REQUIRES_importlib_metadata + SPKG_INSTALL_REQUIRES_importlib_resources + SPKG_INSTALL_REQUIRES_jupyter_core + SPKG_INSTALL_REQUIRES_lrcalc_python + SPKG_INSTALL_REQUIRES_memory_allocator + SPKG_INSTALL_REQUIRES_numpy + SPKG_INSTALL_REQUIRES_pkgconfig + SPKG_INSTALL_REQUIRES_pplpy + SPKG_INSTALL_REQUIRES_primecountpy + SPKG_INSTALL_REQUIRES_requests + SPKG_INSTALL_REQUIRES_typing_extensions +dnl From Makefile.in: SAGERUNTIME + SPKG_INSTALL_REQUIRES_ipython + SPKG_INSTALL_REQUIRES_pexpect +dnl From Makefile.in: DOC_DEPENDENCIES + SPKG_INSTALL_REQUIRES_sphinx + SPKG_INSTALL_REQUIRES_networkx + SPKG_INSTALL_REQUIRES_scipy + SPKG_INSTALL_REQUIRES_sympy + SPKG_INSTALL_REQUIRES_matplotlib + SPKG_INSTALL_REQUIRES_pillow + SPKG_INSTALL_REQUIRES_mpmath + SPKG_INSTALL_REQUIRES_ipykernel + SPKG_INSTALL_REQUIRES_jupyter_client + SPKG_INSTALL_REQUIRES_ipywidgets + SPKG_INSTALL_REQUIRES_fpylll +dnl pycryptosat # Sage distribution installs it as part of cryptominisat. According to its README on https://pypi.org/project/pycryptosat/: "The pycryptosat python package compiles while compiling CryptoMiniSat. It cannot be compiled on its own, it must be compiled at the same time as CryptoMiniSat." +dnl Packages with important upper version bounds + SPKG_INSTALL_REQUIRES_ptyprocess + +scripts = + # The sage script + bin/sage + # Other scripts that should be in the path also for OS packaging of sage: + bin/sage-eval + # Included because it is useful for doctesting/coverage testing user scripts too: + bin/sage-runtests + bin/sage-fixdoctests + bin/sage-coverage + # The following is deprecated but might still be used in user package install scripts + bin/sage-cython + # Helper scripts invoked by sage script + # (they would actually belong to something like libexec) + bin/sage-cachegrind + bin/sage-callgrind + bin/sage-massif + bin/sage-omega + bin/sage-valgrind + bin/sage-venv-config + bin/sage-version.sh + bin/sage-cleaner + # Only makes sense in sage-the-distribution. TODO: Move to another installation script. + bin/sage-list-packages + # Uncategorized scripts in alphabetical order + bin/math-readline + bin/sage-env + # sage-env-config -- installed by sage_conf + # sage-env-config.in -- not to be installed + bin/sage-grep + bin/sage-grepdoc + bin/sage-inline-fortran + bin/sage-ipynb2rst + bin/sage-ipython + bin/sage-notebook + bin/sage-num-threads.py + bin/sage-preparse + bin/sage-python + bin/sage-run + bin/sage-run-cython + bin/sage-startuptime.py + bin/sage-update-version + +[options.package_data] + +sage.libs.gap = + sage.gaprc + +sage.interfaces = + sage-maxima.lisp + +sage.doctest = + tests/* + +sage.repl.rich_output = + example* + +sage = + ext_data/* + ext_data/kenzo/* + ext_data/singular/* + ext_data/singular/function_field/* + ext_data/images/* + ext_data/doctest/* + ext_data/doctest/invalid/* + ext_data/gap/* + ext_data/gap/joyner/* + ext_data/mwrank/* + ext_data/notebook-ipython/* + ext_data/nbconvert/* + ext_data/graphs/* + ext_data/pari/* + ext_data/pari/dokchitser/* + ext_data/pari/buzzard/* + ext_data/pari/simon/* + ext_data/magma/* + ext_data/magma/latex/* + ext_data/magma/sage/* + ext_data/valgrind/* + ext_data/threejs/* + +[options.extras_require] +R = SPKG_INSTALL_REQUIRES_rpy2 From f3ac6dcaedcd385c50e652db8853261ba2e49429 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 14 Apr 2024 16:47:35 +0900 Subject: [PATCH 136/183] Add Jacobians to function fields and curves --- src/doc/en/reference/curves/index.rst | 24 +- .../en/reference/function_fields/index.rst | 13 + src/doc/en/reference/references/index.rst | 6 + src/sage/categories/all.py | 2 +- src/sage/categories/category.py | 1 + src/sage/categories/schemes.py | 40 +- .../drinfeld_modules/drinfeld_module.py | 2 +- .../rings/function_field/function_field.py | 99 ++ .../function_field/function_field_polymod.py | 88 +- .../rings/function_field/jacobian_base.py | 796 +++++++++++++ .../rings/function_field/jacobian_hess.py | 1046 +++++++++++++++++ .../function_field/jacobian_khuri_makdisi.py | 1029 ++++++++++++++++ .../rings/function_field/khuri_makdisi.pyx | 893 ++++++++++++++ src/sage/schemes/curves/projective_curve.py | 40 + src/sage/schemes/elliptic_curves/ell_point.py | 56 + src/sage/schemes/elliptic_curves/jacobian.py | 2 +- .../hyperelliptic_curves/jacobian_morphism.py | 96 +- .../schemes/jacobians/abstract_jacobian.py | 67 +- 18 files changed, 4187 insertions(+), 113 deletions(-) create mode 100644 src/sage/rings/function_field/jacobian_base.py create mode 100644 src/sage/rings/function_field/jacobian_hess.py create mode 100644 src/sage/rings/function_field/jacobian_khuri_makdisi.py create mode 100644 src/sage/rings/function_field/khuri_makdisi.pyx diff --git a/src/doc/en/reference/curves/index.rst b/src/doc/en/reference/curves/index.rst index 2bc0d098cba..583b331ea28 100644 --- a/src/doc/en/reference/curves/index.rst +++ b/src/doc/en/reference/curves/index.rst @@ -1,5 +1,11 @@ +Plane and Space Curves +====================== + +Sage enables computations with curves in affine and projective ambient spaces, +curves over `\CC` as Riemann surfaces, and Jacobians of projective curves. + Curves -====== +------ .. toctree:: :maxdepth: 1 @@ -12,10 +18,8 @@ Curves sage/schemes/curves/closed_point sage/schemes/curves/zariski_vankampen - sage/schemes/jacobians/abstract_jacobian - Plane conics -============ +------------ .. toctree:: :maxdepth: 1 @@ -28,7 +32,7 @@ Plane conics sage/schemes/plane_conics/con_rational_function_field Plane quartics -========================= +-------------- .. toctree:: :maxdepth: 1 @@ -37,11 +41,19 @@ Plane quartics sage/schemes/plane_quartics/quartic_generic Riemann surfaces -================ +---------------- .. toctree:: :maxdepth: 1 sage/schemes/riemann_surfaces/riemann_surface +Jacobians +--------- + +.. toctree:: + :maxdepth: 1 + + sage/schemes/jacobians/abstract_jacobian + .. include:: ../footer.txt diff --git a/src/doc/en/reference/function_fields/index.rst b/src/doc/en/reference/function_fields/index.rst index 9f9a7e8c42d..7100f300b47 100644 --- a/src/doc/en/reference/function_fields/index.rst +++ b/src/doc/en/reference/function_fields/index.rst @@ -38,6 +38,19 @@ algebraic closure of `\QQ`. A basic reference for the theory of algebraic function fields is [Stich2009]_. +Jacobians of function fields +---------------------------- + +Arithmetic in Jacobians of function fields are available in two flavors. + +.. toctree:: + :maxdepth: 1 + + sage/rings/function_field/jacobian_base + sage/rings/function_field/jacobian_hess + sage/rings/function_field/jacobian_khuri_makdisi + sage/rings/function_field/khuri_makdisi + A Support Module ---------------- diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 4c2d05b1ec7..24b0a47324c 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -3181,6 +3181,9 @@ REFERENCES: Cryptanalysis* ; 2002' available at http://www.engr.mun.ca/~howard/PAPERS/ldc_tutorial.pdf +.. [Hes2004] Florian Hess, "Computing relations in divisor class groups of + algebraic curves over finite fields," Preprint, 2004. + .. [Hes2002] Florian Hess, "Computing Riemann-Roch spaces in algebraic function fields and related topics," J. Symbolic Comput. 33 (2002), no. 4, 425--445. @@ -3776,6 +3779,9 @@ REFERENCES: block cipher*, Lightweight Cryptography Workshop, 2016. https://www.nist.gov/sites/default/files/documents/2016/10/18/karpman-paper-lwc2016.pdf +.. [Khu2004] \K. Khuri-Makdisi. *Linear algebra algorithms for divisors on an algebraic curve*, + Mathematics of Computation 73, no. 245 (2004) pp. 333-357. + .. [Kin1992] Nancy G. Kinnersley, *The vertex separation number of a graph equals its path-width*, Information Processing Letters 42(6):345-350, 1992. :doi:`10.1016/0020-0190(92)90234-M`. diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index 0be0369ef76..7393a5ee028 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -105,7 +105,7 @@ # schemes and varieties from sage.categories.modular_abelian_varieties import ModularAbelianVarieties -from sage.categories.schemes import Schemes, AbelianVarieties +from sage.categories.schemes import Schemes, AbelianVarieties, Jacobians # * with basis from sage.categories.modules_with_basis import ModulesWithBasis diff --git a/src/sage/categories/category.py b/src/sage/categories/category.py index 18ac6c211f4..c92d9d42d76 100644 --- a/src/sage/categories/category.py +++ b/src/sage/categories/category.py @@ -2598,6 +2598,7 @@ def category_sample(): Category of Hecke modules over Rational Field, Category of Hopf algebras over Rational Field, Category of Hopf algebras with basis over Rational Field, + Category of Jacobians over Rational Field, Category of Lie algebras over Rational Field, Category of Weyl groups, Category of abelian varieties over Rational Field, diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 5b6d1939a54..f2d0170fd2d 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -2,14 +2,18 @@ r""" Schemes """ + # **************************************************************************** -# Copyright (C) 2005 David Kohel +# Copyright (C) 2013 David Kohel # William Stein -# 2008-2012 Nicolas M. Thiery +# 2008-2012 Nicolas M. Thiery # -# Distributed under the terms of the GNU General Public License (GPL) +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. # https://www.gnu.org/licenses/ -# ***************************************************************************** +# **************************************************************************** from sage.categories.category import Category from sage.categories.category_types import Category_over_base @@ -156,9 +160,6 @@ def _call_(self, x): raise TypeError("No way to create an object or morphism in %s from %s" % (self, x)) -############################################################# -# Schemes over a given base scheme. -############################################################# class Schemes_over_base(Category_over_base): """ The category of schemes over a given base scheme. @@ -206,6 +207,7 @@ def _repr_object_names(self): else: return "schemes over %s" % self.base_scheme() + class AbelianVarieties(Schemes_over_base): r""" The category of abelian varieties over a given field. @@ -295,3 +297,27 @@ def extra_super_categories(self): True """ return [Rings()] + + +class Jacobians(AbelianVarieties): + """ + The category of Jacobians attached to curves or function fields. + """ + def super_categories(self): + """ + EXAMPLES:: + + sage: Jacobians(QQ).super_categories() + [Category of abelian varieties over Rational Field] + """ + return [AbelianVarieties(self.base_scheme())] + + def _repr_object_names(self): + """ + EXAMPLES:: + + sage: Jacobians(Spec(QQ)) # indirect doctest + Category of Jacobians over Rational Field + """ + return "Jacobians over %s" % self.base_scheme() + diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 02f2d0be604..958347113c0 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -2066,7 +2066,7 @@ def scalar_multiplication(self, x): sage: phi = DrinfeldModule(A, [z, 0, 1, z]) sage: phi Drinfeld module defined by T |--> z*t^3 + t^2 + z - sage: phi.hom(T) + sage: phi.hom(T) # indirect doctest Endomorphism of Drinfeld module defined by T |--> z*t^3 + t^2 + z Defn: z*t^3 + t^2 + z diff --git a/src/sage/rings/function_field/function_field.py b/src/sage/rings/function_field/function_field.py index 0ef020bad9a..0c46e4cb94e 100644 --- a/src/sage/rings/function_field/function_field.py +++ b/src/sage/rings/function_field/function_field.py @@ -1367,3 +1367,102 @@ def extension_constant_field(self, k): """ from .extensions import ConstantFieldExtension return ConstantFieldExtension(self, k) + + @cached_method + def jacobian(self, model=None, base_div=None, **kwds): + """ + Return the Jacobian of the function field. + + INPUT: + + - ``model`` -- (default: ``'hess'``) model to use for arithmetic + + - ``base_div`` -- an effective divisor + + The degree of the base divisor should satisfy certain degree condition + corresponding to the model used. The following table lists these + conditions. Let `g` be the genus of the function field. + + - ``hess``: ideal-based arithmetic; requires base divisor of degree `g` + + - ``km_large``: Khuri-Makdisi's large model; requires base divisor of + degree at least `2g + 1` + + - ``km_medium``: Khuri-Makdisi's medium model; requires base divisor of + degree at least `2g + 1` + + - ``km_small``: Khuri-Makdisi's small model requires base divisor of + degree at least `g + 1` + + We assume the function field has a rational place. If a base divisor is + not given, one is constructed using an arbitrary rational place. + + EXAMPLES:: + + sage: A. = AffineSpace(GF(5), 2) + sage: C = Curve(y^2*(x^3 - 1) - (x^3 - 2)) + sage: F = C.function_field() + sage: F.jacobian() + Jacobian of Function field in y defined by (x^3 + 4)*y^2 + 4*x^3 + 2 (Hess model) + + TESTS: + + sage: A. = AffineSpace(QQ, 2) + sage: C = Curve(y^2 - x^3 - 1, A).projective_closure() + sage: C.jacobian(model='hess') + Traceback (most recent call last): + ... + ValueError: failed to obtain a rational place; provide a base divisor + """ + from .place import FunctionFieldPlace + + if model is None: + model = 'hess' + + if base_div is None: + try: + base_place = self.get_place(1) + except AttributeError: + raise ValueError('failed to obtain a rational place; provide a base divisor') + if base_place is None: + raise ValueError('the function field has no rational place') + # appropriate base divisor is constructed below. + else: + if isinstance(base_div, FunctionFieldPlace): + base_div = base_div.divisor() + + g = self.genus() + curve = kwds.get('curve') + + if model.startswith('km'): + from .jacobian_khuri_makdisi import Jacobian + if model == 'km' or model.endswith('large'): + if base_div is None: + base_div = (2*g + 1) * base_place + if not base_div.degree() >= 2*g + 1: + raise ValueError("Khuri-Makdisi large model requires base divisor of degree " + "at least 2*g + 1 for genus g") + return Jacobian(self, base_div, model='large', curve=curve) + elif model.endswith('medium'): + if base_div is None: + base_div = (2*g + 1) * base_place + if not base_div.degree() >= 2*g + 1: + raise ValueError("Khuri-Makdisi medium model requires base divisor of degree " + "at least 2*g + 1 for genus g") + return Jacobian(self, base_div, model='medium', curve=curve) + elif model.endswith('small'): + if base_div is None: + base_div = (g + 1) * base_place + if not base_div.degree() >= g + 1: + raise ValueError("Khuri-Makdisi small model requires base divisor of degree " + "at least g + 1 for genus g") + return Jacobian(self, base_div, model='small', curve=curve) + elif model == 'hess': + from .jacobian_hess import Jacobian + if base_div is None: + base_div = g * base_place + if base_div.degree() != g: + raise ValueError("Hess model requires base divisor of degree g for genus g") + return Jacobian(self, base_div, curve=curve) + + raise ValueError("unknown model") diff --git a/src/sage/rings/function_field/function_field_polymod.py b/src/sage/rings/function_field/function_field_polymod.py index 0fa7d1f3476..0218e6967f4 100644 --- a/src/sage/rings/function_field/function_field_polymod.py +++ b/src/sage/rings/function_field/function_field_polymod.py @@ -1926,6 +1926,50 @@ def residue_field(self, place, name=None): """ return place.residue_field(name=name) + def places_infinite(self, degree=1): + """ + Return a list of the infinite places with ``degree``. + + INPUT: + + - ``degree`` -- positive integer (default: `1`) + + EXAMPLES:: + + sage: # needs sage.rings.finite_rings + sage: F. = GF(2) + sage: K. = FunctionField(F) + sage: R. = PolynomialRing(K) + sage: L. = K.extension(t^4 + t - x^5) + sage: L.places_infinite(1) + [Place (1/x, 1/x^4*y^3)] + """ + return list(self._places_infinite(degree)) + + def _places_infinite(self, degree): + """ + Return a generator of *infinite* places with ``degree``. + + INPUT: + + - ``degree`` -- positive integer + + EXAMPLES:: + + sage: # needs sage.rings.finite_rings + sage: F. = GF(2) + sage: K. = FunctionField(F) + sage: R. = PolynomialRing(K) + sage: L. = K.extension(t^4 + t - x^5) + sage: L._places_infinite(1) + + """ + Oinf = self.maximal_order_infinite() + for prime, _, _ in Oinf.decomposition(): + place = prime.place() + if place.degree() == degree: + yield place + class FunctionField_char_zero(FunctionField_simple): """ @@ -2159,50 +2203,6 @@ def _places_finite(self, degree): if place.degree() == degree: yield place - def places_infinite(self, degree=1): - """ - Return a list of the infinite places with ``degree``. - - INPUT: - - - ``degree`` -- positive integer (default: `1`) - - EXAMPLES:: - - sage: # needs sage.rings.finite_rings - sage: F. = GF(2) - sage: K. = FunctionField(F) - sage: R. = PolynomialRing(K) - sage: L. = K.extension(t^4 + t - x^5) - sage: L.places_infinite(1) - [Place (1/x, 1/x^4*y^3)] - """ - return list(self._places_infinite(degree)) - - def _places_infinite(self, degree): - """ - Return a generator of *infinite* places with ``degree``. - - INPUT: - - - ``degree`` -- positive integer - - EXAMPLES:: - - sage: # needs sage.rings.finite_rings - sage: F. = GF(2) - sage: K. = FunctionField(F) - sage: R. = PolynomialRing(K) - sage: L. = K.extension(t^4 + t - x^5) - sage: L._places_infinite(1) - - """ - Oinf = self.maximal_order_infinite() - for prime, _, _ in Oinf.decomposition(): - place = prime.place() - if place.degree() == degree: - yield place - def gaps(self): """ Return the gaps of the function field. diff --git a/src/sage/rings/function_field/jacobian_base.py b/src/sage/rings/function_field/jacobian_base.py new file mode 100644 index 00000000000..0fa7ba14c82 --- /dev/null +++ b/src/sage/rings/function_field/jacobian_base.py @@ -0,0 +1,796 @@ +r""" +Jacobians of function fields + +This module provides base classes for Jacobians of function fields. + +Jacobian +-------- + +The Jacobian of a function field is created by default in the Hess model, with +a base divisor of degree `g` the genus of the function field. The base divisor +is automatically chosen if not given. :: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: J = F.jacobian() + sage: J + Jacobian of Function field in z defined by z^3 + 23*y^2*z + 6 (Hess model) + sage: J.base_divisor().degree() + 1 + +Explicitly specify a model if you want Jacobians in different models. :: + + sage: J_km = F.jacobian(model='km_large') + sage: J_km + Jacobian of Function field in z defined by z^3 + 23*y^2*z + 6 (Khuri-Makdisi large model) + +Group of rational points +------------------------ + +The group of rational points of a Jacobian is created from the Jacobian. A +point of the Jacobian group is determined by a divisor of degree zero. To +represent the point, a divisor of the form `D-B` is selected where `D` is an +effective divisor of the same degree with the base divisor `B`. Hence the point +is simply represented by the divisor `D`. :: + + sage: G = J.group() + sage: G.order() + 30 + sage: pl1 = C([1,8,1]).place() + sage: pl2 = C([2,10,1]).place() + sage: p1 = G.point(pl1 - pl2) + sage: p1 + [Place (y + 1, z + 6)] + sage: p2 = G.point(pl2 - pl1) + sage: p2 + [Place (y + 28, z + 6)] + sage: p1 + p2 == G.zero() + True + sage: p1.order() + 5 + +We can get the corresponding point in the Jacobian in a different model. :: + + sage: p1km = J_km(p1) + sage: p1km.order() + 5 + sage: p1km + Point of Jacobian determined by + [ 1 0 0 0 0 0 11 0 0] + [ 0 1 0 0 0 0 18 0 0] + [ 0 0 1 0 0 0 11 0 0] + [ 0 0 0 1 0 0 18 1 0] + [ 0 0 0 0 1 0 25 0 19] + [ 0 0 0 0 0 1 8 8 0] + +AUTHORS: + +- Kwankyu Lee (2022-01-24): initial version + +""" + +# **************************************************************************** +# Copyright (C) 2022 Kwankyu Lee +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +import math + +from sage.arith.misc import integer_floor, integer_ceil + +from sage.structure.parent import Parent +from sage.structure.element import ModuleElement + +from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups +from sage.categories.schemes import Jacobians +from sage.categories.pushout import ConstructionFunctor, pushout + +from sage.rings.integer_ring import IntegerRing +from sage.rings.integer import Integer + + +class JacobianPoint_base(ModuleElement): + """ + Abstract base class of points of Jacobian groups. + """ + pass + + +class JacobianPoint_finite_field_base(JacobianPoint_base): + """ + Points of Jacobians over finite fields. + """ + def order(self): + """ + Return the order of this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: b = F.get_place(1) + sage: pl = C([-1,2,1]).place() + sage: p = G.point(pl - b) + sage: p.order() + 15 + + ALGORITHM: Shanks' Baby Step Giant Step + """ + G = self.parent() + B = G._bound_on_order() + q = integer_ceil(B.sqrt()) + zero = G.zero() + + # baby steps + b = [zero] + g = self + for i in range(q - 1): + if g == zero: + return i + 1 + b.append(g) + g = g + self + + # giant steps + g0 = self.multiple(-q) + g = g0 + for i in range(q - 1): + for r in range(q): + if g == b[r]: + return q * (i + 1) + r + g = g + g0 + + # order is neither smaller or nor larger than this + return q**2 + + def frobenius(self): + """ + Return the image of the point acted by the Frobenius automorphism. + + EXAMPLES:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='hess') + sage: G1 = J.group() + sage: G1.order() + 11 + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: pts1 = G1.get_points(11) + sage: pts3 = G3.get_points(12) + sage: pt = next(pt for pt in pts3 if pt not in pts1) + sage: pt.frobenius() == pt + False + sage: pt.frobenius().frobenius().frobenius() == pt + True + """ + G = self.parent() + return G._frobenius_on(self) + + +class JacobianGroupFunctor(ConstructionFunctor): + """ + A construction functor for Jacobian groups. + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: G = J.group() + sage: F, obj = G.construction() + sage: F + JacobianGroupFunctor + """ + rank = 20 + + def __init__(self, base_field, field): + """ + Initialize. + + TESTS:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: K = k.extension(2) + sage: G = J.group(K) + sage: F, obj = G.construction() + sage: TestSuite(F).run() + """ + super().__init__(Jacobians(base_field), CommutativeAdditiveGroups()) + + self._field = field + + def _apply_functor(self, jacobian): + """ + Apply this functor to ``jacobian``. + + INPUT: + + - ``jacobian`` -- a Jacobian + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: K = k.extension(2) + sage: G = J.group(K) + sage: F, obj = G.construction() + sage: F(obj) is G # indirect doctest + True + """ + return jacobian.group(self._field) + + def merge(self, other): + """ + Return the functor merging ``self`` and ``other`` + + INPUT: + + - ``other`` -- a functor + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: K2 = k.extension(2) + sage: G2 = J.group(K2) + sage: K3 = k.extension(3) + sage: G3 = J.group(K3) + sage: sage.categories.pushout.pushout(G2, G3) # indirect doctest + Group of rational points of Jacobian over Finite Field in z6 of size 7^6 (Hess model) + """ + if not isinstance(other, JacobianGroupFunctor): + return None + if not self.domain() == other.domain(): + return None + K = pushout(self._field, other._field) + return JacobianGroupFunctor(self.domain().base(), K) + + +class JacobianGroup_base(Parent): + """ + Groups of rational points of Jacobians. + + INPUT: + + - ``parent`` -- a Jacobian + + - ``function_field`` -- a function field + + - ``base_div`` -- an effective divisor of the function field + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: J.group() + Group of rational points of Jacobian over Finite Field of size 7 (Hess model) + """ + _embedding_map_class = None + + def __init__(self, parent, function_field, base_div): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: G = J.group() + sage: TestSuite(G).run(skip=['_test_elements', '_test_pickling']) + """ + super().__init__(base=IntegerRing(), category=CommutativeAdditiveGroups()) + + self._parent = parent + self._function_field = function_field + self._genus = parent._function_field.genus() # equals function_field.genus() + self._base_div = base_div + + def _repr_(self): + """ + Return the string representation of ``self``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: J.group() + Group of rational points of Jacobian over Finite Field of size 7 (Hess model) + """ + F = self._function_field + k = F.constant_base_field() + return f'Group of rational points of Jacobian over {k}' + + def _coerce_map_from_(self, S): + """ + Return the coerce map from ``S`` if ``S`` is embedded to ``self``. + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: G3.has_coerce_map_from(G1) + True + """ + if isinstance(S, JacobianGroup_base) and S.parent() is self.parent(): + K = self._function_field.constant_base_field() + k = S._function_field.constant_base_field() + if K.has_coerce_map_from(k): + return self._embedding_map_class(S, self) + return None + + def construction(self): + """ + Return the data for a functorial construction of this Jacobian group. + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: K2 = k.extension(2) + sage: G2 = J.group(K2) + sage: K3= k.extension(3) + sage: G3 = J.group(K3) + sage: p1, p2 = G2.get_points(2) + sage: q1, q2 = G3.get_points(2) + sage: (p1 + q1).parent() is (p2 + q2).parent() + True + """ + k = self._parent._function_field.constant_base_field() + K = self._function_field.constant_base_field() + return (JacobianGroupFunctor(k, K), self._parent) + + def parent(self): + """ + Return the Jacobian to which this Jacobian group belongs. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: G = J.group() + sage: G.parent() + Jacobian of Projective Plane Curve over Finite Field of size 7 + defined by x^3 - y^2*z - 2*z^3 (Hess model) + """ + return self._parent + + def function_field(self): + """ + Return the function field to which this Jacobian group attached. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='hess') + sage: G = J.group() + sage: G.function_field() + Function field in z defined by z^3 + 4*y^2*z + 3 + """ + return self._function_field + + def base_divisor(self): + """ + Return the base divisor that is used to represent points of this group. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: G.base_divisor() + Place (1/y, 1/y*z) + sage: _ == 1*b + True + + The base divisor is the denominator (negative part) of the divisor of + degree zero that represents a point. :: + + sage: p = C([-1,2,1]).place() + sage: G.point(p - b).divisor() + - Place (1/y, 1/y*z) + + Place (y + 2, z + 1) + """ + return self._base_div + + +class JacobianGroup_finite_field_base(JacobianGroup_base): + """ + Jacobian groups of function fields over finite fields. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: J.group() + Group of rational points of Jacobian over Finite Field of size 7 (Hess model) + """ + def _bound_on_order(self): + """ + Return an upper bound on the order of the abelian group. + + This bound depends on the genus and the order of the constant field + of the function field. This simple bound is from [Hes2004]_. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: G._bound_on_order() + 23 + """ + F = self._function_field + q = F.constant_base_field().order() + g = self._genus + + c = 2*g/(q.sqrt() - 1) + return integer_floor(math.exp(c)*q**g) + + def order(self, algorithm='numeric'): + """ + Return the order of the Jacobian group. + + INPUT: + + - ``algorithm`` -- ``'numeric'`` (default) or ``'algebraic'`` + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: G.order() + 7 + """ + F = self._parent._function_field + g = F.genus() + b = self._function_field.constant_base_field().degree() // F.constant_base_field().degree() + + f = F.L_polynomial() + + if algorithm == 'numeric': + # numeric method - fast but might be inaccurate by numerical noise + from sage.rings.qqbar import AlgebraicField + h = Integer(math.prod([(1-a**(-b))**m for a, m in f.change_ring(AlgebraicField()).roots()])) + return h + + # algebraic method - slow + + es = [] + s = -1 + for i in range(1, 2*g + 1): + es.append(s*f[i]) + s = -s + es + + ps = [es[0]] + for i in range(1, 2*g): + p = 0 + s = 1 + for j in range(i): + p = p + s*es[j]*ps[-j-1] + s = -s + ps.append(p + s*(i + 1)*es[i]) + + while len(ps) < b*2*g: + p = 0 + s = 1 + for j in range(2*g): + p = p + s*es[j]*ps[-j-1] + s = -s + ps.append(p) + + qs = [ps[b*(i + 1) - 1] for i in range(2*g)] + + fs = [qs[0]] + for i in range(1, 2*g): + k = qs[i] + s = -1 + for j in range(i): + k = k + s*fs[j]*qs[i - j - 1] + s = -s + fs.append(-s*k // (i + 1)) + + bs = [1] + s = -1 + for i in range(2*g): + bs.append(s*fs[i]) + s = -s + + return sum(bs) + + def get_points(self, n): + """ + Return `n` points of the Jacobian group. + + If `n` is greater than the order of the group, then returns + all points of the group. + + INPUT: + + - ``n`` -- an integer + + EXAMPLES:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='hess') + sage: G = J.group() + sage: pts = G.get_points(G.order()) + sage: len(pts) + 11 + """ + lst = [] + S = iter(self) + try: + for i in range(n): + lst.append(next(S)) + except StopIteration: + pass + + return lst + + +class Jacobian_base(Parent): + """ + Jacobians of function fields. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: F.jacobian() + Jacobian of Function field in y defined by y^2 + y + (x^2 + 1)/x (Hess model) + """ + def __init__(self, function_field, base_div, **kwds): + """ + Initialize. + + TESTS:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J = F.jacobian() + sage: TestSuite(J).run() + """ + self._function_field = function_field + self._base_div = base_div + self._system = {} + self._base_place = None + self._curve = kwds.get('curve') + super().__init__(category=Jacobians(function_field.constant_base_field()), + base=function_field.constant_base_field(), + facade=True) + + def _repr_(self): + """ + Return the string representation of ``self``. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: F.jacobian() + Jacobian of Function field in y defined by y^2 + y + (x^2 + 1)/x (Hess model) + """ + if self._curve is not None: + F = self._curve + else: + F = self._function_field + return f'Jacobian of {F}' + + def _an_element_(self): + """ + Return an element of ``self``. + + TESTS:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J = F.jacobian() + sage: J.an_element() + [Place (1/x, 1/x*y)] + """ + return next(iter(self.group())) + + def __call__(self, x): + """ + Return the point of ``self`` constructed from ``x`` + + It is assumed that ``self`` and ``x`` are points of the Jacobians + attached to the same function field. + + TESTS:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J_hess = F.jacobian(model='hess') + sage: G = J_hess.group() + sage: p = G.get_points(3)[2] + sage: Jkm = F.jacobian(model='km_large') + sage: q = Jkm(p) + sage: p.order() == q.order() + True + sage: J_hess(q) == p + True + """ + F = self._function_field + if isinstance(x, JacobianPoint_base): + Gx = x.parent() + Jx = Gx.parent() + if Jx._function_field is F: + k = Gx._function_field.constant_base_field() + G = self.group(k) + K = G._function_field + return G.point(K.divisor_group()(x.divisor())) + if x in F.place_set(): + return self(x - x.degree()*self._base_place) + if x == 0: + return self.group().zero() + if x in F.divisor_group(): + G = self.group() + return G.point(x) + raise ValueError(f"Cannot create a point of the Jacobian from {x}") + + def curve(self): + """ + Return the projective curve to which this Jacobian is attached. + + If the Jacobian was constructed from a function field, then returns nothing. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J = F.jacobian() + sage: J.curve() + """ + return self._curve + + def facade_for(self): + """ + Return the system of groups that this Jacobian is a facade for. + + The Jacobian can be seen as a facade for all groups of rational points + over field extensions of the base constant field of the function field. + This method returns only the internally constructed system of such + groups. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J = F.jacobian() + sage: J.facade_for() + [Group of rational points of Jacobian over Finite Field of size 2 (Hess model)] + """ + if not self._system: + return [self.group()] + return list(self.group(k) for k in self._system) + + def base_divisor(self): + """ + Return the base divisor used to construct the Jacobian. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: b = F.get_place(1) + sage: J = F.jacobian(base_div=b) + sage: J.base_divisor() == b + True + """ + return self._base_div + + def group(self, k_ext=None): + """ + Return the group of rational points of the Jacobian. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: b = F.get_place(1) + sage: J = F.jacobian(base_div=b) + sage: J.group() + Group of rational points of Jacobian over Finite Field of size 2 (Hess model) + """ + F = self._function_field + k = F.constant_base_field() + + if k_ext in self._system: + return self._system[k_ext][0] + + if k_ext is None or k_ext is k: + ext = F.extension_constant_field(k) + grp = self._group_class(self, F, self._base_div) + if self._base_place is not None: + grp._base_place = self._base_place + self._system[k] = (grp, ext) + else: + ext = F.extension_constant_field(k_ext) + base_div = ext.conorm_divisor(self._base_div) + grp = self._group_class(self, ext.top(), base_div) + if self._base_place is not None: + grp._base_place = ext.conorm_place(self._base_place) + self._system[k_ext] = (grp, ext) + + return grp + + def set_base_place(self, place): + """ + Set ``place`` as the base place. + + INPUT: + + - ``place`` -- a rational place of the function field. + + The base place `B` is used to map a rational place `P` of the function + field to the point of the Jacobian defined by the divisor `P - B`. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J = F.jacobian() + sage: B = F.get_place(1) + sage: J.set_base_place(B) + sage: Q = F.places()[-1] + sage: J(Q) + [Place (x + 1, x*y + 1)] + sage: J(Q).parent() + Group of rational points of Jacobian over Finite Field of size 2 (Hess model) + sage: J(B) + [Place (x, x*y)] + sage: J(B).is_zero() + True + """ + self._base_place = place + + for k in self._system: + grp, ext = self._system[k] + grp._base_place = ext.conorm_place(place) diff --git a/src/sage/rings/function_field/jacobian_hess.py b/src/sage/rings/function_field/jacobian_hess.py new file mode 100644 index 00000000000..54980870b37 --- /dev/null +++ b/src/sage/rings/function_field/jacobian_hess.py @@ -0,0 +1,1046 @@ +r""" +Jacobians in Hess model + +This module implements Jacobian arithmetic based on divisor representation by +ideals. This approach to Jacobian arithmetic implementation is attributed to +Hess [Hes2002]_. + +Jacobian +-------- + +To create a Jacobian in Hess model, specify ``'hess'`` model and provide a base divisor +of degree `g`, which is the genus of the function field:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: C.geometric_genus() + 1 + sage: B = C([0,1,0]).place() + sage: B.degree() + 1 + sage: J = C.jacobian(model='hess', base_div=B) + sage: J + Jacobian of Projective Plane Curve over Finite Field of size 29 + defined by x^3 - y^2*z + 5*z^3 (Hess model) + +Group of rational points +------------------------ + +The group of rational points of a Jacobian is created from the Jacobian. A +point of the Jacobian group is determined by a divisor (of degree zero) of the +form `D - B` where `D` is an effective divisor of degree `g` and `B` is the base +divisor. Hence a point of the Jacobian group is represented by `D`. + +:: + + sage: G = J.group() + sage: P1 = C([1,8,1]).place() + sage: P2 = C([2,10,1]).place() + sage: p1 = G(P1) + sage: p2 = G(P2) + sage: p1 + [Place (y + 21, z + 28)] + sage: p2 + [Place (y + 24, z + 14)] + sage: p1 + p2 + [Place (y + 8, z + 28)] + +AUTHORS: + +- Kwankyu Lee (2022-01-24): initial version + +""" + +# **************************************************************************** +# Copyright (C) 2022 Kwankyu Lee +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +from sage.misc.cachefunc import cached_method + +from sage.structure.unique_representation import UniqueRepresentation +from sage.structure.richcmp import op_EQ, richcmp + +from sage.categories.map import Map +from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups +from sage.categories.homset import Hom + +from sage.arith.misc import integer_ceil +from sage.arith.functions import lcm + +from sage.rings.integer import Integer +from sage.matrix.constructor import matrix + +from sage.combinat.integer_vector_weighted import WeightedIntegerVectors + +from .place import FunctionFieldPlace +from .divisor import FunctionFieldDivisor + +from .jacobian_base import (Jacobian_base, + JacobianGroup_base, + JacobianGroup_finite_field_base, + JacobianPoint_base, + JacobianPoint_finite_field_base) + + +class JacobianPoint(JacobianPoint_base): + """ + Points of Jacobians represented by a pair of ideals. + + If a point of Jacobian is determined by `D`, then the divisor `D` is + represented by a pair of ideals in the finite maximal order and the + infinite maximal order of the function field. + + For efficiency reasons, the actual ideals stored are the inverted ideals + of the ideals representing the divisor `D`. + + INPUT: + + - ``parent`` -- Jacobian group + + - ``dS`` -- an ideal of the finite maximal order of a function field + + - ``ds`` -- an ideal of infinite maximal order of a function field + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl = C([1,8,1]).place() + sage: p = G.point(pl - b) + sage: dS, ds = p._data + sage: -(dS.divisor() + ds.divisor()) == pl + True + """ + def __init__(self, parent, dS, ds): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl = C([1,8,1]).place() + sage: p = G.point(pl - b) + sage: TestSuite(p).run(skip=['_test_category','_test_pickling']) + """ + super().__init__(parent) + self._data = (dS, ds) + + def _repr_(self): + """ + Return the string representation of ``self``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: G.zero() + [Place (1/y, 1/y*z)] + """ + dS, ds = self._data + divisor = (~dS).divisor() + (~ds).divisor() + return f'[{divisor}]' + + def __hash__(self): + """ + Return the hash of ``self``. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^3 - x^2*(x^2 + x + 1)^2) + sage: f = x/(y + 1) + sage: d = f.divisor() + sage: {d: 1} + {Place (1/x, 1/x^4*y^2 + 1/x^2*y + 1) + + Place (1/x, 1/x^2*y + 1) + + 3*Place (x, (1/(x^3 + x^2 + x))*y^2) + - 6*Place (x + 1, y + 1): 1} + """ + return hash(self._data) + + def _richcmp_(self, other, op): + """ + Compare ``self`` with ``other`` with respect to operator ``op``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([2,10,1]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 == p1 + True + sage: p1 != p2 + True + sage: p1 > p1 + False + sage: p1 > p2 + False + sage: p1 < p2 + True + """ + if op is op_EQ: + J = self.parent() + idS, ids = self._data + jdS, jds = other._data + return J._normalize(idS / jdS, ids / jds) is not None + else: + return richcmp(self._data, other._data, op) + + def _add_(self, other): + """ + Return the sum of ``self`` and ``other``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([2,10,1]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + p2 + [Place (y + 8, z + 3)] + sage: p1 + p2 == p2 + p1 + True + """ + G = self.parent() + idS, ids = self._data + jdS, jds = other._data + bdS, bds = G._base_point + dS, ds = G._normalize(idS * jdS * bdS, ids * jds * bds) + return G.element_class(self.parent(), dS, ds) + + def _neg_(self): + """ + Return the negative of this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl = C([-1,2,1]).place() + sage: p = G.point(pl - b) + sage: -p + [Place (y + 27, z + 1)] + sage: -(-p) == p + True + """ + G = self.parent() + idS, ids = self._data + bdS2, bds2 = G._base_point_double + dS, ds = G._normalize(~(idS * bdS2), ~(ids * bds2)) + return G.element_class(self.parent(), dS, ds) + + def multiple(self, n): + """ + Return the ``n``-th multiple of this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl = C([-1,2,1]).place() + sage: p = G.point(pl - b) + sage: p.multiple(100) + [Place (1/y, 1/y*z + 8)] + """ + if n == 0: + return self.parent().zero() + + G = self.parent() + idS, ids = self._data + bdS, bds = G._base_point + bdS2, bds2 = G._base_point_double + idSbdS2 = idS * bdS2 + idsbds2 = ids * bds2 + + if n < 0: + bits = Integer(-n).digits(2) + else: + bits = Integer(n).digits(2) + bits.pop() + + dS = idS + ds = ids + for i in range(len(bits)): + b = bits.pop() + if b > 0: + dS, ds = G._normalize(dS * dS * idSbdS2 , ds * ds * idsbds2) + else: + dS, ds = G._normalize(dS * dS * bdS, ds * ds * bds) + if n < 0: + dS, ds = G._normalize(~(dS * bdS2), ~(ds * bds2)) + + return G.element_class(self.parent(), dS, ds) + + def addflip(self, other): + """ + Return the addflip of this and ``other`` point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([2,19,1]).place() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1.addflip(p2) + [Place (y + 8, z + 27)] + sage: _ == -(p1 + p2) + True + """ + return -(self + other) + + def defining_divisor(self): + """ + Return the effective divisor that defines this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl = C([-1,2,1]).place() + sage: p = G.point(pl - b) + sage: p.defining_divisor() == pl + True + """ + dS, ds = self._data + return (~dS).divisor() + (~ds).divisor() + + def order(self, bound=None): + """ + Return the order of this point. + + ALGORITHM: Shanks' Baby Step Giant Step + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: p = C([-1,2,1]).place() + sage: pt = G.point(p - b) + sage: pt.order() + 30 + """ + if bound is None: # naive + J = self.parent() + zero = J.zero() + + m = self + r = 1 + while m != zero: + m = m + self + r += 1 + return r + + # if bound is given, deploy Shanks' Baby Step Giant Step + + J = self.parent() + B = J.bound_on_order() + q = integer_ceil(B.sqrt()) + zero = J.zero() + + # baby steps + b = [zero] + g = self + for i in range(q - 1): + if g == zero: + return i + 1 + b.append(g) + g = g + self + + # giant steps + g0 = (-q)*(self) + g = g0 + for i in range(q - 1): + for r in range(q): + if g == b[r]: + return q * (i + 1) + r + g = g + g0 + + # order is neither smaller or nor larger than this + return q**2 + + def divisor(self): + """ + Return the divisor representing this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: pl = C([-1,2,1]).place() + sage: p = G.point(pl - b) + sage: G.point(p.divisor()) == p + True + """ + J = self.parent() + dS, ds = self._data + return (~dS).divisor() + (~ds).divisor() - J._base_div + + +class JacobianPoint_finite_field(JacobianPoint, JacobianPoint_finite_field_base): + """ + Points of Jacobians over finite fields + """ + pass + + +class JacobianGroupEmbedding(Map): + """ + Embeddings between Jacobian groups. + + INPUT: + + - ``base_group`` -- Jacobian group over a base field + + - ``extension_group`` -- Jacobian group over an extension field + + EXAMPLES:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: G3.coerce_map_from(G1) + Jacobian group embedding map: + From: Group of rational points of Jacobian + over Finite Field of size 17 (Hess model) + To: Group of rational points of Jacobian + over Finite Field in z3 of size 17^3 (Hess model) + """ + def __init__(self, base_group, extension_group): + """ + Initialize. + + TESTS:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: map = G3.coerce_map_from(G1) + sage: TestSuite(map).run(skip=['_test_category', '_test_pickling']) + """ + F = base_group._function_field + F_base = F.base_field() + K = F.constant_base_field() + + F_ext = extension_group._function_field + F_ext_base = F_ext.base_field() + K_ext = F_ext.constant_base_field() + + # construct embedding of F into F_ext + embedK = K_ext.coerce_map_from(K) + embedF_base = F_base.hom(F_ext_base.gen(), embedK) + if F.degree() > 1: + embedF = F.hom(F_ext.gen(), embedF_base) + else: + embedF = embedF_base + + self._embedF = embedF + self._O_ext = F_ext.maximal_order() + self._Oinf_ext = F_ext.maximal_order_infinite() + + Map.__init__(self, Hom(base_group, extension_group, CommutativeAdditiveGroups())) + + def _repr_type(self): + """ + Return string representation of ``self``. + + TESTS:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: G3.coerce_map_from(G1) # indirect doctest + Jacobian group embedding map: + From: Group of rational points of Jacobian + over Finite Field of size 17 (Hess model) + To: Group of rational points of Jacobian + over Finite Field in z3 of size 17^3 (Hess model) + """ + return 'Jacobian group embedding' + + def _call_(self, x): + """ + Conorm map from F to F_ext. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k, 2) + sage: C = Curve(y^5 - x^3 - 2*x - 1).projective_closure() + sage: J = C.jacobian(model='hess') + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: m = G3.coerce_map_from(G1) + sage: m(G1.zero()) == G3.zero() + True + """ + embedF = self._embedF + O_ext = self._O_ext + Oinf_ext = self._Oinf_ext + + idS,ids = x._data + dS = O_ext.ideal([embedF(g) for g in idS.gens()]) + ds = Oinf_ext.ideal([embedF(g) for g in ids.gens()]) + return self.codomain().element_class(self.codomain(), dS, ds) + + +class JacobianGroup(UniqueRepresentation, JacobianGroup_base): + """ + Groups of rational points of a Jacobian. + + INPUT: + + - ``parent`` -- a Jacobian + + - ``function_field`` -- a function field + + - ``base_div`` -- an effective divisor of the function field + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: J.group() + Group of rational points of Jacobian + over Finite Field of size 17 (Hess model) + """ + Element = JacobianPoint + _embedding_map_class = JacobianGroupEmbedding + + def __init__(self, parent, function_field, base_div): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: TestSuite(G).run(skip=['_test_elements', '_test_pickling']) + """ + super().__init__(parent, function_field, base_div) + + bdS, bds = self._get_dS_ds(-base_div) + try: + bdS._gens_two() # speed up multiplication with these ideals + bds._ideal._gens_two() # by storing vector forms of two generators + except AttributeError: + pass + self._base_point = (bdS, bds) + self._base_point_double = (bdS * bdS, bds * bds) + + self._base_place = None + + def _repr_(self): + """ + Return the string representation of ``self``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: J.group() + Group of rational points of Jacobian + over Finite Field of size 17 (Hess model) + """ + r = super()._repr_() + return r + ' (Hess model)' + + def _element_constructor_(self, x): + """ + Construct an element of ``self`` from ``x``. + + If ``x`` is an effective divisor, then it is assumed to of + degree `g`, the genus of the function field. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: G = C.jacobian(model='hess', base_div=b).group() + sage: G(0) + [Place (1/y, 1/y*z)] + """ + if x == 0: + return self.zero() + + if isinstance(x, FunctionFieldPlace): + if (self._base_place is not None + and x in self._function_field.place_set() + and x.degree() == 1): + x = x - self._base_place + else: + x = x.divisor() + + if (isinstance(x, FunctionFieldDivisor) + and x in self._function_field.divisor_group()): + if x.degree() == 0: + return self.point(x) + if x.is_effective(): + return self.element_class(self, *self._get_dS_ds(x)) + + raise ValueError(f"Cannot construct a point from {x}") + + def _get_dS_ds(self, divisor): + """ + Return (dS,ds) representation of the divisor. + + TESTS:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: pl = C([2,8,1]).place() + sage: dS, ds = G._get_dS_ds(2*pl) + sage: (~dS).divisor() + (~ds).divisor() == 2*pl + True + """ + F = self._function_field + O = F.maximal_order() + Oinf = F.maximal_order_infinite() + + I = O.ideal(1) + J = Oinf.ideal(1) + for p in divisor._data: + m = divisor._data[p] + if p.is_infinite_place(): + J *= p.prime_ideal() ** (-m) + else: + I *= p.prime_ideal() ** (-m) + + return I, J + + def _normalize(self, I, J): + """ + Return a pair of normalized ideals from `I` and `J`. + + INPUT: + + - ``I`` -- an ideal of the finite maximal order + + - ``J`` -- an ideal of the infinite maximal order + + The output represents an effective divisor linearly equivalent to the + divisor represented by the given ideals `I` and `J`. + + ALGORITHM: + + Computes a function `f` in the Riemann-Roch space of the divisor `D` + represented by the (inverted) ideals `I` and `J`. The output is the + pair of the (inverted) ideals representing the effective divisor `(f) + D`, + which is linearly equivalent to `D`. + + TESTS:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: pl = C([2,8,1]).place() + sage: p = G.point(pl - b) + sage: dS, ds = (p + p)._data # indirect doctest + sage: G.point((~dS).divisor() + (~ds).divisor() - b) == p + p + True + """ + F = self._function_field + n = F.degree() + + O = F.maximal_order() + Oinf = F.maximal_order_infinite() + + # Step 1: construct matrix M of rational functions in x such that + # M * B == C where B = [b1,b1,...,bn], C =[v1,v2,...,vn] + V,fr,to = F.free_module(map=True) + B = matrix([to(b) for b in J.gens_over_base()]) + C = matrix([to(v) for v in I.gens_over_base()]) + M = C * B.inverse() + + # Step 2: get the denominator d of M and set mat = d * M + den = lcm([e.denominator() for e in M.list()]) + R = den.parent() # polynomial ring + one = R.one() + mat = matrix(R, n, [e.numerator() for e in (den*M).list()]) + gens = list(I.gens_over_base()) + + # Step 3: transform mat to a weak Popov form, together with gens + + # initialise pivot_row and conflicts list + found = None + pivot_row = [[] for i in range(n)] + conflicts = [] + for i in range(n): + bestp = -1 + best = -1 + for c in range(n): + d = mat[i,c].degree() + if d >= best: + bestp = c + best = d + + if best <= den.degree(): + found = i + break + + if best >= 0: + pivot_row[bestp].append((i,best)) + if len(pivot_row[bestp]) > 1: + conflicts.append(bestp) + + if found is None: + # while there is a conflict, do a simple transformation + while conflicts: + c = conflicts.pop() + row = pivot_row[c] + i,ideg = row.pop() + j,jdeg = row.pop() + + if jdeg > ideg: + i,j = j,i + ideg,jdeg = jdeg,ideg + + coeff = - mat[i,c].lc() / mat[j,c].lc() + s = coeff * one.shift(ideg - jdeg) + + mat.add_multiple_of_row(i, j, s) + gens[i] += s * gens[j] + + row.append((j,jdeg)) + + bestp = -1 + best = -1 + for c in range(n): + d = mat[i,c].degree() + if d >= best: + bestp = c + best = d + + if best <= den.degree(): + found = i + break + + if best >= 0: + pivot_row[bestp].append((i,best)) + if len(pivot_row[bestp]) > 1: + conflicts.append(bestp) + else: + return None + + f = gens[found] + return (O.ideal(~f) * I, Oinf.ideal(~f) * J) + + def point(self, divisor): + """ + Return the point represented by the divisor of degree zero. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: p = C([-1,2,1]).place() + sage: G.point(p - b) + [Place (y + 2, z + 1)] + """ + c = divisor + self._base_div + f = c.basis_function_space()[0] + d = f.divisor() + c + dS, ds = self._get_dS_ds(d) + return self.element_class(self, dS, ds) + + @cached_method + def zero(self): + """ + Return the zero element of this group. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: G.zero() + [Place (1/y, 1/y*z)] + """ + bdS,bds = self._base_point + return self.element_class(self, ~bdS, ~bds) + + +class JacobianGroup_finite_field(JacobianGroup, JacobianGroup_finite_field_base): + """ + Jacobian groups of function fields over finite fields + + INPUT: + + - ``parent`` -- a Jacobian + + - ``function_field`` -- a function field + + - ``base_div`` -- an effective divisor of the function field + + EXAMPLES:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: G3.coerce_map_from(G1) + Jacobian group embedding map: + From: Group of rational points of Jacobian + over Finite Field of size 17 (Hess model) + To: Group of rational points of Jacobian + over Finite Field in z3 of size 17^3 (Hess model) + """ + Element = JacobianPoint_finite_field + + def __init__(self, parent, function_field, base_div): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: G = J.group() + sage: TestSuite(G).run(skip=['_test_elements','_test_pickling']) + """ + super().__init__(parent, function_field, base_div) + + F = self._function_field + K = F.constant_base_field() + + R = F.base_field() # base rational function field + x = R.gen() + y = F.gen() + + r = self._parent._function_field.constant_base_field().degree() + frob_K = K.frobenius_endomorphism(r) + frob_R = R.hom(x, base_morphism=frob_K) + frob_F = F.hom(y, base_morphism=frob_R) + + self._frobenius = frob_F + + def __iter__(self): + """ + Return generator of points of this group. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='hess') + sage: G = J.group() + sage: len([pt for pt in G]) + 11 + """ + g = self._parent._function_field.genus() + F = self._function_field + O = F.maximal_order() + Oinf = F.maximal_order_infinite() + + deg = 1 + support = [] + degrees = [] + multiples = [] + lst = [] + + places_infinite = F.places_infinite() + generators = [iter(places_infinite)] + num_of_infinite_places = len(places_infinite) + while True: + while True: + try: + new_pl = next(generators[-1]) + break + except StopIteration: + if deg > g: + return + generators.append(F._places_finite(deg)) + deg += 1 + multiples.append((g + 1)*[None]) + P = ~new_pl.prime_ideal() + dn = new_pl.degree() + I0 = O.ideal(1) + J0 = Oinf.ideal(1) + dr = 0 + for r in range(1, g // new_pl.degree() + 1): + if new_pl.is_infinite_place(): + J0 = J0 * P + else: + I0 = I0 * P + multiples[-1][r] = (I0, J0) + dr = dr + dn + for weights in WeightedIntegerVectors(g - dr, degrees): + I = I0 + J = J0 + for i in range(len(support)): + w = weights[i] + if w > 0: + dS, ds = multiples[i][w] + if i < num_of_infinite_places: + J *= ds # dS is the unit ideal + else: + I *= dS # ds is the unit ideal + pt = self.element_class(self, I, J) + if pt not in lst: + lst.append(pt) + yield pt + support.append(new_pl) + degrees.append(new_pl.degree()) + + def _frobenius_on(self, pt): + """ + Return the image of ``pt`` acted by the Frobenius automorphism. + + EXAMPLES:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='hess') + sage: G1 = J.group() + sage: G1.order() + 11 + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: pts1 = G1.get_points(11) + sage: pts3 = G3.get_points(12) + sage: pt = next(pt for pt in pts3 if pt not in pts1) + sage: pt.frobenius().frobenius().frobenius() == pt # indirect doctest + True + sage: pt.frobenius() == pt + False + """ + frob_F = self._frobenius + + F = self._function_field + O = F.maximal_order() + Oinf = F.maximal_order_infinite() + + idS,ids = pt._data + dS = O.ideal([frob_F(g) for g in idS.gens()]) + ds = Oinf.ideal([frob_F(g) for g in ids.gens()]) + return self.element_class(self, dS, ds) + + +class Jacobian(Jacobian_base, UniqueRepresentation): + """ + Jacobians of function fields. + + EXAMPLES:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: C.jacobian(model='hess', base_div=b) + Jacobian of Projective Plane Curve over Finite Field of size 17 + defined by x^3 - y^2*z + 5*z^3 (Hess model) + """ + def __init__(self, function_field, base_div, **kwds): + """ + Initialize. + + TESTS:: + + sage: k = GF(17) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: J = C.jacobian(model='hess', base_div=b) + sage: TestSuite(J).run(skip=['_test_elements','_test_pickling']) + """ + super().__init__(function_field, base_div, **kwds) + + if function_field.constant_base_field().is_finite(): + self._group_class = JacobianGroup_finite_field + else: + self._group_class = JacobianGroup + + def _repr_(self): + """ + Return the string representation of ``self``. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: C.jacobian(model='hess', base_div=b) + Jacobian of Projective Plane Curve over Finite Field of size 17 + defined by x^3 - y^2*z + 5*z^3 (Hess model) + """ + r = super()._repr_() + return r + ' (Hess model)' diff --git a/src/sage/rings/function_field/jacobian_khuri_makdisi.py b/src/sage/rings/function_field/jacobian_khuri_makdisi.py new file mode 100644 index 00000000000..eeb2ae12fd6 --- /dev/null +++ b/src/sage/rings/function_field/jacobian_khuri_makdisi.py @@ -0,0 +1,1029 @@ +r""" +Jacobians in Khuri-Makdisi model + +This module implements Jacobian arithmetic by Khuri-Makdisi's algorithms +[Khu2004]_ based on divisor representation by linear spaces. + +Jacobian +-------- + +There are three models for Jacobian arithmetic by Khuri-Makdisi's algorithms. +For each of the models, one should provide a base divisor satisfying certain +degree condition. The following lists the names of the three models and the +corresponding conditions on base divisors. Let `g` be the genus of the function +field. + +- ``km_large``: large model; requires an effective divisor of degree at least `2g + 1` + +- ``km_medium``: medium model; requires an effective divisor of degree at least `2g + 1` + +- ``km_small``: small model; requires an effective divisor of degree at least `g + 1` + +To create a Jacobian in this model, specify ``'km_[large|medium|small]'`` as ``model`` and +provide a base divisor satisfying the degree condition. + +EXAMPLES: + +We construct a function field (of a projective curve) over a finite field:: + + sage: P2. = ProjectiveSpace(GF(29), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: C.geometric_genus() + 1 + sage: H = C.function(y/x).divisor_of_poles() + sage: H.degree() + 3 + +Now we use `H` as base divisor for the large and medium models:: + + sage: J_large = C.jacobian(model='km_large', base_div=H) + sage: J_large + Jacobian of Projective Plane Curve over Finite Field of size 29 + defined by x^3 - y^2*z + 5*z^3 (Khuri-Makdisi large model) + sage: J_medium = C.jacobian(model='km_medium', base_div=H) + sage: J_medium + Jacobian of Projective Plane Curve over Finite Field of size 29 + defined by x^3 - y^2*z + 5*z^3 (Khuri-Makdisi medium model) + +and for the small model, we construct an effective divisor of degree 2:: + + sage: B = sum(H.support()[:2]) + sage: B.degree() + 2 + sage: J_small = C.jacobian(model='km_small', base_div=B) + sage: J_small + Jacobian of Projective Plane Curve over Finite Field of size 29 + defined by x^3 - y^2*z + 5*z^3 (Khuri-Makdisi small model) + +Group of rational points +------------------------ + +The group of rational points of a Jacobian is created from the Jacobian. A +point of the Jacobian group is represented by a divisor `D - B` where `D` is +an effective divisor of the same degree with the base divisor `B`. The +divisor `D` in turn is determined by a linear subspace of the Riemann-Roch +space associated with certain multiple of `B` (depending on the model). This +allows representing points of Jacobian as matrices once we fix a basis of the +Riemann-Roch space. + + +EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: H = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=H) + sage: G = J.group() + sage: D = C([0,1,0]).place() + sage: P1 = C([-1,2,1]).place() + sage: P2 = C([3,7,1]).place() + sage: p1 = G.point(P1 - D) + sage: p2 = G.point(P2 - D) + sage: p1 + Point of Jacobian determined by + [ 1 0 0 0 0 0 0 12 15] + [ 0 1 0 0 0 0 0 0 13] + [ 0 0 1 0 0 0 0 0 2] + [ 0 0 0 1 0 0 0 0 16] + [ 0 0 0 0 0 1 0 0 15] + [ 0 0 0 0 0 0 1 0 1] + sage: p2 + Point of Jacobian determined by + [ 1 0 0 0 0 0 0 12 5] + [ 0 1 0 0 0 0 0 0 2] + [ 0 0 1 0 0 0 0 0 13] + [ 0 0 0 1 0 0 0 0 8] + [ 0 0 0 0 0 1 0 0 10] + [ 0 0 0 0 0 0 1 0 14] + sage: p1 + p2 + Point of Jacobian determined by + [ 1 0 0 0 0 16 0 5 3] + [ 0 1 0 0 0 6 0 8 16] + [ 0 0 1 0 0 15 0 3 10] + [ 0 0 0 1 0 3 0 0 0] + [ 0 0 0 0 1 12 0 16 8] + [ 0 0 0 0 0 0 1 3 0] + +AUTHORS: + +- Kwankyu Lee (2022-01-24): initial version + +""" + +# **************************************************************************** +# Copyright (C) 2022 Kwankyu Lee +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +from sage.misc.cachefunc import cached_method + +from sage.structure.unique_representation import UniqueRepresentation +from sage.structure.richcmp import op_EQ, richcmp + +from sage.categories.map import Map +from sage.categories.commutative_additive_groups import CommutativeAdditiveGroups +from sage.categories.homset import Hom + +from sage.matrix.constructor import matrix + +from sage.combinat.integer_vector_weighted import WeightedIntegerVectors + +from .place import FunctionFieldPlace +from .divisor import FunctionFieldDivisor + +from .jacobian_base import (Jacobian_base, + JacobianGroup_base, + JacobianGroup_finite_field_base, + JacobianPoint_base, + JacobianPoint_finite_field_base) + + +class JacobianPoint(JacobianPoint_base): + """ + Points of a Jacobian group. + + INPUT: + + - ``parent`` -- Jacobian group + + - ``w`` -- matrix + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: pl = C([3,2,1]).place() + sage: G.point(pl - b) + Point of Jacobian determined by + [1 0 0 0 0 0 0 2 3] + [0 1 0 0 0 0 0 0 3] + [0 0 1 0 0 0 0 0 1] + [0 0 0 1 0 0 0 0 5] + [0 0 0 0 0 1 0 0 5] + [0 0 0 0 0 0 1 0 4] + + """ + def __init__(self, parent, w): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: pl = C([3,2,1]).place() + sage: p = G.point(pl - b) + sage: TestSuite(p).run(skip=['_test_category','_test_pickling']) + """ + super().__init__(parent) + w.set_immutable() + self._w = w + + def _repr_(self): + """ + Return the string representation of ``self``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: G.zero() + Point of Jacobian determined by + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 0 1 0] + """ + return f'Point of Jacobian determined by \n{self._w}' + + def __hash__(self): + """ + Return the hash of ``self``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: zero = G.zero() + sage: {zero: 1} + {Point of Jacobian determined by + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 0 1 0]: 1} + """ + return hash(self._w) + + def _richcmp_(self, other, op): + """ + Compare ``self`` with ``other`` with respect to operator ``op``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 == p1 + True + sage: p1 != p2 + True + sage: p1 > p1 + False + sage: p1 > p2 + True + sage: p1 < p2 + False + """ + if op is op_EQ: + km = self.parent()._km + return km.equal(self._w, other._w) + else: + return richcmp(self._w, other._w, op) + + def _add_(self, other): + """ + Return the sum of ``self`` and ``other``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + p2 + Point of Jacobian determined by + [1 0 0 0 0 0 3 1 1] + [0 1 0 0 0 0 3 0 2] + [0 0 1 0 0 0 0 3 0] + [0 0 0 1 0 0 0 0 3] + [0 0 0 0 1 0 4 0 3] + [0 0 0 0 0 1 6 5 2] + sage: p1 + p2 == p2 + p1 + True + """ + G = self.parent() + km = G._km + return G.element_class(self.parent(), km.add(self._w, other._w)) + + def _neg_(self): + """ + Return the negative of this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: b = F.get_place(1) + sage: p = C([-1,2,1]).place() + sage: pt = G.point(p - b) + sage: -pt + Point of Jacobian determined by + [1 0 0 0 0 0 1 6 0] + [0 1 0 0 0 0 2 6 3] + [0 0 1 0 0 0 4 1 1] + [0 0 0 1 0 0 1 4 1] + [0 0 0 0 1 0 5 2 6] + [0 0 0 0 0 1 3 1 3] + sage: -(-pt) == pt + True + """ + G = self.parent() + km = G._km + return G.element_class(self.parent(), km.negate(self._w)) + + def _rmul_(self, n): + """ + Return the ``n``-th multiple of this point. + + INPUT: + + - ``n`` -- an integer + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p = G.point(pl - b) + sage: 10*(10*p) == 100*p + True + """ + return self.multiple(n) + + def multiple(self, n): + """ + Return the ``n``-th multiple of this point. + + INPUT: + + - ``n`` -- an integer + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p = G.point(pl - b) + sage: p.multiple(100) + Point of Jacobian determined by + [1 0 0 0 0 2 0 1 1] + [0 1 0 0 0 5 0 1 6] + [0 0 1 0 0 2 0 6 3] + [0 0 0 1 0 1 0 0 0] + [0 0 0 0 1 5 0 1 4] + [0 0 0 0 0 0 1 1 0] + """ + G = self.parent() + km = G._km + return G.element_class(self.parent(), km.multiple(self._w, n)) + + def addflip(self, other): + """ + Return the addflip of this and ``other`` point. + + The addflip of two points is by definition the negative of the sum of + the points. This operation is faster than addition in Jacobian + arithmetic by Khuri-Makdisi algorithms. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1.addflip(p2) + Point of Jacobian determined by + [1 0 0 0 0 0 0 2 6] + [0 1 0 0 0 0 0 0 3] + [0 0 1 0 0 0 0 0 4] + [0 0 0 1 0 0 0 0 3] + [0 0 0 0 0 1 0 0 5] + [0 0 0 0 0 0 1 0 2] + sage: _ == -(p1 + p2) + True + """ + G = self.parent() + km = G._km + return G.element_class(self.parent(), km.addflip(self._w, other._w)) + + def defining_matrix(self): + """ + Return the matrix whose row span determines the effective divisor + representing this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: p = G.point(pl - b) + sage: p.defining_matrix() + [1 0 0 0 0 0 0 2 5] + [0 1 0 0 0 0 0 0 3] + [0 0 1 0 0 0 0 0 2] + [0 0 0 1 0 0 0 0 6] + [0 0 0 0 0 1 0 0 5] + [0 0 0 0 0 0 1 0 1] + """ + return self._w + + def divisor(self): + """ + Return the divisor representing this point. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: b = F.get_place(1) + sage: p = C([-1,2,1]).place() + sage: pt = G.point(p - b) + sage: G.point(pt.divisor()) == pt + True + + ALGORITHM: Lemma 2.1 of [Khu2004]_. + """ + G = self.parent() + F = G._function_field + data = [G._from_L(f).divisor() for f in self._w.rows()] + supp = set() + for d in data: + supp.update(d.support()) + supp = list(supp) + d = F.divisor_group().zero() + for p in supp: + d += min(d.valuation(p) for d in data) * p.divisor() + return d + G._div_L - G._base_div + + +class JacobianPoint_finite_field(JacobianPoint, JacobianPoint_finite_field_base): + pass + + +class JacobianGroupEmbedding(Map): + """ + Embeddings between Jacobian groups. + + INPUT: + + - ``base_group`` -- Jacobian group over a base field + + - ``extension_group`` -- Jacobian group over an extension field + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: G3.coerce_map_from(G1) + Jacobian group embedding map: + From: Group of rational points of Jacobian + over Finite Field of size 7 (Khuri-Makdisi large model) + To: Group of rational points of Jacobian + over Finite Field in z3 of size 7^3 (Khuri-Makdisi large model) + """ + def __init__(self, base_group, extension_group): + """ + Initialize. + + TESTS:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: map = G3.coerce_map_from(G1) + sage: TestSuite(map).run(skip=['_test_category', '_test_pickling']) + """ + F_ext = extension_group._function_field + K_ext = F_ext.constant_base_field() + + self._K_ext = K_ext + + Map.__init__(self, Hom(base_group, extension_group, CommutativeAdditiveGroups())) + + def _repr_type(self): + """ + Return string representation of ``self``. + + TESTS:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: G3.coerce_map_from(G1) # indirect doctest + Jacobian group embedding map: + From: Group of rational points of Jacobian + over Finite Field of size 7 (Khuri-Makdisi large model) + To: Group of rational points of Jacobian + over Finite Field in z3 of size 7^3 (Khuri-Makdisi large model) + """ + return 'Jacobian group embedding' + + def _call_(self, x): + """ + Conorm map from F to F_ext. + + TESTS:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: m = G3.coerce_map_from(G1) + sage: m(G1.zero()) == G3.zero() + True + """ + w = (x._w).change_ring(self._K_ext) + + return self.codomain().element_class(self.codomain(), w) + + +class JacobianGroup(UniqueRepresentation, JacobianGroup_base): + """ + Groups of rational points of a Jacobian. + + INPUT: + + - ``parent`` -- a Jacobian + + - ``function_field`` -- a function field + + - ``base_div`` -- an effective divisor of the function field + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: J.group() + Group of rational points of Jacobian + over Finite Field of size 7 (Khuri-Makdisi large model) + """ + Element = JacobianPoint + _embedding_map_class = JacobianGroupEmbedding + + def __init__(self, parent, function_field, base_div): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + """ + super().__init__(parent, function_field, base_div) + + D0 = base_div + + self._V_cache = 10*[None] + + V_cache = self._V_cache + + def V(n): + if n in V_cache: + return V_cache[n] + + Vn, from_Vn, to_Vn = (n * D0).function_space() + V_cache[n] = (Vn, from_Vn, to_Vn) + + return Vn, from_Vn, to_Vn + + def mu(n, m, i, j): + Vn, from_Vn, to_Vn = V(n) + Vm, from_Vm, to_Vm = V(m) + Vnm, from_Vnm, to_Vnm = V(n + m) + return to_Vnm(from_Vn(Vn.gen(i)) * from_Vm(Vm.gen(j))) + + model = parent._model + + if model == 'large': + div_L = 3 * D0 + L, from_L, to_L = V(3) + from sage.rings.function_field.khuri_makdisi import KhuriMakdisi_large as KM + elif model == 'medium': + div_L = 2 * D0 + L, from_L, to_L = V(2) + from sage.rings.function_field.khuri_makdisi import KhuriMakdisi_medium as KM + elif model == 'small': + div_L = 3 * D0 + L, from_L, to_L = V(3) + from sage.rings.function_field.khuri_makdisi import KhuriMakdisi_small as KM + + self._div_L = div_L + self._L = L + self._from_L = from_L + self._to_L = to_L + + w0 = self.point(function_field.divisor_group().zero()).defining_matrix() + km = KM(lambda n: V(n)[0], mu, w0, D0.degree(), self._genus) + + self._km = km + self._w0 = w0 + + self._base_place = None + + def _repr_(self): + """ + Return the string representation of ``self``. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: J.group() + Group of rational points of Jacobian + over Finite Field of size 7 (Khuri-Makdisi large model) + """ + r = super()._repr_() + return r + f' (Khuri-Makdisi {self._parent._model} model)' + + def _wd_from_divisor(self, x): + """ + Return the matrix representing the divisor ``x``. + + INPUT: + + - ``x`` -- an effective divisor + + TESTS: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_medium', base_div=h) + sage: G = J.group() + sage: P = C([-1,2,1]).place() + sage: G._wd_from_divisor(2*P) + [1 0 0 0 4 0] + [0 1 0 0 4 6] + [0 0 1 0 2 1] + [0 0 0 1 1 6] + """ + WD = (self._div_L - x).basis_function_space() + wd = matrix([self._to_L(f) for f in WD]) + wd.echelonize() + return wd + + def _element_constructor_(self, x): + """ + Construct an element of ``self`` from ``x``. + + If ``x`` is an effective divisor, then it is assumed to have the same + degree with the base divisor. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: G(0) + Point of Jacobian determined by + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 0 1 0] + sage: b = C([0,1,0]).place() + sage: J.set_base_place(b) + sage: p = C([-1,2,1]).place() + sage: G(p) + Point of Jacobian determined by + [1 0 0 0 0 0 0 2 5] + [0 1 0 0 0 0 0 0 3] + [0 0 1 0 0 0 0 0 2] + [0 0 0 1 0 0 0 0 6] + [0 0 0 0 0 1 0 0 5] + [0 0 0 0 0 0 1 0 1] + """ + if x == 0: + return self.zero() + + if isinstance(x, FunctionFieldPlace): + if (self._base_place is not None + and x in self._function_field.place_set() + and x.degree() == 1): + x = x - self._base_place + else: + x = x.divisor() + + if (isinstance(x, FunctionFieldDivisor) + and x in self._function_field.divisor_group()): + if x.degree() == 0: + return self.point(x) + if x.is_effective(): + wd = self._wd_from_divisor(x) + return self.element_class(self, wd) + + raise ValueError(f"Cannot construct a point from {x}") + + def point(self, divisor): + """ + Return the point represented by the divisor. + + INPUT: + + - ``divisor`` -- a divisor of degree zero + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: b = C([0,1,0]).place() + sage: p = C([-1,2,1]).place() + sage: G.point(p - b) + Point of Jacobian determined by + [1 0 0 0 0 0 0 2 5] + [0 1 0 0 0 0 0 0 3] + [0 0 1 0 0 0 0 0 2] + [0 0 0 1 0 0 0 0 6] + [0 0 0 0 0 1 0 0 5] + [0 0 0 0 0 0 1 0 1] + """ + if divisor.degree() != 0: + raise ValueError('divisor not of degree zero') + + c = divisor + self._base_div + f = c.basis_function_space()[0] + d = f.divisor() + c + + wd = self._wd_from_divisor(d) + return self.element_class(self, wd) + + @cached_method + def zero(self): + """ + Return the zero element of this group. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: G.zero() + Point of Jacobian determined by + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 0 1 0] + """ + return self.element_class(self, self._w0) + + +class JacobianGroup_finite_field(JacobianGroup, JacobianGroup_finite_field_base): + """ + Jacobian groups of function fields over finite fields. + + INPUT: + + - ``parent`` -- a Jacobian + + - ``function_field`` -- a function field + + - ``base_div`` -- an effective divisor of the function field + + EXAMPLES:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G1 = J.group() + sage: K = k.extension(2) + sage: G2 = J.group(K) + sage: G2.coerce_map_from(G1) + Jacobian group embedding map: + From: Group of rational points of Jacobian + over Finite Field of size 7 (Khuri-Makdisi large model) + To: Group of rational points of Jacobian + over Finite Field in z2 of size 7^2 (Khuri-Makdisi large model) + """ + Element = JacobianPoint_finite_field + + def __init__(self, parent, function_field, base_div): + """ + Initialize. + + TESTS:: + + sage: k = GF(7) + sage: P2. = ProjectiveSpace(k, 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: TestSuite(G).run(skip=['_test_elements', '_test_pickling']) + """ + super().__init__(parent, function_field, base_div) + + F = self._function_field + K = F.constant_base_field() + + r = self._parent._function_field.constant_base_field().degree() + frob_K = K.frobenius_endomorphism(r) + + self._frobenius_of_constant_field = frob_K + + def __iter__(self): + """ + Return generator of points of this group. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: b = C([0,0,1]).place() + sage: J = C.jacobian(model='km_large', base_div=3*b) + sage: G = J.group() + sage: len([pt for pt in G]) + 11 + """ + d0 = self._base_div.degree() + F = self._function_field + + zero_divisor = self._km.zero_divisor() + deg = 1 + support = [] + degrees = [] + multiples = [] + lst = [] + + places_infinite = F.places_infinite() + generators = [iter(places_infinite)] + while True: + while True: + try: + new_pl = next(generators[-1]) + break + except StopIteration: + if deg > d0: + return + generators.append(F._places_finite(deg)) + deg += 1 + multiples.append((d0 + 1)*[None]) + wn = self._wd_from_divisor(new_pl.divisor()) + dn = new_pl.degree() + wr = zero_divisor + dr = 0 + for r in range(1, d0 // dn + 1): + wr = self._km.add_divisor(wr, wn, dr, dn) + multiples[-1][r] = wr + dr += dn + for weights in WeightedIntegerVectors(d0 - dr, degrees): + d = dr + wD = wr + for i in range(len(support)): + w = weights[i] + if w > 0: + m = w * degrees[i] + wD = self._km.add_divisor(wD, multiples[i][w], d, m) + d += m + pt = self.element_class(self, wD) + if pt not in lst: + lst.append(pt) + yield pt + support.append(new_pl) + degrees.append(new_pl.degree()) + + def _frobenius_on(self, pt): + """ + Return the image of ``pt`` acted by the Frobenius automorphism. + + INPUT: + + - ``pt`` -- a point of ``self`` + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: b = C([0,0,1]).place() + sage: J = C.jacobian(model='km_large', base_div=3*b) + sage: G1 = J.group() + sage: K = k.extension(3) + sage: G3 = J.group(K) + sage: pt = G3.get_points(12)[-2] # expected to be a point rational over K + sage: pt.frobenius().frobenius().frobenius() == pt # indirect doctest + True + """ + w = pt._w.apply_morphism(self._frobenius_of_constant_field) + return self.element_class(self, w) + + +class Jacobian(UniqueRepresentation, Jacobian_base): + """ + Jacobians implemented by Khuri-Makdisi's algorithms. + + EXAMPLES:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: C.jacobian(model='km') + Jacobian of Projective Plane Curve over Finite Field of size 7 + defined by x^3 - y^2*z - 2*z^3 (Khuri-Makdisi large model) + """ + def __init__(self, function_field, base_div, model, **kwds): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='km_large') + sage: TestSuite(J).run(skip=['_test_elements', '_test_pickling']) + + :: + + sage: J = C.jacobian(model='km_unknown') + Traceback (most recent call last): + ... + ValueError: unknown model + """ + super().__init__(function_field, base_div, **kwds) + + if model not in ['large', 'medium', 'small']: + raise ValueError('unknown model') + + self._model = model + + if function_field.constant_base_field().is_finite(): + self._group_class = JacobianGroup_finite_field + else: + self._group_class = JacobianGroup + + def _repr_(self): + """ + Return the string representation of ``self``. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: C.jacobian(model='km_large') + Jacobian of Projective Plane Curve over Finite Field of size 7 + defined by x^3 - y^2*z - 2*z^3 (Khuri-Makdisi large model) + """ + r = super()._repr_() + return r + f' (Khuri-Makdisi {self._model} model)' diff --git a/src/sage/rings/function_field/khuri_makdisi.pyx b/src/sage/rings/function_field/khuri_makdisi.pyx new file mode 100644 index 00000000000..f0cac80a1f2 --- /dev/null +++ b/src/sage/rings/function_field/khuri_makdisi.pyx @@ -0,0 +1,893 @@ +r""" +Khuri-Makdisi algorithms for arithmetic in Jacobians + +This module implements Khuri-Makdisi's algorithms of [Khu2004]_. + +In the implementation, we use notations close to the ones used by +Khuri-Makdisi. We describe them below for readers of the code. + +Let `D_0` be the base divisor of the Jacobian in Khuri-Makdisi model. So `D_0` +is an effective divisor of appropriate degree `d_0` depending on the model. Let +`g` be the genus of the underlying function field. For large and medium models, +`d_0\ge 2g+1`. For small model `d_0\ge g+1`. A point of the Jacobian is a +divisor class containing a divisor `D - D_0` of degree `0` with an effective +divisor `D` of degree `d_0`. + +Let `V_n` denote the vector space `H^0(O(nD_0))` with a chosen +basis, and let `\mu_{n,m}` is a bilinear map from `V_n\times V_m\to V_{n+m}` +defined by `(f,g)\mapsto fg`. The map `\mu_{n,m}` can be represented by a +3-dimensional array as depicted below:: + + f + *------* + d /|e /| + *-|----* | + | *----|-* + |/ |/ + *------* + +where `d=\dim V_n`, `e=\dim V_m`, `f=\dim V_{n+m}`. In the implementation, we +instead use a matrix of size `d\times ef`. Each row of the matrix denotes a +matrix of size `e\times f`. + +A point of the Jacobian is represented by an effective divisor `D`. In +Khuri-Makdisi algorithms, the divisor `D` is represented by a subspace `W_D = +H^0(O(n_0D_0 - D))` of `V_{n_0}` with fixed `n_0` depending on the model. For +large and small models, `n_0=3` and `L = O(3D_0)`, and for medium model, +`n_0=2` and `L = O(2D_0)`. + +The subspace `W_D` is the row space of a matrix `w_D`. Thus in the +implementation, the matrix `w_D` represents a point of the Jacobian. The row +space of the matrix `w_L` is `V_{n_0}=H^0(O(n_0D_0))`. + +The function ``mu_image(w_D, w_E, mu_mat_n_m, expected_dim)`` computes the image +`\mu_{n,m}(W_D,W_E)` of the expected dimension. + +The function ``mu_preimage(w_E, w_F, mu_mat_n_m, expected_codim)`` computes the +preimage `W_D` such that `\mu_{n,m}(W_D,W_E)=W_F` of the expected codimension +`\dim V_n - \dim W_D`, which is a multiple of `d_0`. + +AUTHORS: + +- Kwankyu Lee (2022-01): initial version + +""" + +# **************************************************************************** +# Copyright (C) 2022 Kwankyu Lee +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +from sage.matrix.constructor import matrix +from sage.matrix.matrix cimport Matrix +from sage.modules.free_module_element cimport FreeModuleElement +from sage.rings.integer import Integer + + +cdef inline list listcat(list l): + flat_list = [] + for sublist in l: + flat_list.extend(sublist) + return flat_list + + +cdef class KhuriMakdisi_base(object): + cdef Matrix wL + cdef Matrix w0 + cdef int d0, g + + cdef Matrix mu_image(self, Matrix wd, Matrix we, Matrix mu_mat, int expected_dim=0): + """ + Lemma 2.2. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='km_large') + sage: G = J.group() + sage: b = C([0,0,1]).place() + sage: pl1 = C([1,2,1]).place() + sage: pl2 = C([3,1,1]).place() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: w1 = p1._w + sage: w2 = p2._w + sage: w1 + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 1 0 0 1 0 2] + [0 0 0 0 1 0 6 0 6] + [0 0 0 0 0 1 4 0 1] + [0 0 0 0 0 0 0 1 0] + sage: w2 + [0 1 0 0 0 0 0 2 2] + [0 0 1 0 0 0 0 4 6] + [0 0 0 1 0 0 0 5 6] + [0 0 0 0 1 0 0 3 1] + [0 0 0 0 0 1 0 3 5] + [0 0 0 0 0 0 1 6 3] + sage: (p1 + p2)._w # indirect doctest + [1 0 0 0 0 0 2 2 4] + [0 1 0 0 0 0 3 5 0] + [0 0 1 0 0 0 0 3 6] + [0 0 0 1 0 0 1 1 3] + [0 0 0 0 1 0 5 6 3] + [0 0 0 0 0 1 5 5 3] + """ + cdef Matrix mat + cdef FreeModuleElement v + cdef Py_ssize_t n, c, r + + n = we.ncols() + c = mu_mat.ncols() // n + mat = matrix(0, c) + for v in wd: + mat = mat.stack(we * matrix(n, v * mu_mat)) + mat.echelonize() + r = mat.rank() + mat = mat.matrix_from_rows(range(r)) + if expected_dim and r == expected_dim: + break + + assert not expected_dim or r == expected_dim + + return mat + + cdef Matrix mu_preimage(self, Matrix we, Matrix wde, Matrix mu_mat, int expected_codim=0): + """ + Lemma 2.3 (division). + + This computes + + {s: mu(s*E) subset F} = {s: s*M*E*F_perp^ == 0} + = {s: s*M*v*F_perp^ == 0 for v in E} + = {s: F_perp*(v*M^)*s == 0 for v in E} + + for E = we, F = wde, M^ = mu_mat_reversed + """ + cdef Matrix mat, perp, vmu + cdef FreeModuleElement v + cdef Py_ssize_t nd, ne, nde, r + + ne = we.ncols() + nde = wde.ncols() + nd = nde - ne + + perp = wde.right_kernel_matrix() + mat = matrix(0, mu_mat.nrows()) + for v in we: + vmu = matrix([v * matrix(ne, row) for row in mu_mat]) + mat = mat.stack(perp * vmu.transpose()) + mat.echelonize() + r = mat.rank() + mat = mat.matrix_from_rows(range(r)) + if expected_codim and r == expected_codim: + break + + assert not expected_codim or r == expected_codim + + return mat.right_kernel_matrix() + + cpdef Matrix negate(self, Matrix wd): + """ + Theorem 4.4 (negation), first method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p = G.point(pl - b) + sage: -p # indirect doctest + Point of Jacobian determined by + [ 1 0 0 0 0 0 15 11 2] + [ 0 1 0 0 0 0 16 0 12] + [ 0 0 1 0 0 0 0 16 0] + [ 0 0 0 1 0 0 0 0 16] + [ 0 0 0 0 1 0 12 0 16] + [ 0 0 0 0 0 1 15 16 2] + """ + return self.addflip(wd, self.w0) + + cpdef Matrix add(self, Matrix wd1, Matrix wd2): + """ + Theorem 4.5 (addition). + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p = G.point(pl - b) + sage: p + p # indirect doctest + Point of Jacobian determined by + [ 1 0 0 0 0 0 0 10 0] + [ 0 1 0 0 0 0 5 1 4] + [ 0 0 1 0 0 0 15 7 12] + [ 0 0 0 1 0 0 14 8 16] + [ 0 0 0 0 1 0 3 12 16] + [ 0 0 0 0 0 1 13 5 7] + """ + return self.negate(self.addflip(wd1, wd2)) + + cpdef Matrix subtract(self, Matrix wd1, Matrix wd2): + """ + Theorem 4.6 (subtraction), first method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p = G.point(pl - b) + sage: p - p # indirect doctest + Point of Jacobian determined by + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 0 1 0] + """ + return self.addflip(self.negate(wd1), wd2) + + cpdef Matrix multiple(self, Matrix wd, n): + """ + Compute multiple by additive square-and-multiply method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p = G.point(pl - b) + sage: 10*p + Point of Jacobian determined by + [ 1 0 0 0 0 0 5 2 2] + [ 0 1 0 0 0 0 13 6 11] + [ 0 0 1 0 0 0 1 11 4] + [ 0 0 0 1 0 0 1 13 7] + [ 0 0 0 0 1 0 12 16 2] + [ 0 0 0 0 0 1 6 9 10] + sage: (-10)*p + Point of Jacobian determined by + [ 1 0 0 0 0 13 0 10 6] + [ 0 1 0 0 0 5 0 4 16] + [ 0 0 1 0 0 2 0 0 4] + [ 0 0 0 1 0 9 0 6 9] + [ 0 0 0 0 1 6 0 0 9] + [ 0 0 0 0 0 0 1 9 5] + sage: 0*p + Point of Jacobian determined by + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 0 1 0] + """ + cdef Matrix w + cdef int sign, b + cdef list bits + + if n == 0: + return self.w0 + if n < 0: + bits = Integer(-n).digits(2) + else: + bits = Integer(n).digits(2) + bits.pop() + mwd = None + w = wd + sign = 1 + for i in range(len(bits)): + w = self.addflip(w, w) + sign = -sign + b = bits.pop() + if b > 0: + if sign < 0: + if mwd is None: + mwd = self.addflip(wd, self.w0) + w = self.addflip(w, mwd) + else: + w = self.addflip(w, wd) + sign = -sign + if sign < 0 and n > 0 or sign > 0 and n < 0: + w = self.addflip(w, self.w0) # negate + return w + + cpdef Matrix zero_divisor(self): + """ + Return the matrix `w_L` representing zero divisor. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl = C([-1,2,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: G._km.zero_divisor() + [1 0 0 0 0 0 0 0 0] + [0 1 0 0 0 0 0 0 0] + [0 0 1 0 0 0 0 0 0] + [0 0 0 1 0 0 0 0 0] + [0 0 0 0 1 0 0 0 0] + [0 0 0 0 0 1 0 0 0] + [0 0 0 0 0 0 1 0 0] + [0 0 0 0 0 0 0 1 0] + [0 0 0 0 0 0 0 0 1] + """ + return self.wL + + +cdef class KhuriMakdisi_large(KhuriMakdisi_base): + r""" + Khuri-Makdisi's large model. + """ + cdef Matrix mu_mat33 + + def __init__(self, V, mu, w0, d0, g): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + Point of Jacobian determined by + [ 1 0 0 0 0 0 0 12 15] + [ 0 1 0 0 0 0 0 0 13] + [ 0 0 1 0 0 0 0 0 2] + [ 0 0 0 1 0 0 0 0 16] + [ 0 0 0 0 0 1 0 0 15] + [ 0 0 0 0 0 0 1 0 1] + sage: p2 + Point of Jacobian determined by + [ 1 0 0 0 0 0 0 12 5] + [ 0 1 0 0 0 0 0 0 2] + [ 0 0 1 0 0 0 0 0 13] + [ 0 0 0 1 0 0 0 0 8] + [ 0 0 0 0 0 1 0 0 10] + [ 0 0 0 0 0 0 1 0 14] + sage: p1 + p2 + Point of Jacobian determined by + [ 1 0 0 0 0 16 0 5 3] + [ 0 1 0 0 0 6 0 8 16] + [ 0 0 1 0 0 15 0 3 10] + [ 0 0 0 1 0 3 0 0 0] + [ 0 0 0 0 1 12 0 16 8] + [ 0 0 0 0 0 0 1 3 0] + sage: p1 - p2 + Point of Jacobian determined by + [ 1 0 0 0 0 0 13 9 5] + [ 0 1 0 0 0 0 2 5 8] + [ 0 0 1 0 0 0 6 7 5] + [ 0 0 0 1 0 0 11 3 16] + [ 0 0 0 0 1 0 9 7 10] + [ 0 0 0 0 0 1 4 10 5] + sage: p1.addflip(p2) == -(p1 + p2) + True + """ + self.wL = V(3).basis_matrix() + self.w0 = w0 + self.d0 = d0 + self.g = g + self.mu_mat33 = matrix(listcat([list(mu(3, 3, i, j)) for j in range(3*d0-g+1)]) for i in range(3*d0-g+1)) + + def equal(self, wd, we): + """ + Theorem 4.1, second method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: J = C.jacobian(model='km_large') + sage: b = C([0,1,0]).place() + sage: J.set_base_place(b) + sage: G = J.group() + sage: pl1 = C([3,2,1]).place() + sage: pl2 = C([5,5,1]).place() + sage: p1 = G(pl1) + sage: p2 = G(pl2) + sage: p1 + p2 == p2 + p1 # indirect doctest + True + sage: p1 - p2 == -(p2 - p1) + True + sage: zero = G.zero() + sage: p1 + zero == p1 + True + sage: p1 - p1 == zero + True + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix wf, w1, w2 + + wf = matrix(wd[0]) + w1 = self.mu_image(wf, we, self.mu_mat33, 2*d0 - g + 1) + w2 = self.mu_preimage(wd, w1, self.mu_mat33) + return w2.rank() > 0 + + cdef Matrix _add(self, Matrix wd, Matrix we): + """ + Theorem 3.6 (addition of divisors, first method). + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2 + + w1 = self.mu_image(wd, we, self.mu_mat33, 4*d0 - g + 1) + w2 = self.mu_preimage(self.wL, w1, self.mu_mat33, 2*d0) + return w2 + + cdef Matrix _flip(self, Matrix wd): + """ + Theorem 3.10 (flipping) + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2 + + # efficient than + # wf = matrix(wd[0]) + # w1 = self.mu_image(wf, self.wL, mu_mat, 3*d0 - g + 1) + w1 = matrix(3*d0 - g + 1, wd[0] * self.mu_mat33) + w2 = self.mu_preimage(wd, w1, self.mu_mat33, d0) + return w2 + + cpdef Matrix addflip(self, Matrix wd1, Matrix wd2): + """ + Theorem 4.3 (addflip) + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: F = C.function_field() + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1.addflip(p2) + Point of Jacobian determined by + [ 1 0 0 0 0 0 7 10 9] + [ 0 1 0 0 0 0 4 14 10] + [ 0 0 1 0 0 0 7 0 9] + [ 0 0 0 1 0 0 10 10 6] + [ 0 0 0 0 1 0 6 5 15] + [ 0 0 0 0 0 1 14 9 1] + """ + return self._flip(self._add(wd1, wd2)) + + cpdef Matrix add_divisor(self, Matrix wd1, Matrix wd2, int d1, int d2): + """ + Theorem 3.6 (addition of divisors, first method). + + We assume that `w_{D_1}`, `w_{D_2}` represent divisors of degree at most + `3d_0 - 2g - 1`. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='km_large') + sage: G = J.group() + sage: pts = G.get_points(G.order()) # indirect doctest + sage: len(pts) + 11 + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2 + + w1 = self.mu_image(wd1, wd2, self.mu_mat33, 6*d0 - d1 - d2 - g + 1) + w2 = self.mu_preimage(self.wL, w1, self.mu_mat33, d1 + d2) + return w2 + + +cdef class KhuriMakdisi_medium(KhuriMakdisi_base): + """ + Khuri-Makdisi's *medium* model + """ + cdef Matrix wV1, wV2, wV3, mu_mat22, mu_mat23, mu_mat31, mu_mat32 + + def __init__(self, V, mu, w0, d0, g): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: J = C.jacobian(model='km_medium', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + Point of Jacobian determined by + [ 1 0 0 0 16 12] + [ 0 1 0 0 15 0] + [ 0 0 1 0 1 0] + sage: p2 + Point of Jacobian determined by + [ 1 0 0 0 8 12] + [ 0 1 0 0 10 0] + [ 0 0 1 0 14 0] + sage: p1 + p2 + Point of Jacobian determined by + [ 1 0 0 6 3 16] + [ 0 1 0 15 16 10] + [ 0 0 1 3 0 0] + sage: p1 - p2 + Point of Jacobian determined by + [ 1 0 0 8 0 14] + [ 0 1 0 1 10 10] + [ 0 0 1 15 3 6] + sage: p1.addflip(p2) == -(p1 + p2) + True + """ + self.wL = V(2).basis_matrix() + self.w0 = w0 + self.d0 = d0 + self.g = g + self.wV1 = V(1).basis_matrix() + self.wV2 = V(2).basis_matrix() + self.wV3 = V(3).basis_matrix() + self.mu_mat22 = matrix(listcat([list(mu(2, 2, i, j)) for j in range(2*d0-g+1)]) for i in range(2*d0-g+1)) + self.mu_mat23 = matrix(listcat([list(mu(2, 3, i, j)) for j in range(3*d0-g+1)]) for i in range(2*d0-g+1)) + self.mu_mat31 = matrix(listcat([list(mu(3, 1, i, j)) for j in range(1*d0-g+1)]) for i in range(3*d0-g+1)) + self.mu_mat32 = matrix(listcat([list(mu(3, 2, i, j)) for j in range(2*d0-g+1)]) for i in range(3*d0-g+1)) + + def equal(self, wd, we): + """ + Theorem 4.1, second method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: J = C.jacobian(model='km_medium', base_div=h) + sage: G = J.group() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + p2 == p2 + p1 # indirect doctest + True + sage: p1 - p2 == -(p2 - p1) + True + sage: zero = G.zero() + sage: p1 + zero == p1 + True + sage: p1 - p1 == zero + True + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix wf, w1, w2 + + wf = matrix(wd[0]) + w1 = self.mu_image(wf, we, self.mu_mat22, d0 - g + 1) + w2 = self.mu_preimage(wd, w1, self.mu_mat22) + return w2.rank() > 0 + + cpdef Matrix addflip(self, Matrix wd1, Matrix wd2): + """ + Theorem 5.1 (addflip in medium model). + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: h = C.function(y/x).divisor_of_poles() + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: J = C.jacobian(model='km_medium', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: af = p1.addflip(p2) + sage: af + Point of Jacobian determined by + [ 1 0 0 6 3 16] + [ 0 1 0 0 7 9] + [ 0 0 1 14 2 3] + + We check the computation in other model:: + + sage: J = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: G.point(af.divisor()) == p1.addflip(p2) + True + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2, w3, w4 + + w1 = self.mu_image(wd1, wd2, self.mu_mat22, 2*d0 - g + 1) + w2 = self.mu_preimage(self.wV1, w1, self.mu_mat31, 2*d0) + # efficient than + # wf = matrix(w2[0]) + # w3 = self.mu_image(wf, self.wV2, self.mu_mat32, 2*d0 - g + 1) + w3 = matrix(2*d0 - g + 1, w2[0] * self.mu_mat32) + w4 = self.mu_preimage(w2, w3, self.mu_mat23, d0) + return w4 + + cpdef Matrix add_divisor(self, Matrix wd1, Matrix wd2, int d1, int d2): + """ + Theorem 3.6 (addition of divisors, first method). + + We assume that `w_{D_1}`, `w_{D_2}` represent divisors of degree at + most `4d_0 - 2g - 1`. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='km_medium') + sage: G = J.group() + sage: pts = G.get_points(G.order()) # indirect doctest + sage: len(pts) + 11 + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2 + + w1 = self.mu_image(wd1, wd2, self.mu_mat22, 4*d0 - d1 - d2 - g + 1) + w2 = self.mu_preimage(self.wL, w1, self.mu_mat22, d1 + d2) + return w2 + + +cdef class KhuriMakdisi_small(KhuriMakdisi_base): + """ + Khuri-Makdisi's *small* model + """ + cdef Matrix wV2, wV3, wV4, mu_mat22 + cdef Matrix mu_mat23, mu_mat24, mu_mat32, mu_mat33, mu_mat34, mu_mat42, mu_mat43 + + def __init__(self, V, mu, w0, d0, g): + """ + Initialize. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: J = C.jacobian(model='km_small', base_div=2*b) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + Point of Jacobian determined by + [ 1 0 0 0 0 11] + [ 0 1 0 0 2 0] + [ 0 0 1 0 16 10] + [ 0 0 0 1 0 3] + sage: p2 + Point of Jacobian determined by + [1 0 0 0 0 3] + [0 1 0 0 7 0] + [0 0 1 0 3 5] + [0 0 0 1 0 2] + sage: p1 + p2 + Point of Jacobian determined by + [ 1 0 0 0 10 9] + [ 0 1 0 0 7 5] + [ 0 0 1 0 15 4] + [ 0 0 0 1 3 10] + sage: p1 - p2 + Point of Jacobian determined by + [ 1 0 0 0 10 9] + [ 0 1 0 0 9 8] + [ 0 0 1 0 15 4] + [ 0 0 0 1 15 11] + sage: p1.addflip(p2) == -(p1 + p2) + True + """ + self.wL = V(3).basis_matrix() + self.w0 = w0 + self.d0 = d0 + self.g = g + self.wV2 = V(2).basis_matrix() + self.wV3 = V(3).basis_matrix() + self.wV4 = V(4).basis_matrix() + self.mu_mat23 = matrix(listcat([list(mu(2, 3, i, j)) for j in range(3*d0-g+1)]) for i in range(2*d0-g+1)) + self.mu_mat24 = matrix(listcat([list(mu(2, 4, i, j)) for j in range(4*d0-g+1)]) for i in range(2*d0-g+1)) + self.mu_mat32 = matrix(listcat([list(mu(3, 2, i, j)) for j in range(2*d0-g+1)]) for i in range(3*d0-g+1)) + self.mu_mat33 = matrix(listcat([list(mu(3, 3, i, j)) for j in range(3*d0-g+1)]) for i in range(3*d0-g+1)) + self.mu_mat34 = matrix(listcat([list(mu(3, 4, i, j)) for j in range(4*d0-g+1)]) for i in range(3*d0-g+1)) + self.mu_mat42 = matrix(listcat([list(mu(4, 2, i, j)) for j in range(2*d0-g+1)]) for i in range(4*d0-g+1)) + self.mu_mat43 = matrix(listcat([list(mu(4, 3, i, j)) for j in range(3*d0-g+1)]) for i in range(4*d0-g+1)) + + def equal(self, wd, we): + """ + Theorem 4.1, second method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: J = C.jacobian(model='km_small', base_div=2*b) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: p1 + p2 == p2 + p1 # indirect doctest + True + sage: p1 - p2 == -(p2 - p1) + True + sage: zero = G.zero() + sage: p1 + zero == p1 + True + sage: p1 - p1 == zero + True + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix wf, w1, w2 + + wf = matrix(wd[0]) + w1 = self.mu_image(wf, we, self.mu_mat33, 2*d0 - g + 1) + w2 = self.mu_preimage(wd, w1, self.mu_mat33) + return w2.rank() > 0 + + cpdef Matrix addflip(self, Matrix wd1, Matrix wd2): + """ + Theorem 5.3 (addflip in small model), second method. + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(17), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: pl1 = C([-1,2,1]).place() + sage: pl2 = C([3,7,1]).place() + sage: J = C.jacobian(model='km_small', base_div=2*b) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: af = p1.addflip(p2) + sage: af + Point of Jacobian determined by + [ 1 0 0 0 10 9] + [ 0 1 0 0 10 12] + [ 0 0 1 0 15 4] + [ 0 0 0 1 14 7] + + We check the computation in other model:: + + sage: h = C.function(y/x).divisor_of_poles() + sage: Jl = C.jacobian(model='km_large', base_div=h) + sage: G = J.group() + sage: q1 = G.point(pl1 - b) + sage: q2 = G.point(pl2 - b) + sage: G.point(af.divisor()) == q1.addflip(p2) + True + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2, w3, w4, w5 + + w1 = self.mu_image(wd1, wd2, self.mu_mat33, 4*d0 - g + 1) + w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33, 2*d0) + w3 = self.mu_preimage(self.wV2, w1, self.mu_mat42, 2*d0) + # efficient than + # wf = matrix(w2[0]) + # w4 = self.mu_image(wf, self.wV4, self.mu_mat34, 4*d0 - g + 1) + w4 = matrix(4*d0 - g + 1, w2[0] * self.mu_mat34) + w5 = self.mu_preimage(w3, w4, self.mu_mat34, d0) + return w5 + + cpdef Matrix negate(self, Matrix wd): + """ + Theorem 5.4 (negation in small model). + + TESTS:: + + sage: P2. = ProjectiveSpace(GF(7), 2) + sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2) + sage: b = C([0,1,0]).place() + sage: pl1 = C([3,2,1]).place() + sage: pl2 = C([5,5,1]).place() + sage: J = C.jacobian(model='km_small', base_div=2*b) + sage: G = J.group() + sage: p1 = G.point(pl1 - b) + sage: p2 = G.point(pl2 - b) + sage: -(-p1) == p1 # indirect doctest + True + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2, w3, w4 + + w1 = self.mu_image(self.wV2, wd, self.mu_mat23, 4*d0 - g + 1) + w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23, d0) + # efficient than + # wf = matrix(w2[0]) + # w3 = self.mu_image(wf, self.wV4, self.mu_mat24, 4*d0 - g + 1) + w3 = matrix(4*d0 - g + 1, w2[0] * self.mu_mat24) + w4 = self.mu_preimage(wd, w3, self.mu_mat33, d0) + return w4 + + cpdef Matrix add_divisor(self, Matrix wd1, Matrix wd2, int d1, int d2): + """ + Theorem 3.6 (addition of divisors, first method). + + We assume that `w_{D_1}`, `w_{D_2}` represent divisors of degree at most + `6d_0 - 2g - 1`. + + TESTS:: + + sage: k = GF(7) + sage: A. = AffineSpace(k,2) + sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure() + sage: J = C.jacobian(model='km_small') + sage: G = J.group() + sage: pts = G.get_points(G.order()) # indirect doctest + sage: len(pts) + 11 + """ + cdef int d0 = self.d0 + cdef int g = self.g + cdef Matrix w1, w2 + + w1 = self.mu_image(wd1, wd2, self.mu_mat33, 6*d0 - d1 - d2 - g + 1) + w2 = self.mu_preimage(self.wL, w1, self.mu_mat33, d1 + d2) + return w2 diff --git a/src/sage/schemes/curves/projective_curve.py b/src/sage/schemes/curves/projective_curve.py index 2c95365167b..00b0f0fb810 100644 --- a/src/sage/schemes/curves/projective_curve.py +++ b/src/sage/schemes/curves/projective_curve.py @@ -2725,6 +2725,46 @@ def places_on(self, point): places.append(p) return places + def jacobian(self, model, base_div=None): + """ + Return the Jacobian of this curve. + + INPUT: + + - ``model`` -- model to use for arithmetic + + - ``base_div`` -- an effective divisor for the model + + The degree of the base divisor should satisfy certain degree condition + corresponding to the model used. The following table lists these + conditions. Let `g` be the geometric genus of the curve. + + - ``hess``: ideal-based arithmetic; requires base divisor of degree `g` + + - ``km_large``: Khuri-Makdisi's large model; requires base divisor of + degree at least `2g + 1` + + - ``km_medium``: Khuri-Makdisi's medium model; requires base divisor of + degree at least `2g + 1` + + - ``km_small``: Khuri-Makdisi's small model requires base divisor of + degree at least `g + 1` + + We assume the curve (or its function field) has a rational place. If a + base divisor is not given, one is chosen using a rational place. + + EXAMPLES:: + + sage: A. = AffineSpace(GF(5), 2) + sage: C = Curve(y^2*(x^3 - 1) - (x^3 - 2)).projective_closure() + sage: J = C.jacobian(model='hess'); J + Jacobian of Projective Plane Curve over Finite Field of size 5 defined by + 2*x0^5 - x0^2*x1^3 - x0^3*x2^2 + x1^3*x2^2 (Hess model) + sage: J.base_divisor().degree() == C.genus() + True + """ + return self.function_field().jacobian(model, base_div, curve=self) + class IntegralProjectiveCurve_finite_field(IntegralProjectiveCurve): """ diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py index 64a4d8cdc0d..1049da8f782 100644 --- a/src/sage/schemes/elliptic_curves/ell_point.py +++ b/src/sage/schemes/elliptic_curves/ell_point.py @@ -2338,6 +2338,62 @@ def ate_pairing(self, Q, n, k, t, q=None): ret = ret**e return ret + def point_of_jacobian_of_projective_curve(self): + r""" + Return the point in the Jacobian of the curve. + + The Jacobian is the one attached to the projective curve associated + with this elliptic curve. + + EXAMPLES:: + + sage: # needs sage.rings.finite_rings + sage: k. = GF((5,2)) + sage: E = EllipticCurve(k,[1,0]); E + Elliptic Curve defined by y^2 = x^3 + x over Finite Field in a of size 5^2 + sage: E.order() + 32 + sage: P = E([a, 2*a + 4]) + sage: P + (a : 2*a + 4 : 1) + sage: P.order() + 8 + sage: p = P.point_of_jacobian_of_projective_curve() + sage: p + [Place (x + 4*a, y + 3*a + 1)] + sage: p.order() + 8 + sage: Q = 3*P + sage: q = Q.point_of_jacobian_of_projective_curve() + sage: q == 3*p + True + sage: G = p.parent() + sage: G.order() + 32 + sage: G + Group of rational points of Jacobian over Finite Field in a of size 5^2 (Hess model) + sage: J = G.parent(); J + Jacobian of Projective Plane Curve over Finite Field in a of size 5^2 + defined by x^2*y + y^3 - x*z^2 (Hess model) + sage: J.curve() == E.affine_patch(2).projective_closure() + True + """ + from sage.schemes.curves.constructor import Curve + C = self.curve() + A = C.ambient_space() # projective plane + x, y, z = self + + X = Curve(C.defining_ideal().gens(), A) + X = X.affine_patch(2).projective_closure() + F = X.function_field() + P = X(z,x,y).place() + + Pinf = F.places_infinite()[0] + assert Pinf.degree() == 1, "no rational point at infinity" + + J = X.jacobian(model='hess', base_div=F.genus()*Pinf) + G = J.group(self.base_ring()) + return G(P - P.degree()*Pinf) class EllipticCurvePoint_number_field(EllipticCurvePoint_field): """ diff --git a/src/sage/schemes/elliptic_curves/jacobian.py b/src/sage/schemes/elliptic_curves/jacobian.py index 16bdf2d11b4..9086d4e47ed 100644 --- a/src/sage/schemes/elliptic_curves/jacobian.py +++ b/src/sage/schemes/elliptic_curves/jacobian.py @@ -100,7 +100,7 @@ def Jacobian(X, **kwds): """ try: return X.jacobian(**kwds) - except AttributeError: + except (AttributeError, TypeError): pass morphism = kwds.pop('morphism', False) diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py b/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py index daab2d2259e..298808e0c89 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py @@ -490,33 +490,103 @@ def scheme(self): r""" Return the scheme this morphism maps to; or, where this divisor lives. - .. warning:: + .. WARNING:: - Although a pointset is defined over a specific field, the - scheme returned may be over a different (usually smaller) - field. The example below demonstrates this: the pointset - is determined over a number field of absolute degree 2 but - the scheme returned is defined over the rationals. + Although a pointset is defined over a specific field, the + scheme returned may be over a different (usually smaller) + field. The example below demonstrates this: the pointset + is determined over a number field of absolute degree 2 but + the scheme returned is defined over the rationals. EXAMPLES:: + sage: # needs sage.rings.number_field sage: x = QQ['x'].gen() sage: f = x^5 + x sage: H = HyperellipticCurve(f) - sage: F. = NumberField(x^2 - 2, 'a') # needs sage.rings.number_field - sage: J = H.jacobian()(F); J # needs sage.rings.number_field + sage: F. = NumberField(x^2 - 2, 'a') + sage: J = H.jacobian()(F); J Set of rational points of Jacobian of Hyperelliptic Curve over Number Field in a with defining polynomial x^2 - 2 defined by y^2 = x^5 + x - - :: - - sage: P = J(H.lift_x(F(1))) # needs sage.rings.number_field - sage: P.scheme() # needs sage.rings.number_field + sage: P = J(H.lift_x(F(1))) + sage: P.scheme() Jacobian of Hyperelliptic Curve over Rational Field defined by y^2 = x^5 + x """ return self.codomain() + def point_of_jacobian_of_projective_curve(self): + r""" + Return the point in the Jacobian of the curve. + + The Jacobian is the one attached to the projective curve + corresponding to this hyperelliptic curve. + + EXAMPLES:: + + sage: R. = PolynomialRing(GF(11)) + sage: f = x^6 + x + 1 + sage: H = HyperellipticCurve(f) + sage: J = H.jacobian() + sage: D = J(H.lift_x(1)) + sage: D # divisor in Mumford representation + (x + 10, y + 6) + sage: jacobian_order = sum(H.frobenius_polynomial()) + sage: jacobian_order + 234 + sage: p = D.point_of_jacobian_of_projective_curve(); p + [Place (1/x0, 1/x0^3*x1 + 1) + + Place (x0 + 10, x1 + 6)] + sage: p # Jacobian point represented by an effective divisor + [Place (1/x0, 1/x0^3*x1 + 1) + + Place (x0 + 10, x1 + 6)] + sage: p.order() + 39 + sage: 234*p == 0 + True + sage: G = p.parent() + sage: G + Group of rational points of Jacobian over Finite Field of size 11 (Hess model) + sage: J = G.parent() + sage: J + Jacobian of Projective Plane Curve over Finite Field of size 11 + defined by x0^6 + x0^5*x1 + x1^6 - x0^4*x2^2 (Hess model) + sage: C = J.curve() + sage: C + Projective Plane Curve over Finite Field of size 11 + defined by x0^6 + x0^5*x1 + x1^6 - x0^4*x2^2 + sage: C.affine_patch(0) == H.affine_patch(2) + True + """ + from sage.schemes.curves.constructor import Curve + C = self.parent().curve() + P = C.ambient_space() # projective plane + x0, x1, x2 = P.gens() + + # X is the curve positioned in the ambient space + # such that x1 = x and x2 = y + X = Curve(C.defining_ideal().gens(), P) + X = X.affine_patch(2).projective_closure() + + u0, v0 = list(self) + u1 = u0.subs(x1).homogenize(x0) + v1 = (x2 - v0.subs(x1)).homogenize(x0) + u2 = u1/x0**u1.degree() + v2 = v1/x0**v1.degree() + u = X.function(u2) + v = X.function(v2) + + F = X.function_field() + O = F.maximal_order() + D = O.ideal([u,v]).divisor() + + Pinf = F.places_infinite()[0] + assert Pinf.degree() == 1, "no rational point at infinity" + + J = X.jacobian(model='hess', base_div=F.genus()*Pinf) + G = J.group(self.base_ring()) + return G(D - D.degree()*Pinf) + def __list__(self): r""" Return a list `(a(x), b(x))` of the polynomials giving the diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index d5e7c831515..fce6bdfc867 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -9,40 +9,23 @@ - William Stein (2005) """ -#***************************************************************************** + +# **************************************************************************** # Copyright (C) 2005 William Stein # -# Distributed under the terms of the GNU General Public License (GPL) -# as published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +from sage.categories.schemes import Jacobians from sage.categories.fields import Fields -_Fields = Fields() from sage.schemes.generic.scheme import Scheme, is_Scheme from sage.structure.richcmp import richcmp_method, richcmp - -def is_Jacobian(J): - """ - Return True if `J` is of type Jacobian_generic. - - EXAMPLES:: - - sage: from sage.schemes.jacobians.abstract_jacobian import Jacobian, is_Jacobian - sage: P2. = ProjectiveSpace(QQ, 2) - sage: C = Curve(x^3 + y^3 + z^3) - sage: J = Jacobian(C) - sage: is_Jacobian(J) - True - - :: - - sage: E = EllipticCurve('37a1') - sage: is_Jacobian(E) - False - """ - return isinstance(J, Jacobian_generic) +_Fields = Fields() def Jacobian(C): @@ -57,7 +40,7 @@ def Jacobian(C): """ try: return C.jacobian() - except AttributeError: + except (AttributeError, TypeError): return Jacobian_generic(C) @@ -76,7 +59,7 @@ class Jacobian_generic(Scheme): sage: J = Jacobian(C); J Jacobian of Projective Plane Curve over Rational Field defined by x^3 + y^3 + z^3 """ - def __init__(self, C): + def __init__(self, C, category=None): """ Initialize. @@ -92,12 +75,14 @@ def __init__(self, C): Note: this is an abstract parent, so we skip element tests:: - sage: TestSuite(J).run(skip =["_test_an_element",\ - "_test_elements",\ - "_test_elements_eq_reflexive",\ - "_test_elements_eq_symmetric",\ - "_test_elements_eq_transitive",\ - "_test_elements_neq",\ + sage: TestSuite(J).run(skip =["_test_an_element", \ + "_test_zero", \ + "_test_elements", \ + "_test_elements_eq_reflexive", \ + "_test_elements_eq_symmetric", \ + "_test_elements_eq_transitive", \ + "_test_additive_associativity", \ + "_test_elements_neq", \ "_test_some_elements"]) :: @@ -129,7 +114,7 @@ def __init__(self, C): if C.dimension() != 1: raise ValueError("C (=%s) must have dimension 1." % C) self.__curve = C - Scheme.__init__(self, C.base_scheme()) + Scheme.__init__(self, C.base_scheme(), category=Jacobians(C.base_ring()).or_subcategory(category)) def __richcmp__(self, J, op): """ @@ -153,7 +138,7 @@ def __richcmp__(self, J, op): sage: J1 != J2 True """ - if not is_Jacobian(J): + if not isinstance(J, Jacobian_generic): return NotImplemented return richcmp(self.curve(), J.curve(), op) @@ -247,8 +232,10 @@ def base_extend(self, R): sage: Jac = H.jacobian(); Jac Jacobian of Hyperelliptic Curve over Rational Field defined by y^2 = x^3 - 10*x + 9 - sage: F. = QQ.extension(x^2 + 1) # needs sage.rings.number_field - sage: Jac.base_extend(F) # needs sage.rings.number_field + + sage: # needs sage.rings.number_field + sage: F. = QQ.extension(x^2 + 1) + sage: Jac.base_extend(F) Jacobian of Hyperelliptic Curve over Number Field in a with defining polynomial x^2 + 1 defined by y^2 = x^3 - 10*x + 9 """ From 872061b10b256edc72940cd8d10b8446b6869771 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Apr 2024 14:58:05 +0900 Subject: [PATCH 137/183] Do right things to define Jacobians category --- src/sage/categories/schemes.py | 22 +++++++++++++++++-- .../rings/function_field/jacobian_base.py | 20 ++++++++++++----- .../schemes/jacobians/abstract_jacobian.py | 2 ++ 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index f2d0170fd2d..1de64a573cf 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -23,6 +23,7 @@ from sage.categories.rings import Rings from sage.categories.fields import Fields from sage.categories.homsets import HomsetsCategory +from sage.misc.abstract_method import abstract_method class Schemes(Category): @@ -299,7 +300,7 @@ def extra_super_categories(self): return [Rings()] -class Jacobians(AbelianVarieties): +class Jacobians(Schemes_over_base): """ The category of Jacobians attached to curves or function fields. """ @@ -317,7 +318,24 @@ def _repr_object_names(self): EXAMPLES:: sage: Jacobians(Spec(QQ)) # indirect doctest - Category of Jacobians over Rational Field + Category of Jacobians over Spectrum of Rational Field """ return "Jacobians over %s" % self.base_scheme() + class ParentMethods: + + @abstract_method + def base_curve(self): + """ + Return the curve to which this Jacobian is attached. + + EXAMPLES:: + + sage: # needs sage.rings.function_field + sage: K. = FunctionField(GF(2)) + sage: J = K.jacobian() + sage: J.base_curve() + Rational function field in x over Finite Field of size 2 + """ + + diff --git a/src/sage/rings/function_field/jacobian_base.py b/src/sage/rings/function_field/jacobian_base.py index 0fa7ba14c82..0f58eb5817f 100644 --- a/src/sage/rings/function_field/jacobian_base.py +++ b/src/sage/rings/function_field/jacobian_base.py @@ -616,11 +616,7 @@ def _repr_(self): sage: F.jacobian() Jacobian of Function field in y defined by y^2 + y + (x^2 + 1)/x (Hess model) """ - if self._curve is not None: - F = self._curve - else: - F = self._function_field - return f'Jacobian of {F}' + return f'Jacobian of {self.base_curve()}' def _an_element_(self): """ @@ -690,6 +686,20 @@ def curve(self): """ return self._curve + def base_curve(self): + """ + Return the base curve or the function field that abstractly defines a curve. + + EXAMPLES:: + + sage: K. = FunctionField(GF(2)); _. = K[] + sage: F. = K.extension(Y^2 + Y + x + 1/x) + sage: J = F.jacobian() + sage: J.base_curve() + Function field in y defined by y^2 + y + (x^2 + 1)/x + """ + return self._function_field if self._curve is None else self._curve + def facade_for(self): """ Return the system of groups that this Jacobian is a facade for. diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index fce6bdfc867..a1b27708080 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -192,6 +192,8 @@ def curve(self): """ return self.__curve + base_curve = curve + def change_ring(self, R): r""" Return the Jacobian over the ring `R`. From 849c5f259e84be7f05c0cbed644f09882ad40862 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Apr 2024 15:06:26 +0900 Subject: [PATCH 138/183] Add tests --- src/sage/categories/schemes.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 1de64a573cf..3f50a729da8 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -303,6 +303,15 @@ def extra_super_categories(self): class Jacobians(Schemes_over_base): """ The category of Jacobians attached to curves or function fields. + + EXAMPLES:: + + sage: Jacobians(QQ) + Category of Jacobians over Rational Field + + TESTS:: + + sage: TestSuite(Jacobians(QQ)).run() """ def super_categories(self): """ @@ -337,5 +346,3 @@ def base_curve(self): sage: J.base_curve() Rational function field in x over Finite Field of size 2 """ - - From 8d76f0caed565945acef2428b6a8bb2e56350fac Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Apr 2024 15:37:33 +0900 Subject: [PATCH 139/183] Fix formatting errors --- src/sage/categories/schemes.py | 10 +++++----- src/sage/schemes/curves/projective_curve.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 3f50a729da8..626c537551c 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -340,9 +340,9 @@ def base_curve(self): EXAMPLES:: - sage: # needs sage.rings.function_field - sage: K. = FunctionField(GF(2)) - sage: J = K.jacobian() - sage: J.base_curve() - Rational function field in x over Finite Field of size 2 + sage: # needs sage.rings.function_field + sage: K. = FunctionField(GF(2)) + sage: J = K.jacobian() + sage: J.base_curve() + Rational function field in x over Finite Field of size 2 """ diff --git a/src/sage/schemes/curves/projective_curve.py b/src/sage/schemes/curves/projective_curve.py index 00b0f0fb810..d8d2d4c8e67 100644 --- a/src/sage/schemes/curves/projective_curve.py +++ b/src/sage/schemes/curves/projective_curve.py @@ -2758,8 +2758,8 @@ def jacobian(self, model, base_div=None): sage: A. = AffineSpace(GF(5), 2) sage: C = Curve(y^2*(x^3 - 1) - (x^3 - 2)).projective_closure() sage: J = C.jacobian(model='hess'); J - Jacobian of Projective Plane Curve over Finite Field of size 5 defined by - 2*x0^5 - x0^2*x1^3 - x0^3*x2^2 + x1^3*x2^2 (Hess model) + Jacobian of Projective Plane Curve over Finite Field of size 5 + defined by 2*x0^5 - x0^2*x1^3 - x0^3*x2^2 + x1^3*x2^2 (Hess model) sage: J.base_divisor().degree() == C.genus() True """ From 9b5ef791a817dbf78b49a609d60a24a64845123f Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Apr 2024 17:01:52 +0900 Subject: [PATCH 140/183] Improve Schemes categories --- src/sage/categories/schemes.py | 68 ++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 12 deletions(-) diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 626c537551c..0c64079ff20 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -61,7 +61,6 @@ class Schemes(Category): sage: Schemes().Homsets().super_categories() [Category of homsets] """ - @staticmethod def __classcall_private__(cls, X=None): """ @@ -79,8 +78,7 @@ def __classcall_private__(cls, X=None): Category of schemes over Integer Ring """ if X is not None: - from sage.schemes.generic.scheme import is_Scheme - if not is_Scheme(X): + if X not in Schemes(): X = Schemes()(X) return Schemes_over_base(X) return super().__classcall__(cls) @@ -175,7 +173,6 @@ class Schemes_over_base(Category_over_base): sage: C = Schemes(ZZ) sage: TestSuite(C).run() """ - def base_scheme(self): """ EXAMPLES:: @@ -201,12 +198,11 @@ def _repr_object_names(self): sage: Schemes(Spec(ZZ)) # indirect doctest Category of schemes over Integer Ring """ - # To work around the name of the class (schemes_over_base) from sage.schemes.generic.scheme import is_AffineScheme - if is_AffineScheme(self.base_scheme()): - return "schemes over %s" % self.base_scheme().coordinate_ring() - else: - return "schemes over %s" % self.base_scheme() + base = self.base() + if is_AffineScheme(base): + base = base.coordinate_ring() + return f"schemes over {base}" class AbelianVarieties(Schemes_over_base): @@ -240,6 +236,18 @@ def __init__(self, base): raise ValueError('category of abelian varieties is only defined over fields') super().__init__(base) + def base_scheme(self): + """ + EXAMPLES:: + + sage: Schemes(Spec(ZZ)).base_scheme() + Spectrum of Integer Ring + """ + base = self.base() + if base not in Schemes(): + base = Schemes()(base) + return base + def super_categories(self): """ EXAMPLES:: @@ -257,7 +265,7 @@ def _repr_object_names(self): sage: AbelianVarieties(Spec(QQ)) # indirect doctest Category of abelian varieties over Rational Field """ - return "abelian varieties over %s" % self.base_scheme() + return "abelian varieties over %s" % self.base() class Homsets(HomsetsCategory): r""" @@ -313,8 +321,42 @@ class Jacobians(Schemes_over_base): sage: TestSuite(Jacobians(QQ)).run() """ + def __init__(self, base): + r""" + Constructor of this category. + + EXAMPLES:: + + sage: Jacobians(QQ) + Category of Jacobians over Rational Field + sage: Jacobians(Spec(QQ)) + Category of Jacobians over Rational Field + """ + from sage.schemes.generic.scheme import is_AffineScheme + if is_AffineScheme(base): + base = base.coordinate_ring() + if base not in Fields(): + raise ValueError('category of Jacobians is only defined over fields') + super().__init__(base) + + def base_scheme(self): + """ + Return the base scheme of this Jacobians category. + + EXAMPLES:: + + sage: Jacobians(QQ).base_scheme() + Spectrum of Rational Field + """ + base = self.base() + if base not in Schemes(): + base = Schemes()(base) + return base + def super_categories(self): """ + Return the super categories of this Jacobians category. + EXAMPLES:: sage: Jacobians(QQ).super_categories() @@ -324,12 +366,14 @@ def super_categories(self): def _repr_object_names(self): """ + Return the string representation of this category. + EXAMPLES:: sage: Jacobians(Spec(QQ)) # indirect doctest - Category of Jacobians over Spectrum of Rational Field + Category of Jacobians over Rational Field """ - return "Jacobians over %s" % self.base_scheme() + return "Jacobians over %s" % self.base() class ParentMethods: From 1de79032ea2ab141690e26bcdf1dfe6149362ceb Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 2 Apr 2024 18:36:07 +0900 Subject: [PATCH 141/183] Remove projective from point_of_jacobian_of_projective_curve method --- src/sage/schemes/elliptic_curves/ell_point.py | 6 +++--- src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py index 1049da8f782..5d83ca27d6d 100644 --- a/src/sage/schemes/elliptic_curves/ell_point.py +++ b/src/sage/schemes/elliptic_curves/ell_point.py @@ -2338,7 +2338,7 @@ def ate_pairing(self, Q, n, k, t, q=None): ret = ret**e return ret - def point_of_jacobian_of_projective_curve(self): + def point_of_jacobian_of_curve(self): r""" Return the point in the Jacobian of the curve. @@ -2358,13 +2358,13 @@ def point_of_jacobian_of_projective_curve(self): (a : 2*a + 4 : 1) sage: P.order() 8 - sage: p = P.point_of_jacobian_of_projective_curve() + sage: p = P.point_of_jacobian_of_curve() sage: p [Place (x + 4*a, y + 3*a + 1)] sage: p.order() 8 sage: Q = 3*P - sage: q = Q.point_of_jacobian_of_projective_curve() + sage: q = Q.point_of_jacobian_of_curve() sage: q == 3*p True sage: G = p.parent() diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py b/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py index 298808e0c89..c9c580209c0 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_morphism.py @@ -515,7 +515,7 @@ def scheme(self): """ return self.codomain() - def point_of_jacobian_of_projective_curve(self): + def point_of_jacobian_of_curve(self): r""" Return the point in the Jacobian of the curve. @@ -534,7 +534,7 @@ def point_of_jacobian_of_projective_curve(self): sage: jacobian_order = sum(H.frobenius_polynomial()) sage: jacobian_order 234 - sage: p = D.point_of_jacobian_of_projective_curve(); p + sage: p = D.point_of_jacobian_of_curve(); p [Place (1/x0, 1/x0^3*x1 + 1) + Place (x0 + 10, x1 + 6)] sage: p # Jacobian point represented by an effective divisor From 2f42cd94b9aaeed59774c9645648b7536c9ac053 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Apr 2024 08:47:00 +0900 Subject: [PATCH 142/183] Fix copyright year --- src/sage/categories/schemes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/schemes.py b/src/sage/categories/schemes.py index 0c64079ff20..cb1db7f8f3b 100644 --- a/src/sage/categories/schemes.py +++ b/src/sage/categories/schemes.py @@ -4,7 +4,7 @@ """ # **************************************************************************** -# Copyright (C) 2013 David Kohel +# Copyright (C) 2005 David Kohel # William Stein # 2008-2012 Nicolas M. Thiery # From 900fddcc2c5cb17263f3bf64a920c412205f0857 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Apr 2024 11:04:17 +0900 Subject: [PATCH 143/183] Deprecate is_Jacobian before removing --- .../schemes/jacobians/abstract_jacobian.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index a1b27708080..7f792df2835 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -28,6 +28,30 @@ _Fields = Fields() +def is_Jacobian(J): + """ + Return True if `J` is of type Jacobian_generic. + + EXAMPLES:: + + sage: from sage.schemes.jacobians.abstract_jacobian import Jacobian, is_Jacobian + sage: P2. = ProjectiveSpace(QQ, 2) + sage: C = Curve(x^3 + y^3 + z^3) + sage: J = Jacobian(C) + sage: is_Jacobian(J) + True + + :: + + sage: E = EllipticCurve('37a1') + sage: is_Jacobian(E) + False + """ + from sage.misc.superseded import deprecation + deprecation(35467, "Use Jacobian_generic directly") + return isinstance(J, Jacobian_generic) + + def Jacobian(C): """ EXAMPLES:: From d662b2094e040dba9d538774cad6de8fb510717a Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 3 Apr 2024 14:48:39 +0900 Subject: [PATCH 144/183] Fix deprecation warning in doctest --- src/sage/schemes/jacobians/abstract_jacobian.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sage/schemes/jacobians/abstract_jacobian.py b/src/sage/schemes/jacobians/abstract_jacobian.py index 7f792df2835..1a86025697e 100644 --- a/src/sage/schemes/jacobians/abstract_jacobian.py +++ b/src/sage/schemes/jacobians/abstract_jacobian.py @@ -39,6 +39,9 @@ def is_Jacobian(J): sage: C = Curve(x^3 + y^3 + z^3) sage: J = Jacobian(C) sage: is_Jacobian(J) + ... + DeprecationWarning: Use Jacobian_generic directly + See https://github.com/sagemath/sage/issues/35467 for details. True :: From 5f74854c259bcd7fb41000014d05386ee6157b3e Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 22 Jan 2024 13:25:44 +0000 Subject: [PATCH 145/183] Make sage-conf optional As noted in #37024 and in #36489, `sage-conf` is actually not needed on a few systems now. For this reason, we make the installation of it optional (as there are no optional install requires as far as I know, this means we remove it from `pyproject.toml` and `setup.cfg`). We also remove it from "install all dependencies via conda" as its not needed there. --- .devcontainer/onCreate-conda.sh | 3 +-- .github/workflows/ci-conda.yml | 8 ++------ .gitpod.yml | 3 +-- pkgs/sage-conf/README.rst | 2 +- src/doc/en/installation/conda.rst | 8 +++++++- src/pyproject.toml.m4 | 1 - src/setup.cfg.m4 | 1 - 7 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.devcontainer/onCreate-conda.sh b/.devcontainer/onCreate-conda.sh index 94b3abe9ff8..f0251185c62 100755 --- a/.devcontainer/onCreate-conda.sh +++ b/.devcontainer/onCreate-conda.sh @@ -8,6 +8,5 @@ conda init bash # Build sage conda run -n sage-dev ./bootstrap -conda run -n sage-dev ./configure --with-python=/opt/conda/envs/sage-dev/bin/python --prefix=/opt/conda/envs/sage-dev -conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup +conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-setup conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index a0f3c021643..b01b041a975 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -77,21 +77,17 @@ jobs: conda info conda list - - name: Configure + - name: Bootstrap shell: bash -l {0} continue-on-error: true run: | ./bootstrap - echo "::add-matcher::.github/workflows/configure-systempackage-problem-matcher.json" - ./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX --enable-system-site-packages $(for pkg in $(./sage -package list :standard: --has-file spkg-configure.m4 --has-file distros/conda.txt --exclude rpy2); do echo --with-system-$pkg=force; done) - echo "::remove-matcher owner=configure-system-package-warning::" - echo "::remove-matcher owner=configure-system-package-error::" - name: Build shell: bash -l {0} run: | # Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda. - pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup + pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-setup pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src env: SAGE_NUM_THREADS: 2 diff --git a/.gitpod.yml b/.gitpod.yml index 223e750bd63..a91131f4e7a 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -11,8 +11,7 @@ tasks: && conda config --append envs_dirs $(pwd) && conda activate $(pwd)/venv && ./bootstrap - && ./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX - && pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup + && pip install --no-build-isolation -v -v -e ./pkgs/sage-setup && pip install --no-build-isolation -v -v -e ./src # Activate conda environment, set up Trac remote # RestructuredText extension recommends python extension, although we have already installed it diff --git a/pkgs/sage-conf/README.rst b/pkgs/sage-conf/README.rst index 590e5ba1356..e86c483c089 100644 --- a/pkgs/sage-conf/README.rst +++ b/pkgs/sage-conf/README.rst @@ -87,7 +87,7 @@ sage_conf for conda The version of the distribution package in the directory `pkgs/sage-conf_conda `_ -is used in an experimental installation method of SageMath, where all packages +may be used in an installation method of SageMath, where all packages are provided by conda. This method is described in https://doc.sagemath.org/html/en/installation/conda.html#using-conda-to-provide-all-dependencies-for-the-sage-library-experimental diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 8e514f3a529..2191374cea2 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -138,9 +138,15 @@ Here we assume that you are using a git checkout. - Bootstrap the source tree and install the build prerequisites and the Sage library:: $ ./bootstrap - $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf_conda ./pkgs/sage-setup + $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-setup $ pip install --no-build-isolation --config-settings editable_mode=compat -v -v --editable ./src + If you encounter any errors, try to install the ``sage-conf`` package first:: + + $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-conf_conda + + and then run the last command again. + - Verify that Sage has been installed:: $ sage -c 'print(version())' diff --git a/src/pyproject.toml.m4 b/src/pyproject.toml.m4 index 7065ba1468c..084c5a45ead 100644 --- a/src/pyproject.toml.m4 +++ b/src/pyproject.toml.m4 @@ -6,7 +6,6 @@ requires = [ # Note that PEP517/518 have no notion of optional sage_spkg dependencies: # https://github.com/pypa/pip/issues/6144 esyscmd(`sage-get-system-packages install-requires-toml \ - sage_conf \ setuptools \ wheel \ sage_setup \ diff --git a/src/setup.cfg.m4 b/src/setup.cfg.m4 index e2a3330518d..c06001fd105 100644 --- a/src/setup.cfg.m4 +++ b/src/setup.cfg.m4 @@ -11,7 +11,6 @@ include(`setup_cfg_metadata.m4')dnl' [options] python_requires = >=3.9, <3.13 install_requires = - SPKG_INSTALL_REQUIRES_sage_conf SPKG_INSTALL_REQUIRES_six dnl From build/pkgs/sagelib/dependencies SPKG_INSTALL_REQUIRES_conway_polynomials From 5bcb9d47707ad9a373ba052fffe0b1c2af0302e2 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 11 Apr 2024 11:48:01 +0800 Subject: [PATCH 146/183] Remove outdated comment --- src/pyproject.toml.m4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pyproject.toml.m4 b/src/pyproject.toml.m4 index 084c5a45ead..7406c7ff359 100644 --- a/src/pyproject.toml.m4 +++ b/src/pyproject.toml.m4 @@ -2,9 +2,6 @@ # Minimum requirements for the build system to execute. requires = [ "sage_setup[autogen]", - # Some version of sage-conf is required. - # Note that PEP517/518 have no notion of optional sage_spkg dependencies: - # https://github.com/pypa/pip/issues/6144 esyscmd(`sage-get-system-packages install-requires-toml \ setuptools \ wheel \ From 0e7520c71adcb3ffcfdc36202dc3eab1b8467e50 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 11 Feb 2024 13:56:47 -0800 Subject: [PATCH 147/183] build/pkgs/python_build: Change to a normal standard package --- build/pkgs/python_build/checksums.ini | 5 +++++ .../python_build/{requirements.txt => install-requires.txt} | 0 build/pkgs/python_build/package-version.txt | 1 + build/pkgs/python_build/type | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/python_build/checksums.ini rename build/pkgs/python_build/{requirements.txt => install-requires.txt} (100%) create mode 100644 build/pkgs/python_build/package-version.txt diff --git a/build/pkgs/python_build/checksums.ini b/build/pkgs/python_build/checksums.ini new file mode 100644 index 00000000000..1316cf9cbe9 --- /dev/null +++ b/build/pkgs/python_build/checksums.ini @@ -0,0 +1,5 @@ +tarball=build-VERSION-py3-none-any.whl +sha1=14566af639ccc4387c8dd5b477fdb3ad9d98f92d +md5=505b77c45a8f2b92b8a2eca43c14a688 +cksum=205854257 +upstream_url=https://pypi.io/packages/py3/b/build/build-VERSION-py3-none-any.whl diff --git a/build/pkgs/python_build/requirements.txt b/build/pkgs/python_build/install-requires.txt similarity index 100% rename from build/pkgs/python_build/requirements.txt rename to build/pkgs/python_build/install-requires.txt diff --git a/build/pkgs/python_build/package-version.txt b/build/pkgs/python_build/package-version.txt new file mode 100644 index 00000000000..21e8796a09d --- /dev/null +++ b/build/pkgs/python_build/package-version.txt @@ -0,0 +1 @@ +1.0.3 diff --git a/build/pkgs/python_build/type b/build/pkgs/python_build/type index 134d9bc32d5..a6a7b9cd726 100644 --- a/build/pkgs/python_build/type +++ b/build/pkgs/python_build/type @@ -1 +1 @@ -optional +standard From b9c6d3303373934b64d631cf7bca73e86b84e8e0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 11 Feb 2024 14:37:06 -0800 Subject: [PATCH 148/183] build/pkgs/pyproject_hooks: New, python_build dependency --- build/pkgs/pyproject_hooks/SPKG.rst | 16 ++++++++++++++++ build/pkgs/pyproject_hooks/checksums.ini | 5 +++++ build/pkgs/pyproject_hooks/dependencies | 4 ++++ build/pkgs/pyproject_hooks/install-requires.txt | 1 + build/pkgs/pyproject_hooks/package-version.txt | 1 + build/pkgs/pyproject_hooks/type | 1 + 6 files changed, 28 insertions(+) create mode 100644 build/pkgs/pyproject_hooks/SPKG.rst create mode 100644 build/pkgs/pyproject_hooks/checksums.ini create mode 100644 build/pkgs/pyproject_hooks/dependencies create mode 100644 build/pkgs/pyproject_hooks/install-requires.txt create mode 100644 build/pkgs/pyproject_hooks/package-version.txt create mode 100644 build/pkgs/pyproject_hooks/type diff --git a/build/pkgs/pyproject_hooks/SPKG.rst b/build/pkgs/pyproject_hooks/SPKG.rst new file mode 100644 index 00000000000..31d8461a48d --- /dev/null +++ b/build/pkgs/pyproject_hooks/SPKG.rst @@ -0,0 +1,16 @@ +pyproject_hooks: Wrappers to call pyproject.toml-based build backend hooks. +=========================================================================== + +Description +----------- + +Wrappers to call pyproject.toml-based build backend hooks. + +License +------- + +Upstream Contact +---------------- + +https://pypi.org/project/pyproject_hooks/ + diff --git a/build/pkgs/pyproject_hooks/checksums.ini b/build/pkgs/pyproject_hooks/checksums.ini new file mode 100644 index 00000000000..f35e59aa59f --- /dev/null +++ b/build/pkgs/pyproject_hooks/checksums.ini @@ -0,0 +1,5 @@ +tarball=pyproject_hooks-VERSION-py3-none-any.whl +sha1=6c99163c52786fb97eac8b4e38cc13fa3af141a9 +md5=68020c2619c7a744dcee12b670c9f413 +cksum=3405759428 +upstream_url=https://pypi.io/packages/py3/p/pyproject_hooks/pyproject_hooks-VERSION-py3-none-any.whl diff --git a/build/pkgs/pyproject_hooks/dependencies b/build/pkgs/pyproject_hooks/dependencies new file mode 100644 index 00000000000..47296a7bace --- /dev/null +++ b/build/pkgs/pyproject_hooks/dependencies @@ -0,0 +1,4 @@ + | $(PYTHON_TOOLCHAIN) $(PYTHON) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/pyproject_hooks/install-requires.txt b/build/pkgs/pyproject_hooks/install-requires.txt new file mode 100644 index 00000000000..1f783738e6f --- /dev/null +++ b/build/pkgs/pyproject_hooks/install-requires.txt @@ -0,0 +1 @@ +pyproject_hooks diff --git a/build/pkgs/pyproject_hooks/package-version.txt b/build/pkgs/pyproject_hooks/package-version.txt new file mode 100644 index 00000000000..3eefcb9dd5b --- /dev/null +++ b/build/pkgs/pyproject_hooks/package-version.txt @@ -0,0 +1 @@ +1.0.0 diff --git a/build/pkgs/pyproject_hooks/type b/build/pkgs/pyproject_hooks/type new file mode 100644 index 00000000000..a6a7b9cd726 --- /dev/null +++ b/build/pkgs/pyproject_hooks/type @@ -0,0 +1 @@ +standard From 36c1b026161a233957626fd99959e0af8ab31907 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Apr 2024 20:21:44 -0700 Subject: [PATCH 149/183] for a in build/pkgs/*; do (cd build/pkgs/zlib && if [ -r install-requires.txt ]; then git mv install-requires.txt version_requirements.txt; fi); done --- .../{install-requires.txt => version_requirements.txt} | 0 .../{install-requires.txt => version_requirements.txt} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename build/pkgs/pyproject_hooks/{install-requires.txt => version_requirements.txt} (100%) rename build/pkgs/python_build/{install-requires.txt => version_requirements.txt} (100%) diff --git a/build/pkgs/pyproject_hooks/install-requires.txt b/build/pkgs/pyproject_hooks/version_requirements.txt similarity index 100% rename from build/pkgs/pyproject_hooks/install-requires.txt rename to build/pkgs/pyproject_hooks/version_requirements.txt diff --git a/build/pkgs/python_build/install-requires.txt b/build/pkgs/python_build/version_requirements.txt similarity index 100% rename from build/pkgs/python_build/install-requires.txt rename to build/pkgs/python_build/version_requirements.txt From c186c99b2c52bde4ed6481d3d10a4076a27fd42a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Apr 2024 20:22:06 -0700 Subject: [PATCH 150/183] build/pkgs/python_build: Update to 1.2.1 --- build/pkgs/python_build/checksums.ini | 6 +++--- build/pkgs/python_build/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/python_build/checksums.ini b/build/pkgs/python_build/checksums.ini index 1316cf9cbe9..df10f8d3196 100644 --- a/build/pkgs/python_build/checksums.ini +++ b/build/pkgs/python_build/checksums.ini @@ -1,5 +1,5 @@ tarball=build-VERSION-py3-none-any.whl -sha1=14566af639ccc4387c8dd5b477fdb3ad9d98f92d -md5=505b77c45a8f2b92b8a2eca43c14a688 -cksum=205854257 +sha1=950bf228726af5041adbe2bb04a7ca74e27bce60 +md5=6f34942a01c3307b42556ee7628f3d1d +cksum=4005002353 upstream_url=https://pypi.io/packages/py3/b/build/build-VERSION-py3-none-any.whl diff --git a/build/pkgs/python_build/package-version.txt b/build/pkgs/python_build/package-version.txt index 21e8796a09d..6085e946503 100644 --- a/build/pkgs/python_build/package-version.txt +++ b/build/pkgs/python_build/package-version.txt @@ -1 +1 @@ -1.0.3 +1.2.1 From 3d026342df5fed10cd91aa931c567d16bbfc2e63 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 Apr 2024 20:28:16 -0700 Subject: [PATCH 151/183] build/pkgs/python_build/dependencies: Update --- build/pkgs/python_build/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/python_build/dependencies b/build/pkgs/python_build/dependencies index b72a6d1c776..af994ec1059 100644 --- a/build/pkgs/python_build/dependencies +++ b/build/pkgs/python_build/dependencies @@ -1,4 +1,4 @@ - pyparsing tomli packaging | $(PYTHON_TOOLCHAIN) $(PYTHON) +tomli packaging pyproject_hooks importlib_metadata | $(PYTHON_TOOLCHAIN) $(PYTHON) ---------- All lines of this file are ignored except the first. From 6683de7827bdc164b2c628e259f1305ca845c485 Mon Sep 17 00:00:00 2001 From: Nolord <33145668+Nolord@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:27:07 +0200 Subject: [PATCH 152/183] equivalent but more readable Co-authored-by: Travis Scrimshaw --- src/sage/combinat/set_partition_iterator.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sage/combinat/set_partition_iterator.pyx b/src/sage/combinat/set_partition_iterator.pyx index 39eb7d0d645..33e4ad41958 100644 --- a/src/sage/combinat/set_partition_iterator.pyx +++ b/src/sage/combinat/set_partition_iterator.pyx @@ -129,6 +129,7 @@ def set_partition_iterator_blocks(base_set, Py_ssize_t k): cdef Py_ssize_t n = len(base) cdef list a = list(range(n)) # TODO: implement _set_partition_block_gen as an iterative algorithm - if n >= k: - for P in _set_partition_block_gen(n, k, a): - yield from_word( P, base) + if n < k: + return + for P in _set_partition_block_gen(n, k, a): + yield from_word( P, base) From 9db7f54cb1a10a7bcdbf97799448aab643e57bae Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Mon, 15 Apr 2024 10:50:31 +0200 Subject: [PATCH 153/183] Replaced comparison methods by `__richcmp__` Credit to @tscrim for the help on how to do this! --- .../algebras/quatalg/quaternion_algebra.py | 113 +++++------------- 1 file changed, 29 insertions(+), 84 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 91e4a326371..ebc9292688a 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -83,6 +83,8 @@ from sage.categories.algebras import Algebras from sage.categories.number_fields import NumberFields +from sage.structure.richcmp import richcmp_method + ######################################################## # Constructor ######################################################## @@ -1526,6 +1528,7 @@ def unpickle_QuaternionAlgebra_v0(*key): return QuaternionAlgebra(*key) +@richcmp_method class QuaternionOrder(Parent): """ An order in a quaternion algebra. @@ -1739,116 +1742,58 @@ def gen(self, n): """ return self.__basis[n] - def __eq__(self, other): + def __richcmp__(self, other, op): """ - Compare orders ``self`` and ``other``. + Compare this quaternion order to ``other``. EXAMPLES:: - sage: R = QuaternionAlgebra(-11,-1).maximal_order() + sage: R = QuaternionAlgebra(-1, -11).maximal_order() sage: R == R # indirect doctest True - sage: R == QuaternionAlgebra(-1,-1).maximal_order() - False sage: R == 5 False - sage: Q. = QuaternionAlgebra(-1,-19) + sage: R == QuaternionAlgebra(-1, -7).maximal_order() + False Orders can be equal even if they are defined by different bases (see :issue:`32245`):: + sage: Q. = QuaternionAlgebra(-1, -19) sage: Q.quaternion_order([1,-i,k,j+i*7]) == Q.quaternion_order([1,i,j,k]) True - """ - if not isinstance(other, QuaternionOrder): - return False - return (self.__quaternion_algebra == other.__quaternion_algebra and - self.unit_ideal() == other.unit_ideal()) - - def __ne__(self, other): - """ - Compare orders ``self`` and ``other``. - - Two orders are equal if they have the same - basis and are in the same quaternion algebra. - - EXAMPLES:: - - sage: R = QuaternionAlgebra(-11,-1).maximal_order() - sage: R != R # indirect doctest - False - sage: R != QuaternionAlgebra(-1,-1).maximal_order() - True - """ - return not self.__eq__(other) - - def __le__(self, other): - """ - Compare orders ``self`` and ``other``. - EXAMPLES:: + TESTS:: - sage: B. = QuaternionAlgebra(-1, -11) + sage: B = QuaternionAlgebra(-1, -11) + sage: i,j,k = B.gens() sage: O = B.quaternion_order([1,i,j,k]) - sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) - sage: O <= R + sage: O == O True - sage: R <= O - False - """ - if not isinstance(other, QuaternionOrder): - return False - return self.unit_ideal().__le__(other.unit_ideal()) - - def __lt__(self, other): - """ - Compare orders ``self`` and ``other``. - - EXAMPLES:: - - sage: B. = QuaternionAlgebra(-1, -11) - sage: O = B.quaternion_order([1,i,j,k]) sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) - sage: O < R + sage: O <= R # indirect doctest True - sage: R < O - False - """ - return self.__le__(other) and self.__ne__(other) - - def __ge__(self, other): - """ - Compare orders ``self`` and ``other``. - - EXAMPLES:: - - sage: B. = QuaternionAlgebra(-1, -11) - sage: O = B.quaternion_order([1,i,j,k]) - sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) sage: O >= R False - sage: R >= O + sage: O != R True - """ - if not isinstance(other, QuaternionOrder): - return False - return self.unit_ideal().__ge__(other.unit_ideal()) - - def __gt__(self, other): - """ - Compare orders ``self`` and ``other``. - - EXAMPLES:: - - sage: B. = QuaternionAlgebra(-1, -11) - sage: O = B.quaternion_order([1,i,j,k]) - sage: R = B.quaternion_order([1,i,(i+j)/2,(1+k)/2]) - sage: O > R + sage: O == R + False + sage: O != O False - sage: R > O + sage: O < O + False + sage: O < R + True + sage: O <= O + True + sage: R >= R True """ - return self.__ge__(other) and self.__ne__(other) + from sage.structure.richcmp import richcmp, op_NE + if not isinstance(other, QuaternionOrder): + return op == op_NE + return richcmp(self.unit_ideal(), other.unit_ideal(), op) def __hash__(self): """ From 14304926b22ea66bb4fd4427a64f8cc9cdd2c0e9 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 17 Apr 2024 13:09:08 +0200 Subject: [PATCH 154/183] fix doctest --- src/sage/combinat/sf/sfa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 56a32dea180..afa2e6653e7 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -6636,7 +6636,7 @@ def _apply_functor(self, R): sage: F(QQ) Traceback (most recent call last): ... - TypeError: not a constant polynomial + TypeError: t is not a constant polynomial """ from sage.combinat.sf.sf import SymmetricFunctions return self._basis(self._family(SymmetricFunctions(R), *self._args)) From b98072981ef1b182bc9e0a68b65062a6496b268a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 14:44:53 -0700 Subject: [PATCH 155/183] src/sage/modules/matrix_morphism.py: Deprecate is_MatrixMorphism --- src/sage/modules/matrix_morphism.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index ab194038d93..0fca483b977 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -20,8 +20,6 @@ [1 0 0] [0 1 0] [0 0 1] - sage: is_MatrixMorphism(m) - True sage: m.charpoly('x') # needs sage.libs.pari x^3 - 3*x^2 + 3*x - 1 sage: m.base_ring() @@ -66,10 +64,18 @@ def is_MatrixMorphism(x): sage: V = ZZ^2; phi = V.hom([3*V.0, 2*V.1]) sage: sage.modules.matrix_morphism.is_MatrixMorphism(phi) + doctest:warning... + DeprecationWarning: is_MatrixMorphism is deprecated; + use isinstance(..., MatrixMorphism_abstract) or categories instead + See https://github.com/sagemath/sage/issues/99999 for details. True sage: sage.modules.matrix_morphism.is_MatrixMorphism(3) False """ + from sage.misc.superseded import deprecation + deprecation(99999, + "is_MatrixMorphism is deprecated; " + "use isinstance(..., MatrixMorphism_abstract) or categories instead") return isinstance(x, MatrixMorphism_abstract) @@ -1367,7 +1373,7 @@ def is_equal_function(self, other): - Rob Beezer (2011-07-15) """ - if not is_MatrixMorphism(other): + if not isinstance(other, MatrixMorphism_abstract): msg = 'can only compare to a matrix morphism, not {0}' raise TypeError(msg.format(other)) if self.domain() != other.domain(): From 1d762946fd69334e902aed939459b8bebf9a9f07 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 15:15:40 -0700 Subject: [PATCH 156/183] MatrixMorphism_abstract.{charpoly,det,fcp,trace}: Move to category --- .../finite_dimensional_modules_with_basis.py | 82 +++++++++++++++++++ src/sage/modules/matrix_morphism.py | 69 ---------------- 2 files changed, 82 insertions(+), 69 deletions(-) diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 7cf24baa57d..35d19f54205 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -15,6 +15,8 @@ from sage.categories.fields import Fields from sage.categories.tensor import TensorProductsCategory from sage.misc.cachefunc import cached_method +from sage.misc.lazy_attribute import lazy_attribute + class FiniteDimensionalModulesWithBasis(CategoryWithAxiom_over_base_ring): """ @@ -798,6 +800,86 @@ def image(self): return C.submodule(self.image_basis(), already_echelonized=True, category=self.category_for()) + @lazy_attribute + def characteristic_polynomial(self): + r""" + Return the characteristic polynomial of this endomorphism. + + :meth:`characteristic_polynomial` and :meth:`char_poly` are the same method. + + INPUT: + + - ``var`` -- variable + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.characteristic_polynomial() + x^2 - 3*x + 2 + sage: phi.charpoly() + x^2 - 3*x + 2 + sage: phi.matrix().charpoly() + x^2 - 3*x + 2 + sage: phi.charpoly('T') + T^2 - 3*T + 2 + """ + if not self.is_endomorphism(): + return NotImplemented + return self.matrix().charpoly + + charpoly = characteristic_polynomial + + @lazy_attribute + def det(self): + """ + Return the determinant of this endomorphism. + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.det() + 2 + """ + if not self.is_endomorphism(): + return NotImplemented + return self.matrix().determinant + + @lazy_attribute + def fcp(self): + """ + Return the factorization of the characteristic polynomial. + + INPUT: + + - ``var`` -- variable + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.fcp() # needs sage.libs.pari + (x - 2) * (x - 1) + sage: phi.fcp('T') # needs sage.libs.pari + (T - 2) * (T - 1) + """ + if not self.is_endomorphism(): + return NotImplemented + return self.matrix().fcp + + @lazy_attribute + def trace(self): + r""" + Return the trace of this endomorphism. + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.trace() + 3 + """ + if not self.is_endomorphism(): + return NotImplemented + return self.matrix().trace + class TensorProducts(TensorProductsCategory): def extra_super_categories(self): diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index 0fca483b977..5d67b34111b 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -806,35 +806,6 @@ def base_ring(self): """ return self.domain().base_ring() - def characteristic_polynomial(self, var='x'): - r""" - Return the characteristic polynomial of this endomorphism. - - ``characteristic_polynomial`` and ``char_poly`` are the same method. - - INPUT: - - - var -- variable - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0+V.1, 2*V.1]) - sage: phi.characteristic_polynomial() - x^2 - 3*x + 2 - sage: phi.charpoly() - x^2 - 3*x + 2 - sage: phi.matrix().charpoly() - x^2 - 3*x + 2 - sage: phi.charpoly('T') - T^2 - 3*T + 2 - """ - if not self.is_endomorphism(): - raise ArithmeticError("charpoly only defined for endomorphisms " - "(i.e., domain = range)") - return self.matrix().charpoly(var) - - charpoly = characteristic_polynomial - def decomposition(self, *args, **kwds): """ Return decomposition of this endomorphism, i.e., sequence of @@ -884,46 +855,6 @@ def decomposition(self, *args, **kwds): check=False) for V, _ in E], cr=True, check=False) - def trace(self): - r""" - Return the trace of this endomorphism. - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.trace() - 3 - """ - return self._matrix.trace() - - def det(self): - """ - Return the determinant of this endomorphism. - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.det() - 2 - """ - if not self.is_endomorphism(): - raise ArithmeticError("matrix morphism must be an endomorphism") - return self.matrix().determinant() - - def fcp(self, var='x'): - """ - Return the factorization of the characteristic polynomial. - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.fcp() # needs sage.libs.pari - (x - 2) * (x - 1) - sage: phi.fcp('T') # needs sage.libs.pari - (T - 2) * (T - 1) - """ - return self.charpoly(var).factor() - def kernel(self): """ Compute the kernel of this morphism. From a9d6761ec8e65e464f577e8f928769337ee77c80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 15:35:43 -0700 Subject: [PATCH 157/183] FiniteDimensionalModulesWithBasis.MorphismMethods.{charpoly,det,fcp,trace}: Add CombinatorialFreeModule examples --- .../finite_dimensional_modules_with_basis.py | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 35d19f54205..82cc0fc36a5 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -839,6 +839,12 @@ def det(self): sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) sage: phi.det() 2 + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: phi.det() + 2 """ if not self.is_endomorphism(): return NotImplemented @@ -856,10 +862,16 @@ def fcp(self): EXAMPLES:: sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.fcp() # needs sage.libs.pari + sage: phi.fcp() # needs sage.libs.pari (x - 2) * (x - 1) - sage: phi.fcp('T') # needs sage.libs.pari + sage: phi.fcp('T') # needs sage.libs.pari (T - 2) * (T - 1) + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.fcp() # needs sage.libs.pari + (x - 2) * (x - 1) """ if not self.is_endomorphism(): return NotImplemented @@ -875,6 +887,12 @@ def trace(self): sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) sage: phi.trace() 3 + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.trace() + 3 """ if not self.is_endomorphism(): return NotImplemented From cb90891bd093c48e07c8483f6627be79727ee31f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 15:50:56 -0700 Subject: [PATCH 158/183] FiniteDimensionalModulesWithBasis.MorphismMethods: Define both det and determinant --- .../categories/finite_dimensional_modules_with_basis.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 82cc0fc36a5..89924be8308 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -830,13 +830,17 @@ def characteristic_polynomial(self): charpoly = characteristic_polynomial @lazy_attribute - def det(self): + def determinant(self): """ Return the determinant of this endomorphism. + :meth:`determinant` and :meth:`det` are the same method. + EXAMPLES:: sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.determinant() + 2 sage: phi.det() 2 @@ -850,6 +854,8 @@ def det(self): return NotImplemented return self.matrix().determinant + det = determinant + @lazy_attribute def fcp(self): """ From 4dcf44d0bbe9f8508870d34710437f29622d8fef Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 16:08:40 -0700 Subject: [PATCH 159/183] FiniteDimensionalModulesWithBasis.MorphismMethods: Add methods minpoly, minimal_polynomial --- .../finite_dimensional_modules_with_basis.py | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 89924be8308..988e8de9d36 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -805,7 +805,7 @@ def characteristic_polynomial(self): r""" Return the characteristic polynomial of this endomorphism. - :meth:`characteristic_polynomial` and :meth:`char_poly` are the same method. + :meth:`characteristic_polynomial` and :meth:`charpoly` are the same method. INPUT: @@ -822,6 +822,12 @@ def characteristic_polynomial(self): x^2 - 3*x + 2 sage: phi.charpoly('T') T^2 - 3*T + 2 + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.charpoly() + x^2 - 3*x + 2 """ if not self.is_endomorphism(): return NotImplemented @@ -847,7 +853,7 @@ def determinant(self): sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) sage: M = matrix(ZZ, [[1, 0], [1, 2]]) sage: psi = W.module_morphism(matrix=M, codomain=W) - sage: phi.det() + sage: psi.det() 2 """ if not self.is_endomorphism(): @@ -883,6 +889,37 @@ def fcp(self): return NotImplemented return self.matrix().fcp + @lazy_attribute + def minimal_polynomial(self): + r""" + Return the minimal polynomial of this endomorphism. + + :meth:`minimal_polynomial` and :meth:`minpoly` are the same method. + + INPUT: + + - ``var`` -- variable + + EXAMPLES:: + + sage: # needs sage.rings.finite_rings + sage: k = GF(9, 'c') + sage: V = CombinatorialFreeModule(k, ['x', 'y', 'z', 'w']) + sage: A = matrix(k, 4, [1,1,0,0, 0,1,0,0, 0,0,5,0, 0,0,0,5]) + sage: phi = V.module_morphism(matrix=A, codomain=V) + sage: factor(phi.minpoly()) + (x + 1) * (x + 2)^2 + sage: A.minpoly()(A) == 0 + True + sage: factor(phi.charpoly()) + (x + 1)^2 * (x + 2)^2 + """ + if not self.is_endomorphism(): + return NotImplemented + return self.matrix().minimal_polynomial + + minpoly = minimal_polynomial + @lazy_attribute def trace(self): r""" From 9c1e39315f7bfa7dc9082eb4862a099504930e69 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 8 Apr 2024 16:58:11 -0700 Subject: [PATCH 160/183] Remove FreeModuleMorphism.minpoly, move doctest to category method --- .../finite_dimensional_modules_with_basis.py | 26 +++++++++- src/sage/modules/free_module_morphism.py | 49 ------------------- 2 files changed, 24 insertions(+), 51 deletions(-) diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 988e8de9d36..36716e336d3 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -898,9 +898,31 @@ def minimal_polynomial(self): INPUT: - - ``var`` -- variable + - ``var`` -- string (default: ``'x'``); a variable name - EXAMPLES:: + EXAMPLES: + + Compute the minimal polynomial, and check it. :: + + sage: V = GF(7)^3 + sage: H = V.Hom(V)([[0,1,2], [-1,0,3], [2,4,1]]); H + Vector space morphism represented by the matrix: + [0 1 2] + [6 0 3] + [2 4 1] + Domain: Vector space of dimension 3 over Finite Field of size 7 + Codomain: Vector space of dimension 3 over Finite Field of size 7 + sage: H.minpoly() # needs sage.libs.pari + x^3 + 6*x^2 + 6*x + 1 + sage: H.minimal_polynomial() # needs sage.libs.pari + x^3 + 6*x^2 + 6*x + 1 + sage: H^3 + (H^2)*6 + H*6 + 1 + Vector space morphism represented by the matrix: + [0 0 0] + [0 0 0] + [0 0 0] + Domain: Vector space of dimension 3 over Finite Field of size 7 + Codomain: Vector space of dimension 3 over Finite Field of size 7 sage: # needs sage.rings.finite_rings sage: k = GF(9, 'c') diff --git a/src/sage/modules/free_module_morphism.py b/src/sage/modules/free_module_morphism.py index 3fdd76bff6f..e7d5e8e1c5b 100644 --- a/src/sage/modules/free_module_morphism.py +++ b/src/sage/modules/free_module_morphism.py @@ -636,55 +636,6 @@ def eigenspaces(self, extend=True): return [(vec[0], Sequence(vec[1]).universe().subspace(vec[1])) for vec in ev] - def minimal_polynomial(self, var='x'): - r""" - Computes the minimal polynomial. - - ``minpoly()`` and ``minimal_polynomial()`` are the same method. - - INPUT: - - - ``var`` - string (default: 'x') a variable name - - OUTPUT: - - polynomial in var - the minimal polynomial of the endomorphism. - - EXAMPLES: - - Compute the minimal polynomial, and check it. :: - - sage: V = GF(7)^3 - sage: H = V.Hom(V)([[0,1,2], [-1,0,3], [2,4,1]]) - sage: H - Vector space morphism represented by the matrix: - [0 1 2] - [6 0 3] - [2 4 1] - Domain: Vector space of dimension 3 over Finite Field of size 7 - Codomain: Vector space of dimension 3 over Finite Field of size 7 - - sage: H.minpoly() # needs sage.libs.pari - x^3 + 6*x^2 + 6*x + 1 - - sage: H.minimal_polynomial() # needs sage.libs.pari - x^3 + 6*x^2 + 6*x + 1 - - sage: H^3 + (H^2)*6 + H*6 + 1 - Vector space morphism represented by the matrix: - [0 0 0] - [0 0 0] - [0 0 0] - Domain: Vector space of dimension 3 over Finite Field of size 7 - Codomain: Vector space of dimension 3 over Finite Field of size 7 - """ - if self.is_endomorphism(): - return self.matrix().minpoly(var) - else: - raise TypeError("not an endomorphism") - - minpoly = minimal_polynomial - class BaseIsomorphism1D(Morphism): """ From e9a9c060c209f449ba5bf4912624d77127694d34 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 18:53:48 -0700 Subject: [PATCH 161/183] MatrixMorphism_abstract, FreeModuleMorphism: Copy in methods from category --- src/sage/modules/free_module_morphism.py | 4 ++++ src/sage/modules/matrix_morphism.py | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/sage/modules/free_module_morphism.py b/src/sage/modules/free_module_morphism.py index e7d5e8e1c5b..c1ad9221ae4 100644 --- a/src/sage/modules/free_module_morphism.py +++ b/src/sage/modules/free_module_morphism.py @@ -42,6 +42,7 @@ # be coercible into vector space of appropriate dimension. import sage.modules.free_module as free_module +from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis from sage.categories.morphism import Morphism from sage.modules import free_module_homspace, matrix_morphism from sage.structure.richcmp import rich_to_bool, richcmp @@ -62,6 +63,9 @@ def is_FreeModuleMorphism(x): class FreeModuleMorphism(matrix_morphism.MatrixMorphism): + + minimal_polynomial = minpoly = FiniteDimensionalModulesWithBasis.MorphismMethods.minimal_polynomial + def __init__(self, parent, A, side="left"): """ INPUT: diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index 5d67b34111b..129bc02d578 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -52,6 +52,7 @@ import sage.categories.morphism import sage.categories.homset +from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis from sage.structure.all import Sequence, parent from sage.structure.richcmp import richcmp, op_NE, op_EQ @@ -80,6 +81,17 @@ def is_MatrixMorphism(x): class MatrixMorphism_abstract(sage.categories.morphism.Morphism): + + # Copy in methods that delegate to self.matrix. + # This is needed because MatrixMorphism_abstract is subclassed + # for use with parents that are merely set up as additive abelian groups, + # but not as ZZ-modules; see sage.modular.abvar. + + characteristic_polynomial = charpoly = FiniteDimensionalModulesWithBasis.MorphismMethods.characteristic_polynomial + det = determinant = FiniteDimensionalModulesWithBasis.MorphismMethods.determinant + fcp = FiniteDimensionalModulesWithBasis.MorphismMethods.fcp + trace = FiniteDimensionalModulesWithBasis.MorphismMethods.trace + def __init__(self, parent, side='left'): """ INPUT: From a40402bfca9deed2994f698b02e35c4d1e631c5d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 19:18:01 -0700 Subject: [PATCH 162/183] src/sage/modular/abvar/morphism.py (HeckeOperator): Override method fcp to make it compatible with custom charpoly --- src/sage/modular/abvar/morphism.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/sage/modular/abvar/morphism.py b/src/sage/modular/abvar/morphism.py index b85cc670df9..e6b2339d44c 100644 --- a/src/sage/modular/abvar/morphism.py +++ b/src/sage/modular/abvar/morphism.py @@ -870,6 +870,20 @@ def charpoly(self, var='x'): """ return self.characteristic_polynomial(var) + def fcp(self, var='x'): + """ + Return the factorization of the characteristic polynomial. + + EXAMPLES:: + + sage: t2 = J0(33).hecke_operator(2) + sage: t2.charpoly() + x^3 + 3*x^2 - 4 + sage: t2.fcp() + (x - 1) * (x + 2)^2 + """ + return self.charpoly(var).factor() + def action_on_homology(self, R=ZZ): r""" Return the action of this Hecke operator on the homology From b1a0ad5dfc932e954497849801c6dadeede8d9ab Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 19:21:36 -0700 Subject: [PATCH 163/183] src/sage/modules/matrix_morphism.py: Fill in PR number in deprecation --- src/sage/modules/matrix_morphism.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index 129bc02d578..3e053d043fb 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -61,6 +61,8 @@ def is_MatrixMorphism(x): """ Return True if x is a Matrix morphism of free modules. + This function is deprecated. + EXAMPLES:: sage: V = ZZ^2; phi = V.hom([3*V.0, 2*V.1]) @@ -74,7 +76,7 @@ def is_MatrixMorphism(x): False """ from sage.misc.superseded import deprecation - deprecation(99999, + deprecation(37731, "is_MatrixMorphism is deprecated; " "use isinstance(..., MatrixMorphism_abstract) or categories instead") return isinstance(x, MatrixMorphism_abstract) From 49ed055056a9370a849562773128ee5bb23c6ac9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 2 Apr 2024 19:44:16 -0700 Subject: [PATCH 164/183] is_FreeModuleMorphism, is_VectorSpaceMorphism: Deprecate --- src/sage/geometry/fan_morphism.py | 5 ++--- src/sage/modules/free_module_morphism.py | 10 ++++++++++ src/sage/modules/matrix_morphism.py | 2 +- src/sage/modules/vector_space_homspace.py | 4 ++-- src/sage/modules/vector_space_morphism.py | 10 ++++++++++ 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/sage/geometry/fan_morphism.py b/src/sage/geometry/fan_morphism.py index fa1d82889d9..2602132e40b 100644 --- a/src/sage/geometry/fan_morphism.py +++ b/src/sage/geometry/fan_morphism.py @@ -89,8 +89,7 @@ from sage.misc.latex import latex from sage.misc.misc import walltime from sage.misc.misc_c import prod -from sage.modules.free_module_morphism import (FreeModuleMorphism, - is_FreeModuleMorphism) +from sage.modules.free_module_morphism import FreeModuleMorphism from sage.rings.infinity import Infinity from sage.rings.integer_ring import ZZ from sage.rings.infinity import is_Infinite @@ -277,7 +276,7 @@ def __init__(self, morphism, domain_fan, codomain, codomain_fan = codomain.lattice(), codomain else: codomain_fan = None - if is_FreeModuleMorphism(morphism): + if isinstance(morphism, FreeModuleMorphism): parent = morphism.parent() A = morphism.matrix() elif is_Matrix(morphism): diff --git a/src/sage/modules/free_module_morphism.py b/src/sage/modules/free_module_morphism.py index c1ad9221ae4..9f2c2648136 100644 --- a/src/sage/modules/free_module_morphism.py +++ b/src/sage/modules/free_module_morphism.py @@ -51,14 +51,24 @@ def is_FreeModuleMorphism(x): """ + This function is deprecated. + EXAMPLES:: sage: V = ZZ^2; f = V.hom([V.1, -2*V.0]) sage: sage.modules.free_module_morphism.is_FreeModuleMorphism(f) + doctest:warning... + DeprecationWarning: is_FreeModuleMorphism is deprecated; + use isinstance(..., FreeModuleMorphism) or categories instead + See https://github.com/sagemath/sage/issues/37731 for details. True sage: sage.modules.free_module_morphism.is_FreeModuleMorphism(0) False """ + from sage.misc.superseded import deprecation + deprecation(37731, + "is_FreeModuleMorphism is deprecated; " + "use isinstance(..., FreeModuleMorphism) or categories instead") return isinstance(x, FreeModuleMorphism) diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index 3e053d043fb..bbb4e75c35e 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -70,7 +70,7 @@ def is_MatrixMorphism(x): doctest:warning... DeprecationWarning: is_MatrixMorphism is deprecated; use isinstance(..., MatrixMorphism_abstract) or categories instead - See https://github.com/sagemath/sage/issues/99999 for details. + See https://github.com/sagemath/sage/issues/37731 for details. True sage: sage.modules.matrix_morphism.is_MatrixMorphism(3) False diff --git a/src/sage/modules/vector_space_homspace.py b/src/sage/modules/vector_space_homspace.py index 743163acb62..bee4ec941b6 100644 --- a/src/sage/modules/vector_space_homspace.py +++ b/src/sage/modules/vector_space_homspace.py @@ -369,14 +369,14 @@ def __call__(self, A, check=True, **kwds): Previously the above code resulted in a :class:`TypeError` because the dimensions of the matrix were incorrect. """ - from .vector_space_morphism import is_VectorSpaceMorphism, VectorSpaceMorphism + from .vector_space_morphism import VectorSpaceMorphism D = self.domain() C = self.codomain() side = kwds.get("side", "left") from sage.structure.element import is_Matrix if is_Matrix(A): pass - elif is_VectorSpaceMorphism(A): + elif isinstance(A, VectorSpaceMorphism): A = A.matrix() elif callable(A): try: diff --git a/src/sage/modules/vector_space_morphism.py b/src/sage/modules/vector_space_morphism.py index d605a4f4d30..4e43ce4d95e 100644 --- a/src/sage/modules/vector_space_morphism.py +++ b/src/sage/modules/vector_space_morphism.py @@ -785,6 +785,8 @@ def is_VectorSpaceMorphism(x) -> bool: r""" Returns ``True`` if ``x`` is a vector space morphism (a linear transformation). + This function is deprecated. + INPUT: ``x`` - anything @@ -798,10 +800,18 @@ def is_VectorSpaceMorphism(x) -> bool: sage: V = QQ^2; f = V.hom([V.1,-2*V.0]) sage: sage.modules.vector_space_morphism.is_VectorSpaceMorphism(f) + doctest:warning... + DeprecationWarning: is_VectorSpaceMorphism is deprecated; + use isinstance(..., VectorSpaceMorphism) or categories instead + See https://github.com/sagemath/sage/issues/37731 for details. True sage: sage.modules.vector_space_morphism.is_VectorSpaceMorphism('junk') False """ + from sage.misc.superseded import deprecation + deprecation(37731, + "is_VectorSpaceMorphism is deprecated; " + "use isinstance(..., VectorSpaceMorphism) or categories instead") return isinstance(x, VectorSpaceMorphism) From 5a827d86c29e870affe4225fdaabbb5b9d8e325a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 3 Apr 2024 22:24:59 -0700 Subject: [PATCH 165/183] Move methods to FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods --- .../finite_dimensional_modules_with_basis.py | 307 +++++++++--------- src/sage/modules/free_module_morphism.py | 2 +- src/sage/modules/matrix_morphism.py | 8 +- 3 files changed, 157 insertions(+), 160 deletions(-) diff --git a/src/sage/categories/finite_dimensional_modules_with_basis.py b/src/sage/categories/finite_dimensional_modules_with_basis.py index 36716e336d3..0be84eccb84 100644 --- a/src/sage/categories/finite_dimensional_modules_with_basis.py +++ b/src/sage/categories/finite_dimensional_modules_with_basis.py @@ -11,8 +11,9 @@ # ***************************************************************************** import operator -from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring +from sage.categories.category_with_axiom import CategoryWithAxiom, CategoryWithAxiom_over_base_ring from sage.categories.fields import Fields +from sage.categories.homsets import HomsetsCategory from sage.categories.tensor import TensorProductsCategory from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute @@ -800,168 +801,164 @@ def image(self): return C.submodule(self.image_basis(), already_echelonized=True, category=self.category_for()) - @lazy_attribute - def characteristic_polynomial(self): - r""" - Return the characteristic polynomial of this endomorphism. - - :meth:`characteristic_polynomial` and :meth:`charpoly` are the same method. + class Homsets(HomsetsCategory): - INPUT: + class Endset(CategoryWithAxiom): - - ``var`` -- variable + class ElementMethods: - EXAMPLES:: + @lazy_attribute + def characteristic_polynomial(self): + r""" + Return the characteristic polynomial of this endomorphism. - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.characteristic_polynomial() - x^2 - 3*x + 2 - sage: phi.charpoly() - x^2 - 3*x + 2 - sage: phi.matrix().charpoly() - x^2 - 3*x + 2 - sage: phi.charpoly('T') - T^2 - 3*T + 2 - - sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) - sage: M = matrix(ZZ, [[1, 0], [1, 2]]) - sage: psi = W.module_morphism(matrix=M, codomain=W) - sage: psi.charpoly() - x^2 - 3*x + 2 - """ - if not self.is_endomorphism(): - return NotImplemented - return self.matrix().charpoly + :meth:`characteristic_polynomial` and :meth:`charpoly` are the same method. - charpoly = characteristic_polynomial + INPUT: - @lazy_attribute - def determinant(self): - """ - Return the determinant of this endomorphism. - - :meth:`determinant` and :meth:`det` are the same method. - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.determinant() - 2 - sage: phi.det() - 2 - - sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) - sage: M = matrix(ZZ, [[1, 0], [1, 2]]) - sage: psi = W.module_morphism(matrix=M, codomain=W) - sage: psi.det() - 2 - """ - if not self.is_endomorphism(): - return NotImplemented - return self.matrix().determinant + - ``var`` -- variable - det = determinant + EXAMPLES:: - @lazy_attribute - def fcp(self): - """ - Return the factorization of the characteristic polynomial. - - INPUT: - - - ``var`` -- variable - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.fcp() # needs sage.libs.pari - (x - 2) * (x - 1) - sage: phi.fcp('T') # needs sage.libs.pari - (T - 2) * (T - 1) - - sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) - sage: M = matrix(ZZ, [[1, 0], [1, 2]]) - sage: psi = W.module_morphism(matrix=M, codomain=W) - sage: psi.fcp() # needs sage.libs.pari - (x - 2) * (x - 1) - """ - if not self.is_endomorphism(): - return NotImplemented - return self.matrix().fcp - - @lazy_attribute - def minimal_polynomial(self): - r""" - Return the minimal polynomial of this endomorphism. - - :meth:`minimal_polynomial` and :meth:`minpoly` are the same method. - - INPUT: - - - ``var`` -- string (default: ``'x'``); a variable name - - EXAMPLES: - - Compute the minimal polynomial, and check it. :: - - sage: V = GF(7)^3 - sage: H = V.Hom(V)([[0,1,2], [-1,0,3], [2,4,1]]); H - Vector space morphism represented by the matrix: - [0 1 2] - [6 0 3] - [2 4 1] - Domain: Vector space of dimension 3 over Finite Field of size 7 - Codomain: Vector space of dimension 3 over Finite Field of size 7 - sage: H.minpoly() # needs sage.libs.pari - x^3 + 6*x^2 + 6*x + 1 - sage: H.minimal_polynomial() # needs sage.libs.pari - x^3 + 6*x^2 + 6*x + 1 - sage: H^3 + (H^2)*6 + H*6 + 1 - Vector space morphism represented by the matrix: - [0 0 0] - [0 0 0] - [0 0 0] - Domain: Vector space of dimension 3 over Finite Field of size 7 - Codomain: Vector space of dimension 3 over Finite Field of size 7 - - sage: # needs sage.rings.finite_rings - sage: k = GF(9, 'c') - sage: V = CombinatorialFreeModule(k, ['x', 'y', 'z', 'w']) - sage: A = matrix(k, 4, [1,1,0,0, 0,1,0,0, 0,0,5,0, 0,0,0,5]) - sage: phi = V.module_morphism(matrix=A, codomain=V) - sage: factor(phi.minpoly()) - (x + 1) * (x + 2)^2 - sage: A.minpoly()(A) == 0 - True - sage: factor(phi.charpoly()) - (x + 1)^2 * (x + 2)^2 - """ - if not self.is_endomorphism(): - return NotImplemented - return self.matrix().minimal_polynomial - - minpoly = minimal_polynomial - - @lazy_attribute - def trace(self): - r""" - Return the trace of this endomorphism. - - EXAMPLES:: - - sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) - sage: phi.trace() - 3 - - sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) - sage: M = matrix(ZZ, [[1, 0], [1, 2]]) - sage: psi = W.module_morphism(matrix=M, codomain=W) - sage: psi.trace() - 3 - """ - if not self.is_endomorphism(): - return NotImplemented - return self.matrix().trace + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.characteristic_polynomial() + x^2 - 3*x + 2 + sage: phi.charpoly() + x^2 - 3*x + 2 + sage: phi.matrix().charpoly() + x^2 - 3*x + 2 + sage: phi.charpoly('T') + T^2 - 3*T + 2 + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.charpoly() + x^2 - 3*x + 2 + """ + return self.matrix().charpoly + + charpoly = characteristic_polynomial + + @lazy_attribute + def determinant(self): + """ + Return the determinant of this endomorphism. + + :meth:`determinant` and :meth:`det` are the same method. + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.determinant() + 2 + sage: phi.det() + 2 + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.det() + 2 + """ + return self.matrix().determinant + + det = determinant + + @lazy_attribute + def fcp(self): + """ + Return the factorization of the characteristic polynomial. + + INPUT: + + - ``var`` -- variable + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.fcp() # needs sage.libs.pari + (x - 2) * (x - 1) + sage: phi.fcp('T') # needs sage.libs.pari + (T - 2) * (T - 1) + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.fcp() # needs sage.libs.pari + (x - 2) * (x - 1) + """ + return self.matrix().fcp + + @lazy_attribute + def minimal_polynomial(self): + r""" + Return the minimal polynomial of this endomorphism. + + :meth:`minimal_polynomial` and :meth:`minpoly` are the same method. + + INPUT: + + - ``var`` -- string (default: ``'x'``); a variable name + + EXAMPLES: + + Compute the minimal polynomial, and check it. :: + + sage: V = GF(7)^3 + sage: H = V.Hom(V)([[0,1,2], [-1,0,3], [2,4,1]]); H + Vector space morphism represented by the matrix: + [0 1 2] + [6 0 3] + [2 4 1] + Domain: Vector space of dimension 3 over Finite Field of size 7 + Codomain: Vector space of dimension 3 over Finite Field of size 7 + sage: H.minpoly() # needs sage.libs.pari + x^3 + 6*x^2 + 6*x + 1 + sage: H.minimal_polynomial() # needs sage.libs.pari + x^3 + 6*x^2 + 6*x + 1 + sage: H^3 + (H^2)*6 + H*6 + 1 + Vector space morphism represented by the matrix: + [0 0 0] + [0 0 0] + [0 0 0] + Domain: Vector space of dimension 3 over Finite Field of size 7 + Codomain: Vector space of dimension 3 over Finite Field of size 7 + + sage: # needs sage.rings.finite_rings + sage: k = GF(9, 'c') + sage: V = CombinatorialFreeModule(k, ['x', 'y', 'z', 'w']) + sage: A = matrix(k, 4, [1,1,0,0, 0,1,0,0, 0,0,5,0, 0,0,0,5]) + sage: phi = V.module_morphism(matrix=A, codomain=V) + sage: factor(phi.minpoly()) + (x + 1) * (x + 2)^2 + sage: A.minpoly()(A) == 0 + True + sage: factor(phi.charpoly()) + (x + 1)^2 * (x + 2)^2 + """ + return self.matrix().minimal_polynomial + + minpoly = minimal_polynomial + + @lazy_attribute + def trace(self): + r""" + Return the trace of this endomorphism. + + EXAMPLES:: + + sage: V = ZZ^2; phi = V.hom([V.0 + V.1, 2*V.1]) + sage: phi.trace() + 3 + + sage: W = CombinatorialFreeModule(ZZ, ['x', 'y']) + sage: M = matrix(ZZ, [[1, 0], [1, 2]]) + sage: psi = W.module_morphism(matrix=M, codomain=W) + sage: psi.trace() + 3 + """ + return self.matrix().trace class TensorProducts(TensorProductsCategory): diff --git a/src/sage/modules/free_module_morphism.py b/src/sage/modules/free_module_morphism.py index 9f2c2648136..d53eeaf4176 100644 --- a/src/sage/modules/free_module_morphism.py +++ b/src/sage/modules/free_module_morphism.py @@ -74,7 +74,7 @@ def is_FreeModuleMorphism(x): class FreeModuleMorphism(matrix_morphism.MatrixMorphism): - minimal_polynomial = minpoly = FiniteDimensionalModulesWithBasis.MorphismMethods.minimal_polynomial + minimal_polynomial = minpoly = FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods.minimal_polynomial def __init__(self, parent, A, side="left"): """ diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py index bbb4e75c35e..a77dc0f020d 100644 --- a/src/sage/modules/matrix_morphism.py +++ b/src/sage/modules/matrix_morphism.py @@ -89,10 +89,10 @@ class MatrixMorphism_abstract(sage.categories.morphism.Morphism): # for use with parents that are merely set up as additive abelian groups, # but not as ZZ-modules; see sage.modular.abvar. - characteristic_polynomial = charpoly = FiniteDimensionalModulesWithBasis.MorphismMethods.characteristic_polynomial - det = determinant = FiniteDimensionalModulesWithBasis.MorphismMethods.determinant - fcp = FiniteDimensionalModulesWithBasis.MorphismMethods.fcp - trace = FiniteDimensionalModulesWithBasis.MorphismMethods.trace + characteristic_polynomial = charpoly = FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods.characteristic_polynomial + det = determinant = FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods.determinant + fcp = FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods.fcp + trace = FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods.trace def __init__(self, parent, side='left'): """ From e965c0f55974db97dbfcad51641ddc0c771ed3bf Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Apr 2024 16:09:19 -0700 Subject: [PATCH 166/183] FreeModuleMorphism: Revert 'Copy in methods from category' --- src/sage/modules/free_module_morphism.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sage/modules/free_module_morphism.py b/src/sage/modules/free_module_morphism.py index d53eeaf4176..486356e1605 100644 --- a/src/sage/modules/free_module_morphism.py +++ b/src/sage/modules/free_module_morphism.py @@ -42,7 +42,7 @@ # be coercible into vector space of appropriate dimension. import sage.modules.free_module as free_module -from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis + from sage.categories.morphism import Morphism from sage.modules import free_module_homspace, matrix_morphism from sage.structure.richcmp import rich_to_bool, richcmp @@ -74,8 +74,6 @@ def is_FreeModuleMorphism(x): class FreeModuleMorphism(matrix_morphism.MatrixMorphism): - minimal_polynomial = minpoly = FiniteDimensionalModulesWithBasis.Homsets.Endset.ElementMethods.minimal_polynomial - def __init__(self, parent, A, side="left"): """ INPUT: From 84b0b238bdaa1959d24ac0ef4db49f505a79dddc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 7 Apr 2024 21:09:14 -0700 Subject: [PATCH 167/183] src/sage/categories/modules_with_basis.py: Update doctest output --- src/sage/categories/modules_with_basis.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/modules_with_basis.py b/src/sage/categories/modules_with_basis.py index 2a1fe2dd117..adac2edcd1b 100644 --- a/src/sage/categories/modules_with_basis.py +++ b/src/sage/categories/modules_with_basis.py @@ -116,9 +116,10 @@ class ModulesWithBasis(CategoryWithAxiom_over_base_ring): Some more playing around with categories and higher order homsets:: sage: H.category() # needs sage.modules - Category of homsets of modules with basis over Rational Field + Category of homsets of finite dimensional modules with basis over Rational Field sage: Hom(H, H).category() # needs sage.modules - Category of endsets of homsets of modules with basis over Rational Field + Category of endsets of + homsets of finite dimensional modules with basis over Rational Field .. TODO:: ``End(X)`` is an algebra. From bf7beab6009c5760a9b77eb17eae8dae9bf5e144 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 10 Mar 2024 13:53:03 -0700 Subject: [PATCH 168/183] build/pkgs/{gdb,gmp,libgd,python3,symmetrica}: Reduce xz to an order-only dependency --- build/pkgs/gdb/dependencies | 2 +- build/pkgs/gmp/dependencies | 2 +- build/pkgs/libgd/dependencies | 2 +- build/pkgs/python3/dependencies | 2 +- build/pkgs/symmetrica/dependencies | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/pkgs/gdb/dependencies b/build/pkgs/gdb/dependencies index cf6822bb92e..d6030116f99 100644 --- a/build/pkgs/gdb/dependencies +++ b/build/pkgs/gdb/dependencies @@ -1,4 +1,4 @@ -mpfr zlib ncurses xz | $(PYTHON) +mpfr zlib ncurses | $(PYTHON) xz ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/gmp/dependencies b/build/pkgs/gmp/dependencies index ce98901e90d..9738ee88e94 100644 --- a/build/pkgs/gmp/dependencies +++ b/build/pkgs/gmp/dependencies @@ -1,3 +1,3 @@ -xz +| xz # xz is only needed to unpack the tarball when sage-bootstrap-python is Python < 3.3 diff --git a/build/pkgs/libgd/dependencies b/build/pkgs/libgd/dependencies index f2c5686fb06..66ad9984858 100644 --- a/build/pkgs/libgd/dependencies +++ b/build/pkgs/libgd/dependencies @@ -1,4 +1,4 @@ -libpng xz +libpng | xz # xz needed to unpack tarball when sage-bootstrap-python is Python < 3.3 ---------- diff --git a/build/pkgs/python3/dependencies b/build/pkgs/python3/dependencies index 9bdcf05edc4..c00db7fa1e0 100644 --- a/build/pkgs/python3/dependencies +++ b/build/pkgs/python3/dependencies @@ -1,4 +1,4 @@ -zlib readline sqlite libpng bzip2 liblzma xz libffi openssl +zlib readline sqlite libpng bzip2 liblzma libffi openssl | xz ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/symmetrica/dependencies b/build/pkgs/symmetrica/dependencies index 606ceeaec80..eb5b66f34f2 100644 --- a/build/pkgs/symmetrica/dependencies +++ b/build/pkgs/symmetrica/dependencies @@ -1,4 +1,4 @@ -xz +| xz xz is needed for unpacking the tarball when sage-bootstrap-python is ancient From bf39355647f5a76bea2c6bc4e6de0cf9f566bd05 Mon Sep 17 00:00:00 2001 From: Sebastian Spindler Date: Thu, 18 Apr 2024 10:57:54 +0200 Subject: [PATCH 169/183] Implemented reviewer feedback - Corrected order of additional arguments - Fixed spacing for PEP8 --- src/sage/algebras/quatalg/quaternion_algebra.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index ebc9292688a..4c9f9d7fb46 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -701,13 +701,13 @@ def maximal_order(self, take_shortcuts=True, order_basis=None): INPUT: - - ``order_basis`` -- (optional, default: ``None``) a basis of an - order of this quaternion algebra - - ``take_shortcuts`` -- (default: ``True``) if the discriminant is prime and the invariants of the algebra are of a nice form, use Proposition 5.2 of [Piz1980]_. + - ``order_basis`` -- (optional, default: ``None``) a basis of an + order of this quaternion algebra + OUTPUT: A maximal order in this quaternion algebra. @@ -814,7 +814,7 @@ def maximal_order(self, take_shortcuts=True, order_basis=None): # of such a form though) a, b = self.invariants() if (not order_basis and take_shortcuts and d_A.is_prime() - and a in ZZ and b in ZZ): + and a in ZZ and b in ZZ): a = ZZ(a) b = ZZ(b) i, j, k = self.gens() From d160c55c41893575bb60413227cfa8cca9ec41e6 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Wed, 27 Mar 2024 17:20:40 +0000 Subject: [PATCH 170/183] fix ascii_art of empty chain complex --- src/sage/homology/chain_complex.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index c01151ee7ed..c42e95ddd5f 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -444,10 +444,13 @@ def vector_art(d): for n in ordered: result_ordered += arrow_art(n) + vector_art(n) result = [result_ordered] + result - concatenated = result[0] - for r in result[1:]: - concatenated += AsciiArt([' ... ']) + r - return concatenated + try: + concatenated = result[0] + for r in result[1:]: + concatenated += AsciiArt([' ... ']) + r + return concatenated + except IndexError: + return [] def _unicode_art_(self): """ @@ -1803,10 +1806,13 @@ def module_art(n): for n in ordered: result_ordered += arrow_art(n) + module_art(n) result = [result_ordered] + result - concatenated = result[0] - for r in result[1:]: - concatenated += AsciiArt([' ... ']) + r - return concatenated + try: + concatenated = result[0] + for r in result[1:]: + concatenated += AsciiArt([' ... ']) + r + return concatenated + except IndexError: + return [] def _unicode_art_(self): """ From 7263b9b1614bcbca57f27ec11ad829270aaf10e5 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Wed, 27 Mar 2024 21:02:29 +0000 Subject: [PATCH 171/183] add tests, make sure unicode_art() is fixed too --- src/sage/homology/chain_complex.py | 43 ++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index c42e95ddd5f..655e5cc1356 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -418,6 +418,15 @@ def _ascii_art_(self): d_2 d_1 d_0 [1] d_-1 0 <---- [0] <---- [4] <---- [2] <----- 0 [5] [3] + + TESTS: + + check that :issue:`37678` is fixed:: + + sage: C = ChainComplex(base_ring=ZZ) + sage: ascii_art(C()) + [] + """ from sage.typeset.ascii_art import AsciiArt @@ -468,6 +477,8 @@ def _unicode_art_(self): ⎛1⎞ d_2 d_1 ⎛4⎞ d_0 ⎜2⎟ d_-1 0 <──── (0) <──── ⎝5⎠ <──── ⎝3⎠ <───── 0 + sage: unicode_art(C()) + [] """ from sage.typeset.unicode_art import UnicodeArt @@ -495,10 +506,13 @@ def vector_art(d): for n in ordered: result_ordered += arrow_art(n) + vector_art(n) result = [result_ordered] + result - concatenated = result[0] - for r in result[1:]: - concatenated += UnicodeArt([u' ... ']) + r - return concatenated + try: + concatenated = result[0] + for r in result[1:]: + concatenated += AsciiArt([' ... ']) + r + return concatenated + except IndexError: + return [] def is_cycle(self): """ @@ -1778,6 +1792,8 @@ def _ascii_art_(self): sage: ascii_art(D) [1] [1] [0] [1] 0 <-- C_7 <---- C_6 <-- 0 ... 0 <-- C_3 <---- C_2 <---- C_1 <---- C_0 <-- 0 + sage: ascii_art(ChainComplex(base_ring=ZZ)) + [] """ from sage.typeset.ascii_art import AsciiArt @@ -1834,6 +1850,14 @@ def _unicode_art_(self): sage: unicode_art(D) (1) (1) (0) (1) 0 <── C_7 <── C_6 <── 0 ... 0 <── C_3 <── C_2 <── C_1 <── C_0 <── 0 + + TESTS: + + check that :issue:`37678` is fixed:: + + sage: C = ChainComplex(base_ring=ZZ) + sage: unicode_art(C) + [] """ from sage.typeset.unicode_art import UnicodeArt @@ -1862,10 +1886,13 @@ def module_art(n): for n in ordered: result_ordered += arrow_art(n) + module_art(n) result = [result_ordered] + result - concatenated = result[0] - for r in result[1:]: - concatenated += UnicodeArt([u' ... ']) + r - return concatenated + try: + concatenated = result[0] + for r in result[1:]: + concatenated += AsciiArt([' ... ']) + r + return concatenated + except IndexError: + return [] def _latex_(self): """ From d192d0b693dc0acf49bdc981d6d34ce060e81328 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 28 Mar 2024 10:57:21 +0000 Subject: [PATCH 172/183] UnicodeArt, not AsciiArt (1) Co-authored-by: John H. Palmieri --- src/sage/homology/chain_complex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index 655e5cc1356..a9276905137 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -509,7 +509,7 @@ def vector_art(d): try: concatenated = result[0] for r in result[1:]: - concatenated += AsciiArt([' ... ']) + r + concatenated += UnicodeArt([' ... ']) + r return concatenated except IndexError: return [] From 96621faf2bcd04ac647a83cb646793ed7475d635 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 28 Mar 2024 10:57:42 +0000 Subject: [PATCH 173/183] UnicodeArt, not AsciiArt (2) Co-authored-by: John H. Palmieri --- src/sage/homology/chain_complex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index a9276905137..7c04b99712a 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -1889,7 +1889,7 @@ def module_art(n): try: concatenated = result[0] for r in result[1:]: - concatenated += AsciiArt([' ... ']) + r + concatenated += UnicodeArt([' ... ']) + r return concatenated except IndexError: return [] From a4a25a87901df322289456c2d72c9b67096b9bbd Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 28 Mar 2024 11:10:21 +0000 Subject: [PATCH 174/183] correct test outputs --- src/sage/homology/chain_complex.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index 7c04b99712a..e66f0bf9fc3 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -478,6 +478,10 @@ def _unicode_art_(self): d_2 d_1 ⎛4⎞ d_0 ⎜2⎟ d_-1 0 <──── (0) <──── ⎝5⎠ <──── ⎝3⎠ <───── 0 sage: unicode_art(C()) + ⎛0⎞ + d_2 d_1 ⎛0⎞ d_0 ⎜0⎟ d_-1 + 0 <──── (0) <──── ⎝0⎠ <──── ⎝0⎠ <───── 0 + sage: unicode_art(ChainComplex()) [] """ from sage.typeset.unicode_art import UnicodeArt From c083f7d619db877bbaa42f0824aad823c27bbbf5 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 19 Apr 2024 13:30:00 +0100 Subject: [PATCH 175/183] don't use try/except, and use 0, not [] --- src/sage/homology/chain_complex.py | 60 ++++++++++++++---------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index e66f0bf9fc3..43dfde91848 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -425,7 +425,7 @@ def _ascii_art_(self): sage: C = ChainComplex(base_ring=ZZ) sage: ascii_art(C()) - [] + 0 """ from sage.typeset.ascii_art import AsciiArt @@ -453,13 +453,12 @@ def vector_art(d): for n in ordered: result_ordered += arrow_art(n) + vector_art(n) result = [result_ordered] + result - try: - concatenated = result[0] - for r in result[1:]: - concatenated += AsciiArt([' ... ']) + r - return concatenated - except IndexError: - return [] + if len(result) == 0: + return AsciiArt(['0']) + concatenated = result[0] + for r in result[1:]: + concatenated += AsciiArt([' ... ']) + r + return concatenated def _unicode_art_(self): """ @@ -482,7 +481,7 @@ def _unicode_art_(self): d_2 d_1 ⎛0⎞ d_0 ⎜0⎟ d_-1 0 <──── (0) <──── ⎝0⎠ <──── ⎝0⎠ <───── 0 sage: unicode_art(ChainComplex()) - [] + 0 """ from sage.typeset.unicode_art import UnicodeArt @@ -510,13 +509,12 @@ def vector_art(d): for n in ordered: result_ordered += arrow_art(n) + vector_art(n) result = [result_ordered] + result - try: - concatenated = result[0] - for r in result[1:]: - concatenated += UnicodeArt([' ... ']) + r - return concatenated - except IndexError: - return [] + if len(result) == 0: + return UnicodeArt([u'0']) + concatenated = result[0] + for r in result[1:]: + concatenated += UnicodeArt([u' ... ']) + r + return concatenated def is_cycle(self): """ @@ -1797,7 +1795,7 @@ def _ascii_art_(self): [1] [1] [0] [1] 0 <-- C_7 <---- C_6 <-- 0 ... 0 <-- C_3 <---- C_2 <---- C_1 <---- C_0 <-- 0 sage: ascii_art(ChainComplex(base_ring=ZZ)) - [] + 0 """ from sage.typeset.ascii_art import AsciiArt @@ -1826,13 +1824,12 @@ def module_art(n): for n in ordered: result_ordered += arrow_art(n) + module_art(n) result = [result_ordered] + result - try: - concatenated = result[0] - for r in result[1:]: - concatenated += AsciiArt([' ... ']) + r - return concatenated - except IndexError: - return [] + if len(result) == 0: + return AsciiArt(['0']) + concatenated = result[0] + for r in result[1:]: + concatenated += AsciiArt([' ... ']) + r + return concatenated def _unicode_art_(self): """ @@ -1861,7 +1858,7 @@ def _unicode_art_(self): sage: C = ChainComplex(base_ring=ZZ) sage: unicode_art(C) - [] + 0 """ from sage.typeset.unicode_art import UnicodeArt @@ -1890,13 +1887,12 @@ def module_art(n): for n in ordered: result_ordered += arrow_art(n) + module_art(n) result = [result_ordered] + result - try: - concatenated = result[0] - for r in result[1:]: - concatenated += UnicodeArt([' ... ']) + r - return concatenated - except IndexError: - return [] + if len(result) == 0: + return UnicodeArt([u'0']) + concatenated = result[0] + for r in result[1:]: + concatenated += UnicodeArt([u' ... ']) + r + return concatenated def _latex_(self): """ From d4ff3a2f619cc2c49cd33c4dd2314b55781beca3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 12 Dec 2023 12:34:34 -0800 Subject: [PATCH 176/183] m4/pyproject_toml_metadata.m4: Allow Python 3.12 --- m4/pyproject_toml_metadata.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/m4/pyproject_toml_metadata.m4 b/m4/pyproject_toml_metadata.m4 index 139af7e43e4..0d9824b1f2e 100644 --- a/m4/pyproject_toml_metadata.m4 +++ b/m4/pyproject_toml_metadata.m4 @@ -13,6 +13,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Mathematics", ] From 8fdedff46875cd1983e50317aa34e1fd3430e5c7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 19 Apr 2024 12:28:32 -0700 Subject: [PATCH 177/183] Add 'Programming Language :: Python :: 3.12' to Classifiers --- m4/setup_cfg_metadata.m4 | 1 + pkgs/sage-docbuild/pyproject.toml | 1 + pkgs/sage-setup/pyproject.toml | 1 + 3 files changed, 3 insertions(+) diff --git a/m4/setup_cfg_metadata.m4 b/m4/setup_cfg_metadata.m4 index 896ca37eb7f..fb202433fcd 100644 --- a/m4/setup_cfg_metadata.m4 +++ b/m4/setup_cfg_metadata.m4 @@ -16,5 +16,6 @@ classifiers = Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: Implementation :: CPython Topic :: Scientific/Engineering :: Mathematics diff --git a/pkgs/sage-docbuild/pyproject.toml b/pkgs/sage-docbuild/pyproject.toml index 77840653af0..87e7c6521f8 100644 --- a/pkgs/sage-docbuild/pyproject.toml +++ b/pkgs/sage-docbuild/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Mathematics", ] diff --git a/pkgs/sage-setup/pyproject.toml b/pkgs/sage-setup/pyproject.toml index 4a558643864..96b079cec62 100644 --- a/pkgs/sage-setup/pyproject.toml +++ b/pkgs/sage-setup/pyproject.toml @@ -18,6 +18,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Mathematics", ] From 15aeb9a4db2eedecf7c3205e296ac90d63c94e87 Mon Sep 17 00:00:00 2001 From: Nolord <33145668+Nolord@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:38:46 +0200 Subject: [PATCH 178/183] Bell Polynomial - complete/ordinary variants - Documentation - Tests - Examples - Slightly better implementation Co-Authored-By: Travis Scrimshaw --- src/doc/en/reference/references/index.rst | 4 + src/sage/combinat/combinat.py | 166 ++++++++++++++++++---- 2 files changed, 146 insertions(+), 24 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index aa1aa130d32..a63d60aef75 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -1801,6 +1801,10 @@ REFERENCES: .. [Com2019] Camille Combe, *Réalisation cubique du poset des intervalles de Tamari*, preprint :arxiv:`1904.00658` +.. [Com1974] Comtet Louis, *Identities and Expansions*. + In: Advanced Combinatorics. 1974. pp. 127-175 + :doi:`10.1007/978-94-010-2196-8_3` + .. [Con] Keith Conrad, *Groups of order 12*, http://www.math.uconn.edu/~kconrad/blurbs/grouptheory/group12.pdf, accessed 21 October 2009. diff --git a/src/sage/combinat/combinat.py b/src/sage/combinat/combinat.py index bd5e7102d66..38348c41c1d 100644 --- a/src/sage/combinat/combinat.py +++ b/src/sage/combinat/combinat.py @@ -2918,42 +2918,123 @@ def unshuffle_iterator(a, one=1) -> Iterator: (one if sign else - one)) -def bell_polynomial(n: Integer, k: Integer): +def bell_polynomial(n: Integer, k=None, ordinary=False): r""" - Return the Bell Polynomial + Return the (partial) (exponential/ordinary) bell Polynomial. + + The partial (exponential) *Bell polynomial* is defined by the formula .. MATH:: - B_{n,k}(x_0, x_1, \ldots, x_{n-k}) = - \sum_{\sum{j_i}=k, \sum{(i+1) j_i}=n} + B_{n,k}(x_0, x_1, \ldots, x_{n-k}) = + \sum_{\substack{j_0 + \ldots + j_{n-k} = k \\ 1 j_0 + \ldots + (n-k+1) j_{n-k} = n}} \frac{n!}{j_0!j_1!\cdots j_{n-k}!} \left(\frac{x_0}{(0+1)!}\right)^{j_0} \left(\frac{x_1}{(1+1)!}\right)^{j_1} \cdots \left(\frac{x_{n-k}}{(n-k+1)!}\right)^{j_{n-k}}. - INPUT: + The complete (exponential) Bell Polynomial is defined as - - ``n`` -- integer + .. MATH:: - - ``k`` -- integer + B_n(x_0, x_1, \ldots, x_{n-k}) = + \sum_{k=0}^n B_{n,k}(x_0, x_1, \ldots, x_{n-k}). - OUTPUT: + The ordinary variant of the partial Bell polynomial is defined by - - a polynomial in `n-k+1` variables over `\ZZ` + .. MATH:: - EXAMPLES:: + \hat B_{n,k}(x_0, x_1, \ldots, x_{n-k}) = + \sum_{\substack{j_0 + \ldots + j_{n-k} = k \\ 1 j_0 + \ldots + (n-k+1) j_{n-k} = n}} + \binom{k}{j_0, j_1, \ldots, j_{n-k}} + x_0^{j_0} x_1^{j_1} \cdots x_{n-k}^{j_{n-k}}, + + where we have used the multinomial coefficient. + The complete version has the same definition as its exponential counterpart. + + If we define `f(z) = \sum_{n=1}^\infty x_{n-1} z^n/n!` + then these are alternative definitions for exponential Bell polynomials + + .. MATH:: + + \begin{aligned} + \exp(f(z)) & = \sum_{n=0}^\infty B_n(x_0, \ldots, x_{n-1}) \frac{z^n}{n!}, \\ + \frac{f(z)^k}{k!} & = \sum_{n=k}^\infty B_{n, k}(x_0, \ldots, x_{n-k}) \frac{z^n}{n!}. + \end{aligned} + + Defining `g(z) = \sum_{n=1}^\infty x_{n-1} z^n`, + we have the analoguous alternative definitions + + .. MATH:: + + \begin{aligned} + \frac1{1-f(z)} & = \sum_{n=0}^\infty \hat B_n(x_0, \ldots, x_{n-1}) z^n, \\ + f(z)^k & = \sum_{n=k}^\infty \hat B_{n, k}(x_0, \ldots, x_{n-k}) z^n, + \end{aligned} + + (see reference). + + INPUT: + + - ``k`` -- (optional) if specified, returns the partial Bell + polynomial, otherwise returns the complete Bell polynomial + - ``ordinary`` -- (default: ``False``) if ``True``, returns the + (partial) ordinary Bell polynomial, otherwise returns + the (partial) exponential Bell polynomial - sage: bell_polynomial(6,2) # needs sage.combinat - 10*x2^2 + 15*x1*x3 + 6*x0*x4 - sage: bell_polynomial(6,3) # needs sage.combinat + EXAMPLES: + + The complete and partial Bell polynomials:: + + sage: # needs sage.combinat + sage: bell_polynomial(3) + x0^3 + 3*x0*x1 + x2 + sage: bell_polynomial(4) + x0^4 + 6*x0^2*x1 + 3*x1^2 + 4*x0*x2 + x3 + sage: bell_polynomial(6, 3) 15*x1^3 + 60*x0*x1*x2 + 15*x0^2*x3 + sage: bell_polynomial(6, 6) + x0^6 + + The ordinary variants are:: + + sage: # needs sage.combinat sage.arith + sage: bell_polynomial(3, ordinary=True) + x0^3 + 2*x0*x1 + x2 + sage: bell_polynomial(4, ordinary=True) + x0^4 + 3*x0^2*x1 + x1^2 + 2*x0*x2 + x3 + sage: bell_polynomial(6, 3, True) + x1^3 + 6*x0*x1*x2 + 3*x0^2*x3 + sage: bell_polynomial(6, 6, True) + x0^6 + + We verify the alternative definition of the different Bell polynomials + using the functions `f` and `g` given above:: + + sage: # needs sage.combinat sage.arith + sage: n = 6 # positive integer + sage: k = 4 # positive integer + sage: R. = InfinitePolynomialRing(QQ) + sage: PR = PolynomialRing(QQ, 'x', n) + sage: d = {x[i]: PR.gen(i) for i in range(n)} #substitution dictionnary + sage: L. = LazyPowerSeriesRing(R) + sage: f = L(lambda i: x[i-1]/factorial(i), valuation=1) + sage: all(exp(f)[i].subs(d) * factorial(i) == bell_polynomial(i) for i in range(n+1)) + True + sage: all((f^k/factorial(k))[i].subs(d) * factorial(i) == bell_polynomial(i, k) for i in range(k, n+k)) + True + sage: g = L(lambda i: x[i-1], valuation=1) + sage: all((1/(1-g))[i].subs(d) == bell_polynomial(i, ordinary=True) for i in range(n+1)) + True + sage: all((g^k)[i].subs(d) == bell_polynomial(i, k, True) for i in range(k, n+k)) + True TESTS: Check that :issue:`18338` is fixed:: - sage: bell_polynomial(0,0).parent() # needs sage.combinat - Multivariate Polynomial Ring in x over Integer Ring + sage: bell_polynomial(0, 0).parent() # needs sage.combinat + Univariate Polynomial Ring in x0 over Integer Ring sage: for n in (0..4): # needs sage.combinat ....: print([bell_polynomial(n,k).coefficients() for k in (0..n)]) @@ -2963,28 +3044,65 @@ def bell_polynomial(n: Integer, k: Integer): [[], [1], [3], [1]] [[], [1], [3, 4], [6], [1]] + Further checks for :issue:`37727`:: + + sage: # needs sage.combinat sage.arith + sage: bell_polynomial(0, 0) + 1 + sage: bell_polynomial(0, 0, True) + 1 + sage: bell_polynomial(1, 1) + x0 + sage: bell_polynomial(2, 2, True) + x0^2 + sage: bell_polynomial(5) + x0^5 + 10*x0^3*x1 + 15*x0*x1^2 + 10*x0^2*x2 + 10*x1*x2 + 5*x0*x3 + x4 + sage: sum(bell_polynomial(5, k) for k in range(6)) + x0^5 + 10*x0^3*x1 + 15*x0*x1^2 + 10*x0^2*x2 + 10*x1*x2 + 5*x0*x3 + x4 + sage: bell_polynomial(5, None, True) + x0^5 + 4*x0^3*x1 + 3*x0*x1^2 + 3*x0^2*x2 + 2*x1*x2 + 2*x0*x3 + x4 + sage: sum(bell_polynomial(5, k, True) for k in range(6)) + x0^5 + 4*x0^3*x1 + 3*x0*x1^2 + 3*x0^2*x2 + 2*x1*x2 + 2*x0*x3 + x4 + sage: bell_polynomial(0).parent() + Univariate Polynomial Ring in x0 over Integer Ring REFERENCES: - [Bel1927]_ + - [Com1974]_ AUTHORS: - Blair Sutton (2009-01-26) - Thierry Monteil (2015-09-29): the result must always be a polynomial. + - Kei Beauduin (2024-04-06): when univariate, + the polynomial is in variable ``x0``. extended to complete exponential, + partial ordinary and complete ordinary Bell polynomials. """ from sage.combinat.partition import Partitions - R = PolynomialRing(ZZ, 'x', n - k + 1) + from sage.arith.misc import multinomial + if k is None: + partitions = Partitions(n) + # We set k = 1 to use the correct ring + # It is not used in the computation otherwise + k = 1 + else: + partitions = Partitions(n, length=k) + if n <= k: + R = PolynomialRing(ZZ, 'x0') + else: + R = PolynomialRing(ZZ, 'x', n - k + 1) vars = R.gens() result = R.zero() - for p in Partitions(n, length=k): # type:ignore - factorial_product = 1 - power_factorial_product = 1 - for part, count in p.to_exp_dict().items(): - factorial_product *= factorial(count) - power_factorial_product *= factorial(part)**count - coefficient = factorial(n) // (factorial_product * power_factorial_product) - result += coefficient * prod([vars[i - 1] for i in p]) + for p in partitions: + if ordinary: + coefficient = multinomial(p.to_exp()) + else: + factorial_product = 1 + for part, count in p.to_exp_dict().items(): + factorial_product *= factorial(count) * factorial(part)**count + coefficient = factorial(n) // factorial_product + result += coefficient * prod(vars[i - 1] for i in p) return result From c4ca655fdb3746de4f55806b784d57fc24a07a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Tue, 16 Jan 2024 17:16:42 -0300 Subject: [PATCH 179/183] sagemath-standard: include sage_setup in sdist --- pkgs/sagemath-standard/sage_setup | 1 + src/MANIFEST.in | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 120000 pkgs/sagemath-standard/sage_setup diff --git a/pkgs/sagemath-standard/sage_setup b/pkgs/sagemath-standard/sage_setup new file mode 120000 index 00000000000..88b8133df49 --- /dev/null +++ b/pkgs/sagemath-standard/sage_setup @@ -0,0 +1 @@ +../../src/sage_setup \ No newline at end of file diff --git a/src/MANIFEST.in b/src/MANIFEST.in index 89d9d8e368e..a4613448097 100644 --- a/src/MANIFEST.in +++ b/src/MANIFEST.in @@ -3,10 +3,15 @@ include VERSION.txt recursive-include sage *.pxi *.pxd *.h *.hpp prune sage/ext/interpreters # In particular, __init__.py must not be present in the distribution; or sage_setup.autogen.interpreters.rebuild will not generate the code -prune sage_setup prune sage_docbuild prune doc +# include sage_setup +recursive-include sage_setup * +prune sage_setup/autogen/flint* +exclude sage_setup/autogen/flint* +exclude sage_setup/autogen/giacpy* + # # Most C and C++ files are generated by Cython and should not # be included in the sdist. From 4c3e451d593b1e75d3c9bd477bff09bc573e48e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 10 Feb 2024 16:15:28 -0300 Subject: [PATCH 180/183] sagemath-standard: remove sage_setup from build requirements --- src/pyproject.toml.m4 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pyproject.toml.m4 b/src/pyproject.toml.m4 index 7406c7ff359..26de30ea108 100644 --- a/src/pyproject.toml.m4 +++ b/src/pyproject.toml.m4 @@ -1,11 +1,9 @@ [build-system] # Minimum requirements for the build system to execute. requires = [ - "sage_setup[autogen]", esyscmd(`sage-get-system-packages install-requires-toml \ setuptools \ wheel \ - sage_setup \ cypari \ cysignals \ cython \ From 0c8d74275bc814c4898af714a08b1946d4aee7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 12 Feb 2024 14:58:10 -0300 Subject: [PATCH 181/183] don't install sage-setup in conda --- .devcontainer/onCreate-conda.sh | 1 - .github/workflows/ci-conda.yml | 1 - .gitpod.yml | 1 - src/doc/en/installation/conda.rst | 1 - 4 files changed, 4 deletions(-) diff --git a/.devcontainer/onCreate-conda.sh b/.devcontainer/onCreate-conda.sh index f0251185c62..0904ebe7c16 100755 --- a/.devcontainer/onCreate-conda.sh +++ b/.devcontainer/onCreate-conda.sh @@ -8,5 +8,4 @@ conda init bash # Build sage conda run -n sage-dev ./bootstrap -conda run -n sage-dev pip install --no-build-isolation -v -v -e ./pkgs/sage-setup conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index b01b041a975..92408b50aea 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -87,7 +87,6 @@ jobs: shell: bash -l {0} run: | # Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda. - pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-setup pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src env: SAGE_NUM_THREADS: 2 diff --git a/.gitpod.yml b/.gitpod.yml index a91131f4e7a..6d7c9ec93df 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -11,7 +11,6 @@ tasks: && conda config --append envs_dirs $(pwd) && conda activate $(pwd)/venv && ./bootstrap - && pip install --no-build-isolation -v -v -e ./pkgs/sage-setup && pip install --no-build-isolation -v -v -e ./src # Activate conda environment, set up Trac remote # RestructuredText extension recommends python extension, although we have already installed it diff --git a/src/doc/en/installation/conda.rst b/src/doc/en/installation/conda.rst index 2191374cea2..49495d60ebf 100644 --- a/src/doc/en/installation/conda.rst +++ b/src/doc/en/installation/conda.rst @@ -138,7 +138,6 @@ Here we assume that you are using a git checkout. - Bootstrap the source tree and install the build prerequisites and the Sage library:: $ ./bootstrap - $ pip install --no-build-isolation -v -v --editable ./pkgs/sage-setup $ pip install --no-build-isolation --config-settings editable_mode=compat -v -v --editable ./src If you encounter any errors, try to install the ``sage-conf`` package first:: From 1f28d78b3984bed171f3f34c52d374c74de0f527 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 23 Apr 2024 22:30:04 -0700 Subject: [PATCH 182/183] build/pkgs/pyscipopt/patches/792.patch: Remove --- build/pkgs/pyscipopt/patches/792.patch | 1217 ------------------------ 1 file changed, 1217 deletions(-) delete mode 100644 build/pkgs/pyscipopt/patches/792.patch diff --git a/build/pkgs/pyscipopt/patches/792.patch b/build/pkgs/pyscipopt/patches/792.patch deleted file mode 100644 index faff6076eb4..00000000000 --- a/build/pkgs/pyscipopt/patches/792.patch +++ /dev/null @@ -1,1217 +0,0 @@ -From 96acc6be39b6d153cfcfe7b14741956eaf7f5851 Mon Sep 17 00:00:00 2001 -From: Matthias Koeppe -Date: Sun, 18 Feb 2024 19:47:52 -0800 -Subject: [PATCH] src/pyscipopt: Add 'noexcept' to functions that use 'with - gil' - ---- - src/pyscipopt/benders.pxi | 30 ++++++++--------- - src/pyscipopt/benderscut.pxi | 14 ++++---- - src/pyscipopt/branchrule.pxi | 18 +++++----- - src/pyscipopt/conshdlr.pxi | 64 ++++++++++++++++++------------------ - src/pyscipopt/cutsel.pxi | 14 ++++---- - src/pyscipopt/event.pxi | 18 +++++----- - src/pyscipopt/heuristic.pxi | 14 ++++---- - src/pyscipopt/nodesel.pxi | 16 ++++----- - src/pyscipopt/presol.pxi | 14 ++++---- - src/pyscipopt/pricer.pxi | 16 ++++----- - src/pyscipopt/propagator.pxi | 22 ++++++------- - src/pyscipopt/reader.pxi | 8 ++--- - src/pyscipopt/relax.pxi | 14 ++++---- - src/pyscipopt/scip.pxd | 2 +- - src/pyscipopt/scip.pxi | 4 +-- - src/pyscipopt/sepa.pxi | 16 ++++----- - 16 files changed, 142 insertions(+), 142 deletions(-) - -diff --git a/src/pyscipopt/benders.pxi b/src/pyscipopt/benders.pxi -index 3e11db189..66a394d8d 100644 ---- a/src/pyscipopt/benders.pxi -+++ b/src/pyscipopt/benders.pxi -@@ -70,10 +70,10 @@ cdef Variable getPyVar(SCIP_VAR* var): - return vardata - - --cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_Bool threadsafe) with gil: -+cdef SCIP_RETCODE PyBendersCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_Bool threadsafe) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -81,56 +81,56 @@ cdef SCIP_RETCODE PyBendersFree (SCIP* scip, SCIP_BENDERS* benders) with gil: - Py_DECREF(PyBenders) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersInit (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersExit (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersInitpre (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersinitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersExitpre (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersexitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersInitsol (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders) with gil: -+cdef SCIP_RETCODE PyBendersExitsol (SCIP* scip, SCIP_BENDERS* benders) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.bendersexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) with gil: -+cdef SCIP_RETCODE PyBendersCreatesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata - PyBenders.benderscreatesub(probnumber) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* infeasible, SCIP_Bool* auxviol, SCIP_Bool* skipsolve, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool* infeasible, SCIP_Bool* auxviol, SCIP_Bool* skipsolve, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -146,7 +146,7 @@ cdef SCIP_RETCODE PyBendersPresubsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_ - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Bool onlyconvex, SCIP_Real* objective, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -159,7 +159,7 @@ cdef SCIP_RETCODE PyBendersSolvesubconvex (SCIP* scip, SCIP_BENDERS* benders, SC - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, int probnumber, SCIP_Real* objective, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -174,7 +174,7 @@ cdef SCIP_RETCODE PyBendersSolvesub (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL - - cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SOL* sol, - SCIP_BENDERSENFOTYPE type, int* mergecands, int npriomergecands, int nmergecands, SCIP_Bool checkint, -- SCIP_Bool infeasible, SCIP_Bool* merged) with gil: -+ SCIP_Bool infeasible, SCIP_Bool* merged) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -190,7 +190,7 @@ cdef SCIP_RETCODE PyBendersPostsolve (SCIP* scip, SCIP_BENDERS* benders, SCIP_SO - merged[0] = result_dict.get("merged", False) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) with gil: -+cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probnumber) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -@@ -198,7 +198,7 @@ cdef SCIP_RETCODE PyBendersFreesub (SCIP* scip, SCIP_BENDERS* benders, int probn - return SCIP_OKAY - - #TODO: Really need to ask about the passing and returning of variables --cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber) with gil: -+cdef SCIP_RETCODE PyBendersGetvar (SCIP* scip, SCIP_BENDERS* benders, SCIP_VAR* var, SCIP_VAR** mappedvar, int probnumber) noexcept with gil: - cdef SCIP_BENDERSDATA* bendersdata - bendersdata = SCIPbendersGetData(benders) - PyBenders = bendersdata -diff --git a/src/pyscipopt/benderscut.pxi b/src/pyscipopt/benderscut.pxi -index 506a6f065..1ce561a06 100644 ---- a/src/pyscipopt/benderscut.pxi -+++ b/src/pyscipopt/benderscut.pxi -@@ -24,10 +24,10 @@ cdef class Benderscut: - print("python error in benderscutexec: this method needs to be implemented") - return {} - --cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutCopy (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata -@@ -35,35 +35,35 @@ cdef SCIP_RETCODE PyBenderscutFree (SCIP* scip, SCIP_BENDERSCUT* benderscut) wit - Py_DECREF(PyBenderscut) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutInit (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutExit (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutInitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) with gil: -+cdef SCIP_RETCODE PyBenderscutExitsol (SCIP* scip, SCIP_BENDERSCUT* benderscut) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata - PyBenderscut.benderscutexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBenderscutExec (SCIP* scip, SCIP_BENDERS* benders, SCIP_BENDERSCUT* benderscut, SCIP_SOL* sol, int probnumber, SCIP_BENDERSENFOTYPE type, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BENDERSCUTDATA* benderscutdata - benderscutdata = SCIPbenderscutGetData(benderscut) - PyBenderscut = benderscutdata -diff --git a/src/pyscipopt/branchrule.pxi b/src/pyscipopt/branchrule.pxi -index 251aa33b1..2d3411d2c 100644 ---- a/src/pyscipopt/branchrule.pxi -+++ b/src/pyscipopt/branchrule.pxi -@@ -39,10 +39,10 @@ cdef class Branchrule: - - - --cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleCopy (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -@@ -50,35 +50,35 @@ cdef SCIP_RETCODE PyBranchruleFree (SCIP* scip, SCIP_BRANCHRULE* branchrule) wit - Py_DECREF(PyBranchrule) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleInit (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleExit (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleInitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) with gil: -+cdef SCIP_RETCODE PyBranchruleExitsol (SCIP* scip, SCIP_BRANCHRULE* branchrule) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata - PyBranchrule.branchexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -@@ -86,7 +86,7 @@ cdef SCIP_RETCODE PyBranchruleExeclp (SCIP* scip, SCIP_BRANCHRULE* branchrule, S - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -@@ -94,7 +94,7 @@ cdef SCIP_RETCODE PyBranchruleExecext(SCIP* scip, SCIP_BRANCHRULE* branchrule, S - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyBranchruleExecps(SCIP* scip, SCIP_BRANCHRULE* branchrule, SCIP_Bool allowaddcons, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_BRANCHRULEDATA* branchruledata - branchruledata = SCIPbranchruleGetData(branchrule) - PyBranchrule = branchruledata -diff --git a/src/pyscipopt/conshdlr.pxi b/src/pyscipopt/conshdlr.pxi -index 80c60c17c..1299ad35c 100644 ---- a/src/pyscipopt/conshdlr.pxi -+++ b/src/pyscipopt/conshdlr.pxi -@@ -150,16 +150,16 @@ cdef Constraint getPyCons(SCIP_CONS* cons): - - - --cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid) with gil: -+cdef SCIP_RETCODE PyConshdlrCopy (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_Bool* valid) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) with gil: -+cdef SCIP_RETCODE PyConsFree (SCIP* scip, SCIP_CONSHDLR* conshdlr) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consfree() - Py_DECREF(PyConshdlr) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -167,7 +167,7 @@ cdef SCIP_RETCODE PyConsInit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** c - PyConshdlr.consinit(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -175,7 +175,7 @@ cdef SCIP_RETCODE PyConsExit (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** c - PyConshdlr.consexit(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -183,7 +183,7 @@ cdef SCIP_RETCODE PyConsInitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consinitpre(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -191,7 +191,7 @@ cdef SCIP_RETCODE PyConsExitpre (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consexitpre(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -199,7 +199,7 @@ cdef SCIP_RETCODE PyConsInitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consinitsol(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) with gil: -+cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool restart) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -207,7 +207,7 @@ cdef SCIP_RETCODE PyConsExitsol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consexitsol(constraints, restart) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata) with gil: -+cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_CONSDATA** consdata) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - assert consdata[0] == PyCons -@@ -216,7 +216,7 @@ cdef SCIP_RETCODE PyConsDelete (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - Py_DECREF(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons) with gil: -+cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* sourcecons, SCIP_CONS** targetcons) noexcept with gil: - cdef Constraint PyTargetCons - PyConshdlr = getPyConshdlr(conshdlr) - PySourceCons = getPyCons(sourcecons) -@@ -235,7 +235,7 @@ cdef SCIP_RETCODE PyConsTrans (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* s - PySourceCons.isRemovable(), PySourceCons.isStickingAtNode())) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) with gil: -+cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_Bool* infeasible) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -244,7 +244,7 @@ cdef SCIP_RETCODE PyConsInitlp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - infeasible[0] = result_dict.get("infeasible", infeasible[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -254,7 +254,7 @@ cdef SCIP_RETCODE PyConsSepalp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, -- SCIP_SOL* sol, SCIP_RESULT* result) with gil: -+ SCIP_SOL* sol, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -265,7 +265,7 @@ cdef SCIP_RETCODE PyConsSepasol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, -- SCIP_Bool solinfeasible, SCIP_RESULT* result) with gil: -+ SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -274,7 +274,7 @@ cdef SCIP_RETCODE PyConsEnfolp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, SCIP_Bool solinfeasible, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -285,7 +285,7 @@ cdef SCIP_RETCODE PyConsEnforelax (SCIP* scip, SCIP_SOL* sol, SCIP_CONSHDLR* con - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, -- SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) with gil: -+ SCIP_Bool solinfeasible, SCIP_Bool objinfeasible, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -295,7 +295,7 @@ cdef SCIP_RETCODE PyConsEnfops (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, SCIP_SOL* sol, SCIP_Bool checkintegrality, -- SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) with gil: -+ SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_Bool completely, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -306,7 +306,7 @@ cdef SCIP_RETCODE PyConsCheck (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsProp (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss, int nusefulconss, int nmarkedconss, -- SCIP_PROPTIMING proptiming, SCIP_RESULT* result) with gil: -+ SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -319,7 +319,7 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, - int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, - int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, -- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: -+ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -354,12 +354,12 @@ cdef SCIP_RETCODE PyConsPresol (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsResprop (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR* infervar, int inferinfo, -- SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) with gil: -+ SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consresprop() - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg) with gil: -+cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_LOCKTYPE locktype, int nlockspos, int nlocksneg) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - if cons == NULL: - PyConshdlr.conslock(None, locktype, nlockspos, nlocksneg) -@@ -368,31 +368,31 @@ cdef SCIP_RETCODE PyConsLock (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* co - PyConshdlr.conslock(PyCons, locktype, nlockspos, nlocksneg) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsActive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consactive(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsDeactive (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consdeactive(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsEnable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consenable(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) with gil: -+cdef SCIP_RETCODE PyConsDisable (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - PyConshdlr.consdisable(PyCons) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) with gil: -+cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** conss, int nconss) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - cdef constraints = [] - for i in range(nconss): -@@ -400,7 +400,7 @@ cdef SCIP_RETCODE PyConsDelvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - PyConshdlr.consdelvars(constraints) - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file) with gil: -+cdef SCIP_RETCODE PyConsPrint (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, FILE* file) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - # TODO: pass file -@@ -411,7 +411,7 @@ cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SC - SCIP_CONS* sourcecons, SCIP_HASHMAP* varmap, SCIP_HASHMAP* consmap, SCIP_Bool initial, - SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, - SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode, -- SCIP_Bool isglobal, SCIP_Bool* valid) with gil: -+ SCIP_Bool isglobal, SCIP_Bool* valid) noexcept with gil: - # TODO everything! - PyConshdlr = getPyConshdlr(sourceconshdlr) - PyConshdlr.conscopy() -@@ -421,14 +421,14 @@ cdef SCIP_RETCODE PyConsCopy (SCIP* scip, SCIP_CONS** cons, const char* name, SC - cdef SCIP_RETCODE PyConsParse (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS** cons, const char* name, const char* str, - SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, - SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, -- SCIP_Bool stickingatnode, SCIP_Bool* success) with gil: -+ SCIP_Bool stickingatnode, SCIP_Bool* success) noexcept with gil: - # TODO everything! - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consparse() - success[0] = False - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success) with gil: -+cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, SCIP_VAR** vars, int varssize, SCIP_Bool* success) noexcept with gil: - # TODO - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) -@@ -436,7 +436,7 @@ cdef SCIP_RETCODE PyConsGetvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* - success[0] = False - return SCIP_OKAY - --cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success) with gil: -+cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS* cons, int* nvars, SCIP_Bool* success) noexcept with gil: - PyConshdlr = getPyConshdlr(conshdlr) - PyCons = getPyCons(cons) - result_dict = PyConshdlr.consgetnvars(PyCons) -@@ -445,7 +445,7 @@ cdef SCIP_RETCODE PyConsGetnvars (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_CONS - return SCIP_OKAY - - cdef SCIP_RETCODE PyConsGetdivebdchgs (SCIP* scip, SCIP_CONSHDLR* conshdlr, SCIP_DIVESET* diveset, SCIP_SOL* sol, -- SCIP_Bool* success, SCIP_Bool* infeasible) with gil: -+ SCIP_Bool* success, SCIP_Bool* infeasible) noexcept with gil: - # TODO - PyConshdlr = getPyConshdlr(conshdlr) - PyConshdlr.consgetdivebdchgs() -diff --git a/src/pyscipopt/cutsel.pxi b/src/pyscipopt/cutsel.pxi -index e953cb1e9..d259fb28e 100644 ---- a/src/pyscipopt/cutsel.pxi -+++ b/src/pyscipopt/cutsel.pxi -@@ -29,10 +29,10 @@ cdef class Cutsel: - return {} - - --cdef SCIP_RETCODE PyCutselCopy (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselCopy (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata -@@ -40,7 +40,7 @@ cdef SCIP_RETCODE PyCutselFree (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: - Py_DECREF(PyCutsel) - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata -@@ -48,21 +48,21 @@ cdef SCIP_RETCODE PyCutselInit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: - return SCIP_OKAY - - --cdef SCIP_RETCODE PyCutselExit (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselExit (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata - PyCutsel.cutselexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselInitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselInitsol (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata - PyCutsel.cutselinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: -+cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cutseldata = SCIPcutselGetData(cutsel) - PyCutsel = cutseldata -@@ -71,7 +71,7 @@ cdef SCIP_RETCODE PyCutselExitsol (SCIP* scip, SCIP_CUTSEL* cutsel) with gil: - - cdef SCIP_RETCODE PyCutselSelect (SCIP* scip, SCIP_CUTSEL* cutsel, SCIP_ROW** cuts, int ncuts, - SCIP_ROW** forcedcuts, int nforcedcuts, SCIP_Bool root, int maxnselectedcuts, -- int* nselectedcuts, SCIP_RESULT* result) with gil: -+ int* nselectedcuts, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_CUTSELDATA* cutseldata - cdef SCIP_ROW* scip_row - cutseldata = SCIPcutselGetData(cutsel) -diff --git a/src/pyscipopt/event.pxi b/src/pyscipopt/event.pxi -index 95c8bc1f4..914e882ed 100644 ---- a/src/pyscipopt/event.pxi -+++ b/src/pyscipopt/event.pxi -@@ -39,48 +39,48 @@ cdef class Eventhdlr: - - - # local helper functions for the interface --cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef Eventhdlr getPyEventhdlr(SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - cdef SCIP_EVENTHDLRDATA* eventhdlrdata - eventhdlrdata = SCIPeventhdlrGetData(eventhdlr) - return eventhdlrdata - --cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventCopy (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventcopy() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventFree (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventfree() - Py_DECREF(PyEventhdlr) - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventInit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventExit (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventInitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) with gil: -+cdef SCIP_RETCODE PyEventExitsol (SCIP* scip, SCIP_EVENTHDLR* eventhdlr) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata) with gil: -+cdef SCIP_RETCODE PyEventDelete (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA** eventdata) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEventhdlr.eventdelete() - return SCIP_OKAY - --cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata) with gil: -+cdef SCIP_RETCODE PyEventExec (SCIP* scip, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENT* event, SCIP_EVENTDATA* eventdata) noexcept with gil: - PyEventhdlr = getPyEventhdlr(eventhdlr) - PyEvent = Event() - PyEvent.event = event -diff --git a/src/pyscipopt/heuristic.pxi b/src/pyscipopt/heuristic.pxi -index 2980a1aee..930315630 100644 ---- a/src/pyscipopt/heuristic.pxi -+++ b/src/pyscipopt/heuristic.pxi -@@ -31,10 +31,10 @@ cdef class Heur: - - - --cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurCopy (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata -@@ -42,35 +42,35 @@ cdef SCIP_RETCODE PyHeurFree (SCIP* scip, SCIP_HEUR* heur) with gil: - Py_DECREF(PyHeur) - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurInit (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurExit (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurInitsol (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) with gil: -+cdef SCIP_RETCODE PyHeurExitsol (SCIP* scip, SCIP_HEUR* heur) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata - PyHeur.heurexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyHeurExec (SCIP* scip, SCIP_HEUR* heur, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_HEURDATA* heurdata - heurdata = SCIPheurGetData(heur) - PyHeur = heurdata -diff --git a/src/pyscipopt/nodesel.pxi b/src/pyscipopt/nodesel.pxi -index 4d795bc9d..a3e832f15 100644 ---- a/src/pyscipopt/nodesel.pxi -+++ b/src/pyscipopt/nodesel.pxi -@@ -42,10 +42,10 @@ cdef class Nodesel: - return 0 - - --cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselCopy (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -@@ -53,7 +53,7 @@ cdef SCIP_RETCODE PyNodeselFree (SCIP* scip, SCIP_NODESEL* nodesel) with gil: - Py_DECREF(PyNodesel) - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -@@ -61,28 +61,28 @@ cdef SCIP_RETCODE PyNodeselInit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: - return SCIP_OKAY - - --cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselExit (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata - PyNodesel.nodeexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselInitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata - PyNodesel.nodeinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) with gil: -+cdef SCIP_RETCODE PyNodeselExitsol (SCIP* scip, SCIP_NODESEL* nodesel) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata - PyNodesel.nodeexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) with gil: -+cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE** selnode) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -@@ -91,7 +91,7 @@ cdef SCIP_RETCODE PyNodeselSelect (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* - selnode[0] = selected_node.scip_node - return SCIP_OKAY - --cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) with gil: -+cdef int PyNodeselComp (SCIP* scip, SCIP_NODESEL* nodesel, SCIP_NODE* node1, SCIP_NODE* node2) noexcept with gil: - cdef SCIP_NODESELDATA* nodeseldata - nodeseldata = SCIPnodeselGetData(nodesel) - PyNodesel = nodeseldata -diff --git a/src/pyscipopt/presol.pxi b/src/pyscipopt/presol.pxi -index d2b9115a5..13bd9a623 100644 ---- a/src/pyscipopt/presol.pxi -+++ b/src/pyscipopt/presol.pxi -@@ -30,10 +30,10 @@ cdef class Presol: - - - --cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolCopy (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -@@ -41,14 +41,14 @@ cdef SCIP_RETCODE PyPresolFree (SCIP* scip, SCIP_PRESOL* presol) with gil: - Py_DECREF(PyPresol) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolInit (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata - PyPresol.presolinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -@@ -56,14 +56,14 @@ cdef SCIP_RETCODE PyPresolExit (SCIP* scip, SCIP_PRESOL* presol) with gil: - return SCIP_OKAY - - --cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolInitpre (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata - PyPresol.presolinitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol) with gil: -+cdef SCIP_RETCODE PyPresolExitpre (SCIP* scip, SCIP_PRESOL* presol) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -@@ -74,7 +74,7 @@ cdef SCIP_RETCODE PyPresolExec (SCIP* scip, SCIP_PRESOL* presol, int nrounds, SC - int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, - int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, - int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, -- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: -+ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PRESOLDATA* presoldata - presoldata = SCIPpresolGetData(presol) - PyPresol = presoldata -diff --git a/src/pyscipopt/pricer.pxi b/src/pyscipopt/pricer.pxi -index 1368572de..a218b254c 100644 ---- a/src/pyscipopt/pricer.pxi -+++ b/src/pyscipopt/pricer.pxi -@@ -33,10 +33,10 @@ cdef class Pricer: - - - --cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid) with gil: -+cdef SCIP_RETCODE PyPricerCopy (SCIP* scip, SCIP_PRICER* pricer, SCIP_Bool* valid) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata -@@ -44,35 +44,35 @@ cdef SCIP_RETCODE PyPricerFree (SCIP* scip, SCIP_PRICER* pricer) with gil: - Py_DECREF(PyPricer) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerInit (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerExit (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerInitsol (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer) with gil: -+cdef SCIP_RETCODE PyPricerExitsol (SCIP* scip, SCIP_PRICER* pricer) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata - PyPricer.pricerexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* lowerbound, SCIP_Bool* stopearly, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata -@@ -82,7 +82,7 @@ cdef SCIP_RETCODE PyPricerRedcost (SCIP* scip, SCIP_PRICER* pricer, SCIP_Real* l - stopearly[0] = result_dict.get("stopearly", stopearly[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyPricerFarkas (SCIP* scip, SCIP_PRICER* pricer, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PRICERDATA* pricerdata - pricerdata = SCIPpricerGetData(pricer) - PyPricer = pricerdata -diff --git a/src/pyscipopt/propagator.pxi b/src/pyscipopt/propagator.pxi -index d792577d9..4508efe78 100644 ---- a/src/pyscipopt/propagator.pxi -+++ b/src/pyscipopt/propagator.pxi -@@ -47,10 +47,10 @@ cdef class Prop: - - - --cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropCopy (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -58,42 +58,42 @@ cdef SCIP_RETCODE PyPropFree (SCIP* scip, SCIP_PROP* prop) with gil: - Py_DECREF(PyProp) - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropInit (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropExit (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropInitpre (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propinitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropExitpre (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propexitpre() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop) with gil: -+cdef SCIP_RETCODE PyPropInitsol (SCIP* scip, SCIP_PROP* prop) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata - PyProp.propinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart) with gil: -+cdef SCIP_RETCODE PyPropExitsol (SCIP* scip, SCIP_PROP* prop, SCIP_Bool restart) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -104,7 +104,7 @@ cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_P - int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, - int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, - int* nfixedvars, int* naggrvars, int* nchgvartypes, int* nchgbds, int* naddholes, -- int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) with gil: -+ int* ndelconss, int* naddconss, int* nupgdconss, int* nchgcoefs, int* nchgsides, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -137,7 +137,7 @@ cdef SCIP_RETCODE PyPropPresol (SCIP* scip, SCIP_PROP* prop, int nrounds, SCIP_P - nchgsides[0] = result_dict["nchgsides"] - return SCIP_OKAY - --cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING proptiming, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PROPDATA* propdata - propdata = SCIPpropGetData(prop) - PyProp = propdata -@@ -147,7 +147,7 @@ cdef SCIP_RETCODE PyPropExec (SCIP* scip, SCIP_PROP* prop, SCIP_PROPTIMING propt - return SCIP_OKAY - - cdef SCIP_RETCODE PyPropResProp (SCIP* scip, SCIP_PROP* prop, SCIP_VAR* infervar, int inferinfo, -- SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) with gil: -+ SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX* bdchgidx, SCIP_Real relaxedbd, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_PROPDATA* propdata - cdef SCIP_VAR* tmp - tmp = infervar -diff --git a/src/pyscipopt/reader.pxi b/src/pyscipopt/reader.pxi -index df0b3a288..2c45585d6 100644 ---- a/src/pyscipopt/reader.pxi -+++ b/src/pyscipopt/reader.pxi -@@ -18,10 +18,10 @@ cdef class Reader: - return {} - - --cdef SCIP_RETCODE PyReaderCopy (SCIP* scip, SCIP_READER* reader) with gil: -+cdef SCIP_RETCODE PyReaderCopy (SCIP* scip, SCIP_READER* reader) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) with gil: -+cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) noexcept with gil: - cdef SCIP_READERDATA* readerdata - readerdata = SCIPreaderGetData(reader) - PyReader = readerdata -@@ -29,7 +29,7 @@ cdef SCIP_RETCODE PyReaderFree (SCIP* scip, SCIP_READER* reader) with gil: - Py_DECREF(PyReader) - return SCIP_OKAY - --cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyReaderRead (SCIP* scip, SCIP_READER* reader, const char* filename, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_READERDATA* readerdata - readerdata = SCIPreaderGetData(reader) - PyReader = readerdata -@@ -44,7 +44,7 @@ cdef SCIP_RETCODE PyReaderWrite (SCIP* scip, SCIP_READER* reader, FILE* file, - SCIP_VAR** vars, int nvars, int nbinvars, int nintvars, int nimplvars, int ncontvars, - SCIP_VAR** fixedvars, int nfixedvars, int startnvars, - SCIP_CONS** conss, int nconss, int maxnconss, int startnconss, -- SCIP_Bool genericnames, SCIP_RESULT* result) with gil: -+ SCIP_Bool genericnames, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_READERDATA* readerdata - readerdata = SCIPreaderGetData(reader) - cdef int fd = fileno(file) -diff --git a/src/pyscipopt/relax.pxi b/src/pyscipopt/relax.pxi -index 2b52c2643..81695e8bb 100644 ---- a/src/pyscipopt/relax.pxi -+++ b/src/pyscipopt/relax.pxi -@@ -30,10 +30,10 @@ cdef class Relax: - return{} - - --cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxCopy (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata -@@ -41,35 +41,35 @@ cdef SCIP_RETCODE PyRelaxFree (SCIP* scip, SCIP_RELAX* relax) with gil: - Py_DECREF(PyRelax) - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxInit (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxinit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxExit (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxInitsol (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxinitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax) with gil: -+cdef SCIP_RETCODE PyRelaxExitsol (SCIP* scip, SCIP_RELAX* relax) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata - PyRelax.relaxexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result) with gil: -+cdef SCIP_RETCODE PyRelaxExec (SCIP* scip, SCIP_RELAX* relax, SCIP_Real* lowerbound, SCIP_RESULT* result) noexcept with gil: - cdef SCIP_RELAXDATA* relaxdata - relaxdata = SCIPrelaxGetData(relax) - PyRelax = relaxdata -diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd -index 12815dbc4..f35a42486 100644 ---- a/src/pyscipopt/scip.pxd -+++ b/src/pyscipopt/scip.pxd -@@ -501,7 +501,7 @@ cdef extern from "scip/scip.h": - ctypedef union SCIP_DOMCHG: - pass - -- ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) -+ ctypedef void (*messagecallback) (SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept - ctypedef void (*errormessagecallback) (void *data, FILE *file, const char *msg) - ctypedef SCIP_RETCODE (*messagehdlrfree) (SCIP_MESSAGEHDLR *messagehdlr) - -diff --git a/src/pyscipopt/scip.pxi b/src/pyscipopt/scip.pxi -index 0b2332d88..552197785 100644 ---- a/src/pyscipopt/scip.pxi -+++ b/src/pyscipopt/scip.pxi -@@ -975,10 +975,10 @@ cdef class Constraint: - and self.scip_cons == (other).scip_cons) - - --cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg): -+cdef void relayMessage(SCIP_MESSAGEHDLR *messagehdlr, FILE *file, const char *msg) noexcept: - sys.stdout.write(msg.decode('UTF-8')) - --cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg): -+cdef void relayErrorMessage(void *messagehdlr, FILE *file, const char *msg) noexcept: - sys.stderr.write(msg.decode('UTF-8')) - - # - remove create(), includeDefaultPlugins(), createProbBasic() methods -diff --git a/src/pyscipopt/sepa.pxi b/src/pyscipopt/sepa.pxi -index 271945db1..94355a7d2 100644 ---- a/src/pyscipopt/sepa.pxi -+++ b/src/pyscipopt/sepa.pxi -@@ -34,10 +34,10 @@ cdef class Sepa: - - - --cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaCopy (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata -@@ -45,35 +45,35 @@ cdef SCIP_RETCODE PySepaFree (SCIP* scip, SCIP_SEPA* sepa) with gil: - Py_DECREF(PySepa) - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaInit (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepainit() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaExit (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepaexit() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaInitsol (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepainitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa) with gil: -+cdef SCIP_RETCODE PySepaExitsol (SCIP* scip, SCIP_SEPA* sepa) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata - PySepa.sepaexitsol() - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal, int depth) with gil: -+cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result, unsigned int allowlocal, int depth) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - PySepa = sepadata -@@ -81,7 +81,7 @@ cdef SCIP_RETCODE PySepaExeclp (SCIP* scip, SCIP_SEPA* sepa, SCIP_RESULT* result - result[0] = result_dict.get("result", result[0]) - return SCIP_OKAY - --cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal, int depth) with gil: -+cdef SCIP_RETCODE PySepaExecsol (SCIP* scip, SCIP_SEPA* sepa, SCIP_SOL* sol, SCIP_RESULT* result, unsigned int allowlocal, int depth) noexcept with gil: - cdef SCIP_SEPADATA* sepadata - sepadata = SCIPsepaGetData(sepa) - solution = Solution.create(scip, sol) From c4363fc97eb67fb08073ea37ef88d633e9feb160 Mon Sep 17 00:00:00 2001 From: Release Manager Date: Sat, 27 Apr 2024 17:37:12 +0200 Subject: [PATCH 183/183] Updated SageMath version to 10.4.beta4 --- CITATION.cff | 4 ++-- VERSION.txt | 2 +- build/pkgs/configure/checksums.ini | 6 +++--- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/sage_conf/version_requirements.txt | 2 +- build/pkgs/sage_docbuild/version_requirements.txt | 2 +- build/pkgs/sage_setup/version_requirements.txt | 2 +- build/pkgs/sage_sws2rst/version_requirements.txt | 2 +- build/pkgs/sagelib/version_requirements.txt | 2 +- build/pkgs/sagemath_bliss/version_requirements.txt | 2 +- build/pkgs/sagemath_categories/version_requirements.txt | 2 +- build/pkgs/sagemath_coxeter3/version_requirements.txt | 2 +- build/pkgs/sagemath_environment/version_requirements.txt | 2 +- build/pkgs/sagemath_mcqd/version_requirements.txt | 2 +- build/pkgs/sagemath_meataxe/version_requirements.txt | 2 +- build/pkgs/sagemath_objects/version_requirements.txt | 2 +- build/pkgs/sagemath_repl/version_requirements.txt | 2 +- build/pkgs/sagemath_sirocco/version_requirements.txt | 2 +- build/pkgs/sagemath_tdlib/version_requirements.txt | 2 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_conda/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-bliss/VERSION.txt | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-coxeter3/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-mcqd/VERSION.txt | 2 +- pkgs/sagemath-meataxe/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-sirocco/VERSION.txt | 2 +- pkgs/sagemath-tdlib/VERSION.txt | 2 +- src/VERSION.txt | 2 +- src/bin/sage-version.sh | 6 +++--- src/sage/version.py | 6 +++--- 38 files changed, 45 insertions(+), 45 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 78059fdc091..894be5d6a9e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,8 +4,8 @@ title: SageMath abstract: SageMath is a free open-source mathematics software system. authors: - name: "The SageMath Developers" -version: 10.4.beta3 +version: 10.4.beta4 doi: 10.5281/zenodo.593563 -date-released: 2024-04-12 +date-released: 2024-04-27 repository-code: "https://github.com/sagemath/sage" url: "https://www.sagemath.org/" diff --git a/VERSION.txt b/VERSION.txt index fa9d32fec7a..c62fa370476 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.4.beta3, Release Date: 2024-04-12 +SageMath version 10.4.beta4, Release Date: 2024-04-27 diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index 4c621a4ea47..5a209c1c1bc 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,4 +1,4 @@ tarball=configure-VERSION.tar.gz -sha1=f46d28f976fdd73aa93eff6810b28b3e7b165bf1 -md5=db30b8d7485d8c3b6f4f73a8282816be -cksum=726460493 +sha1=2d6779beb2e69f0f7bddc2edc44ad275442ffd29 +md5=789344e03a6b57ba1538c0c760449720 +cksum=3806733369 diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index 2310b785e39..6035b129425 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -3cffb4c1c8d29849cfeb9dc0332d7549800e044a +0a7b2513287af1124a358c2494b8bef4668a1882 diff --git a/build/pkgs/sage_conf/version_requirements.txt b/build/pkgs/sage_conf/version_requirements.txt index a9fc6b33c1e..1e512338617 100644 --- a/build/pkgs/sage_conf/version_requirements.txt +++ b/build/pkgs/sage_conf/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.4b3 +sage-conf ~= 10.4b4 diff --git a/build/pkgs/sage_docbuild/version_requirements.txt b/build/pkgs/sage_docbuild/version_requirements.txt index 6392017efee..005cc4306ac 100644 --- a/build/pkgs/sage_docbuild/version_requirements.txt +++ b/build/pkgs/sage_docbuild/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.4b3 +sage-docbuild ~= 10.4b4 diff --git a/build/pkgs/sage_setup/version_requirements.txt b/build/pkgs/sage_setup/version_requirements.txt index fa79fc9374b..fc721f1c1da 100644 --- a/build/pkgs/sage_setup/version_requirements.txt +++ b/build/pkgs/sage_setup/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.4b3 +sage-setup ~= 10.4b4 diff --git a/build/pkgs/sage_sws2rst/version_requirements.txt b/build/pkgs/sage_sws2rst/version_requirements.txt index 012366aac27..9ec4b186ac9 100644 --- a/build/pkgs/sage_sws2rst/version_requirements.txt +++ b/build/pkgs/sage_sws2rst/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.4b3 +sage-sws2rst ~= 10.4b4 diff --git a/build/pkgs/sagelib/version_requirements.txt b/build/pkgs/sagelib/version_requirements.txt index 958d7998ec8..9c1daa7372c 100644 --- a/build/pkgs/sagelib/version_requirements.txt +++ b/build/pkgs/sagelib/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-standard ~= 10.4b3 +sagemath-standard ~= 10.4b4 diff --git a/build/pkgs/sagemath_bliss/version_requirements.txt b/build/pkgs/sagemath_bliss/version_requirements.txt index f140cad57dd..ba9e1b2081d 100644 --- a/build/pkgs/sagemath_bliss/version_requirements.txt +++ b/build/pkgs/sagemath_bliss/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-bliss ~= 10.4b3 +sagemath-bliss ~= 10.4b4 diff --git a/build/pkgs/sagemath_categories/version_requirements.txt b/build/pkgs/sagemath_categories/version_requirements.txt index 15b52d809bf..6155490b8ef 100644 --- a/build/pkgs/sagemath_categories/version_requirements.txt +++ b/build/pkgs/sagemath_categories/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.4b3 +sagemath-categories ~= 10.4b4 diff --git a/build/pkgs/sagemath_coxeter3/version_requirements.txt b/build/pkgs/sagemath_coxeter3/version_requirements.txt index db035aacdca..932bad03329 100644 --- a/build/pkgs/sagemath_coxeter3/version_requirements.txt +++ b/build/pkgs/sagemath_coxeter3/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-coxeter3 ~= 10.4b3 +sagemath-coxeter3 ~= 10.4b4 diff --git a/build/pkgs/sagemath_environment/version_requirements.txt b/build/pkgs/sagemath_environment/version_requirements.txt index 80fd875a7e4..475da537a2b 100644 --- a/build/pkgs/sagemath_environment/version_requirements.txt +++ b/build/pkgs/sagemath_environment/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.4b3 +sagemath-environment ~= 10.4b4 diff --git a/build/pkgs/sagemath_mcqd/version_requirements.txt b/build/pkgs/sagemath_mcqd/version_requirements.txt index 58a3e31ff65..0631db2f93a 100644 --- a/build/pkgs/sagemath_mcqd/version_requirements.txt +++ b/build/pkgs/sagemath_mcqd/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-mcqd ~= 10.4b3 +sagemath-mcqd ~= 10.4b4 diff --git a/build/pkgs/sagemath_meataxe/version_requirements.txt b/build/pkgs/sagemath_meataxe/version_requirements.txt index b46a8c93c1e..fa695fc4e4a 100644 --- a/build/pkgs/sagemath_meataxe/version_requirements.txt +++ b/build/pkgs/sagemath_meataxe/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-meataxe ~= 10.4b3 +sagemath-meataxe ~= 10.4b4 diff --git a/build/pkgs/sagemath_objects/version_requirements.txt b/build/pkgs/sagemath_objects/version_requirements.txt index 56948780fe6..38fc3c4dec3 100644 --- a/build/pkgs/sagemath_objects/version_requirements.txt +++ b/build/pkgs/sagemath_objects/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.4b3 +sagemath-objects ~= 10.4b4 diff --git a/build/pkgs/sagemath_repl/version_requirements.txt b/build/pkgs/sagemath_repl/version_requirements.txt index 230c8f95374..9b039bdd460 100644 --- a/build/pkgs/sagemath_repl/version_requirements.txt +++ b/build/pkgs/sagemath_repl/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.4b3 +sagemath-repl ~= 10.4b4 diff --git a/build/pkgs/sagemath_sirocco/version_requirements.txt b/build/pkgs/sagemath_sirocco/version_requirements.txt index d04d2ab48b0..09d50bb08f7 100644 --- a/build/pkgs/sagemath_sirocco/version_requirements.txt +++ b/build/pkgs/sagemath_sirocco/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-sirocco ~= 10.4b3 +sagemath-sirocco ~= 10.4b4 diff --git a/build/pkgs/sagemath_tdlib/version_requirements.txt b/build/pkgs/sagemath_tdlib/version_requirements.txt index 53da30e01ec..5f55b35c539 100644 --- a/build/pkgs/sagemath_tdlib/version_requirements.txt +++ b/build/pkgs/sagemath_tdlib/version_requirements.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-tdlib ~= 10.4b3 +sagemath-tdlib ~= 10.4b4 diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sage-conf_conda/VERSION.txt b/pkgs/sage-conf_conda/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sage-conf_conda/VERSION.txt +++ b/pkgs/sage-conf_conda/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-bliss/VERSION.txt b/pkgs/sagemath-bliss/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-bliss/VERSION.txt +++ b/pkgs/sagemath-bliss/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-coxeter3/VERSION.txt b/pkgs/sagemath-coxeter3/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-coxeter3/VERSION.txt +++ b/pkgs/sagemath-coxeter3/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-mcqd/VERSION.txt b/pkgs/sagemath-mcqd/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-mcqd/VERSION.txt +++ b/pkgs/sagemath-mcqd/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-meataxe/VERSION.txt b/pkgs/sagemath-meataxe/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-meataxe/VERSION.txt +++ b/pkgs/sagemath-meataxe/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-sirocco/VERSION.txt b/pkgs/sagemath-sirocco/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-sirocco/VERSION.txt +++ b/pkgs/sagemath-sirocco/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/pkgs/sagemath-tdlib/VERSION.txt b/pkgs/sagemath-tdlib/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/pkgs/sagemath-tdlib/VERSION.txt +++ b/pkgs/sagemath-tdlib/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/src/VERSION.txt b/src/VERSION.txt index af343da123a..957ecf95b0a 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.4.beta3 +10.4.beta4 diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index ec030052a09..c2aa055eac9 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.4.beta3' -SAGE_RELEASE_DATE='2024-04-12' -SAGE_VERSION_BANNER='SageMath version 10.4.beta3, Release Date: 2024-04-12' +SAGE_VERSION='10.4.beta4' +SAGE_RELEASE_DATE='2024-04-27' +SAGE_VERSION_BANNER='SageMath version 10.4.beta4, Release Date: 2024-04-27' diff --git a/src/sage/version.py b/src/sage/version.py index c398930ba19..191a5474629 100644 --- a/src/sage/version.py +++ b/src/sage/version.py @@ -1,5 +1,5 @@ # Sage version information for Python scripts # This file is auto-generated by the sage-update-version script, do not edit! -version = '10.4.beta3' -date = '2024-04-12' -banner = 'SageMath version 10.4.beta3, Release Date: 2024-04-12' +version = '10.4.beta4' +date = '2024-04-27' +banner = 'SageMath version 10.4.beta4, Release Date: 2024-04-27'